<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 
<head>
	<link rel="icon" href="image/favicon.png" type="image/x-icon" />
	<link rel="apple-touch-icon" href="image/favicon.png">
	<title><?php echo APP_NAME; ?> Configuration</title>
	<meta http-equiv='Pragma' content='no-cache'>
	<meta http-equiv='Expires' content='Sat, 01 Jan 2000 06:00:00 GMT'>
	<meta http-equiv='Cache-Control' content='no-store, no-cache, must-revalidate, max-age=0'>
	<link type="text/css" href="css/redmond/jquery-ui.css" rel="stylesheet" />
	<link type="text/css" href="css/sbg-hrms.css" rel="stylesheet" />
	<script type="text/javascript" src="js/jquery-2.1.1.min.js"></script>
	<script type="text/javascript" src="js/jquery-ui-1.10.4.min.js"></script>
	<script type="text/javascript" src="js/sbg-util.js"></script>
</head>
<body>
<form id="sbg-config" name="sbg-config" enctype="multipart/form-data" method="post" action="">
<div>
<div id="sbg-config-entry" style="width:610px;margin:0 auto">
	<div style="font-size: 20px;margin-top:10px;margin-bottom:10px"><?php echo APP_NAME; ?> Configuration</div>
	<div id="config-tabs">
		<ul style="font-size: 0.8em;">
			<li><a href="#config-db">Database</a></li>
			<li><a href="#config-sun-db">SunSystems Database</a></li>
			<li><a href="#config-notif-db">Notification Centre Database</a></li>
			<li><a href="#config-rms-db">RMS Database</a></li>
			<span class="sbg-tab-title"></span>
		</ul>
		<div id="config-db" style="height:210px;">
			<table>
				<tr>
					<td style="text-align:right;width:150px"><span>Server : </span></td>
					<td style="width:450px"><input type="text" maxlength="50" size="50" id="txtConfigServer" value="<?php echo $this->getServer() ;?>" />
					<span id="config_err_server" style="color:Red;display:none">*</span></td>
					
				</tr>
				<tr>
					<td style="text-align:right;"><span>Database Type : </span></td>
					<td><select id="cobConfigDbType"><?php echo $this->getTypeList() ; ?></select></td>
				</tr>
				<tr>
					<td style="text-align:right;"><span>Database Name : </span></td>
					<td><input type="text" maxlength="20" size="20" id="txtConfigDbName" value="<?php echo $this->getDbName() ;?>" />
					<span id="config_err_name" style="color:Red;display:none">*</span></td>
				</tr>
				<tr>
					<td style="text-align:right;"><span>Port No : </span></td>
					<td><input type="text" maxlength="5" size="10" id="txtConfigDbPort" value="<?php echo $this->getDbPort() ;?>" />
					<span>(blank for default port no)</span>
					<span id="config_err_port" style="color:Red;display:none">*</span></td>
				</tr>
				<tr>
					<td style="text-align:right;"><span>User Name : </span></td>
					<td><input type="text" maxlength="20" size="15" id="txtConfigDbUser" value="<?php echo $this->getDbUser() ;?>" />
					<span id="config_err_user" style="color:Red;display:none">*</span></td>
				</tr>
				<tr>
					<td style="text-align:right;"><span>Password : </span></td>
					<td><input type="password" maxlength="15" size="15" id="txtConfigDbPwd" value="<?php echo $this->getDbPwd() ;?>" />
					<span id="config_err_pwd" style="color:Red;display:none">*</span></td>
				</tr>
				<tr>
					<td colspan="2" style="text-align:right">
						<input id="btnConfigTest" type="button" value="Test Connection"></input>
						<input id="btnConfigUpdateDatabase" type="button" value="Update Database"></input>
						<input id="btnConfigCreate" type="button" value="Create"></input>
					</td>
				</tr>
			</table>
		</div>
        
		<div id="config-sun-db" style="height:210px;">
			<table>
				<tr>
					<td style="text-align:right;width:150px"><span>Server : </span></td>
					<td style="width:450px"><input type="text" maxlength="50" size="50" id="txtConfigServerSun" value="<?php echo $this->getServerSun() ;?>" />
					<span id="config_err_server" style="color:Red;display:none">*</span></td>
					
				</tr>
				<tr>
					<td style="text-align:right;"><span>Database Type : </span></td>
					<td><select id="cobConfigDbTypeSun"><?php echo $this->getTypeList() ; ?></select></td>
				</tr>
				<tr>
					<td style="text-align:right;"><span>Database Name : </span></td>
					<td><input type="text" maxlength="20" size="20" id="txtConfigDbNameSun" value="<?php echo $this->getDbNameSun() ;?>" />
					<span id="config_err_name" style="color:Red;display:none">*</span></td>
				</tr>
				<tr>
					<td style="text-align:right;"><span>Port No : </span></td>
					<td><input type="text" maxlength="5" size="10" id="txtConfigDbPortSun" value="<?php echo $this->getDbPortSun() ;?>" />
					<span>(blank for default port no)</span>
					<span id="config_err_port" style="color:Red;display:none">*</span></td>
				</tr>
				<tr>
					<td style="text-align:right;"><span>User Name : </span></td>
					<td><input type="text" maxlength="20" size="15" id="txtConfigDbUserSun" value="<?php echo $this->getDbUserSun() ;?>" />
					<span id="config_err_user" style="color:Red;display:none">*</span></td>
				</tr>
				<tr>
					<td style="text-align:right;"><span>Password : </span></td>
					<td><input type="password" maxlength="15" size="15" id="txtConfigDbPwdSun" value="<?php echo $this->getDbPwdSun() ;?>" />
					<span id="config_err_pwd" style="color:Red;display:none">*</span></td>
				</tr>
				<tr>
					<td style="text-align:right;"><span>Business Unit : </span></td>
					<td><input type="text" maxlength="20" size="15" id="txtConfigDbBUSun" value="<?php echo $this->getDbBusinessUnitSun() ;?>" />
					<span id="config_err_bu" style="color:Red;display:none">*</span></td>
				</tr>
				<tr>
					<td colspan="2" style="text-align:right">
						<input id="btnConfigTestSun" type="button" value="Test Connection"></input>
						<input id="btnConfigCreateSun" type="button" value="Create"></input>
					</td>
				</tr>
			</table>
		</div>
		<div id="config-notif-db" style="height:210px;">
			<table>
				<tr>
					<td style="text-align:right;width:150px"><span>Server : </span></td>
					<td style="width:450px"><input type="text" maxlength="50" size="50" id="txtConfigServerNotif" value="<?php echo $this->getServerNotif() ;?>" />
					<span id="config_err_server" style="color:Red;display:none">*</span></td>
					
				</tr>
				<tr>
					<td style="text-align:right;"><span>Database Type : </span></td>
					<td><select id="cobConfigDbTypeNotif"><?php echo $this->getTypeList() ; ?></select></td>
				</tr>
				<tr>
					<td style="text-align:right;"><span>Database Name : </span></td>
					<td><input type="text" maxlength="20" size="20" id="txtConfigDbNameNotif" value="<?php echo $this->getDbNameNotif() ;?>" />
					<span id="config_err_name" style="color:Red;display:none">*</span></td>
				</tr>
				<tr>
					<td style="text-align:right;"><span>Port No : </span></td>
					<td><input type="text" maxlength="5" size="10" id="txtConfigDbPortNotif" value="<?php echo $this->getDbPortNotif() ;?>" />
					<span>(blank for default port no)</span>
					<span id="config_err_port" style="color:Red;display:none">*</span></td>
				</tr>
				<tr>
					<td style="text-align:right;"><span>User Name : </span></td>
					<td><input type="text" maxlength="20" size="15" id="txtConfigDbUserNotif" value="<?php echo $this->getDbUserNotif() ;?>" />
					<span id="config_err_user" style="color:Red;display:none">*</span></td>
				</tr>
				<tr>
					<td style="text-align:right;"><span>Password : </span></td>
					<td><input type="password" maxlength="15" size="15" id="txtConfigDbPwdNotif" value="<?php echo $this->getDbPwdNotif() ;?>" />
					<span id="config_err_pwd" style="color:Red;display:none">*</span></td>
				</tr>
				<tr>
					<td colspan="2" style="text-align:right">
						<input id="btnConfigTestNotif" type="button" value="Test Connection"></input>
						<input id="btnConfigCreateNotif" type="button" value="Create"></input>
					</td>
				</tr>
			</table>
		</div>
		<div id="config-rms-db" style="height:210px;">
			<table>
				<tr>
					<td style="text-align:right;width:150px"><span>Server : </span></td>
					<td style="width:450px"><input type="text" maxlength="50" size="50" id="txtConfigServerRms" value="<?php echo $this->getServerRms() ;?>" />
					<span id="config_err_server" style="color:Red;display:none">*</span></td>
					
				</tr>
				<tr>
					<td style="text-align:right;"><span>Database Type : </span></td>
					<td><select id="cobConfigDbTypeRms"><?php echo $this->getTypeList() ; ?></select></td>
				</tr>
				<tr>
					<td style="text-align:right;"><span>Database Name : </span></td>
					<td><input type="text" maxlength="20" size="20" id="txtConfigDbNameRms" value="<?php echo $this->getDbNameRms() ;?>" />
					<span id="config_err_name" style="color:Red;display:none">*</span></td>
				</tr>
				<tr>
					<td style="text-align:right;"><span>Port No : </span></td>
					<td><input type="text" maxlength="5" size="10" id="txtConfigDbPortRms" value="<?php echo $this->getDbPortRms() ;?>" />
					<span>(blank for default port no)</span>
					<span id="config_err_port" style="color:Red;display:none">*</span></td>
				</tr>
				<tr>
					<td style="text-align:right;"><span>User Name : </span></td>
					<td><input type="text" maxlength="20" size="15" id="txtConfigDbUserRms" value="<?php echo $this->getDbUserRms() ;?>" />
					<span id="config_err_user" style="color:Red;display:none">*</span></td>
				</tr>
				<tr>
					<td style="text-align:right;"><span>Password : </span></td>
					<td><input type="password" maxlength="15" size="15" id="txtConfigDbPwdRms" value="<?php echo $this->getDbPwdRms() ;?>" />
					<span id="config_err_pwd" style="color:Red;display:none">*</span></td>
				</tr>
				<tr>
					<td colspan="2" style="text-align:right">
						<input id="btnConfigTestRms" type="button" value="Test Connection"></input>
						<input id="btnConfigCreateRms" type="button" value="Create"></input>
					</td>
				</tr>
			</table>
		</div>
	</div>
	<div class="ui-widget-content ui-corner-all" style="height:40px;margin-top:2px;">
		<div class="sbg-entry-error" style="width:300px;">
			<span id="config_err_mesg" class="sbg-error"></span>
		</div>
		<div class="sbg-entry-command">
			<input id="btnConfigSave" type="button" value="Save"></input>
		</div>
	</div>
</div>
</div>
<div id="sbg-progress" style="display:none">
	<div class="sbg-progress"></div>
	<div class="sbg-progress-box ui-corner-all">
		<div style="font-size:1.5em">
			<img src="image/progress.gif"></img>&nbsp;&nbsp;Please wait .....
		</div>
		<div id="sbg-progress-mesg" class="sbg-progress-mesg"></div>
	</div>
</div>
</form>
<script type="text/javascript">
<?php include (PATH_CODE . "js/admin/config.js") ; ?>
</script>
</body>
</html>