<?php
require_once 'bootstrap.php';
secure_page();
$c = get_data();
include ('style.php');
require('config.php');
?>
<?php
$user="$c->username";
error_reporting(E_ALL ^ E_DEPRECATED);
?>
<center>
<?php
if(isset($_POST['Submit']))
{// The form is submitted
$connection = @mysql_connect($server, $dbusername, $dbpassword)
or die(mysql_error());
$db = @mysql_select_db($db_name,$connection)
or die(mysql_error());
$ip=$_SERVER['REMOTE_ADDR'];
$id=$_POST['who'];
$id=mysql_real_escape_string($id);
$result33 = mysql_query("SELECT COUNT(*) FROM `authorize` WHERE guid='$id'");
if (!$result33) {
die(mysql_error());
}
if (mysql_result($result33, 0, 0) > 0) {
echo "ERROR: This ID is already registered by another user";
echo "<P><a href=welcome.php>Home</a>";
exit;
} else {
// no data matched
}
if($logging == 1) {
$date = date('Y-m-d H:i:s');
mysql_query("INSERT INTO `donatorlog` (`date`, `user`, `action`) VALUES
('$date', '$user', 'PID Setup: added $id ');");
}
mysql_query("UPDATE `authorize` SET guid='$id' WHERE username='$user' ");
echo "Success ID Entered<P>";
echo "<P><a href=welcome.php>Home</a>";
echo "<P><a href=\"#\" onClick=\"history.go(-1)\">Back</a>"; exit;
}//if(isset($_POST['Submit']))
?>
<table cellspacing='0' cellpadding='10' border='1' bordercolor='#000000'><tr><td>
<P>
<form name='test' method='POST' action='' accept-charset='UTF-8'>
<table cellspacing='0' cellpadding='10' border='0' bordercolor='#000000'>
<tr>
<td>
<table cellspacing='2' cellpadding='2' border='0'>
<tr>
<td align='right'>User:
<td> <?php $ip=$_SERVER['REMOTE_ADDR']; echo " $user at $ip"; ?>
<tr>
<td align='right' class='normal_field'>Profile ID</td>
<td class='element_label'>
<input type='text' name='who' placeholder="NUMBERS ONLY" size='20'><td>
</td>
<tr>How Do I find my Profile ID? <a href="http://www.youtube.com/watch?v=E8bFc3W8RkI" target="_blank">Click here</a></tr>
</tr>
<tr>
<td colspan='2' align='center'>
<input type='submit' name='Submit' value='Submit'>
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</body>
<html>