Пример #1
0
<?php

$extraParams = "1,0";
$retVal = doUpdateDxList(explode(",", $extraParams));
print_r($retVal);
function doUpdateDxList($extraParams)
{
    try {
        // include the data access class
        include_once "SQLUtils.php";
        // include the Dx list class
        include_once "DxList.php";
        // init the return code
        $retVal = array(false, "No data.");
        // create a Dx list object
        $dxList = new DxList();
        // load the object with the extra param data
        $dxList->ID = $extraParams[0] + 0;
        $dxList->Official = $extraParams[1] + 0;
        // get the data
        $retVal = updateObject($dxList);
    } catch (Exception $e) {
        // set the success code
        $retVal[0] = False;
        // return the data formatted for a jqx grid
        $retVal[1] = $e->getMessage();
    }
    // return to the caller
    return $retVal;
}
Пример #2
0
     if ($_SERVER['REQUEST_METHOD'] == "GET" && !empty($_GET["extraParams"])) {
         $extraParams = explode(",", $_GET["extraParams"]);
     }
 }
 // decide what to do based on the "fnname" (again, see top of file for more details)
 if (isset($function) && !empty($function)) {
     //
     // Dx list overview functions
     //
     // the Dx overview grid data
     if ($function == "getDxList") {
         // get the information
         $retVal = doGetDxList();
     } else {
         if ($function == "updateDxList" && is_array($extraParams)) {
             $retVal = doUpdateDxList($extraParams);
         } else {
             if ($function == "deleteDxList") {
                 $retVal = doDeleteDxList($extraParams);
             } else {
                 if ($function == "getDxListDebug") {
                     // get the information
                     $retVal = doGetDxListDebug();
                 } else {
                     if ($function == "getDxGeneDiagList") {
                         // get the information
                         $retVal = doGetDxGeneDiagList($extraParams);
                     } else {
                         if ($function == "updateDxListGeneSyndromic") {
                             $retVal = doUpdateDxGeneDiagListSyndromic($extraParams);
                         } else {