コード例 #1
0
ファイル: handler.php プロジェクト: Symbiota/Symbiota
function saveAgentLinks($agentlinksid = NULL)
{
    global $clientRoot;
    $result = "";
    $am = new AgentManager();
    if ($am->isAgentEditor()) {
        if (strlen($agentlinksid) == 0) {
            $toSave = new agentlinks();
            $toSave = $am->getAndChangeAgentLinksFromRequest($agentlinksid);
        } else {
            $toSave = $am->getAndChangeAgentLinksFromRequest($agentlinksid);
        }
        if ($toSave != null) {
            $result = $am->saveNewAgentLinks($toSave);
        } else {
            $result = "Error in saving agent links record.";
        }
    } else {
        $result = "You aren't authorized to edit agent records.";
    }
    return $result;
}