Welcome

OurSystem is an application for starting a new project with Codeigniter Framework, It is developed for CodeIgniter projects, It includes the most common features required for a project. It will make your development tasks easier and save time than ever

Its main goal is to speed up web development efforts by providing configurable and ready-to-use modules. Configuration can be made easy using the Control Panel, or programming.

The helpful features of this application are CRUD Generator, API Generator, Dynamic Menu with just drag and drop, Login with (Facebook, Twitter, Google), Realtime Notification system, clean, and easy to understand code, all developed according to the flow you need to create web applications.

Benefits of using this application:

- Speed up web development by using ready-to-use modules
- Make changes quickly and easily with the control panel
- Quickly create a CRUD system with the CRUD Generator
- Quickly create Rest API with API Generator
- Source code is available for further modification
- Code is built following HMVC standards


Installation

just wait a few seconds for the installation of your system, no need for other additions everything is automatic

You just need to go to http://www.example.com/install and enter the data according to your web server then input the admin account and install after that you continue to log in for the first time

Requirement

System requirements for running this web application

PHP v7.3 / v7.4.23 / 8.1.13 / 8.2.10
MySQL or MariaDB v10.1.37
PHP ENABLE GD/GD2
PHP ENABLE CURL
PHP ENABLE OPENSSL
PHP ENABLE ZIP

Video

https://www.youtube.com/watch?v=AVrkG1xycPs

API Generator

Help you build APIs and Auto-generated Documents, you just have to set them up

How to use

  1. First, Create Database
  2. You just select the table, the controller and model names will be automatically created along with the fields will be displayed
  3. After that you set it according to your needs and your knowledge of the API
  4. Last to do generate
  5. The generated file is located at application/modules/api/...

Settings

In settings you can find features consisting of :
Column Description
UPLOAD PATH this is the path for file upload
SOFT DELETE any deleted data will not be permanently deleted
DATETIME UPDATE every updated data, the column updated_at will be updated automatically with the format Y-m-d H:i:s in the related database
DATETIME DELETE every deleted data, the deleted_at column will be updated automatically with the Y-m-d H:i:s format in the related database

Manage API

This feature is the result of the generate, you can delete, edit and view the documentation, the data list is located in application/modules/api_generator/api_installed.json I use json to reduce database usage and code efficiency so that it can be redeveloped at any time.

Tool

I'm using testing API with Extension on browser i.e. RESTer you can upload it here https://github.com/frigus02/RESTer

Video

https://www.youtube.com/watch?v=1lK3GffMj7Q

CRUD Generator

You just need to set it up and adjust to your needs and you're done.

How to use

  1. First, Create Database
  2. You just select the table, the controller and model names will be automatically created along with the fields will be displayed
  3. After that you set it according to your needs and your knowledge of CRUD
  4. Last to generate
  5. The generated file is located at application/modules/[nama_table]

Important before you generate make sure the table in your database must have a primary key

Column Description
Enable to enable/disable available fields
Field data related to your database except data that is primary key
Show On / Permission to set the display of data
Type consists of built-in and custom input HTML elements
Validation to validate the input data
Check to validate the input data with additional ajax and jquery validate

CRUD Generator using exports. you can check here application/modules/crud_generator/views/export/...

Settings

Settings CRUD consist of :
Name Description
UPLOAD PATH this is the path for file upload
SET LAYOUT FROM to change the position of the form associated with Create, Update, Read
SET QUICK ACTION if you enable this then the action on the button, will load in 1 page
SET TABLE SERVERSIDE if you enable this then the table will be loaded with ajax to minimize redundant data, enable this if the data is more than 1000
SOFT DELETE any deleted data will not be permanently deleted
DATETIME CREATED every updated data, the column created_at will be updated automatically with the format Y-m-d H:i:s in the related database
DATETIME UPDATE every updated data, the column updated_at will be updated automatically with the format Y-m-d H:i:s in the related database
DATETIME DELETE every deleted data, the deleted_at column will be updated automatically with the Y-m-d H:i:s format in the related database

Manage CRUD

This feature is the result of generating, you can delete and edit, the data list is located in the application/modules/crud_generator/crud_installed.json I use json to reduce database usage and code efficiency so that it can be redeveloped at any time.

Table Load Data

if you enable this then the data table will be loaded based on logged in user except users with admin rights will be shown all you can see an example in managed CRUD on CRUD that has been made or you can also experiment yourself or you can contact me for the rest

Addrow

This feature is for adding column rows to CRUD, you can see an example of managing CRUD on a CRUD that has been created.

Custom Permissions After the Result of CRUD

to change permission as per your need you just need to go to application/modules/[generate_crud]/settings.json after that you just need to add column with role value

Example :
{
    "upload_path": "files/uploads/",
    "permission_btn_create": "1",
    "permission_btn_read": "1",
    "permission_btn_edit": "1",
    "permission_btn_delete": "1",
    "permission_btn_trash": "1",
    "permission_btn_appearance": "1",
    "permission_bulk": "1",
    "column": { 
    "name": "1,4",
    "description": "1,4",
    "permission_access": "1,4",

    "custom_column" : "1"
}
}

Once that is added, you only need to add logic to views and controllers :

Example on controllers/Name.php function _data() :
if($this->ion_auth->in_group( explode(',',$this->data['data_settings']->column->name) )) {
    $array['custom_column'] = $row == true ? $this->input->post('custom_column') : set_value('custom_column'); 
}
Example on views/*_table.blade.php :
@if($this->ion_auth->in_group( explode(',',$data_settings->column->custom_column) ))
custom_column
@endif 

This logic applies to all existing views, so you only need to add them. you can see references in existing programs

How to add filter by column

Add the example config below to application/modules/[module_name]/views/*_table.blade.php between line code no 36

'filterbycolumn' : [
    {
    'label'	 : 'Select Date', // label
    'target' : '#filterbydate', // element div #id
    'column' : '1', // no column 
    },
    {
    'label'	 : 'Select Username',
    'target' : '#filterbyusername',
    'column' : '2',
    }
],

After that, also add HTML elements to display

<div id="filter" class="row mb-4">
	<div class="col-md-3">
		<label class="form-label">Filter by Date</label>
		<div id="filterbydate"></div>
	</div>
	<div class="col-md-3">
		<label class="form-label">Filter by Username</label>
		<div id="filterbyusername"></div>
	</div>
</div>

Recommendation: Use this filter if you have a lot of data

Video

https://www.youtube.com/watch?v=CWF_KdqyYkM


Social Auth

This feature is for users who can register or login using their social media accounts.

Use

For use, you have to login as admin, after that you have to set the code to connect your site with social media via API, check here http://www.example.com/settings/application#social_auth

URL Callback

for the default url callback i.e http://www.example.com/auth/provider you can check the file application/modules/auth/controller/Auth.php with function name provider_get()

Important: when you enter the callback url on the developer provider site, please add the provider name at the end of the example : http://www.example.com/auth/provider/google

Users Can Register From SocialAuth

if set to true then user can register via third party provider like facebook, twitter or google if user performs authority action with that provider

Procedure
when the user successfully logs in with his social media, the data will be validated and matched with the database to adjust whether the data is available or not. if it is available then the user will proceed to the next page with their account session, otherwise the user will automatically register with their social media account with a random password and then the registration information email will be sent to the registered email

You can find the procedure application/modules/auth/controller/Auth.php with function name provider_register_get()


Notification

CONTOH UNTUK PARSE STRING PADA KOLOM MESSAGE
Syntax Description
{username} mengembalikan username berdasarkan sesi pengguna
{email} mengembalikan email berdasarkan sesi pengguna
{fullname} mengembalikan fullname berdasarkan sesi pengguna
CARA MENAMPILKAN YANG MENGACU DI TAMPILAN PENGATURAN NOTIFIKASI

// ADD NOTIFICATION TYPE DEFAULT
$this->global_notification->userid = '1,2'; // USER ID
$this->global_notification->trigger('auth_register');

// ADD NOTIFICATION TYPE BROADCAST
$this->global_notification->trigger('auth_register');
CARA LAIN MENAMBAHKAN NOTIFIKASI PADA AKSI DI KODE ANDA

// ADD NOTIFICATION FOR ADMIN
$admin_id = $this->ion_auth->users($config->ionauth->admin_group)->row()->id;
$this->global_notification->show([
    'name'      => '',
    'users'     => $admin_id,
    'icon'      => '',
    'message'   => '',
    'url'       => '',
    'push'      => 'system', // system,email,whatsapp
    'type'      => 'Default' // Default || Broadcast
]);

// ADD NOTIFICATION FOR USERS
$this->global_notification->show([
    'name'      => '',
    'users'     => 'id users',
    'icon'      => '',
    'message'   => '',
    'url'       => '',
    'push'      => 'system', // system,email,whatsapp
    'type'      => 'Default' // Default || Broadcast
]);
Logic

* Untuk parameter users anda dapat mengisi dengan data ID dari users misalnya 1,2,3 tujuannya untuk menampilkan notifikasi pada masing-masing pengguna yang ditentukan, ini berjalan untuk tipe notifikasi Default

* Untuk notifikasi tipe broadcast, broadcast ini bertujuan untuk menampilkan pemberitahuan berdasarkan hak akses semua pengguna, jika anda memilih ini maka parameter users akan mengembalikan berdasarkan session user id meskipun anda sudah set.

Push On with System

jika Anda mengaktifkan push on dengan pemicu System maka pengguna yang terkait akan dikirimi notifikasi dalam website.

Push On with Email

jika Anda mengaktifkan push on dengan pemicu Email maka pengguna yang terkait akan dikirimi notifikasi dalam bentuk email.

Push On with WhatsApp

jika anda mengaktifkan push on dengan pemicu Whatsapp maka user yang terkait akan dikirimkan notifikasi berupa pesan pada masing-masing platform whatsapp.

Location Script

Anda dapat menemukan lokasi script di bawah ini untuk melakukan kostum lebih lanjut


API REQUEST     : application/modules/api/controllers/Api.php

LIBRARY         : application/third_party/MY_APPS/libraries/Global_notification.php
MODEL           : application/third_party/MY_APPS/models/Global_notification_model.php

JSON DATA       : application/third_party/MY_APPS/notifications.json

EMAIL TEMPLATE  : application/views/_email/notification.blade.php
SMS TEMPLATE    : application/views/_sms/notification.blade.php

AJAX SCRIPT     : application/views/oneui/backend/partials/ajax_notifications.blade.php

UI CONTROLLER   : application/modules/settings/controllers/Notification.php
UI VIEW TABLE   : application/modules/settings/views/notification/table.blade.php
UI VIEW FORM    : application/modules/settings/views/notification/form.blade.php

Payment Gateway

Knowledge of payment gateway system implementation, for each provider

Xendit

first you have to connect your xendit account via API by entering apikey in settings > application > payment gateway after that save and done. then the xendit dashboard will automatically load the data associated with your account

code location
or you can also try simulating how the API works

CONTROLLER : application/modules/transaction/controllers/Xendit.php
API : application/modules/transaction/models/XenditApi.php

Refrensi API : https://developers.xendit.co/api-reference/id/

Ipaymu

first you have to connect your ipaymu account via fire by entering apikey and VA in settings > application > payment gateway after that save and done. then your ipay dashboard will automatically load the data associated with your account

code location
or you can also try simulating how the API works

CONTROLLER : application/modules/transaction/controllers/Ipaymu.php
API : application/modules/transaction/models/IpaymuApi.php

Refrensi API : https://documenter.getpostman.com/view/7508947/SWLfanD1?version=latest

Video

https://www.youtube.com/watch?v=ZM77ajVlfp0

SMS Gateway

Knowledge of this concept

Internal NodeJS

Specifically, you can run the WhatsApp API separately to access it, this feature is obtained after you buy oursystem full version

internal NodeJS this is still in the development stage, and this feature can only send text messages and picture messages for system notification purposes and forgot passwords contained in the system OurSystem

How to run API on localhost

 // packcage install
$ npm install packcage.json

// run script
$ node app.js

// URL UI
http://localhost:8080/

// URL API
http://localhost:8080/send-message [POST]
http://localhost:8080/send-media [POST]

// CURL SEND MESSAGE
curl -X POST http://localhost:8000/send-message \
-H 'Authorization: TOKEN' \
-H 'Content-Type: application/json' \
-d '{
    "number":"PHONE NUMBER",
    "message":"hello \n world"
}'

/**
* Example Use
$this->os_whatsapp_sendText([
    'phone' => 'phone number', (required)
    '...' => '...'
], template_name.php);
*/
$this->os_whatsapp_sendText($data as array, $template_name as string)

For tokens, username and password you can look in the file whatsapp_api/config/default.json

Wablas

To activate the feature you must have an apikey from the wablas site, after that you install the apikey in the settings > SMS Gateway

You can find the libraries installed in

application/third_party/MY_APPS/libraries/Wablas.php

Example of calling a function with a prefix $this->wablas

/**
* Example Use
$this->wablas->sendText([
    'phone' => 'xxxxxxx'
    'identity' => 'name of user'
], template.php);
*
* @param array $data
* @param string $viewname
* @return json
*/
$this->wablas->sendText($data as array, $viewname as string)

For more details, you can visit https://jogja.wablas.com/documentation/


Core System

Knowledge of how to implement the system

Change Enviroment

// location application/core/MY_APPS.php
define('ENVCORE', 'PRODUCTION'); // PRODUCTION / TRIAL / DEMO

Core Include Third Party

I implemented all libraries and helpers in 1 folder so that later it can be redeveloped and updated

application/third_party/MY_APPS/config/*
application/third_party/MY_APPS/helpers/*
application/third_party/MY_APPS/language/*
application/third_party/MY_APPS/libraries/*
application/third_party/MY_APPS/models/*
application/third_party/MY_APPS/*

Build Core

You can check : application/config/hooks.php

$hook['pre_system'][] = array(
    'class'     => '',
    'function'  => 'autoload',
    'filename'  => 'Autoload.php',
    'filepath'  => 'hooks'
);

You can check : application/hooks/Autoload.php

function autoload()
{
    // autoload in core
    spl_autoload_register(function($class)
    {
        if(strpos($class,'CI_') !== 0 && file_exists(APPPATH . 'core/' . $class . '.php'))
        {
            require_once APPPATH . 'core/' . $class . '.php';
        }
    });

    // autoload in libraries in third_party
    spl_autoload_register(function($class)
    {
        if(strpos($class,'CI_') !== 0 && file_exists(APPPATH . 'third_party/MY_APPS/libraries/' . $class . '.php'))
        {
            require_once APPPATH . 'third_party/MY_APPS/libraries/' . $class . '.php';
        }
    });
}

You can check : application/core/MY_APPS.php

// PRODUCTION / TRIAL / DEMO
define('ENVCORE', 'PRODUCTION');

// jwt
use Firebase\JWT\JWT;
use Firebase\JWT\Key;

// hashids
use Hashids\Hashids;

// phpmailer
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\SMTP;
use PHPMailer\PHPMailer\Exception;

// curl
use Curl\Curl;
use Curl\MultiCurl;

/* CORE SYSTEM */
class MY_Apps extends RestController
{
    public $data = [];

    public function __construct()
    {
        parent::__construct();

        // check web installed
        $this->_check_web_installed();

        // start elapsed_time 
        $this->benchmark->mark('code_start');

        // set class env
        $this->data['env'] = ENVCORE;

        // MY CORE packcage
        $this->load->add_package_path(APPPATH . 'third_party/MY_APPS/');

        // load libraries
        $this->load->library(['Ion_auth', 'Slice', 'Crud_database', 'Model']);

        // load helper
        $this->load->helper(['slice', 'apps']);

        // load config
        $this->config->load('hybridauth');
        $this->config->load('rest');
        $this->config->load('slice');
        $this->config->load('ion_auth');

        // load lang
        $this->lang->load(['auth', 'ion_auth', 'rest_controller']);

        // global message alert notification
        $this->data['notification'] = $this->session->notification;

    ....
}

How to call function in MY_APPS.php : $this->name_function()

Self implementation method

Create a new controller

class YOUR_CONTROLLER extends MY_Apps
{
    public $data = [];

    public function __construct()
    {
        parent::__construct();

        $this->load->model('YOUR_MODEL');
    }

    public function index_get($param)
    {
        // render views
        return view('name_file', $this->data);
    }

    public function index_post()
    {
        // code 
    }

    public function index_patch()
    {
        // code 
    }

    public function index_delete()
    {
        // code 
    }
}

Create a new view, the rest you can see existing programs

@extends('oneui.backend.layout')

@section('css_before')
CSS IN HERE
@endsection 

@section('js_after')
JS or jQuery IN HERE
@endsection 

@section('content')
HTML or PHP IN HERE
@endsection 

Create a new model

class YOUR_MODEL extends Model
{
    protected $table = 'TABLE';

    protected $primaryKey = 'id';

    public $sort_order = 'desc';

    const CREATED_AT = null; 

    protected $timestamps = true;

    const UPDATED_AT = 'updated_at'; 

    // @var string unixtime(946684800)|datetime(2000-01-01 00:00:00)
    protected $dateFormat = 'datetime';

    // for disable const SOFT_DELETED = false; 
    const SOFT_DELETED = 'is_deleted'; 

    // for disable const DELETED_AT = false; 
    const DELETED_AT = 'deleted_at'; 

    // The actived value for SOFT_DELETED
    protected $softDeletedFalseValue = '0';

    // The deleted value for SOFT_DELETED
    protected $softDeletedTrueValue = '1';

    .....
}

Settings or Configuration

information how to use code setting on controller

Location Script

application/third_party/MY_APPS/*.json
application/third_party/MY_APPS/config/*.php

Call value config

 // in controllers
$this->myconfig->object_in_json

// in views
{{ $config->object_in_json }}

the rest you can see the existing code

Call value property in Core/MY_Apps.php for function

//example in name_helper.php
function foo()
{
    // call ci system
    $ci =& get_instance();

    // call property in core
    $ci->slice->{variable or key array property};
} 

Permission

This system is divided into 2, namely access permissions and page access permissions

Page access permission

You can find this system on page Menu & Access along with the manage menu, I associate this permission with the roles contained in the groups page, to set who has access to existing pages.

Access permission

You can find this system on the page Groups together with managing groups, this system refers to all aspects of request data such as API tokens and HTTP requests POST, UPDATE and DELETE on each existing page, so that every user who has a role will be limited to the specified validation

How to apply

You can simply add the code below to each method in controllers

Example on page request GET :

$this->_authuser('auth/login');
$this->_permission_access_page($this->data['module_uripage']);

Example on page request POST :

$this->_authuser();
$this->_permission_access_page($this->data['module_uripage'], false);
$this->_permission('create');
Column Param Description
$this->_authuser() $redirect (string|bool) return false
$this->_permission_access_page() (string) as name_class_in_controller, $redirect = (bool) return false
$this->_permission() valid (string) read|create|update|delete return false

Concept flow

1. check if the user is logged in or not
2. checks webmaster-defined page access permissions for existing roles
3. checks the specified access permissions whether with the associated role can make requests READ|CREATE|UPDATE|DELETE


Themes

How to customize theme configuration on controller

// CUSTOM CONTENT WRAP
$this->data['content_wrap'] = bolean;
// CUSTOM CONFIG META
$this->mythemes->meta->title = string
$this->mythemes->meta->description = string
$this->mythemes->meta->author = string
$this->mythemes->meta->robots = string
$this->mythemes->meta->images = string
$this->mythemes->meta->type = string
$this->mythemes->meta->icons->favicon = 'url_image';
$this->mythemes->meta->icons->icons_x192 = 'url_image';
$this->mythemes->meta->icons->icons_x180 = 'url_image';
// CUSTOM CONFIG HEADER
$this->mythemes->header->enable = bolean;
$this->mythemes->header->logo = bolean;
$this->mythemes->header->navmenu = bolean;
$this->mythemes->header->dark_mode = bolean;
$this->mythemes->header->position = 'page-header-fixed or page-header-static';
$this->mythemes->header->form_search_desktop = bolean;
$this->mythemes->header->form_search_mobile = bolean;
$this->mythemes->header->dropdown_notification = bolean;
$this->mythemes->header->dropdown_themes_color = bolean;
// CUSTOM CONFIG SIDEBAR
$this->mythemes->sidebar->enable = bolean;
$this->mythemes->sidebar->logo = bolean;
$this->mythemes->sidebar->hidden = bolean;
$this->mythemes->sidebar->mini = bolean;
$this->mythemes->sidebar->navmenu = bolean;
$this->mythemes->sidebar->dark_mode = bolean;
$this->mythemes->sidebar->dropdown_themes_color = bolean;
$this->mythemes->sidebar->toggle_sidebar_mini = bolean;
$this->mythemes->sidebar->toggle_sidebar_mobile = bolean;
// CUSTOM CONFIG SIDEOVERLAY
$this->mythemes->side_overlay->enable = bolean;
$this->mythemes->side_overlay->hover_mode = bolean;
// CUSTOM CONFIG LAYOUT
$this->mythemes->layout->native_scrolling = bolean;
$this->mythemes->layout->flipped = bolean;
$this->mythemes->layout->main_content = 'full-width / main-content-narrow / main-content-boxed';
// CUSTOM CONFIG FOOTER
$this->mythemes->footer->enable = bolean;
$this->mythemes->footer->logo = bolean;
$this->mythemes->footer->elapsed_time = bolean;
// CUSTOM CONFIG THEMES FULL
$this->mythemes->full_dark = bolean;
$this->mythemes->themes_colors = 'Default / Amethyst / City / Flat / Modern / Smooth';

Location Scripts

you can find backend theme structure in

application/views/oneui/backend/layout.blade.php
application/views/oneui/backend/parts/..
application/views/oneui/backend/section/..

Frontend

A little information about the frontend

Script Location

You can find it at

MODULES : application/modules/frontend
ROUTES : application/config/routes.php

You can also change the frontend theme on appearance > themes

For Developer

If you have an existing template, you can add it to the folder application/modules/frontend/views/[folder_your_template] and the template that you have must follow the rules of the existing controller, or you can also use my services to convert your template into the system. for further information you can contact me via email webmestudio.gmail.com or whatsapp/telegram to this no +62895389563071

How to use assets minify

Add the below sample code to your layout

 // CSS
$assets_css = [
    "assets/name.css"
];
@php
$this->minify->css($asset_css);
echo $this->minify->deploy_css(true, 'themes.min.css');
@endphp

// SCRIPT
$assets_js = [
    "assets/name.js"
];
@php
$this->minify->compress = false;
$this->minify->js($asset_js);
echo $this->minify->deploy_js(false, 'themes.min.js');
@endphp

The rest you can see the existing programs for reference

Minify Location Script

LIB : application/libraries/Minify.php
LIB INCLUDE : application/libraries/minify/...
CONFIG : application/config/minify.php

Datatable

Contoh memulai datatable pada halaman baru

// HTML
<div class="table-responsive">
    <table id="tables" class="table table-primary">
        <thead>
            <tr>
                <th>Column 1</th>
                <th>Column 2</th>
                <th>Column 3</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>R1C1</td>
                <td>R1C2</td>
                <td>R1C3</td>
            </tr>
            <tr>
                <td>Item</td>
                <td>Item</td>
                <td>Item</td>
            </tr>
        </tbody>
    </table>
</div>

// JQUERY DATATABLES
app_datatables({
    'id'                : '#tables',
    'show_button'       : false,
    'show_info'         : true,
    'show_search'       : true,
    'show_pagination'   : true,
    'show_entries'      : true,
    'orderable_first'   : true,
    'select_row'        : false,
    'column_first'      : true,
    'responsive'        : false,
    'button_csv'        : false,
    'button_excel'      : false,
    'button_searchpanel': false, // WORK IF SERVERSIDE OFF
    'button_pdf'        : false,
    'button_print'      : false,
    'button_copy'       : false,
    'fixedheader'       : false,

    'serverside'            : false,    // ON OFF SERVERSIDE
    'serverside_ajax_url'   : '',       // URL REQUEST DATA
    'serverside_ajax_method': 'POST',   // METHOD REQUEST
    'serverside_setcolumn'  :           // RESPONSE DATA 
    [	
        {
            data : 'id',
            name : 'checkbox',
            orderable : false,
            render : function(data, type, row) {
                return '<input class="form-check-input selectrow" type="checkbox" value="'+ data +'" />';
            }
        }
    ]
});

File Manager

This system helps in managing your files easily

Explanation

The initial installation of this system runs separately so the password is still the default, namely :

Super Admin
Username : admin
Password : password

After logging in please change the new password.


Command CLI

Bagaimana cara menggunakan perintah untuk membuat struktur MVC atau HMVC

HMVC Module

Command Description
$ php cli app make:module name Perintah ini untuk membuat struktur folder module dan file controller default
$ php cli app module:controller path/name Perintah ini untuk membuat file controller pada module yang ada
$ php cli app module:model path/name Perintah ini untuk membuat file model pada module yang ada
$ php cli app module:view path/name Perintah ini untuk membuat file views pada module yang ada

MVC Default

Command Description
$ php cli app controller:create name Perintah ini untuk membuat file controller default
$ php cli app model:create name Perintah ini untuk membuat file model pada models default
$ php cli app view:create name Perintah ini untuk membuat file views pada views default

Anda dapat menemukan prosedur tersebut di application/controllers/App.php


Important Functions

Auth

Function Description In Controller In Views Returned
$this->ion_auth->logged_in() cek session pengguna dengan hak akses users Ya Ya Bolean
$this->ion_auth->is_admin() cek session pengguna dengan hak akses admin Ya Ya Bolean
$this->data['user'] sebagai session pengguna dan mengembalikan data array Ya No Array
$user sebagai session pengguna dan mengembalikan data array No Ya Array

Untuk referensi lengkap nya anda dapat melihat halaman ini

Helper

Function Description In Controller In Views Returned
json_to_table( json $data ) fungsi ini untuk format data berupa json ke tampilan table Ya Ya String
get_user_fullname( int $id ) fungsi ini untuk menampilkan nama lengkap pengguna yang mengacu pada user id Ya Ya String
get_user_by( int $id, string $column ) fungsi ini untuk menampilkan data pengguna yang mengacu pada user id dan column pada table users Ya Ya String
get_user_by_session( int $id, string $column ) fungsi ini untuk menampilkan data pengguna yang sudah login ini mirip dengan $this->data['user'] Ya Ya String
os_string( string $value ) fungsi ini untuk auto diteksi string case sensitive antara OS Windows dan Linux Ya Ya String
os_filesize( int $value ) fungsi ini untuk convert nilai integer ke format float contoh output : 1,33, 3,44 Ya Ya Float
os_filesize_label( int $value ) fungsi ini untuk convert nilai integer ke format data contoh output : 1,23KB, 2MB Ya Ya String
os_scandir( string $path ) fungsi ini untuk manmpilkan semua folder dan file berserta tipe tipe pada jalur path yang di set Ya Ya Array
captcha_create() fungsi ini untuk buat image captcha berserta kode captcha yang disisipkan ke dalam session dan auto menghapus image sebelumnya Ya Ya Void
captcha_check( string $postdata ) fungsi ini untuk validasi kode captcha yang di input pengguna Ya Ya Bolean
array_group_by( array $array, string $key ) fungsi ini untuk Mengelompokkan array ke dalam array berdasarkan kunci tertentu, atau kumpulan kunci, yang dibagikan di antara semua anggota array. Ya Ya Array|Null
array_object_get( array $array, string $field, string $key ) fungsi ini untuk menampilkan data object array yang dicari ini bekerja untuk array 2 dimension Ya Ya Array Object
array_object_get_keys( array $array, string $field, string $key ) fungsi ini untuk menampilkan data object array keys yang dicari ini bekerja untuk array 2 dimension Ya Ya Array Object
array_object_value_check( array $array, string $field, string $key ) fungsi ini untuk cek data object array yang dicari ini bekerja untuk array 2 dimension Ya Ya Bolean
array_get( array $array, string $field, string $key ) fungsi ini untuk menampilkan data array yang dicari ini bekerja untuk array 2 dimension Ya Ya Array
array_get_keys( array $array, string $field, string $key ) fungsi ini untuk menampilan data array keys yang dicari ini bekerja untuk array 2 dimension Ya Ya Array
array_value_check( array $array, string $field, string $key ) fungsi ini untuk cek data array yang dicari ini bekerja untuk array 2 dimension Ya Ya Bolean
array_recursive_search(string $needle, array $haystack) fungsi ini untuk menampilkan data yang di cari pada array multi dimension Ya Ya Array
array_search_recursively(string $search_value, array $array) fungsi ini untuk menampilkan data yang di cari pada array multiple dimension Ya Ya Array
array_changeValuesCase(array $array, $case = \CASE_LOWER) fungsi ini untuk Ubah huruf besar-kecil nilai array secara rekursif (mendukung utf 8/multibyte), untuk parameter $case tersedia \CASE_LOWER atau \CASE_UPPER Ya Ya Array
rrmdir( string $path ) fungsi ini untuk menghapus semua folder dan semua file di dalam folder yang di set pada parameter Ya Ya Bolean
full_copy( string $source, string $target ) fungsi ini untuk copy direktori atau file berserta sub direktori di dalamnya Ya Ya True
check_filetype( string $path ) fungsi ini untuk cek type file contoh output : application atau images atau text Ya Ya String
get_filetype_icon( string $path ) fungsi ini untuk cek type file contoh output : fa fa-zip Ya Ya String
get_fileinfo_ext( string $extension ) fungsi ini untuk cek extension bertujuan untuk mengkategorikan info pada extension tersebut Ya Ya Array
avatar_initial( string $string ) fungsi ini untuk mendapatkan string pertama contoh : muaz ramdany outputnya jadi : M Ya Ya String
encrypt_decrypt( string $action, string $string ) fungsi ini untuk encrypt atau decrypt string parameter $action nilai harus 'encrypt' atau 'decrypt' Ya Ya String
number_format_short( int $n ) fungsi ini untuk mengubah bilangan positif besar menjadi bentuk pendek seperti 1K+, 100K+, 199K+, 1M+, 10M+, 1B+ dll Ya Ya String
fileread( string $path_filename ) fungsi ini untuk membaca file yang berisi format json dan output di konversi menjadi array object Ya Ya Array Object
filewrite( string $string, string $path_to_save ) fungsi ini untuk menulis string ke dalam file Ya Ya Bolean
timezonelist( bool $data_type = false ) fungsi ini untuk menampilkan semua zona waktu dunia Ya Ya Array
browser_detect_old() fungsi ini untuk cek versi lama pada browser yang di pakai pengguna Ya Ya Bolean
charlimit( string $value, int $limit = 100, string $end = '...' ) fungsi ini untuk membatasi string dari variable $limit dan mengembalikan string akhiran pada $end Ya Ya String
time_elapsed_string($datetime, $full = false) fungsi ini untuk menampilkan waktu nyata dengan label contoh output : 1 second ago Ya Ya String
timeago($datetime, $full = false) fungsi ini untuk menampilkan waktu nyata dengan label contoh output : 1s ago Ya Ya String
get_visitor_ip() fungsi ini untuk menampilkan ip address pengunjung/pengguna Ya Ya String
ip_info( string $ip = NULL, string $purpose = "location", bool $deep_detect = TRUE) fungsi ini untuk menampilkan info IP pengguna secara otomatis contoh penggunaan
echo ip_info("Visitor", "Country"); // Indonesia
echo ip_info("Visitor", "Country Code"); // ID
echo ip_info("Visitor", "State"); // West Java
echo ip_info("Visitor", "City"); // Bandung
echo ip_info("Visitor", "Address"); // West Java, Bandung, Indonesia
Ya Ya String
getDatesFromRange(string $start_date, string $end_date, $format = 'Y-m-d') fungsi ini untuk hasilkan array tanggal string antara 2 tanggal Ya Ya Array
getTimesFromRange(string $start, string $end, $range = '+1 hour') fungsi ini untuk hasilkan array tanggal string antara 2 waktu
Contoh input :
$start = '01:59:00'
$end = '04:59:00'
nanti outputnya berupa selisih
Ya Ya Array

Core

Function Description In Controller In Views Returned
$this->analytics() Fungsi untuk record data pengunjung secara otomatis Ya No Void
$this->detect_modules() Fungsi untuk menampilkan semua modules yang ada Ya No Array
$this->users_check($column = null, $value = null) Fungsi untuk cek data users berdasarkan column dan nilai yang sama Ya No Integer
$this->get_users_by($column = null, $value = null) Fungsi untuk menampilkan data users berdasarkan column dan nilai sama Ya No Array Object
$this->groups_check($column = null, $value = null) Fungsi untuk cek data groups berdasarkan column dan nilai sama Ya No Integer
$this->get_groups_by($column = null, $value = null) Fungsi untuk menampilkan data groups berdasarkan column dan nilai sama Ya No Array Object
$this->user_update( string $identity, array $data) Fungsi untuk update data users berdasarkan identitas Ya No Array Object
$this->generate_token() Fungsi untuk menghasilkan nilai acak Ya No String
$this->hashids() Fungsi untuk menghasilkan nilai acak Ya No String
$this->jwt_token( array $data ) Fungsi untuk menghasilkan nilai encryption pada data array Ya No String
$this->jwt_token_decode( string $token ) Fungsi untuk menghasilkan array pada string encryption Ya No Array
$this->socialauth( string $identity ) Fungsi untuk cek data users berdasarkan identity Ya No Bolean
$this->phpmailer( array $data, string $tpl_name = null, $subject = '') Fungsi untuk mengirim email contoh penggunaan parameter :
$data = [ 'identity' => 'username atau email pendaftar', 'email' => 'emailpendaftar@example.com' ]
$tpl_name = 'activate.blade.php';
$subject = 'Pendaftaran Pengguna';

jika semuanya valid maka email akan dikirim pada email terkait
Ya No Bolean
$this->ci_email( array $data, string $tpl_name = null, $subject = '') Fungsi untuk mengirim email contoh penggunaan parameter :
$data = [ 'identity' => 'username atau email pendaftar', 'email' => 'emailpendaftar@example.com' ]
$tpl_name = 'activate.blade.php';
$subject = 'Pendaftaran Pengguna';

jika semuanya valid maka email akan dikirim pada email terkait
Ya No Bolean
$this->fileupload_zip( string $name_post, $extractTo = false ) Fungsi untuk upload file berupa format zip dan mengextract file yang terdapat di dalam zip contoh penggunaan parameter :
$name_post = 'nama pada input file';
$extractTo = bool;

ganti $config['upload_path'] pada jalur yang anda inginkan
Ya No JSON
$this->g_recaptcha_verify( string $postname = null ) Fungsi untuk validasi recaptcha google Ya No Bolean
$this->os_validate_realuser() Fungsi untuk validasi IP pengguna Ya No JSON
$this->os_curl_post(string $url, array $payload, array|bool $header = false) Fungsi untuk CURL dengan metode POST Ya No JSON
$this->os_curl_get(string $url, array $payload, array|bool $header = false) Fungsi untuk CURL dengan metode GET Ya No JSON

Changelog

2023 Agustus 14 - OurSystem Version 2.3

* update fonts awesome v6.4.2 pro latest
* update page dashboard in table with ajax pagination datatable
* optimize minify assets css and js on backend and frontend
* optimize icon selection on menu & access page with select2 ajax remote
* adding structure schema markup on landing, blog, shop, pages
* adding library crud json
* adding integration with api rajaongkir
* adding session files or database storage options with the aim of saving on inode limits on hosting
* adding code editor auth, backend and core
* added active selected menu style on sidebar
* adding type json_to_table in CRUD generator (new)
* fixed multiple select relations in the crud generator page in the add relation menu associated with CRUD Users
* fixed a known bug in the generator API

2023 July 14 - OurSystem Version 2.3

* adding location path output after generate in CRUD generator (new)
* adding type file extract url in CRUD generator (new)
* adding fitures frontend code editor (new)
* adding set relation multiple on type select relation in crud generator (new)
* adding window popup file manager in form crud (new)
* adding set encrypt decrypt and sync field on type textlink and url_auto (new)
* adding option single or multiple upload on type file upload in CRUD generator (new)
* adding session user on type in CRUD generator (new)
* adding auto create url on type in CRUD generator (new)
* adding compressed image on type file upload in CRUD generator (new)
* adding set extension in settings CRUD generator (new)
* adding load data table by admin in more settings CRUD generator (new)
* adding system shop in frontend and backend (new)
* added column label set in settings after result from CRUD Generator (new)
* move system manage modules to CRUD Generator manage
* removed manage modules
* fix path output in CRUD generator
* fix bug export API Generator
* fix bug export CRUD Generator
* fix known errors
* fix known bugs
2023-06-18
* adding location path output after generate in CRUD generator
* adding option single or multiple upload on type file upload in CRUD generator
* adding session user on type in CRUD generator
* adding auto create url on type in CRUD generator
* adding compressed image on type file upload in CRUD generator
* adding set extension in settings CRUD generator
* adding load data table by admin in more settings CRUD generator
* adding system online shop starter for frontend
* added column label set in settings after result from CRUD Generator
* move system manage modules to CRUD Generator manage
* removed manage modules
* fix path output in CRUD generator
* fix bug export API Generator
* fix bug export CRUD Generator
* fix known errors
* fix known bugs
2023-04-15
* adding manage type notifications in settings
* adding menu dropdown in column action
* adding auto generate rss.xml on pages and blog
* removed type date range, color hex, color rgba in CRUD generator
* fix bug & update or improve feature page builder
* fix bug social auth authorization callback
* fix known errors
* fix known bugs
2022-02-14
** initial release version 2.2
* adding table loaded by session on CRUD generator
* adding addrow with relation data in CRUD generator
* adding type timeago in CRUD generator
* adding type checkbox multiple to json in CRUD generator
* adding type timestamp to datetime in CRUD generator
* adding type timestamp to timeago in CRUD generator
* adding type currency in CRUD generator
* adding type password with hashing in CRUD generator
* adding validation in_list in CRUD generator
* adding (hide if logged in & show if logged in) in manage menu frontend
* added a column filter setting on the table after the CRUD results (manual code)
* added wablas api integration
* added whatsapp node js api integration
* added table config appearance fixed header & bordered
* fix search filter accuracy on data table
* fix UI notification
* fix frontend
* fix backend search
* fix blog comments 
* fix bug multiple file upload
* fix bug
* fix errors
2022-12-30
** initial release version 2.1
* adding realtime notification
* adding setting notification 
* adding payment gateway indonesia by xendit and ipaymu
* adding dashboard transaction by xendit and ipaymu
* adding permission show on for ACTION column on crud system
* adding validation to real user visitors
* adding search feature in backend
* improve access security 
* improve seo in frontend
* improve the accuracy of visitors in the analytics dashboard
* fix bug
* fix errors
* fix xss reflected
2022-12-01
** initial release version 2.0
* adding page builder v2
* adding auto create sitemap.xml
* adding search in frontend
* improve seo on blogs and pages
* fix bug API
* fix error run PHP 8.1.13
* fix quick action form on plugins
* removed page generator
* change concept structured frontend
* change concept management pages
* can now choose frontend theme
2022-11-16
* adding more settings on CRUD generator
* adding button setting on CRUD system
* adding role access permission on user in CRUD system
* fix code export in CRUD system
* fix bug plugins
* fix responsive 
* improve the user interface experience in CRUD system
* improve access security
2022-11-12
* adding table row sorter on crud generator
* adding role permissions on each field in the CRUD generator
* adding type text link on crud generator
* change name page builder to page generator
* change live code view to fixed position in page generator
* fix referer url in dashboard
* fix ajax post in accounts
2022-11-07
* adding files manager
* adding button clear logs in settings
* adding button clear cache in settings
* adding function os_filesize() in application/third_party/MY_APPS/helpers/apps_helper.php
* adding function os_filesize_label() in application/third_party/MY_APPS/helpers/apps_helper.php
* adding function os_string() in application/third_party/MY_APPS/helpers/apps_helper.php
* fix config in application/config/config.php
* fix string path auto detect on operating system
2022-11-04
* adding commenting system on blog
* adding validation In List on api generator
* adding live on/off on table
* adding field alias on crud generator
* adding codeigniter captcha
* fix bug in api generator
* fix bug in crud generator
* fix documentation api
* fix HTTP request on system api
* fix system core
2022-10-28
* Initial release