Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- $firstname = $_SESSION['firstname'];
- $lastname = $_SESSION['lastname'];
- $email1 = $_SESSION['email'];
- $inactive = 60;
- // check to see if $_SESSION["timeout"] is set
- if (isset($_SESSION["timeout"])) {
- // calculate the session's "time to live"
- $sessionTTL = time() - $_SESSION["timeout"];
- if ($sessionTTL > $inactive) {
- session_destroy();
- header("Location: /index.html");
- }
- }
- $_SESSION["timeout"] = time();
- ?>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <!-- meta -->
- <meta http-equiv="content-type" content="text/html; charset=utf-8" />
- <meta http-equiv="Expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
- <meta http-equiv="Pragma" content="no-cache" />
- <link rel="stylesheet" href="css/ui-lightness/jquery-ui-1.8.22.custom.css">
- <link rel ="stylesheet" type ="text/css" href ="css/style.css">
- <script src="js/jquery.js"></script>
- <script src="js/jquery-ui.js"></script>
- <link rel="stylesheet" href="development-bundle/demos.css">
- <style>
- body { font-size: 62.5%; }
- label, input { display:block; }
- input.text { margin-bottom:12px; width:95%; padding: .4em; }
- fieldset { padding:0; border:0; margin-top:25px; }
- h1 { font-size: 1.2em; margin: .6em 0; }
- .ui-dialog .ui-state-error { padding: .3em; }
- .validateTips { border: 1px solid transparent; padding: 0.3em; }
- </style>
- <!-- title -->
- <title> Report selection </title>
- <link rel="shortcut icon" type="image/x-icon" href="images/base.gif" />
- <!-- css -->
- <link rel="stylesheet" href="css/main.css" type="text/css" media="screen, projection" />
- </head>
- <body>
- <!-- begin container to center layout in middle of page -->
- <div id="container">
- <!-- begin header which contains our heading and navigation -->
- <div id="header">
- <h1> <img src="images/main_logo.png" border="1" style="position:relative;left:-35px;top:8px;" /> </h1>
- <!-- begin navigation -->
- <div id="nav">
- <ul class="clearfix">
- </ul>
- </div><!-- end navigation -->
- </div><!-- end header -->
- <!-- begin content which houses our two columns and footer -->
- <div id="content" class="clearfix">
- <div id="main"><div id="main-inner">
- <br>
- <font size = '4'; face = 'calibri'; color='blue'> <center> <i> <a style='position:relative;left:26px;top:20px'> Choose an option to view the report </a> </i> </center> </font>
- <br><br>
- <tr>
- <form name = 'select_environment' method = 'POST' action = './nav_admin.php'>
- <td>
- <tr>
- <?php
- $host=****;
- $username=****;
- $password=*****;
- $database=******;
- $connection=mysql_connect(***,***,***);
- mysql_connect($host,$username,$password);
- @mysql_select_db($database) or die( "Unable to select database");
- $sql="SELECT company FROM admin WHERE (email = '".$email1."' )";
- $result_type = mysql_query($sql,$connection) or die(mysql_error());
- $env = $row['company'];
- ?>
- </tr>
- <select name='env_select' id = 'env_select' style = 'position:relative;left:240px;top:35px;'>
- <?php
- while ($row = mysql_fetch_assoc($result_type))
- {
- echo "<option value = '" .$row['company']."' >".$row['company']."</option>";
- }
- ?>
- </select>
- <br /><br><br>
- <input type='submit' name='view' id='view' value='View' onClick= './nav_admin.php' style = 'position:relative;left:260px;top:38px;'>
- </table>
- </form>
- </td></tr>
- </table>
- <br> <br> <br>
- </div></div><!-- end main column -->
- <!-- begin side column -->
- <div id="side"><div id="side-inner">
- <tr>
- <img src="images/logo1.png" alt="H" class="img-right" />
- <br> <br><br><br>
- <br>
- </tr>
- <tr> </tr>
- <p style= "color:#153E7E;font-size:14pt;font-family:calibri;font-align:justify;"> ***** </p>
- </div></div><!-- end side column -->
- <!-- begin footer -->
- <div id="footer">
- <p>*********</p>
- </div><!-- end footer -->
- </div><!-- end content -->
- </div><!-- end container -->
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement