Просмотр файла bands/vstup.php

Размер файла: 2.52Kb
  1. <?php
  2. include "./../ini.php";
  3. include "./../includes/header.php";
  4. include "./../includes/inc_online.php";
  5. print "<p><small>";
  6.  
  7. $id=cyr(htmlspecialchars(stripslashes(trim($id))));
  8. $pass=cyr(htmlspecialchars(stripslashes(trim($pass))));
  9. $band=cyr(htmlspecialchars(stripslashes(trim(urldecode($band)))));
  10.  
  11. if(!empty($id))
  12. {
  13. $q = mysql_query("select id,login,pass from users where id='".$id."';");
  14. $data = mysql_fetch_array($q);
  15. $id=$data['id'];
  16. $login=$data['login'];
  17. }
  18. else
  19. {
  20. die ($lang['empty_login']."</small></p></card></wml>");
  21. }
  22.  
  23. if(!empty($band))
  24. {
  25.  
  26. $db=mysql_fetch_array(mysql_query("select boss from bands where name='".$band."';"));
  27. $db2=mysql_fetch_array(mysql_query("select id,pass from users where login='".$db['boss']."';"));
  28. $dbid=$db2['id'];
  29. $dbpass=$db2['pass'];
  30. }
  31. else
  32. {
  33. die ($lang['bands_band_not_chosen']."</small></p></card></wml>");
  34. }
  35.  
  36.  
  37. if($pass!=$data['pass'])
  38. {
  39. die ($lang['empty_login']."</small></p></card></wml>");
  40. }
  41.  
  42. mysql_query("update users set last='".time()."',city='0' where id='".$id."';");
  43.  
  44. if(!empty($a))
  45. {
  46. if(empty($messaga)) print $lang['bands_where_offer']."<br/>";
  47. else
  48. {
  49. $predl_que=mysql_query("select komu from messagi where kto='$id' and komu='$dbid';");
  50. $predl_data = mysql_fetch_array($predl_que);
  51. if(!empty($predl_data['komu'])) print $lang['patience']."<br/>";
  52. else
  53. {
  54. $messaga=cyr(htmlspecialchars(stripslashes(trim($messaga))));
  55. $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>]";
  56. print $lang['bands_request_put_to_boss']."<br/>";
  57. mysql_query("insert into messagi values(0,'$id','$dbid','$messaga');");
  58. }
  59. }
  60. }
  61. else
  62. {
  63. print $lang['bands_you_can_enter1']." <b>$band</b>, ".$lang['bands_you_can_enter2']."<br/>";
  64. print $lang['bands_write_you_req']."</small><br/>";
  65. print "<input name=\"messaga\" type=\"text\"/><br/><small>";
  66. print "<anchor>".$lang['ok']."
  67. <go href=\"vstup.php?id=$id&amp;dbid=$dbid&amp;pass=$pass\" method=\"post\">
  68. <postfield name=\"messaga\" value=\"$(messaga)\"/>
  69. <postfield name=\"band\" value=\"$band\"/>
  70. <postfield name=\"a\" value=\"b\"/>
  71. </go>
  72. </anchor><br/>";
  73. }
  74.  
  75. print "---<br/>&gt;<anchor>".$lang['back']."<prev/></anchor><br/>";
  76. print "&gt;&gt;<a href=\"./../game.php?id=$id&amp;pass=$pass\">".$lang['menu']."</a><br/>";
  77.  
  78. mysql_close();
  79. include "./../includes/footer.php";
  80. ?>