// since it may contain terms and references to other rectypes !!!1
            $typeid = substr($key, 5);
            //, $top-5);
            $newkey = getDetailTypeConceptID($typeid);
            if ($newkey) {
                $arr["type:" . $newkey] = $value;
            } else {
                print '({"error":"Can\'t find the global concept ID for field type #"' . $typeid . '"})';
                exit;
            }
        } else {
            $arr[$key] = $value;
        }
    }
    //for
    $newrectype = getRecTypeConceptID($_POST["rectype"]);
    if ($newrectype) {
        $arr["rectype"] = $newrectype;
    } else {
        print '({"error":"Can\'t find the global concept ID for record type #"' . $_POST["rectype"] . '"})';
        exit;
    }
}
// converts _POST array into string
//$message = json_format($_POST);
$message = json_encode($arr);
$geekMail->message($message);
if (!$geekMail->send()) {
    //$errors = $geekMail->getDebugger();
    //print_r($errors);
    print '({"error":"Cannot send email. Please ask system administrator to verify that mailing is enabled on your server"})';
示例#2
0
function outputRecordStub($recordStub)
{
    global $RTN;
    /*****DEBUG****/
    //error_log( "ouput recordStub ".print_r($recordStub,true));
    openTag('record', array('isStub' => 1));
    makeTag('id', null, array_key_exists('id', $recordStub) ? $recordStub['id'] : $recordStub['rec_ID']);
    $type = array_key_exists('type', $recordStub) ? $recordStub['type'] : $recordStub['rec_RecTypeID'];
    makeTag('type', array('id' => $type, 'conceptID' => getRecTypeConceptID($type)), $RTN[$type]);
    $title = array_key_exists('title', $recordStub) ? $recordStub['title'] : $recordStub['rec_Title'];
    makeTag('title', null, $title);
    closeTag('record');
}
示例#3
0
function outputRecordStub($recordStub)
{
    global $RTN;
    openTag('record', array('isStub' => 1));
    makeTag('id', null, array_key_exists('id', $recordStub) ? $recordStub['id'] : $recordStub['rec_ID']);
    $type = array_key_exists('type', $recordStub) ? $recordStub['type'] : $recordStub['rec_RecTypeID'];
    makeTag('type', array('id' => $type, 'conceptID' => getRecTypeConceptID($type)), $RTN[$type]);
    $title = array_key_exists('title', $recordStub) ? $recordStub['title'] : $recordStub['rec_Title'];
    makeTag('title', null, $title);
    closeTag('record');
}