Ejemplo n.º 1
0
function query_statements($q)
{
    extract($q);
    list($resource_ids, $rule_values) = query_result($q);
    for ($i = 0; $i < count($resource_ids); $i++) {
        $items[] = array('item_id' => $resource_ids[$i], 'notes' => get_notes($resource_ids[$i], $db));
    }
    return $items;
}
Ejemplo n.º 2
0
function get_nama_status_lpj($stat_kd)
{
    $data_stat = query_result("SELECT STATUS_NAMA FROM TB_M_STATUS_LPJ WHERE STATUS_KODE='{$stat_kd}'", 'select', false);
    return $data_stat['STATUS_NAMA'];
}
Ejemplo n.º 3
0
<?php

if (!isset($_GET['lpj_id'])) {
    header("location:index.php");
}
$lpj_id = $_GET['lpj_id'];
include "functions.php";
$data_lpj = query_result("SELECT LPJ_ARSIP FROM TB_DATA_LPJ WHERE LPJ_ID='{$lpj_id}'", 'select', false);
$arsip_lpj = $data_lpj['LPJ_ARSIP'];
header("location:arsip/" . $arsip_lpj);
Ejemplo n.º 4
0
<?php

if (!isset($_GET['lpj_id'])) {
    header("location:index.php");
}
$lpj_id = $_GET['lpj_id'];
define("UPLOAD_DIR", "arsip/");
include "functions.php";
$name = query_result("SELECT LPJ_ARSIP FROM TB_DATA_LPJ WHERE LPJ_ID='{$lpj_id}'", 'select', false);
$name = $name['LPJ_ARSIP'];
if (file_exists(UPLOAD_DIR . $name)) {
    $delete = unlink(UPLOAD_DIR . $name);
    if ($delete == true) {
        $query = query_result("UPDATE TB_DATA_LPJ SET LPJ_ARSIP=NULL WHERE LPJ_ID='{$lpj_id}'", 'non_select', false);
        if ($query) {
            header("location:index.php?page=cari-arsip-lpj&lpj_id=" . $lpj_id . "&delete_arsip=success");
        } else {
            header("location:index.php?page=cari-arsip-lpj&lpj_id=" . $lpj_id . "&delete_arsip=error");
        }
    } else {
        header("location:index.php?page=cari-arsip-lpj&lpj_id=" . $lpj_id . "&delete_arsip=error");
    }
} else {
    header("location:index.php?page=cari-arsip-lpj&lpj_id=" . $lpj_id . "&delete_arsip=error");
}
Ejemplo n.º 5
0
    <td colspan="3">
<table class=topmenu border=0>
  <tr>
    <td width=5%>&nbsp;</td>
    <td>
      <h1 class=title><?php 
echo $namepage;
?>
</h1>
<?php 
// Выводим дату начала регистрации данных и число прошедших с начала регистрации
// дней - определяем дату в таблице $tbl_ip и $tbl_arch_hits
$query = "SELECT UNIX_TIMESTAMP(MIN(putdate)) AS data \n              FROM {$tbl_ip}";
$date_ip = query_result($query);
$query = "SELECT UNIX_TIMESTAMP(MIN(putdate)) AS data \n              FROM {$tbl_arch_hits}";
$date_arch = query_result($query);
if (empty($date_ip) && empty($date_arch)) {
    $date = time();
} else {
    if (empty($date_ip)) {
        $date = $date_arch;
    } else {
        if (empty($date_ip)) {
            $date = $date_ip;
        } else {
            if ($date_ip < $date_arch) {
                $date = $date_ip;
            } else {
                $date = $date_arch;
            }
        }
Ejemplo n.º 6
0
<?php

require "connect.php";
require "functions.php";
$username = $_SESSION['login_session']['user_id'];
$data_adm = query_result("SELECT * FROM TB_USER WHERE USER_ID='{$username}'", 'select', false);
?>


<div class='sub-content' id='edit-data-admin'>
	<div class='subtitle'>
		<div class='title'><h2>Form Edit Data Admin</h2></div>
	</div>
	<div class='sub-container'>
		<div class='cust-register'>
		<?php 
if (isset($_GET['update_data'])) {
    if ($_GET['update_data'] == 'error') {
        ?>
			<p class='inlinemsg err'>Gagal update data. Silakan coba lagi nanti.</p>
		<?php 
    } else {
        if ($_GET['update_data'] == 'success') {
            if (isset($_GET['passwd']) && $_GET['passwd'] == 'changed') {
                ?>
			<p class='inlinemsg suc'>Data admin berhasil diupdate. Sistem akan melakukan logout otomatis dalam 2 detik...</p>
			<meta http-equiv='refresh' content='2; url=logout.php'>
		<?php 
            } else {
                ?>
			<p class='inlinemsg suc'>Data berhasil diupdate.</p>