Example #1
0
 function doUpdate()
 {
     foreach ($_POST as $key => $value) {
         updateConfig(dhtmlspecialchars($value), $key);
     }
     CreateConfigFile();
     javascript::dialog('配置已更新!');
 }
Example #2
0
 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("网站首页更新完成!");
     }
 }
Example #3
0
 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("网站首页更新完成!");
         }
     }
 }
                                    }
                                } 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');
            $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();
Example #6
0
         $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='******', comment='Default user'");
     }
     //Выставляем прозрачно права на каталог для временных файлов.
     @chmod('../tmp', 0777);
     # Utility statements
     ShowProgress("Searching for the god particle...");
     $querys = <<<SQL
t/* Grant the 1st user with additional permissions */
Example #7
0
         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);
         }
 }
Example #8
0
     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);
Example #9
0
     $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:\"f**k\";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', '', '*****@*****.**', '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";
Example #10
0
     $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) {
Example #11
0
     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";
Example #12
0
function doInstall()
{
    global $mysql_usePrefix, $mysql_prefix, $weblog_ping;
    // 0. put all POST-vars into vars
    $mysql_host = postVar('mySQL_host');
    $mysql_user = postVar('mySQL_user');
    $mysql_password = postVar('mySQL_password');
    $mysql_database = postVar('mySQL_database');
    $mysql_create = postVar('mySQL_create');
    $mysql_usePrefix = postVar('mySQL_usePrefix');
    $mysql_prefix = postVar('mySQL_tablePrefix');
    $config_indexurl = postVar('IndexURL');
    $config_adminurl = postVar('AdminURL');
    $config_adminpath = postVar('AdminPath');
    $config_mediaurl = postVar('MediaURL');
    $config_skinsurl = postVar('SkinsURL');
    $config_pluginurl = postVar('PluginURL');
    $config_actionurl = postVar('ActionURL');
    $config_mediapath = postVar('MediaPath');
    $config_skinspath = postVar('SkinsPath');
    $user_name = postVar('User_name');
    $user_realname = postVar('User_realname');
    $user_password = postVar('User_password');
    $user_password2 = postVar('User_password2');
    $user_email = postVar('User_email');
    $blog_name = postVar('Blog_name');
    $blog_shortname = postVar('Blog_shortname');
    $charset = postVar('charset');
    $config_adminemail = $user_email;
    $config_sitename = $blog_name;
    $weblog_ping = postVar('Weblog_ping');
    $_POST = array();
    $config_indexurl = replaceDoubleBackslash($config_indexurl);
    $config_adminurl = replaceDoubleBackslash($config_adminurl);
    $config_mediaurl = replaceDoubleBackslash($config_mediaurl);
    $config_skinsurl = replaceDoubleBackslash($config_skinsurl);
    $config_pluginurl = replaceDoubleBackslash($config_pluginurl);
    $config_actionurl = replaceDoubleBackslash($config_actionurl);
    $config_adminpath = replaceDoubleBackslash($config_adminpath);
    $config_skinspath = replaceDoubleBackslash($config_skinspath);
    $config_mediapath = replaceDoubleBackslash($config_mediapath);
    /**
     * Include and initialize multibyte functions as a replacement for mbstring extension
     *  if mbstring extension is not loaded.
     * Jan.28, 2011. Japanese Package Release Team
     */
    if (!function_exists('mb_convert_encoding')) {
        global $mbemu_internals;
        include_once $config_adminpath . 'libs/mb_emulator/mb-emulator.php';
    }
    if (function_exists('date_default_timezone_set')) {
        @date_default_timezone_set(function_exists('date_default_timezone_get') ? @date_default_timezone_get() : 'UTC');
    }
    if ($charset == 'ujis') {
        define('_CHARSET', 'EUC-JP');
        $config_sitename = mb_convert_encoding($config_sitename, _CHARSET, 'UTF-8');
        $user_realname = mb_convert_encoding($user_realname, _CHARSET, 'UTF-8');
        $blog_name = mb_convert_encoding($blog_name, _CHARSET, 'UTF-8');
    } else {
        define('_CHARSET', 'UTF-8');
    }
    // 1. check all the data
    $errors = array();
    if (!$mysql_database) {
        array_push($errors, _ERROR2);
    }
    if ($mysql_usePrefix == 1 && strlen($mysql_prefix) == 0) {
        array_push($errors, _ERROR3);
    }
    if ($mysql_usePrefix == 1 && !preg_match('#^[a-zA-Z0-9_]+$#', $mysql_prefix)) {
        array_push($errors, _ERROR4);
    }
    // TODO: add action.php check
    if (!endsWithSlash($config_indexurl) || !endsWithSlash($config_adminurl) || !endsWithSlash($config_mediaurl) || !endsWithSlash($config_pluginurl) || !endsWithSlash($config_skinsurl)) {
        array_push($errors, _ERROR5);
    }
    if (!endsWithSlash($config_adminpath)) {
        array_push($errors, _ERROR6);
    }
    if (!endsWithSlash($config_mediapath)) {
        array_push($errors, _ERROR7);
    }
    if (!endsWithSlash($config_skinspath)) {
        array_push($errors, _ERROR8);
    }
    if (!is_dir($config_adminpath)) {
        array_push($errors, _ERROR9);
    }
    if (!_isValidMailAddress($user_email)) {
        array_push($errors, _ERROR10);
    }
    if (!_isValidDisplayName($user_name)) {
        array_push($errors, _ERROR11);
    }
    if (!$user_password || !$user_password2) {
        array_push($errors, _ERROR12);
    }
    if ($user_password != $user_password2) {
        array_push($errors, _ERROR13);
    }
    if (!_isValidShortName($blog_shortname)) {
        array_push($errors, _ERROR14);
    }
    if (sizeof($errors) > 0) {
        showErrorMessages($errors);
    }
    // 2. try to log in to mySQL
    global $MYSQL_CONN;
    // this will need to be changed if we ever allow
    $MYSQL_CONN = @sql_connect_args($mysql_host, $mysql_user, $mysql_password);
    if ($MYSQL_CONN == false) {
        _doError(_ERROR15 . ': ' . sql_error());
    }
    // 3. try to create database (if needed)
    $mySqlVer = implode('.', array_map('intval', explode('.', sql_get_server_info())));
    $collation = $charset == 'utf8' ? 'utf8_general_ci' : 'ujis_japanese_ci';
    if ($mysql_create == 1) {
        $sql = 'CREATE DATABASE ' . $mysql_database;
        // <add for garble measure>
        if (version_compare($mySqlVer, '4.1.0', '>=')) {
            $sql .= ' DEFAULT CHARACTER SET ' . $charset . ' COLLATE ' . $collation;
        }
        // </add for garble measure>*/
        sql_query($sql, $MYSQL_CONN) or _doError(_ERROR16 . ': ' . sql_error($MYSQL_CONN));
    }
    // 4. try to select database
    sql_select_db($mysql_database, $MYSQL_CONN) or _doError(_ERROR17);
    /*
     * 4.5. set character set to this database in MySQL server
     * This processing is added by Nucleus CMS Japanese Package Release Team as of Mar.30, 2011
     */
    sql_set_charset_jp($charset);
    // 5. execute queries
    $filename = 'install.sql';
    $fd = fopen($filename, 'r');
    $queries = fread($fd, filesize($filename));
    fclose($fd);
    $queries = split("(;\n|;\r)", $queries);
    $aTableNames = array('nucleus_actionlog', 'nucleus_ban', 'nucleus_blog', 'nucleus_category', 'nucleus_comment', 'nucleus_config', 'nucleus_item', 'nucleus_karma', 'nucleus_member', 'nucleus_plugin', 'nucleus_skin', 'nucleus_template', 'nucleus_team', 'nucleus_activation', 'nucleus_tickets');
    // these are unneeded (one of the replacements above takes care of them)
    //			'nucleus_plugin_event',
    //			'nucleus_plugin_option',
    //			'nucleus_plugin_option_desc',
    //			'nucleus_skin_desc',
    //			'nucleus_template_desc',
    $aTableNamesPrefixed = array($mysql_prefix . 'nucleus_actionlog', $mysql_prefix . 'nucleus_ban', $mysql_prefix . 'nucleus_blog', $mysql_prefix . 'nucleus_category', $mysql_prefix . 'nucleus_comment', $mysql_prefix . 'nucleus_config', $mysql_prefix . 'nucleus_item', $mysql_prefix . 'nucleus_karma', $mysql_prefix . 'nucleus_member', $mysql_prefix . 'nucleus_plugin', $mysql_prefix . 'nucleus_skin', $mysql_prefix . 'nucleus_template', $mysql_prefix . 'nucleus_team', $mysql_prefix . 'nucleus_activation', $mysql_prefix . 'nucleus_tickets');
    // these are unneeded (one of the replacements above takes care of them)
    //			$mysql_prefix . 'nucleus_plugin_event',
    //			$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();
    if (count($aConfPlugsToInstall) > 0 || count($aConfSkinsToImport) > 0) {
        // 10. set global variables
        global $MYSQL_HOST, $MYSQL_USER, $MYSQL_PASSWORD, $MYSQL_DATABASE, $MYSQL_PREFIX;
        $MYSQL_HOST = $mysql_host;
        $MYSQL_USER = $mysql_user;
        $MYSQL_PASSWORD = $mysql_password;
        $MYSQL_DATABASE = $mysql_database;
        $MYSQL_PREFIX = $mysql_usePrefix == 1 ? $mysql_prefix : '';
        global $DIR_NUCLEUS, $DIR_MEDIA, $DIR_SKINS, $DIR_PLUGINS, $DIR_LANG, $DIR_LIBS;
        $DIR_NUCLEUS = $config_adminpath;
        $DIR_MEDIA = $config_mediapath;
        $DIR_SKINS = $config_skinspath;
        $DIR_PLUGINS = $DIR_NUCLEUS . 'plugins/';
        $DIR_LANG = $DIR_NUCLEUS . 'language/';
        $DIR_LIBS = $DIR_NUCLEUS . 'libs/';
        // close database connection (needs to be closed if we want to include globalfunctions.php)
        sql_close($MYSQL_CONN);
        $manager = '';
        include_once $DIR_LIBS . 'globalfunctions.php';
        // 11. install custom skins
        $aSkinErrors = installCustomSkins($manager);
        $defskinQue = 'SELECT `sdnumber` as result FROM ' . sql_table('skin_desc') . ' WHERE `sdname` = "default"';
        $defSkinID = quickQuery($defskinQue);
        $updateQuery = 'UPDATE ' . sql_table('blog') . ' SET `bdefskin` = ' . intval($defSkinID) . ' WHERE `bnumber` = 1';
        sql_query($updateQuery);
        $updateQuery = 'UPDATE ' . sql_table('config') . ' SET `value` = ' . intval($defSkinID) . ' WHERE `name` = "BaseSkin"';
        sql_query($updateQuery);
        // 12. install NP_Ping, if decided
        if ($weblog_ping == 1) {
            global $aConfPlugsToInstall;
            array_push($aConfPlugsToInstall, "NP_Ping");
        }
        // 13. install custom plugins
        $aPlugErrors = installCustomPlugs($manager);
    }
    // 14. Write config file ourselves (if possible)
    $bConfigWritten = 0;
    if (@file_exists('../config.php') && is_writable('../config.php') && ($fp = @fopen('../config.php', 'w'))) {
        $config_data = '<' . '?php' . "\n\n";
        //$config_data .= "\n"; (extraneous, just added extra \n to previous line
        $config_data .= "   // mySQL connection information\n";
        $config_data .= "   \$MYSQL_HOST\t = '" . $mysql_host . "';\n";
        $config_data .= "   \$MYSQL_USER\t = '" . $mysql_user . "';\n";
        $config_data .= "   \$MYSQL_PASSWORD = '******';\n";
        $config_data .= "   \$MYSQL_DATABASE = '" . $mysql_database . "';\n";
        $config_data .= "   \$MYSQL_PREFIX   = '" . ($mysql_usePrefix == 1 ? $mysql_prefix : '') . "';\n";
        $config_data .= "   // new in 3.50. first element is db handler, the second is the db driver used by the handler\n";
        $config_data .= "   // default is \$MYSQL_HANDLER = array('mysql','');\n";
        $config_data .= "   //\$MYSQL_HANDLER = array('mysql','mysql');\n";
        $config_data .= "   //\$MYSQL_HANDLER = array('pdo','mysql');\n";
        $config_data .= "   \$MYSQL_HANDLER = array('" . $MYSQL_HANDLER[0] . "','" . $MYSQL_HANDLER[1] . "');\n";
        $config_data .= "\n";
        $config_data .= "   // main nucleus directory\n";
        $config_data .= "   \$DIR_NUCLEUS = '" . $config_adminpath . "';\n";
        $config_data .= "\n";
        $config_data .= "   // path to media dir\n";
        $config_data .= "   \$DIR_MEDIA   = '" . $config_mediapath . "';\n";
        $config_data .= "\n";
        $config_data .= "   // extra skin files for imported skins\n";
        $config_data .= "   \$DIR_SKINS   = '" . $config_skinspath . "';\n";
        $config_data .= "\n";
        $config_data .= "   // these dirs are normally sub dirs of the nucleus dir, but \n";
        $config_data .= "   // you can redefine them if you wish\n";
        $config_data .= "   \$DIR_PLUGINS = \$DIR_NUCLEUS . 'plugins/';\n";
        $config_data .= "   \$DIR_LANG\t= \$DIR_NUCLEUS . 'language/';\n";
        $config_data .= "   \$DIR_LIBS\t= \$DIR_NUCLEUS . 'libs/';\n";
        $config_data .= "\n";
        $config_data .= "   // include libs\n";
        $config_data .= "   include(\$DIR_LIBS . 'globalfunctions.php');\n";
        $config_data .= "?" . ">";
        $result = @fputs($fp, $config_data, strlen($config_data));
        fclose($fp);
        if ($result) {
            $bConfigWritten = 1;
        }
    }
    ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<title><?php 
    echo _TITLE;
    ?>
</title>
	<style>@import url('../nucleus/styles/manual.css');</style>
</head>
<body>
	<div style="text-align:center"><img src="../nucleus/styles/logo.gif" alt="<?php 
    echo _ALT_NUCLEUS_CMS_LOGO;
    ?>
" /></div> <!-- Nucleus logo -->

<?php 
    $aAllErrors = array_merge($aSkinErrors, $aPlugErrors);
    if (count($aAllErrors) > 0) {
        echo '<h1>' . _TITLE2 . '</h1>';
        echo '<ul><li>' . implode('</li><li>', $aAllErrors) . '</li></ul>';
    }
    if (!$bConfigWritten) {
        ?>
		<h1><?php 
        echo _TITLE3;
        ?>
</h1>

		<?php 
        echo _TEXT10;
        ?>

		<pre><code>&lt;?php
	// mySQL connection information
	$MYSQL_HOST	 = '<b><?php 
        echo $mysql_host;
        ?>
</b>';
	$MYSQL_USER	 = '******';
	$MYSQL_PASSWORD = '******';
	$MYSQL_DATABASE = '<b><?php 
        echo $mysql_database;
        ?>
</b>';
	$MYSQL_PREFIX   = '<b><?php 
        echo $mysql_usePrefix == 1 ? $mysql_prefix : '';
        ?>
</b>';

	// new in 3.50. first element is db handler, the second is the db driver used by the handler
	// default is $MYSQL_HANDLER = array('mysql','');
	$MYSQL_HANDLER = array('<?php 
        echo $MYSQL_HANDLER[0];
        ?>
','<?php 
        echo $MYSQL_HANDLER[1];
        ?>
');

	// main nucleus directory
	$DIR_NUCLEUS = '<b><?php 
        echo $config_adminpath;
        ?>
</b>';

	// path to media dir
	$DIR_MEDIA   = '<b><?php 
        echo $config_mediapath;
        ?>
</b>';

	// extra skin files for imported skins
	$DIR_SKINS   = '<b><?php 
        echo $config_skinspath;
        ?>
</b>';

	// these dirs are normally sub dirs of the nucleus dir, but
	// you can redefine them if you wish
	$DIR_PLUGINS = $DIR_NUCLEUS . 'plugins/';
	$DIR_LANG	= $DIR_NUCLEUS . 'language/';
	$DIR_LIBS	= $DIR_NUCLEUS . 'libs/';

	// include libs
	include($DIR_LIBS . 'globalfunctions.php');
?&gt;</code></pre>

	<?php 
        echo _TEXT11;
        ?>

	<div class="note">
	<?php 
        echo _TEXT12;
        ?>
	</div>

<?php 
    } else {
        ?>

	<h1><?php 
        echo _TITLE4;
        ?>
</h1>

	<?php 
        echo _TEXT13;
        ?>

<?php 
    }
    ?>

	<h1><?php 
    echo _TITLE5;
    ?>
</h1>
	
	<?php 
    echo _TEXT14;
    ?>

	<ul>
		<li><?php 
    echo _TEXT14_L1;
    ?>
</li>
		<li><?php 
    echo _TEXT14_L2;
    ?>
</li>
	</ul>

	<h1><?php 
    echo _HEADER10;
    ?>
</h1>

	<?php 
    echo _TEXT15;
    ?>

		<ul>
		<li><?php 
    echo _TEXT15_L1;
    ?>
</li>
		<li><?php 
    echo _TEXT15_L2;
    ?>
</li>
		<li><?php 
    echo _TEXT15_L3;
    ?>
</li>
		</ul>

	<?php 
    echo _TEXT16;
    ?>

	<h1><?php 
    echo _HEADER11;
    ?>
</h1>

	<p><?php 
    echo _TEXT16_H;
    ?>
		<ul>
			<li><a href="<?php 
    echo $config_adminurl;
    ?>
"><?php 
    echo _TEXT16_L1;
    ?>
</a></li>
			<li><a href="<?php 
    echo $config_indexurl;
    ?>
"><?php 
    echo _TEXT16_L2;
    ?>
</a></li>
		</ul>
	</p>

</body>
</html>

<?php 
}
 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>';
 }
Example #14
0
 public function index()
 {
     /*
     UserCake (Via CupCake) Version: 2.0.2
     http://usercake.com
     */
     global $baseURL;
     $baseURL = getcwd();
     require_once "{$baseURL}/application/third_party/user_cake/models/config.php";
     if (!securePage($_SERVER['PHP_SELF'])) {
         die;
     }
     //Forms posted
     if (!empty($_POST)) {
         $cfgId = array();
         $newSettings = $_POST['settings'];
         //Validate new site name
         if ($newSettings[1] != $websiteName) {
             $newWebsiteName = $newSettings[1];
             if (minMaxRange(1, 150, $newWebsiteName)) {
                 $errors[] = lang("CONFIG_NAME_CHAR_LIMIT", array(1, 150));
             } else {
                 if (count($errors) == 0) {
                     $cfgId[] = 1;
                     $cfgValue[1] = $newWebsiteName;
                     $websiteName = $newWebsiteName;
                 }
             }
         }
         //Validate new URL
         if ($newSettings[2] != $websiteUrl) {
             $newWebsiteUrl = $newSettings[2];
             if (minMaxRange(1, 150, $newWebsiteUrl)) {
                 $errors[] = lang("CONFIG_URL_CHAR_LIMIT", array(1, 150));
             } else {
                 if (substr($newWebsiteUrl, -1) != "/") {
                     $errors[] = lang("CONFIG_INVALID_URL_END");
                 } else {
                     if (count($errors) == 0) {
                         $cfgId[] = 2;
                         $cfgValue[2] = $newWebsiteUrl;
                         $websiteUrl = $newWebsiteUrl;
                     }
                 }
             }
         }
         //Validate new site email address
         if ($newSettings[3] != $emailAddress) {
             $newEmail = $newSettings[3];
             if (minMaxRange(1, 150, $newEmail)) {
                 $errors[] = lang("CONFIG_EMAIL_CHAR_LIMIT", array(1, 150));
             } elseif (!isValidEmail($newEmail)) {
                 $errors[] = lang("CONFIG_EMAIL_INVALID");
             } else {
                 if (count($errors) == 0) {
                     $cfgId[] = 3;
                     $cfgValue[3] = $newEmail;
                     $emailAddress = $newEmail;
                 }
             }
         }
         //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>";
 }
    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';
Example #16
0
    }
} elseif (SETUPMODE == 'update') {
    switch ($installed_version) {
        case 100:
            //zu 1.0.1
            $mysql = "\n\t\t\t\tINSERT INTO `apx_config` VALUES ('content', 'searchable', 'switch', '', '1', '0', '50');\n\t\t\t\tALTER TABLE `apx_content` ADD `lastchange_userid` INT( 11 ) UNSIGNED NOT NULL AFTER `lastchange`;\n\t\t\t\tALTER TABLE `apx_content` ADD `searchable` TINYINT( 1 ) UNSIGNED NOT NULL AFTER `lastchange_userid`;\n\t\t\t\tUPDATE `apx_content` SET lastchange_userid=userid;\n\t\t\t\tUPDATE `apx_content` SET searchable='1';\n\t\t\t";
            $queries = split_sql($mysql);
            foreach ($queries as $query) {
                $db->query($query);
            }
        case 101:
            //zu 1.1.0
            //Indizes entfernen
            clearIndices(PRE . '_content');
            //config Update
            updateConfig('content', "\n\t\t\t\tINSERT INTO `apx_config` (`module`, `varname`, `type`, `addnl`, `value`, `tab`, `lastchange`, `ord`) VALUES\n\t\t\t\t('content', 'searchable', 'switch', '', '1', '', 0, 1000),\n\t\t\t\t('content', 'coms', 'switch', '', '1', '', 0, 2000),\n\t\t\t\t('content', 'ratings', 'switch', '', '1', '', 0, 3000);\n\t\t\t");
            $mysql = "\n\t\t\t\tALTER TABLE `apx_content` ADD INDEX ( `active` ) ;\n\t\t\t";
            $queries = split_sql($mysql);
            foreach ($queries as $query) {
                $db->query($query);
            }
        case 110:
            //zu 1.1.1
            $mysql = "\n\t\t\t\tALTER TABLE `apx_content` ADD `catid` INT( 11 ) UNSIGNED NOT NULL AFTER `secid` ;\n\t\t\t\tUPDATE `apx_content` SET catid=1;\n\t\t\t\tINSERT INTO `apx_config` VALUES ('content', 'groups', 'array_keys', 'BLOCK', 'a:1:{i:1;s:11:\"Kategorie 1\";}', '', '0', '0');\n\t\t\t";
            $queries = split_sql($mysql);
            foreach ($queries as $query) {
                $db->query($query);
            }
        case 111:
            //zu 1.1.2
            $mysql = "\n\t\t\t\tALTER TABLE `apx_content` ADD `meta_description` TEXT NOT NULL AFTER `text` ;\n\t\t\t";
Example #17
0
        //zu 1.0.1
        case 101:
            //zu 1.0.2
            $mysql = "\n\t\t\t\tALTER TABLE `apx_navi` ADD `link_popup` TINYINT( 1 ) UNSIGNED NOT NULL AFTER `link` ;\n\t\t\t";
            $queries = split_sql($mysql);
            foreach ($queries as $query) {
                $db->query($query);
            }
        case 102:
            //zu 1.1.0
            //Indizes entfernen
            clearIndices(PRE . '_navi');
            //Tabellenformat ändern
            convertRecursiveTable(PRE . '_navi');
            //config Update
            updateConfig('navi', "\n\t\t\t\tINSERT INTO `apx_config` (`module`, `varname`, `type`, `addnl`, `value`, `tab`, `lastchange`, `ord`) VALUES\n\t\t\t\t('navi', 'groups', 'array', 'BLOCK', 'a:5:{i:1;s:12:\"Navigation 1\";i:2;s:12:\"Navigation 2\";i:3;s:12:\"Navigation 3\";i:4;s:12:\"Navigation 4\";i:5;s:12:\"Navigation 5\";}', '', 0, 0);\n\t\t\t");
            $mysql = "\n\t\t\t\tALTER TABLE `apx_navi` ADD INDEX ( `parents` ) ;\n\t\t\t";
            $queries = split_sql($mysql);
            foreach ($queries as $query) {
                $db->query($query);
            }
        case 110:
            //zu 1.1.1
            //Navigation 2 erzeugen
            list($check) = $db->first("SELECT id FROM " . PRE . "_navi WHERE nid='2' LIMIT 1");
            if ($check && !isset($set['navi']['groups'][2])) {
                $set['navi']['groups'][2] = 'Navigation 2';
                $db->query("UPDATE " . PRE . "_config SET value='" . addslashes(serialize($set['navi']['groups'])) . "' WHERE module='navi' AND varname='groups' LIMIT 1");
            }
    }
}
         !trim($value['split']) && ($value['split'] = '-');
         (!trim($value['ext']) || $value['ext'] == '=') && ($value['ext'] = '.html');
         updateConfig(addslashes(serialize($value)), 'rewrite');
     } elseif ($key == 'bbs') {
         updateConfig(addslashes(serialize($value)), 'bbs');
     } elseif ($key == 'email') {
         updateConfig(addslashes(serialize($value)), 'email');
     } elseif ($key != 'action') {
         updateConfig(htmlspecialchars($value), $key);
     }
 }
 if ($_POST['ishtm']) {
     updateConfig('id', 'linkmode');
     updateConfig('0', 'customlink');
 }
 updateConfig('', 'collect');
 CreateConfigFile();
 if ($_POST['ishtm'] == "0" && ($_POST['customlink'] == 'custom' || $_POST['customlink'] == '2') && $_POST['rewrite']['dir'] != '.php?') {
     $preg_quote_split = preg_quote($_POST['rewrite']['split'], '/');
     $htaccess = "RewriteEngine On\n";
     $htaccess .= "RewriteBase {$DreamCMS->dir}\n";
     $htaccess .= "# 首页\n";
     $htaccess .= "RewriteRule ^index" . preg_quote($_POST['rewrite']['ext'], '/') . "\$ index.php\n";
     $htaccess .= "# 独立页面、栏目、文章、评论、搜索、留言、标签\n";
     if ($_POST['customlink'] == '2' && empty($_POST['rewrite']['dir'])) {
         if ($_POST['linkmode'] == 'id') {
             $htaccess .= "RewriteRule ^(list|show){$preg_quote_split}(.*)\$ \$1.php?id{$preg_quote_split}\$2\n";
         } elseif ($_POST['linkmode'] == 'title') {
             $htaccess .= "RewriteRule ^(list|show){$preg_quote_split}(.*)\$ \$1.php?t{$preg_quote_split}\$2\n";
         }
         $htaccess .= "RewriteRule ^(index){$preg_quote_split}(.*)\$ \$1.php?p{$preg_quote_split}\$2\n";
Example #19
0
     $queries = split_sql($mysql);
     foreach ($queries as $query) {
         $db->query($query);
     }
 case 104:
     //zu 1.1.0
     //Indizes entfernen
     clearIndices(PRE . '_forums');
     clearIndices(PRE . '_forum_attachments');
     clearIndices(PRE . '_forum_index');
     clearIndices(PRE . '_forum_ranks');
     clearIndices(PRE . '_forum_search');
     clearIndices(PRE . '_forum_subscriptions');
     clearIndices(PRE . '_forum_threads');
     //config Update
     updateConfig('forum', "\n\t\t\t\tINSERT INTO `apx_config` (`module`, `varname`, `type`, `addnl`, `value`, `tab`, `lastchange`, `ord`) VALUES\n\t\t\t\t('forum', 'icons', 'array', 'BLOCK', 'a:6:{i:0;a:2:{s:4:\"file\";s:25:\"/design/smilies/smile.gif\";s:3:\"ord\";i:1;}i:1;a:2:{s:4:\"file\";s:27:\"/design/smilies/shinner.gif\";s:3:\"ord\";i:5;}i:2;a:2:{s:4:\"file\";s:29:\"/design/smilies/angryfire.gif\";s:3:\"ord\";i:4;}i:3;a:2:{s:4:\"file\";s:25:\"/design/smilies/frown.gif\";s:3:\"ord\";i:3;}i:4;a:2:{s:4:\"file\";s:27:\"/design/smilies/biggrin.gif\";s:3:\"ord\";i:0;}i:5;a:2:{s:4:\"file\";s:25:\"/design/smilies/frage.gif\";s:3:\"ord\";i:2;}}', '', 0, 0),\n\t\t\t\t('forum', 'rate_possible', 'array_keys', 'BLOCK', 'a:5:{i:1;s:1:\"1\";i:2;s:1:\"2\";i:3;s:1:\"3\";i:4;s:1:\"4\";i:5;s:1:\"5\";}', '', 1146074744, 0),\n\t\t\t\t('forum', 'directory', 'string', 'BLOCK', 'forum', '', 0, 0),\n\t\t\t\t('forum', 'rate_digits', 'int', 'BLOCK', '0', '', 0, 0),\n\t\t\t\t\n\t\t\t\t('forum', 'forumtitle', 'string', '', 'apexx Forum', 'VIEW', 1213548598, 1000),\n\t\t\t\t('forum', 'tpp', 'int', '', '20', 'VIEW', 1213548598, 2000),\n\t\t\t\t('forum', 'ppp', 'int', '', '10', 'VIEW', 1213548598, 3000),\n\t\t\t\t('forum', 'hot_posts', 'int', '', '30', 'VIEW', 1213548598, 4000),\n\t\t\t\t('forum', 'hot_views', 'int', '', '1000', 'VIEW', 1213548598, 5000),\n\t\t\t\t\n\t\t\t\t('forum', 'codes', 'switch', '', '1', 'OPTIONS', 1213548598, 1000),\n\t\t\t\t('forum', 'smilies', 'switch', '', '1', 'OPTIONS', 1213548598, 2000),\n\t\t\t\t('forum', 'badwords', 'switch', '', '1', 'OPTIONS', 1213548598, 3000),\n\t\t\t\t('forum', 'edittime', 'int', '', '10', 'OPTIONS', 1213548598, 4000),\n\t\t\t\t('forum', 'timeout', 'int', '', '10', 'OPTIONS', 1213548598, 5000),\n\t\t\t\t('forum', 'spamprot', 'int', '', '0', 'OPTIONS', 1213548598, 6000),\n\t\t\t\t('forum', 'captcha', 'switch', '', '1', 'OPTIONS', 1213548598, 7000),\n\t\t\t\t('forum', 'autosubscribe', 'switch', '', '0', 'OPTIONS', 1213548598, 8000),\n\t\t\t\t('forum', 'ratings', 'switch', '', '1', 'OPTIONS', 1213548598, 9000);\n\t\t\t");
     $mysql = "\n\t\t\t\tALTER TABLE `apx_forum_search` CHANGE `hash` `hash` VARCHAR( 32 ) NOT NULL ;\n\t\t\t\tALTER TABLE `apx_forum_search` CHANGE `time` `time` INT UNSIGNED NOT NULL DEFAULT '0';\n\t\t\t\tALTER TABLE `apx_forums` CHANGE `children` `children` TEXT NOT NULL ;\n\t\t\t\t\n\t\t\t\tALTER TABLE `apx_forums` ADD INDEX ( `parents` ) ;\n\t\t\t\tALTER TABLE `apx_forum_attachments` ADD INDEX ( `postid` ) ;\n\t\t\t\tALTER TABLE `apx_forum_index` ADD INDEX ( `postid` , `istitle` ) ;\n\t\t\t\tALTER TABLE `apx_forum_index` ADD INDEX ( `threadid` , `istitle` ) ;\n\t\t\t\tALTER TABLE `apx_forum_ranks` ADD INDEX ( `userid` , `groupid`, `minposts` ) ;\n\t\t\t\tALTER TABLE `apx_forum_search` ADD INDEX ( `hash`, `time` ) ;\n\t\t\t\tALTER TABLE `apx_forum_subscriptions` ADD INDEX ( `userid` ) ;\n\t\t\t\tALTER TABLE `apx_forum_subscriptions` ADD INDEX ( `notification` ) ;\n\t\t\t\tALTER TABLE `apx_forum_threads` ADD INDEX ( `forumid` ) ;\n\t\t\t\tALTER TABLE `apx_forum_threads` ADD INDEX ( `forumid` , `del` ) ;\n\t\t\t";
     $queries = split_sql($mysql);
     foreach ($queries as $query) {
         $db->query($query);
     }
 case 110:
     //zu 1.1.1
     //Indizes entfernen
     clearIndices(PRE . '_forum_threads');
     $mysql = "\n\t\t\t\tALTER TABLE `apx_forum_threads` ADD INDEX ( `forumid` , `del` ) ;\n\t\t\t";
     $queries = split_sql($mysql);
     foreach ($queries as $query) {
         $db->query($query);
     }
 case 111:
Example #20
0
/**
 * Update site settings
 * @param array $settings the array of key => value to update.
 * @return boolean true for success, false if failed
 */
function updateSiteSettings($settings)
{
    // This block automatically checks this action against the permissions database before running.
    if (!checkActionPermissionSelf(__FUNCTION__, func_get_args())) {
        addAlert("danger", "Sorry, you do not have permission to access this resource.");
        return false;
    }
    return updateConfig($settings);
}
Example #21
0
            $queries = split_sql($mysql);
            foreach ($queries as $query) {
                $db->query($query);
            }
        case 101:
            //zu 1.0.2
            $mysql = "\n\t\t\t\tINSERT INTO `apx_config` VALUES ('guestbook', 'captcha', 'switch', '', '0', '0', '1150');\n\t\t\t\tINSERT INTO `apx_config` VALUES ('guestbook', 'mailonnew', 'string', '', '', '0', '1300');\n\t\t\t";
            $queries = split_sql($mysql);
            foreach ($queries as $query) {
                $db->query($query);
            }
        case 102:
            //zu 1.0.3
            $mysql = "\n\t\t\t\tUPDATE `apx_config` SET varname = 'captcha' WHERE module = 'guestbook' AND varname = 'capcha';\n\t\t\t";
            $queries = split_sql($mysql);
            foreach ($queries as $query) {
                $db->query($query);
            }
        case 103:
            //zu 1.1.0
            //Indizes entfernen
            clearIndices(PRE . '_guestbook');
            //config Update
            updateConfig('guestbook', "\n\t\t\t\tINSERT INTO `apx_config` (`module`, `varname`, `type`, `addnl`, `value`, `tab`, `lastchange`, `ord`) VALUES\n\t\t\t\t('guestbook', 'blockip', 'array', 'BLOCK', 'a:0:{}', '', 0, 0),\n\t\t\t\t('guestbook', 'blockstring', 'array', 'BLOCK', 'a:0:{}', '', 0, 0),\n\t\t\t\t\n\t\t\t\t('guestbook', 'epp', 'int', '', '10', 'VIEW', 1241809127, 1000),\n\t\t\t\t('guestbook', 'breakline', 'int', '', '0', 'VIEW', 1241809127, 2000),\n\t\t\t\t('guestbook', 'cusfield_names', 'array', '', 'a:0:{}', 'VIEW', 1241809127, 3000),\n\t\t\t\t\n\t\t\t\t('guestbook', 'req_email', 'switch', '', '0', 'OPTIONS', 1241809127, 1000),\n\t\t\t\t('guestbook', 'req_homepage', 'switch', '', '0', 'OPTIONS', 1241809127, 2000),\n\t\t\t\t('guestbook', 'req_title', 'switch', '', '0', 'OPTIONS', 1241809127, 3000),\n\t\t\t\t('guestbook', 'allowsmilies', 'switch', '', '1', 'OPTIONS', 1241809127, 4000),\n\t\t\t\t('guestbook', 'allowcode', 'switch', '', '1', 'OPTIONS', 1241809127, 5000),\n\t\t\t\t('guestbook', 'badwords', 'switch', '', '1', 'OPTIONS', 1241809127, 6000),\n\t\t\t\t('guestbook', 'maxlen', 'int', '', '10000', 'OPTIONS', 1241809127, 7000),\n\t\t\t\t('guestbook', 'spamprot', 'int', '', '1', 'OPTIONS', 1241809127, 8000),\n\t\t\t\t('guestbook', 'captcha', 'switch', '', '1', 'OPTIONS', 1241809127, 9050),\n\t\t\t\t('guestbook', 'mod', 'switch', '', '1', 'OPTIONS', 1241809127, 10000),\n\t\t\t\t('guestbook', 'mailonnew', 'string', '', '', 'OPTIONS', 1241809127, 11000);\n\t\t\t");
            $mysql = "\n\t\t\t\tALTER TABLE `apx_guestbook` CHANGE `ip` `ip` VARCHAR( 15 ) NOT NULL ;\n\t\t\t\t\n\t\t\t\tALTER TABLE `apx_guestbook` ADD INDEX ( `active` ) ;\n\t\t\t";
            $queries = split_sql($mysql);
            foreach ($queries as $query) {
                $db->query($query);
            }
    }
}
Example #22
0
    }
} elseif (SETUPMODE == 'update') {
    switch ($installed_version) {
        case 100:
            //zu 1.0.1
            $mysql = "\n\t\t\t\tALTER TABLE `apx_glossar` ADD `spelling` TINYTEXT NOT NULL AFTER `title` ;\n\t\t\t\tINSERT INTO `apx_config` VALUES ('glossar', 'highlight', 'switch', '', '', '0', '300');\n\t\t\t";
            $queries = split_sql($mysql);
            foreach ($queries as $query) {
                $db->query($query);
            }
        case 101:
            //zu 1.1.0
            //Indizes entfernen
            clearIndices(PRE . '_glossar');
            //config Update
            updateConfig('glossar', "\n\t\t\t\tINSERT INTO `apx_config` (`module`, `varname`, `type`, `addnl`, `value`, `tab`, `lastchange`, `ord`) VALUES\n\t\t\t\t('glossar', 'searchable', 'switch', '', '1', '', 1181326815, 1000),\n\t\t\t\t('glossar', 'epp', 'int', '', '0', '', 1181326815, 2000),\n\t\t\t\t('glossar', 'highlight', 'switch', '', '0', '', 1181326815, 3000),\n\t\t\t\t('glossar', 'coms', 'switch', '', '1', '', 1181326815, 4000),\n\t\t\t\t('glossar', 'ratings', 'switch', '', '1', '', 1181326815, 5000);\n\t\t\t");
            $mysql = "\n\t\t\t\tCREATE TABLE `apx_glossar_tags` (\n\t\t\t\t\t`id` INT( 11 ) UNSIGNED NOT NULL ,\n\t\t\t\t\t`tagid` INT( 11 ) UNSIGNED NOT NULL ,\n\t\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_glossar` ADD INDEX ( `catid` , `starttime` ) ;\n\t\t\t\tALTER TABLE `apx_glossar` ADD INDEX ( `starttime` ) ;\n\t\t\t";
            $queries = split_sql($mysql);
            foreach ($queries as $query) {
                $db->query($query);
            }
            //Tags erzeugen
            transformKeywords(PRE . '_glossar', PRE . '_glossar_tags');
        case 110:
            //zu 1.1.1
            $mysql = "\n\t\t\t\tALTER TABLE `apx_glossar` ADD `meta_description` TEXT NOT NULL AFTER `text` ;\n\t\t\t";
            $queries = split_sql($mysql);
            foreach ($queries as $query) {
                $db->query($query);
            }
    }
Example #23
0
 case 103:
     //zu 1.0.4
     $mysql = "\n\t\t\t\tINSERT INTO `apx_config` VALUES ('gallery', 'galcoms', 'switch', '', '0', '1152120685', '2050');\n\t\t\t\tALTER TABLE `apx_gallery` ADD `allowcoms` TINYINT( 1 ) UNSIGNED NOT NULL AFTER `searchable` ;\n\t\t\t\tUPDATE `apx_gallery` SET allowcoms=1;\n\t\t\t";
     $queries = split_sql($mysql);
     foreach ($queries as $query) {
         $db->query($query);
     }
 case 104:
     //zu 1.0.4
     //Indizes entfernen
     clearIndices(PRE . '_gallery');
     clearIndices(PRE . '_gallery_pics');
     //Tabellenformat ändern
     convertRecursiveTable(PRE . '_gallery');
     //config Update
     updateConfig('gallery', "\n\t\t\t\tINSERT INTO `apx_config` (`module`, `varname`, `type`, `addnl`, `value`, `tab`, `lastchange`, `ord`) VALUES\n\t\t\t\t('gallery', 'potw_time', 'int', 'BLOCK', '1249981414', '', 0, 0),\n\t\t\t\t\n\t\t\t\t('gallery', 'listepp', 'int', '', '5', 'VIEW', 1249816805, 1000),\n\t\t\t\t('gallery', 'galepp', 'int', '', '16', 'VIEW', 1249816805, 2000),\n\t\t\t\t('gallery', 'ordergal', 'select', 'a:3:{i:1;s:11:\"{ORDERTIME}\";i:2;s:12:\"{ORDERTITLE}\";i:3;s:12:\"{ORDERADMIN}\";}', '1', 'VIEW', 1249816805, 3000),\n\t\t\t\t('gallery', 'orderpics', 'select', 'a:2:{i:1;s:10:\"{NEWFIRST}\";i:2;s:10:\"{OLDFIRST}\";}', '1', 'VIEW', 1249816805, 4000),\n\t\t\t\t('gallery', 'new', 'int', '', '3', 'VIEW', 1249816805, 5000),\n\t\t\t\t\n\t\t\t\t('gallery', 'searchable', 'switch', '', '1', 'OPTIONS', 1249816805, 1000),\n\t\t\t\t('gallery', 'subgals', 'switch', '', '1', 'OPTIONS', 1249816805, 2000),\n\t\t\t\t('gallery', 'coms', 'switch', '', '1', 'OPTIONS', 1249816805, 3000),\n\t\t\t\t('gallery', 'galcoms', 'switch', '', '1', 'OPTIONS', 1249816805, 3000),\n\t\t\t\t('gallery', 'ratings', 'switch', '', '1', 'OPTIONS', 1249816805, 4000),\n\t\t\t\t('gallery', 'potw_auto', 'switch', '', '0', 'OPTIONS', 1249816805, 5000),\n\t\t\t\t\n\t\t\t\t('gallery', 'addpics', 'int', '', '10', 'IMAGES', 1249816805, 1000),\n\t\t\t\t('gallery', 'picwidth', 'int', '', '640', 'IMAGES', 1249816805, 2000),\n\t\t\t\t('gallery', 'picheight', 'int', '', '480', 'IMAGES', 1249816805, 3000),\n\t\t\t\t('gallery', 'watermark', 'string', '', '', 'IMAGES', 1249816805, 4000),\n\t\t\t\t('gallery', 'watermark_transp', 'int', '', '50', 'IMAGES', 1249816805, 5000),\n\t\t\t\t('gallery', 'watermark_position', 'select', 'a:9:{i:1;s:18:\"{POSTOP} {POSLEFT}\";i:2;s:20:\"{POSTOP} {POSCENTER}\";i:3;s:19:\"{POSTOP} {POSRIGHT}\";i:4;s:21:\"{POSMIDDLE} {POSLEFT}\";i:5;s:23:\"{POSMIDDLE} {POSCENTER}\";i:6;s:22:\"{POSMIDDLE} {POSRIGHT}\";i:7;s:21:\"{POSBOTTOM} {POSLEFT}\";i:8;s:23:\"{POSBOTTOM} {POSCENTER}\";i:9;s:22:\"{POSBOTTOM} {POSRIGHT}\";}', '9', 'IMAGES', 1249816805, 6000),\n\t\t\t\t('gallery', 'thumbwidth', 'int', '', '120', 'IMAGES', 1249816805, 7000),\n\t\t\t\t('gallery', 'thumbheight', 'int', '', '90', 'IMAGES', 1249816805, 8000),\n\t\t\t\t('gallery', 'quality_resize', 'switch', '', '1', 'IMAGES', 1249816805, 9000),\n\t\t\t\t('gallery', 'popup', 'switch', '', '1', 'IMAGES', 1249816805, 10000),\n\t\t\t\t('gallery', 'popup_addwidth', 'int', '', '60', 'IMAGES', 1249816805, 12000),\n\t\t\t\t('gallery', 'popup_addheight', 'int', '', '150', 'IMAGES', 1249816805, 13000),\n\t\t\t\t('gallery', 'popup_resizeable', 'switch', '', '1', 'IMAGES', 1249816805, 14000);\n\t\t\t");
     $mysql = "\n\t\t\t\tCREATE TABLE `apx_gallery_tags` (\n\t\t\t\t\t`id` INT( 11 ) UNSIGNED NOT NULL ,\n\t\t\t\t\t`tagid` INT( 11 ) UNSIGNED NOT NULL ,\n\t\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_gallery` ADD `restricted` TINYINT( 1 ) UNSIGNED NOT NULL AFTER `allowcoms` ;\n\t\t\t\t\n\t\t\t\tALTER TABLE `apx_gallery` ADD INDEX ( `parents` ) ;\n\t\t\t\tALTER TABLE `apx_gallery` ADD INDEX ( `starttime` , `endtime` , `parents` ) ;\n\t\t\t\tALTER TABLE `apx_gallery_pics` ADD INDEX ( `galid`, `active` ) ;\n\t\t\t\tALTER TABLE `apx_gallery_pics` ADD INDEX ( `active` ) ;\n\t\t\t";
     $queries = split_sql($mysql);
     foreach ($queries as $query) {
         $db->query($query);
     }
     //Tags erzeugen
     transformKeywords(PRE . '_gallery', PRE . '_gallery_tags');
 case 110:
     //zu 1.1.1
     $mysql = "\n\t\t\t\tALTER TABLE `apx_gallery` ADD `meta_description` TEXT NOT NULL AFTER `description` ;\n\t\t\t";
     $queries = split_sql($mysql);
     foreach ($queries as $query) {
         $db->query($query);
     }
 case 111:
Example #24
0
|                                                               |
|                   apexx CMS & Portalsystem                    |
|                 ============================                  |
|           (c) Copyright 2005-2009, Christian Scheb            |
|                  http://www.stylemotion.de                    |
|                                                               |
|---------------------------------------------------------------|
| THIS SOFTWARE IS NOT FREE! MAKE SURE YOU OWN A VALID LICENSE! |
| DO NOT REMOVE ANY COPYRIGHTS WITHOUT PERMISSION!              |
| SOFTWARE BELONGS TO ITS AUTHORS!                              |
\***************************************************************/
//Security-Check
if (!defined('APXRUN')) {
    die('You are not allowed to execute this file directly!');
}
//Installieren
if (SETUPMODE == 'install') {
    $mysql = "\n\t\tINSERT INTO `apx_config` (`module`, `varname`, `type`, `addnl`, `value`, `tab`, `lastchange`, `ord`) VALUES\n\t\t('formmailer', 'sendto', 'array_keys', '', 'a:0:{}', '', 1190662990, 1000);\n\t";
    $queries = split_sql($mysql);
    foreach ($queries as $query) {
        $db->query($query);
    }
} elseif (SETUPMODE == 'uninstall') {
} elseif (SETUPMODE == 'update') {
    switch ($installed_version) {
        case 100:
            //Zu 1.1.0
            //config Update
            updateConfig('formmailer', "\n\t\t\t\tINSERT INTO `apx_config` (`module`, `varname`, `type`, `addnl`, `value`, `tab`, `lastchange`, `ord`) VALUES\n\t\t\t\t('formmailer', 'sendto', 'array_keys', '', 'a:0:{}', '', 1190662990, 1000);\n\t\t\t");
    }
}
        $newTemplate = $newSettings[7];
        if (minMaxRange(1, 150, $template)) {
            $errors[] = lang("CONFIG_TEMPLATE_CHAR_LIMIT", array(1, 150));
        } elseif (!file_exists($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 "models/header.php";
echo "\n<body>\n<div id='wrapper'>\n<div id='top'><div id='logo'></div></div>\n<div id='content'>\n<h1>UserCake</h1>\n<h2>Admin Configuration</h2>\n<div id='left-nav'>";
include "left-nav.php";
echo "\n</div>\n<div id='main'>";
echo resultBlock($errors, $successes);
echo "\n<div id='regbox'>\n<form name='adminConfiguration' action='" . $_SERVER['PHP_SELF'] . "' method='post'>\n<p>\n<label>Website Name:</label>\n<input type='text' name='settings[" . $settings['website_name']['id'] . "]' value='" . $websiteName . "' />\n</p>\n<p>\n<label>Website URL:</label>\n<input type='text' name='settings[" . $settings['website_url']['id'] . "]' value='" . $websiteUrl . "' />\n</p>\n<p>\n<label>Email:</label>\n<input type='text' name='settings[" . $settings['email']['id'] . "]' value='" . $emailAddress . "' />\n</p>\n<p>\n<label>Activation Threshold:</label>\n<input type='text' name='settings[" . $settings['resend_activation_threshold']['id'] . "]' value='" . $resend_activation_threshold . "' />\n</p>\n<p>\n<label>Language:</label>\n<select name='settings[" . $settings['language']['id'] . "]'>";
Example #26
0
         //zu 1.1.4
         $mysql = "\n\t\t\t\tALTER TABLE `apx_articles` CHANGE `sticky` `sticky` INT( 11 ) UNSIGNED NOT NULL DEFAULT '0' ;\n\t\t\t\tUPDATE `apx_articles` SET sticky='3000000000' WHERE sticky=1;\n\t\t\t";
         $queries = split_sql($mysql);
         foreach ($queries as $query) {
             $db->query($query);
         }
     case 114:
         //zu 1.2.0
         //Indizes entfernen
         clearIndices(PRE . '_articles');
         clearIndices(PRE . '_articles_cat');
         clearIndices(PRE . '_articles_pages');
         //Tabellenformat ändern
         convertRecursiveTable(PRE . '_articles_cat');
         //config Update
         updateConfig('articles', "\n\t\t\t\tINSERT INTO `apx_config` (`module`, `varname`, `type`, `addnl`, `value`, `tab`, `lastchange`, `ord`) VALUES\n\t\t\t\t('articles', 'epp', 'int', '', '10', 'VIEW', 1165596044, 1000),\n\t\t\t\t('articles', 'searchepp', 'int', '', '10', 'VIEW', 1165596044, 2000),\n\t\t\t\t('articles', 'archiveepp', 'int', '', '10', 'VIEW', 1165596044, 3000),\n\t\t\t\t('articles', 'archiveall', 'switch', '', '0', 'VIEW', 1165596044, 4000),\n\t\t\t\t('articles', 'archivesort', 'select', 'a:2:{i:1;s:10:\"{NEWFIRST}\";i:2;s:10:\"{OLDFIRST}\";}', '1', 'VIEW', 1165596044, 5000),\n\t\t\t\t('articles', 'archiveentrysort', 'select', 'a:2:{i:1;s:10:\"{NEWFIRST}\";i:2;s:10:\"{OLDFIRST}\";}', '1', 'VIEW', 1165596044, 6000),\n\t\t\t\t\n\t\t\t\t('articles', 'searchable', 'switch', '', '1', 'OPTIONS', 1165596044, 1000),\n\t\t\t\t('articles', 'subcats', 'switch', '', '1', 'OPTIONS', 1165596044, 2000),\n\t\t\t\t('articles', 'teaser', 'switch', '', '1', 'OPTIONS', 1165596044, 3000),\n\t\t\t\t('articles', 'normalonly', 'switch', '', '1', 'OPTIONS', 1165596044, 4000),\n\t\t\t\t('articles', 'coms', 'switch', '', '1', 'OPTIONS', 1165596044, 5000),\n\t\t\t\t('articles', 'ratings', 'switch', '', '1', 'OPTIONS', 1165596044, 6000),\n\t\t\t\t('articles', 'archcoms', 'switch', '', '1', 'OPTIONS', 1165596044, 7000),\n\t\t\t\t('articles', 'archratings', 'switch', '', '1', 'OPTIONS', 1165596044, 8000),\n\t\t\t\t('articles', 'previews_conclusionpage', 'switch', '', '1', 'OPTIONS', 1165596044, 9000),\n\t\t\t\t('articles', 'reviews_conclusionpage', 'switch', '', '1', 'OPTIONS', 1165596044, 10000),\n\t\t\t\t\n\t\t\t\t('articles', 'custom_preview', 'array', '', 'a:0:{}', 'CUSTOM', 1165596044, 1000),\n\t\t\t\t('articles', 'custom_review', 'array', '', 'a:0:{}', 'CUSTOM', 1165596044, 3000),\n\t\t\t\t('articles', 'ratefields', 'array', '', 'a:0:{}', 'CUSTOM', 1165596044, 4000),\n\t\t\t\t('articles', 'awards', 'array', '', 'a:0:{}', 'CUSTOM', 1165596044, 5000),\n\t\t\t\t\n\t\t\t\t('articles', 'artpic_width', 'int', '', '120', 'IMAGES', 1165596044, 1000),\n\t\t\t\t('articles', 'artpic_height', 'int', '', '120', 'IMAGES', 1165596044, 2000),\n\t\t\t\t('articles', 'artpic_popup', 'switch', '', '1', 'IMAGES', 1165596044, 3000),\n\t\t\t\t('articles', 'artpic_popup_width', 'int', '', '640', 'IMAGES', 1165596044, 4000),\n\t\t\t\t('articles', 'artpic_popup_height', 'int', '', '480', 'IMAGES', 1165596044, 5000),\n\t\t\t\t('articles', 'picwidth', 'int', '', '640', 'IMAGES', 1165596044, 6000),\n\t\t\t\t('articles', 'picheight', 'int', '', '480', 'IMAGES', 1165596044, 7000),\n\t\t\t\t('articles', 'watermark', 'string', '', '', 'IMAGES', 1165596044, 8000),\n\t\t\t\t('articles', 'watermark_transp', 'int', '', '50', 'IMAGES', 1165596044, 9000),\n\t\t\t\t('articles', 'watermark_position', 'select', 'a:9:{i:1;s:18:\"{POSTOP} {POSLEFT}\";i:2;s:20:\"{POSTOP} {POSCENTER}\";i:3;s:19:\"{POSTOP} {POSRIGHT}\";i:4;s:21:\"{POSMIDDLE} {POSLEFT}\";i:5;s:23:\"{POSMIDDLE} {POSCENTER}\";i:6;s:22:\"{POSMIDDLE} {POSRIGHT}\";i:7;s:21:\"{POSBOTTOM} {POSLEFT}\";i:8;s:23:\"{POSBOTTOM} {POSCENTER}\";i:9;s:22:\"{POSBOTTOM} {POSRIGHT}\";}', '9', 'IMAGES', 1165596044, 10000),\n\t\t\t\t('articles', 'thumbwidth', 'int', '', '120', 'IMAGES', 1165596044, 11000),\n\t\t\t\t('articles', 'thumbheight', 'int', '', '90', 'IMAGES', 1165596044, 12000),\n\t\t\t\t('articles', 'popup_addwidth', 'int', '', '60', 'IMAGES', 1165596044, 13000),\n\t\t\t\t('articles', 'popup_addheight', 'int', '', '150', 'IMAGES', 1165596044, 14000),\n\t\t\t\t('articles', 'popup_resizeable', 'switch', '', '1', 'IMAGES', 1165596044, 15000),\n\t\t\t\t('articles', 'artpic_quality', 'switch', '', '1', 'IMAGES', 1165596044, 16000);\n\t\t\t");
         $mysql = "\n\t\t\t\tCREATE TABLE `apx_articles_tags` (\n\t\t\t\t\t`id` INT( 11 ) UNSIGNED NOT NULL ,\n\t\t\t\t\t`tagid` INT( 11 ) UNSIGNED NOT NULL ,\n\t\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_articles` ADD `restricted` TINYINT( 1 ) UNSIGNED NOT NULL AFTER `allowrating` ;\n\t\t\t\t\n\t\t\t\tALTER TABLE `apx_articles` ADD INDEX (`userid`) ;\n\t\t\t\tALTER TABLE `apx_articles` ADD INDEX (`catid`) ;\n\t\t\t\tALTER TABLE `apx_articles` ADD INDEX (`starttime`,`endtime`) ;\n\t\t\t\tALTER TABLE `apx_articles_cat` ADD INDEX ( `parents` ) ;\n\t\t\t\tALTER TABLE `apx_articles_pages` ADD INDEX ( `artid` ) ;\n\t\t\t";
         $queries = split_sql($mysql);
         foreach ($queries as $query) {
             $db->query($query);
         }
         //Tags erzeugen
         transformKeywords(PRE . '_articles', PRE . '_articles_tags');
     case 120:
         //zu 1.2.1
         $mysql = "\n\t\t\t\tALTER TABLE `apx_articles` ADD `meta_description` TEXT NOT NULL AFTER `teaser` ;\n\t\t\t";
         $queries = split_sql($mysql);
         foreach ($queries as $query) {
             $db->query($query);
         }
 }
Example #27
0
     case 107:
         //zu 1.0.8
         $mysql = "\n\t\t\t\tALTER TABLE `apx_news` CHANGE `sticky` `sticky` INT( 11 ) UNSIGNED NOT NULL DEFAULT '0' ;\n\t\t\t\tUPDATE `apx_news` SET sticky='3000000000' WHERE sticky=1;\n\t\t\t";
         $queries = split_sql($mysql);
         foreach ($queries as $query) {
             $db->query($query);
         }
     case 108:
         //zu 1.1.0
         //Indizes entfernen
         clearIndices(PRE . '_news');
         clearIndices(PRE . '_news_cat');
         //Tabellenformat ändern
         convertRecursiveTable(PRE . '_news_cat');
         //config Update
         updateConfig('news', "\n\t\t\t\tINSERT INTO `apx_config` (`module`, `varname`, `type`, `addnl`, `value`, `tab`, `lastchange`, `ord`) VALUES\n\t\t\t\t('news', 'epp', 'int', '', '5', 'VIEW', 1249584889, 1000),\n\t\t\t\t('news', 'archiveepp', 'int', '', '5', 'VIEW', 1249584889, 2000),\n\t\t\t\t('news', 'archiveall', 'switch', '', '0', 'VIEW', 1249584889, 3000),\n\t\t\t\t('news', 'searchepp', 'int', '', '10', 'VIEW', 1249584889, 4000),\n\t\t\t\t('news', 'archivesort', 'select', 'a:2:{i:1;s:10:\"{NEWFIRST}\";i:2;s:10:\"{OLDFIRST}\";}', '2', 'VIEW', 1249584889, 5000),\n\t\t\t\t('news', 'archiveentrysort', 'select', 'a:2:{i:1;s:10:\"{NEWFIRST}\";i:2;s:10:\"{OLDFIRST}\";}', '1', 'VIEW', 1249584889, 6000),\n\t\t\t\t\n\t\t\t\t('news', 'searchable', 'switch', '', '1', 'OPTIONS', 1249584889, 1000),\n\t\t\t\t('news', 'subcats', 'switch', '', '1', 'OPTIONS', 1249584889, 2000),\n\t\t\t\t('news', 'teaser', 'switch', '', '1', 'OPTIONS', 1249584889, 3000),\n\t\t\t\t('news', 'coms', 'switch', '', '1', 'OPTIONS', 1249584889, 4000),\n\t\t\t\t('news', 'ratings', 'switch', '', '1', 'OPTIONS', 1249584889, 5000),\n\t\t\t\t('news', 'archcoms', 'switch', '', '1', 'OPTIONS', 1249584889, 6000),\n\t\t\t\t('news', 'archratings', 'switch', '', '1', 'OPTIONS', 1249584889, 7000),\n\t\t\t\t('news', 'captcha', 'switch', '', '1', 'OPTIONS', 1249584889, 8000),\n\t\t\t\t('news', 'spamprot', 'int', '', '1', 'OPTIONS', 1249584889, 9000),\n\t\t\t\t('news', 'mailonnew', 'string', '', '', 'OPTIONS', 1249584889, 10000),\n\t\t\t\t\n\t\t\t\t('news', 'newspic_width', 'int', '', '120', 'IMAGES', 1249584889, 1000),\n\t\t\t\t('news', 'newspic_height', 'int', '', '120', 'IMAGES', 1249584889, 2000),\n\t\t\t\t('news', 'newspic_popup', 'switch', '', '1', 'IMAGES', 1249584889, 3000),\n\t\t\t\t('news', 'newspic_popup_width', 'int', '', '640', 'IMAGES', 1249584889, 4000),\n\t\t\t\t('news', 'newspic_popup_height', 'int', '', '480', 'IMAGES', 1249584889, 5000),\n\t\t\t\t('news', 'newspic_quality', 'switch', '', '1', 'IMAGES', 1249584889, 6000);\n\t\t\t");
         $mysql = "\n\t\t\t\tCREATE TABLE `apx_news_tags` (\n\t\t\t\t\t`id` INT( 11 ) UNSIGNED NOT NULL ,\n\t\t\t\t\t`tagid` INT( 11 ) UNSIGNED NOT NULL ,\n\t\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_news` ADD `restricted` TINYINT( 1 ) UNSIGNED NOT NULL AFTER `allowrating` ;\n\t\t\t\t\n\t\t\t\tALTER TABLE `apx_news` ADD INDEX ( `catid` ) ;\n\t\t\t\tALTER TABLE `apx_news` ADD INDEX ( `userid` ) ;\n\t\t\t\tALTER TABLE `apx_news` ADD INDEX ( `starttime` , `endtime` ) ;\n\t\t\t\tALTER TABLE `apx_news_cat` ADD INDEX ( `parents` ) ;\n\t\t\t";
         $queries = split_sql($mysql);
         foreach ($queries as $query) {
             $db->query($query);
         }
         //Tags erzeugen
         transformKeywords(PRE . '_news', PRE . '_news_tags');
     case 110:
         //zu 1.1.1
         $mysql = "\n\t\t\t\tALTER TABLE `apx_news` ADD `meta_description` TEXT NOT NULL AFTER `galid` ;\n\t\t\t";
         $queries = split_sql($mysql);
         foreach ($queries as $query) {
             $db->query($query);
         }
 }
Example #28
0
} elseif (SETUPMODE == 'update') {
    switch ($installed_version) {
        case 100:
            //zu 1.0.1
            $mysql = "\n\t\t\t\tINSERT INTO `apx_config` ( `module` , `varname` , `type` , `addnl` , `value` , `lastchange` , `ord` ) VALUES ('faq', 'searchable', 'switch', '', '1', '0', '50');\n\t\t\t\tALTER TABLE `apx_faq` ADD `searchable` TINYINT( 1 ) UNSIGNED NOT NULL AFTER `starttime` ;\n\t\t\t\tUPDATE `apx_faq` SET starttime=addtime;\n\t\t\t\tUPDATE `apx_faq` SET searchable='1';\n\t\t\t";
            $queries = split_sql($mysql);
            foreach ($queries as $query) {
                $db->query($query);
            }
        case 101:
            //zu 1.1.0
            //Indizes entfernen
            clearIndices(PRE . '_faq');
            //Tabellenformat ändern
            convertRecursiveTable(PRE . '_faq');
            //config Update
            updateConfig('faq', "\n\t\t\t\tINSERT INTO `apx_config` (`module`, `varname`, `type`, `addnl`, `value`, `tab`, `lastchange`, `ord`) VALUES\n\t\t\t\t('faq', 'searchable', 'switch', '', '1', '', 0, 1000);\n\t\t\t");
            $mysql = "\n\t\t\t\tALTER TABLE `apx_faq` ADD INDEX ( `parents` ) ;\n\t\t\t";
            $queries = split_sql($mysql);
            foreach ($queries as $query) {
                $db->query($query);
            }
        case 110:
            //zu 1.1.1
            $mysql = "\n\t\t\t\tALTER TABLE `apx_faq` ADD `meta_description` TEXT NOT NULL AFTER `answer` ;\n\t\t\t";
            $queries = split_sql($mysql);
            foreach ($queries as $query) {
                $db->query($query);
            }
    }
}
Example #29
0
     case 101:
         //Zu 1.0.2
         $mysql = "\n\t\t\t\tALTER TABLE `apx_links` ADD `broken` INT( 11 ) UNSIGNED NOT NULL AFTER `endtime` ;\n\t\t\t";
         $queries = split_sql($mysql);
         foreach ($queries as $query) {
             $db->query($query);
         }
     case 102:
         //Zu 1.1.0
         //Indizes entfernen
         clearIndices(PRE . '_links');
         clearIndices(PRE . '_links_cat');
         //Tabellenformat ändern
         convertRecursiveTable(PRE . '_links_cat');
         //config Update
         updateConfig('links', "\n\t\t\t\tINSERT INTO `apx_config` (`module`, `varname`, `type`, `addnl`, `value`, `tab`, `lastchange`, `ord`) VALUES\n\t\t\t\t('links', 'epp', 'int', '', '20', 'VIEW', 1249981968, 1000),\n\t\t\t\t('links', 'searchepp', 'string', '', '20', 'VIEW', 1249981881, 2000),\n\t\t\t\t('links', 'catonly', 'switch', '', '1', 'VIEW', 1249981968, 3000),\n\t\t\t\t('links', 'sortby', 'select', 'a:2:{i:1;s:7:\"{TITLE}\";i:2;s:6:\"{DATE}\";}', '1', 'VIEW', 1249981968, 4000),\n\t\t\t\t('links', 'new', 'int', '', '3', 'VIEW', 1249981968, 5000),\n\t\t\t\t\n\t\t\t\t('links', 'searchable', 'switch', '', '1', 'OPTIONS', 1249981968, 1000),\n\t\t\t\t('links', 'coms', 'switch', '', '1', 'OPTIONS', 1249981968, 2000),\n\t\t\t\t('links', 'ratings', 'switch', '', '1', 'OPTIONS', 1249981968, 3000),\n\t\t\t\t('links', 'captcha', 'switch', '', '1', 'OPTIONS', 1249981968, 4000),\n\t\t\t\t('links', 'spamprot', 'int', '', '1', 'OPTIONS', 1249981968, 5000),\n\t\t\t\t('links', 'mailonnew', 'string', '', '', 'OPTIONS', 1249981968, 6000),\n\t\t\t\t('links', 'mailonbroken', 'string', '', '', 'OPTIONS', 1249981968, 7000),\n\t\t\t\t\n\t\t\t\t('links', 'linkpic_width', 'int', '', '120', 'IMAGES', 1249981968, 1000),\n\t\t\t\t('links', 'linkpic_height', 'int', '', '120', 'IMAGES', 1249981968, 2000),\n\t\t\t\t('links', 'linkpic_popup', 'switch', '', '1', 'IMAGES', 1249981968, 3000),\n\t\t\t\t('links', 'linkpic_popup_width', 'int', '', '640', 'IMAGES', 1249981968, 4000),\n\t\t\t\t('links', 'linkpic_popup_height', 'int', '', '480', 'IMAGES', 1249981968, 5000),\n\t\t\t\t('links', 'linkpic_quality', 'switch', '', '1', 'IMAGES', 1249981968, 6000);\n\t\t\t");
         $mysql = "\n\t\t\t\tCREATE TABLE `apx_links_tags` (\n\t\t\t\t\t`id` INT( 11 ) UNSIGNED NOT NULL ,\n\t\t\t\t\t`tagid` INT( 11 ) UNSIGNED NOT NULL ,\n\t\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_links` ADD `restricted` TINYINT( 1 ) UNSIGNED NOT NULL AFTER `allowrating` ;\n\t\t\t\t\n\t\t\t\tALTER TABLE `apx_links` ADD INDEX ( `catid` ) ;\n\t\t\t\tALTER TABLE `apx_links` ADD INDEX ( `userid` ) ;\n\t\t\t\tALTER TABLE `apx_links` ADD INDEX ( `starttime` , `endtime` ) ;\n\t\t\t\tALTER TABLE `apx_links_cat` ADD INDEX ( `parents` ) ;\n\t\t\t";
         $queries = split_sql($mysql);
         foreach ($queries as $query) {
             $db->query($query);
         }
         //Tags erzeugen
         transformKeywords(PRE . '_links', PRE . '_links_tags');
     case 110:
         //Zu 1.1.1
         $mysql = "\n\t\t\t\tALTER TABLE `apx_links` ADD `meta_description` TEXT NOT NULL AFTER `text` ;\n\t\t\t";
         $queries = split_sql($mysql);
         foreach ($queries as $query) {
             $db->query($query);
         }
 }
Example #30
0
    $cookieSetHr = $cookieSetSec / 60;
    return $cookieSetHr;
}
$arrCodes = getCodes();
//print_r($arrCodes);
$frmSubmitPref = isset($frmSubmitPref) ? $frmSubmitPref : '';
if ($frmSubmitPref == "Submit") {
    $priColor = "#6A6A6A";
    $secColor = "#6FCDF9";
    $shade1Color = "#FFFFFF";
    $shade2Color = "#FFFFFF";
    $cookieSet = convertHrsToSec($cookieSet);
    $arrKeys = array('thIntPassLen', 'thIntPassRetLimit', 'thIntCookieExp', 'thIntPageLimit');
    $arrValues = array($passLen, $passRetLimit, $cookieSet, $pageLimit);
    $strSetupDir = empty($ThUserData['domain']) ? "" : $ThUserData['domain'] . '/';
    updateConfig($arrKeys, $arrValues, "setup/" . $strSetupDir . "setting.php");
    //echo "<== REACHED THIS PLACE ==><BR>";
    //exit();
    $frmSubmitPref = "";
    header("Location: " . $HTTP_SERVER_VARS['PHP_SELF'] . '?part=4&class_type=Settings&itemID_=6&busItem=Settings&permit_type=Settings&settings_type=Syssettings&item_id=Settings&v=1');
}
//--- chk the sublevels
/*if(   ! is_valid_sublevels(167))
 {
 	setUrlRedirect('index.php?part=999');
	
 } 
*/
?>

<script language="JavaScript" src="includes/AnchorPosition.js"></script>