<?php
include('config.php');
$dbhost = $host;
$link = mysql_connect($dbhost, $dbuser, $dbpass);
mysql_select_db($dbname);
function amfrgetval($valname)
{
	$result = mysql_query('select * from amfr_config where configname="'.$valname.'"');
	$row = mysql_fetch_assoc($result);
	$return = $row['configvalue'];
	return $return;
}
$skeys = amfrgetval('skeys');
$mkeys = amfrgetval('mkeys');
$ns1 = amfrgetval('ns1');
$ns2 = amfrgetval('ns2');
$image = amfrgetval('image');
$template = amfrgetval('template');
if(!$template)
{
	$template = 'default';
}
$cpuser = amfrgetval('cpuser');
$cppass = amfrgetval('cppass');
$cppackage = amfrgetval('cppackage');
function amfrsetval($var1, $var2)
{
	global $dbname;
	$result = mysql_db_query($dbname, 'update amfr_config set configvalue="'.$var2.'" where configname="'.$var1.'"');
}
mysql_close($link);
?>
