- Автор темы
- #1
Parse error: syntax error, unexpected ';', expecting T_PAAMAYIM_NEKUDOTAYIM in /home/k/1/******.ru/public_html/1/w/cs.php on line 53
53 строка
53 строка
PHP:
trim($_POST['login']);$credit= trim($_POST['credit']); $sql="SELECT *
PHP:
<?php
#SETTINGS
#--------------------------------------------------------------#
define("_localhost_", "111.177.22.245:1433");
define("_HOSTUSER_", "sa");
define("_HOSTPASS_", "1111");
define("_WORLD_", "WORLD");
define("_USER_", "USER");
define("_TITLE_", "___");
@$msconnect=mssql_connect(_HOST_,_HOSTUSER_,_HOSTPASS_);
@mssql_select_db(_USER_,$msconnect);
#--------------------------------------------------------------#
function error($error, $query = '')
{
if($query) {
// Safify query
$query = preg_replace("/([0-9a-f]){32}/", "********************************", $query); // Hides all hashes
$query_str = "$query";
}
echo '<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>MySQL Fatal Error</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />
<style type="text/css">
<!--
body {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
font-style: normal;
color: #000000;
}
-->
</style>
</head>
<body>
<font size="4">MS SQL Error!</font>
<br />------------------------<br />
<br />
<u>The Error returned was:</u>
<br />
<strong>'.$error.'</strong>
<br /><br />
<textarea name="" rows="10" cols="52" wrap="virtual">'.$query_str.'</textarea><br />
</body>
</html>'; exit(); } if(isset($_POST['login'])) { $login =
trim($_POST['login']);$credit= trim($_POST['credit']); $sql="SELECT *
FROM RF_User.dbo.tbl_UserAccount WHERE id = '".$login."'"; if(!$resulty1
= @mssql_query($sql))error(mssql_get_last_message(), $sql);
$r=mssql_fetch_assoc($resulty1); $sql="SELECT * FROM
BillCruxRF.dbo.tbl_user WHERE UserID = '".$login."'"; if(!$resulty1 =
@mssql_query($sql))error(mssql_get_last_message(), $sql); $Cash =
trim(@MSSQL_RESULT($resulty1,0,"Cash")); $total=$credit+$Cash;
if($Cash=='') { $sql="INSERT INTO BillCruxRF.dbo.tbl_User
(ID,UserID,Cash) VALUES ('".$r[serial]."', '$login', '$credit')";
if(!$r=mssql_query($sql)) error(mssql_get_last_message(),$sql); } else {
$sql="UPDATE BillCruxRF.dbo.tbl_User SET Cash=".$total.",
ID='".$r[serial]."' WHERE UserID='$login'"; if(!$r=mssql_query($sql))
error(mssql_get_last_message(),$sql); } echo 'Êðåäèòû ; àêêàóí&ogr ave;ó
'.$login.' çà÷èñë&ari ng;íû!<br>Áûëî ; êðåäèòî&a circ; <b>'.$Cash.'</b><hr>Ñòàëî
êðåäèòî&a circ; <b>'.$total.'</b>'; } if($_GET['PW']===$password) { echo '<form method="post">
Login <input type="text" name="login">
Add Credit\'s <input type="text" name="credit">
<input type="submit" name="go" value="pay">
</form>'; } ?>