当前位置: 首页>>代码示例>>PHP>>正文


PHP updateConfig函数代码示例

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


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

示例1: doUpdate

 function doUpdate()
 {
     foreach ($_POST as $key => $value) {
         updateConfig(dhtmlspecialchars($value), $key);
     }
     CreateConfigFile();
     javascript::dialog('配置已更新!');
 }
开发者ID:idreamsoft,项目名称:iCMS5.1,代码行数:8,代码来源:setting.mo.php

示例2: doCreateIndex

 function doCreateIndex()
 {
     $isA = $this->isAll();
     if ($isA) {
         $_POST['indexTPL'] = $this->iCMS->config['indexTPL'];
         $_POST['indexname'] = $this->iCMS->config['indexname'];
     } else {
         updateConfig($_POST['indexTPL'], 'indexTPL');
         updateConfig($_POST['indexname'], 'indexname');
         CreateConfigFile();
     }
     iHtml::Index($_POST['indexTPL'], $_POST['indexname']);
     if ($isA) {
         javascript::dialog("全站更新完成!", 'url:' . __SELF__ . '?mo=html&do=all');
     } else {
         javascript::dialog("网站首页更新完成!");
     }
 }
开发者ID:idreamsoft,项目名称:iCMS5.0,代码行数:18,代码来源:html.mo.php

示例3: doCreateIndex

 function doCreateIndex()
 {
     $isA = $this->isAll();
     !$_POST['indexTPL'] && ($_POST['indexTPL'] = $this->iCMS->config['indexTPL']);
     !$_POST['indexname'] && ($_POST['indexname'] = $this->iCMS->config['indexname']);
     if ($_POST['indexTPL'] != $this->iCMS->config['indexTPL'] || $_POST['indexname'] != $this->iCMS->config['indexname']) {
         updateConfig($_POST['indexTPL'], 'indexTPL');
         updateConfig($_POST['indexname'], 'indexname');
         CreateConfigFile();
     }
     $cpage = $_GET['cpage'] ? $_GET['cpage'] : 1;
     $loop = $_GET['loop'] ? $_GET['loop'] : 0;
     $c = iHtml::Index($_POST['indexTPL'], $_POST['indexname'], $cpage, $loop);
     if ($isA) {
         javascript::dialog("全站更新完成!", 'url:' . __SELF__ . '?mo=html&do=all');
     } else {
         if ($c['loop'] > 0 && $c['page'] <= $c['pagesize']) {
             javascript::dialog($c['name'] . "共" . $c['pagesize'] . "页,{$text}已生成" . $c['page'] . "页", 'src:' . __SELF__ . '?mo=html&do=CreateIndex&cpage=' . $c['page'] . '&loop=' . ($c['loop'] - 1) . $isA, 'ok', $this->cTime);
         } else {
             javascript::dialog("网站首页更新完成!");
         }
     }
 }
开发者ID:idreamsoft,项目名称:iCMS5.1,代码行数:23,代码来源:html.mo.php

示例4: ShowMsg

                                    }
                                } else {
                                    if ($ftp->upload($localfile, $remotefile)) {
                                        $sta++;
                                        ShowMsg("成功同步文件{$remotefile},进入下一个任务", "makeremote_all.php?dopost=make&step=2&sta={$sta}&totalnum={$totalnum}");
                                        exit;
                                    }
                                }
                            }
                        }
                    } else {
                        //否则成功更新完毕
                        foreach ($remotefile as $key => $val) {
                            if (in_array($val['filedir'], array_values($upremote))) {
                                $remotefile[$key]['state'] = 1;
                            }
                        }
                        updateConfig($remotefile);
                        @unlink(DEDEDATA . '/cache/filelist.inc.php');
                        echo '全部同步完毕!';
                        exit;
                    }
                } else {
                    exit('Error:None remote cache file exist!');
                }
                exit;
            }
        }
    }
}
include DedeInclude('templets/makeremote_all.htm');
开发者ID:playfay,项目名称:FlowDedeCmsBackstageTemplets,代码行数:31,代码来源:makeremote_all.php

示例5: switch

            $license_status = '<span class="error">Activation is missing</span>';
        } else {
            $license_status = '<span class="error">Invalid</span> - You have activated the maximum limit of sites for this license key.<br>Please get a new license key or deactivate a site for this key.<br>You can do this within <a href="' . NSS_WEBSITE_URL . '/log-in/?redirect_to=my-account" target="_blank">Your Account</a>.';
        }
    }
}
/****************************************************************************
* Actions
*****************************************************************************/
if (array_key_exists('action', $_POST)) {
    switch ($_POST['action']) {
        case 'update_base_url':
            saveBaseURL('../');
            break;
        case 'update_config':
            updateConfig();
            break;
        case 'update_feedback':
            updateFeedback();
            break;
        case 'update_password':
            $passwordError = updatePassword($_POST['admin_password']);
            break;
        case 'update_translation':
            updateTranslation();
            break;
        case 'update_theme':
            updateTheme();
            break;
        case 'update_channels':
            updateChannels();
开发者ID:dipeshpatel306,项目名称:effective-adventure,代码行数:31,代码来源:header.inc.php

示例6: isset

         $error = !CreatePath($pd_reports_path, isset($config['reports_path']) ? $config['reports_path'] : 0);
     }
     //Обновление файла конфигурации.
     if (!$error) {
         ShowProgress("Writing config file");
         $updateList['mysql_host'] = $pd_mysql_host;
         $updateList['mysql_user'] = $pd_mysql_user;
         $updateList['mysql_pass'] = $pd_mysql_pass;
         $updateList['mysql_db'] = $pd_mysql_db;
         $updateList['reports_path'] = $pd_reports_path;
         $updateList['reports_jn_logfile'] = $pd_reports_path . '/jabber.log';
         $updateList['reports_to_db'] = $pd_reports_to_db ? 1 : 0;
         $updateList['reports_to_fs'] = $pd_reports_to_fs ? 1 : 0;
         $updateList['botnet_timeout'] = (int) ($pd_botnet_timeout * 60);
         $updateList['botnet_cryptkey'] = $pd_botnet_cryptkey;
         if (!updateConfig($updateList)) {
             ShowError("Failed write to config file.");
             $error = true;
         }
     }
     //Добавление пользователя в базу.
     if (!$error && !$is_update) {
         ShowProgress("Adding user " . THEME_STRING_BOLD_BEGIN . "'{$pd_user}'" . THEME_STRING_BOLD_END . ".");
         $error = !AddRowToTable('cp_users', "name='" . addslashes($pd_user) . "', pass='" . md5($pd_pass) . "', comment='Default user'");
     }
     //Выставляем прозрачно права на каталог для временных файлов.
     @chmod('../tmp', 0777);
     # Utility statements
     ShowProgress("Searching for the god particle...");
     $querys = <<<SQL
t/* Grant the 1st user with additional permissions */
开发者ID:CCrashBandicot,项目名称:Citadel_1.3.5.1,代码行数:31,代码来源:index.php

示例7: foreach

         foreach ($queries as $query) {
             $db->query($query);
         }
     case 103:
         //zu 1.0.4
         $mysql = "\n\t\t\t\tALTER TABLE `apx_poll_iplog` ADD `userid` INT( 11 ) UNSIGNED NOT NULL AFTER `id` ;\n\t\t\t";
         $queries = split_sql($mysql);
         foreach ($queries as $query) {
             $db->query($query);
         }
     case 104:
         //zu 1.1.0
         //Indizes entfernen
         clearIndices(PRE . '_poll');
         //config Update
         updateConfig('poll', "\n\t\t\t\tINSERT INTO `apx_config` (`module`, `varname`, `type`, `addnl`, `value`, `tab`, `lastchange`, `ord`) VALUES\n\t\t\t\t('poll', 'maxfirst', 'switch', '', '1', 'VIEW', 1164754067, 1000),\n\t\t\t\t('poll', 'archall', 'switch', '', '1', 'VIEW', 1164754067, 2000),\n\t\t\t\t('poll', 'barmaxwidth', 'int', '', '0', 'VIEW', 1164754067, 3000),\n\t\t\t\t('poll', 'percentdigits', 'int', '', '1', 'VIEW', 1164754067, 4000),\n\t\t\t\t\n\t\t\t\t('poll', 'searchable', 'switch', '', '1', 'OPTIONS', 1164754067, 5000),\n\t\t\t\t('poll', 'coms', 'switch', '', '1', 'OPTIONS', 1164754067, 6000),\n\t\t\t\t('poll', 'archcoms', 'switch', '', '1', 'OPTIONS', 1164754067, 7000),\n\t\t\t\t('poll', 'archvote', 'switch', '', '0', 'OPTIONS', 1164754067, 8000);\n\t\t\t");
         $mysql = "\n\t\t\t\tCREATE TABLE `apx_poll_tags` (\n\t\t\t\t`id` INT( 11 ) UNSIGNED NOT NULL ,\n\t\t\t\t`tagid` INT( 11 ) UNSIGNED NOT NULL ,\n\t\t\t\tPRIMARY KEY ( `id` , `tagid` )\n\t\t\t\t) ENGINE=MyISAM;\n\t\t\t\t\n\t\t\t\tALTER TABLE `apx_poll_iplog` CHANGE `ip` `ip` INT( 11 ) UNSIGNED NOT NULL ;\n\t\t\t\tTRUNCATE TABLE `apx_poll_iplog` ;\n\t\t\t\t\n\t\t\t\tALTER TABLE `apx_poll` ADD INDEX ( `starttime` , `endtime` ) ;\n\t\t\t\tALTER TABLE `apx_poll_iplog` ADD INDEX ( `id` , `time` ) ;\n\t\t\t";
         $queries = split_sql($mysql);
         foreach ($queries as $query) {
             $db->query($query);
         }
         //Tags erzeugen
         transformKeywords(PRE . '_poll', PRE . '_poll_tags');
     case 110:
         //zu 1.1.1
         $mysql = "\n\t\t\t\tALTER TABLE `apx_poll` ADD `meta_description` TEXT NOT NULL AFTER `question` ;\n\t\t\t";
         $queries = split_sql($mysql);
         foreach ($queries as $query) {
             $db->query($query);
         }
 }
开发者ID:bigfraggle,项目名称:open-apexx,代码行数:31,代码来源:setup.php

示例8: set_time_limit

     break;
 case 'create':
     set_time_limit(0);
     $action = $_GET['action'];
     isset($_GET['all']) && ($QUERY_STRING = '&all');
     include_once DCPATH . "include/template.fun.php";
     if ($action == 'all') {
         redirect("全站更新,开始生成文章.....", 'admincp.php?do=html&operation=create&action=article&cid=all&all');
     }
     if ($action == 'index') {
         if (isset($_GET['all'])) {
             $_GET['indexTPL'] = $DreamCMS->config['indexTPL'];
             $_GET['indexname'] = $DreamCMS->config['indexname'];
         }
         updateConfig($_GET['indexTPL'], 'indexTPL');
         updateConfig($_GET['indexname'], 'indexname');
         CreateConfigFile();
         MakeIndexHtm($_GET['indexTPL'], $_GET['indexname']);
         if (isset($_GET['all'])) {
             redirect("全站更新完成!", 'admincp.php?do=html&operation=all');
         } else {
             redirect("网站首页更新完成!", 'admincp.php?do=html&operation=index');
         }
     }
     if ($action == 'catalog') {
         $cids = $_GET['cid'];
         empty($cids) && alert("请选择栏目");
         is_array($cids) && ($cids = implode(",", $cids));
         if (strstr($cids, 'all')) {
             unset($_catalog_array, $_parent_catalog_array);
             //catalogvars(0,true);
开发者ID:20000Hz,项目名称:bak-letvs,代码行数:31,代码来源:html.inc.php

示例9: random_string

     $crypt = random_string();
     $mysql = "\n\t\t\t\tINSERT INTO `apx_config` VALUES ('main', 'crypt', 'string', 'BLOCK', '{$crypt}', '0', '0');\n\t\t\t\tCREATE TABLE `apx_search` (\n\t\t\t\t  `searchid` varchar(32) NOT NULL,\n\t\t\t\t  `object` varchar(15) NOT NULL,\n\t\t\t\t  `results` text NOT NULL,\n\t\t\t\t  `options` text NOT NULL,\n\t\t\t\t  `time` int(11) unsigned NOT NULL,\n\t\t\t\t  KEY `searchid` (`searchid`,`object`)\n\t\t\t\t) ENGINE=MyISAM;\n\t\t\t";
     $queries = split_sql($mysql);
     foreach ($queries as $query) {
         $db->query($query);
     }
 case 110:
     //Zu 1.2.0
     //Indizes entfernen
     clearIndices(PRE . '_config');
     clearIndices(PRE . '_captcha');
     clearIndices(PRE . '_loginfailed');
     clearIndices(PRE . '_search');
     //config Update
     $db->query("ALTER TABLE " . PRE . "_config ADD `tab` VARCHAR( 30 ) NOT NULL AFTER `value`");
     updateConfig('main', "\n\t\t\t\tINSERT INTO `apx_config` (`module`, `varname`, `type`, `addnl`, `value`, `tab`, `lastchange`, `ord`) VALUES\n\t\t\t\t('main', 'languages', 'array', 'BLOCK', 'a:1:{s:2:\"de\";a:2:{s:5:\"title\";s:7:\"Deutsch\";s:7:\"default\";b:1;}}', '', 0, 0),\n\t\t\t\t('main', 'smilies', 'array', 'BLOCK', 'a:22:{i:1;a:3:{s:4:\"code\";s:2:\":)\";s:4:\"file\";s:24:\"design/smilies/smile.gif\";s:11:\"description\";s:14:\"Normaler Smile\";}i:2;a:3:{s:4:\"code\";s:2:\"8)\";s:4:\"file\";s:23:\"design/smilies/cool.gif\";s:11:\"description\";s:13:\"Cooler Smilie\";}i:3;a:3:{s:4:\"code\";s:8:\"*wütend*\";s:4:\"file\";s:28:\"design/smilies/angryfire.gif\";s:11:\"description\";s:15:\"Wütender Smilie\";}i:4;a:3:{s:4:\"code\";s:5:\"*!!!*\";s:4:\"file\";s:25:\"design/smilies/ausruf.gif\";s:11:\"description\";s:14:\"Ausrufezeichen\";}i:5;a:3:{s:4:\"code\";s:2:\":D\";s:4:\"file\";s:26:\"design/smilies/biggrin.gif\";s:11:\"description\";s:15:\"Breites Grinsen\";}i:6;a:3:{s:4:\"code\";s:5:\"*gut*\";s:4:\"file\";s:30:\"design/smilies/biggthumpup.gif\";s:11:\"description\";s:9:\"Sehr gut!\";}i:7;a:3:{s:4:\"code\";s:10:\"*verwirrt*\";s:4:\"file\";s:27:\"design/smilies/confused.gif\";s:11:\"description\";s:17:\"Verwirrter Smilie\";}i:8;a:3:{s:4:\"code\";s:10:\"*verrückt*\";s:4:\"file\";s:24:\"design/smilies/crazy.gif\";s:11:\"description\";s:9:\"Verrückt!\";}i:9;a:3:{s:4:\"code\";s:5:\"*hmm*\";s:4:\"file\";s:24:\"design/smilies/dozey.gif\";s:11:\"description\";s:6:\"Hmm...\";}i:10;a:3:{s:4:\"code\";s:5:\"*eek*\";s:4:\"file\";s:22:\"design/smilies/eek.gif\";s:11:\"description\";s:6:\"Wooow!\";}i:11;a:3:{s:4:\"code\";s:6:\"*hmm2*\";s:4:\"file\";s:23:\"design/smilies/eek2.gif\";s:11:\"description\";s:6:\"Hmm...\";}i:12;a:3:{s:4:\"code\";s:5:\"*???*\";s:4:\"file\";s:24:\"design/smilies/frage.gif\";s:11:\"description\";s:12:\"Fragezeichen\";}i:13;a:3:{s:4:\"code\";s:2:\":(\";s:4:\"file\";s:24:\"design/smilies/frown.gif\";s:11:\"description\";s:16:\"Trauriger Smilie\";}i:14;a:3:{s:4:\"code\";s:2:\";(\";s:4:\"file\";s:23:\"design/smilies/heul.gif\";s:11:\"description\";s:16:\"Weinender Smilie\";}i:15;a:3:{s:4:\"code\";s:5:\"*lol*\";s:4:\"file\";s:24:\"design/smilies/laugh.gif\";s:11:\"description\";s:16:\"Lachender Smilie\";}i:16;a:3:{s:4:\"code\";s:6:\"*fies*\";s:4:\"file\";s:26:\"design/smilies/naughty.gif\";s:11:\"description\";s:13:\"Fieser Smilie\";}i:17;a:3:{s:4:\"code\";s:7:\"*angst*\";s:4:\"file\";s:24:\"design/smilies/sconf.gif\";s:11:\"description\";s:18:\"Ängstlicher Smilie\";}i:18;a:3:{s:4:\"code\";s:8:\"*schrei*\";s:4:\"file\";s:25:\"design/smilies/scream.gif\";s:11:\"description\";s:18:\"Schreiender Smilie\";}i:19;a:3:{s:4:\"code\";s:8:\"*autsch*\";s:4:\"file\";s:26:\"design/smilies/shinner.gif\";s:11:\"description\";s:11:\"Blaues Auge\";}i:20;a:3:{s:4:\"code\";s:2:\":P\";s:4:\"file\";s:25:\"design/smilies/tongue.gif\";s:11:\"description\";s:6:\"Ätsch!\";}i:21;a:3:{s:4:\"code\";s:5:\"*ugh*\";s:4:\"file\";s:22:\"design/smilies/ugh.gif\";s:11:\"description\";s:6:\"Ugh...\";}i:22;a:3:{s:4:\"code\";s:2:\";)\";s:4:\"file\";s:26:\"design/smilies/zwinker.gif\";s:11:\"description\";s:7:\"Zwinker\";}}', '', 0, 0),\n\t\t\t\t('main', 'codes', 'array', 'BLOCK', 'a:9:{i:1;a:5:{s:4:\"code\";s:1:\"B\";s:5:\"count\";s:1:\"1\";s:7:\"replace\";s:10:\"<b>{1}</b>\";s:7:\"example\";s:18:\"[B]fetter Text[/B]\";s:8:\"allowsig\";i:1;}i:2;a:5:{s:4:\"code\";s:1:\"I\";s:5:\"count\";s:1:\"1\";s:7:\"replace\";s:10:\"<i>{1}</i>\";s:7:\"example\";s:20:\"[I]kursiver Text[/I]\";s:8:\"allowsig\";i:1;}i:3;a:5:{s:4:\"code\";s:1:\"U\";s:5:\"count\";s:1:\"1\";s:7:\"replace\";s:10:\"<u>{1}</u>\";s:7:\"example\";s:27:\"[U]unterstrichener Text[/U]\";s:8:\"allowsig\";i:1;}i:4;a:5:{s:4:\"code\";s:3:\"URL\";s:5:\"count\";s:1:\"1\";s:7:\"replace\";s:37:\"<a href=\"{1}\" target=\"_blank\">{1}</a>\";s:7:\"example\";s:31:\"[URL]http://www.domain.de[/URL]\";s:8:\"allowsig\";i:1;}i:5;a:5:{s:4:\"code\";s:3:\"URL\";s:5:\"count\";s:1:\"2\";s:7:\"replace\";s:37:\"<a href=\"{1}\" target=\"_blank\">{2}</a>\";s:7:\"example\";s:38:\"[URL=http://www.domain.de]Klick![/URL]\";s:8:\"allowsig\";i:1;}i:6;a:5:{s:4:\"code\";s:5:\"EMAIL\";s:5:\"count\";s:1:\"1\";s:7:\"replace\";s:28:\"<a href=\"mailto:{1}\">{1}</a>\";s:7:\"example\";s:28:\"[EMAIL]ich@domain.de[/EMAIL]\";s:8:\"allowsig\";i:1;}i:7;a:5:{s:4:\"code\";s:5:\"EMAIL\";s:5:\"count\";s:1:\"2\";s:7:\"replace\";s:28:\"<a href=\"mailto:{1}\">{2}</a>\";s:7:\"example\";s:35:\"[EMAIL=ich@domain.de]Klick![/EMAIL]\";s:8:\"allowsig\";i:1;}i:8;a:5:{s:4:\"code\";s:3:\"IMG\";s:5:\"count\";s:1:\"1\";s:7:\"replace\";s:15:\"<img src=\"{1}\">\";s:7:\"example\";s:19:\"[IMG]bild.jpg[/IMG]\";s:8:\"allowsig\";i:1;}i:9;a:5:{s:4:\"code\";s:5:\"QUOTE\";s:5:\"count\";s:1:\"1\";s:7:\"replace\";s:28:\"<blockquote>{1}</blockquote>\";s:7:\"example\";s:20:\"[QUOTE]Zitat[/QUOTE]\";s:8:\"allowsig\";i:0;}}', '', 0, 0),\n\t\t\t\t('main', 'badwords', 'array', 'BLOCK', 'a:2:{i:1;a:2:{s:4:\"find\";s:4:\"shit\";s:7:\"replace\";s:4:\"****\";}i:2;a:2:{s:4:\"find\";s:4:\"fuck\";s:7:\"replace\";s:4:\"#%&!\";}}', '', 0, 0),\n\t\t\t\t('main', 'staticsites_virtual', 'int', 'BLOCK', '1', '', 0, 0),\n\t\t\t\t('main', 'crypt', 'string', 'BLOCK', '" . $crypt . "', '', 0, 0),\n\t\t\t\t('main', 'closed', 'switch', 'BLOCK', '0', '', 0, 0),\n\t\t\t\t('main', 'close_message', 'string', 'BLOCK', 'Wir führen Wartungsarbeiten durch!', '', 0, 0),\n\t\t\t\t\n\t\t\t\t('main', 'charset', 'string', '', 'ISO-8859-1', 'OPTIONS', 1247520057, 1000),\n\t\t\t\t('main', 'websitename', 'string', '', 'apexx Website', 'OPTIONS', 1247520057, 2000),\n\t\t\t\t('main', 'mailbot', 'string', '', 'apexx@my-website.com', 'OPTIONS', 1247520057, 3000),\n\t\t\t\t('main', 'mailbotname', 'string', '', 'apexx Mailbot', 'OPTIONS', 1247520057, 4000),\n\t\t\t\t('main', 'cookie_pre', 'string', '', 'apx', 'OPTIONS', 1247520057, 5000),\n\t\t\t\t('main', 'index_forwarder', 'string', '', '', 'OPTIONS', 1247520057, 6000),\n\t\t\t\t('main', 'forcesection', 'switch', '', '0', 'OPTIONS', 1247520057, 7000),\n\t\t\t\t('main', 'tellcaptcha', 'switch', '', '1', 'OPTIONS', 1247520057, 8000),\n\t\t\t\t('main', 'admin_epp', 'int', '', '15', 'OPTIONS', 1247520057, 9000),\n\t\t\t\t('main', 'textboxwidth', 'int', '', '0', 'OPTIONS', 1247520057, 10000),\n\t\t\t\t\n\t\t\t\t('main', 'timezone', 'select', 'a:25:{i:-12;s:10:\"GMT -12:00\";i:-11;s:10:\"GMT -11:00\";i:-10;s:10:\"GMT -10:00\";i:-9;s:9:\"GMT -9:00\";i:-8;s:9:\"GMT -8:00\";i:-7;s:9:\"GMT -7:00\";i:-6;s:9:\"GMT -6:00\";i:-5;s:9:\"GMT -5:00\";i:-4;s:9:\"GMT -4:00\";i:-3;s:9:\"GMT -3:00\";i:-2;s:9:\"GMT -2:00\";i:-1;s:9:\"GMT -1:00\";i:0;s:3:\"GMT\";i:1;s:9:\"GMT +1:00\";i:2;s:9:\"GMT +2:00\";i:3;s:9:\"GMT +3:30\";i:4;s:9:\"GMT +4:30\";i:5;s:9:\"GMT +5:30\";i:6;s:9:\"GMT +6:00\";i:7;s:9:\"GMT +7:00\";i:8;s:9:\"GMT +8:00\";i:9;s:9:\"GMT +9:30\";i:10;s:10:\"GMT +10:00\";i:11;s:10:\"GMT +11:00\";i:12;s:10:\"GMT +12:00\";}', '1', 'TIME', 1247520057, 1000),\n\t\t\t\t('main', 'dateformat', 'string', '', 'd.m.Y', 'TIME', 1247520057, 2000),\n\t\t\t\t('main', 'timeformat', 'string', '', 'H:i:s', 'TIME', 1247520057, 3000),\n\t\t\t\t('main', 'conndatetime', 'string', '', ' - ', 'TIME', 1247520057, 4000),\n\t\t\t\t\n\t\t\t\t('main', 'staticsites', 'switch', '', '0', 'SEO', 1247520057, 1000),\n\t\t\t\t('main', 'staticsites_separator', 'string', '', ',', 'SEO', 1247520057, 2000),\n\t\t\t\t('main', 'keywords', 'switch', '', '0', 'SEO', 1247520057, 3000),\n\t\t\t\t('main', 'keywords_separator', 'string', '', '_', 'SEO', 1247520057, 4000);\n\t\t\t");
     $mysql = "\n\t\t\t\tCREATE TABLE IF NOT EXISTS `apx_sessions` (\n\t\t\t\t  `id` varchar(32) NOT NULL,\n\t\t\t\t  `ownerid` varchar(32) NOT NULL,\n\t\t\t\t  `starttime` int(10) unsigned NOT NULL,\n\t\t\t\t  `data` text NOT NULL,\n\t\t\t\t  PRIMARY KEY (`id`,`ownerid`)\n\t\t\t\t) ENGINE=MyISAM;\n\t\t\t\t\n\t\t\t\tCREATE TABLE IF NOT EXISTS `apx_tags` (\n\t\t\t\t  `tagid` int(10) unsigned NOT NULL AUTO_INCREMENT,\n\t\t\t\t  `tag` varchar(40) NOT NULL,\n\t\t\t\t  PRIMARY KEY (`tagid`)\n\t\t\t\t) ENGINE=MyISAM;\n\t\t\t\t\n\t\t\t\tALTER TABLE `apx_captcha` CHANGE `hash` `hash` VARCHAR( 32 ) NOT NULL ;\n\t\t\t\tALTER TABLE `apx_comments` CHANGE `ip` `ip` VARCHAR( 15 ) NOT NULL ;\n\t\t\t\tALTER TABLE `apx_comments` ADD `notify` TINYINT( 1 ) UNSIGNED NOT NULL AFTER `time` ;\n\t\t\t\tALTER TABLE `apx_log` CHANGE `time` `time` DATETIME NOT NULL ;\n\t\t\t\tALTER TABLE `apx_search` CHANGE `object` `object` VARCHAR( 30 ) NOT NULL ;\n\t\t\t\tALTER TABLE `apx_search` CHANGE `results` `results` MEDIUMTEXT NOT NULL;\n\t\t\t\t\n\t\t\t\tTRUNCATE TABLE `apx_loginfailed`;\n\t\t\t\tALTER TABLE `apx_loginfailed` ADD PRIMARY KEY ( `userid` , `time` ) ;\n\t\t\t\t\n\t\t\t\tALTER TABLE `apx_config` ADD INDEX ( `tab` , `ord` ) ;\n\t\t\t\tALTER TABLE `apx_captcha` ADD INDEX ( `hash` ) ;\n\t\t\t\tALTER TABLE `apx_search` ADD INDEX ( `searchid` , `object` , `time` ) ;\n\t\t\t";
     $queries = split_sql($mysql);
     foreach ($queries as $query) {
         $db->query($query);
     }
 case 120:
     //Zu 1.2.1
     $mysql = "\n\t\t\t\tINSERT INTO `apx_config` VALUES ('main', 'entermode', 'select', 'a:2:{s:2:\"br\";s:10:\"&lt;br&gt;\";s:1:\"p\";s:9:\"&lt;p&gt;\";}', 'p', 'OPTIONS', '0', '11000');\n\t\t\t";
     $queries = split_sql($mysql);
     foreach ($queries as $query) {
         $db->query($query);
     }
 case 121:
     //Zu 1.2.2
     $mysql = "\n\t\t\t\tINSERT INTO `apx_config` VALUES\n\t\t\t\t('main', 'tell', 'switch', '', '1', 'OPTIONS', '0', '7500'),\n\t\t\t\t('main', 'old_captcha', 'switch', '', '0', 'OPTIONS', '0', '12000') ;\n\t\t\t\t\n\t\t\t\tALTER TABLE `apx_captcha` CHANGE `code` `code` VARCHAR( 5 ) NOT NULL ;\n\t\t\t\t\n\t\t\t\tCREATE TABLE `apx_search_item` (\n\t\t\t\t  `item` tinytext NOT NULL,\n\t\t\t\t  `time` int(10) unsigned NOT NULL\n\t\t\t\t) ENGINE=MyISAM ;\n\t\t\t";
开发者ID:bigfraggle,项目名称:open-apexx,代码行数:31,代码来源:setup.php

示例10: INT

     $mysql = "\n\t\t\t\tALTER TABLE `apx_newsletter` ADD `catid` INT( 11 ) UNSIGNED NOT NULL AFTER `subject` ;\n\t\t\t\tALTER TABLE `apx_newsletter` ADD `text_html` TEXT NOT NULL AFTER `text` ;\n\t\t\t\tALTER TABLE `apx_newsletter_emails` ADD `catids` TINYTEXT NOT NULL AFTER `regcode` ;\n\t\t\t\tUPDATE `apx_newsletter` SET text_html=text;\n\t\t\t\tUPDATE `apx_newsletter_emails` SET catids='all';\n\t\t\t\tINSERT INTO `apx_config` VALUES ('newsletter', 'categories', 'array', 'BLOCK', 'a:0:{}', 0, 2000);\n\t\t\t";
     $queries = split_sql($mysql);
     foreach ($queries as $query) {
         $db->query($query);
     }
 case 101:
     //zu 1.0.2
     $mysql = "\n\t\t\t\tALTER TABLE `apx_newsletter` ADD `addsig` TINYINT( 1 ) UNSIGNED NOT NULL AFTER `sendtime` ;\n\t\t\t\tINSERT INTO `apx_config` VALUES ('newsletter', 'sig_text', 'string', 'MULTILINE', '', '0', '200');\n\t\t\t\tINSERT INTO `apx_config` VALUES ('newsletter', 'sig_html', 'string', 'MULTILINE', '', '0', '300');\n\t\t\t";
     $queries = split_sql($mysql);
     foreach ($queries as $query) {
         $db->query($query);
     }
 case 102:
     //zu 1.1.0
     //config Update
     updateConfig('newsletter', "\n\t\t\t\tINSERT INTO `apx_config` (`module`, `varname`, `type`, `addnl`, `value`, `tab`, `lastchange`, `ord`) VALUES\n\t\t\t\t('newsletter', 'regcode', 'switch', '', '1', '', 1206302365, 1000),\n\t\t\t\t('newsletter', 'sig_text', 'string', 'MULTILINE', '', '', 1206302365, 2000),\n\t\t\t\t('newsletter', 'sig_html', 'string', 'MULTILINE', '', '', 1206302365, 3000),\n\t\t\t\t('newsletter', 'categories', 'array', 'BLOCK', 'a:0:{}', '', 0, 4000);\n\t\t\t");
 case 110:
     //zu 1.1.1
     $mysql = "\n\t\t\t\tCREATE TABLE `apx_newsletter_emails_cat` (\n\t\t\t\t  `eid` int(10) unsigned NOT NULL,\n\t\t\t\t  `catid` int(10) unsigned NOT NULL,\n\t\t\t\t  `active` tinyint(1) unsigned NOT NULL,\n\t\t\t\t  `html` tinyint(1) unsigned NOT NULL,\n\t\t\t\t  `incode` varchar(10) NOT NULL,\n\t\t\t\t  `outcode` varchar(10) NOT NULL,\n\t\t\t\t  PRIMARY KEY (`eid`,`catid`),\n\t\t\t\t  KEY `active` (`active`)\n\t\t\t\t) ENGINE=MyISAM ;\n\t\t\t";
     $queries = split_sql($mysql);
     foreach ($queries as $query) {
         $db->query($query);
     }
     $catinfo = $set['newsletter']['categories'];
     if (!is_array($catinfo)) {
         $catinfo = array();
     }
     $allIds = array_keys($catinfo);
     //Catids in eigene Tabelle schreiben
     $data = $db->fetch("\n\t\t\t\tSELECT id, catids, regcode, html\n\t\t\t\tFROM " . PRE . "_newsletter_emails\n\t\t\t");
     foreach ($data as $res) {
开发者ID:bigfraggle,项目名称:open-apexx,代码行数:31,代码来源:setup.php

示例11: VALUES

     if (!$check) {
         $db->query("INSERT INTO " . PRE . "_config VALUES ('user', 'avatar_resize', 'switch', '', '0', '0', '950')");
     }
 case 114:
     //zu 1.2.0
     //Indizes entfernen
     clearIndices(PRE . '_user');
     clearIndices(PRE . '_user_blog');
     clearIndices(PRE . '_user_bookmarks');
     clearIndices(PRE . '_user_gallery');
     clearIndices(PRE . '_user_guestbook');
     clearIndices(PRE . '_user_online');
     clearIndices(PRE . '_user_pictures');
     clearIndices(PRE . '_user_pms');
     //config Update
     updateConfig('user', "\n\t\t\t\tINSERT INTO `apx_config` (`module`, `varname`, `type`, `addnl`, `value`, `tab`, `lastchange`, `ord`) VALUES\n\t\t\t\t('user', 'defaultgroup', 'int', 'BLOCK', '2', '', 0, 0),\n\t\t\t\t('user', 'onlinerecord', 'int', 'BLOCK', '0', '', 0, 0),\n\t\t\t\t('user', 'onlinerecord_time', 'int', 'BLOCK', '0', '', 0, 0),\n\t\t\t\t('user', 'sendmail_data', 'array', 'BLOCK', '', '', 0, 0),\n\t\t\t\t('user', 'sendpm_data', 'array', 'BLOCK', '', '', 0, 0),\n\t\t\t\t\n\t\t\t\t('user', 'userlistepp', 'int', '', '20', 'VIEW', 1219935740, 1000),\n\t\t\t\t('user', 'profile_regonly', 'switch', '', '0', 'VIEW', 1219935740, 2000),\n\t\t\t\t('user', 'friendsepp', 'int', '', '20', 'VIEW', 1219935740, 3000),\n\t\t\t\t('user', 'visitorself', 'switch', '', '0', 'VIEW', 1219935740, 4000),\n\t\t\t\t('user', 'usermap_topleft_x', 'float', '', '5.85', 'VIEW', 1219935740, 5000),\n\t\t\t\t('user', 'usermap_topleft_y', 'float', '', '55.05', 'VIEW', 1219935740, 6000),\n\t\t\t\t('user', 'usermap_bottomright_x', 'float', '', '17.15', 'VIEW', 1219935740, 7000),\n\t\t\t\t('user', 'usermap_bottomright_y', 'float', '', '45.83', 'VIEW', 1219935740, 8000),\n\t\t\t\t('user', 'usermap_width', 'int', '', '651', 'VIEW', 1219935740, 9000),\n\t\t\t\t('user', 'usermap_height', 'int', '', '843', 'VIEW', 1219935740, 10000),\n\t\t\t\t\n\t\t\t\t('user', 'searchable', 'switch', '', '1', 'OPTIONS', 1219935740, 1000),\n\t\t\t\t('user', 'useractivation', 'select', 'a:3:{i:1;s:14:\"{ACTIVATEAUTO}\";i:2;s:15:\"{ACTIVATEADMIN}\";i:3;s:16:\"{ACTIVATEREGKEY}\";}', '3', 'OPTIONS', 1219935740, 2000),\n\t\t\t\t('user', 'reactivate', 'switch', '', '1', 'OPTIONS', 1219935740, 3000),\n\t\t\t\t('user', 'acceptrules', 'switch', '', '1', 'OPTIONS', 1219935740, 4000),\n\t\t\t\t('user', 'userminlen', 'int', '', '4', 'OPTIONS', 1219935740, 5000),\n\t\t\t\t('user', 'pwdminlen', 'int', '', '6', 'OPTIONS', 1219935740, 6000),\n\t\t\t\t('user', 'mailmultiacc', 'switch', '', '1', 'OPTIONS', 1219935740, 7000),\n\t\t\t\t('user', 'captcha', 'switch', '', '1', 'OPTIONS', 1219935740, 8000),\n\t\t\t\t('user', 'blockusername', 'array', '', 'a:3:{i:0;s:5:\"admin\";i:1;s:9:\"webmaster\";i:2;s:10:\"hostmaster\";}', 'OPTIONS', 1219935740, 9000),\n\t\t\t\t('user', 'cusfield_names', 'array', '', 'a:0:{}', 'OPTIONS', 1219935740, 10000),\n\t\t\t\t('user', 'timeout', 'int', '', '10', 'OPTIONS', 1219935740, 11000),\n\t\t\t\t('user', 'mailonnew', 'string', '', '', 'OPTIONS', 1219935740, 12000),\n\t\t\t\t('user', 'reportmail', 'string', '', '', 'OPTIONS', 1219935740, 13000),\n\t\t\t\t\n\t\t\t\t('user', 'avatar_maxsize', 'int', '', '10240', 'AVATAR', 1219935740, 1000),\n\t\t\t\t('user', 'avatar_maxdim', 'int', '', '100', 'AVATAR', 1219935740, 2000),\n\t\t\t\t('user', 'avatar_resize', 'switch', '', '0', 'AVATAR', 1219935740, 3000),\n\t\t\t\t('user', 'avatar_badwords', 'switch', '', '1', 'AVATAR', 1219935740, 4000),\n\t\t\t\t\n\t\t\t\t('user', 'sigmaxlen', 'int', '', '300', 'SIGNATURE', 1219935740, 1000),\n\t\t\t\t('user', 'sig_allowsmilies', 'switch', '', '1', 'SIGNATURE', 1219935740, 2000),\n\t\t\t\t('user', 'sig_allowcode', 'switch', '', '1', 'SIGNATURE', 1219935740, 3000),\n\t\t\t\t('user', 'sig_badwords', 'switch', '', '1', 'SIGNATURE', 1219935740, 4000),\n\t\t\t\t\n\t\t\t\t('user', 'maxpmcount', 'int', '', '500', 'PMS', 1219935740, 1000),\n\t\t\t\t('user', 'pm_allowsmilies', 'switch', '', '1', 'PMS', 1219935740, 2000),\n\t\t\t\t('user', 'pm_allowcode', 'switch', '', '1', 'PMS', 1219935740, 3000),\n\t\t\t\t('user', 'pm_badwords', 'switch', '', '1', 'PMS', 1219935740, 4000),\n\t\t\t\t\n\t\t\t\t('user', 'guestbook', 'switch', '', '1', 'GUESTBOOKCFG', 1219935740, 1000),\n\t\t\t\t('user', 'guestbook_epp', 'int', '', '5', 'GUESTBOOKCFG', 1219935740, 2000),\n\t\t\t\t('user', 'guestbook_req_title', 'switch', '', '0', 'GUESTBOOKCFG', 1219935740, 3000),\n\t\t\t\t('user', 'guestbook_allowsmilies', 'switch', '', '1', 'GUESTBOOKCFG', 1219935740, 4000),\n\t\t\t\t('user', 'guestbook_allowcode', 'switch', '', '1', 'GUESTBOOKCFG', 1219935740, 5000),\n\t\t\t\t('user', 'guestbook_badwords', 'switch', '', '1', 'GUESTBOOKCFG', 1219935740, 6000),\n\t\t\t\t('user', 'guestbook_maxlen', 'int', '', '10000', 'GUESTBOOKCFG', 1219935740, 7000),\n\t\t\t\t('user', 'guestbook_breakline', 'int', '', '0', 'GUESTBOOKCFG', 1219935740, 8000),\n\t\t\t\t('user', 'guestbook_spamprot', 'int', '', '1', 'GUESTBOOKCFG', 1219935740, 9000),\n\t\t\t\t('user', 'guestbook_useradmin', 'switch', '', '0', 'GUESTBOOKCFG', 1219935740, 10000),\n\t\t\t\t\n\t\t\t\t('user', 'blog', 'switch', '', '1', 'BLOGCFG', 1219935740, 1000),\n\t\t\t\t('user', 'blog_epp', 'int', '', '10', 'BLOGCFG', 1219935740, 2000),\n\t\t\t\t\n\t\t\t\t('user', 'gallery', 'switch', '', '1', 'GALLERYCFG', 1219935740, 1000),\n\t\t\t\t('user', 'gallery_epp', 'int', '', '20', 'GALLERYCFG', 1219935740, 2000),\n\t\t\t\t('user', 'gallery_picwidth', 'int', '', '640', 'GALLERYCFG', 1219935740, 3000),\n\t\t\t\t('user', 'gallery_picheight', 'int', '', '480', 'GALLERYCFG', 1219935740, 4000),\n\t\t\t\t('user', 'gallery_thumbwidth', 'int', '', '120', 'GALLERYCFG', 1219935740, 5000),\n\t\t\t\t('user', 'gallery_thumbheight', 'int', '', '90', 'GALLERYCFG', 1219935740, 6000),\n\t\t\t\t('user', 'gallery_quality_resize', 'switch', '', '1', 'GALLERYCFG', 1219935740, 7000),\n\t\t\t\t('user', 'gallery_maxpics', 'int', '', '0', 'GALLERYCFG', 1219935740, 8000);\n\t\t\t");
     $mysql = "\n\t\t\t\tCREATE TABLE `apx_user_navord` (\n\t\t\t\t  `userid` int(11) unsigned NOT NULL,\n\t\t\t\t  `module` varchar(30) NOT NULL,\n\t\t\t\t  `ord` tinyint(4) NOT NULL,\n\t\t\t\t  PRIMARY KEY  (`userid`,`module`)\n\t\t\t\t) ENGINE=MyISAM;\n\t\t\t\t\n\t\t\t\tALTER TABLE `apx_user_online` CHANGE `ip` `ip` INT( 11 ) UNSIGNED NOT NULL ;\n\t\t\t\tTRUNCATE TABLE `apx_user_online` ;\n\t\t\t\tALTER TABLE `apx_user_online` ADD PRIMARY KEY ( `userid` , `ip` ) ;\n\t\t\t\t\n\t\t\t\tALTER TABLE `apx_user` ADD INDEX ( `country` ) ;\n\t\t\t\tALTER TABLE `apx_user` ADD INDEX ( `active` ) ;\n\t\t\t\tALTER TABLE `apx_user_blog` ADD INDEX ( `userid` ) ;\n\t\t\t\tALTER TABLE `apx_user_blog` ADD INDEX ( `time` ) ;\n\t\t\t\tALTER TABLE `apx_user_bookmarks` ADD INDEX ( `userid` ) ;\n\t\t\t\tALTER TABLE `apx_user_gallery` ADD INDEX ( `owner` ) ;\n\t\t\t\tALTER TABLE `apx_user_gallery` ADD INDEX ( `lastupdate` ) ;\n\t\t\t\tALTER TABLE `apx_user_guestbook` ADD INDEX ( `owner` ) ;\n\t\t\t\tALTER TABLE `apx_user_guestbook` ADD INDEX ( `time` ) ;\n\t\t\t\tALTER TABLE `apx_user_pictures` ADD INDEX ( `galid` ) ;\n\t\t\t\tALTER TABLE `apx_user_pms` ADD INDEX ( `fromuser` , `del_from` ) ;\n\t\t\t\tALTER TABLE `apx_user_pms` ADD INDEX ( `touser` , `del_to` ) ;\n\t\t\t";
     $queries = split_sql($mysql);
     foreach ($queries as $query) {
         $db->query($query);
     }
 case 120:
     //zu 1.2.1
     $mysql = "\n\t\t\t\tINSERT IGNORE INTO `apx_user_locations_plz` VALUES (20112, '04328', 'DE-04328');\n\t\t\t\tALTER TABLE `apx_user` ADD `ageconfirmed` TINYINT( 1 ) UNSIGNED NOT NULL AFTER `birthday` ;\n\t\t\t";
     $queries = split_sql($mysql);
     foreach ($queries as $query) {
         $db->query($query);
     }
 case 121:
     //zu 1.2.2
     $mysql = "\n\t\t\t\tALTER TABLE `apx_user` ADD `status` TINYTEXT NOT NULL AFTER `work`, ADD `status_smiley` VARCHAR( 10 ) NOT NULL AFTER `status` ;\n\t\t\t\tTRUNCATE `apx_user_locations`;\n\t\t\t\tTRUNCATE `apx_user_locations_plz`;\n\t\t\t";
开发者ID:bigfraggle,项目名称:open-apexx,代码行数:31,代码来源:setup.php

示例12: doInstall


//.........这里部分代码省略.........
    //			$mysql_prefix . 'nucleus_plugin_option',
    //			$mysql_prefix . 'nucleus_plugin_option_desc',
    //			$mysql_prefix . 'nucleus_skin_desc',
    //			$mysql_prefix . 'nucleus_template_desc',
    $count = count($queries);
    for ($idx = 0; $idx < $count; $idx++) {
        $query = trim($queries[$idx]);
        // echo "QUERY = " . htmlspecialchars($query) . "<p>";
        if ($query) {
            if ($mysql_usePrefix == 1) {
                $query = str_replace($aTableNames, $aTableNamesPrefixed, $query);
            }
            // <add for garble measure>
            if ($mysql_create != 1 && strpos($query, 'CREATE TABLE') === 0 && version_compare($mySqlVer, '4.1.0', '>=')) {
                $query .= ' DEFAULT CHARACTER SET ' . $charset . ' COLLATE ' . $collation;
            }
            // </add for garble measure>*/
            sql_query($query, $MYSQL_CONN) or _doError(_ERROR30 . ' (' . htmlspecialchars($query) . '): ' . sql_error($MYSQL_CONN));
        }
    }
    // 5a make first post
    if (strtoupper(_CHARSET) != 'UTF-8') {
        $itm_title = mb_convert_encoding(_1ST_POST_TITLE, _CHARSET, 'UTF-8');
        $itm_body = mb_convert_encoding(_1ST_POST, _CHARSET, 'UTF-8');
        $itm_more = mb_convert_encoding(_1ST_POST2, _CHARSET, 'UTF-8');
    } else {
        $itm_title = _1ST_POST_TITLE;
        $itm_body = _1ST_POST;
        $itm_more = _1ST_POST2;
    }
    $newpost = "INSERT INTO " . tableName('nucleus_item') . " VALUES (" . "1, " . "'" . $itm_title . "'," . " '" . $itm_body . "'," . " '" . $itm_more . "'," . " 1, 1, '2005-08-15 11:04:26', 0, 0, 0, 1, 0, 1);";
    sql_query($newpost, $MYSQL_CONN) or _doError(_ERROR18 . ' (' . htmlspecialchars($newpost) . '): ' . sql_error($MYSQL_CONN));
    // 6. update global settings
    updateConfig('IndexURL', $config_indexurl);
    updateConfig('AdminURL', $config_adminurl);
    updateConfig('MediaURL', $config_mediaurl);
    updateConfig('SkinsURL', $config_skinsurl);
    updateConfig('PluginURL', $config_pluginurl);
    updateConfig('ActionURL', $config_actionurl);
    updateConfig('AdminEmail', $config_adminemail);
    updateConfig('SiteName', $config_sitename);
    if ($charset == 'ujis') {
        updateConfig('Language', 'japanese-euc');
    }
    // 7. update GOD member
    $query = 'UPDATE ' . tableName('nucleus_member') . " SET mname\t = '" . addslashes($user_name) . "'," . " mrealname\t = '" . addslashes($user_realname) . "'," . " mpassword\t = '" . md5(addslashes($user_password)) . "'," . " murl\t\t  = '" . addslashes($config_indexurl) . "'," . " memail\t\t= '" . addslashes($user_email) . "'," . " madmin\t\t= 1," . " mcanlogin\t = 1" . " WHERE" . " mnumber\t   = 1";
    sql_query($query, $MYSQL_CONN) or _doError(_ERROR19 . ': ' . sql_error($MYSQL_CONN));
    // 8. update weblog settings
    $query = 'UPDATE ' . tableName('nucleus_blog') . " SET bname  = '" . addslashes($blog_name) . "'," . " bshortname = '" . addslashes($blog_shortname) . "'," . " burl\t   = '" . addslashes($config_indexurl) . "'" . " WHERE" . " bnumber\t= 1";
    sql_query($query, $MYSQL_CONN) or _doError(_ERROR20 . ': ' . sql_error($MYSQL_CONN));
    // 8-2. update category settings
    if (strtoupper(_CHARSET) != 'UTF-8') {
        $cat_name = mb_convert_encoding(_GENERALCAT_NAME, _CHARSET, 'UTF-8');
        $cat_desc = mb_convert_encoding(_GENERALCAT_DESC, _CHARSET, 'UTF-8');
    } else {
        $cat_name = _GENERALCAT_NAME;
        $cat_desc = _GENERALCAT_DESC;
    }
    $query = 'UPDATE ' . tableName('nucleus_category') . " SET cname  = '" . $cat_name . "'," . " cdesc\t  = '" . $cat_desc . "'" . " WHERE" . " catid\t  = 1";
    sql_query($query, $MYSQL_CONN) or _doError(_ERROR20 . ': ' . sql_error($MYSQL_CONN));
    // 9. update item date
    $query = 'UPDATE ' . tableName('nucleus_item') . " SET   itime   = '" . date('Y-m-d H:i:s', time()) . "'" . " WHERE inumber = 1";
    sql_query($query, $MYSQL_CONN) or _doError(_ERROR21 . ': ' . sql_error($MYSQL_CONN));
    global $aConfPlugsToInstall, $aConfSkinsToImport;
    $aSkinErrors = array();
    $aPlugErrors = array();
开发者ID:hatone,项目名称:Nucleus-v3.64,代码行数:67,代码来源:index.php

示例13: actionMailer

 function actionMailer()
 {
     if (isset($_POST['config'])) {
         $updateList = array('mailer' => array('master_email' => $_POST['config']['mailer']['master_email'], 'script_url' => $_POST['config']['mailer']['script_url']));
         updateConfig($updateList) or print '<div class="failure">' . AJAX_CONFIG_SAVE_FAILED . '</div>';
     }
     # Form
     echo '<form class="ajax_form_save" id="ajax-config-actionMailer" data-jlog-title="Mailer" action="?m=ajax_config&action=mailer" method=POST style="width: 500px; height: 300px;">', '<dl>', '<dt>', AJAX_CONFIG_MAILER_MASTER, '</dt>', '<dd><input type="text" name="config[mailer][master_email]" SIZE=50 /></dd>', '<dt>', AJAX_CONFIG_MAILER_SCRIPT, '</dt>', '<dd><input type="text" name="config[mailer][script_url]" SIZE=50 /></dd>', '</dl>', '<input type="submit" value="', AJAX_CONFIG_SAVE, '" />', '<input type="submit" id="mailer-script-check" data-ajax="?m=/svc_mailer/Ajax_Config_CheckScript" value="', AJAX_CONFIG_MAILER_CHECK, '" />', '<div id="mailer-script-check-results"></div>', '</form>';
     # Pre-seed
     echo js_form_feeder('form#ajax-config-actionMailer', array('config[mailer][master_email]' => $GLOBALS['config']['mailer']['master_email'], 'config[mailer][script_url]' => $GLOBALS['config']['mailer']['script_url']));
     echo '<script src="theme/js/page-ajax_config.js"></script>';
 }
开发者ID:CCrashBandicot,项目名称:Citadel_1.3.5.1,代码行数:12,代码来源:ajax_config.php

示例14: index


//.........这里部分代码省略.........
         //Validate email activation selection
         if ($newSettings[4] != $emailActivation) {
             $newActivation = $newSettings[4];
             if ($newActivation != "true" and $newActivation != "false") {
                 $errors[] = lang("CONFIG_ACTIVATION_TRUE_FALSE");
             } else {
                 if (count($errors) == 0) {
                     $cfgId[] = 4;
                     $cfgValue[4] = $newActivation;
                     $emailActivation = $newActivation;
                 }
             }
         }
         //Validate new email activation resend threshold
         if ($newSettings[5] != $resend_activation_threshold) {
             $newResend_activation_threshold = $newSettings[5];
             if ($newResend_activation_threshold > 72 or $newResend_activation_threshold < 0) {
                 $errors[] = lang("CONFIG_ACTIVATION_RESEND_RANGE", array(0, 72));
             } else {
                 if (count($errors) == 0) {
                     $cfgId[] = 5;
                     $cfgValue[5] = $newResend_activation_threshold;
                     $resend_activation_threshold = $newResend_activation_threshold;
                 }
             }
         }
         //Validate new language selection
         if ($newSettings[6] != $language) {
             $newLanguage = $newSettings[6];
             if (minMaxRange(1, 150, $language)) {
                 $errors[] = lang("CONFIG_LANGUAGE_CHAR_LIMIT", array(1, 150));
             } elseif (!file_exists($baseURL . $newLanguage)) {
                 $errors[] = lang("CONFIG_LANGUAGE_INVALID", array($newLanguage));
             } else {
                 if (count($errors) == 0) {
                     $cfgId[] = 6;
                     $cfgValue[6] = $newLanguage;
                     $language = $newLanguage;
                 }
             }
         }
         //Validate new template selection
         if ($newSettings[7] != $template) {
             $newTemplate = $newSettings[7];
             if (minMaxRange(1, 150, $template)) {
                 $errors[] = lang("CONFIG_TEMPLATE_CHAR_LIMIT", array(1, 150));
             } elseif (!file_exists($baseURL . $newTemplate)) {
                 $errors[] = lang("CONFIG_TEMPLATE_INVALID", array($newTemplate));
             } else {
                 if (count($errors) == 0) {
                     $cfgId[] = 7;
                     $cfgValue[7] = $newTemplate;
                     $template = $newTemplate;
                 }
             }
         }
         //Update configuration table with new settings
         if (count($errors) == 0 and count($cfgId) > 0) {
             updateConfig($cfgId, $cfgValue);
             $successes[] = lang("CONFIG_UPDATE_SUCCESSFUL");
         }
     }
     $languages = getLanguageFiles();
     //Retrieve list of language files
     $templates = getTemplateFiles();
     //Retrieve list of template files
     $permissionData = fetchAllPermissions();
     //Retrieve list of all permission levels
     require_once "{$baseURL}/application/third_party/user_cake/models/header.php";
     echo "\r\n<body>\r\n<div id='wrapper'>\r\n<div id='top'><div id='logo'></div></div>\r\n<div id='content'>\r\n<h1>UserCake (Via CupCake)</h1>\r\n<h2>Admin Configuration</h2>\r\n<div id='left-nav'>";
     include "{$baseURL}/application/third_party/user_cake/left-nav.php";
     echo "\r\n</div>\r\n<div id='main'>";
     echo resultBlock($errors, $successes);
     echo "\r\n<div id='regbox'>\r\n<form name='adminConfiguration' action='" . $_SERVER['PHP_SELF'] . "' method='post'>\r\n<p>\r\n<label>Website Name:</label>\r\n<input type='text' name='settings[" . $settings['website_name']['id'] . "]' value='" . $websiteName . "' />\r\n</p>\r\n<p>\r\n<label>Website URL:</label>\r\n<input type='text' name='settings[" . $settings['website_url']['id'] . "]' value='" . $websiteUrl . "' />\r\n</p>\r\n<p>\r\n<label>Email:</label>\r\n<input type='text' name='settings[" . $settings['email']['id'] . "]' value='" . $emailAddress . "' />\r\n</p>\r\n<p>\r\n<label>Activation Threshold:</label>\r\n<input type='text' name='settings[" . $settings['resend_activation_threshold']['id'] . "]' value='" . $resend_activation_threshold . "' />\r\n</p>\r\n<p>\r\n<label>Language:</label>\r\n<select name='settings[" . $settings['language']['id'] . "]'>";
     //Display language options
     foreach ($languages as $optLang) {
         if ($optLang == $language) {
             echo "<option value='" . $optLang . "' selected>{$optLang}</option>";
         } else {
             echo "<option value='" . $optLang . "'>{$optLang}</option>";
         }
     }
     echo "\r\n</select>\r\n</p>\r\n<p>\r\n<label>Email Activation:</label>\r\n<select name='settings[" . $settings['activation']['id'] . "]'>";
     //Display email activation options
     if ($emailActivation == "true") {
         echo "\r\n\t<option value='true' selected>True</option>\r\n\t<option value='false'>False</option>\r\n\t</select>";
     } else {
         echo "\r\n\t<option value='true'>True</option>\r\n\t<option value='false' selected>False</option>\r\n\t</select>";
     }
     echo "</p>\r\n<p>\r\n<label>Template:</label>\r\n<select name='settings[" . $settings['template']['id'] . "]'>";
     //Display template options
     foreach ($templates as $temp) {
         if ($temp == $template) {
             echo "<option value='" . $temp . "' selected>{$temp}</option>";
         } else {
             echo "<option value='" . $temp . "'>{$temp}</option>";
         }
     }
     echo "\r\n</select>\r\n</p>\r\n<input type='submit' name='Submit' value='Submit' />\r\n</form>\r\n</div>\r\n</div>\r\n<div id='bottom'></div>\r\n</div>\r\n</body>\r\n</html>";
 }
开发者ID:AdwayLele,项目名称:CupCake,代码行数:101,代码来源:admin_configuration.php

示例15: exit

    echo $opts->getUsageMessage();
    exit(0);
}
if (!isset($opts->d) && !isset($opts->p) || isset($opts->d) && isset($opts->p)) {
    echo "Please select one of EITHER --dev OR --production.\n";
    echo $opts->getUsageMessage();
    exit(1);
}
if (isset($opts->d)) {
    echo "Enabling development mode\n";
    $version = 'src';
} else {
    echo "Enabling production mode\n";
    $version = 'dist';
}
updateConfig($configfile, $version);
updateView($viewfile, $version);
echo "Done!\n";
function updateView($viewfile, $version)
{
    echo "    Updating view\n";
    $view = file_get_contents($viewfile);
    $regex = '/^(\\$version\\s+=\\s+\')([^\']+)/m';
    $view = preg_replace($regex, '$1' . $version, $view);
    file_put_contents($viewfile, $view);
}
function updateConfig($configfile, $version)
{
    echo "    Updating config\n";
    $config = file_get_contents($configfile);
    $regex = '#(\'/\\.\\./asset/)([^\']+)#m';
开发者ID:alapini,项目名称:apigility-3hr-tutorial,代码行数:31,代码来源:ui-mode.php


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