本文整理汇总了PHP中HtmlInput类的典型用法代码示例。如果您正苦于以下问题:PHP HtmlInput类的具体用法?PHP HtmlInput怎么用?PHP HtmlInput使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了HtmlInput类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: sub_menu
/**
* Display the content of a profile menu for printing
* @param type $resource
* @param type $p_id
*/
function sub_menu($resource, $p_id)
{
if (Database::num_row($resource) != 0) {
////
// If there are submenus
$gDossier = dossier::id();
echo '<td>';
for ($e = 0; $e < Database::num_row($resource); $e++) {
$menu = Database::fetch_array($resource, $e);
$me_code = $menu['me_code'];
$me_code_dep = $menu['me_code_dep'];
$mp_type = $menu['p_type_display'];
$me_menu = $menu['me_menu'];
$me_desc = $menu['me_description'];
$me_def = $menu['pm_default'] == '1' ? '<span class="notice" style="display:inline">Défaut</span>' : '';
?>
<li id="sub<?php
echo $menu['pm_id'];
?>
">
<?php
echo $me_menu;
?>
<?php
echo $me_desc;
?>
<?php
echo $me_def;
?>
<?php
$ret2 = $this->cn->exec_sql("\n SELECT pm_id,\n pm.me_code,\n me_code_dep,\n p_id,\n p_order,\n p_type_display,\n pm_default,\n pm_desc,\n me_menu,\n me_description\n FROM profile_menu as pm\n join profile_menu_type on (p_type_display=pm_type)\n join menu_ref as mr on (mr.me_code=pm.me_code)\n where\n p_id=\$1 and me_code_dep=\$2\n order by p_order asc\n ", array($p_id, $me_code));
?>
<span>
<?php
echo HtmlInput::anchor(SMALLX, "", sprintf(" onclick = \"remove_sub_menu(%d,%d)\"", Dossier::id(), $menu['pm_id']), 'class="tinybutton"');
?>
</span>
<?php
echo "</li>";
}
//end loop e
echo '</ul>';
}
// end if
}
示例2: switch
$op = HtmlInput::default_value_request("op", "list");
switch ($op) {
case 'list':
Anc_Key::display_list();
Anc_Key::key_add();
break;
case 'consult':
$id = HtmlInput::default_value_request("key", "0");
if (isNumber($id) == 0 || $id == 0) {
die(_('Clef invalide'));
}
$key = new Anc_Key($id);
if (isset($_POST['save_key'])) {
try {
$key->save($_POST);
Anc_Key::display_list();
Anc_Key::key_add();
break;
} catch (Exception $e) {
echo span($e->getMessage(), ' class="notice"');
}
}
$key->input();
break;
case 'delete_key':
$id = HtmlInput::default_value_request("key", "0");
$key = new Anc_Key($id);
$key->delete();
Anc_Key::display_list();
Anc_Key::key_add();
}
示例3: isset
global $g_user;
$retour = HtmlInput::button_anchor(_('Retour liste'), HtmlInput::request_to_string(array("closed_action", "remind_date_end", "remind_date", "sag_ref", "only_internal", "state", "ac", "gDossier", "qcode", "ag_dest_query", "action_query", "tdoc", "date_start", "date_end", "hsstate", "searchtag")), "", "", "smallbutton");
//-----------------------------------------------------
// Follow_Up
//-----------------------------------------------------
require_once NOALYSS_INCLUDE . '/class_icard.php';
require_once NOALYSS_INCLUDE . '/class_ispan.php';
require_once NOALYSS_INCLUDE . '/class_ifile.php';
require_once NOALYSS_INCLUDE . '/class_itext.php';
require_once NOALYSS_INCLUDE . '/class_follow_up.php';
/*!\brief Show the list of action, this code should be common
* to several webpage. But for the moment we keep like that
* because it is used only by this file.
*\param $cn database connection
* \param $retour button for going back
* \param $h_url calling url
*/
// We need a sub action (3rd level)
// show a list of already taken action
// propose to add one
// permit also a search
// show detail
$sub_action = isset($_REQUEST['sa']) ? $_REQUEST['sa'] : "";
/* if ag_id is set then we give it otherwise we have problem
* with the generation of document
*/
$ag_id = isset($_REQUEST['ag_id']) ? $_REQUEST['ag_id'] : 0;
$ac = $_REQUEST['ac'];
$base = HtmlInput::request_to_string(array('ac', 'gDossier'), "");
require_once NOALYSS_INCLUDE . '/action.common.inc.php';
echo "</div>";
示例4: list
// Count nb of line
$max_line = $cn->count_sql($sql);
list($count, $a) = $ledger->list_operation($sql, $offset, 0);
$bar = navigation_bar($offset, $max_line, $step, $page);
echo $bar;
echo $a;
echo $bar;
/*
* Export to csv
*/
$r = HtmlInput::get_to_hidden(array('l', 'date_start', 'date_end', 'desc', 'amount_min', 'amount_max', 'qcode', 'accounting', 'unpaid', 'gDossier', 'ledger_type'));
if (isset($_GET['r_jrn'])) {
foreach ($_GET['r_jrn'] as $k => $v) {
$r .= HtmlInput::hidden('r_jrn[' . $k . ']', $v);
}
}
echo '<form action="export.php" method="get">';
echo $r;
echo HtmlInput::hidden('act', 'CSV:histo');
echo HtmlInput::submit('viewsearch', _('Export vers CSV'));
echo HtmlInput::hidden('p_action', 'ALL');
?>
<input type="button" class="smallbutton" onclick="window.close()" value="<?php
echo _('Fermer');
?>
">
<?php
echo '</form>';
}
echo '</div>';
示例5: _
</td>
</tr>
<tr>
<td> <?php
echo _("Montant inférieur ou égal à");
?>
</td>
<td> <?php
echo $wamount_end->input();
?>
</td>
</tr>
<tr>
<td> <?php
echo _("Direction");
?>
</td>
<td> <?php
echo $wdirection->input();
?>
</td>
</tr>
</table>
<?php
echo HtmlInput::submit("search_histo_b", _("Recherche"));
?>
</form>
</div>
示例6: _
$last--;
}
}
echo $last;
?>
</td>
</tr>
<tr>
<td>
<?php
echo _("Redémarrer la séquence (laisser à 0 pour ne pas changer)");
?>
</td>
<td>
<?php
$pj = new INum('seq');
$pj->value = 0;
echo $pj->input();
?>
</td>
</tr>
</table>
<?php
echo HtmlInput::hidden('p_action', 'document');
echo dossier::hidden();
echo HtmlInput::hidden('sa', 'mod_template');
echo HtmlInput::hidden('id', $doc->md_id);
echo HtmlInput::submit("mod", _('Sauver'));
?>
</form>
示例7: hb
$sub_action = "list";
$cn->commit();
Follow_Up::show_action_list($cn, $base);
if (isset($act->ag_ref)) {
echo hb(_('Action ') . $act->ag_ref . _(' effacée'));
}
return;
}
//--------------------------------------------------------------------------------
// Show a list of the action
if ($sub_action == "list") {
// Add a button to export to Csv
echo '<form method="GET" style="display:inline;" ACTION="export.php">';
echo HtmlInput::request_to_hidden(array("closed_action", "remind_date_end", "remind_date", "sag_ref", "remind_date", "only_internal", "state", "gDossier", "qcode", "start_date", "end_date", "ag_id", "ag_dest_query", "tdoc", "action_query", "date_start", "date_end", "hsstate", "searchtag"));
echo HtmlInput::hidden("act", "CSV:ActionGestion");
echo HtmlInput::submit("follow_up_csv", "Export CSV", '', 'smallbutton');
echo "</form>";
Follow_Up::show_action_list($cn, $base);
}
//--------------------------------------------------------------------------------
// Save Follow_Up
// Stage 2 : Save a NEW action + Files and generate eventually a document
//--------------------------------------------------------------------------------
if ($sub_action == "save_action_st2") {
$act = new Follow_Up($cn);
$act->fromArray($_POST);
try {
$act->d_id = 0;
$act->md_id = isset($_POST['gen_doc']) ? $_POST['gen_doc'] : 0;
$act->verify();
// insert into action_gestion
示例8: _
$msg = '<span class="notice">' . _("Attention : effacera les données qui y sont liées") . ' </span>';
$r .= td($remove->input() . $msg);
} else {
$select_type->readOnly = true;
$desc->readOnly = true;
$size->readOnly = true;
$extra->readOnly = true;
$r .= td($desc->input() . HtmlInput::hidden('type[]', ''));
$r .= td($select_type->input());
$r .= td($size->input());
$r .= td($extra->input());
$r .= td("");
}
echo tr($r);
}
$desc->readOnly = false;
$select_type->readOnly = false;
$size->readOnly = false;
$extra->readOnly = false;
$desc->value = '';
$select_type->selected = -1;
$r = td(HtmlInput::hidden('ad_id[]', '0'));
$r .= td($desc->input());
$r .= td($select_type->input());
$r .= td($size->input());
$r .= td($extra->input());
echo tr($r);
echo '</table>';
echo HtmlInput::submit('save', _('Sauver'));
echo '</form>';
echo '</div>';
示例9: test_me
static function test_me()
{
if (isset($_GET['result'])) {
ob_start();
$cn = new Database(dossier::id());
$a = new Acc_Bilan($cn);
$a->get_request_get();
$a->load();
$form = $a->file_open_form();
$a->compute_formula($form);
fclose($form);
// open the form
$templ = $a->file_open_template();
$r = $a->generate_odt($templ);
fclose($templ);
ob_end_clean();
$a->send($r);
} else {
$cn = new Database(dossier::id());
$a = new Acc_Bilan($cn);
$a->get_request_get();
echo '<form method="get">';
echo $a->display_form();
echo HtmlInput::hidden('test_select', $_GET['test_select']) . dossier::hidden();
echo HtmlInput::submit('result', 'Sauve');
echo '</form>';
}
}
示例10: show_button
function show_button($p_string = "")
{
$r = "";
$r .= '<form method="GET" action="export.php" style="display:inline">';
$r .= $p_string;
$r .= HtmlInput::hidden("to", $this->to);
$r .= HtmlInput::hidden("act", "PDF:AncBalDouble");
$r .= HtmlInput::hidden("from", $this->from);
$r .= HtmlInput::hidden("pa_id", $this->pa_id);
$r .= HtmlInput::hidden("from_poste", $this->from_poste);
$r .= HtmlInput::hidden("to_poste", $this->to_poste);
$r .= HtmlInput::hidden("pa_id2", $this->pa_id2);
$r .= HtmlInput::hidden("from_poste2", $this->from_poste2);
$r .= HtmlInput::hidden("to_poste2", $this->to_poste2);
$r .= dossier::hidden();
$r .= HtmlInput::submit('bt_pdf', "Export en PDF");
$r .= '</form>';
$r .= '<form method="GET" action="export.php" style="display:inline">';
$r .= HtmlInput::hidden("to", $this->to);
$r .= HtmlInput::hidden("act", "CSV:AncBalDouble");
$r .= HtmlInput::hidden("from", $this->from);
$r .= HtmlInput::hidden("pa_id", $this->pa_id);
$r .= HtmlInput::hidden("from_poste", $this->from_poste);
$r .= HtmlInput::hidden("to_poste", $this->to_poste);
$r .= HtmlInput::hidden("pa_id2", $this->pa_id2);
$r .= HtmlInput::hidden("from_poste2", $this->from_poste2);
$r .= HtmlInput::hidden("to_poste2", $this->to_poste2);
$r .= $p_string;
$r .= dossier::hidden();
$r .= HtmlInput::submit('bt_csv', "Export en CSV");
$r .= '</form>';
return $r;
}
示例11: extract
//echo $w->input($sa,'sa');
echo "</form>";
echo "</TD>";
echo '</TR>';
}
echo "</table>";
// modify input
if (isset($_POST['mod'])) {
extract($_POST);
echo '<div style="float:left;padding:2%">';
echo _("Voulez-vous modifier ?");
echo "<br><font color=\"red\"> ";
echo _("Attention, ne changer pas la signification de ce poste.");
echo hi(_("par exemple ne pas changer Client par fournisseur")) . "<br>";
echo _("sinon le programme fonctionnera mal, " . "utiliser uniquement des chiffres pour la classe de base ou rien") . "</font>";
$mod = new Fiche_Def_Ref($cn);
$mod->frd_id = $idx;
$mod->Get();
echo '<form method="post">';
echo '<ul style="list-style-type:none"';
echo $mod->Input();
echo "</ul>";
$w = new IHidden();
echo $w->input('ac', $_REQUEST['ac']);
// echo $w->input('sa',$sa);
echo HtmlInput::submit('confirm_mod', 'Confirme');
echo HtmlInput::submit('no', 'Cancel');
echo '</form>';
echo '</div>';
}
echo '</div>';
示例12: IDate
<form method="post">
<?php
$wDate = new IDate('p_date_todo');
$wDate->id = 'p_date_todo';
$wTitle = new IText('p_title');
$wDesc = new ITextArea('p_desc');
$wDesc->heigh = 5;
$wDesc->width = 40;
echo HtmlInput::title_box("Note", "add_todo_list", "hide");
echo _("Date") . " " . $wDate->input() . '<br>';
echo _("Titre") . " " . $wTitle->input() . '<br>';
echo _("Description") . "<br>" . $wDesc->input() . '<br>';
echo dossier::hidden();
echo HtmlInput::hidden('tl_id', 0);
echo HtmlInput::submit('save_todo_list', _('Sauve'), 'onClick="Effect.Fold(\'add_todo_list\');return true;"');
echo HtmlInput::button('hide', _('Annuler'), 'onClick="Effect.Fold(\'add_todo_list\');return true;"');
?>
</form>
</div>
<script type="text/javascript" language="javascript" charset="utf-8">
function display_detail(div) {
$(div).style.display="block";
// $(div).style.top=calcy('150')+'px';
//Effect.Grow(div,{});
}
try {
var array=Array('customer_now_div','customer_late_div','supplier_now_div','supplier_late_div','action_now_div','action_late_div');
var i=0;
for (i=0;i < array.length;i++) {
new Draggable(array[i],{});
示例13: ITextarea
echo "Nom =" . $name->input();
$opd_description = new ITextarea('od_description');
$opd_description->style = ' class="itextarea" style="width:30em;height:4em;vertical-align:top"';
$opd_description->value = $op->od_description;
echo '<p>';
echo _("Description (max 50 car.)");
echo $opd_description->input();
echo '</p>';
echo dossier::hidden() . HtmlInput::hidden('od_id', $_GET['id']);
echo "<hr>";
//////////////////////////////////////////////////////////////////////////////
// Detail operation
//////////////////////////////////////////////////////////////////////////////
echo $op->display();
echo HtmlInput::submit('save', _('Sauve'));
echo HtmlInput::button('close', _('Annuler'), 'onclick="removeDiv(\'mod_predf_op\')"');
echo '</form>';
$html1 = ob_get_contents();
ob_end_clean();
$html = escape_xml($html1);
if (headers_sent()) {
echo $html1;
} else {
header('Content-type: text/xml; charset=UTF-8');
}
echo <<<EOF
<?xml version="1.0" encoding="UTF-8"?>
<data>
<ctl>mod_predf_op</ctl>
<code>{$html}</code>
</data>
示例14: test_me
function test_me()
{
$cn = new Database(dossier::id());
$anco = new Anc_Operation($cn);
$j_id = 200;
$anco->j_id = $j_id;
$array = $anco->get_by_jid($j_id);
$a = $anco->to_request($array, 1);
echo '<form>';
echo dossier::hidden();
echo HtmlInput::hidden('j_id', $j_id);
echo HtmlInput::hidden('test_select', $_REQUEST['test_select']);
echo $anco->display_table(1, 15002, 0);
echo '<input type="submit" name="save">';
echo '</form>';
if (isset($_REQUEST['save'])) {
echo "to_save";
var_dump($_REQUEST);
}
var_dump($a);
}
示例15: show_button
function show_button($p_url)
{
$value = $this->db->get_array("select od_id,od_name,od_description from op_predef " . " where jrn_def_id=\$1" . " and od_direct =\$2" . " order by od_name", array($this->jrn_def_id, $this->od_direct));
if ($this->jrn_def_id == '') {
$value = array();
}
$r = "";
$r .= '<h2>' . _("Choisissez un modèle") . '</h2>';
$r .= _('Filtrer') . ' ' . HtmlInput::filter_table('modele_op_tab', '0', '0');
$r .= '<table style="width:100%" id="modele_op_tab">';
for ($i = 0; $i < count($value); $i++) {
$r .= '<tr class="' . ($i % 2 == 0 ? "even" : "odd") . '">';
$r .= '<td style="font-weight:bold;vertical-align:top;text-decoration:underline">';
$r .= sprintf('<a href="%s&pre_def=%s" onclick="waiting_box()">%s</a> ', $p_url, $value[$i]['od_id'], $value[$i]['od_name']);
$r .= '</td>';
$r .= '<td>' . h($value[$i]['od_description']) . '</td>';
$r .= '</tr>';
}
$r .= '</table>';
return $r;
}