• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP setParam函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中setParam函数的典型用法代码示例。如果您正苦于以下问题:PHP setParam函数的具体用法?PHP setParam怎么用?PHP setParam使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了setParam函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: processing

 public function processing()
 {
     $oController = new BxDolUpgradeController();
     if ($oController->setMaintenanceMode(true)) {
         // if upgrade was successful
         if (($sFolder = $oController->getAvailableUpgrade()) && $oController->runUpgrade($sFolder)) {
             // write upgrade log
             $oController->writeLog();
             // send email notification
             bx_import('BxDolLanguages');
             sendMailTemplateSystem('t_UpgradeSuccess', array('new_version' => bx_get_ver(true), 'conclusion' => $oController->getConclusion() ? _t('_sys_upgrade_conclusion', $oController->getConclusion()) : ''));
             // if next upgrade is available (in case of bulk upgrade) then schedule to run it upon next cron run
             $sUpgradeDir = pathinfo(__FILE__, PATHINFO_DIRNAME);
             if ($oController->getAvailableUpgrade()) {
                 $oUpgrader = bx_instance('BxDolUpgrader');
                 $oUpgrader->setTransientUpgradeCronJob($sUpgradeDir);
             } elseif (0 === strpos($sUpgradeDir, BX_DIRECTORY_PATH_TMP)) {
                 @bx_rrmdir($sUpgradeDir);
             }
         }
         $oController->setMaintenanceMode(false);
     }
     // if something went grong during upgrade
     if ($sErrorMsg = $oController->getErrorMsg()) {
         // write upgrade log
         $oController->writeLog();
         // send email notification
         sendMailTemplateSystem('t_UpgradeFailed', array('error_msg' => $sErrorMsg));
         // disable auto-upgrade if it is failed
         setParam('sys_autoupdate_system', '');
     }
 }
开发者ID:Baloo7super,项目名称:dolphin,代码行数:32,代码来源:BxDolUpgradeCron.php


示例2: onValidateId

 protected function onValidateId()
 {
     $id = param("id");
     if (!hasPerm(AUTH_MGR) || is_null(param("id"))) {
         setParam("id", $_SESSION["empId"]);
     }
 }
开发者ID:skyshore2001,项目名称:JDCloud,代码行数:7,代码来源:api_objects.php


示例3: uninstall

 function uninstall($aParams)
 {
     $aResult = parent::uninstall($aParams);
     if ($aResult['result'] && getParam($this->_sParamDefaultPayment) == $this->_aConfig['home_uri']) {
         setParam($this->_sParamDefaultPayment, '');
     }
     return $aResult;
 }
开发者ID:Prashank25,项目名称:dolphin.pro,代码行数:8,代码来源:installer.php


示例4: __construct

 /**
  * constructor
  */
 function __construct()
 {
     if (isset($_POST['hide_admin_help']) && $_POST['hide_admin_help']) {
         setParam('sys_show_admin_help', '');
         echo '1';
         exit;
     }
     $this->aBlocks = array('help' => 'on' == getParam('sys_show_admin_help') ? true : false, 'links' => true, 'charts' => true, 'stats' => true);
 }
开发者ID:Prashank25,项目名称:dolphin.pro,代码行数:12,代码来源:BxDolAdminDashboard.php


示例5: param

function param($name, $value = null)
{
    if ($value !== null) {
        setParam($name, $value);
    }
    if (preg_match('/^([^\\[]+)\\[([^\\]]*)\\]$/', $name, $m)) {
        $name = $m[1];
    }
    return isset($_REQUEST[$name]) ? $_REQUEST[$name] : null;
}
开发者ID:PapaKot,项目名称:Horowitz,代码行数:10,代码来源:default.php


示例6: BxDolAdminDashboard

 /**
  * constructor
  */
 function BxDolAdminDashboard()
 {
     parent::BxDolMistake();
     if (isset($_POST['hide_admin_help']) && $_POST['hide_admin_help']) {
         setParam('sys_show_admin_help', '');
         echo '1';
         exit;
     }
     $this->aBlocks = array('help' => 'on' == getParam('sys_show_admin_help') ? true : false, 'links' => true, 'charts' => true, 'stats' => true);
 }
开发者ID:gorenc,项目名称:dolphin.pro,代码行数:13,代码来源:BxDolAdminDashboard.php


示例7: processing

 public function processing()
 {
     if ('on' != getParam('sys_autoupdate_system')) {
         return;
     }
     $o = bx_instance('BxDolUpgrader');
     if (!$o->prepare()) {
         sendMailTemplateSystem('t_UpgradeFailed', array('error_msg' => $o->getError()));
         setParam('sys_autoupdate_system', '');
         // disable auto-update if it is failed
     }
 }
开发者ID:Baloo7super,项目名称:dolphin,代码行数:12,代码来源:BxDolCronUpgradeCheck.php


示例8: setParam

    echo $ad['blank'] ? 'target="_blank"' : '';
    ?>
>
                <img style="width:565px;height:53px;" src="<?php 
    echo $ad["pic_url"];
    ?>
">
            </a>
            <?php 
}
?>
        </div>
        <div class="search">
            <form name="searchform" id="searchform" action="index.php" method="get">
                <?php 
echo setParam(array('m' => 'search', 'a' => 'index'));
?>
            <span class="search-area fl">
                <input name="keywords" id="keywords" class="txt" value="请输入想找的宝贝" title="请输入想找的宝贝" type="text" onblur="if (value=='') {value='请输入想找的宝贝'}" onfocus="if(value=='请输入想找的宝贝') {value=''}">
            </span>
            <input value="搜全站" class="smt fr" type="submit">
            </form>
        </div>
    </div>

    <div class="mainNav">
        <div class="nav">
        <?php 
$allsort = IndexModel::I()->getAllSort();
?>
            <ul id="" class="navigation fl">
开发者ID:huping112004,项目名称:taobaoke,代码行数:31,代码来源:dffcc91db239d4421cc68f0f13519ab1.php


示例9: _removeFields

 function _removeFields($sType)
 {
     switch ($sType) {
         case 'html':
         case 'json':
         case 'exceptions':
             break;
         default:
             return array();
     }
     $s = getParam("sys_{$sType}_fields");
     if (!$s) {
         return;
     }
     $a = unserialize($s);
     unset($a[$this->_aConfig['home_uri']]);
     $s = serialize($a);
     setParam("sys_{$sType}_fields", $s);
 }
开发者ID:noormcs,项目名称:studoro,代码行数:19,代码来源:BxDolInstallerUtils.php


示例10: resetPage

 function resetPage()
 {
     if ($this->oPage->bResetable) {
         $sQuery = "DELETE FROM `{$this->sDBTable}` WHERE `Page` = '{$this->sPage_db}'";
         db_res($sQuery);
         execSqlFile($this->oPage->sDefaultSqlFile);
         if ($this->oPage->sName == 'index') {
             setParam('promoWidth', '960');
             ResizeAllPromos();
         }
     }
     echo (int) $this->oPage->bResetable;
 }
开发者ID:BackupTheBerlios,项目名称:dolphin-dwbn-svn,代码行数:13,代码来源:BxDolPageViewAdmin.php


示例11: U

<script type="text/javascript">
    var m1 = o2.find('.menu-text').html();
    var m2 = o1.find('a').html();        
    $("#breadcrumbs .breadcrumb li:eq(1)").html(m1);
    $("#breadcrumbs .breadcrumb li:eq(2)").html(m2);
</script>
            <div class="page-content">
                <div class="row">
                    <div class="col-xs-12">
                        <!-- PAGE CONTENT BEGINS -->                        
                            <form class="form-horizontal" role="form" action="<?php 
echo U('admin/addsort');
?>
" method="post">
                                <?php 
echo setParam(array('op' => 'do', 'sort_id' => $sort['sort_id'], 'p_id' => $sort['p_id']));
?>
                                <?php 
if (!$sort_id && !$p_id) {
    ?>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label no-padding-right" for="form-field-1">类型<span style="color:#f00;">*</span></label>
                                    <div class="col-sm-9">
                                    <select  class="col-sm-12" name="type" onchange="changesort($(this).val())">
                                        <option value="1">商品分类</option>
                                        <option value="2">文章分类</option>
                                    </select>                                                                        
                                    </div>
                                    <script type='text/javascript'>
                                        $("select[name='type'] option[value='<?php 
    echo $sort[type];
开发者ID:huping112004,项目名称:taobaoke,代码行数:31,代码来源:35411838562924031e5d010fe1acba04.php


示例12: bx_import

require_once BX_DIRECTORY_PATH_INC . 'design.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'admin_design.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'admin.inc.php';
bx_import('BxDolSiteMaps');
class BxDolAdmFormSitemap extends BxTemplFormView
{
    function __construct()
    {
        $aCustomForm = array('form_attrs' => array('id' => 'sys-adm-sitemap', 'name' => 'sys-adm-sitemap', 'method' => 'post'), 'inputs' => array('sys_sitemap_generated' => array('type' => 'custom', 'content' => mb_strlen(@file_get_contents(BxDolSiteMaps::getSiteMapIndexPath())) > 32 ? '<span class="sys-adm-enabled">' . _t('_Yes') . '</span>' : '<span class="sys-adm-disabled">' . _t('_No') . '</span>', 'caption' => _t('_sys_sitemap_form_caption_sitemap_generated')), 'sys_sitemap_enable' => array('type' => 'checkbox', 'name' => 'sys_sitemap_enable', 'value' => 'on', 'checked' => 'on' == getParam('sys_sitemap_enable') ? true : false, 'caption' => _t('_sys_sitemap_form_caption')), 'Submit' => array('type' => 'submit', 'name' => 'sitemap_enable', 'value' => _t('_Submit'))));
        parent::__construct($aCustomForm);
    }
}
$logged['admin'] = member_auth(1, true, true);
// process actions
if (isset($_POST['sitemap_enable'])) {
    setParam('sys_sitemap_enable', $_POST['sys_sitemap_enable'] ? 'on' : '');
    BxDolSiteMaps::generateAllSiteMaps();
}
$iNameIndex = 9;
$sPageTitle = _t('_sys_sitemap');
$_page_cont[$iNameIndex]['page_main_code'] = PageCodeSitemap();
$_page = array('name_index' => $iNameIndex, 'header' => $sPageTitle, 'header_text' => $sPageTitle, 'css_name' => array('forms_adv.css'));
PageCodeAdmin();
function PageCodeSitemap()
{
    global $aPages;
    $oForm = new BxDolAdmFormSitemap();
    $aList = BxDolSiteMapsQuery::getAllActiveSystemsFromCache();
    $aListForTemplate = array();
    foreach ($aList as $i => $a) {
        $aListForTemplate[] = array('title_translated' => _t($a['title']));
开发者ID:Prashank25,项目名称:dolphin.pro,代码行数:31,代码来源:sitemap.php


示例13: saveIndexPageSettings

function saveIndexPageSettings()
{
    setParam('default_country', $_POST['default_country']);
    setParam('top_members_mode', $_POST['top_members_mode']);
    setParam('featured_mode', $_POST['featured_mode']);
    setParam('featured_num', $_POST['featured_num']);
    setParam('top_members_max_num', $_POST['top_members_max_num']);
    setParam('top_photos_max_num', $_POST['top_photos_max_num']);
    ?>
    <div class="succ">Index page parameters successfully changed.</div><br />
    <?php 
}
开发者ID:BackupTheBerlios,项目名称:dolphin-dwbn-svn,代码行数:12,代码来源:basic_settings.php


示例14: actionUpload

 function actionUpload($sType, $aFile, $aFtpInfo)
 {
     $sLogin = htmlspecialchars_adv(clear_xss($aFtpInfo['login']));
     $sPassword = htmlspecialchars_adv(clear_xss($aFtpInfo['password']));
     $sPath = htmlspecialchars_adv(clear_xss($aFtpInfo['path']));
     setParam('sys_ftp_login', $sLogin);
     setParam('sys_ftp_password', $sPassword);
     setParam('sys_ftp_dir', $sPath);
     $sErrMsg = false;
     $sName = mktime();
     $sAbsolutePath = BX_DIRECTORY_PATH_ROOT . "tmp/" . $sName . '.zip';
     $sPackageRootFolder = false;
     if (!class_exists('ZipArchive')) {
         $sErrMsg = '_adm_txt_modules_zip_not_available';
     }
     if (!$sErrMsg && $this->_isArchive($aFile['type']) && move_uploaded_file($aFile['tmp_name'], $sAbsolutePath)) {
         // extract uploaded zip package into tmp folder
         $oZip = new ZipArchive();
         if ($oZip->open($sAbsolutePath) !== TRUE) {
             $sErrMsg = '_adm_txt_modules_cannot_unzip_package';
         }
         if (!$sErrMsg) {
             $sPackageRootFolder = $oZip->numFiles > 0 ? $oZip->getNameIndex(0) : false;
             if (file_exists(BX_DIRECTORY_PATH_ROOT . 'tmp/' . $sPackageRootFolder)) {
                 // remove existing tmp folder with the same name
                 bx_rrmdir(BX_DIRECTORY_PATH_ROOT . 'tmp/' . $sPackageRootFolder);
             }
             if ($sPackageRootFolder && !$oZip->extractTo(BX_DIRECTORY_PATH_ROOT . 'tmp/')) {
                 $sErrMsg = '_adm_txt_modules_cannot_unzip_package';
             }
             $oZip->close();
         }
         // upload files to the correct folder via FTP
         if (!$sErrMsg && $sPackageRootFolder) {
             $oFtp = new BxDolFtp($_SERVER['HTTP_HOST'], $sLogin, $sPassword, $sPath);
             if (!$oFtp->connect()) {
                 $sErrMsg = '_adm_txt_modules_cannot_connect_to_ftp';
             }
             if (!$sErrMsg && !$oFtp->isDolphin()) {
                 $sErrMsg = '_adm_txt_modules_destination_not_valid';
             }
             if (!$sErrMsg) {
                 $sConfigPath = BX_DIRECTORY_PATH_ROOT . "tmp/" . $sPackageRootFolder . $this->_aTypesConfig[$sType]['configfile'];
                 if (file_exists($sConfigPath)) {
                     include $sConfigPath;
                     $sConfigVar = !empty($this->_aTypesConfig[$sType]['configvarindex']) ? ${$this->_aTypesConfig[$sType]['configvar']}[$this->_aTypesConfig[$sType]['configvarindex']] : ${$this->_aTypesConfig[$sType]['configvar']};
                     $sSubfolder = $this->_aTypesConfig[$sType]['subfolder'];
                     $sSubfolder = str_replace('{configvar}', $sConfigVar, $sSubfolder);
                     $sSubfolder = str_replace('{packagerootfolder}', $sPackageRootFolder, $sSubfolder);
                     if (!$oFtp->copy(BX_DIRECTORY_PATH_ROOT . "tmp/" . $sPackageRootFolder . '/', $this->_aTypesConfig[$sType]['folder'] . $sSubfolder)) {
                         $sErrMsg = '_adm_txt_modules_ftp_copy_failed';
                     }
                 } else {
                     $sErrMsg = '_adm_txt_modules_wrong_package_format';
                 }
             }
         } else {
             $sErrMsg = '_adm_txt_modules_cannot_unzip_package';
         }
         // remove temporary files
         bx_rrmdir(BX_DIRECTORY_PATH_ROOT . 'tmp/' . $sPackageRootFolder);
         unlink($sAbsolutePath);
     } else {
         $sErrMsg = '_adm_txt_modules_cannot_upload_package';
     }
     return $sErrMsg ? $sErrMsg : '_adm_txt_modules_success_upload';
 }
开发者ID:Gotgot59,项目名称:dolphin.pro,代码行数:67,代码来源:BxDolInstallerUi.php


示例15: saveChanges

 function saveChanges(&$aData)
 {
     $aCategories = explode(',', process_db_input($aData['cat'], BX_TAGS_STRIP));
     foreach ($aCategories as $mixedCategory) {
         if (!is_numeric($mixedCategory) || isset($this->_aCustomCategories[$mixedCategory]['save'])) {
             $mixedResult = $this->{$this->_aCustomCategories[$mixedCategory]['save']}($aData);
             if ($mixedResult !== true) {
                 return $mixedResult;
             }
         } else {
             if (is_numeric($mixedCategory)) {
                 $aItems = $this->_oDb->getAll("SELECT `Name` AS `name`, `desc` AS `title`, `Type` AS `type`, `AvailableValues` AS `extra`, `check` AS `check`, `err_text` AS `check_error` FROM `sys_options` WHERE `kateg`= ?", [$mixedCategory]);
                 $aItemsData = array();
                 foreach ($aItems as $aItem) {
                     if (is_array($aData[$aItem['name']])) {
                         foreach ($aData[$aItem['name']] as $sKey => $sValue) {
                             $aItemsData[$aItem['name']][$sKey] = process_db_input($sValue, BX_TAGS_STRIP);
                         }
                     } else {
                         $aItemsData[$aItem['name']] = process_db_input($aData[$aItem['name']], BX_TAGS_STRIP);
                     }
                     if (!empty($aItem['check'])) {
                         $oFunction = create_function('$arg0', $aItem['check']);
                         if (!$oFunction($aItemsData[$aItem['name']])) {
                             $this->_iCategoryActive = (int) $mixedCategory;
                             return MsgBox("'" . $aItem['title'] . "' " . $aItem['check_error'], $this->_iResultTimer);
                         }
                     }
                     $bIsset = isset($aItemsData[$aItem['name']]);
                     if ($bIsset && is_array($aItemsData[$aItem['name']])) {
                         $aItemsData[$aItem['name']] = implode(',', $aItemsData[$aItem['name']]);
                     } else {
                         if (!$bIsset) {
                             $aItemsData[$aItem['name']] = $this->_empty($aItem);
                         }
                     }
                     setParam($aItem['name'], $aItemsData[$aItem['name']]);
                 }
             }
         }
         if (isset($this->_aCustomCategories[$mixedCategory]['on_save'])) {
             $this->{$this->_aCustomCategories[$mixedCategory]['on_save']}();
         }
     }
     return MsgBox(_t('_adm_txt_settings_success'), $this->_iResultTimer);
 }
开发者ID:Prashank25,项目名称:dolphin.pro,代码行数:46,代码来源:BxDolAdminSettings.php


示例16: send_headers_page_changed

    }
}
if (!$_COOKIE['adminID'] || !$_COOKIE['adminPassword']) {
    // this is dynamic page -  send headers to do not cache this page
    send_headers_page_changed();
    login_form("", 1);
    exit;
}
//==========================================================================================
//==========================================================================================
set_error_handler("ErrorHandler");
if ($_REQUEST['news_disable']) {
    setParam("news_enable", 0);
}
if ($_REQUEST['news_enable']) {
    setParam("news_enable", 1);
}
$news_enable = getParam("news_enable");
if ($news_enable) {
    $sVerFile = @file_get_contents('http://rss.boonex.com/');
} else {
    $sVerFile = '';
}
$aVer = preg_split('/<\\/?dolphin>/', $sVerFile);
$sDolVerLatest = $aVer[1];
//==========================================================================================
//==========================================================================================
$logged['admin'] = member_auth(1);
if ((int) $_GET['admin_categ']) {
    TopCodeAdmin();
    getAdminCategIndex();
开发者ID:BackupTheBerlios,项目名称:dolphin-dwbn-svn,代码行数:31,代码来源:index.php


示例17: BxDolPageViewAdmin

 function BxDolPageViewAdmin($sDBTable, $sCacheFile)
 {
     $GLOBALS['oAdmTemplate']->addJsTranslation(array('_adm_pbuilder_Reset_page_warning', '_adm_pbuilder_Column_non_enough_width_warn', '_adm_pbuilder_Column_delete_confirmation', '_adm_pbuilder_Add_column', '_adm_pbuilder_Want_to_delete', '_delete'));
     $this->sDBTable = $sDBTable;
     $this->sCacheFile = $sCacheFile;
     // special actions (without creating page)
     if (isset($_REQUEST['action_sys'])) {
         switch ($_REQUEST['action_sys']) {
             case 'loadNewPageForm':
                 header('Content-Type: text/html; charset=utf-8');
                 echo $this->showNewPageForm();
                 break;
             case 'createNewPage':
                 header('Content-Type:text/javascript');
                 echo json_encode($this->createUserPage());
                 break;
         }
         exit;
     }
     $sPage = process_pass_data(isset($_REQUEST['Page']) ? trim(urldecode($_REQUEST['Page'])) : '');
     $this->getPages();
     if (strlen($sPage) && in_array($sPage, $this->aPages)) {
         $this->oPage = new BxDolPVAPage($sPage, $this);
     }
     $this->checkAjaxMode();
     if (!empty($_REQUEST['action']) && $this->oPage) {
         $this->sPage_db = addslashes($this->oPage->sName);
         switch ($_REQUEST['action']) {
             case 'load':
                 header('Content-type:text/javascript');
                 send_headers_page_changed();
                 echo $this->oPage->getJSON();
                 break;
             case 'saveColsWidths':
                 if (is_array($_POST['widths'])) {
                     $this->saveColsWidths($_POST['widths']);
                     $this->createCache();
                 }
                 break;
             case 'saveBlocks':
                 if (is_array($_POST['columns'])) {
                     $this->saveBlocks($_POST['columns']);
                     $this->createCache();
                 }
                 break;
             case 'loadEditForm':
                 $iBlockID = (int) $_POST['id'];
                 if ($iBlockID) {
                     header('Content-type:text/html;charset=utf-8');
                     echo $this->showPropForm($iBlockID);
                 }
                 break;
             case 'saveItem':
                 if ((int) $_POST['id']) {
                     $this->saveItem($_POST);
                     $this->createCache((int) $_POST['id']);
                 }
                 break;
             case 'deleteCustomPage':
                 header('Content-type:text/html;charset=utf-8');
                 $sPage = isset($_POST['Page']) ? $_POST['Page'] : '';
                 if (!$sPage) {
                     echo _t('_Error Occured');
                 } else {
                     //remove page from page builder
                     $this->deleteCustomPage($sPage);
                 }
                 break;
             case 'deleteBlock':
                 if ($iBlockID = (int) $_REQUEST['id']) {
                     $this->deleteBlock($iBlockID);
                     $this->createCache();
                 }
                 break;
             case 'checkNewBlock':
                 if ($iBlockID = (int) $_REQUEST['id']) {
                     $this->checkNewBlock($iBlockID);
                 }
                 break;
             case 'savePageWidth':
                 if ($sPageWidth = process_pass_data($_POST['width'])) {
                     $this->savePageWidth($sPageWidth);
                     $this->createCache();
                 }
                 break;
             case 'saveOtherPagesWidth':
                 if ($sWidth = $_REQUEST['width']) {
                     setParam('main_div_width', $sWidth);
                     echo 'OK';
                 }
                 break;
             case 'resetPage':
                 $this->resetPage();
                 $this->createCache();
                 break;
         }
     }
     if ($this->bAjaxMode) {
         exit;
     }
//.........这里部分代码省略.........
开发者ID:Gotgot59,项目名称:dolphin.pro,代码行数:101,代码来源:BxDolPageViewAdmin.php


示例18: _saveLocationByPrefix

 function _saveLocationByPrefix($sPrefix, $iZoom, $sMapType, $fLat, $fLng)
 {
     if (!$this->isAdmin()) {
         echo 'Access denied';
         return;
     }
     if ($iZoom = (int) $iZoom) {
         setParam($sPrefix . '_zoom', $iZoom);
     }
     switch ($sMapType) {
         case 'normal':
         case 'satellite':
         case 'hybrid':
             setParam($sPrefix . '_map_type', $sMapType);
     }
     if ($fLat = (double) $fLat) {
         setParam($sPrefix . '_lat', $fLat);
     }
     if ($fLng = (double) $fLng) {
         setParam($sPrefix . '_lng', $fLng);
     }
     echo 'ok';
 }
开发者ID:gorenc,项目名称:dolphin.pro,代码行数:23,代码来源:BxWmapModule.php


示例19: bx_import

 * CC-BY License - http://creativecommons.org/licenses/by/3.0/
 */
require_once '../inc/header.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'design.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'admin_design.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'admin.inc.php';
bx_import('BxDolInstallerUi');
bx_import('BxDolFtp');
$logged['admin'] = member_auth(1, true, true);
//--- Check actions ---//
$aEnabledTemplateAction = array('upload' => 1, 'delete' => 1, 'change_default' => 1);
$oZ = new BxDolAlerts('system', 'admin_templates_actions', 0, 0, array('actions' => &$aEnabledTemplateAction));
$oZ->alert();
$sResult = '';
if ($_POST['set_default'] && file_exists(BX_DIRECTORY_PATH_ROOT . 'templates/tmpl_' . $_POST['set_default']) && isset($aEnabledTemplateAction['change_default'])) {
    setParam('template', $_POST['set_default']);
} elseif ($_POST['del_template'] && $_POST['del_template'] != 'uni' && file_exists(BX_DIRECTORY_PATH_ROOT . 'templates/tmpl_' . $_POST['del_template']) && isset($aEnabledTemplateAction['delete'])) {
    $oInstallerUi = new BxDolInstallerUi();
    $sResult = $oInstallerUi->actionDelete(array('tmpl_' . $_POST['del_template']), 'template');
    $sResult = _t($sResult);
}
$aPages = array('templates' => array('title' => _t('_adm_txt_list'), 'url' => BX_DOL_URL_ADMIN . 'templates.php?mode=templates', 'func' => 'PageCodeTemplates', 'func_params' => array($sResult)), 'add' => array('title' => _t('_add'), 'url' => BX_DOL_URL_ADMIN . 'templates.php?mode=add', 'func' => 'PageCodeAdd', 'func_params' => array()), 'settings' => array('title' => _t('_Settings'), 'url' => BX_DOL_URL_ADMIN . 'templates.php?mode=settings', 'func' => 'PageCodeSettings', 'func_params' => array()));
if (!isset($_GET['mode']) || !isset($aPages[$_GET['mode']])) {
    $sMode = 'templates';
} else {
    $sMode = $_GET['mode'];
}
$aTopItems = array();
foreach ($aPages as $k => $r) {
    $aTopItems['dbmenu_' . $k] = array('href' => $r['url'], 'title' => $r['title'], 'active' => $k == $sMode ? 1 : 0);
}
开发者ID:Prashank25,项目名称:dolphin.pro,代码行数:31,代码来源:templates.php


示例20: saveLanguageSettings

function saveLanguageSettings()
{
    // save default language.
    if ($_POST['lang_default']) {
        setParam('lang_default', $_POST['lang_default']);
    }
}
开发者ID:BackupTheBerlios,项目名称:dolphin-dwbn-svn,代码行数:7,代码来源:lang_file.php



注:本文中的setParam函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP setPostViews函数代码示例发布时间:2022-05-15
下一篇:
PHP setPageTitle函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap