<?php

	include "library.php";
	
    $cxn = start_code();
    

        //-----------------------------------------------------------------------
        // The salon 'opening hours' page
        //-----------------------------------------------------------------------
    
    
    page_header( "Hours", $cxn );
    
    
    show_main_menu();

    if (! low_res_screen())
        echo "<table width='100%'><tr><td width='20%'>&nbsp;</td><td width='55%'>";
    else
        echo "<table width='100%'><tr><td width='10%'>&nbsp;</td><td width='85%'>";

    echo "<br>";
    echo "<br>";

    echo "<table width='100%'>";
    echo "<tr><td>";
    
    echo gray( "HOURS" );
    
    echo "</td><td></td></tr>";

    echo "<tr><td>";
    
    if (! low_res_screen())
        echo "<table style='border-collapse: collapse;'><tr><td colspan='3' style='width: 250px; border-bottom: 1px solid #555555; font-size: 3pt'>&nbsp;</td></tr>";
    else
        echo "<table style='border-collapse: collapse;'><tr><td colspan='3' style='width: 250px; border-bottom: 1px solid #555555; font-size: 3pt'>&nbsp;</td></tr>";

    echo "</td></tr>";

    echo "<tr><td>";
    
//    echo "<table style='border-collapse: collapse; border-bottom: 3px solid #ffffff'>";

    echo "<tr><td>&nbsp;</td></tr>";

    $query = "SELECT * FROM hours ORDER BY id";
        
	$result = run_query( $query, $cxn );


    for ($i=1; $i <= 7; $i++)
    {
		$data = get_row( $result );	

        echo "<tr><td width='130px' class='general_text'>".$data['description']."</td>";
        
        echo "<td width='120px' class='general_text'>".$data['open_time']."</td><td class='general_text'>".$data['close_time']."</td></tr>";
    }

    echo "</table>";


    if (! low_res_screen())
        echo "</td><td width='25%'>&nbsp;</td></tr>";
    else
        echo "</td><td width='15%'>&nbsp;</td></tr>";
        
    
    echo "</table>";
    
    echo "<br>";
    echo "<br>";
    echo "<br>";
    echo "<br>";
    echo "<br>";
    echo "<br>";
    echo "<br>";

    
//    show_footer( $cxn );
    
    
    
?>