當前位置: 首頁>>代碼示例>>PHP>>正文


PHP option::add方法代碼示例

本文整理匯總了PHP中option::add方法的典型用法代碼示例。如果您正苦於以下問題:PHP option::add方法的具體用法?PHP option::add怎麽用?PHP option::add使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在option的用法示例。


在下文中一共展示了option::add方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: callback_init

function callback_init()
{
    global $m;
    $codedata = '<div class="alert alert-danger" role="alert"><b>錯誤:</b>未設置多說代碼!<a href="index.php?mod=admin:setplug&plug=weirdoga_dscomment">去設置</a></div>';
    $titledata = '留言板';
    option::add('weirdoga_dscomment_code', $codedata);
    option::add('weirdoga_dscomment_title', $titledata);
}
開發者ID:chajianku,項目名稱:weirdoga_dscomment,代碼行數:8,代碼來源:weirdoga_dscomment_callback.php

示例2: callback_init

function callback_init()
{
    option::add('wmzz_mailer_title');
    option::add('wmzz_mailer_text');
    option::set('wmzz_mailer_limit', '5');
    option::set('wmzz_mailer_last', '0');
    cron::set('wmzz_mailer', 'plugins/wmzz_mailer/wmzz_mailer_cron.php', 0, 0, 0);
}
開發者ID:noinlijin,項目名稱:tiebaSign,代碼行數:8,代碼來源:wmzz_mailer_callback.php

示例3: callback_init

function callback_init()
{
    global $m;
    $m->query("CREATE TABLE IF NOT EXISTS `" . DB_PREFIX . "weixinArticle` (\r\n`id`  int(255) NOT NULL AUTO_INCREMENT ,\r\n`uid`  int(255) NOT NULL ,\r\n`cont`  text CHARACTER SET utf8 COLLATE utf8_general_ci NULL ,\r\n`num`  int(255) NULL DEFAULT NULL ,\r\n`lastdo`  date NOT NULL DEFAULT '0000-00-00' ,\r\nPRIMARY KEY (`id`, `uid`),\r\nUNIQUE INDEX `uid` (`uid`) USING BTREE \r\n)\r\nENGINE=MyISAM\r\nDEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci\r\nCHECKSUM=0\r\nROW_FORMAT=DYNAMIC\r\nDELAY_KEY_WRITE=0\r\n;");
    $m->query("CREATE TABLE IF NOT EXISTS `" . DB_PREFIX . "weixinArticle_data` (\r\n`id`  int(255) NOT NULL AUTO_INCREMENT ,\r\n`uid`  int(255) NOT NULL DEFAULT 0 ,\r\n`pid`  int(255) NOT NULL DEFAULT 0 ,\r\n`url`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,\r\n`status`  int(10) NOT NULL DEFAULT 0 ,\r\n`msg`  varchar(400) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,\r\n`remain`  int(255) NOT NULL DEFAULT 0 ,\r\nPRIMARY KEY (`id`)\r\n)\r\nENGINE=MyISAM\r\nDEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci\r\nCHECKSUM=0\r\nROW_FORMAT=DYNAMIC\r\nDELAY_KEY_WRITE=0\r\n;");
    cron::set('weixinArticle', 'plugins/weixinArticle/weixinArticle_cron.php', 0, 0, 0);
    option::add('plugin_weixinArticle', 'a:7:{s:5:"sleep";s:1:"0";s:4:"lmax";s:1:"0";s:4:"cmax";s:1:"0";s:3:"max";s:1:"0";s:3:"rem";s:1:"5";s:7:"defcont";s:72:"歡迎使用 StusGame 貼吧雲灌水
這是一個默認的灌水內容";s:6:"device";s:1:"4";}');
}
開發者ID:noinlijin,項目名稱:tiebaSign,代碼行數:9,代碼來源:weixinArticle_callback.php

示例4: callback_init

function callback_init()
{
    global $m;
    $data = '<br/><div class="alert alert-info alert-dismissable" style="width:60%;">
  <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
  {$anno}
</div>';
    option::add('wmzz_anno_set');
    option::add('wmzz_anno_tpl', $data);
    option::add('wmzz_anno_doa', 'a:0:{}');
}
開發者ID:chajianku,項目名稱:wmzz_anno,代碼行數:11,代碼來源:wmzz_anno_callback.php

示例5: callback_init

function callback_init()
{
    option::add('wmzz_ds_code');
}
開發者ID:chajianku,項目名稱:wmzz_ds,代碼行數:4,代碼來源:wmzz_ds_callback.php

示例6: define

define('SYSTEM_NO_CHECK_VER', true);
define('SYSTEM_NO_CHECK_LOGIN', true);
define('SYSTEM_NO_PLUGIN', true);
include '../init.php';
global $m, $i;
$cv = option::get('core_version');
if (!empty($cv) && $cv >= '4.0') {
    msg('您的雲簽到已升級到 V4.0 版本,請勿重複更新<br/><br/>請立即刪除 /setup/update3.9to4.0.php');
}
//------------------------------------------------//
option::add('toolpw', '');
option::add('sign_scan', '1');
option::add('system_keywords', '貼吧雲簽到');
option::add('system_description', '貼吧雲簽到');
option::add('bbs_us', '');
option::add('bbs_pw', '');
$i['tabpart'][] = 'tieba';
foreach ($i['tabpart'] as $value) {
    $m->query('ALTER TABLE `' . DB_PREFIX . $value . '`
MODIFY COLUMN `id`  int(30) UNSIGNED NOT NULL AUTO_INCREMENT FIRST ,
MODIFY COLUMN `uid`  int(30) UNSIGNED NOT NULL AFTER `id`,
MODIFY COLUMN `pid`  int(30) UNSIGNED NOT NULL DEFAULT 0 AFTER `uid`,
MODIFY COLUMN `fid`  int(30) UNSIGNED NOT NULL DEFAULT 0 AFTER `pid`;
', true);
    $m->query('ALTER TABLE `' . DB_PREFIX . $value . '`
DROP COLUMN `lastdo`,
ADD COLUMN `latest`  tinyint(2) UNSIGNED NOT NULL DEFAULT 0 AFTER `status`;
', true);
    $m->query('ALTER TABLE `' . DB_PREFIX . $value . '`
MODIFY COLUMN `status`  tinyint(2) UNSIGNED NOT NULL DEFAULT 0 AFTER `no`;
', true);
開發者ID:pixode,項目名稱:Tieba-Cloud-Sign,代碼行數:31,代碼來源:update3.9to4.0.php

示例7: define

<?php

define('SYSTEM_NO_ERROR', true);
define('SYSTEM_NO_CHECK_VER', true);
define('SYSTEM_NO_CHECK_LOGIN', true);
define('SYSTEM_NO_PLUGIN', true);
include '../init.php';
global $m, $i;
$cv = option::get('core_version');
if (!empty($cv) && $cv >= '4.5') {
    msg('您的雲簽到已升級到 V4.5 版本,請勿重複更新<br/><br/>請立即刪除 /setup/update4.4to4.5.php');
}
$i['tabpart'][] = 'tieba';
foreach ($i['tabpart'] as $value) {
    $m->query('ALTER TABLE `' . DB_PREFIX . $value . '` MODIFY COLUMN `status` mediumint(8) UNSIGNED NOT NULL DEFAULT 0 AFTER `no`;');
}
option::add('csrf', '0');
option::set('core_version', '4.5');
unlink(__FILE__);
msg('您的雲簽到已成功升級到 V4.5 版本,請立即刪除 /setup/update4.4to4.5.php,謝謝', SYSTEM_URL);
開發者ID:quericy,項目名稱:Tieba-Cloud-Sign,代碼行數:20,代碼來源:update4.4to4.5.php

示例8: callback_init

function callback_init()
{
    option::add('plugin_wmzz_recaptcha', 'a:2:{s:2:"ak";s:0:"";s:2:"sk";s:0:"";}');
}
開發者ID:chajianku,項目名稱:wmzz_recaptcha,代碼行數:4,代碼來源:wmzz_recaptcha_callback.php

示例9: define

define('SYSTEM_NO_CHECK_VER', true);
define('SYSTEM_ONLY_CHECK_LOGIN', true);
define('SYSTEM_NO_PLUGIN', true);
require '../init.php';
global $m;
error_reporting(0);
if (ROLE == 'admin') {
    $cv = option::get('core_version');
    if (!empty($cv) && $cv >= '3.8') {
        msg('您的雲簽到已升級到 V3.8 版本,請勿重複更新<br/><br/>請立即刪除 /setup/update3.45to3.48.php');
    }
    option::add('core_version', '3.8');
    option::add('isapp', '0');
    option::add('cron_asyn', '0');
    option::add('mail_ssl', '0');
    option::add('baidu_name', '1');
    option::set('sign_sleep', option::get('sign_sleep') * 1000);
    $m->query("CREATE TABLE IF NOT EXISTS `" . DB_PREFIX . "plugins` (\r\n`id`  int(10) NOT NULL AUTO_INCREMENT ,\r\n`name`  varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,\r\n`status`  tinyint(1) NOT NULL DEFAULT 0 ,\r\n`options`  text CHARACTER SET utf8 COLLATE utf8_general_ci NULL ,\r\nPRIMARY KEY (`id`),\r\nUNIQUE INDEX `name` (`name`) USING BTREE \r\n)\r\nENGINE=MyISAM\r\nDEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci\r\nCHECKSUM=0\r\nROW_FORMAT=DYNAMIC\r\nDELAY_KEY_WRITE=0\r\n;");
    $plugins = unserialize(option::get('actived_plugins'));
    foreach ($plugins as $plug) {
        if (isset($i['opt']['plugin_' . $plug])) {
            $set = $i['opt']['plugin_' . $plug];
        } else {
            $set = '';
        }
        $m->query("INSERT IGNORE INTO `" . DB_NAME . "`.`" . DB_PREFIX . "plugins` (`name`,`status`,`options`) VALUES ('{$plug}','1','{$set}');");
    }
    $m->query("ALTER TABLE `" . DB_PREFIX . "cron` ADD COLUMN `desc` text NULL AFTER `no`;");
    $m->query("ALTER TABLE `" . DB_PREFIX . "cron` DROP COLUMN `status`;", true);
    cron::aset('system_sign', array('desc' => '每天對所有貼吧進行簽到' . "\n" . '忽略或卸載此任務會導致停止簽到'));
    cron::add('system_sign_retry', array('orde' => '1', 'file' => 'lib/cron_system_sign_retry.php', 'no' => '0', 'desc' => '對所有簽到失敗的貼吧進行複簽' . "\n" . '忽略或卸載此任務會導致停止複簽', 'freq' => '0'));
開發者ID:pixode,項目名稱:Tieba-Cloud-Sign,代碼行數:31,代碼來源:update3.45to3.8.php

示例10: callback_init

function callback_init()
{
    option::add(salt, getRandStr(10));
}
開發者ID:chajianku,項目名稱:reg_supervise,代碼行數:4,代碼來源:reg_supervise_callback.php


注:本文中的option::add方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。