示例#1
0
    echo ' style="display:none"';
}
?>
>
	<td align="right" valign="top" class="chatlist" style="padding-top:6px;"><?php 
echo $BL['be_cnt_sitelevel'];
?>
:&nbsp;</td>
	<td style="padding-top:3px;"><select name="calink_level[]" size="15" multiple="multiple" class="optionhover" id="calink_level" style="width: 440px">
<?php 
echo '<option value="0"';
if (in_array(0, $content['alink']['alink_level'])) {
    echo ' selected="selected"';
}
echo '>' . html($indexpage['acat_name']) . '</option>' . LF;
struct_select_list(0, 0, $content['alink']['alink_level'], true);
?>
	</select></td>
</tr>


<tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="6" /></td></tr>

<tr>
	<td align="right" class="chatlist"><?php 
echo $BL['be_tags'];
?>
:&nbsp;</td>
	<td><table cellpadding="0" cellspacing="0" border="0" summary="">
		<tr>
			<td><input type="text" name="calink_category" id="calink_category" value="<?php 
示例#2
0
<tr>
	<td align="right" class="chatlist" valign="top"><?php 
echo $BL['be_cnt_search_startlevel'];
?>
:&nbsp;</td>
	<td><select name="csearch_start_at[]" size="10" multiple="multiple" class="width440" id="csearch_start_at">
<?php 
if (!isset($content["search"]["start_at"]) || !is_array($content["search"]["start_at"])) {
    $content["search"]["start_at"] = array();
}
echo '<option value="0"';
if (in_array(0, $content["search"]["start_at"])) {
    echo ' selected="selected"';
}
echo '>' . $BL['be_admin_struct_index'] . '</option>' . LF;
struct_select_list(0, 0, $content["search"]["start_at"]);
?>
	</select></td>
</tr>

<tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="4" /></td></tr>

<tr>
	<td align="right" class="chatlist"><?php 
echo $BL['be_cnt_search_default_type'];
?>
:&nbsp;</td>
	<td>
		<select name="csearch_type">
			<option value="OR"<?php 
is_selected('OR', $content['search']['type']);
function struct_select_list($counter = 0, $struct_id = 0, &$selected_id, $add_alias = false)
{
    global $db;
    $struct_id = intval($struct_id);
    $counter = intval($counter) + 1;
    $sql = "SELECT acat_id,acat_name,acat_alias FROM " . DB_PREPEND . "phpwcms_articlecat WHERE acat_trash=0 AND acat_struct=" . $struct_id . " ORDER BY acat_sort;";
    if ($result = mysql_query($sql, $db) or die("error while building struct select menu (ID:" . $struct_id)) {
        $sx = 0;
        while ($row = mysql_fetch_assoc($result)) {
            $struct[$sx] = $row;
            $sx++;
        }
        mysql_free_result($result);
    }
    if (isset($struct[0])) {
        foreach ($struct as $key => $value) {
            $value['acat_name'] = html($struct[$key]["acat_name"]);
            if ($add_alias && $struct[$key]["acat_alias"]) {
                $value['acat_name'] .= ' (' . $struct[$key]["acat_alias"] . ')';
            }
            echo '<option value="', $struct[$key]["acat_id"], '"';
            if (in_array($struct[$key]["acat_id"], $selected_id)) {
                echo ' selected="selected"';
            }
            echo ' title="', $value['acat_name'], '">';
            echo str_repeat("&#8212;", $counter), ' ', $value['acat_name'];
            echo '</option>' . LF;
            struct_select_list($counter, $struct[$key]["acat_id"], $selected_id, $add_alias);
        }
    }
}