View Single Post
Old 31.12.2006, 21:57   #5
rodier
Архивный участник
 
Join Date: May 2005
Posts: 979
Default

Quote:
Originally Posted by twzenit View Post
15. Getting char id by char name, directly from db. (tested)
16. Showing char invertory and warehouse by char id, directly from db. (tested)

Those 2 when I click go they return with empty page, and it does not send message to cached.exe

Any idea why?
I have same problems.. every other functions work OK, but this two not.
If I chose function 16. it show me text from function 15
and when I chose function 15, I wrote charid 1 (its my character) then Go and nothing..
-----------------
its really broken, look:

Code:
		case 200:
			$get_char_name=htmlspecialchars($_POST["param1"]);
			if(strlen($get_char_name)<1){ ?>
				<form method='post' action='cached.php'><b>Get char id by char name: </b>
				<br><input type='text' name='param1'><br><input type='hidden' name='funcid' value='200'>
				<br><input type='button' value='Go' onclick='doSpecialFunc()'></form><?php }
			else{
				$con_sql=mssql_connect($mssql_host,$mssql_user,$mssql_pass);
				mssql_select_db($mssql_base,$con_sql);
				$result=mssql_query("SELECT char_id FROM user_data WHERE char_name='$get_char_name'");
				while($row=mssql_fetch_array($result)) echo($row["char_id"]);
				mssql_close($con_sql);}
			break;
		case 201:
			$get_char_id=htmlspecialchars($_POST["param1"]);
			if(strlen($get_char_id)<1){ ?>
				<form method='post' action='cached.php'><b>Get char id by char name: </b>
				<br><input type='text' name='param1'><br><input type='hidden' name='funcid' value='201'>
				<br><input type='button' value='Go' onclick='doSpecialFunc()'></form><?php }
			else{
				$con_sql=mssql_connect($mssql_host,$mssql_user,$mssql_pass);
				mssql_select_db($mssql_base,$con_sql);
				$result=mssql_query("SELECT item_id, item_type, amount, warehouse FROM user_item WHERE char_id='$get_char_id'");
				while($row=mssql_fetch_array($result)){echo(ItemNameByItemId($row["item_type"])."(".$row["amount"].") --> warehouse: ".$row["warehouse"]." --> "."item uid: ".$row["item_id"]."<br>");}
				mssql_close($con_sql);}
			break;
rodier is offline