Exemple #1
0
}
$tables['config'] = "system";
function saveconfig()
{
    global $shop_lang, $modx;
    $user = $modx->userLoggedIn();
    $act = $_GET['act'];
    if ($user['usertype'] == "manager") {
        if (!empty($act) && $act == "saveconfig") {
            foreach ($_GET as $key => $value) {
                if ($key != "a" && $key != "id" && $key != "act" && $key != "act2" && $key != "act3") {
                    //echo  $value;
                    setConf("", $key, $value, 1);
                }
            }
            include_once $modx->config['base_path'] . "manager/processors/cache_sync.class.processor.php";
            $sync = new synccache();
            $sync->setCachepath($modx->config['base_path'] . "assets/cache/");
            $sync->setReport(false);
            $sync->emptyCache();
            // first empty the cache
            regenConf();
            return "<span class='ok'>" . $shop_lang['saveok'] . "</span>";
        }
    }
}
switch ($_GET['act']) {
    case 'saveconfig':
        exit(saveconfig());
        break;
}
<?php

require "global.php";
headhtml();
$action = $_GET["action"];
switch ($action) {
    case "saveconfig":
        saveconfig();
        break;
}
$rs = $db->get_one("select * from ve123_siteconfig");
?>
<form id="configform" name="configform" method="post" action="?action=saveconfig">
<table width="100%" border="0" cellpadding="3" cellspacing="1" class="tablebg">
  <tr>
    <th colspan="2">网站基本设置</th>
  </tr>
  <tr>
    <td width="120">网站名称:</td>
    <td><input type="text" name="name" value="<?php 
echo $rs["name"];
?>
"/></td>
  </tr>
  <tr>
    <td>蜘蛛名称:</td>
    <td><input type="text" name="user_agent" value="<?php 
echo $rs["user_agent"];
?>
"/></td>
  </tr>
Exemple #3
0
	include_once('ressources/class.user.inc');

$user=new usersMenus();
	if($user->AsSystemAdministrator==false){
		$tpl=new templates();
		echo "alert('". $tpl->javascript_parse_text("{ERROR_NO_PRIVS}")."');";
		die();exit();
	}
	
	if(isset($_GET["events-js"])){events_js();exit;}
	if(isset($_POST['upload']) ){SSHD_KEYS_SERVER_UPLOAD();exit;}
	if(isset($_GET["popup"])){popup();exit;}
	if(isset($_GET["status"])){status();exit;}
	if(isset($_GET["parameters"])){parameters();exit;}
	if(isset($_GET["ListenAddress-list"])){listen_address_list();exit;}
	if(isset($_GET["LoginGraceTime"])){saveconfig();exit;}
	if(isset($_GET["ListenAddressSSHDADD"])){ListenAddressADD();exit;}
	if(isset($_GET["ListenAddressSSHDDelete"])){ListenAddressDEL();exit;}
	if(isset($_GET["keys"])){popup_keys();exit;}
	if(isset($_GET["GenerateSSHDKeyPair"])){GenerateSSHDKeyPair();exit;}
	if(isset($_GET["GetSSHDFingerprint"])){GetSSHDFingerprint();exit;}
	if(isset($_GET["download-key-pub"])){SSHDKeyPair_download();exit;}
	if(isset($_GET["SSHD_KEYS_SERVER"])){SSHD_KEYS_SERVER_FORM();exit;}
	
	
	if(isset($_GET["events"])){events();exit;}
	if(isset($_GET["sshd-events"])){events_list();exit;}
	
	
	
js();	
Exemple #4
0
        echo "<tbody id=\"msgcode1\" style=\"display:" . (@$mconfigs['msgcode_mode'] == 1 ? '' : 'none') . "\">";
        trbasic(lang('msgcode_msg'), 'mconfigsnew[msgcode_msg]', @$mconfigs['msgcode_msg'], 'textarea', lang('msgcode_msg_tip'));
        echo "</tbody>";
        tabfooter();
        echo '<input class="button" type="submit" name="bmconfigs" value="' . lang('submit') . '"/>&nbsp; &nbsp;' . '<input type="hidden" name="mobmode" value="1"/>' . '</form>';
        a_guide('cfmail');
    } else {
        if (empty($mobmode)) {
            $mconfigsnew['mail_smtp'] = trim($mconfigsnew['mail_smtp']);
            $mconfigsnew['mail_port'] = trim($mconfigsnew['mail_port']);
            $mconfigsnew['mail_from'] = trim($mconfigsnew['mail_from']);
            $mconfigsnew['mail_user'] = trim($mconfigsnew['mail_user']);
            $mconfigsnew['mail_pwd'] = trim($mconfigsnew['mail_pwd']);
            unset($mconfigsnew['mail_sign'], $mconfigsnew['mail_to']);
        }
        saveconfig('mail');
        adminlog(lang('mailset'), lang('upanddownset'));
        amessage(empty($mobmode) ? 'mailsetfinish' : 'mobilesetfinish', '?entry=mconfigs&action=cfmobmail');
    }
}
function saveconfig($cftype)
{
    global $mconfigs, $mconfigsnew, $db, $tblprefix;
    foreach ($mconfigsnew as $k => $v) {
        if (!isset($mconfigs[$k]) || $mconfigs[$k] != $v) {
            $db->query("REPLACE INTO {$tblprefix}mconfigs (varname,value,cftype) VALUES ('{$k}','{$v}','{$cftype}')");
        }
    }
    updatecache('mconfigs');
}
function alter_purchase()
	$usersmenus=new usersMenus();
	if(!$usersmenus->AsArticaAdministrator){
			$tpl=new templates();
			echo "alert('".$tpl->javascript_parse_text("{ERROR_NO_PRIVS}")."');";
			die();
		}
	
		

	if(isset($_GET["popup"])){popup();exit;}	
	if(isset($_GET["install-status"])){popup_install_status();exit;}
	
	if(isset($_GET["index"])){index();exit;}
	if(isset($_GET["settings"])){settings();exit;}
	if(isset($_GET["REPLICATION"])){saveconfig();exit;}
	if(isset($_GET["MAIN_PATH"])){saveconfig();exit;}
	if(isset($_GET["folders"])){folders();exit;}
	if(isset($_GET["folders-add"])){folders_add();exit;}
	if(isset($_GET["folders-list"])){folders_list();exit;}
	if(isset($_GET["folders-delete"])){folders_delete();exit;}
	if(isset($_GET["tree-path"])){tree_js();exit;}
	
	if(isset($_GET["replication"])){replication();exit;}
	
	if(isset($_GET["restart"])){restart_js();exit;}
	if(isset($_GET["restart-popup"])){restart_popup();exit;}
	if(isset($_GET["restart-perform"])){restart_perform();exit;}
	if(isset($_GET["restart-list"])){restart_list();exit;}
	
		
js();
Exemple #6
0
    }
    function bindGlobals()
    {
        foreach ($this->_alias as $k => $v) {
            if (isset($GLOBALS[$v])) {
                $this->{$k} = $GLOBALS[$v];
            }
        }
    }
}
require_once str_replace('\\', '/', dirname(__FILE__)) . '/admin.config.html.php';
$confightml = new HTML_config();
switch ($task) {
    case 'apply':
    case 'save':
        saveconfig($task);
        break;
    case 'cancel':
        mosRedirect('index2.php');
        break;
    default:
        showconfig($confightml, $database, $option);
        break;
}
function showconfig($confightml, &$database, $option)
{
    global $database, $mosConfig_absolute_path, $mosConfig_locale;
    $row = new mosConfig();
    $row->bindGlobals();
    // compile list of the languages
    $langs = array();
Exemple #7
0
 case 'apply_templateparams':
     save_templateparam($option);
     break;
     /***
      * Configuration
      */
 /***
  * Configuration
  */
 case "config":
     $show = JRequest::getCmd('show', '');
     config($option, $show);
     break;
 case "saveconfig":
     $cache->clean();
     saveconfig($option);
     break;
     /***
      * Custom Fields
      */
 /***
  * Custom Fields
  */
 case "customfields":
     customfields($option);
     break;
 case "save_customfields":
     $cache->clean();
     save_customfields($option);
     break;
     /***
     }
     tabfooter('btplbase');
     a_guide('tplbase');
 } else {
     if (!$sid) {
         $mconfigsnew['hometpl'] = empty($mconfigsnew['hometpl']) ? '' : trim($mconfigsnew['hometpl']);
         $mconfigsnew['templatedir'] = trim(strip_tags($mconfigsnew['templatedir']));
         //指定新的模板文件夹,所以可以有不同的模板样式
         if (empty($mconfigsnew['templatedir']) || preg_match("/[^a-zA-Z_0-9]+/", $mconfigsnew['templatedir'])) {
             amessage('tpldirillegal', M_REFERER);
         }
         mmkdir(M_ROOT . 'template/' . $mconfigsnew['templatedir']);
         $mconfigsnew['css_dir'] = trim(strip_tags($mconfigsnew['css_dir']));
         $mconfigsnew['js_dir'] = trim(strip_tags($mconfigsnew['js_dir']));
         $mconfigsnew['jsrefsource'] = trim(preg_replace("/(\\s*(\r\n|\n\r|\n|\r)\\s*)/", "\r\n", $mconfigsnew['jsrefsource']));
         saveconfig('tpl');
     } else {
         $subsitenew['hometpl'] = empty($subsitenew['hometpl']) ? '' : trim($subsitenew['hometpl']);
         $subsitenew['w_index_tpl'] = empty($subsitenew['w_index_tpl']) ? '' : trim($subsitenew['w_index_tpl']);
         $subsitenew['templatedir'] = trim(strip_tags($subsitenew['templatedir']));
         //指定新的模板文件夹,所以可以有不同的模板样式
         if (empty($subsitenew['templatedir']) || preg_match("/[^a-zA-Z_0-9]+/", $subsitenew['templatedir'])) {
             amessage('tpldirillegal', M_REFERER);
         }
         mmkdir(M_ROOT . 'template/' . $subsitenew['templatedir'], 0);
         $subsitenew['css_dir'] = trim(strip_tags($subsitenew['css_dir']));
         $subsitenew['js_dir'] = trim(strip_tags($subsitenew['js_dir']));
         $db->query("UPDATE {$tblprefix}subsites SET \n\t\t\thometpl='{$subsitenew['hometpl']}',\n\t\t\tw_index_tpl='{$subsitenew['w_index_tpl']}',\n\t\t\ttemplatedir='{$subsitenew['templatedir']}',\n\t\t\tcss_dir='{$subsitenew['css_dir']}',\n\t\t\tjs_dir='{$subsitenew['js_dir']}'\n\t\t\tWHERE sid='{$sid}'");
         updatecache('subsites');
     }
     adminlog(lang('websiteset'), lang('pagandtemset'));
Exemple #9
0
//JTable::addTableDir(JPATH_ADMINISTRATOR.DS.'components'.DS.'com_swmenupro'.DS.'tables');
switch (JRequest::getVar('task')) {
    case 'preview':
        preview($cid[0], $option);
        break;
    case 'images':
        imageManager($cid[0], $option);
        break;
    case 'imageFiles':
        imageFiles($cid[0], $option);
        break;
    case "new":
        editModule('0', $option);
        break;
    case "saveedit":
        saveconfig($cid[0], $option);
        break;
    case 'uploadfile':
        uploadPackage();
        break;
    case 'uploadlanguage':
        uploadPackage();
        break;
    case 'changelanguage':
        changeLanguage();
        break;
    case 'import_swMenuFree':
        import_swmenufree();
        break;
    case "upgrade":
        upgrade($option);
        trbasic(lang('floathei'), 'mconfigsnew[mfloatwinheight]', empty($mconfigs['mfloatwinheight']) ? 0 : $mconfigs['mfloatwinheight']);
        tabfooter('bmconfigs');
    } else {
        $mconfigsnew['mmsgforwordtime'] = max(0, intval($mconfigsnew['mmsgforwordtime']));
        $mconfigsnew['mrowpp'] = max(5, intval($mconfigsnew['mrowpp']));
        $mconfigsnew['uclasslength'] = min(30, max(4, intval($mconfigsnew['uclasslength'])));
        $mconfigsnew['mfloatwinwidth'] = min(1200, max(400, intval($mconfigsnew['mfloatwinwidth'])));
        $mconfigsnew['mfloatwinheight'] = min(1000, max(300, intval($mconfigsnew['mfloatwinheight'])));
        $mconfigsnew['maxuclassnum'] = max(0, intval($mconfigsnew['maxuclassnum']));
        $c_upload = new cls_upload();
        $mconfigsnew['mcenterlogo'] = upload_s($mconfigsnew['mcenterlogo'], $mconfigs['mcenterlogo'], 'image');
        if ($k = strpos($mconfigsnew['mcenterlogo'], '#')) {
            $mconfigsnew['mcenterlogo'] = substr($mconfigsnew['mcenterlogo'], 0, $k);
        }
        $c_upload->saveuptotal(1);
        unset($c_upload);
        saveconfig('view');
        adminlog(lang('websiteset'), lang('pagandtemset'));
        amessage('websitesetfinish', "?entry=backparams&action=mcparams{$param_suffix}");
    }
}
function saveconfig($cftype)
{
    global $mconfigs, $mconfigsnew, $db, $tblprefix;
    foreach ($mconfigsnew as $k => $v) {
        if (!isset($mconfigs[$k]) || $mconfigs[$k] != $v) {
            $db->query("REPLACE INTO {$tblprefix}mconfigs (varname,value,cftype) VALUES ('{$k}','{$v}','{$cftype}')");
        }
    }
    updatecache('mconfigs');
}