Пример #1
0
function get_document_list($fatherid = 0, $selid = 0, $layer = 0, $ac, $fileurl)
{
    global $db;
    $query = $db->query("SELECT * FROM " . DB_TABLEPRE . "document_type where father='{$fatherid}' and type='" . $_GET[type] . "' ORDER BY id Asc  ");
    if (count($query) > 0) {
        //for($i=0;$i<$layer;$i++){
        //$str.="<TD class=MemoTD width=20>&nbsp;</TD>";
        //}
        while ($row = $db->fetch_array($query)) {
            $rsfno = $db->fetch_one_array("SELECT * FROM " . DB_TABLEPRE . "document_type where father='" . $row[id] . "' and type='" . $_GET[type] . "'  ORDER BY id desc limit 0,1");
            echo "a.add(" . $row[id] . "," . $fatherid . ",'" . $row[title] . "','admin.php?ac=" . $ac . "&fileurl=" . $fileurl . "&type=" . $_GET[type] . "&documentid=" . $row[id] . "');";
            if ($rsfno[id] != '') {
                get_document_list($row['id'], $selid, $layer + 1, $ac, $fileurl);
            }
        }
    }
    return;
}
Пример #2
0
&fileurl=<?php 
    echo $fileurl;
    ?>
&type=<?php 
    echo $_GET[type];
    ?>
&documentid=<?php 
    echo $row[id];
    ?>
');
		
		   
		   <?php 
    //调用下级文件夹
    if ($rsfnow[id] != '') {
        get_document_list($row['id'], 0, 0, $ac, $fileurl);
    }
    ?>
		   
		   
		   
		
<?php 
}
?>
			
		
		a.add(19,0,'查看所有文件','admin.php?ac=<?php 
echo $ac;
?>
&fileurl=<?php 
Пример #3
0
<?php

/*
Template Name: dps-list-template
*/
get_header();
if (function_exists('get_document_list')) {
    $stringContent = get_document_list();
    print_r($stringContent);
}