Размер файла: 4.08Kb
- <?php
- #####################################################
- # mod by -=LesNIK=- #
- # icq 366244181 #
- # Официальный сайт мода http://wenz.net.ru #
- # все ответы на вопросы и помощь по скрипту #
- # вы можете получить только там! #
- # #
- # Вы не имеете право вносить #
- # свои изменения в данный мод!#
- # #
- # Уважайте труд автора! #
- #####################################################
-
-
- include "ini3.php";
- include "includes/header2.php";
- include "includes/inc_online.php";
- print "<p>";
-
- $id=cyr(htmlspecialchars(stripslashes(trim($id))));
- $pass=cyr(htmlspecialchars(stripslashes(trim($pass))));
- $dbid=cyr(htmlspecialchars(stripslashes(trim($_GET[dbid]))));
-
- if(!empty($id))
- {
- $q = mysql_query("select id,login,pass from users where id='".mysql_real_escape_string($id)."';");
- }
- else
- {
- die ($lang['empty_login']."</small></p></card></wml>");
- }
-
- if($dbid!=0)
- {
- if(!empty($dbid))
- {
- $qdb = mysql_query("select id,login,pass from users where id='".mysql_real_escape_string($dbid)."';");
- }
- else
- {
- die ($lang['select_user_false']."</small></p></card></wml>");
- }
- }
- $data = mysql_fetch_array($q);
-
- $id=$data['id'];
- $login=$data['login'];
-
- if($dbid!=0)
- {
- $dbdata = mysql_fetch_array($qdb);
- $dblogin=$dbdata['login'];
- $dbpass=$dbdata['pass'];
- }
-
- if($pass!=$data['pass'])
- {
- die ($lang['empty_login']."</small></p></card></wml>");
- }
-
-
-
- mysql_query("update users set last='".time()."',city='0' where id='".$id."';");
-
-
- switch ($mode)
- {
- case "del":
- mysql_query("delete from messagi where kto='".$dbid."' and komu='".$id."' limit 1;");
- print $lang['mes_deleted']."<br/>";
- break;
- case "reply":
- mysql_query("DELETE FROM messagi WHERE kto='".$dbid."' and komu='".$id."' limit 1;");
- if(!empty($a))
- {
- if(empty($messaga)) print $lang['mes_empty']."<br/>";
- else
- {
- $predl_que=mysql_query("select komu from messagi where kto='$id' and komu='$dbid';");
- $predl_data = mysql_fetch_array($predl_que);
- if(!empty($predl_data['komu'])) print $lang['patience']."<br/>";
- else
- {
- print $lang['mes_succes1']." $dblogin ".$lang['mes_succes2']."<br/>";
-
- $messaga=htmlspecialchars(stripslashes(trim($messaga)));
- $messaga="<b>".$lang['mes_mes1']." $login:</b><br/>".$messaga."<br/>[<a href=\"./../mes.php?pass=$dbpass&id=$dbid&dbid=$id&mode=reply\">".$lang['mes_reply']."</a>/<a href=\"./../mes.php?pass=$dbpass&id=$dbid&dbid=$id&mode=del\">".$lang['mes_del']."</a>]";
- mysql_query("insert into messagi values(0,'$id','$dbid','$messaga');");
- }
- }
- }
- else
- {
- print $lang['mes_for']." <b>$dblogin</b>:";
- print "</small><br/>";
- /* print "<input name=\"messaga\" type=\"text\"/><br/><small>";
- print "<anchor>".$lang['ok']."
- <go href=\"mes.php?id=$id&dbid=$dbid&pass=$pass&mode=reply\" method=\"post\">
- <postfield name=\"messaga\" value=\"$(messaga)\"/>
- <postfield name=\"a\" value=\"b\"/>
- </go>
- </anchor><br/>"; */
-
- echo "<form action=\"mes.php?id=$id&dbid=$dbid&pass=$pass&mode=reply\" method=\"post\">
- ";
- print "<input name=\"messaga\" type=\"text\"/><br/><small>";
-
- print "
- <postfield name==\"messaga\" value=\"$(messaga)\"/>
- <input type=\"hidden\" name=\"a\" value=\"b\"/>
-
- <input class=\"ibutton\" type=\"submit\" value=\"".$lang['ok']."\"/>
- </form>";
- }
- break;
- default:
- print $lang['mes_empty']."<br/></small></p></card></wml>";
- exit;
- break;
- }
-
- $ref=mysql_fetch_array(mysql_query("select refer from refers where userid='".mysql_real_escape_string($id)."';"));
- $link=$ref['refer'];
- if(empty($link))
- print "---<br/>><anchor>".$lang['back']."<prev/></anchor><br/>";
- else
- {
- $link=preg_replace ("'&'", "&", $link);
- print "---<br/>><a href=\"".$link."\">".$lang['back']."</a><br/>";
- }
-
- print ">><a href=\"game.php?id=$id&pass=$pass\">".$lang['menu']."</a><br/>";
-
- mysql_close();
- print "</body>
- </html>";
- ?>