Changeset 519 for pro-violet-viettel/sourcecode/application/modules
- Timestamp:
- Nov 14, 2014 10:05:19 PM (11 years ago)
- Location:
- pro-violet-viettel/sourcecode/application/modules
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
pro-violet-viettel/sourcecode/application/modules/frontend/models/user_model.php
r517 r519 422 422 $this->db->query ( 'UNLOCK TABLES' ); 423 423 $sql = 'INSERT INTO tblpaidlog(us_id, paidType, amount, paidTime) VALUES (?,?,?,?)'; 424 $query = $this->db->query ( $sql, $paid og );424 $query = $this->db->query ( $sql, $paidlog ); 425 425 } 426 426 } -
pro-violet-viettel/sourcecode/application/modules/frontend/views/user_profile.php
r512 r519 3 3 $this->load->view('layout/frontend/header', array('base_url' => $base_url, '$username' => @$username)); 4 4 $this->load->view('layout/frontend/sidebar', array('base_url' => $base_url)); 5 /*6 $this->load->view('layout/frontend/header', array('base_url'=>base_url(), '$username'=>$username));7 $base_url = base_url();8 $this->load->view('layout/frontend/sidebar', array('base_url'=>base_url())); */9 5 ?> 10 6 <div class="main-content"> … … 71 67 72 68 <div class="col-sm-8"> 73 <input type="text" name="username" value="<?php echo @$username; ?>" placeholder=" Tà i khoản" id="form-field-username" class="col-xs-12 col-sm-10" disabled>69 <input type="text" name="username" value="<?php echo @$username; ?>" placeholder="Sá» Äiá»n thoại" id="form-field-username" class="col-xs-12 col-sm-10" disabled> 74 70 </div> 75 71 </div> … … 82 78 83 79 <div class="col-sm-8"> 84 <input type="text" name="fullname" value="<?php echo @$fullname; ?>" placeholder="Há» " id="form-field-first" class="col-xs-12 col-sm-10" <?php if (@$use_package) echo 'disabled'; ?>>80 <input type="text" name="fullname" value="<?php echo @$fullname; ?>" placeholder="Há» và tên" id="form-field-first" class="col-xs-12 col-sm-10" <?php if (@$use_package) echo 'disabled'; ?>> 85 81 86 82 </div> … … 190 186 191 187 <p> 192 Quà vá» cÅ©ng có thá» thay Äá»i máºt khẩu bằng cách dùng sá» Äiá»n thoại <strong> [SoDTKhachhang]</strong> và soạn tin theo cú pháp: <strong>SBG MK [MatKhauMoi]</strong> gá»i tá»i <strong>8062</strong>.188 Quà vá» cÅ©ng có thá» thay Äá»i máºt khẩu bằng cách dùng sá» Äiá»n thoại <strong><?php echo $username; ?></strong> và soạn tin theo cú pháp: <strong>SBG MK [MatKhauMoi]</strong> gá»i tá»i <strong>8062</strong>. 193 189 <p/> 194 <p>195 Äá» lấy lại máºt khẩu cá»§a mình trên há» thá»ng SBG Online, Quà vá» hãy dùng <strong>sá» Äiá»n thoại Äã ÄÄng kà tà i khoản</strong> và soạn tin theo cú pháp: <strong>SBG MK</strong> gá»i tá»i <strong>8062</strong>.196 </p>197 190 </div> 198 191 </div> … … 204 197 <h4>Sá» tiá»n </h4> <h3><?php echo number_format(@$acc_balanced, 0); ?> VND</h3> 205 198 </div> 206 <div class="col-sm-6">207 <h4>Thá»i hạn sá» dụng </h4> <h3><?php echo @$expire_date; ?> <span class="badge"><?php echo @$date_diff; ?></span></h3>208 </div>209 210 199 <h4 class="header blue bolder smaller">Nạp tiá»n bằng thẻ cà o</h4> 200 211 201 <div class="col-sm-8"> 202 <div class="block clearfix has-error"></div> 212 203 <div class="form-group"> 213 204 <label for="form-field-pass1" class="col-sm-2 control-label no-padding-right">Mã thẻ</label> 214 205 215 206 <div class="col-sm-10"> 216 <input type="text" id="form-field-pass1" class="form-control">207 <input type="text" id="form-field-pass1" name="pin_card" class="form-control"> 217 208 </div> 218 209 </div> … … 224 215 225 216 <div class="col-sm-10"> 226 <input type="text" id="form-field-pass2" class="form-control">217 <input type="text" id="form-field-pass2" name="card_serial" class="form-control"> 227 218 </div> 228 219 </div> 229 220 </div> 230 221 <div class="col-sm-4"> 231 <button type="button" class="btn btn-success" data-toggle="modal" data-target="#alert-payment">222 <button type="button" onclick="return chargeCard(<?php echo @$us_id; ?>);" class="btn btn-success"> 232 223 <i class="icon-ok bigger-110"></i> 233 224 Tiếp tục … … 243 234 <p> 244 235 Sá» dụng thuê bao <strong><?php echo @$username; ?></strong> soạn tin nhắn: <strong>SBG NAP [sotien] gá»i 8062</strong>. <br/> 245 Nếu quà vá» sá» dụng thuê bao Viettel khác thì soạn tin nhắn: <strong>SBG NAP [tentruynhap]236 Nếu quà vá» sá» dụng thuê bao Viettel khác thì soạn tin nhắn: <strong>SBG NAP <?php echo $username; ?> 246 237 [sotien] gá»i tá»i 8062</strong>. 247 238 </p> … … 253 244 <h4 class="header blue bolder smaller">ThÃŽng tin tà i khoản</h4> 254 245 <div class="col-sm-6"> 255 <h4>Sá» tiá»n trong tà i khoản SBG Online </h4> <h3><?php echo number_format(@$acc_balanced, 0); ?> VND<span id="add_money" style="cursor:pointer" class="badge">Nạp thêm tiá»n</span></h3> 246 <h4>Sá» tiá»n trong tà i khoản SBG Online </h4> <h3><?php echo number_format(@$acc_balanced, 0); ?> VND <span id="add_money" style="cursor:pointer" class="badge" >Nạp thêm tiá»n</span></h3> 247 256 248 </div> 257 249 <div class="col-sm-6"> … … 453 445 </div> 454 446 447 <div class="modal fade" id="success_charge" tabindex="-1" role="dialog"aria-hidden="true"> 448 <div class="modal-dialog"> 449 <div class="modal-content"> 450 <div class="modal-header"> 451 <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button> 452 <h4 class="modal-title">Nạp tiá»n</h4> 453 </div> 454 <div class="modal-body"> 455 <div id="success_package_register_content" class="alert alert-block alert-success"><center>Quà vá» Äã nạp thà nh cÃŽng [SoTien] và o tà i khoản <?php echo $username; ?>, tà i khoản ảo cá»§a quà là [TaiKhoanAO]!</center></div> 456 <center><button id="package_register_finish_button" data-dismiss="modal" class="btn btn-primary" >Äóng</button></center> 457 </div> 458 459 </div> 460 </div> 461 </div> 462 463 <div class="modal fade" id="not_success_charge" tabindex="-1" role="dialog"aria-hidden="true"> 464 <div class="modal-dialog"> 465 <div class="modal-content"> 466 <div class="modal-header"> 467 <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button> 468 <h4 class="modal-title">Nạp tiá»n</h4> 469 </div> 470 <div class="modal-body"> 471 <div id="success_package_register_content" class="alert alert-block alert-success"><center>Mã thẻ hoặc Serial khÃŽng dúng hoặc Äã ÄÆ°á»£c sá» dụng. Quà vá» hãy kiá»m tra lại!</center></div> 472 <center><button id="package_register_finish_button" data-dismiss="modal" class="btn btn-primary" >Äóng</button></center> 473 </div> 474 475 </div> 476 </div> 477 </div> 478 455 479 <script type="text/javascript"> 456 480 var url="<?php echo base_url();?>"; -
pro-violet-viettel/sourcecode/application/modules/services/controllers/sendmessage.php
r517 r519 21 21 $this->load->model('Services_model'); 22 22 //$this->Services_model->cardPaidProcess($aryParams); 23 echo $this->Services_model->processMORequest('01662860000', strtoupper('Sbg vip 1')); 24 23 echo $this->Services_model->processMORequest('01662860000', strtoupper('sbg DDT 0979947802 123456')); 25 24 } 26 25 … … 106 105 echo '<p><b>Error: ' . $err . '</b></p>'; 107 106 } 108 107 109 108 var_dump($result); 110 109 … … 119 118 public function topup () 120 119 { 120 $usID = $this->uri->segment(4); 121 121 $url = $this->config->item('topup_service_url'); 122 122 … … 129 129 $password = 'sbg56ab77cdsgb'; 130 130 131 $input = $this->input->post(); 132 $cardSerial = $input['card_serial']; 133 $pinCard = $input['pin_card']; 134 131 135 $aryParams = array( 132 136 'EWalletID' => 0, 133 'CardSerial' => '11111', 134 'PinCard' => 'eeeeeeeee' 135 ); 136 137 'CardSerial' => $cardSerial, 138 'PinCard' => $pinCard, 139 'UserID' => $usID 140 ); 141 142 $this->load->model('services_model'); 143 echo json_encode($this->services_model->cardPaidProcess($aryParams)); 144 137 145 $xml = $this->load->view('topup', $aryParams, true); 138 146 $client = new nusoap_client($url); … … 143 151 $result = $client->send($this->_xmlHeader.$xml, $operation); 144 152 $err = $client->getError(); 145 153 146 154 if ($client->fault) { 147 155 echo "<h2>Fault loi:</h2><pre>"; … … 165 173 echo "<h2>Response</h2>"; 166 174 echo "<pre>" . htmlspecialchars($client->response, ENT_QUOTES) . "</pre>"; 167 175 168 176 } 169 177 -
pro-violet-viettel/sourcecode/application/modules/services/models/services_model.php
r517 r519 167 167 $client->operation = $action; 168 168 169 $result = $client->send($xml, $ operation);169 $result = $client->send($xml, $action); 170 170 171 171 if ($client->fault) { … … 174 174 175 175 $aryTopupResult = $result['TopUpResult']; 176 $this->load->model('frontend/user_model', 'objUserModel'); 177 178 $userID = $aryCardInfo['UserID']; 179 $paidType = 2; 180 $amount = $aryTopupResult['TransactionAmount']; 181 $paidTime = date('Y-m-d H:i:s'); 182 183 $user = $this->objUserModel->get_user_by_id($userID); 184 $user['acc_balanced'] = $user['acc_balanced'] + $amount; 185 $user['updated_time'] = date('Y-m-d H:i:s'); 186 if ($amount>0){ 187 $this->objUserModel->updateUser($userID, $user); 188 } 189 $this->objUserModel->insertPaidlog($user['cellphone'], $user['cellphone'], $paidType, $amount, $paidTime); 176 190 177 191 if ($aryTopupResult['Success'] == 'false') {
Note: See TracChangeset
for help on using the changeset viewer.