本文整理汇总了PHP中PwConfigSet类的典型用法代码示例。如果您正苦于以下问题:PHP PwConfigSet类的具体用法?PHP PwConfigSet怎么用?PHP PwConfigSet使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了PwConfigSet类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: dorunAction
public function dorunAction()
{
list($ifopen, $readifopen, $spaceifopen) = $this->getInput(array('ifopen', 'readifopen', 'spaceifopen'), 'post');
$config = new PwConfigSet('site');
$config->set('app.dongta.ifopen', intval($ifopen))->set('app.dongta.read.ifopen', intval($readifopen))->set('app.dongta.space.ifopen', intval($spaceifopen))->flush();
$this->showMessage('operate.success');
}
开发者ID:fanqimeng,项目名称:4tweb,代码行数:7,代码来源:ManageController.php
示例2: doModifyAction
/**
* 设置伪静态
*/
public function doModifyAction()
{
list($format, $isopen) = $this->getInput(array('format', 'isopen'));
$bo = new PwConfigSet('rewrite');
foreach ($format as $k => $v) {
if (empty($v) && isset($isopen[$k])) {
$this->showError('REWRITE:format.empty');
}
$bo->set("format.{$k}", $v);
}
$addons = Wekit::load('domain.srv.PwDomainService')->getRewriteAddOns();
$rewriteData = array();
$unique = array();
foreach ($addons as $k1 => $v1) {
$open = isset($isopen[$k1]) ? 1 : 0;
$bo->set("isopen.{$k1}", $open);
if ($open) {
$format_i = preg_replace('/\\{\\w+\\}/', '', $format[$k1]);
if (in_array($format_i, $unique)) {
$this->showError(array('REWRITE:format.conflict', array($format[$k1])));
}
$unique[] = $format_i;
if ($k1 == 'thread') {
$rewriteData['cate'] = array('format' => $format[$k1], 'pattern' => $this->_compileFormat($format[$k1]), 'route' => 'bbs/cate/run');
}
$rewriteData[$k1] = array('format' => $format[$k1], 'pattern' => $this->_compileFormat($format[$k1]), 'route' => $v1[2]);
}
}
$bo->flush();
Wekit::C()->setConfig('site', 'rewrite', $rewriteData);
Wekit::load('domain.srv.PwDomainService')->refreshTplCache();
Wekit::load('SRV:nav.srv.PwNavService')->updateConfig();
$this->showMessage('success');
}
开发者ID:chendong0444,项目名称:phpwind,代码行数:37,代码来源:RewriteController.php
示例3: updateConfig
public function updateConfig()
{
$config = new PwConfigSet('nav');
$navBo = Wekit::load('SRV:nav.bo.PwNavBo');
$navTypes = $this->getNavType();
$ds = $this->_getNavDs();
foreach ($navTypes as $type => $name) {
$_list = array();
$list = $ds->getNavByType($type);
foreach ($list as $key => $value) {
if (!$value['name']) {
continue;
}
$_list[$key]['name'] = $navBo->bindHtml($value);
$_list[$key]['sign'] = $value['sign'];
foreach ((array) $value['child'] as $ckey => $cvalue) {
if (!$cvalue['name']) {
continue;
}
$_list[$key]['child'][$ckey]['name'] = $navBo->bindHtml($cvalue);
$_list[$key]['child'][$ckey]['sign'] = $cvalue['sign'];
}
}
$config->set($type, $_list)->flush();
}
return true;
}
开发者ID:chendong0444,项目名称:phpwind,代码行数:27,代码来源:PwNavService.php
示例4: dosetAction
/**
* 全局配置增加表单处理器
*
* @return void
*/
public function dosetAction()
{
$config = new PwConfigSet('verify');
$verify = $this->getInput('showverify', 'post');
$config->set('showverify', $verify ? $verify : array())->flush();
$this->showMessage('ADMIN:success');
}
开发者ID:fanqimeng,项目名称:4tweb,代码行数:12,代码来源:VerifyController.php
示例5: dorunAction
public function dorunAction()
{
$windid = $this->getInput('windid', 'post');
/*$array = array(
'serverUrl', 'clientId','clientKey','clientDb','clientCharser'
);
$client = $this->getInput($array, 'post');
$client = array_combine($array, $client);
if ($windid == 'client' && (!$client['serverUrl'] || !$client['clientId'])) $this->showError('ADMIN:fail');
$array = array(
'dbhost', 'dbuser','dbpwd','dbname','dbprefix','engine'
);
$mysql = $this->getInput($array, 'post');
$mysql = array_combine($array, $mysql);
list($mysql['dbhost'], $mysql['dbport']) = explode(':', $mysql['dbhost']);
$mysql['dbport'] = !empty($mysql['dbport']) ? intval($mysql['dbport']) : 3306;
if (!empty($mysql['engine'])) {
$mysql['engine'] = strtoupper($mysql['engine']);
!in_array($mysql['engine'], array('MyISAM', 'InnoDB')) && $mysql['engine'] = 'MyISAM';
} else {
$mysql['engine'] = 'MyISAM';
}*/
$config = new PwConfigSet('site');
$config->set('windid', $windid)->flush();
//$this->_getWindid()->setConfig('windid', 'windid', $windid);
/*$charset = Wind::getApp()->getResponse()->getCharset();
$charset = str_replace('-', '', strtolower($charset));
if (!in_array($charset, array('gbk', 'utf8', 'big5'))) $charset = 'utf8';
$clientCharser = $client['clientCharser'] ? $client['clientCharser'] : $charset;
$configfile = Wind::getRealPath('CONF:windidConfig.php', true);
if ($windid != 'client') {
$baseUrl = Wind::getApp()->getRequest()->getBaseUrl(true);
$client['clientDb'] = 'mysql';
$client['serverUrl'] = $baseUrl;
$client['clientId'] = 0;
$client['clientKey'] = '';
}
$config = array(
'windid' => $windid,
'serverUrl' => $client['serverUrl'],
'clientId' => $client['clientId'],
'clientKey' => $client['clientKey'],
'clientDb' => $client['clientDb'],
'clientCharser' => $clientCharser,
);
WindFile::savePhpData($configfile,$config);*/
/*$datafile = Wind::getRealPath('WINDID:conf.database.php', true);
$database = array(
'dsn' => 'mysql:host=' . $mysql['dbhost'] . ';dbname=' . $mysql['dbname'] . ';port=' . $mysql['dbport'],
'user' => $mysql['dbuser'],
'pwd' => $mysqll['dbpw'],
'charset' => $charset,
'tableprefix' => $mysql['dbprefix'],
//'engine' => $mysql['engine'],
);
WindFile::savePhpData($datafile,$database);*/
$this->showMessage('ADMIN:success');
}
开发者ID:fanqimeng,项目名称:4tweb,代码行数:60,代码来源:WindidController.php
示例6: addAction
public function addAction()
{
list($status, $code) = $this->getInput(array('ad_status', 'ad_code'));
$config = new PwConfigSet('native');
$config->set('ad.status', $status)->set('ad.code', $code)->flush();
$this->showMessage('ADMIN:success');
}
开发者ID:chendong0444,项目名称:phpwind,代码行数:7,代码来源:AdController.php
示例7: doftpAction
/**
* 后台设置-ftp设置
*/
public function doftpAction()
{
$this->getRequest()->isPost() || $this->showError('operate.fail');
$config = new PwConfigSet('attachment');
$config->set('ftp.url', $this->getInput('ftpUrl', 'post'))->set('ftp.server', $this->getInput('ftpServer', 'post'))->set('ftp.port', $this->getInput('ftpPort', 'post'))->set('ftp.dir', $this->getInput('ftpDir', 'post'))->set('ftp.user', $this->getInput('ftpUser', 'post'))->set('ftp.pwd', $this->getInput('ftpPwd', 'post'))->set('ftp.timeout', abs(intval($this->getInput('ftpTimeout', 'post'))))->flush();
$this->showMessage('ADMIN:success');
}
开发者ID:chendong0444,项目名称:phpwind,代码行数:10,代码来源:StorageController.php
示例8: addAction
public function addAction()
{
$status = $this->getInput('startup_status');
//
$config = new PwConfigSet('native');
if (count($_FILES)) {
Wind::import('SRV:upload.action.PwStartUpUpload');
Wind::import('LIB:upload.PwUpload');
$bhv = new PwStartUpUpload();
$bhv->filename = 'startup';
//
$upload = new PwUpload($bhv);
if ($upload->check() === true) {
$result = $upload->execute();
}
if ($result !== true) {
$this->showError($result->getError());
}
if (!($data = $bhv->getAttachInfo())) {
$this->showError('upload.fail');
}
//
$filepath = $upload->getStore()->getAbsolutePath($data['filename'], $data['path']);
$filecontent = file_get_contents($filepath);
//
$config->set('startup.imgmd5', md5($filecontent));
$config->set('startup.img', $data['path'] . $data['filename']);
}
$config->set('startup.status', $status)->flush();
$this->showMessage('ADMIN:success');
}
开发者ID:chendong0444,项目名称:phpwind,代码行数:31,代码来源:StartUpController.php
示例9: doRunAction
public function doRunAction()
{
list($type, $money, $isopen, $groups) = $this->getInput(array('moneytype', 'money', 'isopen', 'groups'), 'post');
$bo = new PwConfigSet('site');
$bo->set('app.signature.moneytype', $type)->set('app.signature.money', intval($money))->set('app.signature.isopen', $isopen)->set('app.signature.groups', $groups ? ',' . implode(',', $groups) . ',' : '')->flush();
$this->showMessage('success');
}
开发者ID:sanzhumu,项目名称:nextwind,代码行数:7,代码来源:ManageController.php
示例10: dorunAction
public function dorunAction()
{
list($ifopen, $reason, $alipay, $alipaypartnerID, $alipaykey, $alipayinterface, $tenpay, $tenpaykey, $paypal, $paypalkey, $_99bill, $_99billkey) = $this->getInput(array('ifopen', 'reason', 'alipay', 'alipaypartnerID', 'alipaykey', 'alipayinterface', 'tenpay', 'tenpaykey', 'paypal', 'paypalkey', '99bill', '99billkey'));
$config = new PwConfigSet('pay');
$config->set('ifopen', $ifopen)->set('reason', $reason)->set('alipay', $alipay)->set('alipaypartnerID', $alipaypartnerID)->set('alipaykey', $alipaykey)->set('alipayinterface', $alipayinterface)->set('tenpay', $tenpay)->set('tenpaykey', $tenpaykey)->set('paypal', $paypal)->set('paypalkey', $paypalkey)->set('99bill', $_99bill)->set('99billkey', $_99billkey)->flush();
$this->showMessage('success');
}
开发者ID:fanqimeng,项目名称:4tweb,代码行数:7,代码来源:PayController.php
示例11: dorunAction
/**
* 设置论坛设置
*/
public function dorunAction()
{
list($bbsname, $title_length_max, $content_length_min, $content_length_max, $check) = $this->getInput(array('bbsname', 'title_length_max', 'content_length_min', 'content_length_max', 'check'));
$config = new PwConfigSet('bbs');
$config->set('bbsname', $bbsname)->set('title.length.max', abs(intval($title_length_max)))->set('content.length.min', abs(intval($content_length_min)))->set('content.length.max', abs(intval($content_length_max)))->set('post.check.open', intval($check));
/*
list($start_hour, $start_min, $end_hour, $end_min) = $this->getInput(array('start_hour', 'start_min', 'end_hour', 'end_min'), 'post');
$start_hour = intval($start_hour);
$start_min = intval($start_min);
$end_hour = intval($end_hour);
$end_min = intval($end_min);
$config->set('post.timing.start_hour', max(0, min(24, $start_hour)))
->set('post.timing.start_min', max(0, min(60, $start_min)))
->set('post.timing.end_hour', max(0, min(24, $end_hour)))
->set('post.timing.end_min', max(0, min(60, $end_min)))
->set('post.timing.groups', $this->getInput('timing_groups', 'post'));
*/
list($check_start_hour, $check_start_min, $check_end_hour, $check_end_min) = $this->getInput(array('check_start_hour', 'check_start_min', 'check_end_hour', 'check_end_min'), 'post');
$check_start_hour = intval($check_start_hour);
$check_start_min = intval($check_start_min);
$check_end_hour = intval($check_end_hour);
$check_end_min = intval($check_end_min);
$config->set('post.check.start_hour', max(0, min(24, $check_start_hour)))->set('post.check.start_min', max(0, min(24, $check_start_min)))->set('post.check.end_hour', max(0, min(24, $check_end_hour)))->set('post.check.end_min', max(0, min(24, $check_end_min)))->set('post.check.groups', $this->getInput('check_groups', 'post'));
$config->flush();
$this->showMessage('config.setting.success');
}
开发者ID:fanqimeng,项目名称:4tweb,代码行数:29,代码来源:ConfigbbsController.php
示例12: doRunAction
/**
* 保存搜索设置
*
*/
public function doRunAction()
{
$conf = $this->getInput('conf', 'post');
$config = new PwConfigSet('site');
$config->set('search.isopen', $conf['isopen'])->flush();
$this->showMessage('success');
}
开发者ID:sanzhumu,项目名称:nextwind,代码行数:11,代码来源:ManageController.php
示例13: dorunAction
/**
* 后台设置-编辑器设置
*/
public function dorunAction()
{
list($style, $contentDuplicate, $cvtimes, $imgOpen, $imgWidth, $imgHeight, $sizeMax, $flashOpen, $mediaOpen, $iframeOpen) = $this->getInput(array('style', 'content_duplicate', 'cvtimes', 'img_open', 'img_width', 'img_height', 'size_max', 'flash_open', 'media_open', 'iframe_open'), 'post');
$config = new PwConfigSet('bbs');
$config->set('editor.style', $style ? 1 : 0)->set('content.duplicate', $contentDuplicate ? 1 : 0)->set('ubb.cvtimes', abs(intval($cvtimes)))->set('ubb.img.open', $imgOpen ? 1 : 0)->set('ubb.img.width', abs(intval($imgWidth)))->set('ubb.img.height', abs(intval($imgHeight)))->set('ubb.size.max', abs(intval($sizeMax)))->set('ubb.flash.open', $flashOpen ? 1 : 0)->set('ubb.media.open', $mediaOpen ? 1 : 0)->set('ubb.iframe.open', $iframeOpen ? 1 : 0)->flush();
$this->showMessage('ADMIN:success');
}
开发者ID:fanqimeng,项目名称:4tweb,代码行数:10,代码来源:EditorController.php
示例14: doRunAction
/**
* 保存设置
*
*/
public function doRunAction()
{
$conf = $this->getInput('conf', 'post');
$config = new PwConfigSet('app_mark');
$config->set('mark.isopen', $conf['isopen'])->set('mark.mark_reasons', $conf['mark_reasons'])->flush();
$this->showMessage('success');
}
开发者ID:sanzhumu,项目名称:nextwind,代码行数:11,代码来源:ManageController.php
示例15: setReplyRewardCreditType
/**
* 设置回帖奖励可用积分类型
*/
public function setReplyRewardCreditType($type)
{
if (!is_array($type)) {
return false;
}
$config = new PwConfigSet('credit');
$config->set($this->creditTypeKey, $type)->flush();
}
开发者ID:sanzhumu,项目名称:nextwind,代码行数:11,代码来源:App_ReplyReward_ReplyRewardConfigService.php
示例16: install
/**
* 注册主导航
*/
public function install($install)
{
$emailTitle = '来自{sitename}的认证邮件';
$emailContent = '尊敬的{username},这是来自{sitename}认证邮件。 <br/>请点击下面的链接进行认证:<br/> {url} <br/>如果不能点击链接,请复制到浏览器地址输入框访问。 <br/> <br/> {sitename} <br/> {time}';
$config = new PwConfigSet('app_verify');
$config->set('verify.email.title', $emailTitle)->set('verify.email.content', $emailContent)->flush();
return true;
}
开发者ID:sanzhumu,项目名称:nextwind,代码行数:11,代码来源:App_Verify_Uninstall.php
示例17: dorunAction
public function dorunAction()
{
list($doubankey, $omdbkey) = $this->getInput(array('doubankey', 'omdbkey'), 'post');
$config = new PwConfigSet('site');
$config->set('app.dimdb.doubankey', $doubankey)->set('app.dimdb.omdbkey', $omdbkey);
$config->flush();
$this->showMessage('ADMIN:success');
}
开发者ID:labs7in0,项目名称:WindDB,代码行数:8,代码来源:ManageController.php
示例18: dorunAction
/**
* 后台设置-email设置
*/
public function dorunAction()
{
$password = $this->getInput('mailPassword', 'post');
$config = $this->_getConfig();
$t = Pw::strlen($config['mail.password']);
$passwordO = Pw::substrs($config['mail.password'], 1, 0, false) . '********' . Pw::substrs($config['mail.password'], 1, $t - 1, false);
$password = $password == $passwordO ? $config['mail.password'] : $password;
$config = new PwConfigSet('email');
$config->set('mailOpen', $this->getInput('mailOpen', 'post'))->set('mailMethod', 'smtp')->set('mail.host', $this->getInput('mailHost', 'post'))->set('mail.port', $this->getInput('mailPort', 'post'))->set('mail.from', $this->getInput('mailFrom', 'post'))->set('mail.auth', $this->getInput('mailAuth', 'post'))->set('mail.user', $this->getInput('mailUser', 'post'))->set('mail.password', $password)->flush();
$this->showMessage('ADMIN:success');
}
开发者ID:fanqimeng,项目名称:4tweb,代码行数:14,代码来源:EmailController.php
示例19: set
/**
* 增加一个门户页面类型
* Enter description here ...
* @param string $m
* @param string $c
* @param string $a
* @param string $name
* @param string $unique 页面唯一标识,如果不需要单独设置,请留空
*/
public function set($m, $c, $a, $name = '', $unique = '')
{
if (!$name || !$unique) {
return false;
}
$router = Wekit::C('site', 'design.router');
$router[$m . '/' . $c . '/' . $a] = array($name, $unique);
$config = new PwConfigSet('site');
$config->set('design.router', $router)->flush();
return true;
}
开发者ID:YoursBoss,项目名称:nextwind,代码行数:20,代码来源:PwDesignRouter.php
示例20: _setConfigBo
/**
* 设置全局TPL配置
*
* @param array $style
* @return boolean
*/
private function _setConfigBo($style)
{
$configBo = new PwConfigSet('site');
$config = Wekit::load('APPCENTER:service.srv.PwInstallApplication')->getConfig('style-type');
foreach ($config as $k => $v) {
$configBo->set("theme.{$k}.pack", $v[1]);
}
$configBo->set("theme.{$style['style_type']}.default", $style['alias']);
$configBo->flush();
return true;
}
开发者ID:chendong0444,项目名称:phpwind,代码行数:17,代码来源:PwStyleService.php
注:本文中的PwConfigSet类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论