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


PHP field::get方法代码示例

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


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

示例1: field

 public static function field($attrs)
 {
     $html[] = '';
     if (is_array($attrs)) {
         $type = array_take('type', $attrs);
         $type = isset($type) ? $type : 'text';
         $html[] = field::get($type, $attrs);
     } else {
         $html[] = $attrs;
     }
     return implode("\n", $html);
 }
开发者ID:dalinhuang,项目名称:zotop,代码行数:12,代码来源:form.php

示例2: group

 /**
  * 控件组
  *
  * @param $attrs array 控件参数
  * @return string 控件代码
  */
 public static function group($attrs)
 {
     $html[] = '<div class="field-group">';
     $fields = arr::take('fields', $attrs);
     if (is_array($fields)) {
         foreach ($fields as $field) {
             if (is_array($field)) {
                 $type = arr::take('type', $field);
                 $type = isset($type) ? $type : 'text';
                 $field['class'] = isset($field['class']) ? 'short ' . $field['class'] : 'short';
                 $html[] = '	<div class="field-group-item">';
                 $html[] = '		<label for="' . $field['name'] . '">' . arr::take('label', $field) . '</label>';
                 $html[] = '		' . field::get($type, $field);
                 $html[] = '	</div>';
             } else {
                 $html[] = $field;
             }
         }
     } else {
         $html[] = $fields;
     }
     $html[] = '</div>';
     return implode("\n", $html);
 }
开发者ID:dalinhuang,项目名称:zotop,代码行数:30,代码来源:field.php

示例3: _field

 public static function _field($attrs)
 {
     if ($attrs['type'] == 'hidden') {
         $str = field::get($attrs);
     } else {
         $str = form::template(form::$template);
         $str = str_replace('{$label}', form::label($attrs), $str);
         $str = str_replace('{$description}', form::description($attrs), $str);
         $str = str_replace('{$field}', field::get($attrs), $str);
         $str = str_replace('{$display}', arr::take('display', $attrs) == 'none' ? ' style="display:none;"' : '', $str);
     }
     return $str;
 }
开发者ID:dalinhuang,项目名称:zotop,代码行数:13,代码来源:form.php

示例4: array

    echo zotop::url('zotop/image/edit', array('image' => url::encode($img['path'])));
    ?>
" class="dialog">编辑</a>
				<a href="<?php 
    echo zotop::url('zotop/image/delete', array('image' => url::encode($img['path']), 'referer' => url::encode(url::location())));
    ?>
" class="confirm">删除</a>
			</div>
		</li>
	<?php 
}
?>
	</ul>
</div>
<div class="clearfix"><?php 
echo $pagination;
?>
</div>
<div class="buttons">
	<?php 
echo field::get('hidden', array('id' => 'image', 'value' => $image));
?>
	<?php 
echo field::get('button', array('id' => 'insert', 'value' => '插入图片'));
?>
	<?php 
echo field::get('button', array('id' => 'close', 'value' => '关闭', 'class' => 'zotop-dialog-close'));
?>
</div>
<?php 
$this->footer();
开发者ID:dalinhuang,项目名称:zotop,代码行数:31,代码来源:library.php

示例5: array

<?php

$this->header();
echo html::script('$common/js/swfobject.js');
?>

<div class="" style="width:100%;height:460px;overflow:hidden;">
	<div id="SourceEditorLoading" style="height:460px;line-height:460px;text-align:center;">正在加载编辑器,请稍后……</div>
	<div id="SourceEditorPannel"></div>
	<?php 
echo field::get('textarea', array('name' => 'source', 'value' => $content));
?>
	<script type="text/javascript">
		//显示按钮
		dialog.setTitle('编辑:<?php 
echo $file;
?>
').setWidth(800).setTip('小提示:快捷键 Ctrl+S 可以快速保存').setButtons([{text:'保 存',callback:save},{text:'关 闭'}]);
		//加载编辑器
		var so = new SWFObject("<?php 
echo url::decode('$common/swf/ScriptEditor.swf');
?>
", "SourceEditor", "100%", "460", "9", "#ffffff");
			so.addVariable("Language","<?php 
echo file::ext($file);
?>
");
			so.addVariable("AfterInit","setContent");
			so.addParam("wmode", "Opaque");
			so.write("SourceEditorPannel");
		
开发者ID:dalinhuang,项目名称:zotop,代码行数:30,代码来源:editor.php

示例6: foreach

table::header('list sortable');
foreach ($configs as $config) {
    $type = $config['type'];
    $description = $config['description'];
    $settings = (array) json_decode($config['settings']);
    $attrs = array('type' => $config['type'] == 'folder' ? 'hidden' : $config['type'], 'name' => $config['id'], 'value' => $config['value'], 'valid' => $config['valid']);
    $attrs = array_merge($attrs, $settings);
    $column = array();
    $input = '';
    if ($type == 'folder') {
        $input .= '<div class="icon-area"><div class="zotop-icon zotop-icon-file folder"></div></div>';
        $input .= '<a href="' . zotop::url('system/config/index/' . $config['id']) . '"><b>' . $config['title'] . '</b></a><h5>' . $config['description'] . '</h5>';
        $input .= field::get($attrs);
    } else {
        $input .= '<div class="icon-area"><div class="zotop-icon zotop-icon-file txt"></div></div>';
        $input .= '<div class="label-area"><b>' . $config['title'] . '</b><h5 class="red">' . $config['id'] . '</h5></div>';
        $input .= '<div class="field-area">' . field::get($attrs) . '<span class="field-valid"></span><h5>' . $config['description'] . '</h5>' . '</div>';
    }
    $column['input'] = $input;
    $column['manage edit'] = '<a href="' . zotop::url('system/config/edit/' . $config['id']) . '" class="dialog">修改</a>';
    $column['manage delete'] = '<a href="' . zotop::url('system/config/delete/' . $config['id']) . '" class="confirm">删除</a>';
    table::row($column, 'select field');
}
table::footer();
form::buttons(array('type' => 'submit', 'value' => '保 存'), array('type' => 'back'));
form::footer();
?>

<?php 
$this->bottom();
$this->footer();
开发者ID:dalinhuang,项目名称:zotop,代码行数:31,代码来源:index.php

示例7: array

<?php

$this->header();
$this->top();
$this->navbar();
?>
<script>
	//设置按钮
	dialog.setTitle("<?php 
echo zotop::t('编辑') . ' &nbsp; <span>' . $file . '</span>';
?>
");
</script>
<style type="text/css">
body.dialog {width:750px;}
body.dialog textarea.textarea{width:100%;height:450px;padding:0px;border:0px;overflow:auto;white-space:nowrap;}
</style>
<?php 
form::header();
form::field('<div>' . field::get(array('type' => 'code,textarea', 'name' => 'filecontent', 'value' => $filecontent, 'width' => '100%', 'height' => '450px')) . '</div>');
form::buttons(array('type' => 'submit', 'value' => '保 存'), array('type' => 'button', 'value' => '关闭', 'class' => 'zotop-dialog-close'));
form::footer();
$this->footer();
开发者ID:dalinhuang,项目名称:zotop,代码行数:23,代码来源:edit.php

示例8: array

    echo zotop::url('blog/index/index/' . $categoryid . '/' . $s);
    ?>
"><span><?php 
    echo $t;
    ?>
</span></a></li>
	<?php 
}
?>
	</ul>
	<form class="smallsearch">
		<?php 
echo field::get(array('type' => 'text', 'name' => 'keywords', 'title' => '请输入关键词进行搜索'));
?>
		<?php 
echo field::get(array('type' => 'submit', 'value' => '搜索'));
?>
	</form>
</div>
<?php 
form::header(array('valid' => 'false', 'class' => 'list', 'action' => zotop::url('blog/index/operation')));
$column = array();
$column['select'] = html::checkbox(array('name' => 'table', 'class' => 'selectAll'));
$column['status w30 center'] = '状态';
$column['order w30 center'] = '权重';
$column['name'] = '名称';
$column['categoryid w50'] = '分类';
$column['comment w30 center'] = '评论';
$column['atime w120'] = '最后修改时间';
table::header('list', $column);
foreach ($blogs['data'] as $blog) {
开发者ID:dalinhuang,项目名称:zotop,代码行数:31,代码来源:index.php

示例9: foreach

    foreach ($configs as $config) {
        $type = $config['type'];
        $description = $config['description'];
        $settings = (array) json_decode($config['settings']);
        $attrs = array('name' => $config['id'], 'value' => $config['value']);
        $attrs = array_merge($attrs, $settings);
        $column = array();
        $input = '';
        if ($type == 'folder') {
            $input .= '<div style="float:left;width:50px;height:100%;text-align:center;"><img src="' . url::decode('$theme/image/fileext/big/folder.gif') . '" width="32px"></div>';
            $input .= '<a href="' . zotop::url('zotop/config/index', array('parentid' => $config['id'])) . '"><b>' . $config['title'] . '</b></a><h5>' . $config['description'] . '</h5>';
            $input .= field::get('hidden', $attrs);
        } else {
            $input .= '<div style="float:left;width:50px;height:100%;text-align:center;"><img src="' . url::decode('$theme/image/fileext/big/file.gif') . '" width="32px"></div>';
            $input .= '<div style="float:left;width:160px;height:100%;"><b>' . $config['title'] . '</b><h5 class="red">' . $config['id'] . '</h5></div>';
            $input .= '<div style="float:left;">' . field::get($type, $attrs) . '<h5>' . $config['description'] . '</h5>' . '</div>';
        }
        $column['input'] = $input;
        $column['manage edit'] = '<a href="' . zotop::url('zotop/config/edit', array('id' => $config['id'])) . '" class="dialog">修改</a>';
        $column['manage delete'] = '<a href="' . zotop::url('zotop/config/delete', array('id' => $config['id'])) . '" class="confirm">删除</a>';
        table::row($column, 'select');
    }
    table::footer();
    form::bottom('<span class="zotop-tip">拖动并保存,改变顺序</span>');
    form::footer(array(array('type' => 'submit', 'value' => '保 存'), array('type' => 'back')));
}
?>

<?php 
$this->bottom();
$this->footer();
开发者ID:dalinhuang,项目名称:zotop,代码行数:31,代码来源:index.php


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