<?php
/**********************************************************************
***********************************************************************/

//------------------------------------------------------------------------------------

function update_working_week($monday,$tuesday,
                            $wednesday,$thursday,
                            $friday,$saturday,
                            $sunday)
{
	                
        $updated_by = $_SESSION['wa_current_user']->user;
        $updated_on = date('Y-m-d H:i:s');	
    
        $sql = "UPDATE ".TB_PREF."working_week 
                SET 
                    monday=".db_escape($monday).",
                    tuesday=".db_escape($tuesday).",
                    wednesday=".db_escape($wednesday).",
                    thursday=".db_escape($thursday).",
                    friday=".db_escape($friday).",
                    saturday=".db_escape($saturday).",
                    sunday=".db_escape($sunday).",
                    updated_by=".db_escape($updated_by).",
                    updated_on=".db_escape($updated_on);

	db_query($sql,"Working week could not be set");
}

//------------------------------------------------------------------------------------

function get_weking_week()
{
	$sql = "SELECT * FROM ".TB_PREF."working_week";
        
	return db_query($sql,"an item reorder could not be retreived");
}

?>