///////// permission check here if (!$nsUser->Logged()) { $nsProduct->Redir("login", "", "admin"); } ///////////////////////////////////////////// ///////// require libraries here require_once SELF . "/lib/company.func.php"; $nsLang->TplInc("inc/menu"); ///////////////////////////////////////////// ///////// prepare any variables $SiteId = ValidVar($_GP['SiteId']) ? $_GP['SiteId'] : false; if (!ValidId($CpId)) { $CpId = ValidVar($_GP['CpId']) ? $_GP['CpId'] : false; } $IP = ValidVar($_GP['IP']) ? trim($_GP['IP']) : false; $Settings = GetSettings(); $ProgPath = array(); $ProgPath[0]['Name'] = $Lang['MLogs']; $ProgPath[0]['Url'] = $nsProduct->SelfAction(); $MenuSection = "logs"; $IpCnt = 0; if (ValidIp($IP)) { $IpCnt = $Db->ReturnValue("SELECT COUNT(*) FROM " . PFX . "_tracker_ip WHERE IP = '{$IP}'"); if ($IpCnt == 1) { $Query = "\n\t\t\tSELECT V.ID \n\t\t\t\tFROM " . PFX . "_tracker_ip I\n\t\t\t\tINNER JOIN " . PFX . "_tracker_visitor V\n\t\t\t\t\tON V.LAST_IP_ID=I.ID\n\t\t\t\tWHERE IP = '{$IP}' \n\t\t\t\tORDER BY V.ID DESC"; $VisId = $Db->ReturnValue($Query); $nsProduct->Redir("visitor_path", "VisId={$VisId}&SiteId={$SiteId}&CpId={$CpId}", "report"); } if ($IpCnt > 1) { $nsProduct->Redir("visitor_path", "IP={$IP}&SiteId={$SiteId}&CpId={$CpId}", "report"); }
$smarty->compile_dir = $g_smarty_folder . 'templates_c'; $smarty->cache_dir = $g_smarty_folder . 'cache'; $smarty->config_dir = $g_smarty_folder . 'configs'; // Application Variables $g_app_name = "Asterisk Voicemail for iPhone"; $g_app_version = "0.11"; $smarty->assign('app_name', $g_app_name); $smarty->assign('app_version', $g_app_version); // Session $s_mailbox = ""; doSessionCheck($s_mailbox); $smarty->assign('mailbox', $s_mailbox); $smarty->assign('mailbox_formatted', format_phone($s_mailbox)); // Security for Media $secret_key = md5($_SERVER['REMOTE_ADDR'] . $g_secret_salt); $smarty->assign('secret_key', $secret_key); // Get messages (into an array) $arr_messages_inbox = GetMessageArray("INBOX", $s_mailbox); $arr_messages_old = GetMessageArray("Old", $s_mailbox); $smarty->assign('messages_inbox', $arr_messages_inbox); $smarty->assign('messages_old', $arr_messages_old); // Get Settings Screen info $c_settings = GetSettings($s_mailbox); $smarty->assign('c_settings', $c_settings); // Check for updates if ($g_check_for_updates != false) { $current_version = doCheckVersion($g_app_version); $smarty->assign('current_version', $current_version); } // Display the smarty template $smarty->display($g_smarty_template_folder . 'main.tpl');
require_once $pivot_path . 'modules/module_db.php'; require_once $pivot_path . 'modules/module_i18n.php'; require_once $pivot_path . 'modules/module_lang.php'; require_once $pivot_path . 'modules/module_parser.php'; require_once $pivot_path . 'modules/module_ipblock.php'; require_once $pivot_path . 'modules/module_spamkiller.php'; require_once $pivot_path . 'modules/module_snippets.php'; require_once $pivot_path . 'modules/module_tags.php'; // Check if the current php version is at least 4.1.0.. if (!check_version(PHP_VERSION, "4.1.0")) { echo "<p>Your PHP version is: " . PHP_VERSION . ".<br /> Pivot requires at least PHP version 4.1.0 to run properly!</p>\n\n"; die; } // Start the timer: $starttime = getmicrotime(); GetSettings(); /** * If debug is set, include the file.. */ if ($Cfg['debug'] == 1) { require_once $pivot_path . 'modules/module_debug.php'; } else { error_reporting(E_ERROR); function debug() { } function debug_sep() { } function debug_printbacktrace() {
$ProgPath[0]['Name'] = $Lang['Administr']; $ProgPath[0]['Url'] = getURL("admin", "", "admin"); } $PageTitle .= $Lang['Title']; $ProgPath[1]['Name'] = $Lang['Title']; $ProgPath[1]['Url'] = getURL("stat_dbl_click", "CpId={$CpId}&SiteId={$SiteId}", "admin"); ///////////////////////////////////////////// ///////// call any process functions if (!$nsUser->DEMO) { if (ValidArr($SaveSet)) { SaveSettings($SaveSet); } } ///////////////////////////////////////////// ///////// display section here $Sets = GetSettings($CpId, $SiteId); include $nsTemplate->Inc(); ///////////////////////////////////////////// ///////// process functions here function SaveSettings($SaveSet) { //Dump($SaveSet); //return; global $Db, $Logs, $Lang, $CpId, $nsProduct; foreach ($SaveSet as $CP => $Arr) { foreach ($Arr as $SiteId => $SubArr) { extract($SubArr); $TimePageLoad = isset($TimePageLoad) ? $TimePageLoad : ""; $TimeAdvClick = isset($TimeAdvClick) ? $TimeAdvClick : ""; $TimeEvent = isset($TimeEvent) ? $TimeEvent : ""; $TimeSale = isset($TimeSale) ? $TimeSale : "";