Jump to content

datagrid error, I need your help


tinkertron

Recommended Posts

So I just install this software I bought acouple of days ago, and durning the setup of the phpgrid.php I get this error: Parse error: syntax error, unexpected ')' in C:\xampp\htdocs\datagrid\include\cls_control.php on line 52

 

Here's the cls_control.php file:

 

<?php


class c_htmlcontrol
{

    var $type;
    var $varname;
    var $text;
    var $val;
    var $is_choosen;
    var $is_disabled;
    var $attr_select;

    function c_htmlcontrol( $newtype, $newvarname, $newval, $newtext, $new_attrselect, $disable = false )
    {
        $this->type = $newtype;
        $this->text = $newtext;
        $this->varname = $newvarname;
        $this->val = $newval;
        $this->is_choosen = false;
        $this->is_diabled = $disable;
        $this->attr_select = $new_attrselect;
    }

    function render( )
    {
        $html = "";
        switch ( $this->type )
        {
            case "select" :
                $html .= "<option value='".$this->val."'";
                break;
            default :
                $html .= "<input name ='".$this->varname."[]' id   ='".$this->varname."[]' type ='".$this->type."' value='".$this->val."'";
                $html .= $this->is_disabled ? " onfocus='blur();' " : "";
        }
        $html .= $this->is_choosen ? " ".$this->attr_select." " : "";
        $html .= " />".$this->text;
        echo $html;
    }

}

class radio extends c_htmlcontrol
{

    var $type;

    function render( )
    {
        ( );
    }

    function radio( $newvarname, $newval, $newtext )
    {
        ( "radio", $newvarname, $newval, $newtext, "checked" );
    }

    function get_value( )
    {
        return $this->val;
    }

    function set_value( $newval )
    {
        $this->val = $newval;
    }

}

class dropdown extends c_htmlcontrol
{

    function render( )
    {
        ( );
    }

    function dropdown( $newvarname, $newval, $newtext )
    {
        ( "select", $newvarname, $newval, $newtext, "selected" );
    }

    function get_value( )
    {
        return $this->val;
    }

    function set_value( $newval )
    {
        $this->val = $newval;
    }

}

class checkbox extends c_htmlcontrol
{

    var $delimiter;

    function render( )
    {
        ( );
    }

    function checkbox( $newvarname, $newval, $newtext, $newdelim )
    {
        $this->delimiter = $newdelim;
        ( "checkbox", $newvarname, $newval, $newtext, "checked" );
    }

    function get_value( )
    {
        return $this->val;
    }

    function set_value( $newval )
    {
        $this->val = $newval;
    }

    function get_delimiter( )
    {
        return $this->delimiter;
    }

    function set_delimiter( $newdelim )
    {
        $this->delimiter = $newdelim;
    }

}

class multiselect extends c_htmlcontrol
{

    var $delimiter;
    var $size;

    function render( )
    {
        $html = "";
        $html .= "<option value='".$this->val."'";
        $html .= $this->is_choosen ? " ".$this->attr_select." " : "";
        $html .= " />".$this->text;
        echo $html;
    }

    function multiselect( $newvarname, $newval, $newtext, $newsize, $newdelim )
    {
        $this->size = $newsize;
        $this->delimiter = $newdelim;
        ( "select", $newvarname, $newval, $newtext, "selected" );
    }

    function get_value( )
    {
        return $this->val;
    }

    function set_value( $newval )
    {
        $this->val = $newval;
    }

    function get_delimiter( )
    {
        return $this->delimiter;
    }

    function set_delimiter( $newdelim )
    {
        $this->delimiter = $newdelim;
    }

}

?>

Link to comment
https://forums.phpfreaks.com/topic/187351-datagrid-error-i-need-your-help/
Share on other sites

I would put my money on the render functions with just ( ); inside them..

Also the radio, dropdown, checkbox, multiselect functions look a little wrong aswell..

function radio( $newvarname, $newval, $newtext )
    {
        ( "radio", $newvarname, $newval, $newtext, "checked" );
    }

 

  • 2 months later...

So, when you see their uncrypted code, how is the function syntax you describe in the head of this post :

function radio( $newvarname, $newval, $newtext )
    {
        ( "radio", $newvarname, $newval, $newtext, "checked" );
    }

 

For me, this syntax "( "radio", $newvarname, $newval, $newtext, "checked" );" seems very strange.

My Apache Server (with EasyPHP) always found the same parse error about this line.

 

Eventually, could you send me your uncrypted version by this mail : [email protected]  ??

I'd be very grateful

 

Thx in advance...

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.