Created
October 2, 2009 02:56
-
-
Save johnduhart/199430 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function page_admin_sets($page=1) { | |
if(!check_auth('login')) { | |
return page_deny(); | |
} | |
$title = "Sets - ACP"; | |
$total = mysql_fetch_array(mysql_query("SELECT COUNT(*) AS total FROM sets")); | |
$total = $total['total']; | |
$pages = ceil($total / 20); | |
$start = ($page - 1) * 20; | |
$q = 'SELECT * FROM sets ORDER BY `id` DESC LIMIT '.$start.', 20'; | |
$r = mysql_query($q); | |
$page_links = ""; | |
for($i = 1; $i <= $pages; $i++) { | |
if($i == $page) { | |
$page_links .= "<strong>".$i."</strong> "; | |
} else { | |
$page_links .= "<a href=\"".getUrl('admin/sets/p/'.$i)."\">".$i."</a> "; | |
} | |
} | |
include("pages/header.temp.php"); | |
include("pages/admin.sets.temp.php"); | |
include("pages/footer.temp.php"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment