Exemplo n.º 1
0
<?php

namespace LRS\OfficeServer\Views\Admin;

use LRS\OfficeServer\Controller\Contents;
use LRS\OfficeServer\Controller\Headers;
use LRS\OfficeServer\Controller\SentItem;
use LRS\OfficeServer\Controller\Routes;
use LRS\OfficeServer\Model\PesanTerkirim;
Headers::get_instance()->set_page_title('Pesan Terkirim')->set_page_name('Pesan Terkirim');
$tingkat1 = Routes::get_instance()->get_tingkat(1);
$daftar_pesan = SentItem::get_instance()->_gets(array('number' => -1));
$daftar_pesan_count = SentItem::get_instance()->_count();
Contents::get_instance()->get_header();
?>

<div class="container-fluid">
    <div class="row">
        <div class="col-xs-3 col-sm-2 sidebar">
            <?php 
Contents::get_instance()->get_sidebar();
?>
        </div>
        <div class="col-xs-9 col-sm-10 main">
            <h1 class="page-header">
                Pesan
                <small>Terkirim</small>
            </h1>
            <p>Berikut adalah daftar pesan yang telah terkirim.</p>
            <table class="table table-bordered table-striped">
                <thead>
Exemplo n.º 2
0
use LRS\OfficeServer\Controller\Absents;
use LRS\OfficeServer\Controller\Options;
use LRS\OfficeServer\Controller\Routes;
use LRS\OfficeServer\Controller\Contents;
use LRS\OfficeServer\Controller\Headers;
use LRS\OfficeServer\Controller\Sessions;
use LRS\OfficeServer\Model\Absent;
Sessions::get_instance()->_validate(LRS_URI_PATH . '?redirect_to=' . $_SERVER['REQUEST_URI']);
$tingkat1 = Routes::get_instance()->get_tingkat(1);
$tingkat2 = Routes::get_instance()->get_tingkat(2);
$tingkat3 = Routes::get_instance()->get_tingkat(3);
$is_absen_histori = Routes::get_instance()->is_tingkat(3, 'histori');
$is_absen_mulai = Routes::get_instance()->is_tingkat(3, Absents::aksi_mulai);
$is_absen_berhenti = Routes::get_instance()->is_tingkat(3, Absents::aksi_berhenti);
$is_absen_berhenti_sebelum_waktunya = Routes::get_instance()->is_tingkat(3, Absents::aksi_berhenti_sebelum_waktunya);
$durasi_kerja = Options::get_instance()->get_option('durasi_kerja', 0);
$durasi_kerja_jam = (int) $durasi_kerja / 60;
$obj_people = Sessions::get_instance()->_retrieve()->getObjPeople();
$this_day = date('Y-m-d');
$obj_absen = Absents::get_instance()->_get($this_day, $obj_people->getId());
!is_null($obj_absen->getStatus()) || $obj_absen->setStatus(Absents::status_tidak_masuk);
if ($is_absen_mulai) {
    $obj_absen->setDate($this_day)->setPeopleId($obj_people->getId())->setWorktimeStart(date('H:i:s'))->setStatus(Absents::status_masuk);
    lrs_redirect(LRS_URI_PATH . DS . $tingkat1 . DS . $tingkat2 . '?status=' . (Absents::get_instance()->_update($obj_absen) ? 1 : 999));
} elseif ($is_absen_berhenti) {
    $obj_absen->setWorktimeEnd(date('H:i:s'))->setStatus(Absents::status_selesai);
    lrs_redirect(LRS_URI_PATH . DS . $tingkat1 . DS . $tingkat2 . '?status=' . (Absents::get_instance()->_update($obj_absen) ? 2 : 999));
} elseif ($is_absen_berhenti_sebelum_waktunya) {
    $obj_absen->setWorktimeEnd(date('H:i:s'))->setStatus(Absents::status_izin_pulang)->setNote($_REQUEST['note']);
    lrs_redirect(LRS_URI_PATH . DS . $tingkat1 . DS . $tingkat2 . '?status=' . (Absents::get_instance()->_update($obj_absen) ? 3 : 999));
Exemplo n.º 3
0
$daftar_pesan = Inbox::get_instance()->_gets(array('public_prefix' => Inbox::public_prefix, 'number' => -1));
$daftar_pesan_count = Inbox::get_instance()->_count();
Contents::get_instance()->get_header();
?>

<div class="container-fluid">
    <div class="row">
        <div class="col-xs-3 col-sm-2 sidebar">
            <?php 
Contents::get_instance()->get_sidebar();
?>
        </div>
        <div class="col-xs-9 col-sm-10 main">
            <?php 
if ($is_lihat) {
    $obj_pesan = Inbox::get_instance()->_get(Routes::get_instance()->get_tingkat(4));
    if ($obj_pesan->hasProcessedFalse()) {
        Inbox::get_instance()->_set_processed($obj_pesan->getID(), Inbox::processed_true);
    }
    ?>
                <h1 class="page-header">
                    Pesan Masuk
                    <small>Lihat</small>
                </h1>

                <?php 
    $aksi = isset($_REQUEST[Helpers::aksi_param]) ? $_REQUEST[Helpers::aksi_param] : '';
    if ($aksi == Helpers::aksi_kirim_pesan) {
        $pesan_keluar = new PesanKeluar();
        $pesan_keluar->setDestinationNumber($_REQUEST['DestinationNumber'])->setTextDecoded($_REQUEST['TextDecoded'])->setCreatorID($obj_pesan->getID());
        if (Outbox::get_instance()->_insert($pesan_keluar)) {
Exemplo n.º 4
0
            if ($aksi_perbarui) {
                $status = Kontak::get_instance()->_update($obj_kontak);
            } elseif ($aksi_tambah) {
                $status = Kontak::get_instance()->_insert($obj_kontak);
            }
            if ($status) {
                ?>

                        <div class="alert alert-success">
                            <p><i class="glyphicon glyphicon-ok"></i> Kontak berhasil disimpan.</p>
                        </div>

                    <?php 
            }
        } elseif ($is_hapus) {
            if (Kontak::get_instance()->_delete(Routes::get_instance()->get_tingkat(5))) {
                ?>
                            <div class="alert alert-warning">
                                <p><i class="glyphicon glyphicon-ok"></i> Kontak berhasil dihapus.</p>
                            </div>
                        <?php 
            }
        }
        $daftar_grup = Grup::get_instance()->_gets(array('number' => -1));
        $daftar_kontak = Kontak::get_instance()->_gets(array('Name' => $list_params['Name'], 'GroupID' => $list_params['GroupID'], 'number' => $list_params['number'], 'offset' => ($list_params['page'] - 1) * $list_params['number']));
        $daftar_kontak_count = Kontak::get_instance()->_count();
        ?>

                    <form class="form-horizontal">
                        <div class="form-group">
                            <div class="col-sm-4 col-lg-3">
Exemplo n.º 5
0
<?php

namespace LRS\OfficeServer\Views\Admin;

use LRS\OfficeServer\Controller\Contents;
use LRS\OfficeServer\Controller\Headers;
use LRS\OfficeServer\Controller\Sessions;
use LRS\OfficeServer\Controller\Options;
use LRS\OfficeServer\Controller\Helpers;
use LRS\OfficeServer\Controller\Routes;
$status = isset($_REQUEST[Helpers::status_param]) ? $_REQUEST[Helpers::status_param] : '';
$tingkat1 = Routes::get_instance()->get_tingkat(1);
$tingkat2 = Routes::get_instance()->get_tingkat(2);
$is_simpan = Routes::get_instance()->is_tingkat(2, Helpers::aksi_simpan);
if ($is_simpan) {
    Options::get_instance()->set_option('hari_libur', mysql_real_escape_string(json_encode($_REQUEST['hari_libur'])));
    Options::get_instance()->set_option('durasi_kerja', $_REQUEST['durasi_kerja']);
    lrs_redirect(LRS_URI_PATH . DS . $tingkat1 . DS . '?status=2');
}
$hari_libur = json_decode(Options::get_instance()->get_option('hari_libur', array()), true);
$durasi_kerja = Options::get_instance()->get_option('durasi_kerja', 0);
$obj_people = Sessions::get_instance()->_retrieve()->getObjPeople();
$days_a_week_lists = array(1 => 'Monday', 2 => 'Tuesday', 3 => 'Wednesday', 4 => 'Thursday', 5 => 'Friday', 6 => 'Saturday', 7 => 'Sunday');
Headers::get_instance()->set_page_title('Admin')->set_page_name('Admin');
Contents::get_instance()->get_header();
?>

<div class="container-fluid">
    <div class="row">
        <div class="col-xs-3 col-sm-2 sidebar">
            <?php 
Exemplo n.º 6
0
 * http://lrsoft.co.id
 *
 * Author : Zaf
 */
namespace LRS\OfficeServer\Views\Publik;

use LRS\OfficeServer\Controller\Contents;
use LRS\OfficeServer\Controller\Headers;
use LRS\OfficeServer\Controller\Authentications;
use LRS\OfficeServer\Controller\Routes;
use LRS\OfficeServer\Controller\Helpers;
use LRS\OfficeServer\Controller\Sessions;
Headers::get_instance()->set_page_title('Autentikasi');
$is_lupa_kata_sandi = Routes::get_instance()->is_tingkat(2, Helpers::aksi_lupa_kata_sandi);
$is_masuk = Routes::get_instance()->is_tingkat(2, Helpers::aksi_masuk);
$is_keluar = Routes::get_instance()->is_tingkat(2, Helpers::aksi_keluar);
$auth_status = 2;
$is_masuk_success = false;
if ($is_masuk) {
    $username = isset($_REQUEST['username']) ? $_REQUEST['username'] : '';
    $password = isset($_REQUEST['password']) ? $_REQUEST['password'] : '';
    $is_masuk_success = Authentications::success == ($auth_status = Authentications::get_instance()->_init($username, $password)->_auth());
    /**
     * jika target redirect nya ditentukan
     */
    $redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : ($is_masuk_success ? LRS_URI_PATH . DS . Sessions::get_instance()->_retrieve()->getView() : LRS_URI_PATH);
    /**
     * sisipkan di header nya
     */
    Headers::get_instance()->add_head_meta(array(array('http-equiv' => 'refresh', 'content' => '0;url=' . $redirect_to)));
} elseif ($is_keluar) {