orsino Posted April 18, 2013 Posted April 18, 2013 hello i need help on my userimages.php file . here is what the file is for when i go to that file its showing the images i uploaded and when i click on a image it needs to show a popup but that popup is not working here's the userimages file <?php /*------------includes--------------*/ include ('./includes/connections.php'); include ('./includes/brain_file.php'); include ('./includes/style_top.php'); /*------------includes--------------*/ $_GET['XID'] = abs(intval($_GET['XID'])); echo "<center><main>Images</main><hr width = '75%'>"; if(!$_GET['XID']) { echo "Error, Invalid ID! <hr width = '75%'>><a href=\"javascript:history.back();\">Back</a><hr width = '75%'>"; include ('./includes/style_bottom.php'); exit(); } else { if($_GET['XID'] == $_SESSION['playerid']) { echo "><a href='preferences.php?action=newpic'>Upload images</a><hr width = '75%'>"; } $q_ry = "SELECT `i_id`,`i_playerid`,`i_image`,`i_profile` FROM `member_images` WHERE `i_playerid` = '".mysql_real_escape_string($_GET['XID'])."'"; $any = mysql_query($q_ry); if(!mysql_num_rows($any)) { echo "Error, This user has no images uploaded. <hr width = '75%'>><a href=\"javascript:history.back();\">Back</a><hr width = '75%'>"; include ('./includes/style_bottom.php'); exit(); } else { $id = 0; echo "<table width = '75%' class = 'rounded' cellpadding = '10'><tr>"; $num = 0; while($i = mysql_fetch_array($any)) { $id++; $imgcheck = array(); $imgcheck = "images/uploads/id".$_GET['XID']."/".$i['i_image'].""; $size = array(); $size = getimagesize($imgcheck); if($size) { echo "<td align = 'center'> <span class = 'openPopup".$id."' rel = 'popup' id = '".$id."'> <img src = '".$imgcheck."' width = '160px'></span>"; echo "</td>"; } else { // error echo "<td align = 'center'><font color = 'red'><b>Error while loading image</b></font>.<td/>"; } $num++; if($num == '3') { echo "</tr><tr>"; $num = 0; } } echo "</tr></table> <hr width = '75%'>><a href='profile.php?XID=".$_GET['XID']."'>Back</a><hr width = '75%'>"; } } include ('./includes/style_bottom.php'); $q_ry = "SELECT `i_id`,`i_playerid`,`i_image`,`i_profile` FROM `member_images` WHERE `i_playerid` = '".mysql_real_escape_string($_GET['XID'])."'"; $any = mysql_query($q_ry); if(!mysql_num_rows($any)) { //Nothing to load } else { $id = 0; while($i = mysql_fetch_array($any)) { $idxx; $imgcheck = array(); $imgcheck = "images/uploads/id".$_GET['XID']."/".$i['i_image'].""; $size = array(); $size = getimagesize($imgcheck); if($size) { echo "<div class = 'openpopup' id = 'popup".$id."'> ".round_table('435')." <table width = '100%' border = '0' cellspacing = '0'> <tr bgcolor = '#999999'><td align = 'right'><span id = '".$id."' rel = 'closepopup'>X</span></td></tr> <td align = 'center'> <a href='viewimage.php?i=".$i['i_id']."&XID=".$_GET['XID']."'> <img src = '".$imgcheck."' width = '100%'></a> </td> </table> ".end_round()." </div>"; } else { //Nothing, Image error } } } ?> Quote
orsino Posted April 19, 2013 Author Posted April 19, 2013 (edited) its fixed... Edited April 19, 2013 by orsino update 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.