Esempio n. 1
0
function GET_document_PUBLIC_LIST($fatherid = 0, $selid = 0, $layer = 0, $strid = 0, $uid = 0)
{
    if ($_GET[type] == '1') {
        $wheresql = " and uid='" . $uid . "'";
    }
    $str = "";
    global $db;
    $query = $db->query("SELECT * FROM " . DB_TABLEPRE . "document_type where father='{$fatherid}' and type='" . $_GET["type"] . "' {$wheresql} ORDER BY id Asc  ");
    if (count($query) > 0) {
        for ($i = 0; $i < $layer; $i++) {
            $str .= "├";
        }
        while ($row = $db->fetch_array($query)) {
            if ($strid != '0') {
                $strnum = $strid . "," . $row['id'];
                $strnumselect = "0," . $strid . "," . $row['id'];
            } else {
                $strnum = $row['id'];
                $strnumselect = "0," . $row['id'];
            }
            $selstr = $strnumselect == $selid ? 'selected="selected"' : '';
            $htmlstr = '<option value="0,' . $strnum . '"  ' . $selstr . '>' . $str . $row['title'] . '</option>';
            echo $htmlstr;
            GET_document_PUBLIC_LIST($row['id'], $selid, $layer + 1, $strnum);
        }
    }
    return;
}
Esempio n. 2
0
echo $user['title'];
?>
" size=50 >
				</td>  	  	
		</tr>
		
		<tr>
      <td nowrap class="TableContent"> 文件夹:<?php 
get_helps();
?>
</td>
      <td class="TableData">
							  <select class="SelectStyle" name="documentid">
										<option value="" >无目录</option>
										<?php 
GET_document_PUBLIC_LIST(0, $user['documentid'], 0, 0, $_USER->id);
?>
										</select></td>
    </tr>
		<tr>
      <td nowrap class="TableContent"> 附件:<?php 
get_helps();
?>
</td>
      <td class="TableData">
	  <?php 
echo public_upload('annex', $user['annex']);
?>
	  </td>
    </tr>
	<?php