|
Server : Apache/2.4.62 System : FreeBSD fbsdweb2.web.rcn.net 14.1-RELEASE FreeBSD 14.1-RELEASE releng/14.1-n267679-10e31f0946d8 GENERIC amd64 User : www ( 80) PHP Version : 8.3.8 Disable Function : NONE Directory : /domains/abtechsci/mmc15/ezupload/cp/ |
Upload File : |
<?php
require("header.php");
require("configs/config.php");
$host=$_POST["host"];
$db=$_POST["db"];
$user=$_POST["user"];
$pass=$_POST["pass"];
$submit=$_POST["submit"];
//echo $host . "----------->" . $db . "----------->" . $port . "----------->" . $user . "----------->" . $pass ;//. "----------->" . $limitdim . "----------->" . $widthmin . "----------->" . $widthmax . "----------->" . $heightmin . "----------->" . $heightmax ;
if($submit != "" )
{
if(1=="" )
{
//print("<font color=red ><b>Cannot save. </b></font>");
$error="Cannot save";
}
else
{
$db_setting=new db_setting();
$db_setting->update( $host, $db,$user, $pass);
}
}
else
{
/*
$db_setting=new db_setting();
$temp=$db_setting->get();
if(is_array($temp)==true )
{
$host=trim($temp[0]);
$db=trim($temp[1]);
$port=trim($temp[2]);
$user=trim($temp[3]);
$pass=trim($temp[4]);
}
*/
$host = $host_name;
$db =$db_name;
$user = $user_name;
$pass = $password;
}
?>
<HTML><HEAD><TITLE>Control Panel</TITLE>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<LINK href="f_files/global.css" type=text/css rel=stylesheet>
<script language="javascript" type="text/javascript" src="js/main.js"></script>
</HEAD>
<BODY <?php if($error !=""){ echo "onLoad=\"alert('$error')\"" ; } ?>>
<div align="center">
<table width="100" cellpadding="0" cellspacing="0" class="main_table" id="table1">
<tr>
<td>
<TABLE height="405" cellSpacing=0 cellPadding=0 width="770" id="table2" bgcolor="#FFFFFF">
<?php require("cp_header.php")?>
<tr>
<TD height=228 bgcolor="#FFFFFF">
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="748" id="table3" height="208">
<tr>
<td height="14" width="748"></td>
</tr>
<tr>
<td height="14" width="748"></td>
</tr>
<tr>
<td height="187">
<div align="center">
<table width="386" height="97" border="1" cellpadding="0" cellspacing="0" bordercolor="#8FABFF" class="main_table" id="table4">
<form method="POST" action="db.php">
<tr>
<td height="20" colspan="2" valign="middle" bgcolor="#C1D1FF" class="t_header"><div class="div_1">Database</div></td>
</tr>
<tr onMouseOver="tplTrOver(this)" onMouseOut="tplTrOut(this)">
<td width="95" height="21" align="left" valign="middle" class="td_1">
<div class="div_1">Host name </div></td>
<td width="285" height="21" valign="middle" class="td_2">
<div class="div_1">
<input type="text" value="<?php echo $host ; ?>" name=host size="29"></div></td>
</tr>
<tr onMouseOver="tplTrOver(this)" onMouseOut="tplTrOut(this)">
<td width="95" align="left" valign="middle" bgcolor="#ECF1FF" class="td_1">
<div class="div_1">Username</div></td>
<td width="285" valign="middle" bgcolor="#ECF1FF" class="td_2">
<div class="div_1"><input type="text" value="<?php echo $user ; ?>" name=user size="29"></div></td>
</tr>
<tr onMouseOver="tplTrOver(this)" onMouseOut="tplTrOut(this)">
<td width="95" align="left" valign="middle" class="td_1"><div class="div_1">Password</div></td>
<td width="285" valign="middle" class="td_2">
<div class="div_1"><input type="password" value="<?php echo $pass ; ?>" name=pass size="29"></div></td>
</tr>
<tr onMouseOver="tplTrOver(this)" onMouseOut="tplTrOut(this)">
<td width="95" align="left" valign="middle" class="td_1"> <div class="div_1">Database</div></td>
<td width="285" valign="middle" class="td_2">
<div class="div_1"><input type="text" value="<?php echo $db ; ?>" name=db size="29"></div></td>
</tr>
</table>
<br>
<p align="center">
<input name="submit" type="submit" class="button" value=" Save ">
</div> </td>
</form>
</tr>
<tr>
<td>
<p align="center"> </p>
<p align="center"><a href="index.php">Back </a><br>
</td>
</tr>
</table>
</div> </TD>
</tr>
</TABLE> </td>
</tr>
<?php include("footer.php"); ?>
</table>
</div>
<p align="center"> </p>
</BODY></HTML>