/*--------------------------------------------------+ | X-ZERO COMMUNITY CLASSIFIEDS SCRIPT | +===================================================+ | File: index.php | | Main wrapper page | +---------------------------------------------------+ | Copyright © 2005 Davis 'X-ZERO' John | | Scriptlance ID: davisx0 | | Email: support@xzeroscripts.com | +--------------------------[ Tue, Aug 02, 2005 ]---*/ require_once("initvars.inc.php"); require_once("config.inc.php"); //mobile detection script require_once 'Mobile_Detect.php'; $detect = new Mobile_Detect(); if($detect->isMobile()) { $show_sidebar_always = FALSE; } function selfURL() { $s = empty($_SERVER["HTTPS"]) ? '' : ($_SERVER["HTTPS"] == "on") ? "s" : ""; $protocol = strleft(strtolower($_SERVER["SERVER_PROTOCOL"]), "/").$s; $port = ($_SERVER["SERVER_PORT"] == "80") ? "" : (":".$_SERVER["SERVER_PORT"]); return $protocol."://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']; } function strleft($s1, $s2) { return substr($s1, 0, strpos($s1, $s2)); } $homepageurl=selfURL(); $checkhome[0]="http://www.muamat.com/"; // IP in the form of "127.0.0.1" or whatever //$checkhome[1]="116.71.177.204"; //$checkhome[2]="...";// add as many as you wish if (in_array($homepageurl,$checkhome)) { //if (eregi($homepageurl, "http://www.muamat.com/")) //{ $page_title="Muamat: Search Post Free Online Classified Ads Jobs Buy Sell Rent" ; $meta_kw="Classified ads for services, housing, real estate, vehicles, buy and sell, jobs, community, events, posts, listings, postings, offers"; $meta_desc="Search or Post classified ads. free classifieds, services, housing, real estate, vehicles, buy and sell, jobs, community, events, posts, post listings, postings, offers, images."; } //-------[Neo's Shared addon]-------------- require_once("inc/board/seolinks.inc.php"); //unset($_POST[lang]); if($_GET['lang']){ $url_safe = preg_replace('/&lang=.{2}/', '', $_SERVER['REQUEST_URI']); $url_safe = preg_replace('/\?lang=.{2}$/', '', $url_safe); $url_safe = preg_replace('/\?lang=.{2}/', '?', $url_safe); header('location: '.$url_safe); exit(); } //-------[End Shared addon]---------------- if($xview == "page") { $page_title="Muamat: Search Post Free Online Classified Ads Jobs Buy Sell Rent" ; $meta_kw="Classified ads for services, housing, real estate, vehicles, buy and sell, jobs, community, events, posts, listings, postings, offers"; $meta_desc="Search or Post classified ads. free classifieds, services, housing, real estate, vehicles, buy and sell, jobs, community, events, posts, post listings, postings, offers, images."; } if($view == "page" && $pagename=="memberindex") { $page_title="Muamat: Featured Members"; $meta_kw="latest classifieds, insurance, services, real estate, jobs, ads, posts, search"; $meta_desc="Latest Classifieds. Free classified ads, Featured Members"; } if($_GET['pagename']=="showmemberads" && $_GET['nick'] ) { $page_title="Muamat Classifieds Members: ". $_GET['nick']. " Latest Ads"; $meta_kw="latest classifieds, insurance, services, real estate, jobs, ads, posts, search"; $meta_desc="Muamat Featured Member ". $_GET['nick'].". Latest ads posted by user ". $_GET['nick'] ; } if($_GET['pagename']=="showall" && $_GET['page'] ) //if($xview == "page" && $pagename=="showall") { $page= $_GET['page']; if(!$page) { $page_title="Latest Classifieds, Insurance, Services, Real Estate, Jobs"; $meta_kw="latest classifieds, insurance, services, real estate, jobs, ads, posts, search"; $meta_desc="Latest Classifieds. Free classified ads, insurance, services, real estate, jobs, ads, posts, search"; } elseif($page=="1") { $page_title="Latest Classifieds, Insurance, Services, Real Estate, Jobs"; $meta_kw="latest classifieds, insurance, services, real estate, jobs, ads, posts, search"; $meta_desc="Latest Classifieds. Free classified ads for services, housing, real estate, vehicles, auto insurance, buy and sell, jobs, community, events, posts, post listings, postings, offers, images."; } elseif($page=="2") { $page_title="Latest Classifieds, Loan, Property, Cars, Mortgage"; $meta_kw="latest classifieds, loan, property, cars, mortgage, ads, posts, search"; $meta_desc="Latest Classifieds. Free classified ads, loan, property, cars, mortgage, services, housing, real estate, vehicles, buy and sell, jobs, community, events, posts, post listings, postings, offers, images."; } elseif($page=="3") { $page_title="Latest Classifieds, Hosting, Housing, Auto, Attorney, Trading"; $meta_kw="latest classifieds, hosting, housing, auto, attorney, trading, ads, posts, search"; $meta_desc="Latest Classifieds. Free classified ads for hosting, housing, auto, attorney, trading, services, housing, real estate, vehicles, buy and sell, jobs, community, events, posts, post listings, postings, offers, images."; } elseif($page=="4") { $page_title="Latest Classifieds, Donate, Classes, Tutions, Lessons, Cars"; $meta_kw="latest classifieds, donate, classes, tutions, lessons, ads, posts, search"; $meta_desc="Latest Classifieds. Free classified ads, donate, cars, classes, tutions, lessons, services, housing, real estate, vehicles, buy and sell, jobs, community, events, posts, post listings, postings, offers, images."; } elseif($page=="5") { $page_title="Latest Classifieds, Conferences, Events, Photography"; $meta_kw="latest classifieds, conferences, events, photography, ads, posts, search"; $meta_desc="Latest Classifieds. Free classified ads, conferences, events, photography, services, housing, real estate, vehicles, buy and sell, jobs, community, events, posts, post listings, postings, offers, images."; } elseif($page=="6") { $page_title="Latest Classifieds, Softwares, Data Recovery, Web Hosting"; $meta_kw="latest classifieds, softwares, data recovery, web hosting, ads, posts, search"; $meta_desc="Latest Classifieds. Free classified ads, softwares, data recovery, web hosting, services, housing, real estate, vehicles, buy and sell, jobs, community, events, posts, post listings, postings, offers, images."; } elseif($page=="7") { $page_title="Latest Classifieds, Health Insurance, Life Insurance, Dental Insurance"; $meta_kw="latest classifieds, health insurance, life insurance, dental insurance, ads, posts, search"; $meta_desc="Latest Classifieds. Free classified ads, health insurance, life insurance, dental insurance, services, housing, real estate, vehicles, buy and sell, jobs, community, events, posts, post listings, postings, offers, images."; } elseif($page=="8") { $page_title="Latest Classifieds, Auto Insurance, Car Rentals, Rent a Car"; $meta_kw="latest classifieds, auto insurance, car rentals, rent a car, ads, posts, search"; $meta_desc="Latest Classifieds. Free classified ads, auto insurance, car rentals, rent a car, services, housing, real estate, vehicles, buy and sell, jobs, community, events, posts, post listings, postings, offers, images."; } else { $page_title="Latest Classifieds Page $page"; $meta_kw="latest classifieds, ads, posts, search"; $meta_desc="Latest Classifieds. Free classified ads page $page. Ads for services, housing, real estate, vehicles, buy and sell, jobs, community, events, posts, post listings, postings, offers, images."; } } if($xview == "showad") { $shehr= $xcityid>0?"$xcityname":$xcountryname; $page_title=$adtitle ." - " . $shehr." ".$xsubcatname ; $meta_desc= ltrim(ucfirst(strtolower($meta_desc1))); //$meta_kw= $meta_key1; } if($_GET['pagename']=="regionalshowjobs" && $_GET['view']=="page" ) { $page_title="$xcityname Latest Jobs" ; $meta_kw="$xcityname, jobs, classifieds, ads, admin, office, construction, handiwork, domestic help, professional services, programming, web design, IT, computer, retail, restaurant, sales, marketing, temp, part time, TV, media, fashion, medical, health care, resume"; $meta_desc="$xcityname latest jobs classifieds. Search jobs ads in $xcityname. Admin, Office, Construction, Handiwork, Domestic Help, Professional Services, Programming, Web Design, IT, Computer, Retail, Restaurant, Sales, Marketing, Temp, Part Time, TV, Media, Fashion, Medical, Health Care, Resume."; } //if($xview == "page" && $pagename=="regionalshowall") if($_GET['pagename']=="regionalshowall" && $_GET['view']=="page" ) { $page= $_GET['page']; $page_title="Latest Ads in $xcityname - Page $page" ; $meta_kw="$xcityname, classifieds, ads, services, housing, real estate, cars, buy, sell, jobs, community, matrimonial, events, posts, listings, postings, offers"; $meta_desc="Latest Ads in $xcityname. Classifieds page $page. Search classified ads in $xcityname or Post ad in $xcityname. Services, housing, real estate, vehicles, buy and sell, jobs, community, offers."; } if($xview == "page" && $pagename=="postdeal") { $page_title="Post Barter Deal in $xcityname, Exchange Products in $xcityname" ; $meta_kw="$xcityname, barter, classifieds, exchange, ads, products, property, electronics, computers, phones, real estate, cars, cameras, furniture, instruments, jewellery, pets, animals, dogs, cats"; $meta_desc="$xcityname barter deals. Post products exchange deals in $xcityname or post barter ads in $xcityname. Free barter/exchange listings"; } if($xview == "page" && $pagename=="showbarterdeal") { // Find vars and make metadata for barter deals $table=$t_ads="clf_barter_deals"; $t_subcats="clf_barter_subcats"; $t_cats="clf_barter_cats"; $sql = "SELECT offerproduct, demandproduct, addesc, cat.catid, cat.catname as offercatname, scat1.subcatname as demandsubcatname, scat.subcatid, scat.subcatname as offersubcatname, ct.cityname FROM $t_ads a INNER JOIN $t_subcats scat ON scat.subcatid = a.offersubcatid INNER JOIN $t_subcats scat1 ON scat1.subcatid = a.demandsubcatid INNER JOIN $t_cats cat ON cat.catid = scat.catid INNER JOIN $t_cities ct ON a.cityid = ct.cityid WHERE a.adid = '$_GET[adid]'"; list($offerproduct,$demandproduct, $addesc, $catid, $catname, $demandsubcatname, $subcatid, $subcatname, $cityname) = mysql_fetch_array(mysql_query($sql)); // $xadid = $_GET['adid']; $page_title = "$offerproduct > $demandproduct - Barter Deals"; $meta_kw = "$cityname, $subcatname, $catname, barter, exchange, deal, ads, listings, products, items"; $meta_desc = "$cityname barter exchange deal. Exchange $offerproduct with $demandproduct. Exchanging $catname, $subcatname with $demandsubcatname."; //$meta_desc = //$meta_desc = preg_replace("/\[\/?URL\]/", "", $addesc); $meta_desc1 = strip_tags($addesc); //$meta_desc1 = preg_replace("/?[a-z0-9]+;/i","",$meta_desc); $meta_desc1= preg_replace ( array ('/?[a-z0-9]+;/i' ,'#[\\n\\r\\t]#s' // Strip linebreaks and tabs , '# +#' // Strip multiple spaces ) , array ( '' ,' ' , ' ' ) , $meta_desc1 ); $meta_desc1 = substr($meta_desc1,0,200); // if (strlen($row['addesc'])>200) echo "..."; //$page_title="Hello" ; //$meta_kw="$xcityname, barter, classifieds, exchange, ads, products, property, electronics, computers, phones, real estate, cars, cameras, furniture, instruments, jewellery, pets, animals, dogs, cats"; //$meta_desc="$xcityname barter deals. Post products exchange deals in $xcityname or post barter ads in $xcityname. Free barter/exchange listings"; } if($xview == "page" && $pagename=="barterdeals") { // Find vars and make metadata for barter deals $table=$t_ads="clf_barter_deals"; $t_subcats="clf_barter_subcats"; $t_cats="clf_barter_cats"; $page_title = "$xcityname Barter Deals: Exchange Items in $xcityname"; $meta_kw="$xcityname, barter, ads, exchange, items, products, deals, housing, real estate, cars, posts, listings, postings, offers"; $meta_desc="$xcityname barter deals. Search barter deals in $xcityname or Post exchange item deals in $xcityname."; if ($_GET['offersubcatid']) { $sql = "SELECT subcatname from $t_subcats WHERE subcatid = $_GET[offersubcatid]"; list($subcatname) = @mysql_fetch_row(mysql_query($sql)); $page_title = "$xcityname Barter Deals: Exchange $subcatname in $xcityname"; $meta_kw="$xcityname, barter, ads, deals, housing, real estate, cars, posts, listings, postings, offers"; $meta_desc="$xcityname barter deals. Search barter deals in $xcityname or Post exchange item deals in $xcityname."; } if ($_GET['demandsubcatid']) { $sql = "SELECT subcatname from $t_subcats WHERE subcatid = $_GET[demandsubcatid]"; list($subcatname) = @mysql_fetch_row(mysql_query($sql)); } } ?>