public
Description: Git mirror of the CMS Made Simple 2.0 rewrite
Homepage: http://cmsmadesimple.org
Clone URL: git://github.com/tedkulp/cmsmadesimple-2-0.git
tedkulp (author)
Sun Apr 27 07:29:54 -0700 2008
commit  1d4e393fe0cae8142711a915f87157611a76f101
tree    5ae931db88ca7b522756bf319e6cfc6ccda35924
parent  5c1eb285cfb340bd5332b019ff18afc44a4d5881
cmsmadesimple-2-0 / admin / editconfig.php
100644 153 lines (119 sloc) 4.196 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
<?php
#CMS - CMS Made Simple
#(c)2004-2008 by Ted Kulp (ted@cmsmadesimple.org)
#This project's homepage is: http://cmsmadesimple.sf.net
#
#This program is free software; you can redistribute it and/or modify
#it under the terms of the GNU General Public License as published by
#the Free Software Foundation; either version 2 of the License, or
#(at your option) any later version.
#
#This program is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#GNU General Public License for more details.
#You should have received a copy of the GNU General Public License
#along with this program; if not, write to the Free Software
#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
#$Id$
 
$CMS_ADMIN_PAGE=1;
 
require_once("../include.php");
 
check_login();
 
$error = "";
 
$userid = get_userid();
 
if (isset($_POST["cancel"])) {
  redirect("index.php");
  return;
}
 
require_once("header.php");
 
?>
 
<form method="post" action="editconfig.php">
 
<div class="adminform">
 
<h3><?php echo lang('editconfiguration')?></h3>
 
<table cellpadding="2" border="1" cellspacing="0">
  <tr>
    <td><a class="collapseTitle" href="#config" onclick="expandcontent('databaseconfig')"><?php echo lang('database')?></a></td>
    <td><a class="collapseTitle" href="#config" onclick="expandcontent('urlconfig')"><?php echo lang('pathconfig')?></a></td>
    <td><a class="collapseTitle" href="#config" onclick="expandcontent('saveconfig')"><?php echo lang('saveconfig')?></a></td>
  </tr>
</table>
 
<p><p>
 
<div id="databaseconfig" class="expand">
 
<table border="0">
 
  <tr>
    <td align="right"><?php echo lang('databasetype')?>:</td>
    <td>
      <select name="dbms">
        <option value="mysql"<?php echo($config['dbms']=='mysql'?' checked':'')?>>MySQL</option>
        <option value="postgres7"<?php echo($config['dbms']=='postgres7'?' checked':'')?>>PostgreSQL 7</option>
      </select>
    </td>
  </tr>
  <tr>
    <td align="right"><?php echo lang('hostname')?>:</td>
    <td><input type="text" name="db_hostname" value="<?php echo $config["db_hostname"]?>"></td>
  </tr>
  <tr>
    <td align="right"><?php echo lang('username')?>:</td>
    <td><input type="text" name="db_username" value="<?php echo $config["db_username"]?>"></td>
  </tr>
  <tr>
    <td align="right"><?php echo lang('password')?>:</td>
    <td><input type="text" name="db_password" value="<?php echo $config["db_password"]?>"></td>
  </tr>
  <tr>
    <td align="right"><?php echo lang('database')?>:</td>
    <td><input type="text" name="db_database" value="<?php echo $config["db_name"]?>"></td>
  </tr>
  <tr>
    <td align="right"><?php echo lang('databaseprefix')?>:</td>
    <td><input type="text" name="db_prefix" value="<?php echo $config["db_prefix"]?>"></td>
  </tr>
  <tr>
    <td colspan="2">&nbsp;</td>
  </tr>
 
</table>
 
</div>
 
<div id="urlconfig" class="expand">
 
<table border="0">
 
  <tr>
    <td align="right"><?php echo lang('rooturl')?>:</td>
    <td><input type="text" name="root_url" value="<?php echo $config["root_url"]?>"></td>
  </tr>
  <tr>
    <td align="right"><?php echo lang('rootpath')?>:</td>
    <td><input type="text" name="root_path" value="<?php echo $config["root_path"]?>"></td>
  </tr>
  <tr>
    <td align="right"><?php echo lang('queryvar')?>:</td>
    <td><input type="text" name="query_var" value="<?php echo $config["query_var"]?>"></td>
  </tr>
  <tr>
    <td align="right"><?php echo lang('previewspath')?>:</td>
    <td><input type="text" name="previews_path" value="<?php echo $config["previews_path"]?>"></td>
  </tr>
  <tr>
    <td align="right"><?php echo lang('uploadspath')?>:</td>
    <td><input type="text" name="uploads_path" value="<?php echo $config["uploads_path"]?>"></td>
  </tr>
  <tr>
    <td align="right"><?php echo lang('uploadsurl')?>:</td>
    <td><input type="text" name="uploads_url" value="<?php echo $config["uploads_url"]?>"></td>
  </tr>
 
</table>
 
</div>
 
<div id="saveconfig" class="expand">
 
<table border="0">
 
  <tr>
    <td><?php echo lang('saveconfig')?>:</td>
    <td><input type="submit" value="Submit"></td>
  </tr>
 
</table>
 
</div>
 
</div>
 
</form>
 
<?php
 
include_once("footer.php");
 
# vim:ts=4 sw=4 noet
?>