Ignore:
Timestamp:
Jan 29, 2015 10:46:25 AM (10 years ago)
Author:
namnd
Message:
 
Location:
pro-violet-viettel/sourcecode/application/modules
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • pro-violet-viettel/sourcecode/application/modules/frontend/views/package_register_modal.php

    r706 r714  
    4242                                Đơn vị</label>
    4343                            <div class="col-sm-8">
    44                                 <input name="school" <?php if ($can_edit == 0) { ?>  disabled <?php } ?> type="text" value="<?php echo $info['school']; ?>" placeholder="Đơn vị" id="form-field-first" class="input-large">
     44                                <input name="school" type="text" value="<?php echo $info['school']; ?>" placeholder="Đơn vị" id="form-field-first" class="input-large">
    4545                            </div>
    4646                        </div>
  • pro-violet-viettel/sourcecode/application/modules/frontend/views/user_profile.php

    r707 r714  
    195195                                                                                </form>
    196196                               
    197                                                                                 <div class="alert alert-block alert-success">
     197                                                                                <!--div class="alert alert-block alert-success">
    198198                                                                                       
    199199                                                                                        <p>
    200200                                                                                                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> (500đ/tin).
    201201                                                                                        <p/>
    202                                                                                 </div>
     202                                                                                </div-->
    203203                                </div>
    204204
  • pro-violet-viettel/sourcecode/application/modules/services/controllers/sendmessage.php

    r711 r714  
    212212        }
    213213       
    214         public function collaborator ()
    215         {
    216                 error_reporting(E_ALL);
    217 
    218                 $this->load->model('Services_model');
    219                
    220                 //$totalpage = 10213;
    221                
    222                 // get total page
    223                 $totalpage = 1;
    224                
    225                 $default = $this->Services_model->getCollaborator(2,1,100);
    226                 //var_dump($default);
    227                 $data = mb_convert_encoding($default, 'UTF-8', 'ISO-8859-1');
    228                 if($data){
    229                         $xml = simplexml_load_string($data);
    230                         $xml->registerXPathNamespace("S", "http://schemas.xmlsoap.org/soap/envelope/");
    231                        
    232                         $xml = $xml->xpath('//S:Body');
    233                         $xml = $xml[0];
    234 
    235                         $xml->registerXPathNamespace("ns2", "http://process.wsim.viettel.com/");
    236                        
    237                         $totalpage = $xml->xpath('//return//totalpage');
    238                         $totalpage = (int)$totalpage[0];
    239                 }
    240                
    241                 for ($i=1; $i<=$totalpage; $i++){
    242                         $result = $this->Services_model->getCollaborator(2,$i,100);
    243                         $data = mb_convert_encoding($result, 'UTF-8', 'ISO-8859-1');
    244                         if($data && $data != -1){
    245                                 $xml = simplexml_load_string($data);
    246                                 $xml->registerXPathNamespace("S", "http://schemas.xmlsoap.org/soap/envelope/");
    247                                 $xml = $xml->xpath('//S:Body');
    248                                 $xml = $xml[0];
    249                                 $xml->registerXPathNamespace("ns2", "http://process.wsim.viettel.com/");
    250                                 $lst = $xml->xpath('//return//lst');
    251                                 foreach($lst as $item){
    252                                         $item = (array)$item;
    253                        
    254                                         $data = array(
    255                                                         'address'=> (string)$item['address'],
    256                                                         'code'=>(string)$item['code'],
    257                                                         'district'=>(string)$item['district'],
    258                                                         'email'=>(string)$item['email'],
    259                                                         'id'=>(int)$item['id'],
    260                                                         'full_name'=>(string)$item['name'],
    261                                                         'cellphone'=>(string)$item['phone'],
    262                                                         'precinct'=>(string)$item['precinct'],
    263                                                         'province'=>(string)$item['province'],
    264                                                         'created_time'=>date('Y-m-d H:i:s'),
    265                                                         'updated_time'=>date('Y-m-d H:i:s')
    266                                                 );
    267                                         write_file('./log/sync_collaborator.log', var_export($data, TRUE), FOPEN_WRITE_CREATE);
    268                                         if ((string)$item['phone']){
    269                                                 $this->Services_model->syncCollaborator($data);
    270                                         }
    271                                 }
    272                         }else{
    273                                 $logMsg = date('Y-m-d H:i:s') . " Result is null \n";
    274                                 write_file('./log/sync_collaborator.log', $logMsg, FOPEN_WRITE_CREATE);
    275                         }
    276                 }
    277         }
     214       
    278215}
    279216
Note: See TracChangeset for help on using the changeset viewer.