Jump to content


Photo

Function problem


  • Please log in to reply
1 reply to this topic

#1 snteran

snteran
  • Members
  • PipPip
  • Member
  • 26 posts

Posted 07 April 2006 - 11:26 PM

I am trying to load this free script that I found for a sales management system, something like ACT! or Goldmine and I am getting an error.

Fatal error: Cannot redeclare CSQLAdmin::$functions in C:\AMP\Apache2\htdocs\sms\lib\sqladmin.php on line 33

Here is the code from the sqladmin.php file ( I colored line 33 in Red):

<?php

/**
*/
class CSQLAdmin extends CLibrary {

/**
* description
*
* @var type
*
* @access type
*/
var $form;

/**
* description
*
* @var type
*
* @access type
*/
var $functions;


/**
* description functions list which will be executed in variouse points of sqladmin
*
* @var type
*
* @access type
*/
[!--coloro:#FF0000--][span style=\"color:#FF0000\"][!--/coloro--]var $functions;[!--colorc--][/span][!--/colorc--]


function CSQLAdmin($section , $templates , $db , $tables , $extra = "") {
global $_CONF;

if (!$_GET["page"])
$_GET["page"] = 1;


parent::CLibrary("SQLAdmin");

//checking if the templates are orblects or path to a template file
if (!is_array($templates))
//if path the load the tempmate form that file
$this->templates = array("generic_form" => new CTemplate($templates));
else
$this->templates = $templates;

$this->db = $db;
$this->tables = $tables;
//extra variables to be passed to cform
$this->extra = $extra;


I do have some PHP experience but not much at all with functions.

thanks,

Serge

#2 hitman6003

hitman6003
  • Members
  • PipPipPip
  • Advanced Member
  • 1,807 posts

Posted 08 April 2006 - 02:28 AM

notice how the line

var $functions;

is in there twice....

Try removing one of them.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users