Example #1
0
<?php

checkauthentication();
$p = $_GET['p'];
$cari = $_GET['cari'];
$table = "mst_skp";
$field = get_field($table);
$ed_link = "index.php?p=" . get_edit_link($p);
$del_link = "index.php?p=263";
#Halaman yang akan ditampilkan untuk pertengahan?
$adjacents = 3;
$th = $_SESSION['xth'];
$xlevel = $_SESSION['xlevel'];
$xusername = $_SESSION['xusername'];
$xkdunit = $_SESSION['xkdunit'];
$kdbidang = substr(kdunitkerja_peg($xusername), 0, 3);
$kdsubbidang = kdunitkerja_peg($xusername);
$kdunitkerja = $xkdunit . '00';
$kddeputi = substr($xkdunit, 0, 1);
switch ($xlevel) {
    case '1':
        $query = "SELECT COUNT(*) as num FROM {$table} WHERE tahun = '{$th}' and left(kdunitkerja,2) = '{$xkdunit}' and (nib LIKE '%{$cari}%' OR kdunitkerja LIKE '%{$cari}%' OR kdjabatan LIKE '%{$cari}%') ";
        break;
    case '2':
        $query = "SELECT COUNT(*) as num FROM {$table} WHERE tahun = '{$th}' and left(kdunitkerja,2) = '{$xkdunit}' and (nib LIKE '%{$cari}%' OR kdunitkerja LIKE '%{$cari}%' OR kdjabatan LIKE '%{$cari}%') ";
        break;
    case '3':
        $query = "SELECT COUNT(*) as num FROM {$table} WHERE tahun = '{$th}' and left(kdunitkerja,2) = '{$xkdunit}' and (nib LIKE '%{$cari}%' OR kdunitkerja LIKE '%{$cari}%' OR kdjabatan LIKE '%{$cari}%') ";
        break;
    case '4':
        $query = "SELECT COUNT(*) as num FROM {$table} WHERE tahun = '{$th}' and left(kdunitkerja,3) = '{$kdbidang}' and (nib LIKE '%{$cari}%' OR kdunitkerja LIKE '%{$cari}%' OR kdjabatan LIKE '%{$cari}%') ";
Example #2
0
$u = $_GET['u'];
if ($u == "") {
    $u = $_SESSION['unit_kerja'];
}
$table = "presensi";
$field = get_field($table);
if ($m == "") {
    $m = date("n");
}
if ($y == "") {
    $y = date("Y");
}
if ($m < 10) {
    $m = "0" . $m;
}
$ed_link = "index.php?p=" . get_edit_link($p) . "&m=" . $m . "&y=" . $y . "&t=" . $t . "&q=" . $q . "&a=" . $a;
$del_link = "index.php?p=" . get_delete_link($p) . "&m=" . $m . "&y=" . $y . "&t=" . $t . "&q=" . $q . "&a=" . $a;
$bln = $y . "-" . $m;
$oList = absensi_list($u, $q, $bln, $t, $a);
$count = mysql_num_rows($oList);
while ($List = mysql_fetch_object($oList)) {
    foreach ($field as $k => $val) {
        $col[$k][] = $List->{$val};
    }
    $ed[] = $ed_link . "&q=" . $List->{$field}[0];
    $del[] = $del_link . "&q=" . $List->{$field}[0];
}
?>

<script language="javascript" src="js/autocombo.js"></script>
<form action="" method="get" name="form">
/**
 * Get App Options link when admin is logged in
 * @param string $description
 * @param bool $display_inline
 * @return type
 */
function get_app_options_link($description = null, $display_inline = false)
{
    if (!(is_user_logged_in() && current_user_can('manage_options'))) {
        return null;
    }
    if (is_null($description)) {
        $description = 'this';
    }
    $options = AppOption::getInstance();
    return get_edit_link($options->ID, 'app-option', $description . ' in ' . $options->getPlural(), $display_inline);
}
Example #4
0
<?php

checkauthentication();
$table = "presensi";
$field = get_field($table);
$p = $_GET['p'];
$u = $_GET['u'];
$b = $_GET['b'];
$subbidang = $_GET['subbidang'];
$q = $_GET['q'];
$m = $_GET['m'] + 0;
$y = $_GET['y'];
$url = "m=" . $m . "&y=" . $y . "&u=" . $u . "&b=" . $b . "&subbidang=" . $subbidang;
$ed_link = "index.php?p=" . get_edit_link($p) . "&" . $url;
if ($u == "") {
    $u = $_SESSION['unit_kerja'];
}
if ($m == "") {
    $m = date("n");
}
if ($y == "") {
    $y = date("Y");
}
if ($m < 10) {
    $m = "0" . $m;
}
$jumlah_hari = jumlah_hari($m, $y);
isi_absensi($u);
for ($i = 1; $i <= $jumlah_hari; $i++) {
    if ($i < 10) {
        $day = "0" . $i;
Example #5
0
<?php

checkauthentication();
$p = $_GET['p'];
$y = $_GET['y'];
$s = $_GET['s'];
if ($y == "") {
    $y = date("Y");
}
$table = "libur";
$field = get_field($table);
$ed_link = "index.php?p=" . get_edit_link($p) . "&s=" . $s . "&y=" . $y;
$del_link = "index.php?p=" . get_delete_link($p) . "&s=" . $s . "&y=" . $y;
$oList = libur_list($y, $s);
$count = mysql_num_rows($oList);
while ($List = mysql_fetch_object($oList)) {
    foreach ($field as $k => $val) {
        $col[$k][] = $List->{$val};
    }
    $ed[] = $ed_link . "&q=" . $List->{$field}[0];
    $del[] = $del_link . "&q=" . $List->{$field}[0];
}
?>
<form action="" method="get" name="form">
	<input name="p" type="hidden" value="<?php 
echo $p;
?>
">
	<fieldset>
		<table class="admintable" cellspacing="1">
			<tr>
    echo $row_get_site_to_site_req['first_name'] . " " . $row_get_site_to_site_req['last_name'];
    ?>
</td>
      <td><?php 
    echo date("d-M-Y", strtotime($row_get_site_to_site_req['created_date']));
    ?>
</td>
      <td><a href=".?<?php 
    get_child_link($approved_time, "site_approve_item_view", "site_to_site_req_item_view");
    ?>
= true&amp;site_to_site_req_id=<?php 
    echo $row_get_site_to_site_req['id'];
    ?>
&back_page=site_to_site_req_view"><input name="" value="Items" type="submit" id="edit_forms"/></a></td>
      <td><?php 
    get_edit_link($approved_time, "site_to_site_req", $row_get_site_to_site_req['id']);
    ?>
</td>
      <td><?php 
    get_delete_link($approved_time, "site_to_site_req", $row_get_site_to_site_req['id']);
    ?>
</td>
    </tr>
    <?php 
} while ($row_get_site_to_site_req = mysql_fetch_assoc($get_site_to_site_req));
?>
                  <!--Loop end-->
                </tbody>
              </table>
<?php 
mysql_free_result($get_site_to_site_req);
Example #7
0
}
if ($subbidang == "") {
    $subbidang = $b . "0";
}
if (substr($subbidang, 2, 2) == "00") {
    $bidang = $u;
} else {
    if (substr($subbidang, 3, 1) == "0") {
        $bidang = $b;
    } else {
        $bidang = $subbidang;
    }
}
$table = "pegawai";
$field = get_field($table);
$ed_link = "index.php?p=" . get_edit_link($p) . "&u=" . $u . "&b=" . $b . "&subbidang=" . $subbidang;
$del_link = "index.php?p=" . get_delete_link($p) . "&u=" . $u . "&b=" . $b . "&subbidang=" . $subbidang;
$oList = pegawai_list($bidang, "kode_bidang,status_jab DESC,nip");
$count = mysql_num_rows($oList);
while ($List = mysql_fetch_object($oList)) {
    foreach ($field as $k => $val) {
        $col[$k][] = $List->{$val};
    }
    $ed[] = $ed_link . "&q=" . $List->{$field}[0];
    $del[] = $del_link . "&q=" . $List->{$field}[0];
}
?>

<script language="javascript" src="js/autocombo.js"></script>
<form action="" method="get" name="form">
	<input name="p" type="hidden" value="<?php 
    ?>
</td>
      <td><?php 
    echo date("d-M-Y", strtotime($row_get_purchase_req['created_date']));
    ?>
</td>
      
            <td><a href=".?<?php 
    get_child_link($approved_time, "menu_type=storekeeper&pr_item_approve_view", "pr_item_view");
    ?>
= true&amp;purchase_req_id=<?php 
    echo $row_get_purchase_req['id'];
    ?>
&back_page=purchase_req_view"><input name="" value="Items" type="submit" id="edit_forms"/></a></td>
      <td><?php 
    get_edit_link($approved_time, "purchase_req", $row_get_purchase_req['id']);
    ?>
</td>
      <td><?php 
    get_delete_link($approved_time, "purchase_req", $row_get_purchase_req['id']);
    ?>
</td>
      
      
    </tr>
    <?php 
} while ($row_get_purchase_req = mysql_fetch_assoc($get_purchase_req));
?>
                  <!--Loop end-->
                </tbody>
              </table>