当前位置: 首页>>代码示例>>PHP>>正文


PHP clean_output函数代码示例

本文整理汇总了PHP中clean_output函数的典型用法代码示例。如果您正苦于以下问题:PHP clean_output函数的具体用法?PHP clean_output怎么用?PHP clean_output使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了clean_output函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: clean_output

            return;
        }
        $file = (string) clean_output(get_parameter("file"));
        if ($file) {
            $file_path = $config["homedir"] . "/" . "attachment/downloads/" . $file;
            $result["status"] = unlink($file_path);
        }
        echo json_encode($result);
        return;
    }
}
$delete_btn = get_parameter("delete_btn", 0);
// File deletion
// ==================
if ($delete_btn) {
    $location = clean_output(get_parameter("location", ""));
    $file_path = $config["homedir"] . "/" . "attachment/downloads/" . $location;
    unlink($file_path);
    $_GET["create"] = 1;
}
// Database UPDATE
// ==================
if (isset($_GET["update2"])) {
    // if modified any parameter
    if (give_acl($config["id_user"], 0, "FRW") != 1) {
        audit_db($config["id_user"], $config["REMOTE_ADDR"], "ACL Violation", "Trying to update a download without privileges");
        require "general/noaccess.php";
        exit;
    }
    $id = get_parameter("id", "");
    if ($id != "" && !check_fr_item_accessibility($config["id_user"], $id)) {
开发者ID:dsyman2,项目名称:integriaims,代码行数:31,代码来源:browse.php

示例2: ascii_output

/**
* Returns a single string with HTML characters decoded
*
* $input    string  Input string
*/
function ascii_output($string)
{
    return clean_output($string);
}
开发者ID:keunes,项目名称:integriaims,代码行数:9,代码来源:functions.php

示例3: get_db_row

	$report = get_db_row ('tinventory_reports', 'id', $id);
	if ($report === false)
		return;
	
	ini_set ("memory_limit", "3072M");
	ini_set ("max_execution_time", 600);
	
	echo "<h2>".__('Custom report')."</h2>";
	echo "<h4>".$report['name'];
		echo "<div id='button-bar-title'><ul>";
			echo "<li><a href='index.php?sec=projects&sec2=operation/inventories/inventory_reports'>".print_image ("images/flecha_volver.png", true, array("title" => __("Back to Report")))."</a></li>";
		echo "</ul></div>";
	echo "</h4>";

	$config['mysql_result_type'] = MYSQL_ASSOC;
	$rows = get_db_all_rows_sql (clean_output ($report['sql']));
	if ($rows === false)
		return;
	
	//count $row chunk
	$row_chunk_cont = count(array_chunk($rows[0], 10));
	
	//keys $row chunk
	$row_chunk_keys = array_chunk(array_keys($rows[0]), 10);
		
	$table = array();
	for($i=0; $i < $row_chunk_cont; $i++){
		$table[$i][] = $row_chunk_keys[$i];
		foreach ($rows as $row) {
			$row_chunk = array_chunk($row, 10);
			$table[$i][] = $row_chunk[$i];
开发者ID:articaST,项目名称:integriaims,代码行数:31,代码来源:inventory_reports_detail.php

示例4: printEdit

 function printEdit()
 {
     $id_comment = $this->getDataInt('id_comment', 0);
     echo '<input type="hidden" name="edit_comment" value="1" />' . "\n";
     echo '<input type="hidden" name="id_expense" value="' . $this->getDataInt('id_expense') . '" />' . "\n";
     if ($id_comment) {
         echo "<!-- id_comment = {$id_comment} -->\n";
         echo '<input type="hidden" name="id_comment" value="' . $id_comment . '" />' . "\n";
     }
     echo '<table width="99%" border="0" align="center" cellpadding="5" cellspacing="0" class="tbl_usr_dtl">' . "\n";
     echo '<tr>';
     echo "<td>" . f_err_star('comment') . _Ti('expense_input_comment') . "</td>\n";
     echo '<td><textarea name="comment" id="input_expense_comment" class="frm_tarea" rows="3" cols="60">' . clean_output($this->getDataString('comment')) . "</textarea>\n" . "</td>\n";
     echo "</tr>\n";
     echo "</table>\n";
 }
开发者ID:nyimbi,项目名称:legalcase,代码行数:16,代码来源:inc_obj_exp.php

示例5: die

        die("Error seeking position {$list_pos} in the result");
    }
}
$headers = array();
$headers[0]['title'] = _Th('person_input_name');
$headers[0]['order'] = 'order_title';
$headers[0]['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++) {
    // Show report title
    echo "<tr><td class='tbl_cont_" . ($i % 2 ? "dark" : "light") . "'>";
    if (true) {
        echo '<a href="rep_det.php?rep=' . $row['id_report'] . '" class="content_link">';
    }
    echo highlight_matches(clean_output(remove_number_prefix($row['title'])), $find_rep_string);
    if (true) {
        echo '</a>';
    }
    echo "</td>\n";
    echo "</tr>\n";
}
show_list_end($list_pos, $number_of_rows);
echo '<p><a href="edit_rep.php?rep=0" class="create_new_lnk">' . _T('rep_button_new') . "</a></p>\n";
//
// Custom reports (plugins)
//
$custom_reports = array();
$handle = opendir("inc/config/custom/reports");
while (($f = readdir($handle)) != '') {
    if (is_file("inc/config/custom/reports/" . $f)) {
开发者ID:nyimbi,项目名称:legalcase,代码行数:31,代码来源:listreps.php

示例6: printEdit


//.........这里部分代码省略.........
         echo "<td>";
         echo '<select ' . $dis . ' name="type" size="1" class="sel_frm">' . "\n";
         $default_fu = get_suggest_in_group_name('followups');
         $futype_kws = get_keywords_in_group_name('followups');
         $kw_found = false;
         foreach ($futype_kws as $kw) {
             $sel = isSelected($kw['name'] == $default_fu);
             if ($sel) {
                 $kw_found = true;
             }
             echo '<option value="' . $kw['name'] . '"' . $sel . '>' . _T(remove_number_prefix($kw['title'])) . "</option>\n";
         }
         // Exotic case where the FU keyword was hidden by the administrator,
         // but an old follow-up using that keyword is being edited.
         if (!$kw_found) {
             echo '<option selected="selected" value="' . $default_fu . '">' . _Tkw('followups', $default_fu) . "</option>\n";
         }
         echo "</select>\n";
         echo "</td>\n";
         echo "</tr>\n";
     }
     // Keywords (if any)
     show_edit_keywords_form('followup', $this->getDataInt('id_followup'));
     // Description
     echo "<tr>\n";
     echo '<td valign="top">' . f_err_star('description') . _T('fu_input_description') . "</td>\n";
     echo '<td>';
     if ($this->getDataString('type') == 'assignment' || $this->getDataString('type') == 'unassignment') {
         // Do not allow edit of assignment
         echo '<input type="hidden" name="description" value="' . $this->getDataString('description') . '" />' . "\n";
         echo get_fu_description($this->data);
     } else {
         echo '<textarea ' . $dis . ' name="description" rows="15" cols="60" class="frm_tarea">';
         echo clean_output($this->getDataString('description'));
         echo "</textarea>";
     }
     echo "</td></tr>\n";
     // Sum billed field
     if ($this->show_sum_billed == "yes") {
         echo '<tr>';
         echo '<td>' . _T('fu_input_sum_billed') . "</td>\n";
         echo '<td>';
         echo '<input ' . $dis . ' name="sumbilled" ' . 'value="' . clean_output($this->getDataString('sumbilled')) . '" ' . 'class="search_form_txt" size="10" />';
         // [ML] If we do this we may as well make a function
         // out of it, but not sure where to place it :-)
         // This code is also in config_site.php
         $currency = read_meta('currency');
         if (empty($currency)) {
             $current_lang = $GLOBALS['lang'];
             $GLOBALS['lang'] = read_meta('default_language');
             $currency = _T('currency_default_format');
             $GLOBALS['lang'] = $current_lang;
         }
         echo htmlspecialchars($currency);
         echo "</td></tr>\n";
     }
     echo "</table>\n\n";
     // XXX FIXME: Should probably be in some function "is_system_fu"
     // or even "is_deletable"
     if ($this->getDataInt('id_followup') && allowed($this->data['id_case'], 'a') && !(is_status_change($this->data['type']) || $this->data['type'] == 'assignment' || $this->data['type'] == 'unassignment')) {
         $checked = $this->getDataString('hidden') == 'Y' ? ' checked="checked" ' : '';
         echo '<p class="normal_text">';
         echo '<input type="checkbox"' . $checked . ' name="delete" id="box_delete" />';
         echo '<label for="box_delete">' . _T('fu_info_delete') . '</label>';
         echo "</p>\n";
     }
开发者ID:nyimbi,项目名称:legalcase,代码行数:67,代码来源:inc_obj_fu.php

示例7: get_parameter

	ui_print_error_message(__('Ticket not found'));
	exit;
}

// GET ACTION PARAMETERS
$upload_file = get_parameter('upload_file');
$add_workunit = get_parameter('add_workunit');

// ACTIONS
if($upload_file) {
	$filename = get_parameter('upfile');
	$file_description = get_parameter('description',__('No description available'));

	$file_temp = sys_get_temp_dir()."/$filename";
	
	$result = attach_incident_file ($incident_id, clean_output($file_temp), $file_description);
	
	echo $result;
	
	$active_tab = 'files';
}

if($add_workunit) {
	$note = get_parameter('note');
	$public = 1;
	$timeused = "0.05";
	
	$result = create_workunit ($incident_id, $note, $config["id_user"], $timeused, 0, "", $public, 0);
	
	if($result) {
		ui_print_success_message(__('Workunit added'));
开发者ID:keunes,项目名称:integriaims,代码行数:31,代码来源:incident.php

示例8: _Ti

    }
    // TRAD
    echo ": " . $rep_specs->getDescription() . "</p>\n";
}
echo "<fieldset class=\"info_box\">\n";
echo "<form action='upd_rep.php' method='post'>\n";
if ($_SESSION['form_data']['filecustom']) {
    echo '<input type="hidden" name="filecustom" value="' . $_SESSION['form_data']['filecustom'] . '" />' . "\n";
}
if ($_SESSION['form_data']['id_report']) {
    echo "<strong>" . _Ti('rep_input_id') . "</strong>&nbsp;" . $_SESSION['form_data']['id_report'] . "\n\t\t<input type=\"hidden\" name=\"id_report\" value=\"" . $_SESSION['form_data']['id_report'] . "\">\n";
    // [ML] echo "&nbsp;|&nbsp;\n";
}
// Title of report
echo "<p>" . f_err_star('title') . "<strong>" . _Ti('rep_input_title') . "</strong><br />";
echo '<input name="title" value="' . clean_output($_SESSION['form_data']['title']) . '" class="search_form_txt"></p>' . "\n";
// Description
echo '<p>' . "<strong>" . _Ti('rep_input_description') . "</strong><br />\n";
echo '<textarea name="description" rows="5" cols="40" class="frm_tarea">';
echo $_SESSION['form_data']['description'];
echo "</textarea></p>\n";
// Notes
echo '<p>' . "<strong>" . _Ti('rep_input_notes') . "</strong><br />\n";
echo '<textarea name="notes" rows="5" cols="40" class="frm_tarea">';
echo $_SESSION['form_data']['notes'];
echo "</textarea></p>\n";
//	if ($admin || !read_meta('case_read_always') || !read_meta('case_write_always')) {
//		echo "\t<tr><td>" . _T('public') . "</td>
//			<td>
//				<table>
//				<tr>\n";
开发者ID:nyimbi,项目名称:legalcase,代码行数:31,代码来源:edit_rep.php

示例9: clean_output

        } else {
            /* Print main link */
            print "<a href='";
            clean_output($bookmarkurl);
            print "'>";
            clean_output($title);
            print "</a>\n";
            print "<form method='post' action='#edit'>\n";
            /* Print tag links */
            $taglist = split(" ", $bookmarktags);
            foreach ($taglist as $tag) {
                if (strlen($tag) > 0) {
                    print "  <a class='tag' href='" . $deliciousroot . "admin?tags=";
                    clean_output($tag);
                    print "'>";
                    clean_output($tag);
                    print "</a>\n";
                }
            }
            /* Print edit link */
            print "  <input name='url' type='hidden' value='";
            clean_output($bookmarkurl);
            print "' />\n";
            print "  <input type='submit' value='edit' name='edit' />\n";
            print "</form>\n";
        }
    }
}
fclose($datafilehandle);
footer($deliciousroot, $tags);
print "</body></html>";
开发者ID:alienacorn,项目名称:bookmarks,代码行数:31,代码来源:index.php

示例10: show_login

function show_login($cible, $prive = 'prive', $message_login = '')
{
    $error = '';
    $login = _request('var_login');
    $logout = _request('var_logout');
    // If the cookie fails, inc_auth tried to redirect to lcm_cookie who
    // then tried to put a cookie. If it is not there, it is "cookie failed"
    // who is there, and it's probably a bookmark on privet=yes and not
    // a cookie failure.
    $cookie_failed = "";
    if (_request('var_cookie_failed')) {
        $cookie_failed = $_COOKIE['lcm_session'] != 'cookie_test_failed';
    }
    global $author_session;
    global $lcm_session;
    global $clean_link;
    if (!$cible) {
        // cible = destination
        $cible = new Link(_request('var_url', 'index.php'));
    }
    $cible->delVar('var_erreur');
    $cible->delVar('var_url');
    $cible->delVar('var_cookie_failed');
    $clean_link->delVar('var_erreur');
    $clean_link->delVar('var_login');
    $clean_link->delVar('var_cookie_failed');
    $url = $cible->getUrl();
    // This populates the $author_session variable
    include_lcm('inc_session');
    verifier_visiteur();
    if ($author_session and !$logout and ($author_session['status'] == 'admin' or $author_session['status'] == 'normal')) {
        if ($url != $GLOBALS['clean_link']->getUrl()) {
            lcm_header("Location: " . $cible->getUrlForHeader());
        }
        // [ML] This is making problems for no reason, we use login only
        // for one mecanism (entering the system).
        // echo "<a href='$url'>"._T('login_this_way')."</a>\n";
        echo "<a class='content_link' href='index.php'>" . _T('login_this_way') . "</a>\n";
        return;
    }
    if (_request('var_erreur') == 'pass') {
        $error = _T('login_password_incorrect');
    }
    // The login is memorized in the cookie for a possible future admin login
    if (!$login && isset($_COOKIE['lcm_admin'])) {
        if (preg_match("/^@(.*)\$/", $_COOKIE['lcm_admin'], $regs)) {
            $login = $regs[1];
        }
    } else {
        if ($login == '-1') {
            $login = '';
        }
    }
    // other sources for authentication
    $flag_autres_sources = isset($GLOBALS['ldap_present']) ? $GLOBALS['ldap_present'] : '';
    // What informations to pass?
    if ($login) {
        $status_login = 0;
        // unknown status
        $login = clean_input($login);
        $query = "SELECT id_author, status, password, prefs, alea_actuel, alea_futur \n\t\t\t\t\tFROM lcm_author \n\t\t\t\t\tWHERE username='{$login}'";
        $result = lcm_query($query);
        if ($row = lcm_fetch_array($result)) {
            if ($row['status'] == 'trash' or $row['password'] == '') {
                $status_login = -1;
                // deny
            } else {
                $status_login = 1;
                // known login
                // Which infos to pass for the javascript ?
                $id_author = $row['id_author'];
                $alea_actuel = $row['alea_actuel'];
                // for MD5
                $alea_futur = $row['alea_futur'];
                // Button for lenght of connection
                if ($row['prefs']) {
                    $prefs = unserialize($row['prefs']);
                    $rester_checked = $prefs['cnx'] == 'perma' ? ' checked=\'checked\'' : '';
                }
            }
        }
        // Unknown login (except LDAP) or refused
        if ($status_login == -1 or $status_login == 0 and !$flag_autres_sources) {
            $error = _T('login_identifier_unknown', array('login' => htmlspecialchars(clean_output($login))));
            $login = '';
            // [ML] Not sure why this was here, but headers are already sent
            // therefore it causes an error message (which is not shown, but
            // might make a mess, knowing how PHP runs differently everywhere..)
            // @lcm_setcookie('lcm_admin', '', time() - 3600);
        }
    }
    // Javascript for the focus
    if ($login) {
        $js_focus = 'document.form_login.session_password.focus();';
    } else {
        $js_focus = 'document.form_login.var_login.focus();';
    }
    // [ML] we should probably add a help link here, since tech, but let's see
    // how many users complain first, since this should affect only tech users
    if ($cookie_failed == "yes") {
//.........这里部分代码省略.........
开发者ID:nyimbi,项目名称:legalcase,代码行数:101,代码来源:inc_login.php

示例11: lcm_panic

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)) {
        lcm_panic("Error seeking position {$list_pos} in the result");
    }
}
// Output table tags
show_listclient_start();
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") . '">' . $row['id_client'] . "</td>\n";
    echo '<td class="tbl_cont_' . ($i % 2 ? "dark" : "light") . '">';
    echo '<a href="client_det.php?client=' . $row['id_client'] . '" class="content_link">';
    $fullname = clean_output(get_person_name($row));
    echo highlight_matches($fullname, $find_client_string);
    echo "</a>\n";
    echo "</td>\n";
    echo "</tr>\n";
}
show_listclient_end($list_pos, $number_of_rows);
?>
<p><a href="edit_client.php" class="create_new_lnk"><?php 
echo _T('client_button_new');
?>
</a></p>
<br /><br />
<?php 
lcm_page_end();
开发者ID:nyimbi,项目名称:legalcase,代码行数:31,代码来源:listclients.php

示例12: incidents_get_filter_tickets_tree


//.........这里部分代码省略.........
        if ($filters['medals'] == 1) {
            if (!$is_inverse) {
                $medals_filter = 'AND gold_medals <> 0';
            } else {
                $medals_filter = 'AND gold_medals = 0';
            }
        } else {
            if ($filters['medals'] == 2) {
                if (!$is_inverse) {
                    $medals_filter = 'AND black_medals <> 0';
                } else {
                    $medals_filter = 'AND black_medals = 0';
                }
            }
        }
    }
    if (!empty($filters['parent_name'])) {
        $inventory_id = get_db_value('id', 'tinventory', 'name', $filters['parent_name']);
        if ($inventory_id) {
            if (!$is_inverse) {
                $sql_clause .= sprintf(' AND id_incidencia IN (SELECT id_incident FROM tincident_inventory WHERE
					id_inventory = %d)', $inventory_id);
            } else {
                $sql_clause .= sprintf(' AND id_incidencia NOT IN (SELECT id_incident FROM tincident_inventory WHERE
					id_inventory = %d)', $inventory_id);
            }
        }
    }
    if ($no_parents) {
        $sql_clause .= ' AND id_incidencia NOT IN (SELECT id_incidencia FROM tincidencia WHERE id_parent <> 0)';
    }
    // Order
    if ($filters['order_by'] && !is_array($filters['order_by'])) {
        $order_by_array = json_decode(clean_output($filters['order_by']), true);
    } else {
        $order_by_array = $filters['order_by'];
    }
    $order_by = '';
    if ($order_by_array) {
        foreach ($order_by_array as $key => $value) {
            if ($value) {
                $order_by .= " {$key} {$value}, ";
            }
        }
    }
    // Use config block size if no other was given
    if ($limit && !isset($filters['limit'])) {
        $filters['limit'] = $config['block_size'];
    }
    // Text filter
    $text_filter = '';
    if (!empty($filters['string'])) {
        if (!$is_inverse) {
            $text_filter = sprintf('AND (
				titulo LIKE "%%%s%%" OR descripcion LIKE "%%%s%%"
				OR id_creator LIKE "%%%s%%" OR id_usuario LIKE "%%%s%%"
				OR id_incidencia = %d
				OR id_incidencia IN (
					SELECT id_incident
					FROM tincident_field_data
					WHERE data LIKE "%%%s%%"))', $filters['string'], $filters['string'], $filters['string'], $filters['string'], $filters['string'], $filters['string']);
        } else {
            $text_filter = sprintf('AND (
				titulo NOT LIKE "%%%s%%" AND descripcion NOT LIKE "%%%s%%"
				AND id_creator NOT LIKE "%%%s%%" AND id_usuario NOT LIKE "%%%s%%"
				AND id_incidencia <> %d
开发者ID:articaST,项目名称:integriaims,代码行数:67,代码来源:functions_incidents.php

示例13: printEdit

 function printEdit()
 {
     echo '<table width="99%" border="0" align="center" cellpadding="5" cellspacing="0" class="tbl_usr_dtl">' . "\n";
     // Organisation ID
     if ($this->getDataInt('id_org')) {
         echo "<tr>\n";
         echo "<td>" . _Ti('org_input_id') . "</td>\n";
         echo "<td>" . $this->getDataInt('id_org') . '<input type="hidden" name="id_org" value="' . $this->getDataInt('id_org') . '" />' . "</td>\n";
         echo "</tr>\n";
     }
     // Organisation name
     echo "<tr>\n";
     echo "<td>" . f_err_star('name') . _Ti('org_input_name') . "</td>\n";
     echo '<td><input name="name" value="' . clean_output($this->getDataString('name')) . '" class="search_form_txt" />' . "</td>\n";
     echo "</tr>\n";
     // Court registration number
     echo "<tr>\n";
     echo "<td>" . f_err_star('court_reg') . _Ti('org_input_court_reg') . "</td>\n";
     echo '<td><input name="court_reg" value="' . clean_output($this->getDataString('court_reg')) . '" class="search_form_txt" />' . "</td>\n";
     echo "</tr>\n";
     // Tax number
     echo "<tr>\n";
     echo "<td>" . f_err_star('tax_number') . _Ti('org_input_tax_number') . "</td>\n";
     echo '<td><input name="tax_number" value="' . clean_output($this->getDataString('tax_number')) . '" class="search_form_txt" />' . "</td>\n";
     echo "</tr>\n";
     // Statistical number
     echo "<tr>\n";
     echo "<td>" . f_err_star('stat_number') . _Ti('org_input_stat_number') . "</td>\n";
     echo '<td><input name="stat_number" value="' . clean_output($this->getDataString('stat_number')) . '" class="search_form_txt" />' . "</td>\n";
     echo "</tr>\n";
     // Creation date
     if ($this->getDataInt('id_org')) {
         echo "<tr>\n";
         echo '<td>' . _Ti('time_input_date_creation') . '</td>';
         echo '<td>' . format_date($this->getDataString('date_creation'), 'full') . '</td>';
         echo "</tr>\n";
     }
     //
     // Keywords, if any
     //
     show_edit_keywords_form('org', $this->getDataInt('id_org'));
     // Notes
     echo "<tr>\n";
     echo "<td>" . f_err_star('notes') . _Ti('org_input_notes') . "</td>\n";
     echo '<td><textarea name="notes" id="input_notes" class="frm_tarea" rows="3" cols="60">' . clean_output($this->getDataString('notes')) . "</textarea>\n" . "</td>\n";
     echo "</tr>\n";
     //
     // Contacts (e-mail, phones, etc.)
     //
     echo "<tr>\n";
     echo '<td colspan="2" align="center" valign="middle">';
     show_page_subtitle(_T('client_subtitle_contacts'));
     echo '</td>';
     echo "</tr>\n";
     show_edit_contacts_form('org', $this->getDataInt('id_org'));
     echo "</table>\n";
 }
开发者ID:nyimbi,项目名称:legalcase,代码行数:57,代码来源:inc_obj_org.php

示例14: printEdit

 function printEdit()
 {
     // Read site configuration preferences
     $case_assignment_date = read_meta('case_assignment_date');
     $case_alledged_crime = read_meta('case_alledged_crime');
     $case_legal_reason = read_meta('case_legal_reason');
     $case_allow_modif = read_meta('case_allow_modif');
     echo '<table class="tbl_usr_dtl">' . "\n";
     // Case ID (if editing existing case)
     if ($this->getDataInt('id_case')) {
         echo "<tr>" . "<td>" . _T('case_input_id') . "</td>" . "<td>" . $this->getDataInt('id_case') . '<input type="hidden" name="id_case" value="' . $this->getDataInt('id_case') . '" />' . "</td></tr>\n";
     }
     echo '<tr><td><label for="input_case_title">' . f_err_star('title') . _T('case_input_title') . "</label></td>\n";
     echo '<td><input size="35" name="title" id="input_case_title" value="' . clean_output($this->getDataString('title')) . '" class="search_form_txt" />';
     echo "</td></tr>\n";
     // Date of earlier assignment
     if ($case_assignment_date == 'yes') {
         echo "<tr>\n";
         echo "<td>" . f_err_star('date_assignment') . _Ti('case_input_date_assigned') . "</td>\n";
         echo "<td>" . get_date_inputs('assignment', $this->getDataString('date_assignment'), false) . "</td>\n";
         echo "</tr>\n";
     }
     // Legal reason
     if (substr($case_legal_reason, 0, 3) == 'yes') {
         echo '<tr><td><label for="input_legal_reason">' . f_err_star('legal_reason') . _T('case_input_legal_reason') . "</label>" . ($case_legal_reason == 'yes_mandatory' ? '<br/>(' . _T('keywords_input_policy_mandatory') . ')' : '') . "</td>\n";
         echo '<td>';
         echo '<textarea name="legal_reason" id="input_legal_reason" class="frm_tarea" rows="2" cols="60">';
         echo clean_output($this->getDataString('legal_reason'));
         echo "</textarea>";
         echo "</td>\n";
         echo "</tr>\n";
     }
     // Alledged crime
     if (substr($case_alledged_crime, 0, 3) == 'yes') {
         echo '<tr><td><label for="input_alledged_crime">' . f_err_star('alledged_crime') . _T('case_input_alledged_crime') . "</label>" . ($case_alledged_crime == 'yes_mandatory' ? '<br/>(' . _T('keywords_input_policy_mandatory') . ')' : '') . "</td>\n";
         echo '<td>';
         echo '<textarea name="alledged_crime" id="input_alledged_crime" class="frm_tarea" rows="2" cols="60">';
         echo clean_output($this->getDataString('alledged_crime'));
         echo '</textarea>';
         echo "</td>\n";
         echo "</tr>\n";
     }
     // Keywords (if any)
     show_edit_keywords_form('case', $this->getDataInt('id_case'));
     $id_stage = 0;
     // new case, stage not yet known
     if ($this->getDataString('stage')) {
         $stage = get_kw_from_name('stage', $this->getDataString('stage', '__ASSERT__'));
         $id_stage = $stage['id_keyword'];
     }
     show_edit_keywords_form('stage', $this->getDataInt('id_case'), $id_stage);
     // Notes
     echo "<tr>\n";
     echo "<td><label for='input_case_notes'>" . f_err_star('case_notes') . _Ti('case_input_notes') . "</label></td>\n";
     echo '<td><textarea name="case_notes" id="input_case_notes" class="frm_tarea" rows="3" cols="60">' . clean_output($this->getDataString('notes')) . "</textarea>\n" . "</td>\n";
     echo "</tr>\n";
     // Case status
     echo '<tr><td><label for="input_status">' . f_err_star('status') . _Ti('case_input_status') . "</label></td>\n";
     echo '<td>';
     echo '<select name="status" id="input_status" class="sel_frm">' . "\n";
     $statuses = $this->getDataInt('id_case') ? array('draft', 'open', 'suspended', 'closed', 'merged') : array('draft', 'open');
     foreach ($statuses as $s) {
         $sel = $s == $this->getDataString('status') ? ' selected="selected"' : '';
         echo '<option value="' . $s . '"' . $sel . ">" . _T('case_status_option_' . $s) . "</option>\n";
     }
     echo "</select></td>\n";
     echo "</tr>\n";
     // Case stage
     if (!$this->getDataString('stage')) {
         $this->data['stage'] = get_suggest_in_group_name('stage');
     }
     $kws = get_keywords_in_group_name('stage');
     echo '<tr><td><label for="input_stage">' . f_err_star('stage') . _T('case_input_stage') . "</label></td>\n";
     echo '<td><select name="stage" id="input_stage" class="sel_frm">' . "\n";
     foreach ($kws as $kw) {
         $sel = $kw['name'] == $this->data['stage'] ? ' selected="selected"' : '';
         echo "\t\t\t\t<option value='" . $kw['name'] . "'" . "{$sel}>" . _T(remove_number_prefix($kw['title'])) . "</option>\n";
     }
     echo "</select></td>\n";
     echo "</tr>\n";
     // Public access rights
     // FIXME FIXME FIXME
     if ($this->data['admin'] || read_meta('case_read_always') != 'yes' || read_meta('case_write_always') != 'yes') {
         $dis = isDisabled(!allowed($this->getDataInt('id_case'), 'a'));
         echo '<tr><td colspan="2">' . _T('case_input_collaboration') . ' <br /><ul>';
         if (read_meta('case_read_always') != 'yes' || $GLOBALS['author_session']['status'] == 'admin') {
             echo '<li style="list-style-type: none;">';
             echo '<input type="checkbox" name="public" id="case_public_read" value="yes"';
             if ($_SESSION['form_data']['public']) {
                 echo ' checked="checked"';
             }
             echo "{$dis} />";
             echo '<label for="case_public_read">' . _T('case_input_collaboration_read') . "</label></li>\n";
         }
         if (read_meta('case_write_always') != 'yes' || _session('admin')) {
             echo '<li style="list-style-type: none;">';
             echo '<input type="checkbox" name="pub_write" id="case_public_write" value="yes"';
             if (_session('pub_write')) {
                 echo ' checked="checked"';
             }
//.........这里部分代码省略.........
开发者ID:nyimbi,项目名称:legalcase,代码行数:101,代码来源:inc_obj_case.php

示例15: printEdit

 function printEdit()
 {
     // Get site preferences
     $client_name_middle = read_meta('client_name_middle');
     $client_citizen_number = read_meta('client_citizen_number');
     $client_civil_status = read_meta('client_civil_status');
     $client_income = read_meta('client_income');
     $meta_date_birth = read_meta('client_date_birth');
     echo '<table width="99%" border="0" align="center" cellpadding="5" cellspacing="0" class="tbl_usr_dtl">' . "\n";
     if ($this->getDataInt('id_client')) {
         echo "<tr><td>" . _T('client_input_id') . "</td>\n";
         echo "<td>" . $this->getDataInt('id_client') . '<input type="hidden" name="id_client" value="' . $this->getDataInt('id_client') . '" /></td></tr>' . "\n";
     }
     // Client name
     echo '<tr><td>' . f_err_star('name_first') . _T('person_input_name_first') . '</td>' . "\n";
     echo '<td><input name="name_first" value="' . clean_output($this->getDataString('name_first')) . '" class="search_form_txt" /></td></tr>' . "\n";
     // [ML] always show middle name, if any, no matter the configuration
     if ($this->getDataString('name_middle') || substr($client_name_middle, 0, 3) == 'yes') {
         echo '<tr><td>' . f_err_star('name_middle') . _T('person_input_name_middle') . '</td>' . "\n";
         echo '<td><input name="name_middle" value="' . clean_output($this->getDataString('name_middle')) . '" class="search_form_txt" /></td></tr>' . "\n";
     }
     echo '<tr><td>' . f_err_star('name_last') . _T('person_input_name_last') . '</td>' . "\n";
     echo '<td><input name="name_last" value="' . clean_output($this->getDataString('name_last')) . '" class="search_form_txt" /></td></tr>' . "\n";
     if (substr($meta_date_birth, 0, 3) == 'yes') {
         echo "<tr>\n";
         echo "<td>" . f_err_star('date_birth') . _Ti('person_input_date_birth') . "</td>\n";
         echo "<td>" . get_date_inputs('date_birth', $this->getDataString('date_birth'), true) . "</td>\n";
         echo "</tr>\n";
     }
     echo '<tr><td>' . f_err_star('gender') . _T('person_input_gender') . '</td>' . "\n";
     echo '<td><select name="gender" class="sel_frm">' . "\n";
     $opt_sel_male = $opt_sel_female = $opt_sel_unknown = '';
     if ($this->getDataString('gender') == 'male') {
         $opt_sel_male = 'selected="selected" ';
     } else {
         if ($this->getDataString('gender') == 'female') {
             $opt_sel_female = 'selected="selected" ';
         } else {
             $opt_sel_unknown = 'selected="selected" ';
         }
     }
     echo '<option ' . $opt_sel_unknown . 'value="unknown">' . _T('info_not_available') . "</option>\n";
     echo '<option ' . $opt_sel_male . 'value="male">' . _T('person_input_gender_male') . "</option>\n";
     echo '<option ' . $opt_sel_female . 'value="female">' . _T('person_input_gender_female') . "</option>\n";
     echo "</select>\n";
     echo "</td></tr>\n";
     if ($this->getDataString('id_client')) {
         echo "<tr>\n";
         echo '<td>' . _Ti('time_input_date_creation') . '</td>';
         echo '<td>' . format_date($this->getDataString('date_creation'), 'full') . '</td>';
         echo "</tr>\n";
     }
     if (substr($client_citizen_number, 0, 3) == 'yes') {
         echo "<tr>\n";
         echo '<td>' . f_err_star('citizen_number') . _T('person_input_citizen_number') . '</td>';
         echo '<td><input name="citizen_number" value="' . clean_output($this->getDataString('citizen_number')) . '" class="search_form_txt" /></td>';
         echo "</tr>\n";
     }
     if (substr($client_civil_status, 0, 3) == 'yes') {
         echo "<tr>\n";
         echo '<td>' . f_err_star('civil_status') . _Ti('person_input_civil_status') . '</td>';
         echo '<td>';
         echo '<select name="civil_status">';
         if (!$this->getDataInt('id_client')) {
             echo '<option value=""></option>';
         }
         $kwg = get_kwg_from_name('civilstatus');
         $all_kw = get_keywords_in_group_name('civilstatus');
         // A bit overkill, but if the user made the error of not entering
         // a valid civil_status, make sure that the field stays empty
         if (!$this->getDataString('civil_status') || !count($_SESSION['errors'])) {
             if ($this->getDataInt('id_client')) {
                 $this->data['civil_status'] = $all_kw['unknown']['name'];
             } else {
                 $this->data['civil_status'] = $kwg['suggest'];
             }
         }
         foreach ($all_kw as $kw) {
             $sel = $this->getDataString('civil_status') == $kw['name'] ? ' selected="selected"' : '';
             echo '<option value="' . $kw['name'] . '"' . $sel . '>' . _T($kw['title']) . '</option>';
         }
         echo '</select>';
         echo '</td>';
         echo "</tr>\n";
     }
     if (substr($client_income, 0, 3) == 'yes') {
         echo "<tr>\n";
         echo '<td>' . f_err_star('income') . _Ti('person_input_income') . '</td>';
         echo '<td>';
         echo '<select name="income">';
         if (!$this->getDataInt('id_client')) {
             echo '<option value=""></option>';
         }
         $kwg = get_kwg_from_name('income');
         $all_kw = get_keywords_in_group_name('income');
         if (!$this->getDataString('income') && !count($_SESSION['errors'])) {
             if ($this->getDataInt('id_client')) {
                 $this->data['income'] = $all_kw['unknown']['name'];
             } else {
                 $this->data['income'] = $kwg['suggest'];
//.........这里部分代码省略.........
开发者ID:nyimbi,项目名称:legalcase,代码行数:101,代码来源:inc_obj_client.php


注:本文中的clean_output函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。