Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- require_once 'facebook.php';
- $appapikey = '529cb94b360b3818cc512e7a2ee9f1ea';
- $appsecret = '9b386b7199045dcbf6fb32731438bfbd';
- $facebook = new Facebook($appapikey, $appsecret);
- $user_id = $facebook->require_login();
- $_SESSION['ID']=$user_id;
- $ID=$_SESSION['ID'];
- echo <<<START
- <html>
- <head>
- <link rel="stylesheet" type="text/css" href="background3.css" />
- <link rel="stylesheet" type="text/css" href="navmenu.css" />
- <style>
- .meter1
- {
- width:250px;
- height:20px;
- border:2px solid #000;
- background:#000;
- }
- .health1
- {
- height:20px;
- background:#0000FF;
- }
- .meter2
- {
- width:250px;
- height:20px;
- border:2px solid #000;
- background:#000;
- }
- .health2
- {
- height:20px;
- background:#FF0000;
- }
- .meter3
- {
- width:250px;
- height:20px;
- border:2px solid #000;
- background:#000;
- }
- .health3
- {
- height:20px;
- background:#20B2AA;
- }
- .meter4
- {
- width:250px;
- height:20px;
- border:2px solid #000;
- background:#000;
- }
- .health4
- {
- height:20px;
- background:#008000;
- }
- </style>
- <script type="text/javascript">
- function validate_required(field,alerttxt)
- {
- with (field)
- {
- if (value==null||value==""||value==" "||value==" ")
- {alert(alerttxt);return false;}
- else {return true}
- }
- }
- function validate_form(thisform)
- {
- with (thisform)
- {
- if (validate_required(heroname,"Your character must have a valid name!")==false)
- {heroname.focus();return false;}
- }
- }
- </script>
- </head>
- <body>
- START;
- include("connect.php");
- $result = mysql_query("SELECT * FROM Heroes WHERE UserID='$ID'");
- if (!$result) { die( mysql_error());}
- else
- {
- $num_rows = mysql_num_rows($result);
- if ($num_rows > 0)
- {
- include("navmenu.php");
- include("check.php");
- include("herostats1.php");
- include("updates.php");
- }
- else
- {
- include("characterform.php");
- }
- }
- mysql_close($con);
- echo <<<FINISH
- </body>
- </html>
- FINISH;
- ?>
Add Comment
Please, Sign In to add comment