function template_membergroup_badges()
{
    global $scripturl, $context, $txt;
    echo '
		<form method="post" action="', $scripturl, '?action=admin;area=membergroups;sa=badges;', $context['session_var'], '=', $context['session_id'], '">
			<div class="cat_bar">
				<h3 class="catbg">', $txt['char_group_level_acct'], '</h3>
			</div>
			<div class="windowbg2">
				<ul class="sortable">';
    foreach ($context['groups']['accounts'] as $group) {
        display_group($group);
    }
    echo '
				</ul>
			</div>

			<div class="cat_bar">
				<h3 class="catbg">', $txt['char_group_level_char'], '</h3>
			</div>
			<div class="windowbg2">
				<ul class="sortable">';
    foreach ($context['groups']['characters'] as $group) {
        display_group($group);
    }
    echo '
				</ul>
			</div>
			<input type="submit" value="', $txt['save'], '" class="button_submit">
			<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">
			<div class="clear"></div>
		</form>';
}
Пример #2
0
function display_columns_list($all_columns, $data)
{
    //text,file,按照通栏的来,别的走一半
    $full_li_class_types = array('text', 'split', 'group');
    $str = '';
    foreach ($all_columns as $name => $v) {
        $liclass = '';
        if (in_array($v['type'], $full_li_class_types)) {
            $liclass = 'clear full';
        }
        if (isset($v['hidden']) && ($v['hidden'] == 'detail' || $v['hidden'] == 'both' || $v['hidden'] == '1')) {
            $liclass .= ' hidden';
        }
        $str .= "<li class='column_display_li {$liclass}'>";
        if (!$v['type'] || $v['type'] == 'string' || $v['type'] == 'number' || $v['type'] == 'select' || $v['type'] == 'text' || $v['type'] == 'date') {
            $str .= display_text($v['display_name'], $name, $data[$name], $v['options'], $v['class'], $v['link'], $data, $all_columns, $liclass, $v['length'], $v['extra_type']);
        } else {
            if ($v['type'] == 'split') {
                $str .= display_split($v['display_name']);
            } else {
                if ($v['type'] == 'file') {
                    $str .= display_file($v['display_name'], $name, $data[$name], $v['param'], $v['class'], $v['link'], $data, $all_columns);
                } else {
                    if ($v['type'] == 'group') {
                        $str .= '<span class="column_title">' . $v['display_name'] . '</span><div class="span11 column_content">';
                        $str .= display_group($data[$name], $v['param']['options']);
                        $str .= '</div></li>';
                    }
                }
            }
        }
        $str .= '</li>';
    }
    return $str;
}
    <?php 
        if (is_array($recommend_columns)) {
            foreach ($recommend_columns as $key => $one) {
                if ($key == 'name') {
                    break;
                }
                if ($key == 'recommender_address') {
                    $r_user[$key] = $r_user[$key] . '(' . $r_user['recommender_address_zipcode'] . ')';
                }
                if ($key == 'recommender_address_zipcode') {
                    continue;
                }
                ?>
      <?php 
                if ($one['type'] == 'group') {
                    echo display_group($r_user[$key], $one['options'], $one['display_name']);
                    ?>
      <?php 
                } else {
                    ?>
        <?php 
                    echo display_column_li($one['display_name'], nl2br($r_user[$key]), $one['display_colspan']);
                }
            }
        }
        ?>
  </ul>
</div>

<h5 class="clear bg colortip embed_hide">2. 推荐理由(被推荐人信息)</h5>
<div>
Пример #4
0
function project_display_block($name, $project_items, $value, $project_prefix_hilight)
{
    $item = $project_items[$name];
    if ($item) {
        if ($item['type'] == 'textarea' || $item['type'] == 'group') {
            $class = "fw ";
        }
        if ($item['type'] == 'textarea') {
            $value = nl2br($value);
        }
        if ($item['type'] == 'file' && $value) {
            $value = '<a target="_blank" title="点击查看全图" href="/uploads/' . $value . '"><img src="/uploads/' . $value . '" style="max-width:350px;"/></a>';
        }
        if ($item['type'] == 'select') {
            $tmp = $item['param']['options'][$value];
            if ($tmp) {
                $value = $tmp;
            }
        }
        if ($item['type'] == 'checkbox' && is_array($value)) {
            $value = implode(', ', $value);
        }
        $display = $item['display'];
        if ($project_prefix_hilight) {
            $html .= '<div class="title_level_3 clear">' . $project_prefix_hilight . $item['display'] . '</div>';
            $display = '';
            $class .= 'full';
        }
        if ($item['param']['hidden_display']) {
            $display = '';
        }
        $html .= "<li class='{$class}'>";
        $html .= "<label class='title'>{$display}</label><div class='detail'>";
        if ($item['type'] == 'group') {
            $html .= display_group($value, $item['param']['options']);
        } else {
            $html .= $value;
        }
        $html .= "</div>";
        $html .= "</li>";
    }
    echo $html;
}