Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start(); // Alltid överst på sidan
- // Kolla om inloggad = sessionen satt
- if (!isset($_SESSION['sess_user'])){
- header("Location: index.php");
- exit;
- }
- ?>
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
- <html>
- <head>
- <meta http-equiv="Content-Type"
- content="text/html; charset=iso-8859-1">
- <title>Time Battle - Admin Panel</title>
- </head>
- <body>
- <?php
- include 'include/conn.php';
- include 'include/top.php';
- include "include/if.php";
- $p_id=$r['position_id'];
- $strQuery2 = mysql_query("
- SELECT * FROM position
- WHERE p_id = '$p_id'
- ") or exit(mysql_error());
- $rad = mysql_fetch_array($strQuery2);
- if($rad['p_panel'] == 1){
- //Upddaterar Live
- if ( $_POST['a_live'] )
- {
- $result = mysql_query("UPDATE timebattle SET live='$_POST[a_live]'")
- or die(mysql_error());
- header("Location: admin_panel.php");
- }
- echo "<table border=0>
- <tr>
- <td width=200 valign=top>
- <a href='?live'>Ändra live.</a>
- </td>
- <td>";
- //Forumlär för ändra live
- if (isset($_GET['live'])){
- ?>
- <table width="400" border="0" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
- <tr>
- <form id="form1" name="form1" method="post" action="admin_panel.php?live&ready">
- <td>
- <table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF">
- <tr>
- <td colspan="3" bgcolor="#E6E6E6"><strong><a name="skapa">Ändra Live</a></strong> </td>
- </tr>
- <tr>
- <td valign="top"><strong>Live</strong></td>
- <td valign="top">:</td>
- <td><textarea name="a_live" cols="30" rows="1" id="a_live"></textarea></td>
- </tr>
- <tr>
- <td> </td>
- <td> </td>
- <td>
- <input type="submit" name="Submit" value="Skapa" />
- <input type="reset" name="Submit2" value="Ta bort" /></td>
- <?php
- }
- echo"
- </td>
- </tr>
- </table>";
- }else{
- echo "<script language=\"JavaScript\">\n
- location.href = 'stan.php';
- alert(\"Du får inte vara här\");\n
- </script>";
- }
- include 'include/fotter.php';
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement