예제 #1
0
show_context_case_involving($case);
show_context_end();
// Get the number of rows in the result
$number_of_rows = lcm_num_rows($result);
// Check for correct start position of the list
$list_pos = intval(_request('list_pos', 0));
if ($list_pos >= $number_of_rows) {
    $list_pos = 0;
}
// Position to the page info start
if ($list_pos > 0) {
    if (!lcm_data_seek($result, $list_pos)) {
        die("Error seeking position {$list_pos} in the result");
    }
}
show_find_box('client', $find_client_string, '__self__');
echo '<form action="add_client.php" method="post">' . "\n";
$headers[0]['title'] = "";
$headers[0]['order'] = 'no_order';
$headers[1]['title'] = _Th('person_input_name');
$headers[1]['order'] = 'order_name';
$headers[1]['default'] = 'ASC';
show_list_start($headers);
// Process the output of the query
for ($i = 0; $i < $prefs['page_rows'] && ($row = lcm_fetch_array($result)); $i++) {
    echo "<tr>";
    // Show checkbox
    echo "<td width='1%' class='tbl_cont_" . ($i % 2 ? "dark" : "light") . "'>";
    echo "<input type='checkbox' name='clients[]' value='" . $row['id_client'] . "'>";
    echo "</td>\n";
    // Show client name
예제 #2
0
show_context_case_involving($case);
show_context_end();
// Get the number of rows in the result
$number_of_rows = lcm_num_rows($result);
// Check for correct start position of the list
$list_pos = intval(_request('list_pos', 0));
if ($list_pos >= $number_of_rows) {
    $list_pos = 0;
}
// Position to the page info start
if ($list_pos > 0) {
    if (!lcm_data_seek($result, $list_pos)) {
        die("Error seeking position {$list_pos} in the result");
    }
}
show_find_box('org', $find_org_string, '__self__');
echo '<form action="add_client.php" method="post">' . "\n";
$headers[0]['title'] = "";
$headers[0]['order'] = 'no_order';
$headers[1]['title'] = _Th('org_input_name');
$headers[1]['order'] = 'order_name';
$headers[1]['default'] = 'ASC';
show_list_start($headers);
for ($i = 0; $i < $prefs['page_rows'] && ($row = lcm_fetch_array($result)); $i++) {
    echo "<tr>\n";
    // Show checkbox
    echo "<td width='1%' class='tbl_cont_" . ($i % 2 ? "dark" : "light") . "'>";
    echo "<input type='checkbox' name='orgs[]' value='" . $row['id_org'] . "'>";
    echo "</td>\n";
    // Show org name
    echo "<td class='tbl_cont_" . ($i % 2 ? "dark" : "light") . "'>";
예제 #3
0
if ($author_session['status'] != 'admin') {
    lcm_page_start(_T('title_report_list'), '', '', 'reports_intro');
    echo '<p class="normal_text">' . _T('warning_forbidden_not_admin') . "</p>\n";
    lcm_page_end();
    exit;
}
//
// For "find report"
//
$find_rep_string = '';
if (isset($_REQUEST['find_rep_string'])) {
    $find_rep_string = $_GET['find_rep_string'];
}
lcm_page_start(_T('title_report_list'), '', '', 'reports_intro');
// lcm_bubble('report_list');
show_find_box('rep', $find_rep_string);
$q = "SELECT id_report,title\n\t\tFROM lcm_report";
// Add search criteria if any
if (strlen($find_rep_string) > 1) {
    $q .= " WHERE (title LIKE '%{$find_rep_string}%')";
}
// Sort reports by nem
$order_title = 'ASC';
if (isset($_REQUEST['order_title'])) {
    if ($_REQUEST['order_title'] == 'ASC' || $_REQUEST['order_title'] == 'DESC') {
        $order_title = $_REQUEST['order_title'];
    }
}
$q .= " ORDER BY title " . $order_title;
$result = lcm_query($q);
// Get the number of rows in the result
예제 #4
0
	$Id: listorgs.php,v 1.20 2006/02/20 02:55:17 mlutfy Exp $
*/
include 'inc/inc.php';
include_lcm('inc_impex');
$find_org_string = '';
if (isset($_REQUEST['find_org_string'])) {
    $find_org_string = $_REQUEST['find_org_string'];
}
if (!empty($_REQUEST['export']) && $GLOBALS['author_session']['status'] == 'admin') {
    export('org', $_REQUEST['exp_format'], $find_org_string);
    exit;
}
lcm_page_start(_T('title_org_list'), '', '', 'clients_intro');
lcm_bubble('org_list');
show_find_box('org', $find_org_string, '', (string) ($GLOBALS['author_session']['status'] == 'admin'));
// List all organisations in the system + search criterion if any
$q = "SELECT id_org,name\n\t\tFROM lcm_org";
if (strlen($find_org_string) > 1) {
    $q .= " WHERE (name LIKE '%{$find_org_string}%')";
}
// Sort orgs by ID
$order_set = false;
$order_id = '';
if (isset($_REQUEST['order_id'])) {
    if ($_REQUEST['order_id'] == 'ASC' || $_REQUEST['order_id'] == 'DESC') {
        $order_id = $_REQUEST['order_id'];
        $q .= " ORDER BY id_org " . $order_id;
        $order_set = true;
    }
}
예제 #5
0
        lcm_panic("Error seeking position {$list_pos} in the result");
    }
}
// Check if any author(s) available for selection
if ($find_author_string || lcm_num_rows($result) > 0) {
    lcm_page_start(_T('title_case_add_author'), '', '', 'cases_participants');
} else {
    // TODO: add $_SESSION['errors']['generic'] message?
    header('Location: ' . $dest_link->getUrlForHeader());
    exit;
}
show_context_start();
show_context_case_title($case);
show_context_case_involving($case);
show_context_end();
show_find_box('author', $find_author_string, '__self__');
echo '<form action="add_auth.php" method="post">' . "\n";
$headers = array();
$headers[0]['title'] = '';
$headers[0]['order'] = 'no_order';
$headers[1]['title'] = _Th('person_input_name');
$headers[1]['order'] = 'order_name';
$headers[2]['title'] = _Th('authoredit_input_status');
$headers[2]['order'] = 'order_status';
show_list_start($headers);
for ($i = 0; $i < $prefs['page_rows'] && ($row = lcm_fetch_array($result)); $i++) {
    echo "<tr>\n";
    echo '<td class="tbl_cont_' . ($i % 2 ? "dark" : "light") . '">';
    echo '<input type="checkbox" name="authors[]" value="' . $row['id_author'] . '" />';
    echo "</td>\n";
    echo '<td class="tbl_cont_' . ($i % 2 ? "dark" : "light") . '">' . get_person_name($row) . "</td>\n";
예제 #6
0
	with this program; if not, write to the Free Software Foundation, Inc.,
	59 Temple Place, Suite 330, Boston, MA  02111-1307, USA

	$Id: listclients.php,v 1.37 2006/05/26 06:54:07 mlutfy Exp $
*/
include 'inc/inc.php';
include_lcm('inc_filters');
include_lcm('inc_impex');
$find_client_string = trim(_request('find_client_string'));
if (!empty($_REQUEST['export']) && $GLOBALS['author_session']['status'] == 'admin') {
    export('client', $_REQUEST['exp_format'], $find_client_string);
    exit;
}
lcm_page_start(_T('title_client_list'), '', '', 'clients_intro');
lcm_bubble('client_list');
show_find_box('client', $find_client_string, '', (string) ($GLOBALS['author_session']['status'] == 'admin'));
// List all clients in the system + search criterion if any
$q = "SELECT id_client,name_first,name_middle,name_last\n\t\tFROM lcm_client";
//
// Add search criteria
//
if ($find_client_string) {
    // remove useless spaces
    $find_client_string = preg_replace('/ +/', ' ', $find_client_string);
    $q .= " WHERE ((name_first LIKE '%{$find_client_string}%')\n\t\t\tOR (name_middle LIKE '%{$find_client_string}%')\n\t\t\tOR (name_last LIKE '%{$find_client_string}%')\n\t\t\tOR (CONCAT(name_first, ' ', name_middle, ' ', name_last) LIKE '%{$find_client_string}%')\n\t\t\tOR (CONCAT(name_first, ' ', name_last) LIKE '%{$find_client_string}%')\n\t\t) ";
}
// Sort clients by ID
$order_set = false;
$order_id = '';
if (isset($_REQUEST['order_id'])) {
    if ($_REQUEST['order_id'] == 'ASC' || $_REQUEST['order_id'] == 'DESC') {
예제 #7
0
*/
include 'inc/inc.php';
include_lcm('inc_acc');
include_lcm('inc_filters');
include_lcm('inc_keywords');
global $author_session;
lcm_page_start(_T('case_subtitle_recent_followups'));
//lcm_bubble('case_list');
//-----------------------------------------------
// Analyse parameters
//
// For "find followup"
$find_fu_string = '';
if (isset($_REQUEST['find_fu_string'])) {
    $find_fu_string = $_REQUEST['find_fu_string'];
    show_find_box('fu', $find_fu_string);
}
// For "Filter case owner"
$case_owner = 'my';
if (isset($_REQUEST['case_owner'])) {
    $case_owner = $_REQUEST['case_owner'];
}
// always include 'my' cases [ML] $q_owner is re-used below
$q_owner .= " (a.id_author = " . $author_session['id_author'];
if ($case_owner == 'public') {
    $q_owner .= " OR c.public = 1";
}
$q_owner .= " ) ";
// For "Filter case date_creation"
$case_period = '7';
if (isset($_REQUEST['case_period'])) {
예제 #8
0
include_lcm('inc_obj_exp');
global $author_session;
global $prefs;
lcm_page_start(_T('title_expenses'), '', '', 'expenses_intro');
lcm_bubble('expenses_list');
//
// For "find expense"
//
$find_exp_string = '';
if (_request('find_exp_string')) {
    $find_exp_string = _request('find_exp_string');
    // remove useless spaces
    $find_exp_string = trim($find_exp_string);
    $find_exp_string = preg_replace('/ +/', ' ', $find_exp_string);
}
show_find_box('exp', $find_exp_string);
//
// For "Filter expense owner"
//
$prefs_change = false;
$types_owner = array('my' => 1, 'public' => 1);
$types_period = array('m1' => 30, 'm3' => 91, 'm6' => 182, 'y1' => 365);
// 30 days, 3 months, 6 months, 1 year
if ($author_session['status'] == 'admin') {
    $types_owner['all'] = 1;
}
if ($v = _request('case_owner')) {
    if ($prefs['case_owner'] != $v) {
        if (!array_key_exists($v, $types_owner)) {
            lcm_panic("Value for case owner not permitted: " . htmlspecialchars($v));
        }
예제 #9
0
	You should have received a copy of the GNU General Public License along
	with this program; if not, write to the Free Software Foundation, Inc.,
	59 Temple Place, Suite 330, Boston, MA  02111-1307, USA

	$Id: listauthors.php,v 1.33 2006/03/21 19:01:53 mlutfy Exp $
*/
include 'inc/inc.php';
include_lcm('inc_acc');
include_lcm('inc_filters');
$find_author_string = '';
if (isset($_REQUEST['find_author_string'])) {
    $find_author_string = $_REQUEST['find_author_string'];
}
lcm_page_start(_T('title_author_list'), '', '', 'authors_intro');
lcm_bubble('author_list');
show_find_box('author', $find_author_string);
$q = "SELECT id_author,name_first,name_middle,name_last,status\n\t\tFROM lcm_author\n\t\tWHERE (1=1 ";
// Add search criteria if any
if (strlen($find_author_string) > 1) {
    $q .= " AND ((name_first LIKE '%{$find_author_string}%')" . " OR (name_middle LIKE '%{$find_author_string}%')" . " OR (name_last LIKE '%{$find_author_string}%'))";
}
$q .= ")";
// Sort authors by status
$order_set = false;
$order_status = '';
if (isset($_REQUEST['order_status'])) {
    if ($_REQUEST['order_status'] == 'ASC' || $_REQUEST['order_status'] == 'DESC') {
        $order_status = $_REQUEST['order_status'];
        $q .= " ORDER BY status " . $order_status;
        $order_set = true;
    }
예제 #10
0
include 'inc/inc.php';
include_lcm('inc_obj_case');
global $author_session;
global $prefs;
lcm_page_start(_T('title_my_cases'), '', '', 'cases_intro');
lcm_bubble('case_list');
//
// For "find case"
//
$find_case_string = '';
if (_request('find_case_string')) {
    $find_case_string = _request('find_case_string');
    // remove useless spaces
    $find_case_string = trim($find_case_string);
    $find_case_string = preg_replace('/ +/', ' ', $find_case_string);
    show_find_box('case', $find_case_string);
}
//
// For "Filter case owner"
//
$prefs_change = false;
$types_owner = array('my' => 1, 'public' => 1);
$types_period = array('m1' => 30, 'm3' => 91, 'm6' => 182, 'y1' => 365);
// 30 days, 3 months, 6 months, 1 year
if ($author_session['status'] == 'admin') {
    $types_owner['all'] = 1;
}
if ($v = _request('case_owner')) {
    if ($prefs['case_owner'] != $v) {
        if (!array_key_exists($v, $types_owner)) {
            lcm_panic("Value for case owner not permitted: " . htmlspecialchars($v));
예제 #11
0
function lcm_page_end($credits = '')
{
    global $lcm_version_shown;
    global $connect_id_auteur;
    global $author_session;
    global $find_org_string;
    global $find_case_string;
    global $find_client_string;
    global $prefs;
    //[KM] The bottom of a single page
    //
    echo "\n\t\t\t\t<!-- End of 'main_column' content -->\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n";
    // [KM] The right and the left column can be very long, so, we can put here a
    // lot of additional information, some tiny help hints and so.
    echo "<div id=\"prefs_column\">\n";
    echo "<!-- Start of 'prefs_column' content -->\n";
    // Checking for "wide/narrow" user screen
    if ($prefs['screen'] == "wide") {
        echo "<div class=\"prefs_column_menu_head\">\n\t\t\t\t<div class=\"sm_profile\">" . _T('menu_profile') . "</div>\n\t\t\t</div>\n\t\t\t<p class=\"prefs_column_text\">" . '<a href="author_det.php?author=' . $author_session['id_author'] . '" class="prefs_normal_lnk"' . ' title="' . _T('case_tooltip_view_author_details', array('author' => htmlspecialchars(get_person_name($author_session)))) . '">' . get_person_name($author_session) . "</a><br /><br />\n\t\t\t<a href=\"config_author.php\" class=\"prefs_myprefs\">" . _T('menu_profile_preferences') . "</a><br /><br />\n\t\t\t<a href=\"lcm_cookie.php?logout=" . htmlspecialchars($author_session['username']) . "\" class=\"prefs_logout\" title=\"" . _T('menu_profile_logout_tooltip') . "\">" . _T('menu_profile_logout') . "</a>\n\t\t\t</p><br />\n\t\t\t<div class=\"prefs_column_menu_head\">\n\t\t\t\t<div class=\"sm_search\">" . _T('menu_search') . "</div>\n\t\t\t</div>\n";
        //
        // Search/find boxes
        //
        show_find_box('case', $find_case_string, '', 'narrow');
        show_find_box('client', $find_client_string, '', 'narrow');
        show_find_box('org', $find_org_string, '', 'narrow');
        echo "<br />\n\t\t\t<div class=\"prefs_column_menu_head\"><div class=\"sm_font_size\">" . _T('menu_fontsize') . "</div>\n\t\t\t</div>\n\t\t\t<ul class=\"font_size_buttons\">\n\t\t\t\t<li><a href=\"javascript:;\" title=\"Small Text\" onclick=\"setActiveStyleSheet('small_font')\">A-</a></li>\n\t\t\t\t<li><a href=\"javascript:;\" title=\"Normal Text\" onclick=\"setActiveStyleSheet('medium_font')\">A</a></li>\n\t\t\t\t<li><a href=\"javascript:;\" title=\"Large Text\" onclick=\"setActiveStyleSheet('large_font')\">A+</a></li>\n\t\t\t</ul>\n";
    } else {
        // Data from the refs_column - user name, links [My preferences] & [Logout]
        echo "<div id=\"user_info_box_large_screen\">";
        echo "<p class=\"prefs_column_text\">" . '<a href="author_det.php?author=' . $author_session['id_author'] . '" class="prefs_normal_lnk"' . ' title="' . _T('case_tooltip_view_author_details', array('author' => htmlspecialchars(get_person_name($author_session)))) . '">' . get_person_name($author_session) . "</a><br /><br />\n\t\t\t<a href=\"config_author.php\" class=\"prefs_myprefs\">" . _T('menu_profile_preferences') . "</a><br /><br /><a href=\"javascript:;\" title=\"Small Text\" onclick=\"setActiveStyleSheet('small_font')\" class=\"set_fnt_sz\">&nbsp;A-&nbsp;</a>&nbsp;\n\t\t\t\t<a href=\"javascript:;\" title=\"Normal Text\" onclick=\"setActiveStyleSheet('medium_font')\" class=\"set_fnt_sz\">&nbsp;A&nbsp;&nbsp;</a>&nbsp;\n\t\t\t\t<a href=\"javascript:;\" title=\"Large Text\" onclick=\"setActiveStyleSheet('large_font')\" class=\"set_fnt_sz\">&nbsp;A+&nbsp;</a>&nbsp;&nbsp;" . "<a href=\"lcm_cookie.php?logout=" . htmlspecialchars($author_session['username']) . "\" class=\"prefs_logout\" title=\"" . _T('menu_profile_logout_tooltip') . "\">" . _T('menu_profile_logout') . "</a>\n\t\t\t</p>";
        // TRAD (Small, Normal, Large text)
        echo "</div>";
    }
    echo "<!-- End of \"prefs_column\" content -->\n";
    echo "</div>\n";
    //just test...
    echo "<div class=\"clearing\">&nbsp;</div>\n";
    echo "</div>\n";
    if ($prefs['screen'] == "narrow") {
        echo '<div id="footer_narrow">
		<div class="prefs_column_menu_head"><div class="sm_search">' . _T('menu_search') . "</div></div>\n\t\t<table border=\"0\" align=\"center\" width=\"100%\">\n\t\t\t<tr>\n\t\t\t\t<td align=\"left\" width=\"33%\" valign=\"top\">\n";
        //
        // Search/find boxes
        //
        show_find_box('case', $find_case_string, '', 'narrow');
        echo "</td>\n";
        echo '<td align="left" width="33%" valign="top">';
        show_find_box('client', $find_client_string, '', 'narrow');
        echo "</td>\n";
        echo '<td align="left" width="33%" valign="top">';
        show_find_box('org', $find_org_string, '', 'narrow');
        echo "</td>\n\t\t\t</tr>\n\t\t</table>\n\t\t</div><br />\n";
    }
    echo "<div id=\"footer\">" . _T('title_software') . " (" . $lcm_version_shown . ")<br/> ";
    echo _T('info_free_software', array('distributed' => '<a href="http://www.lcm.ngo-bg.org/" class="prefs_normal_lnk">' . _T('info_free_software1') . '</a>', 'license' => lcm_help_string('about_license', _T('info_free_software2')))) . "</div>\n";
    if ($GLOBALS['debug']) {
        echo "<p align='left'>Debug (" . $GLOBALS['debug'] . "): SQL Queries: " . $GLOBALS['db_query_count'] . "</p>\n";
    }
    echo "</body>\n";
    echo "</html>\n";
    // [ML] Off-topic note, seen while removing code:
    // http://www.dynamicdrive.com/dynamicindex11/abox.htm
    lcm_html_end();
}