当前位置: 首页>>代码示例>>PHP>>正文


PHP Campaign::fetchRow方法代码示例

本文整理汇总了PHP中Campaign::fetchRow方法的典型用法代码示例。如果您正苦于以下问题:PHP Campaign::fetchRow方法的具体用法?PHP Campaign::fetchRow怎么用?PHP Campaign::fetchRow使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Campaign的用法示例。


在下文中一共展示了Campaign::fetchRow方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: adminexportdataAction

 function adminexportdataAction()
 {
     $this->_helper->layout->disableLayout();
     $idValue = explode('&', $this->_request->getParam('id'));
     $this->campaign_id = $idValue[0];
     $campaignModel = new Campaign();
     $this->view->campaign = $campaignModel->fetchRow('id = ' . $this->campaign_id);
     $this->view->flag = 0;
     if ($this->_request->isPost()) {
         $postData = $this->_request->getPost();
         $this->view->flag = 1;
         $db = Zend_Registry::get('db');
         $select = $db->select();
         $select->from('campaign', null);
         $select->join('campaign_invitation', 'campaign.id = campaign_invitation.campaign_id', array('create_date', 'state'));
         $select->join('consumer', "consumer.id = campaign_invitation.consumer_id");
         switch ($postData['action']) {
             case 'all':
                 $select->join('campaign_participation', 'campaign_invitation.id = campaign_participation.campaign_invitation_id', array('accept_date', 'state'));
                 break;
             case 'sent':
                 $select->join('campaign_participation', 'campaign_invitation.id = campaign_participation.campaign_invitation_id and campaign_participation.state="KIT SENT"', array('accept_date', 'state'));
                 break;
             case 'notsent':
                 $select->join('campaign_participation', 'campaign_invitation.id = campaign_participation.campaign_invitation_id and campaign_participation.state<>"KIT SENT"', array('accept_date', 'state'));
                 break;
         }
         $select->where('campaign_invitation.campaign_id = ?', $this->campaign_id)->where('consumer.pest is null or consumer.pest != 1');
         $campaignParticipations = $db->fetchAll($select);
         //			Zend_Debug::dump($campaignParticipations);die();
         $campaignUsers = array();
         $file = $this->campaign_id . '_' . date('Y-m-d_H_i_s') . "participation.csv";
         if ($campaignParticipations) {
             $i = 0;
             foreach ($campaignParticipations as $val) {
                 $campaignUsers[] = array($i, $val['name'], $val['email'], $val['login_phone'], $val['recipients_name'], $val['province'], $val['city'], $val['address1'], $val['phone'], $val['qq'], $val['id'], $val['create_date'], $val['accept_date']);
                 $i++;
             }
             $header = array('No.', 'Name', 'Email', 'Login_phone', 'Recipients_name', 'Province', 'City', 'Address1', 'Phone', 'QQ', 'UserID', 'InvitateDate', 'AcceptedDate');
             $handle = fopen(dirname(dirname(dirname(__FILE__))) . '/public/csv/' . $file, "w");
             //				Zend_Debug::dump(dirname ( dirname ( dirname ( __FILE__ ) ) ) . '/public/csv/' . $file);die();
             fputcsv($handle, $header);
             foreach ($campaignUsers as $line) {
                 fputcsv($handle, $line);
             }
             fclose($handle);
         }
         $this->view->file = file_exists(dirname(dirname(dirname(__FILE__))) . '/public/csv/' . $file) ? dirname(dirname(dirname(__FILE__))) . '/public/csv/' . $file : false;
         $this->view->filename = $file;
     }
 }
开发者ID:omusico,项目名称:wildfire_php,代码行数:51,代码来源:CampaignparticipationController.php

示例2: paticipateAction

 function paticipateAction()
 {
     $this->_helper->layout->disableLayout();
     $campaign_id = $this->_request->getParam('id');
     $currentTime = date("Y-m-d H:i:s");
     $campaignModel = new Campaign();
     $campaign = $campaignModel->fetchRow('id =' . $campaign_id);
     $langNamespace = new Zend_Session_Namespace('Lang');
     $lang = $langNamespace->lang;
     if ($lang == 'en') {
         $surveyId = $campaign->i2_survey_id_en;
     } else {
         $surveyId = $campaign->i2_survey_id;
     }
     $this->view->campaing_name = $campaign->name;
     $this->view->id = $campaign_id;
     $this->view->surveyId = $surveyId;
     $file = $surveyId . '.phtml';
     $this->view->file = $file;
     $this->view->includeCrystalCss = true;
     $this->_helper->layout->setLayout("layout_questionnaire");
 }
开发者ID:omusico,项目名称:wildfire_php,代码行数:22,代码来源:MissionController.php

示例3: saveacceptinvitation

 function saveacceptinvitation($survey_id, $consumer, $currentTime)
 {
     $campaignModel = new Campaign();
     $this->view->campaign = $campaignModel->fetchRow("pre_campaign_survey=" . $survey_id . " or " . "pre_campaign_survey_en=" . $survey_id);
     $db = Zend_Registry::get('db');
     if ($this->view->campaign != null) {
         $campaignId = $this->view->campaign->id;
     }
     if ($this->view->campaign != null && $campaignId != null && $campaignId > 0) {
         $campaignInvitationModel = new CampaignInvitation();
         $campaignInvitation = $campaignInvitationModel->fetchRow("campaign_id=" . $campaignId . " and consumer_id=" . $consumer['id']);
         $id = $campaignInvitation->id;
         $campaignInvitation->state = "ACCEPTED";
         $campaignInvitation->save();
         $result = $db->fetchOne("SELECT COUNT(*) FROM campaign_participation WHERE campaign_invitation_id=:t1", array('t1' => $id));
         if ($result == 0) {
             //create participation
             $campaignParticipationModel = new CampaignParticipation();
             $currentTime = date("Y-m-d H:i:s");
             $row = $campaignParticipationModel->createRow();
             $row->campaign_invitation_id = $survey_id;
             $row->accept_date = $currentTime;
             $row->state = 'NEW';
             $row->save();
         }
     }
 }
开发者ID:omusico,项目名称:wildfire_php,代码行数:27,代码来源:XiaoneicallbackController.php

示例4: admindownloadreportAction

 public function admindownloadreportAction()
 {
     ini_set('display_errors', 1);
     $frontController = Zend_Controller_Front::getInstance();
     $frontController->throwExceptions(true);
     $this->_helper->layout->disableLayout();
     $reportInforArray = array();
     //post
     if ($this->_request->isPost()) {
         $formData = $this->_request->getPost();
         $accessCodeList = array();
         // get access code from post
         if (isset($formData['accessCode'])) {
             $accessCodeArray = preg_split('/[;\\s]+[\\n\\r\\t]*/', trim($formData['accessCode']));
             $accessCodeString = '';
             foreach ($accessCodeArray as $accessCode) {
                 $accessCodeString .= "'" . $accessCode . "',";
             }
             // get accesscode from campaign
             $db = Zend_Registry::get('db');
             $selectAccessCode = $db->select();
             $selectAccessCode->from('report', array('consumer_id', 'accesscode', 'create_date', 'source'))->joinLeft('reward_point_transaction_record', 'report.reward_point_transaction_record_id = reward_point_transaction_record.id', 'point_amount')->join('consumer', 'consumer.id = report.consumer_id', array('email,login_phone,phone,recipients_name'))->where('report.accesscode in (' . substr($accessCodeString, 0, strlen($accessCodeString) - 1) . ")")->where("report.state = 'APPROVED'")->order(" create_date desc ")->limit(0);
             $accessCodeArray = $db->fetchAll($selectAccessCode);
             foreach ($accessCodeArray as $accessCode) {
                 array_push($accessCodeList, $accessCode['accesscode']);
                 $reportInforArray[$accessCode['accesscode']]['consumer_id'] = $accessCode['consumer_id'];
                 $reportInforArray[$accessCode['accesscode']]['email'] = $accessCode['email'];
                 $reportInforArray[$accessCode['accesscode']]['login_phone'] = $accessCode['login_phone'];
                 $reportInforArray[$accessCode['accesscode']]['phone'] = $accessCode['phone'];
                 $reportInforArray[$accessCode['accesscode']]['recipients_name'] = $accessCode['recipients_name'];
                 $reportInforArray[$accessCode['accesscode']]['createdate'] = $accessCode['create_date'];
                 $reportInforArray[$accessCode['accesscode']]['source'] = $accessCode['source'];
                 $reportInforArray[$accessCode['accesscode']]['point'] = $accessCode['point_amount'];
                 $reportInforArray[$accessCode['accesscode']]['reply'] = '';
             }
             // get reply for report
             $selectReportReply = $db->select();
             $selectReportReply->from('report', 'accesscode')->joinLeft('reply', 'report.id = reply.report_id', 'content')->where('report.accesscode in (' . substr($accessCodeString, 0, strlen($accessCodeString) - 1) . ")")->limit(0);
             $reportReplyArray = $db->fetchAll($selectReportReply);
             foreach ($reportReplyArray as $reply) {
                 $reportInforArray[$reply['accesscode']]['reply'] = $reply['content'];
             }
             // get tag for report
             $selectAllTag = $db->select();
             $selectAllTag->from('tags', array('id', 'name'))->where("tags.module ='REPORT'");
             $allTagArray = $db->fetchAll($selectAllTag);
             $selectReportTag = $db->select();
             $selectReportTag->from('report', 'accesscode')->join('report_tag', 'report.id = report_tag.report_id', null)->join('tags', 'tags.id = report_tag.tag_id', 'name')->where('report.accesscode in (' . substr($accessCodeString, 0, strlen($accessCodeString) - 1) . ")")->limit(0);
             $reportTag = $db->fetchAll($selectReportTag);
             $reportTagArray = array();
             foreach ($reportTag as $tag) {
                 $reportTagArray[$tag['accesscode']][$tag['name']] = 1;
             }
             // get reports from ws
             $indicate2Connect = new Indicate2_Connect();
             $response = $indicate2Connect->getAnswerSetForAccessCode($accessCodeList);
         } else {
             // get survey_id for campaign
             $campaignModel = new Campaign();
             $campaign = $campaignModel->fetchRow('id = ' . $formData['campaign_id']);
             switch ($formData['submittype']) {
                 case 'pre_campaign':
                     $survey_id = $campaign['pre_campaign_survey'];
                     if ($formData['campaign_language'] == 'en') {
                         $survey_id = $campaign['pre_campaign_survey_en'];
                     }
                     $accessCodeList = null;
                     break;
                 case 'post_campaign':
                     $survey_id = $campaign['post_campaign_survey'];
                     if ($formData['campaign_language'] == 'en') {
                         $survey_id = $campaign['post_campaign_survey_en'];
                     }
                     $accessCodeList = null;
                     break;
                     // get reports
                 // get reports
                 default:
                     $survey_id = $campaign['i2_survey_id'];
                     if ($formData['campaign_language'] == 'en') {
                         $survey_id = $campaign['i2_survey_id_en'];
                     }
                     // get accesscode from campaign
                     $db = Zend_Registry::get('db');
                     $selectAccessCode = $db->select();
                     $selectAccessCode->from('report', array('consumer_id', 'accesscode', 'create_date', 'source'))->joinLeft('reward_point_transaction_record', 'report.reward_point_transaction_record_id = reward_point_transaction_record.id', 'point_amount')->join('consumer', 'consumer.id = report.consumer_id', array('email', 'login_phone', 'phone', 'recipients_name'))->where('report.campaign_id = ?', $formData['campaign_id'])->where("report.state = 'APPROVED'")->order("create_date desc")->limit(0);
                     $accessCodeArray = $db->fetchAll($selectAccessCode);
                     foreach ($accessCodeArray as $accessCode) {
                         array_push($accessCodeList, $accessCode['accesscode']);
                         $reportInforArray[$accessCode['accesscode']]['consumer_id'] = $accessCode['consumer_id'];
                         $reportInforArray[$accessCode['accesscode']]['email'] = $accessCode['email'];
                         $reportInforArray[$accessCode['accesscode']]['login_phone'] = $accessCode['login_phone'];
                         $reportInforArray[$accessCode['accesscode']]['phone'] = $accessCode['phone'];
                         $reportInforArray[$accessCode['accesscode']]['recipients_name'] = $accessCode['recipients_name'];
                         $reportInforArray[$accessCode['accesscode']]['createdate'] = $accessCode['create_date'];
                         $reportInforArray[$accessCode['accesscode']]['source'] = $accessCode['source'];
                         $reportInforArray[$accessCode['accesscode']]['point'] = $accessCode['point_amount'];
                         $reportInforArray[$accessCode['accesscode']]['reply'] = '';
                     }
                     // get reply for report
//.........这里部分代码省略.........
开发者ID:omusico,项目名称:wildfire_php,代码行数:101,代码来源:ReportController.php

示例5: postcampaignfinishedAction

 function postcampaignfinishedAction()
 {
     $this->view->activeTab = 'Campaign';
     $this->view->title = $this->view->title = $this->view->translate("Wildfire") . " - " . $this->view->translate("You_are_in");
     $id = (int) $this->_request->getParam('survey');
     $campaignModel = new Campaign();
     $this->view->campaign = $campaignModel->fetchRow("post_campaign_survey=" . $id . " or " . "post_campaign_survey_en=" . $id);
     $db = Zend_Registry::get('db');
     $campaignId = $this->view->campaign->id;
     $this->view->campaign_id = $campaignId;
     $consumer = $this->_currentUser;
     if ($campaignId > 0) {
         //change campaign_participation state
         $db = Zend_Registry::get('db');
         $select2 = $db->select();
         $select2->from('campaign_participation', '*')->join('campaign_invitation', 'campaign_invitation.id = campaign_participation.campaign_invitation_id', null)->where('campaign_invitation.consumer_id = ?', $consumer->id)->where('campaign_invitation.campaign_id = ?', $campaignId)->where("campaign_participation.state != 'COMPLETED'");
         $isExist = $db->fetchAll($select2);
         //	Zend_Debug::dump($isExist[0]['campaign_invitation_id']);
         if ($isExist != null) {
             $campaing_participateModel = new CampaignParticipation();
             $campaign_participation = $campaing_participateModel->fetchRow('campaign_invitation_id = ' . $isExist[0]['campaign_invitation_id']);
             $campaign_participation->state = 'COMPLETED';
             $campaign_participation->save();
             //add 200 points for member in reward_point_transaction_record
             $rewardPointTransactionRecordModel = new RewardPointTransactionRecord();
             $rewardPointTransaction = array("consumer_id" => $consumer->id, "date" => date("Y-m-d H:i:s"), "transaction_id" => "5", "point_amount" => "200");
             $id = $rewardPointTransactionRecordModel->insert($rewardPointTransaction);
             //2011-05-13 change the rank of consumer
             $rankModel = new Rank();
             $rankModel->changeConsumerRank($consumer->id);
         }
     }
 }
开发者ID:omusico,项目名称:wildfire_php,代码行数:33,代码来源:CampaignController.php

示例6: adminreportAction

 function adminreportAction()
 {
     $this->_helper->layout->setLayout("layout_admin");
     $sms_id = (int) $this->_request->getParam('sms_id');
     $smsSql = "select b.* from spark_sms as a, spark_sms as b where a.id=" . $sms_id . " and b.consumer_id=a.consumer_id and b.id-a.id>-5 and b.id-a.id<5 order by b.id";
     $db = Zend_Registry::get('db');
     $rs = $db->fetchAll($smsSql);
     $sms = '';
     $consumer_id = 0;
     $smsIds = array();
     foreach ($rs as $row) {
         array_push($smsIds, $row['id']);
         $sms .= $row['text'];
         $consumer_id = $row['consumer_id'];
     }
     //update sms state
     $ids = implode(",", $smsIds);
     //Zend_Debug::dump($ids);
     $updateSql = $db->prepare("update spark_sms set state='Reported' where id in (" . $ids . ")");
     $updateSql->execute();
     $campaign_id = (int) $this->_request->getParam('cam_id');
     //whether participate in the campaign
     $campaigninvitationModel = new CampaignInvitation();
     $campaigninvitation = $campaigninvitationModel->fetchRow('campaign_id = ' . $campaign_id . ' and consumer_id' . ' =' . $consumer_id);
     if ($campaigninvitation == null) {
         $this->_helper->redirector('index', 'home');
     }
     //get lang
     $consumerModel = new Consumer();
     $consumer = $consumerModel->fetchRow("id=" . $consumer_id);
     //get i2_survey_id
     $campaignModel = new Campaign();
     $campaign = $campaignModel->fetchRow("id=" . $campaign_id);
     $langNamespace = new Zend_Session_Namespace('Lang');
     $lang = $langNamespace->lang;
     if ($consumer->language_pref == 'en') {
         $surveyId = $campaign->i2_survey_id_en;
     } else {
         $surveyId = $campaign->i2_survey_id;
     }
     $this->view->campaing_name = $campaign->name;
     $indicate2Connect = new Indicate2_Connect();
     $accesscode = $indicate2Connect->createParticipation($consumer->email, $surveyId);
     //save list in session
     $reportNamespace = new Zend_Session_Namespace('AgentReports');
     $reportNamespace->{$accesscode} = $consumer_id;
     $source = $accesscode . "_source";
     $reportNamespace->{$source} = "sms";
     $config = Zend_Registry::get('config');
     $this->view->filloutPage = $config->indicate2->home . "/c/" . $accesscode . "/theme/wildfire";
     $this->view->id = $consumer->id;
     $this->view->name = $consumer->name;
     $this->view->sms = $sms;
     $this->view->includeCrystalCss = true;
 }
开发者ID:omusico,项目名称:wildfire_php,代码行数:55,代码来源:SmsController.php

示例7: adminsaveimagereportpointAction

 function adminsaveimagereportpointAction()
 {
     $type = $this->_request->getParam('type');
     $db = Zend_Registry::get('db');
     if ($type == 'reportPoint') {
         $idStr = $this->_request->getParam('reportids');
         $idStrArray = explode(',', $idStr);
         $reportIdArray = array();
         $i = 0;
         $config = Zend_Registry::get('config');
         $smtpSender = new Zend_Mail_Transport_Smtp($config->smtp->report->mail->server, array('username' => $config->smtp->report->mail->username, 'password' => $config->smtp->report->mail->password, 'auth' => $config->smtp->report->mail->auth, 'ssl' => $config->smtp->report->mail->ssl, 'port' => $config->smtp->report->mail->port));
         //			$smtpSender = new Zend_Mail_Transport_Smtp(
         //						'smtp.163.com',array(
         //						'username'=>'yun_simon@163.com',
         //						'password'=>'19990402',
         //						'auth'=>'login'));
         Zend_Mail::setDefaultTransport($smtpSender);
         foreach ($idStrArray as $idAndState) {
             if ($idAndState == '') {
                 continue;
             }
             $idAndStateArray = explode('@', $idAndState);
             if ($idAndStateArray[4] == '' || $idAndStateArray[4] == '0') {
                 $imagereportModel = new ImageReport();
                 $row = $imagereportModel->fetchRow('id = ' . $idAndStateArray[0]);
                 if ($row == null) {
                     continue;
                 }
                 if ($row->reward_point_transaction_record_id != null && $row->reward_point_transaction_record_id != '') {
                     $rewardModel = new RewardPointTransactionRecord();
                     $reward = $rewardModel->fetchRow('id = ' . $row->reward_point_transaction_record_id);
                     if ($reward != null) {
                         $reward->point_amount = $idAndStateArray[4];
                         $reward->save();
                     }
                 }
                 $row->state = $idAndStateArray[1];
                 $row->save();
             } else {
                 $imagereportModel = new ImageReport();
                 $row = $imagereportModel->fetchRow('id = ' . $idAndStateArray[0]);
                 $row->state = $idAndStateArray[1];
                 if ($row->reward_point_transaction_record_id == null || $row->reward_point_transaction_record_id == '') {
                     $rewardModel = new RewardPointTransactionRecord();
                     $reward = $rewardModel->createRow();
                     $reward->consumer_id = $idAndStateArray[2];
                     $reward->date = date("Y-m-d H:i:s");
                     $reward->transaction_id = 9;
                     $reward->point_amount = $idAndStateArray[4];
                     $row->reward_point_transaction_record_id = $reward->save();
                 } else {
                     $rewardModel = new RewardPointTransactionRecord();
                     $reward = $rewardModel->fetchRow('id = ' . $row->reward_point_transaction_record_id);
                     if ($reward != null) {
                         $reward->date = date("Y-m-d H:i:s");
                         $reward->point_amount = $idAndStateArray[4];
                         $reward->save();
                     }
                 }
                 $row->save();
                 //2011-05-13 change the rank of consumer
                 $rankModel = new Rank();
                 $rankModel->changeConsumerRank($idAndStateArray[2]);
             }
             $consumerModel = new Consumer();
             $consumer = $consumerModel->fetchRow('id = ' . $idAndStateArray[2]);
             //send mail...
             $mail = new Zend_Mail('utf-8');
             if ($consumer->language_pref != null && $consumer->language_pref == 'en') {
                 $emailSubject = $this->view->translate('Admin_Reply_WOM_IMAGEReport_Subject_en');
                 $emailBody = $this->view->translate('Admin_Reply_WOM_IMAGEReport_Body_en');
             } else {
                 $emailSubject = $this->view->translate('Admin_Reply_WOM_IMAGEReport_Subject_zh');
                 $emailBody = $this->view->translate('Admin_Reply_WOM_IMAGEReport_Body_zh');
             }
             $campaignModel = new Campaign();
             $campaign = $campaignModel->fetchRow('id = ' . $row->campaign_id);
             $stringChange = array('?USERNAME?' => $consumer->name, '?CAMPAIGN?' => $campaign->name, '?MYRESPONSE?' => $idAndStateArray[3]);
             $emailBody = strtr($emailBody, $stringChange);
             $langNamespace = new Zend_Session_Namespace('Lang');
             if ($langNamespace->lang == 'en' || $langNamespace->lang == 'EN') {
                 $mail->setSubject($emailSubject);
             } else {
                 $mail->setSubject("=?UTF-8?B?" . base64_encode($emailSubject) . "?=");
             }
             $mail->setBodyText($emailBody);
             $mail->addTo($consumer->email);
             $mail->setFrom($config->smtp->report->mail->username, $this->view->translate('Wildfire'));
             //				$mail->setFrom('yun_simon@163.com',$this->view->translate('Wildfire'));
             $mail->send();
             // save email
             $imagereportreplyModel = new ImageReportReply();
             $imagereportreply = $imagereportreplyModel->createRow();
             $imagereportreply->date = date("Y-m-d H:i:s");
             $imagereportreply->subject = $emailSubject;
             $imagereportreply->content = $idAndStateArray[3];
             $imagereportreply->from = $config->smtp->report->mail->username;
             $imagereportreply->to = $consumer->email;
             $imagereportreply->image_report_id = $row->id;
             //2011-04-08 ham.bao separate the sessions with admin
//.........这里部分代码省略.........
开发者ID:omusico,项目名称:wildfire_php,代码行数:101,代码来源:ImageController.php

示例8: adminconverttoreportAction

 function adminconverttoreportAction()
 {
     $this->_helper->layout->disableLayout();
     $idValue = explode('&', $this->_request->getParam('id'));
     $id = $idValue[0];
     $emailModel = new IncomingEmail();
     $emailData = $emailModel->fetchRow('id=' . $id);
     $consumerModel = new Consumer();
     $consumerData = $consumerModel->fetchRow('email like "%' . $emailData->email . '%"');
     if ($consumerData != NULL) {
         $this->view->consumer = true;
     } else {
         $this->view->consumer = false;
     }
     $campaignModel = new Campaign();
     $campaignData = $campaignModel->fetchRow('create_date < "' . date('Y-m-d H:i:s') . '" and "' . date('Y-m-d H:i:s') . '"<expire_date');
     if ($this->view->consumer) {
         $campaigninvitationModel = new CampaignInvitation();
         $campaigninvitationData = $campaigninvitationModel->fetchRow('campaign_id = ' . $campaignData->id . ' and consumer_id=' . $consumerData->id);
         if ($campaigninvitationData) {
             $this->view->invitation = true;
         } else {
             $this->view->invitation = false;
         }
     }
     if ($this->view->consumer && $this->view->invitation) {
         $emailSession = new Zend_Session_Namespace('IncomingEmail');
         $emailSession->email = $emailData->email;
         $langNamespace = new Zend_Session_Namespace('Lang');
         $lang = $langNamespace->lang;
         if ($lang == 'en') {
             $surveyId = $campaignData->i2_survey_id_en;
         } else {
             $surveyId = $campaignData->i2_survey_id;
         }
         $this->view->file = "./surveys/" . $surveyId . ".phtml";
     }
     $this->_helper->layout->setLayout("layout_questionnaire");
 }
开发者ID:omusico,项目名称:wildfire_php,代码行数:39,代码来源:EmailController.php

示例9: getsourceAction

 function getsourceAction()
 {
     $this->_helper->layout->disableLayout();
     $campaign_id = $this->_request->getParam('id');
     $campaignModel = new Campaign();
     $campaign = $campaignModel->fetchRow('id = ' . $campaign_id);
     $reportMap = array();
     $this->getReportCountbyCampaign($campaign, 0, $reportMap);
     $result = '{ "aaData": [';
     foreach ($reportMap as $row) {
         $result .= '[ "' . ($row['SCORE'] == '' ? 'n/a' : $row['SCORE']);
         $result .= '", "' . ($row['FRIENDS'] == '' ? 'n/a' : $row['FRIENDS']);
         $result .= '", "' . $row['REPORT_TIME'];
         $result .= '", "' . $row['REPORT_SOURCE'];
         $result .= '", "' . $row['COMMENTS'];
         $result .= '", "' . $row['TAG_IDS'];
         $result .= '" ],';
     }
     $result .= '] }';
     $this->_helper->json($result);
 }
开发者ID:omusico,项目名称:wildfire_php,代码行数:21,代码来源:DashboardController.php

示例10: prerejectAction

 function prerejectAction()
 {
     $this->view->compaign_id = (int) $this->_request->getParam('id');
     $campaignModel = new Campaign();
     $campaign = $campaignModel->fetchRow('id = ' . $this->view->compaign_id);
     $this->view->campaign_name = $campaign->name;
 }
开发者ID:omusico,项目名称:wildfire_php,代码行数:7,代码来源:CampaigninvitationController.php

示例11: adminreportAction

 function adminreportAction()
 {
     $request = $this->getRequest();
     if ($request->isPost()) {
         $formData = $this->_request->getPost();
         $consumer_id = $formData['consumer_id'];
         $campaign_id = $formData['campaign_id'];
         $comment = $formData['phone_comments'];
         $source = $formData['source'];
         //whether participate in the campaign
         $campaigninvitationModel = new CampaignInvitation();
         $campaigninvitation = $campaigninvitationModel->fetchRow('campaign_id = ' . $campaign_id . ' and consumer_id' . ' =' . $consumer_id);
         if ($campaigninvitation == null) {
             //$this->_helper->redirector('index','home');
         }
         //get i2_survey_id
         $campaignModel = new Campaign();
         $campaign = $campaignModel->fetchRow("id=" . $campaign_id);
         $langNamespace = new Zend_Session_Namespace('Lang');
         $lang = $langNamespace->lang;
         if ($lang == 'en') {
             $surveyId = $campaign->i2_survey_id_en;
         } else {
             $surveyId = $campaign->i2_survey_id;
         }
         $this->view->campaing_name = $campaign->name;
         $this->view->id = $campaign_id;
         $indicate2Connect = new Indicate2_Connect();
         $accesscode = $indicate2Connect->createParticipation('', $surveyId);
         $config = Zend_Registry::get('config');
         $this->view->filloutPage = $config->indicate2->home . "/c/" . $accesscode . "/theme/wildfire";
         //save list in session
         $reportNamespace = new Zend_Session_Namespace('AgentReports');
         $source_key = $accesscode . '_source';
         $reportNamespace->{$source_key} = $source;
         $reportNamespace->{$accesscode} = $consumer_id;
         $this->view->includeCrystalCss = true;
     }
 }
开发者ID:omusico,项目名称:wildfire_php,代码行数:39,代码来源:ConversationController.php


注:本文中的Campaign::fetchRow方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。