Nieuw lid |
|
[/code]<?php /* ------------------------- */
//------------clan
$dbres = mysql_query("SELECT * FROM `[clans]` WHERE `money_lvl1` > 0");
while($clan = mysql_fetch_object($dbres)) {
if($clan->type == 1)
mysql_query("UPDATE `[users]` SET `cash`=`cash`+". (50*$clan->money_lvl1) .",`bank`=`bank`+". (150*$clan->money_lvl1) ." WHERE `clan`='{$clan->name}'AND `uurloon`='2'");
else if($clan->type == 2)
mysql_query("UPDATE `[users]` SET `cash`=`cash`+". (100*$clan->money_lvl1) .",`bank`=`bank`+". (100*$clan->money_lvl1) ." WHERE `clan`='{$clan->name}'AND `uurloon`='2'");
else if($clan->type == 3)
mysql_query("UPDATE `[users]` SET `bank`=`bank`+". (rand(150,300)*$clan->money_lvl1) ." WHERE `clan`='{$clan->name}'AND `uurloon`='2'");
}
$dbres = mysql_query("SELECT * FROM `[clans]` WHERE `money_lvl9` > 0");
while($clan = mysql_fetch_object($dbres)) {
if($clan->type == 1)
mysql_query("UPDATE `[users]` SET `cash`=`cash`+". (50*$clan->money_lvl9) .",`bank`=`bank`+". (200*$clan->money_lvl9) ." WHERE `clan`='{$clan->name}'AND `uurloon`='2'");
else if($clan->type == 2)
mysql_query("UPDATE `[users]` SET `cash`=`cash`+". (50*$clan->money_lvl9) .",`bank`=`bank`+". (200*$clan->money_lvl9) ." WHERE `clan`='{$clan->name}'AND `uurloon`='2'");
else if($clan->type == 3)
mysql_query("UPDATE `[users]` SET `bank`=`bank`+". (rand(50,200)*$clan->money_lvl9) ." WHERE `clan`='{$clan->name}'AND `uurloon`='2'");
}
$dbres = mysql_query("SELECT * FROM `[clans]` WHERE `money_lvl10` > 0");
while($clan = mysql_fetch_object($dbres)) {
if($clan->type == 1)
mysql_query("UPDATE `[users]` SET `cash`=`cash`+". (100*$clan->money_lvl10) .",`bank`=`bank`+". (200*$clan->money_lvl10) ." WHERE `clan`='{$clan->name}'AND `uurloon`='2'");
else if($clan->type == 2)
mysql_query("UPDATE `[users]` SET `cash`=`cash`+". (100*$clan->money_lvl10) .",`bank`=`bank`+". (200*$clan->money_lvl10) ." WHERE `clan`='{$clan->name}'AND `uurloon`='2'");
else if($clan->type == 3)
mysql_query("UPDATE `[users]` SET `bank`=`bank`+". (rand(100,200)*$clan->money_lvl10) ." WHERE `clan`='{$clan->name}'AND `uurloon`='2'");
}
/* ------------------------- */ ?>[code] |