Пример #1
0
 public function beforeFilter()
 {
     if (isset($_GET['xid']) && strlen($_GET['xid']) > 10 && in_array($this->request->params['action'], array("handle_upload"))) {
         Configure::write('Session.cookie', 'berricsupload');
         $this->Session->id($_GET['xid']);
         $this->Session->start();
     }
     parent::beforeFilter(true);
     $this->Auth->allow("*");
     $this->Auth->deny("tasks", "attach_instagram", "handle_upload");
     $this->Auth->loginAction['action'] = "form";
     $this->initPermissions();
     $this->theme = "levis-511-contest";
     //die(print_r($this->Auth));
     //force hash pushing shit
     if (in_array($this->request->params['action'], array("tasks", "gallery")) && !$this->RequestHandler->isAjax()) {
         $this->redirect("/" . $this->request->params['section'] . "#levis=" . urlencode(base64_encode("/" . $_GET['url'])));
     }
     //catch an image call, set the data
     if ($this->request->params['action'] == "image") {
         $this->setImage($this->request->params['pass'][0]);
     }
     //catch the view call, set the data
     if ($this->request->params['action'] == "view") {
         $this->setPost();
     }
     $this->set("title_for_layout", "Levis & Nike Present - Picture Perfect: A Photographic Scavenger Hunt ");
 }
Пример #2
0
 public function beforeFilter()
 {
     parent::beforeFilter();
     //$this->initPermissions();
     $this->Auth->allow("*");
     $this->theme = "news";
     /*
      * DATE STUFF VERY SKETCHY!!!!!!!!! 
      */
     $date_in = strtotime($this->request->params['pass'][0] . "-" . $this->request->params['pass'][1] . "-" . $this->request->params['pass'][2]);
     if ($date_in <= 1) {
         $date_in = $this->Dailyop->getLastNewsDay();
         //$date_in = '2011-08-28';
     } else {
         $date_in = $this->request->params['pass'][0] . "-" . $this->request->params['pass'][1] . "-" . $this->request->params['pass'][2];
     }
     $this->request->params['date_in'] = $date_in;
     if (isset($_GET['date_in'])) {
         $this->request->params['date_in'] = $_GET['date_in'];
     }
     if (isset($this->request->params['named']['date_in'])) {
         $this->request->params['date_in'] = $this->request->params['named']['date_in'];
     }
     /* 
      * END TOE DRAG 
      */
     if (strtotime($this->request->params['date_in'] > time() && !$this->isAdmin())) {
         throw new NotFoundException();
     }
 }
 public function beforeFilter()
 {
     $this->body_element = "layout/v3/one-column";
     if ($this->request->params['action'] == "handle_upload") {
         $this->Session->id($this->request->params['pass'][0]);
         $this->Session->start();
     }
     parent::beforeFilter();
     $this->initPermissions();
     $this->Auth->allow("*");
     if (isset($_SERVER['DEVSERVER'])) {
         $this->request->params['action'] = "voting";
         $this->view = "voting";
     } else {
         if ($this->request->params['action'] == "section") {
             $this->request->params['action'] = "view";
             $this->view = "view";
         }
     }
     $this->request->params['action'] = "voting";
     $this->view = "voting";
     $this->theme = 'bang-yoself-3';
     //update
     $this->set("title_for_layout", "LRG Presents: BANG YOSELF! 3");
 }
 public function beforeFilter()
 {
     parent::beforeFilter();
     if ($this->request->params['action'] == "view") {
         $this->request->params['action'] = "section";
         $this->view = "section";
     }
 }
 public function beforeFilter()
 {
     parent::beforeFilter();
     $this->Auth->allow();
     $this->initPermissions();
     if ($this->request->params['action'] == 'section') {
         $this->view = "/Dailyops/section";
     }
 }
Пример #6
0
 public function beforeFilter()
 {
     parent::beforeFilter();
     $this->theme = "battle-at-the-berrics-6";
     if ($this->request->params['action'] == "view") {
         $this->request->params['action'] = "section";
         $this->view = "section";
     }
 }
 public function beforeFilter()
 {
     parent::beforeFilter();
     $this->initPermissions();
     $this->Auth->allow("*");
     if ($this->request->params['action'] == "section") {
         $this->request->params['action'] = "view";
     }
 }
 public function beforeFilter()
 {
     parent::beforeFilter();
     $this->Auth->allow();
     $this->initPermissions();
     $this->view = $this->request->params['action'] = "view";
     $this->theme = "bon-voyage";
     $this->set("body_element", "body-element");
 }
Пример #9
0
 public function beforeFilter()
 {
     $this->body_element = "layout/v3/one-column";
     parent::beforeFilter();
     $this->theme = 'battle-at-the-berrics-4';
     if ($this->request->params['action'] == "section") {
         $this->request->params['action'] = "view";
         $this->view = "view";
     }
 }
 public function beforeFilter()
 {
     parent::beforeFilter();
     if (in_array($this->request->params['action'], array('view'))) {
         $this->request->params['action'] = "section";
         $this->view = 'section';
     }
     $this->theme = "deathwish-video";
     $this->set('body_element', 'body-element');
 }
Пример #11
0
 public function beforeFilter()
 {
     parent::beforeFilter();
     $this->Auth->allow();
     //force the newsv2 theme
     //$this->theme = "newsv2";
     if (!isset($this->request->params['pass'][0]) && !isset($this->request->params['pass'][1]) && !isset($this->request->params['pass'][2]) && $this->request->params['action'] != "view") {
         //$this->request->params['action'] = "archive";
     }
 }
Пример #12
0
 public function beforeFilter()
 {
     $this->body_element = "layout/v3/one-column";
     parent::beforeFilter();
     $this->Auth->allow("*");
     //set the theme
     $this->theme = "battle-at-the-berrics-5";
     if ($this->request->params['action'] == "view") {
         $this->request->params['action'] = "section";
         $this->view = "section";
     }
 }
 public function beforeFilter()
 {
     parent::beforeFilter();
     $this->Auth->allow();
     $this->theme = "hold-it-down";
     if ($this->request->params['action'] == "section") {
         $this->setPost("element-eu-hold-it-down", "intro.html");
     }
     if ($this->request->params['action'] == "view") {
         $this->request->params['action'] = $this->view = "section";
         $this->setPost();
     }
 }
Пример #14
0
 public function beforeFilter()
 {
     parent::beforeFilter();
     $this->theme = "mtn-dew";
     if (isset($_GET['uri'])) {
         $_GET['uri'] = trim($_GET['uri'], "/");
         $uri = explode("/", $_GET['uri']);
         $this->request->params['section'] = $uri[0];
         $this->request->params['uri'] = $uri[1];
         $this->request->params['action'] = "view";
     }
     if ($this->request->params['action'] == "view") {
         $this->request->params['action'] = $this->view = "section";
         $this->setPost();
     }
 }
 public function beforeFilter()
 {
     if (isset($_GET['xid']) && $_GET['xid'] != "undefined" && !empty($_GET['xid']) && $this->request->params['action'] == "handle_upload") {
         CakeSession::id($_GET['xid']);
         CakeSession::start();
     }
     parent::beforeFilter();
     //$this->Auth->allowedActions = array();
     $this->Auth->allow();
     $this->Auth->deny("challenge", "handle_upload");
     $this->initPermissions();
     //die(print_r($this->Auth));
     $this->theme = "for-the-record";
     if ($this->request->params['action'] == "view") {
         $this->request->params['action'] = "section";
         $this->view = "section";
     }
 }
Пример #16
0
 public function beforeFilter()
 {
     parent::beforeFilter();
     $this->initPermissions();
     $this->Auth->allow("*");
     $this->theme = "sls-voting";
     if ($this->request->params['action'] == "view") {
         if ($this->RequestHandler->isAjax()) {
             $this->request->params['action'] = "open_video";
         } else {
             $this->request->params['action'] = "section";
         }
     }
     if (isset($this->request->params['uri']) && !empty($this->request->params['uri'])) {
         $p = $this->setPost();
         $this->setFacebookMetaImg($p['DailyopMediaItem'][0]['MediaFile']);
     }
     if (preg_match('/\\/dailyops/', $_SERVER['REQUEST_URI'])) {
         $this->get_full_date_nav();
     }
 }
Пример #17
0
 public function beforeFilter()
 {
     $this->body_element = "layout/v3/one-column";
     parent::beforeFilter();
     //$this->initPermissions();
     //$this->Auth->allow("*");
     if ($this->request->params['action'] == "section") {
         $this->request->params['action'] = "view";
         $this->view = "view";
     }
     switch ($this->request->params['section']) {
         case "battle-at-the-berrics-1":
             $this->event_id = 50012;
             break;
         case "battle-at-the-berrics-2":
             $this->event_id = 50013;
             break;
         case "battle-at-the-berrics-3":
             $this->event_id = 50014;
             break;
     }
     $this->theme = $this->request->params['section'];
     $this->set("title_for_layout", "The Berrics - Battle At The Berrics");
 }
 public function beforeFilter()
 {
     if ($this->request->params['action'] == "handle_upload") {
         $this->Session->id($this->request->params['pass'][0]);
         $this->Session->start();
     }
     parent::beforeFilter();
     $this->Auth->allowedActions = array();
     $this->Auth->allow("*");
     $this->initPermissions();
     //set the theme up
     $this->theme = "younited-nations-3";
     switch ($this->theme) {
         case "younited-nations-3":
             if ($this->request->params['action'] == "section") {
                 $this->request->params['action'] = "crews";
             }
             $title_for_layout = "YOUnited Nations 3";
             $this->event_id = 4;
             break;
     }
     $this->set(compact("title_for_layout"));
     $this->set("event_id", $this->event_id);
 }
Пример #19
0
 public function beforeFilter()
 {
     $this->body_element = "layout/v3/one-column";
     parent::beforeFilter();
     $this->theme = "yn3-finals";
     if (in_array($this->request->params['action'], array("index", "view")) || empty($this->request->params['action'])) {
         if ($this->RequestHandler->isAjax()) {
             $this->request->params['action'] = "open_video";
         } else {
             $this->request->params['action'] = "section";
             $this->view = "section";
         }
     }
     if (isset($this->request->params['uri']) && !empty($this->request->params['uri'])) {
         $this->setPost();
     }
     if (preg_match('/\\/dailyops/', $_SERVER['REQUEST_URI'])) {
         $this->get_full_date_nav();
         $dateIn = date("Y-m-d");
         $older_date = $this->Dailyop->getNextDate($dateIn);
         $newer_date = $this->Dailyop->getNextDate($dateIn, false);
         $this->set(compact("dateIn", "newer_date", "older_date"));
     }
 }
 public function section()
 {
     parent::section();
     $this->view = "/Dailyops/section";
 }
Пример #21
0
 public function section()
 {
     $this->view = "/Dailyops/section";
     return parent::section();
 }
 public function beforeFilter()
 {
     parent::beforeFilter();
     $this->request->params['action'] = $this->view = "dailyops";
 }