Rev 46 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
<?php
$config = array(
'database' => array(
'dbserver' => '127.0.0.1',
'dbname' => 'camp2',
'dbusername' => 'camp2',
'dbpassword' => 'camp2'
),
'debug' => 0,
'locations' => array (
'base_url' => '',
'main_script' => 'index.php',
'config_dir' => '/var/www',
'include_dirs' => array (
'php_library_v2' => '/var/www/php72/php_library_v2',
'php_users' => '/var/www/php72/php_users',
'camp' => '/var/www/php72/computer_asset_manager_v2/include'
),
),
);
// fields for the Users class, adds where_clause, a TEXT object
// and super_admin, a boolean
$customUsersFields = array(
'tables' => array(
'users' => array(
'fields' => array(
'super_admin' => array(
'label' => 'Super Admin',
'html type' => 'boolean',
'restrict' => true,
'instructions' => 'Check to allow permissions above even admin',
'hint' => 'User who can edit configs also',
'dbColumn' => 'superuser',
'type' => 'boolean',
'required' => false,
'default' => false
),
'where_clause' => array(
'label' => 'Limit via SQL where clause',
'html type' => 'textarea',
'restrict' => true,
'instructions' => 'This will be added to every SQL query to limit access, or 1=1 for everything',
'hint' => 'Enter an SQL where clause',
'dbColumn' => 'where_clause',
'type' => 'text',
'required' => false,
'default' => '1=1'
)
)
)
)
);
?>
<html>
<head>
</head>
<body>
<div class='install'>
<h1>Build/Edit Configuration</h1>
<form>
<h3>Database</h3>
<p>
<label>Database Name
<input type='text' name='dbname' value='<?php print $config['database']['dbname']; ?>'>
</label>
</p>
<p>
<label>Database Server
<input type='text' name='dbserver' value='<?php print $config['database']['dbserver']; ?>'>
</label>
</p>
<p>
<label>Database User
<input type='text' name='dbusername' value='<?php print $config['database']['dbusername']; ?>'>
</label>
</p>
<p>
<label>Database Password
<input type='text' name='dbpassword' value=''>
</label>
</p>
<h3>Locations</h3>
<p>
<label>Base URL
<input type='text' name='baseurl' value='<?php print $config['locations']['base_url']; ?>'>
</label>
</p>
<p>
<label>Main Script Name
<input type='text' name='main_script' value='<?php print $config['locations']['main_script']; ?>'>
</label>
</p>
<p>
<label>Config Directory
<input type='text' name='config_dir' value='<?php print $config['locations']['config_dir']; ?>'>
</label>
</p>
<p>
<label>PHP Library v2
<input type='text' name='php_library_v2' value='<?php print $config['locations']['include_dirs']['php_library_v2']; ?>'>
</label>
</p>
<p>
<label>PHP Users
<input type='text' name='php_users' value='<?php print $config['locations']['include_dirs']['php_users']; ?>'>
</label>
</p>
<h3>Other</h3>
<p>
<label>Debug Mode
<input type='checkbox' name='debug' <?php if ( $config['debug'] ) print 'checked'; ?>>
</label>
</p>
<input type='submit'>
</form>
</div>
</body>
</html>