Jump to content

Weird Glitch


atholon

Recommended Posts

Wow, something goofed up is going on with my script. It is cutting off half the script.

cut.gif

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>");
}

Link to comment
https://forums.phpfreaks.com/topic/77262-weird-glitch/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.