Вход Регистрация
Файл: adultscript-2.0.3-pro/files/templates/defboot/user_videos.tpl.php
Строк: 50
<?php defined('_VALID') or die('Restricted Access!'); ?>
    <script type="text/javascript">
    $(document).ready(function() {
          $("button[id^='video-delete-']").click(function(e) {
              e.preventDefault();

            var video_id = $(this).attr('id').match(/video-delete-(.*)/)[1];

              $.ajax({
                  url: base_url + '/ajax.php?s=user_video',
                  cache: false,
                  type: "POST",
                  dataType: "json",
                  data: {video_id: video_id, page: '<?php echo $this->submenu?>'},
                  success: function(response) {
                      $("#response").append(response.msg);
                      if (response.status == '1') {
                          $("li[id='video-" + video_id + "']").fadeOut();
                          $("#response").removeClass('alert-danger').addClass('alert-success');
                      } else {
                          $("#response").removeClass('alert-success').addClass('alert-danger');
                      }
                      
                      $("#response").show();
                      
                      if (!$("li[id^='video-']").length) {
                          window.location = "<?php echo BASE_URL?>/user/dashboard/";
                      }
                  }
              });
          });    
    });
    </script>
    <div id="response" class="alert alert-dismissible" style="display: none;">
        <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
    </div>    
    <?php echo $this->fetch('_user_header'); ?>
                <?php if ($this->videos): echo $this->fetch('_video_list'); ?>
                <nav class="text-center"><ul class="pagination pagination-lg"><?php echo p('pagination'$this->paginationCUR_URL); ?></ul></nav>
                <?php else: ?>
                <div class="none"><?php echo __('no-videos'); ?></div>
                <?php endif; ?>
    <?php echo $this->fetch('_user_footer'); ?>
Онлайн: 2
Реклама