$pageTitle = $LANG_ADVT['mnu_help']; break;*/ /*case 'help': // Display the help page. $content = showHelp(); $menu_opt = $LANG_ADVT['mnu_help']; $T->set_var('header', $LANG_ADVT['mnu_help']); $pageTitle = $LANG_ADVT['mnu_help']; break;*/ case 'editad': // Edit an ad. $result = DB_query("SELECT * \n FROM {$_TABLES['ad_ads']} \n WHERE ad_id ='{$id}'"); if ($result && DB_numRows($result) == 1) { USES_classifieds_edit(); $A = DB_fetchArray($result); $content .= adEdit($A, 'update_ad'); $T->set_var('header', $LANG_ADVT['edit_ad']); } else { $content .= COM_showMessage('08', $_CONF_ADVT['pi_name']); $content .= adList(false); $T->set_var('header', $LANG_ADVT['ads_mgnt']); } $menu_opt = $LANG_ADVT['mnu_myads']; break; case 'byposter': // Display all open ads for the specified user ID $uid = isset($_REQUEST['uid']) ? (int) $_REQUEST['uid'] : 0; if ($uid > 1) { USES_classifieds_list(); $content .= adListPoster($uid); }
// Display the edit form for a new ad submission. If $_POST is // not empty, then this is from a failed save, re-show the fields. if (!empty($_POST)) { $A = $_POST; } $content .= adEdit($A, 'edit'); } break; case 'editsubmission': case 'moderate': // coming from submission queue, ad ID is in var 'id' USES_classifieds_edit(); $result = DB_query("SELECT * \n FROM {$_TABLES['ad_submission']} \n WHERE ad_id ='{$ad_id}'"); if ($result && DB_numRows($result) == 1) { $A = DB_fetchArray($result); $content .= adEdit($A, $mode); } else { // Redirect back to moderation, but with a message echo COM_Refresh($_CONF['site_admin_url'] . '/moderation.php?msg=08&plugin=' . $_CONF_ADVT['pi_name']); } break; case 'moderation': // Redirect to the moderation page echo COM_refresh($_CONF['site_admin_url'] . '/moderation.php'); exit; break; case 'userindex': // go to the user home page echo COM_refresh(CLASSIFIEDS_URL . "/index.php?msg={$msgid}"); exit; break;