/** * Function called when plugin first installed into the database * Utility function must be prefixed with the plugin name * followed by an underscore. * * Format: pluginname_install * */ function sms_to_email_install() { $CI =& get_instance(); // check if table already exist if (!$CI->db->table_exists('plugin_sms_to_email')) { $db_driver = $CI->db->platform(); $db_prop = get_database_property($db_driver); execute_sql(APPPATH . "plugins/sms_to_email/media/" . $db_prop['file'] . "_sms_to_email.sql"); } return true; }
/** * Function called when plugin first installed into the database * Utility function must be prefixed with the plugin name * followed by an underscore. * * Format: pluginname_install * */ function blacklist_number_install() { $CI =& get_instance(); // check if table already exist if (!$CI->db->table_exists('plugin_blacklist_number')) { $db_driver = $CI->db->platform(); $db_prop = get_database_property($db_driver); execute_sql(APPPATH . "plugins/blacklist_number/media/" . $db_prop['file'] . "_blacklist_number.sql"); } return true; }
/** * Function called when plugin first installed into the database * Utility function must be prefixed with the plugin name * followed by an underscore. * * Format: pluginname_install * */ function soap_install() { $CI =& get_instance(); $CI->load->helper('kalkun'); // check if table already exist if (!$CI->db->table_exists('plugin_remote_access')) { $db_driver = $CI->db->platform(); $db_prop = get_database_property($db_driver); execute_sql(APPPATH . "plugins/soap/media/" . $db_prop['file'] . "_remote_access.sql"); } return true; }
/** * Function called when plugin first installed into the database * Utility function must be prefixed with the plugin name * followed by an underscore. * * Format: pluginname_install * */ function sync_server_install() { $CI =& get_instance(); $CI->load->helper('kalkun'); $CI->load->model('sync_server/sync_server_model', 'plugin_model'); // check if table already exist if (!$CI->db->table_exists('plugin_sync_server')) { $db_driver = $CI->db->platform(); $db_prop = get_database_property($db_driver); execute_sql(APPPATH . "plugins/sync_server/media/" . $db_prop['file'] . "_sync_server.sql"); } //return true; $cek_rest_url = $CI->plugin_model->get_rest_server_url(); if ($cek_rest_url) { return TRUE; } else { //isi form rest url server redirect(site_url() . '/sync_server'); } }
/** * _protect_identifiers * * Ugly hack to add backticks to database field * * @param string $identifier * @return string */ function _protect_identifiers($identifier = NULL) { $this->load->helper('kalkun'); $escape_char; $escaped_identifer = ""; // get database engine $db_engine = $this->db->platform(); $escape_char = get_database_property($db_engine); $escape_char = $escape_char['escape_char']; $sub = explode(".", $identifier); $sub_count = count($sub); foreach ($sub as $key => $tmp) { $escaped_identifer .= $escape_char . $tmp . $escape_char; // if this is not the last if ($key != $sub_count - 1) { $escaped_identifer .= "."; } } return $escaped_identifer; }
echo "<span class=\"green\">OK</span>"; } else { echo "<span class=\"red\">Not OK</span>"; $error++; } ?> </td> </tr> <tr> <td colspan="4" style="background-color: #cce9f2" class="right"><b>PHP extension/module</b></td> </tr> <tr> <td colspan="3"> <?php $db_property = get_database_property($database_driver); ?> <?php echo $db_property['human']; ?> <i>(Readed from database configuration)</i> </td> <td class="right"> <?php if (extension_loaded($db_property['driver'])) { $db_msg = ""; } if (isset($db_msg)) { echo "<span class=\"green\">OK</span>"; } else { echo "<span class=\"red\">Not OK</span>";