} } } } if ($value) { if (!@$details["t:" . $key]) { $details["t:" . $key] = array(); } array_push($details["t:" . $key], $value); } } else { print "DETAIL TYPE NOT FOUND for Attrubute " . $row2[3] . "<br />"; } } $record = array('ID' => $recID, 'RecTypeID' => $rectype, 'AddedByImport' => 2, 'details' => $details); $response = recordSave($system, $record); if ($response['status'] == HEURIST_OK) { if ($recID) { $cntUpdated++; print "UPDATED as #" . $recID . "<br/>"; } else { $cntInsterted++; print "INSERTED as #" . $response['data'] . "<br/>"; } } else { print print_r($response, true) . "<br/>"; } break; //DEBUG - IMPORT ONE ONLY } //for records
$mysqli = $system->get_mysqli(); if ($system->get_user_id() < 1) { $response = $system->addError(HEURIST_REQUEST_DENIED); } else { $action = @$_REQUEST['a']; // || @$_REQUEST['action']; // call function from db_record library // these function returns standard response: status and data // data is recordset (in case success) or message if ($action == "a" || $action == "add") { $record = array(); $record['RecTypeID'] = @$_REQUEST['rt']; $record['OwnerUGrpID'] = @$_REQUEST['ro']; $record['NonOwnerVisibility'] = @$_REQUEST['rv']; $response = recordAdd($system, $record); } else { if ($action == "s" || $action == "save") { $response = recordSave($system, $_REQUEST); } else { if (($action == "d" || $action == "delete") && @$_REQUEST['ids']) { $response = recordDelete($system, $_REQUEST['ids']); } else { $response = $system->addError(HEURIST_INVALID_REQUEST); } } } } } header('Content-type: text/javascript'); print json_encode($response); exit;