<?php


   function SaveDataLast() {
        global $objAxpDB;
//        $objAxpDB->Allow_Save(false);
        $strSQL=array();
        switch($_REQUEST[mode]) {
        case "simpan":
                   
                $strSQL['update tlovertime'][]="UPDATE tlovertime SET ffhours=TIMEDIFF('{$_REQUEST['fdovertime_from']}','{$_REQUEST['fdovertime_to']}'),
                                                       ffsecond=( HOUR(TIMEDIFF('{$_REQUEST['fdovertime_from']}','{$_REQUEST['fdovertime_to']}'))*3600)+
                                                       ( MINUTE(TIMEDIFF('{$_REQUEST['fdovertime_from']}','{$_REQUEST['fdovertime_to']}'))*60)+
                                                       ( SECOND(TIMEDIFF('{$_REQUEST['fdovertime_from']}','{$_REQUEST['fdovertime_to']}')))
                                                    WHERE ftovertime_code='{$_REQUEST['ftovertime_code']}'";
                
                break;
         }
    return $strSQL;
   }
    function UpdateDataLast() {
        global $objAxpDB;
//        $objAxpDB->Allow_Update(false);
        $strSQL=array();
        switch($_REQUEST[mode]) {
        case "update":
               $strSQL['update tlovertime'][]="UPDATE tlovertime SET ffhours=TIMEDIFF('{$_REQUEST['fdovertime_from']}','{$_REQUEST['fdovertime_to']}'),
                                                   ffsecond=( HOUR(TIMEDIFF('{$_REQUEST['fdovertime_from']}','{$_REQUEST['fdovertime_to']}'))*3600)+
                                                   ( MINUTE(TIMEDIFF('{$_REQUEST['fdovertime_from']}','{$_REQUEST['fdovertime_to']}'))*60)+
                                                   ( SECOND(TIMEDIFF('{$_REQUEST['fdovertime_from']}','{$_REQUEST['fdovertime_to']}')))
                                                WHERE ftovertime_code='{$_REQUEST['ftovertime_code']}'";

                break;
         }
    return $strSQL;
   }

 


?>
