Location: PHPKode > projects > PHP Site Editor > siteedit2/main.php3
<?php
    include "includes/config.inc.php3";
    include "includes/site_edit.lib.php3";
    include "includes/header.php3";
    include "includes/footer.php3";

    if ($fileinode) {
        if ($opened["$fileinode"]) {
            $opened["$fileinode"] = 0;
        } else {
            $opened["$fileinode"] = 1;
        }
        session_register('opened');
    }
    $theroot = DIR_DOCUMENT_ROOT;
    $thecwd = DIR_DOCUMENT_ROOT;
    $thepath = DIR_DOCUMENT_ROOT;

    show_header("main");
?>

<?php
    $url_filepath = urlencode($currentdir);
    print("<table border=0 width=100%>");
    print("<tr>");
    print("<td>");
    print("$strCurrentFolder");    //"current folder : ";
    $theroot = DIR_DOCUMENT_ROOT;

    print("&nbsp;$strHome <img src=\"images/barrow.gif\"> ");
    $urlpath = str_replace($theroot,"",$currentdir);
    $thedir = substr($urlpath,1);
    $tok = strtok($thedir,"/");
    while($tok) {
      print("$tok <img src=\"images/barrow.gif\"> ");
      $tok = strtok("/");
    }
    print("</td>");
    print("</tr>");
    print("</table>");

    print("<table border=1 cellPadding=2 cellSpacing=0 width=100% bordercolorlight=\"#aa77aa\" bordercolordark=\"#fffff0\">");
    print("<tr>");
    print("<td BGCOLOR=\"#FFDDAA\">");

    if ($currentdir != $theroot) {
        $updirname = dirname($currentdir);
        print("<a href=\"main.php3?currentdir=$updirname\" onclick=\"parent.nav.window.location='left.php3?currentdir=$updirname'\">");
        print("<img src=\"images/folder_up.gif\" border=0>");
        print("$strUpFolder");
        print("</a>");
        print("&nbsp;|&nbsp");
    } else {
        print("<img src=\"images/folder_up.gif\" border=0>");
        print("$strUpFolder");
        print("&nbsp;|&nbsp");
    }

    if (is_writable($currentdir)) {
        print("<img src=\"images/folder_new.gif\">");
        print("<a href=\"?\" onClick=\"win('opwin',300,300,'op_newfolder.php3?filepath=$url_filepath')\">");
        print("$strNewFolder</a>");
    } else {
        print("<img src=\"images/lock.gif\">");
        print("<strong>$strNewFolder</strong>");
    }
    print("&nbsp;|&nbsp");

    if (is_writable($currentdir)) {
       print("<img src=\"images/file_new.gif\">");
        print("<a href=\"?\" onClick=\"win('opwin',0,0,'op_edit.php3?language=$language&filepath=$url_filepath')\">");
        print("$strNewFile</a>");
    } else {
        print("<img src=\"images/lock.gif\">");
        print("<strong>$strNewFile</strong>");
    }
    print("&nbsp;|&nbsp");

    if (is_writable($currentdir)) {
        print("<img src=\"images/upload.gif\">");
        print("<a href=\"?\" onClick=\"win('opwin',300,480,'op_upload.php3?filepath=$url_filepath')\">");
        print("$strUpLoad</a>");
    } else {
        print("<img src=\"images/lock.gif\">");
        print("<strong>$strUpLoad</strong>");
    }
    print("&nbsp;|&nbsp");
    print("<img src=\"images/refresh.gif\">");
    print("<a href=\"main.php3\">$strRefresh</a>");
    print("</td>");
    print("</tr>");
    print("</table>");

    print("<table border=0 width=100%>");
    print("<tr>");
    print("<td align=right>");
    print("<select name=\"viewmode\" onChange=level_change(this,'')>");
    for ($i=0;$i < $maxViewMode;$i++) {
        if ($viewmode == $i) {
            print("<option value=\"$i\" selected>$strViewMode[$i]</option>");
        } else {
            print("<option value=\"$i\">$strViewMode[$i]</option>");
        }
    }
    print("</select>");
    print("</td>");
    print("</tr>");
    print("</table>");
?>

<?php
    $theroot = DIR_DOCUMENT_ROOT;
    switch($searchmode) {
    case 1:
        $fileList = file_search_list($currentdir,$searchkey,false);
        break;
    case 2:
        $fileList = file_search_list($currentdir,$searchkey,true);
        break;
    default:
        $fileList = file_search_list($currentdir,"",false);
        break;
    }

////change by liuzhen 2000/11/14
    switch($viewmode) {
    case 1:
        file_view_list($fileList);
        break;
    case 2:
        file_view_info($fileList);
        break;
    case 3:
        file_view_sicon($fileList);
        break;
    case 4:
        file_view_bicon($fileList);
        break;
    default:
        file_view_list($fileList);
        break;
    }

    show_footer();
?>

Return current item: PHP Site Editor