Файл: LinkForum/LinkUserInc/LinkUserGameFunction.php
Строк: 505
<?php
function clear_bone(){
$time=time();
$req = mysql_query("SELECT * FROM `mystyle_user` WHERE `bone_time`<'".$time."'");
while($inv = mysql_fetch_assoc($req))
{
mysql_query("UPDATE `mystyle_user` SET `bone_time` = '', `bone_img` = '', `bone_exp` = '', `bone_name` = '' WHERE `id` = '".$inv['id']."'");
}
}
function clear_log(){
$time=time();
$req = mysql_query("SELECT * FROM `mystyle_log` WHERE `time`<'".$time."'");
while($inv = mysql_fetch_assoc($req))
{
mysql_query("DELETE FROM `mystyle_log` WHERE `id` = '".$inv['id']."'");
}
}
function what($rm = 0, $room = NULL)
{
global $user, $id, $last_visit;
if (isset($user['id'])) {
mysql_query("UPDATE `mystyle_user` SET `room` = '$room' WHERE `id` = '$user[id]'");
}
}
function br($msg,$br='<br />'){return eregi_replace("((<br( ?/?)>)|n|r)+",$br, $msg);} // переносы строк
function esc($text,$br=NULL){ // Вырезает все нечитаемые символы
if ($br!=NULL)
for ($i=0;$i<=31;$i++)$text=str_replace(chr($i), NULL, $text);
else{
for ($i=0;$i<10;$i++)$text=str_replace(chr($i), NULL, $text);
for ($i=11;$i<20;$i++)$text=str_replace(chr($i), NULL, $text);
for ($i=21;$i<=31;$i++)$text=str_replace(chr($i), NULL, $text);}
return $text;}
function cut_msg($text)
{
$text = substr($text, 0, 50);
return $text;
}
function hsc($text)
{
return htmlspecialchars($text);
}
function time_left($tl)
{
$d=3600*24;
$day=floor($tl/$d);
$tl=$tl-($d*$day);
$hour=floor($tl/3600);
$tl=$tl-(3600*$hour);
$minute=floor($tl/60);
$tl=$tl-(60*$minute);
$second=floor($tl);
$dayt="".($day>0?"$day д. ":null)."";
$hourt="".($hour>0?"$hour ч. ":null)."";
$minutet="".($minute>0?"$minute мин. ":null)."";
$secondt="".($second>0?"$second сек. ":null)."";
if($day>0)
{
$minutet=NULL;
$secondt=NULL;
}
if($hour>0 && $day==0)
{
$secondt=NULL;
$dayt=NULL;
}
return "$dayt$hourt$minutet$secondt";
}
function encrypt($var)
{
return md5(base64_encode($var) .'StyleCMS');
}
function sql($var)
{
return mysql_real_escape_string(trim($var));
}
function num($var)
{
$var=abs(intval($var));
if(!preg_match('/[0-9]/i',$var) && !is_numeric($var)){$var=false;}
if($var<0){$var=false;}
return $var;
}
function my_esc($str){
return mysql_real_escape_string($str);
}
function style_time($time=NULL)
{
global $user;
if ($time==NULL)$time=time();
if (isset($user))$time=$time+$user['set_timesdvig']*60*60;
$timep="".date("j M Y в H:i", $time)."";
$time_p[0]=date("j n Y", $time);
$time_p[1]=date("H:i", $time);
if ($time_p[0]==date("j n Y"))$timep=date("H:i:s", $time);
if (isset($user)){
if ($time_p[0]==date("j n Y", time()+$user['set_timesdvig']*60*60))$timep=date("H:i:s", $time);
if ($time_p[0]==date("j n Y", time()-60*60*(24-$user['set_timesdvig'])))$timep="Вчера в $time_p[1]";}
else{
if ($time_p[0]==date("j n Y"))$timep=date("H:i:s", $time);
if ($time_p[0]==date("j n Y", time()-60*60*24))$timep="Вчера в $time_p[1]";}
$timep=str_replace("Jan","Янв",$timep);
$timep=str_replace("Feb","Фев",$timep);
$timep=str_replace("Mar","Марта",$timep);
$timep=str_replace("May","Мая",$timep);
$timep=str_replace("Apr","Апр",$timep);
$timep=str_replace("Jun","Июня",$timep);
$timep=str_replace("Jul","Июля",$timep);
$timep=str_replace("Aug","Авг",$timep);
$timep=str_replace("Sep","Сент",$timep);
$timep=str_replace("Oct","Окт",$timep);
$timep=str_replace("Nov","Ноября",$timep);
$timep=str_replace("Dec","Дек",$timep);
return $timep;
}
function passgen($k_simb=8, $types=3) {
$password="";
$small="abcdefghijklmnopqrstuvwxyz";
$large="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
$numbers="1234567890";
mt_srand((double)microtime()*1000000);
for ($i=0; $i<$k_simb; $i++) {
$type=mt_rand(1,min($types,3));
switch ($type) {
case 3:
$password.=$large[mt_rand(0,25)];
break;
case 2:
$password.=$small[mt_rand(0,25)];
break;
case 1:
$password.=$numbers[mt_rand(0,9)];
break;
}
}
return $password;
}
$passgen=&passgen();
function page($k_page=1){ // Выдает текущую страницу
$page=1;
if (isset($_GET['page'])){
if ($_GET['page']=='end')$page=intval($k_page);elseif(is_numeric($_GET['page'])) $page=intval($_GET['page']);}
if ($page<1)$page=1;
if ($page>$k_page)$page=$k_page;
return $page;}
function k_page($k_post=0,$k_p_str=10){ // Высчитывает количество страниц
if ($k_post!=0){$v_pages=ceil($k_post/$k_p_str);return $v_pages;}
else return 1;}
function str($link='?',$k_page=1,$page=1){ // Вывод номеров страниц (только на первый взгляд кажется сложно ;))
if ($page<1)$page=1;
if ($page!=1)echo "<a class='btnp' href="".$link."page=1" title='Первая страница'><div class='pg'><<</div></a> ";
if ($page!=1)echo "<span><a class='btnp' href="".$link."page=1" title='Страница №1'><div class='pg'>1</div></a></span>";else echo "<span class="emptyPanel pg"><div class='pg'><b>1</b></div></span>";
for ($ot=-3; $ot<=3; $ot++){
if ($page+$ot>1 && $page+$ot<$k_page){
if ($ot==-3 && $page+$ot>2)echo " ...";
if ($ot!=0)echo " <span><a class='btnp' href="".$link."page=".($page+$ot)."" title='Страница №".($page+$ot)."'><div class='pg'>".($page+$ot)."</div></a></span>";else echo " <span class="emptyPanel pg"><div class='pg'><b>".($page+$ot)."</b></div></span>";
if ($ot==3 && $page+$ot<$k_page-1)echo " ...";}}
if ($page!=$k_page)echo " <span><a class='btnp' href="".$link."page=end" title='Страница №$k_page'><div class='pg'>$k_page</div></a>";elseif ($k_page>1)echo " <span class="emptyPanel pg"><div class='pg'><b>$k_page</b></div></span>";
if ($page!=$k_page)echo " <a class='btnp' href="".$link."page=end" title='Последняя страница'><div class='pg'>>></div></a>";
}
function user($id)
{
$user=mysql_fetch_array(mysql_query("SELECT * FROM `mystyle_user` WHERE `id` = '$id'"));
if($user['avatar']){ echo '<img src="images/icon_user.png" width="35" height="35" />'; }else{ echo '<img src="images/icon_user.png" width="35" height="35" />'; }
echo '<a href="?UserProfil&id='.$user['id'].'">'.$user['nick'].'</a>';
}
function update_shop($field,$value)
{
global $user;
mysql_query("UPDATE `mystyle_mypet` SET `".$field."` = '".$value."' WHERE `user` = '".$user['id']."'");
return $value;
}
function update_ruby($field,$value)
{
global $user;
mysql_query("UPDATE `mystyle_user` SET `".$field."` = '".($user[''.$field.'']-$value)."' WHERE `id` = '".$user['id']."'");
return $value;
}
function err_ruby($field)
{
echo '<div class="feedbackPanel">
<span>Вам не хватает</span> <span><span class="money nobr textshadow"><img width="16" height="16" src="images/icons/ruby.png" alt=""/> <span>'.$field.'</span></span></span>
</div><a class="btn" style="text-align: center;" href="?LinkPayment&Link">
<img src="images/icons/ruby.png" width="16" height="16" alt="o"/>
Купить рубины
</a>';
}
function err_money($field)
{
echo '<div class="feedbackPanel">
<span>Вам не хватает</span> <span><span class="money nobr textshadow"><img width="16" height="16" src="images/icons/coins.png" alt=""/> <span>'.$field.'</span></span></span>
</div><a class="btn" style="text-align: center;" href="?LinkPayment&Link">
<img src="images/icons/coins.png" width="16" height="16" alt="o"/>
Купить монеты
</a>';
}
function rat($var)
{
$rat = mysql_fetch_assoc(mysql_query("SELECT * FROM `mystyle_mypet` WHERE `user` = '" . num($var) . "'"));
if (!empty($rat['v6'])) $ratsq += $rat['s6'];
if (!empty($rat['v5'])) $ratsq += $rat['s5'];
if (!empty($rat['v4'])) $ratsq += $rat['s4'];
if (!empty($rat['v3'])) $ratsq += $rat['s3'];
if (!empty($rat['v2'])) $ratsq += $rat['s2'];
if (!empty($rat['v1'])) $ratsq += $rat['s1'];
$rats = mysql_fetch_assoc(mysql_query("SELECT * FROM `mystyle_user` WHERE `id` = '" . num($var) . "'"));
$ratsq = $ratsq+$rats['beauty'];
return $ratsq;
}
function vet($count)
{
if($count==0)$cena=10;
if($count==5)$cena=20;
if($count==10)$cena=50;
if($count==15)$cena=100;
if($count==20)$cena=150;
if($count==25)$cena=200;
if($count==30)$cena=250;
if($count==35)$cena=500;
if($count==40)$cena=800;
if($count==45)$cena=1500;
if($count==50)$cena=2700;
if($count==55)$cena=3900;
if($count==60)$cena=5000;
if($count==65)$cena=7500;
if($count==70)$cena=11500;
if($count==75)$cena=17000;
if($count==80)$cena=25000;
if($count==85)$cena=30000;
if($count==90)$cena=35000;
if($count==95)$cena=35000;
if($count==100)$cena=35000;
return $cena;
}
function update_vet($field,$value)
{
global $user;
mysql_query("UPDATE `mystyle_user` SET `".$field."` = '".($user[''.$field.'']+$value)."' WHERE `id` = '".$user['id']."'");
return $value;
}
function update_user($field,$value)
{
global $user;
mysql_query("UPDATE `mystyle_user` SET `".$field."` = '".($user[''.$field.'']+$value)."' WHERE `id` = '".$user['id']."'");
return $value;
}
function plus_rating($field)
{
echo '<li class="body feedbackPanel textshadow">Монеты + <span><span class="money nobr textshadow"><img width="16" height="16" src="/images/icons/coins.png" alt=""/> <span>12</span></span></span> Опыт + <span><span class="expirience nobr textshadow"><img height="16" width="16" src="/images/icons/level.png"> <span>4</span></span></span></li>';
}
function update_things($field1,$value1,$field2,$value2,$field3,$value3,$field4,$value4,$field5,$value5,$field6,$value6,$field7,$value7,$field8,$value8)
{
mysql_query("INSERT INTO `mystyle_things` SET `".$field1."` = '".$value1."', `".$field2."` = '".$value2."', `".$field3."` = '".$value3."', `".$field4."` = '".$value4."', `".$field5."` = '".$value5."', `".$field6."` = '".$value6."', `".$field7."` = '".$value7."', `".$field8."` = '".$value8."'");
return $value;
}
function update_thingsq($field,$value,$field2,$value2)
{
global $user;
mysql_query("UPDATE `mystyle_things` SET `".$field."` = '".$value."' WHERE `user` = '".$user['id']."' AND `".$field2."` = '".$value2."' ");
return $value;
}
function update_seta($field,$value,$field2,$value2)
{
global $user;
mysql_query("UPDATE `mystyle_things` SET `".$field."` = '".$value."' WHERE `user` = '".$user['id']."' AND `".$field2."` = '".$value2."' ");
return $value;
}
function users($id){
$users = mysql_fetch_array(mysql_query("SELECT * FROM `mystyle_user` WHERE `id` = '$id'"));
$t=time()-600;
if($users['date_last']<=$t)
{
if($users['pol'] == 2)
{
echo '<img src="images/icons/user_avatar_male_offline.png" alt="image" width="16" height="16"/>';
}else{
echo '<img src="images/icons/user_avatar_female_offline.png" alt="image" width="16" height="16"/>';
}
}else{
if($users['pol'] == 2)
{
echo '<img src="images/icons/user_avatar_male.png" alt="image" width="16" height="16"/>';
}else{
echo '<img src="images/icons/user_avatar_female.png" alt="image" width="16" height="16"/>';
}
}
echo ' <a class="blueLink" href="?User&UserLinkProfile='.$users['id'].'"><span>'.$users['nick'].'</span></a>';
}
function err_game($msg)
{
echo "<div class='feedback'><ul class='feedbackPanel'><li class='feedbackPanelERROR'><span class='feedbackPanelERROR'>$msg</span></li></ul></div>";
}
function update_us($field,$value)
{
global $user;
mysql_query("UPDATE `mystyle_user` SET `".$field."` = '".$value."' WHERE `id` = '".$user['id']."'");
return $value;
}
function strlen2($str)
{
$rus=array('й','ц','у','к','е','н','г','ш','щ','з','х','ъ','ф','ы','в','а','п','р','о','л','д','ж','э','я','ч','с','м','и','т','ь','б','ю','Й','Ц','У','К','Е','Н','Г','Ш','Щ','З','Х','Ъ','Ф','Ы','В','А','П','Р','О','Л','Д','Ж','Э','Я','Ч','С','М','И','Т','Ь','Б','Ю');
return strlen(str_replace($rus, '0', $str));
}
function rating($rating)
{
$g=floor($rating/1000000000);
$m=floor($rating/1000000);
$k=floor($rating/1000);
if($g!=0)
{
$g=$rating/1000000000;
$rating=round($g,1);
$rating="$rating g";
}
elseif($m!=0)
{
$m=$rating/1000000;
$rating=round($m,1);
$rating="$rating m";
}
elseif($k!=0)
{
$k=$rating/1000;
$rating=round($k,1);
$rating="$rating k";
}
else $rating=(int)$rating;
return "$rating";
}
function vremja($time=NULL)
{
global $user;
if ($time==NULL)$time=time();
if (isset($user))$time=$time+$user['set_timesdvig']*60*60;
$timep="".date("j M Y в H:i", $time)."";
$time_p[0]=date("j n Y", $time);
$time_p[1]=date("H:i", $time);
if ($time_p[0]==date("j n Y"))$timep=date("H:i:s", $time);
if (isset($user)){
if ($time_p[0]==date("j n Y", time()+$user['set_timesdvig']*60*60))$timep=date("H:i:s", $time);
if ($time_p[0]==date("j n Y", time()-60*60*(24-$user['set_timesdvig'])))$timep="Вчера в $time_p[1]";}
else{
if ($time_p[0]==date("j n Y"))$timep=date("H:i:s", $time);
if ($time_p[0]==date("j n Y", time()-60*60*24))$timep="Вчера в $time_p[1]";}
$timep=str_replace("Jan","Янв",$timep);
$timep=str_replace("Feb","Фев",$timep);
$timep=str_replace("Mar","Марта",$timep);
$timep=str_replace("May","Мая",$timep);
$timep=str_replace("Apr","Апр",$timep);
$timep=str_replace("Jun","Июня",$timep);
$timep=str_replace("Jul","Июля",$timep);
$timep=str_replace("Aug","Авг",$timep);
$timep=str_replace("Sep","Сент",$timep);
$timep=str_replace("Oct","Окт",$timep);
$timep=str_replace("Nov","Ноября",$timep);
$timep=str_replace("Dec","Дек",$timep);
return $timep;
}
function smile($text)
{
$sm = mysql_query("SELECT `name`, `path` FROM `mystyle_smile`");
while($as = mysql_fetch_assoc($sm)) {
$text = strtr($text, array(
''.$as['name'].''=>'<img src="/'.$as['path'].'" alt=""/>'));
}
return $text;
}
function shop_album($field,$value,$field2,$value2,$field3,$value3,$field4,$value4)
{
global $user;
mysql_query("INSERT INTO `mystyle_album` SET `".$field."` = '".$value."', `".$field2."` = '".$value2."', `".$field3."` = '".$value3."', `".$field4."` = '".$value4."'");
return $value;
}
function cena($count)
{
$count=$count+1;
if($count==0)$cena=10;
elseif($count==1)$cena=20;
elseif($count==2)$cena=30;
elseif($count==3)$cena=40;
elseif($count==4)$cena=55;
elseif($count==5)$cena=70;
elseif($count==6)$cena=95;
elseif($count==7)$cena=120;
elseif($count==8)$cena=150;
elseif($count==9)$cena=200;
elseif($count>=10 && $count<=12)$cena=500;
elseif($count>=13 && $count<=20)$cena=1000;
else $cena=100000;
return $cena;
}
function update_dom($field,$value,$field1,$value1)
{
global $user;
mysql_query("UPDATE `mystyle_house` SET `".$field."` = '".$value."' WHERE `".$field1."` = '".$value1."' AND `user` = '".$user['id']."'");
return $value;
}
function update_doms($field,$value)
{
global $user;
mysql_query("UPDATE `mystyle_domik` SET `".$field."` = '".$value."' WHERE `user` = '".$user['id']."'");
return $value;
}
function update_domq($field,$value)
{
global $user;
$user_domik = mysql_fetch_array(mysql_query("SELECT * FROM `mystyle_domik` WHERE `user` = '".$user['id']."'"));
mysql_query("UPDATE `mystyle_domik` SET `".$field."` = '".($user_domik[''.$field.'']+$value)."' WHERE `user` = '".$user['id']."'");
return $value;
}
function update_accelerator_update($field,$value,$field2,$value2,$field3,$value3,$field4,$value4,$field5,$value5,$field6,$value6,$field7,$value7)
{
global $user;
mysql_query("UPDATE `mystyle_accelerator_user` SET `".$field."` = '".$value."', `".$field2."` = '".$value2."', `".$field3."` = '".$value3."', `".$field4."` = '".$value4."', `".$field5."` = '".$value5."', `".$field6."` = '".$value6."', `".$field7."` = '".$value7."' WHERE `user` = '".$user['id']."'");
return $value;
}
function update_accelerator($field,$value,$field2,$value2,$field3,$value3,$field4,$value4,$field5,$value5,$field6,$value6,$field7,$value7)
{
global $user;
mysql_query("INSERT INTO `mystyle_accelerator_user` SET `".$field."` = '".$value."', `".$field2."` = '".$value2."', `".$field3."` = '".$value3."', `".$field4."` = '".$value4."', `".$field5."` = '".$value5."', `".$field6."` = '".$value6."', `".$field7."` = '".$value7."'");
return $value;
}
function update_toy_update($field,$value,$field2,$value2,$field3,$value3,$field4,$value4,$field5,$value5,$field6,$value6,$field7,$value7)
{
global $user;
mysql_query("UPDATE `mystyle_toy_user` SET `".$field."` = '".$value."', `".$field2."` = '".$value2."', `".$field3."` = '".$value3."', `".$field4."` = '".$value4."', `".$field5."` = '".$value5."', `".$field6."` = '".$value6."', `".$field7."` = '".$value7."' WHERE `user` = '".$user['id']."'");
return $value;
}
function update_toy($field,$value,$field2,$value2,$field3,$value3,$field4,$value4,$field5,$value5,$field6,$value6,$field7,$value7)
{
global $user;
mysql_query("INSERT INTO `mystyle_toy_user` SET `".$field."` = '".$value."', `".$field2."` = '".$value2."', `".$field3."` = '".$value3."', `".$field4."` = '".$value4."', `".$field5."` = '".$value5."', `".$field6."` = '".$value6."', `".$field7."` = '".$value7."'");
return $value;
}
function update_food_update($field,$value,$field2,$value2,$field3,$value3,$field4,$value4,$field5,$value5,$field6,$value6,$field7,$value7)
{
global $user;
mysql_query("UPDATE `mystyle_food_user` SET `".$field."` = '".$value."', `".$field2."` = '".$value2."', `".$field3."` = '".$value3."', `".$field4."` = '".$value4."', `".$field5."` = '".$value5."', `".$field6."` = '".$value6."', `".$field7."` = '".$value7."' WHERE `user` = '".$user['id']."'");
return $value;
}
function update_food($field,$value,$field2,$value2,$field3,$value3,$field4,$value4,$field5,$value5,$field6,$value6,$field7,$value7)
{
global $user;
mysql_query("INSERT INTO `mystyle_food_user` SET `".$field."` = '".$value."', `".$field2."` = '".$value2."', `".$field3."` = '".$value3."', `".$field4."` = '".$value4."', `".$field5."` = '".$value5."', `".$field6."` = '".$value6."', `".$field7."` = '".$value7."'");
return $value;
}
function update_log($field,$value,$field2,$value2,$field3,$value3)
{
mysql_query("INSERT INTO `mystyle_log` SET `".$field."` = '".$value."', `".$field2."` = '".$value2."', `".$field3."` = '".$value3."'");
return $value;
}
function update_frend($field,$value)
{
global $user;
mysql_query("UPDATE `mystyle_frend` SET `".$field."` = '".$value."' WHERE `user` = '".$user['id']."'");
return $value;
}
function update_payment($field,$value,$field2,$value2,$field3,$value3,$field4,$value4)
{
mysql_query("INSERT INTO `mystyle_payment` SET `".$field."` = '".$value."', `".$field2."` = '".$value2."', `".$field3."` = '".$value3."', `".$field4."` = '".$value4."'");
return $value;
}
function update_payment_user($field,$value,$field2,$value2,$field3,$value3,$field4,$value4)
{
mysql_query("INSERT INTO `mystyle_payment_user` SET `".$field."` = '".$value."', `".$field2."` = '".$value2."', `".$field3."` = '".$value3."', `".$field4."` = '".$value4."'");
return $value;
}
function delete_things($field,$value)
{
global $user;
mysql_query("DELETE FROM `mystyle_things` WHERE `".$field."` = '".$value."' AND `user` = '".$user['id']."'");
return $value;
}
function update_podval($field,$value,$field2,$value2,$field3,$value3,$field4,$value4,$field5,$value5,$field6,$value6,$field7,$value7)
{
mysql_query("INSERT INTO `mystyle_podval` SET `".$field."` = '".$value."', `".$field2."` = '".$value2."', `".$field3."` = '".$value3."', `".$field4."` = '".$value4."', `".$field5."` = '".$value5."', `".$field6."` = '".$value6."', `".$field7."` = '".$value7."'");
return $value;
}
function time_lefts($tl)
{
$d=3600*24;
$day=floor($tl/$d);
$tl=$tl-($d*$day);
$hour=floor($tl/3600);
$tl=$tl-(3600*$hour);
$minute=floor($tl/60);
$tl=$tl-(60*$minute);
$second=floor($tl);
$dayt="".($day>0?"$day":null)."";
$hourt="".($hour>0?"$hour00":null)."";
$minutet="".($minute>0?"$minute":null)."";
$secondt="".($second>0?"$second":null)."";
if($day>0)
{
$minutet=NULL;
$secondt=NULL;
}
if($hour>0 && $day==0)
{
$secondt=NULL;
$dayt=NULL;
}
return "$dayt$hourt$minutet";
}
function insert_webmoney_user($field,$value,$field2,$value2,$field3,$value3,$field4,$value4,$field5,$value5,$field6,$value6)
{
mysql_query("INSERT INTO `mystyle_webmoney_user` SET `".$field."` = '".$value."', `".$field2."` = '".$value2."', `".$field3."` = '".$value3."', `".$field4."` = '".$value4."', `".$field5."` = '".$value5."', `".$field6."` = '".$value6."'");
return $value;
}
function insert_podval_user($field,$value,$field2,$value2,$field3,$value3,$field4,$value4)
{
mysql_query("INSERT INTO `mystyle_podval_user` SET `".$field."` = '".$value."', `".$field2."` = '".$value2."', `".$field3."` = '".$value3."', `".$field4."` = '".$value4."'");
return $value;
}
function update_podval_user($field,$value,$field2,$value2,$field3,$value3,$field4,$value4)
{
global $user;
mysql_query("UPDATE `mystyle_podval_user` SET `".$field."` = '".$value."', `".$field2."` = '".$value2."', `".$field3."` = '".$value3."' WHERE `".$field4."` = '".$value4."' AND `user` = '".$user['id']."'");
return $value;
}
function delete_podval($field,$value)
{
global $user;
mysql_query("DELETE FROM `mystyle_podval` WHERE `".$field."` = '".$value."' AND `user` = '".$user['id']."'");
return $value;
}
function update_web_user($field,$value,$field2,$value2)
{
mysql_query("UPDATE `mystyle_webmoney_user` SET `".$field."` = '".$value."' WHERE `".$field2."` = '".$value2."'");
return $value;
}
function update_user_web($field,$value,$field2,$value2)
{
mysql_query("UPDATE `mystyle_user` SET `".$field."` = '".$value."' WHERE `".$field2."` = '".$value2."'");
return $value;
}
?>