GregFest Posted April 21, 2011 Posted April 21, 2011 i was updating some codes in the global_func.php and my index and viewuser has gone it just shows a blank page i have fixed the index but still have no viewuser, we need help Quote
rulerofzu Posted April 21, 2011 Posted April 21, 2011 Always take a backup before you start updating codes. You are going to need to provide more info or source code Quote
Analog Posted April 21, 2011 Posted April 21, 2011 obviously something is causing an error... try setting php error reporting to all on your viewuser file and it might point you in the right direction error_reporting(E_ALL); Quote
GregFest Posted April 21, 2011 Author Posted April 21, 2011 viewuser a back up was made and files replaced but yeah i cant see problem Files.zip Quote
rulerofzu Posted April 21, 2011 Posted April 21, 2011 Hmm one....what version are you using. As its not secure. Also there is a function missing DateTime_Parse() Quote
lucky3809 Posted April 21, 2011 Posted April 21, 2011 (edited) Take a look.... echo " <h3><font color=orange>Profile for {$r['username']}</font></h3> <table width=100% cellspacing=1 class='' border='1'><tr style='background:darkred'><th>General Info</th><th>Financial Info</th> <th>Display Pic</th></tr> <tr> <td> Name: $user_name<br /> User Level: $userl<br /> <font color=yellow>$u_duties</font> <font color=#00FF00>Status Message: {$r['sm']}</font><br /> Gender: {$r['gender']}<br /> Married: $partner<br /> Signed Up: $sup<br /> Last Active: $lon<br /> Last Action: $ula<br /> Last Login: $ull<br /> Do you see anything wrong? your $vars is not going to show the way you have them it should be Name: '.$user_name.'<br /> also your query is screwed up... give me a few and i will fix it for you. Edited April 21, 2011 by lucky3809 Quote
rulerofzu Posted April 21, 2011 Posted April 21, 2011 Not the case lucky Difference between single and double quotes " text here $var"; works when using double quotes. Quote
rulerofzu Posted April 21, 2011 Posted April 21, 2011 After removing all your extras so i could test it the page loaded fine. So must be something in your extras from the default that is causing the problem. But I cannot see the datetime parse function in your global_func file Quote
lucky3809 Posted April 21, 2011 Posted April 21, 2011 (edited) not exactly i have got it working with his extra stuff... You are right about the vars after i uploaded the script to my server. but his bccode stuff is fine... its his query that is causing the problem... Edited April 21, 2011 by lucky3809 Quote
lucky3809 Posted April 21, 2011 Posted April 21, 2011 Replace query with: $q =$db->query("SELECT u.*,us.strength,us.agility,us.guard,us.labour,us.IQ,c.cityname,h.hNAME,g.gangNAME, f.fed_days,f.fed_reason FROM users u LEFT JOIN userstats us ON u.userid = us.userid LEFT JOIN cities c ON u.location=c.cityid LEFT JOIN houses h ON u.maxwill=h.hWILL LEFT JOIN gangs g ON g.gangID=u.gang LEFT JOIN fedjail f ON f.fed_userid=u.userid WHERE u.userid=".$_GET['u'].""); You do not need to select every single thing in the user table like you were if your going to select all use u.*.... I also found below the query you are missing a few IF statement endings... Quote
lucky3809 Posted April 21, 2011 Posted April 21, 2011 I agree 100% lol I looked at it and was like wth :-) Quote
GregFest Posted April 22, 2011 Author Posted April 22, 2011 alright what do you think about this i put v2.0 and v2.3 together and seems to work now fine only problem married not showing up, viewuser.zip Quote
rulerofzu Posted April 22, 2011 Posted April 22, 2011 I dont believe 2.3 comes with marriage so you would need to make sure you still have it in your users table. Or better still program it in again in a seperate table so your not cluttering up your users table which is already oversized in mc2.x anyway Quote
lucky3809 Posted April 22, 2011 Posted April 22, 2011 To be honest I think you need to learn your IF statements... here is a site that may help you learn... http://www.w3schools.com/php/php_if_else.asp Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.