# HG changeset patch
# User Administrator@buildbox.tempestintheaether.org
# Date 1330588887 28800
# Node ID 14a01ee167f99a4bac98ccb721e92646a678b80b
# Parent  2cb95cfee2f75c42a3dd3677e740cd9ca8527b2e
added css and edited r2 removing redundant function

diff -r 2cb95cfee2f7 -r 14a01ee167f9 code/ryzom/tools/server/www/login/r2_login.php
--- a/code/ryzom/tools/server/www/login/r2_login.php	Wed Feb 29 23:41:42 2012 -0800
+++ b/code/ryzom/tools/server/www/login/r2_login.php	Thu Mar 01 00:01:27 2012 -0800
@@ -6,20 +6,17 @@
 	// For error handling, buffer all output
 	ob_start('ob_callback_r2login');
 
+	include_once('accountfunc.php');
 	include_once('config.php');
 	include_once('login_translations.php');
 	include_once('../tools/nel_message.php');
 	include_once('../tools/domain_info.php');
 	include_once('login_service_itf.php');
 	include_once('../ring/join_shard.php');
+	
 
 
-	// see errorMsg
-	function errorMsgBlock($errNum=GENERIC_ERROR_NUM) // $mixedArgs
-	{
-		$args = func_get_args();
-		return '0:'.call_user_func_array('errorMsg', $args);
-	}
+
 
 	class LoginCb extends CLoginServiceWeb
 	{
@@ -137,7 +134,7 @@
 
 	if (!isset($_GET['cmd']))
 	{
-		die (errorMsgBlock(3002));
+		header( 'Location: register.php' ) ;
 	}
 
 	// check for 'clear password' tag
@@ -181,13 +178,13 @@
 				$ringDb = mysql_connect($DBHost, $RingDBUserName, $RingDBPassword) or die(errorMsgBlock(3004, 'Ring', $DBHost, $RingDBUserName));
 				mysql_select_db ($domainInfo['ring_db_name'], $ringDb) or die(errorMsgBlock(3005, 'Ring', $domainInfo['ring_db_name'], $DBHost, $RingDBUserName));
 				$query = "SELECT user_id FROM ring_users where user_id = '".$id."'";
-				$result = mysql_query ($query) or die(errorMsgBlock(3006, $query, 'Ring', $domainInfo['ring_db_name'], $DBHost, $RingDBUserName, mysql_error()));
+				$result = mysql_query ($query) or die(errorMsgBlock(2004, $query, 'Ring', $domainInfo['ring_db_name'], $DBHost, $RingDBUserName, mysql_error()));
 
 				if (mysql_num_rows($result) == 0)
 				{
 					// no ring user record, build one
 					$query = "INSERT INTO ring_users SET user_id = '".$id."', user_name = '".$_GET["login"]."', user_type='ut_pioneer'";
-					$result = mysql_query ($query) or die(errorMsgBlock(3006, $query, 'Ring', $domainInfo['ring_db_name'], $DBHost, $RingDBUserName, mysql_error()));
+					$result = mysql_query ($query) or die(errorMsgBlock(2004, $query, 'Ring', $domainInfo['ring_db_name'], $DBHost, $RingDBUserName, mysql_error()));
 				}
 
 //				// check that there is a character record (deprecated)
@@ -297,7 +294,7 @@
 
 		// now, retrieve the user infos
 		$query = "SELECT * FROM user where Login='$login'";
-		$result = mysql_query ($query) or die (errorMsgBlock(3006, $query, 'main', $DBName, $DBHost, $DBUserName, mysql_error()));
+		$result = mysql_query ($query) or die (errorMsgBlock(2004, $query, 'main', $DBName, $DBHost, $DBUserName, mysql_error()));
 
 		if (mysql_num_rows ($result) == 0)
 		{
@@ -309,7 +306,7 @@
 
 				// get the user to have his UId
 				$query = "SELECT * FROM user WHERE Login='$login'";
-				$result = mysql_query ($query) or die (errorMsgBlock(3006, $query, 'main', $DBName, $DBHost, $DBUserName, mysql_error()));
+				$result = mysql_query ($query) or die (errorMsgBlock(2004, $query, 'main', $DBName, $DBHost, $DBUserName, mysql_error()));
 
 				if (mysql_num_rows ($result) == 1)
 				{
@@ -378,7 +375,7 @@
 				// check if the user can use this application
 
 				$query = "SELECT * FROM permission WHERE UId='".$row["UId"]."' AND ClientApplication='$clientApplication'";
-				$result = mysql_query ($query) or die (errorMsgBlock(3006, $query, 'main', $DBName, $DBHost, $DBUserName, mysql_error()));
+				$result = mysql_query ($query) or die (errorMsgBlock(2004, $query, 'main', $DBName, $DBHost, $DBUserName, mysql_error()));
 				if (mysql_num_rows ($result) == 0)
 				{
 					if ($AcceptUnknownUser)
@@ -478,7 +475,7 @@
 		mysql_select_db ($DBName) or die (errorMsgBlock(3005, 'main', $DBName, $DBHost, $DBUserName));
 
 		$query = "SELECT Password FROM user WHERE Login='$login'";
-		$result = mysql_query ($query) or die (errorMsgBlock(3006, $query, 'main', $DBName, $DBHost, $DBUserName, mysql_error()));
+		$result = mysql_query ($query) or die (errorMsgBlock(2004, $query, 'main', $DBName, $DBHost, $DBUserName, mysql_error()));
 
 		if (mysql_num_rows ($result) != 1)
 		{
@@ -492,7 +489,7 @@
 			{
 				// Check if this is not an unconfirmed account
 				$query = "SELECT GamePassword, Language FROM signup_data WHERE login='$login'";
-				$result = mysql_query($query) or die (errorMsgBlock(3006, $query, 'main', $DBName, $DBHost, $DBUserName, mysql_error()));
+				$result = mysql_query($query) or die (errorMsgBlock(2004, $query, 'main', $DBName, $DBHost, $DBUserName, mysql_error()));
 
 				if (mysql_num_rows($result) == 0)
 				{
diff -r 2cb95cfee2f7 -r 14a01ee167f9 code/ryzom/tools/server/www/login/style.css
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/code/ryzom/tools/server/www/login/style.css	Thu Mar 01 00:01:27 2012 -0800
@@ -0,0 +1,137 @@
+BODY {
+	font-family: Arial, sans-serif;
+	color: black;
+	background-color: black;
+	background-repeat: no-repeat;
+	background-position: top center;
+	font-size : 12px;
+	
+}
+UL {
+
+	margin : 0px;
+}
+OL {
+
+	margin : 0px;
+}
+TD {
+	color : black;
+	font-size :12px;
+	font-family: Arial, sans-serif;
+	
+
+}
+#main {
+	width: 710px;
+	margin-left: auto;
+	margin-right: auto;
+	text-align : left;
+}
+
+
+#top {
+	background-repeat: no-repeat;
+	height : 35px;
+	text-align : center;
+	background-color: #0c292e;
+	color: white;
+}
+
+#top_title {
+	padding-top: 5px;
+
+}
+
+#middle {
+	background-repeat: repeat-y;
+	background-color: #d8ccb6;
+	padding-left : 35px;
+	padding-right : 20px;
+
+	color : black;
+}
+
+
+
+
+#bottom {
+	background-repeat: no-repeat;
+	height : 35px;
+	text-align : left;
+	background-color: #0c292e;
+	padding-left : 20px;
+	padding-right : 10px;
+	color: white;
+}
+
+#bottom a {
+	color : gray;
+	text-decoration : none;
+}
+
+#bottom table {
+	margin : 0;
+	padding : 0;
+}
+
+#bottomBlock {
+	padding-top : 10px;
+}
+
+H1 {
+	font-size : 110%;
+	font-weight : bold;
+	text-align : center;
+	margin:0;	
+	padding-top : 5px;
+	padding-bottom : 5px;
+	
+}
+
+H2 {
+	font-size : 110%;
+	font-weight : bold;
+	color : black;
+	margin : 0;
+	border-bottom : solid 1px #aca393;
+	padding-top : 5px;
+}
+
+
+form {
+	margin : 0;
+}
+
+.infos {
+
+}
+
+/* PROFILE */
+a {
+	color :  #124e70;
+	text-decoration : none;
+}
+a:hover {
+	color :  #124e70;
+	text-decoration : underline;
+}
+
+table.proftable {
+/*	margin-top : 10px;*/
+}
+.proftitle {	
+	border-bottom : solid 2px #aca393;
+	font-weight : bold;
+}
+
+
+.profregu {
+	font-size : 130%;
+	color: red;
+	font-weight : bold;
+}
+
+input.regulbutton {
+	width: 650px;
+}
