<?php

    function SaveData() {
        global $objAxpDB;
      
        $strSQL=array();
        switch($_REQUEST[mode]) {
        case "simpan":
			 
 
             break;
    }
    return $strSQL;

    }

    function SaveDataLast() {
        global $objAxpDB;
      
        $strSQL=array();
        switch($_REQUEST[mode]) {
        case "simpan":
			 for($j=1; $j<count($_REQUEST['ftdo_noD0']); $j++) {
					 if($_REQUEST['hd_includeD0'][$j]=="0") {
						 $strSQL["a"][]="DELETE 
										FROM txrekap_delivery_order_det 
										WHERE ftrekap_do_no='{$_REQUEST['ftrekap_do_no']}' AND 
												ftdo_no='{$_REQUEST['ftdo_noD0'][$j]}' ";
					 }
                   
             }
					$strSQL["a"][]="
								 UPDATE txrekap_delivery_order_det
					SET fnindex = (
							SELECT @rownum:=@rownum+1 'fnindex' 
								FROM (SELECT @rownum:=0) r)
					WHERE ftrekap_do_no='{$_REQUEST['ftrekap_do_no']}' ";
			
			 
             break;
    }
    return $strSQL;

    }

	function CancelData() {

        global $objAxpDB;     
        $strSQL=array();
        switch($_REQUEST[mode]) {
        case "batal":

        break;
        }

        return $strSQL;
      }


	function RevisiData() {

    global $objAxpDB;
     $strSQL=array();
    switch($_REQUEST[mode]) {
    case "revisi":
        

        break;
    }

     return $strSQL;
 }


?>