Location: PHPKode > projects > O - OpenSource GroupWare > osgw/admin/edit_config.php
<?php
/**************************************************************************
   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.

   @Authors:	Ryan Thompson(hide@address.com)
***************************************************************************/
//This file may be permanently deprecated.

//Not compatible with engine as of v0.2.5 (28-Nov-03)
if(isset($_POST['update_config']))
{
	$O->cf->edit_config($_POST);

}

?>

<form action="<?php echo $_SERVER['PHP_SELF']. "?x=". $_GET['x']. "&s=". $_GET['s']?>" method="post">
<h1 class="input_header">Edit config.inc.php</h1>
<table align="center" width="75%" cellspacing="0">
<tr>
<td class="list_header" colspan="2">Site Information
</td>
</tr>
<tr>
<td class="input_header">Site Name:</td>
<td><input type="text" name="sitename" value="<?php echo $sitename?>" size="50"></td>
</tr>
<tr>
<td class="input_header">Site Image:</td>
<td><input type="text" name="sitelogo" value="<?php echo $logo?>" size="20"> *Place site image in graphics directory</td>
</tr>

<tr>
<td class="input_header">Root URL:</td>
<td><input type="text" name="root_url" value="<?php echo $root_url?>" size="50"> *DO NOT add http://</td>
</tr>
<tr>
<td class="input_header">Root Directory:</td>
<td><input type="text" name="root_dir" value="<?php echo $root_dir?>" size="50"></td>
</tr>
<tr>
<td class="input_header">Enable SSL:</td>
<td>
<?php
echo "<input type=\"checkbox\" name=\"ssl\" value=\"TRUE\"";
if($ssl)
{
	echo " checked=\"checked\"";
}

echo ">";

?> **ONLY change if you're absolutely sure SSL is enabled on the web server.
</td>
</tr>

<tr>
<td class="input_header">Debug Level:</td>
<td>
<select name="debug">
<?php 
	$debug_levels = array('None','Report to error log only', 'Report on screen only', 'Report on screen and in error log');
	$i = 0;
	while($i < count($debug_levels))
	{
		echo "<option value=\"$i\"";
		
		if($i == $debug)
		{
			echo " selected=\"selected\"";
		}
		
		echo ">$i - $debug_levels[$i]</option>";
		$i++;
	}
						
?>

							
</select>
</td>
</tr>
<tr>
<td class="list_header" colspan="2">Database Information</td>
</tr>
<tr>
<td class="input_header">Database Host:</td>
<td><input type="text" name="db_host" value="<?php echo $db_host?>" size="20"></td>
</tr>
<tr>
<td class="input_header">Database Name:</td>
<td><input type="text" name="db_name" value="<?php echo $db_name?>" size="20"></td>
</tr>
<tr>
<td class="input_header">Username:</td>
<td><input type="text" name="db_user" value="<?php echo $db_user?>" size="20"></td>
</tr>
<tr>
<td class="input_header">Password:</td>
<td><input type="text" name="db_password" value="<?php echo $db_password?>" size="20"></td>
</tr>
<tr>
<td class="input_header">Database Type:</td>
<td><input type="text" name="db_type" value="<?php echo $db_type?>" size="10" readOnly></td>
</tr>
<tr>
<td><input type="submit" name="update_config" value="Update Config File" class="button1"></form></td>
<?php
	$link = $O->create_link("/admin/index.php?x=$_GET[x]");
?>
<td><input type="reset" name="clear" value="Cancel" class="button1" onClick="window.location='<?php echo $link?>'"></td>
</tr>
</table>
 
<?php
	echo $O->layout->create_footer();
?>
Return current item: O - OpenSource GroupWare