/* delete event */ function delete_event(show_id) { //do ajax var req = new Ajax(' action.php?delete=' + show_id,{ method: 'get', onComplete: function() { //do the fade out var fade = new Fx.Style($('show-row-' + show_id),'opacity', { duration: 600, onComplete:function() { $('show-row-' + show_id).remove(); } }).start(1,0); } }).request(); return 0; }
/* submit/edit */ function submit_update() { //set the message $('update-message').setText('Show information submitted.');
//validate, of course var required_fields = ['date_starts', 'stime', 'venue', 'city', 'state']; var errors = 0; required_fields.each(function(field) { if($(field).value == '') { $(field).addClass('input-error'); errors++;} else { $(field).removeClass('input-error'); } });
//validDate /* var split = ($('date_starts').value).split('-'); var today = new Date(); var odate = new Date().setFullYear(split[2],split[0],split[1]); if(today > odate) { $('date_starts').addClass('input-error'); errors++; } */
I want events that are entered on the same day to be listed am first and then pm regardless of the order we enter them.
It seems to order them randomly. Im sure it doesn't but I can't figure it out.
Does anyone know what I'm talking about? Can you point me in the right direction?
If you post the relevant code that is creating the event listing I can have a look.
I am going to post the two files that I think make it work. Please let me know if I am missing something.
The schedule is subject to change. Please call before driving a long distance.
<?php if($_SERVER['QUERY_STRING'] == 'failed' && !$_SESSION['admin']) { ?>
Your sign in has failed. Please try again.
<?php } ?>
<?php echo $table; ?>
<?php if(!$_SESSION['admin']) { ?>
<?php } else { ?>
Sign Out
<?php } ?>
<?php if($_SESSION['admin']) { ?>
Add Show
<?php } ?>
<?php include "footer.php" ?>
<?php include "flir.php" ?>