318 lines
13 KiB
HTML
318 lines
13 KiB
HTML
<h2>Edit User</h2>
|
|
|
|
{assign var='signup_fields' value=$userquery->load_signup_fields($u)}
|
|
{assign var='channel_profile_fields' value=$userquery->load_user_fields($p)}
|
|
|
|
|
|
<form action="" method="post" enctype="multipart/form-data" name="form1" id="form1" class="cbform">
|
|
|
|
<div class="userInfoSettings well">
|
|
<h3>User Info</h3>
|
|
<div class="form-group">
|
|
<label for="uid">User id</label>
|
|
<input class="form-control" disabled="disabled" name="uid" type="text" id="uid" value="{$u.userid}" />
|
|
<input name="userid" type="hidden" id="userid" value="{$u.userid}" size="45" />
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="username">User name</label>
|
|
<input class="form-control" name="username" type="text" id="username" value="{$u.username}" />
|
|
<input name="dusername" type="hidden" id="dusername" value="{$u.username}" />
|
|
<input name="admin_manager" type="hidden" value="yes" />
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="email">Email</label>
|
|
<input class="form-control" name="email" type="text" id="email" value="{$u.email}" />
|
|
<input name="demail" type="hidden" id="demail" value="{$u.email}" />
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="pass">Change password</label>
|
|
<input class="form-control" name="pass" type="text" id="pass" />
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="cpass">Confirm password</label>
|
|
<input class="form-control" name="cpass" type="text" id="cpass" />
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="laevel">User level</label>
|
|
<select class="form-control" name="level" id="level">
|
|
{assign var=levels value=$userquery->get_levels()}
|
|
{foreach from=$levels item=level}
|
|
<option value="{$level.user_level_id}" {if $u.level==$level.user_level_id} selected="selected"{/if}>{$level.user_level_name}</option>
|
|
{/foreach}
|
|
</select>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="country">Country</label>
|
|
<select class="form-control" name="country" id="country">
|
|
{assign var='countries' value=$Cbucket->get_countries(iso2)}
|
|
{foreach from=$countries item=country key=code}
|
|
<option value="{$code}" {if $u.country==$code} selected="selected"{/if}>{$country}</option>
|
|
{/foreach}
|
|
</select>
|
|
</div>
|
|
|
|
|
|
<div class="form-group">
|
|
<h4>Gender</h4>
|
|
<div>
|
|
<label class="radio">
|
|
<input type="radio" name="sex" value="male" id="sex_0" {if $u.sex == male} checked="checked"{/if} />
|
|
Male
|
|
</label>
|
|
<label class="radio">
|
|
<input type="radio" name="sex" value="female" id="sex_1" {if $u.sex == female} checked="checked"{/if}/>
|
|
Female
|
|
</label>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="">Category</label>
|
|
{ANCHOR place=$signup_fields.cat.anchor_before}{$formObj->createField($signup_fields.cat)}{ANCHOR place=$signup_fields.cat.anchor_after}
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="custSignup well">
|
|
{assign var=cust_signup value=$userquery->load_custom_signup_fields($u,true)}
|
|
{if $cust_signup}
|
|
{foreach from=$cust_signup item=field}
|
|
<div class="form-group">
|
|
{$field.class="form-control"}
|
|
<label for="{$field.id}">{$field.title}</label>
|
|
{$field.hint_1}{ANCHOR place=$field.anchor_before}{$formObj->createField($field)}
|
|
{$field.hint_2}
|
|
</div>
|
|
{/foreach}
|
|
{/if}
|
|
</div>
|
|
|
|
|
|
<div class="channelSettings well">
|
|
{foreach from=$channel_profile_fields item=field_group}
|
|
<h3>{$field_group.group_name}</h3>
|
|
{foreach from=$field_group.fields item=field}
|
|
{$field.class='form-control'}
|
|
<div class="form-group">
|
|
<label for="{$field.id}">{$field.title}</label>
|
|
{$field.hint_1}{ANCHOR place=$field.anchor_before}{$formObj->createField($field)}
|
|
{$field.hint_2}
|
|
</div>
|
|
{/foreach}
|
|
{/foreach}
|
|
</div>
|
|
|
|
|
|
<div class="actionsSettings">
|
|
<h2>Actions</h2>
|
|
<h3>User Links</h3>
|
|
|
|
<div class="btn-group">
|
|
<a class="btn btn-primary btn-sm" href="{$userquery->profile_link($u)}">View {$u.username} channel</a>
|
|
<a class="btn btn-primary btn-sm" href="login_as_user.php?uid={$u.userid}">Login as user</a>
|
|
{if $u.usr_status=="Ok"}
|
|
<a class="btn btn-primary btn-sm" href="?uid={$u.userid}&deactivate=yes">Deactivate</a>
|
|
{else}
|
|
<a class="btn btn-primary btn-sm" href="?uid={$u.userid}&activate=yes">Activate</a>
|
|
{/if}
|
|
{if $u.ban_status=="yes"}
|
|
<a class="btn btn-primary btn-sm" href="?uid={$u.userid}&unban=yes">Unban</a>
|
|
{else}
|
|
<a class="btn btn-primary btn-sm" href="?uid={$u.userid}&ban=yes">Ban</a>
|
|
{/if}
|
|
<a class="btn btn-primary btn-sm" href="?uid={$u.userid}&delete=yes">Delete</a>
|
|
<a class="btn btn-primary btn-sm" href="?uid={$u.userid}&delete_vids=yes">Delete Videos</a>
|
|
<a class="btn btn-primary btn-sm" href="?uid={$u.userid}&delete_contacts=yes">Delete Contacts</a>
|
|
<a class="btn btn-primary btn-sm" href="?uid={$u.userid}&delete_pm=yes">Delete Private Messages</a>
|
|
</div>
|
|
|
|
|
|
<div class="userActivity well">
|
|
<h3>User Activity</h3>
|
|
<div class="form-group">
|
|
<label for="dob">Date of birth</label>
|
|
<input class="form-control" name="dob" type="text" id="dob" value="{$u.dob}" />
|
|
YYYY-MM-DD
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="doj">Joined - IP</label>
|
|
<input class="form-control" name="doj" type="text" id="doj" value="{$u.doj}" />
|
|
{$u.signup_ip}
|
|
</div>
|
|
|
|
<p>Last Login - Login IP : {$u.last_logged} - {$u.ip}</p>
|
|
|
|
<p>Last Active - Online : {$u.last_active} - {$u.last_active|is_online}</p>
|
|
|
|
<div class="form-group">
|
|
<label for="profile_hits">Profile Views</label>
|
|
<input class="form-control" name="profile_hits" type="text" id="profile_hits" value="{$u.profile_hits}" />
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="total_watched">Videos Watched</label>
|
|
<input class="form-control" name="total_watched" type="text" id="total_watched" value="{$u.total_watched}" />
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="total_watched2">Videos Watched</label>
|
|
<input class="form-control" name="total_videos" type="text" id="total_watched2" value="{$u.total_videos}" />
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="total_watched3">Comments made</label>
|
|
<input class="form-control" name="total_comments" type="text" id="total_watched3" value="{$u.total_comments}" />
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="comments_count">Profile comments</label>
|
|
<input class="form-control" name="comments_count" type="text" id="comments_count" value="{$u.comments_count}" />
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="tatal_watched4">Profile rating</label>
|
|
<input class="form-control" name="rating" type="text" id="total_watched4" value="{$p.rating}" />
|
|
0-10
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="total_watched5">Profile rated by</label>
|
|
<input class="form-control" name="rated_by" type="text" id="total_watched5" value="{$p.rated_by}" />
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="total_watched6">Subscribers</label>
|
|
<input class="form-control" name="subscribers" type="text" id="total_watched6" value="{$u.subscribers}" />
|
|
</div>
|
|
</div>
|
|
|
|
<div class="recentActivityLog well">
|
|
<h3>Recent Activity Log</h3>
|
|
<table class="table table-bordered table-striped">
|
|
<tr>
|
|
<td width="40" align="center" valign="middle" class="left_head">ID</td>
|
|
<td width="50" class="head_sep_left">UID</td>
|
|
<td width="100" class="head"><div class="head_sep_left" style="width:100px">Username</div></td>
|
|
<td width="100" class="head"><div class="head_sep_left" style="width:100px">Date</div></td>
|
|
<td class="head"><div class="head_sep_left" style="width:100px">Detail</div></td>
|
|
</tr>
|
|
{assign var="logs" value=$userquery->get_user_action_log($u.userid,10)}
|
|
{section loop=$logs name=log}
|
|
<tr>
|
|
<td width="40" align="center" valign="middle" class="">{$logs[log].action_id}</td>
|
|
<td width="50" class="" style="padding-left:10px">{$logs[log].action_userid}</td>
|
|
<td width="100" class="">{$logs[log].action_username}</td>
|
|
<td width="100" class="">{$logs[log].date_added}</td>
|
|
<td>
|
|
Type : {$logs[log].action_type} –{if $logs[log].action_details!=''}{$logs[log].action_details} –{/if} Success : {$logs[log].action_success} – {$logs[log].action_ip}
|
|
</td>
|
|
</tr>
|
|
{sectionelse}
|
|
<!--<tr><td><em>No user action log found</em></td></tr>-->
|
|
{/section}
|
|
</table>
|
|
</div>
|
|
|
|
<div class="useAvatar">
|
|
|
|
<h3>User Avatar and Background</h3>
|
|
|
|
<div class="changeAvatar row well">
|
|
<div class="showAvatar col-md-3">
|
|
<img src="{$userquery->getUserThumb($u)}" class="mid_user_thumb" style="max-width:95px"/><br />
|
|
<input name="delete_avatar" type="checkbox" id="delete_avatar" value="yes" />
|
|
<label for="delete_avatar">Delete This Image - (if user has profile pic)</label>
|
|
</div>
|
|
<div class="uploadNewAvatar col-md-9">
|
|
<div class="form-group">
|
|
<label for="avatar_file">User Avatar/Profile Pic<small>Please select image file</small></label>
|
|
<input class="" type="file" name="avatar_file" id="avatar_file" />
|
|
</div>
|
|
<h4>OR</h4>
|
|
<div class="form-group">
|
|
<label for="avatar_url">Please Enter Image URL</label>
|
|
<input class="form-control" name="avatar_url" type="text" id="avatar_url" value="{$u.avatar_url}" />
|
|
<input type="hidden" name="avatar_file_name" value="{$u.avatar}" />
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label class="radio" for="remove_avatar_url">
|
|
<input name="remove_avatar_url" type="checkbox" id="remove_avatar_url" value="yes" />
|
|
Remote avatar url
|
|
</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="changeBackground row well">
|
|
<h3>User Background Image</h3>
|
|
<div class="showBackground col-md-3">
|
|
{if $userquery->getUserBg($u)}
|
|
<img src="{$userquery->getUserBg($u)}" style="max-width:95px"/>
|
|
{else}
|
|
No Bg
|
|
{/if}
|
|
</div>
|
|
<div class="uploadNewBackground col-md-9">
|
|
<div class="form-group">
|
|
<label for="background_file">Please Select Image File</label>
|
|
<input type="file" name="background_file" id="background_file" />
|
|
</div>
|
|
<h4>OR</h4>
|
|
<div class="form-group">
|
|
<label for="background_url">Please Enter Image URL</label>
|
|
<input class="form-control" name="background_url" type="text" id="background_url" value="{$u.background_url}" />
|
|
</div>
|
|
<h4>OR</h4>
|
|
<div class="form-group">
|
|
<label for="background_color">Please Enter Background Color</label>
|
|
<input class="form-control" name="background_color" type="text" id="background_color" value="{$u.background_color}" />
|
|
</div>
|
|
<h4>OR</h4>
|
|
<div class="form-group">
|
|
<label for="background_repeat">Background Repeat Type (if using image as a background)</label>
|
|
<select class="form-control" name="background_repeat" id="background_repeat" >
|
|
<option value="repeat" {if $u.background_repeat=='repeat'} selected="selected"{/if}>repeat</option>
|
|
<option value="repeat-x" {if $u.background_repeat=='repeat-x'} selected="selected"{/if}>repeat-x</option>
|
|
<option value="repeat-y" {if $u.background_repeat=='repeat-y'} selected="selected"{/if}>repeat-y</option>
|
|
<option value="no-repeat" {if $u.background_repeat=='no-repeat'} selected="selected"{/if}>no-repeat</option>
|
|
</select>
|
|
</div>
|
|
{if $userquery->getUserBg($u)}
|
|
<div>
|
|
<label class="checkbox" for="delete_bg"><input name="delete_bg" type="checkbox" id="delete_bg" value="yes" /><label for="delete_bg">Delete this image</label>
|
|
</div>
|
|
|
|
{/if}
|
|
<input type="hidden" name="bg_file_name" value="{$u.background}" />
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<input class="btn btn-primary" type="submit" name="update_user" id="update_user" value="Submit" />
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{assign var='object_type' value='channel'}
|
|
<script>
|
|
$(document).ready(function()
|
|
{ldelim}
|
|
if(!baseurl){
|
|
var baseurl = "";
|
|
}
|
|
page = baseurl +'/ajax.php';
|
|
//getComments('c','{$u.userid}','{$u.last_commented}',1,'{$u.comments_count}','{$object_type}','yes')
|
|
{rdelim}
|
|
);
|
|
</script>
|
|
|
|
|
|
</form>
|