Notice: Object of class User could not be converted to int i nie wiem jak go poprawić. pozniżej daje kody gdzie występuje ten sam problem
1. Notice: Object of class User could not be converted to int in /home/xxx/public_html/loginpanel.php on line 13
<?php /********************************************************* * Author: John Astill (c) * Date : 10th December * File : loginpanel.php * Desc : Display the login panel if an user is not * : logged in. ********************************************************/ require_once "lang/lang.polish.php"; require_once ("lang/".GetLangFile()); if ($User == 0 || $User->loggedIn == FALSE) { ?> <!-- Login panel --> <form method="POST" action="index.php?cmd=login"> <table class="LOGINTB"> <tr> <td align="center" colspan="2" class="LOGINHD"> <font class="LOGINHD"> </font> </td> </tr> <tr> <td colspan="1" class="LOGINRW"> <font class="LOGINRW"> <small> </small> </font> </td> <td colspan="1" class="LOGINRW"> <font class="LOGINRW"> <input type="text" size="8" name="LOGIN"> </font> </td> </tr> <tr> <td colspan="1" class="LOGINRW"> <font class="LOGINRW"> <small> </small> </font> </td> <td colspan="1" class="LOGINRW"> <font class="LOGINRW"> <input type="password" size="8" name="PWD"> </font> </td> </tr> <tr> <td align="center" colspan="2" class="LOGINRW"> <font class="LOGINRW"> </font> </td> </tr> <?php // Only display this if the game is not locked. if ($LockedGame != "TRUE") { ?> <tr> <td colspan="2" class="LOGINRW"> <font class="LOGINRW"> </font> </td> </tr> <?php } ?> <tr> <td colspan="2" class="LOGINRW"> <font class="LOGINRW"> </font> </td> </tr> </table> </form> <?php } ?>
2.Notice: Object of class User could not be converted to int in /home/xxx/public_html/menus.php on line 94
<?php /********************************************************* * Author: John Astill * Date : 9th December * File : menus.php ********************************************************/ /******************************************************* * Check the user id and password from the cookie. *******************************************************/ $isAdmin = CheckAdmin($User->usertype); require "msgfunctions.php"; require ("lang/".GetLangFile()); ?> <script> <!-- function setGameDate(date, serveroffset){ var old = document.getElementById("SERVERTIME"); var bodyRef = document.getElementById("SERVER"); var newInput = document.createElement("div"); var bold = document.createElement("b"); var newText = document.createTextNode(date); //var newText = document.createTextNode("Server Side Time "+date); newInput.setAttribute("id","SERVERTIME"); bold.appendChild(newText); newInput.appendChild(bold); bodyRef.replaceChild(newInput,old); // Wait one minute setTimeout("document.frames[0].location.reload()",60000); return false; } //--> </script> <!-- Menu --> <table class="MENUTB"> <!-- Show the game time. --> <tr> <td align="center" class="LOGINHD"> <font class="LOGINHD"> </font> </td> </tr> <tr> <td align="center" class="TBLROW"> <font class="TBLROW"> <iframe id="SERVERFRAME" name="SERVERFRAME" style="width:0px; height:0px;border:0px" src="getgametime.php"></iframe> <div id="SERVER" name="SERVER"> <div id="SERVERTIME" name="SERVERTIME"> XX:XX </div> </div> </font> </td> </tr> <?php if (($homePage != "" and $homePageTitle != "") or $chatRoomURL != "") { ?> <tr> <td align="center" class="LOGINHD"> <font class="LOGINHD"> </font> </td> </tr> <?php } ?> <tr> <td class="TBLROW"> <!-- Home Page --> <?php if ($homePage != "" and $homePageTitle != "") { } ?> <?php if ($chatRoomURL != "") { ?> <?php } ?> </td> </tr> </table> <?php if ($User != 0 && $User->loggedIn == TRUE) { ?> <table class="MENUTB"> <tr> <td align="center" class="LOGINHD"> <font class="LOGINHD"> </font> </td> </tr> <?php $uid = $User->getUserId(); $query = "SELECT * FROM $dbaseStandings WHERE lid='$leagueID' and userid='$uid' ORDER BY week DESC"; $res = $dbase->query($query); ?> <tr> <td align="left" class="TBLROW"> <font class="TBLROW"> <?php if ($dbase->getNumberOfRows() > 0) { $position = $line["position"]; $points = $line["points"]; } else { $position = "-"; $points = "-"; } ?> </font> </td> </tr> <tr> <td align="center" valign="middle" class="TBLROW"> </a> </td> </tr> </table> <?php } ?> <table class="MENUTB"> <tr> <td align="center" class="LOGINHD"> <font class="LOGINHD"> </font> </td> </tr> <tr> <td class="TBLROW"> <!-- --> <?php // Only show these if the user is loged on if ($User->loggedIn == TRUE) { ?> </td> </tr> <?php // Only show this if messaging enabled if ($useMessaging == "TRUE") { ?> <tr> <td class="TBLROW"> </td> </tr> <?php } } ?> <tr> <td class="TBLROW"> </td> </tr> </table> <?php // If the user is an administrator, show the admin index. if($isAdmin) { require "adminmenus.php"; } ?> <!-- End Menu -->
Proszę o szybką odpowiedz jesli to możliwe. Z góry dziękuje Wam za pomoc.