public function dataAction() { $this->_helper->layout->setLayout('nonadmin'); $userid = $this->user->getId(); $subscriberid = $this->request->getParam('id'); $formObj = new Application_Model_Form(); $subscriberDetails = $formObj->getSubscriberDataById($subscriberid, $userid); //echo "<pre>"; print_r($subscriberDetails); exit; $subscribersDetailsForm = $formObj->getSubscriberDataValueById($subscriberid, $subscriberDetails['0']['webform_url_id']); ////echo "<pre>"; print_r($subscribersDetailsForm); exit; $folder = new Application_Model_Folder($this->user); $phonenumberOptinoutDate = $folder->getPhoneNumberOptinoutDate($subscriberDetails['0']['phonenumber'], $subscriberDetails['0']['folderid']); //echo "<pre>"; print_r($phonenumberOptinoutDate); exit; $this->view->subscriberDetails = $subscriberDetails; $this->view->otherSubscribersDetails = $subscribersDetailsForm; $this->view->phonenumberOptinoutDate = $phonenumberOptinoutDate; }
// Setup routing of model autoloaders $loader = new Zend_Loader_Autoloader_Resource(array('basePath' => $apppath . '/application/', 'namespace' => 'Application')); // Name, path, namepsace $loader->addResourceType('model', 'models', 'Model'); // Get our config file $config = new Zend_Config_Ini($apppath . '/application/configs/application.ini'); Zend_Registry::set('config', $config->production); // Because our models need it this way $phone = $_POST['phone']; $id = $_POST['id']; $first = $_POST['first']; $last = $_POST['last']; $day = $_POST['day']; $month = $_POST['month']; $email = $_POST['email']; $year = $_POST['year']; $confirmed = $_POST['cnfy']; $user = new Application_Model_User((int) $id); $frm = new Application_Model_Form(); if ($user->reward == '1') { $clubreadyid = $user->accountstatus; } $sendemail = FALSE; $dob = date($year . '-' . $month . '-' . $day); $res = $frm->postLeadsClubready($first, $last, $phone, $dob, $email, $clubreadyid, $sendemail); // {"UserId":3597061,"Success":true,"EmailSent":false,"PackageAdded":false} echo $res; // echo $clubreadyid; // echo $phone." : ".$id." : ".$last." : ".$day." : ".$month." : ".$year." : ".$confirmed." : ".$dob." CRR: ".$clubreadyid; // exit;
public function deleteAction() { //echo "<pre>"; print_r($this->_request->getParams()); exit; $formObj = new Application_Model_Form(); $deleteidArray = $this->request->getParam('deleteid'); foreach ($deleteidArray as $formid) { //echo $formid; exit; $formObj->deleteWebformById($formid); } $this->_redirector->gotoUrl('/form/create/'); }
public function campaignAction() { $success = null; $message = null; $error = null; $recipients = array(); $sentto = array(); $description = null; $sendtime = null; $timezone = null; $status = null; $shortcode = 0; // set the default message body values $this->defaultValues(); $userid = $this->user->getId(); $formObj = new Application_Model_Form(); $user = new Application_Model_User($userid); $rpt = new Application_Model_Report(); $yearmonth = date('Y-m'); // Logged in users folder ID's $user_folders = $this->user->getFolders(); $this->view->folders = $user_folders; // When the form is submit if ($this->request->isPost()) { } // $msg = new Application_Model_Message(); // $arr = $msg->selectStatusSend(); // $ids = $msg->verifyifcampaignSend($arr); // $msg->updateSendNowcampaign($ids); // echo '<pre>'; print_r($arr); // echo '<pre>'; print_r(); // exit; $campid = date('YmdHis') . $this->user->getId(); $userusage = $rpt->dashboard_totalMessagesSentOut($userid, $yearmonth); // Send the message values back to the view $this->view->description = $description; $this->view->sendtime = $sendtime; $this->view->timezone = $timezone; $this->view->msg_head = $this->msg_head; $this->view->msg_body = $this->msg_body; $this->view->msg_foot = $this->msg_foot; // Status back to the view $this->view->error = $error; $this->view->success = $success; $this->view->message = $message; $this->view->formobject = $formObj; $this->view->formobjects = $formObj->webformList($userid); $this->view->userid = $userid; $this->view->userObj = $user; $this->view->msglimit = $user->messagelimit; $this->view->userusage = $userusage; $this->view->campid = $campid; }
public function createshortenedurlAction() { $frmObj = new Application_Model_Form(); if ($this->getRequest()->isPost()) { $url = $this->request->getParam('url'); $shrUrl = $frmObj->makeShortUrl($url); echo $shrUrl; } exit; }