Пример #1
0
        echo "</p>\n";
        // Open box that hides this form by default
        echo '<div id="new_client" ' . (_session('add_client') ? '' : ' style="display: none;"') . '>';
        echo "<div style='overflow: hidden; width: 100%;'>";
        echo '<div style="float: left; text-align: right; width: 29%;">';
        echo '<p class="normal_text" style="margin: 0; padding: 4px;">' . _Ti('input_search_client') . '</p>';
        echo "</div>\n";
        echo '<div style="float: right; width: 69%;">';
        echo '<p class="normal_text" style="margin: 0; padding: 4px;"><input type="text" name="clientsearchkey" id="clientsearchkey" size="25" />' . "</p>\n";
        echo '<span id="autocomplete-client-popup" class="autocomplete" style="visibility: hidden;"><span></span></span>';
        echo '</div>';
        echo '<div style="clear: right;"></div>';
        echo '<div id="autocomplete-client-data"></div>' . "\n";
        echo "</div>\n";
        echo '<div id="autocomplete-client-alt">';
        $client = new LcmClientInfoUI();
        $client->printEdit();
        echo '</div>';
        echo "<script type=\"text/javascript\">\n\t\t\tautocomplete('clientsearchkey', 'autocomplete-client-popup', 'ajax.php', 'autocomplete-client-data', 'autocomplete-client-alt')\n\t\t\t</script>\n";
        echo "</div>\n";
        // closes box that hides this form by default
    }
}
if (!$id_case) {
    //
    // Find case (show only if new case)
    //
    show_page_subtitle("Case information", 'cases_intro');
    // TRAD
    echo "<div style='overflow: hidden; width: 100%;'>";
    echo '<div style="float: left; text-align: right; width: 29%;">';
Пример #2
0
    $query = "SELECT *\n\t\t\t\tFROM lcm_case\n\t\t\t\tWHERE title LIKE '%{$search}%'";
    $result = lcm_query($query);
    echo "<ul>";
    while ($row = lcm_fetch_array($result)) {
        echo "<li>" . $row['id_case'] . ": " . $row['title'] . "</li>\n";
        $cpt++;
    }
    if (!$cpt) {
        echo "<li>0: No results</li>";
    }
    // TRAD
    echo "</ul>\n";
    echo "</div>\n";
} elseif (intval(_request('id_client', 0)) > 0) {
    include_lcm('inc_obj_client');
    $client = new LcmClientInfoUI(intval(_request('id_client', 0)));
    $client->printGeneral(false);
    $client->printCases();
    $client->printAttach();
} elseif (intval(_request('id_org', 0)) > 0) {
    include_lcm('inc_obj_org');
    $org = new LcmOrgInfoUI(intval(_request('id_org', 0)));
    $org->printGeneral(false);
    $org->printCases();
    $org->printAttach();
} elseif ($action = _request('action')) {
    if ($action == 'get_kwg_in') {
        include_lcm('inc_keywords');
        include_lcm('inc_access');
        // Return a list of sub-keyword-groups
        // Or, if the kwg selected has "apply = many", list the sub-kwg and their keywords
Пример #3
0
        foreach ($_SESSION['form_data'] as $key => $value) {
            $form_data[$key] = $value;
        }
    }
}
if ($id_client > 0) {
    lcm_page_start(_T('title_client_edit') . ' ' . get_person_name($form_data), '', '', 'clients_newclient');
} else {
    lcm_page_start(_T('title_client_new'), '', '', 'clients_newclient');
}
echo show_all_errors();
echo '<form action="upd_client.php" method="post">' . "\n";
if (_request('attach_case')) {
    echo '<input type="hidden" name="attach_case" id="attach_case" value="' . _request('attach_case') . '" />' . "\n";
}
$obj_client = new LcmClientInfoUI($form_data['id_client']);
$obj_client->printEdit();
//
// Organisations this client represents
//
/* [ML] too confusing
	echo "<tr>\n";
	echo '<td colspan="2" align="center" valign="middle" class="heading">';
	echo '<h4>' . _T('client_subtitle_organisations') . '</h4>';
	echo '</td>';
	echo "</tr>\n";
	$q = "SELECT name FROM lcm_client_org, lcm_org WHERE id_client=" . $form_data['id_client'] . " AND lcm_client_org.id_org=lcm_org.id_org";
	$result = lcm_query($q);
	$orgs = array();
	while ($row = lcm_fetch_array($result)) {
		$orgs[] = $row['name'];
Пример #4
0
    $result = lcm_query($q);
    while ($row1 = lcm_fetch_array($result)) {
        echo '<div class="sys_msg_box">';
        echo '<ul>';
        echo '<li>' . _Ti('client_info_created_attached') . '<a class="content_link" href="case_det.php?case=' . $c . '">' . $row1['title'] . "</a></li>\n";
        echo "</ul>\n";
        echo "</div>\n";
    }
}
switch ($tab) {
    case 'general':
        //
        // Show client general information
        //
        echo '<fieldset class="info_box">';
        $obj_client = new LcmClientInfoUI($row['id_client']);
        $obj_client->printGeneral();
        if ($edit) {
            echo '<a href="edit_client.php?client=' . $row['id_client'] . '" class="edit_lnk">' . _T('client_button_edit') . '</a>' . "\n";
        }
        // [ML] Not useful
        // if ($GLOBALS['author_session']['status'] == 'admin')
        //	echo '<a href="export.php?item=client&amp;id=' . $row['id_client'] . '" class="exp_lnk">' . _T('export_button_client') . "</a>\n";
        echo '<br /><br />';
        echo "</fieldset>\n";
        break;
    case 'organisations':
        //
        // Show client associated organisations
        //
        echo '<fieldset class="info_box">';