Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include("mconfig.php");
- ?>
- <!-- Navigation -->
- <nav class="navbar navbar-default navbar-fixed-top" role="navigation">
- <div class="container">
- <div class="navbar-header page-scroll">
- <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
- <span class="sr-only">Toggle navigation</span>
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- </button>
- <a class="navbar-brand page-scroll" href="/"><?php echo $siteName ?></a>
- </div>
- <!-- Collect the nav links, forms, and other content for toggling -->
- <div class="collapse navbar-collapse navbar-ex1-collapse">
- <ul class="nav navbar-nav">
- <!-- Hidden li included to remove active class from about link when scrolled up past about section -->
- <li class="hidden">
- <a class="page-scroll" href="#page-top"></a>
- </li>
- <li><a href="?id=1">Server #1</a></li>
- <!-- <li><a href="?id=2">Server #2</a></li> -->
- <!-- Uncomment above if you are gonna have multiple servers -->
- </ul>
- <?php
- $dbname = 'ruststats';
- $conn=new mysqli("localhost:3306","root","****","ruststats");
- if($conn->connect_errno)
- {
- echo 'connection failed';
- }
- ?>
- <html>
- <head>
- <meta charset="UTF-8">
- </head>
- <title></title>
- <body>
- <label>Select period</label>
- <select class="dropdownX">
- <option>Select</option>
- <?php
- if($stmt=$conn->query("SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE' AND TABLE_SCHEMA='$dbname' ORDER BY create_time DESC"))
- {
- while($r=$stmt->fetch_array(MYSQLI_ASSOC))
- {
- ?>
- <option value="<?php echo $r['TABLE_NAME'] ?>"><?php echo $r['TABLE_NAME'] ?></option>
- <?php } } ?>
- </select>
- </body>
- </html>
- <script>
- $(".dropdownX").on("change", function() {
- window.location.href = "?period=" + this.value;
- });
- </script>
- </div>
- </div>
- <!-- /.navbar-collapse -->
- <!-- /.container -->
- </nav>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement