[Help] Can Add Items whit site

EvoLuTioN

Active Member
Joined
May 3, 2008
Messages
815
Reaction score
164
I whont to can add items in site(in admin panel)
Help :bye2:
 

EvoLuTioN

Active Member
Joined
May 3, 2008
Messages
815
Reaction score
164
А човек не мога разбера аз ли пиша глупости ти ли четеш глупости
I whont to can add items in site(in admin panel)-Как мога да адвам итеми от сайта :D
 

FreestyleR

New Member
Joined
May 14, 2008
Messages
129
Reaction score
19
Итеми от сайта чрез MuWeb се аддват с модула ExtraVault
 

FreestyleR

New Member
Joined
May 14, 2008
Messages
129
Reaction score
19
baulextra.php file:
Code:
<form id="form1" name="form1" method="post" action="cambiobaul.php">
<table width="100%" border="1" bordercolor="#000000">
<td colspan="2">
<div></div>
</td>
<tr>
<td width="10%">
<div>ID</div>
</td>
<td width="90%">
<div><input name="id" type="text" maxlength="10" /></div>
</td>
</tr>
<tr>
<td>
<div>Password</div>
</td><td>
<div><input name="clave" type="password" class="Estilo86" maxlength="10" />
</div>
</td>
</tr>
<tr>
<td colspan="2">
<div>Anti-Duppers System</div>
</td>
</tr>
<tr>
<td>
<div><input name="Submit" type="submit" value="Change Vault" />
</div>
</td>
</tr>
</table>
</form>
cambiobaul.php file:
Code:
<?
$conection = mssql_connect("ServerName","UserName","Password") or die("SQL connection fail, verify your connection config.");
mssql_select_db("MuOnline",$conection);
function anti_injection( $mensaje )
{
$banlist = array
("insert","select","drop","update","delete","distinct","having","truncate","replace",
"handler","like","procedure","limit","order by","group by","<",">","/","'"," ","=","*",",","-");
if ( eregi ( "[a-zA-Z0-9]+", $mensaje ) )
{
$mensaje = trim ( str_replace ( $banlist, '', strtolower ( $mensaje ) ) );
}
else
{
$mensaje = NULL;
}
return $mensaje;
}
if(trim($HTTP_POST_VARS["id"]) != "" && trim($HTTP_POST_VARS["clave"]) != "")
{
$sql = "SELECT memb___id FROM MEMB_INFO WHERE memb___id='".anti_injection($HTTP_POST_VARS["id"])."' and memb__pwd='".anti_injection($HTTP_POST_VARS["clave"])."'";
$result = mssql_query($sql);
if($row = mssql_fetch_array($result))
{
  $sqlexiste = "SELECT AccountID FROM EXTWAREHOUSE WHERE AccountID='".anti_injection($HTTP_POST_VARS["id"])."'";
  $resultexiste = mssql_query($sqlexiste);
  if($rowexiste = mssql_fetch_array($resultexiste))
  {
   $sqlchar = mssql_query("SELECT ConnectStat FROM MEMB_STAT WHERE memb___id='".anti_injection($HTTP_POST_VARS["id"])."'");
   $rschar = mssql_fetch_array($sqlchar);
   if(($rschar['ConnectStat'])==0)
   {
    $sqlbaul = mssql_query("SELECT number FROM WAREHOUSE WHERE AccountID='".anti_injection($HTTP_POST_VARS["id"])."'");
    $rsbaul = mssql_fetch_array($sqlbaul);
    if(($rsbaul['number'])==1)
    {
     /* If I want my original vault */
     /* Save 2nd vault in extwarehouse table */
     $sql ="update extwarehouse set items=(select items from warehouse where accountid='".anti_injection($HTTP_POST_VARS["id"])."') where accountid='".anti_injection($HTTP_POST_VARS["id"])."'";
     mssql_query($sql);
     $sql ="update extwarehouse set money=(select money from warehouse where accountid='".anti_injection($HTTP_POST_VARS["id"])."') where accountid='".anti_injection($HTTP_POST_VARS["id"])."'";
     mssql_query($sql);
     /* Update main vault to original content */
     $sql ="update warehouse set items=(select items from charbaul where accountid='".anti_injection($HTTP_POST_VARS["id"])."') where accountid='".anti_injection($HTTP_POST_VARS["id"])."'";
     mssql_query($sql);
     $sql ="update warehouse set money=(select money from charbaul where accountid='".anti_injection($HTTP_POST_VARS["id"])."') where accountid='".anti_injection($HTTP_POST_VARS["id"])."'";
     mssql_query($sql);
     /* Set vault number */
     $sql ="update warehouse set number=0 where accountid='".anti_injection($HTTP_POST_VARS["id"])."'";
     mssql_query($sql);
     /* Clean main vault last data  */
     $sql ="delete charbaul where accountid='".anti_injection($HTTP_POST_VARS["id"])."'";
     mssql_query($sql);
    }
    if(($rsbaul['number'])==0)
    {
     /* If I want 2nd vault */
     /* Save main vault data into charbaul table */
     $sql ="insert into charbaul(accountid, items, money)(select accountid, items, money from warehouse where accountid='".anti_injection($HTTP_POST_VARS["id"])."')";
     mssql_query($sql);
     /* Update main vault to 2nd vault data */
     $sql ="update warehouse set items=(select items from extwarehouse where accountid='".anti_injection($HTTP_POST_VARS["id"])."') where accountid='".anti_injection($HTTP_POST_VARS["id"])."'";
     mssql_query($sql);
     $sql ="update warehouse set money=(select money from extwarehouse where accountid='".anti_injection($HTTP_POST_VARS["id"])."') where accountid='".anti_injection($HTTP_POST_VARS["id"])."'";
     mssql_query($sql);
     /* Set vault number */
     $sql ="update warehouse set number=1 where accountid='".anti_injection($HTTP_POST_VARS["id"])."'";
     mssql_query($sql);
    }
    echo "-".anti_injection($HTTP_POST_VARS["id"])." vault changed successfully !!!";
   }
   else
   {
    echo "You must be off line, vault change not proceed !!!";
   }
  }
  else
  {
   echo "You don't have extravault, contact your administrator !!!";
  }
}
else
{
  echo "Login fail !!!";
}
mssql_free_result($result);
}
else
{
echo "You must to complete all field to login ok !!!";
}
mssql_close();
?>
About scripts:

1. This script add a trigger into memb_info table, then will be activated every time an account is INSERTED into this table. This trigger will add a new record into extwarehouse table using the new account ID created:
Code:
CREATE TRIGGER [extware] ON [dbo].[MEMB_INFO] 
FOR INSERT
AS
declare @cuenta varchar(10)
SELECT @cuenta=memb___id FROM INSERTED
insert into extwarehouse values(@cuenta,0,0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF,0,0,0,'')
2. The complicated script:
Code:
ALTER TABLE warehouse ADD exist INTEGER NULL CONSTRAINT [DF_warehouses] DEFAULT ((0))
UPDATE warehouse SET exist=0
UPDATE warehouse SET exist=1 WHERE EXISTS ( SELECT extwarehouse.AccountID FROM extwarehouse WHERE extwarehouse.AccountID = warehouse.AccountID)
INSERT INTO extwarehouse(AccountID,Number,Items,Money,EndUseDate,DbVersion,pw)(select accountid,0,0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF,0,0,0,'' from warehouse where exist=0)
UPDATE warehouse SET exist=1 WHERE EXISTS ( SELECT extwarehouse.AccountID FROM extwarehouse WHERE extwarehouse.AccountID = warehouse.AccountID)
Nice Works ! :)
 

ReaL

New Member
Joined
Apr 13, 2008
Messages
1,244
Reaction score
654
Метни го като Release, 10/10 ;)
с credits естествено :)
 

Sunwalker

Well-Known Member
Joined
Apr 25, 2008
Messages
1,811
Reaction score
376
А човек не мога разбера аз ли пиша глупости ти ли четеш глупости
I whont to can add items in site(in admin panel)-Как мога да адвам итеми от сайта :D
аз разбрах от сайт / не да ги добавяш в сайт
sry не те разбрах xD
 

EvoLuTioN

Active Member
Joined
May 3, 2008
Messages
815
Reaction score
164
SQL connection fail, verify your connection config.Неква идея как да оправа тва?
 
Thread starter Similar threads Forum Replies Date
Nesquik [Help] Add items in webshop Help 0
S [Help] How to add Ancient+Excellent items Help 0
R [Help] Add New Items on 97d Help 0
ivowe3 [Help] WebShop Add Items Problem Help 3
acriman [Help] How to add custom items in webshop Help 4
acriman [Help] Adding custom items in MuEditor Help 11
energ [Help] Adding items Help 3
E [Help] The items I added in game are invisible Help 2
MorgaN [Help] how can add on pc shop items Help 0
FroggerPL [Help] Add Items in My Server Help 4
D [Help] No Add Items (WEBSHOP) Help 4
diablo21 [Help] Adding Mushop items Help 0
waaza [Help] Add Items Help 6
MorgaN [Help] I need one good helper to add to my server new items Help 0
Uco975 [Help] DarksTeam MuServer 97d+99i Beta 42 How to add Dark Lord? Help 7
M [Help] MuOnline Additional Option Help 1
D [Help] Add new monsters to 97d+99i client Help 0
S [Help] Mucore 2.2.0 how to add/edit modules? Help 0
F [Help] Not able to use a Decimal on AddExperience Help 2
M [Help] 97d Adding maps Help 0
E [Help] Add to my web Help 3
mechaloco [Help] Add s3 to server Help 0
T [Help] How to Add a New Resolution or Resolution Windowed Help 1
T [Help] How to Add Pets in MuServer Old Season Help 0
M [Help] Werewolf Quarrel doesn't warp, adding barracks to map list doesn't warp Help 0
DevilReject [Help] Vote Reward,Marry,/addstr Help 0
F [Help] How to add cspoints to MEMB_INFO Help 1
crazzybg [Help] Add command source code Help 5
P [Help] Adding Barracks to Map List Help 2
G [Help] How to add post command Help 2
hrisiz [Help] Mac Address Help 3
Nesquik [Help] Add modul to user panel Help 2
A [Help] How add new map in 97d99i Help 1
P [Help] Adding CheckSum to GameServer Help 0
Fr3sh [Help] MSSQL Addon Help 12
kulturista [Help] Add stats problem Help 4
enemysss [Help] How to add Referral link Help 1
ivowe3 [Help] WebShop Itemadder Help 0
D [Help] How to add Bow Help 0
D [Help] Adding new item in MuServer & Client Help 0
R [Help] Party zen bug - /add command Help 0
D [Help] About Adding Custom Drop File Help 3
D [Help] How to add new mobs to MuServer Help 0
DaRkiv [Help] Having problems adding my Domain name to my MuWeb Help 1
acriman [Help] DarksWeb 0.3 Add stats problem Help 0
FroggerPL [Help] Add 3d Camara IN Client ? S2+S4 WATCH PLEASE Help 1
ludlud [Help] Add column in character Help 0
antistaro [Help] DarksWeb 0.1 Add Stats Help 4
R [Help] adding 3rd quest mobs to maps! Help 2
crazyboy [Help] WebShop No Add Credits Help 11

Similar threads