Exemple #1
0
 function load()
 {
     parent::load();
     if (intval($this->data['new_gnews']) == 0 || $this->player->isSpy) {
         $this->redirect('village1.php');
         return null;
     }
     $m = new NewsModel();
     $this->siteNews = $m->getGlobalSiteNews();
     $m->dispose();
 }
Exemple #2
0
 public function load()
 {
     parent::load();
     if (intval($this->data['new_gnews']) == 0 || $this->player->isSpy) {
         $this->redirect("village1.php");
     } else {
         $m = new NewsModel();
         $this->siteNews = $m->getGlobalSiteNews();
         $m->dispose();
     }
 }
Exemple #3
0
 public function load()
 {
     parent::load();
     if ($this->data['player_type'] != PLAYERTYPE_ADMIN) {
         exit(0);
     } else {
         $m = new NewsModel();
         $this->saved = FALSE;
         if ($this->isPost() && isset($_POST['news'])) {
             $this->siteNews = $_POST['news'];
             $this->saved = TRUE;
             $m->setGlobalPlayerNews($this->siteNews);
         } else {
             $this->siteNews = $m->getGlobalSiteNews();
         }
         $m->dispose();
     }
 }