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


PHP form::close方法代码示例

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


在下文中一共展示了form::close方法的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);
 }
开发者ID:sydlawrence,项目名称:SocialFeed,代码行数:15,代码来源:snippets.php

示例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>&nbsp;</p><p>&nbsp;</p>';
     $html .= form::close();
     return $html;
 }
开发者ID:sydlawrence,项目名称:SocialFeed,代码行数:17,代码来源:settings.php

示例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;
    }
开发者ID:sydlawrence,项目名称:SocialFeed,代码行数:18,代码来源:profile.php

示例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;
 }
开发者ID:sydlawrence,项目名称:SocialFeed,代码行数:37,代码来源:login.php

示例5:

							<span class="sel-holder">
								<?php print form::dropdown('private_deployment', $yesno_array, $form['private_deployment']); ?>
							</span>
						</div>				
						<div class="row">
						<h4><a href="#" class="tooltip" title="<?php echo Kohana::lang("tooltips.settings_google_analytics"); ?>"><?php echo Kohana::lang('settings.site.google_analytics');?></a></h4>
							<?php echo Kohana::lang('settings.site.google_analytics_example');?> &nbsp;&nbsp;
							<?php print form::input('google_analytics', $form['google_analytics'], ' class="text"'); ?>
						</div>
						<div class="row">
							<h4><a href="#" class="tooltip" title="<?php echo Kohana::lang("tooltips.settings_twitter_configuration"); ?>"><?php echo Kohana::lang('settings.site.twitter_configuration');?></a></h4>
							<div class="row">
								<?php echo Kohana::lang('settings.site.twitter_hashtags');?>
								<?php print form::input('twitter_hashtags', $form['twitter_hashtags'], ' class="text"'); ?>
							</div>
						</div>
						<div class="row">
							<h4><?php echo Kohana::lang('settings.site.api_akismet');?></h4>
							<?php echo Kohana::lang('settings.site.kismet_notice');?>.
							<?php print form::input('api_akismet', $form['api_akismet'], ' class="text"'); ?>
						</div>
					</div>
		
					<div class="simple_border"></div>
		
					<input type="image" src="<?php echo url::base() ?>media/img/admin/btn-save-settings.gif" class="save-rep-btn" />
					<input type="image" src="<?php echo url::base() ?>media/img/admin/btn-cancel.gif" class="cancel-btn" />
				</div>
				<?php print form::close(); ?>
			</div>
开发者ID:nurous,项目名称:bushfireconnect,代码行数:30,代码来源:site.php

示例6: editor

 private function editor($blog)
 {
     if (count($_POST)) {
         $blog->values($_POST);
         if ($blog->check()) {
             $blog->user_id = $this->a2->get_user()->id;
             $blog->save();
             return $this->action_index();
         }
     }
     //show form
     echo form::open();
     echo 'text:' . form::textarea('text', $blog->text) . '<br>';
     echo form::submit('post', 'post');
     echo form::close();
     echo Kohana::debug($blog->validate()->errors());
 }
开发者ID:sars,项目名称:rp,代码行数:17,代码来源:a2demo.php

示例7: get_current_fields

 /**
  * Generate list of currently created Form Fields for the admin interface
  * @param int $form_id The id no. of the form
  * @return string
  */
 public static function get_current_fields($form_id = 0)
 {
     $form_fields = form::open(NULL, array('method' => 'get'));
     $form = array();
     $form['custom_field'] = self::get_custom_form_fields('', $form_id, true);
     $form['id'] = $form_id;
     $custom_forms = new View('reports/submit_custom_forms');
     $disp_custom_fields = self::get_custom_form_fields('', $form_id, false);
     $custom_forms->disp_custom_fields = $disp_custom_fields;
     $custom_forms->form = $form;
     $custom_forms->editor = true;
     $form_fields .= $custom_forms->render();
     $form_fields .= form::close();
     return $form_fields;
 }
开发者ID:Dirichi,项目名称:Ushahidi_Web,代码行数:20,代码来源:customforms.php

示例8: if

<?php if ($rubros->count()>0) { ?>
<div class="yui-b data">
    <!-- Muestra los rubros -->
    <ul>
            <?php foreach ($rubros as $rubro): ?>
        <li><?php echo $rubro->nombre ?>
            <a href="#"><?=html::image(array('src'=>'media/images/cancel.png',
                            'alt'=>'Borrar','title'=>'Borrar ',
                            'width'=>'16','height'=>'16'))?></a>
        </li>
            <?php endforeach ?>
    </ul>
</div>
<?php } ?>
<div class="yui-b data">
    <!-- Formulario de Carga de Datos -->
    <?=form::open(NULL, array("class"=>"cmxform"))?>
    <?=form::label('rubro','Rubro')?>
    <?=form::hidden('dato_id',$form['dato_id'])?>
    <?=form::dropdown('rubro_id',$form['rubros'], $form['seltipo'])?>
    <?=form::submit(NULL,"Agregar", 'class="awesome small green"')?>
    <?=form::close()?>
    <ul>
        <?php if (isset($_SESSION['urledit'])) {?>
        <li><?php echo html::anchor($_SESSION['urledit'], 'Finalizar carga',array('class'=>'awesome medium blue')) ?></li>
        <?} else { ?>
        <li><?php echo html::anchor('datos', 'Finalizar carga',array('class'=>'awesome medium blue')) ?></li>
        <? } ?>
    </ul>

</div>
开发者ID:bicho44,项目名称:imglistados,代码行数:31,代码来源:datorubros.php

示例9: form

 /**
  * Demonstrates how to use the form helper with the Validation library.
  */
 function form()
 {
     $validation = new Validation();
     echo form::open('', array('enctype' => 'multipart/form-data'));
     echo form::label('imageup', 'Image Uploads') . ':<br/>';
     echo form::upload('imageup[]') . '<br/>';
     echo form::upload('imageup[]') . '<br/>';
     echo form::upload('imageup[]') . '<br/>';
     echo form::submit('upload', 'Upload!');
     echo form::close();
     if (!empty($_POST)) {
         $validation->set_rules('imageup', 'required|upload[gif,png,jpg,500K]', 'Image Upload');
         echo '<p>validation result: ' . var_export($validation->run(), TRUE) . '</p>';
     }
     echo Kohana::debug($validation);
     echo Kohana::lang('core.stats_footer');
 }
开发者ID:nicka1711,项目名称:hanami,代码行数:20,代码来源:examples.php

示例10: defined

<?php

defined('SYSPATH') or die('No direct access allowed.');
?>

<div id="callmanager_header" class="modules callmanager module_header">
    <h2><?php 
echo __('Hang Up Call');
?>
</h2>
</div>
<?php 
echo form::open();
echo form::hidden('uuid', $uuid);
echo 'Do you really want to hang up this call???';
echo form::close('yes_no');
开发者ID:swk,项目名称:bluebox,代码行数:16,代码来源:hangup.php

示例11:

?>
									<span><?php 
echo Kohana::lang('ui_main.longitude');
?>
:</span>
									<?php 
print form::input('default_lon', $form['default_lon'], ' readonly="readonly" class="text"');
?>
								</div>
							</div>
							<div style="clear:both;"></div>
							<h4><?php 
echo Kohana::lang('ui_main.preview');
?>
</h4>
							<p class="bold_desc"><?php 
echo Kohana::lang('settings.set_location');
?>
.</p>

							<div id="map_holder">
								<div id="map" class="mapstraction"></div>    
							</div>
							<div style="margin-top:25px" id="map_loaded"></div>
						</div>
					</div>
				<?php 
print form::close();
?>
			</div>
开发者ID:huslage,项目名称:Ushahidi_Web,代码行数:30,代码来源:settings.php

示例12: filter_search

 public function filter_search()
 {
     $filter_search = "";
     $filter_search .= "<div class=\"filter-search-form\">";
     $filter_search .= "<span id=\"filter-search-title\">" . Kohana::lang('ui_main.search') . "</span>";
     $filter_search .= form::open(NULL, array('method' => 'get', 'id' => 'filter_search'));
     $filter_search .= "<ul>";
     $filter_search .= "<li><input id=\"filter_search_query\" type=\"text\" name=\"q\" value=\"\" class=\"text\" /></li>";
     $filter_search .= "<li><input type=\"submit\" class=\"searchbtn\" value=\"" . Kohana::lang('ui_main.search') . "\" /></li>";
     $filter_search .= "</ul>";
     $filter_search .= form::close();
     $filter_search .= "<div id=\"filter-search-results-box\"><span id=\"filter-search-prompt\">" . Kohana::lang('ui_main.filter_search_prompt') . "</span></div>";
     $filter_search .= "</div>";
     return $filter_search;
 }
开发者ID:niiyatii,项目名称:crowdmap,代码行数:15,代码来源:Themes.php

示例13:

        <div class="field">
        <?php 
echo form::label('location[name]', 'Location Name:');
echo form::input('location[name]');
?>
        </div>

        <div class="field">
        <?php 
echo form::label('location[domain]', 'Domain Name/Realm:');
echo form::input('location[domain]');
?>
        </div>

    <?php 
echo form::close_section();
?>

    <?php 
if (isset($views)) {
    echo subview::renderAsSections($views);
}
?>

    <?php 
echo form::close(TRUE);
?>
    
</div>
开发者ID:swk,项目名称:bluebox,代码行数:29,代码来源:update.php

示例14: new_page_form

 private function new_page_form($array = null)
 {
     $view = new View('zest/padding');
     if (!$array) {
         $array = array('title' => '', 'seoUrl' => '', 'parent' => '');
     }
     $html = "";
     $html .= form::open('admin/pages/add', array('class' => 'valid_form'));
     $html .= form::input(array('title', 'Page Title'), '', 'onblur="toUrl(event,\'title\',\'seoURL\')" class="required tooltip fullWidth" title="Keep it simple, this is just for your use"');
     $html .= form::label('seoURL', 'URL Slug');
     $html .= form::input('seoURL', '', 'class="required tooltip fullWidth" title="We recommend using the same as the Page Title but instead of spaces, \' \', use the hyphen symbol, \'-\'"');
     $html .= "<hr/>";
     $html .= form::label('parent_id', 'Parent Page');
     $html .= "<select id='parent_id' name='parent_id' class='fullWidth'>\r\n\t\t\t\t\t<option value='0'>-- NONE --</option>";
     $pages = ORM::factory('page')->find_all();
     foreach ($pages as $p) {
         $title = $p->title;
         if ($p->parent_id != 0) {
             $title = ORM::factory('page', $p->parent_id)->title . " - " . $title;
         }
         $html .= "<option value='" . $p->id . "'>" . $title . "</option>";
     }
     $html .= "</select>\t";
     $html .= "<hr />";
     $html .= "<hr />";
     $html .= form::submit(null, 'Save', 'class="submit"');
     $html .= form::close();
     $view->content = $html;
     return $view;
 }
开发者ID:sydlawrence,项目名称:SocialFeed,代码行数:30,代码来源:pages.php

示例15: render

 /**
  * Creates the form HTML
  *
  * @param   string   form view template name
  * @param   boolean  use a custom view
  * @return  string
  */
 public function render($template = 'forge_template', $custom = FALSE)
 {
     // Load template
     $form = new View($template);
     if ($custom) {
         // Using a custom view
         $data = array();
         foreach (array_merge($this->hidden, $this->inputs) as $input) {
             $data[$input->name] = $input;
             // Groups will never have errors, so skip them
             if ($input instanceof Form_Group) {
                 continue;
             }
             // Compile the error messages for this input
             $messages = '';
             $errors = $input->error_messages();
             if (is_array($errors) and !empty($errors)) {
                 foreach ($errors as $error) {
                     // Replace the message with the error in the html error string
                     $messages .= str_replace('{message}', $error, $this->error_format) . $this->newline_char;
                 }
             }
             $data[$input->name . '_errors'] = $messages;
         }
         $form->set($data);
     } else {
         // Using a template view
         $form->set($this->template);
         $hidden = array();
         if (!empty($this->hidden)) {
             foreach ($this->hidden as $input) {
                 $hidden[$input->name] = $input->value;
             }
         }
         $form_type = 'open';
         // See if we need a multipart form
         $check_inputs = array($this->inputs);
         while ($check_inputs) {
             foreach (array_shift($check_inputs) as $input) {
                 if ($input instanceof Form_Upload) {
                     $form_type = 'open_multipart';
                 }
                 if ($input instanceof Form_Group) {
                     $check_inputs += array($input->inputs);
                 }
             }
         }
         // Set the form open and close
         $form->open = form::$form_type(arr::remove('action', $this->attr), $this->attr, $hidden);
         $form->close = form::close();
         // Set the inputs
         $form->inputs = $this->inputs;
     }
     return $form;
 }
开发者ID:TODDMAN,项目名称:gallery3-vendor,代码行数:62,代码来源:Forge.php


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