Ejemplo n.º 1
0
 public function controllerVal($id)
 {
     $tipe = RO::lib("access_tipeUser");
     $tipe->_GET = array(str_replace(":", "", $id));
     $admin = $tipe->fetch("id", "WHERE id = {$id} AND nama = 'superAdmin'");
     if ($admin) {
         $this->actionFind("admin_superAdmin");
     } else {
         $this->list["admin_superAdmin"] = array("actionIndex");
     }
     $this->mulai();
     return $this->list;
 }
Ejemplo n.º 2
0
<h1 class="f29 d-uitalic mb10">Acces User</h1>
<a class="btn-1 pad5" onclick="showAddUser()">add</a>
<a href="RefreshAccess" class="btn-2 pad5">refresh</a>

<form id="addTypeUser" method="post" action="addTypeUser">
    <h3 class="f13 mt10">Tambah Tipe User</h3>
    <input name="nama" />
    <input type="submit" name="submit" value="Tambah" class="btn-1 pad220" />
</form>

<?php 
$a = RO::lib("access_tipeUser");
$data = $a->listTipeUser();
$view = RO::lib("view_grid");
$view->gridView($data, array(array("header" => "No", "value" => 'no'), array("header" => "Nama", "value" => '\'<a onclick="listAccessUser(\'.$data["id"].\')">\'.$data["nama"].\'</a>\'')), array('update' => false, 'delete_link' => 'deleteTypeUser'));
?>
<div>
<br /> 
<table>
    <tr>
        <td>Tanggal</td>
        <td>:<input style="width: 90%;" type="date" /></td>
    </tr>
    <tr>
        <td>Keterangan :</td>
        <td>:<textarea style="width: 90%;"></textarea></td>
    </tr>
</table>
</div>
<div id="listAkses">
Ejemplo n.º 3
0
 public function actionUpdateTypeUser()
 {
     $tipe = RO::lib("access_tipeUser");
     $tipe->postReader();
     $query = $tipe->updateQuery("nama = '" . $tipe->data['nama'] . "'", "WHERE id =" . $tipe->data['id']);
     print_r($query);
     $tipe->execute($query);
     header("location: admin");
 }
Ejemplo n.º 4
0
 /** ********************************************************** */
 function __construct($library = array())
 {
     $link = parse_url($_SERVER["REQUEST_URI"]);
     //link dibaca
     $link = $link['path'];
     //diambil path link
     if (__BASEURL__ == "/") {
         $link = substr($link, 1);
     } else {
         $link = str_replace(__BASEURL__, "", $link);
     }
     //dibuang yang sama dengan base
     if (!empty($link)) {
         $this->linkReader($link);
     } else {
         $this->controller = __MAINCONT__;
         $this->action = "actionIndex";
         require_once __WEBSITE__ . "system/controller/{$this->controller}.php";
     }
     if (__ENABLEDB__) {
         /** PDO DATABASE 
         			self::$db_stat = new PDO(__DBSTRING__, __DBUSER__, __DBPASS__);
         			self::$db_stat -> setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
         			self::$db_stat -> setAttribute(PDO::ATTR_EMULATE_PREPARES, true);
                     // */
         /** MYSQL DATABASE */
         include_once "database/db_mysql.php";
         self::$DB = new db_mysql(__DBHOST__, __DBNAME__, __DBUSER__, __DBPASS__);
         /** MYSQLI DATABASE */
         /** POSTGREE DATABASE */
         if (__ACCESSRULE__) {
             $this->accessCek();
         }
     }
     date_default_timezone_set(__TZ__);
     $controller = new $this->controller($this->controller);
     foreach ($library as $key => $lib) {
         $controller->{$key} = self::lib($lib);
     }
     $action = $this->action;
     $controller->{$action}();
 }
Ejemplo n.º 5
0
 /** berfungsi mengeset properties pada class jika kosong diset sesuai default*/
 private function loadLib()
 {
     foreach ($this->lib as $key => $lib) {
         $this->{$key} = RO::lib($lib);
     }
 }
Ejemplo n.º 6
0
 public function lib($lib = array())
 {
     foreach ($lib as $key => $lib) {
         $this->{$key} = $this->{$key} = RO::lib($lib, $this);
     }
 }