function admin_theme_content() { global $page, $config, $gpLayouts, $langmessage; $this->find_label = $langmessage['Find Themes']; $this->manage_label = $langmessage['Manage Layouts']; //message('request: '.showArray($_REQUEST)); $page->head_js[] = '/include/js/theme_content.js'; $page->head_js[] = '/include/js/dragdrop.js'; $page->css_admin[] = '/include/css/theme_content.css'; $page->css_admin[] = '/include/css/addons.css'; $this->curr_layout = $config['gpLayout']; $this->SetLayoutArray(); $cmd = common::GetCommand(); //layout requests if (strpos($page->requested, '/')) { $parts = explode('/', $page->requested); $layout_part = $parts[1]; if (isset($gpLayouts[$layout_part]) && $this->EditLayout($layout_part, $cmd)) { return; } } switch ($cmd) { case 'remote': $this->RemoteBrowse(); return; //remote themes //remote themes case 'remote_install': case 'remote_install2': case 'remote_install3': $this->RemoteInstallMain($cmd); return; case 'deletetheme': $this->DeleteTheme(); return; case 'delete_theme_confirmed': $this->DeleteThemeConfirmed(); break; //adminlayout //adminlayout case 'adminlayout': $this->AdminLayout(); return; //theme ratings //theme ratings case 'Update Review': case 'Send Review': case 'rate': includeFile('admin/admin_addons_tool.php'); $rating = new admin_addons_tool(); $rating->admin_addon_rating('theme', 'Admin_Theme_Content'); if ($rating->ShowRatingText) { return; } break; //new layouts //new layouts case 'preview': if ($this->PreviewTheme()) { return; } break; case 'newlayout': $this->NewLayoutPrompt(); return; case 'addlayout': $this->NewLayout(); break; //copy //copy case 'copy': $this->CopyLayoutPrompt(); return; case 'copylayout': $this->CopyLayout(); break; //editing layouts without a layout id //editing layouts without a layout id case 'restore_drag': case 'addcontent': case 'drag': case 'editlayout': //linked from install page //linked from install page case 'rm': case 'insert': case 'details': if ($this->EditLayout($this->curr_layout, $cmd)) { return; } break; case 'rmgadget': $this->RmGadget($_REQUEST['layout']); break; case 'restore': $this->Restore($_REQUEST['layout']); break; case 'change_layout_color': $this->ChangeLayoutColor($_REQUEST['layout'], false); break; case 'css_preferences': $this->CSSPreferences($_REQUEST['layout'], false); break; //layout options //layout options case 'makedefault': $this->MakeDefault($_GET['layout_id']); break; case 'deletelayout': $this->DeleteLayoutConfirmed(); break; case 'layout_details': $this->LayoutDetails(); break; //links //links case 'editlinks': case 'editcustom': $this->SelectLinks(); return; case 'savelinks': $this->SaveLinks(); break; //text //text case 'edittext': $this->EditText(); return; case 'savetext': $this->SaveText(); break; case 'saveaddontext': $this->SaveAddonText(); break; case 'addontext': $this->AddonText(); return; } //message(showArray($_GET)); $this->Show(); }