本文整理汇总了PHP中OSC\OM\HTML::fileField方法的典型用法代码示例。如果您正苦于以下问题:PHP HTML::fileField方法的具体用法?PHP HTML::fileField怎么用?PHP HTML::fileField使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OSC\OM\HTML
的用法示例。
在下文中一共展示了HTML::fileField方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: isset
<label for="new_banners_group"><?php
echo OSCOM::getDef('text_banners_new_group') . (sizeof($groups_array) > 0 ? '' : OSCOM::getDef('text_field_required'));
?>
</label>
<?php
echo HTML::inputField('new_banners_group');
?>
</div>
<div class="form-group">
<label for="banners_image"><?php
echo OSCOM::getDef('text_banners_image');
?>
</label>
<?php
echo HTML::fileField('banners_image');
?>
<label for="banners_image_local"><?php
echo OSCOM::getDef('text_banners_image_local');
?>
</label>
<div class="input-group">
<div class="input-group-addon"><?php
echo OSCOM::getConfig('dir_root', 'Shop') . 'images/';
?>
</div>
<?php
echo HTML::inputField('banners_image_local', isset($bInfo->banners_image) ? $bInfo->banners_image : '');
?>
</div>
示例2: array
}
if (is_file(LOCAL_EXE_ZIP)) {
$contents[] = array('text' => HTML::radioField('compress', 'zip') . ' ' . OSCOM::getDef('text_info_use_zip'));
}
if ($dir_ok == true) {
$contents[] = array('text' => HTML::checkboxField('download', 'yes') . ' ' . OSCOM::getDef('text_info_download_only') . '*<br /><br />*' . OSCOM::getDef('text_info_best_through_https'));
} else {
$contents[] = array('text' => HTML::radioField('download', 'yes', true) . ' ' . OSCOM::getDef('text_info_download_only') . '*<br /><br />*' . OSCOM::getDef('text_info_best_through_https'));
}
$contents[] = array('text' => HTML::button(OSCOM::getDef('image_backup'), 'fa fa-copy', null, null, 'btn-success') . HTML::button(OSCOM::getDef('image_cancel'), null, OSCOM::link(FILENAME_BACKUP), null, 'btn-link'));
break;
case 'restorelocal':
$heading[] = array('text' => OSCOM::getDef('text_info_heading_restore_local'));
$contents = array('form' => HTML::form('restore', OSCOM::link(FILENAME_BACKUP, 'action=restorelocalnow'), 'post', 'enctype="multipart/form-data"'));
$contents[] = array('text' => OSCOM::getDef('text_info_restore_local') . '<br /><br />' . OSCOM::getDef('text_info_best_through_https'));
$contents[] = array('text' => HTML::fileField('sql_file'));
$contents[] = array('text' => OSCOM::getDef('text_info_restore_local_raw_file'));
$contents[] = array('text' => HTML::button(OSCOM::getDef('image_restore'), 'fa fa-repeat', null, null, 'btn-success') . HTML::button(OSCOM::getDef('image_cancel'), null, OSCOM::link(FILENAME_BACKUP), null, 'btn-link'));
break;
}
}
if (tep_not_null($heading) && tep_not_null($contents)) {
$show_listing = false;
echo HTML::panel($heading, $contents, ['type' => 'info']);
}
}
if ($show_listing === true) {
?>
<table class="oscom-table table table-hover">
<thead>
示例3:
echo HTML::image(OSCOM::linkImage('Shop/' . STORE_LOGO));
?>
</td>
</tr>
<tr>
<td><?php
echo HTML::form('logo', OSCOM::link(FILENAME_STORE_LOGO, 'action=save'), 'post', 'enctype="multipart/form-data"');
?>
<table border="0" cellspacing="0" cellpadding="2">
<tr>
<td class="main" valign="top"><?php
echo OSCOM::getDef('text_logo_image');
?>
</td>
<td class="main"><?php
echo HTML::fileField('store_logo');
?>
</td>
<td class="smallText"><?php
echo HTML::button(OSCOM::getDef('image_save'), 'fa fa-save');
?>
</td>
</tr>
</table>
</form></td>
</tr>
<tr>
<td class="main"><?php
echo OSCOM::getDef('text_format_and_location');
?>
</td>
示例4: array
$contents[] = array('text' => '<br />' . OSCOM::getDef('text_manufacturers_name') . '<br />' . HTML::inputField('manufacturers_name'));
$contents[] = array('text' => '<br />' . OSCOM::getDef('text_manufacturers_image') . '<br />' . HTML::fileField('manufacturers_image'));
$manufacturer_inputs_string = '';
$languages = tep_get_languages();
for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
$manufacturer_inputs_string .= '<br />' . $OSCOM_Language->getImage($languages[$i]['code']) . ' ' . HTML::inputField('manufacturers_url[' . $languages[$i]['id'] . ']');
}
$contents[] = array('text' => '<br />' . OSCOM::getDef('text_manufacturers_url') . $manufacturer_inputs_string);
$contents[] = array('align' => 'center', 'text' => '<br />' . HTML::button(OSCOM::getDef('image_save'), 'fa fa-save') . HTML::button(OSCOM::getDef('image_cancel'), 'fa fa-close', OSCOM::link(FILENAME_MANUFACTURERS, 'page=' . $_GET['page'] . '&mID=' . $_GET['mID'])));
break;
case 'edit':
$heading[] = array('text' => '<strong>' . OSCOM::getDef('text_heading_edit_manufacturer') . '</strong>');
$contents = array('form' => HTML::form('manufacturers', OSCOM::link(FILENAME_MANUFACTURERS, 'page=' . $_GET['page'] . '&mID=' . $mInfo->manufacturers_id . '&action=save', 'post', 'enctype="multipart/form-data"')));
$contents[] = array('text' => OSCOM::getDef('text_edit_intro'));
$contents[] = array('text' => '<br />' . OSCOM::getDef('text_manufacturers_name') . '<br />' . HTML::inputField('manufacturers_name', $mInfo->manufacturers_name));
$contents[] = array('text' => '<br />' . OSCOM::getDef('text_manufacturers_image') . '<br />' . HTML::fileField('manufacturers_image') . '<br />' . $mInfo->manufacturers_image);
$manufacturer_inputs_string = '';
$languages = tep_get_languages();
for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
$manufacturer_inputs_string .= '<br />' . $OSCOM_Language->getImage($languages[$i]['code']) . ' ' . HTML::inputField('manufacturers_url[' . $languages[$i]['id'] . ']', tep_get_manufacturer_url($mInfo->manufacturers_id, $languages[$i]['id']));
}
$contents[] = array('text' => '<br />' . OSCOM::getDef('text_manufacturers_url') . $manufacturer_inputs_string);
$contents[] = array('align' => 'center', 'text' => '<br />' . HTML::button(OSCOM::getDef('image_save'), 'fa fa-save') . HTML::button(OSCOM::getDef('image_cancel'), 'fa fa-close', OSCOM::link(FILENAME_MANUFACTURERS, 'page=' . $_GET['page'] . '&mID=' . $mInfo->manufacturers_id)));
break;
case 'delete':
$heading[] = array('text' => '<strong>' . OSCOM::getDef('text_heading_delete_manufacturer') . '</strong>');
$contents = array('form' => HTML::form('manufacturers', OSCOM::link(FILENAME_MANUFACTURERS, 'page=' . $_GET['page'] . '&mID=' . $mInfo->manufacturers_id . '&action=deleteconfirm')));
$contents[] = array('text' => OSCOM::getDef('text_delete_intro'));
$contents[] = array('text' => '<br /><strong>' . $mInfo->manufacturers_name . '</strong>');
$contents[] = array('text' => '<br />' . HTML::checkboxField('delete_image', '', true) . ' ' . OSCOM::getDef('text_delete_image'));
if ($mInfo->products_count > 0) {
示例5: array
$contents[] = array('text' => OSCOM::getDef('text_sort_order') . '<br />' . HTML::inputField('sort_order', '', 'size="2"'));
$contents[] = array('text' => HTML::button(OSCOM::getDef('image_save'), 'fa fa-save', null, null, 'btn-success') . HTML::button(OSCOM::getDef('image_cancel'), null, OSCOM::link(FILENAME_CATEGORIES, 'cPath=' . $cPath), null, 'btn-link'));
break;
case 'edit_category':
if (isset($cInfo)) {
$heading[] = array('text' => OSCOM::getDef('text_info_heading_edit_category'));
$contents = array('form' => HTML::form('categories', OSCOM::link(FILENAME_CATEGORIES, 'action=update_category&cPath=' . $cPath), 'post', 'enctype="multipart/form-data"') . HTML::hiddenField('categories_id', $cInfo->categories_id));
$contents[] = array('text' => OSCOM::getDef('text_edit_intro'));
$category_inputs_string = '';
$languages = tep_get_languages();
for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
$category_inputs_string .= '<br />' . $OSCOM_Language->getImage($languages[$i]['code']) . ' ' . HTML::inputField('categories_name[' . $languages[$i]['id'] . ']', tep_get_category_name($cInfo->categories_id, $languages[$i]['id']));
}
$contents[] = array('text' => OSCOM::getDef('text_edit_categories_name') . $category_inputs_string);
$contents[] = array('text' => HTML::image(OSCOM::linkImage('Shop/' . $cInfo->categories_image), $cInfo->categories_name) . '<br />' . OSCOM::getConfig('http_path', 'Shop') . OSCOM::getConfig('http_images_path', 'Shop') . '<br /><strong>' . $cInfo->categories_image . '</strong>');
$contents[] = array('text' => OSCOM::getDef('text_edit_categories_image') . '<br />' . HTML::fileField('categories_image'));
$contents[] = array('text' => OSCOM::getDef('text_edit_sort_order') . '<br />' . HTML::inputField('sort_order', $cInfo->sort_order, 'size="2"'));
$contents[] = array('text' => HTML::button(OSCOM::getDef('image_save'), 'fa fa-save', null, null, 'btn-success') . HTML::button(OSCOM::getDef('image_cancel'), null, OSCOM::link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&cID=' . $cInfo->categories_id), null, 'btn-link'));
}
break;
case 'delete_category':
if (isset($cInfo)) {
$heading[] = array('text' => OSCOM::getDef('text_info_heading_delete_category'));
$contents = array('form' => HTML::form('categories', OSCOM::link(FILENAME_CATEGORIES, 'action=delete_category_confirm&cPath=' . $cPath)) . HTML::hiddenField('categories_id', $cInfo->categories_id));
$contents[] = array('text' => OSCOM::getDef('text_delete_category_intro'));
$contents[] = array('text' => '<strong>' . $cInfo->categories_name . '</strong>');
if ($cInfo->childs_count > 0) {
$contents[] = array('text' => OSCOM::getDef('text_delete_warning_childs', ['childs_count' => $cInfo->childs_count]));
}
if ($cInfo->products_count > 0) {
$contents[] = array('text' => OSCOM::getDef('text_delete_warning_products', ['products_count' => $cInfo->products_count]));