예제 #1
0
     break;
 case "doc_checkin":
     require_once $_DOCMAN->getPath('includes_f', 'documents');
     checkinDocument($gid);
     break;
 case "doc_checkout":
     require_once $_DOCMAN->getPath('includes_f', 'documents');
     checkoutDocument($gid);
     break;
 case "doc_reset":
     require_once $_DOCMAN->getPath('includes_f', 'documents');
     resetDocument($gid);
     break;
 case "doc_delete":
     require_once $_DOCMAN->getPath('includes_f', 'documents');
     deleteDocument($gid);
     break;
 case "doc_update":
     $_DOCMAN->setCfg('overwrite', 1);
     //force overwritting when uploading
     require_once $_DOCMAN->getPath('includes_f', 'upload');
     showDocumentUpload($gid, $script, 1);
     break;
 case "doc_update_process":
     $_DOCMAN->setCfg('overwrite', 1);
     //force overwritting when uploading
     require_once $_DOCMAN->getPath('includes_f', 'documents');
     updateDocumentProcess($gid);
     break;
     //special operations
 //special operations
예제 #2
0
<?php

include_once 'connect.php';
switch ($_GET["table"]) {
    case "score":
        deleteScore($_GET);
        break;
    case "personne":
        deletePersonne($_GET);
        break;
    case "document":
        deleteDocument($_GET);
        break;
    default:
        break;
}
function deleteScore($data)
{
    global $conn;
    $sql = "DELETE FROM scores WHERE  id_scores =" . $data["id_score"];
    //echo $sql;
    if ($conn->query($sql) === TRUE) {
        echo "score deleted successfully";
    } else {
        echo "Error: " . $sql . "<br>" . $conn->error;
    }
}
function deletePersonne($data)
{
    global $conn;
    $sql = "DELETE FROM personnes WHERE  nom =" . $data["nom"];
예제 #3
0
파일: index.php 프로젝트: benoitlesp/igo
function request()
{
    global $app;
    $httprequest = new Phalcon\Http\Request();
    $datain = $httprequest->get();
    $data = array();
    foreach ($datain as $key => $value) {
        $data[strtolower($key)] = $value;
    }
    $filter = new \Phalcon\Filter();
    $request = $filter->sanitize($data["request"], array("string", "lower"));
    $response = null;
    switch ($request) {
        case "getcapabilities":
            $response = getCapabilities();
            break;
        case "describefeaturetype":
            $response = describeFeatureType($data);
            break;
        case "getfeatures":
            $response = getFeatures($data);
            break;
        case "delete":
            $response = delete($data);
            break;
        case "create":
            $response = create($data);
            break;
        case "update":
            $response = update($data);
            break;
        case "transaction":
            $response = transaction($data);
            break;
            /* For grouping*/
        /* For grouping*/
        case "getassoclayers":
            $response = getAssocLayers($data);
            break;
        case "getgrouping":
            $response = getGrouping($data);
            break;
        case "describegrouping":
            $response = describeGrouping($data);
            break;
        case "creategrouping":
            $response = createGrouping($data);
            break;
        case "updategrouping":
            $response = updateGrouping($data);
            break;
        case "deletegrouping":
            $response = deleteGrouping($data);
            break;
        case "getFeaturesFk":
            $response = getFeaturesFk($data);
            break;
        case "duplicategrouping":
            $response = duplicateGrouping($data);
            break;
        case "associatedocument":
            $response = associateDocument($data);
            break;
        case "deletedocument":
            $response = deleteDocument($data);
            break;
        case "downloaddocument":
            $response = downloadDocument($data);
            echo $response;
            break;
        case "getdocumentlist":
            $response = getDocumentList($data);
            break;
        case "getdocumentdescription":
            $response = getDocumentDescription($data);
            break;
        default:
            $response = false;
            break;
    }
    $app->response->setContentType('application/json; charset=UTF-8')->sendHeaders();
    echo json_encode($response);
}