include "lol_common.inc";
include $include_path . "class/media_class.inc";
$M = new media_class($db);
if($REQUEST_METHOD=="POST") {
$error = "";
if (strlen($ylist) < 2 ) $error .= "- Please enter at least one product
";
if (!strlen($error)) {
if ($action == "edit") $uid = $media_id;
if (strlen($ebull) < 1) $ebull = "yes";
//to take check boxes array
if (is_array($ylist)) $ylist = implode(",",$ylist);
if (is_array($needs)) $needs = implode(",",$needs);
$M->pro_int($ylist, $needs ,$ebull ,$uid);
if ($action == "edit" || $action == "renew") {
$data= $M->get_info_list($media_id);
$goto = $data['pay_link'];
if ($goto == "yes") {
header("location: thank_you.php?media_id=$media_id&action=".$action);
} else {
header("location: list.php?action=edit&media_id=$media_id");
}
}
if ($action == !"edit")
header("location: list.php?protype=". $protype);
}
}
$subscribe =$_SESSION['subscribe_list'];
$protype=$_SESSION['protype_list'];
$uid=$_SESSION['uid'];
// set values for edit & renew
if ($action == "edit" || $action == "renew") {
$data = $M->get_info_list($uid);
$ylist = explode(",", $data['ylist_id']);
$needs = explode(",", $data['needs']);
}
include $include_path . "lol_header2.inc";
?>