Changeset 698
- Timestamp:
- Jan 19, 2015 11:51:02 AM (10 years ago)
- Location:
- pro-violet-viettel
- Files:
-
- 15 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
pro-violet-viettel/refs/LectureEditor/menus.as
r297 r698 402 402 403 403 function ClearAllData() { 404 dataXML.firstChild.removeNode();405 404 movScene.ClearBackGround(); 406 405 while (movScene.bkgnd_node.childNodes.length > 0) movScene.bkgnd_node.lastChild.removeNode(); … … 565 564 function(param) { 566 565 ClearAllData(); 566 567 567 currentFile = param.id; 568 568 fscommand("Set Title", param.name); … … 587 587 } 588 588 }); 589 } 590 591 // open from Violet Space (using HMTL/javascript to display folders & files) 592 // when user clicked a file in Violet Space, a new window (which contains the lecture editor client) will be opened; ID of the selected lecture will be passed via flashvar 593 function OpenFileById() { 594 clearInterval(_root.openFileInterval); 595 596 if (fileId == undefined) return; 597 if (fileId == "") return; 598 599 //ShowGrayScreen(); 600 ClearAllData(); 601 currentFile = fileId; 602 LoadXMLData(spaceUrl + "file?id="+fileId+"&userid="+userId); 589 603 } 590 604 … … 1100 1114 } 1101 1115 1102 // Thay cho phần LoginViolet: 1103 dataXML.firstChild.attributes.Info = unescape(appUserName) + " - " + unescape(appAddress); 1104 dataXML.firstChild.attributes.Check = dataXML.firstChild.attributes.Info.length + 13; 1105 movScene.movTemplate.userInfo = movDefLayout.userInfo = dataXML.firstChild.attributes.Info; 1106 licenseInfo = {type: licType, customer: licCustomer, create: licCreate, expire: licExpire} 1116 // load user info 1117 function LoadUserInfo() { 1118 // gray screen 1119 ShowGrayScreen(); 1120 1121 // load user info 1122 var xml_userinfo:XML = new XML(); 1123 xml_userinfo.ignoreWhite = true; 1124 1125 xml_userinfo.onLoad = function(success) { 1126 // hide gray screen 1127 ShowGrayScreen(false); 1128 1129 // user data 1130 var attr:Object = this.firstChild.firstChild.attributes; 1131 userId = attr.userId; 1132 userLevel = attr.userLevel; 1133 userPhone = attr.userPhone; 1134 userMoney = attr.userMoney; 1135 appUserName = attr.appUserName; 1136 appAddress = attr.appAddress; 1137 dataXML.firstChild.attributes.Info = unescape(appUserName) + " - " + unescape(appAddress); 1138 dataXML.firstChild.attributes.Check = dataXML.firstChild.attributes.Info.length + 13; 1139 movScene.movTemplate.userInfo = movDefLayout.userInfo = dataXML.firstChild.attributes.Info; 1140 licenseInfo = { type: attr.licType, customer: attr.licCustomer, create: attr.licCreate, expire: attr.licExpire } 1141 1142 // 1143 if (fileId != undefined) { 1144 _root.openFileInterval = setInterval(OpenFileById, 1000); 1145 } 1146 } 1147 1148 var str:String = (host == undefined) ? userInfoUrl : (host + userInfoUrl); 1149 xml_userinfo.load(str); 1150 } 1151 1152 // Nếu user info được lấy theo cách truyền từ flashvars: 1153 function UpdateFromFlashVars() { 1154 dataXML.firstChild.attributes.Info = unescape(appUserName) + " - " + unescape(appAddress); 1155 dataXML.firstChild.attributes.Check = dataXML.firstChild.attributes.Info.length + 13; 1156 movScene.movTemplate.userInfo = movDefLayout.userInfo = dataXML.firstChild.attributes.Info; 1157 licenseInfo = {type: licType, customer: licCustomer, create: licCreate, expire: licExpire} 1158 } 1107 1159 1108 1160 -
pro-violet-viettel/refs/LectureEditor/scene.as
r297 r698 50 50 userUrl = "http://api.violet.vn/user/"; 51 51 spaceUrl = "http://api.violet.vn/space/"; 52 userInfoUrl = "/ajax/user/login/xml"; // the server domain/IP will be passed via flashvars 53 //online = true; fileId = 2877; userInfoUrl = "userinfo.xml"; // TEST 52 54 userId = 0; 53 55 … … 258 260 AutoCheckVersion(); 259 261 //if (online && userId==0) LoginViolet(); 262 if (online && userId == 0) { 263 LoadUserInfo(); 264 } else { 265 UpdateFromFlashVars(); 266 } 260 267 } 261 268 loadVariables(appPath + "Language" + slash + language + ".txt", lang); … … 408 415 function onLoadData(success) 409 416 { 417 //ShowGrayScreen(false); 410 418 if( !success ) { 411 419 ErrorMessage(lang.msgOpenError); -
pro-violet-viettel/sourcecode/application/modules/admin/controllers/cardlog.php
r540 r698 56 56 $id = $cl['us_id']; 57 57 $username = $this->get_username($id); 58 $servicename = $this->get_servicename($cl['service_id']);58 //$servicename = $this->get_servicename($cl['service_id']); 59 59 $cl['username'] = $username; 60 $cl['servicename'] = $servicename;60 //$cl['servicename'] = $servicename; 61 61 array_push($cardlogs, $cl); 62 62 endforeach; -
pro-violet-viettel/sourcecode/application/modules/admin/views/cardlog/listview.php
r573 r698 63 63 </th> 64 64 <th class="<?php if ($sorting_field == 'sender') {echo $sorting_order;} else {echo "sorting";} ?>" id="sender" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 176px;" aria-label="Ngưá»i gá»i: activate to sort column ascending">Ngưá»i gá»i</th> 65 <th class="<?php if ($sorting_field == 'service_id') {echo $sorting_order;} else {echo "sorting";} ?>" id="serivice_id" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 176px;" aria-label="Dá»ch vụ: activate to sort column ascending"> Dá»ch vụ</th>65 <th class="<?php if ($sorting_field == 'service_id') {echo $sorting_order;} else {echo "sorting";} ?>" id="serivice_id" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 176px;" aria-label="Dá»ch vụ: activate to sort column ascending">Tình trạng</th> 66 66 <th class="<?php if ($sorting_field == 'pin_code') {echo $sorting_order;} else {echo "sorting";} ?>" id="pin_code" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 176px;" aria-label="Mã pin: activate to sort column ascending">Mã pin</th> 67 67 <th class="<?php if ($sorting_field == 'serial_number') {echo $sorting_order;} else {echo "sorting";} ?>" id="serial_number" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 176px;" aria-label="Sá» seri: activate to sort column ascending">Sá» seri</th> … … 87 87 <?php echo $cardlog['sender']; ?> 88 88 </td> 89 <td><?php echo $cardlog['s ervicename'];?></td>89 <td><?php echo $cardlog['status'] == -1 ? 'Lá»i nạp thẻ': ($cardlog['status'] == 0 ? 'Khóa tạm thá»i' : 'Nạp thà nh cÃŽng');?></td> 90 90 <td><?php echo $cardlog['pin_code']; ?></td> 91 <td><?php echo $cardlog['serial_num ber']; ?></td>91 <td><?php echo $cardlog['serial_num']; ?></td> 92 92 <td><?php echo $cardlog['card_value']; ?></td> 93 93 <td><?php echo $cardlog['created_time']; ?></td> -
pro-violet-viettel/sourcecode/application/modules/frontend/controllers/user.php
r691 r698 341 341 $this->load->helper('pagging'); 342 342 $us_id = $this->uri->segment(4); 343 $user_info = $this->session->userdata('userInfo'); 344 if ($user_info) 343 344 $user_info = $this->session->userdata('userInfo'); 345 $admin_info = $this->session->userdata('adminInfo'); 346 347 if ($user_info || $admin_info) 345 348 { 346 347 349 $data['us_id'] = $us_id; 348 350 $data['perpage'] = 10; … … 376 378 $username = $user['cellphone']; 377 379 $user_info = $this->session->userdata('userInfo'); 378 if ($user_info) 380 $admin_info = $this->session->userdata('adminInfo'); 381 if ($user_info || $admin_info) 379 382 { 380 383 $data['username'] = $username; -
pro-violet-viettel/sourcecode/application/modules/frontend/models/user_model.php
r695 r698 496 496 $cardlog['created_time'] = $receiveTime; 497 497 $this->db->query ( 'UNLOCK TABLES' ); 498 $sql = 'INSERT INTO tblcardlog(sender, us_id, pin_code, serial_num, card_value, created_time) VALUES(?,?,?,?,?,?)';498 $sql = 'INSERT INTO tblcardlog(sender, us_id, status, pin_code, serial_num, card_value, created_time) VALUES(?,?,?,?,?,?,?)'; 499 499 $query = $this->db->query ($sql, $cardlog); 500 500 } -
pro-violet-viettel/sourcecode/application/modules/services/controllers/recharge.php
r695 r698 42 42 $errMsg = ''; 43 43 $cardValue = 0; 44 $updatedTime = date('Y-m-d H:i:s'); 45 $status = -1; 46 44 47 if ($isLocked == 0) { 45 48 $aryParams = array( … … 50 53 51 54 $aryResult = array(); 52 //$aryResult['TransactionAmount'] = 10000; 55 53 56 $chargCard = $this->services_model->cardPaidProcess($aryParams, $aryResult); 54 //$chargCard = _SBG_CARD_PAY_SUCCESS;55 57 $status = $chargCard; 58 56 59 $paidType = 2; 57 60 $amount = $aryResult['TransactionAmount']; … … 59 62 $paidTime = date('Y-m-d H:i:s'); 60 63 $user['acc_balanced'] = $user['acc_balanced'] + $amount; 61 $user['updated_time'] = date('Y-m-d H:i:s');64 $user['updated_time'] = $updatedTime; 62 65 if ($amount > 0){ 63 66 $updateData = array('acc_balanced' => $user['acc_balanced'], 'updated_time' => $user['updated_time'] ); … … 78 81 else { 79 82 $isLocked = createLockFile($lockFilePreFix, $maxReach, $timeToUnlock, $lockFilePath, FALSE); 80 $errMsg = $isLocked == 1 ? $chargErrMsg .'<br />'.$lockedMsg : $chargErrMsg; 81 $status = 0; 83 $errMsg = $isLocked == 1 ? $chargErrMsg .'<br />'.$lockedMsg : $chargErrMsg; 82 84 } 83 85 }else if ($isLocked == 1) { 84 86 $errMsg = $lockedMsg; 85 87 $result['success'] = _SBG_CARD_PAY_FAIL; 86 $status = -1;88 $status = 0; 87 89 } 88 90 89 $this->objUserModel->insertCardlog($user['cellphone'],$userID, $status, $pinCard, $cardSerial, $cardValue, $u ser['updated_time']);91 $this->objUserModel->insertCardlog($user['cellphone'],$userID, $status, $pinCard, $cardSerial, $cardValue, $updatedTime); 90 92 91 93 $result['us_id'] = $userID;
Note: See TracChangeset
for help on using the changeset viewer.