示例#1
0
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();
}
示例#2
0
文件: cluster.php 项目: pmolfese/nidb
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> &nbsp; 
			<a href="cluster.php?action=summary">Summary</a> &nbsp; 
			<a href="cluster.php?action=graph">Graph</a> &nbsp; 
		</div>
		<br><Br>
		<script>
			$(function() {
示例#3
0
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();
}
示例#4
0
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();
}
示例#5
0
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();
}