Example #1
0
    foreach ($queries as $query) {
        $db->query($query);
    }
} 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 #2
0
     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:
     //zu 1.2.0
     //Beiträge gelöschter Themen als nicht-gelöscht markieren
     $data = $db->fetch("SELECT threadid FROM " . PRE . "_forum_threads WHERE del!=0");
     $threadIds = get_ids($data, 'threadid');
     if ($threadIds) {
         $db->query("UPDATE " . PRE . "_forum_posts SET del=0 WHERE threadid IN (" . implode(',', $threadIds) . ")");
     }
     $mysql = "\n\t\t\t\tALTER TABLE `apx_forums` ADD `stylesheet` TINYTEXT NOT NULL AFTER `inherit` ;\n\t\t\t\tALTER TABLE `apx_forum_threads` ADD `prefix` INT( 11 ) UNSIGNED NOT NULL AFTER `forumid` ;\n\t\t\t\tALTER TABLE `apx_forum_attachments` ADD `thumbnail` TINYTEXT NOT NULL AFTER `file` ; \n\t\t\t\tALTER TABLE `apx_forums` ADD `lastpost` INT( 11 ) UNSIGNED NOT NULL AFTER `children` ;\n\t\t\t\tALTER TABLE `apx_forums` ADD `lastthread` INT( 11 ) UNSIGNED NOT NULL AFTER `lastposttime` , ADD `lastthread_title` TINYTEXT NOT NULL AFTER `lastthread`, ADD `lastthread_icon` INT( 11 ) NOT NULL DEFAULT '-1' AFTER `lastthread_title` , ADD `lastthread_prefix` INT( 11 ) UNSIGNED NOT NULL AFTER `lastthread_icon` ;\n\t\t\t\t\n\t\t\t\tINSERT INTO `apx_cron` VALUES ('clean', 'forum', '86400', '1268002800', '');\n\t\t\t\t\n\t\t\t\tCREATE TABLE `apx_forum_activity` (\n\t\t\t\t  `userid` int(11) unsigned NOT NULL,\n\t\t\t\t  `ip` int(11) unsigned NOT NULL,\n\t\t\t\t  `type` enum('forum','thread') NOT NULL,\n\t\t\t\t  `id` int(11) unsigned NOT NULL,\n\t\t\t\t  `time` int(11) unsigned NOT NULL,\n\t\t\t\t  `invisible` tinyint(1) unsigned NOT NULL,\n\t\t\t\t  PRIMARY KEY  (`userid`,`ip`,`type`,`id`)\n\t\t\t\t) ENGINE=MyISAM;\n\t\t\t\t\n\t\t\t\tCREATE TABLE `apx_forum_anndisplay` (\n\t\t\t\t  `id` int(11) unsigned NOT NULL,\n\t\t\t\t  `forumid` int(11) unsigned NOT NULL,\n\t\t\t\t  PRIMARY KEY  (`id`,`forumid`)\n\t\t\t\t) ENGINE=MyISAM;\n\t\t\t\t\n\t\t\t\tCREATE TABLE `apx_forum_announcements` (\n\t\t\t\t  `id` int(11) unsigned NOT NULL auto_increment,\n\t\t\t\t  `userid` int(11) unsigned NOT NULL,\n\t\t\t\t  `title` varchar(255) NOT NULL default '',\n\t\t\t\t  `text` text NOT NULL,\n\t\t\t\t  `addtime` int(11) unsigned NOT NULL,\n\t\t\t\t  `starttime` int(11) unsigned NOT NULL,\n\t\t\t\t  `endtime` int(11) unsigned NOT NULL,\n\t\t\t\t  `views` int(11) unsigned NOT NULL default '0',\n\t\t\t\t  PRIMARY KEY  (`id`),\n\t\t\t\t  KEY `starttime` (`starttime`,`endtime`)\n\t\t\t\t) ENGINE=MyISAM ;\n\t\t\t\t\n\t\t\t\tCREATE TABLE `apx_forum_prefixes` (\n\t\t\t\t  `prefixid` int(11) unsigned NOT NULL auto_increment,\n\t\t\t\t  `forumid` int(11) unsigned NOT NULL,\n\t\t\t\t  `title` tinytext NOT NULL,\n\t\t\t\t  `code` tinytext NOT NULL,\n\t\t\t\t  PRIMARY KEY  (`prefixid`)\n\t\t\t\t) ENGINE=MyISAM ;\n\t\t\t";
     $queries = split_sql($mysql);
Example #3
0
    foreach ($queries as $query) {
        $db->query($query);
    }
} 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 #4
0
     foreach ($queries as $query) {
         $db->query($query);
     }
 case 113:
     //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);
Example #5
0
     list($check) = $db->first("SELECT varname FROM " . PRE . "_config WHERE module='news' AND varname='searchepp' LIMIT 1");
     if (!$check) {
         $db->query("INSERT INTO " . PRE . "_config VALUES ('news', 'searchepp', 'int', '', '10', '0', '1630');");
     }
 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);
Example #6
0
                $db->query($query);
            }
        case 103:
            //zu 1.0.4
            $mysql = "\n\t\t\t\tALTER TABLE `apx_stats_userenv` CHANGE `value` `value` VARCHAR( 32 ) NOT NULL;\n\t\t\t\tALTER TABLE `apx_stats_userenv` ADD INDEX ( `daystamp` , `type` , `value` ) ;\n\t\t\t";
            $queries = split_sql($mysql);
            foreach ($queries as $query) {
                $db->query($query);
            }
        case 104:
            //zu 1.0.5
            $mysql = "\n\t\t\t\tALTER TABLE `apx_stats` ADD `weekday` TINYINT( 1 ) UNSIGNED NOT NULL AFTER `daystamp` ;\n\t\t\t\tUPDATE `apx_stats` SET weekday = WEEKDAY(CONCAT(LEFT(daystamp,4),'-',SUBSTR(daystamp,5,2),'-',SUBSTR(daystamp,7,2)));\n\t\t\t";
            $queries = split_sql($mysql);
            foreach ($queries as $query) {
                $db->query($query);
            }
        case 105:
            //zu 1.1.0
            //Indizes entfernen
            clearIndices(PRE . '_stats_iplog');
            clearIndices(PRE . '_stats_referer');
            clearIndices(PRE . '_stats_userenv');
            //config Update
            updateConfig('stats', "\n\t\t\t\tINSERT INTO `apx_config` (`module`, `varname`, `type`, `addnl`, `value`, `tab`, `lastchange`, `ord`) VALUES\n\t\t\t\t('stats', 'referer_filter', 'array', 'BLOCK', 'a:0:{}', '', 0, 0),\n\t\t\t\t\n\t\t\t\t('stats', 'startcount', 'int', '', '0', '', 1151948463, 1000),\n\t\t\t\t('stats', 'blockip', 'int', '', '24', '', 1151948463, 2000),\n\t\t\t\t('stats', 'cookie', 'switch', '', '1', '', 1151948463, 3000),\n\t\t\t\t('stats', 'countsearchengine', 'switch', '', '0', '', 1151948463, 4000),\n\t\t\t\t('stats', 'ownreferer', 'switch', '', '0', '', 1151948463, 5000);\n\t\t\t");
            $mysql = "\n\t\t\t\tALTER TABLE `apx_stats_iplog` CHANGE `ip` `ip` INT( 11 ) UNSIGNED NOT NULL ;\n\t\t\t\tTRUNCATE TABLE `apx_stats_iplog` ;\n\t\t\t\tALTER TABLE `apx_stats_iplog` ADD PRIMARY KEY ( `ip` , `time` ) ;\n\t\t\t\t\n\t\t\t\tALTER TABLE `apx_stats_referer` ADD INDEX ( `daystamp` ) ;\n\t\t\t\tALTER TABLE `apx_stats_referer` ADD INDEX ( `hash` ) ;\n\t\t\t\t\n\t\t\t\tCREATE TABLE `apx_stats_userenv_new` (\n\t\t\t\t  `daystamp` int(8) unsigned NOT NULL default '0',\n\t\t\t\t  `type` enum('browser','os','country') NOT NULL default 'browser',\n\t\t\t\t  `value` varchar(32) NOT NULL,\n\t\t\t\t  `hits` int(11) unsigned NOT NULL default '0',\n\t\t\t\t  PRIMARY KEY  (`daystamp`,`type`,`value`)\n\t\t\t\t) ENGINE=MyISAM;\n\t\t\t\tINSERT INTO `apx_stats_userenv_new` (\n\t\t\t\t\tSELECT daystamp, type, value, sum(hits) AS hits FROM `apx_stats_userenv` GROUP BY daystamp, type, value\n\t\t\t\t);\n\t\t\t\tDROP TABLE `apx_stats_userenv`;\n\t\t\t\tRENAME TABLE `apx_stats_userenv_new` TO `apx_stats_userenv` ;\n\t\t\t";
            $queries = split_sql($mysql);
            foreach ($queries as $query) {
                $db->query($query);
            }
    }
}
Example #7
0
if (!defined('APXRUN')) {
    die('You are not allowed to execute this file directly!');
}
//Installieren
if (SETUPMODE == 'install') {
    $mysql = "\n\t\tCREATE TABLE `apx_ratings` (\n\t\t  `id` int(11) unsigned NOT NULL auto_increment,\n\t\t  `module` varchar(50) NOT NULL default '',\n\t\t  `mid` int(11) unsigned NOT NULL default '0',\n\t\t  `rating` smallint(5) NOT NULL default '0',\n\t\t  `ip` varchar(15) NOT NULL,\n\t\t  `time` int(11) unsigned NOT NULL default '0',\n\t\t  PRIMARY KEY  (`id`),\n\t\t  KEY `module` (`module`,`mid`)\n\t\t) ENGINE=MyISAM ;\n\t\t\n\t\tINSERT INTO `apx_config` (`module`, `varname`, `type`, `addnl`, `value`, `tab`, `lastchange`, `ord`) VALUES\n\t\t('ratings', 'possible', 'array_keys', '', '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\";}', '', 1120514753, 1000),\n\t\t('ratings', 'digits', 'int', '', '1', '', 1120514753, 2000),\n\t\t('ratings', 'block', 'int', '', '1440', '', 1120514753, 3000);\n\t";
    $queries = split_sql($mysql);
    foreach ($queries as $query) {
        $db->query($query);
    }
} elseif (SETUPMODE == 'uninstall') {
    $mysql = "\n\t\tDROP TABLE `apx_ratings`;\n\t";
    $queries = split_sql($mysql);
    foreach ($queries as $query) {
        $db->query($query);
    }
} elseif (SETUPMODE == 'update') {
    switch ($installed_version) {
        case 100:
            //Zu 1.1.0
            //Indizes entfernen
            clearIndices(PRE . '_ratings');
            //config Update
            updateConfig('ratings', "\n\t\t\t\tINSERT INTO `apx_config` (`module`, `varname`, `type`, `addnl`, `value`, `tab`, `lastchange`, `ord`) VALUES\n\t\t\t\t('ratings', 'possible', 'array_keys', '', '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\";}', '', 1120514753, 1000),\n\t\t\t\t('ratings', 'digits', 'int', '', '1', '', 1120514753, 2000),\n\t\t\t\t('ratings', 'block', 'int', '', '1440', '', 1120514753, 3000);\n\t\t\t");
            $mysql = "\n\t\t\t\tALTER TABLE `apx_ratings` CHANGE `ip` `ip` VARCHAR( 15 ) NOT NULL ;\n\t\t\t\t\n\t\t\t\tALTER TABLE `apx_ratings` CHANGE `module` `module` VARCHAR( 50 ) NOT NULL ; \n\t\t\t\tALTER TABLE `apx_ratings` ADD INDEX ( `module` , `mid` ) ;\n\t\t\t";
            $queries = split_sql($mysql);
            foreach ($queries as $query) {
                $db->query($query);
            }
    }
}
Example #8
0
     $queries = split_sql($mysql);
     foreach ($queries as $query) {
         $db->query($query);
     }
 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);
Example #9
0
if (SETUPMODE == 'install') {
    $mysql = "\n\t\tCREATE TABLE `apx_affiliates` (\n\t\t  `id` int(11) unsigned NOT NULL auto_increment,\n\t\t  `title` tinytext NOT NULL,\n\t\t  `image` tinytext NOT NULL,\n\t\t  `link` tinytext NOT NULL,\n\t\t  `hits` int(11) unsigned NOT NULL default '0',\n\t\t  `ord` smallint(4) unsigned NOT NULL default '0',\n\t\t  `active` tinyint(1) unsigned NOT NULL default '0',\n\t\t  PRIMARY KEY  (`id`),\n\t\t  KEY `active` (`active`)\n\t\t) ENGINE=MyISAM;\n\t\t\n\t\tINSERT INTO `apx_config` (`module`, `varname`, `type`, `addnl`, `value`, `tab`, `lastchange`, `ord`) VALUES\n\t\t('affiliates', 'orderby', 'select', 'a:4:{i:1;s:12:\"{ORDERADMIN}\";i:2;s:16:\"{ORDERHITS_DESC}\";i:3;s:15:\"{ORDERHITS_ASC}\";i:4;s:13:\"{ORDERRANDOM}\";}', '4', '', 1129897415, 1000);\n\t";
    $queries = split_sql($mysql);
    foreach ($queries as $query) {
        $db->query($query);
    }
    //Ordner für Bilder
    require_once BASEDIR . 'lib/class.mediamanager.php';
    $mm = new mediamanager();
    $mm->createdir('affiliates');
} elseif (SETUPMODE == 'uninstall') {
    $mysql = "\n\t\tDROP TABLE `apx_affiliates`;\n\t";
    $queries = split_sql($mysql);
    foreach ($queries as $query) {
        $db->query($query);
    }
} elseif (SETUPMODE == 'update') {
    switch ($installed_version) {
        case 100:
            //Zu 1.1.0
            //Indizes entfernen
            clearIndices(PRE . '_affiliates');
            //config Update
            updateConfig('affiliates', "\n\t\t\t\tINSERT INTO `apx_config` (`module`, `varname`, `type`, `addnl`, `value`, `tab`, `lastchange`, `ord`) VALUES\n\t\t\t\t('affiliates', 'orderby', 'select', 'a:4:{i:1;s:12:\"{ORDERADMIN}\";i:2;s:16:\"{ORDERHITS_DESC}\";i:3;s:15:\"{ORDERHITS_ASC}\";i:4;s:13:\"{ORDERRANDOM}\";}', '4', '', 1129897415, 1000);\n\t\t\t");
            $mysql = "\n\t\t\t\tALTER TABLE `apx_affiliates` ADD INDEX ( `active` ) ;\n\t\t\t";
            $queries = split_sql($mysql);
            foreach ($queries as $query) {
                $db->query($query);
            }
    }
}
Example #10
0
    foreach ($queries as $query) {
        $db->query($query);
    }
} elseif (SETUPMODE == 'uninstall') {
    $mysql = "\n\t\tDROP TABLE `apx_banner`;\n\t";
    $queries = split_sql($mysql);
    foreach ($queries as $query) {
        $db->query($query);
    }
} elseif (SETUPMODE == 'update') {
    switch ($installed_version) {
        case 100:
            //zu 1.0.1
            $mysql = "\n\t\t\t\tINSERT INTO `apx_config` VALUES ('banner', 'groups', 'array', 'BLOCK', 'a:10:{i:1;s:8:\"Gruppe 1\";i:2;s:8:\"Gruppe 2\";i:3;s:8:\"Gruppe 3\";i:4;s:8:\"Gruppe 4\";i:5;s:8:\"Gruppe 5\";i:6;s:8:\"Gruppe 6\";i:7;s:8:\"Gruppe 7\";i:8;s:8:\"Gruppe 8\";i:9;s:8:\"Gruppe 9\";i:10;s:9:\"Gruppe 10\";}', 0, 0);\n\t\t\t\tALTER TABLE `apx_banner` ADD `starttime` INT( 11 ) UNSIGNED NOT NULL AFTER `group` ,ADD `endtime` INT( 11 ) UNSIGNED NOT NULL AFTER `starttime` ;\n\t\t\t\tUPDATE `apx_banner` SET starttime='1136070000', endtime='3000000000' WHERE active='1';\n\t\t\t\tALTER TABLE `apx_banner` DROP `active`;\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 . '_banner');
            //config Update
            updateConfig('banner', "\n\t\t\t\tINSERT INTO `apx_config` (`module`, `varname`, `type`, `addnl`, `value`, `tab`, `lastchange`, `ord`) VALUES\n\t\t\t\t('banner', 'groups', 'array', 'BLOCK', 'a:0:{}', '', 0, 0);\n\t\t\t");
            $mysql = "\n\t\t\t\tALTER TABLE `apx_banner` ADD `capping` INT( 11 ) UNSIGNED NOT NULL AFTER `views` ;\n\t\t\t\t\n\t\t\t\tALTER TABLE `apx_banner` ADD INDEX ( `group` , `starttime` , `endtime` ) ;\n\t\t\t";
            $queries = split_sql($mysql);
            foreach ($queries as $query) {
                $db->query($query);
            }
    }
}
Example #11
0
         foreach ($data as $res) {
             $db->query("UPDATE " . PRE . "_products SET media='|" . $res['media'] . "|', systems='" . dash_serialize(unserialize($res['media'])) . "' WHERE id='" . $res['id'] . "' LIMIT 1");
             if (in_array($res['type'], array('software', 'book', 'music'))) {
                 $db->query("UPDATE " . PRE . "_products_releases SET system='" . $res['media'] . "' WHERE prodid='" . $res['id'] . "'");
             }
         }
     }
     //Tags erzeugen
     transformKeywords(PRE . '_products', PRE . '_products_tags');
 case 110:
     //zu 1.1.1
     //Indizes entfernen
     clearIndices(PRE . '_products');
     clearIndices(PRE . '_products_groups');
     clearIndices(PRE . '_products_releases');
     clearIndices(PRE . '_products_units');
     $mysql = "\n\t\t\t\tALTER TABLE `apx_products` ADD `restricted` TINYINT( 1 ) UNSIGNED NOT NULL AFTER `allowrating` ;\n\t\t\t\t\n\t\t\t\tALTER TABLE `apx_products` ADD INDEX ( `type` ) ;\n\t\t\t\tALTER TABLE `apx_products` ADD INDEX ( `active` ) ;\n\t\t\t\tALTER TABLE `apx_products_groups` ADD INDEX ( `grouptype` ) ;\n\t\t\t\tALTER TABLE `apx_products_groups` ADD INDEX ( `type` ) ;\n\t\t\t\tALTER TABLE `apx_products_releases` ADD INDEX ( `prodid` ) ;\n\t\t\t\tALTER TABLE `apx_products_releases` ADD INDEX ( `stamp` ) ;\n\t\t\t\tALTER TABLE `apx_products_units` ADD INDEX ( `type` ) ;\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\tINSERT INTO `apx_config` VALUES ('products', 'manu_searchepp', 'int', '', '20', 'VIEW', '0', '2500');\n\t\t\t\tINSERT INTO `apx_config` VALUES ('products', 'searchepp', 'int', '', '20', 'VIEW', '0', '3500');\n\t\t\t";
     $queries = split_sql($mysql);
     foreach ($queries as $query) {
         $db->query($query);
     }
 case 112:
     //zu 1.1.3
     require_once dirname(__FILE__) . '/setup_funcs.php';
Example #12
0
     $queries = split_sql($mysql);
     foreach ($queries as $query) {
         $db->query($query);
     }
 case 107:
     //zu 1.0.8
     $mysql = "\n\t\t\t\tUPDATE `apx_config` SET type='switch' WHERE module='downloads' AND varname='exttraffic';\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 . '_downloads');
     clearIndices(PRE . '_downloads_cat');
     //Tabellenformat ändern
     convertRecursiveTable(PRE . '_downloads_cat');
     //config Update
     updateConfig('downloads', "\n\t\t\t\tINSERT INTO `apx_config` (`module`, `varname`, `type`, `addnl`, `value`, `tab`, `lastchange`, `ord`) VALUES\n\t\t\t\t('downloads', 'epp', 'int', '', '20', 'VIEW', 1249981881, 1000),\n\t\t\t\t('downloads', 'searchepp', 'string', '', '20', 'VIEW', 1249981881, 2000),\n\t\t\t\t('downloads', 'catonly', 'switch', '', '1', 'VIEW', 1249981881, 3000),\n\t\t\t\t('downloads', 'sortby', 'select', 'a:2:{i:1;s:7:\"{TITLE}\";i:2;s:6:\"{DATE}\";}', '1', 'VIEW', 1249981881, 4000),\n\t\t\t\t('downloads', 'new', 'int', '', '3', 'VIEW', 1249981881, 5000),\n\t\t\t\t\n\t\t\t\t('downloads', 'searchable', 'switch', '', '1', 'OPTIONS', 1249981881, 1000),\n\t\t\t\t('downloads', 'regonly', 'switch', '', '0', 'OPTIONS', 1249981881, 2000),\n\t\t\t\t('downloads', 'maxtraffic', 'float', '', '0', 'OPTIONS', 1249981881, 3000),\n\t\t\t\t('downloads', 'exttraffic', 'switch', '', '0', 'OPTIONS', 1249981881, 4000),\n\t\t\t\t('downloads', 'mirrorstats', 'switch', '', '1', 'OPTIONS', 1301669229, 4500),\n\t\t\t\t('downloads', 'coms', 'switch', '', '1', 'OPTIONS', 1249981881, 5000),\n\t\t\t\t('downloads', 'ratings', 'switch', '', '1', 'OPTIONS', 1249981881, 6000),\n\t\t\t\t('downloads', 'captcha', 'switch', '', '1', 'OPTIONS', 1249981881, 7000),\n\t\t\t\t('downloads', 'spamprot', 'int', '', '0', 'OPTIONS', 1249981881, 8000),\n\t\t\t\t('downloads', 'mailonnew', 'string', '', '', 'OPTIONS', 1249981881, 9000),\n\t\t\t\t('downloads', 'mailonbroken', 'string', '', '', 'OPTIONS', 1249981881, 10000),\n\t\t\t\t\n\t\t\t\t('downloads', 'addpics', 'int', '', '5', 'IMAGES', 1249981881, 1000),\n\t\t\t\t('downloads', 'picwidth', 'int', '', '640', 'IMAGES', 1249981881, 2000),\n\t\t\t\t('downloads', 'picheight', 'int', '', '480', 'IMAGES', 1249981881, 3000),\n\t\t\t\t('downloads', 'watermark', 'string', '', '', 'IMAGES', 1249981881, 4000),\n\t\t\t\t('downloads', 'watermark_transp', 'int', '', '50', 'IMAGES', 1249981881, 5000),\n\t\t\t\t('downloads', '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', 1249981881, 6000),\n\t\t\t\t('downloads', 'thumbwidth', 'int', '', '120', 'IMAGES', 1249981881, 7000),\n\t\t\t\t('downloads', 'thumbheight', 'int', '', '90', 'IMAGES', 1249981881, 8000),\n\t\t\t\t('downloads', 'quality_resize', 'switch', '', '1', 'IMAGES', 1249981881, 9000);\n\t\t\t\t\n\t\t\t\tALTER TABLE `apx_downloads` ADD INDEX ( `catid` ) ;\n\t\t\t\tALTER TABLE `apx_downloads` ADD INDEX ( `userid` ) ;\n\t\t\t\tALTER TABLE `apx_downloads` ADD INDEX ( `starttime` , `endtime` ) ;\n\t\t\t\tALTER TABLE `apx_downloads_cat` ADD INDEX ( `parents` ) ;\n\t\t\t");
     $mysql = "\n\t\t\t\tCREATE TABLE `apx_downloads_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_downloads` ADD `restricted` TINYINT( 1 ) UNSIGNED NOT NULL AFTER `allowrating` ;\n\t\t\t";
     $queries = split_sql($mysql);
     foreach ($queries as $query) {
         $db->query($query);
     }
     //Tags erzeugen
     transformKeywords(PRE . '_downloads', PRE . '_downloads_tags');
 case 110:
     //zu 1.1.1
     $mysql = "\n\t\t\t\tALTER TABLE `apx_downloads` ADD `meta_description` TEXT NOT NULL AFTER `text` ;\n\t\t\t";
     $queries = split_sql($mysql);
Example #13
0
            $queries = split_sql($mysql);
            foreach ($queries as $query) {
                $db->query($query);
            }
        case 103:
            //zu 1.0.4
            $mysql = "\n\t\t\t\tINSERT INTO `apx_config` VALUES ('comments', 'order', 'select', 'a:2:{i:0;s:10:\"{NEWFIRST}\";i:1;s:10:\"{OLDFIRST}\";}', '0', '0', '150');\n\t\t\t";
            $queries = split_sql($mysql);
            foreach ($queries as $query) {
                $db->query($query);
            }
        case 103:
            //zu 1.0.4
            $mysql = "\n\t\t\t\tINSERT INTO `apx_config` VALUES ('comments', 'reportmail', 'string', '', '', '0', '1225');\n\t\t\t";
            $queries = split_sql($mysql);
            foreach ($queries as $query) {
                $db->query($query);
            }
        case 105:
            //zu 1.1.0
            //Indizes entfernen
            clearIndices(PRE . '_comments');
            //config Update
            updateConfig('comments', "\n\t\t\t\tINSERT INTO `apx_config` (`module`, `varname`, `type`, `addnl`, `value`, `tab`, `lastchange`, `ord`) VALUES\n\t\t\t\t('comments', 'blockip', 'array', 'BLOCK', 'a:0:{}', '', 0, 0),\n\t\t\t\t('comments', 'blockstring', 'array', 'BLOCK', 'a:0:{}', '', 0, 0),\n\t\t\t\t\n\t\t\t\t('comments', 'epp', 'int', '', '5', 'VIEW', 1241811530, 100),\n\t\t\t\t('comments', 'order', 'select', 'a:2:{i:0;s:10:\"{NEWFIRST}\";i:1;s:10:\"{OLDFIRST}\";}', '0', 'VIEW', 1241811530, 1000),\n\t\t\t\t('comments', 'breakline', 'int', '', '0', 'VIEW', 1241811530, 2000),\n\t\t\t\t('comments', 'popup', 'switch', '', '1', 'VIEW', 1241811530, 3000),\n\t\t\t\t('comments', 'popup_width', 'int', '', '500', 'VIEW', 1241811530, 4000),\n\t\t\t\t('comments', 'popup_height', 'int', '', '500', 'VIEW', 1241811530, 5000),\n\t\t\t\t\n\t\t\t\t('comments', 'pub', 'switch', '', '1', 'OPTIONS', 1241811530, 1000),\n\t\t\t\t('comments', 'maxlen', 'int', '', '10000', 'OPTIONS', 1241811530, 2000),\n\t\t\t\t('comments', 'spamprot', 'int', '', '1', 'OPTIONS', 1241811530, 3000),\n\t\t\t\t('comments', 'captcha', 'switch', '', '1', 'OPTIONS', 1241811530, 4000),\n\t\t\t\t('comments', 'mod', 'switch', '', '0', 'OPTIONS', 1241811530, 5000),\n\t\t\t\t('comments', 'req_email', 'switch', '', '0', 'OPTIONS', 1241811530, 6000),\n\t\t\t\t('comments', 'req_homepage', 'switch', '', '0', 'OPTIONS', 1241811530, 7000),\n\t\t\t\t('comments', 'req_title', 'switch', '', '0', 'OPTIONS', 1241811530, 8000),\n\t\t\t\t('comments', 'allowsmilies', 'switch', '', '1', 'OPTIONS', 1241811530, 9000),\n\t\t\t\t('comments', 'allowcode', 'switch', '', '1', 'OPTIONS', 1241811530, 10000),\n\t\t\t\t('comments', 'badwords', 'switch', '', '1', 'OPTIONS', 1241811530, 11000),\n\t\t\t\t('comments', 'reportmail', 'string', '', '', 'OPTIONS', 1241811530, 12000),\n\t\t\t\t('comments', 'mailonnew', 'string', '', '', 'OPTIONS', 1241811530, 13000);\n\t\t\t");
            $mysql = "\n\t\t\t\tALTER TABLE `apx_comments` ADD INDEX ( `module` , `mid` , `active` ) ;\n\t\t\t";
            $queries = split_sql($mysql);
            foreach ($queries as $query) {
                $db->query($query);
            }
    }
}
Example #14
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 #15
0
     $mysql = "\n\t\t\t\tINSERT INTO `apx_config` VALUES ('poll', 'archall', 'switch', '', '0', '0', '700');\n\t\t\t";
     $queries = split_sql($mysql);
     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 #16
0
     //zu 1.1.4
     list($check) = $db->first("SELECT module FROM " . PRE . "_config WHERE module='user' AND varname='avatar_resize' LIMIT 1");
     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:
Example #17
0
    foreach ($queries as $query) {
        $db->query($query);
    }
} 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:
Example #18
0
     }
 case 107:
     //Zu 1.1.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);
     }
Example #19
0
} elseif (SETUPMODE == 'update') {
    switch ($installed_version) {
        case 100:
            //zu 1.0.1
        //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';
Example #20
0
     $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_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);
Example #21
0
             $db->query("UPDATE " . PRE . "_calendar_cat SET lft='" . $lft . "', rgt='" . ($lft + 1) . "' WHERE id='" . $res['id'] . "' LIMIT 1");
             $lft += 2;
         }
     }
 case 101:
     //zu 1.0.2
     $mysql = "\n\t\t\t\tINSERT INTO `apx_config` VALUES ('calendar', 'searchepp', 'int', '', '20', '0', '150');\n\t\t\t\tALTER TABLE `apx_calendar_events` ADD `location_link` TINYTEXT NOT NULL AFTER `location` ;\n\t\t\t\tALTER TABLE `apx_calendar_events` ADD `links` TEXT NOT NULL AFTER `galid` ;\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 . '_calendar_cat');
     clearIndices(PRE . '_calendar_events');
     //Tabellenformat ändern
     convertRecursiveTable(PRE . '_calendar_cat');
     //config Update
     updateConfig('calendar', "\n\t\t\t\tINSERT INTO `apx_config` (`module`, `varname`, `type`, `addnl`, `value`, `tab`, `lastchange`, `ord`) VALUES\n\t\t\t\t('calendar', 'eventdays', 'int', '', '7', 'VIEW', 1219685244, 1000),\n\t\t\t\t('calendar', 'searchepp', 'int', '', '20', 'VIEW', 1219685244, 2000),\n\t\t\t\t('calendar', 'sortby', 'select', 'a:2:{i:1;s:13:\"{SORTBY_TIME}\";i:2;s:14:\"{SORTBY_TITLE}\";}', '1', 'VIEW', 1219685244, 3000),\n\t\t\t\t\n\t\t\t\t('calendar', 'searchable', 'switch', '', '1', 'OPTIONS', 1219685244, 1000),\n\t\t\t\t('calendar', 'subcats', 'switch', '', '1', 'OPTIONS', 1219685244, 2000),\n\t\t\t\t('calendar', 'userevents', 'switch', '', '1', 'OPTIONS', 1219685244, 3000),\n\t\t\t\t('calendar', 'captcha', 'switch', '', '1', 'OPTIONS', 1219685244, 4000),\n\t\t\t\t('calendar', 'mailonnew', 'string', '', '', 'OPTIONS', 1219685244, 5000),\n\t\t\t\t('calendar', 'coms', 'switch', '', '1', 'OPTIONS', 1219685244, 6000),\n\t\t\t\t('calendar', 'note', 'switch', '', '1', 'OPTIONS', 1219685244, 7000),\n\t\t\t\t\n\t\t\t\t('calendar', 'pic_width', 'int', '', '120', 'IMAGES', 1219685244, 1000),\n\t\t\t\t('calendar', 'pic_height', 'int', '', '120', 'IMAGES', 1219685244, 2000),\n\t\t\t\t('calendar', 'pic_popup', 'switch', '', '1', 'IMAGES', 1219685244, 3000),\n\t\t\t\t('calendar', 'pic_popup_width', 'int', '', '640', 'IMAGES', 1219685244, 4000),\n\t\t\t\t('calendar', 'pic_popup_height', 'int', '', '480', 'IMAGES', 1219685244, 5000),\n\t\t\t\t('calendar', 'pic_quality', 'switch', '', '1', 'IMAGES', 1219685244, 6000);\n\t\t\t");
     $mysql = "\n\t\t\t\tCREATE TABLE `apx_calendar_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_calendar_events` ADD `restricted` TINYINT( 1 ) UNSIGNED NOT NULL AFTER `allownote` ;\n\t\t\t\t\n\t\t\t\tALTER TABLE `apx_calendar_cat` ADD INDEX ( `parents` ) ;\n\t\t\t\tALTER TABLE `apx_calendar_events` ADD INDEX ( `catid` ) ;\n\t\t\t\tALTER TABLE `apx_calendar_events` ADD INDEX ( `userid` ) ;\n\t\t\t\tALTER TABLE `apx_calendar_events` ADD INDEX ( `active` ) ;\n\t\t\t\tALTER TABLE `apx_calendar_events` ADD INDEX ( `startday` , `endday`, `starttime`,`endtime` ) ;\n\t\t\t";
     $queries = split_sql($mysql);
     foreach ($queries as $query) {
         $db->query($query);
     }
     //Tags erzeugen
     transformKeywords(PRE . '_calendar_events', PRE . '_calendar_tags');
 case 110:
     //zu 1.1.1
     $mysql = "\n\t\t\t\tALTER TABLE `apx_calendar_events` CHANGE `active` `active` INT( 11 ) UNSIGNED NOT NULL ;\n\t\t\t";
     $queries = split_sql($mysql);