Вход Регистрация
Файл: adultscript-2.0.3-pro/files/admin/templates/default/player_manage.tpl.php
Строк: 193
<?php defined('_VALID') or die('Restricted Access!'); ?>
    <?php echo $this->fetch('errors'); ?>
    <?php echo $this->fetch('messages'); ?>
    <?php echo $this->fetch('warnings'); ?>
    <link href="<?php echo TPL_REL?>/css/jquery-ui-1.8.16.custom.css" rel="stylesheet" type="text/css" />
    <script src="<?php echo TPL_REL?>/js/jquery-ui-1.8.16.custom.min.js"></script> 
    <script type="text/javascript">
    var lang_question_suspend = "Are you sure you want to suspend this player profile?";
    var lang_question_activate = "Are you sure you want to activate this player profile?";
    var lang_question_delete = "Are you sure you want to delete this player profile?";
    $(document).ready(function() {
        $("a[id^='manage_player_']").click(function(e) {
            e.preventDefault();
            var click_id    = $(this).attr('id');
            var click_arr   = click_id.split('_');
            var action      = click_arr[2];
            var player_id  = click_arr[3];
            if (action == 'suspend') {
                var answer = confirm(lang_question_suspend);
            } else if (action == 'activate') {
                var answer = confirm(lang_question_activate);
            } else if (action == 'delete') {
                var answer = confirm(lang_question_delete);
            }

            if (answer) {
                $("input[name='action']").val(action);
                $("input[name='player_id']").val(player_id);
                $("#manage_player_form").submit();
            }
        });

      $("#dialog-player-adv").dialog({
            autoOpen: false,
            width: 600,
            height: 340,
            buttons: {
                "Update": function() {
                    var args = $("#manage-player-form").serializeArray();
                    $.ajax({
                        url: base_url + '/ajax.php?s=manage_player_default&d=backend',
                        cache: false,
                        type: "POST",
                        dataType: "json",
                        data: {options: $.param(args)}
                    });
                    $(this).dialog('close');
                }
            }
        });

       $("a[id^='manage-adv-']").live('click', function(e) {
            e.preventDefault();
            
            var player_id = $(this).attr('id').match(/manage-adv-(.*)/)[1];

            $.ajax({
                url: base_url + '/ajax.php?s=manage_player_default&d=backend',
                cache: false,
                type: "POST",
                dataType: "json",
                data: {player_id: player_id},
                success: function(response) {
                    $("#dialog-player-adv").html(response.code);
                    $("#dialog-player-adv").dialog('open');
                }
            });
        });        
    });
    </script>    
    <div id="container" class="clearfix">
        <div id="page">
            <?php echo $this->fetch('video_menu'); ?>
            <div class="content clearfix">
                <?php echo $this->fetch('player_menu'); ?>
                <?php if ($this->profiles): ?>
                <form name="manage_player_form" id="manage_player_form" method="post" action="<?php echo CURRENT_URL?>"> 
                    <input name="action" type="hidden" value="" /> 
                    <input name="player_id" type="hidden" value="" /> 
                </form>
                <div id="dialog-player-adv" title="Manage Advertising" style="display: none;"></div>
                <form name="actionsForm" id="actionsForm" method="post" action="<?php echo CURRENT_URL?>">
                <div class="box_menu">
                      <div class="box_menu_left">
                       <select name="action" id="actions_top"> 
                        <option value="suspend">Suspend</option> 
                        <option value="activate">Activate</option> 
                        <option value="delete">Delete</option> 
                        </select> 
                        <input name="submit_actions" type="submit" class="button butDef" value="Go!" />
                    </div>
                    <div class="box_menu_right">
                    </div>
                    <div class="clear"></div>                  
                </div>
                <table cellpadding="0" cellspacing="0" border="0" id="table" class="uiTable">
                    <thead>
                          <tr>
                              <th class="nosort" style="width: 12px; text-align: center;"><input name="checkbox_all" type="checkbox" id="check_all" /></th>
                            <th><h3>Name</h3></th>
                            <th><h3>Description</h3></th>
                            <th><h3>Status</h3></th>
                            <th><h3>Actions</h3></th>
                        </tr>
                    </thead>
                    <tbody>
                          <?php foreach ($this->profiles as $profile):
                          if (
$profile['status'] == '1'):
                              
$status_image 'accept.png';
                            
$status 'suspend';
                        else:
                            
$status_image 'cancel.png';
                            
$status 'activate';
                        endif; 
?>
                          <tr id="row_<?php echo $profile['player_id']; ?>">
                              <td><input name="checkbox_player_<?php echo $profile['player_id']; ?>" type="checkbox" id="checkbox_item_<?php echo $profile['player_id']; ?>" /></td>
                              <td><strong><?php echo e($profile['name']); ?></strong></td>
                              <td><?php echo e($profile['description']); ?></td>
                              <td><a href="#status" id="manage_player_<?php echo $status?>_<?php echo $profile['player_id']; ?>" title="Click to <?php if ($profile['status'] == '0'): echo 'activate'; else: echo 'suspend'; endif; ?> this player profile!"><img src="<?php echo TPL_REL?>/images/<?php echo $status_image?>" /></a></td>
                              <td>
                                  <a href="<?php echo ADMIN_URL?>/index.php?q=player/edit&amp;id=<?php echo $profile['player_id']; ?>"><img src="<?php echo TPL_REL?>/images/application_edit.png" alt="Edit" /></a>&nbsp;
                                <a href="#delete" id="manage_player_delete_<?php echo $profile['player_id']; ?>" title="Click to delete this player profile!"><img src="<?php echo TPL_REL?>/images/application_delete.png" alt="Delete" /></a>
                                <a href="#manage_player" id="manage-adv-<?php echo $profile['player_id']; ?>" title="Manage Player Advertising"><img src="<?php echo TPL_REL?>/images/shape_square_edit.png" alt="" /></a>
                              </td>
                          </tr>
                          <?php endforeach; ?>
                    </tbody>
                </table>
                <div class="box_menu">
                      <div class="box_menu_left">
                       <select name="action" id="actions_bottom"> 
                        <option value="suspend">Suspend</option> 
                        <option value="activate">Activate</option> 
                        <option value="delete">Delete</option> 
                        </select> 
                        <input name="submit_actions" type="submit" class="button butDef" value="Go!" />
                    </div>
                    <div class="box_menu_right">
                    </div>
                    <div class="clear"></div>                  
                </div>
                </form>
                <?php else: ?>
                <div class="none">No player profiles found!</div>
                <?php endif; ?>
            </div>
               <div class="legend">
                    <img src="<?php echo TPL_REL?>/images/application_edit.png" alt="profile_edit" /> Edit Profile &nbsp;
                    <img src="<?php echo TPL_REL?>/images/application_delete.png" alt="profile_delete" /> Delete Profile &nbsp;
                    <img src="<?php echo TPL_REL?>/images/shape_square_edit.png" alt="shape square edit" /> Manage Advertising &nbsp;
                    <img src="<?php echo TPL_REL?>/images/accept.png" alt="accept" /> Active - Action Suspend &nbsp;
                    <img src="<?php echo TPL_REL?>/images/cancel.png" alt="cancel" /> Suspended - Action Activate
                </div>
        </div>
    </div>
Онлайн: 0
Реклама