Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <style type="text/css">
- #border {
- padding: 1px;
- border: 1px solid #000000;
- background-color: #FFFFFF;
- width: 170px;
- height: 170px;
- }
- #showname-times {
- font-familly: Tahoma, Geneva, sans-serif;
- font-size: 12px;
- color: #333333;
- width: 170px;
- height: auto;
- }
- a:link {
- color: #333;
- text-decoration: none;
- }
- a:visited {
- text-decoration: none;
- color: #333;
- }
- a:hover {
- text-decoration: none;
- color: #CAF00E;
- }
- a:active {
- text-decoration: none;
- color: #333;
- }
- </style>
- <?php
- // connect to database
- $db_host = "localhost";
- $db_pass = "onair";
- $db_user = "thepurea_onair";
- $db_name = "thepurea_onair";
- mysql_connect($db_host, $db_user, $db_pass) or die(mysql_error());
- mysql_select_db($db_name);
- // this gets the HOUR of the day
- $sTime = date("H:00");
- // query the database
- $query = mysql_query("SELECT * FROM sunday WHERE startTime = '{$sTime}'") or die(mysql_error());
- // check to see if someone started at the start of the hour
- $num_rows = mysql_num_rows($query);
- // if it is zero (nobody starts) then tell people that
- if($num_rows == 0){
- echo$image = $rows['image'];
- } else {
- // someone does start, so fetch the rows!
- $rows = mysql_fetch_array($query);
- $image = $rows['image'];
- $username = $rows['username'];
- $profile = $rows['profile'];
- $startTime = $rows['startTime'];
- $endTime = $rows['endTime'];
- }
- ?>
- <div id="border">
- <a href="<?php echo$username = $rows['profile']; ?>.php"><img src="<?php echo$image = $rows['image']; ?>" border="0px" /></a></br>
- </div>
- <font face="Tahoma">
- <strong>
- <div id="showname-times">
- <center>
- <a href="<?php echo$username = $rows['profile']; ?>.php"><?php echo$username = $rows['username']; ?></a></br>
- <?php echo$startTime = $rows['startTime']; echo(" - "); echo$startTime = $rows['endTime']; ?>
- </center>
- </div>
- </strong>
- </font>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement