當前位置: 首頁>>代碼示例>>PHP>>正文


PHP block::footer方法代碼示例

本文整理匯總了PHP中block::footer方法的典型用法代碼示例。如果您正苦於以下問題:PHP block::footer方法的具體用法?PHP block::footer怎麽用?PHP block::footer使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在block的用法示例。


在下文中一共展示了block::footer方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: onDefault

 public function onDefault()
 {
     $header['title'] = '控製麵板';
     $header['js'][] = url::module() . '/admin/js/side.js';
     $header['body']['class'] = 'side';
     page::header($header);
     block::header(array('title' => '應用列表', 'action' => '<a href="#" title="欄目管理">管理</a>'));
     echo '<ul id="applications" class="list">';
     echo '	<li><a href="' . zotop::url('zotop/main') . '" target="mainIframe">控製中心</a></li>';
     echo '	<li><a href="' . zotop::url('zotop/test') . '" target="mainIframe">表單測試</a></li>';
     echo '	<li><a href="' . zotop::url('database') . '" target="mainIframe">數據庫管理</a></li>';
     echo '	<li><a href="' . zotop::url('filemanager') . '" target="mainIframe">文件管理</a></li>';
     echo '</ul>';
     block::footer();
     block::header(array('title' => '內容管理', 'action' => '<a href="javascript:zotop.frame.side().location.reload();">刷新</a> <a href="#" title="欄目管理">管理</a>'));
     echo '<ul class="list">';
     echo '	<li><a href="' . zotop::url('zotop/main') . '" target="mainIframe">控製中心</a></li>';
     echo '	<li><a href="' . zotop::url('zotop/test') . '" target="mainIframe">表單測試</a></li>';
     echo '	<li><a href="' . zotop::url('database') . '" target="mainIframe">數據庫管理</a></li>';
     echo '	<li><a href="' . zotop::url('filemanager') . '" target="mainIframe">文件管理</a></li>';
     echo '</ul>';
     block::footer();
     //echo '<div style="height:600px;"></div>';
     page::footer();
 }
開發者ID:dalinhuang,項目名稱:zotop,代碼行數:25,代碼來源:side.php

示例2: onDefault

 public function onDefault()
 {
     if (form::isPostBack()) {
         msg::error('開發中', '數據保存開發中,請稍後……');
     }
     $header['title'] = '係統設置';
     page::header($header);
     page::top();
     page::navbar($this->navbar(), 'main');
     form::header();
     block::header('網站基本信息');
     form::field(array('type' => 'text', 'label' => zotop::t('網站名稱'), 'name' => 'zotop.site.title', 'value' => zotop::config('zotop.site.title'), 'description' => zotop::t('網站名稱,將顯示在標題和導航中')));
     form::field(array('type' => 'text', 'label' => zotop::t('網站域名'), 'name' => 'zotop.site.domain', 'value' => zotop::config('zotop.site.domain'), 'description' => zotop::t('網站域名地址,不包含http://,如:www.zotop.com')));
     form::field(array('type' => 'text', 'label' => zotop::t('備案信息'), 'name' => 'zotop.site.icp', 'value' => zotop::config('zotop.site.icp'), 'description' => zotop::t('頁麵底部可以顯示 ICP 備案信息,如果網站已備案,在此輸入您的授權碼,它將顯示在頁麵底部,如果沒有請留空')));
     form::field(array('type' => 'select', 'options' => array('0' => '不顯示', '1' => '顯示'), 'label' => zotop::t('授權信息'), 'name' => 'zotop.site.license', 'value' => zotop::config('zotop.site.license'), 'description' => zotop::t('頁腳部位顯示程序官方網站鏈接')));
     form::field(array('type' => 'textarea', 'label' => zotop::t('網站簡介'), 'name' => 'zotop.site.about', 'value' => zotop::config('zotop.site.about')));
     block::footer();
     block::header('聯係信息設置');
     form::field(array('type' => 'text', 'label' => zotop::t('公司名稱'), 'name' => 'zotop.site.title', 'value' => '', 'description' => zotop::t('網站隸屬的公司或者組織名稱')));
     form::field(array('type' => 'textarea', 'label' => zotop::t('網站簡介'), 'name' => 'zotop.site.about', 'value' => ''));
     block::footer();
     form::buttons(array('type' => 'submit'), array('type' => 'back'));
     form::footer();
     page::bottom();
     page::footer();
 }
開發者ID:dalinhuang,項目名稱:zotop,代碼行數:26,代碼來源:setting.php

示例3: onDefault

 public function onDefault()
 {
     if (form::isPostBack()) {
         $post = array();
         $post['username'] = request::post('username');
         $post['password'] = request::post('password');
         $post['logintime'] = time();
         $user = zotop::model('zotop.user');
         $data = $user->read($post['username'], 'username');
         //zotop::dump($data);
         if ($data == false) {
             msg::error('登陸失敗', zotop::t('賬戶名稱`{$username}`不存在,請檢查!', array('username' => $post['username'])));
         }
         zotop::user($data);
         msg::success('登陸成功', '登陸成功,係統正在加載中', 'reload', 2);
     }
     if (zotop::user() != null) {
         zotop::redirect('zotop/index');
     }
     $header['title'] = '用戶登錄';
     $header['js'] = url::module() . '/admin/js/login.js';
     $header['body']['class'] = "login";
     page::header($header);
     block::header(array('id' => 'LoginWindow', 'title' => '用戶登錄'));
     form::header(array('title' => '', 'description' => '請輸入用戶名和密碼', 'class' => 'small'));
     form::field(array('type' => 'text', 'label' => zotop::t('帳 戶(U)'), 'name' => 'username', 'value' => zotop::user('username'), 'valid' => 'required:true'));
     form::field(array('type' => 'password', 'label' => zotop::t('密 碼(P)'), 'name' => 'password', 'value' => ''));
     form::buttons(array('type' => 'submit', 'value' => '登 陸'), array('type' => 'button', 'name' => 'options', 'value' => '選 項'));
     form::footer();
     block::footer();
     page::footer();
 }
開發者ID:dalinhuang,項目名稱:zotop,代碼行數:32,代碼來源:login.php

示例4: onSide

 public function onSide()
 {
     $header['title'] = '係統管理';
     $header['js'][] = url::module() . '/admin/js/side.js';
     $header['body']['class'] = 'side';
     page::header($header);
     block::header(array('title' => '係統工具', 'class' => 'show'));
     echo '<ul id="applications" class="list">';
     echo '	<li><a href="' . zotop::url('zotop/system/reboot') . '" target="mainIframe">係統關閉與重啟</a></li>';
     echo '	<li><a href="' . zotop::url('zotop/system/clearcahce') . '" target="mainIframe">緩存清理</a></li>';
     echo '	<li><a href="' . zotop::url('zotop/setting') . '" target="mainIframe">係統設置</a></li>';
     echo '	<li><a href="' . zotop::url('zotop/database') . '" target="mainIframe">數據庫備份與還原</a></li>';
     echo '	<li><a href="' . zotop::url('database') . '" target="mainIframe">數據庫管理</a></li>';
     echo '	<li><a href="' . zotop::url('filemanager') . '" target="mainIframe">文件管理</a></li>';
     echo '</ul>';
     block::footer();
     block::header(array('title' => '模塊管理', 'class' => 'show'));
     echo '<ul class="list">';
     echo '	<li><a href="' . zotop::url('zotop/module') . '" target="mainIframe">模塊管理</a></li>';
     echo '	<li><a href="' . zotop::url('zotop/module/add') . '" target="mainIframe">模塊添加</a></li>';
     echo '	<li><a href="' . zotop::url('zotop/module/install') . '" target="mainIframe">模塊安裝</a></li>';
     echo '</ul>';
     block::footer();
     block::header(array('title' => '管理員設置', 'class' => 'show'));
     echo '<ul class="list">';
     echo '	<li><a href="' . zotop::url('zotop/user') . '" target="mainIframe">係統用戶管理</a></li>';
     echo '	<li><a href="' . zotop::url('zotop/usergroup') . '" target="mainIframe">係統用戶組管理</a></li>';
     echo '	<li><a href="' . zotop::url('zotop/role') . '" target="mainIframe">係統角色管理</a></li>';
     echo '</ul>';
     block::footer();
     //echo '<div style="height:600px;"></div>';
     page::footer();
 }
開發者ID:dalinhuang,項目名稱:zotop,代碼行數:33,代碼來源:system.php

示例5: onDefault

 public function onDefault()
 {
     $tables = $this->db->table()->get(true);
     $header['title'] = '數據庫管理';
     page::header($header);
     page::add('<div id="page" class="clearfix">');
     page::add('<div id="side">');
     block::header('數據庫基本信息');
     table::header();
     table::row(array('w60' => '數據庫名稱', '2' => '' . $this->db->config['database'] . ''));
     table::row(array('w60' => '數據庫版本', '2' => '' . $this->db->version(true) . ''));
     table::row(array('w60' => '數據庫大小', '2' => '<b>' . $this->db->size() . '</b> '));
     table::row(array('w60' => '數據表個數', '2' => '<b>' . count($tables) . '</b> 個'));
     table::footer();
     block::footer();
     page::add('</div>');
     page::add('<div id="main">');
     page::top();
     page::navbar($this->navbar(), 'table');
     //zotop::dump($tables);
     form::header(array('class' => 'ajax'));
     $column['select'] = '<input name="id" class="selectAll" type="checkbox"/>';
     $column['name'] = '數據表名稱';
     $column['size  w60'] = '大小';
     $column['Rows  w60'] = '記錄數';
     $column['Engine  w60'] = '類型';
     $column['Collation  w100'] = '整理';
     $column['manage view w60'] = '瀏覽';
     $column['manage delete'] = '刪除';
     table::header('list', $column);
     foreach ($tables as $table) {
         $size = $table['Data_length'] + $table['Index_length'];
         $column = array();
         $column['select'] = '<input name="id[]" class="select" type="checkbox"/>';
         $column['name'] = '<b>' . $table['Name'] . '</b><h5>' . $table['Comment'] . '</h5>';
         $column['size w60'] = (string) format::size($size);
         $column['Rows  w60'] = $table['Rows'];
         $column['Engine  w60'] = $table['Engine'];
         $column['collation  w100'] = $table['Collation'];
         $column['manage view w60'] = '<a href="' . url::build('system/database/table/record') . '">瀏覽</a>';
         $column['manage delete'] = '<a href="' . url::build('system/database/table/delete') . '" class="confirm">刪除</a>';
         table::row($column);
     }
     table::footer();
     page::add('<div style="height:200px;"></div>');
     form::buttons(array('type' => 'select', 'style' => 'width:180px', 'options' => array('check' => '優化', 'delete' => '刪除')), array('type' => 'submit', 'value' => '執行操作'));
     form::footer();
     page::bottom();
     page::add('</div>');
     page::add('</div>');
     page::footer();
 }
開發者ID:dalinhuang,項目名稱:zotop,代碼行數:52,代碼來源:database.php

示例6: onDefault

    public function onDefault()
    {
        $header['title'] = '用戶登錄';
        $header['js'] = '
        	$(function(){
				$("div.block").show().center().drag(".block-header");
				window.onresize=function(){
					$("div.block").center();
				};
   		})
        ';
        $header['body']['class'] = "login";
        page::header($header);
        block::header(array('id' => 'LoginWindow', 'title' => '用戶登錄'));
        form::header(array('title' => '', 'description' => '請輸入用戶名和密碼', 'class' => 'ajax'));
        form::add(array('type' => 'text', 'label' => t('帳 戶(U)'), 'name' => 'username', 'value' => ''));
        form::add(array('type' => 'password', 'label' => t('密 碼(P)'), 'name' => 'password', 'value' => ''));
        form::buttons(array('type' => 'submit', 'value' => '登 陸'), array('type' => 'button', 'name' => 'options', 'value' => '選 項'));
        form::footer();
        block::footer();
        page::footer();
    }
開發者ID:dalinhuang,項目名稱:zotop,代碼行數:22,代碼來源:login.php

示例7: onDefault

 public function onDefault()
 {
     $header['title'] = '測試表單';
     page::header($header);
     page::top();
     page::navbar(array(array('id' => 'form', 'title' => '測試表單', 'href' => url::build('system/test')), array('id' => 'info', 'title' => '係統信息', 'href' => url::build('system/index/info'))), 'form');
     form::header(array('class' => 'ajax'));
     block::header(array('title' => '基本信息', 'action' => 'more'));
     form::add(array('type' => 'checkbox', 'label' => t('多選框'), 'name' => 'test1', 'options' => array('1' => 'a1', '2' => 'a2', '3' => 'a1', '4' => 'a2', '5' => 'a1', '6' => 'a2'), 'value' => array('1', '2'), 'description' => '最多隻允許選擇三項'));
     form::add(array('type' => 'checkbox', 'label' => t('多選框'), 'name' => 'test11', 'options' => array('1' => 'a1', '2' => 'a2', '3' => 'a1'), 'value' => array('1', '2'), 'class' => 'block', 'description' => '最多隻允許選擇三項'));
     form::add(array('type' => 'select', 'label' => '下拉列表', 'name' => 'test22', 'options' => array('1' => 'a1', '2' => 'a2', '3' => 'a1', '4' => 'a2', '5' => 'a1', '6' => 'a2'), 'value' => array('2', '4'), 'description' => '提示信息'));
     form::add(array('type' => 'select', 'label' => '下拉列表', 'name' => 'test2', 'options' => array('1' => 'a1', '2' => 'a2', '3' => 'a1', '4' => 'a2', '5' => 'a1', '6' => 'a2'), 'value' => '2', 'description' => '提示信息'));
     form::add(array('type' => 'text', 'label' => '文本框', 'name' => 'test3', 'value' => '2的飛灑的發生地', 'description' => '提示信息'));
     block::footer();
     block::header(array('title' => '高級信息', 'action' => 'more'));
     form::add(array('type' => 'image', 'label' => '上傳圖片', 'name' => 'test4', 'value' => '2的飛灑的發生地', 'valid' => 'required:true', 'description' => '提示信息'));
     form::add(array('type' => 'textarea', 'label' => '文本框', 'name' => 'test32', 'value' => '2的飛灑的發生地', 'valid' => 'required:true,maxlength:500', 'description' => '提示信息'));
     form::add(array('label' => '組合', 'type' => 'group', 'fields' => array(array('label' => '年', 'name' => 'year', 'type' => 'text'), array('label' => '月', 'name' => 'month', 'type' => 'text'), array('label' => '日', 'name' => 'day', 'type' => 'text')), 'description' => '生成一個複合控件'));
     block::footer();
     form::buttons(array('type' => 'submit'), array('type' => 'reset'));
     form::footer();
     page::bottom();
     page::footer();
 }
開發者ID:dalinhuang,項目名稱:zotop,代碼行數:24,代碼來源:test.php

示例8: mylog

function mylog()
{
    block::header(array('title' => '日誌記錄', 'action' => '<a class="more" href="' . zotop::url('zotop/log') . '">更多</a>'));
    echo '<div style="height:200px;"></div>';
    block::footer();
}
開發者ID:dalinhuang,項目名稱:zotop,代碼行數:6,代碼來源:zlog.php

示例9: favorite

function favorite()
{
    block::header(array('title' => '我的收藏夾', 'action' => '<a class="dialog" href="' . zotop::url('zotop/quick/add') . '">管理</a>|<a class="more" href="' . zotop::url('zotop/notepad') . '">更多</a>'));
    echo '<div style="height:200px;"></div>';
    block::footer();
}
開發者ID:dalinhuang,項目名稱:zotop,代碼行數:6,代碼來源:quick.php

示例10: foreach

<?php

$this->header();
?>

<?php 
block::header(array('title' => '應用列表', 'class' => 'expanded', 'action' => '<a href="#">管理</a>'));
block::add('<ul class="list">');
foreach ($apps as $id => $app) {
    block::add('<li><a href="' . zotop::url($app['id']) . '" target="mainIframe"><span>' . $app['name'] . '</span></a></li>');
}
block::add('</ul>');
block::footer();
?>

<?php 
$this->footer();
開發者ID:dalinhuang,項目名稱:zotop,代碼行數:17,代碼來源:index.php

示例11: onDefault

 public function onDefault()
 {
     $db = zotop::db();
     $host = $db->config('hostname');
     $dbName = $db->config('database');
     $dbVersion = $db->version(true);
     $dbSize = $db->size();
     $tables = zotop::db()->tables(true);
     $header['title'] = '數據庫管理:' . $dbName;
     page::header($header);
     page::add('<div id="page" class="clearfix">');
     page::add('<div id="side">');
     block::header('數據庫基本信息');
     table::header();
     table::row(array('w60' => '數據庫主機', '2' => '' . $host . ''));
     table::row(array('w60' => '數據庫名稱', '2' => '' . $dbName . ''));
     table::row(array('w60' => '數據庫版本', '2' => '' . $dbVersion . ''));
     table::row(array('w60' => '數據庫大小', '2' => '<b>' . $dbSize . '</b> '));
     table::row(array('w60' => '數據表個數', '2' => '<b>' . count($tables) . '</b> 個'));
     table::footer();
     block::footer();
     block::header('創建數據表');
     form::header(array('action' => zotop::url('database/table/create'), 'template' => 'div'));
     form::field(array('type' => 'text', 'name' => 'tablename', 'label' => zotop::t('表名稱'), 'style' => 'width:180px', 'valid' => '{required:true}', 'description' => '不含前綴,係統會自動加上前綴'));
     form::buttons(array('type' => 'submit', 'value' => '創建'));
     form::footer();
     block::footer();
     page::add('</div>');
     page::add('<div id="main">');
     page::top();
     page::navbar($this->navbar(), 'tables');
     //zotop::dump($tables);
     form::header(array('class' => 'list', 'action' => zotop::url('database/table/action')));
     $column['select'] = html::checkbox(array('name' => 'table', 'class' => 'selectAll'));
     $column['name'] = '數據表名稱';
     $column['size  w60'] = '大小';
     $column['Rows  w60'] = '記錄數';
     $column['Engine  w60'] = '類型';
     $column['Collation  w100'] = '整理';
     $column['manage view w60'] = '瀏覽';
     $column['manage delete'] = '刪除';
     page::add('<div style="height:400px;">');
     table::header('list', $column);
     foreach ($tables as $table) {
         $column = array();
         $column['select'] = html::checkbox(array('name' => 'table[]', 'value' => $table['name'], 'class' => 'select'));
         $column['name'] = '<a href="' . url::build('database/field/default', array('tablename' => $table['name'])) . '"><b>' . $table['name'] . '</b></a><h5>' . $table['comment'] . '</h5>';
         $column['size w60'] = (string) format::byte($table['size']);
         $column['Rows  w60'] = $table['rows'];
         $column['Engine  w60'] = $table['engine'];
         $column['collation  w100'] = $table['collation'];
         $column['manage view w60'] = '<a href="' . url::build('database/table/edit', array('tablename' => $table['name'])) . '">設置</a>';
         $column['manage delete'] = '<a href="' . url::build('database/table/delete', array('tablename' => $table['name'])) . '" class="confirm">刪除</a>';
         table::row($column, 'select');
     }
     table::footer();
     page::add('</div>');
     form::buttons(array('type' => 'select', 'name' => 'operation', 'style' => 'width:180px', 'options' => array('optimize' => '優化', 'delete' => '刪除'), 'value' => 'check'), array('type' => 'submit', 'value' => '執行操作'));
     form::footer();
     page::bottom();
     page::add('</div>');
     page::add('</div>');
     page::footer();
 }
開發者ID:dalinhuang,項目名稱:zotop,代碼行數:64,代碼來源:table.php

示例12: notepad

function notepad()
{
    block::header(array('title' => '記事本', 'action' => '<a class="dialog" href="' . zotop::url('zotop/notepad/add') . '">新建記事</a>|<a class="more" href="' . zotop::url('zotop/notepad') . '">更多</a>'));
    echo '<div style="height:200px;"></div>';
    block::footer();
}
開發者ID:dalinhuang,項目名稱:zotop,代碼行數:6,代碼來源:nodepad.php

示例13: onAdd

 public function onAdd()
 {
     if (form::isPostBack()) {
         $module = zotop::model('zotop.module');
         $post = form::post();
         $result = $module->insert($post);
         if ($result) {
             msg::success('保存成功', '添加成功,正在刷新頁麵,請稍後……', zotop::url('zotop/module'));
         }
     }
     $page['title'] = '新建模塊';
     page::header($page);
     page::top();
     page::navbar($this->navbar());
     form::header();
     block::header('基本信息');
     form::field(array('type' => 'text', 'label' => '模塊ID', 'name' => 'id', 'value' => $data['id'], 'valid' => 'required:true,minlength:3,maxlength:32,remote:"' . zotop::url('zotop/module/checkid') . '"', 'description' => '允許使用數字、英文字符(不區分大小寫)或者下劃線,不允許使用其它特殊字符,3~32位'));
     form::field(array('type' => 'text', 'label' => '模塊名稱', 'name' => 'name', 'value' => $data['name'], 'valid' => 'required:true', 'description' => ''));
     form::field(array('type' => 'radio', 'options' => array('system' => '核心模塊', 'plugin' => '插件模塊'), 'label' => '模塊類型', 'name' => 'type', 'value' => $data['type'], 'valid' => 'required:true', 'description' => ''));
     form::field(array('type' => 'text', 'label' => '訪問地址', 'name' => 'url', 'value' => $data['url'], 'valid' => 'url:true', 'description' => '可以為模塊綁定訪問域名,如:http://bbs.***.com/ 如果不綁定域名,請留空'));
     form::field(array('type' => 'textarea', 'label' => '模塊說明', 'name' => 'description', 'value' => $data['description'], 'valid' => '', 'description' => ''));
     block::footer();
     block::header('開發者信息');
     form::field(array('type' => 'text', 'label' => '開發者', 'name' => 'author', 'value' => $data['author'], 'valid' => 'required:true', 'description' => ''));
     form::field(array('type' => 'text', 'label' => '電子郵件', 'name' => 'email', 'value' => $data['email'], 'valid' => 'required:true,email:true', 'description' => ''));
     form::field(array('type' => 'text', 'label' => '官方網站', 'name' => 'site', 'value' => $data['site'], 'valid' => 'required:true', 'description' => ''));
     block::footer();
     form::buttons(array('type' => 'submit'), array('type' => 'back'));
     form::footer();
     page::bottom();
     page::footer();
 }
開發者ID:dalinhuang,項目名稱:zotop,代碼行數:32,代碼來源:module.php

示例14: onDefault

 public function onDefault($dir = '')
 {
     $path = ROOT . DS . trim($dir, DS);
     $path = path::clean($path);
     $folders = dir::folders($path);
     $files = dir::files($path);
     $fileext = array('php', 'css', 'js', 'jpg', 'jpeg', 'gif', 'png', 'bmp', 'psd', 'html', 'htm', 'tpl', 'rar', 'zip', 'mp3');
     $page['title'] = '文件管理器';
     page::header($page);
     page::add('<div id="page" class="clearfix">');
     page::add('<div id="main">');
     page::add('<div id="main-inner">');
     page::top();
     page::navbar($this->navbar(), 'default');
     $column = array();
     $column['select'] = '';
     $column['name'] = '名稱';
     $column['type'] = '類型';
     $column['size w60'] = '大小';
     $column['atime w120'] = '創建時間';
     $column['mtime w120'] = '修改時間';
     $column['manage rename w80'] = '重命名';
     $column['manage edit w80'] = '編輯';
     $column['manage delete'] = '刪除';
     table::header('list', $column);
     foreach ($folders as $folder) {
         $column = array();
         $column['select w20 center'] = html::image(url::theme() . '/image/fileext/folder.gif');
         $column['name'] = '<a href="' . zotop::url('filemanager/index/default', array('dir' => $dir . DS . $folder)) . '"><b>' . $folder . '</b></a>';
         $column['type w60'] = '文件夾';
         $column['size w60'] = '--';
         $column['atime w120'] = time::format(@fileatime($path . DS . $folder));
         $column['mtime w120'] = time::format(@filemtime($path . DS . $folder));
         $column['manage rename w80'] = '<a>重命名</a>';
         $column['manage edit w80'] = '<a class="disabled">編輯</a>';
         $column['manage delete'] = '<a>刪除</a>';
         table::row($column);
     }
     foreach ($files as $file) {
         $column = array();
         $column['select w20 center'] = in_array(file::ext($file), $fileext) ? html::image(url::theme() . '/image/fileext/' . file::ext($file) . '.gif') : html::image(url::theme() . '/image/fileext/unknown.gif');
         $column['name'] = '<a href="' . zotop::url('filemanager/index/default', array('dir' => $dir . DS . $file)) . '"><b>' . $file . '</b></a>';
         $column['type w60'] = '文件';
         $column['size w60'] = format::byte(@filesize($path . DS . $file));
         $column['atime w120'] = time::format(@fileatime($path . DS . $file));
         $column['mtime w120'] = time::format(@filemtime($path . DS . $file));
         $column['manage rename w80'] = '<a>重命名</a>';
         $column['manage edit w80'] = '<a href="' . zotop::url('filemanager/file/edit', array('filename' => $dir . DS . $file, 'dir' => '***')) . '">編輯</a>';
         $column['manage delete'] = '<a>刪除</a>';
         table::row($column);
     }
     table::footer();
     page::bottom();
     page::add('</div>');
     page::add('</div>');
     page::add('<div id="side">');
     block::header('快捷操作');
     echo '<ul class="list">';
     echo '<li class="file"><a href="' . zotop::url('zotop/file/newfile') . '" class="dialog">新建文件</a></li>';
     echo '<li class="folder"><a href="' . zotop::url('zotop/file/newfolder') . '" class="dialog">新建文件夾</a></li>';
     echo '<li class="folder"><a href="' . zotop::url('zotop/file/upload') . '" class="dialog">文件上傳</a></li>';
     echo '</ul>';
     block::footer();
     block::header('其他位置');
     echo '<ul class="list">';
     echo '<li class="root"><a>根目錄</a></li>';
     echo '<li class="root"><a>模板目錄</a></li>';
     echo '<li class="root"><a>模塊目錄</a></li>';
     echo '<li class="root"><a>緩存目錄</a></li>';
     echo '</ul>';
     block::footer();
     page::add('</div>');
     page::add('</div>');
     page::footer();
 }
開發者ID:dalinhuang,項目名稱:zotop,代碼行數:75,代碼來源:index.php

示例15: onDefault

 public function onDefault($tablename)
 {
     $tables = zotop::db()->tables(true);
     $table = $tables[$tablename];
     $fields = array();
     if (isset($table)) {
         $fields = zotop::db()->table($tablename)->fields(true);
     }
     $indexes = zotop::db()->table($tablename)->index();
     $page['title'] = '數據庫管理 <i>></i> 數據表 [ <b>' . $tablename . '</b> ]  <h6>' . $table['comment'] . '</h6>';
     page::header($page);
     page::add('<div id="page" class="clearfix">');
     page::add('<div id="main">');
     page::add('<div id="main-inner">');
     page::top();
     page::navbar($this->navbar($tablename), 'fields');
     form::header(array('class' => 'list'));
     $column = array();
     $column['select'] = html::checkbox(array('name' => 'id', 'class' => 'selectAll'));
     //$column['key w30 center'] = '索引';
     $column['name'] = '字段名稱';
     $column['type w150'] = '字段類型';
     //$column['null w50'] = '空值';
     //$column['default w100'] = '默認值';
     //$column['comment'] = '注釋';
     $column['manage pri'] = '主鍵';
     $column['manage index'] = '索引';
     $column['manage unique'] = '唯一';
     $column['manage fulltext'] = '全文';
     $column['manage edit'] = '修改';
     $column['manage delete'] = '刪除';
     table::header('list', $column);
     foreach ($fields as $field) {
         $column = array();
         $column['select'] = html::checkbox(array('name' => 'id[]', 'class' => 'select'));
         //$column['key w30 center'] = '<span class="'.$field['key'].'">'.$field['key'].'</span>';
         $column['name'] = '<a href="' . zotop::url('database/field/edit', array('table' => $tablename, 'field' => $field['name'])) . '" title="注釋:' . $field['comment'] . '&#13;默認:' . $field['default'] . '&#13;空值:' . $field['null'] . '&#13;整理:' . $field['collation'] . '"><b class="' . $field['key'] . '">' . $field['name'] . '</b></a><h5>' . $field['comment'] . '</h5>';
         $column['type w150'] = $field['type'] . (empty($field['length']) ? '' : '(' . $field['length'] . ')');
         //$column['null w50'] = $field['null'];
         //$column['default w100'] = $field['default'];
         //$column['comment'] = $field['comment'];
         $column['manage pri'] = '<a href="' . zotop::url('database/field/primaryKey', array('table' => $tablename, 'field' => $field['name'])) . '" class="confirm {content:\'<h2>確定要將該字段設置為主鍵?</h2>\'}">主鍵</a>';
         $column['manage index'] = '<a href="' . zotop::url('database/field/index', array('table' => $tablename, 'field' => $field['name'])) . '" class="confirm {content:\'<h2>確定要索引該字段?</h2>\'}">索引</a>';
         $column['manage unique'] = '<a href="' . zotop::url('database/field/unique', array('table' => $tablename, 'field' => $field['name'])) . '" class="confirm {content:\'<h2>確定要將該字段設置為唯一?</h2>\'}">唯一</a>';
         if (stripos((string) $field['type'], 'varchar') !== false || stripos((string) $field['type'], 'text') !== false) {
             $column['manage fulltext'] = '<a href="' . zotop::url('database/field/fulltext', array('table' => $tablename, 'field' => $field['name'])) . '" class="confirm {content:\'<h2>確定要將該字段設置為全文索引?</h2>\'}">全文</a>';
         } else {
             $column['manage fulltext'] = '<a class="disabled">全文</a>';
         }
         $column['manage edit'] = '<a href="' . zotop::url('database/field/edit', array('table' => $tablename, 'field' => $field['name'])) . '">修改</a>';
         $column['manage delete'] = '<a href="' . zotop::url('database/field/delete', array('table' => $tablename, 'field' => $field['name'])) . '" class="confirm">刪除</a>';
         table::row($column, 'select');
     }
     table::footer();
     form::buttons(array('type' => 'submit', 'value' => '瀏覽選中項'));
     form::footer();
     page::bottom();
     page::add('</div>');
     page::add('</div>');
     page::add('<div id="side">');
     block::header('數據表信息');
     table::header();
     table::row(array('w60 bold' => '名稱', '2' => '' . $table['name'] . ''));
     table::row(array('w60 bold' => '大小', '2' => '' . format::byte($table['size']) . ''));
     table::row(array('w60 bold' => '記錄數', '2' => '<b>' . $table['rows'] . '</b> '));
     table::row(array('w60 bold' => '整理', '2' => '' . $table['collation'] . ''));
     table::row(array('w60 bold' => '創建時間', '2' => '' . $table['createtime'] . ''));
     table::row(array('w60 bold' => '更新時間', '2' => '' . $table['updatetime'] . ''));
     //table::row(array('w60 bold'=>'注釋','2'=>''.$table['comment'].''));
     table::footer();
     block::footer();
     block::header('索引信息');
     $column = array();
     $column['i w10'] = '';
     $column['field'] = '字段';
     $column['type w30'] = '類型';
     $column['manage dropindex'] = '刪除';
     table::header('list', $column);
     foreach ($indexes as $index) {
         $column = array();
         $column['i w10 center'] = '>';
         $column['field'] = '<b>' . $index['field'] . '</b>';
         $column['type w30'] = $index['type'];
         $column['manage dropindex'] = '<a href="' . url::build('database/field/dropindex', array('table' => $tablename, 'index' => $index['name'])) . '" class="confirm">刪除</a>';
         table::row($column, 'select');
     }
     table::footer();
     block::footer();
     page::add('</div>');
     page::add('</div>');
     page::footer();
 }
開發者ID:dalinhuang,項目名稱:zotop,代碼行數:92,代碼來源:field.php


注:本文中的block::footer方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。