Subversion Repositories computer_asset_manager_v2

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
45 rodolico 1
<?php
2
   $config = array(
3
      'database'  => array(
4
         'dbserver'     => '127.0.0.1',
5
         'dbname'       => 'camp2',
6
         'dbusername'   => 'camp2',
7
         'dbpassword'   => 'camp2'
8
         ),
9
      'debug'     => 0,
10
      'locations' => array (
11
         'base_url'  => '',
12
         'main_script'  => 'index.php',
13
         'config_dir'   => '/var/www',
14
         'include_dirs' => array (
15
            'php_library_v2'  => '/var/www/php72/php_library_v2',
16
            'php_users'       => '/var/www/php72/php_users',
17
            'camp'            => '/var/www/php72/computer_asset_manager_v2/include'
18
         ),
19
      ),
20
   );
21
   // fields for the Users class, adds where_clause, a TEXT object
22
   // and super_admin, a boolean
23
   $customUsersFields = array( 
24
      'tables' => array(
25
         'users' => array(
26
            'fields' => array(
27
               'super_admin'   => array(
28
                     'label'  => 'Super Admin',
29
                     'html type' => 'boolean',
30
                     'restrict' => true,
31
                     'instructions' => 'Check to allow permissions above even admin',
32
                     'hint'     => 'User who can edit configs also',
33
                     'dbColumn'  =>  'superuser',
34
                     'type'      => 'boolean',
35
                     'required'  => false,
36
                     'default'   => false
37
               ),
38
               'where_clause' => array(
39
                     'label'  => 'Limit via SQL where clause',
40
                     'html type' => 'textarea',
41
                     'restrict' => true,
42
                     'instructions' => 'This will be added to every SQL query to limit access, or 1=1 for everything',
43
                     'hint'     => 'Enter an SQL where clause',
44
                     'dbColumn'  =>  'where_clause',
45
                     'type'      => 'text',
46
                     'required'  => false,
47
                     'default'   => '1=1'
48
                     )
49
                  )
50
               )
51
            )
52
      );
53
?>
54
<html>
55
   <head>
56
   </head>
57
   <body>
58
      <div class='install'>
59
         <h1>Build/Edit Configuration</h1>
60
         <form>
61
               <h3>Database</h3>
62
            <p>
63
               <label>Database Name
64
                  <input type='text' name='dbname' value='<?php print $config['database']['dbname']; ?>'>
65
               </label>
66
            </p>
67
            <p>
68
               <label>Database Server
69
                  <input type='text' name='dbserver' value='<?php print $config['database']['dbserver']; ?>'>
70
               </label>
71
            </p>
72
            <p>
73
               <label>Database User
74
                  <input type='text' name='dbusername' value='<?php print $config['database']['dbusername']; ?>'>
75
               </label>
76
            </p>
77
            <p>
78
               <label>Database Password
79
                  <input type='text' name='dbpassword' value=''>
80
               </label>
81
            </p>
82
            <h3>Locations</h3>
83
            <p>
84
               <label>Base URL
85
                  <input type='text' name='baseurl' value='<?php print $config['locations']['base_url']; ?>'>
86
               </label>
87
            </p>
88
            <p>
89
               <label>Main Script Name
90
                  <input type='text' name='main_script' value='<?php print $config['locations']['main_script']; ?>'>
91
               </label>
92
            </p>
93
            <p>
94
               <label>Config Directory
95
                  <input type='text' name='config_dir' value='<?php print $config['locations']['config_dir']; ?>'>
96
               </label>
97
            </p>
98
            <p>
99
               <label>PHP Library v2
100
                  <input type='text' name='php_library_v2' value='<?php print $config['locations']['include_dirs']['php_library_v2']; ?>'>
101
               </label>
102
            </p>
103
            <p>
104
               <label>PHP Users
105
                  <input type='text' name='php_users' value='<?php print $config['locations']['include_dirs']['php_users']; ?>'>
106
               </label>
107
            </p>
108
            <h3>Other</h3>
109
            <p>
110
               <label>Debug Mode
111
                  <input type='checkbox' name='debug' <?php if ( $config['debug'] ) print 'checked'; ?>>
112
               </label>
113
            </p>
114
 
115
            <input type='submit'>
116
         </form>
117
      </div>
118
   </body>
119
</html>