Guest User

Untitled

a guest
May 27th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.92 KB | None | 0 0
  1. <?php
  2.  
  3. session_start();
  4.  
  5. require_once 'facebook.php';
  6.  
  7. $appapikey = '529cb94b360b3818cc512e7a2ee9f1ea';
  8. $appsecret = '9b386b7199045dcbf6fb32731438bfbd';
  9. $facebook = new Facebook($appapikey, $appsecret);
  10. $user_id = $facebook->require_login();
  11.  
  12. $_SESSION['ID']=$user_id;
  13. $ID=$_SESSION['ID'];
  14.  
  15. echo <<<START
  16. <html>
  17.  
  18. <head>
  19.  
  20. <link rel="stylesheet" type="text/css" href="background3.css" />
  21. <link rel="stylesheet" type="text/css" href="navmenu.css" />
  22.  
  23. <style>
  24. .meter1
  25. {
  26. width:250px;
  27. height:20px;
  28. border:2px solid #000;
  29. background:#000;
  30. }
  31. .health1
  32. {
  33. height:20px;
  34. background:#0000FF;
  35. }
  36. .meter2
  37. {
  38. width:250px;
  39. height:20px;
  40. border:2px solid #000;
  41. background:#000;
  42. }
  43. .health2
  44. {
  45. height:20px;
  46. background:#FF0000;
  47. }
  48. .meter3
  49. {
  50. width:250px;
  51. height:20px;
  52. border:2px solid #000;
  53. background:#000;
  54. }
  55. .health3
  56. {
  57. height:20px;
  58. background:#20B2AA;
  59. }
  60. .meter4
  61. {
  62. width:250px;
  63. height:20px;
  64. border:2px solid #000;
  65. background:#000;
  66. }
  67. .health4
  68. {
  69. height:20px;
  70. background:#008000;
  71. }
  72.  
  73. </style>
  74.  
  75. <script type="text/javascript">
  76.  
  77. function validate_required(field,alerttxt)
  78. {
  79. with (field)
  80. {
  81. if (value==null||value==""||value==" "||value==" ")
  82. {alert(alerttxt);return false;}
  83. else {return true}
  84. }
  85. }
  86.  
  87. function validate_form(thisform)
  88. {
  89. with (thisform)
  90. {
  91. if (validate_required(heroname,"Your character must have a valid name!")==false)
  92. {heroname.focus();return false;}
  93. }
  94. }
  95. </script>
  96.  
  97. </head>
  98.  
  99. <body>
  100. START;
  101.  
  102. include("connect.php");
  103.  
  104. $result = mysql_query("SELECT * FROM Heroes WHERE UserID='$ID'");
  105.  
  106. if (!$result) { die( mysql_error());}
  107. else
  108. {
  109. $num_rows = mysql_num_rows($result);
  110. if ($num_rows > 0)
  111. {
  112. include("navmenu.php");
  113. include("check.php");
  114. include("herostats1.php");
  115. include("updates.php");
  116. }
  117. else
  118. {
  119. include("characterform.php");
  120. }
  121. }
  122.  
  123. mysql_close($con);
  124.  
  125. echo <<<FINISH
  126. </body>
  127. </html>
  128. FINISH;
  129.  
  130. ?>
Add Comment
Please, Sign In to add comment