Ejemplo n.º 1
0
 public function __construct($pageCall, $pageParam)
 {
     $this->filterObj = new ItemsetListFilter();
     $this->getCategoryFromUrl($pageParam);
     parent::__construct($pageCall, $pageParam);
     $this->name = Util::ucFirst(Lang::game('itemsets'));
 }
Ejemplo n.º 2
0
 public function __construct($pageCall, $pageParam)
 {
     switch ($pageParam) {
         case 'screenshots':
             $this->reqUGroup = U_GROUP_STAFF | U_GROUP_SCREENSHOT;
             $this->generator = 'handleScreenshots';
             $this->tpl = 'admin/screenshots';
             array_push($this->path, 1, 5);
             $this->name = 'Screenshot Manager';
             break;
         case 'phpinfo':
             $this->reqUGroup = U_GROUP_ADMIN | U_GROUP_DEV;
             $this->generator = 'handlePhpInfo';
             $this->tpl = 'list-page-generic';
             array_push($this->path, 2, 21);
             $this->name = 'PHP Information';
             break;
         case 'siteconfig':
             $this->reqUGroup = U_GROUP_ADMIN | U_GROUP_DEV;
             $this->generator = 'handleConfig';
             $this->tpl = 'list-page-generic';
             array_push($this->path, 2, 18);
             $this->name = 'Site Configuration';
             break;
         default:
             // error out through unset template
     }
     parent::__construct($pageCall, $pageParam);
 }
Ejemplo n.º 3
0
 public function __construct($pageCall, $pageParam)
 {
     $this->filterObj = new EnchantmentListFilter();
     $this->getCategoryFromUrl($pageParam);
     parent::__construct($pageCall, $pageParam);
     $this->name = Util::ucFirst(Lang::game('enchantments'));
     $this->subCat = $pageParam !== null ? '=' . $pageParam : '';
 }
Ejemplo n.º 4
0
 public function __construct($pageCall, $pageParam)
 {
     $this->filterObj = new CreatureListFilter();
     $this->getCategoryFromUrl($pageParam);
     parent::__construct($pageCall, $pageParam);
     $this->name = Util::ucFirst(Lang::game('npcs'));
     $this->subCat = $pageParam ? '=' . $pageParam : '';
 }
Ejemplo n.º 5
0
 public function __construct($pageCall, $pageParam)
 {
     $this->filterObj = new SpellListFilter();
     $this->getCategoryFromUrl($pageParam);
     parent::__construct($pageCall, $pageParam);
     $this->name = Util::ucFirst(Lang::game('spells'));
     $this->subCat = $pageParam !== null ? '=' . $pageParam : '';
     $this->filter = ['classPanel' => false, 'glyphPanel' => false];
 }
Ejemplo n.º 6
0
 public function __construct($pageCall, $pageParam)
 {
     @(include 'datasets/ProfilerExampleChar');
     // tmp char data
     $this->character = $character;
     // soo ..
     // we require a list and filter-handler for profiles
     parent::__construct($pageCall, $pageParam);
 }
Ejemplo n.º 7
0
 public function display($override = '')
 {
     if ($this->rss) {
         header('Content-Type: application/rss+xml; charset=UTF-8');
         die($this->generateRSS());
     } else {
         return parent::display($override);
     }
 }
Ejemplo n.º 8
0
 public function __construct($pageCall, $id)
 {
     parent::__construct($pageCall, $id);
     $this->typeId = intVal($id);
     $this->subject = new CurrencyList(array(['id', $this->typeId]));
     if ($this->subject->error) {
         $this->notFound(Lang::game('currency'), Lang::currency('notFound'));
     }
     $this->name = $this->subject->getField('name', true);
 }
Ejemplo n.º 9
0
 public function __construct($pageCall, $id)
 {
     parent::__construct($pageCall, $id);
     $this->typeId = intVal($id);
     $this->subject = new EmoteList(array(['id', $this->typeId]));
     if ($this->subject->error) {
         $this->notFound(Util::ucFirst(Lang::game('emote')), Lang::emote('notFound'));
     }
     $this->name = Util::ucFirst($this->subject->getField('cmd'));
 }
Ejemplo n.º 10
0
 public function __construct($pageCall, $pageParam)
 {
     $this->validCats = Util::$questClasses;
     // needs reviewing (not allowed to set this as default)
     $this->filterObj = new QuestListFilter();
     $this->getCategoryFromUrl($pageParam);
     parent::__construct($pageCall, $pageParam);
     $this->name = Util::ucFirst(Lang::game('quests'));
     $this->subCat = $pageParam ? '=' . $pageParam : '';
 }
Ejemplo n.º 11
0
 public function __construct($pageCall, $id)
 {
     parent::__construct($pageCall, $id);
     $this->typeId = intVal($id);
     $this->subject = new EnchantmentList(array(['id', $this->typeId]));
     if ($this->subject->error) {
         $this->notFound(Util::ucFirst(Lang::game('enchantment')), Lang::enchantment('notFound'));
     }
     $this->extendGlobalData($this->subject->getJSGlobals());
     $this->name = Util::ucFirst($this->subject->getField('name', true));
 }
Ejemplo n.º 12
0
 public function __construct($pageCall, $id)
 {
     parent::__construct($pageCall, $id);
     $this->typeId = intVal($id);
     $this->subject = new SkillList(array(['id', $this->typeId]));
     if ($this->subject->error) {
         $this->notFound(Lang::game('skill'), Lang::skill('notFound'));
     }
     $this->name = $this->subject->getField('name', true);
     $this->cat = $this->subject->getField('typeCat');
 }
Ejemplo n.º 13
0
 public function __construct($pageCall, $id)
 {
     parent::__construct($pageCall, $id);
     $this->typeId = intVal($id);
     $this->subject = new ItemsetList(array(['id', $this->typeId]));
     if ($this->subject->error) {
         $this->notFound(Lang::game('itemset'), Lang::itemset('notFound'));
     }
     $this->name = $this->subject->getField('name', true);
     $this->extendGlobalData($this->subject->getJSGlobals());
 }
Ejemplo n.º 14
0
 public function __construct($pageCall, $id)
 {
     parent::__construct($pageCall, $id);
     $this->typeId = intVal($id);
     $this->subject = new TitleList(array(['id', $this->typeId]));
     if ($this->subject->error) {
         $this->notFound(Lang::game('title'), Lang::title('notFound'));
     }
     $this->name = $this->subject->getHtmlizedName();
     $this->nameFixed = Util::ucFirst(trim(strtr($this->subject->getField('male', true), ['%s' => '', ',' => ''])));
 }
Ejemplo n.º 15
0
 public function __construct($pageCall, $__)
 {
     parent::__construct($pageCall, $__);
     // prefer $_GET over $_COOKIE
     if (!empty($_GET['compare'])) {
         $this->compareString = $_GET['compare'];
     } else {
         if (!empty($_COOKIE['compare_groups'])) {
             $this->compareString = urldecode($_COOKIE['compare_groups']);
         }
     }
     $this->name = Lang::main('compareTool');
 }
Ejemplo n.º 16
0
 public function __construct($pageCall, $pageParam)
 {
     parent::__construct($pageCall, $pageParam);
     $this->name = Lang::main('ssEdit');
     // do not htmlEscape caption. It's applied as textnode
     $this->caption = !empty($_POST['screenshotcaption']) ? $_POST['screenshotcaption'] : '';
     // what are its other uses..? (finalize is custom)
     if ($pageParam == 'finalize') {
         if (!$this->handleFinalize()) {
             $this->error();
         }
     } else {
         if ($pageParam != 'add') {
             $this->error();
         }
     }
     // get screenshot destination
     foreach ($_GET as $k => $v) {
         if ($v) {
             // target delivered as empty type.typeId key
             continue;
         }
         $x = explode('_', $k);
         // . => _ as array key
         if (count($x) != 2) {
             continue;
         }
         // no such type
         if (empty(Util::$typeClasses[$x[0]])) {
             continue;
         }
         $t = Util::$typeClasses[$x[0]];
         $c = [['id', intVal($x[1])]];
         if ($x[0] == TYPE_WORLDEVENT) {
             // ohforfsake..
             $c = array_merge($c, ['OR', ['holidayId', intVal($x[1])]]);
         }
         $this->destination = new $t($c);
         // no such typeId
         if ($this->destination->error) {
             continue;
         }
         $this->destType = intVal($x[0]);
         $this->destTypeId = intVal($x[1]);
     }
 }
Ejemplo n.º 17
0
 public function __construct($pageCall, $id)
 {
     parent::__construct($pageCall, $id);
     $this->typeId = intVal($id);
     $conditions = $this->typeId < 0 ? [['id', -$this->typeId]] : [['holidayId', $this->typeId]];
     $this->subject = new WorldEventList($conditions);
     if ($this->subject->error) {
         $this->notFound(Lang::game('event'), Lang::event('notFound'));
     }
     $this->hId = $this->subject->getField('holidayId');
     $this->eId = $this->subject->getField('eventBak');
     // redirect if associated with a holiday
     if ($this->hId && $this->typeId != $this->hId) {
         header('Location: ' . HOST_URL . '?event=' . $this->hId, true, 302);
     }
     $this->name = $this->subject->getField('name', true);
 }
Ejemplo n.º 18
0
 public function __construct($pageCall, $pageParam)
 {
     parent::__construct($pageCall, $pageParam);
     if ($pageParam) {
         // todo: check if account is disabled or something
         if ($user = DB::Aowow()->selectRow('SELECT a.id, a.user, a.displayName, a.consecutiveVisits, a.userGroups, a.avatar, a.title, a.description, a.joinDate, a.prevLogin, IFNULL(SUM(ar.amount), 0) AS sumRep FROM ?_account a LEFT JOIN ?_account_reputation ar ON a.id = ar.userId WHERE a.user = ? GROUP BY a.id', $pageParam)) {
             $this->user = $user;
         } else {
             $this->notFound(sprintf(Lang::user('notFound'), $pageParam));
         }
     } else {
         if (User::$id) {
             header('Location: ?user='******'user');
         }
     }
 }
Ejemplo n.º 19
0
 public function __construct($titre = "")
 {
     parent::__construct("..::MyBookList::..   ~" . $titre . "~", true);
     $this->current_menu = $titre;
     $this->addSheet('bootstrap/css/bootstrap.min.css');
     $this->addSheet('bootstrap/css/bootstrap-theme.min.css');
     $this->addSheet('css/theme.css');
     $this->addSheet('bootstrap-combobox/css/bootstrap-combobox.css');
     $this->addSheet('tinybox2/style.css');
     $this->addJS('jQuery-Autocomplete/dist/jquery.autocomplete.js');
     $this->addJS('js/jquery-2.1.1.js');
     $this->addJS('js/infinityscroll.js');
     $this->addJS('tinybox2/tinybox.js');
     if (isset($_POST['sign-in']) && !$this->is_logged() && $this->session) {
         $this->loggin();
     }
     if (isset($_POST['sign-out']) && $this->is_logged() && $this->session) {
         $this->loggout();
     }
 }
Ejemplo n.º 20
0
 public function __construct($pageCall, $pageParam)
 {
     parent::__construct($pageCall, $pageParam);
     $this->name = Lang::screenshot('submission');
     $this->command = $pageParam;
     if ($this->minSize <= 0) {
         trigger_error('config error: dimensions for uploaded screenshots equal or less than zero. Value forced to 200', E_USER_WARNING);
         $this->minSize = 200;
     }
     // get screenshot destination
     // target delivered as screenshot=<command>&<type>.<typeId>.<hash:16> (hash is optional)
     if (preg_match('/^screenshot=\\w+&(-?\\d+)\\.(-?\\d+)(\\.(\\w{16}))?$/i', $_SERVER['QUERY_STRING'], $m)) {
         // no such type
         if (empty(Util::$typeClasses[$m[1]])) {
             $this->error();
         }
         $t = Util::$typeClasses[$m[1]];
         $c = [['id', intVal($m[2])]];
         $this->destination = new $t($c);
         // no such typeId
         if ($this->destination->error) {
             $this->error();
         }
         // only accept/expect hash for crop & complete
         if (empty($m[4]) && ($this->command == 'crop' || $this->command == 'complete')) {
             $this->error();
         } else {
             if (!empty($m[4]) && ($this->command == 'add' || $this->command == 'thankyou')) {
                 $this->error();
             } else {
                 if (!empty($m[4])) {
                     $this->imgHash = $m[4];
                 }
             }
         }
         $this->destType = intVal($m[1]);
         $this->destTypeId = intVal($m[2]);
     } else {
         $this->error();
     }
 }
Ejemplo n.º 21
0
 public function __construct($pageCall, $pageParam)
 {
     if ($pageParam) {
         $this->category = [$pageParam];
     }
     parent::__construct($pageCall, $pageParam);
     foreach ($this->_post as $k => &$v) {
         $v = !empty($_POST[$k]) ? filter_input(INPUT_POST, $k, $v[0], $v[1]) : null;
     }
     if ($pageParam) {
         // requires auth && not authed
         if ($this->validCats[$pageParam][0] && !User::$id) {
             $this->forwardToSignIn('account=' . $pageParam);
         } else {
             if (!$this->validCats[$pageParam][0] && User::$id) {
                 header('Location: ?account', true, 302);
             }
         }
         // goto dashboard
     }
 }
Ejemplo n.º 22
0
Archivo: more.php Proyecto: saqar/aowow
 public function __construct($pageCall, $subPage)
 {
     parent::__construct($pageCall, $subPage);
     // chack if page is valid
     if (isset($this->validPages[$pageCall])) {
         $_ = $this->validPages[$pageCall];
         // check if subpage is valid
         if (!isset($_[1])) {
             if (($_[1] = array_search($subPage, $this->subPages[$_[0]])) === false) {
                 $this->error();
             }
             if ($pageCall == 'help') {
                 // ye.. hack .. class definitions only allow static values
                 $_[2] = Lang::main('helpTopics', $_[1]);
             }
         }
         $this->type = $_[0];
         $this->typeId = $_[1];
         $this->name = $_[2];
         $this->gPageInfo = array('type' => $this->type, 'typeId' => $this->typeId, 'name' => $this->name);
     } else {
         $this->error();
     }
 }
Ejemplo n.º 23
0
 public function __construct($pageCall, $pageParam)
 {
     parent::__construct($pageCall, $pageParam);
     $this->name = Util::ucFirst(Lang::game('emotes'));
 }
Ejemplo n.º 24
0
 public function __construct($pageCall, $__)
 {
     parent::__construct($pageCall, $__);
     $this->isPetCalc = $pageCall == 'petcalc';
     $this->name = $this->isPetCalc ? Lang::main('petCalc') : Lang::main('talentCalc');
 }
Ejemplo n.º 25
0
 public function display($override = '')
 {
     if ($override || $this->searchMask & SEARCH_TYPE_REGULAR) {
         return parent::display($override);
     } else {
         if ($this->searchMask & SEARCH_TYPE_OPEN) {
             if (!$this->loadCache($open)) {
                 $this->performSearch();
                 $open = $this->generateOpenSearch();
                 $this->saveCache($open);
             }
             header('Content-type: application/x-javascript; charset=utf-8');
             die($open);
         } else {
             if (!$this->loadCache($json)) {
                 $this->performSearch();
                 $json = $this->generateJsonSearch();
                 $this->saveCache($json);
             }
             header('Content-type: application/x-javascript; charset=utf-8');
             die($json);
         }
     }
 }
Ejemplo n.º 26
0
Archivo: home.php Proyecto: saqar/aowow
 public function __construct()
 {
     parent::__construct('home');
 }
Ejemplo n.º 27
0
 public function notFound()
 {
     if ($this->mode != CACHE_TYPE_TOOLTIP) {
         return parent::notFound(Util::ucFirst(Lang::game('profile')), '[NNF]profile or char doesn\'t exist');
     }
     header('Content-type: application/x-javascript; charset=utf-8');
     echo $this->generateTooltip(true);
     exit;
 }
Ejemplo n.º 28
0
 public function __construct($pageCall, $pageParam)
 {
     $this->getCategoryFromUrl($pageParam);
     parent::__construct($pageCall, $pageParam);
     $this->name = Util::ucFirst(Lang::game('skills'));
 }
Ejemplo n.º 29
0
 public function notFound()
 {
     if ($this->mode != CACHE_TYPE_TOOLTIP) {
         return parent::notFound(Lang::game('spell'), Lang::spell('notFound'));
     }
     header('Content-type: application/x-javascript; charset=utf-8');
     echo $this->generateTooltip(true);
     exit;
 }
Ejemplo n.º 30
0
 public function notFound($title = '', $msg = '')
 {
     if ($this->mode != CACHE_TYPE_TOOLTIP) {
         return parent::notFound($title ?: Lang::game('quest'), $msg ?: Lang::quest('notFound'));
     }
     header('Content-type: application/x-javascript; charset=utf-8');
     echo $this->generateTooltip(true);
     exit;
 }