Nick i dont know where you get the time, but i do appreciate the help.
i thought i was getting close.....
I am able to limit access to the web page based on the value in is_pending but cant seem to lock it down to the current user only.
this is what i have done.........................
i have a cron job which runs a query to check if there are any sessions awaiting aproval, this job is indescriminate it runs every hour and auto approves any record in is pending;
update reservations set is_pending=0 where (start_date + (60 * starttime)) < unix_timestamp() +3600 and is_pending = 1;
the effect of the is pending being set to 0 (approved) is to display an image with a link to another web page in the users control pannel view. to do this i have edited the cpannel.template.php.....
function showReservationTable($res, $err) {
global $link;
global $conf;
$order = array('start_date', 'end_date', 'name', 'starttime', 'endtime', 'created', 'modified','is_pending',);
$util = new Utility();
$qs = isset($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : '';
?>
<table width="100%" border="0" cellspacing="0" cellpadding="1" align="center">
<tr>
<td class="tableBorder">
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr>
<td class="tableTitle" width="120">
<a href="javascript: void(0);" onclick="showHideCpanelTable('reservation');">› <?php echo translate('My Reservations')?></a></div>
</td>
<td class="tableTitle" width="300">
<?php $link->doImageLink('export.php', 'img/export.gif', 'Export Reservations');
$today=date("m.d.y");
for ($i = 0; is_array($res) && $i < count($res); $i++) {
if ($res[$i]['is_pending']) { print("Demo sessions links will be available 1 hour before the sart time <br />");
}
else{$link->doImageLink('../lsi/ctrlpnl.php', 'img/launch.jpg', 'Launch Demo');
}
}
?>
then on the new ctrlpnl.php web page i have inserted before the html code.......
<?php
/**
* This file is the control panel, or "home page" for logged in users.
* It provides a listing of all upcoming reservations
* and functionality to modify or delete them. It also
* provides links to all other parts of the system.
* @author Nick Korbel <
lqqkout13@users.sourceforge.net>
* @version 03-30-06
* @package phpScheduleIt
*
* Copyright (C) 2003 - 2007 phpScheduleIt
* License: GPL, see LICENSE
*/
include_once('../remote/lib/Template.class.php');
include_once('../remote/lib/Utility.class.php');
include_once('../remote/templates/cpanel.template.php');
if (!Auth::is_logged_in()) {
Auth::print_login_msg(); // Check if user is logged in
}
$db = new DBEngine();
$user = new User(Auth::getCurrentID());
// Valid order values in reservation retreival
$order = array('start_date', 'name', 'starttime', 'endtime', 'created', 'modified','is_pending');
$res = $db->get_user_reservations(Auth::getCurrentID(), CmnFns::get_value_order($order), CmnFns::get_vert_order());
//check if the reservation has been approved if yes continue to HTML code below if no send error
if($res ['is_pending']==1){
print("sorry you do not have an approved session, please contact the administrator!!!!");die;
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Demo</title>
<style type="text/css"> ................>>>>>>>>>>>>>>>>>>>>>>>>>>>
any ideas will be greatfully recieved, i will now investigate the login option you mentioned
many thanks again