2014-01-21 13:17:50 +00:00
{if $mode=='view'}
2014-05-09 10:34:00 +00:00
< div class = "heading" >
< h2 > Flagged Users Manager< / h2 >
< / div >
2014-01-21 13:17:50 +00:00
<!-- DIsplaying Videos -->
< form name = "flagged_video" method = "post" id = "flagged_video" >
< div class = "btn-group" >
2014-02-28 12:07:42 +00:00
< input class = "btn btn-primary btn-xs" type = "submit" name = "activate_selected" value = "Activate" / >
< input class = "btn btn-primary btn-xs" type = "submit" name = "deactivate_selected" value = "Deactivate" / >
< input class = "btn btn-primary btn-xs" type = "submit" name = "delete_selected" value = "Delete Users" onclick = "return _cb.confirm_it('Are you sure you want to delete these users(s)')" / >
< input class = "btn btn-primary btn-xs" type = "submit" name = "delete_flags" value = "Delete Flags" onclick = "return _cb.confirm_it('Are you sure you want to delete flags of selected users(s)')" / >
2014-01-21 13:17:50 +00:00
< / div >
2014-01-22 10:32:50 +00:00
{if $users}
< table class = "table table-bordered table-striped" >
< tr >
2014-02-04 14:08:41 +00:00
< td >
2014-02-12 13:10:18 +00:00
< input type = "checkbox" name = "checkall" onclick = "_cb.checkUncheckAll(this);" / > < / td >
2014-02-04 14:08:41 +00:00
< td > UID< / td >
< td > User Details< / td >
< td > Options< / td >
2014-01-22 10:32:50 +00:00
< / tr >
2014-01-21 13:17:50 +00:00
{foreach from=$users item=u}
< tr >
2014-02-04 14:08:41 +00:00
< td >
2014-01-21 13:17:50 +00:00
< input name = "check_user[]" type = "checkbox" id = "check_user" value = "{$u.userid}" / >
< / td >
2014-02-04 14:08:41 +00:00
< td > {$u.userid}< / td >
< td >
< div class = "row" >
< div class = "col-md-10" >
< div class = "row" >
< div class = "col-md-3" >
2014-02-28 12:07:42 +00:00
< a href = "view_user.php?uid={$u.userid}" >
2014-02-04 14:08:41 +00:00
< img src = "{$userquery->getUserThumb($u,'small')}" class = "img-thumbnail oneUserImage pull-left" / >
2014-02-28 12:07:42 +00:00
< / a >
2014-02-04 14:08:41 +00:00
< / div >
< div class = "col-md-9" >
< a href = "{$userquery->profile_link($u)}" target = "_blank" class = "oneUserName" > {$u.username}< / a >
< span > {$u.email}< / span >
< div class = "labels" >
2014-03-04 10:26:05 +00:00
< span class = "label {if $u.usr_status=='Ok'}label-success{else}label-warning{/if}" >
{if $u.usr_status=='Ok'}Active{else}InActive{/if} < / span >
2014-02-04 14:08:41 +00:00
< span class = "label label-info" > < span > {$u.level|get_user_level}< / span > < / span >
2014-02-28 12:07:42 +00:00
< span class = "label" > < span > Last Active < / span > {$u.last_active|niceTime}< / span >
< a href = "?mode=view_flags&uid={$u.userid}" > < span class = "label label-info" > < span > Flags< / span > :< span > {$u.flag_type}< / span > < / span >
< / a >
2014-02-04 14:08:41 +00:00
< / div >
< / div >
< / div >
< / div >
2014-01-21 13:17:50 +00:00
< / div >
2014-01-22 10:32:50 +00:00
< / td >
2014-01-21 13:17:50 +00:00
< td >
< div class = "dropdown" >
< button id = "dropdownMenu1" class = "btn btn-primary btn-xs dropdown-toggle" data-toggle = "dropdown" > Actions< i class = "icon-angle-down icon-on-right" > < / i > < / button >
< ul class = "dropdown-menu addCategoryActions" aria-labelledby = "dropdownMenu1" role = "menu" >
< li role = "presentation" >
< a role = "menuitem" tabindex = "-1" href = "view_user.php?uid={$u.userid}" > View< / a >
< / li >
< li role = "presentation" >
< a role = "menuitem" tabindex = "-1" href = "view_user.php?uid={$u.userid}" > Edit< / a >
< / li >
{if $u.usr_status == Ok}
< li role = "presentation" >
< a role = "menuitem" tabindex = "-1" href = "?deactivate={$u.userid}" > Deactivate< / a >
< / li >
{elseif $u.usr_status == ToActivate}
< li role = "presentation" >
< a role = "menuitem" tabindex = "-1" href = "?activate={$u.userid}" > Activate< / a >
< / li >
{/if}
< li role = "presentation" >
< a role = "menuitem" tabindex = "-1" href = "?mode=view_flags&uid={$u.userid}" > View Flags< / a >
< / li >
< li role = "presentation" >
< a role = "menuitem" tabindex = "-1" href = "?delete_flags={$u.userid}" > Delete flags< / a >
< / li >
< / ul >
< / div >
< / td >
< / tr >
{/foreach}
< / table >
{else}
< div align = "center" > < strong > < em > NO USER FOUND< / em > < / strong > < / div >
{/if}
< div class = "btn-group" >
2014-02-28 12:07:42 +00:00
< input class = "btn btn-primary btn-xs" type = "submit" name = "activate_selected" value = "Activate" / >
< input class = "btn btn-primary btn-xs" type = "submit" name = "deactivate_selected" value = "Deactivate" / >
< input class = "btn btn-primary btn-xs" type = "submit" name = "delete_selected" value = "Delete Users" onclick = "return _cb.confirm_it('Are you sure you want to delete these users(s)')" / >
< input class = "btn btn-primary btn-xs" type = "submit" name = "delete_flags" value = "Delete Flags" onclick = "return _cb.confirm_it('Are you sure you want to delete flags of selected users(s)')" / >
2014-01-21 13:17:50 +00:00
< / div >
< / form >
<!-- DIsplaying Videos Ends -->
{include file="$style_dir/blocks/pagination.html" }
{/if}
{if $mode=='view_flags'}
2014-05-09 10:34:00 +00:00
< div class = "heading" >
< h2 > Viewing {$user.username} flags< / h2 >
< / div >
2014-02-04 14:08:41 +00:00
< div class = "dropdown pull-right" >
< button id = "dropdownMenu1" class = "btn btn-primary btn-xs dropdown-toggle" data-toggle = "dropdown" >
Actions < i class = "caret" > < / i > < / button >
< ul class = "dropdown-menu" aria-labelledby = "dropdownMenu1" role = "menu" >
< li > < a role = "menuitem" tabindex = "-1" href = "view_user.php?uid={$user.userid}" > View User< / a > < / li >
< li > < a role = "menuitem" tabindex = "-1" href = "view_user.php?uid={$user.userid}" > Edit User< / a > < / li >
< li > < a role = "menuitem" tabindex = "-1" href = "?delete_flags={$user.userid}" > Delete Flags< / a > < / li >
2014-02-28 12:07:42 +00:00
< li > < a role = "menuitem" tabindex = "-1" href = "?delete_user={$user.user}" > Delete User< / a > < / li >
2014-02-04 14:08:41 +00:00
< / ul >
< / div > < br > < br >
2014-01-21 13:17:50 +00:00
< div style = "margin-bottom:10px" > < / div >
<!-- DIsplaying Videos -->
< form name = "video_manage" method = "post" >
< table class = "table table-bordered border-striped" >
< tr >
2014-02-04 14:08:41 +00:00
< td > FId< / td >
< td > Flag Details< / td >
2014-01-21 13:17:50 +00:00
< / tr >
{assign var = bgcolor value = ""}
{section name=list loop=$flags}
2014-02-04 14:08:41 +00:00
< tr >
< td > {$smarty.section.list.iteration}< / td >
< td > Reported as "{$flags[list].flag_type|flag_type}" by < strong > {$flags[list].userid|get_username}< / strong > {$flags[list].date_added|niceTime}< / td >
2014-01-21 13:17:50 +00:00
< / tr >
{/section}
< / table >
< / form >
2014-02-28 12:07:42 +00:00
{/if}
< script >
function time_elapsed_string($datetime, $full = false) {
$now = new DateTime;
$ago = new DateTime($datetime);
$diff = $now->diff($ago);
$diff->w = floor($diff->d / 7);
$diff->d -= $diff->w * 7;
$string = array(
'y' => 'year',
'm' => 'month',
'w' => 'week',
'd' => 'day',
'h' => 'hour',
'i' => 'minute',
's' => 'second',
);
foreach ($string as $k => & $v) {
if ($diff->$k) {
$v = $diff->$k . ' ' . $v . ($diff->$k > 1 ? 's' : '');
} else {
unset($string[$k]);
}
}
if (!$full) $string = array_slice($string, 0, 1);
return $string ? implode(', ', $string) . ' ago' : 'just now';
}
< / script >