Example #1
0
$smarty->assign('tpl_children_field3', $request->GetVar('children3', 'session'));
if ($request->GetVar('frm_action', 'post') !== $request->undefined) {
    if ($request->GetVar('frm_type', 'post') == 'rcat') {
        $pricetype = $request->GetVar('frm_price_type', 'post');
        /*
        if ($request->GetVar('frm_price_type','post') == 'PP') {
            $pricetype = 'PP';
        } else {
        	$pricetype = 'PR';
        }
        */
        if ($pricetype == 'PP' && $request->GetVar('frm_included', 'post') == 'yes') {
            $included = true;
        } else {
            $included = false;
        }
        $smarty->assign('tpl_opener', $wwwroot . 'roomcategory.php');
        if ($request->GetVar('frm_action', 'post') == 'del') {
            $article->delroom($request->GetVar('frm_id', 'post'), $request->GetVar('frm_article', 'post'));
        } else {
            $article->addroom($request->GetVar('frm_id', 'post'), $request->GetVar('frm_article', 'post'), $pricetype, $included);
        }
    }
    $smarty->assign('tpl_submitted', 'true');
} else {
    $smarty->assign('tpl_article', $article->get());
    $smarty->assign('tpl_id', $request->getVar('id', 'get'));
    $smarty->assign('tpl_type', $request->getVar('type', 'get'));
    $smarty->assign('tpl_submitted', 'false');
}
$smarty->display('articlechooser.tpl');