本文整理汇总了PHP中HtmlInput::default_value_request方法的典型用法代码示例。如果您正苦于以下问题:PHP HtmlInput::default_value_request方法的具体用法?PHP HtmlInput::default_value_request怎么用?PHP HtmlInput::default_value_request使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HtmlInput
的用法示例。
在下文中一共展示了HtmlInput::default_value_request方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: die
// Copyright Author Dany De Bontridder danydb@aevalys.eu
if (!defined('ALLOWED')) {
die('Forbidden');
}
/*!\file
* \brief Management of the folder
*
*/
require_once NOALYSS_INCLUDE . '/class_itext.php';
require_once NOALYSS_INCLUDE . '/class_icheckbox.php';
require_once NOALYSS_INCLUDE . '/class_itextarea.php';
require_once NOALYSS_INCLUDE . '/class_html_input.php';
$sa = isset($_REQUEST['sa']) ? $_REQUEST['sa'] : 'list';
//---------------------------------------------------------------------------
// Update
$dossier_id = HtmlInput::default_value_request('d', -1);
if (isset($_POST['upd']) && isNumber($dossier_id) == 1 && $dossier_id != -1) {
$dos = new dossier($dossier_id);
$name = HtmlInput::default_value_post('name', "--vide--");
$desc = HtmlInput::default_value_post('desc', "--vide--");
$dos->set_parameter('name', $name);
$dos->set_parameter('desc', $desc);
$dos->save();
}
echo '<div class="content" style="width:80%;margin-left:10%">';
/*
* check and add an new folder
*/
if (isset($_POST["DATABASE"])) {
$repo = new Database();
$dos = HtmlInput::default_value_post('DATABASE', "");
示例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
">
<?php
echo '<h2>' . "Exercice " . $g_user->get_exercice() . '</h2>';
echo dossier::hidden();
$a = isset($_GET['query']) ? $_GET['query'] : "";
printf(_('Recherche') . ' <input class="input_text" type="text" name="query" value="%s">', $a);
echo HtmlInput::request_to_hidden(array('ac'));
$choice_cat = HtmlInput::default_value_request("choice_cat", 1);
if ($choice_cat == 1) {
$sel_card = new ISelect('cat');
$sel_card->value = $cn->make_array('select fd_id, fd_label from fiche_def ' . ' where frd_id=$1 ' . ' order by fd_label ', 1, array(FICHE_TYPE_ADM_TAX));
$sel_card->selected = isset($_GET['cat']) ? $_GET['cat'] : -1;
$sel_card->javascript = ' onchange="submit(this);"';
echo _('Catégorie :') . $sel_card->input();
} else {
$cat = HtmlInput::default_value_request('cat', '');
echo HtmlInput::hidden("cat", $cat);
echo HtmlInput::hidden('choice_cat', 0);
}
echo Dossier::hidden();
?>
<input type="submit" class="button" name="submit_query" value="<?php
echo _('recherche');
?>
">
<input type="hidden" name="p_action" value="adm">
</form>
</div>
<?php
$adm = new Admin($cn);
$search = isset($_GET['query']) ? $_GET['query'] : "";
示例4: Replace
//.........这里部分代码省略.........
$tva_amount = 0.0;
} else {
$tva_amount = ${$tva};
}
$sum += $tva_amount;
$sum = round($sum, 2);
}
$r = $sum;
break;
case 'BON_COMMANDE':
if (isset($p_array['bon_comm'])) {
return $p_array['bon_comm'];
} else {
return "";
}
break;
case 'PJ':
if (isset($p_array['e_pj'])) {
return $p_array['e_pj'];
} else {
return "";
}
case 'OTHER_INFO':
if (isset($p_array['other_info'])) {
return $p_array['other_info'];
} else {
return "";
}
break;
case 'COMMENT':
if (isset($p_array['e_comm'])) {
return $p_array['e_comm'];
}
break;
case 'ACOMPTE':
if (isset($p_array['acompte'])) {
return $p_array['acompte'];
}
return "0";
break;
case 'STOCK_NAME':
if (!isset($p_array['repo'])) {
return "";
}
$ret = $this->db->get_value('select r_name from public.stock_repository where r_id=$1', array($p_array['repo']));
return $ret;
case 'STOCK_ADRESS':
if (!isset($p_array['repo'])) {
return "";
}
$ret = $this->db->get_value('select r_adress from public.stock_repository where r_id=$1', array($p_array['repo']));
return $ret;
case 'STOCK_COUNTRY':
if (!isset($p_array['repo'])) {
return "";
}
$ret = $this->db->get_value('select r_country from public.stock_repository where r_id=$1', array($p_array['repo']));
return $ret;
case 'STOCK_CITY':
if (!isset($p_array['repo'])) {
return "";
}
$ret = $this->db->get_value('select r_city from public.stock_repository where r_id=$1', array($p_array['repo']));
return $ret;
case 'STOCK_PHONE':
if (!isset($p_array['repo'])) {
return "";
}
$ret = $this->db->get_value('select r_phone from public.stock_repository where r_id=$1', array($p_array['repo']));
return $ret;
case 'TITLE':
$title = HtmlInput::default_value_request("ag_title", "");
return $title;
}
/*
* retrieve the value of ATTR for e_march
*/
if (preg_match('/^ATTR/', $p_tag) == 1) {
// Retrieve f_id
if (isset($p_array['e_march' . $this->counter])) {
$id = $p_array['e_march' . $this->counter];
$r = $this->replace_special_tag($id, $p_tag);
}
}
/*
* retrieve the value of ATTR for e_march
*/
if (preg_match('/^BENEFATTR/', $p_tag) == 1) {
$qcode = isset($p_array['qcode_benef']) ? $p_array['qcode_benef'] : '';
// Retrieve f_id
$r = $this->replace_special_tag($qcode, $p_tag);
}
if (preg_match('/^CUSTATTR/', $p_tag) == 1) {
if (isset($p_array['qcode_dest']) || isset($p_array['e_client'])) {
$qcode = isset($p_array['qcode_dest']) ? $p_array['qcode_dest'] : $p_array['e_client'];
$r = $this->replace_special_tag($qcode, $p_tag);
}
}
return $r;
}
示例5: die
if (!defined('ALLOWED')) {
die('Appel direct ne sont pas permis');
}
echo '<div style="content">';
require_once NOALYSS_INCLUDE . '/class_anc_grandlivre.php';
$grandLivre = new Anc_Grandlivre($cn);
$grandLivre->get_request();
/*
* Form
*/
echo '<form method="get" >';
echo $grandLivre->display_form();
echo '<p>' . HtmlInput::submit('Recherche', _('Rechercher')) . '</p>';
echo HtmlInput::request_to_hidden(array('sa', 'ac', 'gDossier'));
echo '</form>';
$result = HtmlInput::default_value_request('result', null);
if ($result != null) {
$result = $grandLivre->display_html();
if ($grandLivre->has_data != 0) {
echo '<span style="display:block">';
echo _('Tout sélectionner') . " " . ICheckBox::toggle_checkbox('export_pdf_bt1', 'export_anc_receipt_pdf');
echo '</span>';
echo $grandLivre->show_button();
echo '<form method="GET" id="export_anc_receipt_pdf" action="export.php" style="display:inline">';
echo $grandLivre->button_export_pdf();
echo $grandLivre->display_html();
echo $grandLivre->button_export_pdf();
echo HtmlInput::get_to_hidden(array('ac', 'gDossier', 'sa'));
echo '</form>';
echo $grandLivre->show_button();
} else {
示例6: die
* @file
* @brief show the profile detail, included from ajax_misc.php
* @see ajax_misc.php scripts.js profile.inc.php
*
*/
if (!defined('ALLOWED')) {
die('Appel direct ne sont pas permis');
}
// Security
if ($g_user->check_module('CFGPRO') == 0) {
die;
}
require_once NOALYSS_INCLUDE . '/class_profile_sql.php';
require_once NOALYSS_INCLUDE . '/class_profile_menu.php';
require_once NOALYSS_INCLUDE . '/class_html_input.php';
$p_id = HtmlInput::default_value_request('p_id', -1);
$profile = new Profile_sql($cn, $p_id);
$gDossier = Dossier::id();
$add_impression = HtmlInput::button("add", _("Ajout Menu"), "onclick=\"add_menu({dossier:{$gDossier},p_id:{$p_id},type:'pr'})\"");
$call_tab = HtmlInput::default_value_post('tab', 'none');
$a_tab = array('profile_gen_div' => 'tabs', 'profile_menu_div' => 'tabs', 'profile_print_div' => 'tabs', 'profile_gestion_div' => 'tabs', 'profile_repo_div' => 'tabs');
$a_tab[$call_tab] = 'tabs_selected';
?>
<h1>Profil <?php
echo $profile->p_name;
?>
</h1>
<?php
echo HtmlInput::anchor(_('Retour'), "", " onclick = \" \$('detail_profile').hide();\$('list_profile').show(); \" ", 'class="line"');
if ($p_id > 0) {
?>
示例7: Acc_Ledger_Sold
$ask_pay = 0;
$p_array['ledger_type'] = 'ALL';
$Ledger->type = 'ALL';
break;
case 'VEN':
$Ledger = new Acc_Ledger_Sold($cn, 0);
$ask_pay = 1;
break;
case 'FIN':
$Ledger = new Acc_Ledger_Fin($cn, 0);
$ask_pay = 0;
break;
}
echo '<div class="content">';
// Check privilege
$p_jrn = HtmlInput::default_value_request("p_jrn", -1);
if (isset($_REQUEST['p_jrn']) && $g_user->check_jrn($_REQUEST['p_jrn']) == 'X') {
NoAccess();
exit - 1;
}
$Ledger->id = $p_jrn;
echo $Ledger->display_search_form();
//------------------------------
// UPdate the payment
//------------------------------
if (isset($_GET['paid'])) {
$Ledger->update_paid($_GET);
}
$msg = "";
/* by default we should use the default period */
if (!isset($p_array['date_start'])) {
示例8: die
*
* You should have received a copy of the GNU General Public License
* along with NOALYSS; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
// Copyright Author Dany De Bontridder danydb@aevalys.eu
/*! \file
* \brief Send the poste list in csv
*/
if (!defined('ALLOWED')) {
die('Appel direct ne sont pas permis');
}
include_once "ac_common.php";
require_once NOALYSS_INCLUDE . '/class_database.php';
require_once NOALYSS_INCLUDE . '/class_fiche.php';
$f_id = HtmlInput::default_value_request("f_id", "-");
if ($f_id == "-") {
throw new Exception('Invalid parameter');
}
require_once NOALYSS_INCLUDE . '/class_dossier.php';
$gDossier = dossier::id();
/* Admin. Dossier */
$cn = new Database($gDossier);
$Fiche = new Fiche($cn, $f_id);
$qcode = $Fiche->get_quick_code();
header('Content-type: application/csv');
header('Pragma: public');
header('Content-Disposition: attachment;filename="fiche-' . $qcode . '.csv"', FALSE);
$Fiche->getName();
list($array, $tot_deb, $tot_cred) = $Fiche->get_row_date($_GET['from_periode'], $_GET['to_periode'], $_GET['ople']);
if (count($Fiche->row) == 0) {
示例9: die
*/
if (!defined('ALLOWED')) {
die('Appel direct ne sont pas permis');
}
require_once NOALYSS_INCLUDE . '/class_iselect.php';
require_once NOALYSS_INCLUDE . '/class_icheckbox.php';
require_once NOALYSS_INCLUDE . '/class_ihidden.php';
require_once NOALYSS_INCLUDE . '/class_database.php';
require_once NOALYSS_INCLUDE . '/ac_common.php';
require_once NOALYSS_INCLUDE . '/class_pre_operation.php';
/*
* Value from $_GET or $_REQUEST
*/
$request_jrn = HtmlInput::default_value_request("jrn", -1);
$request_ac = HtmlInput::default_value_request("ac", "");
$request_sa = HtmlInput::default_value_request("sa", "");
$get_jrn = HtmlInput::default_value_get('jrn', -1);
echo '<div class="content">';
echo '<form method="GET">';
$sel = new ISelect();
$sel->name = "jrn";
$sel->value = $cn->make_array("select jrn_def_id,jrn_def_name from " . " jrn_def where jrn_def_type in ('VEN','ACH','ODS') order by jrn_def_name");
// Show a list of ledger
$sel->selected = $request_jrn;
echo 'Choisissez un journal ' . $sel->input();
echo dossier::hidden();
$hid = new IHidden();
echo $hid->input("sa", "jrn");
echo $hid->input("ac", $request_ac);
echo '<hr>';
echo HtmlInput::submit('Accepter', 'Accepter');
示例10: Database
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
// Copyright Author Dany De Bontridder danydb@aevalys.eu
require_once '../include/constant.php';
require_once "constant.php";
require_once 'class_database.php';
require_once "class_user.php";
require_once 'ac_common.php';
$rep = new Database();
$User = new User($rep);
$User->Check();
if ($User->admin != 1) {
echo "<script>alert('" . _("Vous n\\'êtes pas administrateur") . "') </script>";
return;
}
$dossier_number = HtmlInput::default_value_request("d", 0);
if ($dossier_number == 0 || isNumber($dossier_number) == 0) {
die('Invalid folder number');
}
/*!\file
* \brief Make and restore backup
*/
if (isset($_REQUEST['sa'])) {
if (defined('PG_PATH')) {
putenv("PATH=" . PG_PATH);
}
if (!isset($_REQUEST['t'])) {
echo "Erreur : paramètre manquant ";
exit;
}
$sa = $_REQUEST['sa'];
示例11: elseif
Merci d'utiliser NOALYSS
Cordialement,
Noalyss team
EOF;
$mail->set_message($message);
$mail->compose();
$mail->send();
echo '<p style="position:absolute;z-index:2;top:25px;left: 50px; background-color:whitesmoke;">
L\'email a été envoyé avec un lien et le nouveau mot de passe, vérifiez vos spams</p>';
}
} elseif ($action == "req") {
$request_id = HtmlInput::default_value_request("req", "");
if (strlen(trim($request_id)) == SIZE_REQUEST) {
require_once NOALYSS_INCLUDE . '/class_database.php';
$cn = new Database(0);
$value = $cn->get_value("select password from recover_pass where request=\$1 and created_on > now() - interval '12 hours' and recover_on is null", array($request_id));
if ($cn->get_affected() > 0) {
$cn->exec_sql("update ac_users set use_pass=md5(rp.password) from recover_pass as rp where rp.use_id=ac_users.use_id and request=\$1", array($request_id));
$cn->exec_sql("update recover_pass set recover_by=\$1 , recover_on=now() where request=\$2", array($_SERVER['REMOTE_ADDR'], $request_id));
?>
<p style="position:absolute;z-index:2;top:25px;left: 50px; background-color:whitesmoke;">
Opération réussie , vous pouvez vous connecter avec votre nouveau mot de passe
</p>
<?php
}
} else {