Location: PHPKode > projects > Online Resource Management system > storms/user/user_view_software_requesttray.php
<?php

/**************************************************
 *   File name: user_view_software_requesttray.php
 *   Function: Software request tray view page
 *   Maintained by: Raymond Lai
 *   Updated: 3 May 2001
 *   Input: Nil
 *   Output: Nil
 *   Purpose: To list all user selected software
 *            in user's request tray
 **************************************************/

include("../includes/session_mysql.inc");
include("../includes/global-vars.inc");

session_start();
session_register("user_class");
session_register("username");
session_register("name");
session_register("lang");
session_register("software_request_items");

include("$lang.inc");

mysql_connect($dbhost, $dbuser, $dbpasswd);

reset($software_request_items);

$query = "select softwareID, software_name from software where softwareID = '" . $software_request_items[0] . "'";

while($array_prop = each($software_request_items))
{
    $query .= " or softwareID = '" . $array_prop["value"] . "'";
}

$result = mysql_db_query($dbname, $query);

?>

<html>
<head>
<title><?php print $msg_tray_software_title; ?></title>
<?php print $doc_encoding; ?>
<link rel="stylesheet" href="../style_<?php print $lang; ?>.css" type="text/css">
</head>
<script language="JavaScript" type="text/javascript" src="../js/details_window.js"></script>
<body bgcolor="#FFFFFF" text="#000000" topmargin="0" leftmargin="0" marginwidth="0" marginheight="0" bottommargin="0" rightmargin="0">
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
		<td width="160" bgcolor="#FFFFFF" valign="top"> 
<?php include("menu.inc"); ?>
		</td>
		<td valign="top"> 
				<table width="90%" border="0" cellspacing="0" cellpadding="5">
                                <tr>
					<td colspan="4">
						<h3 class="heading"><?php print $msg_tray_software_title; ?></h3>
					</td>
				</tr>
				<tr>
                                        <td colspan="4" height="20"><span class="text12px"><?php print $msg_user;?></span><span class="text12pxbold"><?php print $name; ?></span></td>
				</tr>
				<tr>
                                        <td height="50" valign="middle" width="25%"><?php print $msg_browse_software_search; ?></td>
					<form action="user_search_software.php">
                                                <td width="25%">
                                                        <input type="text" name="softwarename">
                                                </td>
                                                <td width="50%" colspan="2">
                                                        <input type="submit" name="Submit" value="Search">
                                                </td>
					</form>
                                </tr>
				<tr>
                                        <td colspan="4"><?php printf($msg_tray_software_total, count($software_request_items)); ?></td>
                                </tr>
<?php

$rowcolor = $major_color;
while($row = mysql_fetch_array($result))
{
        if($rowcolor == $minor_color)
                $rowcolor = $major_color;
        else
                $rowcolor = $minor_color;
        print "\t\t\t\t<tr bgcolor=\"$rowcolor\">\n\t\t\t\t\t<td width=\"80%\" colspan=\"3\"><a href=\"#\" onClick=\"showDetails('software', '" . $row["softwareID"] . "', 601, 550)\" class=\"textlink\">". $row["software_name"] . "</a></td><td><a href=\"user_remove_software_from_tray.php?softwareid=" . $row["softwareID"] . "\" class=\"textlink\">$msg_tray_special</a></td></tr>\n";
} 
?>
				<tr>
					<td colspan="4" height="30"><hr></td>
				</tr>					
				<tr>
					<td colspan="2"><a href="user_browse_software.php" class="textlink"><?php print $msg_option_software_list; ?></a></td>
<?php
if($software_request_items)
{
?>
					<td colspan="2" align="center"><a href="user_software_checkout.php" class="textlink"><?php print $msg_tray_software_checkout; ?></a></td>
<?php
}
else
{
?>
					<td colspan="2">&nbsp;</td>
<?php
}
?>
				</tr>
                      </table>
		</td>		
	</tr>
</table>
</body>
</html>
Return current item: Online Resource Management system