Example #1
0
function getallitem($fid, $emshow)
{
    // 得出并显示所有的行
    global $arrall;
    global $n;
    $arryget = getarry($fid);
    // 得出本级的所有行
    $show = "";
    if (is_array($arryget)) {
        $ncount = count($arryget);
        for ($j = 0; $j < $ncount; $j++) {
            $n++;
            $usen = $n;
            $a = $arryget[$j][code];
            $code = $a;
            $name = $arrall[$a][name];
            $fcode = $arrall[$a][fcode];
            $isunder = $arrall[$code][isunder];
            $url = $arrall[$code][url];
            $pic = $arrall[$code][pic];
            $upcode = $emshow;
            if ($j == $ncount - 1) {
                //是否本级最末
                $isend = 1;
            } else {
                $isend = 0;
            }
            if ($isunder == 1) {
                // 不是末级
                if ($isend == 0) {
                    $emshow1 = $emshow . "<img src=\"../Images/t.gif\" align=absmiddle border=\"0\">";
                } else {
                    $emshow1 = $emshow . "<img src=\"../Images/b.gif\" align=absmiddle border=\"0\">";
                }
                $show .= showmenu($isunder, $isend, $emshow, $name, $code, $url, $pic);
                $show2 = getallitem($code, $emshow1);
                if (!empty($show2)) {
                    $show .= "<div ID=\"el" . $code . "Child\" CLASS=\"child\">\n";
                    $show .= $show2;
                    $show .= "</div>\n";
                }
            } else {
                $show .= showmenu($isunder, $isend, $emshow, $name, $code, $url, $pic);
            }
        }
    }
    return $show;
}
Example #2
0
function getallitem($fid, $emshow)
{
    // 得出并显示所有的行
    global $arrall;
    global $loginskin;
    global $n;
    $arryget = getarry($fid);
    // 得出本级的所有行
    $show = "";
    if (is_array($arryget)) {
        $ncount = count($arryget);
        for ($j = 0; $j < $ncount; $j++) {
            $n++;
            $usen = $n;
            $a = $arryget[$j][code];
            $code = $a;
            // $code = $arrall[$a][code];
            $name = $arrall[$a][name];
            $fcode = $arrall[$a][fcode];
            $leave = $arrall[$a][leave];
            $icon = $arrall[$a][icon];
            $program = $arrall[$a][program];
            $isunder = $arrall[$code][isunder];
            //$openframe = $arrall[$a][openframe] ;
            $upcode = $emshow;
            if ($j == $ncount - 1 && $fid > 0) {
                //是否本级最末
                $isend = 1;
            } else {
                $isend = 0;
            }
            if ($isunder == 1) {
                // 不是末级
                if ($isend == 0) {
                    //if($leave<2){
                    //$emshow1 = $emshow."<div style='margin:0px 0px 0px 2px;'><img src='".$loginskin."b.gif' align=left border=\"0\"></div>" ;
                    //}else{
                    $emshow1 = "<div style='margin:0px 0px 0px 2px;'><img src='" . $loginskin . "t.jpg' align=left border=\"0\"></div>" . $emshow;
                    //}
                } else {
                    $emshow1 = $emshow . "<img src='" . $loginskin . "t.jpg' align=left border=\"0\">";
                }
                $show .= showmenu($isunder, $isend, $emshow, $name, $icon, $code, $program, $leave);
                $show2 = getallitem($code, $emshow1);
                if (!empty($show2)) {
                    if ($leave == 1) {
                        $show .= "<div ID=\"el" . $code . "Child\" CLASS=\"child\" style='margin:2px 0px 0px 0px;'>\n";
                        $show .= $show2;
                        $show .= "</div>\n";
                    } else {
                        $show .= $show2;
                    }
                }
            } else {
                $show .= showmenu($isunder, $isend, $emshow, $name, $icon, $code, $program, $leave);
            }
        }
    }
    return $show;
}