本文整理汇总了PHP中form::open方法的典型用法代码示例。如果您正苦于以下问题:PHP form::open方法的具体用法?PHP form::open怎么用?PHP form::open使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类form
的用法示例。
在下文中一共展示了form::open方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: edit
public function edit($url)
{
$display_name = ucwords(str_replace('_', ' ', $url));
$this->__set_heading("Editing Theme file - " . $display_name);
$view = new View('zest/content');
$content = form::open('admin/snippets/save/' . $url);
$html = zest::template_to_html(THEME_PATH . $url);
$content .= form::label('content', 'Code');
$content .= '<p><small>This is only for advanced users. To edit <a onclick="$(\'#content\').toggle();return false;" href="#">click here</a></small></p>';
$content .= form::textarea('content', $html, 'id="content" class="fullWidth no-editor hside"');
$content .= form::submit('submit', 'Save', 'class="submit"');
$content .= form::close();
$view->content = $content;
$this->__set_content($view);
}
示例2: __under_development
private function __under_development()
{
$UNDER_DEVELOPMENT = ORM::factory('setting', 'UNDER_DEVELOPMENT');
if (isset($_POST['UNDER_DEVELOPMENT'])) {
$UNDER_DEVELOPMENT->value = $_POST['UNDER_DEVELOPMENT'];
$UNDER_DEVELOPMENT->save();
}
$data = array("name" => "UNDER_DEVELOPMENT", "class" => "fullWidth");
$options = array(null => "YES", "1" => "NO");
$selected = $UNDER_DEVELOPMENT->value;
$html = form::open();
$html .= form::label('UNDER_DEVELOPMENT', 'Under Development');
$html .= form::dropdown($data, $options, $selected);
$html .= form::submit('submit', 'Save', 'class="submit"') . '<p> </p><p> </p>';
$html .= form::close();
return $html;
}
示例3: _form
public function _form($user)
{
$html = "";
$html .= form::open(null, array('class' => 'valid_form'));
$html .= form::input(array('email', 'Email'), $user->email, 'class="fullWidth required email"');
$html .= form::label('New Password');
$html .= form::password('password[]', '', 'class="fullWidth"');
$html .= form::label('Repeat Password');
$html .= form::password('password[]', '', 'class="fullWidth"');
$html .= "<hr/>";
$html .= form::label('openid', 'OpenID <img src="http://www.plaxo.com/images/openid/login-bg.gif" />');
$html .= '<p><small><a href="http://www.openid.net" target="_BLANK">What is an OpenID?</a></small></p>
<p><small>Please remember the "http://"</small></p>';
$html .= form::input('openid', $user->openid, 'class="fullWidth url"');
$html .= form::submit('submit', 'Save', 'class="submit"');
$html .= form::close();
return $html;
}
示例4: render_form
public static function render_form()
{
$form = "";
if (isset($_POST['forgotten_email'])) {
$user = ORM::factory('user', $_POST['forgotten_email']);
if ($user->id > 0) {
$user->reset_password();
$form .= "<span id='login_error' style='color:red'>Your new password has been emailed to you.</span>";
} else {
$form .= "<span id='login_error' style='color:red'>That email is not registered with us.</span>";
}
}
$user = login::attempt_login();
if (is_object($user)) {
return "hello " . $user->username . " <a href='?logout'>logout</a>";
}
if (is_string($user)) {
$form .= "<span id='login_error' style='color:red'>{$user}</span>";
}
$form .= '<span id="forgotten_password" class="hide">';
$form .= '<label for="forgotten_email">Email</label>';
$form .= '<input type="text" name="forgotten_email" value="email" onfocus="if (this.value=\\"email\\") this.value=\\"\\""/>';
$form .= '<input type="submit" value="login" class="submit" />';
$form .= form::close();
$form .= '</span>';
$form .= '<span id="login_form" class="hide">';
$form .= form::open();
$form .= '<label for="username">Username</label>';
$form .= '<input type="text" name="username" value="username" onfocus="if (this.value=\\"username\\") this.value=\\"\\""/>';
$form .= '<label for="password">Password</label>';
$form .= '<input type="password" name="password" value="password" onfocus="if (this.value=\\"password\\") this.value=\\"\\""/>';
$form .= '<input type="submit" value="login" class="submit" />';
$form .= form::close();
$form .= '<a href="#" onclick="$(\'#forgotten_password\').show();$(\'#login_form\').hide()">forgotten password?</a>';
$form .= '</span>';
return $form;
}
示例5: array
<!-- green-box -->
<div class="green-box" id="submitStatus">
<h3><?php
echo Kohana::lang('ui_main.reports');
?>
<?php
echo $form_action;
?>
<a href="#" id="hideMessage" class="hide">hide this message</a></h3>
</div>
<?php
}
?>
<!-- report-table -->
<?php
print form::open(NULL, array('id' => 'reportMain', 'name' => 'reportMain'));
?>
<input type="hidden" name="action" id="action" value="">
<input type="hidden" name="incident_id[]" id="incident_single" value="">
<div class="table-holder">
<table class="table">
<thead>
<tr>
<th class="col-1"><input id="checkallincidents" type="checkbox" class="check-box" onclick="CheckAll( this.id, 'incident_id[]' )" /></th>
<th class="col-2"><?php
echo Kohana::lang('ui_main.report_details');
?>
</th>
<th class="col-3"><?php
echo Kohana::lang('ui_main.date');
?>
示例6: _editor
private function _editor($blog)
{
if ($blog->validate($_POST)) {
$blog->user_id = $this->a2->get_user()->id;
$blog->save();
return $this->index();
}
//show form
echo form::open();
echo 'text:' . form::textarea('text', $blog->text) . '<br>';
echo form::submit(array('value' => 'post'));
echo form::close();
}
示例7: foreach
* http://www.gnu.org/copyleft/lesser.html
* @author Ushahidi Team <team@ushahidi.com>
* @package Ushahidi - http://source.ushahididev.com
* @module API Controller
* @copyright Ushahidi - http://www.ushahidi.com
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License (LGPL)
*/
?>
<div class="bg">
<h2>
<?php
admin::settings_subtabs("map");
?>
</h2>
<?php
print form::open();
?>
<div class="report-form">
<?php
if ($form_error) {
?>
<!-- red-box -->
<div class="red-box">
<h3><?php
echo Kohana::lang('ui_main.error');
?>
</h3>
<ul>
<?php
foreach ($errors as $error_item => $error_description) {
print !$error_description ? '' : "<li>" . $error_description . "</li>";
示例8: foreach
<?php
View::set_global('field_lang_prefix', 'convention.registration_field_');
if (count($errors)) {
foreach ($errors as $field => $error) {
if (!$error) {
continue;
/* just incase of empty error */
}
echo '<p class="errormsg">';
echo $error;
echo '</p>';
}
}
echo '<div id="form">';
echo form::open(url::site($url, TRUE));
echo '<h1>' . HTML::chars(__('convention.registration_form_header')) . '</h1>';
echo '<p>' . __('ecmproject.form_required') . '</p>';
echo "<fieldset>";
foreach (array('gname', 'sname', 'badge', 'dob', 'email', 'phone', 'cell', 'city', 'prov', 'econtact', 'ephone') as $field) {
if (!@$fields[$field]) {
continue;
}
echo new View('global/_form_field', array('field' => $field, 'fieldData' => $fields[$field], 'value' => $form[$field], 'hasError' => isset($errors[$field]) && $errors[$field]));
}
echo '</fieldset>';
echo '<h1>' . HTML::chars(__('convention.registration_select_pass_header')) . '</h1>';
echo '<p>' . HTML::chars(__('convention.registration_select_pass_desc')) . '</p>';
echo '<fieldset>';
$field = 'pass_id';
echo new View('global/_form_field', array('field' => $field, 'fieldData' => $fields[$field], 'value' => $form[$field], 'hasError' => isset($errors[$field]) && $errors[$field]));
示例9:
<div class="alert_response">
<?php
if ($alert_email) {
echo Kohana::lang('alerts.email_alert_request_created') . "<u><strong>" . $alert_email . "</strong></u>." . Kohana::lang('alerts.verify_code');
}
?>
<div class="alert_confirm">
<div class="label">
<u><?php
echo Kohana::lang('alerts.email_code');
?>
</u>
</div>
<?php
print form::open('/alerts/verify');
print "Verification Code:<BR>" . form::input('alert_code', '', ' class="text"') . "<BR>";
print "Email Address:<BR>" . form::input('alert_email', $alert_email, ' class="text"') . "<BR>";
print form::submit('button', 'Confirm My Alert Request', ' class="btn_submit"');
print form::close();
?>
</div>
</div>
</div>
<!-- / Email Alert -->
<!-- Return -->
<div class="green-box">
<div class="alert_response">
<a href="<?php
示例10: array
<div class="bg">
<h2><?php
print $title;
?>
<span></span><a href="<?php
print url::base();
?>
admin/reports">View Reports</a></h2>
<?php
print form::open(NULL, array('id' => 'reportForm', 'name' => 'reportForm'));
?>
<input type="hidden" name="save" id="save" value="">
<!-- report-form -->
<div class="report-form">
<?php
if ($form_error) {
?>
<!-- red-box -->
<div class="red-box">
<h3>Error!</h3>
<ul>
<?php
foreach ($errors as $error_item => $error_description) {
// print "<li>" . $error_description . "</li>";
print !$error_description ? '' : "<li>" . $error_description . "</li>";
}
?>
</ul>
</div>
<?php
}
示例11: defined
*@package User
**/
?>
<?php
defined('SYSPATH') or die('No direct access allowed.');
?>
<h2><?php
echo Kohana::lang('user.login');
?>
</h2>
<? base::success($success); ?>
<? base::errors($errors); ?>
<?
echo form::open(NULL, array('class' => 'glForms'));
echo form::label('email', kohana::lang('user.email'));
echo form::input('email', ($form['email']));
echo '<br />';
echo form::label('password', Kohana::lang('user.password'));
echo form::password('password', NULL);
echo '<br />';
echo form::label('submit', ' ');
echo form::submit('submit', Kohana::lang('user.logmein'),'class=button');
echo '<br />';
echo form::close();
?>
<p><a href="/user/register"><?php
echo Kohana::lang('user.register');
?>
</a> | <a href="/user/password"><?php
示例12: array
<div id="replies">
</div>
<a href="javascript:showReply('reply_<?php
echo $message_id;
?>
')" class="more">+<?php
echo Kohana::lang('ui_main.reply');
?>
</a>
<div id="reply_<?php
echo $message_id;
?>
" class="reply">
<?php
print form::open(url::site() . 'admin/messages/send/', array('id' => 'newreply_' . $message_id, 'name' => 'newreply_' . $message_id));
?>
<div class="reply_can"><a href="javascript:cannedReply('1', 'message_<?php
echo $message_id;
?>
')">+<?php
echo Kohana::lang('ui_main.request_location');
?>
</a> <a href="javascript:cannedReply('2', 'message_<?php
echo $message_id;
?>
')">+<?php
echo Kohana::lang('ui_main.request_information');
?>
</a></div>
<div id="replyerror_<?php
示例13: array
?>
</div>
<div id="create_account" class="ui-corner-all">
<h2><a href="javascript:toggle('signin_new');"><?php
echo Kohana::lang('ui_main.login_signup_click');
?>
</a></h2>
<?php
echo Kohana::lang('ui_main.login_signup_text');
?>
<div id="signin_new" class="signin_select ui-corner-all">
<?php
echo form::open(NULL, array('id' => "usernew_form"));
?>
<input type="hidden" name="action" value="new">
<table width="100%" border="0" cellspacing="3" cellpadding="4" background="" id="ushahidi_loginbox">
<tr>
<td><strong><?php
echo Kohana::lang('ui_main.name');
?>
:</strong><br/><small><?php
echo Kohana::lang('ui_main.identify_you');
?>
</small><br />
<?php
print form::input('name', $form['name'], 'class="login_text new_name"');
?>
</td>
示例14:
<style type="text/css">
#logo_droppable_wrapper{
text-align:center;
background:#eee;
border:1px solid #ccc;
}
#logo_droppable_wrapper img{
display:block;
margin:5px;
padding:5px;
cursor:pointer;
cursor:hand;
}
</style>
<?php
echo form::open('theme/logo');
?>
<div id="common_tool_header" class="buttons">
<button type="submit" name="save_logo" class="jade_positive">Save Logo</button>
<div id="common_title">Select an image banner for your Website.</div>
</div>
<div class="common_left_panel" style="text-align:center">
<a href="#" class="get_file_browser images" rel="albums">Choose new Logo</a>
</div>
<div id="logo_droppable_wrapper" class="common_main_panel" style="height:300px">
<?php
if (!empty($this->banner)) {
示例15: array
</div>
<div class="grid_4 omega">
<b>Arquivado:</b><br>
<?php
if ($processo->arquivado) {
echo 'Sim';
} else {
echo 'Não';
}
?>
</div>
<div class="clear"></div>
<h2>Formulário de Procedimento</h2>
<?php
echo form::open('procedimentos/salvar', array('id' => 'form_procedimento'), array('id' => $procedimento->id, 'processo_id' => $processo->id));
?>
<div class="grid_4 alpha">
Data:<br>
<?php
echo form::input('data', $procedimento->data, 'class="validate[required] w16em dateformat-Y-ds-m-ds-d"');
?>
</div>
<div class="grid_4">
Hora:<br>
<?php
echo form::input('hora', $procedimento->hora);
?>
</div>
<div class="grid_4 omega">
Realizado:<br>