- Timestamp:
- Nov 5, 2014 10:42:10 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pro-violet-viettel/sourcecode/application/modules/admin/controllers/smstemplate.php
r409 r411 73 73 $input = $this->input->post(); 74 74 $this->load->model('Smstemplate_model'); 75 if (strlen($input['full_name'])==0) 76 { 77 $result['errors'][]="Tên cá»ng tác viên khÃŽng ÄÆ°á»£c Äá» trá»ng"; 78 } 79 if (strlen($input['login_name'])==0) 80 { 81 $result['errors'][]="Tên ÄÄng nháºp khÃŽng ÄÆ°á»£c Äá» trá»ng"; 82 } 83 else 84 { 85 if ($this->Smstemplate_model->isExist(array('field'=>'login_name','value'=>$input['login_name']))) 75 if (strlen($input['sms_content'])==0) 76 { 77 $result['errors'][]="Ná»i dung tin nhắn khÃŽng ÄÆ°á»£c Äá» trá»ng"; 78 } 79 if (strlen($input['sms_reply'])==0) 80 { 81 $result['errors'][]="Tin nhắn trả vá» khÃŽng ÄÆ°á»£c Äá» trá»ng"; 82 } 83 else 84 { 85 /* 86 if ($this->Smstemplate_model->isExist(array('field'=>'login_name','value'=>$input['login_name'],'id'=>$input['id']))) 86 87 { 87 88 $result['errors'][]="Tên ÄÄng nháºp Äã ÄÆ°á»£c sá» dụng"; 88 89 } 89 } 90 if (strlen($input['cellphone'])==0) 91 { 92 $result['errors'][]="Sá» Äiá»n thoại khÃŽng ÄÆ°á»£c Äá» trá»ng"; 93 } 94 else 95 { 96 if ($this->Smstemplate_model->isExist(array('field'=>'cellphone','value'=>$input['cellphone']))) 90 * 91 */ 92 } 93 if (strlen($input['service_id'])==0) 94 { 95 $result['errors'][]="Mã dá»ch vụ khÃŽng ÄÆ°á»£c Äá» trá»ng"; 96 } 97 else 98 { 99 /* 100 if ($this->Smstemplate_model->isExist(array('field'=>'cellphone','value'=>$input['cellphone'],'id'=>$input['id']))) 97 101 { 98 102 $result['errors'][]="Sá» Äiá»n thoại Äã ÄÆ°á»£c sá» dụng"; 99 103 } 100 } 101 if (strlen($input['passwd'])==0) 102 { 103 $result['errors'][]="Máºt khẩu khÃŽng ÄÆ°á»£c Äá» trá»ng"; 104 } 105 if ($input['passwd'] != $input['passwd2']) 106 { 107 $result['errors'][]="Máºt khẩu khÃŽng trùng nhau"; 104 * 105 */ 108 106 } 109 107 if (!isset($result['errors'])) 110 108 { 111 unset($input['passwd2']);112 $input['passwd']=md5($input['activated']);113 $input['activated']=1;114 $input['created_time']=date("Y-m-d H:i:s");115 $input['updated_time']=date("Y-m-d H:i:s");116 109 $this->load->model('Smstemplate_model'); 117 110 $this->Smstemplate_model->insert($input);
Note: See TracChangeset
for help on using the changeset viewer.