function update_progress_page() { // Prevent browser from using cached drupal.js or update.js drupal_add_js('misc/progress.js', 'core', 'header', FALSE, TRUE); drupal_add_js(update_js(), 'inline'); drupal_set_title('Updating'); $output = '<div id="progress"></div>'; $output .= '<p id="wait">Please wait while your site is being updated.</p>'; return $output; }
function must_login($first_time = FALSE) { global $conf_data; if (empty($_SESSION['loggedin'])) { header('HTTP/1.1 401 Unauthorized'); $conf_data['loggedin'] = FALSE; //session_destroy(); if (!$first_time) { update_js(); exit; } } else { $conf_data['loggedin'] = TRUE; db_con_start(); } init_js(); }
$users = new usersMenus(); if (!$users->AsArticaMetaAdmin) { $tpl = new templates(); echo "alert('" . $tpl->javascript_parse_text("{ERROR_NO_PRIVS}") . "');"; die; } if (isset($_GET["table"])) { table(); exit; } if (isset($_GET["search"])) { search(); exit; } if (isset($_GET["update-js"])) { update_js(); exit; } if (isset($_POST["update-uuid"])) { update_save(); exit; } if (isset($_GET["delete-js"])) { delete_js(); exit; } if (isset($_POST["delete"])) { delete_perform(); exit; } js();
fwrite($f, " {\"phone\": \"{$phone}\",\n"); fwrite($f, " \"fee\": \"{$fee}\",\n"); fwrite($f, " \"fee_curr\": \"{$fee_curr}\"}"); } fwrite($f, "\n"); fwrite($f, " ]\n"); fwrite($f, " }"); } fwrite($f, "\n]\n"); } function update_php($carriers) { $f = fopen("carriers.php", "wt"); fwrite($f, "<? \$carriers = "); save_array($f, " ", $carriers); fwrite($f, "; ?>"); fclose($f); } $carriers = get_carriers(); $idcarriers = array(); foreach ($carriers as $key => $data) { $idcarriers[$data['id']] = $data; } update_js($idcarriers); // update_php($idcarriers); $cn = count($carriers); $pn = 0; foreach ($carriers as $key => $data) { $pn += count($data['phones']); } print "Found {$cn} carriers, {$pn} carrier-phone pairs\n";