[Swift-commit] r7054 - SwiftApps/tryswift
davidk at ci.uchicago.edu
davidk at ci.uchicago.edu
Wed Sep 11 12:47:27 CDT 2013
Author: davidk
Date: 2013-09-11 12:47:27 -0500 (Wed, 11 Sep 2013)
New Revision: 7054
Modified:
SwiftApps/tryswift/index.php
Log:
Dynamic generation of available applications from tc.data
Modified: SwiftApps/tryswift/index.php
===================================================================
--- SwiftApps/tryswift/index.php 2013-09-10 20:33:02 UTC (rev 7053)
+++ SwiftApps/tryswift/index.php 2013-09-11 17:47:27 UTC (rev 7054)
@@ -47,26 +47,24 @@
<div id="submitButton">
<input type="submit" name="submit" value="Submit" />
</div>
- <div id="appsDiv">
- <div id="appsDivText">
- Available Applications<br><br>
- <ul>
- <li>echo</li>
- <li>cat</li>
- <li>ls</li>
- <li>grep</li>
- <li>sort</li>
- <li>paste</li>
- <li>cp</li>
- <li>touch</li>
- <li>wc</li>
- <li>sleep</li>
- </ul>
- </div>
- </div>
- </form>
- </div>
+ <div id="appsDiv">
+ <div id="appsDivText">
+ Available Applications<br><br>
+ <ul>
+ <?php
+ $file_handle = fopen("tc.data", "r");
+ while (!feof($file_handle)) {
+ $line_array = preg_split('/\s+/', fgets($file_handle));
+ if(isset($line_array[1])) {
+ echo "<li>$line_array[1]</li>\n";
+ }
+ }
+ fclose($file_handle);
+ ?>
+ </ul>
+ </div>
+
<script type="text/javascript">
function addtext() {
More information about the Swift-commit
mailing list