Fatal error: Call to undefined function mssql_connect() in C:\xampp\htdocs\Website\inc\votebox.inc.php on line 213
And here's the votebox.inc.php
Code:
<?php
$ip = $_SERVER['REMOTE_ADDR'];
$time = date("l dS of F Y h:i:s A");
$script = $_SERVER[PATH_TRANSLATED];
$fp = fopen ("[WEB]SQL_Injection.txt", "a+");
$sql_inject_1 = array(";","'","%",'"'); #Whoth need replace
$sql_inject_2 = array("", "","","""); #To wont replace
$GET_KEY = array_keys($_GET); #array keys from $_GET
$POST_KEY = array_keys($_POST); #array keys from $_POST
$COOKIE_KEY = array_keys($_COOKIE); #array keys from $_COOKIE
/*begin clear $_GET */
for($i=0;$i<count($GET_KEY);$i++)
{
$real_get[$i] = $_GET[$GET_KEY[$i]];
$_GET[$GET_KEY[$i]] = str_replace($sql_inject_1, $sql_inject_2, HtmlSpecialChars($_GET[$GET_KEY[$i]]));
if($real_get[$i] != $_GET[$GET_KEY[$i]])
{
fwrite ($fp, "IP: $ip\r\n");
fwrite ($fp, "Method: GET\r\n");
fwrite ($fp, "Value: $real_get[$i]\r\n");
fwrite ($fp, "Script: $script\r\n");
fwrite ($fp, "Time: $time\r\n");
fwrite ($fp, "==================================\r\n");
}
}
/*end clear $_GET */
/*begin clear $_POST */
for($i=0;$i<count($POST_KEY);$i++)
{
$real_post[$i] = $_POST[$POST_KEY[$i]];
$_POST[$POST_KEY[$i]] = str_replace($sql_inject_1, $sql_inject_2, HtmlSpecialChars($_POST[$POST_KEY[$i]]));
if($real_post[$i] != $_POST[$POST_KEY[$i]])
{
fwrite ($fp, "IP: $ip\r\n");
fwrite ($fp, "Method: POST\r\n");
fwrite ($fp, "Value: $real_post[$i]\r\n");
fwrite ($fp, "Script: $script\r\n");
fwrite ($fp, "Time: $time\r\n");
fwrite ($fp, "==================================\r\n");
}
}
/*end clear $_POST */
/*begin clear $_COOKIE */
for($i=0;$i<count($COOKIE_KEY);$i++)
{
$real_cookie[$i] = $_COOKIE[$COOKIE_KEY[$i]];
$_COOKIE[$COOKIE_KEY[$i]] = str_replace($sql_inject_1, $sql_inject_2, HtmlSpecialChars($_COOKIE[$COOKIE_KEY[$i]]));
if($real_cookie[$i] != $_COOKIE[$COOKIE_KEY[$i]])
{
fwrite ($fp, "IP: $ip\r\n");
fwrite ($fp, "Method: COOKIE\r\n");
fwrite ($fp, "Value: $real_cookie[$i]\r\n");
fwrite ($fp, "Script: $script\r\n");
fwrite ($fp, "Time: $time\r\n");
fwrite ($fp, "==================================\r\n");
}
}
/*end clear $_COOKIE */
fclose ($fp);
?>
<?php
/*
* Etunia Voting System Lite
* Copyright 2009, Kimmy Andersson.
*
*/
if(isset($_POST['doVote']))
{
include_once("class/class.vote.php");
include_once("inc/inc.class_initiate.php");
include_once("inc/inc.config.php");
$mssqlcon = mssql_connect($mssqlServer, $mssqlUser, $mssqlPass);
$eVoteHEAD = "Error!";
if($_POST['etCharacter'] && $eVote->checkIP() && $eVote->checkCharacter($_POST['etCharacter']))
{
$eVote->removeLog($_POST['etCharacter']);
$itemSendResult = $eVote->sendItem($_POST['etCharacter'], $_POST['etItem']);
if($itemSendResult)
{
$eVoteHEAD = "Link generated!";
$eVoteMSG = "<style type= text/css >
<!--
.style1 {
color: #333333;
font-family: Arial, Helvetica, sans-serif;
}
-->
</style>
</head>
<body>
<table width= 540 border= 0 align= center cellpadding= 0 cellspacing= 0 >
<!--DWLayoutTable-->
<tr>
<td width= 540 height= 88 > </td>
</tr>
<tr>
<td height= 211 valign= top bgcolor= #FFFFCC > <div align= center >
<p> </p>
<p> </p>
<p class= style1 ><span class= style2 ><a href=\"javascript:etOpenVoteWindow()\">Click here</a></span> to open the vote window.<br />
The reward will be sent to you after you voted.<br />
If it doesn't appear however, try relogging. </p>
</div></td>
</tr>
<tr>
<td height= 71 > </td>
</tr>
</table>
</body>";
}
else
$eVoteMSG = "<!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>
<meta http-equiv= Content-Type content= text/html; charset=iso-8859-1 />
<title>Untitled Document</title>
<style type= text/css >
<!--
.style3 {
font-size: 12px;
font-family: Arial, Helvetica, sans-serif;
}
-->
</style>
</head>
<body>
<table width= 540 border= 0 align= center cellpadding= 0 cellspacing= 0 >
<!--DWLayoutTable-->
<tr>
<td width= 540 height= 88 > </td>
</tr>
<tr>
<td height= 111 valign= top bgcolor= #FEBABC > <div align= center >
<p> </p>
<p class= style3 ><strong>Opss!</strong> The character doesn't exist!<br />
Please refresh the browser and try again. </p>
</div></td>
</tr>
<tr>
<td height= 119 > </td>
</tr>
</table>
</body>
</html>
";
}
else
$eVoteMSG = "<!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>
<meta http-equiv= Content-Type content= text/html; charset=iso-8859-1 />
<title>Untitled Document</title>
<style type= text/css >
<!--
.style3 {
font-size: 12px;
font-family: Arial, Helvetica, sans-serif;
}
-->
</style>
</head>
<body>
<table width= 540 border= 0 align= center cellpadding= 0 cellspacing= 0 >
<!--DWLayoutTable-->
<tr>
<td width= 540 height= 88 > </td>
</tr>
<tr>
<td height= 111 valign= top bgcolor= #FEBABC > <div align= center >
<p> </p>
<p class= style3 ><strong>Opss!</strong> Either you left the character field blank, or you are trying to vote from the same <br>
character more than once within 12 hours.Please refresh the browser and try again.</p>
</div></td>
</tr>
<tr>
<td height= 119 > </td>
</tr>
</table>
</body>
</html>
";
echo("<p>{$eVoteHEAD}</p>{$eVoteMSG}");
}
else
{
include_once("vote/inc/inc.config.php");
include_once("vote/class/class.vote.php");
include_once("vote/inc/inc.class_initiate.php");
$mssqlcon = mssql_connect($mssqlServer, $mssqlUser, $mssqlPass);
if($eVote->checkIP())
{
?>
<script src="vote/js/jquery.js"></script>
<script src="vote/js/vote.js"></script>
<div id="et_vbutton" onclick="etLiteGetVoteDialog();" style="background-image: url('vote/images/votenow.png'); text-align: center; width: 250px; height: 150px; position: absolute; top: 0px; right: 20px; cursor: pointer;">
<div id="et_vcharenter" style="background-color: #F8F8F8; margin: 10px auto; width: 200px; height: 100px; text-align: center; display: none;">
Character Name:<br/>
<input type="text" id="etCharField"/><br/>
<select name="etItemField" id="etItemField">
<option value="2">(2500) Pcs- Red Chips</option>
<option value="4">(50) Pcs- Perin</option>
<option value="5">(99) Pcs- Remantis Laccotte</option>
<option value="6">(5) Pcs- Scroll of Velocity</option>
</select><br/>
<input type="submit" id="etCharSubmit" onclick="etLiteDoVoteDialog();" value="VoteNow"/>
</div>
</div>
<?php
}
}
?>
any help -.-






