r5mjh |
12-30-2015 04:43 PM |
basically the code controls many different php pages, also the custom software has to require 2 other modified files header.php,global.php
but if i change the php to 5.4 nothing works
4.2.3 requires 5.4 and 3.8.9 requires 5.3 or above we are currrently on 3.7.1
i can provide some code which is from the home.php file which works on 5.2.17 but not 5.4
PHP Code:
<?php
// number of news items to show on home page: $news_items = 5;
//########################
require_once("header.php"); // header calls /boards/global.php
$username=$vbulletin->userinfo['username']; $userid=$vbulletin->userinfo['userid']; $usergroupid=$vbulletin->userinfo['usergroupid']; $totalposts=vb_number_format($vbulletin->userinfo['posts']); $token=$vbulletin->userinfo['securitytoken'];
function is_member() { // are we a member ? if($GLOBALS['usergroupid'] != "1" AND $GLOBALS['usergroupid'] != "2" AND $GLOBALS['usergroupid'] != "3") return TRUE; else return FALSE; }
if(is_member) { $chat_link = "http://www/chat/login.php"; $shop_link = "/shop/"; $class_link = "/boards/forumdisplay.php?f=14"; $articles_link = "/boards/forumdisplay.php?f=17"; $club_link = "/club/"; } else { $chat_link = "/guest.php"; $shop_link = "/guest.php"; $class_link = "/guest.php"; $articles_link = "/guest.php"; $club_link = "/guest.php"; }
$files_link = "/files/";
// go html: ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>RTOC - Renault Turbo Owners Club</title> <meta http-equiv=Content-Type content="text/html; charset=iso-8859-1"> <meta name="generator" content="RTOC"> <meta name="keywords" content="rtoc,renault,turbo,owners,club,r5gtt,turbo,r9,r11,r21,forum"> <!-- CSS Stylesheet --> <style type="text/css"> body { background: #FFFFFF; color: #000000;; margin: 0px 0px 0px 0px; padding: 0px; font: 11px Verdana, Helvetica, sans-serif; } .rtoc_nav { background: #6080c0; color: #FFFFFF; font: 10px Verdana, Helvetica, sans-serif; } .rtoc_nav a:link, .rtoc_nav_alink { color: #ffffff; text-decoration: none; } .rtoc_nav a:visited, .rtoc_nav_avisited { color: #ffffff; text-decoration: none; } .rtoc_nav a:hover, .rtoc_nav a:active, .rtoc_nav_ahover { color: #FFFFFF; text-decoration: underline; } .home_nav a:link, .home_nav_alink { color: #000000; text-decoration: none; } .home_nav a:visited, .home_nav_avisited { color: #000000; text-decoration: none; } .home_nav a:hover, .home_nav a:active, .home_nav_ahover { color: #000000; text-decoration: underline; } .box { border: 1px #888888 solid; } </style> <!-- / CSS Stylesheet --> </head> <body text="#000000" bgcolor="#FFFFFF"> <?
// show page header show_page_header();
?> <table border="0" cellspacing="2" cellpadding="0"><tr><td width="100%"></td></tr></table> <!-- MAIN TABLE --> <table width="100%" bgcolor="#FFFFFF" border="0" cellpadding="0" cellspacing="0"> <tr> <!-- LEFT COLUMN --> <td align="left" valign="top" width="180" bgcolor="#CCCCD2"> <? show_left_nav(); ?> <table border="0" width="175" cellpadding="3" cellspacing="0"><tr> <td align="left" width="175"> <? // visitor counter removed, forever re-setting for some reason :-( Scoff //Visits: <? // do counter: //$fh = fopen('main_page_counter.dat', 'r') or die("Can't open counter file!"); //$line = fgets($fh); //$data = explode("|",$line); //fclose($fh); //$data[1] ++; //$fh = fopen('main_page_counter.dat', 'w') or die("Can't write to counter file!"); //fputs($fh,"|".$data[1]."|"); //fclose($fh); //print $data[1]; ?> <br><br><br><br><br><br><br><br><br><br><br><br><br></td></tr></table> <br><br> </td> <td width="2" bgcolor="#BBBBBB"></td> <td width="10"></td> <td valign="top"> <!-- CENTER COLUMN --> <!-- MAIN TABLE --> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td align="left" valign="top"> <? if($userid!="0"){ print "<b>Hi $username</b>, w";} else { print "W"; } ?>elcome to the internet home of the Renault Turbo owners club, the largest collection of Renault turbo enthusiasts on the internet. Catering for all types of Renault turbo including the 5 GT Turbo, 9 Turbo, 11 turbo, 21 Turbo, 25 V6 turbo, R5 Turbo 1 and 2's, Alpine, Gordini, Twingo turbo, Megane Sport Turbo and other one-off's and modern Renault Turbo variants too. <br><br> <img src="/images/a.gif"><img src="/images/a.gif"> <img src="/images/latest-news.gif"> <br><br> <!-- NEWS SCRIPT OUTPUT --> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td align="left" valign="top"> <?
// open news file: $fh = fopen('news/news.txt', 'r') or die("Can't open news file!");
// loop to fetch top news items: $count = 0; while (($count < $news_items) AND !feof($fh)) { $data = fgets($fh); list($junk,$title,$image,$short,$long,$on_off,$img_on_off) = split('\|',$data);
// are we showing this item ? if ($on_off=="ON") { // start TD: $count++; print "<!-- NEWS ITEM " . $count . "-->\n"; print "<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n<tr>\n"; // are we showing an image ? if ($img_on_off=="ON") { print "<td align=\"left\" valign=\"top\" width=\"150\"><img src=\"$image\"></td><td width=\"8\"></td>\n"; }
print "<td align=\"left\" valign=\"top\">\n"; print "<b><u>$title</u></b><br><br>\n"; print $short . "\n</td>\n</tr>\n</table>\n<br>\n"; print "<!--- / NEWS ITEM " . $count . "-->\n"; }
}
// close the file: fclose($fh);
?> </td></tr></table> </td> </tr> </table> </td> <td width="10"></td> <td align="right" valign="top" width="202"> <!-- RIGHT COLUMN --> <?
// show join-now to non-paid members: if (($usergroupid == "1") OR ($usergroupid == "2")) { ?> <!-- JOIN NOW --> <table border="0" cellpadding="5" cellspacing="0" width="200"> <tr> <td align="left" valign="top" bgcolor="#EEEEF0" class="box"> <img src="/images/a.gif"> <a href="/club/?show=join"><img src="/images/join-now.gif" border="0"></a> <br> <a href="/club/?show=join"><font color="#000000">Join RTOC today!</font></a> </td> </tr> </table> <br> <? } ?> <!-- BOARDS --> <table border="0" cellpadding="5" cellspacing="0" width="200"> <tr> <td align="left" valign="top" bgcolor="#EEEEF0" class="box"> <img src="/images/a.gif"> <a href="/boards/"><img src="/images/boards.gif" border="0"></a> <br> The club message boards lets you chat with other members and send & receive private messages. </td> </tr> </table> <br> <!-- EVENTS --> <table border="0" cellpadding="5" cellspacing="0" width="200"> <tr> <td align="left" valign="top" bgcolor="#EEEEF0" class="box"> <img src="/images/a.gif"> <a href="/boards/events.php"><img src="/images/events.gif" border="0"></a> <br> Check out forthcoming events in our club calendar. </td> </tr> </table> <br> <!-- ARTICLES --> <table border="0" cellpadding="5" cellspacing="0" width="200"> <tr> <td align="left" valign="top" bgcolor="#EEEEF0" class="box"> <img src="/images/a.gif"> <a href="<? print $articles_link; ?>"><img src="/images/articles.gif" border="0"></a> <br> Technical advice, data and other interesting stuff. </td> </tr> </table> <br> <!-- CLASSIFIEDS --> <table border="0" cellpadding="5" cellspacing="0" width="200"> <tr> <td align="left" valign="top" bgcolor="#EEEEF0" class="box"> <img src="/images/a.gif"> <a href="<? print $class_link; ?>"><img src="/images/classifieds.gif" border="0"></a> <br> Renault turbo related classifieds<br>for sale and wanted. </td> </tr> </table> <br> <!-- FILES --> <table border="0" cellpadding="5" cellspacing="0" width="200"> <tr> <td align="left" valign="top" bgcolor="#EEEEF0" class="box"> <img src="/images/a.gif"> <a href="<? print $files_link; ?>"><img src="/images/files.gif" border="0"></a> <br> Files area - pictures, technical images, members files, etc. </td> </tr> </table> <br> <!-- WIZARD --> <table border="0" cellpadding="5" cellspacing="0" width="200"> <tr> <td align="left" valign="top" bgcolor="#EEEEF0" class="box"> <img src="/images/a.gif"> <a href="/wizard/"><img src="/images/wizard.gif" border="0"></a> <br> The Wizard - on hand to answer your technical questions. </td> </tr> </table> <br> <!-- CONTACTS --> <table border="0" cellpadding="5" cellspacing="0" width="200"> <tr> <td align="left" valign="top" bgcolor="#EEEEF0" class="box"> <img src="/images/a.gif"> <a href="/contacts/"><img src="/images/contacts.gif" border="0"></a> <br> Contact directory - see which companies offer you Discount! </td> </tr> </table> <br> <!-- CONTACT --> <table border="0" cellpadding="5" cellspacing="0" width="200"> <tr> <td align="left" valign="top" bgcolor="#EEEEF0" class="box"> <img src="/images/a.gif"> <a href="/contact.php"><img src="/images/contact.gif" border="0"></a> <br> Visit our contact page if you'd like to get in touch with the club. </td> </tr> </table>
</td> <td width="4"></td> </tr> </table> </body> </html>
|