Ignore:
Timestamp:
Nov 12, 2014 10:52:13 PM (11 years ago)
Author:
dungnv
Message:
 
Location:
pro-violet-viettel/sourcecode
Files:
5 added
1 deleted
11 edited

Legend:

Unmodified
Added
Removed
  • pro-violet-viettel/sourcecode/application/config/database.php

    r461 r483  
    5151$db['default']['hostname'] = 'mysql:host=127.0.0.1';
    5252$db['default']['username'] = 'root';//sbg
    53 $db['default']['password'] = 'Quyenhue@123';//sbg~~!!@@123
     53$db['default']['password'] = '123456';//sbg~~!!@@123
    5454$db['default']['database'] = 'violet-viettel';
    5555$db['default']['dbdriver'] = 'pdo';
  • pro-violet-viettel/sourcecode/application/config/routes.php

    r478 r483  
    4444$route['violetservice/soanbai/mo'] = 'services/viettel/mo';
    4545$route['violetservice/soanbai/mo/wsdl'] = 'services/viettel/index/wsdl';
    46 $route['violetservice/soanbai/mo?wsdl'] = 'services/viettel/index/wsdl';
    4746
    4847$route['admin'] = 'admin/home';
     
    5756$route['admin/cong_tac_vien/xoa_cong_tac_vien'] = 'admin/collaborator/dodeleteUser';
    5857$route['admin/cong_tac_vien/cap_nhat'] = 'admin/collaborator/updateUser';
    59 
    6058
    6159$route['admin/mau_tin_nhan'] = 'admin/smstemplate';
  • pro-violet-viettel/sourcecode/application/modules/frontend/controllers/lecture.php

    r472 r483  
    2626                if ($user_info){
    2727                        $username = $user_info['username'];
    28                         $flashscript = $this->load->view('flashscript',null, true);
    29                         $this->load->view ( 'lecture_editor', array('username'=>$username, 'licenseAvailable' => $licenseAvailable, 'flashScript' => $flashscript));
     28                        $this->load->view ( 'lecture_editor', array('username'=>$username, 'licenseAvailable' => $licenseAvailable));
    3029
    3130                }else{
  • pro-violet-viettel/sourcecode/application/modules/frontend/models/user_model.php

    r472 r483  
    9191                        case 0:
    9292                                $us_id = $id;
    93                                 $user['created_time'] = $receiveTime;
     93                                $user['created_time'] = date('Y-m-d H:i:s');
    9494                                $user['us_id'] = $us_id;
    9595                                $user['cellphone'] = $username;
     
    109109                        case 2:                         
    110110                        case 4:
    111                                 $sms = "So dien thoai cá»§a Qui vi da duoc dang ky !";
     111                                $sms = "So dien thoai cua Qui vi da duoc dang ky !";
    112112                                $status = 0;
    113113                                break;
  • pro-violet-viettel/sourcecode/application/modules/frontend/views/flashscript.php

    r474 r483  
    77
    88function InitViolet() {
    9   g_Flash = isInternetExplorer ? LectorEditorOnline : document.LectorEditorOnline;
     9  console.log('onload');
     10  g_Flash = document.getElementById('LectorEditorOnline');
     11  //g_Flash = isInternetExplorer ? LectorEditorOnline : document.LectorEditorOnline;
     12
     13  console.log(LectorEditorOnline);
    1014}
    1115
     
    3842// Handle all the FSCommand messages in a Flash movie.
    3943function LectorEditorOnline_DoFSCommand(command, args) {
     44
    4045  switch (command) {
    4146    case "Set Title": SetWindowTitle(args); break;
  • pro-violet-viettel/sourcecode/application/modules/frontend/views/lecture_editor.php

    r472 r483  
    11<?php
    2 $this->load->view('layout/frontend/header', array('flashScript' => $flashScript));
     2$this->load->view('layout/frontend/header');
    33$base_url = base_url();
    44$this->load->view('layout/frontend/sidebar');
     
    1313                                                                <?php $flashVars = 'online=true&applicationId=Violet Online' ?>
    1414                                                                <?php $flashVars.= '&commonLibList=sxIOE3.xml,sxIOE4.xml,sxIOE5.xml,tnIOE3.xml,tnIOE4.xml,tnIOE5.xml' ?>
    15                                                                 <?php $flashVars.= '&youtubeUrl=Service/fake_youtube.php'.$langParam.'&command=Init OK' ?>
     15                                                                <?php $flashVars.= '&youtubeUrl='.$base_url.'assets/soanbai/Service/fake_youtube.php'.$langParam.'&command=Init OK' ?>
    1616                                                                <?php $flashVars.= '&licenseStatus='.$licenseAvailable ?>
    1717
    1818                                                                <div class="embed-responsive embed-responsive-16by9">
    19                                                                   <embed                                                                         
     19                                                                  <embed
     20                                                                          id="LectorEditorOnline"
     21                                                                          name="LectorEditorOnline"                                                                       
    2022                                                                          class="embed-responsive-item"
    2123                                                                          src="<?php echo $base_url;?>assets/soanbai/Lecture/LectureEditor.swf"
     
    2628                                                                </div>                                                 
    2729                                                                <!-- PAGE CONTENT ENDS -->
    28 
    2930                                        </div><!-- /.page-content -->
    3031                                </div><!-- /.main-content -->
     
    3536                        </a>
    3637                </div><!-- /.main-container -->
     38               
    3739<?php
    38 $this->load->view('layout/frontend/footer');
     40$this->load->view('servicemodals');
     41$this->load->view('layout/frontend/footer', array('usjs'=> array('assets/js/frontend/lecture.js')));
    3942?>
  • pro-violet-viettel/sourcecode/application/modules/services/controllers/viettel.php

    r470 r483  
    99class Viettel extends MX_Controller
    1010{
     11       
     12        private $_server = null;
     13       
    1114        function __construct() {
    1215                parent::__construct ();
    13                
    14                 $this->nusoap_server = new soap_server ();
    15                 $this->nusoap_server->configureWSDL('messageReceiverWSDL','urn:messageReceiverWSDL');
    16 
    17                 $this->nusoap_server->soap_defencoding = 'UTF-8';               
    18                 $this->nusoap_server->methodreturnisliteral=TRUE;
    19                
    20                 $this->nusoap_server->wsdl->addComplexType(
    21                                 'messageReceiver',
    22                                 'simpleType',
    23                                 'struct',
    24                                 '',
    25                                 'SOAP-ENC:Array',
    26                                 array(
    27                                                 'username'=>array('name'=>'username', 'type'=>'xsd:string'),
    28                                                 'password'=>array('name'=>'password', 'type'=>'xsd:string'),
    29                                                 'requestID'=>array('name'=>'requestID', 'type'=>'xsd:string'),
    30                                                 'userID'=>array('name'=>'userID', 'type'=>'xsd:string'),
    31                                                 'receiverID'=>array('name'=>'receiverID', 'type'=>'xsd:string'),
    32                                                 'serviceID'=>array('name'=>'serviceID', 'type'=>'xsd:string'),
    33                                                 'commandCode'=>array('name'=>'commandCode', 'type'=>'xsd:string'),
    34                                                 'contentType'=>array('name'=>'contentType', 'type'=>'xsd:string'),
    35                                                 'info'=>array('name'=>'info', 'type'=>'xsd:string'),
    36                                                 'receiveTime'=>array('name'=>'receiveTime', 'type'=>'xsd:string')
    37                                 )
     16                ini_set("soap.wsdl_cache_enabled","1");
     17                $this->_server = new SoapServer(NULL,
     18                                array('soap_version' => SOAP_1_2, 'encoding' => 'UTF-8', 'uri' => 'http://tempuri.org/')
    3819                );
    39                
    40                 $this->nusoap_server->register ( 'MOReceiver',
    41                                 array( 'username' => 'xsd:string',
    42                                                 'password' => 'xsd:string',
    43                                                 'requestID' => 'xsd:string',
    44                                                 'userID' => 'xsd:string',
    45                                                 'receiverID' => 'xsd:string',
    46                                                 'serviceID' => 'xsd:string',
    47                                                 'commandCode' => 'xsd:string',
    48                                                 'contentType' => 'xsd:string',
    49                                                 'info' => 'xsd:string',
    50                                                 'receiveTime' => 'xsd:string')
    51                                 , array ('return' => 'xsd:string'),
    52                                 'urn:messageReceiverWSDL',"urn:messageReceiverWSDL#MOReceiver","rpc","encoded");
    5320        }
    5421
     
    5623        {
    5724                if($this->uri->segment(4) == "wsdl") {
    58                         $_SERVER['QUERY_STRING'] = "wsdl";
     25                        header('Content-Type: text/xml; charset: utf-8');
     26                        $this->load->view('mowsdl');
    5927                } else {
    60                         $_SERVER['QUERY_STRING'] = "";
    61                 }
    62                 $this->nusoap_server->service(file_get_contents("php://input"));
     28                        header('Content-Type: text/html; charset: utf-8');
     29                        echo 'See service <a href="'.base_url().'violetservice/soanbai/mo/wsdl">WSDL page</a>';
     30                }                       
    6331        }
    6432       
    6533        public function mo()
    6634        {       
    67                 function MOReceiver($username, $password, $requestID, $userID, $receiverID, $serviceID, $commandCode, $contentType ,$info, $receiveTime){
     35                function messageReceiver(){
     36                        $aryArgs = func_get_args();
     37                        list($username, $password, $requestID, $userID, $receiverID, $serviceID, $commandCode, $contentType ,$info, $receiveTime) = $aryArgs;
     38                       
    6839                        $msgType = '0'; //text message
    6940                        $errCode = '1'; //#1:error; 1:Success;
     
    7849                        if ($password != $mo_password) return '0|0|Password is not corrected!';
    7950                        if (!$requestID) return '0|0|requestID is required!';
     51                        if ((int)$requestID != 4) return '0|0|requestID is not corrected!';
    8052                        if (!$userID) return '0|0|UserID is required!';
    8153                        if (!$serviceID) return '0|0|serviceID is required!';
     
    9668                }
    9769               
    98                 $this->nusoap_server->service(file_get_contents("php://input"));
     70                $this->_server->addFunction('messageReceiver');
     71                try {
     72                        ob_start();
     73                        $soapOutput = '';
     74                        $this->_server->handle();
     75                               
     76                        if (ob_get_length() > 0) {
     77                                $soapOutput = ob_get_clean();
     78                        }
     79                               
     80                        if ($soapOutput != '') {
     81                                $pattern = '/<[^>]*[^\/]>/i';
     82                                $aryOutput = preg_split ($pattern, $soapOutput, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE);
     83               
     84                                $xml = '<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
     85                                                   <S:Body>
     86                                                      <messageReceiverResponse xmlns="http://tempuri.org/">
     87                                                         <return>'.$aryOutput[1].'</return>
     88                                                      </messageReceiverResponse>
     89                                                   </S:Body>
     90                                                </S:Envelope>';
     91               
     92                                header('Content-Type: text/xml; charset: utf-8');
     93                                echo $xml;
     94                        }
     95                        else {
     96                                header('Content-Type: text/html; charset: utf-8');
     97                                echo 'See service <a href="'.base_url().'violetservice/soanbai/mo/wsdl">WSDL page</a>';
     98                        }
     99                }
     100                catch (Exception $e) {
     101                        $this->_server->fault('Sender', $e->getMessage());
     102                }
    99103        }
    100104}
  • pro-violet-viettel/sourcecode/application/views/layout/frontend/footer.php

    r466 r483  
    8585                {
    8686                ?>
    87                 <script type="text/javascript" src="<?php echo $base_url;?><?php echo $file?>"></script>
     87                        <script type="text/javascript" src="<?php echo $base_url;?><?php echo $file?>"></script>
    8888                <?php
    8989                }
  • pro-violet-viettel/sourcecode/assets/js/ace.min.js

    r313 r483  
    1111          setHeight();
    1212        })
     13
     14        $('a[href="' + window.location.hash + '"]').click()
    1315});
  • pro-violet-viettel/sourcecode/assets/soanbai/index.php

    r473 r483  
    1414
    1515function InitViolet() {
    16   g_Flash = isInternetExplorer ? LectorEditorOnline : document.LectorEditorOnline;
     16  //g_Flash = isInternetExplorer ? LectorEditorOnline : document.LectorEditorOnline;
     17        g_Flash = document.getElementById('LectorEditorOnline');
    1718}
    1819
Note: See TracChangeset for help on using the changeset viewer.