ya lo hice y sigue en blanco la pagina
Código PHP:
<?php
// **********************************
// * Sepomo SMS for Ragnarok *
// * By Zephyrus *
// * [noparse][url="http://forums.terra-gaming.com"]http://forums.terra-gaming.com[/url][/noparse] *
// **********************************
// Main Settings - Edit this lines
$options = array (
'DBHost' => '127.0.0.1',
'DBUser' => 'root',
'DBPass' => 'SECRETO',
'DBName' => 'ragnarok',
'PasswordName' => 'pid',
'PasswordValue' => '5860353',
'CashPerSMS' => '1000',
);
// Main Source - No edit required, do it just if you know
class sql {
// Constructor
function sql() {
global $options;
$this->connection = @mysql_connect($options['DBHost'],$options['DBUser'],$options['DBPass'])
OR die('MySQL Connection Error...');
mysql_select_db($options['DBName'])
OR die();
}
function query($query) {
$result = mysql_query($query,$this->connection) or die ('Error MySQL: '.mysql_error());
return $result;
}
function fetchrow($result) {
return mysql_fetch_row($result);
}
function fetcharray($result, $type = MYSQL_ASSOC) {
return mysql_fetch_array($result,$type);
}
function numrows($result) {
return mysql_num_rows($result);
}
function escapestr($string)
{
return mysql_escape_string($string);
}
function freeresult($result)
{
mysql_free_result($result);
}
} // Sql Class
if( isset($_GET['code']) && isset($_GET['userid']) && isset($_GET['country']) && isset($_GET[$options['PasswordName']]) && $_GET[$options['PasswordName']] == $_GET[$options['PasswordValue']] )
{
$mysql = new sql();
$userid = $mysql->escapestr(trim($_GET['userid']));
$code = $_GET['code'];
$country = $mysql->escapestr(trim($_GET['country']));
// Searching for the Account
$result = $mysql->query("SELECT `account_id`, `cash_points` FROM `login` WHERE `userid` = '$userid';");
$data = $mysql->fetcharray($result);
if (count($data) != 0) {
$account_id = $data['account_id'];
$cash_points = $data['cash_points'];
// Update Account, adding Cash Points
$mysql->query("UPDATE `login` SET `cash_points` = `cash_points` + '" . $options['CashPerSMS'] . "' WHERE `account_id` = '$account_id'");
// Log Entry to the Database
$mysql->query("INSERT INTO `smslog` (`account_id`, `userid`, `code`, `country`, `time`) VALUES ('$account_id', '$userid', '$code', '$country', NOW())");
// Confirmation Message
// You can edit it but do not remove the first OK because it confirms to sepomo the SMS have been registered.
echo 'OK Gracias por tu aporte. Tus Cash Points pronto estaran disponibles.';
}
else
{
// Log Wrong SMS - Can be found with account_id = 0
$mysql->query("INSERT INTO `smslog` (`account_id`, `userid`, `code`, `country`, `time`) VALUES ('0', '$userid', '$code', '$country', NOW())");
echo 'Error!!!';
}
}
?>