From 00586f1e8ada8f5baa6e3013525862dccac77b4a Mon Sep 17 00:00:00 2001 From: Starla Insigna Date: Mon, 17 Aug 2009 15:52:44 -0400 Subject: Added new files from previous commit --- admin/links.php | 114 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 admin/links.php (limited to 'admin/links.php') diff --git a/admin/links.php b/admin/links.php new file mode 100644 index 0000000..d1ab878 --- /dev/null +++ b/admin/links.php @@ -0,0 +1,114 @@ +add('TITLE', 'Manage Affiliates'); +} else if ($type == 'webprojs') +{ + $template->add('TITLE', 'Manage Website Projects'); +} + +$getlinks = "SELECT * FROM links WHERE type = \"" . mysql_real_escape_string($type) . "\" ORDER BY id ASC"; +$getlinks2 = mysql_query($getlinks); +$i=0; +while ($getlinks3[$i] = mysql_fetch_array($getlinks2)) +{ + $i++; +} + +if ($i != 0) +{ + $template->adds_block('AVAIL',array('exi'=>1)); +} else { + $template->adds_block('NOTAVAIL',array('exi'=>1)); +} + +$pager = &Pager::factory(array( 'mode' => 'Sliding', + 'perPage' => 20, + 'delta' => 2, + 'itemData' => $getlinks3)); + +$j=0; + +foreach ($pager->getPageData() as $link) +{ + if (!empty($link)) + { + $template->adds_block('LINK', array( 'TITLE' => $link['title'], + 'URL' => $link['url'], + 'ID' => $link['id'], + 'ODD' => ($j % 2 ? '' : ' class="odd"'))); + } + + $j++; +} + +$template->add('PAGEID', $pager->getCurrentPageID()); +$template->add('PAGINATION', $pager->links); + +$template->display(); + +?> -- cgit 1.4.1