<?php

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


        // ------------------------------------------------------
        // The salon 'Services' page
        // ------------------------------------------------------
    
    
    page_header( "Services", $cxn );
    
    
    show_main_menu();

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

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

    echo gray( "SERVICES" );
    
    echo "<br><br>";

    echo "<table style='font-family: georgia; font-size: 11pt'>";


    $query = "SELECT MAX(number) as max_item FROM services WHERE description <> '' AND description is not NULL";
    
	$result = run_query( $query, $cxn );

	$data = get_row( $result );	
    
    $max_item = $data['max_item'];


    for ($i=1; $i <= $max_item; $i++)
    {
        $query = "SELECT * FROM services WHERE number = ".$i;
        
		$result = run_query( $query, $cxn );

		$data = get_row( $result );	

        if ($data['heading_bold'] == "on")
            echo "<tr><td width='90%' colspan='2' class='general_heading'><b>".$data['description']."</b></td><td width='10%'>&nbsp;</td></tr>";
        else
        if ($data['description'] == "")
            echo "<tr><td>&nbsp;</td></tr>";
        else
        {
            echo "<tr><td class='general_text'>".$data['description']."</td>";
            
            if ($data['price'] != "")
            {
                if (substr( $data['price'], strlen($data['price'])-3, 3) == ".00")
                    echo "<td class='general_text' align='right'>$".substr( $data['price'], 0, strlen($data['price'])-3)."</td></tr>";
                else
                    echo "<td class='general_text' align='right'>$".$data['price']."</td></tr>";
            }
            else
                echo "<td class='general_text' align='right'></td></tr>";
        }
    }
    
    echo "</table>";
    
    
//    include "services_text.php";
    
    
    if (! low_res_screen())
        echo "</td><td width='60%'>&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 );
    
    
    
?>    