require_once WEBROOT . "customize/customize_lib.php"; if ($page->branch == 'Webkit') { $template = $page->delta_file('index', 'html'); } else { $template = "$page->branch/index.html"; } Modules::init($page->branch, $page->certs, $page->platform); // iphone can customize without reloading if($page->delta == 'iphone') { $modules = Modules::$default_order; } else { $modules = getModuleOrder(); $activemodules = getActiveModules(); // Process the various possible actions if($_REQUEST['action'] == 'swap') { $module_1 = $_REQUEST['module1']; $module_2 = $_REQUEST['module2']; $position_1 = intval($_REQUEST['position1']); $position_2 = intval($_REQUEST['position2']); //make sure cookie is consistent with action // if so swap them if( ($modules[$position_1] == $module_1) && ($modules[$position_2] == $module_2) ) { $modules[$position_1] = $module_2; $modules[$position_2] = $module_1; }
<?php require_once "../config/mobi_web_constants.php"; require_once "Home.php"; require_once "Modules.php"; require_once WEBROOT . "page_builder/Page.php"; //require WEBROOT . "page_builder/counter.php"; require WEBROOT . "page_builder/page_tools.php"; require WEBROOT . "customize/customize_lib.php"; $page = Page::factory(); $page->module('home'); PageViews::increment('home', $page->platform); $whats_new_count = Home::$whats_new_count; $top_item = Home::$whats_new->getTopItemName(); Modules::init($page->branch, $page->certs, $page->platform); $old_modules = getModuleOrder(); $moduleorder = Modules::refreshAll($old_modules, $page->branch); setModuleOrder($moduleorder); $modules = getActiveModules($page->branch); $modules = Modules::refreshActive($old_modules, $modules, $page->branch); $modules = Modules::add_required($modules, $page->branch); setActiveModules($modules); $all_modules = Modules::$default_order; //$fh = fopen('/tmp/headers-' . time() . '.txt', 'w'); //fwrite($fh, str_replace('",', "\",\n", json_encode($_SERVER)) . '\n'); //fclose($fh); $page->prevent_caching('Basic'); $page->prevent_caching('Touch'); $page->cache(); /* function url($module) {