• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP instancierFormulaire函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: isset

        $smarty->display('inscriptions_fermes.html');
        die;
    }
}
//nombre possible d'inscrptions sur une même commande
$nombre_personnes = isset($_GET['nombre_personnes']) ? (int) $_GET['nombre_personnes'] : 5;
$nombre_tags = 3;
//nombre inscription choisi via js
$nombre_inscriptions = isset($_GET['nbInscriptions']) ? (int) $_GET['nbInscriptions'] : 1;
$smarty->assign('nbInscriptions', $nombre_inscriptions);
// On créé le formulaire
$action = '//' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'];
if (isset($_GET['action'])) {
    $action = $_GET['action'];
}
$formulaire =& instancierFormulaire($action);
$formulaire->setDefaults(array('civilite' => 'M.', 'id_pays_facturation' => 'FR', 'type_inscription' => -1, 'type_reglement' => -1));
for ($i = 1; $i <= $nombre_personnes; $i++) {
    $next = $i + 1;
    // Default values
    $formulaire->setDefaults(array('civilite' . $i => 'M.', 'type_inscription' . $i => -1));
    $formulaire->addElement('header', '', '<a name="inscription' . $i . '">Personne</a> ' . $i);
    $formulaire->addElement('select', 'civilite' . $i, 'Civilité', array('M.' => 'M.', 'Mme' => 'Mme', 'Mlle' => 'Mlle'));
    $formulaire->addElement('text', 'nom' . $i, 'Nom', array('size' => 30, 'maxlength' => 40, 'class' => 'span7'));
    $formulaire->addElement('text', 'prenom' . $i, 'Prénom', array('size' => 30, 'maxlength' => 40, 'class' => 'span7'));
    $formulaire->addElement('text', 'email' . $i, 'Email', array('size' => 30, 'maxlength' => 100, 'class' => 'span7'));
    $formulaire->addElement('text', 'telephone' . $i, 'Tél.', array('size' => 20, 'maxlength' => 20, 'class' => 'span7'));
    $groupe = array();
    if ($is_prevente) {
        $groupe[] =& HTML_QuickForm::createElement('radio', 'type_inscription' . $i, null, '2 jours en prévente : <strong>' . $AFUP_Tarifs_Forum[AFUP_FORUM_2_JOURNEES_PREVENTE] . ' € </strong> au lieu de ' . $AFUP_Tarifs_Forum[AFUP_FORUM_2_JOURNEES] . ' €', AFUP_FORUM_2_JOURNEES_PREVENTE);
        $groupe[] =& HTML_QuickForm::createElement('radio', 'type_inscription' . $i, null, '2 jours membre AFUP : <strong>' . $AFUP_Tarifs_Forum[AFUP_FORUM_2_JOURNEES_AFUP_PREVENTE] . ' € </strong>', AFUP_FORUM_2_JOURNEES_AFUP_PREVENTE);
开发者ID:agallou,项目名称:web,代码行数:31,代码来源:inscription.php


示例2: dirname

require_once dirname(__FILE__) . '/../../../sources/Afup/Bootstrap/Http.php';
require_once 'Afup/AFUP_Pays.php';
$pays = new AFUP_Pays($bdd);
require_once 'Afup/AFUP_Inscriptions_Forum.php';
$inscriptions = new AFUP_Inscriptions_Forum($bdd);
// S'il ne reste plus de place, on ne permet pas l'inscription
$nombre_places = 200;
// TODO : Mettre cela dans le fichier de configuration
/*$nombre_inscrits = $inscriptions->obtenirNombreInscrits();
if ($nombre_inscrits >= $nombre_places) {
    $smarty->display('inscriptions_completes.html');
    die();
}*/
// On créé le formulaire
$formulaire =& instancierFormulaire();
$formulaire->setDefaults(array('civilite' => 'M.', 'id_pays_facturation' => 'FR', 'type_inscription' => -1, 'type_reglement' => -1));
$formulaire->addElement('header', null, 'Informations');
$groupe = array();
$groupe[] =& HTML_QuickForm::createElement('radio', 'type_inscription', null, 'Journée fonctionnelle, mercredi 09 novembre 2005 : <strong>100,00 ' . EURO . '</strong>', AFUP_FORUM_PREMIERE_JOURNEE);
$groupe[] =& HTML_QuickForm::createElement('radio', 'type_inscription', null, 'Journée technique, jeudi 10 novembre 2005 : <strong>100,00 ' . EURO . '</strong>', AFUP_FORUM_DEUXIEME_JOURNEE);
$groupe[] =& HTML_QuickForm::createElement('radio', 'type_inscription', null, 'Deux jours : <strong>150,00 ' . EURO . '</strong>', AFUP_FORUM_2_JOURNEES);
$groupe[] =& HTML_QuickForm::createElement('radio', 'type_inscription', null, 'Deux jours (membre AFUP) : <strong>100,00 ' . EURO . '</strong>', AFUP_FORUM_2_JOURNEES_AFUP);
$groupe[] =& HTML_QuickForm::createElement('radio', 'type_inscription', null, 'Deux jours (étudiant) : <strong>100,00 ' . EURO . '</strong>', AFUP_FORUM_2_JOURNEES_ETUDIANT);
$formulaire->addGroup($groupe, 'groupe_type_inscription', 'Formule', '<br />', false);
$groupe = array();
$groupe[] =& HTML_QuickForm::createElement('radio', 'type_reglement', null, 'Carte bancaire', AFUP_FORUM_REGLEMENT_CARTE_BANCAIRE);
$groupe[] =& HTML_QuickForm::createElement('radio', 'type_reglement', null, 'Chèque', AFUP_FORUM_REGLEMENT_CHEQUE);
$formulaire->addGroup($groupe, 'groupe_type_reglement', 'Règlement', '&nbsp;', false);
$formulaire->addElement('select', 'civilite', 'Civilité', array('M.' => 'M.', 'Mme' => 'Mme', 'Mlle' => 'Mlle'));
$formulaire->addElement('text', 'nom', 'Nom', array('size' => 30, 'maxlength' => 40));
开发者ID:fferriere,项目名称:web,代码行数:30,代码来源:inscription.php


示例3: dirname

require_once dirname(__FILE__) . '/../../../sources/Afup/AFUP_Cotisations.php';
$assemblee_generale = new AFUP_Assemblee_Generale($bdd);
$cotisations = new AFUP_Cotisations($bdd);
$personnes_physiques = new AFUP_Personnes_Physiques($bdd);
$timestamp = $assemblee_generale->obternirDerniereDate();
$identifiant = $droits->obtenirIdentifiant();
$cotisation = $personnes_physiques->obtenirDerniereCotisation($identifiant);
if ($timestamp > strtotime("-1 day", time())) {
    $date_assemblee_generale = convertirTimestampEnDate($timestamp);
    $smarty->assign('date_assemblee_generale', $date_assemblee_generale);
    if ($timestamp > strtotime("+14 day", $cotisation['date_fin'])) {
        $smarty->assign('erreur', 'La date d\'échéance de votre dernière cotisation précède la date de la prochaine assemblée générale.<br/><br/>Vous ne pourrez donc pas voter lors de cette assemblée générale.<br/><br/>Vous pouvez dès à présent régler votre cotisation via <a href="/pages/administration/index.php?page=membre_cotisation">"Ma cotisation"</a>');
    } else {
        list($presence, $id_personne_avec_pouvoir) = $assemblee_generale->obtenirInfos($_SESSION['afup_login'], $timestamp);
        $assemblee_generale->marquerConsultation($_SESSION['afup_login'], $timestamp);
        $formulaire =& instancierFormulaire('index.php?page=membre_assemblee_generale');
        $formulaire->setDefaults(array('date' => date("d/m/Y", time()), 'presence' => $presence, 'id_personne_avec_pouvoir' => $id_personne_avec_pouvoir));
        $formulaire->addElement('header', '', 'Je serais présent(e)');
        $formulaire->addElement('radio', 'presence', 'Oui', '', AFUP_ASSEMBLEE_GENERALE_PRESENCE_OUI);
        $formulaire->addElement('radio', 'presence', 'Non', '', AFUP_ASSEMBLEE_GENERALE_PRESENCE_NON);
        $formulaire->addElement('radio', 'presence', 'Je ne sais pas encore', '', AFUP_ASSEMBLEE_GENERALE_PRESENCE_INDETERMINE);
        $formulaire->addElement('header', '', 'Je donne mon pouvoir à');
        $formulaire->addElement('select', 'id_personne_avec_pouvoir', 'Nom', array(null => '') + $assemblee_generale->obtenirPresents($timestamp));
        $formulaire->addElement('header', 'boutons', '');
        $formulaire->addElement('hidden', 'date', $timestamp);
        $formulaire->addElement('submit', 'soumettre', 'confirmer');
        if ($formulaire->validate()) {
            if ($action == 'modifier') {
                $ok = $assemblee_generale->modifier($_SESSION['afup_login'], $timestamp, $formulaire->exportValue('presence'), $formulaire->exportValue('id_personne_avec_pouvoir'));
            }
            if ($ok) {
开发者ID:fferriere,项目名称:web,代码行数:31,代码来源:membre_assemblee_generale.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP instantiate函数代码示例发布时间:2022-05-15
下一篇:
PHP instance_of函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap