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


PHP form::file方法代码示例

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


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

示例1: meta_custom

function meta_custom()
{
    $form = new form('details', null);
    $form->text('name', array('label' => 'Text Field'));
    $form->image('image', array('label' => 'Image Field', 'button' => 'Add Your Image'));
    $form->file('file', array('label' => 'File Field', 'button' => 'Select a File'));
    $form->textarea('address', array('label' => 'Textarea', 'validate' => 'html'));
    $form->select('rooms', array('one', 'two', 'three'), array('label' => 'Select List'));
    $form->radio('baths', array('blue', 'green', 'red'), array('label' => 'Radio Buttons'));
    $form->editor('baths', 'WYSIWYG Editor');
}
开发者ID:juan88ac,项目名称:foundation_s,代码行数:11,代码来源:index.php

示例2: array

	<?php 
echo form::open('admin/awards/add', array('enctype' => 'multipart/form-data'));
?>
		<div class="title awards">
			<h2>Add an Award:</h2>
			<?php 
echo form::input('name', Arr::get($_POST, 'name'), array('class' => 'field'));
?>
		</div> <!-- END: title -->
		<div class="title_bottom"></div>
		<div class="box">
			<div class="box_top"></div>
			<div class="box_inner notable">
				<h2 class="black">Browse your computer for the Award:</h2>
				<?php 
echo form::file('photo', array('class' => 'field_upload'));
?>
				<p>
					<strong>Technical specifications</strong><br />
					Award images must be 5 megabytes (MB) or smaller, must be in png, and must be 240 pixels high.
				</p>
						
			</div>
			<div class="box_bottom"></div>
		</div>
		<div class="box">
			<div class="box_top"></div>
			<div class="box_inner notable">
				<h2 class="black">Describe your Award:</h2>
				<?php 
echo form::textarea('description', '', array('class' => 'textarea'));
开发者ID:natgeo,项目名称:kids-myshot,代码行数:31,代码来源:add.php

示例3: empty

echo form::label('mieu_ta', 'Miêu tả:');
?>
</td>
            <td><?php 
echo form::textarea('mieu_ta', empty($_POST['mieu_ta']) ? '' : $_POST['mieu_ta'], array('id' => 'mieu_ta', 'class' => 'editor'));
?>
            </td>
        </tr>
        <tr>
            <td><?php 
echo form::label('hinh_anh', 'Hình ảnh:');
?>
</td>
            <td>
                <?php 
echo form::file('hinh_anh', array('id' => 'hinh_anh', 'class' => 'uploader'));
?>
            </td>
        </tr>

        <?php 
if (isset($errors)) {
    print_r($errors);
    ?>
                    <tr>
                        <td colspan="2">
                            <ul class="error">
                    <?php 
    foreach ($errors as $name => $message) {
        echo "<li>{$message}</li>";
    }
开发者ID:abdul-baten,项目名称:hbcms,代码行数:31,代码来源:create.php

示例4: array

}
if (!empty($list)) {
    echo '<hr align="center">';
    if ($type == 'goods') {
        echo form::open('admin/addgood', array('enctype' => 'multipart/form-data'));
        echo form::submit('edit_submit', 'Сохранить');
        echo form::submit('edit_button', 'Удалить');
        echo '<table>';
        echo '<tr align="center"><td>Удалить</td><td>Название</td><td>Цена за килограмм</td><td>Новое фото</td><td>Фотография</td><td>Описание</td></tr>';
        foreach ($list as $entry) {
            echo '<tr align="center" valign="top">';
            echo form::hidden('edit_id[]', $entry['id']);
            echo '<td>' . form::checkbox('edit_delete[]', $entry['id']) . '</td>';
            echo '<td>' . form::input('edit_name[]', $entry['name']) . '</td>';
            echo '<td>' . form::input('edit_price[]', $entry['price']) . '</td>';
            echo '<td>' . form::file('edit_photo[]') . '</td>';
            echo '<td>';
            if (empty($entry['photo'])) {
                echo 'Пусто';
            } else {
                echo html::anchor('./upload/' . $entry['photo'], html::image('./upload/' . $entry['photo'], array('width' => 50, 'height' => 50, 'border' => 0)));
            }
            echo '<td>' . form::textarea('edit_description[]', $entry['description']) . '</td>';
            echo '</td></tr>';
        }
        echo '</table>';
        echo form::submit('edit_submit', 'Сохранить');
        echo form::submit('edit_button', 'Удалить');
        echo form::close();
    } else {
        echo form::open('admin/addnews', array('method' => 'post'));
开发者ID:purplexcite,项目名称:seagifts,代码行数:31,代码来源:admin.php

示例5: _e

_e('c_a_modules_download_plugin');
?>
" /></p>
		</form>
		<form class="col" action="configuration.php" method="post" enctype="multipart/form-data">
			<fieldset>
				<legend><?php 
_e('c_a_modules_upload_zip_file');
?>
</legend>
				<p class="field"><label for="pkg_file"><?php 
_e('c_a_modules_plugin_zip_file');
?>
</label>
				<?php 
echo form::file('pkg_file');
?>
</p>
			</fieldset>

			<p><?php 
echo form::hidden(array('action'), 'modules');
?>
			<?php 
echo form::hidden('upload_pkg', 1);
?>
			<?php 
echo adminPage::formtoken();
?>
			<input type="submit" class="lazy-load" value="<?php 
_e('c_a_modules_upload_plugin');
开发者ID:jewelhuq,项目名称:okatea,代码行数:31,代码来源:display.php

示例6: array

# onglet images
$aItemData['tabs'][20] = array('id' => 'tab-images', 'title' => __('m_galleries_item_tab_image'), 'content' => '');
ob_start();
?>

<h3><?php 
_e('m_galleries_item_tab_title_image');
?>
</h3>

<p class="field"><label for="p_image"><?php 
_e('m_galleries_item_image_file');
?>
</label>
<?php 
echo form::file('p_images_1');
?>
</p>

<?php 
# il y a une image ?
if (!empty($aItemData['image'])) {
    # affichage square ou icon ?
    if (isset($aItemData['image']['min_url'])) {
        $sCurImageUrl = $aItemData['image']['min_url'];
        $sCurImageAttr = $aItemData['image']['min_attr'];
    } elseif (isset($aItemData['image']['square_url'])) {
        $sCurImageUrl = $aItemData['image']['square_url'];
        $sCurImageAttr = $aItemData['image']['square_attr'];
    } else {
        $sCurImageUrl = OKT_PUBLIC_URL . '/img/media/image.png';
开发者ID:jewelhuq,项目名称:okatea,代码行数:31,代码来源:item.php

示例7: while

			<?php 
while ($rsGalleries->fetch()) {
    echo '<option value="' . $rsGalleries->id . '"' . ($iGalleryId == $rsGalleries->id ? ' selected="selected"' : '') . '>' . str_repeat('&nbsp;&nbsp;', $rsGalleries->level) . '&bull; ' . html::escapeHTML($rsGalleries->title) . '</option>';
}
?>
		</select></p>

		<p class="field col"><label for="p_zip_file" title="<?php 
_e('c_c_required_field');
?>
" class="required"><?php 
_e('m_galleries_zip_file');
?>
</label>
		<?php 
echo form::file('p_zip_file');
?>
		<span class="note"><?php 
printf(__('c_c_maximum_file_size_%s'), util::l10nFileSize(OKT_MAX_UPLOAD_SIZE));
?>
</span></p>
	</div>


	<p><?php 
echo form::hidden('m', 'galleries');
?>
	<?php 
echo form::hidden('action', 'add_zip');
?>
	<?php 
开发者ID:jewelhuq,项目名称:okatea,代码行数:31,代码来源:add_zip.php

示例8:

        for ($i = 0; $i < $okt->faq->config->files['number']; $i++) {
            ?>
				<div class="col">

				<p class="field"><label for="p_files_<?php 
            echo $aLanguage['code'];
            ?>
_<?php 
            echo $i;
            ?>
">Fichier <?php 
            echo $i + 1;
            ?>
</label>
				<?php 
            echo form::file('p_files_' . $aLanguage['code'] . '_' . $i, html::escapeHTML($p_files[$aLanguage['code']][$i]));
            ?>
</p>

				<?php 
            if (!empty($files_infos[$aLanguage['code']][$i])) {
                ?>
				<p><img src="<?php 
                echo $okt->config->app_path . 'oktCommon/img/media/' . $files_infos[$aLanguage['code']][$i]['type'] . '.png';
                ?>
" alt="<?php 
                echo $files_infos[$aLanguage['code']][$i]['type'];
                ?>
" />
				<?php 
                echo $files_infos[$aLanguage['code']][$i]['filename'];
开发者ID:jewelhuq,项目名称:okatea,代码行数:31,代码来源:question.php

示例9:

			<h3>Fichiers du produit</h3>

			<div class="two-cols">
			<?php 
    for ($i = 1; $i <= $okt->catalog->config->files['number']; $i++) {
        ?>
			<div class="col">
				<p class="field"><label for="p_files_<?php 
        echo $i;
        ?>
">Fichier <?php 
        echo $i;
        ?>
</label>
				<?php 
        echo form::file('p_files_' . $i);
        ?>
</p>

				<?php 
        # il y a un fichier ?
        if (!empty($post_files[$i])) {
            ?>

					<p class="field"><label for="p_files_title_<?php 
            echo $i;
            ?>
">Titre fichier <?php 
            echo $i;
            ?>
</label>
开发者ID:jewelhuq,项目名称:okatea,代码行数:31,代码来源:product.php

示例10: Copyright

<?php

/**************************************************
  Coppermine 1.5.x Plugin - forum
  *************************************************
  Copyright (c) 2010 foulu (Le Hoai Phuong), eenemeenemuu
  *************************************************
  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 3 of the License, or
  (at your option) any later version.
  ********************************************
  $HeadURL$
  $Revision$
  $LastChangedBy$
  $Date$
  **************************************************/
echo table::open();
echo form::open('forum.php?c=profile&amp;id=' . $user['user_id'], 'profile', 'post', TRUE);
echo table::td(Lang::item('profile.profile_title'), 4);
echo table::td(Lang::item('profile.avatar'), 4, 'tableh2');
echo table::tds(array(array('class' => 'tableb', 'width' => '5%', 'align' => 'center', 'text' => form::radio('avatar_type', 'url', '', $user['fr_avatar'] ? 'url' : '')), array('class' => 'tableb', 'width' => '20%', 'text' => Lang::item('profile.url')), array('class' => 'tableb', 'width' => '50%', 'text' => form::text('fr_avatar_url', $user['fr_avatar'])), array('class' => 'tableb', 'width' => '25%', 'align' => 'center', 'rowspan' => 2, 'text' => !php::is_empty_string($user['fr_avatar']) ? html::img($user['fr_avatar'], Config::item('fr_avatar_size')) . BR . BR . html::button('forum.php?c=profile&m=remove_avatar', Lang::item('profile.remove_avatar')) : '')));
echo table::tds(array(array('class' => 'tableb', 'align' => 'center', 'text' => form::radio('avatar_type', 'file')), array('class' => 'tableb', 'text' => Lang::item('profile.file')), array('class' => 'tableb', 'text' => form::file('fr_avatar_file'))));
echo table::td(Lang::item('profile.profile'), 4, 'tableh2');
echo table::tds(array(array('class' => 'tableb', 'colspan' => 2, 'rowspan' => 3, 'text' => Lang::item('profile.signature')), array('class' => 'tableb', 'colspan' => 2, 'text' => forum::generate_bbcode_tags('profile', 'fr_signature'))));
echo table::tds(array(array('class' => 'tableb', 'colspan' => 2, 'align' => 'center', 'text' => form::textarea('fr_signature', $user['fr_signature']))));
echo table::tds(array(array('class' => 'tableb', 'colspan' => 2, 'text' => generate_smilies('profile', 'fr_signature'))));
echo table::tds(array(array('class' => 'tablef', 'colspan' => 4, 'text' => form::submit(Lang::item('common.change'), 'submit'))));
echo form::close();
echo table::close();
开发者ID:phill104,项目名称:branches,代码行数:30,代码来源:index_view.php

示例11: array

/** Stage 1: Choose File *********************************************/
if ($stage == 'choose_file') {
    ?>
<form action="<?php 
    echo url::site('webdb/import/' . $database->get_name() . '/' . $table->get_name());
    ?>
"
	  enctype="multipart/form-data" method="post">
	<fieldset>
		<p>
			<?php 
    echo form::label('file', 'Select a CSV file to import:');
    ?>
<br />
			<?php 
    echo form::file('file', array('size' => 80));
    ?>
		</p>
		<p>
			<?php 
    echo form::submit('upload', 'Upload');
    ?>
		</p>
	</fieldset>
</form>



<?php 
    /** Stage 2: Match Fields ********************************************/
} elseif ($stage == 'match_fields') {
开发者ID:halka139,项目名称:kohana_webdb,代码行数:31,代码来源:import.php

示例12:

        <td><?php 
echo form::input('name');
?>
</td>
    </tr>
    <tr>
        <td>Цена за килограмм:</td>
        <td><?php 
echo form::input('price');
?>
</td>
    </tr>
    <tr>
        <td>Фото:</td>
        <td><?php 
echo form::file('photo');
?>
</td>
    </tr>
    <tr>
        <td valign="top">Описание:</td>
        <td><?php 
echo form::textarea('description');
?>
</td>
    </tr>
    <tr>
        <td align="right" colspan="2"><?php 
echo form::submit('submit', 'Добавить товар');
?>
</td>
开发者ID:purplexcite,项目名称:seagifts,代码行数:31,代码来源:admin_addgood.php

示例13: _e

?>
</label>
				<?php 
echo form::select('p_admin_theme', $aAllowedAdminThemes, $okt->config->admin_theme);
?>
				<span class="note"><?php 
_e('c_a_config_display_choose_theme_note');
?>
</span></p>

				<p class="field"><label for="p_upload_theme"><?php 
_e('c_a_config_display_upload_theme');
?>
</label>
				<?php 
echo form::file('p_upload_theme');
?>
				<span class="note"><?php 
_e('c_a_config_display_upload_theme_note');
?>
</span></p>

			</fieldset>
			<!--
			<p class="field"><label for="p_admin_compress_output"><?php 
echo form::checkbox('p_admin_compress_output', 1, $okt->config->admin_compress_output);
?>
			<?php 
_e('c_a_config_display_compress_output');
?>
</label></p>
开发者ID:jewelhuq,项目名称:okatea,代码行数:31,代码来源:display.php

示例14:

    echo $info[1];
    ?>
</td>
			<td ><?php 
    echo $info['mime'];
    ?>
</td>
		</tr>
		<tr>
			<td class="td_main" colspan="3">
				<?php 
    echo form::checkbox($name . '[delete]');
    ?>
 удалить
			</td>
		</tr>
<?php 
}
?>
		<tr>
		<td class="td_main" colspan="3"><?php 
echo form::file($name . '[file]', $attributes);
?>
			<?php 
echo form::hidden($name . '[hidden]', '1');
?>
		</td>
	</tr>
</table>

开发者ID:ariol,项目名称:adminshop,代码行数:29,代码来源:image.php


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