function Delete($id) { $sqlstring = "update calendars set calendar_deletedate = now() where calendar_id = '{$id}'"; $result = mysql_query($sqlstring) or die("Query failed: " . mysql_error() . "<br><i>{$sqlstring}</i><br>"); DisplayList(); }
require 'kashi.php'; /* ----- setup variables ----- */ $action = GetVariable("action"); /* ----- determine which action to take ----- */ switch ($action) { case 'list': DisplayList(); break; case 'summary': DisplaySummary(); break; case 'graph': DisplayGraph(); break; default: DisplayList(); } /* -------------------------------------------- */ /* ------- DisplayStatsMenu ------------------- */ /* -------------------------------------------- */ function DisplayStatsMenu() { ?> <div align="center"> <a href="cluster.php?action=list">List</a> <a href="cluster.php?action=summary">Summary</a> <a href="cluster.php?action=graph">Graph</a> </div> <br><Br> <script> $(function() {
function Delete($id) { $sqlstring = "delete from allocations where alloc_id = '{$id}'"; $result = mysql_query($sqlstring) or die("Query failed: " . mysql_error() . "<br><i>{$sqlstring}</i><br>"); DisplayList(); }
function Edit($id, $username, $groupid, $calendarid, $projectid, $details, $title, $startdatetime, $enddatetime, $isalldayevent, $istimerequest, $currentcal, $repeats, $repeattype, $repeatsun, $repeatmon, $repeattue, $repeatwed, $repeatthu, $repeatfri, $repeatsat, $repeatenddate) { /* check if any form elements are bad, if so redisplay the addform */ if ($name == "") { EditForm("'<b>Calendar Appointment</b>' was blank, original values now displayed", $id); return; } if ($description == "") { EditForm("'<b>Description</b>' was blank, original values now displayed", $id); return; } if ($location == "") { EditForm("'<b>Location</b>' was blank, original values now displayed", $id); return; } /* if we get to this point, its safe to add to the database */ $sqlstring = "update calendars set calendar_name = '{$name}', calendar_description = '{$description}', calendar_location = '{$location}' where calendar_id = '{$id}'"; //echo $sqlstring; $result = mysql_query($sqlstring) or die("Query failed: " . mysql_error() . "<br><i>{$sqlstring}</i><br>"); DisplayList(); }
function Delete($id) { $sqlstring = "update projects set project_enddate = now() where project_id = '{$id}'"; $result = mysql_query($sqlstring) or die("Query failed: " . mysql_error() . "<br><i>{$sqlstring}</i><br>"); DisplayList(); }