整理代码,添加注释
This commit is contained in:
parent
8cbe2bf913
commit
10c9736c6e
|
@ -206,7 +206,9 @@ class Admin_DownController extends Zend_Controller_Action
|
||||||
}
|
}
|
||||||
$this->view->form=$form;
|
$this->view->form=$form;
|
||||||
$this->_helper->viewRenderer('offlineadd');
|
$this->_helper->viewRenderer('offlineadd');
|
||||||
} elseif ($edit){
|
} //添加服务记录
|
||||||
|
|
||||||
|
elseif ($edit){
|
||||||
$form=new OfflinelogForm();
|
$form=new OfflinelogForm();
|
||||||
$form->pdf->setRequired(false);
|
$form->pdf->setRequired(false);
|
||||||
if ($this->_request->isPost()) {
|
if ($this->_request->isPost()) {
|
||||||
|
@ -237,7 +239,9 @@ class Admin_DownController extends Zend_Controller_Action
|
||||||
$this->view->form=$form;
|
$this->view->form=$form;
|
||||||
$this->_helper->viewRenderer('offlineadd');
|
$this->_helper->viewRenderer('offlineadd');
|
||||||
|
|
||||||
} elseif ($delete) {
|
} //编辑
|
||||||
|
|
||||||
|
elseif ($delete) {
|
||||||
$sql="delete from offlineapp where id='$delete'";
|
$sql="delete from offlineapp where id='$delete'";
|
||||||
$sql2="delete from dataorder where offlineappid='$delete'";
|
$sql2="delete from dataorder where offlineappid='$delete'";
|
||||||
|
|
||||||
|
@ -258,7 +262,9 @@ class Admin_DownController extends Zend_Controller_Action
|
||||||
$this->messenger->addMessage('删除失败');
|
$this->messenger->addMessage('删除失败');
|
||||||
$this->_redirect("/admin/down/offline");
|
$this->_redirect("/admin/down/offline");
|
||||||
}
|
}
|
||||||
}elseif ($down) {
|
}//删除服务记录
|
||||||
|
|
||||||
|
else if ($down) {
|
||||||
$this->_helper->layout->disableLayout();
|
$this->_helper->layout->disableLayout();
|
||||||
$this->_helper->viewRenderer->setNoRender();
|
$this->_helper->viewRenderer->setNoRender();
|
||||||
$sql="select * from offlineapp where ts_approved is not null and pdflink is not null order by ts_created desc";
|
$sql="select * from offlineapp where ts_approved is not null and pdflink is not null order by ts_created desc";
|
||||||
|
@ -278,7 +284,9 @@ class Admin_DownController extends Zend_Controller_Action
|
||||||
->setHeader('Pragma','public')
|
->setHeader('Pragma','public')
|
||||||
->setBody($content);
|
->setBody($content);
|
||||||
|
|
||||||
} else if ($update) {
|
} //下载离线服务记录
|
||||||
|
|
||||||
|
else if ($update) {
|
||||||
|
|
||||||
$sql = 'select o.id as oid,o.userid,o.username as un,u.email as uemail,o.email,u.realname as rn,u.id as uid from offlineapp o
|
$sql = 'select o.id as oid,o.userid,o.username as un,u.email as uemail,o.email,u.realname as rn,u.id as uid from offlineapp o
|
||||||
right join users u on o.email=u.email
|
right join users u on o.email=u.email
|
||||||
|
@ -299,6 +307,7 @@ class Admin_DownController extends Zend_Controller_Action
|
||||||
$this->_redirect('/admin/down/offline');
|
$this->_redirect('/admin/down/offline');
|
||||||
|
|
||||||
}//同步用户账户与离线申请记录
|
}//同步用户账户与离线申请记录
|
||||||
|
|
||||||
else if($show){
|
else if($show){
|
||||||
|
|
||||||
$sql="select * from offlineapp where id='$show'";
|
$sql="select * from offlineapp where id='$show'";
|
||||||
|
@ -312,9 +321,9 @@ class Admin_DownController extends Zend_Controller_Action
|
||||||
$this->_helper->viewRenderer('offlineshow');
|
$this->_helper->viewRenderer('offlineshow');
|
||||||
|
|
||||||
}//查看单条记录
|
}//查看单条记录
|
||||||
|
|
||||||
else if($emaillist)
|
else if($emaillist)
|
||||||
{
|
{
|
||||||
|
|
||||||
$sql = "select distinct(t.*) from
|
$sql = "select distinct(t.*) from
|
||||||
(
|
(
|
||||||
select u.email from dataorder d left join users u on d.userid=u.id where (d.status=0 or d.status=5)
|
select u.email from dataorder d left join users u on d.userid=u.id where (d.status=0 or d.status=5)
|
||||||
|
@ -342,10 +351,8 @@ class Admin_DownController extends Zend_Controller_Action
|
||||||
->setHeader('Pragma','public')
|
->setHeader('Pragma','public')
|
||||||
->setBody($filecontent);
|
->setBody($filecontent);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}//下载邮箱地址列表
|
}//下载邮箱地址列表
|
||||||
|
|
||||||
$select=$this->db->select();
|
$select=$this->db->select();
|
||||||
$select->from('offlineapp')->where('ts_approved is not null')->where('pdflink is not null')->order('ts_created desc');
|
$select->from('offlineapp')->where('ts_approved is not null')->where('pdflink is not null')->order('ts_created desc');
|
||||||
$paginator = Zend_Paginator::factory($select);
|
$paginator = Zend_Paginator::factory($select);
|
||||||
|
|
Loading…
Reference in New Issue