public function __call($func, $argv) { if (substr($func, 0, 3) == 'get') { $uncamelizeMethod = Inflector::uncamelize(lcfirst(substr($func, 3))); $key = Inflector::lower($uncamelizeMethod); return getMeta($key); } elseif (substr($func, 0, 3) == 'set') { $uncamelizeMethod = Inflector::uncamelize(lcfirst(substr($func, 3))); $key = Inflector::lower($uncamelizeMethod); $value = Arrays::first($argv); setMeta($key, $value); return $this; } elseif (substr($func, 0, 3) == 'has') { $uncamelizeMethod = Inflector::uncamelize(lcfirst(substr($func, 3))); $key = Inflector::lower($uncamelizeMethod); return null !== getMeta($key); } }
* student, which was created with setMeta * * @see setMeta * @param string $metaName The name of the meta informtaion that is being requested * @param array $metaArray The array that holds the meta information * @returns string The value collected from the database */ function getMeta($metaName, &$metaArray) { // Returning the value from the array return $metaArray[0][$metaName]; } // Connecting to the database and saving the connection to it for use later $databaseConnection = dbConnect($CFG['DBHost'], $CFG['DBUser'], $CFG['DBPass'], $CFG['DBName']); // Array to hold the meta information collected about the student $studentMetaInformation[] = setMeta($_POST['student'], $databaseConnection); ?> <div class="mdl-grid wow-overflow-hidden"> <!-- Student Details --> <div class="mdl-cell mdl-card mdl-cell--12-col mdl-color--white mdl-shadow--4dp content mdl-color-text--grey-800 wow fadeInUp"> <div class="mdl-card__title mdl-color--accent mdl-color-text--white"> <h2 class="mdl-card__title-text"><?php echo getMeta("studentForename", $studentMetaInformation) . ' ' . getMeta("studentSurname", $studentMetaInformation); ?> </h2> <div class="mdl-layout-spacer"></div> <button class="mdl-button mdl-js-button mdl-button--icon" id="menu-student-details"> <i class="material-icons">more_vert</i> </button> <ul class="mdl-menu mdl-menu--bottom-right mdl-js-menu mdl-js-ripple-effect" for="menu-student-details"> <li class="mdl-menu__item" id="student-meta--edit"><i class="material-icons">edit</i> Edit</li>
getFolderMeta($_POST['path']); } break; case "folderIsVirtual": if (isset($_POST['path'])) { folderIsVirtual($_POST['path']); } break; case "fileIsWritable": if (isset($_POST['path'])) { fileIsWritable($_POST['path']); } break; case "setMeta": if (isset($_POST['path'], $_POST['filename'], $_POST['id'], $_POST['description'], $_POST['flags'])) { setMeta($_POST['path'], $_POST['filename'], $_POST['id'], $_POST['description'], $_POST['flags']); } break; case "fileRename": if (isset($_POST['path'], $_POST['filename'], $_POST['id'], $_POST['newName'])) { fileRename($_POST['path'], $_POST['filename'], $_POST['id'], $_POST['newName']); } break; case "fileMove": if (isset($_POST['path'], $_POST['filename'], $_POST['id'], $_POST['where'])) { fileMove($_POST['path'], $_POST['filename'], $_POST['id'], $_POST['where']); } break; case "fileDelete": if (isset($_POST['path'], $_POST['filename'], $_POST['id'])) { fileDelete($_POST['path'], $_POST['filename'], $_POST['id']);
define("ADMIN_NAV_SETTINGS", "settings"); define("ADMIN_NAV_FRONTEND", "front_end"); // Define Routes define("ROUTE_DASHBOARD", "dashboard"); // Listen Admin Controller Created Event Event::listen("admin.controller.created", function () { // Create Admin Nav Resource generate_navigation(adminNavGroup()); // Reset Resources resetResources(true); // Change Base Page Title setBasePageTitle(app("laravel-admin")->getConfig(Auth::check() ? "title" : "login_title"), true); // Set Meta Data for Pages setRawMeta("charset", "UTF-8"); setRawMeta("http-equiv", "X-UA-Compatible", array("content" => "IE=edge")); setMeta("viewport", "width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"); // Enqueue Styles for Pages enqueue_style('jquery-ui', false, adminCssAssetURL('jquery/jquery-ui-1.10.3.min.css')); enqueue_style('bootstrap', false, adminCssAssetURL('bootstrap/bootstrap.min.css')); enqueue_style('bootstrap-wysihtml5', false, adminCssAssetURL('bootstrap-wysihtml5/bootstrap-wysihtml5.css')); enqueue_style('fancybox2', false, adminCssAssetURL('fancybox2/jquery.fancybox.css')); enqueue_style('font-awesome', false, adminCssAssetURL('font-awesome/font-awesome.min.css')); enqueue_style('bootstrap-date', false, adminCssAssetURL('bootstrap-editable/date/datepicker.css')); enqueue_style('bootstrap-datetime', false, adminCssAssetURL('bootstrap-editable/datetime/datetimepicker.css')); enqueue_style('select2', false, adminCssAssetURL('bootstrap-editable/select2/select2.css')); enqueue_style('bootstrap-editable', false, adminCssAssetURL('bootstrap-editable/bootstrap-editable.css')); enqueue_style('bootstrap-select2', false, adminCssAssetURL('bootstrap-editable/select2/select2-bootstrap.css')); enqueue_style('bootstrap-editable-address', false, adminCssAssetURL('bootstrap-editable/inputs-ext/address/address.css')); enqueue_style('bootstrap-editable-typeaheadjs', false, adminCssAssetURL('bootstrap-editable/inputs-ext/typeaheadjs/typeahead-bootstrap.css')); enqueue_style('bootstrap-tabdrop', false, adminCssAssetURL('bootstrap-tabdrop/bootstrap-tabdrop.css')); enqueue_style('bootstrap-select', false, adminCssAssetURL('bootstrap-select/bootstrap-select.min.css'));