Changeset 654


Ignore:
Timestamp:
Dec 8, 2014 5:28:47 PM (10 years ago)
Author:
quyenla
Message:

Trail Message

Location:
pro-violet-viettel/sourcecode
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • pro-violet-viettel/sourcecode/application/language/message/messages_lang.php

    r652 r654  
    3838$lang['_SBG_USER_INFO_REQUIRED_MSG'] = 'QuÜ vị hãy nhập thÃŽng tin cá nhân để có thể sá»­ dụng dịch vụ.';
    3939$lang['_SBG_USER_UNREGISTERING_SERVICE_MSG'] = 'QuÜ vị chưa đăng kÜ sá»­ dụng dịch vụ Soạn Bài giảng online. QuÜ vị có thể dùng thá»­ dịch vụ Soạn Bài giảng online trước khi đăng kÜ.';
     40$lang['_SBG_USER_TRIAL_SERVICE_MSG'] = 'QuÜ vị đang sá»­ dụng gói dùng thá»­ cá»§a dịch vụ Soạn Bài giảng online. QuÜ vị có thể dùng thá»­ dịch vụ Soạn Bài giảng online cho đến hết ngày ';
    4041
    4142
  • pro-violet-viettel/sourcecode/application/modules/frontend/controllers/lecture.php

    r580 r654  
    2525        $licenseAvailable = $this->User_model->checkLicense($aryParams['id']);
    2626        $licenseAvailable = $licenseAvailable == TRUE ? 'OK' : '!OK';
    27         
     27       
    2828        if ($user_info) {
    2929            $username = $user_info['username'];   
     
    3434            $user = $user_info['user'];
    3535            $us_id = $user_info['us_id'];
    36             $u = $this->user_model->get_user_by_id($us_id);
     36            $u = $this->user_model->get_user_by_id($us_id);
     37            $info['fullname']="";
    3738            if (($info['fullname']=="")&&($u['p_id']!=""))
    3839            {
     
    4445               $first_visit=1;
    4546            }
    46           $this->load->view('lecture_editor', array('username' => $username, 'licenseAvailable' => $licenseAvailable, 'first_visit' => $first_visit, 'licflashVars' => $aryParams,'update_user_info'=>$update_user_info,'us_id'=>$us_id));
     47          $this->load->view('lecture_editor', array('username' => $username, 'licenseAvailable' => $licenseAvailable, 'first_visit' => $first_visit, 'licflashVars' => $aryParams,'update_user_info'=>$update_user_info,'us_id'=>$us_id,"p_id"=>$u['p_id'],"expire_date"=>date("d-m-Y", strtotime($u['expire_date']))));
    4748        } else {
    4849            redirect('/frontend/home/');
  • pro-violet-viettel/sourcecode/application/modules/frontend/models/servicepackage_model.php

    r501 r654  
    1818    {
    1919        $this->db->query('UNLOCK TABLES');
    20         $sql="SELECT * FROM ".$this->table_name."";
     20        $sql="SELECT * FROM ".$this->table_name." WHERE p_period > 0";
    2121        return $this->db->query($sql)->result_array();
    2222    }
  • pro-violet-viettel/sourcecode/application/modules/frontend/models/user_model.php

    r652 r654  
    8686                                $user ['created_time'] = date ( 'Y-m-d H:i:s' );
    8787                                $user ['us_id'] = $us_id;
     88                                $user ['p_id'] = 5;
     89                                $user['expire_date'] = date('Y-m-d', strtotime("+" . $this->config->item("trial_period") . " days", time()));
    8890                                $user ['cellphone'] = $username;
    8991                                if (! is_null ( $collaborator ) || $collaborator != '') {
  • pro-violet-viettel/sourcecode/application/modules/frontend/views/lecture_editor.php

    r647 r654  
    9494    </div>
    9595</div>
    96                
     96                <?php echo $licenseAvailable;?>
    9797<script type="text/javascript">
    9898        var licenseAvailable = "<?php echo $licenseAvailable;?>";
    9999        var url= "<?php echo base_url();?>";
    100100        var first_visit= "<?php echo $first_visit;?>";
     101        var p_id= "<?php echo $p_id;?>";
     102        var expire_date= "<?php echo $expire_date;?>";
    101103    var update_user_info="<?php echo $update_user_info;?>";
    102104    var us_id="<?php echo $us_id;?>";
    103105</script>               
    104106<?php
    105 $this->load->view('servicemodals');
     107$this->load->view('servicemodals',array("expire_date"=>$expire_date));
    106108$this->load->view('layout/frontend/footer', array('usjs'=> array('assets/js/frontend/lecture.js')));
    107109?>
  • pro-violet-viettel/sourcecode/application/modules/frontend/views/servicemodals.php

    r638 r654  
    11                <!-- alert-services -->
     2                <div class="modal fade" id="alert-trial-services" tabindex="-1" role="dialog"aria-hidden="true">
     3                  <div class="modal-dialog">
     4                    <div class="modal-content">
     5                      <div class="modal-header">
     6                        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
     7                        <h4 class="modal-title">ThÃŽng báo dịch vụ</h4>
     8                      </div>
     9                      <div class="modal-body">
     10                        <div class="alert alert-block alert-success">                                           
     11                                                        <p>
     12                                                                <?php echo lang('_SBG_USER_TRIAL_SERVICE_MSG').$expire_date; ?>
     13                                                        </p>
     14                                                </div>
     15                      </div>
     16
     17                      <div class="modal-footer">
     18                        <button type="button" class="btn btn-info" data-dismiss="modal">Dùng thá»­</button>
     19                        <button type="button" class="btn btn-success" id="services-reg" data-dismiss="modal">Đăng kÜ gói VIP</button>
     20                      </div>
     21                    </div>
     22                  </div>
     23                </div>
     24                <!-- END: alert-services -->
     25                <!-- alert-services -->
    226                <div class="modal fade" id="alert-services" tabindex="-1" role="dialog"aria-hidden="true">
    327                  <div class="modal-dialog">
  • pro-violet-viettel/sourcecode/assets/js/frontend/lecture.js

    r650 r654  
    11if (licenseAvailable == "!OK")
    22{
     3    $('#alert-services').modal('show');
    34    if (first_visit == '1') {
    4         $('#alert-services').modal('show');
     5        $('#alert-services').modal('show');
     6    }
     7}
     8if (first_visit == '1') {
     9    if (update_user_info == "1")
     10    {
     11        $('#update_user_info').modal({backdrop: 'static'});
     12    } else {
     13        if (p_id == 5)
     14        {
     15            $('#alert-trial-services').modal('show');
     16        }
    517    }
    618}
    719
    8 if (update_user_info=="1")
    9 {
    10     $('#update_user_info').modal({backdrop: 'static'});
    11 }
     20
    1221$("#update_user_info.btn").click(function () {
    1322    $(".error").html("");
     
    2130            if (result.success == "1")
    2231            {
    23                                 $('#update_user_info').modal('hide');
    24                
     32                $('#update_user_info').modal('hide');
     33
    2534            }
    2635            else
     
    2837                for (var key in result.errors)
    2938                {
    30                     $("#"+result.errors[key]['field']+".error").html(result.errors[key]['content']);
    31                    
     39                    $("#" + result.errors[key]['field'] + ".error").html(result.errors[key]['content']);
     40
    3241                }
    3342            }
     
    4251
    4352$('#services-reg').click(function () {
    44         $('#alert-services').modal('hide');
    45         window.location=url+"frontend/user/profile#services-register";
     53    $('#alert-services').modal('hide');
     54    window.location = url + "frontend/user/profile#services-register";
    4655});
    4756
    4857$('#save-package').click(function () {
    49         DoSaveLecture();
     58    DoSaveLecture();
    5059});
    5160
     
    99108;
    100109
    101 function DoSaveLecture () {
    102         g_Flash.SetVariable("command", "Press Save");
     110function DoSaveLecture() {
     111    g_Flash.SetVariable("command", "Press Save");
    103112}
    104113
    105 function DoOpenLecture (filename) {
    106         g_Flash.SetVariable("openedFileName", filename);
    107         g_Flash.SetVariable("command", "Open File");
     114function DoOpenLecture(filename) {
     115    g_Flash.SetVariable("openedFileName", filename);
     116    g_Flash.SetVariable("command", "Open File");
    108117}
    109118
     
    149158
    150159$(document).ready(function () {
    151     InitViolet();   
     160    InitViolet();
    152161    //$('#open-lecture').click(function(e){DoOpenLecture('http://sbgapi.violet.vn/space/file/id/7');});
    153    
     162
    154163})
Note: See TracChangeset for help on using the changeset viewer.