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 405)
@@ -0,0 +1,217 @@
+<?php
+
+if (!defined('BASEPATH'))
+    exit('No direct script access allowed');
+
+class Smstemplate extends MX_Controller {
+
+    public function __construct() {
+        parent::__construct();
+        $this->load->helper('cookie');
+    }
+
+    public function index() {
+        $data = array();
+        $admin_info = $this->session->userdata('adminInfo');
+        if ($admin_info) {
+            $data['content'] = $this->getSmstemplates();
+            $this->load->view('smstemplate/index', $data);
+        } else {
+            $this->load->view('login');
+        }
+    }
+
+    public function getSmstemplates($filters = array()) {
+        $this->load->helper('pagging');
+        $this->load->model('Smstemplate_model');
+        $data['current_page'] = $this->uri->segment(4, 1);
+        $data['itemsoptions'] = array(10, 25, 50, 100);
+        $data['perpage'] = 10;
+        $data['keyword'] = "";
+        $data['sorting_order']="sorting_desc";
+        $data['sorting_field']="sms_id";
+        
+        if ($this->input->post('sorting_order')) {
+            if ($this->input->post('sorting_order') != "sorting")
+            {
+               $data['sorting_order']=$this->input->post('sorting_order');
+               $data['sorting_field']=$this->input->post('sorting_field'); 
+            }
+        }
+        if ($this->input->post('items')) {
+            $data['perpage'] = $this->input->post('items');
+        }
+        if ($this->input->post('keyword')) {
+            $data['search_field']="";
+            $data['keyword'] = $this->input->post('keyword');
+            
+            if (preg_match("/[0-9]/", $data['keyword']))
+            {
+               $data['search_field']="cellphone"; 
+            }
+            
+        }
+        
+        $data['start'] = ($data['current_page'] - 1) * $data['perpage'];
+        $data['total'] = $this->Smstemplate_model->countSmstemplate($data);  
+       
+        $data['smstemplates'] = $this->Smstemplate_model->getSmstemplates($data);
+        
+        $data['paging_url'] = base_url() . "/admin/mau_tin_nhan/trang/";
+        $data['num_links'] = 2;
+        $data['paging'] = pagging($data);
+
+        if ($this->input->is_ajax_request()) {
+            return $this->load->view('smstemplate/listview', $data);
+        }
+        return $this->load->view('smstemplate/listview', $data, true);
+    }
+
+    public function addSmstemplate() {
+        $result['success'] = 0;
+        $result = array();
+        $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
+        {
+            if ($this->Smstemplate_model->isExist(array('field'=>'login_name','value'=>$input['login_name'])))
+            {
+                $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 ($this->Smstemplate_model->isExist(array('field'=>'cellphone','value'=>$input['cellphone'])))
+            {
+                $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['activated']=1;
+            $input['created_time']=date("Y-m-d H:i:s");
+            $input['updated_time']=date("Y-m-d H:i:s");
+            $this->load->model('Smstemplate_model');
+            $this->Smstemplate_model->insert($input);
+            $result['success'] = 1;
+        }
+
+        
+        echo json_encode($result);
+    }
+    public function viewUser()
+    {
+        $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()
+    {
+        $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()
+    {
+        $input=$this->input->post();
+        $id=$input['id'];
+        $this->load->model('Smstemplate_model');
+        $data=$this->Smstemplate_model->delete($id);
+        $result['success']=1;
+        echo json_encode($result);
+    }
+    public function deleteUser()
+    {
+        $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
+        {
+            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 ($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);
+            $result['success'] = 1;
+        }
+        echo json_encode($result);
+    }
+    public function test() {
+        
+       
+        for ($i = 1; $i <= 50; $i++) {
+            $input['sms_content']="Chuc mung {full_name} da dang ky thanh cong".$i;
+            $input['sms_reply']="sms reply".$i;
+            $input['service_id']=$i;
+            $input['commandcode']="commandcode".$i;
+            $this->load->model('Smstemplate_model');
+            $this->Smstemplate_model->insert($input);
+        }
+    }
+
+}
Index: /pro-violet-viettel/sourcecode/application/modules/admin/views/collaborator/deleteUser.php
===================================================================
--- /pro-violet-viettel/sourcecode/application/modules/admin/views/collaborator/deleteUser.php	(revision 405)
+++ /pro-violet-viettel/sourcecode/application/modules/admin/views/collaborator/deleteUser.php	(revision 405)
@@ -0,0 +1,79 @@
+ 
+    <div class="modal-dialog">
+        <div class="modal-content">
+            <div class="modal-header no-padding">
+                <div class="table-header">
+                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
+                        <span class="white">Ã</span>
+                    </button>
+                    ThÃŽng tin cá»ng tÃ¡c viÃªn
+                </div>
+            </div>
+
+            <div class="modal-body" id="<?php echo $id;?>">
+                <form id="editUser_<?php echo $id;?>" onsubmit="return false;" class="form-horizontal " role="form">
+                    <input type="hidden" name="id" value="<?php echo $id;?>" />
+                    <div class="form-group">
+                        <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> TÃªn Äáº§y Äá»§ </label>
+
+                        <div class="col-sm-9">
+                            <span class="input-icon">
+                                <input disabled name="full_name" type="text" id="form-field-1" placeholder="TÃªn cá»ng tÃ¡c viÃªn" value="<?php echo $full_name;?>">
+                                <i class="icon-user blue"></i>
+                            </span>
+                        </div>
+                        <div class="help-block"> </div>
+                    </div>
+                    <div class="form-group">
+                        <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> TÃªn ÄÄng nháº­p </label>
+
+                        <div class="col-sm-9">
+                            <span class="input-icon">
+                                <input disabled name="login_name" type="text" id="form-field-1" placeholder="TÃ i khoáº£n"  value="<?php echo $login_name;?>">
+                                <i class="icon-user blue"></i>
+                            </span>
+                        </div>
+                        <div class="help-block"> </div>
+                    </div>
+                    <div class="form-group">
+                        <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> Sá» Äiá»n thoáº¡i</label>
+
+                        <div class="col-sm-9">
+                            <span class="input-icon">
+                                <input disabled name="cellphone" type="text" id="form-field-1" placeholder="Sá» Äiá»n thoáº¡i"  value="<?php echo $cellphone;?>">
+                                <i class="icon-user blue"></i>
+                            </span>
+                        </div>
+                        <div class="help-block"> </div>
+                    </div>
+                    
+                    <div class="form-group">
+                        <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> KÃ­ch hoáº¡t</label>
+
+                        <div class="col-sm-9">
+                            <span class="input-icon">
+                                <input disabled type='checkbox' name="activated" <?php if ($activated=="1"){ echo "checked='checked'"; }?> value="1"  />
+                            </span>
+                        </div>
+                        <div class="help-block"> </div>
+                    </div>
+                    <div class="space-4"></div>
+
+                    
+
+                    <div class="space-4"></div>
+                    <div class="form-group errors" id="add_user_<?php echo $id;?>"></div>
+                        
+                    </div>
+                    <div class="clearfix form-actions">
+                        <div class="col-md-offset-3 col-md-9">
+                            <a href="#" class="btn btn-primary" onclick="return deleteuser('<?php echo $id;?>')">XÃ³a cá»ng tÃ¡c viÃªn nÃ y</a>
+                            <a href="#" id="close_delete_<?php echo $id;?>" class="btn btn-primary" data-dismiss="modal">ÄÃ³ng cá»­a sá»</a>
+
+                            
+                        </div>
+                    </div>
+
+                </form></div>
+
+        </div>
Index: /pro-violet-viettel/sourcecode/application/modules/admin/views/collaborator/editUser.php
===================================================================
--- /pro-violet-viettel/sourcecode/application/modules/admin/views/collaborator/editUser.php	(revision 405)
+++ /pro-violet-viettel/sourcecode/application/modules/admin/views/collaborator/editUser.php	(revision 405)
@@ -0,0 +1,100 @@
+ 
+    <div class="modal-dialog">
+        <div class="modal-content">
+            <div class="modal-header no-padding">
+                <div class="table-header">
+                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
+                        <span class="white">Ã</span>
+                    </button>
+                    ThÃŽng tin cá»ng tÃ¡c viÃªn
+                </div>
+            </div>
+
+            <div class="modal-body" id="<?php echo $id;?>">
+                <form id="editUser_<?php echo $id;?>" onsubmit="return false;" class="form-horizontal " role="form">
+                    <input type="hidden" name="id" value="<?php echo $id;?>" />
+                    <div class="form-group">
+                        <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> TÃªn Äáº§y Äá»§ </label>
+
+                        <div class="col-sm-9">
+                            <span class="input-icon">
+                                <input name="full_name" type="text" id="form-field-1" placeholder="TÃªn cá»ng tÃ¡c viÃªn" value="<?php echo $full_name;?>">
+                                <i class="icon-user blue"></i>
+                            </span>
+                        </div>
+                        <div class="help-block"> </div>
+                    </div>
+                    <div class="form-group">
+                        <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> TÃªn ÄÄng nháº­p </label>
+
+                        <div class="col-sm-9">
+                            <span class="input-icon">
+                                <input name="login_name" type="text" id="form-field-1" placeholder="TÃ i khoáº£n"  value="<?php echo $login_name;?>">
+                                <i class="icon-user blue"></i>
+                            </span>
+                        </div>
+                        <div class="help-block"> </div>
+                    </div>
+                    <div class="form-group">
+                        <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> Sá» Äiá»n thoáº¡i</label>
+
+                        <div class="col-sm-9">
+                            <span class="input-icon">
+                                <input name="cellphone" type="text" id="form-field-1" placeholder="Sá» Äiá»n thoáº¡i"  value="<?php echo $cellphone;?>">
+                                <i class="icon-user blue"></i>
+                            </span>
+                        </div>
+                        <div class="help-block"> </div>
+                    </div>
+                    <div class="form-group">
+                        <label class="col-sm-3 control-label no-padding-right" for="form-field-2"> Máº­t kháº©u </label>
+
+                        <div class="col-sm-9">
+                            <span class="input-icon">
+                                <input type="password" name="passwd" id="form-field-2" placeholder="Máº­t kháº©u (Äá» trá»ng náº¿u khÃŽng thay Äá»i)">
+                                <i class="icon-lock blue"></i>
+                            </span>
+                        </div>
+                        <div class="help-block"> </div>
+                    </div>
+                    <div class="form-group">
+                        <label class="col-sm-3 control-label no-padding-right" for="form-field-2"> Máº­t kháº©u </label>
+
+                        <div class="col-sm-9">
+                            <span class="input-icon">
+                                <input type="password" name="passwd2" id="form-field-2" placeholder="Nháº­p láº¡i máº­t kháº©u">
+                                <i class="icon-lock blue"></i>
+                            </span>
+                        </div>
+                        <div class="help-block"> </div>
+                    </div>
+                    <div class="form-group">
+                        <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> KÃ­ch hoáº¡t</label>
+
+                        <div class="col-sm-9">
+                            <span class="input-icon">
+                                <input type='checkbox' name="activated" <?php if ($activated=="1"){ echo "checked='checked'"; }?> value="1"  />
+                            </span>
+                        </div>
+                        <div class="help-block"> </div>
+                    </div>
+                    <div class="space-4"></div>
+
+                    
+
+                    <div class="space-4"></div>
+                    <div class="form-group errors" id="add_user_<?php echo $id;?>"></div>
+                        
+                    </div>
+                    <div class="clearfix form-actions">
+                        <div class="col-md-offset-3 col-md-9">
+                            <a href="#" class="btn btn-primary" onclick="return updateuser('<?php echo $id;?>')">Cáº­p nháº­t</a>
+                            <a href="#" id="close_<?php echo $id;?>" class="btn btn-primary" data-dismiss="modal">ÄÃ³ng cá»­a sá»</a>
+
+                            
+                        </div>
+                    </div>
+
+                </form></div>
+
+        </div>
Index: /pro-violet-viettel/sourcecode/application/modules/admin/views/collaborator/viewUser.php
===================================================================
--- /pro-violet-viettel/sourcecode/application/modules/admin/views/collaborator/viewUser.php	(revision 405)
+++ /pro-violet-viettel/sourcecode/application/modules/admin/views/collaborator/viewUser.php	(revision 405)
@@ -0,0 +1,82 @@
+ 
+    <div class="modal-dialog">
+        <div class="modal-content">
+            <div class="modal-header no-padding">
+                <div class="table-header">
+                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
+                        <span class="white">Ã</span>
+                    </button>
+                    ThÃŽng tin cá»ng tÃ¡c viÃªn
+                </div>
+            </div>
+
+            <div class="modal-body">
+                <form id="add_user" onsubmit="return false;" class="form-horizontal" role="form">
+                    <div class="form-group">
+                        <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> TÃªn Äáº§y Äá»§ </label>
+
+                        <div class="col-sm-9">
+                            <span class="input-icon">
+                                <input disabled name="full_name" type="text" id="form-field-1" placeholder="TÃªn cá»ng tÃ¡c viÃªn" value="<?php echo $full_name;?>">
+                                <i class="icon-user blue"></i>
+                            </span>
+                        </div>
+                        <div class="help-block"> </div>
+                    </div>
+                    <div class="form-group">
+                        <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> TÃªn ÄÄng nháº­p </label>
+
+                        <div class="col-sm-9">
+                            <span class="input-icon">
+                                <input disabled name="login_name" type="text" id="form-field-1" placeholder="TÃ i khoáº£n"  value="<?php echo $login_name;?>">
+                                <i class="icon-user blue"></i>
+                            </span>
+                        </div>
+                        <div class="help-block"> </div>
+                    </div>
+                    <div class="form-group">
+                        <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> Sá» Äiá»n thoáº¡i</label>
+
+                        <div class="col-sm-9">
+                            <span class="input-icon">
+                                <input  disabled name="cellphone" type="text" id="form-field-1" placeholder="Sá» Äiá»n thoáº¡i"  value="<?php echo $cellphone;?>">
+                                <i class="icon-user blue"></i>
+                            </span>
+                        </div>
+                        <div class="help-block"> </div>
+                    </div>
+                    
+                    <div class="form-group">
+                        <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> KÃ­ch hoáº¡t</label>
+
+                        <div class="col-sm-9">
+                            <span class="input-icon">
+                                <?php if ($activated=="1"){?>
+                                <span class="label label-sm label-success">ÄÃ£ kÃ­ch hoáº¡t</span>
+                               <?php }?>
+                                <?php if ($activated=="0"){?>
+                                <span class="label label-sm label">ChÆ°a kÃ­ch hoáº¡t</span>
+                               <?php }?>
+                            </span>
+                        </div>
+                        <div class="help-block"> </div>
+                    </div>
+                    <div class="space-4"></div>
+
+                    
+
+                    <div class="space-4"></div>
+                    <div class="form-group errors" id="add_user"></div>
+                        
+                    </div>
+                    <div class="clearfix form-actions">
+                        <div class="col-md-offset-3 col-md-9">
+                            <a href="#" class="btn btn-primary" data-dismiss="modal">ÄÃ³ng cá»­a sá»</a>
+
+                            
+                        </div>
+                    </div>
+
+                </form></div>
+
+        </div>
Index: /pro-violet-viettel/sourcecode/application/modules/admin/views/smstemplate/deleteUser.php
===================================================================
--- /pro-violet-viettel/sourcecode/application/modules/admin/views/smstemplate/deleteUser.php	(revision 405)
+++ /pro-violet-viettel/sourcecode/application/modules/admin/views/smstemplate/deleteUser.php	(revision 405)
@@ -0,0 +1,79 @@
+ 
+    <div class="modal-dialog">
+        <div class="modal-content">
+            <div class="modal-header no-padding">
+                <div class="table-header">
+                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
+                        <span class="white">Ã</span>
+                    </button>
+                    Máº«u tin nháº¯n
+                </div>
+            </div>
+
+            <div class="modal-body">
+                <form id="add_user" onsubmit="return false;" class="form-horizontal" role="form">
+                    <div class="form-group">
+                        <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> Máº«u tin nháº¯n </label>
+
+                        <div class="col-sm-9">
+                            <span class="input-icon">
+                                <input disabled name="sms_content" type="text" id="form-field-1" placeholder="Máº«u tin nháº¯n" value="<?php echo $sms_content;?>">
+                                <i class="icon-user blue"></i>
+                            </span>
+                        </div>
+                        <div class="help-block"> </div>
+                    </div>
+                    <div class="form-group">
+                        <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> Tin tráº£ lá»i </label>
+
+                        <div class="col-sm-9">
+                            <span class="input-icon">
+                                <input disabled name="sms_reply" type="text" id="form-field-1" placeholder="Tin tráº£ lá»i"  value="<?php echo $sms_reply;?>">
+                                <i class="icon-user blue"></i>
+                            </span>
+                        </div>
+                        <div class="help-block"> </div>
+                    </div>
+                    <div class="form-group">
+                        <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> MÃ£ dá»ch vá»¥</label>
+
+                        <div class="col-sm-9">
+                            <span class="input-icon">
+                                <input  disabled name="service_id" type="text" id="form-field-1" placeholder="MÃ£ dá»ch vá»¥"  value="<?php echo $service_id;?>">
+                                <i class="icon-user blue"></i>
+                            </span>
+                        </div>
+                        <div class="help-block"> </div>
+                    </div>
+                    <div class="form-group">
+                        <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> MÃ£ lá»nh</label>
+
+                        <div class="col-sm-9">
+                            <span class="input-icon">
+                                <input  disabled name="commandcode" type="text" id="form-field-1" placeholder="MÃ£ lá»nh"  value="<?php echo $service_id;?>">
+                                <i class="icon-user blue"></i>
+                            </span>
+                        </div>
+                        <div class="help-block"> </div>
+                    </div>
+                    
+                   
+                    <div class="space-4"></div>
+
+                    
+
+                    <div class="space-4"></div>
+                    <div class="form-group errors" id="add_user"></div>
+                        
+                    </div>
+                    <div class="clearfix form-actions">
+                        <div class="col-md-offset-3 col-md-9">
+                            <a href="#" class="btn btn-primary" data-dismiss="modal">ÄÃ³ng cá»­a sá»</a>
+
+                            
+                        </div>
+                    </div>
+
+                </form></div>
+
+        </div>
Index: /pro-violet-viettel/sourcecode/application/modules/admin/views/smstemplate/editUser.php
===================================================================
--- /pro-violet-viettel/sourcecode/application/modules/admin/views/smstemplate/editUser.php	(revision 405)
+++ /pro-violet-viettel/sourcecode/application/modules/admin/views/smstemplate/editUser.php	(revision 405)
@@ -0,0 +1,79 @@
+ 
+    <div class="modal-dialog">
+        <div class="modal-content">
+            <div class="modal-header no-padding">
+                <div class="table-header">
+                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
+                        <span class="white">Ã</span>
+                    </button>
+                    Máº«u tin nháº¯n
+                </div>
+            </div>
+
+            <div class="modal-body">
+                <form id="add_user" onsubmit="return false;" class="form-horizontal" role="form">
+                    <div class="form-group">
+                        <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> Máº«u tin nháº¯n </label>
+
+                        <div class="col-sm-9">
+                            <span class="input-icon">
+                                <input disabled name="sms_content" type="text" id="form-field-1" placeholder="Máº«u tin nháº¯n" value="<?php echo $sms_content;?>">
+                                <i class="icon-user blue"></i>
+                            </span>
+                        </div>
+                        <div class="help-block"> </div>
+                    </div>
+                    <div class="form-group">
+                        <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> Tin tráº£ lá»i </label>
+
+                        <div class="col-sm-9">
+                            <span class="input-icon">
+                                <input disabled name="sms_reply" type="text" id="form-field-1" placeholder="Tin tráº£ lá»i"  value="<?php echo $sms_reply;?>">
+                                <i class="icon-user blue"></i>
+                            </span>
+                        </div>
+                        <div class="help-block"> </div>
+                    </div>
+                    <div class="form-group">
+                        <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> MÃ£ dá»ch vá»¥</label>
+
+                        <div class="col-sm-9">
+                            <span class="input-icon">
+                                <input  disabled name="service_id" type="text" id="form-field-1" placeholder="MÃ£ dá»ch vá»¥"  value="<?php echo $service_id;?>">
+                                <i class="icon-user blue"></i>
+                            </span>
+                        </div>
+                        <div class="help-block"> </div>
+                    </div>
+                    <div class="form-group">
+                        <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> MÃ£ lá»nh</label>
+
+                        <div class="col-sm-9">
+                            <span class="input-icon">
+                                <input  disabled name="commandcode" type="text" id="form-field-1" placeholder="MÃ£ lá»nh"  value="<?php echo $service_id;?>">
+                                <i class="icon-user blue"></i>
+                            </span>
+                        </div>
+                        <div class="help-block"> </div>
+                    </div>
+                    
+                   
+                    <div class="space-4"></div>
+
+                    
+
+                    <div class="space-4"></div>
+                    <div class="form-group errors" id="add_user"></div>
+                        
+                    </div>
+                    <div class="clearfix form-actions">
+                        <div class="col-md-offset-3 col-md-9">
+                            <a href="#" class="btn btn-primary" data-dismiss="modal">ÄÃ³ng cá»­a sá»</a>
+
+                            
+                        </div>
+                    </div>
+
+                </form></div>
+
+        </div>
Index: /pro-violet-viettel/sourcecode/application/modules/admin/views/smstemplate/index.php
===================================================================
--- /pro-violet-viettel/sourcecode/application/modules/admin/views/smstemplate/index.php	(revision 405)
+++ /pro-violet-viettel/sourcecode/application/modules/admin/views/smstemplate/index.php	(revision 405)
@@ -0,0 +1,224 @@
+<?php
+$base_url = base_url();
+$this->load->view('layout/admin/header', array('base_url' => $base_url));
+$this->load->view('layout/admin/sidebar', array('base_url' => $base_url, 'method'=>$this->router->method, 'class'=>$this->router->class  ));
+?>
+<script type="text/javascript">
+    function init_page()
+    {
+
+        $(".ajax_paging").click(function () {
+            $.ajax({
+                url: $(this).attr("href"),
+                type: "POST",
+                data: $("#collaborator").serialize(),
+                success: function (data, textStatus, jqXHR)
+                {
+                    // $result = jQuery.parseJSON(data);
+                    $("#content").html(data);
+                    init_page();
+
+                },
+                error: function (jqXHR, textStatus, errorThrown)
+                {
+                    $(".ajaxloading").hide();
+                }
+            });
+            return false;
+        })
+        $('#keyword').keyup(function (event) {
+            if (event.keyCode == '13') {
+                filter();
+            }
+            return false;
+        });
+        
+        
+        $( '.sorting, .sorting_desc, .sorting_asc' ).click(function( index ) {
+            var current_class=$( this ).attr('class');
+            $(".sorting_desc").attr("class","sorting");
+            $(".sorting_asc").attr("class","sorting");
+     
+            if(current_class=='sorting')
+            {
+                $(this).attr("class","sorting_desc");
+            }
+            else
+            {
+                if(current_class=='sorting_desc')
+                {
+                    $(this).attr("class","sorting_asc");
+                }
+                else
+                    {
+                    if(current_class=='sorting_asc')
+                    {
+                        $(this).attr("class","sorting");
+                    }
+                }
+            }
+            $("#sorting_field").val($(this).attr("id"));
+            $("#sorting_order").val($(this).attr("class"));
+            filter();
+        });
+        $('[data-toggle="ajaxModal"]').on('click',
+              function(e) {
+                $('#ajaxModal').remove();
+                e.preventDefault();
+                var $this = $(this)
+                  , $remote = $this.data('remote') || $this.attr('href')
+                  , $modal = $('<div class="modal" id="ajaxModal"><div class="modal-body"></div></div>');
+                $('body').append($modal);
+                $modal.modal({backdrop: 'static', keyboard: false});
+                $modal.load($remote);
+              }
+            );
+
+
+    }
+
+
+    function filter()
+    {
+        $.ajax({
+            url: 'http://viettel.violet.vn/admin/mau_tin_nhan/trang/1',
+            type: "POST",
+            data: $("#collaborator").serialize(),
+            success: function (data, textStatus, jqXHR)
+            {
+                // $result = jQuery.parseJSON(data);
+                $("#content").html(data);
+                init_page();
+                $("#keyword").focus();
+                $("#keyword").setCursorToTextEnd();
+
+            },
+            error: function (jqXHR, textStatus, errorThrown)
+            {
+                $(".ajaxloading").hide();
+            }
+        });
+    }
+
+
+</script>
+<div class="main-content" id="content">
+    <?php echo $content; ?>
+</div><!-- /.main-content -->
+</div><!-- /.main-container-inner -->
+
+<a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
+    <i class="icon-double-angle-up icon-only bigger-110"></i>
+</a>
+</div><!-- /.main-container -->
+
+
+<div id="addUser" class="modal fade in" tabindex="-1">
+    <div class="modal-dialog">
+        <div class="modal-content">
+            <div class="modal-header no-padding">
+                <div class="table-header">
+                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
+                        <span class="white">Ã</span>
+                    </button>
+                    ThÃªm máº«u tin nháº¯n
+                </div>
+            </div>
+
+            <div class="modal-body">
+                <form id="add_user" onsubmit="return false;" class="form-horizontal" role="form">
+                    <div class="form-group">
+                        <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> TÃªn Äáº§y Äá»§ </label>
+
+                        <div class="col-sm-9">
+                            <span class="input-icon">
+                                <input name="full_name" type="text" id="form-field-1" placeholder="TÃªn cá»ng tÃ¡c viÃªn">
+                                <i class="icon-user blue"></i>
+                            </span>
+                        </div>
+                        <div class="help-block"> </div>
+                    </div>
+                    <div class="form-group">
+                        <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> TÃªn ÄÄng nháº­p </label>
+
+                        <div class="col-sm-9">
+                            <span class="input-icon">
+                                <input name="login_name" type="text" id="form-field-1" placeholder="TÃ i khoáº£n">
+                                <i class="icon-user blue"></i>
+                            </span>
+                        </div>
+                        <div class="help-block"> </div>
+                    </div>
+                    <div class="form-group">
+                        <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> Sá» Äiá»n thoáº¡i</label>
+
+                        <div class="col-sm-9">
+                            <span class="input-icon">
+                                <input name="cellphone" type="text" id="form-field-1" placeholder="Sá» Äiá»n thoáº¡i">
+                                <i class="icon-user blue"></i>
+                            </span>
+                        </div>
+                        <div class="help-block"> </div>
+                    </div>
+                    <div class="space-4"></div>
+
+                    <div class="form-group">
+                        <label class="col-sm-3 control-label no-padding-right" for="form-field-2"> Máº­t kháº©u </label>
+
+                        <div class="col-sm-9">
+                            <span class="input-icon">
+                                <input type="password" name="passwd" id="form-field-2" placeholder="Máº­t kháº©u">
+                                <i class="icon-lock blue"></i>
+                            </span>
+                        </div>
+                        <div class="help-block"> </div>
+                    </div>
+                    <div class="form-group">
+                        <label class="col-sm-3 control-label no-padding-right" for="form-field-2"> Máº­t kháº©u </label>
+
+                        <div class="col-sm-9">
+                            <span class="input-icon">
+                                <input type="password" name="passwd2" id="form-field-2" placeholder="Nháº­p láº¡i máº­t kháº©u">
+                                <i class="icon-lock blue"></i>
+                            </span>
+                        </div>
+                        <div class="help-block"> </div>
+                    </div>
+                    <div class="form-group">
+                        <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> KÃ­ch hoáº¡t</label>
+
+                        <div class="col-sm-9">
+                            <span class="input-icon">
+                                <input type='checkbox' name="activated" checked="checked" value="1"  />
+                            </span>
+                        </div>
+                        <div class="help-block"> </div>
+                    </div>
+
+                    <div class="space-4"></div>
+                    <div class="form-group errors" id="add_user"></div>
+                        
+                    </div>
+                    <div class="clearfix form-actions">
+                        <div class="col-md-offset-3 col-md-9">
+                            <button class="btn btn-info" id="add_user" type="button">
+                                <i class="icon-ok bigger-110"></i>
+                                HoÃ n táº¥t
+                            </button>
+
+                            &nbsp; &nbsp; &nbsp;
+                            <button class="btn" type="reset">
+                                <i class="icon-undo bigger-110"></i>
+                                XÃ³a háº¿t
+                            </button>
+                        </div>
+                    </div>
+
+                </form></div>
+
+        </div>
+    </div><!-- /.modal-content -->
+</div><!-- /.modal-dialog -->
+<?php
+$this->load->view('layout/admin/footer', array('base_url' => $base_url, 'adminjs' => array('assets/js/admin/collaborator.js')));
+?>
Index: /pro-violet-viettel/sourcecode/application/modules/admin/views/smstemplate/listview.php
===================================================================
--- /pro-violet-viettel/sourcecode/application/modules/admin/views/smstemplate/listview.php	(revision 405)
+++ /pro-violet-viettel/sourcecode/application/modules/admin/views/smstemplate/listview.php	(revision 405)
@@ -0,0 +1,207 @@
+<div id="breadcrumbs" class="breadcrumbs">
+
+    <ul class="breadcrumb">
+        <li>
+            <i class="icon-home home-icon"></i>
+            <a href="#">Trang chá»§</a>
+        </li>
+
+        <li>
+            <a href="#">Quáº£n lÃœ tÃ i khoáº£n</a>
+        </li>
+        <li>
+            <a href="#">NgÆ°á»i dÃ¹ng</a>
+        </li>
+        <li class="active">Cá»ng tÃ¡c viÃªn</li>
+    </ul><!-- .breadcrumb -->
+
+    <div id="nav-search" class="nav-search">
+        <form class="form-search">
+            <span class="input-icon">
+                <input type="text" autocomplete="off" id="nav-search-input" class="nav-search-input" placeholder="TÃ¬m kiáº¿m ...">
+                <i class="icon-search nav-search-icon"></i>
+            </span>
+        </form>
+    </div><!-- #nav-search -->
+</div>
+<div class="page-content">
+    <div class="page-header">
+        <h1>
+            Cá»ng tÃ¡c viÃªn
+            <small>
+                <i class="icon-double-angle-right"></i>
+                thá»ng kÃª tÃ i khoáº£n
+            </small>
+        </h1>
+    </div><!-- /.page-header -->
+
+    <div class="row">
+        <div class="col-xs-12">
+            <!-- PAGE CONTENT BEGINS -->
+            <div style="padding-bottom:4px" class="table-header">
+                Thá»ng kÃª tÃ i khoáº£n
+
+                <button href="#addUser" data-toggle="modal" class="btn btn-success pull-right">
+                    <i class="icon-plus"></i>
+                    ThÃªm cá»ng tÃ¡c viÃªn
+                </button>
+
+            </div>
+
+            <div class="table-responsive">
+                <div role="grid" class="dataTables_wrapper" id="sample-table-2_wrapper">
+                    <form autocomplete="off" onsubmit="return false;" id="collaborator" >
+                        <div class="row">
+                            <div class="col-sm-6">
+                                <div id="sample-table-2_length" class="dataTables_length"><label>Hiá»n thá» 
+                                        <select onchange="filter();" name="items" size="1" aria-controls="sample-table-2">                                      
+                                            <?php foreach ($itemsoptions as $option) { ?>
+                                            <option <?php if($option == $perpage) echo "selected"; ?> value="<?=$option?>"><?=$option?></option>
+                                            <?php } ?>
+                                        </select> báº£n ghi</label>
+
+                                </div>
+                            </div>
+
+                            <div class="col-sm-6">
+                                <div class="dataTables_filter" id="sample-table-2_filter">
+                                    <label>TÃ¬m kiáº¿m: 
+                                        <input type="text" name="keyword" id="keyword" value='<?php echo $keyword;?>' aria-controls="sample-table-2"></label>
+                                </div>
+                            </div>
+                        </div>
+                        <input type="hidden" name="sorting_order" id="sorting_order" value="<?php echo $sorting_order;?>" />
+                        <input type="hidden" name="sorting_field" id="sorting_field" value="<?php echo $sorting_field;?>"/>
+                    </form>
+                    <table class="table table-striped table-bordered table-hover dataTable" id="sample-table-2" aria-describedby="sample-table-2_info">
+                        <thead>
+                            <tr role="row">
+                                <th class="center sorting_disabled" role="columnheader" rowspan="1" colspan="1" style="width: 44px;" aria-label="">
+                                    <label>
+                                        <input type="checkbox" class="ace">
+                                        <span class="lbl"></span>
+                                    </label>
+                                </th>
+                             
+                                <th class="<?php if ($sorting_field == 'sms_content') {echo $sorting_order;} else {echo "sorting";}?>" id="sms_content" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 283px;" aria-label="Há» tÃªn: activate to sort column ascending">Máº«u tin nháº¯n</th>
+                                <th class="<?php if ($sorting_field == 'sms_reply') {echo $sorting_order;} else {echo "sorting";}?>" id="sms_reply" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 176px;" aria-label="Sá» Äiá»n thoáº¡i: activate to sort column ascending">Tráº£ lá»i</th>
+                                <th class="<?php if ($sorting_field == 'service_id') {echo $sorting_order;} else {echo "sorting";}?>" id="service_id" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 176px;" aria-label="Sá» Äiá»n thoáº¡i: activate to sort column ascending">MÃ£ dá»ch vá»¥</th> 
+                                <th class="<?php if ($sorting_field == 'commandcode') {echo $sorting_order;} else {echo "sorting";}?>" id="commandcode" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 209px;" aria-label="NgÃ y ÄÄng kÃœ: activate to sort column ascending">
+                                    
+                                    MÃ£ cÃ¢u lá»nh
+                                </th>
+                                   <th class="sorting_disabled" role="columnheader" rowspan="1" colspan="1" style="width: 133px;" aria-label="">Chá»©c nÄng</th></tr>
+                        </thead>
+
+
+                        <tbody role="alert" aria-live="polite" aria-relevant="all">
+                            
+                            <?php
+                            foreach ($smstemplates as $smstemplate) {
+                                ?>
+                            <tr class="odd">
+                                <td class="center  sorting_1">
+                                    <label>
+                                        <input type="checkbox" class="ace">
+                                        <span class="lbl"></span>
+                                    </label>
+                                </td>
+
+                                
+                                <td class=" "><?php echo $smstemplate['sms_content']?></td>
+                                <td class=" ">
+                                    <a href="#"><?php echo $smstemplate['sms_reply']?></a>
+                                </td>
+                                <td class="hidden-480 "><?php echo $smstemplate['service_id']?></td>
+                                <td class=" "><?php echo $smstemplate['commandcode']?></td>
+
+                               
+
+                                <td class=" ">
+                                    <div class="visible-md visible-lg hidden-sm hidden-xs action-buttons">
+                                        <a href="#" class="blue">
+                                            <i data-toggle="ajaxModal" href='http://viettel.violet.vn/admin/mau_tin_nhan/xem/<?php echo $smstemplate['sms_id'];?>'  class="icon-zoom-in bigger-130"></i>
+                                        </a>
+
+                                        <a href="#" class="green">
+                                            <i data-toggle="ajaxModal" href='http://viettel.violet.vn/admin/mau_tin_nhan/sua/<?php echo $smstemplate['sms_id'];?>' data-toggle="modal" href='#editUser' class="icon-pencil bigger-130"></i>
+                                        </a>
+
+                                        <a href="#" class="red">
+                                            <i data-toggle="ajaxModal" href='http://viettel.violet.vn/admin/mau_tin_nhan/xoa/<?php echo $smstemplate['sms_id'];?>' data-toggle="modal" href='#deleteUser' class="icon-trash bigger-130"></i>
+                                        </a>
+                                    </div>
+
+                                    <div class="visible-xs visible-sm hidden-md hidden-lg">
+                                        <div class="inline position-relative">
+                                            <button data-toggle="dropdown" class="btn btn-minier btn-yellow dropdown-toggle">
+                                                <i class="icon-caret-down icon-only bigger-120"></i>
+                                            </button>
+
+                                            <ul class="dropdown-menu dropdown-only-icon dropdown-yellow pull-right dropdown-caret dropdown-close">
+                                                <li>
+                                                    <a title="" data-rel="tooltip" class="tooltip-info" href="#" data-original-title="View">
+                                                        <span class="blue">
+                                                            <i class="icon-zoom-in bigger-120"></i>
+                                                        </span>
+                                                    </a>
+                                                </li>
+
+                                                <li>
+                                                    <a title="" data-rel="tooltip" class="tooltip-success" href="#" data-original-title="Edit">
+                                                        <span class="green">
+                                                            <i class="icon-edit bigger-120"></i>
+                                                        </span>
+                                                    </a>
+                                                </li>
+
+                                                <li>
+                                                    <a title="" data-rel="tooltip" class="tooltip-error" href="#" data-original-title="Delete">
+                                                        <span class="red">
+                                                            <i class="icon-trash bigger-120"></i>
+                                                        </span>
+                                                    </a>
+                                                </li>
+                                            </ul>
+                                        </div>
+                                    </div>
+                                </td>
+                            </tr>
+                            <?php } ?>
+
+
+
+
+
+
+
+                        </tbody></table><div class="row"><div class="col-sm-6">
+                                <div class="dataTables_info" id="sample-table-2_info">Hiá»n thá» <?php echo ($start+1)?> Äáº¿n <?php echo ($start+$perpage)?> cá»§a <?php echo $total?> báº£n ghi</div>
+                                    
+                            </div>
+                        <div class="col-sm-6">
+                            <div class="dataTables_paginate paging_bootstrap">
+                                <ul class="pagination">
+                                    <?php echo $paging; ?>
+                                </ul>
+                            </div>
+                        </div>
+                    </div>
+
+                </div>
+            </div>
+
+            
+        </div>
+
+        <!-- PAGE CONTENT ENDS -->
+    </div><!-- /.col -->
+</div>
+<script type="text/javascript">
+    window.onload = function ()
+    {
+        init_page();
+    }
+
+
+</script>
Index: /pro-violet-viettel/sourcecode/application/modules/admin/views/smstemplate/viewUser.php
===================================================================
--- /pro-violet-viettel/sourcecode/application/modules/admin/views/smstemplate/viewUser.php	(revision 405)
+++ /pro-violet-viettel/sourcecode/application/modules/admin/views/smstemplate/viewUser.php	(revision 405)
@@ -0,0 +1,79 @@
+ 
+    <div class="modal-dialog">
+        <div class="modal-content">
+            <div class="modal-header no-padding">
+                <div class="table-header">
+                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
+                        <span class="white">Ã</span>
+                    </button>
+                    Máº«u tin nháº¯n
+                </div>
+            </div>
+
+            <div class="modal-body">
+                <form id="add_user" onsubmit="return false;" class="form-horizontal" role="form">
+                    <div class="form-group">
+                        <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> Máº«u tin nháº¯n </label>
+
+                        <div class="col-sm-9">
+                            <span class="input-icon">
+                                <input disabled name="sms_content" type="text" id="form-field-1" placeholder="Máº«u tin nháº¯n" value="<?php echo $sms_content;?>">
+                                <i class="icon-user blue"></i>
+                            </span>
+                        </div>
+                        <div class="help-block"> </div>
+                    </div>
+                    <div class="form-group">
+                        <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> Tin tráº£ lá»i </label>
+
+                        <div class="col-sm-9">
+                            <span class="input-icon">
+                                <input disabled name="sms_reply" type="text" id="form-field-1" placeholder="Tin tráº£ lá»i"  value="<?php echo $sms_reply;?>">
+                                <i class="icon-user blue"></i>
+                            </span>
+                        </div>
+                        <div class="help-block"> </div>
+                    </div>
+                    <div class="form-group">
+                        <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> MÃ£ dá»ch vá»¥</label>
+
+                        <div class="col-sm-9">
+                            <span class="input-icon">
+                                <input  disabled name="service_id" type="text" id="form-field-1" placeholder="MÃ£ dá»ch vá»¥"  value="<?php echo $service_id;?>">
+                                <i class="icon-user blue"></i>
+                            </span>
+                        </div>
+                        <div class="help-block"> </div>
+                    </div>
+                    <div class="form-group">
+                        <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> MÃ£ lá»nh</label>
+
+                        <div class="col-sm-9">
+                            <span class="input-icon">
+                                <input  disabled name="commandcode" type="text" id="form-field-1" placeholder="MÃ£ lá»nh"  value="<?php echo $service_id;?>">
+                                <i class="icon-user blue"></i>
+                            </span>
+                        </div>
+                        <div class="help-block"> </div>
+                    </div>
+                    
+                   
+                    <div class="space-4"></div>
+
+                    
+
+                    <div class="space-4"></div>
+                    <div class="form-group errors" id="add_user"></div>
+                        
+                    </div>
+                    <div class="clearfix form-actions">
+                        <div class="col-md-offset-3 col-md-9">
+                            <a href="#" class="btn btn-primary" data-dismiss="modal">ÄÃ³ng cá»­a sá»</a>
+
+                            
+                        </div>
+                    </div>
+
+                </form></div>
+
+        </div>
