SHARE
TWEET

Untitled

a guest Mar 16th, 2012 38 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by deZender.Net
  5. * @ deZender (PHP5 Decoder for ionCube Encoder)
  6. *
  7. * @     Version                 :       1.1.3.0
  8. * @     Author                  :       DeZender
  9. * @     Release on              :       17.05.2011
  10. * @     Official site   :       http://DeZender.Net
  11. *
  12. */
  13.  
  14.         function refundTicket(&$ticketId) {
  15.                 global $dbh;
  16.  
  17.                 $row = $dbh->query( 'SELECT ppv_ticket_id, ppv_ticket_paid,ppv_ticket_status, user_id FROM ppv_ticket WHERE ppv_ticket_id = ' . $dbh->quote( $ticketId ) )->fetch( PDO::FETCH_ASSOC );
  18.  
  19.                 if (isset( $row['ppv_ticket_id'] )) {
  20.                         if ($row['ppv_ticket_paid'] == 'no') {
  21.                                 if ($row['ppv_ticket_status'] == 'valid') {
  22.                                         $ret = $dbh->query( 'UPDATE ppv_ticket SET ppv_ticket_status = "pending refund" WHERE ppv_ticket_id = ' . $dbh->quote( $row['ppv_ticket_id'] ) );
  23.  
  24.                                         if ($ret->rowCount(  )) {
  25.                                                 $dbh->query( 'INSERT INTO ppv_ticket_refund SET ppv_ticket_id = ' . $dbh->quote( $row['ppv_ticket_id'] ) . ',
  26.                                           ppv_ticket_refund_user_id = ' . $dbh->quote( $row['user_id'] ) . ',
  27.                                           ppv_ticket_refund_requested = "' . time(  ) . '",
  28.                                           ppv_ticket_refund_completed = 0' );
  29.                                                 return null;
  30.                                         }
  31.                                 } else {
  32.                                         return 'Ticket id: ' . $ticketId . ' [ Reason: already refunded ]';
  33.                                 }
  34.                         }
  35.  
  36.                         return 'Ticket id: ' . $ticketId . ' [ Reason: already payed ]';
  37.                 }
  38.  
  39.         }
  40.  
  41.         function gets($index, $default = null) {
  42.                 if (isset( $_SESSION[$index] )) {
  43.                         return $_SESSION[$index];
  44.                 }
  45.  
  46.                 return $default;
  47.         }
  48.  
  49.         function sets($index, $value) {
  50.                 $_SESSION[$index] = $value;
  51.         }
  52. .................................
  53. .......................
  54. ..............
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top