$db
$db : \CI_DB_query_builder
countData(string $table, string $search_sql = '', string $groupby = '', string|array $orderby = '', string $sort = '', string $join_db = '', string $join_where = '', string $join_type = '') : \number
count data from table
Function for count the data from table
string | $table | DB Table |
string | $search_sql | For sql where Ex. "field1 = '1' AND field2 = '1'" or NULL |
string | $groupby | Group by field or NULL |
string|array | $orderby | Order by field or NULL |
string | $sort | asc or desc or NULL |
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 |
or FALSE
getValue(string $sel_field = '*', string $table, string $where_field, string $where_val, integer $limit, string|array $orderby = '', string $sort = '', string $groupby = '', string $join_db = '', string $join_where = '', string $join_type = '') : Object
getValue
Function get value from table with object
string | $sel_field | DB field select |
string | $table | DB table |
string | $where_field | where field or where condition Ex. "field = '1' AND field2 = '2'" |
string | $where_val | value of wherer (If $where_field has condition. Please null) |
integer | $limit | Limit the result. Default is 0 |
string|array | $orderby | Order by field or NULL |
string | $sort | asc or desc or NULL |
string | $groupby | Group by field or NULL |
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 |
or FALSE
getValueArray(string $sel_field = '*', string $table, string $where_field, string $where_val, integer $limit, string|array $orderby = '', string $sort = '', string $groupby = '', string $join_db = '', string $join_where = '', string $join_type = '', boolean $onlyone = FALSE) : Array
getValueArray
Function get value from table with array
string | $sel_field | DB field select |
string | $table | DB table |
string | $where_field | where field or where condition Ex. "field = '1' AND field2 = '2'" |
string | $where_val | value of wherer (If $where_field has condition. Please null) |
integer | $limit | Limit the result. Default is 0 |
string|array | $orderby | Order by field or NULL |
string | $sort | asc or desc or NULL |
string | $groupby | Group by field or NULL |
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 |
boolean | $onlyone | TRUE for get only one result with out loop, FALSE get result with loop |
or FALSE
main_menu(integer $drop_page_menu_id, string $lang = '', integer $position, boolean $backend = FALSE) : Object
main_menu
Function for load main menu
integer | $drop_page_menu_id | 1 = drop menu, 0 = main menu |
string | $lang | language code |
integer | $position | menu position 0 = Top, 1 = Bottom |
boolean | $backend | get value for backend, Default is FALSE |
or FALSE id not found
coreCss(string $more_css = '', boolean $more_include = TRUE) : String
coreCss
Function for load core css and more css
string | $more_css | additional css (string type for single css file or text style only. If you have many css file please use array) |
boolean | $more_include | for include the css file or FALSE |
coreJs(string $more_js = '', boolean $more_include = TRUE) : String
coreJs
Function for load core js and more js
string | $more_js | additional js (string type for single js file or text style only. If you hve many js file please use array) |
boolean | $more_include | for include the js file or FALSE |
coreMetatags(string $desc_txt, string $keywords, string $title, string $img_path = '', string $more_meta = '') : String
coreMetatags
Function for load core metatag
string | $desc_txt | page description |
string | $keywords | page keyword |
string | $title | page title |
string | $img_path | page article image url path without base_url() . 'photo/' |
string | $more_meta | more meta tag text |
formTagToHTML(string $content) : string
formTagToHTML
Function for find form tag with only post [?startform_post:form_name{action_url}][/?endform] AND [?startform_get:form_name{action_url}][/?endform] Action url without base url Ex. [?startform_post:formtest{member/login/check}] Your html form [/?endform] And set the current url into session (cszfrm_cururl) for use to return page.
string | $content | Original content |
saveLogs(string $email = '', string $note = '', string $result = '', string $user_agent = '', string $ip_address = '')
saveLogs
Function for save the login log into database
string | email address |
|
string | $note | note text |
string | $result | result text |
string | $user_agent | user agent |
string | $ip_address | ip address |
sendEmail(string $to_email, string $subject, string $message, string $from_email, string $from_name = '', string $bcc = '', string $reply_to = '', string $alt_message = '', array $attach_file = array(), boolean $save_log = TRUE) : string
sendEmail
Function for send the email (effect with settings on backend)
string | $to_email | to email address |
string | $subject | email subject |
string | $message | email body message |
string | $from_email | from email address |
string | $from_name | from name |
string | $bcc | bcc to email address |
string | $reply_to | reply email address |
string | $alt_message | alternate message when html not working |
array | $attach_file | attach files with array |
boolean | $save_log | for save email logs into db |
getFBComments(string $url, integer $limit, string $sort) : string
getFBComments
Function for get facebook comments code from settings
string | $url | page url for show comment |
integer | $limit | comment show limit |
string | $sort | comment sort ("social", "reverse_time", or "time".) |
or FALSE if not have fbapp_id
findNameAsCopy(string $table, string $field_id, string $value, boolean $is_url = FALSE, string $separator = '-') : string
findNameAsCopy
Function for find the name to create new content as copy with new name
string | $table | for database table |
string | $field_id | ID field |
string | $value | Value to replace name |
boolean | $is_url | Value is url. Default is FALSE |
string | $separator | What should the duplicate number be appended with |
or FALSE
setJSCSScache(array $files, string $cache_name, string $type, integer $expires) : string
setJSCSScache
Function for set js or css cache file
array | $files | file path |
string | $cache_name | cache filename |
string | $type | file type [js or css] |
integer | $expires | expire time |
setJSCSSheader(integer $modefied, integer $expires, string $etag, string $type) : void
setJSCSSheader
Function for set js or css http header
integer | $modefied | file modified time |
integer | $expires | expire time |
string | $etag | etag MD5 from file |
string | $type | file type [text/js or application/javascript or text/css] |
photo_xss_clean(\srting $file) : string
Runs the file through the XSS clean function (Only images)
This prevents people from embedding malicious code in their files. I'm not sure that it won't negatively affect certain files in unexpected ways, but so far I haven't found that it causes trouble.
\srting | $file | From $_FILE['fieldname']['tmp_name'] |
or FALSE