本文整理汇总了PHP中Application_Form_FrmLanguages类的典型用法代码示例。如果您正苦于以下问题:PHP Application_Form_FrmLanguages类的具体用法?PHP Application_Form_FrmLanguages怎么用?PHP Application_Form_FrmLanguages使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Application_Form_FrmLanguages类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: init
public function init()
{
$tr = Application_Form_FrmLanguages::getCurrentlanguage();
$request = Zend_Controller_Front::getInstance()->getRequest();
$db = new Application_Model_DbTable_DbGlobal();
//user typefilter
$sql = 'SELECT user_type_id,user_type FROM rsv_acl_user_type';
$rs = $db->getGlobalDb($sql);
$options = array('All');
$usertype = $request->getParam('user_type_filter');
foreach ($rs as $read) {
$options[$read['user_type_id']] = $read['user_type'];
}
$user_type_filter = new Zend_Form_Element_Select('user_type_filter');
$user_type_filter->setMultiOptions($options);
$user_type_filter->setAttribs(array('id' => 'user_type_filter', 'class' => 'validate[required]', 'onchange' => 'this.form.submit()'));
$user_type_filter->setValue($usertype);
$this->addElement($user_type_filter);
//uer title
$user_title = new Zend_Form_Element_Select("title");
$user_title->setMultiOptions(array("Mr" => "Mr", "Ms" => "Ms"));
$this->addElement($user_title);
//user full name
$user_fullname = new Zend_Form_Element_Text("fullname");
$user_fullname->setAttribs(array('id' => 'fullname', 'class' => 'validate[required]'));
$this->addElement($user_fullname);
//user name
$user_name = new Zend_Form_Element_Text('username');
$user_name->setAttribs(array('id' => 'username', 'class' => 'validate[required]'));
$this->addElement($user_name);
//email
$email = new Zend_Form_Element_Text('email');
$email->setAttribs(array('id' => 'email', 'class' => 'validate[required]'));
$this->addElement($email);
//password
$password = new Zend_Form_Element_Password('password');
$password->setAttribs(array('id' => 'password', 'class' => 'validate[required]'));
$this->addElement($password);
//confirm password
$confirm_password = new Zend_Form_Element_Password('confirm_password');
$confirm_password->setAttribs(array('id' => 'confirm_password', 'class' => 'validate[required]'));
$this->addElement($confirm_password);
//user type
$sql = 'SELECT user_type_id,user_type FROM rsv_acl_user_type';
$rs = $db->getGlobalDb($sql);
$options = array('' => $tr->translate('Please_Select'));
foreach ($rs as $read) {
$options[$read['user_type_id']] = $read['user_type'];
}
$user_type_id = new Zend_Form_Element_Select('user_type_id');
$user_type_id->setMultiOptions($options);
$user_type_id->setAttribs(array('id' => 'user_type_id', 'class' => 'validate[required]'));
$this->addElement($user_type_id);
//location
$rs = $db->getGlobalDb('SELECT LocationId, Name FROM tb_sublocation WHERE Name!="" AND status=1 ORDER BY LocationId DESC');
$option = array("1" => $tr->translate("Please_Select"), "-1" => $tr->translate("Add_New_Location"));
if (!empty($rs)) {
foreach ($rs as $read) {
$option[$read['LocationId']] = $read['Name'];
}
}
$locationID = new Zend_Form_Element_Select('LocationId');
$locationID->setMultiOptions($option);
$locationID->setattribs(array('id' => 'LocationId', 'Onchange' => 'AddLocation()', 'class' => 'demo-code-language'));
$this->addElement($locationID);
}
开发者ID:pingitgroup,项目名称:stockpingitgroup,代码行数:66,代码来源:FrmUser.php
示例2: init
public function init()
{
$this->tr = Application_Form_FrmLanguages::getCurrentlanguage();
$this->tvalidate = 'dijit.form.ValidationTextBox';
$this->filter = 'dijit.form.FilteringSelect';
$this->text = 'dijit.form.TextBox';
}
开发者ID:samlanh,项目名称:currencyms,代码行数:7,代码来源:FrmCO.php
示例3: AllAction
public function AllAction($data = null)
{
$tr = Application_Form_FrmLanguages::getCurrentlanguage();
$newElement = new Zend_Form_Element_Submit('New');
$newElement->setLabel($tr->translate("NEW"));
$this->addElement($newElement);
$saveElement = new Zend_Form_Element_Submit('Save');
$saveElement->setAttribs(array('class' => 'save'));
$saveElement->setLabel($tr->translate("SAVE_CLOSE"));
$this->addElement($saveElement);
$saveNewElement = new Zend_Form_Element_Submit('SaveNew');
$saveNewElement->setAttribs(array('class' => 'savenew'));
$saveNewElement->setLabel($tr->translate("SAVE_NEW"));
$this->addElement($saveNewElement);
$updateElement = new Zend_Form_Element_Submit('Update');
$updateElement->setAttribs(array('class' => 'update'));
$updateElement->setLabel($tr->translate("UPDATE"));
$this->addElement($updateElement);
$deactiveElement = new Zend_Form_Element_Submit('Deactive');
$deactiveElement->setAttribs(array('class' => 'deactive'));
$deactiveElement->setLabel($tr->translate("DEACTIVE"));
$this->addElement($deactiveElement);
$activeElement = new Zend_Form_Element_Submit('Active');
$activeElement->setAttribs(array('class' => 'activate'));
$activeElement->setLabel($tr->translate("ACTIVE"));
$this->addElement($activeElement);
$CancelElement = new Zend_Form_Element_Submit('Cancel');
$CancelElement->setAttribs(array('class' => 'cancel'));
$this->addElement($CancelElement);
return $this;
}
开发者ID:pingitgroup,项目名称:stockpingitgroup,代码行数:31,代码来源:FrmAction.php
示例4: init
public function init()
{
$this->tr=Application_Form_FrmLanguages::getCurrentlanguage();
/* Initialize action controller here */
header('content-type: text/html; charset=utf8');
defined('BASE_URL') || define('BASE_URL', Zend_Controller_Front::getInstance()->getBaseUrl());
}
开发者ID:samlanh,项目名称:lnms,代码行数:7,代码来源:CallteralController.php
示例5: addBrand
public function addBrand($data = null)
{
$tr = Application_Form_FrmLanguages::getCurrentlanguage();
$db = new Application_Model_DbTable_DbGlobal();
$rowsbrand = $db->getGlobalDb('SELECT branch_id, Name
FROM tb_branch WHERE Name!="" ');
$options = array('' => $tr->translate('Please_Select'));
if ($rowsbrand) {
foreach ($rowsbrand as $readBrand) {
$options[$readBrand['branch_id']] = $readBrand['Name'];
}
}
$brandElement = new Zend_Form_Element_Select('Parent brand');
$brandElement->setAttribs(array('class' => 'demo-code-language'));
$brandElement->setMultiOptions($options);
$this->addElement($brandElement);
$b_nameElement = new Zend_Form_Element_Text('brand Name');
$b_nameElement->setAttribs(array('class' => 'validate[required]'));
$this->addElement($b_nameElement);
$optionsStatus = array(1 => $tr->translate("ACTIVE"), 2 => $tr->translate('DEACTIVE'));
$statusElement = new Zend_Form_Element_Select('status');
$statusElement->setAttribs(array('class' => 'demo-code-language'));
$statusElement->setMultiOptions($optionsStatus);
$this->addElement($statusElement);
if ($data != null) {
$idElement = new Zend_Form_Element_Hidden('id');
$this->addElement($idElement);
$statusElement->setValue($data["IsActive"]);
$idElement->setValue($data['branch_id']);
$b_nameElement->setValue($data['Name']);
$brandElement->setValue($data['parent_id']);
}
return $this;
}
开发者ID:pingitgroup,项目名称:stockpingitgroup,代码行数:34,代码来源:FrmInclude.php
示例6: addDateFieldCalDOB
/**
* Get Datepicker with event Onselect
* @param array() $date_fields
* @example
* addDateFieldCalDOB(array(array('dob_1','age_1'), array('dob_2','age_2')));
*/
public static function addDateFieldCalDOB($date_fields)
{
$tr = Application_Form_FrmLanguages::getCurrentlanguage();
$template = '$("#template").datepicker({"changeYear":"true","changeMonth":"true","yearRange":"-40:+100","dateFormat":"dd-mm-yy" , onslect});';
$script = '<script language="javascript"> $(document).ready(function() { #template# });</script>';
$onselect = 'onSelect: function(dateText, inst) {
var prefix = " ' . $tr->translate("YEARS") . '";
var _d = dateText.split("-");
var d = new Date(_d[2], _d[1], _d[0]);
var now = new Date();
var age = now.getFullYear() - d.getFullYear();
$("#dob_id").val(age + " " + prefix);
}';
$value = '';
if (is_array($date_fields)) {
foreach ($date_fields as $read) {
$tmpsel = str_replace('#dob_id', '#' . $read[1], $onselect);
$tmptem = str_replace('onslect', $tmpsel, $template);
$value .= str_replace('#template', '#' . $read[0], $tmptem);
}
} else {
$tmpsel = str_replace('#dob_id', '#' . $read[1], $onselect);
$tmptem = str_replace('onslect', $tmpsel, $template);
$value .= str_replace('#template', '#' . $read[0], $tmptem);
}
echo str_replace('#template#', $value, $script);
}
开发者ID:pingitgroup,项目名称:stockpingitgroup,代码行数:33,代码来源:DateTimePicker.php
示例7: indexAction
public function indexAction()
{
$formfilter = new RsvAcl_Form_FrmUser();
$this->view->formfilter = $formfilter;
$where = "";
// action body
$tr = Application_Form_FrmLanguages::getCurrentlanguage();
$getUser = new RsvAcl_Model_DbTable_DbUser();
if ($this->getRequest()->getParam('user_type_filter')) {
$user_type_id = $this->getRequest()->getParam('user_type_filter');
$where = " where user_type_id=" . $user_type_id;
}
$userQuery = "select \n \t\t\t\t\tu.`user_id`,\n \t\t\t\t\tu.`username`,\n \t\t\t\t\tu.`created_date`,\n \t\t\t\t\tu.`modified_date`, \n \t\t\t\t\t(SELECT ut.`user_type` FROM `rsv_acl_user_type` AS ut WHERE ut.`user_type_id` = u.`user_type_id`) as u_type,\n \t\t\t\t\t(SELECT c.`name_sh` FROM `fi_cso` AS c WHERE c.`id` = \n \t\t\t\t\t\t(SELECT i.`cso_id` FROM `fi_users_info` AS i WHERE i.`id` = u.`user_id`)\n \t\t\t\t\t) as cso_name,\n \t\t\t\t\tu.`status` \n \t\t\t from rsv_acl_user as u";
$userQuery = $userQuery . $where;
$rows = $getUser->getUserInfo($userQuery);
if ($rows) {
$imgnone = '<img src="' . BASE_URL . '/images/icon/none.png"/>';
$imgtick = '<img src="' . BASE_URL . '/images/icon/tick.png"/>';
foreach ($rows as $i => $row) {
if ($row['status'] == 1) {
$rows[$i]['status'] = $imgtick;
} else {
$rows[$i]['status'] = $imgnone;
}
}
$link = array("rsvAcl", "user", "view-user");
$links = array('username' => $link);
$list = new Application_Form_Frmlist();
$columns = array('NAME', 'CREATED_DATE', 'MODIFIED_DATE', 'TYPE_OF', 'CSO', 'STATUS');
$this->view->form = $list->getCheckList('radio', $columns, $rows, $links);
} else {
$this->view->form = $tr->translate('NO_RECORD_FOUND');
}
Application_Model_Decorator::removeAllDecorator($formfilter);
}
开发者ID:samlanh,项目名称:currencyms,代码行数:35,代码来源:UserController.php
示例8: message
public static function message($msg)
{
$tr = Application_Form_FrmLanguages::getCurrentlanguage();
echo '<script language="javascript">
alert("' . $tr->translate($msg) . '");
</script>';
}
开发者ID:sarankh80,项目名称:opsstock,代码行数:7,代码来源:FrmMessage.php
示例9: editUserTypeAction
public function editUserTypeAction()
{
$user_type_id = $this->getRequest()->getParam('id');
if (!$user_type_id) {
$user_type_id = 0;
}
$form = new RsvAcl_Form_FrmUserType();
$db = new RsvAcl_Model_DbTable_DbUserType();
$rs = $db->getUserTypeInfo('SELECT * FROM rsv_acl_user_type where user_type_id=' . $user_type_id);
Application_Model_Decorator::setForm($form, $rs);
$this->view->form = $form;
$this->view->user_id = $user_type_id;
$tr = Application_Form_FrmLanguages::getCurrentlanguage();
if ($this->getRequest()->isPost()) {
$post = $this->getRequest()->getPost();
if ($rs[0]['user_type'] == $post['user_type']) {
Application_Form_FrmMessage::message($tr->translate('ROW_AFFECTED'));
$db->updateUserType($post, $rs[0]['user_type_id']);
Application_Form_FrmMessage::redirector('/rsvAcl/user-type/index');
} else {
if (!$db->isUserTypeExist($post['user_type'])) {
$db->updateUserType($post, $rs[0]['user_type_id']);
Application_Form_FrmMessage::message($tr->translate('ROW_AFFECTED'));
Application_Form_FrmMessage::redirector('/rsvAcl/user-type/index');
} else {
Application_Form_FrmMessage::message('User had existed already');
}
}
}
}
开发者ID:pingitgroup,项目名称:stockpingitgroup,代码行数:30,代码来源:UserTypeController.php
示例10: editAclAction
public function editAclAction()
{
$acl_id = $this->getRequest()->getParam('id');
if (!$acl_id) {
$acl_id = 0;
}
$form = new RsvAcl_Form_FrmAcl();
$db = new RsvAcl_Model_DbTable_DbAcl();
$rs = $db->getUserInfo('SELECT * FROM rsv_acl_acl where acl_id=' . $acl_id);
Application_Model_Decorator::setForm($form, $rs);
$this->view->form = $form;
$this->view->acl_id = $acl_id;
if ($this->getRequest()->isPost()) {
$post = $this->getRequest()->getPost();
if ($rs[0]['action'] == $post['action']) {
$db->updateAcl($post, $rs[0]['acl_id']);
$tr = Application_Form_FrmLanguages::getCurrentlanguage();
Application_Form_FrmMessage::message($tr->translate('ROW_AFFECTED'));
Application_Form_FrmMessage::redirector('/rsvAcl/acl/index');
} else {
if (!$db->isActionExist($post['action'])) {
$db->updateAcl($post, $rs[0]['acl_id']);
$tr = Application_Form_FrmLanguages::getCurrentlanguage();
Application_Form_FrmMessage::message($tr->translate('ROW_AFFECTED'));
Application_Form_FrmMessage::redirector('/rsvAcl/acl/index');
} else {
Application_Form_FrmMessage::message('Action had existed already');
}
}
}
}
开发者ID:pingitgroup,项目名称:stockpingitgroup,代码行数:31,代码来源:AclController.php
示例11: init
public function init()
{
$request = Zend_Controller_Front::getInstance()->getRequest();
$db = new Application_Model_DbTable_DbGlobal();
/////////////Filter stock/////////////////
$tr = Application_Form_FrmLanguages::getCurrentlanguage();
$nameElement = new Zend_Form_Element_Text('s_name');
$nameValue = $request->getParam('s_name');
$nameElement->setValue($nameValue);
$this->addElement($nameElement);
$phonevalue = $request->getParam('phone');
$phoneElement = new Zend_Form_Element_Text('phone');
$phoneElement->setValue($phonevalue);
$this->addElement($phoneElement);
$rs = $db->getGlobalDb('SELECT LocationId,Name FROM tb_sublocation ORDER BY LocationId DESC ');
$options = array('' => $tr->translate('Please_Select'));
$agentValue = $request->getParam('stock_location');
foreach ($rs as $read) {
$options[$read['LocationId']] = $read['Name'];
}
$sale_agent = new Zend_Form_Element_Select('stock_location');
$sale_agent->setMultiOptions($options);
$sale_agent->setAttribs(array('id' => 'LocationId', 'class' => 'demo-code-language'));
$sale_agent->setValue($agentValue);
$this->addElement($sale_agent);
return $this;
}
开发者ID:pingitgroup,项目名称:stockpingitgroup,代码行数:27,代码来源:FrmStockFilter.php
示例12: messageError
public static function messageError($sms, $err)
{
Application_Model_DbTable_DbGlobal::writeMessageErr($err);
$tr = Application_Form_FrmLanguages::getCurrentlanguage();
echo '<script language="javascript">
alert("' . $tr->translate("{$sms}") . '");
</script>';
}
开发者ID:pingitgroup,项目名称:stockpingitgroup,代码行数:8,代码来源:FrmMessage.php
示例13: indexAction
public function indexAction()
{
$this->_helper->layout()->disableLayout();
///sopharat disablelayout to display login
$tr = Application_Form_FrmLanguages::getCurrentlanguage();
if ($this->getRequest()->isPost()) {
$formdata = $this->getRequest()->getPost();
$db_user = new Application_Model_DbTable_DbUsers();
$email = $formdata['txt_email'];
$password = $formdata['txt_password'];
if ($db_user->checkEmail($email)) {
if ($db_user->userAuthenticate($email, $password)) {
$user_id = $db_user->getUserID($email);
$user_info = $db_user->getUserInfo($user_id);
$arr_acl = $db_user->getArrAcl($user_info['user_type_id']);
//in case user have no right to access any module of the system
if (!$arr_acl) {
$this->view->msg = $tr->translate('LOGIN_FAIL_NO_MODULE');
} else {
$session_user = new Zend_Session_Namespace('auth');
$session_user->unlock();
$session_user->user_id = $user_id;
$session_user->fullname = $user_info['fullname'];
$session_user->user_name = $user_info['username'];
$session_user->level = $user_info['user_type_id'];
$session_user->user_type = $user_info['user_type'];
$session_user->location_id = $user_info['LocationId'];
$session_user->email = $email;
for ($i = 0; $i < count($arr_acl); $i++) {
$arr_module[$i] = $arr_acl[$i]['module'];
}
$arr_module = array_unique($arr_module);
$session_user->arr_acl = $arr_acl;
$session_user->arr_module = $arr_module;
$session_user->lock();
//echo $session_user->user_name;sales/sales-order
//echo $session_user->user_id=$user_id;exit();
//$_url=($arr_acl[0]!=='')? '/'.$arr_acl[0]['module']:'/default/index/home' ;//before
//$_url=($arr_acl[0]!=='')? '/default/index/dashboad':'/default/index/home' ;//after
//print_r($arr_acl[0]);
//exit();
//$this->_redirect("/sales/sales-order");
$_url = $arr_acl[0] !== '' ? '/default/index/dashboad' : '/sales/sales-order';
//after
$this->_redirect($_url);
}
} elseif (!$db_user->checkStatusByEmail($email)) {
$this->view->msg = $tr->translate('LOGIN_FAIL_COMFIRM');
} else {
$this->view->msg = $tr->translate('LOGIN_FAIL');
}
} else {
$this->view->msg = $tr->translate('EMAIL_NOT');
}
}
}
开发者ID:pingitgroup,项目名称:stockpingitgroup,代码行数:56,代码来源:IndexController.php
示例14: getAllDegree
public function getAllDegree($id = null)
{
$tr = Application_Form_FrmLanguages::getCurrentlanguage();
$opt_degree = array(1 => $this->tr->translate("Diploma"), 2 => $this->tr->translate("Associate"), 3 => $this->tr->translate("Bechelor"), 4 => $this->tr->translate("Master"), 5 => $this->tr->translate("PhD"));
if ($id == null) {
return $opt_degree;
} else {
return $opt_degree[$id];
}
}
开发者ID:samlanh,项目名称:currencyms,代码行数:10,代码来源:DbGlobal.php
示例15: getAllMonths
public function getAllMonths($id = null)
{
$tr = Application_Form_FrmLanguages::getCurrentlanguage();
$opt_month = array('' => '----ជ្រើសរើស----', 1 => 'មករា', 2 => 'កុម្ភះ', 3 => 'មីនា', 4 => 'មេសា', 5 => 'ឧសភា', 6 => 'មិថុនា', 7 => 'កក្តដា', 8 => 'សីហា', 9 => 'កញ្ញា', 10 => 'តុលា', 11 => 'វិចិ្ឆកា', 12 => 'ធ្នូ');
if ($id == null) {
return $opt_month;
} else {
return $opt_month[$id];
}
}
开发者ID:samlanh,项目名称:currencyms,代码行数:10,代码来源:DbGlobal.php
示例16: init
public function init()
{
$this->tr = Application_Form_FrmLanguages::getCurrentlanguage();
$this->tvalidate = 'dijit.form.ValidationTextBox';
$this->filter = 'dijit.form.FilteringSelect';
$this->t_date = 'dijit.form.DateTextBox';
//$this->t_num = 'dijit.form.NumberTextBox';
$this->text = 'dijit.form.TextBox';
//$this->check='dijit.form.CheckBox';
}
开发者ID:Bornpagna,项目名称:guesehouse,代码行数:10,代码来源:FrmTeacher.php
示例17: AddDropStudent
public function AddDropStudent()
{
$name = new Zend_Dojo_Form_Element_TextBox('Name');
$name->setAttribs(array('dojoType' => 'dijit.form.ValidationTextBox', 'class' => 'fullside'));
//$this->addElements(array($name));
$_type = new Zend_Dojo_Form_Element_FilteringSelect('type');
$_type->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside'));
$_type_opt = array(1 => Application_Form_FrmLanguages::getCurrentlanguage()->translate("Suspended"), 2 => Application_Form_FrmLanguages::getCurrentlanguage()->translate("Drop"));
$_type->setMultiOptions($_type_opt);
$date = new Zend_dojo_form_element_datetextbox('txtdate');
$date->setAttribs(array('dojoType' => 'dijit.form.DateTextBox', 'class' => 'fullside'));
$reason = new Zend_Dojo_Form_Element_Textarea('reason');
$reason->setAttribs(array('dojoType' => 'dijit.form.Textarea', 'rows' => '4', 'style' => 'border:1px solid #ccc'));
$calldate = new Zend_Dojo_Form_Element_dateTextBox('calldate');
$calldate->setAttribs(array('dojoType' => 'dijit.form.DateTextBox', 'class' => 'fullside'));
$this->addElements(array($name, $_type, $date, $reason, $calldate));
return $this;
}
开发者ID:Bornpagna,项目名称:guesehouse,代码行数:18,代码来源:FrmDrop.php
示例18: init
public function init()
{
$this->tr = Application_Form_FrmLanguages::getCurrentlanguage();
$this->tvalidate = 'dijit.form.ValidationTextBox';
$this->filter = 'dijit.form.FilteringSelect';
$this->t_date = 'dijit.form.DateTextBox';
$this->t_num = 'dijit.form.NumberTextBox';
$this->text = 'dijit.form.TextBox';
$this->_khname = new Zend_Dojo_Form_Element_TextBox('kh_name');
$this->_khname->setAttribs(array('dojoType' => $this->text, 'class' => 'fullside'));
$this->_enname = new Zend_Dojo_Form_Element_TextBox('en_name');
$this->_enname->setAttribs(array('dojoType' => $this->tvalidate, 'required' => 'true', 'class' => 'fullside'));
$this->_dob = new Zend_Dojo_Form_Element_DateTextBox('dob');
$date = date("Y-m-d") - 20;
$this->_dob->setAttribs(array('data-dojo-Type' => "dijit.form.DateTextBox", 'data-dojo-props' => "value:'{$date}','class':'fullside','name':'dob'", 'required' => true));
$this->_dob->setValue($date);
$this->_phone = new Zend_Dojo_Form_Element_TextBox('phone');
$this->_phone->setAttribs(array('data-dojo-Type' => $this->tvalidate, 'data-dojo-props' => "regExp:'[0-9]{9,10}',\r\n\t\t\t\t 'name':'phone',\r\n\t\t\t\t\t'class':'fullside',\r\n\t\t\t\t \t'placeHolder': '012345678',\r\n\t\t\t\t \t'invalidMessage':'មិនមាន ចន្លោះ ឬ សញ្ញាពិសេស រឺលើសចំនួនឡើយ'"));
$this->_degree = new Zend_Dojo_Form_Element_FilteringSelect('degree');
$this->_degree->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside', 'onchange' => 'getTuitionFee();'));
$arr_opt = Application_Model_DbTable_DbGlobal::getAllDegreeById();
// $arr_opt = array(
// 1=>$this->tr->translate("ASSOCIATE"),
// 2=>$this->tr->translate("BACHELOR"),
// 3=>$this->tr->translate('MASTER'),
// 4=>$this->tr->translate('DOCTORATE'));
$this->_degree->setMultiOptions($arr_opt);
$this->_batch = new Zend_Dojo_Form_Element_NumberTextBox("batch");
$this->_batch->setAttribs(array('onclick' => 'alert(3)', 'data-dojo-Type' => $this->tvalidate, 'onclick' => 'alert(2)', 'data-dojo-props' => "regExp:'[0-9]{1,2}','required':true,\r\n\t\t\t\t'name':'batch',\r\n\t\t\t\t'onclick':'alert(1)',\r\n\t\t\t\t'class':'fullside',\r\n\t\t\t\t'invalidMessage':'អាចបញ្ជូលពី 1 ដល់ 99'"));
$this->_year = new Zend_Dojo_Form_Element_TextBox("year");
$this->_year->setAttribs(array('data-dojo-Type' => $this->tvalidate, 'data-dojo-props' => "regExp:'[0-5]{1}',\r\n\t\t\t\t'name':'year',\r\n\t\t\t\t'required':true,'class':'fullside',\r\n\t\t\t\t'invalidMessage':'អាចបញ្ជូលពី 1 ដល់ 5'"));
$this->_session = new Zend_Dojo_Form_Element_FilteringSelect("session");
$opt_session = array(1 => $this->tr->translate('MORNING'), 2 => $this->tr->translate('AFTERNOON'), 3 => $this->tr->translate('EVERNING'), 4 => $this->tr->translate('WEEKEND'));
$this->_session->setMultiOptions($opt_session);
$this->_session->setAttribs(array('dojoType' => $this->filter, 'required' => 'true', 'class' => 'fullside'));
// $pay_date = date('Y-m-d', mktime(date('h'), date('i'), date('s'), date('m'), date('d')+45, date('Y')));
$this->_pay_date = new Zend_Dojo_Form_Element_DateTextBox('dob');
$this->_pay_date->setAttribs(array('dojoType' => $this->t_date, 'class' => 'fullside', 'constraints' => '{datePattern:"dd/MM/yyyy"'));
$this->_remark = new Zend_Dojo_Form_Element_TextBox('remark');
$this->_remark->setAttribs(array('dojoType' => $this->text, 'class' => 'fullside'));
$this->_pay_date = new Zend_Dojo_Form_Element_TextBox('pay_date');
$this->_pay_date->setAttribs(array('dojoType' => $this->t_date, 'class' => 'fullside'));
}
开发者ID:Bornpagna,项目名称:guesehouse,代码行数:43,代码来源:Frmrunadd.php
示例19: FrmSearchFromCustomer
public function FrmSearchFromCustomer()
{
$tr = Application_Form_FrmLanguages::getCurrentlanguage();
$request = Zend_Controller_Front::getInstance()->getRequest();
$db = new Application_Model_DbTable_DbGlobal();
$nameValue = $request->getParam('order');
$nameElement = new Zend_Form_Element_Text('order');
$nameElement->setValue($nameValue);
$this->addElement($nameElement);
$returninValue = $request->getParam('return_in');
$returninElement = new Zend_Form_Element_Text('return_in');
$returninElement->setValue($returninValue);
$this->addElement($returninElement);
$startDateValue = $request->getParam('search_start_date');
$startDateElement = new Zend_Form_Element_Text('search_start_date');
$startDateElement->setValue($startDateValue);
$this->addElement($startDateElement);
$endDateValue = $request->getParam('search_end_date');
$endDateElement = new Zend_Form_Element_Text('search_end_date');
$endDateElement->setValue($endDateValue);
$this->addElement($endDateElement);
$rowCustomers = $db->getGlobalDb('SELECT customer_id, cust_name FROM tb_customer WHERE cust_name!="" AND is_active=1 ORDER BY customer_id DESC');
$agentValue = $request->getParam('customer_id');
$options = array('' => $tr->translate('Please_Select_Customer'));
if (!empty($rowCustomers)) {
foreach ($rowCustomers as $rowCustomer) {
$options[$rowCustomer['customer_id']] = $rowCustomer['cust_name'];
}
}
$customer_id = new Zend_Form_Element_Select('customer_id');
$customer_id->setMultiOptions($options);
$customer_id->setattribs(array('id' => 'customer_id', 'class' => 'validate[required]'));
$customer_id->setValue($agentValue);
$this->addElement($customer_id);
Application_Form_DateTimePicker::addDateField(array('search_start_date', 'search_end_date'));
return $this;
}
开发者ID:pingitgroup,项目名称:stockpingitgroup,代码行数:37,代码来源:FrmSearch.php
示例20: addUserAction
public function addUserAction()
{
if ($this->getRequest()->isPost()) {
$db = new RsvAcl_Model_DbTable_DbUser();
$post = $this->getRequest()->getPost();
if (!$db->ifUserExist($post['username'])) {
$id = $db->insertUser($post);
$tr = Application_Form_FrmLanguages::getCurrentlanguage();
$this->_redirect('/rsvAcl/user/index');
} else {
Application_Form_FrmMessage::message('User had existed already');
}
}
$form = new RsvAcl_Form_FrmUser();
$this->view->form = $form;
Application_Model_Decorator::removeAllDecorator($form);
$items = new Application_Model_GlobalClass();
$locationRows = $items->getLocationAssign();
$this->view->locations = $locationRows;
$popup = new Application_Form_FrmPopup();
$frm_poup = $popup->popuLocation(null);
Application_Model_Decorator::removeAllDecorator($frm_poup);
$this->view->popup_location = $frm_poup;
}
开发者ID:pingitgroup,项目名称:stockpingitgroup,代码行数:24,代码来源:UserController.php
注:本文中的Application_Form_FrmLanguages类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论