public function getdataAction()
 {
     if ($this->getRequest()->isPost()) {
         $clbn = $this->user->getId();
         $nvc = new Application_Model_NevClub();
         $nvd = new Application_Model_Nevdata();
         $id = $this->request->getParam('id');
         $clubid = $id ? $id : $clbn;
         $nvc->setClubid($clubid);
         $bodsend = $this->request->getParam('bodsend') . ':00';
         $bodmsg = $this->request->getParam('bodmsg');
         $bodconf = $this->request->getParam('bodconf');
         $nvc->setBodsend($bodsend);
         $nvc->setBodmsg($bodmsg);
         $nvc->setBodconf($bodconf);
         $blngfirstsend = $this->request->getParam('blngfirstsend') . ':00';
         $blngfirstmsg = $this->request->getParam('blngfirstmsg');
         $blngfirstconf = $this->request->getParam('blngfirstconf');
         $nvc->setBlngfirstsend($blngfirstsend);
         $nvc->setBlngfirstmsg($blngfirstmsg);
         $nvc->setBlngfirstconf($blngfirstconf);
         $blngsecondsend = $this->request->getParam('blngsecondsend') . ':00';
         $blngsecondmsg = $this->request->getParam('blngsecondmsg');
         $blngsecondconf = $this->request->getParam('blngsecondconf');
         $nvc->setBlngsecondsend($blngsecondsend);
         $nvc->setBlngsecondmsg($blngsecondmsg);
         $nvc->setBlngsecondconf($blngsecondconf);
         $blngthirdsend = $this->request->getParam('blngthirdsend') . ':00';
         $blngthirdmsg = $this->request->getParam('blngthirdmsg');
         $blngthirdconf = $this->request->getParam('blngthirdconf');
         $nvc->setBlngthirdsend($blngthirdsend);
         $nvc->setBlngthirdmsg($blngthirdmsg);
         $nvc->setBlngthirdconf($blngthirdconf);
         $blngfourthsend = $this->request->getParam('blngfourthsend') . ':00';
         $blngfourthmsg = $this->request->getParam('blngfourthmsg');
         $blngfourthconf = $this->request->getParam('blngfourthconf');
         $nvc->setBlngfourthsend($blngfourthsend);
         $nvc->setBlngfourthmsg($blngfourthmsg);
         $nvc->setBlngfourthconf($blngfourthconf);
         $blngfifthsend = $this->request->getParam('blngfifthsend') . ':00';
         $blngfifthmsg = $this->request->getParam('blngfifthmsg');
         $blngfifthconf = $this->request->getParam('blngfifthconf');
         $nvc->setBlngfifthsend($blngfifthsend);
         $nvc->setBlngfifthmsg($blngfifthmsg);
         $nvc->setBlngfifthconf($blngfifthconf);
         $blngsixthsend = $this->request->getParam('blngsixthsend') . ':00';
         $blngsixthmsg = $this->request->getParam('blngsixthmsg');
         $blngsixthconf = $this->request->getParam('blngsixthconf');
         $nvc->setBlngsixthsend($blngsixthsend);
         $nvc->setBlngsixthmsg($blngsixthmsg);
         $nvc->setBlngsixthconf($blngsixthconf);
         $campaignsend = $this->request->getParam('campaignsend') . ':00';
         $campaignmsg = $this->request->getParam('campaignmsg');
         $campaignconf = $this->request->getParam('campaignconf');
         $nvc->setCampaignsend($campaignsend) . ':00';
         $nvc->setCampaignmsg($campaignmsg);
         $nvc->setCampaignconf($campaignconf);
         $continent = $this->request->getParam('continent');
         $nvc->setContinent($continent);
         $club = $nvd->verifyclubstatus($clubid);
         if (!$club) {
             if ($nvd->setnevstatus($nvc)) {
                 $rtn = "true";
             }
         } else {
             if ($nvd->updateMonitoring($nvc)) {
                 $rtn = "true";
             }
         }
         echo $rtn;
     }
     //        echo "bod: ".$bodsend."\nbodmsg: ".$bodmsg."\nbodconf: ".$bodconf."\nblng1send: ".$blngfirstsend."\nblng1msg: ".$blngfirstmsg."\nblng1con: ".$blngfirstconf.
     //                "\nblng2send: ".$blngsecondsend."\nblng2msg: ".$blngsecondmsg."\nblng2conf: ".$blngsecondconf."\nblng3send: ".$blngthirdsend.
     //                "\nblng3msg: ".$blngthirdmsg."\nblng3conf: ".$blngthirdconf."\nblng4send: ".$blngfourthsend."\nblng4msg: ".$blngfourthmsg.
     //                "\nblng4conf: ".$blngfourthconf."\ncamsend: ".$campaignsend."\ncammsg: ".$campaignmsg."\ncampconf: ".$campaignconf;
     exit;
 }
Beispiel #2
0
 /**
  *   Clubs status check
  *   @name getClubstatus
  *   @access public
  *   @return array of setting for each 
  *   club
  */
 public function getClubstatusNFC()
 {
     $clbs = array();
     $date = date('Y-m-d');
     $sql = "select* from club_monitoring where continent=2";
     $rs = $this->query($sql);
     if ($rs->hasResults()) {
         foreach ($rs->fetchAll() as $row) {
             $clb = new Application_Model_NevClub();
             $clb->setClubid($row['clubid']);
             $bodsend = $date . " " . $row['bodsend'];
             $clb->setBodsend($bodsend);
             $clb->setBodmsg($row['bodmsg']);
             $clb->setBodconf($row['bodconf']);
             $blng1_send = $date . " " . $row['blngfirstsend'];
             $clb->setBlngfirstsend($blng1_send);
             $clb->setBlngfirstmsg($row['blngfirstmsg']);
             $clb->setBlngfirstconf($row['blngfirstconf']);
             $blng2_send = $date . " " . $row['blngsecondsend'];
             $clb->setBlngsecondsend($blng2_send);
             $clb->setBlngsecondmsg($row['blngsecondmsg']);
             $clb->setBlngsecondconf($row['blngsecondconf']);
             $blng3_send = $date . " " . $row['blngthirdsend'];
             $clb->setBlngthirdsend($blng3_send);
             $clb->setBlngthirdmsg($row['blngthirdmsg']);
             $clb->setBlngthirdconf($row['blngthirdconf']);
             $blng4_send = $date . " " . $row['blngfourthsend'];
             $clb->setBlngfourthsend($blng4_send);
             $clb->setBlngfourthmsg($row['blngfourthmsg']);
             $clb->setBlngfourthconf($row['blngfourthconf']);
             $campsend = $date . " " . $row['campaignsend'];
             $clb->setCampaignsend($campsend);
             $clb->setCampaignmsg($row['campaignmsg']);
             $clb->setCampaignconf($row['campaignconf']);
             $clb->setTimezone($row['timezone']);
             $clb->setNevid($row['nevid']);
             $clbs[] = $clb;
         }
     }
     return $clbs;
 }