Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <form name="fLicSearch" method="post" onsubmit="document.getElementById('Submit').disabled=1;"><p>Search scope:
- <select name="path" ><option value="/export/raid5/licenses/FlexLM8.3/" selected="selected">All Licenses</option><option value="/export/raid5/licenses/FlexLM8.3/Eval/">Eval</option><option value="/export/raid5/licenses/FlexLM8.3/Companies/">Companies</option><o
- ption value="/export/raid5/licenses/FlexLM8.3/Individual/">Individual</option><option value="/export/raid5/licenses/FlexLM8.3/Academic/">Academic</option><option value="/export/raid5/licenses/FlexLM8.3/Government/">Government</option>
- </select>
- <br><br>
- Enter expiration date or text to search licenses for:
- <input type="text" name="sDate" value="<?php if (!isset($_POST[sDate])){ echo date('M-Y'); } else { echo $_POST[sDate]; } ?>">
- </p><br>
- <input type="submit" name="Submit" id="Submit" value="Submit">
- </form>
- <br><br>
- <p>Results:</p>
- <?php
- //debugging turned on for this temporarily
- ini_set('display_errors', 'On');
- error_reporting(E_ALL);
- echo $_POST[path] . "<br><br>";
- ?>
- <table width="100%" border="0" cellspacing="0" cellpadding="0" id="expandable_table">
- <TR><TD scope="col" bgcolor="#999999" width="90%" align="center">File</TD></TR>
- <?php
- $path = $_POST[path];
- $tHTML = "";
- if (isset($_POST[path])) {
- $path = realpath($_POST[path]); //set variable to actual path on filesystem
- $objects = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path), RecursiveIteratorIterator::SELF_FIRST);
- $i = 0;
- foreach($objects as $name => $object){
- if (is_dir($name) == false && stristr($name,"_Archived") == false && stristr($name,"_programs") == false && stristr($name,"_old") == false && stristr($name,"notes.txt") == false ) {
- // the below INCLUDES archive searches
- // if (is_dir($name) == false && stristr($name,"_programs") == false) {
- //echo "$name<br>";
- $sopenfile = file_get_contents($name);
- if (stristr($sopenfile,$_POST[sDate])) {
- echo '<tbody><tr><td><a href="#" onclick="return toggleTbody(\'div'.$i.'\');">';
- echo str_replace($path,"",$name)."</a>";
- echo "</td></tr></tbody><tbody id='div$i' class='off'>";
- echo "<tr><td>";
- // echo "<span style='display:none;' name='div$i'>";
- // converts the \n chars to html
- $convert = explode("\n",$sopenfile);
- for ($xc=0; $xc<count($convert);$xc++)
- {
- //echo "$sopenfile";
- echo $convert[$xc].'<br>';
- }
- // echo "</span>";
- echo "</td></tr></tbody>";
- }
- $i++;
- }
- }
- }
- ?>
- </table>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement