mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 16:03:47 +01:00
create header is now using templates
This commit is contained in:
parent
6cfdfaf372
commit
20c3f60c29
@ -115,7 +115,7 @@
|
||||
}
|
||||
if ($docommit) {
|
||||
if ($account_id <> $phpgw_info["user"]["account_id"]) {
|
||||
$phpgw->preferences->commit_user($users_account_id);
|
||||
// $phpgw->preferences->commit_user($users_account_id);
|
||||
} else {
|
||||
$phpgw_info["user"]["preferences"] = $phpgw_newuser["user"]["preferences"];
|
||||
unset($phpgw_newuser);
|
||||
|
@ -1,8 +1,8 @@
|
||||
<?php
|
||||
$phpgw->preferences->add_newuser("common","maxmatchs","15");
|
||||
$phpgw->preferences->add_newuser("common","theme","default");
|
||||
$phpgw->preferences->add_newuser("common","tz_offset","0");
|
||||
$phpgw->preferences->add_newuser("common","dateformat","m/d/Y");
|
||||
$phpgw->preferences->add_newuser("common","timeformat","12");
|
||||
$phpgw->preferences->add_newuser("common","lang","en");
|
||||
// $phpgw->preferences->add_newuser("common","maxmatchs","15");
|
||||
// $phpgw->preferences->add_newuser("common","theme","default");
|
||||
// $phpgw->preferences->add_newuser("common","tz_offset","0");
|
||||
// $phpgw->preferences->add_newuser("common","dateformat","m/d/Y");
|
||||
// $phpgw->preferences->add_newuser("common","timeformat","12");
|
||||
// $phpgw->preferences->add_newuser("common","lang","en");
|
||||
?>
|
||||
|
@ -28,34 +28,34 @@
|
||||
* the absolute path to fit your site, and you should be up and running. *
|
||||
\**************************************************************************/
|
||||
|
||||
$phpgw_info["server"]["server_root"] = "__SERVER_ROOT__";
|
||||
$phpgw_info["server"]["include_root"] = "__INCLUDE_ROOT__";
|
||||
$phpgw_info["server"]["server_root"] = "{SERVER_ROOT}";
|
||||
$phpgw_info["server"]["include_root"] = "{INCLUDE_ROOT}";
|
||||
|
||||
$phpgw_domain["default"] = array (
|
||||
"db_host" => "__DB_HOST__",
|
||||
"db_name" => "__DB_NAME__",
|
||||
"db_user" => "__DB_USER__",
|
||||
"db_pass" => "__DB_PASS__",
|
||||
"db_host" => "{DB_HOST}",
|
||||
"db_name" => "{DB_NAME}",
|
||||
"db_user" => "{DB_USER}",
|
||||
"db_pass" => "{DB_PASS}",
|
||||
/* Look at the README file */
|
||||
"db_type" => "__DB_TYPE__",
|
||||
"db_type" => "{DB_TYPE}",
|
||||
/* This will limit who is allowed to make configuration modifcations */
|
||||
"config_passwd" => "__CONFIG_PASS__"
|
||||
"config_passwd" => "{CONFIG_PASS}"
|
||||
);
|
||||
|
||||
/* If you want to have your domains in a select box, change to True */
|
||||
$phpgw_info["server"]["show_domain_selectbox"] = False;
|
||||
$phpgw_info["server"]["show_domain_selectbox"] = {DOMAIN_SELECTBOX};
|
||||
|
||||
/* This is used to control mcrypt's use */
|
||||
$phpgw_info["server"]["mcrypt_enabled"] = __ENABLE_MCRYPT__;
|
||||
$phpgw_info["server"]["mcrypt_enabled"] = {ENABLE_MCRYPT};
|
||||
/* Set this to "old" for versions < 2.4, otherwise the exact mcrypt version you use. */
|
||||
$phpgw_info["server"]["versions"]["mcrypt"] = "__MCRYPT_VERSION__";
|
||||
$phpgw_info["server"]["versions"]["mcrypt"] = "{MCRYPT_VERSION}";
|
||||
|
||||
/* This is a random string used as the initilazation vector for mcrypt
|
||||
feel free to change it when setting up phpgroupware on a clean database,
|
||||
but you must not change it after that point!
|
||||
It should be around 30 bytes in length.
|
||||
*/
|
||||
$phpgw_info["server"]["mcrypt_iv"] = "__MCRYPT_IV__";
|
||||
$phpgw_info["server"]["mcrypt_iv"] = "{MCRYPT_IV}";
|
||||
|
||||
/* Uncomment this out and use this for supporting different domains using this single install */
|
||||
/* (ignore if you are only supporting a single domain)*/
|
||||
|
@ -145,14 +145,14 @@
|
||||
</td></tr>
|
||||
<tr bgcolor=486591><th colspan=2><font color="fefefe">Settings</font></th></tr>
|
||||
<form action="<? echo $PHP_SELF ?>" method=post>
|
||||
<input type=hidden name=write_config value=true>
|
||||
<tr><td colspan=2><b>Server Root</b><br><input type=text name=server_root size=80 value="<? echo $phpgw_info["server"]["server_root"] ?>"></td></tr>
|
||||
<tr><td colspan=2><b>Include Root (this should be the same as Server Root unless you know what you are doing)</b><br><input type=text name=include_root size=80 value="<? echo $phpgw_info["server"]["include_root"] ?>"></td></tr>
|
||||
<tr><td><b>DB Host</b><br><input type=text name=db_host value="<? echo $phpgw_info["server"]["db_host"] ?>"></td><td>Hostname/IP of Databaseserver</td></tr>
|
||||
<tr><td><b>DB Name</b><br><input type=text name=db_name value="<? echo $phpgw_info["server"]["db_name"] ?>"></td><td>Name of Database</td></tr>
|
||||
<tr><td><b>DB User</b><br><input type=text name=db_user value="<? echo $phpgw_info["server"]["db_user"] ?>"></td><td>Name of DB User as phpgroupware has to connect as</td></tr>
|
||||
<tr><td><b>DB Password</b><br><input type=text name=db_pass value="<? echo $phpgw_info["server"]["db_pass"] ?>"></td><td>Password of DB User</td></tr>
|
||||
<tr><td><b>DB Type</b><br><select name=db_type>
|
||||
<input type=hidden name="setting[write_config]" value=true>
|
||||
<tr><td colspan=2><b>Server Root</b><br><input type=text name="setting[server_root]" size=80 value="<? echo $phpgw_info["server"]["server_root"] ?>"></td></tr>
|
||||
<tr><td colspan=2><b>Include Root (this should be the same as Server Root unless you know what you are doing)</b><br><input type=text name="setting[include_root]" size=80 value="<? echo $phpgw_info["server"]["include_root"] ?>"></td></tr>
|
||||
<tr><td><b>DB Host</b><br><input type=text name="setting[db_host]" value="<? echo $phpgw_info["server"]["db_host"] ?>"></td><td>Hostname/IP of Databaseserver</td></tr>
|
||||
<tr><td><b>DB Name</b><br><input type=text name="setting[db_name]" value="<? echo $phpgw_info["server"]["db_name"] ?>"></td><td>Name of Database</td></tr>
|
||||
<tr><td><b>DB User</b><br><input type=text name="setting[db_user]" value="<? echo $phpgw_info["server"]["db_user"] ?>"></td><td>Name of DB User as phpgroupware has to connect as</td></tr>
|
||||
<tr><td><b>DB Password</b><br><input type=text name="setting[db_pass]" value="<? echo $phpgw_info["server"]["db_pass"] ?>"></td><td>Password of DB User</td></tr>
|
||||
<tr><td><b>DB Type</b><br><select name="setting[db_type]">
|
||||
<?
|
||||
$selected = "";
|
||||
$found_dbtype = false;
|
||||
@ -169,9 +169,9 @@
|
||||
</select>
|
||||
</td><td>What Database do you want to use with PHPGroupWare?
|
||||
|
||||
<tr><td><b>Configuration Password</b><br><input type=text name=config_pass value="<? echo $phpgw_info["server"]["config_passwd"] ?>"></td><td>Password needed for configuration</td></tr>
|
||||
<tr><td colspan=2><b>Enable MCrypt<br>
|
||||
<select name=enable_mcrypt >
|
||||
<tr><td><b>Configuration Password</b><br><input type=text name="setting[config_pass]" value="<? echo $phpgw_info["server"]["config_passwd"] ?>"></td><td>Password needed for configuration</td></tr>
|
||||
<tr><td colspan=2><b>Enable MCrypt</b><br>
|
||||
<select name="setting[enable_mcrypt]">
|
||||
<? if($phpgw_info["flags"]["mcrypt_enabled"] == True) { ?>
|
||||
<option value=True selected>True
|
||||
<option value=False>False
|
||||
@ -181,8 +181,14 @@
|
||||
<? } ?>
|
||||
</select>
|
||||
</td></tr>
|
||||
<tr><td><b>MCrypt version</b><br><input type=text name=mcrypt_version value="<? echo $phpgw_info["server"]["mcrypt_version"] ?>"></td><td>Set this to "old" for versions < 2.4, otherwise the exact mcrypt version you use</td></tr>
|
||||
<tr><td><b>MCrypt initilazation vector</b><br><input type=text name=mcrypt_iv value="<? echo $phpgw_info["server"]["mcrypt_iv"] ?>"></td><td>It should be around 30 bytes in length</td></tr>
|
||||
<tr><td><b>MCrypt version</b><br><input type=text name="setting[mcrypt_version]" value="<? echo $phpgw_info["server"]["mcrypt_version"] ?>"></td><td>Set this to "old" for versions < 2.4, otherwise the exact mcrypt version you use</td></tr>
|
||||
<tr><td><b>MCrypt initilazation vector</b><br><input type=text name="setting[mcrypt_iv]" value="<? echo $phpgw_info["server"]["mcrypt_iv"] ?>" size="30"></td><td>It should be around 30 bytes in length.<br>Note: The default has been randomly generated.</td></tr>
|
||||
<tr><td><b>Domain select box on login</b><br>
|
||||
<select name="setting[domain_selectbox]">
|
||||
<option value="True"<?php echo ($phpgw_info["server"]["domain_selectbox"]?" selected":""); ?>>True</option>
|
||||
<option value="False"<?php echo (! $phpgw_info["server"]["domain_selectbox"]?" selected":""); ?>>False</option>
|
||||
</select></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?
|
||||
if(!$found_dbtype) {
|
||||
|
@ -101,21 +101,15 @@
|
||||
}
|
||||
}
|
||||
|
||||
function generate_header(){
|
||||
global $SCRIPT_FILENAME, $HTTP_POST_VARS, $k, $v;
|
||||
$ftemplate = fopen(dirname($SCRIPT_FILENAME)."/../header.inc.php.template","r");
|
||||
if($ftemplate){
|
||||
$ftemplate = fopen(dirname($SCRIPT_FILENAME)."/../header.inc.php.template","r");
|
||||
$template = fread($ftemplate,filesize(dirname($SCRIPT_FILENAME)."/../header.inc.php.template"));
|
||||
fclose($ftemplate);
|
||||
while(list($k,$v) = each($HTTP_POST_VARS)) {
|
||||
$template = ereg_replace("__".strtoupper($k)."__",$v,$template);
|
||||
}
|
||||
return $template;
|
||||
}else{
|
||||
echo "Could not open the header template for reading!<br>";
|
||||
exit;
|
||||
function generate_header()
|
||||
{
|
||||
global $setting, $phpgw_setup;
|
||||
|
||||
$phpgw_setup->template->set_file(array("header" => "header.inc.php.template"));
|
||||
while(list($k,$v) = each($setting)) {
|
||||
$phpgw_setup->template->set_var(strtoupper($k),$v);
|
||||
}
|
||||
return $phpgw_setup->template->parse("out","header");
|
||||
}
|
||||
|
||||
function config_auth()
|
||||
|
Loading…
Reference in New Issue
Block a user