// plugins directory $apps_path['plug'] = $apps_path['base'] . '/plugin'; $http_path['plug'] = $http_path['base'] . '/plugin'; // themes directories $apps_path['themes'] = $apps_path['plug'] . '/themes'; $http_path['themes'] = $http_path['plug'] . '/themes'; // insert to global config $core_config['apps_path'] = $apps_path; $core_config['http_path'] = $http_path; // plugins category $plugins_category = array('tools', 'feature', 'gateway', 'themes', 'language'); $core_config['plugins_category'] = $plugins_category; // include essential functions include_once $apps_path['libs'] . "/dba.php"; // connect to database $dba_object = dba_connect(_DB_USER_, _DB_PASS_, _DB_NAME_, _DB_HOST_, _DB_PORT_); // set charset to UTF-8 dba_query("SET NAMES utf8"); // get main config $db_query = "SELECT * FROM " . _DB_PREF_ . "_tblConfig_main"; $db_result = dba_query($db_query); $db_row = dba_fetch_array($db_result); if (isset($db_row)) { $web_title = $db_row['cfg_web_title']; $email_service = $db_row['cfg_email_service']; $email_footer = $db_row['cfg_email_footer']; $gateway_number = $db_row['cfg_gateway_number']; $gateway_timezone = $db_row['cfg_datetime_timezone']; $default_rate = $db_row['cfg_default_rate']; $tmp_gateway_module = $db_row['cfg_gateway_module']; $tmp_themes_module = $db_row['cfg_themes_module'];
$SMS_MULTIPART_MAX = 3; $SMS_MAXCHARS = $SMS_SINGLE_MULTIPART_MAXCHARS * $SMS_MULTIPART_MAX; // dlr constants define(DLR_PENDING, 0); define(DLR_SENT, 1); define(DLR_FAILED, 2); define(DLR_DELIVERED, 3); // time to pause between resend tries define(RESEND_SLEEP, 90); // max number of attempts to attempt sending an sms define(SEND_TRY_MAX, 4); // very important, do not try to remove it or change it define("_SECURE_", "1"); // connect to database include_once "{$apps_path['libs']}/dba.php"; $dba_object = dba_connect($db_param[user], $db_param[pass], $db_param[name], $db_param[host], $db_param[port]); if (DB::isError($dba_object)) { echo "Cannot connect to database '{$db_param['name']}' using user '{$db_param['user']}'. <br/>\n"; echo "{$dba_object->getMessage}() <br/>\n"; echo "<br/>\n"; echo "Something may have gone wrong during setup-- please reconfigure the package or use your admin mysql account to create user '{$db_param['user']}' with password '{$db_param['pass']}; <br/>\n"; die; } // get main config $db_query = "SELECT * FROM playsms_tblConfig_main"; $db_result = dba_query($db_query); if ($db_row = dba_fetch_array($db_result)) { $web_title = $db_row[cfg_web_title]; $web_url = $db_row[cfg_web_url]; $email_service = $db_row[cfg_email_service]; $email_footer = $db_row[cfg_email_footer];