예제 #1
0
$emp_id = htmlspecialchars($_POST['kodeemp']);
$emp_name = htmlspecialchars($_POST['namaemp']);
$emp_addr = htmlspecialchars($_POST['alamat']);
$emp_status = htmlspecialchars($_POST['statusemp']);
$emp_sex = htmlspecialchars($_POST['sex']);
$emp_child = htmlspecialchars($_POST['jmlanak']);
$emp_phone1 = htmlspecialchars($_POST['notelp1']);
$emp_phone2 = htmlspecialchars($_POST['notelp2']);
$emp_email = htmlspecialchars($_POST['email']);
$emp_birthdate = $_POST['tgllahir'];
$emp_joindate = $_POST['tgljoin'];
$emp_identity_id = htmlspecialchars($_POST['jenis_identitas']);
$emp_identity_no = htmlspecialchars($_POST['no_identitas']);
$emp_last_edu = htmlspecialchars($_POST['last_edu']);
$emp_type = htmlspecialchars($_POST['jenis_kary']);
$data = new Karyawans();
switch ($_GET['p']) {
    case "add":
        $data->AddKaryawan($emp_id, $emp_name, $emp_addr, $emp_status, $emp_child, $emp_sex, $emp_phone1, $emp_phone2, $emp_email, $emp_birthdate, $emp_joindate, $emp_identity_id, $emp_identity_no, $emp_last_edu, $emp_type);
        //$data->AIsi($emp_id,$emp_name,$emp_addr);
        header('location: ../main.php?m=047');
        break;
    case "edit":
        $id = $_REQUEST['id'];
        header('location: ../main.php?m=047');
        break;
    case "del":
        $id = $_REQUEST['id'];
        $data->DeleteKaryawan($id);
        header('location: ../main.php?m=047');
        break;
예제 #2
0
파일: pmb.php 프로젝트: ekobudis/isias
<?php

/**
 * Created by PhpStorm.
 * User: ekobudisusilo
 * Date: 17 /07 /15
 * Time: 01.54
 */
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(-1);
include_once '/Applications/MAMP/htdocs/isias/classes/class.Karyawans.php';
include_once '/Applications/MAMP/htdocs/isias/classes/paginator.class.php';
$emp = new Karyawans();
$stmt = $emp->countAll();
$num_rows = $stmt->rowCount();
if ($num_rows > 0) {
    $pages = new Paginator($num_rows, 19);
    if (isset($_POST['cari'])) {
        $cari = $_POST['cari'];
        $stmt = $emp->GetListEmployee($pages->limit_start, $pages->limit_end);
    } else {
        $stmt = $emp->GetListEmployee($pages->limit_start, $pages->limit_end);
    }
}
echo "<div class='container'>\n    <div class='row'>\n        <input class='btn btn-info' onclick=\"window.location.href='?m=047&p=new';\" value='PMBS Baru'></input>\n        <div class='input-prepend pull-right'>\n            <span class='add-on'><i class='icon-search'></i></span>\n            <input class='span2' id='prependedInput' type='text' name='cari' placeholder='Pencarian..'>\n\n        </div>\n    </div>\n</div>";
?>
<!-- Table Content -->
</br>
<div class='box box-info'>
    <div class='box-body'>
예제 #3
0
파일: users.php 프로젝트: ekobudis/isias
<!--
/**
 * Created by PhpStorm.
 * User: ekobudisusilo
 * Date: 25 /06 /15
 * Time: 23.16
 */-->
<?php 
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(-1);
include_once '/Applications/MAMP/htdocs/isias/classes/class.Users.php';
include_once '/Applications/MAMP/htdocs/isias/classes/class.Karyawans.php';
include_once '/Applications/MAMP/htdocs/isias/classes/paginator.class.php';
$emp = new Karyawans();
$data = $emp->ReadEmployee();
$usr = new Users();
$stmt = $usr->CountAll();
$num_rows = $stmt->rowCount();
if ($num_rows > 0) {
    $pages = new Paginator($num_rows, 19);
    if (isset($_POST['cari'])) {
        $cari = $_POST['cari'];
        $stmt = $usr->GetListUser($pages->limit_start, $pages->limit_end);
    } else {
        $stmt = $usr->GetListUser($pages->limit_start, $pages->limit_end);
    }
}
?>

<div class="container">
예제 #4
0
파일: header.php 프로젝트: ekobudis/isias
                        <li class="dropdown user user-menu">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                                <img src="public/dist/img/user2-160x160.jpg" class="user-image" alt="User Image"/>
                                <span class="hidden-xs"><?php 
echo $_SESSION['nama_pegawai'];
?>
</span>
                            </a>
                            <ul class="dropdown-menu">
                                <!-- User image -->
                                <li class="user-header">
                                    <img src="public/dist/img/user2-160x160.jpg" class="img-circle" alt="User Image" />
                                    <p>
                                    <?php 
echo $_SESSION['nama_pegawai'];
$emp = new Karyawans();
$stmt = $emp->getEmployeeByID($_SESSION['pk_pegawai']);
while ($data = $stmt->fetch(PDO::FETCH_ASSOC)) {
    extract($data);
    $reg_year = $emp_join_date;
}
?>
                                    <small><?php 
echo "Member since " + date_format($reg_year, 'M');
?>
</small></p>
                                </li>
                                <!-- Menu Footer-->
                                <li class="user-footer">
                                    <div class="pull-left">
                                        <a href="#" class="btn btn-default btn-flat">Profile</a>