Вход Регистрация
Файл: adultscript-2.0.3-pro/files/admin/templates/default/user_manage.tpl.php
Строк: 252
<?php defined('_VALID') or die('Restricted Access!'); ?>
    <?php echo $this->fetch('errors'); ?>
    <?php echo $this->fetch('messages'); ?>
    <?php echo $this->fetch('warnings'); ?>
    <script type="text/javascript"> 
    var lang_question_suspend = "Are you sure you want to suspend this user?"; 
    var lang_question_activate = "Are you sure you want to activate this user?"; 
    var lang_question_delete = "Are you sure you want to delete this user?"; 
    $(document).ready(function() { 
        $("a[id^='manage_user_']").click(function(e) { 
            e.preventDefault(); 
            var click_id    = $(this).attr('id'); 
            var click_arr   = click_id.split('_'); 
            var action      = click_arr[2]; 
            var user_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='user_id']").val(user_id); 
                $("#manage_user_form").submit(); 
            } 
        }); 
    }); 
    </script>
    <div id="container" class="clearfix">
        <div id="page">
            <?php echo $this->fetch('user_menu'); ?>
            <div class="content clearfix">
                <?php echo $this->fetch('user_manage_menu'); ?>
                <?php echo $this->fetch('user_search'); ?>
                <?php if ($this->users): ?>
                <form name="manage_user_form" id="manage_user_form" method="post" action="<?php echo CURRENT_URL?>"> 
                    <input name="action" type="hidden" value="" /> 
                    <input name="user_id" type="hidden" value="" /> 
                </form> 
                <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 class="barNav clearfix">Found <strong><?php echo $this->pagination['total_items']; ?></strong> users, displaying page <strong><?php echo $this->pagination['page']; ?></strong> of <strong><?php echo $this->pagination['total_pages']; ?></strong> <strong>&middot;</strong> <?php echo p('pagination'$this->paginationCURRENT_URL); ?></div> 
                    </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>Username</h3></th>
                            <th><h3>Group</h3></th>
                            <th><h3>Name</h3></th>
                            <th><h3>Videos</h3></th>
                            <th><h3>Last Login</h3></th>
                            <th><h3>Status</h3></th>
                            <th><h3>Actions</h3></th>
                        </tr>
                    </thead>
                    <tbody>
                          <?php $count count($this->users);
                          foreach (
$this->users as $user):
                          if (
$user['status'] == '1'):
                              
$status_image 'accept.png';
                            
$status 'suspend';
                        else:
                            
$status_image 'cancel.png';
                            
$status 'activate';
                        endif; 
?>
                          <tr id="row_<?php echo $user['user_id']; ?>"<?php if ($user['group_name'] == 'Premium'): echo' style="background: #CCCCCC;"'; endif; ?>>
                              <td><input name="checkbox_user_<?php echo $user['user_id']; ?>" type="checkbox" id="checkbox_item_<?php echo $user['user_id']; ?>" /></td>
                              <td>
                                  <strong><a href="<?php echo ADMIN_URL?>/index.php?q=user/view&amp;id=<?php echo $user['user_id']; ?>"><?php echo $user['username']; ?><br />
                                  <img src="<?php echo MEDIA_URL?>/users/<?php if ($user['avatar'] != ''): echo $user['user_id'],'.',$user['avatar'],'?',rand(0,100); else: echo 'nopic-',$user['gender'],'.gif'; endif; ?>" width="65" alt="" /></a></strong>
                              </td>
                              <td>
                                  <a href="<?php echo ADMIN_URL?>/index.php?q=user/manage&amp;g=<?php echo $user['group_id']; ?>"><strong><?php echo e($user['group_name']); ?></strong></a>
                                  <?php if (VModule::enabled('premium') && $user['group_name'] == 'Premium'): ?>
                                  <br /><br />
                                  Start: <strong><?php echo $user['start_date']; ?></strong><br />
                                  End: <strong><?php echo $user['end_date']; ?></strong><br />
                                  Credit: <strong><?php echo $user['credit']; ?></strong><br />
                                  Status: <strong><?php if ($user['pstatus'] == '1'): echo 'Active'; else: echo 'Not Active'; endif; ?></strong>
                                  <?php endif; ?>
                              </td>
                              <td><?php echo e($user['name']); ?></td>
                              <td><strong><a href="<?php echo ADMIN_URL?>/index.php?q=video/manage&amp;u=<?php echo e($user['username']); ?>"><?php echo $user['total_videos']; ?></a></strong></td>
                              <td><strong><?php if ($user['login_date'] == '' OR $user['login_ip'] == '0'): echo 'never'; else: echo VDate::nice($user['login_date']); ?></strong> from <strong><?php echo long2ip($user['login_ip']); endif; ?></strong></td>
                              <td><a href="#status" id="manage_user_<?php echo $status?>_<?php echo $user['user_id']; ?>" title="Click to <?php if ($user['status'] == '0'): echo 'activate'; else: echo 'suspend'; endif; ?> this user!"><img src="<?php echo TPL_REL?>/images/<?php echo $status_image?>" /></a></td>
                              <td>
                                  <a href="<?php echo ADMIN_URL?>/index.php?q=user/view&amp;id=<?php echo $user['user_id']; ?>" title="Click to view user details"><img src="<?php echo TPL_REL?>/images/user.png" alt="Alt" /></a>&nbsp;
                                  <a href="<?php echo BASE_URL?>/users/<?php echo e($user['username']); ?>/" target="_blank" title="Click to view this user's profile!"><img src="<?php echo TPL_REL?>/images/user_go.png" alt="" /></a>&nbsp
                                  <a href="<?php echo ADMIN_URL?>/index.php?q=user/edit&amp;id=<?php echo $user['user_id']; ?>" id="edit_user_<?php echo $user['user_id']; ?>"><img src="<?php echo TPL_REL?>/images/user_edit.png" alt="Edit" /></a>&nbsp;
                                <a href="#delete" id="manage_user_delete_<?php echo $user['user_id']; ?>" title="Click to delete this user!"><img src="<?php echo TPL_REL?>/images/user_delete.png" alt="Delete" /></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 class="barNav clearfix">Found <strong><?php echo $this->pagination['total_items']; ?></strong> users, displaying page <strong><?php echo $this->pagination['page']; ?></strong> of <strong><?php echo $this->pagination['total_pages']; ?></strong> <strong>&middot;</strong> <?php echo p('pagination'$this->paginationCURRENT_URL); ?></div> 
                    </div> 
                    <div class="clear"></div> 
                </div>
                </form>
                <?php else: ?>
                <div class="none">No users found!</div>
                <?php endif; ?>
            </div>
               <div class="legend">
                    <img src="<?php echo TPL_REL?>/images/user.png" alt="link_view" /> View User &nbsp;
                    <img src="<?php echo TPL_REL?>/images/user_go.png" alt="" />View User Profile &nbsp;
                    <img src="<?php echo TPL_REL?>/images/user_edit.png" alt="user_edit" /> Edit User &nbsp;
                    <img src="<?php echo TPL_REL?>/images/user_delete.png" alt="user_delete" /> Delete User &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
Реклама