Файл: test.zfarm.mobi/mystylecollect/mystylecollectionsrand.php
Строк: 125
<?php
/////////////////////////
/*
Author MyStyle ZomBi.Biz
12/05/2013
*/
/////////////////////////
$shans_all = $user['collection_shans']*4;
///////////////////////////////////////
///////////////////////////////////////
$rand = rand(1,$shans_all);
///////////////////////////////////////
if($rand == 3){
$rand_session = rand(1,10);
$collection = mysql_fetch_array(mysql_query("SELECT * FROM `mystyle_collections_butterfly` WHERE `int` = '".$rand_session."' AND `user` = '".$user['id']."'"));
if($collection['type'] == 'no'){
$type = 'yes';
mysql_query("UPDATE `mystyle_collections_butterfly` SET `type` = '".my_esc($type)."' WHERE `int` = '".$rand_session."' AND `user` = '".$user['id']."' LIMIT 1");
$text = 'Найдена коллекция.';
$_SESSION['msg'] = $text;
}////////// End Collection ////////////
}////////// End Rand //////////////////
if($rand == 2){
$rand_session = rand(1,10);
$collection = mysql_fetch_array(mysql_query("SELECT * FROM `mystyle_collections_car` WHERE `int` = '".$rand_session."' AND `user` = '".$user['id']."'"));
if($collection['type'] == 'no'){
$type = 'yes';
mysql_query("UPDATE `mystyle_collections_car` SET `type` = '".my_esc($type)."' WHERE `int` = '".$rand_session."' AND `user` = '".$user['id']."' LIMIT 1");
$text = 'Найдена коллекция.';
$_SESSION['msg'] = $text;
}////////// End Collection ////////////
}////////// End Rand //////////////////
if($rand == 4){
$rand_session = rand(1,10);
$collection = mysql_fetch_array(mysql_query("SELECT * FROM `mystyle_collections_coin` WHERE `int` = '".$rand_session."' AND `user` = '".$user['id']."'"));
if($collection['type'] == 'no'){
$type = 'yes';
mysql_query("UPDATE `mystyle_collections_coin` SET `type` = '".my_esc($type)."' WHERE `int` = '".$rand_session."' AND `user` = '".$user['id']."' LIMIT 1");
$text = 'Найдена коллекция.';
$_SESSION['msg'] = $text;
}////////// End Collection ////////////
}////////// End Rand //////////////////
if($rand == 5){
$rand_session = rand(1,10);
$collection = mysql_fetch_array(mysql_query("SELECT * FROM `mystyle_collections_herbal` WHERE `int` = '".$rand_session."' AND `user` = '".$user['id']."'"));
if($collection['type'] == 'no'){
$type = 'yes';
mysql_query("UPDATE `mystyle_collections_herbal` SET `type` = '".my_esc($type)."' WHERE `int` = '".$rand_session."' AND `user` = '".$user['id']."' LIMIT 1");
$text = 'Найдена коллекция.';
$_SESSION['msg'] = $text;
}////////// End Collection ////////////
}////////// End Rand //////////////////
if($rand == 7){
$rand_session = rand(1,10);
$collection = mysql_fetch_array(mysql_query("SELECT * FROM `mystyle_collections_necke` WHERE `int` = '".$rand_session."' AND `user` = '".$user['id']."'"));
if($collection['type'] == 'no'){
$type = 'yes';
mysql_query("UPDATE `mystyle_collections_necke` SET `type` = '".my_esc($type)."' WHERE `int` = '".$rand_session."' AND `user` = '".$user['id']."' LIMIT 1");
$text = 'Найдена коллекция.';
$_SESSION['msg'] = $text;
}////////// End Collection ////////////
}////////// End Rand //////////////////
if($rand == 10){
$rand_session = rand(1,10);
$collection = mysql_fetch_array(mysql_query("SELECT * FROM `mystyle_collections_wrapper` WHERE `int` = '".$rand_session."' AND `user` = '".$user['id']."'"));
if($collection['type'] == 'no'){
$type = 'yes';
mysql_query("UPDATE `mystyle_collections_wrapper` SET `type` = '".my_esc($type)."' WHERE `int` = '".$rand_session."' AND `user` = '".$user['id']."' LIMIT 1");
$text = 'Найдена коллекция.';
$_SESSION['msg'] = $text;
}////////// End Collection ////////////
}////////// End Rand //////////////////
/////////////////////////
/*
Author MyStyle ZomBi.Biz
12/05/2013
*/
/////////////////////////
?>