require("$www_dir/log.php"); $template = "header"; $page_title = "ADDMORE"; $left_nav="member_nav.html" ; require("$template_dir/template.html"); $SHOW_QUERY=1; $display = $_REQUEST["display"]; $action = $_REQUEST["action"]; $pID = $_REQUEST["pID"]; $here = getenv("SCRIPT_NAME"); if (!$action) { #open if no action if ($pID) { $query = "SELECT url, url_title, url_desc, url_categories,p.ai_flag FROM member m, promote_url p WHERE m.member_idx=p.member_idx AND m.member_idx = '$memberID' AND promote_url_idx='$pID' AND p.ai_flag != 'O'"; $rec=getOneRec($query); $url = $rec[0]; $url_title = $rec[1]; $url_desc = $rec[2]; $cats2 = $rec[3]; $ai_flag = $rec[4]; $next_display = "Modifying URL"; $next = "2"; } else { $next_display = "Adding URL"; $next = "1"; } } #close if no action elseif ($action) { #open if action $url = $_POST["url"]; $url_title = $_POST["url_title"]; $url_desc = $_POST["url_desc"]; $category2 = $_POST["category2"]; $ai_flag = $_POST["ai_flag"]; if ($pID) $withpID= " AND promote_url_idx != '$pID'"; else $withpID = ""; $query = "SELECT promote_url_idx FROM promote_url WHERE member_idx = '$memberID' AND url='$url' $withpID AND ai_flag !='O' "; if (getOne($query)) $errmsg .="You have already selected this URL"; if (!$url) $errmsg .= "Url is required"; if (!$url_title) $errmsg .= "URL title is required"; if (!$url_desc) $errmsg .= "Description is required"; if (count($category2) < 1) $errmsg.="You must select at least 1 category for your URL."; $bad_title = nonocheck($url_title); $bad_desc = nonocheck($url_desc); if ($bad_title) $errmsg .= "Title:$bad_title:".get_content_text("nonoresponse" ).""; if ($bad_desc) $errmsg .= "Description: ".get_content_text("nonoresponse").""; $cats2 =":"; for ($ct=0;$ct Websites for =$username?> ID URL Title Status $query = "SELECT promote_url_idx, url, url_title,p.ai_flag FROM promote_url p,member m WHERE m.member_idx=p.member_idx AND m.member_idx = '$memberID' AND p.ai_flag != 'O' ORDER BY promote_url_idx" ; $res = my_query($query); while ($rec=fetch_array($res)) { $link0 = "$rec[0]"; ?> = $link0 ?> = $rec[1] ?> = $rec[2] ?> = $rec[3] ?> } ?> Add More } #close if no display elseif ($display == "1") { #open if display=1 ?> = $next_display?> if ($errmsg) { ?> =$errmsg?> } ?> Enter the URL of a page/site you want to promote: No adult content or sites that break out of frames. Note: Do not include the "Http://" portion of your URL. http:// (You can enter more later if you have more than one!) Title of the page/site listed above: (Up to 40 characters) You may NOT use "!" in your title or description. Description of the page/site listed above: (A Minumum of 175 characters to a Maximum of 300) = $url_desc?> characters left Select 1 or more appropriate categories for YOUR page/site: (For the best response, select only highly relevant categories!) $query = $query = "SELECT website_types_idx,descr FROM website_types WHERE ai_flag !='I'"; $res = my_query($query); $ct=2; while ($rec =fetch_array($res,$query) ){ $cb=checkbox("category2[]",$rec[0],$cats2). $rec[1]; if (is_even($ct++)) print "\n\n $cb"; else print "\n $cb\n"; } if (!is_even($ct)) print "\n \n"; ?> if ($pID) { #open with pID ?> if ($ai_flag=="I") $ichecked="CHECKED"; else $achecked="CHECKED"; ?> Status Active > Inactive > Delete } #close with pID ?> > > } #close with display =1 elseif ($display == "2") { #print "HOW DID I GET HERE"; } $template="footer"; require("$template_dir/template.html"); ?>