Cicool WEB Documentation V-1.18

Getting Started

Welcome

Cicool is a multifunctional application that is used to facilitate your work in creating a system, CMS, E-Comerce and others

Features

  • Facility to customize to match your website theme
  • Easy install; 100% integration with wizzard installation
  • Frontend modular, easy to change theme
  • There extension to make easy to custom, add feature etc
  • Make Rest API builder just one click, and get auto generate documentation.
  • You can make dinamic pages by dragging, more than 50+ components and elements avaiable.
  • By dragging form into canvas you can make dinamic form.
  • Build your CRUD in one click, with 35+ custom validation and 20+ input type.
  • Awesome AdminLTE theme by Abdullah Almsaeed.
  • Easy to save data with hot keys.
  • Uploads file just drag and drop.

Requirement

System requirements for running this web application

  • PHP 5.5 or higher
  • Mysql Server 4.1.13 or higher
  • Apache / Nginx
  • Mysqli extension
  • Session Extension
  • mcrypt Extension

Installation

easy to install with the installation wizard, just by clicking the Next button and you are asked to fill in the configuration

  • Wizzard Page One

on pages one, there is a demand server that you must meet to perform the installation, such as Directory and Permissions and Server Requirements.

Ensure that the system requirements are met in order to proceed to the next uninstall

  • Wizzard page two

in the second page you are requested to fill in the configuration of the system, there are default configurations that have been made, if you do not want hired him press the next button to proceed to the third page wizzard

  • Permitted Uri Chars : a list of characters that allow The configured value is actually a regular expression character group and it will be executed as: ! preg_match('/^[]+$/i
  • URL Suffix : This option allows you to add a suffix to all URLs generated by CodeIgniter. Example : http://example.com/blog/article-1.html
  • Encryption Key : If you use the Encryption class, you must set an encryption key.
  • Session Expiration : The number of SECONDS you want the session to last. Setting to 0 (zero) means expire when the browser is closed.
  • Session Time to Update : How many seconds between CI regenerating the session ID.
  • Global XSS Filtering : if you to able XSS Filtering on all uri set to "yes" Determines whether the XSS filter is always active when GET, POST or COOKIE data is encountered
  • Wizzard Page Theree

wizzard this last step to configure your system, you are asked to configure the database that you created on the server, we recommend no table system that has been created in the database

in the second section of this part of the site configuration, you are asked to fill in the site name, site email and site passwords, email and password is used to access the admin page as administrator

after installation is complete there is a notification that the application has been successfully installed and ready for use, and then you click the finish button to access the page administrator

  • Database Name : The name of the database you want to connect to, The previous name of the database must be made in advance in phpmyadmin or the like.
  • Username : The username used to connect to the database.
  • Password : The password used to connect to the database.
  • Database Host : The hostname of your database server.

  • Site Name : web or application name you want.
  • Site Email : email will be used to access the web administrator.
  • Site Password : password will be used to access the web administrator. character length password must be 6 or more.

CRUD Builder

How to Build a CRUD

Build your CRUD in one click, with 35+ custom validation and 20+ input type,

  • Select The Table

select the table you want to use to create a CRUD

  • Fill Subject And Title
  • Checked Module

module select what you want to do, such as create, read and update

  • Customize a Contents

You can do a reorder for field placements.
You also set the field anywhere that you want to display on a page module.
There are more than 20 types of input type that you can use.
There are more than 35 input validation you can use, so that your web applications become more secure.
Click save button to build your CRUD

Video tutorial how to make a blog with crud builder


REST Builder

How to Build a REST

Make Rest API builder just one click, and get auto generate documentation,

  • Select The Table

select the table you want to use to create a CRUD

  • Fill Subject And Title
  • Header Required

In no demand for the required header in select X-Token, Reviews X-Token is used for your API securing with user Auth. if you access these APIs, then you must get a token

  • Customize a Contents

There are two input type text or file.
There are more than 35 input validation you can use, so that your web applications become more secure.
Click save button to build your REST APIs

Video tutorial how to make blog Rest API

  • View Your Rest Module

After you create a REST API you can directly view the documentation that automatically created See API Documentations http://yoursite/administrator/doc/api.
you can also do your API testing with the click of a button view on REST builder.

How to Get X-Token

to get tokens you can see more at documentation, See API Documentations.
or you can visit this link there you can get a token directly by following the instructions provided.

  • Token is generated

After you successfully generate the token then there is a JSON response like this you get.

{
       "status": true,
       "message": "Token generated",
       "data": {
           "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9..more",
           "expiration": {
               "seconds": 43200,
               "hours": 12
           }
       }
   }

if you get a response like that then you've managed to get tokens


Page Builder

How To Build A Page

You can make dinamic pages by dragging, more than 50+ components and elements avaiable.

  • Build a Administrator Page

To create a page you select the type of page to backend.
enter the link to the user can access your page,
Your administrator can access the page that you created in administrator/page/(your-page-link)

  • Build a Administrator Page
  • Build a Frontend Page

To create a page you select the type of page to frontend.
enter the link to the user can access your page,
Your can access frontend page that you created in page/(your-page-link)


Video tutorial how to make responsive page


How To Embed Form on The Page

you can mengembed form, which you made into a section page builder, by attaching a code snippet as follows : {form_builder(1)}.
* 1 is a id of form


How to embed contact form on page

Form Builder

How To Build A Form

By dragging form into canvas you can make dinamic form.

  • Fill Subject And Title

Subject used as a form of identity, when men generate form will automatically create a table with formatting form_(subject form).

  • Creating Form Field
to create a form, you can drag the input type to the canvas form, there are more than 20 field type.
You can also change the field name, field style, custom attributes, and other helpblock


Video tutorial how to make contact form

Manage Your Form

Once you've finished creating your form can me manage the form that you created, to manage the information that has been submitted

Updating a Form

You can also update the fields of the form, the form builder in the menu update, but the data form that you created earlier will be automatically deleted


Library

Template

Library for creating a partial template for web.

  • Set data using a chainable metod. Provide two strings or an array of data.

 $this->template->set($name, $value)

  • Parameters
    • $name String - name of data key
    • $value String - value of variable

  • Build the entire HTML output combining partials, layouts and views.

 $this->template->build($view, $data = array(), $return = false)

  • Parameters
    • $view String - view name
    • $data Array - Data to view
    • $return Boolean - if true output stored in variable

  • Set the title of the page.

 $this->template->set_partial($name, $view, $data = array())

  • Parameters
    • $name String - name variable of partial
    • $view Array - View name
    • $data array - Data to view

  • Set the title of the page.

 $this->template->title($title)

  • Parameters
    • $title String - the title of web

Auth

  • Check provided details against the database. Add items to error array on fail, create session if success.

 $this->aauth->login($identifier, $pass, $remember = false, $totp_code = NULL, $set_userdata = true)

  • Parameters
    • $identifier String - the indentifier of user (email or username)
    • $pass String - the password of user
    • $remember Boolean - session save is remember true or false
    • $totp_code String - totp code veryfication
    • $set_userdata Boolean - save the session to userdata true or false
  • Response
    • Boolean true or false

  • Updates permission name and description.

 $this->aauth->update_perm($perm_par, $perm_name = false, $definition = false)

  • Parameters
    • $perm_par Int | String - Permission id or permission name
    • $perm_name String - New permission name
    • $definition String - Permission description
  • Response
    • Boolean true or false

  • Delete a permission from database. WARNING Can't be undone.

 $this->aauth->delete_perm($perm_par, $perm_name = false, $definition = false)

  • Parameters
    • $perm_par Int | String - Permission id or permission name
  • Response
    • Boolean true or false

  • Check if user allowed to do specified action, admin always allowed.

 $this->aauth->is_allowed($perm_par, $user_id = false)

  • Parameters
    • $perm_par Int | String - Permission id or permission name
    • $user_id Int | Boolean - User id to check, or if FALSE checks current user
  • Response
    • Boolean true or false

  • Check if group is allowed to do specified action, admin always allowed.

 $this->aauth->is_group_allowed($perm_par, $group_par = false)

  • Parameters
    • $perm_par Int | String - Permission id or permission name
    • $group_par Int | Boolean - Group id or name to check, or if FALSE checks all user groups
  • Response
    • Boolean true or false

  • Add User to permission.

 $this->aauth->allow_user($user_id, $perm_par)

  • Parameters
    • $perm_par Int - User id to deny
    • $perm_par Int - Permission id or name to allow
  • Response
    • Boolean true or false

  • Remove user from permission.

 $this->aauth->deny_user($user_id, $perm_par)

  • Parameters
    • $user_id Int - User id to deny
    • $perm_par Int - Permission id or name to allow
  • Response
    • Boolean true or false

  • Add group to permission.

 $this->aauth->allow_group($group_par, $perm_par)

  • Parameters
    • $group_par int | string | boolean - Group id or name to allow
    • $perm_par Int - Permission id or name to allow
  • Response
    • Boolean true or false

  • Remove group from permission.

 $this->aauth->deny_group($group_par, $perm_par)

  • Parameters
    • $group_par int | string | boolean - Group id or name to allow
    • $perm_par Int - Permission id or name to allow
  • Response
    • Boolean true or false

  • List all permissions.

 $this->aauth->list_perms()

  • Response
    • Array object

  • Get permission id from permisison name or id.

 $this->aauth->get_perm_id($perm_par)

  • Parameters
    • $perm_par Int - Permission id or name to allow
  • Response
    • int Permission id or NULL if perm does not exist

Cc App

  • Librarry for cicool app.

 $this->cc_app->getOption($option_name, $default = null)

  • Parameters
    • $option_name String - option name
    • $default String - default option value if option nt exist on the database
  • Response
    • String - Option Value

  • Set option value.

 $this->cc_app->setOption($option_name =  null, $option_value = null)

  • Parameters
    • $option_name String - option name
    • $option_value String - value of option you add
  • Response
    • Boolean - Option Value true or false

  • Delete option from database.

 $this->cc_app->deleteOption($option_name =  null)

  • Parameters
    • $option_name String - option name
  • Response
    • Boolean - Option Value true or false

  • check whether the option is there or not.

 $this->cc_app->optionExists($option_name =  null)

  • Parameters
    • $option_name String - option name
  • Response
    • Boolean - Option Value true or false

  • Hook for listen a atatement in a section.

 $this->cc_app->eventListen($eventName = null, $params = [])

  • Parameters
    • $eventName String - the event name uniq to in the call in a particular section
  • Response
    • Mixed Closure | String

  • Get event header returned html of header section frontend.

 $this->cc_app->getHeader()

  • Response
    • Mixed Closure | String

  • Get event footer returned html of footer section frontend.

 $this->cc_app->getFooter()

  • Response
    • Mixed Closure | String

  • Get event navigation returned html of navigation section frontend.

 $this->cc_app->getNavigation()

  • Response
    • Mixed Closure | String

Helper

App Helper

Redirecting to $_SERVER['HTTP_REFERER'].

  • Redirecting page to http_referer.

 redirect_back()

  • Response
    • Header

Get information of user loggedin.

  • Set data using a chainable metod. Provide two strings or an array of data.

 get_user_data($field_name)

  • Parameters
    • $field_name String - field name provided in the user database
  • Response
    • String - data information of user

  • Generate a captcha.

 get_captcha()

  • Response
    • array - data information of captcha

  • Get the url extension.

 url_extension($ext = null)

  • Parameters
    • $ext String - the extension name default is null
  • Response
    • String - base url extension ex : my-extension

  • Get option.

 get_option($ext = null)

  • Parameters
    • $ext String - the extension name default is null
  • Response
    • String - base url extension ex : my-extension

  • Get option.

 add_option($option_name = null, $option_value = null) 

  • Parameters
    • $option_name String - option name
    • $option_value String - value of option you add
  • Response
    • Boolean - Option Value true or false

  • Set option.

 set_option($option_name = null, $option_value = null) 

  • Parameters
    • $option_name String - option name
    • $option_value String - value of option you add
  • Response
    • Boolean - Option Value true or false

  • Delete option from database.

 delete_option($option_name = null) 

  • Parameters
    • $option_name String - option name
  • Response
    • Boolean- true or false

  • check whether the option is there or not.

 option_exists($option_name = null) 

  • Parameters
    • $option_name String - option name
  • Response
    • Boolean - Option Value true or false

  • Get base theme url, theme is active.

 theme_url($url_additional = null) 

  • Parameters
    • $url_additional String - url additional
  • Response
    • String - base url of theme :

  • Get site name information.

 site_name() 

  • Response
    • String - the site name : http://mysite/cc-content/themes/cicool/

  • Get menu type contains.

 get_menu($menu_type = null) 

  • Parameters
    • $menu_type String - Menu type name
  • Response
    • Array
Array
(
    [0] => stdClass Object
        (
            [id] => 1
            [label] => MAIN NAVIGATION
            [type] => label
            [icon_color] => 
            [link] => administrator/dashboard
            [sort] => 1
            [parent] => 0
            [icon] => 
            [menu_type_id] => 1
        )

    [1] => stdClass Object
        (
            [id] => 2
            [label] => Dashboard
            [type] => menu
            [icon_color] => 
            [link] => administrator/dashboard
            [sort] => 2
            [parent] => 0
            [icon] => fa-dashboard
            [menu_type_id] => 1
        )

    [2] => stdClass Object
        (
            [id] => 3
            [label] => CRUD Builder
            [type] => menu
            [icon_color] => 
            [link] => administrator/crud
            [sort] => 3
            [parent] => 0
            [icon] => fa-table
            [menu_type_id] => 1
        )

    [3] => stdClass Object
        (
            [id] => 4
            [label] => API Builder
            [type] => menu
            [icon_color] => 
            [link] => administrator/rest
            [sort] => 4
            [parent] => 0
            [icon] => fa-code
            [menu_type_id] => 1
        )

    [4] => stdClass Object
        (
            [id] => 5
            [label] => Page Builder
            [type] => menu
            [icon_color] => 
            [link] => administrator/page
            [sort] => 5
            [parent] => 0
            [icon] => fa-file-o
            [menu_type_id] => 1
        )

    [5] => stdClass Object
        (
            [id] => 6
            [label] => Form Builder
            [type] => menu
            [icon_color] => 
            [link] => administrator/form
            [sort] => 6
            [parent] => 0
            [icon] => fa-newspaper-o
            [menu_type_id] => 1
        )

    [6] => stdClass Object
        (
            [id] => 7
            [label] => Menu
            [type] => menu
            [icon_color] => 
            [link] => administrator/menu
            [sort] => 7
            [parent] => 0
            [icon] => fa-bars
            [menu_type_id] => 1
        )

    [7] => stdClass Object
        (
            [id] => 8
            [label] => Auth
            [type] => menu
            [icon_color] => 
            [link] => 
            [sort] => 8
            [parent] => 0
            [icon] => fa-shield
            [menu_type_id] => 1
            [children] => Array
                (
                    [0] => stdClass Object
                        (
                            [id] => 9
                            [label] => User
                            [type] => menu
                            [icon_color] => 
                            [link] => administrator/user
                            [sort] => 9
                            [parent] => 8
                            [icon] => 
                            [menu_type_id] => 1
                        )

                    [1] => stdClass Object
                        (
                            [id] => 10
                            [label] => Groups
                            [type] => menu
                            [icon_color] => 
                            [link] => administrator/group
                            [sort] => 10
                            [parent] => 8
                            [icon] => 
                            [menu_type_id] => 1
                        )

                    [2] => stdClass Object
                        (
                            [id] => 11
                            [label] => Access
                            [type] => menu
                            [icon_color] => 
                            [link] => administrator/access
                            [sort] => 11
                            [parent] => 8
                            [icon] => 
                            [menu_type_id] => 1
                        )

                    [3] => stdClass Object
                        (
                            [id] => 12
                            [label] => Permission
                            [type] => menu
                            [icon_color] => 
                            [link] => administrator/permission
                            [sort] => 12
                            [parent] => 8
                            [icon] => 
                            [menu_type_id] => 1
                        )

                    [4] => stdClass Object
                        (
                            [id] => 13
                            [label] => API Keys
                            [type] => menu
                            [icon_color] => 
                            [link] => administrator/keys
                            [sort] => 13
                            [parent] => 8
                            [icon] => 
                            [menu_type_id] => 1
                        )

                )

        )

    [8] => stdClass Object
        (
            [id] => 14
            [label] => OTHER
            [type] => label
            [icon_color] => 
            [link] => 
            [sort] => 14
            [parent] => 0
            [icon] => 
            [menu_type_id] => 1
        )

    [9] => stdClass Object
        (
            [id] => 15
            [label] => Settings
            [type] => menu
            [icon_color] => text-red
            [link] => administrator/setting
            [sort] => 15
            [parent] => 0
            [icon] => fa-circle-o
            [menu_type_id] => 1
        )

    [10] => stdClass Object
        (
            [id] => 16
            [label] => Web Documentation
            [type] => menu
            [icon_color] => text-blue
            [link] => administrator/doc/web
            [sort] => 16
            [parent] => 0
            [icon] => fa-circle-o
            [menu_type_id] => 1
        )

    [11] => stdClass Object
        (
            [id] => 17
            [label] => API Documentation
            [type] => menu
            [icon_color] => text-yellow
            [link] => administrator/doc/api
            [sort] => 17
            [parent] => 0
            [icon] => fa-circle-o
            [menu_type_id] => 1
        )

)

  • Get header frontend active theme.

 get_header() 

  • Response
    • String - html header partial

  • Get footer frontend active theme.

 get_footer() 

  • Response
    • String - html footer partial

  • Get navigation frontend active theme.

 get_navigation() 

  • Response
    • String - html navigation partial

Source And Credits

Source

  • Controller Example

  • Model Example

Credits