Exemplo n.º 1
0
<?php

if (empty($_COOKIE['type']) or $_COOKIE['type'] != 'admin') {
    header('location: ../index.php');
}
require_once '../models/pelaporan.php';
$Pelaporan = new Pelaporan();
$reports = $Pelaporan->getReportbyTujuan($_COOKIE['department']);
require_once 'header.php';
require_once 'sidebar.php';
?>


        <div id="page-wrapper">

            <div class="container-fluid">

                <!-- Page Heading -->
                
                <!-- /.row -->

                <div class="row">
                    <div class="col-lg-12">
                        
                    </div>
                </div>
                <!-- /.row -->
            </div>
            <!-- /.container-fluid -->

        </div>
Exemplo n.º 2
0
<?php

if (empty($_COOKIE['type']) or $_COOKIE['type'] != 'admin') {
    header('location: ../index.php');
}
require_once '../models/pelaporan.php';
$Pelaporan = new Pelaporan();
$reports = $Pelaporan->getReportbyIDLapor($_GET['idlapor'], $_COOKIE['department']);
require_once 'header.php';
require_once 'sidebar.php';
?>

  <div id="page-wrapper">

            <div class="container-fluid">

                <!-- Page Heading -->
                
                <!-- /.row -->

                <div class="row">
                    <div class="col-lg-12">
                        
                        <?php 
foreach ($reports as $report) {
    # code...
    ?>
                        <div class="col-sm-12">
                            <div class="panel panel-primary">
                                <div class="panel-heading">
                                    <?php 
Exemplo n.º 3
0
<?php

require_once '../models/pelaporan.php';
$Pelaporan = new Pelaporan();
if (empty($_COOKIE['type']) or $_COOKIE['type'] != 'mahasiswa') {
    header('location: ../index.php');
}
if (!empty($_POST)) {
    # code...
    if (empty($_POST['report']) || empty($_POST['cat']) || empty($_POST['dep'])) {
        $msg['error'] = 'Field bertanda bintang harus di isi!';
        $uploadOk = 0;
        #echo "1";
    } elseif ($_FILES['image']['error'] == 4) {
        $imgdir = "Image/default.jpg";
        $uploadOk = 1;
        #echo "2";
    } elseif ($_FILES['image']['error'] != 0 && $_FILES['image']['error'] != 4) {
        $msg['error'] = "Terdapat masalah dengan gambar anda..";
        $uploadOk = 0;
        #echo "3";
    } else {
        $f = $_FILES['image'];
        $imgdir = "Image/" . date("YmdHis") . $f['name'];
        $uploadOk = 1;
        copy($f['tmp_name'], "../" . $imgdir);
        #echo "4";
    }
    if ($uploadOk == 1) {
        $Pelaporan->newReport($_POST['report'], $imgdir, $_COOKIE['id'], $_POST['cat'], $_POST['dep']);
        $msg['success'] = "Data Berhasil Di input..";
Exemplo n.º 4
0
<?php

if (empty($_COOKIE['type']) or $_COOKIE['type'] != 'mahasiswa') {
    header('location: ../index.php');
}
require_once '../lib/user.php';
$user = new User();
$rs = $user->getMhs($_COOKIE['id']);
setcookie("name", $rs[0]['name'], time() + 3600, '/');
require_once '../models/pelaporan.php';
$pelaporan = new Pelaporan();
$reports = $pelaporan->getReportbyID($_COOKIE['id']);
$replieds = $pelaporan->getRepliedbyID($_COOKIE['id']);
require_once 'header.php';
require_once 'sidebar.php';
?>


            
            <!-- /.navbar-collapse -->
        

        <div id="page-wrapper">

            <div class="container-fluid">

                <!-- Page Heading -->
                <div class="row">

                
                 
Exemplo n.º 5
0
<?php

if (empty($_COOKIE['type']) or $_COOKIE['type'] != 'admin') {
    header('location: ../index.php');
}
if (!empty($_FILES)) {
    $f = $_FILES['csv'];
    copy($f['tmp_name'], 'tmp.csv');
    $fo = fopen('tmp.csv', 'r');
    require_once '../models/pelaporan.php';
    $Pelaporan = new Pelaporan();
    while ($read = fgetcsv($fo)) {
        $Pelaporan->createSiswa($read[0], $read[1], $read[2]);
    }
    $msg['success'] = "Data Berhasil Di input..";
}
require_once 'header.php';
require_once 'sidebar.php';
?>

        <div id="page-wrapper">

            <div class="container-fluid">

                <!-- Page Heading -->
                <div class="row">
                    <div class="col-lg-12">
                    <?php 
if (!empty($msg['success'])) {
    ?>
		        <div class="alert alert-info alert-dismissible" role="alert">
Exemplo n.º 6
0
<?php

if (empty($_COOKIE['type']) or $_COOKIE['type'] != 'admin') {
    header('location: ../index.php');
}
require_once '../models/pelaporan.php';
$Pelaporan = new Pelaporan();
$Pelaporan->updateRespond($_POST['isi'], $_POST['idtanggap']);
header("location:dashboard.php");
Exemplo n.º 7
0
<?php

if (empty($_COOKIE['type']) or $_COOKIE['type'] != 'admin') {
    header('location: ../index.php');
}
require_once '../models/pelaporan.php';
$Pelaporan = new Pelaporan();
$Pelaporan->newRespond($_POST['isi'], $_POST['oleh'], $_POST['idlaporan']);
header("location:respond.php?id={$_POST['idlaporan']}");
Exemplo n.º 8
0
<?php

if (empty($_COOKIE['type']) or $_COOKIE['type'] != 'admin') {
    header('location: ../index.php');
}
require_once '../models/pelaporan.php';
$data = new Pelaporan();
// output headers so that the file is downloaded rather than displayed
header('Content-Type: text/csv; charset=utf-8');
header('Content-Disposition: attachment; filename=data.csv');
// create a file pointer connected to the output stream
$output = fopen('php://output', 'w');
// output the column headings
#fputcsv($output, array('Column 1', 'Column 2', 'Column 3'));
// fetch the data
//mysql_connect('localhost', 'username', 'password');
//mysql_select_db('database');
$rows = $data->report();
foreach ($rows[0] as $column => $value) {
    $header[] = $column;
}
fputcsv($output, $header);
////
// loop over the rows, outputting them
foreach ($rows as $row) {
    fputcsv($output, $row);
}
Exemplo n.º 9
0
<?php

if (empty($_COOKIE['type']) or $_COOKIE['type'] != 'admin') {
    header('location: ../index.php');
}
require_once '../models/pelaporan.php';
$Pelaporan = new Pelaporan();
$Pelaporan->deleteRespond($_GET['id']);
header("location:dashboard.php");