46 lines
2.4 KiB
PHP
46 lines
2.4 KiB
PHP
|
<?php
|
|||
|
define('GAME',true);
|
|||
|
setlocale(LC_CTYPE ,"ru_RU.CP1251");
|
|||
|
include('/home/newcom1/public_html/_incl_data/__config.php');
|
|||
|
include('/home/newcom1/public_html/_incl_data/class/__db_connect.php');
|
|||
|
include('/home/newcom1/public_html/_incl_data/class/__user.php');
|
|||
|
|
|||
|
/*
|
|||
|
|
|||
|
CRON <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:
|
|||
|
1. <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> 2 <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> 50% <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|||
|
*/
|
|||
|
|
|||
|
|
|||
|
$time_last = 86400 * 6; //2 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
|||
|
$sp = mysql_query('SELECT * FROM `items_users` WHERE `inShop` = 30');
|
|||
|
while( $pl = mysql_fetch_array($sp) )
|
|||
|
{
|
|||
|
|
|||
|
$i = mysql_fetch_array(mysql_query('SELECT `im`.`price1`,`im`.`name`,`iu`.* FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`item_id`) WHERE `iu`.`id` = "'.$pl['id'].'" AND `iu`.`inShop` = "30" AND `iu`.`delete` = "0" LIMIT 1'));
|
|||
|
|
|||
|
if( isset($i['inGroup']) AND $i['inGroup'] > 0 )
|
|||
|
{
|
|||
|
$col = $u->itemsX($i['id']);
|
|||
|
if($col > 1)
|
|||
|
{
|
|||
|
mysql_query('UPDATE `items_users` SET `inShop` = 0, `1price` = "'.$i['price1'].'" WHERE `item_id`="'.$i['item_id'].'" AND `inShop` = "30" AND `uid`="'.$i['uid'].'" AND `inGroup` = "'.$i['inGroup'].'" LIMIT '.$col.'');
|
|||
|
$ld = $u->addDelo(1,$i['uid'],'"<font color=#C65F00>Shop.capitalcity</font>": <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: [id="'.$i['item_id'].'"/ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> : "'.$i['name'].'"/ <20><><EFBFBD><EFBFBD> : "'.$i['price1'].'"/ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> : "'.$i['inGroup'].'+1"].',time(),$u->info['city'],'Shop.comission',0,0);
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
mysql_query('UPDATE `items_users` SET `inShop` = 0, `1price` = "'.$i['price1'].'" WHERE `uid` = "'.$pl['uid'].'" AND `id` = "'.$pl['id'].'" AND `inOdet` = "0" AND `delete` = "0" ');
|
|||
|
$ld = $u->addDelo(1,$i['uid'],'"<font color=#C65F00>Shop.capitalcity</font>": <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: [id="'.$i['item_id'].'"/ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> : "'.$i['name'].'"/ <20><><EFBFBD><EFBFBD> : "'.$i['price1'].'"].',time(),$u->info['city'],'Shop.comission',0,0);
|
|||
|
}
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
mysql_query('UPDATE `items_users` SET `inShop` = 0, `1price` = "'.$i['price1'].'" WHERE `id` = "'.$pl['id'].'" and `inShop` = "30" LIMIT 1');
|
|||
|
$ld = $u->addDelo(1,$i['uid'],'"<font color=#C65F00>Shop.capitalcity</font>": <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: [id="'.$i['item_id'].'"/ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> : "'.$i['name'].'"/ <20><><EFBFBD><EFBFBD> : "'.$i['price1'].'"].',time(),$u->info['city'],'Shop.comission',0,0);
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
?>
|