* added variable titles and oneliners to frontpage
 * added cascading foreign keys to news_overlay -> news
 * renamed news -> featuredbox for consistency

Misc
 * aowow_dbversion is now part of the basic sql
 * also the db-dump is a fresh one and i'm shocked how often i forgot to apply updated there :<
 * from now on shorttags will be used for 'echo' in template (e.g. <?=$var; ?>)
This commit is contained in:
Sarjuuk
2015-08-06 18:21:24 +02:00
parent 38ac7b1dcb
commit 81e6098960
9 changed files with 309 additions and 150 deletions

View File

@@ -6,11 +6,12 @@ if (!defined('AOWOW_REVISION'))
class HomePage extends GenericPage class HomePage extends GenericPage
{ {
protected $tpl = 'home'; protected $tpl = 'home';
protected $js = ['home.js']; protected $js = ['home.js'];
protected $css = [['path' => 'home.css']]; protected $css = [['path' => 'home.css']];
protected $news = []; protected $news = [];
protected $oneliner = '';
public function __construct() public function __construct()
{ {
@@ -21,8 +22,12 @@ class HomePage extends GenericPage
{ {
$this->addCSS(['string' => '.announcement { margin: auto; max-width: 1200px; padding: 0px 15px 15px 15px }']); $this->addCSS(['string' => '.announcement { margin: auto; max-width: 1200px; padding: 0px 15px 15px 15px }']);
// load oneliner
if ($_ = DB::Aowow()->selectRow('SELECT * FROM ?_home_oneliner WHERE active = 1 LIMIT 1'))
$this->oneliner = Util::jsEscape(Util::localizedString($_, 'text'));
// load news // load news
$this->news = DB::Aowow()->selectRow('SELECT id as ARRAY_KEY, n.* FROM ?_news n WHERE active = 1 ORDER BY id DESC LIMIT 1'); $this->news = DB::Aowow()->selectRow('SELECT id as ARRAY_KEY, n.* FROM ?_home_featuredbox n WHERE active = 1 ORDER BY id DESC LIMIT 1');
if (!$this->news) if (!$this->news)
return; return;
@@ -37,7 +42,7 @@ class HomePage extends GenericPage
$this->news['bgImgUrl'] = strtr($this->news['bgImgUrl'], ['HOST_URL' => HOST_URL, 'STATIC_URL' => STATIC_URL]); $this->news['bgImgUrl'] = strtr($this->news['bgImgUrl'], ['HOST_URL' => HOST_URL, 'STATIC_URL' => STATIC_URL]);
// load overlay links // load overlay links
$this->news['overlays'] = DB::Aowow()->select('SELECT * FROM ?_news_overlay WHERE newsId = ?d', $this->news['id']); $this->news['overlays'] = DB::Aowow()->select('SELECT * FROM ?_home_featuredbox_overlay WHERE featureId = ?d', $this->news['id']);
foreach ($this->news['overlays'] as &$o) foreach ($this->news['overlays'] as &$o)
{ {
$o['title'] = Util::localizedString($o, 'title', true); $o['title'] = Util::localizedString($o, 'title', true);
@@ -45,7 +50,12 @@ class HomePage extends GenericPage
} }
} }
protected function generateTitle() {} protected function generateTitle()
{
if ($_ = DB::Aowow()->selectRow('SELECT * FROM ?_home_titles WHERE active = 1 AND title_loc?d <> "" ORDER BY RAND() LIMIT 1', User::$localeId))
$this->title[0] .= Lang::main('colon').Util::localizedString($_, 'title');
}
protected function generatePath() {} protected function generatePath() {}
} }

View File

@@ -2,7 +2,7 @@
-- --
-- Host: localhost Database: sarjuuk_aowow -- Host: localhost Database: sarjuuk_aowow
-- ------------------------------------------------------ -- ------------------------------------------------------
-- Server version 5.5.30-30.1 -- Server version 5.5.30-30.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -48,7 +48,7 @@ CREATE TABLE `aowow_account` (
`token` varchar(40) NOT NULL COMMENT 'creation & recovery', `token` varchar(40) NOT NULL COMMENT 'creation & recovery',
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
UNIQUE KEY `user` (`user`) UNIQUE KEY `user` (`user`)
) ENGINE=MyISAM AUTO_INCREMENT=30 DEFAULT CHARSET=utf8; ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;
/*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET character_set_client = @saved_cs_client */;
-- --
@@ -60,14 +60,16 @@ DROP TABLE IF EXISTS `aowow_account_banned`;
/*!40101 SET character_set_client = utf8 */; /*!40101 SET character_set_client = utf8 */;
CREATE TABLE `aowow_account_banned` ( CREATE TABLE `aowow_account_banned` (
`id` int(16) unsigned NOT NULL, `id` int(16) unsigned NOT NULL,
`userId` int(11) unsigned NOT NULL COMMENT 'affected accountId', `userId` int(10) unsigned NOT NULL COMMENT 'affected accountId',
`staffId` int(11) unsigned NOT NULL COMMENT 'executive accountId', `staffId` int(10) unsigned NOT NULL COMMENT 'executive accountId',
`typeMask` tinyint(4) unsigned NOT NULL COMMENT 'ACC_BAN_*', `typeMask` tinyint(4) unsigned NOT NULL COMMENT 'ACC_BAN_*',
`start` int(10) unsigned NOT NULL COMMENT 'unixtime', `start` int(10) unsigned NOT NULL COMMENT 'unixtime',
`end` int(10) unsigned NOT NULL COMMENT 'automatic unban @ unixtime', `end` int(10) unsigned NOT NULL COMMENT 'automatic unban @ unixtime',
`reason` varchar(255) NOT NULL, `reason` varchar(255) NOT NULL,
PRIMARY KEY (`id`) PRIMARY KEY (`id`),
) ENGINE=MyISAM DEFAULT CHARSET=utf8; KEY `FK_acc_banned` (`userId`),
CONSTRAINT `FK_acc_banned` FOREIGN KEY (`userId`) REFERENCES `aowow_account` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;
/*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET character_set_client = @saved_cs_client */;
-- --
@@ -98,8 +100,9 @@ CREATE TABLE `aowow_account_cookies` (
`name` varchar(127) NOT NULL, `name` varchar(127) NOT NULL,
`data` text NOT NULL, `data` text NOT NULL,
PRIMARY KEY (`userId`), PRIMARY KEY (`userId`),
UNIQUE KEY `userId_name` (`userId`,`name`) UNIQUE KEY `userId_name` (`userId`,`name`),
) ENGINE=MyISAM DEFAULT CHARSET=utf8; CONSTRAINT `FK_acc_cookies` FOREIGN KEY (`userId`) REFERENCES `aowow_account` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;
/*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET character_set_client = @saved_cs_client */;
-- --
@@ -117,8 +120,9 @@ CREATE TABLE `aowow_account_reputation` (
`sourceB` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'e.g. upvoted commentId', `sourceB` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'e.g. upvoted commentId',
`date` int(10) unsigned NOT NULL DEFAULT '0', `date` int(10) unsigned NOT NULL DEFAULT '0',
UNIQUE KEY `userId_action_source` (`userId`,`action`,`sourceA`,`sourceB`), UNIQUE KEY `userId_action_source` (`userId`,`action`,`sourceA`,`sourceB`),
KEY `userId` (`userId`) KEY `userId` (`userId`),
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='reputation log'; CONSTRAINT `FK_acc_rep` FOREIGN KEY (`userId`) REFERENCES `aowow_account` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='reputation log';
/*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET character_set_client = @saved_cs_client */;
-- --
@@ -129,12 +133,14 @@ DROP TABLE IF EXISTS `aowow_account_weightscales`;
/*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */; /*!40101 SET character_set_client = utf8 */;
CREATE TABLE `aowow_account_weightscales` ( CREATE TABLE `aowow_account_weightscales` (
`id` int(32) NOT NULL AUTO_INCREMENT, `id` int(32) NOT NULL,
`account` int(32) NOT NULL, `userId` int(10) unsigned NOT NULL,
`name` varchar(32) NOT NULL, `name` varchar(32) NOT NULL,
`weights` text NOT NULL, `weights` text NOT NULL,
PRIMARY KEY (`id`,`account`) PRIMARY KEY (`id`,`userId`),
) ENGINE=MyISAM DEFAULT CHARSET=utf8; KEY `FK_acc_weights` (`userId`),
CONSTRAINT `FK_acc_weights` FOREIGN KEY (`userId`) REFERENCES `aowow_account` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;
/*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET character_set_client = @saved_cs_client */;
-- --
@@ -155,7 +161,7 @@ CREATE TABLE `aowow_achievement` (
`points` tinyint(3) unsigned NOT NULL, `points` tinyint(3) unsigned NOT NULL,
`orderInGroup` tinyint(3) unsigned NOT NULL, `orderInGroup` tinyint(3) unsigned NOT NULL,
`iconId` mediumint(8) unsigned NOT NULL, `iconId` mediumint(8) unsigned NOT NULL,
`flags` tinyint(3) unsigned NOT NULL, `flags` smallint(5) unsigned NOT NULL,
`reqCriteriaCount` tinyint(3) unsigned NOT NULL, `reqCriteriaCount` tinyint(3) unsigned NOT NULL,
`refAchievement` smallint(5) unsigned NOT NULL, `refAchievement` smallint(5) unsigned NOT NULL,
`itemExtra` mediumint(8) unsigned NOT NULL, `itemExtra` mediumint(8) unsigned NOT NULL,
@@ -251,7 +257,7 @@ CREATE TABLE `aowow_announcements` (
`text_loc6` text NOT NULL, `text_loc6` text NOT NULL,
`text_loc8` text NOT NULL, `text_loc8` text NOT NULL,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=8 DEFAULT CHARSET=utf8; ) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET character_set_client = @saved_cs_client */;
-- --
@@ -347,8 +353,8 @@ CREATE TABLE `aowow_comments` (
`responseBody` text, `responseBody` text,
`responseRoles` smallint(5) unsigned NOT NULL DEFAULT '0', `responseRoles` smallint(5) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
INDEX `type_typeId` (`type`, `typeId`) KEY `type_typeId` (`type`,`typeId`)
) ENGINE=MyISAM AUTO_INCREMENT=8 DEFAULT CHARSET=utf8; ) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET character_set_client = @saved_cs_client */;
-- --
@@ -472,7 +478,10 @@ CREATE TABLE `aowow_creature` (
`flagsExtra` int(10) unsigned NOT NULL DEFAULT '0', `flagsExtra` int(10) unsigned NOT NULL DEFAULT '0',
`scriptName` varchar(50) NOT NULL DEFAULT '', `scriptName` varchar(50) NOT NULL DEFAULT '',
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
KEY `idx_name` (`name_loc0`) KEY `idx_name` (`name_loc0`),
KEY `difficultyEntry1` (`difficultyEntry1`),
KEY `difficultyEntry2` (`difficultyEntry2`),
KEY `difficultyEntry3` (`difficultyEntry3`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8; ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET character_set_client = @saved_cs_client */;
@@ -514,10 +523,30 @@ CREATE TABLE `aowow_currencies` (
`name_loc3` varchar(64) NOT NULL, `name_loc3` varchar(64) NOT NULL,
`name_loc6` varchar(64) NOT NULL, `name_loc6` varchar(64) NOT NULL,
`name_loc8` varchar(64) NOT NULL, `name_loc8` varchar(64) NOT NULL,
`description_loc0` varchar(256) NOT NULL,
`description_loc2` varchar(256) NOT NULL,
`description_loc3` varchar(256) NOT NULL,
`description_loc6` varchar(256) NOT NULL,
`description_loc8` varchar(256) NOT NULL,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8; ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `aowow_dbversion`
--
DROP TABLE IF EXISTS `aowow_dbversion`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `aowow_dbversion` (
`date` int(10) unsigned NOT NULL DEFAULT '0',
`part` tinyint(3) unsigned NOT NULL DEFAULT '0',
`sql` text,
`build` text
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
-- --
-- Table structure for table `aowow_emotes` -- Table structure for table `aowow_emotes`
-- --
@@ -530,21 +559,21 @@ CREATE TABLE `aowow_emotes` (
`cmd` varchar(15) NOT NULL, `cmd` varchar(15) NOT NULL,
`isAnimated` tinyint(1) unsigned NOT NULL, `isAnimated` tinyint(1) unsigned NOT NULL,
`cuFlags` int(10) unsigned NOT NULL, `cuFlags` int(10) unsigned NOT NULL,
`target_loc0` varchar(65) NULL DEFAULT NULL, `target_loc0` varchar(65) DEFAULT NULL,
`target_loc2` varchar(70) NULL DEFAULT NULL, `target_loc2` varchar(70) DEFAULT NULL,
`target_loc3` varchar(95) NULL DEFAULT NULL, `target_loc3` varchar(95) DEFAULT NULL,
`target_loc6` varchar(90) NULL DEFAULT NULL, `target_loc6` varchar(90) DEFAULT NULL,
`target_loc8` varchar(70) NULL DEFAULT NULL, `target_loc8` varchar(70) DEFAULT NULL,
`noTarget_loc0` varchar(65) NULL DEFAULT NULL, `noTarget_loc0` varchar(65) DEFAULT NULL,
`noTarget_loc2` varchar(110) NULL DEFAULT NULL, `noTarget_loc2` varchar(110) DEFAULT NULL,
`noTarget_loc3` varchar(85) NULL DEFAULT NULL, `noTarget_loc3` varchar(85) DEFAULT NULL,
`noTarget_loc6` varchar(75) NULL DEFAULT NULL, `noTarget_loc6` varchar(75) DEFAULT NULL,
`noTarget_loc8` varchar(60) NULL DEFAULT NULL, `noTarget_loc8` varchar(60) DEFAULT NULL,
`self_loc0` varchar(65) NULL DEFAULT NULL, `self_loc0` varchar(65) DEFAULT NULL,
`self_loc2` varchar(115) NULL DEFAULT NULL, `self_loc2` varchar(115) DEFAULT NULL,
`self_loc3` varchar(85) NULL DEFAULT NULL, `self_loc3` varchar(85) DEFAULT NULL,
`self_loc6` varchar(75) NULL DEFAULT NULL, `self_loc6` varchar(75) DEFAULT NULL,
`self_loc8` varchar(70) NULL DEFAULT NULL, `self_loc8` varchar(70) DEFAULT NULL,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8; ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET character_set_client = @saved_cs_client */;
@@ -560,8 +589,8 @@ CREATE TABLE `aowow_emotes_aliasses` (
`id` smallint(6) unsigned NOT NULL, `id` smallint(6) unsigned NOT NULL,
`locales` smallint(6) unsigned NOT NULL, `locales` smallint(6) unsigned NOT NULL,
`command` varchar(15) NOT NULL, `command` varchar(15) NOT NULL,
UNIQUE INDEX `id_command` (`id`, `command`), UNIQUE KEY `id_command` (`id`,`command`),
INDEX `id` (`id`) KEY `id` (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8; ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET character_set_client = @saved_cs_client */;
@@ -696,6 +725,99 @@ CREATE TABLE `aowow_holidays` (
) ENGINE=MyISAM DEFAULT CHARSET=utf8; ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `aowow_home_featuredbox`
--
DROP TABLE IF EXISTS `aowow_home_featuredbox`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `aowow_home_featuredbox` (
`id` smallint(5) unsigned NOT NULL,
`editorId` int(10) unsigned DEFAULT NULL,
`editDate` int(10) unsigned NOT NULL,
`active` tinyint(1) unsigned NOT NULL,
`extraWide` tinyint(3) unsigned NOT NULL DEFAULT '0',
`bgImgUrl` varchar(150) NOT NULL DEFAULT '',
`text_loc0` text NOT NULL,
`text_loc2` text NOT NULL,
`text_loc3` text NOT NULL,
`text_loc6` text NOT NULL,
`text_loc8` text NOT NULL,
PRIMARY KEY (`id`),
KEY `FK_acc_hFBox` (`editorId`),
CONSTRAINT `FK_acc_hFBox` FOREIGN KEY (`editorId`) REFERENCES `aowow_account` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `aowow_home_featuredbox_overlay`
--
DROP TABLE IF EXISTS `aowow_home_featuredbox_overlay`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `aowow_home_featuredbox_overlay` (
`featureId` smallint(5) unsigned NOT NULL,
`left` smallint(5) unsigned NOT NULL,
`width` smallint(5) unsigned NOT NULL,
`url` varchar(150) NOT NULL,
`title_loc0` varchar(100) NOT NULL DEFAULT '',
`title_loc2` varchar(100) NOT NULL DEFAULT '',
`title_loc3` varchar(100) NOT NULL DEFAULT '',
`title_loc6` varchar(100) NOT NULL DEFAULT '',
`title_loc8` varchar(100) NOT NULL DEFAULT '',
KEY `FK_home_featurebox` (`featureId`),
CONSTRAINT `FK_home_featurebox` FOREIGN KEY (`featureId`) REFERENCES `aowow_home_featuredbox` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `aowow_home_oneliner`
--
DROP TABLE IF EXISTS `aowow_home_oneliner`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `aowow_home_oneliner` (
`id` smallint(5) unsigned NOT NULL,
`editorId` int(10) unsigned DEFAULT NULL,
`editDate` int(10) unsigned NOT NULL,
`active` tinyint(1) unsigned NOT NULL,
`text_loc0` varchar(200) NOT NULL,
`text_loc2` varchar(200) NOT NULL,
`text_loc3` varchar(200) NOT NULL,
`text_loc6` varchar(200) NOT NULL,
`text_loc8` varchar(200) NOT NULL,
PRIMARY KEY (`id`),
KEY `FK_acc_hOneliner` (`editorId`),
CONSTRAINT `FK_acc_hOneliner` FOREIGN KEY (`editorId`) REFERENCES `aowow_account` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `aowow_home_titles`
--
DROP TABLE IF EXISTS `aowow_home_titles`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `aowow_home_titles` (
`id` smallint(5) unsigned NOT NULL,
`editorId` int(10) unsigned DEFAULT NULL,
`editDate` int(10) unsigned NOT NULL,
`active` tinyint(1) unsigned NOT NULL,
`title_loc0` varchar(100) NOT NULL,
`title_loc2` varchar(100) NOT NULL,
`title_loc3` varchar(100) NOT NULL,
`title_loc6` varchar(100) NOT NULL,
`title_loc8` varchar(100) NOT NULL,
PRIMARY KEY (`id`),
KEY `FK_acc_hTitles` (`editorId`),
CONSTRAINT `FK_acc_hTitles` FOREIGN KEY (`editorId`) REFERENCES `aowow_account` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
-- --
-- Table structure for table `aowow_icons` -- Table structure for table `aowow_icons`
-- --
@@ -719,7 +841,7 @@ DROP TABLE IF EXISTS `aowow_item_stats`;
/*!40101 SET character_set_client = utf8 */; /*!40101 SET character_set_client = utf8 */;
CREATE TABLE `aowow_item_stats` ( CREATE TABLE `aowow_item_stats` (
`type` smallint(5) unsigned NOT NULL, `type` smallint(5) unsigned NOT NULL,
`typeId` mediumint(9) unsigned NOT NULL, `typeId` mediumint(8) unsigned NOT NULL,
`nsockets` tinyint(3) unsigned NOT NULL, `nsockets` tinyint(3) unsigned NOT NULL,
`dmgmin1` smallint(5) unsigned NOT NULL, `dmgmin1` smallint(5) unsigned NOT NULL,
`dmgmax1` smallint(5) unsigned NOT NULL, `dmgmax1` smallint(5) unsigned NOT NULL,
@@ -799,7 +921,7 @@ CREATE TABLE `aowow_item_stats` (
`shasplpwr` smallint(6) NOT NULL, `shasplpwr` smallint(6) NOT NULL,
`natsplpwr` smallint(6) NOT NULL, `natsplpwr` smallint(6) NOT NULL,
`arcsplpwr` smallint(6) NOT NULL, `arcsplpwr` smallint(6) NOT NULL,
PRIMARY KEY (`typeId`, `type`) PRIMARY KEY (`typeId`,`type`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8; ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET character_set_client = @saved_cs_client */;
@@ -1197,7 +1319,7 @@ CREATE TABLE `aowow_itemset` (
`quality` tinyint(4) NOT NULL, `quality` tinyint(4) NOT NULL,
`type` smallint(6) NOT NULL COMMENT 'g_itemset_types', `type` smallint(6) NOT NULL COMMENT 'g_itemset_types',
`contentGroup` smallint(6) NOT NULL COMMENT 'g_itemset_notes', `contentGroup` smallint(6) NOT NULL COMMENT 'g_itemset_notes',
`eventId` smallint(5) unsigned NOT NULL, `eventId` smallint(3) unsigned NOT NULL,
`skillId` smallint(3) unsigned NOT NULL, `skillId` smallint(3) unsigned NOT NULL,
`skillLevel` smallint(3) unsigned NOT NULL, `skillLevel` smallint(3) unsigned NOT NULL,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
@@ -1255,47 +1377,6 @@ CREATE TABLE `aowow_mailtemplate` (
) ENGINE=MyISAM DEFAULT CHARSET=utf8; ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `aowow_news`
--
DROP TABLE IF EXISTS `aowow_news`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `aowow_news` (
`id` int(16) unsigned NOT NULL,
`active` tinyint(3) unsigned NOT NULL DEFAULT '1',
`extraWide` tinyint(3) unsigned NOT NULL DEFAULT '0',
`bgImgUrl` varchar(150) NOT NULL DEFAULT '',
`text_loc0` text NOT NULL,
`text_loc2` text NOT NULL,
`text_loc3` text NOT NULL,
`text_loc6` text NOT NULL,
`text_loc8` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `aowow_news_overlay`
--
DROP TABLE IF EXISTS `aowow_news_overlay`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `aowow_news_overlay` (
`newsId` int(11) unsigned NOT NULL,
`left` smallint(5) unsigned NOT NULL,
`width` smallint(5) unsigned NOT NULL,
`url` varchar(150) NOT NULL,
`title_loc0` varchar(100) NOT NULL DEFAULT '',
`title_loc2` varchar(100) NOT NULL DEFAULT '',
`title_loc3` varchar(100) NOT NULL DEFAULT '',
`title_loc6` varchar(100) NOT NULL DEFAULT '',
`title_loc8` varchar(100) NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
-- --
-- Table structure for table `aowow_objects` -- Table structure for table `aowow_objects`
-- --
@@ -1388,7 +1469,7 @@ CREATE TABLE `aowow_quests` (
`type` smallint(5) unsigned NOT NULL DEFAULT '0', `type` smallint(5) unsigned NOT NULL DEFAULT '0',
`suggestedPlayers` tinyint(3) unsigned NOT NULL DEFAULT '0', `suggestedPlayers` tinyint(3) unsigned NOT NULL DEFAULT '0',
`timeLimit` int(10) unsigned NOT NULL DEFAULT '0', `timeLimit` int(10) unsigned NOT NULL DEFAULT '0',
`eventId` smallint(5) unsigned NOT NULL, `eventId` smallint(5) unsigned NOT NULL DEFAULT '0',
`prevQuestId` mediumint(8) NOT NULL DEFAULT '0', `prevQuestId` mediumint(8) NOT NULL DEFAULT '0',
`nextQuestId` mediumint(8) NOT NULL DEFAULT '0', `nextQuestId` mediumint(8) NOT NULL DEFAULT '0',
`exclusiveGroup` mediumint(8) NOT NULL DEFAULT '0', `exclusiveGroup` mediumint(8) NOT NULL DEFAULT '0',
@@ -1536,7 +1617,8 @@ CREATE TABLE `aowow_quests` (
`objectiveText4_loc3` text, `objectiveText4_loc3` text,
`objectiveText4_loc6` text, `objectiveText4_loc6` text,
`objectiveText4_loc8` text, `objectiveText4_loc8` text,
PRIMARY KEY (`id`) PRIMARY KEY (`id`),
KEY `nextQuestIdChain` (`nextQuestIdChain`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8; ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET character_set_client = @saved_cs_client */;
@@ -1609,7 +1691,7 @@ CREATE TABLE `aowow_reports` (
`email` varchar(255) DEFAULT NULL, `email` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
KEY `userId` (`userId`) KEY `userId` (`userId`)
) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=utf8; ) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET character_set_client = @saved_cs_client */;
-- --
@@ -1655,7 +1737,6 @@ DROP TABLE IF EXISTS `aowow_scalingstatvalues`;
/*!40101 SET character_set_client = utf8 */; /*!40101 SET character_set_client = utf8 */;
CREATE TABLE `aowow_scalingstatvalues` ( CREATE TABLE `aowow_scalingstatvalues` (
`id` tinyint(3) unsigned NOT NULL, `id` tinyint(3) unsigned NOT NULL,
`charLevel` tinyint(3) unsigned NOT NULL,
`shoulderMultiplier` tinyint(3) unsigned NOT NULL, `shoulderMultiplier` tinyint(3) unsigned NOT NULL,
`trinketMultiplier` tinyint(3) unsigned NOT NULL, `trinketMultiplier` tinyint(3) unsigned NOT NULL,
`weaponMultiplier` tinyint(3) unsigned NOT NULL, `weaponMultiplier` tinyint(3) unsigned NOT NULL,
@@ -1693,17 +1774,19 @@ CREATE TABLE `aowow_screenshots` (
`id` int(16) unsigned NOT NULL AUTO_INCREMENT, `id` int(16) unsigned NOT NULL AUTO_INCREMENT,
`type` smallint(5) unsigned NOT NULL, `type` smallint(5) unsigned NOT NULL,
`typeId` mediumint(9) NOT NULL, `typeId` mediumint(9) NOT NULL,
`uploader` int(16) unsigned NOT NULL, `userIdOwner` int(10) unsigned DEFAULT NULL,
`date` int(32) unsigned NOT NULL, `date` int(32) unsigned NOT NULL,
`width` smallint(5) unsigned NOT NULL, `width` smallint(5) unsigned NOT NULL,
`height` smallint(5) unsigned NOT NULL, `height` smallint(5) unsigned NOT NULL,
`caption` varchar(250) DEFAULT NULL, `caption` varchar(250) DEFAULT NULL,
`status` tinyint(3) unsigned NOT NULL COMMENT 'see defines.php - CC_FLAG_*', `status` tinyint(3) unsigned NOT NULL COMMENT 'see defines.php - CC_FLAG_*',
`approvedBy` int(16) unsigned DEFAULT NULL, `userIdApprove` int(10) unsigned DEFAULT NULL,
`deletedBy` int(16) unsigned DEFAULT NULL, `userIdDelete` int(10) unsigned DEFAULT NULL,
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
KEY `type` (`type`,`typeId`) KEY `type` (`type`,`typeId`),
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; KEY `FK_acc_ss` (`userIdOwner`),
CONSTRAINT `FK_acc_ss` FOREIGN KEY (`userIdOwner`) REFERENCES `aowow_account` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;
/*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET character_set_client = @saved_cs_client */;
-- --
@@ -2216,18 +2299,21 @@ DROP TABLE IF EXISTS `aowow_videos`;
/*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */; /*!40101 SET character_set_client = utf8 */;
CREATE TABLE `aowow_videos` ( CREATE TABLE `aowow_videos` (
`id` int(16) NOT NULL, `id` int(16) NOT NULL AUTO_INCREMENT,
`type` smallint(5) unsigned NOT NULL, `type` smallint(5) unsigned NOT NULL,
`typeId` mediumint(9) NOT NULL, `typeId` mediumint(9) NOT NULL,
`uploader` int(16) NOT NULL, `userIdOwner` int(10) unsigned DEFAULT NULL,
`date` int(32) NOT NULL, `date` int(32) NOT NULL,
`videoId` varchar(12) NOT NULL, `videoId` varchar(12) NOT NULL,
`caption` text, `caption` text,
`status` int(8) NOT NULL, `status` int(8) NOT NULL,
`approvedBy` int(16) DEFAULT NULL, `userIdApprove` int(10) unsigned DEFAULT NULL,
`userIdeDelete` int(10) unsigned DEFAULT NULL,
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
KEY `type` (`type`,`typeId`) KEY `type` (`type`,`typeId`),
) ENGINE=MyISAM DEFAULT CHARSET=utf8; KEY `FK_acc_vi` (`userIdOwner`),
CONSTRAINT `FK_acc_vi` FOREIGN KEY (`userIdOwner`) REFERENCES `aowow_account` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;
/*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET character_set_client = @saved_cs_client */;
-- --
@@ -2328,23 +2414,33 @@ INSERT INTO `aowow_config` VALUES ('sql_limit_search','500',0,129,'default: 500
UNLOCK TABLES; UNLOCK TABLES;
-- --
-- Dumping data for table `aowow_news` -- Dumping data for table `aowow_dbversion`
-- --
LOCK TABLES `aowow_news` WRITE; LOCK TABLES `aowow_dbversion` WRITE;
/*!40000 ALTER TABLE `aowow_news` DISABLE KEYS */; /*!40000 ALTER TABLE `aowow_dbversion` DISABLE KEYS */;
INSERT INTO `aowow_news` VALUES (1,1,0,'','[pad]Welcome to [b][span class=q5]AoWoW[/span][/b]!','[pad]Bienvenue à [b][span class=q5]AoWoW[/span][/b]!','[pad]Willkommen bei [b][span class=q5]AoWoW[/span][/b]!','','Добро[pad] пожаловать на [b][span class=q5]AoWoW[/span][/b]!'),(2,0,1,'STATIC_URL/images/logos/newsbox-explained.png','[ul]\n[li][i]just demoing the newsbox here..[/i][/li]\n[li][b][url=http://www.example.com]..with urls[/url][/b][/li]\n[li][b]..typeLinks [item=45533][/b][/li]\n[li][b]..also, over there to the right is an overlay-trigger =>[/b][/li]\n[/ul]\n\n[ul]\n[li][tooltip name=demotip]hey, it hints you stuff![/tooltip][b][span class=tip tooltip=demotip]..hover me[/span][/b][/li]\n[/ul]','','','',''); INSERT INTO `aowow_dbversion` VALUES (1438878038,0,NULL,NULL);
/*!40000 ALTER TABLE `aowow_news` ENABLE KEYS */; /*!40000 ALTER TABLE `aowow_dbversion` ENABLE KEYS */;
UNLOCK TABLES; UNLOCK TABLES;
-- --
-- Dumping data for table `aowow_news_overlay` -- Dumping data for table `aowow_home_featuredbox`
-- --
LOCK TABLES `aowow_news_overlay` WRITE; LOCK TABLES `aowow_home_featuredbox` WRITE;
/*!40000 ALTER TABLE `aowow_news_overlay` DISABLE KEYS */; /*!40000 ALTER TABLE `aowow_home_featuredbox` DISABLE KEYS */;
INSERT INTO `aowow_news_overlay` VALUES (2,405,100,'http://example.com','example overlay','','','',''); INSERT INTO `aowow_home_featuredbox` VALUES (1,NULL,0,1,0,'','[pad]Welcome to [b][span class=q5]AoWoW[/span][/b]!','[pad]Bienvenue à [b][span class=q5]AoWoW[/span][/b]!','[pad]Willkommen bei [b][span class=q5]AoWoW[/span][/b]!','','Добро[pad] пожаловать на [b][span class=q5]AoWoW[/span][/b]!'),(2,NULL,0,0,1,'STATIC_URL/images/logos/newsbox-explained.png','[ul]\n[li][i]just demoing the newsbox here..[/i][/li]\n[li][b][url=http://www.example.com]..with urls[/url][/b][/li]\n[li][b]..typeLinks [item=45533][/b][/li]\n[li][b]..also, over there to the right is an overlay-trigger =>[/b][/li]\n[/ul]\n\n[ul]\n[li][tooltip name=demotip]hey, it hints you stuff![/tooltip][b][span class=tip tooltip=demotip]..hover me[/span][/b][/li]\n[/ul]','','','','');
/*!40000 ALTER TABLE `aowow_news_overlay` ENABLE KEYS */; /*!40000 ALTER TABLE `aowow_home_featuredbox` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Dumping data for table `aowow_home_featuredbox_overlay`
--
LOCK TABLES `aowow_home_featuredbox_overlay` WRITE;
/*!40000 ALTER TABLE `aowow_home_featuredbox_overlay` DISABLE KEYS */;
INSERT INTO `aowow_home_featuredbox_overlay` VALUES (2,405,100,'http://example.com','example overlay','','','','');
/*!40000 ALTER TABLE `aowow_home_featuredbox_overlay` ENABLE KEYS */;
UNLOCK TABLES; UNLOCK TABLES;
-- --
@@ -2366,4 +2462,4 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2015-05-10 14:11:18 -- Dump completed on 2015-08-06 17:51:15

View File

@@ -58,13 +58,8 @@ else
CLISetup::init(); CLISetup::init();
$cmd = array_pop(array_keys($opt)); $cmd = array_pop(array_keys($opt));
switch ($cmd) // we accept only one main parameter switch ($cmd) // we accept only one main parameter
{ {
case 'update':
require_once 'setup/tools/clisetup/update.func.php';
update();
return;
case 'firstrun': case 'firstrun':
case 'resume': case 'resume':
require_once 'setup/tools/clisetup/firstrun.func.php'; require_once 'setup/tools/clisetup/firstrun.func.php';
@@ -80,6 +75,10 @@ switch ($cmd) // we accept only one main parameter
$cmd(); $cmd();
finish(); finish();
case 'update':
require_once 'setup/tools/clisetup/update.func.php';
if (update()) // return true if we do not rebuild stuff
return;
case 'sync': case 'sync':
require_once 'setup/tools/clisetup/sql.func.php'; require_once 'setup/tools/clisetup/sql.func.php';
require_once 'setup/tools/clisetup/build.func.php'; require_once 'setup/tools/clisetup/build.func.php';

View File

@@ -13,20 +13,7 @@ if (!CLI)
function update() function update()
{ {
$createQuery = " list($date, $part) = array_values(DB::Aowow()->selectRow('SELECT `date`, `part` FROM ?_dbversion'));
CREATE TABLE `aowow_dbversion` (
`date` INT(10) UNSIGNED NOT NULL DEFAULT '0',
`part` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0'
) ENGINE=MyISAM";
$date = $part = 0;
if (!DB::Aowow()->selectCell('SHOW TABLES LIKE "%dbversion"'))
{
DB::Aowow()->query($createQuery);
DB::Aowow()->query('INSERT INTO ?_dbversion VALUES (0, 0)');
}
else
list($date, $part) = array_values(DB::Aowow()->selectRow('SELECT `date`, `part` FROM ?_dbversion'));
CLISetup::log('checking sql updates'); CLISetup::log('checking sql updates');
@@ -68,6 +55,8 @@ function update()
} }
CLISetup::log($nFiles ? 'applied '.$nFiles.' update(s)' : 'db is already up to date', CLISetup::LOG_OK); CLISetup::log($nFiles ? 'applied '.$nFiles.' update(s)' : 'db is already up to date', CLISetup::LOG_OK);
return true;
} }
?> ?>

View File

@@ -8,12 +8,14 @@ if (!CLI)
/* provide these with basic content /* provide these with basic content
aowow_announcements 1 P aowow_announcements
aowow_articles 1 P aowow_articles
aowow_config 1 P aowow_config
aowow_news 1 P aowow_home_featuredbox
aowow_news_overlay 1 E aowow_home_featuredbox_overlay
aowow_sourcestrings 2 P aowow_home_oneliners
aowow_home_titles
aowow_sourcestrings
*/ */
@@ -198,4 +200,4 @@ class SqlGen
} }
} }
?> ?>

View File

@@ -0,0 +1,53 @@
SET FOREIGN_KEY_CHECKS=0;
RENAME TABLE `aowow_news` TO `aowow_home_featuredbox`;
ALTER TABLE `aowow_home_featuredbox`
ALTER `id` DROP DEFAULT,
ALTER `active` DROP DEFAULT;
ALTER TABLE `aowow_home_featuredbox`
ENGINE=InnoDB,
CHANGE COLUMN `id` `id` smallint(5) unsigned NOT NULL FIRST,
ADD COLUMN `editorId` int(10) unsigned NULL AFTER `id`,
ADD COLUMN `editDate` int(10) unsigned NOT NULL AFTER `editorId`,
CHANGE COLUMN `active` `active` tinyint(1) unsigned NOT NULL AFTER `editDate`,
ADD CONSTRAINT `FK_acc_hFBox` FOREIGN KEY (`editorId`) REFERENCES `aowow_account` (`id`) ON UPDATE CASCADE ON DELETE SET NULL;
RENAME TABLE `aowow_news_overlay` TO `aowow_home_featurebox_overlay`;
ALTER TABLE `aowow_home_featuredbox_overlay`
ALTER `newsId` DROP DEFAULT;
ALTER TABLE `aowow_home_featuredbox_overlay`
ENGINE=InnoDB,
CHANGE COLUMN `newsId` `featureId` smallint(5) unsigned NOT NULL FIRST,
ADD CONSTRAINT `FK_home_featurebox` FOREIGN KEY (`featureId`) REFERENCES `aowow_home_featuredbox` (`id`) ON UPDATE CASCADE ON DELETE CASCADE;
CREATE TABLE `aowow_home_titles` (
`id` smallint(5) unsigned NOT NULL,
`editorId` int(10) unsigned NULL,
`editDate` int(10) unsigned NOT NULL,
`active` tinyint(1) unsigned NOT NULL,
`title_loc0` varchar(100) NOT NULL,
`title_loc2` varchar(100) NOT NULL,
`title_loc3` varchar(100) NOT NULL,
`title_loc6` varchar(100) NOT NULL,
`title_loc8` varchar(100) NOT NULL,
PRIMARY KEY (`id`),
INDEX `FK_acc_hTitles` (`editorId`),
CONSTRAINT `FK_acc_hTitles` FOREIGN KEY (`editorId`) REFERENCES `aowow_account` (`id`) ON UPDATE CASCADE ON DELETE SET NULL
) ENGINE=InnoDB;
CREATE TABLE `aowow_home_oneliner` (
`id` smallint(5) unsigned NOT NULL,
`editorId` int(10) unsigned NULL,
`editDate` int(10) unsigned NOT NULL,
`active` tinyint(1) unsigned NOT NULL,
`text_loc0` varchar(200) NOT NULL,
`text_loc2` varchar(200) NOT NULL,
`text_loc3` varchar(200) NOT NULL,
`text_loc6` varchar(200) NOT NULL,
`text_loc8` varchar(200) NOT NULL,
PRIMARY KEY (`id`),
INDEX `FK_acc_hOneliner` (`editorId`),
CONSTRAINT `FK_acc_hOneliner` FOREIGN KEY (`editorId`) REFERENCES `aowow_account` (`id`) ON UPDATE CASCADE ON DELETE SET NULL
) ENGINE=InnoDB;
SET FOREIGN_KEY_CHECKS=1;

View File

@@ -62,7 +62,7 @@
.home-oneliner { .home-oneliner {
margin:0; margin:0;
padding-top:53px; padding-top:35px;
color:#ccc; color:#ccc;
line-height:1.75em; line-height:1.75em;
font-size:12px; font-size:12px;

View File

@@ -11,9 +11,9 @@ var mn_content = [
[, 'Homepage'], [, 'Homepage'],
[13, 'Featured Box', '?admin=home-featuredbox', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU, breadcrumb: 'Homepage Featured Box'}], [13, 'Featured Box', '?admin=home-featuredbox', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU, breadcrumb: 'Homepage Featured Box'}],
// [14, 'Oneliners', '?admin=home-oneliners', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU, breadcrumb: 'Homepage Oneliners'}], [14, 'Oneliners', '?admin=home-oneliners', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU, breadcrumb: 'Homepage Oneliners'}],
// [15, 'Skins', '?admin=home-skins', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU | U_GROUP_SALESAGENT, breadcrumb: 'Homepage Skins'}], // [15, 'Skins', '?admin=home-skins', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU | U_GROUP_SALESAGENT, breadcrumb: 'Homepage Skins'}],
// [16, 'Titles', '?admin=home-titles', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU, breadcrumb: 'Homepage Titles'}], [16, 'Titles', '?admin=home-titles', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU, breadcrumb: 'Homepage Titles'}],
// [, 'Articles'], // [, 'Articles'],
// [8, 'List', '?admin=articles', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU | U_GROUP_DEV | U_GROUP_EDITOR | U_GROUP_LOCALIZER, breadcrumb: 'List of Articles'}], // [8, 'List', '?admin=articles', null, {requiredAccess: U_GROUP_ADMIN | U_GROUP_BUREAU | U_GROUP_DEV | U_GROUP_EDITOR | U_GROUP_LOCALIZER, breadcrumb: 'List of Articles'}],

View File

@@ -4,7 +4,7 @@
<?php $this->brick('head'); ?> <?php $this->brick('head'); ?>
</head> </head>
<body class="home<?php echo User::isPremium() ? ' premium-logo' : null; ?>"> <body class="home<?=(User::isPremium() ? ' premium-logo' : null); ?>">
<div id="layers"></div> <div id="layers"></div>
<div class="home-wrapper"> <div class="home-wrapper">
<h1>Aowow</h1> <h1>Aowow</h1>
@@ -20,10 +20,20 @@
<div class="home-menu" id="home-menu"></div> <div class="home-menu" id="home-menu"></div>
<?php if ($this->news): ?> <?php if ($this->oneliner): ?>
<div class="pad"></div> <p class="home-oneliner text" id="home-oneliner"></p>
<div class="home-featuredbox<?php echo empty($this->news['extraWide']) ? null : ' home-featuredbox-extended';?>" style="background-image: url(<?php echo $this->news['bgImgUrl'];?>);" id="home-featuredbox"> <script type="text/javascript">//<![CDATA[
Markup.printHtml('<?=$this->oneliner;?>', 'home-oneliner');
//]]></script>
<?php elseif ($this->news): ?>
<div class="pad"></div>
<?php
endif;
if ($this->news):
?>
<div class="home-featuredbox<?=(empty($this->news['extraWide']) ? null : ' home-featuredbox-extended'); ?>" style="background-image: url(<?=$this->news['bgImgUrl']; ?>);" id="home-featuredbox">
<?php if ($this->news['overlays']): ?> <?php if ($this->news['overlays']): ?>
<div class="home-featuredbox-links"> <div class="home-featuredbox-links">
<?php <?php
@@ -44,7 +54,7 @@
endif; endif;
echo $this->writeGlobalVars(); echo $this->writeGlobalVars();
?> ?>
Markup.printHtml(<?php echo json_encode($this->news['text']); ?>, 'news-generic', { allow: Markup.CLASS_ADMIN }); Markup.printHtml(<?=json_encode($this->news['text']); ?>, 'news-generic', { allow: Markup.CLASS_ADMIN });
//]]></script> //]]></script>
<?php endif; ?> <?php endif; ?>
</div> </div>
@@ -53,14 +63,14 @@
<div class="footer"> <div class="footer">
<div class="footer-links linklist"> <div class="footer-links linklist">
<a href="?aboutus"><?php echo Lang::main('aboutUs'); ?></a>| <a href="?aboutus"><?=Lang::main('aboutUs'); ?></a>|
<a href="#" id="footer-links-language"><?php echo Lang::main('language'); ?></a> <a href="#" id="footer-links-language"><?=Lang::main('language'); ?></a>
</div> </div>
<div class="footer-copy">&#12484; 2015 Aowow</div> <div class="footer-copy">&#12484; 2015 Aowow</div>
</div> </div>
<?php $this->brick('pageTemplate'); ?> <?php $this->brick('pageTemplate'); ?>
<noscript><div id="noscript-bg"></div><div id="noscript-text"><b><?php echo Lang::main('jsError'); ?></div></noscript> <noscript><div id="noscript-bg"></div><div id="noscript-text"><b><?=Lang::main('jsError'); ?></div></noscript>
</body> </body>
</html> </html>