View Single Post
  #2  
Old 06-13-2012, 09:07 PM
Alaric Alaric is offline
Mod
 
Join Date: Nov 2011
Posts: 112
Gender: Male
Credits: 318,380
Alaric is on a distinguished road
Default

I Guess you are having the same problem as shown In The link (.See Screenshots.)

Problem

I'll help you out!

1. Go to the File-Manager.
2. Find classes/class_promo.php
3. Find this part as shown below.

PHP Code:
 public function __construct($code ""){
      
// Fetch the database info into object property

      
$stmt $GLOBALS['adopts']->select("promocodes", array(), "code ='{$code}'");
      if(
$row $stmt->fetchObject()){
         
// loop through the anonymous object created to assign properties
         
foreach($row as $key => $val){
            
// Assign properties to our promocode instance
            
$this->$key $val;         
         }
      }
      else 
$this->message "Promocode does not exist...<br>";
  } 
4. Now Change it To..

PHP Code:
public function __construct($code ""){
      
// Fetch the database info into object property

      
$stmt $GLOBALS['adopts']->select("promocodes", array(), "code ='{$code}'");
      if(
$row $stmt->fetchObject()){
         
// loop through the anonymous object created to assign properties
         
foreach($row as $key => $val){
            
// Assign properties to our promocode instance
            
$this->$key $val;         
         }
         if(empty(
$this->user)) $this->user $GLOBALS['loggedinname'];
      }
      else 
$this->message "Promocode does not exist...<br>";
  } 
__________________
Reply With Quote