<ul class="subsubsub">

<li><a href="<?php echo admin_url('admin.php?page=aow-cip-info'); ?>">Overview</a> |</li>

<li><a href="<?php echo admin_url('admin.php?page=aow-cip-hours'); ?>"><strong>Hours</strong></a></li>

    </ul><br /><br />

    <hr />

<form action="<?php echo admin_url('admin.php?page=aow-cip-hours'); ?>" method="post">

<h2>Clinic Hours Management</h2>



<?php

	global $wpdb;



if (isset($_POST["submit"]) && $_POST["submit"] == "Update"):

$ampm = $_POST['ampmcase'];

$ampmseparator = $_POST['ampmseparator'];

$trailing = $_POST['trailingzero'];

$separator = $_POST['custom_separator'];



			update_option("sc_ampmcase",$ampm);

			update_option("sc_ampmseparator",$ampmseparator);

			update_option("sc_trailingzero",$trailing);

			update_option("sc_separator",$separator);

		endif;

		

		$ampm = get_option("sc_ampmcase");

		$trailing = get_option("sc_trailingzero");

		$separator = get_option("sc_separator");

		$ampmseparator = get_option("sc_ampmseparator");

		

?>



<label for="custom_separator"><strong>Custom Separator:</strong></label>

<br />

<small>You can add spaces in the separator so there is space between the hours.</small>

<br />

<p>4:11PM (separator) 5:00PM</p>

<input id="custom_separator" type="text" name="custom_separator" value="<?php echo $separator; ?>" maxlength="3" placeholder='For example "to"' />

<br />

<label for='ampmseparator'><strong>AM/PM separator</strong></label>

<br />

Do you want a space between the hours and AM/PM?&nbsp; <input type="radio" name='ampmseparator' value='yes' <?php if (isset($ampmseparator) && $ampmseparator == "yes"): ?> checked <?php endif; ?> /> Yes&nbsp; <input type="radio" name="ampmseparator" value="no" <?php if (isset($ampmseparator) && $ampmseparator == "no"): ?> checked <?php endif; ?> /> No

<br />

<small>For example, 7:00 am or 7:00am.</small>

<br />

<br />

<label for="ampm"><strong>Capitalization</strong></label>

<br />

<p><input type="radio" name="ampmcase" value="lowercase" <?php if ($ampm == "lowercase"):?> checked <?php endif; ?> /> Lowercase 8:00am - 5:00pm</p>

<p><input type="radio" name="ampmcase" value="uppercase" <?php if ($ampm == "uppercase"): ?> checked <?php endif; ?> /> Uppercase 8:00AM - 5:00PM</p>

<br /><label for="trailingzero"><strong>Trailing 0's at the top of the hour.</strong></label><br />

<p><input type="radio" name="trailingzero" value="yes" <?php if ($trailing == "yes"): ?> checked <?php endif; ?> /> 5:00PM (5:30PM)</p>

<p><input type="radio" name="trailingzero" value="no" <?php if ($trailing == "no"): ?> checked <?php endif; ?> />  5PM (5:30PM)</p>





<br />

<br />



<br class="clearboth" />

<input class="button action" name="submit" type="submit" value="Update" />

</form>



<h2>Hours Usage</h2>

<p>shortcode for hours: [aow_clinic_hours] accepts a length parameter to control the length of the day name displayed e.g. [aow_clinic_hours length="short"] will display MON, TUE etc and anything else including not setting any parameter will display the full day name MONDAY, TUESDAY etc</p>



<p>Hours Widget: there is an hours widget called "AOW Clinic Hours" that you can add to sidebars. It allows you to choose a heading and select the short or long form for the days of the week.</p>

