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


PHP Horde_Util::pformInput方法代码示例

本文整理汇总了PHP中Horde_Util::pformInput方法的典型用法代码示例。如果您正苦于以下问题:PHP Horde_Util::pformInput方法的具体用法?PHP Horde_Util::pformInput怎么用?PHP Horde_Util::pformInput使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Horde_Util的用法示例。


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

示例1: display

    /**
     * Renders this page in display mode.
     *
     * @throws Wicked_Exception
     */
    public function display()
    {
        $version = Horde_Util::getFormData('version');
        $page = Wicked_Page::getPage($this->referrer(), $version);
        $msg = sprintf(_("Are you sure you want to revert to version %s of this page?"), $version);
        ?>
<form method="post" name="revertform" action="<?php 
        echo Wicked::url('RevertPage');
        ?>
">
<?php 
        Horde_Util::pformInput();
        ?>
<input type="hidden" name="page" value="RevertPage" />
<input type="hidden" name="actionID" value="special" />
<input type="hidden" name="version" value="<?php 
        echo htmlspecialchars($version);
        ?>
" />
<input type="hidden" name="referrer" value="<?php 
        echo htmlspecialchars($page->pageName());
        ?>
" />

<h1 class="header">
 <?php 
        echo _("Revert Page") . ': ' . Horde::link($page->pageUrl(), $page->pageName()) . $page->pageName() . '</a>';
        if ($page->isLocked()) {
            echo Horde::img('locked.png', _("Locked"));
        }
        ?>
</h1>

<div class="headerbox" style="padding:4px">
 <p><?php 
        echo $msg;
        ?>
</p>
 <p>
  <input type="submit" value="<?php 
        echo _("Revert");
        ?>
" class="horde-default" />
  <a class="horde-cancel" href="<?php 
        echo Wicked::url($page->pageName());
        ?>
"><?php 
        echo _("Cancel");
        ?>
</a>
 </p>
</div>

</form>
<?php 
    }
开发者ID:jubinpatel,项目名称:horde,代码行数:61,代码来源:RevertPage.php

示例2: _init

 /**
  */
 protected function _init()
 {
     global $injector, $notification;
     /* Redirect if forward is not available. */
     $this->_assertCategory('Ingo_Rule_System_Forward', _("Forward"));
     if ($this->vars->submitbutton == _("Return to Rules List")) {
         Ingo_Basic_Filters::url()->redirect();
     }
     /* Get the forward object and rule. */
     $ingo_storage = $injector->getInstance('Ingo_Factory_Storage')->create();
     $forward = $ingo_storage->getSystemRule('Ingo_Rule_System_Forward');
     /* Build form. */
     $form = new Ingo_Form_Forward($this->vars);
     /* Perform requested actions. Ingo_Form_Forward does token checking
      * for us. */
     if ($form->validate($this->vars)) {
         $forward->addresses = $this->vars->addresses;
         $forward->keep = $this->vars->keep_copy == 'on';
         try {
             if ($this->vars->submitbutton == _("Save and Enable")) {
                 $forward->disable = true;
                 $notify = _("Rule Enabled");
             } elseif ($this->vars->submitbutton == _("Save and Disable")) {
                 $forward->disable = false;
                 $notify = _("Rule Disabled");
             } else {
                 $notify = _("Changes saved.");
             }
             $ingo_storage->updateRule($forward);
             $notification->push($notify, 'horde.success');
             $injector->getInstance('Ingo_Factory_Script')->activateAll();
         } catch (Ingo_Exception $e) {
             $notification->push($e);
         }
     }
     /* Add buttons depending on the above actions. */
     $form->setCustomButtons($forward->disable);
     /* Set default values. */
     if (!$form->isSubmitted()) {
         $this->vars->keep_copy = $forward->keep;
         $this->vars->addresses = implode("\n", $forward->addresses);
     }
     /* Set form title. */
     $form_title = _("Forward");
     if ($forward->disable) {
         $form_title .= ' [<span class="horde-form-error">' . _("Disabled") . '</span>]';
     }
     $form_title .= ' ' . Horde_Help::link('ingo', 'forward');
     $form->setTitle($form_title);
     $this->header = _("Forwards Edit");
     Horde::startBuffer();
     Horde_Util::pformInput();
     $form->renderActive(new Horde_Form_Renderer(array('encode_title' => false, 'varrenderer_driver' => array('ingo', 'ingo'))), $this->vars, self::url(array('append_session' => -1)), 'post');
     $this->output = Horde::endBuffer();
 }
开发者ID:raz0rsdge,项目名称:horde,代码行数:57,代码来源:Forward.php

示例3: _

if ($file_upload) {
    ?>
<input type="hidden" id="kronolithCalendarinternalImportCal" name="importCal" />
<input type="hidden" name="MAX_FILE_SIZE" value="<?php 
    echo $file_upload;
    ?>
" />
<input type="hidden" id="kronolithCalendarinternalImportAction" name="actionID" value="<?php 
    echo Horde_Data::IMPORT_FILE;
    ?>
" />
<input type="hidden" name="import_step" value="1" />
<input type="hidden" name="import_format" value="icalendar" />
<input type="hidden" name="import_ajax" value="1" />
<?php 
    Horde_Util::pformInput();
}
?>

<div class="kronolithCalendarDiv" id="kronolithCalendarinternal1">
<div>
  <label><?php 
echo _("Calendar title");
?>
:<br />
    <input type="text" name="name" id="kronolithCalendarinternalName" class="kronolithLongField" />
  </label>
</div>

<div>
  <label><?php 
开发者ID:jubinpatel,项目名称:horde,代码行数:31,代码来源:calendar.php

示例4: display

    /**
     * Render this page in Display mode.
     *
     * @throws Wicked_Exception
     */
    public function display()
    {
        $version = Horde_Util::getFormData('version');
        $page = Wicked_Page::getPage($this->referrer(), $version);
        if (!$page->isValid()) {
            Wicked::url('Wiki/Home', true)->redirect();
        }
        if (empty($version)) {
            $msg = _("Are you sure you want to delete this page? All versions will be permanently removed.");
        } else {
            $msg = sprintf(_("Are you sure you want to delete version %s of this page?"), $page->version());
        }
        ?>
<form method="post" name="deleteform" action="<?php 
        echo Wicked::url('DeletePage');
        ?>
">
<?php 
        Horde_Util::pformInput();
        ?>
<input type="hidden" name="page" value="DeletePage" />
<input type="hidden" name="actionID" value="special" />
<input type="hidden" name="version" value="<?php 
        echo htmlspecialchars($version);
        ?>
" />
<input type="hidden" name="referrer" value="<?php 
        echo htmlspecialchars($page->pageName());
        ?>
" />

<h1 class="header">
 <?php 
        echo _("Delete Page") . ': ' . Horde::link($page->pageUrl()) . htmlspecialchars($page->pageName()) . '</a> ';
        if ($page->isLocked()) {
            echo Horde::img('locked.png', _("Locked"));
        }
        ?>
</h1>

<div class="headerbox" style="padding:4px">
 <p><?php 
        echo $msg;
        ?>
</p>
 <p>
  <input type="submit" value="<?php 
        echo _("Delete");
        ?>
" class="horde-delete" />
  <a class="horde-cancel" href="<?php 
        echo Wicked::url($page->pageName());
        ?>
"><?php 
        echo _("Cancel");
        ?>
</a>
 </p>
</div>

</form>
<?php 
    }
开发者ID:horde,项目名称:horde,代码行数:68,代码来源:DeletePage.php

示例5: open

 function open($action, $method, $name, $enctype = null)
 {
     $this->_name = $name;
     $name = htmlspecialchars($name);
     $action = htmlspecialchars($action);
     $method = htmlspecialchars($method);
     echo "<form action=\"{$action}\" method=\"{$method}\"" . (empty($name) ? '' : " name=\"{$name}\" id=\"{$name}\"") . (is_null($enctype) ? '' : " enctype=\"{$enctype}\"") . ">\n";
     Horde_Util::pformInput();
 }
开发者ID:jubinpatel,项目名称:horde,代码行数:9,代码来源:Renderer.php

示例6: _init

 /**
  */
 protected function _init()
 {
     global $injector, $notification;
     $this->_assertCategory('Ingo_Rule_System_Spam', _("Spam filtering"));
     if ($this->vars->submitbutton == _("Return to Rules List")) {
         Ingo_Basic_Filters::url()->redirect();
     }
     /* Get the spam object and rule. */
     $ingo_storage = $injector->getInstance('Ingo_Factory_Storage')->create();
     $spam = $ingo_storage->getSystemRule('Ingo_Rule_System_Spam');
     /* Build form. */
     $form = new Ingo_Form_Spam($this->vars);
     $renderer = new Horde_Form_Renderer(array('encode_title' => false, 'varrenderer_driver' => array('ingo', 'ingo')));
     /* Perform requested actions. Ingo_Form_Spam does token checking for
      * us .*/
     if ($form->validate($this->vars)) {
         $success = false;
         try {
             $spam->mailbox = $this->validateMbox('folder');
             $success = true;
         } catch (Horde_Exception $e) {
             $notification->push($e);
         }
         $spam->level = $this->vars->level;
         try {
             if ($this->vars->submitbutton == _("Save and Enable")) {
                 $spam->disable = false;
                 $notify = _("Rule Enabled");
             } elseif ($this->vars->submitbutton == _("Save and Disable")) {
                 $spam->disable = true;
                 $notify = _("Rule Disabled");
             } else {
                 $notify = _("Changes saved.");
             }
             $ingo_storage->updateRule($spam);
             $notification->push($notify, 'horde.success');
             $injector->getInstance('Ingo_Factory_Script')->activateAll();
         } catch (Ingo_Exception $e) {
             $notification->push($e);
         }
     }
     /* Add buttons depending on the above actions. */
     $form->setCustomButtons($spam->disable);
     /* Set default values. */
     $form->folder_var->type->setFolder($spam->mailbox);
     if (!$form->isSubmitted()) {
         $this->vars->level = $spam->level;
         $this->vars->folder = $spam->mailbox;
         $this->vars->actionID = '';
     }
     /* Set form title. */
     $form_title = _("Spam Filtering");
     if ($spam->disable) {
         $form_title .= ' [<span class="horde-form-error">' . _("Disabled") . '</span>]';
     }
     $form_title .= ' ' . Horde_Help::link('ingo', 'spam');
     $form->setTitle($form_title);
     $this->header = _("Spam Filtering");
     Horde::startBuffer();
     Horde_Util::pformInput();
     $form->renderActive($renderer, $this->vars, self::url(array('append_session' => -1)), 'post');
     $this->output = Horde::endBuffer();
 }
开发者ID:raz0rsdge,项目名称:horde,代码行数:65,代码来源:Spam.php

示例7: _init

 /**
  */
 protected function _init()
 {
     global $injector, $notification, $registry;
     $this->_assertCategory('Ingo_Rule_System_Vacation', _("Vacation"));
     if ($this->vars->submitbutton == _("Return to Rules List")) {
         Ingo_Basic_Filters::url()->redirect();
     }
     /* Get vacation object and rules. */
     $ingo_storage = $injector->getInstance('Ingo_Factory_Storage')->create();
     $vacation = $ingo_storage->getSystemRule('Ingo_Rule_System_Vacation');
     /* Build form. */
     $form = new Ingo_Form_Vacation($this->vars, '', null, $injector->getInstance('Ingo_Factory_Script')->create(Ingo::RULE_VACATION)->availableCategoryFeatures('Ingo_Rule_System_Vacation'));
     /* Perform requested actions. Ingo_Form_Vacation does token checking
      * for us. */
     if ($form->validate($this->vars)) {
         $form->getInfo($this->vars, $info);
         $vacation->addresses = isset($info['addresses']) ? $info['addresses'] : '';
         $vacation->days = $info['days'];
         $vacation->exclude = $info['excludes'];
         $vacation->ignore_list = $info['ignorelist'] == 'on';
         $vacation->reason = $info['reason'];
         $vacation->subject = $info['subject'];
         $vacation->start = $info['start'];
         $vacation->end = $info['end'];
         try {
             if ($this->vars->submitbutton == _("Save and Enable")) {
                 $vacation->disable = false;
                 $notify = _("Rule Enabled");
             } elseif ($this->vars->get('submitbutton') == _("Save and Disable")) {
                 $vacation->disable = true;
                 $notify = _("Rule Disabled");
             } else {
                 $notification->push(_("Changes saved."), 'horde.success');
             }
             $ingo_storage->updateRule($vacation);
             $notification->push($notify, 'horde.success');
             $injector->getInstance('Ingo_Factory_Script')->activateAll();
         } catch (Ingo_Exception $e) {
             $notification->push($e);
         }
     }
     /* Add buttons depending on the above actions. */
     $form->setCustomButtons($vacation->disable);
     /* Make sure we have at least one address. */
     if (!count($vacation)) {
         $identity = $injector->getInstance('Horde_Core_Factory_Identity')->create();
         $addresses = implode("\n", $identity->getAll('from_addr'));
         /* Remove empty lines. */
         $addresses = trim(preg_replace('/\\n+/', "\n", $addresses));
         if (empty($addresses)) {
             $addresses = $registry->getAuth();
         }
         $vacation->addresses = $addresses;
     }
     /* Set default values. */
     if (!$form->isSubmitted()) {
         $this->vars->set('addresses', implode("\n", $vacation->addresses));
         $this->vars->set('excludes', implode("\n", $vacation->exclude));
         $this->vars->set('ignorelist', $vacation->ignore_list);
         $this->vars->set('days', $vacation->days);
         $this->vars->set('subject', $vacation->subject);
         $this->vars->set('reason', $vacation->reason);
         $this->vars->set('start', $vacation->start);
         $this->vars->set('end', $vacation->end);
         $this->vars->set('start_year', $vacation->start_year);
         $this->vars->set('start_month', $vacation->start_month - 1);
         $this->vars->set('start_day', $vacation->start_day - 1);
         $this->vars->set('end_year', $vacation->end_year);
         $this->vars->set('end_month', $vacation->end_month - 1);
         $this->vars->set('end_day', $vacation->end_day - 1);
     }
     /* Set form title. */
     $form_title = _("Vacation");
     if ($vacation->disable) {
         $form_title .= ' [<span class="horde-form-error">' . _("Disabled") . '</span>]';
     }
     $form_title .= ' ' . Horde_Help::link('ingo', 'vacation');
     $form->setTitle($form_title);
     $this->header = _("Vacation Edit");
     Horde::startBuffer();
     Horde_Util::pformInput();
     $form->renderActive(new Horde_Form_Renderer(array('encode_title' => false, 'varrenderer_driver' => array('ingo', 'ingo'))), $this->vars, self::url(array('append_session' => -1)), 'post');
     $this->output = Horde::endBuffer();
 }
开发者ID:horde,项目名称:horde,代码行数:86,代码来源:Vacation.php


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