Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function checkPaymentParams($uid = NULL){
- if($uid == NULL){
- if(isset($_GET['auctionid'], $_GET['uid'])){
- $auctionid = $_GET['auctionid'];
- $auctionauthkey = $this->getSettings($auctionid, 'authkey');
- if($auctionauthkey != false && $auctionauthkey == $_GET['uid']){
- $post_title = $this->getSettings($auctionid, 'gettitle');
- $image1 = $this->get_post_meta($auctionid, 'wdm-image-1', true);
- $description = $this->getSettings($auctionid, 'getpost2');
- $getlastbid = $this->db_connection->prepare("SELECT bid, name FROM crstube_wdm_bidders WHERE auction_id = :idvar ORDER BY bid DESC");
- $getlastbid->bindValue(':idvar', $auctionid, PDO::PARAM_INT);
- $getlastbid->execute();
- $result = $getlastbid->fetch(PDO::FETCH_ASSOC);
- if($getlastbid->rowcount() > 1){
- $formdata = array("title" => $post_title
- , "auctionid" => $auctionid
- , "price" => $result['bid']
- , "image" => $image1
- , "description" => $description
- , "username" => $result['name']);
- return $formdata;
- }
- }
- }
- if(isset($_POST['auctionid'], $_POST['uid'])){
- $auctionid = $_POST['auctionid'];
- $auctionauthkey = $this->getSettings($auctionid, 'authkey');
- if($auctionauthkey != false && $auctionauthkey == $_POST['uid']){
- $getlastbid = $this->db_connection->prepare("SELECT bid, name FROM crstube_wdm_bidders WHERE auction_id = :idvar ORDER BY bid DESC");
- $getlastbid->bindValue(':idvar', $auctionid, PDO::PARAM_INT);
- $getlastbid->execute();
- $result = $getlastbid->fetch(PDO::FETCH_ASSOC);
- if($getlastbid->rowcount() > 1){
- return $result = array("price" => $result['bid'], "name" => $result['name']);
- }
- }
- }
- if(isset($_GET['uid'], $_GET['prod'])){
- $auctionid = $_GET['prod'];
- $auctionauthkey = $this->getSettings($auctionid, 'authkey');
- if($auctionauthkey != false && $auctionauthkey == $_GET['uid']){
- $getlastbid = $this->db_connection->prepare("SELECT bid, name FROM crstube_wdm_bidders WHERE auction_id = :idvar ORDER BY bid DESC");
- $getlastbid->bindValue(':idvar', $auctionid, PDO::PARAM_INT);
- $getlastbid->execute();
- $result = $getlastbid->fetch(PDO::FETCH_ASSOC);
- if($getlastbid->rowcount() > 1){
- $itemname = $this->getSettings($auctionid, 'gettitle');
- return $result = array("price" => $result['bid'], "name" => $result['name'], 'itemname' => $itemname);
- }
- }
- }
- }else{
- $auctionauthkey = $this->getSettings($uid, 'authkey');
- if($auctionauthkey != false){
- return "auctionpayment.php?auctionid=".$uid."&uid=".$auctionauthkey;
- }
- }
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement