<?php
/***************************************************
* File name: user_software_add2req.php
* Function: Shopping cart" for user software requests
* Maintained by: Raymond Lai
* Last update: 3 May 2001
* Input : softwareID
* Output: softwareID entry at the user's session
* Purpose: To add a user selected software to the
* "shopping cart"
***************************************************/
include("../includes/session_mysql.inc");
include("../includes/global-vars.inc");
session_start();
session_register("software_request_items");
session_register("username");
mysql_connect($dbhost, $dbuser, $dbpasswd);
if(!isset($software_request_items))
$software_request_items = array();
reset($software_request_items);
if(count($software_request_items) >= $softhard_borrow_quota)
{
?>
<html>
<link rel="stylesheet" href="../style.css" type="text/css">
<body>
<p>Your software loan quota is full.</p>
<p>You can, however, <a href="user_browse_software.php" class="textlink">go back to the software catalogue</a>.<br>
<?php
if($software_request_items)
{
?>
Or, you can<a href="user_view_software_requesttray.php" class="textlink">review your software request list</a>,<br>
or <a href="user_software_checkout.php" class="textlink">check out your software hold requests now</a>.</p>
<?php
}
?>
</p>
</body>
</html>
<?php
exit;
}
else
{
$software_request_items["$softwareid"] = $softwareid;
header("Location: $HTTP_REFERER");
exit;
}
?>