Location: PHPKode > scripts > SimpleSiteAudit > filediff/uploadform.php
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  <meta http-equiv="content-type" content="text/html; charset=windows-1250">
  <title>Upload form</title>
    <link href="../css/simplesiteaudit.css" rel="stylesheet" type="text/css">
  <script language="JavaScript" src="../validation/validate.js"
    type="text/javascript" xml:space="preserve"></script>
 
  </head>
  <body bgcolor="#ffffff">

<table class="tab3"><tr><td>
            <p class="sub2" style="text-align:center;"><font color="brown">SimpleSiteAudit</font> Admin<label> Multisite v1.5.1 </label></p>
            <p class="sub2" style="text-align:center;">File comparison utility</p>
            <p class="sub1" style="text-align:center;">Please select 2 text-based files for comparison<br />
            (e.g. files with extensions: .txt, .php, .asp, .html etc.)</p><br />
            
  <!--<input type="button" id="back" onclick="window.location.href='index1.php'" style="width: auto; background-color: #ffffff;" name="back" alt="Back to FTP/DB setup form" value="Back to FTP/DB setup">-->
<!-- IMPORTANT:  FORM's enctype must be "multipart/form-data" -->
<form name="form" target="_blank" method="post" action="upload-page.php" enctype="multipart/form-data">
  <input style="border: 1px solid gray;background-color: #DFD;" class="button"  name="filesToUpload1" id="filesToUpload1" type="file" onchange="javascript: document.getElementById('filesToUpload1').value = this.value"/><br />
  <input style="border: 1px solid gray;background-color: #DFD;" class="button" name="filesToUpload2" id="filesToUpload2" type="file" onchange="javascript: document.getElementById('filesToUpload2').value = this.value"/><br />
  <p><label>Files will be deleted from the server after comparison:</label></p>
  <p><input style="width: auto;" class="button" name="submit" type="submit" value="Upload and compare files"><br /><label>(Opens a new tab/window)</label></p>
  <p><input type="button" id="back" onclick="window.location.href='../index.php'" style="width: auto; background-color: #ffffff;align:left;" name="back" title="Back to Preferences form" alt="Back to Preferences form" value="Back"></p>
</form>
</td></tr>
</table>
<script language="JavaScript" type="text/javascript"
        xml:space="preserve">//<![CDATA[
    var frmvalidator  = new Validator("form"); 
    /*frmvalidator.EnableMsgsTogether();*/
    frmvalidator.addValidation("filesToUpload1","req","Please select 2 files.");                                       
    frmvalidator.addValidation("filesToUpload2","req","Please select 2 files.");
    //]]>
</script>
      <p><img border="0" src="../images/spacer.gif" width="50" height="0"><label>View/Hide Google malware check for selected site</label></p>
    <?php
    $logs_dir = '../../../logs';
    $site_list = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($logs_dir), RecursiveIteratorIterator::SELF_FIRST);
    $html = Select($logs_dir, 'site_list', $site_list);
    echo '<img border="0" src="../images/spacer.gif" width="50" height="0">'.$html;

function Select($logs_dir, $name, $options = array() ) {//location.href=\'index1.php?ftp_server=\'+this.value - location.href=\'http://www.google.com/safebrowsing/diagnostic?site=\'+this.value
 global $ftp_server;
    $html = '<select class="dropdown" id="'.$name.'" name="'.$name.'" onchange="location.href=\'http://www.google.com/safebrowsing/diagnostic?site=\'+this.value">';
    $html .= '<option selected>Select a site</option>';
    
    foreach ($options as $option => $value) {
        
        if ($value->isDir()) {           
            $html .= '<option value='.str_replace('/',"",stripslashes(str_replace($logs_dir,"",$value))). '>' .str_replace('/',"",stripslashes(str_replace($logs_dir,"",$option))). '</option>';
            $value->getRealpath() . '<br />';
        }
    }
    $html .= '</select>';
    return  $html;    
}
      ?>
</body>
</html>
Return current item: SimpleSiteAudit