<?php
//-->-->-->-->-->-->-->-->-->-->-->-->-->-->
   include_once "/home/waggacwc/public_html/refurb/RETRO-GLOBALS.php";
   include_once "$LIBRARYPATH/RETROVOX-CONSTANT-VARIABLES.php";
   include_once "$LIBRARYPATH/fnFillWebTemplate.php";
   include_once "$LIBRARYPATH/fnMessageToHtml.php";
   include_once "$LIBRARYPATH/fnCodeToHtml.php";
   include_once "$LIBRARYPATH/fnCodeFromHtml.php";
   include_once "$LIBRARYPATH/fnListBlockToHtml.php";

   include_once "$LIBRARYPATH/fnHyperlinkPlainText.php";

   $sFilePath = $_GET['file'];
   $sFilePath = str_replace('\\', '/', $sFilePath);
   $sFilePath = preg_replace('#[/]+#', '/', $sFilePath);

   $sFilePathEncoded = htmlspecialchars($sFilePath);

   $aaTextLines = file($ERRORTEMPLATE);
   $sErrorTemplateContents = implode('', $aaTextLines);

   $aaTextLines = file($ADMINTEMPLATE);
   $sAdminTemplateContents = implode('', $aaTextLines);


   $sPageTitle = "Server Notepad: Choose a file to edit";
   $sPageContent = "

      <center><h1>Choose a text file to edit</h1></center>
      <p>You can use this page to choose a text file to edit </p>
    <form action = 'retrovox-notepad.php'
          method = 'get'>
    <br>
    <em>Enter the file name and path of an 
        <strong>existing</strong> file to edit</em>
    <br>
    <input  type = 'text'    name  = 'file'  size = '80'
           value = '$sFilePathEncoded'><br>
    <input   type = 'submit'  value = 'Edit this File'>
    </form>

    <!--
    <form action = 'retrovox-notepad-new.php' 
          method = 'get'>
    <br>
    <em>Enter the file name and path of a <strong>new</strong> 
        file to edit</em>
    <br>
    <input   type = 'text'    name  = 'file'  size = '80'
           value = '$sFilePathEncoded'><br>
    <input   type = 'submit'  value = 'Create and Edit this File'>
    <small>note: this isn't working properly</small>
    </form>
    -->

    <ol type = 'a'>
    <li>
    <a href = '$MANAGEMENTWEBFOLDER/admin.php'>
    Administration</a></li>

    </ol>

    </body>
    </html>";


    $sOutputPage = fnFillWebTemplate(
      $sAdminTemplateContents, $sPageContent, $sPageTitle);   
    echo $sOutputPage;
    exit;

//--<--<--<--<--<--<--<--<--<--<--<--<--<--<
?>