Exemplo n.º 1
0
 protected function ssManage()
 {
     $res = [];
     if ($this->_get['type'] && $this->_get['type'] && $this->_get['typeid'] && $this->_get['typeid']) {
         $res = CommunityContent::getScreenshotsForManager($this->_get['type'], $this->_get['typeid']);
     } else {
         if ($this->_get['user']) {
             if ($uId = DB::Aowow()->selectCell('SELECT id FROM ?_account WHERE displayName = ?', $this->_get['user'])) {
                 $res = CommunityContent::getScreenshotsForManager(0, 0, $uId);
             }
         }
     }
     return 'ssm_screenshotData = ' . Util::toJSON($res);
 }
Exemplo n.º 2
0
 private function handleScreenshots()
 {
     $this->addJS('screenshot.js');
     $this->addCSS(array(['string' => '.layout {margin: 0px 25px; max-width: inherit; min-width: 1200px; }'], ['string' => '#highlightedRow { background-color: #322C1C; }']));
     $ssGetAll = isset($_GET['all']) && empty($_GET['all']);
     $ssPages = [];
     $ssData = [];
     $nMatches = 0;
     if (!empty($_GET['type']) && !empty($_GET['typeid'])) {
         $ssData = CommunityContent::getScreenshotsForManager(intVal($_GET['type']), intVal($_GET['typeid']));
         $nMatches = count($ssData);
     } else {
         if (!empty($_GET['user'])) {
             $name = urldecode($_GET['user']);
             if (mb_strlen($name) >= 3) {
                 if ($uId = DB::Aowow()->selectCell('SELECT id FROM ?_account WHERE displayName = ?', ucFirst($name))) {
                     $ssData = CommunityContent::getScreenshotsForManager(0, 0, $uId);
                     $nMatches = count($ssData);
                 }
             }
         } else {
             $ssPages = CommunityContent::getScreenshotPagesForManager($ssGetAll, $nMatches);
         }
     }
     $this->getAll = $ssGetAll;
     $this->ssPages = $ssPages;
     $this->ssData = $ssData;
     $this->ssNFound = $nMatches;
     // ssm_numPagesFound
 }
Exemplo n.º 3
0
 private function admin_handleSSManage()
 {
     $res = [];
     if ($this->get('type') && intVal($this->get('type')) && $this->get('typeid') && intVal($this->get('typeid'))) {
         $res = CommunityContent::getScreenshotsForManager($this->get('type'), $this->get('typeid'));
     } else {
         if ($this->get('user') && strlen(urldecode($this->get('user'))) > 2) {
             if ($uId = DB::Aowow()->selectCell('SELECT id FROM ?_account WHERE displayName = ?', strtolower(urldecode($this->get('user'))))) {
                 $res = CommunityContent::getScreenshotsForManager(0, 0, $uId);
             }
         }
     }
     return 'ssm_screenshotData = ' . json_encode($res, JSON_NUMERIC_CHECK);
 }