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

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

//preset module variables

 $workcode_vars=array(
   'table_name'   => 'workcode',
   'table_key_id' => 'wc_id',
 );


//get item fields from database
function get_workcode($item_id){
 global $workcode_vars;

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

//get name
function get_workcode_name($item_id){
 $hI=get_workcode($item_id);
 return $hI['iname'];
}


//mark item as removed
function delete_workcode($item_id){
 global $workcode_vars;

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

?>
Return current item: PhpProjectMaster