示例#1
0
            $pageTitle = DB_getItem($_TABLES['ad_category'], 'cat_name', "cat_id='{$id}'");
        } else {
            $content .= CLASSIFIEDS_catList();
        }
        $T->set_var('header', $LANG_ADVT['blocktitle']);
        $menu_opt = $LANG_ADVT['mnu_home'];
        break;
}
// switch ($page)
if ($menu_opt != '') {
    $menu->set_selected($menu_opt);
}
$T->set_var('menu', $menu->generate());
$T->set_var('content', $content);
$T->parse('output', 'page');
echo CLASSIFIEDS_siteHeader($pageTitle);
if ($msg != '') {
    echo COM_showMessage($msg, $_CONF_ADVT['pi_name']);
}
echo $T->finish($T->get_var('output'));
echo CLASSIFIEDS_siteFooter();
function showHelp()
{
    global $LANG_ADVT, $_CONF;
    $retval = '';
    foreach ($LANG_ADVT['help'] as $section => $content) {
        $retval .= "<h2>{$content[0]}</h2>\n<ol>\n";
        foreach ($content[1] as $key => $value) {
            $value = str_replace('{site_url}', $_CONF['site_url'], $value);
            $retval .= "<li>{$value}</li>\n";
        }
示例#2
0
            case 'ad':
            default:
                $actionval = 'ad';
                $content .= CLASSIFIEDS_adminMenu($actionval);
                $content .= CLASSIFIEDS_adminAds();
                $admin_mode = ': ' . $LANG_ADVT['manage_ads'];
                break;
            case 'other':
                $content .= CLASSIFIEDS_adminMenu($actionval);
                $T1 = new Template(CLASSIFIEDS_PI_PATH . '/templates/admin/');
                $T1->set_file('content', 'adminother.thtml');
                $T1->set_var(array('cat_list' => SEC_getGroupDropdown($_CONF_ADVT['defgrpcat'], 3), 'cat_perms' => SEC_getPermissionsHTML($_CONF_ADVT['default_perm_cat'][0], $_CONF_ADVT['default_perm_cat'][1], $_CONF_ADVT['default_perm_cat'][2], $_CONF_ADVT['default_perm_cat'][3]), 'ad_list' => SEC_getGroupDropdown($_CONF_ADVT['defgrpad'], 3), 'ad_perms' => SEC_getPermissionsHTML($_CONF_ADVT['default_permissions'][0], $_CONF_ADVT['default_permissions'][1], $_CONF_ADVT['default_permissions'][2], $_CONF_ADVT['default_permissions'][3])));
                $T1->parse('output1', 'content');
                $content .= $T1->finish($T1->get_var('output1'));
                break;
        }
        break;
    default:
        USES_classifieds_admin();
        $content .= CLASSIFIEDS_adminMenu('ad');
        $content .= CLASSIFIEDS_adminAds();
        break;
}
// Generate the common header for all admin pages
echo CLASSIFIEDS_siteHeader();
$T = new Template(CLASSIFIEDS_PI_PATH . '/templates/admin/');
$T->set_file('admin', 'index.thtml');
$T->set_var(array('version' => "{$LANG_ADVT['version']}: {$_CONF_ADVT['pi_version']}", 'admin_mode' => $admin_mode, 'page_content' => $content));
$T->parse('output', 'admin');
echo $T->finish($T->get_var('output'));
echo CLASSIFIEDS_siteFooter();