<?php

include "connect.php";

$settings = mysql_query ( 'select * from settings' );
$settingrecord = mysql_fetch_array ( $settings );

while ( $settingrecord = mysql_fetch_array ( $settings ) ) {
	switch ($settingrecord ["name"]) {
		case "sitename" :
			$sitename = $settingrecord ["setting"];
			break;
		case "adminid" :
			$adminid = $settingrecord ["setting"];
			break;
		case "adminpw" :
			$adminpw = $settingrecord ["setting"];
			break;
		case "paypal" :
			$paypal = $settingrecord ["setting"];
			break;
		case "stormpay" :
			$stormpay = $settingrecord ["setting"];
			break;
		case "adminemail" :
			$adminemail = $settingrecord ["setting"];
			break;
		case "freepoints" :
			$freepoints = $settingrecord ["setting"];
			break;
		case "propoints" :
			$propoints = $settingrecord ["setting"];
			break;
		case "propointsmonthly" :
			$propointsmonthly = $settingrecord ["setting"];
			break;
		case "freepointsmonthly" :
			$freepointsmonthly = $settingrecord ["setting"];
			break;
		case "proprice" :
			$proprice = $settingrecord ["setting"];
			break;
		case "prointerval" :
			$prointerval = $settingrecord ["setting"];
			break;
		case "proreadearn" :
			$proreadearn = $settingrecord ["setting"];
			break;
		case "freereadearn" :
			$freereadearn = $settingrecord ["setting"];
			break;
		case "proclickearn" :
			$proclickearn = $settingrecord ["setting"];
			break;
		case "freeclickearn" :
			$freeclickearn = $settingrecord ["setting"];
			break;
		case "freecommission" :
			$freecommission = $settingrecord ["setting"];
			break;
		case "procommission" :
			$procommission = $settingrecord ["setting"];
			break;
		case "freerefpoints" :
			$freerefpoints = $settingrecord ["setting"];
			break;
		case "prorefpoints" :
			$prorefpoints = $settingrecord ["setting"];
			break;
		case "basecolour" :
			$basecolour = $settingrecord ["setting"];
			break;
		case "contrastcolour" :
			$contrastcolour = $settingrecord ["setting"];
			break;
		case "fonttype" :
			$fonttype = $settingrecord ["setting"];
			break;
		case "fontcolour" :
			$fontcolour = $settingrecord ["setting"];
			break;
		case "scratchfreq" :
			$scratchfreq = $settingrecord ["setting"];
			break;
		case "scratchodds" :
			$scratchodds = $settingrecord ["setting"];
			break;
		case "maxwinning" :
			$maxwinning = $settingrecord ["setting"];
			break;
		case "bannerprice" :
			$bannerprice = $settingrecord ["setting"];
			break;
		case "soloprice" :
			$soloprice = $settingrecord ["setting"];
			break;
		case "pointprice" :
			$pointprice = $settingrecord ["setting"];
			break;
		case "freepost" :
			$freepost = $settingrecord ["setting"];
			break;
		case "propost" :
			$propost = $settingrecord ["setting"];
			break;
		case "domain" :
			$domain = $settingrecord ["setting"];
	}
}

$userinfo = mysql_query ( "select * from members where userid='" . $userid . "'" );
$userrecord = mysql_fetch_array ( $userinfo );

$id = $userrecord ["id"];
$name = $userrecord ["name"];
$lastname = $userrecord ["lastname"];
$contact_email = $userrecord ["contact_email"];
$subscribed_email = $userrecord ["subscribed_email"];
$paypal_email = $userrecord ["paypal_email"];
$alertpayemail = $userrecord ["alertpay_email"];
$stormpay_email = $userrecord ["stormpay_email"];
$contact_email = $userrecord ["contact_email"];
$password = $userrecord ["pword"];
$userid = $userrecord ["userid"];
$status = $userrecord ["status"];
$referid = $userrecord ["referid"];
$verified = $userrecord ["verified"];
$solos = $userrecord ["solos"];
$points = $userrecord ["points"];
$commission = $userrecord ["commission"];
$ip = $userrecord ["ip"];
$joindate = $userrecord ["joindate"];
$lastpost = $userrecord ["lastpost"];
$subscribed = $userrecord ["subscribed"];
$memtype = $userrecord ["memtype"];
$referrer = $userrecord ["referrer"];
$vacation = $userrecord ["vacation"];
$vacation_date = $userrecord ["vacation_date"];
$lastlogin = $userrecord ["lastlogin"];
$hits_unique = $userrecord ["hits_unique"];
$hits_visitor = $userrecord ["hits_visitor"];

?>