function stylesheets()
{
    AssetManager::stylesheets(func_get_args());
}
Example #2
0
        define('DB_NAME', $_ENV['DB_NAME']);
        break;
}
if (@$db_load !== false) {
    include ROOT . '/inc/opendb.php';
}
// ===========
// = Helpers =
// ===========
/*
	AssetManager
*/
$javascripts = array('jquery-1.4.2.min', 'jquery-ui-1.8.4.min', 'defaults');
$stylesheets = array('master', 'form_builder');
AssetManager::javascripts($javascripts);
AssetManager::stylesheets($stylesheets);
// ====================
// = Autoload Classes =
// ====================
function __autoload($className)
{
    // Ignore NORM
    if ($className == 'NORM') {
        require_once ROOT . '/inc/classes/class.norm.php';
        return;
    }
    $className[0] = strtolower($className[0]);
    $func = create_function('$c', 'return "_" . strtolower($c[1]);');
    $class_name = preg_replace_callback('/([A-Z])/', $func, $className);
    $class_file = ROOT . '/inc/classes/class.' . $class_name . '.php';
    if (file_exists($class_file)) {
Example #3
0
<?php

include_once $_SERVER['DOCUMENT_ROOT'] . '/inc/config.php';
// ====================
// = Admin Navigation =
// ====================
$admin_links = array('Manage Users' => array('path' => 'users', 'auth' => 'admin'), 'Manage Auth Codes' => array('path' => 'auth_codes', 'auth' => 'su'), 'Manage Roles' => array('path' => 'roles', 'auth' => 'su'), 'Edit Blocks' => array('path' => 'cms', 'auth' => 'admin'), 'Manage Files' => array('path' => 'cms_files', 'auth' => 'su'), 'Manage Extenders' => array('path' => 'extenders', 'auth' => 'admin'), 'Manage Blocks' => array('path' => 'blocks', 'auth' => 'su'), 'Run Tests' => array('path' => 'tests', 'auth' => 'admin'), 'Clear Files' => array('path' => 'clear', 'auth' => 'admin'));
// ================
// = Admin Config =
// ================
$theme = true;
// To disable theme, set to false
AssetManager::stylesheets('admin');
Example #4
0
<?php

error_reporting(E_ALL);
ini_set("display_errors", 1);
include $_SERVER['DOCUMENT_ROOT'] . '/inc/classes/tests/class.test_form_builder.php';
$tester = new Test_FormBuilder();
if (isset($_GET['v'])) {
    $tester->initialize_tests($_GET['v']);
}
require $_SERVER['DOCUMENT_ROOT'] . '/inc/admin/config.php';
$session->auth_or_redirect('admin', '/', true);
$admin_title = 'Run Tests';
$admin_subtitle = 'FormBuilder';
AssetManager::javascripts('tests/form_builder');
AssetManager::stylesheets('tests/form_builder');
include ROOT . '/inc/admin/header.php';
?>

<p><a href="/admin">Back to Admin Home</a></p>
<p><a href="../">Back to Tests Home</a></p>

<div>
  <h1>FormBuilder Test</h1>
  
  <p>Which version would you like to test?</p>
  <?php 
echo $tester->version_links();
?>
  
  <?php 
if (isset($_GET['v'])) {