Ignore:
Timestamp:
Nov 5, 2014 10:42:10 AM (11 years ago)
Author:
quyenla
Message:

sms template

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pro-violet-viettel/sourcecode/application/modules/admin/controllers/smstemplate.php

    r409 r411  
    7373        $input = $this->input->post();
    7474        $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'])))
    8687            {
    8788                $result['errors'][]="Tên đăng nhập đã được sá»­ dụng";
    8889            }
    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'])))
    97101            {
    98102                $result['errors'][]="Số điện thoại đã được sá»­ dụng";
    99103            }
    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             */
    108106        }
    109107        if (!isset($result['errors']))
    110108        {
    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");
    116109            $this->load->model('Smstemplate_model');
    117110            $this->Smstemplate_model->insert($input);
Note: See TracChangeset for help on using the changeset viewer.