gnize Posted July 6, 2008 Share Posted July 6, 2008 Hello. I'm having some issues with a phpnuke module. I understand this forum isnt for nuke but the issue is mostly just php. K. so I'll lay out the issue. The module is a user profile that can be edited by the user. Once a user makes an account on the site I add his account number to the module and they can edit there profile. Everything is working fine but one feature. Its for a gaming site and there is an option to upload a screenshot/picture/jpg. When I'm logged into the site and edit my profile then upload a picture I can see the picture. but when the general public goes to look at the picture it cant be seen. here is the php file I'm having issues with. Could someone check it out and tell me whats wrong with it. <script language="javascript"> var URL = window.location.protocol+"//"+window.location.hostname; function open_window(xid, gid) { var final_url = URL+"/modules.php?name=clan_members&file=view_ss&xid="+xid+"&gid="+gid; window.open( final_url, "Screenshot_Viewer", "status=0, toolbar=0, location=0, menubar=0, directories=0, resizable=1, scrollbars=1, height=600, width=700"); return true; } </script> <?php /********************************************************/ /* Clan Members V2 */ /* */ /* By: Scrotaur (scrotaur@gmail.com) */ /* http://www.clan-ce.com */ /* Copyright © 2005 by clan-ce.com */ /* */ /********************************************************/ // Clan Member Module -- Individual member page if (!eregi("modules.php", $_SERVER['PHP_SELF'])) { die ("You can't access this file directly..."); } if(!isset($xid)) { header("Location: http://{$_SERVER['HTTP_HOST']}/modules.php?name=clan_members"); } // Include statements require_once("mainfile.php"); include("header.php"); include("modules/clan_members/functions.php"); getusrinfo($user); ////////////////////////////////// GetDisplayGames Function /////////////////////// function getDisplayGames($xid, $gs) { global $db, $user, $bgcolor1, $bgcolor2, $prefix; $string = ""; $games = explode(",", $gs); $size = count($games); sort($games); $height = round(100/$size); for($i=0; $i< $size; $i++) { if($i%2 == 0) $bg = $bgcolor1; else $bg = $bgcolor2; $query = "SELECT * FROM ".$prefix."_clan_game_accounts AS A, ".$prefix."_clan_games AS B WHERE A.member_id='$xid' AND A.is_hopefull = '0' AND A.game_id='".$games[$i]."' AND A.game_id=B.game_id LIMIT 1"; $result = $db->sql_query($query); $row = $db->sql_fetchrow($result); $string .= "\n<div align=\"center\" width=\"100%\" style=\"background-color:$bg; font-size:12px; border-style:ridge; border-width:2px; padding:7px\">\n"; $string .= "<div align=\"left\" style=\"margin-top:1.5em; z-index:100\"><img src=\"modules/clan_members/images/images.jpg".$row['game_pic_s_url']."\" align=\"left\"></div>"; $string .= "<div style=\"margin:-1em auto 1em 4em; text-align:left\"><b></b><br>\n"; $string .= "<a href=\"http://www.omfgxsv.com/stats/pub/themes/bismarck/index.php".$row['stats_link']."\" target=\"_blank\" style=\"font-size:12px\">Stats</a> | <a href=\"javascript:void(0)\" onclick=\"open_window('$xid','".$row['game_id']."')\" style=\"font-size:12px\">Screenshots</a>"; $string .= "</div>\n</div>\n"; } return $string; } $query = "SELECT * FROM ".$prefix."_clan_members AS A, ".$prefix."_clan_ranks AS B WHERE member_id='$xid' AND A.member_rank = B.rank_id LIMIT 1"; $result = $db->sql_query($query); $row = $db->sql_fetchrow($result); OpenTable(); echo "<table align=\"center\" width=\"85%\" border=\"1\" cellpadding=\"4\" cellspacing=\"2\">\n"; echo "<tr>\n"; echo "<th colspan=\"2\" align=\"center\"><h3>".replaceCode($row['member_name_complex'])."</h3><i>Profile Last Updated on ".get_date($row['member_updated_on'])."</i></th>\n"; echo "</tr>\n"; echo "<tr>\n"; echo "<td align=\"center\" rowspan=\"5\" valign=\"center\" width=\"325px\">".getImage($row['member_pic_url'])."</td>\n"; echo "<td>Real Name: <b>".$row['member_real_name']."</b></td>\n"; echo "</tr>\n"; echo "<tr>\n"; echo "<td>Rank: <b>".$row['rank_name']."</b></td>\n"; echo "</tr>\n"; echo "<tr>\n"; echo "<td>Location: <b>".$row['member_location']."</b></td>\n"; echo "</tr>\n"; echo "<tr>\n"; echo "<td>Birthdate: <b>".get_date($row['member_bday'])."</b></td>\n"; echo "</tr>\n"; echo "<tr>\n"; echo "<td>Member Since: <b>".get_date($row['member_join_date'])."</b></td>\n"; echo "</tr>\n"; //Games and contact information echo "<tr>\n"; echo "<th align=\"center\">Game Information</th>\n<th align=\"center\">Contact Information</th>\n"; echo "</tr>\n"; echo "<td rowspan=\"12\" width=\"325px\" valign=\"top\">".getDisplayGames($row['member_id'], $row['member_games'])."</td>\n"; echo "<td>Email: <b>".$row['member_email']."</b></td>\n"; echo "</tr>\n"; echo "<tr>\n"; echo "<td>AIM: <b>".$row['member_aim']."</b></td>\n"; echo "</tr>\n"; echo "<tr>\n"; echo "<td>MSN: <b>".$row['member_msn']."</b></td>\n"; echo "</tr>\n"; echo "<tr>\n"; echo "<td>YIM: <b>".$row['member_yim']."</b></td>\n"; echo "</tr>\n"; echo "<tr>\n"; echo "<td>Skype: <b>".$row['member_skype']."</b></td>\n"; echo "</tr>\n"; //Other Fun lil Information Section.. left side may end up just being a continuation instead of a new section echo "<tr>\n"; echo "<th>Other Information</th>\n"; echo "</tr>\n"; echo "<tr>\n"; echo "<td>Website: <b>".$row['member_website']."</b></td>\n"; echo "</tr>\n"; echo "<tr>\n"; echo "<td>Favorite Mod: <b>".$row['member_occupation']."</b></td>\n"; echo "</tr>\n"; echo "<tr>\n"; echo "<td>Favorite Weapon: <b>".$row['member_fav_books']."</b></td>\n"; echo "</tr>\n"; echo "<tr>\n"; echo "<td>Favorite Movies: <b>".$row['member_fav_movies']."</b></td>\n"; echo "</tr>\n"; echo "<tr>\n"; echo "<td>Personal Bind: <b>".$row['member_fav_quote']."</b></td>\n"; echo "</tr>\n"; echo "<tr>\n"; echo "<td>If I could have one thing from quake in the real world it would be: <b>".$row['member_about']."</b></td>\n"; echo "</tr>\n"; echo "</table>\n"; echo "<p align=\"center\">[ <a href=\"modules.php?name=clan_members\">Back to Main Clan Members List </a>]<br>\n"; if($userinfo['user_id'] == $row['user_id']) echo "[<a href=\"modules.php?name=clan_members&file=edit_profile&xid=".$row['user_id']."\"> Edit Your Profile </a>]"; echo "</p>\n<br>\n"; CloseTable(); include("footer.php"); ?> This is where I think the issue is.. $string .= "<a href=\"http://www.omfgxsv.com/stats/pub/themes/bismarck/index.php".$row['stats_link']."\" target=\"_blank\" style=\"font-size:12px\">Stats</a> | <a href=\"javascript:void(0)\" onclick=\"open_window('$xid','".$row['game_id']."')\" style=\"font-size:12px\">Screenshots</a>"; IT makes folders for the pictures. But for some reason it doesnt show the picture the user uploaded. Quote Link to comment https://forums.phpfreaks.com/topic/113477-need-some-help-phpnuke-type-module/ Share on other sites More sharing options...
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.