在离线申请中添加了项目信息的填写项
This commit is contained in:
parent
54b357b701
commit
f4d5eb9737
|
@ -1255,11 +1255,11 @@ class DataController extends Zend_Controller_Action
|
||||||
$sql="select id from offlineapp where userid=? and (pdflink is null or pdflink='') and (ts_approved is null)";
|
$sql="select id from offlineapp where userid=? and (pdflink is null or pdflink='') and (ts_approved is null)";
|
||||||
$row=$this->db->fetchRow($sql,array($userid));
|
$row=$this->db->fetchRow($sql,array($userid));
|
||||||
if ($row) {
|
if ($row) {
|
||||||
$sql="update offlineapp set username=?,email=?,phone=?,address=?,postcode=?,project=?,unit=?,datalist=?,ts_created=now() where id=?";
|
$sql="update offlineapp set username=?,email=?,phone=?,address=?,postcode=?,project=?,unit=?,datalist=?,ts_created=now(),project_type=?,project_id=?,project_title=? where id=?";
|
||||||
$this->db->query($sql,array($formData['realname'],$formData['email'],$formData['phone'],$formData['address'],$formData['postcode'],$formData['project'],$formData['unit'],$datalist,$row['id']));
|
$this->db->query($sql,array($formData['realname'],$formData['email'],$formData['phone'],$formData['address'],$formData['postcode'],$formData['project'],$formData['unit'],$datalist,$formData['projecttype'],$formData['projectid'],$formData['projecttitle'],$row['id']));
|
||||||
} else {
|
} else {
|
||||||
$sql="insert into offlineapp (userid,username,email,phone,address,postcode,project,unit,datalist) values(?,?,?,?,?,?,?,?,?)";
|
$sql="insert into offlineapp (userid,username,email,phone,address,postcode,project,unit,datalist,project_type,project_id,project_title) values(?,?,?,?,?,?,?,?,?,?,?,?)";
|
||||||
$this->db->query($sql,array($userid,$formData['realname'],$formData['email'],$formData['phone'],$formData['address'],$formData['postcode'],$formData['project'],$formData['unit'],$datalist));
|
$this->db->query($sql,array($userid,$formData['realname'],$formData['email'],$formData['phone'],$formData['address'],$formData['postcode'],$formData['project'],$formData['unit'],$datalist,$formData['projecttype'],$formData['projectid'],$formData['projecttitle']));
|
||||||
}
|
}
|
||||||
$this->_helper->layout->disableLayout();
|
$this->_helper->layout->disableLayout();
|
||||||
$this->_helper->viewRenderer->setNoRender();
|
$this->_helper->viewRenderer->setNoRender();
|
||||||
|
@ -1292,11 +1292,11 @@ class DataController extends Zend_Controller_Action
|
||||||
$sql="select id from offlineapp where userid=? and pdflink is null and (ts_approved is null)";
|
$sql="select id from offlineapp where userid=? and pdflink is null and (ts_approved is null)";
|
||||||
$row=$this->db->fetchRow($sql,array($userid));
|
$row=$this->db->fetchRow($sql,array($userid));
|
||||||
if ($row) {
|
if ($row) {
|
||||||
$sql="update offlineapp set username=?,email=?,phone=?,address=?,postcode=?,project=?,unit=?,datalist=?,ts_created=now(),pdflink=? where id=?";
|
$sql="update offlineapp set username=?,email=?,phone=?,address=?,postcode=?,project=?,unit=?,datalist=?,ts_created=now(),pdflink=?,project_type=?,project_id=?,project_title=? where id=?";
|
||||||
$this->db->query($sql,array($formData['realname'],$formData['email'],$formData['phone'],$formData['address'],$formData['postcode'],$formData['project'],$formData['unit'],$datalist,$fn,$row['id']));
|
$this->db->query($sql,array($formData['realname'],$formData['email'],$formData['phone'],$formData['address'],$formData['postcode'],$formData['project'],$formData['unit'],$datalist,$fn,$formData['projecttype'],$formData['projectid'],$formData['projecttitle'],$row['id']));
|
||||||
} else {
|
} else {
|
||||||
$sql="insert into offlineapp (userid,username,email,phone,address,postcode,project,unit,datalist,pdflink) values(?,?,?,?,?,?,?,?,?,?)";
|
$sql="insert into offlineapp (userid,username,email,phone,address,postcode,project,unit,datalist,pdflink,project_type,project_id,project_title) values(?,?,?,?,?,?,?,?,?,?,?,?,?)";
|
||||||
$this->db->query($sql,array($userid,$formData['realname'],$formData['email'],$formData['phone'],$formData['address'],$formData['postcode'],$formData['project'],$formData['unit'],$datalist,$fn));
|
$this->db->query($sql,array($userid,$formData['realname'],$formData['email'],$formData['phone'],$formData['address'],$formData['postcode'],$formData['project'],$formData['unit'],$datalist,$fn,$formData['projecttype'],$formData['projectid'],$formData['projecttitle']));
|
||||||
$sql="select id from offlineapp where userid=? and pdflink=?";
|
$sql="select id from offlineapp where userid=? and pdflink=?";
|
||||||
$row=$this->db->fetchRow($sql,array($userid,$fn));
|
$row=$this->db->fetchRow($sql,array($userid,$fn));
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,12 +23,33 @@ class OfflinePdfForm extends Zend_Form
|
||||||
|
|
||||||
$unit=new Zend_Form_Element_Text('unit');
|
$unit=new Zend_Form_Element_Text('unit');
|
||||||
$unit->setLabel('单位')->setRequired(true);
|
$unit->setLabel('单位')->setRequired(true);
|
||||||
|
|
||||||
$postcode=new Zend_Form_Element_Text('postcode');
|
$postcode=new Zend_Form_Element_Text('postcode');
|
||||||
$postcode->setLabel('邮编')->setRequired(true);
|
$postcode->setLabel('邮编')->setRequired(true);
|
||||||
|
|
||||||
$address=new Zend_Form_Element_Text('address');
|
$address=new Zend_Form_Element_Text('address');
|
||||||
$address->setLabel('联系地址')->setRequired(true);
|
$address->setLabel('联系地址')->setRequired(true);
|
||||||
|
|
||||||
|
$project_id=new Zend_Form_Element_Text('projectid');
|
||||||
|
$project_id->setLabel('项目编号')->setRequired(true);
|
||||||
|
|
||||||
|
$project_title=new Zend_Form_Element_Text('projecttitle');
|
||||||
|
$project_title->setLabel('项目名称')->setRequired(true);
|
||||||
|
|
||||||
|
$project_type=new Zend_Form_Element_Select('projecttype');
|
||||||
|
$project_type->setLabel('项目类型')->setRequired(true);
|
||||||
|
$project_type->addMultiOption("国家973计划项目课题", "国家973计划项目课题");
|
||||||
|
$project_type->addMultiOption("国家863计划课题", "国家863计划课题");
|
||||||
|
$project_type->addMultiOption("国家级科技支撑课题", "国家级科技支撑课题");
|
||||||
|
$project_type->addMultiOption("国家级科技重大专项", "国家级科技重大专项");
|
||||||
|
$project_type->addMultiOption("国家级国家重大工程", "国家级国家重大工程");
|
||||||
|
$project_type->addMultiOption("国家级国家自然科学基金", "国家级国家自然科学基金");
|
||||||
|
$project_type->addMultiOption("国际合作项目", "国际合作项目");
|
||||||
|
$project_type->addMultiOption("省部级项目", "省部级项目");
|
||||||
|
$project_type->addMultiOption("其他项目工程", "其他项目工程");
|
||||||
|
|
||||||
$project=new Zend_Form_Element_Textarea('project');
|
$project=new Zend_Form_Element_Textarea('project');
|
||||||
$project->setLabel('用途(包括项目名称、编号、类型、使用目的)')->setRequired(true)->setAttrib('rows',2);
|
$project->setLabel('用途(请详细描述使用目的)')->setRequired(true)->setAttrib('rows',2);
|
||||||
|
|
||||||
$id = new Zend_Form_Element_Hidden('id');
|
$id = new Zend_Form_Element_Hidden('id');
|
||||||
|
|
||||||
|
@ -50,6 +71,6 @@ class OfflinePdfForm extends Zend_Form
|
||||||
array('Description', array('placement' => 'prepend')),
|
array('Description', array('placement' => 'prepend')),
|
||||||
'Form'
|
'Form'
|
||||||
));*/
|
));*/
|
||||||
$this->addElements(array($realname,$email,$phone,$unit,$address,$postcode,$project,$id,$save,$submit));
|
$this->addElements(array($realname,$email,$phone,$unit,$address,$postcode,$project_id,$project_title,$project_type,$project,$id,$save,$submit));
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue