<?php include_once '/Applications/MAMP/htdocs/isias/classes/class.Identitas.php'; include_once '/Applications/MAMP/htdocs/isias/classes/class.Yayasan.php'; $yys = new Yayasan(); $y = $yys->getYayasan(); $jml_rows = $y->rowCount(); $info = new Identitas(); $stmt = $info->getIdentitas(); $nums = $stmt->rowCount(); if ($nums > 0) { while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) { extract($row); ?> <div class='box box-info'> <div class='box-body'> <div class='row'> <form role='form' method='post' enctype='multipart/form-data' action='classes/crud_identitas.php?p=edit'> <div class='col-md-12'> <div class='alert alert-info col-md-12'> <button type='button' class='close' data-dismiss='alert' aria-hidden='true'>×</button> Selamat Datang, Silahkan Edit data Identitas sekolah ini dengan data yang sebenar-benarnya. </div> <div class='well well-sm'><strong><span class='glyphicon glyphicon-asterisk'></span> Required Field</strong></div> <div class='form-group'> <label>Nama Yayasan</label> <div class='input-group'> <select class="form-control input-md col-md-8" name="yayasan" id="yayasan"> <?php $id_sekolah = $sekolah_pk; while ($n = $y->fetch(PDO::FETCH_ASSOC)) {
include_once '/Applications/MAMP/htdocs/isias/classes/class.UnitSekolah.php'; include_once '/Applications/MAMP/htdocs/isias/classes/class.Identitas.php'; include_once '/Applications/MAMP/htdocs/isias/classes/paginator.class.php'; $unit = new UnitSekolah(); $stmt = $unit->countAll(); $num_rows = $stmt->rowCount(); if ($num_rows > 0) { $pages = new Paginator($num_rows, 19); if (isset($_POST['cari'])) { $cari = $_POST['cari']; $stmt = $unit->GetListUnitSekolah($pages->limit_start, $pages->limit_end); } else { $stmt = $unit->GetListUnitSekolah($pages->limit_start, $pages->limit_end); } } $info = new Identitas(); $stmt_info = $info->getIdentitas(); $page = isset($_GET['p']) ? $_GET['p'] : null; switch ($page) { default: echo "<div class='container'>\n <div class='row'>\n <input class='btn btn-info' onclick=\"window.location.href='?m=005&p=new';\" value='Unit Sekolah Baru'></input>\n </div>\n </div>"; //<!-- Table Content --> echo "</br>\n <div class='box box-info'>\n <div class='box-header'>\n <h3 class='box-title'>Daftar Unit Sekolah</h3>\n <div class='box-tools'>\n <div class='input-group' style='width: 150px;'>\n <input type='text' name='table_search' class='form-control input-sm pull-right' placeholder='Search' />\n <div class='input-group-btn'>\n <button class='btn btn-sm btn-default'><i class='fa fa-search'></i></button>\n </div>\n </div>\n </div>\n </div>\n <div class='box-body table-responsive'>\n <table class='table no-margin'>\n <thead>\n <tr>\n <th style='width:240px'>Nama Sekolah</th>\n <th style='width:100px'>Unit</th>\n <th style='width:120px'>Keterangan</th>\n <th style='width:70px'>Status</th>\n <th style='width:40px'></th>\n </tr>\n </thead>\n <tbody id='pageData'>"; while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) { extract($row); echo "<tr>\n <td>{$nama_sekolah}</td>\n <td>{$unit_name}</td>\n <td>{$unit_desc}</td>"; if ($unit_status == 1) { echo "<td>Suspended</td>"; } else { echo "<td>Actived</td>"; }
* Created by PhpStorm. * User: ekobudisusilo * Date: 28 /06 /15 * Time: 00.52 */ ob_start(); include 'class.Identitas.php'; $nama = htmlspecialchars($_POST['nama']); $alamat = htmlspecialchars($_POST['alamat']); $no_telp = htmlspecialchars($_POST['notelp']); $no_fax = htmlspecialchars($_POST['nofax']); $email = htmlspecialchars($_POST['email']); $website = htmlspecialchars($_POST['website']); $negara = htmlspecialchars($_POST['negara']); $pejabat_1 = htmlspecialchars($_POST['pejabat1']); $jabatan_1 = htmlspecialchars($_POST['jabatan1']); $pejabat_2 = htmlspecialchars($_POST['pejabat2']); $jabatan_2 = htmlspecialchars($_POST['jabatan2']); $logo = htmlspecialchars($_POST['logo']); $data = new Identitas(); switch ($_GET['p']) { case "add": $data->AddIdentitas($nama, $alamat, $no_telp, $no_fax, $email, $website, $negara, $pejabat_1, $jabatan_1, $pejabat_2, $jabatan_2, $logo); header('location: ../main.php?m=002'); break; case "edit": $data->EditIdentitas($nama, $alamat, $no_telp, $no_fax, $email, $website, $negara, $pejabat_1, $jabatan_1, $pejabat_2, $jabatan_2, $logo); header('location: ../main.php?m=002'); break; } ob_end_flush();