Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Community Board > Mysidia Adoptables Official Announcement

Notices

Closed Thread
 
Thread Tools Display Modes
  #51  
Old 12-12-2012, 12:15 PM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 333,364
Hall of Famer is on a distinguished road
Default

You have a malfunctioning double colon operator in that script file, remove it and see what happens.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
  #52  
Old 12-12-2012, 12:24 PM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 82,347
SilverDragonTears is on a distinguished road
Default

???
Code:
<?php

abstract class User{
  // The abstract class User
  public $uid = 0;
  public $username;
  public $ip;
  public $usergroup;
  public $lastactivity;
  
  public function getid(){
     return $this->uid;
  }

  public function getusername(){
     return $this->username;
  }
  
  public function getcurrentip(){
     return $this->ip;
  }
  
  public function getgroupid(){
     if(is_numeric($this->usergroup)) return $this->usergroup;
     else return $this->usergroup->gid;
  }
  
  public function getgroup(){
     return $this->usergroup;
  }
  
  public function lastactivity(){
     return $this->lastactivity;
  }
  
  
  public function isbanned(){
     // will be added later
  }
  
}
?>
__________________

Check out SilvaTales
  #53  
Old 12-12-2012, 12:30 PM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 333,364
Hall of Famer is on a distinguished road
Default

I mean, this file: classes/class_input.php
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
  #54  
Old 12-12-2012, 12:48 PM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 82,347
SilverDragonTears is on a distinguished road
Default

Oh. Ok what am I looking for exactly?
__________________

Check out SilvaTales
  #55  
Old 12-12-2012, 01:01 PM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 333,364
Hall of Famer is on a distinguished road
Default

Well I said you need to look into classes/class_input and search for line 120 that seems to be malfunctioning. It seems to have two colons that cause the trouble, you need to remove them.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
  #56  
Old 12-12-2012, 01:04 PM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 82,347
SilverDragonTears is on a distinguished road
Default

I removed one and got Parse error: syntax error, unexpected ':' in /home/taleofdr/public_html/classes/class_input.php on line 120
__________________

Check out SilvaTales
  #57  
Old 12-12-2012, 01:12 PM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 333,364
Hall of Famer is on a distinguished road
Default

Then how about removing them both? What does that file look like on your server anyway?
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
  #58  
Old 12-12-2012, 01:13 PM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 82,347
SilverDragonTears is on a distinguished road
Default

I did. Still got an error.
Parse error: syntax error, unexpected T_VARIABLE in /home/taleofdr/public_html/classes/class_input.php on line 120

I'm starting to think I won't be able to add in the adopt shop :/

Code:
<?php

/**
 * The Input Class, it is one of Mysidia system core classes.
 * It acts as a secure wrapper for user input in $_GET and $_POST.
 * Input is a final class, no child class shall derive from it.
 * An instance of Input class is generated upon Mysidia system object's creation. 
 * This specific instance is available from Registry, just like any other Mysidia core objects. 
 * @category Resource
 * @package Core
 * @author Hall of Famer 
 * @copyright Mysidia Adoptables Script
 * @link http://www.mysidiaadoptables.com
 * @since 1.3.2
 * @todo incorporate input class in Mysidia adoptables system.
 */

final class Input{

    /**
	 * The request property, which holds request method information: get, post or else.
	 * @access public
	 * @var String
    */
    public $request;
	
	/**
	 * The post property, it stores all user input vars in $_POST.
	 * @access private
	 * @var ArrayObject
    */
    private $post; 
	
	/**
	 * The get property, it stores all user input vars in $_GET.
	 * @access private
	 * @var ArrayObject
    */
    private $get;
	
	/**
	 * The action property, which specifies users action.
	 * @access private
	 * @var String
    */
    private $action;

	
	/**
     * Constructor of Input Class, it generates basic properties for an input object.
     * @access public
     * @return Void
     */	 
    public function __construct(){	 
        $this->checkrequest();
	    $this->initialize();
    }
  
    /**
     * The initialize method, which handles parsing of user input vars.
     * @access public
     * @return Void
     */
    public function initialize(){
	    if(isset($_POST)){
	        $post = array_map('secure',$_POST);
		    $this->post = new ArrayObject($post, ArrayObject::ARRAY_AS_PROPS);
		    if(isset($this->post->action)) $this->action = $this->post->action;
            unset($_POST);     
	    }
	    if(isset($_GET)){ 
	        $get = array_map('secure',$_GET);
	        $this->get = new ArrayObject($get, ArrayObject::ARRAY_AS_PROPS);
		    if(isset($this->get->action)) $this->action = $this->get->action;
            unset($_GET);
	    }
        if(defined("SUBDIR")){
            $parser = new UrlParser($_SERVER['REQUEST_URI']);
			$elements = $parser->parse();
			$get = array_map('secure', $elements);
			$this->get = new ArrayObject($get, ArrayObject::ARRAY_AS_PROPS);
            if(isset($this->get->action)) $this->action = $this->get->action;
        }		
    }
  
    /**
     * The post method, returns a user input var stored in Input::$post property.
	 * @param String  $key
     * @access public
     * @return Object
     */
    public function post($key = ""){
        if(empty($key) and !empty($this->post)) return $this->post;
	    elseif(isset($this->post->{$key})) return $this->post->{$key};
	    else return FALSE;
    }
  
    /**
     * The get method, returns a user input var stored in Input::$get property.
	 * @param String  $key
     * @access public
     * @return Object
     */
    public function get($key = ""){
        if(empty($key) and !empty($this->get)) return $this->get;
	    elseif(isset($this->get->{$key})) return $this->get->{$key};
	    else return FALSE;    
    }

    /**
     * The manipulate method, set values in a get variable from post variable.
     * This can be manipulated by controller objects.
     * It serves as a temporary solution to url rewrite problem with get forms.
	 * @param String  $controller
     * @access public
     * @return Void
     */
    public function manipulate($controller){
        if(!($controller instanceof AppController)) throw new Exception("Controller not found.");
        elseif(is_array($controller::$param)){
            foreach($controller::$param as $key){
                if($this->post->{$key}) $this->get->{$key} = $this->post->{$key};
            }
        }
        else{
            $key = $controller::$param;
            if($this->post->{$key}) $this->get->{$key} = $this->post->{$key};
        }   
    }
  
    /**
     * The action method, verifies whether a specified action is taken by this user.
	 * @param String  $act
     * @access private
     * @return Boolean
     */
    public function action(){
        if(empty($this->action)) return FALSE;
	    else return $this->action;
    }
  
    /**
     * The checkrequest method, checks to see the request method of a particular user
     * @access private
     * @return Boolean
     */
    private function checkrequest(){
        // This method checks if there is user input, and returns the request_method if evaluated to be true
        if($_SERVER['REQUEST_METHOD'] == "POST"){
  	        $this->request = "post";
		    return TRUE;
	    }	
	    elseif($_SERVER['REQUEST_METHOD'] == "GET"){
	        $this->request = "get";
		    return TRUE;
	    }	
	    else $this->request = FALSE;
    }
  
    /**
     * The secure method, parse user input in a safe manner.
	 * @param Array  $data
     * @access private
     * @return ArrayObject
     */
    private function secure($data){
        if(is_array($data) and SUBDIR != "AdminCP") die("Hacking Attempt!");
	    $data = htmlentities($data);
        $data = addslashes($data);	
	    $data = strip_tags($data, '');
	    return $data;
    }  
}
?>
__________________

Check out SilvaTales
  #59  
Old 12-12-2012, 02:04 PM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 333,364
Hall of Famer is on a distinguished road
Default

I see, you dont have a controller object, and thus the double colons are invalid. You shouldnt be using the input class at all, get rid of it and see what happens.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
  #60  
Old 12-12-2012, 02:08 PM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 82,347
SilverDragonTears is on a distinguished road
Default

Ok where is it and what exact part? Sorry, I don't want to mess anything up and I'm not familiar with it at all.
__________________

Check out SilvaTales
Closed Thread


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mysidia Adoptables v1.3.3[Security Release] Hall of Famer Mysidia Adoptables Official Announcement 122 05-18-2013 04:02 PM
Mysidia Adoptables v1.3.0[Security Release] Hall of Famer Mysidia Adoptables Official Announcement 180 04-01-2012 10:16 PM
Mysidia Adoptables v1.2.0[Security Release] Hall of Famer Mysidia Adoptables Official Announcement 21 03-22-2011 04:13 PM
Mysidia Adoptables v1.1.4[Security Release] Hall of Famer Mysidia Adoptables Official Announcement 15 01-28-2011 11:48 AM
Mysidia Adoptables v1.1.3[Security Release] Hall of Famer Mysidia Adoptables Official Announcement 27 01-26-2011 02:59 PM


All times are GMT -5. The time now is 05:33 AM.

Currently Active Users: 9735 (0 members and 9735 guests)
Threads: 4,080, Posts: 32,024, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636