else { $('#toggle-wrapper').click(function() { $('.debug').toggle(); }); } }); </script> </head> <body id="edit"> <? include ("../hours.class.php"); include ("admin.class.php"); include ("nav.php"); $hours = new Hours(); $admin = new HoursAdmin(); if (is_array($_REQUEST['action'])) { if (in_array('delete_timeframe',$_REQUEST['action'])) { if ($hours->DeleteTimeframe($_REQUEST['timeframe_id'])) { print '<h2>Success: Timeframe deleted</h2>'; } else { print '<h2 class="error">Error: Could not delete timeframe</h2>'; } } else { $preset_id = ''; if (in_array('submit_new_preset', $_REQUEST['action'])) { $preset_id = $hours->UpdatePreset(json_encode($_REQUEST)); }
<? include ('../hours.class.php'); include ('admin.class.php'); $hours = new Hours; $admin = new HoursAdmin; if (isset($_REQUEST['action'])) { switch ($_REQUEST['action']) { case 'show-timeframe': $details = $hours->GetTimeframeDetails($_REQUEST['timeframe_id']); print ($admin->EditTimeframeDetails($details,$hours,$_REQUEST['id'])); break; case 'new-timeframe': print ($admin->EditTimeframeDetails($details,$hours,$_REQUEST['id'])); break; case 'show-preset': if ($_REQUEST['id'] == 'new') { $details = $hours->GetSettingsDetails($_REQUEST['id']); print ($admin->ShowPresetDetails($details, $_REQUEST['id'],"edit")); } // $details = $hours->GetTimeframeDetails($_REQUEST['id']); else { $details = $hours->GetSettingsDetails($_REQUEST['id']); print ($admin->ShowPresetDetails($details, $_REQUEST['id'],"show")); } break; case 'edit-preset': $details = $hours->GetSettingsDetails($_REQUEST['id']); print ($admin->ShowPresetDetails($details, $_REQUEST['id'],"edit")); } }
//Delete selected $('#DeleteSelectedButton').button().click(function () { var $selectedRows = $('#ExceptionsTableContainer').jtable('selectedRows'); $('#ExceptionsTableContainer').jtable('deleteRows', $selectedRows); }); }); </script> <div id="DeleteSelectedButton">Delete Selected Rows</div> <? require_once('admin.class.php'); require_once('../hours.class.php'); $hours = new Hours(); $admin = new HoursAdmin(); $times = $hours->GetTimeframesAndRanks(); $exceptions = $hours->getJSON('exceptions'); $graphJS = $admin->BuildGraphJS($times,$exceptions); print $graphJS; ?> <h2 style="text-align:center">Timeline of Date Settings by Rank</h2> <div class="flot-container"> <div id="placeholder" class="flot-placeholder"></div> </div> </body> </html>