Index: pro-violet-viettel/sourcecode/application/modules/admin/controllers/smstemplate.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/admin/controllers/smstemplate.php	(revision 405)
+++ pro-violet-viettel/sourcecode/application/modules/admin/controllers/smstemplate.php	(revision 409)
@@ -122,22 +122,22 @@
         echo json_encode($result);
     }
-    public function viewUser()
+    public function viewSms()
     {
         $id=$this->uri->segment(4);
         $this->load->model('Smstemplate_model');
         $data=$this->Smstemplate_model->getSmstemplate($id);
-        $this->load->view('smstemplate/viewUser',$data);
-    }
-    public function editUser()
+        $this->load->view('smstemplate/viewSms',$data);
+    }
+    public function editSms()
     {
         $id=$this->uri->segment(4);
         $this->load->model('Smstemplate_model');
         $data=$this->Smstemplate_model->getSmstemplate($id);
-        $this->load->view('smstemplate/editUser',$data);
-    }
-    public function dodeleteUser()
+        $this->load->view('smstemplate/editSms',$data);
+    }
+    public function dodeleteSms()
     {
         $input=$this->input->post();
-        $id=$input['id'];
+        $id=$input['sms_id'];
         $this->load->model('Smstemplate_model');
         $data=$this->Smstemplate_model->delete($id);
@@ -145,57 +145,53 @@
         echo json_encode($result);
     }
-    public function deleteUser()
+    public function deleteSms()
     {
         $id=$this->uri->segment(4);
         $this->load->model('Smstemplate_model');
         $data=$this->Smstemplate_model->getSmstemplate($id);
-        $this->load->view('smstemplate/deleteUser',$data);
-    }
-    public function updateUser()
-    {
-        $input['activated']=0;
-        $input=  array_merge($input,$this->input->post());
-        $this->load->model('Smstemplate_model');
-        if (strlen($input['full_name'])==0)
-        {
-            $result['errors'][]="TÃªn cá»ng tÃ¡c viÃªn khÃŽng ÄÆ°á»£c Äá» trá»ng";
-        }
-        if (strlen($input['login_name'])==0)
-        {
-            $result['errors'][]="TÃªn ÄÄng nháº­p khÃŽng ÄÆ°á»£c Äá» trá»ng";
-        }
-        else
-        {
+        $this->load->view('smstemplate/deleteSms',$data);
+    }
+    public function updateSms()
+    {
+       
+        $input=  $this->input->post();
+        $this->load->model('Smstemplate_model');
+        if (strlen($input['sms_content'])==0)
+        {
+            $result['errors'][]="Ná»i dung tin nháº¯n khÃŽng ÄÆ°á»£c Äá» trá»ng";
+        }
+        if (strlen($input['sms_reply'])==0)
+        {
+            $result['errors'][]="Tin nháº¯n tráº£ vá» khÃŽng ÄÆ°á»£c Äá» trá»ng";
+        }
+        else
+        {
+            /*
             if ($this->Smstemplate_model->isExist(array('field'=>'login_name','value'=>$input['login_name'],'id'=>$input['id'])))
             {
                 $result['errors'][]="TÃªn ÄÄng nháº­p ÄÃ£ ÄÆ°á»£c sá»­ dá»¥ng";
             }
-        }
-        if (strlen($input['cellphone'])==0)
-        {
-            $result['errors'][]="Sá» Äiá»n thoáº¡i khÃŽng ÄÆ°á»£c Äá» trá»ng";
-        }
-        else
-        {
+             * 
+             */
+        }
+        if (strlen($input['service_id'])==0)
+        {
+            $result['errors'][]="MÃ£ dá»ch vá»¥ khÃŽng ÄÆ°á»£c Äá» trá»ng";
+        }
+        else
+        {
+            /*
             if ($this->Smstemplate_model->isExist(array('field'=>'cellphone','value'=>$input['cellphone'],'id'=>$input['id'])))
             {
                 $result['errors'][]="Sá» Äiá»n thoáº¡i ÄÃ£ ÄÆ°á»£c sá»­ dá»¥ng";
             }
-        }
-        if (strlen($input['passwd'])==0)
-        {
-            //$result['errors'][]="Máº­t kháº©u khÃŽng ÄÆ°á»£c Äá» trá»ng";
-        }
-        if ($input['passwd'] != $input['passwd2'])
-        {
-            $result['errors'][]="Máº­t kháº©u khÃŽng trÃ¹ng nhau";
-        }
+             * 
+             */
+        }
+        
         if (!isset($result['errors']))
-        {
-            unset($input['passwd2']);
-            $input['passwd']=md5($input['activated']);
-            $input['updated_time']=date("Y-m-d H:i:s");
+        { 
             $this->load->model('Smstemplate_model');
-            $this->Smstemplate_model->update($input['id'],$input);
+            $this->Smstemplate_model->update($input['sms_id'],$input);
             $result['success'] = 1;
         }
