- Joined
- Dec 7, 2006
- Messages
- 250
- Reaction score
- 2
Item Tool
Release 2
This time it's even better to use!
What is this tool?:
It let's you insert items into web_itemmall without doing it manually.
just fill in all fields in this tool and you're done.
Features:
Logging function.
Automated insertion into web_itemmall
tool.php
Add this to log_maker.php
Hope u like it.

Release 2
This time it's even better to use!
What is this tool?:
It let's you insert items into web_itemmall without doing it manually.
just fill in all fields in this tool and you're done.
Features:
Logging function.
Automated insertion into web_itemmall
tool.php
Code:
<?php
include('./log_maker.php');
parth1tr();
parth1('100%',4,'center');
echo '<font color="black"><h1><strong>Item Tool</strong></h1></font>';
echo '<u>By HellFire</u>';
parth2();
parth2tr();
if ($security == 1)
{
if ($_GET['do'] == 'tool')
{
if ($_SESSION['editOk'] != "canEdit") {
echo "<script>self.location = 'index.php?act=admin&actu=tool'</script>";
} else {
$_SESSION['editOk'] = "";
}
error_reporting(E_ALL ^ E_NOTICE);
$acc = trim($_POST['acc']);
$id = trim($_POST['id']);
$char = trim($_POST['char']);
$count = trim($_POST['count']);
$id = test($id);
$acc = test($acc);
$char = test($char);
$count = test($count);
if (empty($acc) && empty($id))
{
parth1tr();
part1('100%',1,1,'center');
echo "U have to fill all fields. <br><a href='$PHP_SELF?act=admin&actu=tool'>Edit again.</a>";
die();
}
if (!empty($acc) && !empty($id))
{
$msconnect=odbc_connect("$dbname","$dbuser","$dbpass");
$msteste="SELECT COUNT(strAccountID) FROM TB_USER WHERE strAccountID = '$acc'";
$msresul=odbc_exec($msconnect,$msteste) or die("error");
odbc_fetch_row($msresul);
}
if (odbc_result($msresul,1) > 0)
{
$msquery="INSERT INTO WEB_ITEMMALL(strAccountID,strCharID,ServerNo,ItemID,ItemCount) VALUES ('$acc','$char','1','$id','$count')";
$msresults=odbc_exec($msconnect,$msquery) or die("Error, check your connection parameters!");
odbc_fetch_row($msresul);
log_item('item_log', $acc, $char, $id, $count);
parth1tr();
part1('100%',1,1,'center');
echo "<font color='blue'>Item Succesfully inserted into the database</font>";
echo"<br>";
echo "<font color='green'>This action has been logged in order to prevent fraudulent use</font>";
echo"<br>";
echo"<br>";
echo "<font color='red'>Account Name:</font> ".$acc."";
echo"<br>";
echo "<font color='red'>Character Name:</font> ".$char."";
echo"<br>";
echo "<font color='red'>Item ID:</font> ".$id."";
echo"<br>";
echo "<font color='red'>Item Count:</font> ".$count."";
echo"</p>";
echo"<br>";
echo "<strong>Items on Character ".$char." Reloaded!</strong>";
parth2();
parth2tr();
}else
{
parth1tr();
part1('100%',1,1,'center');
echo "acc ".$acc." not found. <br><a href='$PHP_SELF?act=admin&actu=tool'Try Again!</a>";
parth2();
parth2tr();
}
}else
{
$_SESSION['editOk'] = "canEdit";
echo '<td class="alt1"><center><FORM method=post name=regform action=index.php?act=admin&actu=tool&do=tool style="margin:0px; padding:0px">
<table width="300px">
<tr>
<td>Account Name:</td>
<td><input type="text" class="input" name="acc" value="" maxlength="50" size="20"></td>
<tr>
<td>Character Name:</td>
<td><input type="text" class="input" name="char" value="" maxlength="50" size="20"></td>
<tr>
<td>Item ID:</td>
<td><input type="text" class="input" name="id" value="" maxlength="50" size="20"></td>
<tr>
<td>Item Count:</td>
<td><input type="text" class="input" name="count" value="" maxlength="50" size="20"></td>
<tr>
</table>
<center><input class="input" type="submit" value="Insert Item"</center></br></br>
</form>
</center>
</td>
';
}
}
?>
Add this to log_maker.php
Code:
function log_item($file, $acc, $char, $id, $count)
{
$time=date('Y-m-d/H:i');
$acc = trim($acc);
$char = trim($char);
$id = trim($id);
$count = trim($count);
$location = "./logs/";
$file = $location . $file . ".txt";
$entry_line = "Date: $time | Account: $acc | Character: $char | ItemID: $id | Item Count: $count /n";
$fp = fopen("$file", "a");
fputs($fp, $entry_line);
fclose($fp);
}
Hope u like it.

Last edited: