Location: PHPKode > projects > PhpProjectMaster > www/inc/timesheet.lib.php
<?php
/* 
 timesheet related functions
 (c) 2005-2007 by Oleg Savchuk
 SITE: COMMON OSA LIBRARY
*/

 require_once "sitelib.php";
 require_once "form_utils.php";

//preset module variables
 $MAX_DAILY_SECS=86400;


 $timesheet_vars=array(
   'table_name'   => 'timesheet',
   'table_key_id' => 'tt_id',
 );


//get item fields from database
function get_timesheet($item_id){
 global $timesheet_vars;

 $sql="select * from $timesheet_vars[table_name] where $timesheet_vars[table_key_id]=$item_id";
 return db_row($sql);
}

//mark item as removed
function delete_timesheet($item_id){
 global $timesheet_vars;

 db_query("update $timesheet_vars[table_name] set status=127 where $timesheet_vars[table_key_id]=$item_id");
}


?>
Return current item: PhpProjectMaster