PHP Classes

File: vendor/jackbooted/config/AdminConfig.php

Recommend this page to a friend!
  Packages of Brett Dutton   JackBooted PHP Framework   vendor/jackbooted/config/AdminConfig.php   Download  
File: vendor/jackbooted/config/AdminConfig.php
Role: Class source
Content type: text/plain
Description: Class source
Class: JackBooted PHP Framework
Web application framework using simplified MVC
Author: By
Last change:
Date: 10 years ago
Size: 1,077 bytes
 

 

Contents

Class file image Download
<?php
namespace Jackbooted\Config;

use \Jackbooted\Admin\Login;
use \Jackbooted\Forms\CRUD;
use \Jackbooted\G;
use \Jackbooted\Html\WebPage;
/**
 * @copyright Confidential and copyright (c) 2016 Jackbooted Software. All rights reserved.
 *
 * Written by Brett Dutton of Jackbooted Software
 * brett at brettdutton dot com
 *
 * This software is written and distributed under the GNU General Public
 * License which means that its source code is freely-distributed and
 * available to the general public.
 */

/**
 *
 */
class AdminConfig extends WebPage {
    const DEF = '\Jackbooted\Config\AdminConfig->index()';

    public function index () {
        if ( ! G::isLoggedIn () ) {
            return Login::controller( Login::DEF );
        }

        $crud = new CRUD( 'tblConfig',  [ 'insDefaults' =>  [ 'fldUserID' => G::getUserID() ],
                                          'primaryKey'  => 'fldKey' ] );
        $crud->setColDisplay ( 'fldUserID', CRUD::HIDDEN );
        $crud->columnAttrib ( 'fldValue', [ 'size' => 60 ] );

        return $crud->index();
    }
}