Jump to content

Archived

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

snteran

Function problem

Recommended Posts

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

Share this post


Link to post
Share on other sites
notice how the line

[code]var $functions;[/code]

is in there twice....

Try removing one of them.

Share this post


Link to post
Share on other sites

×

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.