Changeset 590 for pro-violet-viettel/sourcecode/application/modules
- Timestamp:
- Nov 20, 2014 7:07:44 PM (10 years ago)
- Location:
- pro-violet-viettel/sourcecode/application/modules
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
pro-violet-viettel/sourcecode/application/modules/admin/controllers/admin_acc.php
r425 r590 14 14 if ($admin_info) 15 15 { 16 $data['content'] = $this->get_admins(); 17 $this->load->view('admin_acc/index', $data); 16 $role_id = $admin_info['role_id']; 17 if($role_id == 1){ 18 $data['content'] = $this->get_admins(); 19 $this->load->model('admin_model'); 20 $data['roles'] = $this->admin_model->get_roles(); 21 $this->load->view('admin_acc/index', $data); 22 }else 23 { 24 show_404(); 25 } 18 26 }else 19 27 { -
pro-violet-viettel/sourcecode/application/modules/admin/controllers/home.php
r587 r590 10 10 11 11 public function index () 12 { 13 12 { 14 13 $admin_info = $this->session->userdata('adminInfo'); 15 14 if ($admin_info) … … 225 224 else 226 225 { 227 $admindata = array('login_name' => $login_name, 'admin_id'=>$data->admin_id, "logined_in"=> TRUE);226 $admindata = array('login_name' => $login_name, 'admin_id'=>$data->admin_id, 'role_id'=>$data->role_id, 'logined_in' => TRUE); 228 227 $this->session->set_userdata('adminInfo', $admindata); 229 228 redirect("/admin/home"); -
pro-violet-viettel/sourcecode/application/modules/admin/controllers/smstemplate.php
r576 r590 14 14 $data = array(); 15 15 $admin_info = $this->session->userdata('adminInfo'); 16 $role_id = $admin_info['role_id']; 16 17 if ($admin_info) { 17 $data['content'] = $this->getSmstemplates(); 18 $this->load->view('smstemplate/index', $data); 18 if($role_id == 1){ 19 $data['content'] = $this->getSmstemplates(); 20 $this->load->view('smstemplate/index', $data); 21 }else 22 { 23 show_404(); 24 } 19 25 } else { 20 26 $this->load->view('login'); -
pro-violet-viettel/sourcecode/application/modules/admin/models/admin_model.php
r534 r590 77 77 78 78 } 79 80 function get_roles() 81 { 82 $sql = "SELECT * FROM tbladminrole"; 83 $query = $this->db->query($sql); 84 $result = $query->result_array(); 85 return $result; 86 } 79 87 } -
pro-violet-viettel/sourcecode/application/modules/admin/views/admin_acc/index.php
r461 r590 127 127 <i class="icon-user blue"></i> 128 128 </span> 129 < div class="help-block" id="full_name_err" > </div>129 <small><div class="help-block" id="full_name_err" > </div><small> 130 130 </label> 131 131 </div> … … 143 143 <i class="icon-user blue"></i> 144 144 </span> 145 < div class="help-block" id="login_name_err" > </div>145 <small><div class="help-block" id="login_name_err" > </div></small> 146 146 </label> 147 147 … … 158 158 </span> 159 159 160 < div class="help-block" id="pwd1_err"> </div>160 <small><div class="help-block" id="pwd1_err"> </div></small> 161 161 </label> 162 162 </div> … … 173 173 </span> 174 174 175 < div class="help-block" id="pwd2_err"> </div>175 <small><div class="help-block" id="pwd2_err"> </div></small> 176 176 </label> 177 177 </div> … … 187 187 <i class="icon-envelope blue"></i> 188 188 </span> 189 < div class="help-block" id="email_err"> </div>189 <small><div class="help-block" id="email_err"> </div></small> 190 190 </label> 191 191 </div> … … 204 204 <i class="icon-phone blue"></i> 205 205 </span> 206 <div class="help-block" id="phone_err"> </div> 206 <small><div class="help-block" id="phone_err"> </div></small> 207 </label> 208 </div> 209 <div class="help-block"> </div> 210 </div> 211 <div class="space-4"></div> 212 213 <div class="form-group"> 214 <label for="form-field-7" class="col-sm-3 control-label no-padding-right"> Phân quyá»n </label> 215 216 <div class="col-sm-9"> 217 <label class="block clearfix has-error"> 218 <span class="input-icon"> 219 <select name="role_id" id="form-field-7"> 220 <?php foreach ($roles as $role):?> 221 <option value=<?php echo $role['role_id']; ?>><?php echo $role['role_name']; ?></option> 222 <?php endforeach; ?> 223 </select> 224 </span> 225 <small><div class="help-block" id="role_err"> </div></small> 207 226 </label> 208 227 </div> -
pro-violet-viettel/sourcecode/application/modules/admin/views/collaborator/listview.php
r572 r590 1 <?php 2 $admin_info = $this->session->userdata('adminInfo'); 3 $role_id = $admin_info['role_id']; 4 ?> 1 5 <div id="breadcrumbs" class="breadcrumbs"> 2 6 … … 41 45 <div style="padding-bottom:4px" class="table-header"> 42 46 Thá»ng kê tà i khoản 43 47 <?php if($role_id == 1): ?> 44 48 <button href="#addUser" data-toggle="modal" class="btn btn-success pull-right"> 45 49 <i class="icon-plus"></i> 46 50 Thêm cá»ng tác viên 47 51 </button> 52 <?php endif; ?> 48 53 49 54 </div> … … 87 92 </th> 88 93 <th class="<?php if ($sorting_field=='activated') {echo $sorting_order;} else {echo "sorting";}?>" id="activated" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 158px;" aria-label="Trạng thái: activate to sort column ascending">Trạng thái</th> 89 < th class="sorting_disabled" role="columnheader" rowspan="1" colspan="1" style="width: 133px;" aria-label="">Chức nÄng</th></tr>94 <?php if($role_id == 1): ?><th class="sorting_disabled" role="columnheader" rowspan="1" colspan="1" style="width: 133px;" aria-label="">Chức nÄng</th><?php endif; ?></tr> 90 95 </thead> 91 96 … … 118 123 ?> 119 124 </td> 120 125 <?php if($role_id == 1): ?> 121 126 <td class=" "> 122 127 <div class="visible-md visible-lg hidden-sm hidden-xs action-buttons"> … … 168 173 </div> 169 174 </td> 175 <?php endif; ?> 170 176 </tr> 171 177 <?php } ?> -
pro-violet-viettel/sourcecode/application/modules/admin/views/user/listview.php
r584 r590 41 41 <div style="padding-bottom:4px" class="table-header"> 42 42 Danh sách 43 < button href="#addUser" data-toggle="modal" class="btn btn-success pull-right">43 <!--button href="#addUser" data-toggle="modal" class="btn btn-success pull-right"> 44 44 <i class="icon-plus"></i> 45 45 Thêm ngưá»i dùng 46 </button >46 </button--> 47 47 48 48 </div> … … 91 91 </label> 92 92 </th> 93 <th class="<?php if ($sorting_field == 'cellphone') {echo $sorting_order;} else {echo "sorting";}?>" id="cellphone" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 176px;" aria-label="Tà i khoản: activate to sort column ascending"> Tà i khoản</th>93 <th class="<?php if ($sorting_field == 'cellphone') {echo $sorting_order;} else {echo "sorting";}?>" id="cellphone" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 176px;" aria-label="Tà i khoản: activate to sort column ascending">Username</th> 94 94 <th class="<?php if ($sorting_field == 'cellphone') {echo $sorting_order;} else {echo "sorting";}?>" id="cellphone" 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">Sá» Äiá»n thoại</th> 95 <th class="<?php if ($sorting_field == 'acc_balanced') {echo $sorting_order;} else {echo "sorting";}?>" id="acc_balanced" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 1 22px;" aria-label="Tiá»n: activate to sort column ascending">Tiá»n</th>96 <th class="<?php if ($sorting_field == 'created_time') {echo $sorting_order;} else {echo "sorting";}?>" id="created_time" 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">95 <th class="<?php if ($sorting_field == 'acc_balanced') {echo $sorting_order;} else {echo "sorting";}?>" id="acc_balanced" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 176px;" aria-label="Tiá»n: activate to sort column ascending">Tà i khoản (VNÄ)</th> 96 <th class="<?php if ($sorting_field == 'created_time') {echo $sorting_order;} else {echo "sorting";}?>" id="created_time" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 150px;" aria-label="Ngà y ÄÄng kÜ: activate to sort column ascending"> 97 97 <i class="icon-time bigger-110 hidden-480"></i> 98 98 Ngà y ÄÄng kÜ 99 99 </th> 100 <th class="<?php if ($sorting_field == 'expire_date') {echo $sorting_order;} else {echo "sorting";}?>" id="expire_date" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 209px;" aria-label="Ngà y hết hạn: activate to sort column ascending">100 <th class="<?php if ($sorting_field == 'expire_date') {echo $sorting_order;} else {echo "sorting";}?>" id="expire_date" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 150px;" aria-label="Ngà y hết hạn: activate to sort column ascending"> 101 101 <i class="icon-time bigger-110 hidden-480"></i> 102 102 Ngà y hết hạn … … 124 124 <?php echo $user['cellphone']; ?> 125 125 </td> 126 <td class="hidden-480 "><?php echo $user['acc_balanced']. " VNÄ"; ?></td>126 <td class="hidden-480 "><?php echo number_format($user['acc_balanced'], 0); ?></td> 127 127 <td class=" "><?php echo $user['created_time']; ?></td> 128 128 <td class=" "><?php echo isset($user['expire_date']) && strtotime($user['expire_date'])>0 ? date('d/m/Y', strtotime($user['expire_date'])) : '';?></td> -
pro-violet-viettel/sourcecode/application/modules/frontend/controllers/home.php
r556 r590 106 106 public function register() { 107 107 $this->load->model ( 'user_model' ); 108 $sentNumber = '0979947802';109 $serviceID = 1; 110 $ receiveID = '0985685735';108 //$collaborator = '0979947802'; 109 $serviceID = 1; 110 $username = '0979947802'; 111 111 $commandcode = 'commandcode1'; 112 112 $info = 'ABCD'; 113 113 // $receiveTime = time(); 114 114 $receiveTime = date ( "Y-m-d H:i:s" ); 115 $data = $this->user_model->register ( $ sentNumber, $receiveID, $serviceID, $commandcode, $info, $receiveTime);115 $data = $this->user_model->register ( $username, null ); 116 116 echo $data; 117 117 } … … 123 123 $password = '123456'; 124 124 $commandcode = "SBG"; 125 $receiveID = '0 1662860000';125 $receiveID = '0977274183'; 126 126 $info = "SBG TD"; 127 127 $receiveTime = date ( "Y-m-d H:i:s" ); … … 148 148 public function register_vip() { 149 149 $this->load->model ( 'user_model' ); 150 $sentNumber = '01662860000'; 150 $sentNumber = '0979947802'; 151 $p_code = 1; 151 152 $serviceID = 1; 152 153 $commandcode = "SBG"; … … 156 157 $receiveTime = date ( "Y-m-d H:i:s" ); 157 158 $status = 0; 158 $data = $this->user_model->registerVip ( $sentNumber, $ vipNum, $serviceID, $commandcode, $info, $status);159 $data = $this->user_model->registerVip ( $sentNumber, $p_code ); 159 160 echo $data; 160 161 } … … 171 172 $info = "SBG NAP 01662860000 10000"; 172 173 $status = 0; 173 $data = $this->user_model->rechargeAccount ( $sentNumber, $receiveID, $mainAccBalanced, $amount, $serviceID, $commandcode, $info, $status ); 174 $receiveTime = date ( "Y-m-d H:i:s" ); 175 //$data = $this->user_model->rechargeAccount ( $sentNumber, $amount ); 176 $data = $this->user_model->insertPaidlog($sentNumber, $sentNumber, 2, $amount, $receiveTime); 174 177 echo $data; 175 178 }
Note: See TracChangeset
for help on using the changeset viewer.