コード例 #1
0
ファイル: load_data.php プロジェクト: abbeet/server39
<?php

checkauthentication();
$table = "mst_tk";
$field = get_field($table);
$err = false;
$p = $_GET['p'];
extract($_POST);
$xusername_sess = $_SESSION['xusername'];
$xusername = $_SESSION['xusername'];
$xmenu_p = xmenu_id($p);
$p_next = $xmenu_p->parent;
if (isset($form)) {
    if ($err != true) {
        $tahun = $_REQUEST['tahun'];
        $bulan = bulan_data($_REQUEST['bulan']);
        $tgl_status = date('Y-m-d');
        $sql = "SELECT nib,tunker,pajak_tunker FROM mst_tk WHERE tahun = '{$tahun}' AND bulan = '{$bulan}' AND kdsatker = '{$xusername}'";
        $qu = mysql_query($sql);
        while ($row = mysql_fetch_array($qu)) {
            $nib = $row['nib'];
            $tot_tunker += $row['tunker'];
            $tot_pajak_tunker += $row['pajak_tunker'];
            $sql_inp = "UPDATE mst_tk SET status = '1' , tgl_status = '{$tgl_status}' WHERE nib = '{$nib}' ";
            mysql_query($sql_inp);
            #}
        }
        mysql_query("DELETE FROM rekap_tk  WHERE tahun = '{$tahun}' AND bulan = '{$bulan}' AND kdsatker = '{$xusername}' ");
        mysql_query("INSERT rekap_tk value('','{$xusername}','{$tahun}','{$bulan}','{$tot_tunker}','{$tot_pajak_tunker}','') ");
        ?>
			<meta http-equiv="refresh" content="0;URL=index.php?p=<?php 
コード例 #2
0
ファイル: ambil_data.php プロジェクト: abbeet/server39
checkauthentication();
$table = "mst_tk";
$field = get_field($table);
$err = false;
$p = $_GET['p'];
extract($_POST);
$xusername_sess = $_SESSION['xusername'];
$xusername = $_SESSION['xusername'];
$kdunit = $_SESSION['xkdunit'];
$xmenu_p = xmenu_id($p);
$p_next = $xmenu_p->parent;
if (isset($form)) {
    if ($err != true) {
        $tahun_proses = $_REQUEST['tahun_proses'];
        $bulan_proses = bulan_data($_REQUEST['bulan_proses']);
        $kdunit = $_REQUEST['kdunit'];
        //------ cek status verifikasi
        $sql_status = "SELECT * FROM proses_verifikasi WHERE kdunitkerja = '{$kdunit}' \r\n\t\t\t\t\t\t\t   AND tahun = '{$tahun_proses}' and bulan = '{$bulan_proses}'";
        $oList_status = mysql_query($sql_status);
        $List_status = mysql_fetch_array($oList_status);
        if ($List_status['status_verifikasi_nominatif'] == '1') {
            $_SESSION['errmsg'] = "Data Nominatif telah diverifikasi !";
            ?>
					<meta http-equiv="refresh" content="0;URL=index.php?p=<?php 
            echo $p_next;
            ?>
&kdbulan=<?php 
            echo $bulan_proses;
            ?>
"><?php