本文整理汇总了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;
}
示例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&m=newcat', Lang::item('admin.new_category')) . NBSP . html::button('forum.php?c=admin&m=setting', Lang::item('admin.setting')) . NBSP . html::button('forum.php?c=admin&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&m=editcat&id=' . $cat['id'], html::img($img['edit']))), array('class' => 'tableh2', 'width' => '5%', 'align' => 'center', 'text' => html::anchor('forum.php?c=admin&m=delcat&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&m=editboard&id=' . $board['id'], html::img($img['edit']))), array('class' => 'tableb', 'width' => '5%', 'align' => 'center', 'text' => html::anchor('forum.php?c=admin&m=delboard&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&m=newboard&id=' . $cat['id'], Lang::item('admin.new_board')))));
}
echo table::close();