<?php try { $users = new Users(); $users->setId($vars['id']); $userCategories = new UserCategories(); $users->BuildData(); $userCategories->BuildData(); $smarty->assign(array("page_name" => "User : Edit", "load" => "users/form/user_edit.tpl", "loadindex" => "users/view/user_index.tpl", "userCat_index" => $userCategories->getIndex(), "records" => $users->getRecords())); $smarty->display('admin/body/index.tpl'); } catch (Exception $e) { print "Exception: " . $e->getMessage(); }
<?php try { $users = new Users(); $userCategories = new UserCategories(); $users->BuildData(); $userCategories->BuildData(); $smarty->assign(array("page_name" => "User : Category : New", "load" => "users/form/user_categories_new.tpl", "loadindex" => "users/view/user_index.tpl", "userCat_index" => $userCategories->getIndex(), "user_list" => $users->getRecords())); $smarty->display('admin/body/index.tpl'); } catch (Exception $e) { print "Exception: " . $e->getMessage(); }
<?php try { $users = new Users(); $users->setPage($vars['page'], "page"); $users->setFilename("/Admin_Users"); $users->setUserLevel($vars['cat']); $userCategories = new UserCategories(); $users->BuildData(); $userCategories->BuildData(); if ($_GET['cat']) { $title = " Users : ( {$userCategories->getTitle($users->getUserLevel())} ) : Page : " . (1 + $users->getPage()) . " of " . $users->getnumOfRecords(); } else { $title = " Users : Page : " . (1 + $users->getPage()) . " of " . $users->getnumOfRecords(); } $smarty->assign(array("page_name" => $title, "load" => "users/view/users.tpl", "loadindex" => "users/view/user_index.tpl", "userCat_index" => $userCategories->getIndex(), "records" => $users->getRecords(), "page_list" => $users->getCountDisplay())); $smarty->display('admin/body/index.tpl'); } catch (Exception $e) { print "Exception: " . $e->getMessage(); }
<?php try { $userCategories = new UserCategories(); $userCategories->BuildData(); $smarty->assign(array("page_name" => "User : New", "load" => "users/form/user_new.tpl", "loadindex" => "users/view/user_index.tpl", "userCat_index" => $userCategories->getIndex())); $smarty->display('admin/body/index.tpl'); } catch (Exception $e) { print "Exception: " . $e->getMessage(); }