Skip to content
Permalink
Browse files

Migrate crumbs to a function

  • Loading branch information...
Quy committed Feb 22, 2019
1 parent 0d5f068 commit 25100e6d1f3ca4c2f0048cd4be6cbf911d6f7f39
Showing with 24 additions and 30 deletions.
  1. +24 −30 admin_users.php
@@ -40,18 +40,20 @@
// Generate paging links
$paging_links = '<span class="pages-label">'.$lang_common['Pages'].' </span>'.paginate($num_pages, $p, 'admin_users.php?ip_stats='.$ip_stats );
$crumbs = generate_crumbs(array(
array($lang_admin_common['Admin'].' '.$lang_admin_common['Index'], 'admin_index.php'),
array($lang_admin_common['Users'], 'admin_users.php'),
$lang_admin_users['Results head'],
));
$page_title = array(pun_htmlspecialchars($pun_config['o_board_title']), $lang_admin_common['Admin'], $lang_admin_common['Users'], $lang_admin_users['Results head']);
define('PUN_ACTIVE_PAGE', 'admin');
require PUN_ROOT.'header.php';
?>
<div class="linkst">
<div class="inbox crumbsplus">
<ul class="crumbs">
<li><a href="admin_index.php"><?php echo $lang_admin_common['Admin'].' '.$lang_admin_common['Index'] ?></a></li>
<li><span&#160;</span><a href="admin_users.php"><?php echo $lang_admin_common['Users'] ?></a></li>
<li><span&#160;</span><strong><?php echo $lang_admin_users['Results head'] ?></strong></li>
</ul>
<?php echo $crumbs ?>
<div class="pagepost">
<p class="pagelink"><?php echo $paging_links ?></p>
</div>
@@ -107,11 +109,7 @@
<div class="pagepost">
<p class="pagelink"><?php echo $paging_links ?></p>
</div>
<ul class="crumbs">
<li><a href="admin_index.php"><?php echo $lang_admin_common['Admin'].' '.$lang_admin_common['Index'] ?></a></li>
<li><span&#160;</span><a href="admin_users.php"><?php echo $lang_admin_common['Users'] ?></a></li>
<li><span&#160;</span><strong><?php echo $lang_admin_users['Results head'] ?></strong></li>
</ul>
<?php echo $crumbs ?>
<div class="clearer"></div>
</div>
</div>
@@ -141,18 +139,20 @@
// Generate paging links
$paging_links = '<span class="pages-label">'.$lang_common['Pages'].' </span>'.paginate($num_pages, $p, 'admin_users.php?show_users='.$ip);
$crumbs = generate_crumbs(array(
array($lang_admin_common['Admin'].' '.$lang_admin_common['Index'], 'admin_index.php'),
array($lang_admin_common['Users'], 'admin_users.php'),
$lang_admin_users['Results head'],
));
$page_title = array(pun_htmlspecialchars($pun_config['o_board_title']), $lang_admin_common['Admin'], $lang_admin_common['Users'], $lang_admin_users['Results head']);
define('PUN_ACTIVE_PAGE', 'admin');
require PUN_ROOT.'header.php';
?>
<div class="linkst">
<div class="inbox crumbsplus">
<ul class="crumbs">
<li><a href="admin_index.php"><?php echo $lang_admin_common['Admin'].' '.$lang_admin_common['Index'] ?></a></li>
<li><span&#160;</span><a href="admin_users.php"><?php echo $lang_admin_common['Users'] ?></a></li>
<li><span&#160;</span><strong><?php echo $lang_admin_users['Results head'] ?></strong></li>
</ul>
<?php echo $crumbs ?>
<div class="pagepost">
<p class="pagelink"><?php echo $paging_links ?></p>
</div>
@@ -248,11 +248,7 @@
<div class="pagepost">
<p class="pagelink"><?php echo $paging_links ?></p>
</div>
<ul class="crumbs">
<li><a href="admin_index.php"><?php echo $lang_admin_common['Admin'].' '.$lang_admin_common['Index'] ?></a></li>
<li><span&#160;</span><a href="admin_users.php"><?php echo $lang_admin_common['Users'] ?></a></li>
<li><span&#160;</span><strong><?php echo $lang_admin_users['Results head'] ?></strong></li>
</ul>
<?php echo $crumbs ?>
<div class="clearer"></div>
</div>
</div>
@@ -812,6 +808,12 @@
$can_ban = $pun_user['g_id'] == PUN_ADMIN || ($pun_user['g_moderator'] == '1' && $pun_user['g_mod_ban_users'] == '1');
$can_action = ($can_delete || $can_ban || $can_move) && $num_users > 0;
$crumbs = generate_crumbs(array(
array($lang_admin_common['Admin'].' '.$lang_admin_common['Index'], 'admin_index.php'),
array($lang_admin_common['Users'], 'admin_users.php'),
$lang_admin_users['Results head'],
));
$page_title = array(pun_htmlspecialchars($pun_config['o_board_title']), $lang_admin_common['Admin'], $lang_admin_common['Users'], $lang_admin_users['Results head']);
$page_head = array('js' => '<script type="text/javascript" src="common.js"></script>');
define('PUN_ACTIVE_PAGE', 'admin');
@@ -820,11 +822,7 @@
?>
<div class="linkst">
<div class="inbox crumbsplus">
<ul class="crumbs">
<li><a href="admin_index.php"><?php echo $lang_admin_common['Admin'].' '.$lang_admin_common['Index'] ?></a></li>
<li><span&#160;</span><a href="admin_users.php"><?php echo $lang_admin_common['Users'] ?></a></li>
<li><span&#160;</span><strong><?php echo $lang_admin_users['Results head'] ?></strong></li>
</ul>
<?php echo $crumbs ?>
<div class="pagepost">
<p class="pagelink"><?php echo $paging_links ?></p>
</div>
@@ -899,11 +897,7 @@
<?php if ($can_action): ?> <p class="conr modbuttons"><a href="#" onclick="return select_checkboxes('search-users-form', this, '<?php echo $lang_admin_users['Unselect all'] ?>')"><?php echo $lang_admin_users['Select all'] ?></a> <?php if ($can_ban) : ?><input type="submit" name="ban_users" value="<?php echo $lang_admin_users['Ban'] ?>" /><?php endif; if ($can_delete) : ?><input type="submit" name="delete_users" value="<?php echo $lang_admin_users['Delete'] ?>" /><?php endif; if ($can_move) : ?><input type="submit" name="move_users" value="<?php echo $lang_admin_users['Change group'] ?>" /><?php endif; ?></p>
<?php endif; ?>
</div>
<ul class="crumbs">
<li><a href="admin_index.php"><?php echo $lang_admin_common['Admin'].' '.$lang_admin_common['Index'] ?></a></li>
<li><span&#160;</span><a href="admin_users.php"><?php echo $lang_admin_common['Users'] ?></a></li>
<li><span&#160;</span><strong><?php echo $lang_admin_users['Results head'] ?></strong></li>
</ul>
<?php echo $crumbs ?>
<div class="clearer"></div>
</div>
</div>

0 comments on commit 25100e6

Please sign in to comment.
You can’t perform that action at this time.