Ejemplo n.º 1
0
    $links->setFileName("/links.php");
    $links->setPage($vars['page'], "page");
    $links->setCatId($vars['cat']);
    $links->setId($vars['id']);
    $linksCat = new LinkCat();
    $linksCat->setFileName("/links.php");
    $linksCat->setPage($vars['page'], "page");
    $linksCat->setId($vars['cat']);
    $Archive->BuildData();
    $links->BuildData();
    $linksCat->BuildData();
    if ($vars['id']) {
        header("location: {$links->getRecords()}");
    } else {
        if ($vars['cat']) {
            $title = "Links : ( {$linksCat->getTitle()} ) Page : " . (1 + $links->getPage()) . " of " . $links->getnumOfRecords();
            $loadFile = "links.tpl";
            $records = $links->getRecords();
            $pageList = $links->getCountDisplay();
        } else {
            $title = "Link Categories : Page : " . (1 + $linksCat->getPage()) . " of " . $linksCat->getnumOfRecords();
            $loadFile = "linkcat.tpl";
            $records = $linksCat->getRecords();
            $pageList = $linksCat->getCountDisplay();
        }
        $smarty->assign(array("title" => "Compubomb.The Development Solutions : Blog & Everything Else", "page_name" => $title, "load" => "links/" . $loadFile, "filename" => $Archive->getFilename(), "archive_index" => $Archive->getArchiveIndex(), "records" => $records, "archive_page_list" => $pageList));
        $smarty->display('public/body/index.tpl');
    }
} catch (Exception $e) {
    print "Exception: " . $e->getMessage();
}
Ejemplo n.º 2
0
<?php

try {
    $linksCat = new LinkCat();
    $Users = new Users();
    $linksCat->setId($vars['id']);
    $linksCat->BuildData();
    $Users->BuildData();
    $smarty->assign(array("page_name" => "Link : Category : Edit", "load" => "links/form/link_categories_edit.tpl", "loadindex" => "links/view/link_index.tpl", "user_list" => $Users->getRecords(), "linkCat_index" => $linksCat->getIndex(), "records" => $linksCat->getRecords()));
    $smarty->display('admin/body/index.tpl');
} catch (Exception $e) {
    print "Exception: " . $e->getMessage();
}