2022-06-06 21:30:34 +00:00
< ? php
2022-08-11 10:38:38 +00:00
/** <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> <EFBFBD> $u . <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> .
* 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> <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> .
* @ var PDO $pdo
* @ var user $u
* @ author Insallah
*/
const GAME = true ;
const RETURN_GROUP = '"<span style="color: #C65F00;">Shop.capitalcity</span>": <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="%s"/ <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> : "%s"/ <20> <> <EFBFBD> <EFBFBD> : "%s"/ <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> : "$s"].' ;
const RETURN_ONE = '"<span style="color: #C65F00;">Shop.capitalcity</span>": <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="%s"/ <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> : "%s"/ <20> <> <EFBFBD> <EFBFBD> : "%s"].' ;
const SHOP_TYPE = 'Shop.comission' ;
setlocale ( LC_CTYPE , " ru_RU.CP1251 " );
2022-06-06 21:30:34 +00:00
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' );
2022-08-11 10:38:38 +00:00
$q = 'select items_main.id, uid, inGroup, item_id, price1, name from items_users left join items_main on items_main.id = item_id where inShop = 30 and `delete` = 0' ;
foreach ( $pdo -> query ( $q ) as $row ) {
if ( $row [ 'inGroup' ]) {
$col = $u -> itemsX ( $row [ 'id' ]);
if ( $col > 1 ) {
$stmt = $pdo -> prepare ( 'update items_users set inShop = 0, 1price = ? where item_id = ? and inShop = 30 and uid = ? and inGroup = ? limit ' . $col );
if ( $stmt -> execute ([ $row [ 'price1' ], $row [ 'item_id' ], $row [ 'uid' ], $row [ 'inGroup' ]])) {
$ld = $u -> addDelo ( 1 , $row [ 'uid' ],
sprintf ( RETURN_GROUP , $row [ 'item_id' ], $row [ 'name' ], $row [ 'price1' ], $row [ 'inGroup' ] . '+1' ),
time (), $u -> info [ 'city' ], SHOP_TYPE , 0 , 0 );
}
} else {
$stmt = $pdo -> prepare ( 'update items_users set inShop = 0, 1price = ? where uid = ? and id = ? and inOdet = 0 and `delete` = 0 and inShop = 30' );
if ( $stmt -> execute ([ $row [ 'price1' ], $row [ 'uid' ], $row [ 'id' ]])) {
$ld = $u -> addDelo ( 1 , $row [ 'uid' ], sprintf ( RETURN_ONE , $row [ 'item_id' ], $row [ 'name' ], $row [ 'price1' ]),
time (), $u -> info [ 'city' ], SHOP_TYPE , 0 , 0 );
}
}
} else {
$stmt = $pdo -> prepare ( 'update items_users set inShop = 0, 1price = ? where id = ? and inShop = 30' );
if ( $stmt -> execute ([ $row [ 'price1' ], $row [ 'id' ]])) {
$ld = $u -> addDelo ( 1 , $row [ 'uid' ], sprintf ( RETURN_ONE , $row [ 'item_id' ], $row [ 'name' ], $row [ 'price1' ]),
time (), $u -> info [ 'city' ], SHOP_TYPE , 0 , 0 );
}
}
2022-06-06 21:30:34 +00:00
}