Ejemplo n.º 1
0
require_once dirname(__FILE__) . '/../dbaccess/db_structure.php';
require_once dirname(__FILE__) . '/../dbaccess/db_structure_tree.php';
/* DEBUG
   $_REQUEST['db'] = 'dos_3';
   $_REQUEST['q'] = 'manly';
   */
$response = array();
$system = new System();
if (!$system->init(@$_REQUEST['db'])) {
    //get error and response
    $response = $system->getError();
} else {
    //$currentUser = $system->getCurrentUser();
    $data = array();
    if (@$_REQUEST['terms']) {
        $data["terms"] = dbs_GetTerms($system);
    }
    if (@$_REQUEST['detailtypes']) {
        $ids = $_REQUEST['detailtypes'] == 'all' ? null : $_REQUEST['detailtypes'];
        $data["detailtypes"] = dbs_GetDetailTypes($system, $ids, intval(@$_REQUEST['mode']));
    }
    if (@$_REQUEST['rectypes']) {
        $ids = $_REQUEST['rectypes'] == 'all' ? null : $_REQUEST['rectypes'];
        $mode = intval(@$_REQUEST['mode']);
        if ($mode > 2) {
            $data["rectypes"] = dbs_GetRectypeStructureTree($system, $ids, $mode, @$_REQUEST['fieldtypes']);
        } else {
            $data["rectypes"] = dbs_GetRectypeStructures($system, $ids, $mode);
        }
    }
    $response = array("status" => HEURIST_OK, "data" => $data);
Ejemplo n.º 2
0
* @copyright   (C) 2005-2016 University of Sydney
* @author      Artem Osmakov   <*****@*****.**>
* @author      Ian Johnson     <*****@*****.**>
* @license     http://www.gnu.org/licenses/gpl-3.0.txt GNU License 3.0
* @version     4
*/
/*
* Licensed under the GNU License, Version 3.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at http://www.gnu.org/licenses/gpl-3.0.txt
* Unless required by applicable law or agreed to in writing, software distributed under the License is
* distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied
* See the License for the specific language governing permissions and limitations under the License.
*/
if (!isset($terms)) {
    //global
    $terms = dbs_GetTerms($system);
}
if ($recTypeID == RT_ADDRESS) {
    //find linked place roles  RT_PLACE_ROLE
    // place roles for address related event for person
    $records_placeroles = recordSearch_2('[{"t":"16"},{"linked_to:12:90":"' . $recID . '" }]');
    ?>


    <html>

        <head>
        <title><?php 
    echo (@$_REQUEST['db'] ? $_REQUEST['db'] : '') . '. ' . HEURIST_TITLE;
    ?>
</title>
Ejemplo n.º 3
0
        <link rel="stylesheet" href="../../ext/jquery-ui-1.10.2/themes/base/jquery-ui.css" />
        <link rel="stylesheet" type="text/css" href="../../style.css">

        <script type="text/javascript" src="../../ext/jquery-ui-1.10.2/jquery-1.9.1.js"></script>
        <script type="text/javascript" src="../../ext/jquery-ui-1.10.2/ui/jquery-ui.js"></script>

        <script type="text/javascript" src="../../core/recordset.js"></script>
        <script type="text/javascript" src="../../core/hapi.js"></script>
        <script type="text/javascript" src="../../core/utils.js"></script>

        <script type="text/javascript">
            <?php 
//@ todo - load this stuff in hEditing
print "window.hWin.HEURIST4.rectypes = " . json_encode(dbs_GetRectypeStructures($system, null, 2)) . ";\n";
print "window.hWin.HEURIST4.terms = " . json_encode(dbs_GetTerms($system)) . ";\n";
?>
            var recordtype;

            //localization stub
            window.hWin.HR = function(str){
                return str;
            }

            $(document).ready(function() {

                if(!window.hWin.HAPI4){
                    window.hWin.HAPI4 = new hAPI('<?php 
echo $_REQUEST['db'];
?>
');