Example #1
0
* Settings
* 
* @since 2004-07-03
* @author Christian Ehret <*****@*****.**> 
*/
$smartyType = "www";
include_once "../includes/default.inc.php";
$auth->is_authenticated();
include_once 'articleclass.inc.php';
$article = new Article();
$smarty->assign("tpl_title", "Artikel verwalten");
$smarty->assign('tpl_nav', 'settings');
$smarty->assign('tpl_subnav', 'syssettings');
$smarty->assign('tpl_subnav2', 'article');
if ($request->GetVar('frm_articleid', 'post') !== $request->undefined) {
    if ($request->GetVar('frm_action', 'post') == 'edit') {
        $smarty->assign('tpl_editid', $request->GetVar('frm_articleid', 'post'));
    } else {
        if ($request->GetVar('frm_action', 'post') == 'addnew') {
            $smarty->assign('tpl_addnew', 'true');
        } else {
            if ($request->GetVar('frm_action', 'post') == 'del') {
                $article->del($request->GetVar('frm_articleid', 'post'));
            } else {
                $check = $article->saveupdate($request->GetVar('frm_articleid', 'post'));
            }
        }
    }
}
$smarty->assign('tpl_article', $article->get());
$smarty->display('article.tpl');