本文整理汇总了PHP中zotop::dump方法的典型用法代码示例。如果您正苦于以下问题:PHP zotop::dump方法的具体用法?PHP zotop::dump怎么用?PHP zotop::dump使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类zotop
的用法示例。
在下文中一共展示了zotop::dump方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: editAction
public function editAction($id, $type = '')
{
$config = zotop::model('zotop.config');
$config->id = $id;
if (form::isPostBack()) {
$post = form::post();
$post['settings'] = json_encode($post['settings']);
$update = $config->update($post, $id);
if ($update) {
msg::success('保存成功,重新加载中,请稍后……', zotop::url('zotop/config/index', array('parentid' => $post['parentid'])));
}
msg::error(zotop::dump($post, true));
}
$field = $config->read();
$field['settings'] = (array) json_decode($field['settings']);
$type = empty($type) ? $field['type'] : $type;
$field['type'] = $type;
$page = new dialog();
$page->set('title', '编辑');
$page->set('body', array('style' => 'min-width:600px;'));
$page->set('field', $field);
$page->set('type', $type);
$page->set('types', $config->types());
$page->set('controls', $config->controls());
$page->set('attrs', $config->attrs($type));
$page->display();
}
示例2: actionEdit
public function actionEdit($id)
{
$file = zotop::model('system.file');
$data = $file->read($id);
$file->update(array('status' => 1), $id);
zotop::dump($data);
}
示例3: read
public function read($value, $key = '')
{
if (empty($key)) {
$key = $this->getPrimaryKey();
}
/**/
$sql = array('select' => '*', 'from' => $this->getTableName(), 'where' => array($key, '=', $value), 'limit' => 1);
//$sql = "SELECT * FROM {$this->getTableName()} WHERE {$key}= '{$value}'";
$read = $this->db->getRow($sql);
zotop::dump($this->db->lastSql());
return $read;
}
示例4: onDefault
public function onDefault()
{
$header['title'] = '控制中心';
page::header($header);
page::top();
page::navbar(array(array('id' => 'main', 'title' => '首页', 'href' => url::build('zotop/index/main')), array('id' => 'info', 'title' => '系统信息', 'href' => url::build('zotop/index/info'))), 'main');
$db = zotop::db();
$user = $db->select('*')->from('user')->orderby('id', 'asc')->limit(1)->getAll();
zotop::dump($db->lastSql());
zotop::dump($user);
page::bottom('<span class="zotop-tip">最后一次登录时间:2009-8-9 14:17:54</span>');
page::footer();
}
示例5: onEdit
public function onEdit($file)
{
if (form::isPostBack()) {
$content = request::post('source');
msg::success('保存测试', '测试,继续编辑或者返回' . zotop::dump($content, true), 'reload');
}
$source = file::read(ROOT . $file);
$page['title'] = '文件编辑器';
page::header($page);
page::top();
page::navbar($this->navbar());
form::header(array('class' => 'sourceEditor'));
form::field(array('type' => 'label', 'label' => zotop::t('文件名称'), 'name' => 'filename', 'value' => $file, 'valid' => '', 'description' => zotop::t('')));
form::field(array('type' => 'source', 'label' => zotop::t('文件内容'), 'name' => 'source', 'value' => $source, 'valid' => 'required:true', 'description' => zotop::t('')));
form::buttons(array('type' => 'submit', 'value' => '保存文件'), array('type' => 'back'));
form::footer();
page::bottom();
page::footer();
}
示例6: parseOrderby
public function parseOrderby($orderby)
{
$str = '';
if (is_array($orderby)) {
zotop::dump($orderby);
foreach ($orderby as $key => $direction) {
$direction = strtoupper(trim($direction));
if (!in_array($direction, array('ASC', 'DESC', 'RAND()', 'RANDOM()', 'NULL'))) {
$direction = 'ASC';
}
$str .= ',' . $this->escapeColumn($key) . ' ' . $direction;
}
}
return trim($str, ',');
}
示例7: getTableStructure
/**
* 获取数据表的结构
*
*
*/
public function getTableStructure($flush = false)
{
static $table;
$tableName = $this->getTableName(true);
$tableFile = dirname(__FILE__);
zotop::dump($tableFile);
}
示例8: info
public static function info()
{
zotop::dump(dirname(dirname(dirname(__FILE__))) . DS . 'module.php');
}
示例9: __before
/**
* 动作触发之前调用
*
*/
public function __before($arguments = '')
{
zotop::dump($arguments);
}
示例10: getList
public function getList($where, $page = 1, $pagesize = 20)
{
zotop::dump($this->_user);
}
示例11:
<?php
$this->header();
$this->top();
$this->navbar();
zotop::dump(zotop::user());
$this->bottom();
$this->footer();
示例12: link
public static function link($href, $attrs = array())
{
$links = array();
zotop::dump($href);
$str = '';
if (is_array($href)) {
foreach ($href as $h) {
$str .= html::link($h, $attrs);
}
} else {
//使用绝对路径
$href = url::abs($href);
//一个页面只允许加载一次
//if( isset($links[strtolower($href)]) )
//{
// return '';
//}
$links[strtolower($href)] = true;
$attrs['href'] = $href;
$str = '<link' . html::attributes($attrs) . ' />';
}
return $str;
}