Daniellez
09-13-2009, 11:20 AM
I have a few php docs that are loaded with print commands. Is there a way to streamline this code to alleviate all the print commands (or consolidate them in some fashion?)
print "<table align=\"center\" class=\"content\">\n";
print "<tr>\n";
print "<td valign=\"top\">\n\n";
print "<div align='center'><br />";
if (isset($_GET['directory_name']))
{
print "$StrDeleteFolderQuestion<br />";
print "<strong>";
print "/".htmlentities($path.$directory_name);
print "</strong><br />";
}
else if (isset($_GET['filename']))
{
print "$StrDeleteFileQuestion<br />";
print "<strong>";
print "".htmlentities($path.$filename);
print "</strong><br />";
}
print "<a href='$base_url."'><img src='gfx/button_cancel.png' alt='$StrCancel' width='122' height='27' border='0'></a>";
print " ";
if (isset($_GET['directory_name'])) print "<img src='gfx/delete_folder.png' alt='$StrYes' width='145' height='27' border='0'>";
else if (isset($_GET['filename'])) print "<img src='gfx/delete_file.png' alt='$StrYes' width='145' height='27' border='0'>";
print "</div>";
print "</td>";
print "</tr>";
print "</table>";
print "<table align=\"center\" class=\"content\">\n";
print "<tr>\n";
print "<td valign=\"top\">\n\n";
print "<div align='center'><br />";
if (isset($_GET['directory_name']))
{
print "$StrDeleteFolderQuestion<br />";
print "<strong>";
print "/".htmlentities($path.$directory_name);
print "</strong><br />";
}
else if (isset($_GET['filename']))
{
print "$StrDeleteFileQuestion<br />";
print "<strong>";
print "".htmlentities($path.$filename);
print "</strong><br />";
}
print "<a href='$base_url."'><img src='gfx/button_cancel.png' alt='$StrCancel' width='122' height='27' border='0'></a>";
print " ";
if (isset($_GET['directory_name'])) print "<img src='gfx/delete_folder.png' alt='$StrYes' width='145' height='27' border='0'>";
else if (isset($_GET['filename'])) print "<img src='gfx/delete_file.png' alt='$StrYes' width='145' height='27' border='0'>";
print "</div>";
print "</td>";
print "</tr>";
print "</table>";