0byt3m1n1
Path:
/
home1
/
aserty
/
www
/
cpmage
/
[
Home
]
File: coreoptions.php
<?php require_once './application.top.php'; include ('classes/customised.class.php'); require_once ('classes/customplugins.class.php'); require_once ('classes/customthemes.class.php'); require_once ('classes/custompmtemplates.class.php'); $O3->subtitle ='Core Options'; $coreOptions=new l0(); $l1e=new O1e(); $l1f=new O1f(); $pmTemplates=new l1g(); $O3->O1g ='0'; $O3->templateKey =NULL; $O3->templateContent =NULL; switch ($_GET['action']) { case 'editpmtemplate': $pmTemplates->load(); $O3->templateContent =$pmTemplates->l1h($_GET['edit']); $O3->templateKey =$_GET['edit']; $O3->O1g ='4'; break; case 'deletepmtemplate': $pmTemplates->load(); $pmTemplates->O1h($_GET['delete']); $pmTemplates->save(); $msg="\124\145\155\160\154\141\164\145\040\144\145\154\145\164\145\144\041"; $O3->O1g ='4'; break; } switch ($_POST['action']) { case 'updatecoreoptions': $coreOptions->l1i($_POST); $msg="Co\162\145\040\117\160\164\151\157ns \125\160\144\141\164\145\144\041"; $O3->O1g ='0'; break; case 'updatesettings': if ($_POST['cppass'] != '') { $coreOptions->O1i($_POST['cppass']); } $coreOptions->l1j($_POST['cpskin']); $coreOptions->O1j($_POST['cpport']); $coreOptions->l1k($_POST['dedicated_ip']); $msg="\103PMage \123\145\164tings Upd\141\164\145d!"; $O3->O1g ='0'; break; case 'toggledebug': $coreOptions->O1k($_POST['debug']); if ($_POST['debug']) { $msg="CP\115age\040\104eb\165g\040\115\157\144\145\040Activa\164\145\144!"; } else { $msg="\103\120Mage Debu\147\040\115ode De\141\143\164\151vated\041"; } $O3->O1g ='0'; break; case 'uploadcustomplugin': if ($_FILES['upload']) { $l1e->l1l('custom/plugins'); $msg=$l1e->msg; $O3->O1g ='2'; } break; case 'uploadcustomtheme': if ($_FILES['upload']) { $l1e->l1l('custom/themes'); $msg=$l1e->msg; $O3->O1g ='3'; } break; case 'updatepassword': $O1l=$_POST['pw1']; $l1m=$_POST['pw2']; if ($O1l != $l1m) { $msg="the\040passwor\144\163\040don't m\141\164\143h"; } else if (empty($O1l) || empty($l1m)) { $msg="\120\141ssword ca\156\047\164 be blan\153"; } else { $O1->O1m($l1,$O1l); $msg="Your pa\163\163\167ord has \142\145\145n update\144"; } $O3->O1g ='1'; break; case 'deletecustomtheme': $l1n=ROOT_DIR."\057custom/th\145\155\145s/"; if (substr($_POST['themelocation'],0,strlen($l1n)) == $l1n && strlen($_POST['themelocation'])>strlen($l1n)) { $l1f->O1n($_POST['themelocation']); if (!file_exists($_POST['themelocation'])) { $msg="Theme\040".$_POST['themename']." de\154\145\164ed."; } else { $msg="Error del\145\164ing ".$_POST['themename']."\056"; } } else { $msg="Invalid\040\154\157cation s\145\156\164. Theme\040\156\157t dele\164\145\144."; } $O3->O1g ='3'; break; case 'deletecustomplugin': $l1o=ROOT_DIR."/custom/p\154\165\147ins/"; if (substr($_POST['pluginlocation'],0,strlen($l1o)) == $l1o && strlen($_POST['pluginlocation'])>strlen($l1o)) { switch ($_POST['what']) { case 'file': unlink($_POST['pluginlocation']); break; case 'dir': $l1e->O1n($_POST['pluginlocation']); break; } if (!file_exists($_POST['pluginlocation'])) { $msg="\120lugin ".$_POST['pluginname']."\040\144\145leted."; } else { $msg="Er\162\157\162\040deletin\147\040".$_POST['pluginname']."\056"; } } else { $msg="\111\156valid loc\141\164\151on sent.\040\120\154ugin n\157\164\040delete\144\056"; } $O3->O1g ='2'; break; case 'addpmtemplate': $pmTemplates->load(); $pmTemplates->add($_POST['pmtemplatecontent']); $pmTemplates->save(); $msg="\120osting M\141\147\145 Templat\145\040\101dded"; $O3->O1g ='4'; break; case 'editpmtemplate': $pmTemplates->load(); $pmTemplates->O1o($_POST['tkey'],$_POST['pmtemplatecontent']); $pmTemplates->save(); $msg="\120osting Mag\145\040\124emplat\145\040\105dited"; $O3->O1g ='4'; break; case 'deleteselectedpmtemplates': if ( isset ($_POST['delete'])) { $pmTemplates->load(); foreach ($_POST['delete'] as $l1p) { $pmTemplates->O1h($l1p); } $pmTemplates->save(); $msg="\124e\155pl\141\164e\163 d\145le\164\145d\041"; $O3->O1g ='4'; } break; } $coreOptions->le(); $O3->coreOptions =$coreOptions->coreOptions; $thePlugins=$l1e->get_plugins('custom/plugins'); $O3->thePlugins =$thePlugins; $theThemes=$l1f->get_themes('custom/themes'); $O3->theThemes =$theThemes; $pmTemplates->load(); $O3->pmTemplates =$pmTemplates->O1p(); $O3->cPanelThemes =l0::l1q(); $O3->debugMode =l0::O0(); $O3->msg =$msg; $O3->O8('coreoptions.tpl.php'); exit (); ?>