function run() { global $website; global $layout; // force no cache on this page. Thanks to: http://james.cridland.net/code/caching.html header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); header("Cache-Control: no-store, no-cache, must-revalidate"); header("Cache-Control: post-check=0, pre-check=0", false); header("Pragma: no-cache"); switch (@$_REQUEST['act']) { case 'manual_update': $ok = update::install_from_repository(intval($_POST['update_manual_file'])); if ($ok) { $layout->navigate_notification(t(293, "Application successfully updated"), false); } else { $files = glob(NAVIGATE_PATH . '/updates/update-*.log.txt'); $log_location = array_pop($files); $log_location = str_replace(NAVIGATE_PATH, NAVIGATE_URL, $log_location); $layout->navigate_notification(t(294, "Error updating.") . "<br /><a href='" . $log_location . "' target='_blank'>" . t(366, "Log") . "</a>", true, true); } $out = update_list(); break; case 'install_next_update': // install next update $updates = update::updates_available(); $update_summary = base64_decode($updates[0]['text']); $ok = update::install_from_navigatecms($updates); if ($ok) { $layout->navigate_notification(t(293, "Application successfully updated"), false); $layout->add_content(' <div style=" display: none; " id="navigate_installed_update_summary">' . $update_summary . '</div> '); $layout->add_script(' $("#navigate_installed_update_summary").dialog({ modal: true, title: "Navigate v' . $updates[0]['Version'] . ' r' . $updates[0]['Revision'] . '", width: 650, height: 400 }); '); } else { $files = glob(NAVIGATE_PATH . '/updates/update-*.log.txt'); $log_location = array_pop($files); $log_location = str_replace(NAVIGATE_PATH, NAVIGATE_URL, $log_location); $layout->navigate_notification(t(294, "Error updating.") . "<br /><a href='" . $log_location . "' target='_blank'>" . t(366, "Log") . "</a>", true, true); } $out = update_list(); break; case 'cache_clean': update::cache_clean(); // don't break // don't break case 0: default: $out = update_list(); } return $out; }
<?php if (isset($_GET["action"]) and $_GET["action"] == "getText") { $res = update_list(); if ($res == "success") { print 'success'; } else { print $res; } exit; } include 'food_galaxy_fns.php'; do_html_header("View & Edit sensitive words"); ?> <script type="text/javascript"> function update_word_list(){ var word_added = document.getElementById("word_added").value; var word_deleted = document.getElementById("word_deleted").value; var post = "word_added=" + word_added + "&word_deleted=" + word_deleted; var action = "action=getText"; var url = "sensitive_words_management.php"; var xmlHttp = false; try { xmlHttp = new ActiveXObject("Msxml2.XMLHTTP"); }catch(e){ try{ xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); }catch(E){