View file gta/bands/vstup.php

File size: 3.23Kb
  1. <?php
  2. #####################################################
  3. # mod by -=LesNIK=- #
  4. # icq 366244181 #
  5. # Официальный сайт мода http://wenz.net.ru #
  6. # все ответы на вопросы и помощь по скрипту #
  7. # вы можете получить только там! #
  8. # #
  9. # Вы не имеете право вносить #
  10. # свои изменения в данный мод!#
  11. # #
  12. # Уважайте труд автора! #
  13. #####################################################
  14.  
  15.  
  16. include "./../ini3.php";
  17. include "./../includes/header2.php";
  18. include "./../includes/inc_online.php";
  19. print "<p><small>";
  20.  
  21. $id=cyr(htmlspecialchars(stripslashes(trim($id))));
  22. $pass=cyr(htmlspecialchars(stripslashes(trim($pass))));
  23. $band=cyr(htmlspecialchars(stripslashes(trim(urldecode($band)))));
  24.  
  25. if(!empty($id))
  26. {
  27. $q = mysql_query("select id,login,pass from users where id='".$id."';");
  28. $data = mysql_fetch_array($q);
  29. $id=$data['id'];
  30. $login=$data['login'];
  31. }
  32. else
  33. {
  34. die ($lang['empty_login']."</small></p></card></wml>");
  35. }
  36.  
  37. if(!empty($band))
  38. {
  39.  
  40. $db=mysql_fetch_array(mysql_query("select boss from bands where name='".$band."';"));
  41. $db2=mysql_fetch_array(mysql_query("select id,pass from users where login='".$db['boss']."';"));
  42. $dbid=$db2['id'];
  43. $dbpass=$db2['pass'];
  44. }
  45. else
  46. {
  47. die ($lang['bands_band_not_chosen']."</small></p></card></wml>");
  48. }
  49.  
  50.  
  51. if($pass!=$data['pass'])
  52. {
  53. die ($lang['empty_login']."</small></p></card></wml>");
  54. }
  55.  
  56. mysql_query("update users set last='".time()."',city='0' where id='".$id."';");
  57.  
  58. if(!empty($a))
  59. {
  60. if(empty($messaga)) print $lang['bands_where_offer']."<br/>";
  61. else
  62. {
  63. $predl_que=mysql_query("select komu from messagi where kto='$id' and komu='$dbid';");
  64. $predl_data = mysql_fetch_array($predl_que);
  65. if(!empty($predl_data['komu'])) print $lang['patience']."<br/>";
  66. else
  67. {
  68. $messaga=cyr(htmlspecialchars(stripslashes(trim($messaga))));
  69. $messaga="<b>".$lang['bands_request_from']." $login</b><br/>".$messaga."<br/>[<a href=\"./../bands/band_panel.php?pass=$dbpass&amp;id=$dbid&amp;dbid=$id&amp;mode=new_member&amp;a=b\">".$lang['yes']."</a>/<a href=\"./../mes.php?pass=$dbpass&amp;id=$dbid&amp;dbid=$id&amp;mode=del\">".$lang['no']."</a>]";
  70. print $lang['bands_request_put_to_boss']."<br/>";
  71. mysql_query("insert into messagi values(0,'$id','$dbid','$messaga');");
  72. }
  73. }
  74. }
  75. else
  76. {
  77. print $lang['bands_you_can_enter1']." <b>$band</b>, ".$lang['bands_you_can_enter2']."<br/>";
  78. print $lang['bands_write_you_req']."</small><br/>";
  79. echo "<form method='post' action='vstup.php?id=$id&amp;dbid=$dbid&amp;pass=$pass'>";
  80.  
  81.  
  82. echo "<postfield name=\"nazv\" value=\"$(messaga)\"/>
  83. <postfield name=\"band\" value=\"$band\"/>
  84. <postfield name=\"a\" value=\"b\"/><br/>";
  85. echo "<input type='text' name='messaga' value='$messaga' /><br/>";
  86. echo "<input type='submit' name='ok' value='".$lang['ok']."' /><br/>
  87. </form>";
  88. }
  89.  
  90. print "---<br/>&gt;<anchor>".$lang['back']."<prev/></anchor><br/>";
  91. print "&gt;&gt;<a href=\"./../game.php?id=$id&amp;pass=$pass\">".$lang['menu']."</a><br/>";
  92.  
  93. mysql_close();
  94. include "./../includes/footer.php";
  95. ?>