整理代码,添加注释

This commit is contained in:
Li Jianxuan 2011-09-29 02:28:27 +00:00
parent 8cbe2bf913
commit 10c9736c6e
1 changed files with 15 additions and 8 deletions

View File

@ -206,7 +206,9 @@ class Admin_DownController extends Zend_Controller_Action
}
$this->view->form=$form;
$this->_helper->viewRenderer('offlineadd');
} elseif ($edit){
} //添加服务记录
elseif ($edit){
$form=new OfflinelogForm();
$form->pdf->setRequired(false);
if ($this->_request->isPost()) {
@ -237,7 +239,9 @@ class Admin_DownController extends Zend_Controller_Action
$this->view->form=$form;
$this->_helper->viewRenderer('offlineadd');
} elseif ($delete) {
} //编辑
elseif ($delete) {
$sql="delete from offlineapp where id='$delete'";
$sql2="delete from dataorder where offlineappid='$delete'";
@ -258,7 +262,9 @@ class Admin_DownController extends Zend_Controller_Action
$this->messenger->addMessage('删除失败');
$this->_redirect("/admin/down/offline");
}
}elseif ($down) {
}//删除服务记录
else if ($down) {
$this->_helper->layout->disableLayout();
$this->_helper->viewRenderer->setNoRender();
$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')
->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
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');
}//同步用户账户与离线申请记录
else if($show){
$sql="select * from offlineapp where id='$show'";
@ -312,9 +321,9 @@ class Admin_DownController extends Zend_Controller_Action
$this->_helper->viewRenderer('offlineshow');
}//查看单条记录
else if($emaillist)
{
$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)
@ -342,10 +351,8 @@ class Admin_DownController extends Zend_Controller_Action
->setHeader('Pragma','public')
->setBody($filecontent);
}//下载邮箱地址列表
$select=$this->db->select();
$select->from('offlineapp')->where('ts_approved is not null')->where('pdflink is not null')->order('ts_created desc');
$paginator = Zend_Paginator::factory($select);