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


PHP forum::indent方法代码示例

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


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

示例1: topic_move_box

 function topic_move_box($cbs, $default = '')
 {
     $html = "<select class=\"listbox\" name=\"board_id\" style=\"width: 100%\">" . PHP_EOL;
     foreach ($cbs as $babe) {
         if ($babe[0] == 'cat') {
             $html .= "<option value=\"0\" disabled>* {$babe[2]} *</option>" . PHP_EOL;
         }
         if ($babe[0] == 'board') {
             if ($default == $babe[1]) {
                 $html .= "<option value=\"{$babe[1]}\" selected=\"selected\">" . forum::indent($babe[3] + 1) . $babe[2] . "</option>" . PHP_EOL;
             } else {
                 $html .= "<option value=\"{$babe[1]}\">" . forum::indent($babe[3] + 1) . $babe[2] . "</option>" . PHP_EOL;
             }
         }
     }
     $html .= "</select>" . PHP_EOL;
     return $html;
 }
开发者ID:phill104,项目名称:branches,代码行数:18,代码来源:forum_helper.php

示例2: Copyright

/**************************************************
  Coppermine 1.5.x Plugin - forum
  *************************************************
  Copyright (c) 2010 foulu (Le Hoai Phuong), eenemeenemuu
  *************************************************
  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 3 of the License, or
  (at your option) any later version.
  ********************************************
  $HeadURL$
  $Revision$
  $LastChangedBy$
  $Date$
  **************************************************/
// menu
echo table::open();
echo table::tds(array(array('class' => 'tableb', 'text' => html::button('forum.php?c=admin', Lang::item('admin.home')) . NBSP . html::button('forum.php?c=admin&amp;m=newcat', Lang::item('admin.new_category')) . NBSP . html::button('forum.php?c=admin&amp;m=setting', Lang::item('admin.setting')) . NBSP . html::button('forum.php?c=admin&amp;m=update', Lang::item('admin.update')))));
echo table::close();
// start
echo table::open();
echo table::td(Lang::item('admin.mdf_boards'), 6);
echo table::tds(array(array('class' => 'tableh1', 'width' => '60%', 'text' => Lang::item('admin.name')), array('class' => 'tableh1', 'width' => '20%', 'colspan' => '4', 'align' => 'center', 'text' => Lang::item('admin.operator')), array('class' => 'tableh1', 'width' => '20%', 'align' => 'center', 'text' => Lang::item('admin.move'))));
foreach ($cats as $cat) {
    echo table::tds(array(array('class' => 'tableh2', 'text' => html::bold($cat['name'])), array('class' => 'tableh2', 'width' => '5%', 'align' => 'center', 'text' => $cat['up']), array('class' => 'tableh2', 'width' => '5%', 'align' => 'center', 'text' => $cat['down']), array('class' => 'tableh2', 'width' => '5%', 'align' => 'center', 'text' => html::anchor('forum.php?c=admin&amp;m=editcat&amp;id=' . $cat['id'], html::img($img['edit']))), array('class' => 'tableh2', 'width' => '5%', 'align' => 'center', 'text' => html::anchor('forum.php?c=admin&amp;m=delcat&amp;id=' . $cat['id'], html::img($img['delete']), array('onclick' => "return anchor_confirm('" . Lang::item('admin.confirm_del_cat') . "');"))), array('class' => 'tableh2', 'text' => NBSP)));
    foreach ($cat['boards'] as $board) {
        echo table::tds(array(array('class' => 'tableb', 'text' => forum::indent($board['level'] + 1) . html::bold($board['name'])), array('class' => 'tableb', 'width' => '5%', 'align' => 'center', 'text' => $board['up']), array('class' => 'tableb', 'width' => '5%', 'align' => 'center', 'text' => $board['down']), array('class' => 'tableb', 'width' => '5%', 'align' => 'center', 'text' => html::anchor('forum.php?c=admin&amp;m=editboard&amp;id=' . $board['id'], html::img($img['edit']))), array('class' => 'tableb', 'width' => '5%', 'align' => 'center', 'text' => html::anchor('forum.php?c=admin&amp;m=delboard&amp;id=' . $board['id'], html::img($img['delete']), array('onclick' => "return anchor_confirm('" . Lang::item('admin.confirm_del_board') . "');"))), array('class' => 'tableb', 'text' => forum::board_move_box($board_move_data, $board['id'], $cat['id'], $board['level'], $board['parent']))));
    }
    echo table::tds(array(array('class' => 'tableb', 'align' => 'right', 'colspan' => '6', 'text' => html::button('forum.php?c=admin&amp;m=newboard&amp;id=' . $cat['id'], Lang::item('admin.new_board')))));
}
echo table::close();
开发者ID:phill104,项目名称:branches,代码行数:31,代码来源:index_view.php


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