📄 get_children.php
字号:
<?php
include_once( "inc/auth.php" );
include_once( "inc/document_function.php" );
$FILE_SORT = $_REQUEST['FILE_SORT'];
$SORT_ID = $_REQUEST['sort_id'];
$SORT_FILE_ALL = $_REQUEST['SORT_FILE_ALL'];
$query = "\r\n\t\tSELECT * FROM file_sort \r\n\t\t\tWHERE SORT_PARENT = {$SORT_ID}\r\n\t\t";
if ( $FILE_SORT == 1 )
{
$query .= " and SORT_ID IN ({$SORT_FILE_ALL}) ";
}
$query .= " ORDER BY FILE_SORTING DESC ";
$cs = exequery( $connection, $query );
while ( $ROW = mysql_fetch_array( $cs ) )
{
$sortname = $ROW['SORT_NAME'];
$sortid = $ROW['SORT_ID'];
$sqlc = "\r\n\t\t\t\tSELECT COUNT(*) AS cnt FROM file_sort \r\n\t\t\t\t\tWHERE SORT_PARENT ='".$sortid."'\r\n\t\t\t\t";
if ( $FILE_SORT == 1 )
{
$sqlc .= " and SORT_ID IN ({$SORT_FILE_ALL})";
}
$rsc = exequery( $connection, $sqlc );
$rowc = mysql_fetch_array( $rsc );
$cntc = $rowc['cnt'];
if ( 0 < $cntc )
{
echo "\t\t\t<table>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td valign='top'>\r\n\t\t\t\t\t <IMG SRC=\"/images/document/expandall.png\" BORDER=\"0\" ALT=\"\" onclick='getChildren(";
echo $sortid;
echo ");' id=\"img_";
echo $sortid;
echo "\">\r\n\t\t\t\t\t";
if ( $FILE_SORT == 1 )
{
$allandnew = getcountdoc( $sortid );
}
echo "\t\t\t\t\t<a href=\"javascript:showData(";
echo $sortid;
echo ",";
echo $FILE_SORT;
echo ")\">\r\n\t\t\t\t\t";
echo $sortname;
echo $allandnew;
echo "</a>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td class=\"childsortdiv\" style=\"display='none'\"id='children_";
echo $sortid;
echo "'>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</tr>\r\n\t\t\t</table>\r\n\t\t";
}
else
{
echo "\t<table>\r\n\t\t<tr>\r\n\t\t\t<td valign='top'>\r\n\t\t\t\t <IMG SRC=\"/images/document/collapseall.png\" BORDER=\"0\" ALT=\"\" id=\"img_";
echo $sortid;
echo "\">\r\n\t\t\t\t";
if ( $FILE_SORT == 1 )
{
$allandnew = getcountdoc( $sortid );
}
echo "\t\t\t\t<a href=\"javascript:showData(";
echo $sortid;
echo ",";
echo $FILE_SORT;
echo ")\">\r\n\t\t\t\t";
echo $sortname;
echo $allandnew;
echo "</a>\r\n\t\t\t</td>\r\n\t\t</tr>\r\n\t</table>\r\n\t\t";
}
}
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -