setIID($_POST["iid"]); $i->setUID($_POST["uid"]); $i->setName(Global_CleanMessage($_POST["name"])); $i->setLocation(Global_CleanMessage($_POST["location"])); $i->setLOU($_POST["lou"]); $i->setSetup(Global_CleanMessage($_POST["setup"])); $i->setNutshell(Global_CleanMessage($_POST["nutshell"])); $i->setSimilar(Global_CleanMessage($_POST["similar"])); $i->setStrengths(Global_CleanMessage($_POST["strengths"])); $i->setWeaknesses(Global_CleanMessage($_POST["weaknesses"])); $i->setCrunch(Global_CleanMessage($_POST["crunch"])); $i->setPerformance($_POST["performance"]); $i->setReliability($_POST["reliability"]); $i->setValue($_POST["value"]); $i->setOverall($_POST["overall"]); $i->setFromDetails($_POST["fromdetails"]); if (isset($_POST["hide"])) $i->setStatus($REVIEW_STATUS_HIDDEN); else $i->setStatus($_POST["status"]); $i->setSubmittedDate(); if ($i->add()) { $default_alert = "New review added."; if ($_POST["uid"] == 0) header ("Location: ../notification.php?nid=sgstrw&iid=".$_POST["iid"]); else { $u = new User($_POST["uid"]); $u->setNoofrposts($u->getNoofrposts()+1); $u->update_db(); header ("Location: ../notification.php?nid=rwpost&iid=".$_POST["iid"]); } exit; } else $default_alert = "Please fill in all fields with an *."; } else $default_alert = "Contribute a Review!"; } //strlen($_GET["iid"]) > 0 && is_int((int) $_GET["iid"])? $iid = $_GET["iid"] : $iid = 0; $iid=0; if(isset($_REQUEST['iid']) && is_numeric($_REQUEST['iid']) && (int) $_REQUEST['iid'] > 0) { $iid = (int) $_REQUEST['iid']; } else { header("Location: $APP_ROOT_PAGE"); exit; } $item = new Item($iid); if (!$item->getID()) { header("Location:".$APP_ROOT_PAGE); exit; } if (!hasAccess(getSessionUserid(),"ar",true)) { header("Location:".$APP_ROOT_PAGE); exit; } $itembrand = new Brand($item->getBID()); $prices = new StreetPrices($item->getID()); $category = new Category($item->getCID()); $distributor = new DistributorTieIn($item->getBID(), $item->getCID()); isInSession()? $user = new User(getSessionUserid()) : $user = new User(0); header("Expires: ".gmdate("D, d M Y H:i:s", time() + 360)." GMT"); header("Cache-Control: max-age=360, must-revalidate"); ## Fill in the following for SEO $WEBPAGE_TITLE = "Post a Review ".$GLOBAL_PORTAL_NAME; $meta_description = ""; $meta_keywords = ""; ?>