//Buffer larger content areas like the main page content
ob_start();
if($_GET['dia'] && $_GET['dia']>=1 && $_GET['dia']<=7) {
$dia = $_GET['dia']; }
else {
$dia = date("N", time());
}
$username = "singafmc_master";
$password = "19671655";
$dblink = mysql_connect("localhost", $username, $password);
mysql_select_db("singafmc_intranet", $dblink);
mysql_set_charset('utf8', $dblink);
$sql_statement = "SELECT `nome`, `imagem`, `dia_i`, `dia_f`, `hora_i`, DATE_FORMAT(hora_i, '%k:%i') AS hora, `hora_f`, `extra` FROM `programas`, `horarios` WHERE `programas`.`id`=`horarios`.`id_prog` AND `dia_i`<=".$dia." AND `dia_f` >=".$dia." ORDER BY `hora_i`";
$result = mysql_query($sql_statement);
mysql_close();
?>
| PROGRAMAS |
|
| class="top_box" width="85" height="30" align="center">SEG. |
class="top_box" width="85" align="center">TER. |
class="top_box" width="85" align="center">QUA. |
class="top_box" width="85" align="center">QUI. |
class="top_box" width="85" align="center">SEX. |
class="top_box" width="85" align="center">SAB. |
class="top_box" width="85" align="center">DOM. |
|
while($row=mysql_fetch_object($result)) {?>
| echo $row->hora;?>h » echo $row->nome;?> |
echo nl2br($row->extra);?>
|
}?>
|
|
|
//Assign all Page Specific variables
$page_content = ob_get_contents();
ob_end_clean();
$page_title = "Singa FM » Programas";
//Apply the template
include("master.php");
?>