Jump to content

jmosher

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

jmosher's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. You have a great day. I knew someone had a GOD complex. ---------------
  2. BTW it worked well. Would you explain a bit more so I can be humbled by your ever growing GOD complex.
  3. I'll give that a shot.  Do I still need to set the @ function in front of the variables I mentioned previously.
  4. Hi Guys, What I did was roll back as per your notion support for $this has not been dropped and this is the original error received: Fatal error: Cannot re-assign $this in /usr/share/calltracker/includes/functions.php on line 964 Here is the code snippet for the function having a problem. 946 //--------------------------------------------------------+     947 // Admin table heading output                            |     948 //--------------------------------------------------------+     949     950 function admin_table_heading( $title="" ) {     951     952        global $template, $CONF;     953     954        //--------------------------------     955        // If this has not yet been loaded,     956        // load it and cache it.     957     958        if(!isset($GLOBALS['table_header_html']))     959        #{     960                #$lines = implode( file("../includes/admin_skins/".$CONF['admin_template']."/table-heading.inc"), "");     961                #$GLOBALS['table_header_html'] = $lines;     962        #}     963     964        $this = str_replace("{TITLE}", $title, $GLOBALS['table_header_html']);     965     966        output( $this );     967     968        unset($this);     969     970          output( "<table width=100% cellpadding=0 cellspacing=0 style=\"border-bottom: 1px solid #1B95CE\">     971                <tr><td width=20><img src=../images/general/table-topleft.jpg></td>     972                    <td background=../images/general/table-toptile.jpg height=21><table width=100%     973                cellpadding=0 cellspacing=0><tr><td><font color=white><b> " . $title . "</b></font></td></tr></table></td><td width=20><img src=../im        ages/general/table-topright.jpg></td>     974                </tr>");     975     976 } The original error I posted was produced following these changes - Updating $this to $result as per this php page indicating that the $this variable was an undocumented feature that was never to be supported and officially dropped in version 5: http://bugs.php.net/bug.php?id=27659&edit=1 Setting these functions to array functions, which are now required based on the way php5 parses the information. 585c585 <              mysql_close($this->connection); --- >              @mysql_close($result->connection); 591c591 <              return mysql_insert_id(); --- >              return @mysql_insert_id(); 602c602 <              return mysql_error(); --- >              return @mysql_error(); So now I'm at the original start point with no applied changes and I'm hoping you could help. Thanks -- Jerry
  5. I'm hoping someone might be able to help me out with this issue. I converted to PHP5 from PHP4 and found there are new stricter methods to handle calls and queries. When I try to logon to my system to access my database I receive the following error: Fatal error: Call to undefined method stdClass::setPageContent() in /usr/share/calltracker/includes/functions.php on line 402 Here is the code specific to that section in functions.php: 400 # First set the page content array entry 401 402 $result->setPageContent(); 403 404 # Get the page navigation function 405 406 $result->parameters["SMALL_NAV"] = admin_page_navigation(); 407 $result->parameters["NAV_TREE"] = admin_page_navigation("tree"); 408 $result->parameters["USER_NAVBAR"] = user_page_navigation(); 409 $result->parameters["VERSION"] = EP_VERSION; 410 $result->parameters["SCRIPT_NAME"] = EP_SCRIPT_NAME; 411 $result->parameters["COPYRIGHT"] = COPYRIGHT; 412 $result->parameters["NUMQUERIES"] = count($db->queries); 413 414 # Set the template to the configured value 415 416 if($result->template == "") { $result->template = $CONF['template']; } 417 418 if($result->no_cache == 1) 419 { 420 $result->html = $GLOBALS['reg']; 421 } 422 else 423 { 424 # Import the template code 425 426 $result->html = implode(file($result->template),""); 427 } 428 429 # Replace every tag in the template 430 # with its entry in the parameters 431 # array 432 433 foreach($result->parameters as $key => $value) 434 { 435 436 $result->tag = '{' . "$key" . '}'; 437 438 if($key != "PAGE_CONTENT") 439 { 440 $result->html = str_replace($result->tag,$value,$result->html); 441 } 442 443 } 444 445 $result->html = str_replace("{PAGE_CONTENT}", $result->parameters["PAGE_CONTENT"], $result->html); 446 447 # Output the created HTML code 448 449 echo($result->html); 450 451 } 452 453 # This function will set a value in the parameters 454 # array 455 456 function setParameter($name,$value) { 457 458 $result->parameters[$name] = $value; 459 460 } 461 462 # This concludes the template object 463 464 } No problems are experienced when using PHP4.3.x Note**: The variable $result has replaced the accepted variable function $this as $this has been discontinued in version 5 and support is no longer offered. Thanks for any help offered.
×
×
  • 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.