atholon Posted November 14, 2007 Share Posted November 14, 2007 Wow, something goofed up is going on with my script. It is cutting off half the script. I cannot figure out why... any ideas? This is where it calls the function to print that part: <?php $user="admin"; definevariables(); $id=$_REQUEST['id']; switch( $_REQUEST['view']) { case "editingsoft": Print_Article_List('Editing Software'); break; case "editingsoftarticle": Print_Software_Article($id); break; case "sfxsoft": Print_Article_List('SFX Software'); break; case "sfxsoftarticle": Print_Software_Article($id); break; case "animsoft": Print_Article_List('Animation Software'); break; case "animsoftarticle": Print_Software_Article($id); break; case "dvdrip": Print_Article_List('DVD Ripping'); break; case "dvdriparticle": Print_Software_Article($id); break; case "dvdcomp": Print_Article_List('DVD Composition'); break; case "dvdcomparticle": Print_Software_Article($id); break; case "misc": Print_Article_List('Miscellaneous'); break; case "miscarticle": Print_Software_Article($id); break; case "theadminscreen": PrintAdmin(); break; case "index": PrintTheIndex(); break; case "addprogarticle": Add_Program_Article(); break; case "addprog": Add_Program(); break; case "deleteprog": ProcessDelete($_REQUEST['iId']); break; case "editprog": PrintEditHTML($_REQUEST['iId']); break; case "proglist": Program_List(); break; case "approveprogram": Approve($id); break; case "deleteprogram": Delete_Program($_REQUEST['id']); break; case "editprogram": Edit_Program($_REQUEST['id']); break; case "submitprogram": Submit_Program($_REQUEST['programname'],$_REQUEST['publisher'],$_REQUEST['category1'],$_REQUEST['publishersite']); break; case "addarticle": Article_Proc($_REQUEST['progname'], $_REQUEST['publisher'], $_REQUEST['category1'], $_REQUEST['price'], $_REQUEST['thearticle']); break; default: PrintTheIndex(); break; } ?> This is the function function Print_Software_Article($iSid) { $nmi=mysql_fetch_array(mysql_query("SELECT * FROM videoarticle WHERE sid='$iSid'")); $program=htmlspecialchars(stripslashes($nmi["title"])); $publisher=htmlspecialchars(stripslashes($nmi["publisher"])); $price=htmlspecialchars(stripslashes($nmi["price"])); $rating=htmlspecialchars(stripslashes($nmi["rating"])); $category=htmlspecialchars(stripslashes($nmi["category"])); $date=htmlspecialchars(stripslashes($nmi["date"])); $id=htmlspecialchars(stripslashes($nmi["sid"])); $submitter=htmlspecialchars(stripslashes($nmi["username"])); $thearticle=nl2br(htmlspecialchars(stripslashes($nmi["thearticle"]))); $image1=$nmi["img1"]; $image2=$nmi["img2"]; echo ("<table border=\"1\" width=\"95%\" height=\"70%\" cellspacing=\"0\" cellpadding=\"4\" style=\"border-collapse: collapse\" bordercolor=\"#C0C0C0\" bgcolor=\"#FAFAFA\" align=\"center\" valign=\"top\">"); echo (" <tr><td>"); echo (" <table border=\"0\" width=\"90%\" height=\"100%\" cellspacing=\"0\" cellpadding=\"4\" style=\"border-collapse: collapse\" bordercolor=\"#C0C0C0\" align=\"center\" valign=\"top\">"); echo (" <tr><td valign=\"top\">"); echo (" <b>Program:</b> $program <br>"); echo (" <b>Publisher:</b> $publisher<br>"); echo (" <b>Date Updated:</b> $date<br>"); echo (" <b>Rating:</b> $rating<br>"); echo (" <b>Price:</b> $price<br>"); if (isset($_SESSION['admin_is_logged_in']) && $_SESSION['admin_is_logged_in']== "true") { echo(" <br><div align=\"right\"><font color=\"#666666\" face=\"verdana, arial, sans-serif\"><a href=\"$_SERVER[php_SELF]?view=editprog&iId=$id\">Edit</a> - <a href=\"$_SERVER[php_SELF]?view=deleteprog&iId=$id\">Delete</a></font></div><br>"); } else { } echo (" <table border=\"0\" width=\"90%\" height=\"100%\" cellspacing=\"0\" cellpadding=\"4\" style=\"border-collapse: collapse\" bordercolor=\"#C0C0C0\" align=\"center\" valign=\"top\">"); echo (" <tr><td>"); $article=HTMLize($thearticle); echo (" </td>"); if (isset($image1)) { echo(" <td><div align=\"right\"><a href=\"$image1\" target=\"_blank\"><img src=\"$image1\" width=\"110\" height=\"150\"></a>"); } else { } if (isset($image2)) { echo(" <br><br><div align=\"right\"><a href=\"$image2\" target=\"_blank\"><img src=\"$image2\" width=\"110\" height=\"150\"></a></td>"); } else { } echo (" </tr></table>"); echo ("</td></tr>"); echo ("</table>"); echo ("</td></tr>"); echo ("</table>"); echo ("<br><br>"); } Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted November 14, 2007 Share Posted November 14, 2007 i'm not going to read that, but from the looks of it your element containing that has an overflow:hidden property set as you can see the image is being cut also, its height then too is being constrained Quote Link to comment Share on other sites More sharing options...
phpQuestioner Posted November 14, 2007 Share Posted November 14, 2007 I might be wrong, but it looks like your table is not nested exactly the right way - that may be why it's getting cut off. Quote Link to comment Share on other sites More sharing options...
Aureole Posted November 14, 2007 Share Posted November 14, 2007 If the element in question is floated you'll need to clear it I think... I've seen similar problems happen when floats aren't cleared. Quote Link to comment 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.