$db
$db : \CI_DB_query_builder
pageSetting(string $base_url, string $total_row, string $result_per_page, string $num_link, string $uri_segment = '')
pageSetting
Function for pagination settings
string | $base_url | Base url for link |
string | $total_row | Total result |
string | $result_per_page | result limit per page |
string | $num_link | Number for show the page exclude ... |
string | $uri_segment | Uri secment for use pageination |
getIndexData(string $table, string $limit, string $offset, string $orderby = '', string $sort = '', string $search_sql = '', string $groupby = '', string $join_db = '', string $join_where = '', string $join_type = '', string $sel_field = '*') : array
getIndexData
Function for get data for index page (support pageination)
string | $table | DB table |
string | $limit | DB limit |
string | $offset | DB offset |
string | $orderby | DB order by field. Default is 'timestamp_create' |
string | $sort | DB sort by asc or desc. Default is 'desc' |
string | $search_sql | DB where condition. NULL if not need. Example "name='Joe' AND status LIKE '%boss%' OR status1 LIKE '%active%" for string. And array('field'=>'value') for array |
string | $groupby | DB group by field. NULL if not need |
string | $join_db | Table to join or NULL |
string | $join_where | Join condition or NULL |
string | $join_type | Join type ('LEFT', 'RIGHT', 'OUTER', 'INNER', 'LEFT OUTER', 'RIGHT OUTER') or NULL |
string | $sel_field | DB field select. Default is (*) |
removeDataAndFile(string $table, string $id_field, string $id_val, string $file_path, string $file_sql_field)
removeDataAndFile
Function for remove the data and file
string | $table | DB table |
string | $id_field | DB id field |
string | $id_val | DB id value |
string | $file_path | file upload path |
string | $file_sql_field | DB field name of file |
file_upload(string $photo, string $photo_name1, string $tmp_photo, string $uploaddir, string $photo_id, string $paramiter, string $yearR = '', integer $maxSizeR = 1900, boolean $resize = TRUE, integer $limitsize = 100) : String
file_upload
Function for upload file
string | $photo | File from $_FILE['tmp_name'] |
string | $photo_name1 | File name from $_FILE['name'] |
string | $tmp_photo | Temp file. Can null if noting |
string | $uploaddir | Path to save the file |
string | $photo_id | New file name |
string | $paramiter | Other paramiter for new file name. Can null if noting |
string | $yearR | Year for directory |
integer | $maxSizeR | Max the photo size (pixel). For image file only. Default 1900px |
boolean | $resize | for resize enable. Default is TRUE (enable) |
integer | $limitsize | Limit file size to upload (Mega Byte). Default 100 MB |
(New filename)
getAllMenu(integer $drop_page_menu_id, string $lang = '', integer $position) : object
getAllMenu
Function for get all menu
integer | $drop_page_menu_id | 1 = drop menu, 0 = main menu |
string | $lang | language code |
integer | $position | menu position 0 = Top, 1 = Bottom |
or FALSE id not found
getIndexDataFromObj(object $data, integer $limit, $offset = 1) : object
getIndexDataFromObj
Function for get data for index page from object data (support pageination)
object | $data | Object data from xml |
integer | $limit | limit [show limit] |
$offset |
or FALSE
exportCSV(\srting $filename, \srting $table, array $field_sel = "", \srting $where = "", string $orderby = "", string $sort = "ASC", string $groupby = '') : string
Export the database to csv
\srting | $filename | Filename |
\srting | $table | Database Table to export |
array | $field_sel | Database field to select to export |
\srting | $where | Where condition |
string | $orderby | Order by field or NULL |
string | $sort | asc or desc or NULL |
string | $groupby | Group by field or NULL |
File download
getSoftwareInfo(string $mode = 'a') : string
Returns information about the operating system PHP is running on
string | $mode | [optional] mode is a single character that defines what information is returned: 'a': This is the default. Contains all modes in the sequence "s n r v m". |
the description, as a string.
insertCarouselUpload(string $carousel_widget_id, string $carousel_type, string $fileupload = '', string $youtube_url = '', string $photo_url = '')
insertCarouselUpload
Function for upload the carousel photo
string | $carousel_widget_id | carousel widget id |
string | $carousel_type | carousel type into database |
string | $fileupload | file upload path into database |
string | $youtube_url | youtube url into database |
string | $photo_url | photo url into database |