本文整理汇总了PHP中Html::br方法的典型用法代码示例。如果您正苦于以下问题:PHP Html::br方法的具体用法?PHP Html::br怎么用?PHP Html::br使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Html
的用法示例。
在下文中一共展示了Html::br方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: overview
function overview()
{
$this->scaff->order_by = $_GET['order'] ? $_GET['order'] : 'Stadt';
$this->scaff->group_by = 'Location_id';
$this->scaff->add_search_field('PLZ');
$this->scaff->add_search_field('Stadt');
$this->scaff->template_vars['stadt_value'] = $_GET['Stadt'] ? $_GET['Stadt'] : '';
$this->scaff->search_method = 'LIKE';
$this->scaff->template_vars['reset'] = '';
if ($_GET['PLZ'] || $_GET['PLZ'] === '0') {
$_GET['PLZ'] = $this->scaff->template_vars['plz_value'] = preg_replace('/[^0-9]/', '', $_GET['PLZ']);
for ($i = 0; $i < 5 - strlen($_GET['PLZ']); $i++) {
$this->scaff->template_vars['plz_value'] .= 'x';
}
$_GET['PLZ'] .= '%';
} else {
$this->scaff->template_vars['plz_value'] = '';
}
if ($stadt = $_GET['Stadt']) {
$_GET['Stadt'] = "%{$stadt}%";
}
if ($_GET['Stadt'] || $_GET['PLZ'] || $_GET['PLZ'] === '0') {
$this->scaff->template_vars['reset'] = Html::br() . Html::a(SELF, 'Alle zeigen');
}
return $this->scaff->make_table($sql, INSTALL_PATH . '/Module/LocationsFrontend/Templates/LocationsOverview.template.html');
}
示例2: show
function show($meldung = '')
{
if (defined('HTTPS') && HTTPS && !isset($_SERVER['HTTPS'])) {
header("Location: " . 'https://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']);
}
if ($_SESSION['uuid']) {
$vars['uuid'] = $_SESSION['uuid'];
} else {
$vars['uuid'] = $_SESSION['uuid'] = General::uuid();
}
$template = $this->system->login_template ? $this->system->login_template : INSTALL_PATH . '/Templates/Login.template.html';
$login_form = new Template($template);
$meldungen = Template::get_all_parts($login_form->template);
$vars['meldung'] = $meldungen[$meldung] ? $meldungen[$meldung] : $meldung;
$vars['action'] = SELF_URL;
if (isset($_GET['logout'])) {
$vars['user'] = $_GET['logout'];
$vars['meldung'] = $login_form->parse_template('LOGOUT-MELDUNG', $vars);
return Html::div($login_form->parse_template('FORM', $vars));
}
if (!isset($_POST['user']) || !isset($_POST['pass'])) {
$vars['meldung'] .= Html::br() . $meldungen['KENNWORT_EINGEBEN'];
return Html::div($login_form->parse_template('FORM', $vars));
} else {
$vars['meldung'] .= Html::br() . $meldungen['FAIL'];
return Html::div($login_form->parse_template('FORM', $vars));
}
}
示例3: formComponent
/**
* Form Component
*/
public static function formComponent()
{
$_templates = Themes::getTemplates();
foreach ($_templates as $template) {
$templates[basename($template, '.template.php')] = basename($template, '.template.php');
}
echo '<div class="col-xs-3">' . Form::open() . Form::hidden('csrf', Security::token()) . Form::label('sandbox_form_template', __('Sandbox template', 'sandbox')) . Form::select('sandbox_form_template', $templates, Option::get('sandbox_template'), array('class' => 'form-control')) . Html::br() . Form::submit('sandbox_component_save', __('Save', 'sandbox'), array('class' => 'btn btn-default')) . Form::close() . '</div>';
}
示例4: test_br
/**
* Tests Html::br()
*
* @test
*/
public function test_br()
{
$output = Html::br();
$expected = "<br />";
$this->assertEquals($expected, $output);
$output = Html::br('2', array('id' => 'example', 'class' => 'sample', 'style' => 'color:red;'));
$expected = '<br id="example" class="sample" style="color:red;" /><br id="example" class="sample" style="color:red;" />';
$this->assertEquals($expected, $output);
}
示例5: test_br
/**
* Test Html::br();
*
* @test
*/
public function test_br()
{
$expected = '<br /><br />';
$output = Html::br(2);
$this->assertEquals($expected, $output);
$expected = '<br class="clearfix" />';
$output = Html::br(1, array('class' => 'clearfix'));
$this->assertEquals($expected, $output);
}
示例6: html
function html($showErrors = false)
{
if (!$this->isContainer) {
return parent::html($showErrors);
}
$elementsHtml = '';
foreach ($this->elements as $e) {
$elementsHtml .= $e->html() . Html::br();
}
parent::setContent($elementsHtml);
return parent::html();
}
示例7: show
function show($meldung = '')
{
if (defined('HTTPS') && HTTPS && !isset($_SERVER['HTTPS'])) {
header("Location: " . 'https://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']);
}
$vars['uuid'] = $_SESSION['uuid'] = General::uuid();
$template = $this->system->login_template ? $this->system->login_template : INSTALL_PATH . '/Templates/Login.template.html';
$login_form = new Template($template);
$meldungen = Template::get_all_parts($login_form->template);
$vars['meldung'] = $meldungen[$meldung] ? $meldungen[$meldung] : $meldung;
$vars['action'] = SELF_URL;
if (isset($_GET['logout'])) {
$vars['user'] = $_GET['logout'];
$vars['meldung'] = $login_form->parse_template('LOGOUT-MELDUNG', $vars);
}
if (isset($_GET['recover'])) {
if ($_POST['recover_submit']) {
$email = General::input_clean($_POST['email'], true);
foreach ($this->system->user_tables as $t) {
$sql = "SELECT * FROM `{$t}` WHERE `E-Mail` = '{$email}'";
$result = $this->system->connection->db_single_row($sql);
if ($result) {
break;
}
}
if ($result) {
$mail = $login_form->parse_template('RECOVER_MAIL', $result);
mail($result['E-Mail'], 'Ihr ' . PROJECT_NAME . ' Passwort', $mail, 'From: ' . PROJECT_NAME . '<noreply@' . preg_replace('/^www\\./i', '', $_SERVER['HTTP_HOST']) . '>');
return $login_form->parse_template('RECOVER_THANKYOU', $result);
} else {
return $login_form->parse_template('RECOVER_NOFOUND', $result);
}
} else {
$vars['meldung'] = 'Bitte geben Sie Ihre E-Mail-Adresse ein: ';
}
return Html::div($login_form->parse_template('RECOVER_FORM', $vars));
}
if (!isset($_POST['user']) || !isset($_POST['pass'])) {
$vars['meldung'] .= Html::br() . $meldungen['KENNWORT_EINGEBEN'];
return Html::div($login_form->parse_template('FORM', $vars));
} else {
/*if ($this->check_login($system))
{
//if (HTTPS) header("Location: ".'http://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']);
header("Location: ".'http://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']);
}
else
{*/
$vars['meldung'] .= Html::br() . $meldungen['FAIL'];
return Html::div($login_form->parse_template('FORM', $vars));
// }
}
}
示例8: wrap_string
function wrap_string($string, $line_length)
{
if (strlen($string) > $line_length) {
$array = explode(' ', $string);
$count = 0;
for ($i = 0; $i < count($array); $i++) {
$count += strlen($array[$i]);
if ($count >= $line_length) {
$array[$i] .= Html::br();
$count = 0;
}
}
$string = implode(' ', $array);
}
return $string;
}
示例9: ofertas_novedades
/**
* Página de inicio de muebleBBB
* @param array $ofertas -> Array de Productos en oferta
* @param array $novedades -> Array de Productos novedad
*/
function ofertas_novedades($ofertas, $novedades)
{
echo Html::div_("contenedor_inicio");
// Columna izquierda "Ofertas"
echo Html::div_("ofertas columnas_inicio left") . Html::seccion(1, "Ofertas");
foreach ($ofertas as $oferta) {
$precio_descuento = $oferta->__get("precio") - $oferta->__get("precio") / 100 * $oferta->__get("descuento");
echo Html::div_("contenedor_producto") . Html::a_("catalogo.php?id_producto={$oferta->__get("codigo")}") . Html::img("{$oferta->__get("imagen")}", "{$oferta->__get("nombre")}") . Html::span("{$oferta->__get("descuento")}%", "oferta") . Html::seccion(2, "{$oferta->__get("nombre")}", "nombre_producto") . Html::div_("detalles") . Html::p("{$oferta->__get("categoria")}", "categoria") . Html::p_("{$precio_descuento} €", "precio") . Html::br() . Html::del("{$oferta->__get("precio")}€", "precio_antes") . Html::_p() . Html::_div() . Html::_a() . Html::_div();
}
echo Html::_div();
// Fin columna izquierda "Ofertas"
// Columna derecha "Novedades"
echo Html::div_("novedades columnas_inicio right") . Html::seccion(1, "Novedades");
foreach ($novedades as $novedad) {
echo Html::div_("contenedor_producto") . Html::a_("catalogo.php?id_producto={$novedad->__get("codigo")}") . Html::img("{$novedad->__get("imagen")}", "{$novedad->__get("nombre")}") . Html::div_("novedad") . Html::img("../imagenes/nuevo.png", "etiqueta indicando novedad", "etiqueta_nuevo") . Html::_div() . Html::seccion(2, "{$novedad->__get("nombre")}", "nombre_producto") . Html::div_("detalles") . Html::p("{$novedad->__get("categoria")}", "categoria") . Html::p("{$novedad->__get("precio")}€", "precio") . Html::_div() . Html::_div() . Html::_a();
}
echo Html::_div();
echo Html::_div();
}
示例10: item_view
public function item_view()
{
$class = str_replace('\\', '', $this->class);
$val = $this->item->{$this->field} ? $this->item->{$this->field} : '';
$result = html_tag('input', array('name' => "{$class}-" . ($this->item->id ? $this->item->id : 'new') . "-{$this->field}", 'type' => 'file'));
if ($val) {
$upload_type = $this->def('upload_type', 'image');
if ($upload_type == 'image') {
$result .= \Html::br(2);
if ($this->def('secure')) {
$result .= $this->item->{$this->field};
} else {
$result .= html_tag('image', array('src' => $this->item->get_image(array('field' => $this->field))));
}
} elseif ($upload_type == 'audio') {
$result .= \Html::nbs(3) . $this->item->{$this->field};
}
}
return $result;
}
示例11: item_view
public function item_view()
{
// First, build the Audiofile select
$audiofiles = Model_Audiofile::find()->order_by('filename')->get();
$select = array('<option value=""></option>');
foreach ($audiofiles as $af) {
$select[$af->id] = '<option value="' . $af->id . '" not_selected="1">' . $af->filename . '</option>';
}
$result = "<table id=\"track_list\">\n\t\t\t\t<tr>\n\t\t\t\t\t<td><b>#</b></td>\n\t\t\t\t\t<td><b>Name</b></td>\n\t\t\t\t\t<td><b>File</b></td>\n\t\t\t\t\t<td></td>\n\t\t\t\t</tr>";
foreach ($this->item->tracks as $track) {
$temp_select = $select;
if ($track->audiofile) {
$temp_select[$track->audiofile->id] = str_replace('not_selected', 'selected', $temp_select[$track->audiofile->id]);
}
$result .= "<tr>\n\t\t\t\t\t<td>" . html_tag('input', array('type' => 'text', 'value' => $track->track_num, 'name' => "item_field[Model_Track][{$track->id}][track_num]")) . "</td>\n\t\t\t\t\t<td>" . html_tag('input', array('type' => 'text', 'value' => $track->name, 'name' => "item_field[Model_Track][{$track->id}][name]")) . "</td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<select name=\"item_field[Model_Track][{$track->id}][audiofile_id]\">" . implode('', $temp_select) . "</select>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td>" . html_tag('input', array('type' => 'button', 'value' => 'delete', 'class' => 'delete', 'track_id' => $track->id, 'onclick' => '$(this).parent().parent().remove();')) . "</td>\n\t\t\t\t</tr>";
}
// add blank track field for cloning purposes
$result .= "<tr style=\"display:none;\" id=\"track_clone\">\n\t\t\t\t<td>" . html_tag('input', array('type' => 'text', 'class' => 'track_num')) . "</td>\n\t\t\t\t<td>" . html_tag('input', array('type' => 'text', 'class' => 'name')) . "</td>\n\t\t\t\t<td><select class=\"audiofile\">" . implode('', $select) . "</select></td>\n\t\t\t\t<td>" . html_tag('input', array('type' => 'button', 'class' => 'delete', 'value' => 'delete', 'onclick' => '$(this).parent().parent().remove();')) . "</td>\n\t\t\t</tr>";
$result .= "</table>" . Html::br(2) . html_tag('input', array('type' => 'button', 'value' => 'new track', 'id' => 'new_track', 'onclick' => "TrackField.newTrack();"));
return $result;
}
示例12: make_form
function make_form($edit = '')
{
if ($edit) {
$values = $this->get_entry($edit);
$edit = is_array($edit) ? current($edit) : $edit;
}
$return = '';
$return .= Form::form_tag($this->action ? $this->action : SELF, 'post', 'multipart/form-data', array('onsubmit' => 'return checkform()'));
$table = new Table(2);
foreach ($this->cols_array as $key => $col) {
$name = $key;
$show_name = $col['name'];
$id = 'input_' . $GLOBALS['input_id'];
$encoded_name = rawurlencode($name);
$attr_array = $col['attributes'];
if (isset($values[$key])) {
$value = $values[$key];
} elseif ($col['value']) {
$value = $col['value'];
} elseif ($this->re_entry && $_POST[$name]) {
$value = $_POST[$name];
} else {
$value = '';
}
if ($name != 'id') {
switch ($col['type']) {
case 'text':
$attr_array['id'] = $id;
if (isset($col['length'])) {
$attr_array['size'] = $field['length'];
$attr_array['maxlength'] = $field['length'];
} else {
$attr_array['size'] = 40;
}
$input = Form::add_input('text', $encoded_name, $value, $attr_array);
break;
case 'select':
$attr_array['id'] = $id;
$select = new Select($encoded_name, $attr_array);
$select->add_option('', '--Bitte auswählen--');
$attr_array = array();
foreach ($col['options'] as $option => $name) {
if ($value == $option) {
$attr_array['selected'] = 'selected';
} else {
unset($attr_array['selected']);
}
$select->add_option(rawurlencode($option), $name, $attr_array);
}
if ($col['sonstiges']) {
$select->add_option('', 'Sonstige:');
}
//,array('onclick'=>'sonstig_input(this,\''.rawurlencode($encoded_name).'\')'));
$input = $select->flush_select();
break;
case 'check':
$input = '';
foreach ($col['options'] as $option => $name) {
if (is_array($value) && in_array($option, $value)) {
$attr_array['checked'] = 'checked';
} else {
unset($attr_array['checked']);
}
$input .= Form::add_input('checkbox', $encoded_name . '[]', $option, $attr_array) . ' ' . $name . Html::br();
}
break;
case 'textarea':
$attr_array['id'] = $id;
$attr_array['cols'] = $col['attributes']['cols'] ? $col['attributes']['cols'] : 30;
$attr_array['rows'] = $col['attributes']['rows'] ? $col['attributes']['rows'] : 10;
$input = Form::add_textarea($encoded_name, $value, $attr_array);
//,'cols'=>'35','rows'=>'2','onfocus'=>'textarea_grow(\''.$id.'\')','onblur'=>'textarea_shrink(\''.$id.'\')'));
if ($col['html']) {
if (!$xinha_loaded) {
$GLOBALS['scripts'] .= Html::script(' _editor_url = "/' . INSTALL_PATH . '/Libraries/Xinha/";_editor_lang = "de";_document_root = "' . DOCUMENT_ROOT . '";project_name = "' . PROJECT_NAME . '";');
$GLOBALS['scripts'] .= Html::script('', array('src' => '/' . INSTALL_PATH . '/Libraries/Xinha/XinhaLoader.js'));
$GLOBALS['scripts'] .= Html::script('', array('src' => '/' . INSTALL_PATH . '/System/Scaffold/XinhaConfig.php'));
$GLOBALS['scripts'] .= Html::script('xinha_editors.push("' . $id . '")');
$xinha_loaded = true;
} else {
$GLOBALS['scripts'] .= Html::script('xinha_editors.push("' . $id . '")');
}
}
break;
case 'upload':
$attr_array['id'] = $id;
$input = $value ? $value . Form::add_input('hidden', $encoded_name, $value, $attr_array) . Html::br() . Html::span('Neue Datei verknüpfen:', array('class' => 'klein')) . Html::br() : '';
$input .= Form::add_input('file', $encoded_name . '_upload');
break;
case 'custom':
$input = $col['custom_input'];
break;
case 'timestamp':
$this->calendar_script();
$attr_array['id'] = 'tag_' . $GLOBALS['input_id'];
$attr_array['size'] = '2';
$input = Form::add_input('text', $encoded_name . '_tag', ($tag = Date::tag($value)) != 0 && $value != '' ? $tag : '', $attr_array) . '.';
$attr_array['id'] = 'monat_' . $GLOBALS['input_id'];
$attr_array['size'] = '2';
$input .= Form::add_input('text', $encoded_name . '_monat', ($monat = Date::monat($value)) != 0 && $value != '' ? $monat : '', $attr_array) . '.';
//.........这里部分代码省略.........
示例13: order_images
function order_images()
{
$images_sql = "SELECT bilder.*, indices.Bild_id,indices.Raum_id,indices.index\n\t\tFROM `{$this->pics_db_table}` `bilder`\n\t\tLEFT JOIN `{$this->indices_db_table}` `indices`\n\t\t ON bilder.id = indices.Bild_id\n\t\tWHERE indices.Raum_id = " . $_GET['order'] . "\n\t\tORDER BY indices.index, indices.id ASC, bilder.Name ASC";
$images = $this->connection->db_assoc($images_sql);
$room_info = $this->get_room_info($_GET['order']);
$return = Html::h(2, $room_info['Roomname'] . ': Reihenfolge bearbeiten');
$return .= Form::form_tag(SELF . '?order=' . $_GET['order'], '', '', array('onsubmit' => 'updateOrder()', 'id' => 'orderform', 'style' => 'float:left;margin-right:20px;'));
$GLOBALS['scripts'] .= Html::script('', array('src' => '/' . INSTALL_PATH . '/Module/RheinaufExhibition/Backend/order.js'));
$select = new Select('select[]', array('size' => 24, 'id' => 'select', 'onclick' => "preview(this)", 'style' => 'min-width:220px;'));
foreach ($images as $img) {
$dateiname = $img['Dateiname'];
$select->add_option($img['id'], $dateiname . ' ' . $img['Name'], array('filename' => $dateiname));
}
$return .= $select->flush_select() . Html::br();
$return .= Html::a('javascript:void(0);', 'Hoch', array('class' => 'button', 'onclick' => 'up()'));
$return .= Html::a('javascript:void(0);', 'Runter', array('class' => 'button', 'onclick' => 'down()'));
$return .= Html::a('javascript:void(0);', 'Löschen', array('class' => 'button', 'onclick' => 'del()'));
$return .= Html::a('javascript:void(0);', 'Titelbild', array('class' => 'button', 'onclick' => 'coverpic()'));
if (!$room_info['Titelbild']) {
$room_info['Titelbild'] = $images[0]['Dateiname'];
}
$return .= Form::add_input('hidden', 'coverpic', $room_info['Titelbild'], array('id' => 'coverpic'));
$return .= Form::add_input('submit', 'submit', 'Speichern', array('class' => 'button'));
$return .= Html::a(SELF, 'Zurück', array('class' => 'button', 'onclick' => 'return getChanged()'));
$return .= Form::close_form();
$return .= Html::div('Ausgewähltes Bild' . Html::br() . Html::img('', '', array('id' => 'selected_preview')), array('style' => 'display:none'));
$return .= Html::br();
$return .= 'Titelbild' . Html::br();
$return .= Html::img('/' . $this->filepath . $this->landscape_thumb_dir . $room_info['Titelbild'], 'Noch nicht festgelegt', array('id' => 'coverpic_preview'));
return $return;
}
示例14: make_form
function make_form($edit = '')
{
if ($edit) {
$values = $this->get_entry($edit);
$edit = is_array($edit) ? current($edit) : $edit;
}
$return = '';
$return .= Form::form_tag($this->action ? $this->action : SELF, 'post', 'multipart/form-data', array('onsubmit' => 'return checkform()'));
$table = new Table(2);
foreach ($this->cols_array as $key => $col) {
$name = $key;
$show_name = $col['name'];
$id = 'input_' . $GLOBALS['input_id'];
$encoded_name = rawurlencode($name);
$attr_array = $col['attributes'];
if (isset($values[$key])) {
$value = $values[$key];
} elseif ($col['value']) {
$value = $col['value'];
} elseif ($this->re_entry && $_POST[$name]) {
$value = $_POST[$name];
} else {
$value = '';
}
if ($name != 'id') {
switch ($col['type']) {
case 'text':
$attr_array['id'] = $id;
if (isset($col['length'])) {
$attr_array['size'] = $field['length'];
$attr_array['maxlength'] = $field['length'];
} else {
$attr_array['size'] = 40;
}
$input = Form::add_input('text', $encoded_name, $value, $attr_array);
break;
case 'select':
$attr_array['id'] = $id;
$select = new Select($encoded_name, $attr_array);
$select->add_option('', '--Bitte auswählen--');
$attr_array = array();
foreach ($col['options'] as $option => $name) {
if ($value == $option) {
$attr_array['selected'] = 'selected';
} else {
unset($attr_array['selected']);
}
$select->add_option(rawurlencode($option), $name, $attr_array);
}
if ($col['sonstiges']) {
$select->add_option('', 'Sonstige:');
}
//,array('onclick'=>'sonstig_input(this,\''.rawurlencode($encoded_name).'\')'));
$input = $select->flush_select();
break;
case 'check':
$input = '';
foreach ($col['options'] as $option => $name) {
if (is_array($value) && in_array($option, $value)) {
$attr_array['checked'] = 'checked';
} else {
unset($attr_array['checked']);
}
$input .= Form::add_input('checkbox', $encoded_name . '[]', $option, $attr_array) . ' ' . $name . Html::br();
}
break;
case 'textarea':
$attr_array['id'] = $id;
$attr_array['cols'] = $col['attributes']['cols'] ? $col['attributes']['cols'] : 30;
$attr_array['rows'] = $col['attributes']['rows'] ? $col['attributes']['rows'] : 10;
$input = Form::add_textarea($encoded_name, $value, $attr_array);
//,'cols'=>'35','rows'=>'2','onfocus'=>'textarea_grow(\''.$id.'\')','onblur'=>'textarea_shrink(\''.$id.'\')'));
if ($col['html']) {
if (!$xinha_loaded) {
$GLOBALS['scripts'] .= Html::script(' _editor_url = "/' . INSTALL_PATH . '/Libraries/Xinha/";_editor_lang = "de";_document_root = "' . DOCUMENT_ROOT . '"');
$GLOBALS['scripts'] .= Html::script('', array('src' => '/' . INSTALL_PATH . '/Libraries/Xinha/htmlarea.js'));
$GLOBALS['scripts'] .= Html::script('
xinha_editors = [];
xinha_init = null;
xinha_config = null;
xinha_plugins = null;
// This contains the names of textareas we will make into Xinha editors
xinha_init = xinha_init ? xinha_init : function()
{
xinha_plugins = xinha_plugins ? xinha_plugins :
[
"SuperClean",
"ImageManager",
//"GetHtml",
//"Linker",
"DoubleClick"
];
if(!HTMLArea.loadPlugins(xinha_plugins, xinha_init)) return;
xinha_editors.push("' . $id . '");
//.........这里部分代码省略.........
示例15: content_4f42433c6c2b9
function content_4f42433c6c2b9($_smarty_tpl)
{
?>
<p>welcome to item view.</p>
<a href="/admin/list/<?php
echo $_smarty_tpl->tpl_vars['table']->value;
?>
">back to list</a>
<?php
echo Html::br(2);
?>
<span style="color:green;"><?php
if (isset($_smarty_tpl->tpl_vars['success']->value)) {
echo $_smarty_tpl->tpl_vars['success']->value;
}
?>
</span>
<form action="/admin/item/<?php
echo $_smarty_tpl->tpl_vars['table']->value;
?>
?<?php
if ($_smarty_tpl->tpl_vars['item']->value->id) {
?>
id=<?php
echo $_smarty_tpl->tpl_vars['item']->value->id;
} else {
?>
new=1<?php
}
?>
" method="POST" name="save_item" enctype="multipart/form-data">
<table border="0" cellspacing="5" cellpadding="5">
<?php
$_smarty_tpl->tpl_vars['field'] = new Smarty_Variable();
$_smarty_tpl->tpl_vars['field']->_loop = false;
$_from = $_smarty_tpl->tpl_vars['item_config']->value;
if (!is_array($_from) && !is_object($_from)) {
settype($_from, 'array');
}
foreach ($_from as $_smarty_tpl->tpl_vars['field']->key => $_smarty_tpl->tpl_vars['field']->value) {
$_smarty_tpl->tpl_vars['field']->_loop = true;
?>
<tr>
<td valign="top"><?php
echo $_smarty_tpl->tpl_vars['field']->value['desc'];
?>
: </td>
<td><?php
echo $_smarty_tpl->tpl_vars['field']->value['type']->item_view();
?>
</td>
</tr>
<?php
}
?>
<tr>
<td colspan="2">
<input type="submit" value="save" name="save_item" />
<input type="button" value="cancel" onclick="window.location = '/admin/list/<?php
echo $_smarty_tpl->tpl_vars['table']->value;
?>
';" />
<?php
if ($_smarty_tpl->tpl_vars['item']->value->id) {
?>
<input type="submit" value="delete" name="delete" onclick="alert('Are you sure you want to delete this record?');"/>
<?php
}
?>
</td>
</tr>
</table>
</form>
<?php
echo Html::br(3);
}
开发者ID:nathanharper,项目名称:divine-economy,代码行数:78,代码来源:58fd8bf77f260aaa5557fe32cca4926bc9fd4126.file.item.smarty.php