コード例 #1
0
ファイル: LinkEdit.php プロジェクト: robertkraig/mycms
<?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();
}
コード例 #2
0
ファイル: Links.php プロジェクト: robertkraig/mycms
<?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();
}
コード例 #3
0
     $Archive->setPublic(1);
 }
 $links = new Links();
 $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 &amp; 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');
 }
コード例 #4
0
ファイル: LinkCategories.php プロジェクト: robertkraig/mycms
 $links->setCatId($vars['cat']);
 $links->setId($vars['url']);
 if (!$_SESSION['login']) {
     $Archive->setPublic(1);
 }
 $linksCat = new LinkCat();
 $linksCat->setFileName("/LinkCategories");
 if (!$vars['cat']) {
     $linksCat->setPage($vars['page'], "page");
 }
 $linksCat->setId($vars['cat']);
 $Archive->BuildData();
 $links->BuildData();
 $linksCat->BuildData();
 if ($vars['url']) {
     if (is_array($row = $links->getRecords())) {
         foreach ($row as $info) {
             $url = $info['link_url'];
         }
         header("location: {$url}");
     }
 } else {
     if ($vars['cat']) {
         $title = "Links : ( {$linksCat->getTitle($links->getCatId())} ) 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();