moved config to use new design

This commit is contained in:
seek3r 2001-01-07 10:43:48 +00:00
parent 2bdc3cd5bd
commit 07e48031cb
4 changed files with 162 additions and 274 deletions

View File

@ -1,15 +1,92 @@
<?php
/**************************************************************************\
* phpGroupWare *
* http://www.phpgroupware.org *
* -------------------------------------------- *
* 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. *
\**************************************************************************/
<tr bgcolor="FFFFFF">
<td colspan="2">&nbsp;</td>
</tr>
/* $Id$ */
<tr bgcolor="486591">
<td colspan="2"><font color="fefefe">&nbsp;<b>Authentication / Accounts</b></font></td>
</tr>
$phpgw_info["setup"]["admin"]["name"] = "Administration";
$phpgw_info["setup"]["admin"]["hide_from_navbar"] = False;
<?php $selected[$current_config["auth_type"]] = " selected"; ?>
<tr bgcolor="e6e6e6">
<td>Select which type of authentication you are using.</td>
<td>
<select name="newsettings[auth_type]">
<option value="sql"<?php echo $selected["sql"]; ?>>SQL</option>
<option value="ldap"<?php echo $selected["ldap"]; ?>>LDAP</option>
<option value="mail"<?php echo $selected["mail"]; ?>>Mail</option>
<option value="http"<?php echo $selected["http"]; ?>>HTTP</option>
<option value="pam"<?php echo $selected["pam"]; ?>>PAM (Not Ready)</option>
</select>
</td>
</tr>
<?php $selected = array(); ?>
<?php $selected[$current_config["account_repository"]] = " selected"; ?>
<tr bgcolor="e6e6e6">
<td>Select where you want to store/retrieve user accounts.</td>
<td>
<select name="newsettings[account_repository]">
<option value="sql"<?php echo $selected["sql"]; ?>>SQL</option>
<option value="ldap"<?php echo $selected["ldap"]; ?>>LDAP</option>
</select>
</td>
</tr>
<?php $selected = array(); ?>
<tr bgcolor="e6e6e6">
<td>Auto create account records for authenticated users:</td>
<td><input type="checkbox" name="newsettings[auto_create_acct]" value="True"<?php echo ($current_config["auto_create_acct"]?" checked":""); ?>></td>
</tr>
<?php $selected[$current_config["acl_default"]] = " selected"; ?>
<tr bgcolor="e6e6e6">
<td>If no ACL records for user or any group the user is a member of: </td>
<td>
<select name="newsettings[acl_default]">
<option value="grant"<?php echo $selected["grant"]; ?>>Grant Access</option>
<option value="deny"<?php echo $selected["deny"]; ?>>Deny Access</option>
</select>
</td>
</tr>
<tr bgcolor="e6e6e6">
<td>LDAP host:</td>
<td><input name="newsettings[ldap_host]" value="<?php echo $current_config["ldap_host"]; ?>"></td>
</tr>
<tr bgcolor="e6e6e6">
<td>LDAP context:</td>
<td><input name="newsettings[ldap_context]" value="<?php echo $current_config["ldap_context"]; ?>" size="40"></td>
</tr>
<tr bgcolor="e6e6e6">
<td>LDAP root dn:</td>
<td><input name="newsettings[ldap_root_dn]" value="<?php echo $current_config["ldap_root_dn"]; ?>" size="40"></td>
</tr>
<tr bgcolor="e6e6e6">
<td>LDAP root password:</td>
<td><input name="newsettings[ldap_root_pw]" value="<?php echo $current_config["ldap_root_pw"]; ?>"></td>
</tr>
<?php $selected[$current_config["ldap_encryption_type"]] = " selected"; ?>
<tr bgcolor="e6e6e6">
<td>LDAP encryption type</td>
<td>
<select name="newsettings[ldap_encryption_type]">
<option value="DES"<?php echo $selected["DES"]; ?>>DES</option>
<option value="MD5"<?php echo $selected["MD5"]; ?>>MD5</option>
</select>
</td>
</tr>
<?php $selected = array(); ?>
<tr bgcolor="e6e6e6">
<td>Use cookies to pass sessionid:</td>
<td><input type="checkbox" name="newsettings[usecookies]" value="True"<?php echo ($current_config["usecookies"]?" checked":""); ?>></td>
</tr>
<tr bgcolor="e6e6e6">
<td>Enter some random text for app_session <br>encryption (requires mcrypt)</td>
<td><input name="newsettings[encryptkey]" value="<?php echo $current_config["encryptkey"]; ?>" size="40"></td>
</tr>

View File

@ -0,0 +1,65 @@
<tr bgcolor="FFFFFF">
<td colspan="2">&nbsp;</td>
</tr>
<tr bgcolor="486591">
<td colspan="2"><font color="fefefe">&nbsp;<b>Preferences</b></font></td>
</tr>
<?php $selected[$current_config["showpoweredbyon"]] = " selected"; ?>
<tr bgcolor="e6e6e6">
<td>Showed powered by logo on:</td>
<td>
<select name="newsettings[showpoweredbyon]">
<option value="bottom"<?php echo $selected["bottom"]; ?>>bottom</option>
<option value="top"<?php echo $selected["top"]; ?>>top</option>
</select>
</td>
</tr>
<?php $selected = array(); ?>
<?php $selected[$current_config["template_set"]] = " selected"; ?>
<tr bgcolor="e6e6e6">
<td>Interface/Template Selection:<br> <!---(if user choice, and they dont make a selection, then classic will be used)---></td>
<td>
<select name="newsettings[template_set]">
<?php
$templates = $phpgw_setup->get_template_list();
while (list ($key, $value) = each ($templates)){
echo '<option value="'.$key.'" '.$selected[$key].'>'.$templates[$key]["title"].'</option>';
}
?>
</select>
</td>
</tr>
<?php $selected = array(); ?>
<?php $selected[$current_config["useframes"]] = " selected"; ?>
<tr bgcolor="e6e6e6">
<td>Frame support:</td>
<td>
<select name="newsettings[useframes]">
<option value="allowed"<?php echo $selected["allowed"]; ?>>Allow frames</option>
<option value="always"<?php echo $selected["always"]; ?>>Force frames</option>
<option value="never"<?php echo $selected["never"]; ?>>Disable frames</option>
</select>
</td>
</tr>
<?php $selected = array(); ?>
<?php $selected[$current_config["htmlcompliant"]] = " selected"; ?>
<tr bgcolor="e6e6e6">
<td>Use pure HTML compliant code (not fully working yet):</td>
<td>
<select name="newsettings[htmlcompliant]">
<option value="True"<?php echo $selected["True"]; ?>>True</option>
<option value="False"<?php echo $selected["False"]; ?>>False</option>
</select>
</td>
</tr>
<?php $selected = array(); ?>
<tr bgcolor="e6e6e6">
<td>Would like like phpGroupWare to check for new version<br>when admins login ?:</td>
<td><input type="checkbox" name="newsettings[checkfornewversion]" value="True"<?php echo ($current_config["checkfornewversion"]?" checked":""); ?>></td>
</tr>

View File

@ -104,164 +104,6 @@
<td colspan="2">&nbsp;</td>
</tr>
<tr bgcolor="486591">
<td colspan="2"><font color="fefefe">&nbsp;<b>Mail settings</b></font></td>
</tr>
<tr bgcolor="e6e6e6">
<td>Enter the location of your mail server:</td>
<td><input name="newsettings[mail_server]" value="<?php echo $current_config["mail_server"]; ?>"></td>
</tr>
<?php $selected[$current_config["mail_server_type"]] = " selected"; ?>
<tr bgcolor="e6e6e6">
<td>Select your mail server type:</td>
<td>
<select name="newsettings[mail_server_type]">
<option value="imap"<?php echo $selected["imap"]; ?>>IMAP</option>
<option value="pop3"<?php echo $selected["pop3"]; ?>>POP-3</option>
</select>
</td>
</tr>
<?php $selected = array(); ?>
<?php $selected[$current_config["imap_server_type"]] = " selected"; ?>
<tr bgcolor="e6e6e6">
<td>IMAP server type:</td>
<td>
<select name="newsettings[imap_server_type]">
<option value="Cyrus"<?php echo $selected["Cyrus"]; ?>>Cyrus or Courier</option>
<option value="UWash"<?php echo $selected["UWash"]; ?>>UWash</option>
<option value="UW-Maildir"<?php echo $selected["UW-Maildir"]; ?>>UW-Maildir</option>
</select>
</td>
</tr>
<?php $selected = array(); ?>
<tr bgcolor="e6e6e6">
<td>Enter your mail sufix:</td>
<td><input name="newsettings[mail_suffix]" value="<?php echo $current_config["mail_suffix"]; ?>"></td>
</tr>
<?php $selected[$current_config["mail_login_type"]] = " selected"; ?>
<tr bgcolor="e6e6e6">
<td>Mail server login type:</td>
<td>
<select name="newsettings[mail_login_type]">
<option value="standard"<?php echo $selected["standard"]; ?>>standard</option>
<option value="vmailmgr"<?php echo $selected["vmailmgr"]; ?>>vmailmgr</option>
</select>
</td>
</tr>
<?php $selected = array(); ?>
<tr bgcolor="e6e6e6">
<td>Enter your SMTP server hostname:</td>
<td><input name="newsettings[smtp_server]" value="<?php echo $current_config["smtp_server"]; ?>"></td>
</tr>
<tr bgcolor="e6e6e6">
<td>Enter your SMTP server port:</td>
<td><input name="newsettings[smtp_port]" value="<?php echo $current_config["smtp_port"]; ?>"></td>
</tr>
<tr bgcolor="FFFFFF">
<td colspan="2">&nbsp;</td>
</tr>
<tr bgcolor="486591">
<td colspan="2"><font color="fefefe">&nbsp;<b>Authentication / Accounts</b></font></td>
</tr>
<?php $selected[$current_config["auth_type"]] = " selected"; ?>
<tr bgcolor="e6e6e6">
<td>Select which type of authentication you are using.</td>
<td>
<select name="newsettings[auth_type]">
<option value="sql"<?php echo $selected["sql"]; ?>>SQL</option>
<option value="ldap"<?php echo $selected["ldap"]; ?>>LDAP</option>
<option value="mail"<?php echo $selected["mail"]; ?>>Mail</option>
<option value="http"<?php echo $selected["http"]; ?>>HTTP</option>
<option value="pam"<?php echo $selected["pam"]; ?>>PAM (Not Ready)</option>
</select>
</td>
</tr>
<?php $selected = array(); ?>
<?php $selected[$current_config["account_repository"]] = " selected"; ?>
<tr bgcolor="e6e6e6">
<td>Select where you want to store/retrieve user accounts.</td>
<td>
<select name="newsettings[account_repository]">
<option value="sql"<?php echo $selected["sql"]; ?>>SQL</option>
<option value="ldap"<?php echo $selected["ldap"]; ?>>LDAP</option>
</select>
</td>
</tr>
<?php $selected = array(); ?>
<tr bgcolor="e6e6e6">
<td>Auto create account records for authenticated users:</td>
<td><input type="checkbox" name="newsettings[auto_create_acct]" value="True"<?php echo ($current_config["auto_create_acct"]?" checked":""); ?>></td>
</tr>
<?php $selected[$current_config["acl_default"]] = " selected"; ?>
<tr bgcolor="e6e6e6">
<td>If no ACL records for user or any group the user is a member of: </td>
<td>
<select name="newsettings[acl_default]">
<option value="grant"<?php echo $selected["grant"]; ?>>Grant Access</option>
<option value="deny"<?php echo $selected["deny"]; ?>>Deny Access</option>
</select>
</td>
</tr>
<tr bgcolor="e6e6e6">
<td>LDAP host:</td>
<td><input name="newsettings[ldap_host]" value="<?php echo $current_config["ldap_host"]; ?>"></td>
</tr>
<tr bgcolor="e6e6e6">
<td>LDAP context:</td>
<td><input name="newsettings[ldap_context]" value="<?php echo $current_config["ldap_context"]; ?>" size="40"></td>
</tr>
<tr bgcolor="e6e6e6">
<td>LDAP root dn:</td>
<td><input name="newsettings[ldap_root_dn]" value="<?php echo $current_config["ldap_root_dn"]; ?>" size="40"></td>
</tr>
<tr bgcolor="e6e6e6">
<td>LDAP root password:</td>
<td><input name="newsettings[ldap_root_pw]" value="<?php echo $current_config["ldap_root_pw"]; ?>"></td>
</tr>
<?php $selected[$current_config["ldap_encryption_type"]] = " selected"; ?>
<tr bgcolor="e6e6e6">
<td>LDAP encryption type</td>
<td>
<select name="newsettings[ldap_encryption_type]">
<option value="DES"<?php echo $selected["DES"]; ?>>DES</option>
<option value="MD5"<?php echo $selected["MD5"]; ?>>MD5</option>
</select>
</td>
</tr>
<?php $selected = array(); ?>
<tr bgcolor="e6e6e6">
<td>Use cookies to pass sessionid:</td>
<td><input type="checkbox" name="newsettings[usecookies]" value="True"<?php echo ($current_config["usecookies"]?" checked":""); ?>></td>
</tr>
<tr bgcolor="e6e6e6">
<td>Enter some random text for app_session <br>encryption (requires mcrypt)</td>
<td><input name="newsettings[encryptkey]" value="<?php echo $current_config["encryptkey"]; ?>" size="40"></td>
</tr>
<tr bgcolor="FFFFFF">
<td colspan="2">&nbsp;</td>
</tr>
<tr bgcolor="486591">
<td colspan="2"><font color="fefefe">&nbsp;<b>Server information</b></font></td>
</tr>
@ -281,64 +123,6 @@
<td><input name="newsettings[httpproxy_port]" value="<?php echo $current_config["httpproxy_port"]; ?>"></td>
</tr>
<?php $selected[$current_config["showpoweredbyon"]] = " selected"; ?>
<tr bgcolor="e6e6e6">
<td>Showed powered by logo on:</td>
<td>
<select name="newsettings[showpoweredbyon]">
<option value="bottom"<?php echo $selected["bottom"]; ?>>bottom</option>
<option value="top"<?php echo $selected["top"]; ?>>top</option>
</select>
</td>
</tr>
<?php $selected = array(); ?>
<?php $selected[$current_config["template_set"]] = " selected"; ?>
<tr bgcolor="e6e6e6">
<td>Interface/Template Selection:<br> (if user choice, and they dont make a selection, then classic will be used)</td>
<td>
<select name="newsettings[template_set]">
<?php
$templates = $phpgw_setup->get_template_list();
while (list ($key, $value) = each ($templates)){
echo '<option value="'.$key.'" '.$selected[$key].'>'.$templates[$key]["title"].'</option>';
}
?>
</select>
</td>
</tr>
<?php $selected = array(); ?>
<?php $selected[$current_config["useframes"]] = " selected"; ?>
<tr bgcolor="e6e6e6">
<td>Frame support:</td>
<td>
<select name="newsettings[useframes]">
<option value="allowed"<?php echo $selected["allowed"]; ?>>Allow frames</option>
<option value="always"<?php echo $selected["always"]; ?>>Force frames</option>
<option value="never"<?php echo $selected["never"]; ?>>Disable frames</option>
</select>
</td>
</tr>
<?php $selected = array(); ?>
<?php $selected[$current_config["htmlcompliant"]] = " selected"; ?>
<tr bgcolor="e6e6e6">
<td>Use pure HTML compliant code (not fully working yet):</td>
<td>
<select name="newsettings[htmlcompliant]">
<option value="True"<?php echo $selected["True"]; ?>>True</option>
<option value="False"<?php echo $selected["False"]; ?>>False</option>
</select>
</td>
</tr>
<?php $selected = array(); ?>
<tr bgcolor="e6e6e6">
<td>Would like like phpGroupWare to check for new version<br>when admins login ?:</td>
<td><input type="checkbox" name="newsettings[checkfornewversion]" value="True"<?php echo ($current_config["checkfornewversion"]?" checked":""); ?>></td>
</tr>
<tr bgcolor="e6e6e6">
<td>Enter the title for your site.</td>
<td><input name="newsettings[site_title]" value="<?php echo $current_config["site_title"]; ?>"></td>
@ -349,48 +133,10 @@
<td><input name="newsettings[hostname]" value="<?php echo $SERVER_NAME; ?>"></td>
</tr>
<tr bgcolor="FFFFFF">
<td colspan="2">&nbsp;</td>
</tr>
<tr bgcolor="486591">
<td colspan="2"><font color="fefefe">&nbsp;<b>NNTP settings</b></font></td>
</tr>
<tr bgcolor="e6e6e6">
<td>Enter your NNTP server hostname:</td>
<td><input name="newsettings[nntp_server]" value="<?php echo $current_config["nntp_server"]; ?>"></td>
</tr>
<tr bgcolor="e6e6e6">
<td>Enter your NNTP server port:</td>
<td><input name="newsettings[nntp_port]" value="<?php echo $current_config["nntp_port"]; ?>"></td>
</tr>
<tr bgcolor="e6e6e6">
<td>Enter your NNTP sender:</td>
<td><input name="newsettings[nntp_sender]" value="<?php echo $current_config["nntp_sender"]; ?>"></td>
</tr>
<tr bgcolor="e6e6e6">
<td>Enter your NNTP organization:</td>
<td><input name="newsettings[nntp_organization]" value="<?php echo $current_config["nntp_organization"]; ?>"></td>
</tr>
<tr bgcolor="e6e6e6">
<td>Enter your NNTP admins email address:</td>
<td><input name="newsettings[nntp_admin]" value="<?php echo $current_config["nntp_admin"]; ?>"></td>
</tr>
<tr bgcolor="e6e6e6">
<td>Enter your NNTP login:</td>
<td><input name="newsettings[nntp_login_username]" value="<?php echo $current_config["nntp_login_username"]; ?>"></td>
</tr>
<tr bgcolor="e6e6e6">
<td>Enter your NNTP password:</td>
<td><input name="newsettings[nntp_login_password]" value="<?php echo $current_config["nntp_login_password"]; ?>"></td>
</tr>
<?php
$phpgw_setup->execute_script("config");
//$phpgw_setup->execute_script("config",array("accounts", "preferences","email"));
?>
<tr bgcolor="FFFFFF">
<td colspan="2">&nbsp;</td>

View File

@ -279,8 +279,8 @@
function get_template_list(){
global $phpgw_info;
$d = dir($phpgw_info["server"]["server_root"]."/phpgwapi/templates");
$list["user_choice"]["name"] = "user_choice";
$list["user_choice"]["title"] = "Users Choice";
//$list["user_choice"]["name"] = "user_choice";
//$list["user_choice"]["title"] = "Users Choice";
while($entry=$d->read()) {
if ($entry != "CVS" && $entry != "." && $entry != ".."){
$list[$entry]["name"] = $entry;
@ -335,7 +335,7 @@ echo "phpgw_info[setup][$key][status]: ".$phpgw_info["setup"][$key]["status"]."<
}
function execute_script($script, $appname = ""){
global $phpgw_info, $phpgw_domain;
global $phpgw_info, $phpgw_domain, $current_config, $newsetting, $phpgw_setup;
if ($appname == ""){
$d = dir($phpgw_info["server"]["server_root"]);
while($entry=$d->read()) {