Echo you can find it in your sql database!
-------------------------------------------------
Does anyone know how to run this from a server that is not located near the sql server. e.g. my webserver.
| QUOTE (xmarv @ Mar 25 2004, 11:22 PM) |
| I won't do that, you would have to open your MsSQL port |
| CODE |
echo "<option value=\"view_itemlogs.php\">-- View Item Log"; |
| CODE |
| <?php include('memory.php'); include('header.inc'); Authorize(); $CurrentUser = CurrentUser(); if (ReadAccess(CurrentUser(),"view_logs") == 0) { DenyPrivs("index.php"); } $itemlog_db = ConnectDatabase("Loger"); if ($GET_do == "del") { @mssql_query("delete from itemLog where [index]=$GET_index",$itemlog_db); } if ($GET_do == "delall") { @mssql_query("delete from itemLog",$itemlog_db); } $result = @mssql_query("select * from itemLog order by 'index'",$itemlog_db); echo "<a href=\"view_itemlogs.php?do=delall\"><center><b>Delete all Entrys!</b></center></a>"; EchoHead(); echo "<table border=0 cellpadding=3 cellspacing=1 bgcolor=#000000>"; while ($result_array = @mssql_fetch_array($result)) { $faccount = $result_array['srcAccountName']; $fcharacter = $result_array['srcCharName']; $taccount = $result_array['desAccountName']; $tcharacter = $result_array['desCharName']; $item = $result_array['ItemName']; $count = $result_array['ItemCount']; $price = $result_array['price']; $map = $result_array['MapName']; $action = $result_array['Action']; $index = $result_array['index']; if($action == "0") { $data = "$fcharacter (Account: $faccount) dropped $count x $item."; } if($action == "1") { $data = "$fcharacter (Account: $faccount) picked up $count x $item."; } if($action == "3") { $data = "$fcharacter (Account: $faccount) traded $count x $item to $tcharacter (Account: $taccount)."; } if($action == "4") { $data = "$fcharacter (Account: $faccount) bought $count x $item from $tcharacter (Account: $taccount) merchant shop."; } if($action == "5") { $data = "$fcharacter (Account: $faccount) bought $count x $item from an NPC on the map $map."; } if($action == "6") { $data = "$fcharacter (Account: $faccount) sold $count x $item in a shop for $price zeny."; } if($action == "7") { $data = "$fcharacter (Account: $faccount) got $count x $item because of an MVP bonus."; } if($action == "9") { $data = "$fcharacter (Account: $faccount) received $count x $item from an NPC on the map $map."; } if($action == "10") { $data = "$fcharacter (Account: $faccount) gave $count x $item to an NPC on the map $map."; } echo "<tr>"; echo "<td width=100 class=\"mytext\" bgcolor=#b6b6b6 align=center>[ <a href=\"view_itemlogs.php?do=del&index=$index\">Delete Entry</a> ]</td>"; echo "<td width=800 class=\"mytext\" bgcolor=#b6b6b6 align=center>$data</td>"; echo "</tr>"; } echo "</table>"; EchoFoot(); include 'footer.inc'; ?> |
| QUOTE |
******@hotmail.com says: selecte the person to take Z from *****@hotmail.com says: then the person to put Z on *****@hotmail.com says: then is saiz something like this in the URL http://lords.servehttp.com/srocp/cp_user.p...404&GID2=100392 *****@hotmail.com says: alter ego to aragon SilverFox says: ~_~ *****@hotmail.com says: so you change it.....to this http://lords.servehttp.com/srocp/cp_user.p...404&GID2=100404 changing the GID's ***** alter ego to alter ego ***** then hit 100k and hit send over and over and over again |
| QUOTE (kookiekrak @ Apr 1 2004, 11:20 PM) |
| mines being gay... i d/led the latest php from www.php.net im using microsoft iis and its not working>_< (u can see errors here) http://24.184.218.14:79/aegis/login.php |
| QUOTE |
<?php /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * modified by echira * * original code lekiz * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ require 'memory.php'; include 'header.inc'; Authorize(); $login = CurrentUser(); echo " <table border=0 bgcolor=#000000 cellpadding=3><tr><th width=405><font face=Tahoma color=#ffffff size=1>Server Status</th></tr></table>"; echo "<table border=0 cellpadding=3 cellspacing=1 bgcolor=#000000>"; echo "<tr>"; error_reporting(0); $IP = array( "Login Server" => "PUT YOUR IP HERE:PORT", "Character Server" => "PUT YOUR IP HERE:PORT", "Zone Server" => "PUT YOUR IP HERE:PORT", ); while(list($ServerName,$Host)=each($IP)) { list($IPAddress,$Port)=explode(":",$Host); echo("<td width=200 class=\"mytext\" bgcolor=#b6b6b6 align=center>".$ServerName."</td><td width=200 class=\"mytext\" bgcolor=#b6b6b6 align=center>"); if($fp=fsockopen($IPAddress,$Port,$ERROR_NO,$ERROR_STR,(float)0.5)) { echo("Online"); fclose($fp); } else { echo ("Offline"); } echo ("</td></tr><tr>"); } echo ("</table>"); EchoFoot(); include 'footer.inc'; ?> |
| QUOTE (kitsunestarwind @ Apr 2 2004, 06:47 AM) |
| Another money bug URL manitulation to make the Sender & reciever GID's the same , can be abuse infinitely |
| QUOTE |
if ($GET_GID1 == $GET_GID2) { ReDirect("index.php","Do not try to cheat"); } |
| QUOTE |
elseif ($GET_step=="4") { $re = "-"; $ereg = ereg($re,$GET_amount); if($ereg == false) { $char1 = CharNameByGID($GET_GID1); $char2 = CharNameByGID($GET_GID2); $money1 = MoneyOnChar($GET_GID1); $money2 = MoneyOnChar($GET_GID2); if (IsSyncAID($GET_GID1,AIDByAccount($myuser)) == 0) { ReDirect("index.php","An error has occured"); } if (IsSyncAID($GET_GID2,AIDByAccount($myuser)) == 0) { ReDirect("index.php","An error has occured"); } |
| CODE |
| elseif (($GET_style > 0 && $GET_style < 20) && ($GET_charnum >-1 && $GET_charnum <3)) |
| CODE |
| elseif (($GET_style > 0 && $GET_style < 20) && ($GET_charnum >-1 && $GET_charnum <5)) |
| QUOTE (xmarv @ Apr 11 2004, 11:15 PM) |
| I don't think that I need the $time variable any more... Delete it to make the script a bit faster |
| QUOTE (Rentus @ Feb 24 2004, 11:58 AM) |
| you have to activate the mssql_connect() by deleting the ";" in front of "extension=php_mssql.dll" in the php.ini |
| QUOTE |
if ($GET_action == "items") { $result = mssql_query("select * from item where GID=$GET_GID",$char_db); $result_array = mssql_fetch_array($result); $item_data = bin2hex($result_array['equipItem']); EchoHead(); echo "<table border=0 cellpadding=3 cellspacing=1 width=450 bgcolor=#000000>"; $item_data = substr($item_data,4); while (strlen($item_data) > 0) { $item_code = hexdec(substr($item_data,2,2) . substr($item_data,0,2)); $identified = substr($item_data,5,1); $item_name = GetNameFromID($item_code); $color = "#000000"; if ($identified == 1) { $identified = "Identified"; } else { $identified = "Unidentified"; $color="#666666"; } if (IsEquip($item_code) == 1) { $equipped = hexdec(substr($item_data,14,5)); $refined = hexdec(substr($item_data,20,2)); $card[1] = GetNameFromID(hexdec(substr($item_data,24,2) . substr($item_data,22,2))); $card[2] = GetNameFromID(hexdec(substr($item_data,28,2) . substr($item_data,26,2))); $card[3] = GetNameFromID(hexdec(substr($item_data,32,2) . substr($item_data,30,2))); $card[4] = GetNameFromID(hexdec(substr($item_data,36,2) . substr($item_data,34,2))); $item_data = substr($item_data,38); if ($equipped > 0) { $color = "#AA0000"; } if ($refined > 0) { $refined = "+" . $refined; } else { $refined = ""; } echo "<tr>"; echo " <td class=\"mytext\" bgcolor=#B6B6B6><font color=$color><b>$refined $item_name</b></font> [ "; for ($i=1; $i<5; ++$i) { if ($card[$i]) { echo "<b>Slot$i:</b> $card[$i] "; } } echo "]</td></tr>"; } elseif(IsArrow($item_code) == 1) { $quantity = hexdec(substr($item_data,8,2) . substr($item_data,6,2)); $equipped = hexdec(substr($item_data,10,4)); if ($equipped > 0) { $color = "#AA0000"; } echo "<tr>"; echo " <td class=\"mytext\" bgcolor=#B6B6B6><font color=$color>$quantity $item_name(s)</font></tr>"; echo "</tr>"; $item_data = substr($item_data,14); } else { $quantity = hexdec(substr($item_data,8,2) . substr($item_data,6,2)); $item_data = substr($item_data,10); echo "<tr>"; echo "<td class=\"mytext\" bgcolor=#B6B6B6><font color=$color>$quantity $item_name(s)</font></tr>"; echo "</tr>"; } } echo "</table>"; EchoFoot(); echo "<br>"; } |
| QUOTE |
if ($GET_action == "items") { $result = mssql_query("select * from item where GID=$GET_GID",$char_db); while($result_array = mssql_fetch_array($result)) { $item_data = bin2hex($result_array['equipItem']); } $result = mssql_query("select * from charinfo where GID=$GET_GID",$char_db); while($result_array = mssql_fetch_array($result)) { $charname = $result_array['charname']; } EchoHead(); echo "<table border=0 cellpadding=3 cellspacing=1 width=450 bgcolor=#000000>"; echo "<tr>"; echo " <td class=\"mytext\" bgcolor=#000000><FONT FACE=\"Tahoma\" SIZE=2 color=#ffffff><b>Character: $charname</b></font>"; echo "</tr>"; echo "</table>"; EchoFoot(); echo "<br>"; EchoHead(); echo "<table border=0 cellpadding=3 cellspacing=1 width=450 bgcolor=#000000>"; echo "<tr>"; echo " <td class=\"mytext\" bgcolor=#000000><FONT FACE=\"Tahoma\" SIZE=2 color=#ffffff><b>Items</b></font>"; echo "</tr>"; $item_data = substr($item_data,4); while (strlen($item_data) > 0) { $item_code = hexdec(substr($item_data,2,2) . substr($item_data,0,2)); $identified = substr($item_data,5,1); $item_name = GetNameFromID($item_code); $color = "#000000"; if ($identified == 1) { $identified = "Identified"; } else { $identified = "Unidentified"; $color="#666666"; } if (IsEquip($item_code) == 1) { $equipped = hexdec(substr($item_data,14,5)); $refined = hexdec(substr($item_data,20,2)); $card[1] = GetNameFromID(hexdec(substr($item_data,24,2) . substr($item_data,22,2))); $card[2] = GetNameFromID(hexdec(substr($item_data,28,2) . substr($item_data,26,2))); $card[3] = GetNameFromID(hexdec(substr($item_data,32,2) . substr($item_data,30,2))); $card[4] = GetNameFromID(hexdec(substr($item_data,36,2) . substr($item_data,34,2))); $item_data = substr($item_data,38); if ($equipped > 0) { $color = "#AA0000"; } if ($refined > 0) { $refined = "+" . $refined; } else { $refined = ""; } echo "<tr>"; echo " <td class=\"mytext\" bgcolor=#B6B6B6><font color=$color><b>$refined $item_name</b></font> [ "; for ($i=1; $i<5; ++$i) { if ($card[$i]) { echo "<b>Slot$i:</b> $card[$i] "; } } echo "]</td></tr>"; } elseif(IsArrow($item_code) == 1) { $quantity = hexdec(substr($item_data,8,2) . substr($item_data,6,2)); $equipped = hexdec(substr($item_data,10,4)); if ($equipped > 0) { $color = "#AA0000"; } echo "<tr>"; echo " <td class=\"mytext\" bgcolor=#B6B6B6><font color=$color>$quantity $item_name(s)</font></tr>"; echo "</tr>"; $item_data = substr($item_data,14); } else { $quantity = hexdec(substr($item_data,8,2) . substr($item_data,6,2)); $item_data = substr($item_data,10); echo "<tr>"; echo "<td class=\"mytext\" bgcolor=#B6B6B6><font color=$color>$quantity $item_name(s)</font></tr>"; echo "</tr>"; } } echo "</table>"; EchoFoot(); echo "<br>"; EchoHead(); echo "<table border=0 cellpadding=3 cellspacing=1 width=450 bgcolor=#000000>"; echo "<tr>"; echo " <td class=\"mytext\" bgcolor=#000000><FONT FACE=\"Tahoma\" SIZE=2 color=#ffffff><b>Cart Items</b></font>"; $result = mssql_query("select * from cartItem where GID=$GET_GID",$char_db); while ($result_array = mssql_fetch_array($result)) { $item_data = bin2hex($result_array['cartitem']); } $item_data = substr($item_data,4); while (strlen($item_data) > 0) { $item_code = hexdec(substr($item_data,2,2) . substr($item_data,0,2)); $identified = substr($item_data,5,1); $item_name = GetNameFromID($item_code); $color = "#000000"; if ($identified == 1) { $identified = "Identified"; } else { $identified = "Unidentified"; $color="#666666"; } if (IsEquip($item_code) == 1) { $equipped = hexdec(substr($item_data,14,5)); $refined = hexdec(substr($item_data,20,2)); $card[1] = GetNameFromID(hexdec(substr($item_data,24,2) . substr($item_data,22,2))); $card[2] = GetNameFromID(hexdec(substr($item_data,28,2) . substr($item_data,26,2))); $card[3] = GetNameFromID(hexdec(substr($item_data,32,2) . substr($item_data,30,2))); $card[4] = GetNameFromID(hexdec(substr($item_data,36,2) . substr($item_data,34,2))); $item_data = substr($item_data,38); if ($equipped > 0) { $color = "#AA0000"; } if ($refined > 0) { $refined = "+" . $refined; } else { $refined = ""; } echo "<tr>"; echo " <td class=\"mytext\" bgcolor=#B6B6B6><font color=$color><b>$refined $item_name</b></font> [ "; for ($i=1; $i<5; ++$i) { if ($card[$i]) { echo "<b>Slot$i:</b> $card[$i] "; } } echo "]</td></tr>"; } elseif(IsArrow($item_code) == 1) { $quantity = hexdec(substr($item_data,8,2) . substr($item_data,6,2)); $equipped = hexdec(substr($item_data,10,4)); if ($equipped > 0) { $color = "#AA0000"; } echo "<tr>"; echo " <td class=\"mytext\" bgcolor=#B6B6B6><font color=$color>$quantity $item_name(s)</font></tr>"; echo "</tr>"; $item_data = substr($item_data,14); } else { $quantity = hexdec(substr($item_data,8,2) . substr($item_data,6,2)); $item_data = substr($item_data,10); echo "<tr>"; echo "<td class=\"mytext\" bgcolor=#B6B6B6><font color=$color>$quantity $item_name(s)</font></tr>"; echo "</tr>"; } } echo "</table>"; EchoFoot(); echo "<br>"; } |
| CODE |
| if ($GET_action == "result") { $result = @mssql_query("SELECT * FROM itemLog ORDER BY [index] desc",$itemlog_db); echo "<a href=\"view_itemlogs.php?action=delall\"><center><b>Delete all entries</b></center></a>"; if (!$GET_pg) { $GET_pg = 1; } $rspp = $_SESSION['results_per_page']; |
| CODE |
| if ($GET_action == "result") { $rspp = $_SESSION['results_per_page']; if( isset( $_SESSION['pg'] ) ) { $offset = $_SESSION['pg'] * $rspp; } else { $offset = 0; } $result = @mssql_query("SELECT * FROM itemLog ORDER BY [index] desc LIMIT $offset,$rspp",$itemlog_db); echo "<a href=\"view_itemlogs.php?action=delall\"><center><b>Delete all entries</b></center></a>"; if (!$GET_pg) { $GET_pg = 1; } |
| QUOTE (xmarv @ Apr 12 2004, 02:30 AM) |
| You enabled it in all 3 php.inis ? webfolder\php\php.ini webfolder\apache\bin\php.ini %SYSTEMROOT%\php.ini |
| QUOTE |
| Fatal error: Call to undefined function: mssql_connect() in D:\xampp\xampp\htdocs\admin2\memory.php on line 58 |
| QUOTE (serra @ Apr 12 2004, 09:25 AM) |
| @echira I noticed you are throwing the entire itemLog table in to an array before limiting how ever many you want to see at a time. |
| QUOTE |
if ($GET_action == "result") { $rspp = $_SESSION['results_per_page']; if( isset( $_SESSION['pg'] ) ) { $offset = $_SESSION['pg'] * $rspp; } else { $offset = $rspp; } $result = @mssql_query("SELECT TOP $rspp * FROM (SELECT TOP $offset * FROM itemLog ORDER BY [index] DESC) Subquery ORDER BY [index] DESC",$itemlog_db); echo "<a href=\"view_itemlogs.php?action=delall\"><center><b>Delete all entries</b></center></a>"; if (!$GET_pg) { $GET_pg = 1; } EchoHead(); |
| QUOTE |
| If I remember correctly, each row of the itemLog table has a unique key. If that is the case, you can query the table, order asc, offset 0, limit 1. Toss that value in to a variable. Then query the database again, but this time order desc, offset 0, limit 1, toss that in to another variable. Then do ($var1 - $var2)/($rspp) to find out how many pages there are. Duno if it's faster, but worth a shot maybe. |
| QUOTE (echira @ Apr 13 2004, 07:55 PM) | ||
the only problem with this is that to return and count the rows available, you'd still have to query the entire structure and then divide them into pages, which then could give you the page count, the only problem is that you're still having to return all the data, which defeats the purpose of counting. |
| QUOTE |
if (ReadAccess(CurrentUser(),"view_logs") == 1) { echo "<option value=\"view_logs.php\">Admin Controls"; echo "<option value=\"view_logs.php\">-- View Log Files"; echo "<option value=\"view_itemlogs.php?action=search\">-- View Item Log Files"; } |
| QUOTE (xmarv @ Mar 25 2004, 11:22 PM) |
| I won't do that, you would have to open your MsSQL port |
| QUOTE |
for ($i = 0; $i <= 2; $i++) { if ($i == $CharNum) { $char_sel[$i] = "SELECTED"; } else { $char_sel[$i] = ""; } } |
| QUOTE |
for ($i = 0; $i <= 4; $i++) { if ($i == $CharNum) { $char_sel[$i] = "SELECTED"; } else { $char_sel[$i] = ""; } } |
| QUOTE |
<option value=\"0\" $char_sel[0]>Slot 1 <option value=\"1\" $char_sel[1]>Slot 2 <option value=\"2\" $char_sel[2]>Slot 3 |
| QUOTE |
<option value=\"0\" $char_sel[0]>Slot 1 <option value=\"1\" $char_sel[1]>Slot 2 <option value=\"2\" $char_sel[2]>Slot 3 <option value=\"3\" $char_sel[3]>Slot 4 <option value=\"4\" $char_sel[4]>Slot 5 |
| QUOTE (echira @ Apr 13 2004, 10:14 PM) |
| as Serra posted in another section, even the difference between nonequippable items and equippable items are different. i believe storeItem works the same way. |
| QUOTE |
| $result = mssql_query("select * from item where GID=$GET_GID",$char_db); |
| QUOTE |
| $result = mssql_query("select * from storeitem where AID=$GET_AID",$char_db); |
| QUOTE |
| $result = @mssql_query("SELECT TOP $rspp * FROM (SELECT TOP $offset * FROM itemLog ORDER BY [index] DESC) Subquery ORDER BY [index] DESC",$itemlog_db); |
| QUOTE |
| $result = @mssql_query("SELECT TOP $rspp *, datediff(minute,logtime,getdate()) as elapsed FROM (SELECT TOP $offset * FROM itemLog ORDER BY [index] DESC) Subquery ORDER BY [index] DESC",$itemlog_db); |
| QUOTE |
| $elapsed = $result_array['elapsed']; |
| QUOTE |
| $color="#b6b6b6"; if ($elapsed <= 60) $color="#bdbdd6"; if ($elapsed <= 10) $color="#c6c6d6"; if ($elapsed <= 1) $color="#ececff"; |
| QUOTE (Senku @ Apr 18 2004, 01:27 AM) |
| Edit i was able to connect but now i get these errors Warning: mssql_connect(): Unable to connect to server: server1 in W:\www\memory.php on line 58 Warning: mssql_query(): supplied argument is not a valid MS SQL-Link resource in W:\www\memory.php on line 46 Warning: mssql_fetch_array(): supplied argument is not a valid MS SQL-result resource in W:\www\memory.php on line 48 |
| QUOTE (echira @ Apr 17 2004, 07:40 PM) |
| the bit about storage i still believe is incorrect. i have a fully written storage script that i'm showing you and it does not display all items correctly. |
| QUOTE |
| $result = mssql_query("select * from storeitem where AID=$GET_AID",$char_db); while ($result_array = mssql_fetch_array($result)) { $item_data = bin2hex($result_array['storedItem']); } |
| QUOTE |
| $lresult= mssql_query("select len(storedItem) as length from storeitem",$char_db); $lresult_array = mssql_fetch_array($lresult); $length = $lresult_array['length']; $qLength = floor($length/255) + (($length % 255) ? 1 : 0); for($i=0;$i<$qLength;$i++) { $result = mssql_query("select AID,substring(storedItem,$i*255+1,255) as storedItem from storeitem where AID=$GET_AID",$char_db); while($result_array = mssql_fetch_array($result)) { $item_data .= bin2hex($result_array['storedItem']); } } |
| QUOTE (shiver @ Apr 25 2004, 12:54 PM) |
| Same error here... Mayby its the version of PHP that is supported by the webserver. Im using EasyPHP 1.6 |