|
|
|
|
@ -29,45 +29,51 @@ if (isset($_REQUEST['id'])) { |
|
|
|
|
exit; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Display::display_header(); |
|
|
|
|
|
|
|
|
|
?> |
|
|
|
|
$content = ' |
|
|
|
|
<form action="./index.php" method="post"> |
|
|
|
|
<div class="table-responsive well"> |
|
|
|
|
<table class="table table-condensed"> |
|
|
|
|
<thead> |
|
|
|
|
<td><input type="text" class="form-control" placeholder="User Id" name="user_id"/></td> |
|
|
|
|
<td><input type="text" class="form-control" placeholder="URL" name="url"/></td> |
|
|
|
|
<td><input type='submit' value='Add' name="submit_button" class='btn btn-primary'/></td> |
|
|
|
|
<td><input type=\'submit\' value=\'Add\' name="submit_button" class=\'btn btn-primary\'/></td> |
|
|
|
|
</thead> |
|
|
|
|
</table> |
|
|
|
|
</div> |
|
|
|
|
</form> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="table-responsive"> |
|
|
|
|
<table class="table table-bordered table-condensed"> |
|
|
|
|
<tr> |
|
|
|
|
<th>User</th> |
|
|
|
|
<th>URL</th> |
|
|
|
|
<th></th> |
|
|
|
|
</tr> |
|
|
|
|
<?php |
|
|
|
|
foreach ($list as $item) { |
|
|
|
|
$userInfo = api_get_user_info($item['user_id']); |
|
|
|
|
$userName = get_lang('Unknown'); |
|
|
|
|
if (!empty($userInfo)) { |
|
|
|
|
$userName = $userInfo['complete_name_with_username'].' - '.$item['user_id']; |
|
|
|
|
} |
|
|
|
|
echo '<tr>'; |
|
|
|
|
echo '<td>'.$userName.'</td>'; |
|
|
|
|
echo '<td>'.$item['url'].'</td>'; |
|
|
|
|
echo '<td><a class="btn btn-danger" href="index.php?id='.$item['id'].'">Delete</a></td>'; |
|
|
|
|
echo '</tr>'; |
|
|
|
|
} |
|
|
|
|
?> |
|
|
|
|
</table> |
|
|
|
|
</div> |
|
|
|
|
<?php |
|
|
|
|
</tr> |
|
|
|
|
'; |
|
|
|
|
|
|
|
|
|
foreach ($list as $item) { |
|
|
|
|
$userInfo = api_get_user_info($item['user_id']); |
|
|
|
|
$userName = get_lang('Unknown'); |
|
|
|
|
if (!empty($userInfo)) { |
|
|
|
|
$userName = $userInfo['complete_name_with_username'].' - '.$item['user_id']; |
|
|
|
|
} |
|
|
|
|
$content.= '<tr>'; |
|
|
|
|
$content.= '<td>'.$userName.'</td>'; |
|
|
|
|
$content.= '<td>'.$item['url'].'</td>'; |
|
|
|
|
$content.= '<td><a class="btn btn-danger" href="index.php?id='.$item['id'].'">Delete</a></td>'; |
|
|
|
|
$content.= '</tr>'; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$content.= ' |
|
|
|
|
</table> |
|
|
|
|
</div>'; |
|
|
|
|
|
|
|
|
|
Display::display_footer(); |
|
|
|
|
$tpl = new Template( |
|
|
|
|
'', |
|
|
|
|
true, |
|
|
|
|
true, |
|
|
|
|
false, |
|
|
|
|
false, |
|
|
|
|
false |
|
|
|
|
); |
|
|
|
|
$tpl->assign('content', $content); |
|
|
|
|
$tpl->display_one_col_template(); |
|
|
|
|
|