<?php try { $links = new Links(); $links->setFileName("/Admin_Links"); $links->setPage($vars['page'], "page"); $links->setCatId($vars['cat']); $links->setId($vars['id']); $linksCat = new LinkCat(); $links->BuildData(); $linksCat->BuildData(); if ($vars['cat']) { $title = "Links : ( {$linksCat->getTitle($links->getCatId())} ) Page : " . (1 + $links->getPage()) . " of " . $links->getnumOfRecords(); } else { $title = "Link Categories : Page : " . (1 + $linksCat->getPage()) . " of " . $linksCat->getnumOfRecords(); } $smarty->assign(array("page_name" => $title, "load" => "links/view/links.tpl", "loadindex" => "links/view/link_index.tpl", "linkCat_index" => $linksCat->getIndex(), "records" => $links->getRecords(), "page_list" => $links->getCountDisplay())); $smarty->display('admin/body/index.tpl'); } catch (Exception $e) { print "Exception: " . $e->getMessage(); }
<?php define("__ADMIN__", true); try { $links = new Links(); $linksCat = new LinkCat(); $Users = new Users(); $links->setId($vars['id']); $Users->BuildData(); $links->BuildData(); $linksCat->BuildData(); $smarty->assign(array("load" => "links/form/link_edit.tpl", "loadindex" => "links/view/link_index.tpl", "user_list" => $Users->getRecords(), "link_cat_list" => $linksCat->getIndex(), "linkCat_index" => $linksCat->getIndex(), "records" => $links->getRecords())); $smarty->display('admin/body/index.tpl'); } catch (Exception $e) { print "Exception: " . $e->getMessage(); }
<?php define("__ADMIN__", true); try { $linksCat = new LinkCat(); $Users = new Users(); $linksCat->BuildData(); $Users->BuildData(); $smarty->assign(array("page_name" => "Link : Category : New", "load" => "links/form/link_categories_new.tpl", "loadindex" => "links/view/link_index.tpl", "user_list" => $Users->getRecords(), "linkCat_index" => $linksCat->getIndex())); $smarty->display('admin/body/index.tpl'); } catch (Exception $e) { print "Exception: " . $e->getMessage(); }