/**
  * 
  * 
  */
 public function schedulingAction()
 {
     if ($this->request->isPost()) {
         $userid = $this->user->getId();
         // see if a folder was selected
         $sendto = $this->request->getParam('folders');
         $description = trim($this->request->getParam('name'));
         $this->msg_head = $this->request->getParam('msghead');
         $this->msg_body = $this->request->getParam('msgbody');
         $this->msg_foot = $this->request->getParam('msgfoot');
         $this->user->setTimeZone($this->request->getParam('timezone'));
         $timezone = $this->user->getTimeZone();
         $shortcode = $this->request->getParam('shortcode');
         $datetime = date_create($this->request->getParam('sendtime') . ":00");
         $sendtime = date_format($datetime, 'Y-m-d H:i:s');
         $campaignid = trim($this->request->getParam('campid'));
         $weekday = $this->request->getParam('weekday');
         $week = $this->request->getParam('week');
         $status = $this->request->getParam('status');
         //             echo "\nFold: ".$sendto."\nDes: ".$description."\nHead: ".$this->msg_head."\nMsgbody: ".$this->msg_body.
         //                     "\nTz: ".$timezone."\nSc: ".$shortcode."\nSt: ".$sendtime."\nWd: ".$weekday."\nMd: ".$weekday."\nSt: ".$status;
         //             exit;
         if ($sendto != "" || $description != "" || $this->msg_head != "" || $this->msg_body != "" || $shortcode != "") {
             //                    $folders = explode(',',$sendto);
             $obj = new stdClass();
             $obj->campaingid = $campaignid;
             $obj->createuser = $userid;
             $obj->folder = $sendto;
             $obj->name = $description;
             $obj->msghead = $this->msg_head;
             $obj->message = $this->msg_body;
             $obj->msgfoot = $this->msg_foot;
             $obj->timezone = $timezone;
             $obj->shortcode = $shortcode;
             $obj->sendtime = '00:00:00';
             $obj->scheduled = $sendtime;
             $obj->weekday = $weekday;
             $obj->week = $week;
             $obj->status = $status;
             $msg = new Application_Model_Message();
             $rs = $msg->weeklycampaigns($obj);
         }
         if ($rs) {
             echo "TRUE";
         } else {
             echo "FALSE";
         }
         exit;
     }
 }