|
From: <kr...@us...> - 2007-04-18 18:40:19
|
Revision: 855
http://svn.sourceforge.net/astlinux/?rev=855&view=rev
Author: krisk84
Date: 2007-04-18 11:40:09 -0700 (Wed, 18 Apr 2007)
Log Message:
-----------
merge changes from trunk
Modified Paths:
--------------
branches/s2s/package/minihttpd/minihttpd.mk
Added Paths:
-----------
branches/s2s/package/minihttpd/www/
branches/s2s/package/minihttpd/www/admin/
branches/s2s/package/minihttpd/www/admin/.htpasswd
branches/s2s/package/minihttpd/www/admin/about.php
branches/s2s/package/minihttpd/www/admin/asterisk.php
branches/s2s/package/minihttpd/www/admin/backup.php
branches/s2s/package/minihttpd/www/admin/credits.php
branches/s2s/package/minihttpd/www/admin/default.css
branches/s2s/package/minihttpd/www/admin/dir.php
branches/s2s/package/minihttpd/www/admin/dirphp_class.php
branches/s2s/package/minihttpd/www/admin/exec.php
branches/s2s/package/minihttpd/www/admin/footer.php
branches/s2s/package/minihttpd/www/admin/general.php
branches/s2s/package/minihttpd/www/admin/graphics/
branches/s2s/package/minihttpd/www/admin/graphics/blank.gif
branches/s2s/package/minihttpd/www/admin/graphics/box-bottomleft.gif
branches/s2s/package/minihttpd/www/admin/graphics/box-bottomright.gif
branches/s2s/package/minihttpd/www/admin/graphics/box-left.gif
branches/s2s/package/minihttpd/www/admin/graphics/box-right.gif
branches/s2s/package/minihttpd/www/admin/graphics/box-topright.gif
branches/s2s/package/minihttpd/www/admin/graphics/logo.jpg
branches/s2s/package/minihttpd/www/admin/header.php
branches/s2s/package/minihttpd/www/admin/index.php
branches/s2s/package/minihttpd/www/admin/log.php
branches/s2s/package/minihttpd/www/admin/network.php
branches/s2s/package/minihttpd/www/admin/password.php
branches/s2s/package/minihttpd/www/admin/phpinfo.php
branches/s2s/package/minihttpd/www/index.html
Removed Paths:
-------------
branches/s2s/package/minihttpd/www/admin/
branches/s2s/package/minihttpd/www/admin/.htpasswd
branches/s2s/package/minihttpd/www/admin/about.php
branches/s2s/package/minihttpd/www/admin/asterisk.php
branches/s2s/package/minihttpd/www/admin/backup.php
branches/s2s/package/minihttpd/www/admin/credits.php
branches/s2s/package/minihttpd/www/admin/default.css
branches/s2s/package/minihttpd/www/admin/dir.php
branches/s2s/package/minihttpd/www/admin/dirphp_class.php
branches/s2s/package/minihttpd/www/admin/exec.php
branches/s2s/package/minihttpd/www/admin/footer.php
branches/s2s/package/minihttpd/www/admin/general.php
branches/s2s/package/minihttpd/www/admin/graphics/
branches/s2s/package/minihttpd/www/admin/graphics/blank.gif
branches/s2s/package/minihttpd/www/admin/graphics/box-bottomleft.gif
branches/s2s/package/minihttpd/www/admin/graphics/box-bottomright.gif
branches/s2s/package/minihttpd/www/admin/graphics/box-left.gif
branches/s2s/package/minihttpd/www/admin/graphics/box-right.gif
branches/s2s/package/minihttpd/www/admin/graphics/box-topright.gif
branches/s2s/package/minihttpd/www/admin/graphics/logo.jpg
branches/s2s/package/minihttpd/www/admin/header.php
branches/s2s/package/minihttpd/www/admin/index.php
branches/s2s/package/minihttpd/www/admin/log.php
branches/s2s/package/minihttpd/www/admin/network.php
branches/s2s/package/minihttpd/www/admin/password.php
branches/s2s/package/minihttpd/www/admin/phpinfo.php
branches/s2s/package/minihttpd/www/index.html
branches/s2s/package/minihttpd/www.tar.gz
Modified: branches/s2s/package/minihttpd/minihttpd.mk
===================================================================
--- branches/s2s/package/minihttpd/minihttpd.mk 2007-04-18 18:38:03 UTC (rev 854)
+++ branches/s2s/package/minihttpd/minihttpd.mk 2007-04-18 18:40:09 UTC (rev 855)
@@ -33,7 +33,7 @@
$(INSTALL) -D $(MINIHTTPD_DIR)/$(MINIHTTPD_BINARY) $(TARGET_DIR)/usr/$(MINIHTTPD_TARGET_BINARY)
$(INSTALL) -D $(MINIHTTPD_DIR)/htpasswd $(TARGET_DIR)/usr/bin/htpasswd
mkdir -p $(TARGET_DIR)/stat/var
- $(MINIHTTPD_CAT) package/minihttpd/www.tar.gz | tar -C $(TARGET_DIR)/stat/var $(TAR_OPTIONS) -
+ cp -a package/minihttpd/www $(TARGET_DIR)/stat/var/
$(INSTALL) -D -m 0755 package/minihttpd/mini_httpd.init $(TARGET_DIR)/etc/init.d/mini_httpd
ln -sf /tmp/etc/mini_httpd.conf $(TARGET_DIR)/etc/mini_httpd.conf
Copied: branches/s2s/package/minihttpd/www (from rev 854, trunk/package/minihttpd/www)
Copied: branches/s2s/package/minihttpd/www/admin (from rev 854, trunk/package/minihttpd/www/admin)
Deleted: branches/s2s/package/minihttpd/www/admin/.htpasswd
===================================================================
--- trunk/package/minihttpd/www/admin/.htpasswd 2007-04-18 18:38:03 UTC (rev 854)
+++ branches/s2s/package/minihttpd/www/admin/.htpasswd 2007-04-18 18:40:09 UTC (rev 855)
@@ -1 +0,0 @@
-admin:6kERs0/UltqFI
Copied: branches/s2s/package/minihttpd/www/admin/.htpasswd (from rev 854, trunk/package/minihttpd/www/admin/.htpasswd)
===================================================================
--- branches/s2s/package/minihttpd/www/admin/.htpasswd (rev 0)
+++ branches/s2s/package/minihttpd/www/admin/.htpasswd 2007-04-18 18:40:09 UTC (rev 855)
@@ -0,0 +1 @@
+admin:6kERs0/UltqFI
Deleted: branches/s2s/package/minihttpd/www/admin/about.php
===================================================================
--- trunk/package/minihttpd/www/admin/about.php 2007-04-18 18:38:03 UTC (rev 854)
+++ branches/s2s/package/minihttpd/www/admin/about.php 2007-04-18 18:40:09 UTC (rev 855)
@@ -1,60 +0,0 @@
-<?php include "header.php"; ?>
-
-AstLinux was originally created by Kristian Kielhofner. Over the years
-contributors from all over the world have worked together to make AstLinux
-what it is today. Please check the credits page for more information and
-thank you for using AstLinux!<BR>
-<BR>
-For support, please join the AstLinux-Users mailing list at
-<a href="http://sourceforge.net/mail/?group_id=170462">SourceForge.net.</a>
-<BR><BR>
-<?php
- echo "<table border=0 width=100%><tr><td align=center>";
-
- box_header(100, "AstLinux");
- echo "<center>";
-
- system("cat /etc/astlinux-release");
-
- echo "</center><BR>";
- box_footer();
-
- echo "</td><td align=center>";
-
- box_header(200, "Linux Kernel");
- echo "<center>";
-
- system("uname -a");
-
- echo "</center><BR>";
- box_footer();
-
- echo "</td><td align=center>";
-
- box_header(150, "Asterisk");
- echo "<center>";
-
- system("/usr/sbin/asterisk -V");
-
- echo "</center><BR>";
- box_footer();
-
- echo "</td></tr></table>";
-
-?>
-
-<br>
-
-If you find AstLinux useful, please consider making a donation. <br>
-I work very hard on making AstLinux all that it can be, and compensation never hurts :) <br>
-<br>
-<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
-<input type="hidden" name="cmd" value="_s-xclick">
-<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but21.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
-<input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----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-----END PKCS7-----">
-</form>
-
-<?php include "footer.php"; ?>
-
-
-
Copied: branches/s2s/package/minihttpd/www/admin/about.php (from rev 854, trunk/package/minihttpd/www/admin/about.php)
===================================================================
--- branches/s2s/package/minihttpd/www/admin/about.php (rev 0)
+++ branches/s2s/package/minihttpd/www/admin/about.php 2007-04-18 18:40:09 UTC (rev 855)
@@ -0,0 +1,60 @@
+<?php include "header.php"; ?>
+
+AstLinux was originally created by Kristian Kielhofner. Over the years
+contributors from all over the world have worked together to make AstLinux
+what it is today. Please check the credits page for more information and
+thank you for using AstLinux!<BR>
+<BR>
+For support, please join the AstLinux-Users mailing list at
+<a href="http://sourceforge.net/mail/?group_id=170462">SourceForge.net.</a>
+<BR><BR>
+<?php
+ echo "<table border=0 width=100%><tr><td align=center>";
+
+ box_header(100, "AstLinux");
+ echo "<center>";
+
+ system("cat /etc/astlinux-release");
+
+ echo "</center><BR>";
+ box_footer();
+
+ echo "</td><td align=center>";
+
+ box_header(200, "Linux Kernel");
+ echo "<center>";
+
+ system("uname -a");
+
+ echo "</center><BR>";
+ box_footer();
+
+ echo "</td><td align=center>";
+
+ box_header(150, "Asterisk");
+ echo "<center>";
+
+ system("/usr/sbin/asterisk -V");
+
+ echo "</center><BR>";
+ box_footer();
+
+ echo "</td></tr></table>";
+
+?>
+
+<br>
+
+If you find AstLinux useful, please consider making a donation. <br>
+I work very hard on making AstLinux all that it can be, and compensation never hurts :) <br>
+<br>
+<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
+<input type="hidden" name="cmd" value="_s-xclick">
+<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but21.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
+<input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----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-----END PKCS7-----">
+</form>
+
+<?php include "footer.php"; ?>
+
+
+
Deleted: branches/s2s/package/minihttpd/www/admin/asterisk.php
===================================================================
--- trunk/package/minihttpd/www/admin/asterisk.php 2007-04-18 18:38:03 UTC (rev 854)
+++ branches/s2s/package/minihttpd/www/admin/asterisk.php 2007-04-18 18:40:09 UTC (rev 855)
@@ -1,65 +0,0 @@
-<?php
-
-include "header.php";
-
-// Function: is Blank
-// Returns true or false depending on blankness of argument.
-
-function isBlank( $arg ) { return ereg( "^\s*$", $arg ); }
-
-?>
-
-<form action="<?=$HTTP_SERVER_VARS['SCRIPT_NAME']; ?>" method="POST" enctype="multipart/form-data" name="frmExecPlus">
- <table>
- <tr>
- <td class="label" align="right">Command:</td>
- <td class="type"><input name="txtCommand" type="text" size="70" value="<?=htmlspecialchars($_POST['txtCommand']);?>"></td>
- </tr>
- <tr>
- <td valign="top"> </td>
- <td valign="top" class="label">
- <input type="submit" class="button" value="Execute">
- </td>
- </tr>
- <tr>
- <td height="8"></td>
- <td></td>
- </tr>
- </table>
-</form>
-
-<p>
-<?php if (isBlank($_POST['txtCommand'])): ?>
-</p>
-<?php endif; ?>
-<?php if ($ulmsg) echo "<p><strong>" . $ulmsg . "</strong></p>\n"; ?>
-<?php
-
-if (!isBlank($_POST['txtCommand']))
- {
- echo "<pre>";
- putenv("TERM=vt100");
- putenv("PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin");
- putenv("SCRIPT_FILENAME=" . strtok(stripslashes($_POST['txtCommand']), " ")); /* PHP scripts */
- $ph = popen(stripslashes("asterisk -rx \"" . $_POST['txtCommand'] . "\""), "r" );
- while ($line = fgets($ph))
- echo htmlspecialchars($line);
- pclose($ph);
- echo "</pre>";
- }
-
-?>
-
-<?php
-include "footer.php";
-?>
-
-
-
-
-
-
-
-
-
-
Copied: branches/s2s/package/minihttpd/www/admin/asterisk.php (from rev 854, trunk/package/minihttpd/www/admin/asterisk.php)
===================================================================
--- branches/s2s/package/minihttpd/www/admin/asterisk.php (rev 0)
+++ branches/s2s/package/minihttpd/www/admin/asterisk.php 2007-04-18 18:40:09 UTC (rev 855)
@@ -0,0 +1,65 @@
+<?php
+
+include "header.php";
+
+// Function: is Blank
+// Returns true or false depending on blankness of argument.
+
+function isBlank( $arg ) { return ereg( "^\s*$", $arg ); }
+
+?>
+
+<form action="<?=$HTTP_SERVER_VARS['SCRIPT_NAME']; ?>" method="POST" enctype="multipart/form-data" name="frmExecPlus">
+ <table>
+ <tr>
+ <td class="label" align="right">Command:</td>
+ <td class="type"><input name="txtCommand" type="text" size="70" value="<?=htmlspecialchars($_POST['txtCommand']);?>"></td>
+ </tr>
+ <tr>
+ <td valign="top"> </td>
+ <td valign="top" class="label">
+ <input type="submit" class="button" value="Execute">
+ </td>
+ </tr>
+ <tr>
+ <td height="8"></td>
+ <td></td>
+ </tr>
+ </table>
+</form>
+
+<p>
+<?php if (isBlank($_POST['txtCommand'])): ?>
+</p>
+<?php endif; ?>
+<?php if ($ulmsg) echo "<p><strong>" . $ulmsg . "</strong></p>\n"; ?>
+<?php
+
+if (!isBlank($_POST['txtCommand']))
+ {
+ echo "<pre>";
+ putenv("TERM=vt100");
+ putenv("PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin");
+ putenv("SCRIPT_FILENAME=" . strtok(stripslashes($_POST['txtCommand']), " ")); /* PHP scripts */
+ $ph = popen(stripslashes("asterisk -rx \"" . $_POST['txtCommand'] . "\""), "r" );
+ while ($line = fgets($ph))
+ echo htmlspecialchars($line);
+ pclose($ph);
+ echo "</pre>";
+ }
+
+?>
+
+<?php
+include "footer.php";
+?>
+
+
+
+
+
+
+
+
+
+
Deleted: branches/s2s/package/minihttpd/www/admin/backup.php
===================================================================
--- trunk/package/minihttpd/www/admin/backup.php 2007-04-18 18:38:03 UTC (rev 854)
+++ branches/s2s/package/minihttpd/www/admin/backup.php 2007-04-18 18:40:09 UTC (rev 855)
@@ -1,19 +0,0 @@
-<?php
-
-@system("/usr/sbin/astback /tmp/backup.tar.gz", $result);
-if ($result != 0)
- {
- include "header.php";
- echo "<center><font color=red>Unable to create backup file.</font></center><BR>";
- include "footer.php";
- }
-else
- {
- header('Content-type: application/binary');
- header('Content-Disposition: attachment; filename="backup.tar.gz"');
- $fp = @fopen("/tmp/backup.tar.gz","rb");
- fpassthru($fp);
- fclose($fp);
- }
-@system("rm /tmp/backup.tar.gz", $result);
-?>
Copied: branches/s2s/package/minihttpd/www/admin/backup.php (from rev 854, trunk/package/minihttpd/www/admin/backup.php)
===================================================================
--- branches/s2s/package/minihttpd/www/admin/backup.php (rev 0)
+++ branches/s2s/package/minihttpd/www/admin/backup.php 2007-04-18 18:40:09 UTC (rev 855)
@@ -0,0 +1,19 @@
+<?php
+
+@system("/usr/sbin/astback /tmp/backup.tar.gz", $result);
+if ($result != 0)
+ {
+ include "header.php";
+ echo "<center><font color=red>Unable to create backup file.</font></center><BR>";
+ include "footer.php";
+ }
+else
+ {
+ header('Content-type: application/binary');
+ header('Content-Disposition: attachment; filename="backup.tar.gz"');
+ $fp = @fopen("/tmp/backup.tar.gz","rb");
+ fpassthru($fp);
+ fclose($fp);
+ }
+@system("rm /tmp/backup.tar.gz", $result);
+?>
Deleted: branches/s2s/package/minihttpd/www/admin/credits.php
===================================================================
--- trunk/package/minihttpd/www/admin/credits.php 2007-04-18 18:38:03 UTC (rev 854)
+++ branches/s2s/package/minihttpd/www/admin/credits.php 2007-04-18 18:40:09 UTC (rev 855)
@@ -1,31 +0,0 @@
-<?php include "header.php"; ?>
-
-AstLinux would not be possible without the many contributions of the following
-software projects: <br>
-<br>
-- <a href="http://www.kernel.org/">Linux kernel</a><br>
-- <a href="http://www.asterisk.org/">Asterisk</a><br>
-- <a href="http://www.acme.com/software/mini_httpd/">mini_httpd</a><br>
-- <a href="http://www.openssh.org/">openssh</a><br>
-- <a href="http://vsftpd.beasts.org/">vsftpd</a><br>
-- <a href="http://www.busybox.net/">busybox</a><br>
-- <a href="http://www.php.net/">php</a><br>
-- <a href="http://www.pengutronix.de/software/ptxdist_en.html">PTXDist</a><br>
-- <a href="http://www.m0n0.ch/wall/">m0n0wall</a><br>
-- and many, many more...<br><br>
-
-PHP Interface, AstLinux Logo:<br>
-- <a href="http://www.analogx.com/">Mark Thompson</a><br><br>
-
-Hardware:<br>
-- <a href="http://www.digium.com/">Digium</a><br>
-- <a href="http://www.sangoma.com/">Sangoma</a><br>
-- <a href="http://www.pikatechnologies.com/">Pika Technologies</a><br>
-- <a href="http://www.rhinoequipment.com/">Rhino Equipment</a><br>
-- Jon Bebeau<br>
-- David Davies<br><br>
-
-<?php include "footer.php"; ?>
-
-
-
Copied: branches/s2s/package/minihttpd/www/admin/credits.php (from rev 854, trunk/package/minihttpd/www/admin/credits.php)
===================================================================
--- branches/s2s/package/minihttpd/www/admin/credits.php (rev 0)
+++ branches/s2s/package/minihttpd/www/admin/credits.php 2007-04-18 18:40:09 UTC (rev 855)
@@ -0,0 +1,31 @@
+<?php include "header.php"; ?>
+
+AstLinux would not be possible without the many contributions of the following
+software projects: <br>
+<br>
+- <a href="http://www.kernel.org/">Linux kernel</a><br>
+- <a href="http://www.asterisk.org/">Asterisk</a><br>
+- <a href="http://www.acme.com/software/mini_httpd/">mini_httpd</a><br>
+- <a href="http://www.openssh.org/">openssh</a><br>
+- <a href="http://vsftpd.beasts.org/">vsftpd</a><br>
+- <a href="http://www.busybox.net/">busybox</a><br>
+- <a href="http://www.php.net/">php</a><br>
+- <a href="http://www.pengutronix.de/software/ptxdist_en.html">PTXDist</a><br>
+- <a href="http://www.m0n0.ch/wall/">m0n0wall</a><br>
+- and many, many more...<br><br>
+
+PHP Interface, AstLinux Logo:<br>
+- <a href="http://www.analogx.com/">Mark Thompson</a><br><br>
+
+Hardware:<br>
+- <a href="http://www.digium.com/">Digium</a><br>
+- <a href="http://www.sangoma.com/">Sangoma</a><br>
+- <a href="http://www.pikatechnologies.com/">Pika Technologies</a><br>
+- <a href="http://www.rhinoequipment.com/">Rhino Equipment</a><br>
+- Jon Bebeau<br>
+- David Davies<br><br>
+
+<?php include "footer.php"; ?>
+
+
+
Deleted: branches/s2s/package/minihttpd/www/admin/default.css
===================================================================
--- trunk/package/minihttpd/www/admin/default.css 2007-04-18 18:38:03 UTC (rev 854)
+++ branches/s2s/package/minihttpd/www/admin/default.css 2007-04-18 18:40:09 UTC (rev 855)
@@ -1,132 +0,0 @@
-div.astlinux
-{
- color: #000000;
- font-weight: normal;
- font-size: 12px;
- font-family: Verdana, Arial, Helvetica;
- text-decoration: none;
- letter-spacing: 0px
-}
-
-.astlinux a:link , .astlinux a:visited , .astlinux a:active
-{
- text-decoration: none;
- color: #0000FF;
-}
-
-.astlinux a:hover
-{
- text-decoration: underline;
-}
-
-.astlinux a:link .directory , .astlinux a:visited .directory , .astlinux a:active .directory
-{
- text-decoration: none;
- color: #006600;
-}
-
-.astlinux a:hover .directory
-{
- text-decoration: underline;
- color: #006600;
-}
-
-.astlinux a:link .dir-view , .astlinux a:visited .dir-view , .astlinux a:active .dir-view
-{
- color: #000000;
-}
-
-.astlinux a:hover .dir-view
-{
- color: #009900;
-}
-
-.astlinux td.file
-{
- padding: 1px;
- border-bottom: 1px
- dashed #CCCCCC;
-}
-
-.astlinux span.dir-view
-{
- height: 18px;
- width: 20px;
- background-color: #99FFCC;
- padding-left: 3px;
- padding-right: 3px;
- padding-top: 2px;
- padding-bottom: 3px;
- font-size: 10px;
- text-decoration: none;
-}
-
-.astlinux .error_msg
-{
- color: #FF0000;
-}
-
-.astlinux tr.header
-{
- background-color: #EEEEEE;
- font-weight: bold;
-}
-
-.astlinux td.file-property
-{
- text-align: right;
- padding-right: 5px;
- padding: 1px;
- border-bottom: 1px dashed #CCCCCC;
-}
-
-.astlinux td.file-options
-{
- text-align: center;
- padding-right: 5px;
- padding: 1px;
- border-bottom: 1px dashed #CCCCCC;
- background-color: #F6F6F6;
-}
-
-input
-{
- font-family: courier new, courier;
- font-weight: normal;
- font-size: 9pt;
-}
-
-pre
-{
- border: 1px solid #435370;
- background: #F3F3F3;
- padding: 1em;
- font-family: courier new, courier;
- white-space: pre;
- line-height: 10pt;
- font-size: 10pt;
-}
-
-.label
-{
- font-size: 11px;
- font-weight: bold;
-}
-
-.button
-{
- font-weight: bold;
- font-size: 11px;
-}
-
-body,td
-{
- color: #000000;
- font-weight: normal;
- font-size: 12px;
- font-family: Verdana, Arial, Helvetica;
- text-decoration: none;
- letter-spacing: 0px
-}
-
-
Copied: branches/s2s/package/minihttpd/www/admin/default.css (from rev 854, trunk/package/minihttpd/www/admin/default.css)
===================================================================
--- branches/s2s/package/minihttpd/www/admin/default.css (rev 0)
+++ branches/s2s/package/minihttpd/www/admin/default.css 2007-04-18 18:40:09 UTC (rev 855)
@@ -0,0 +1,132 @@
+div.astlinux
+{
+ color: #000000;
+ font-weight: normal;
+ font-size: 12px;
+ font-family: Verdana, Arial, Helvetica;
+ text-decoration: none;
+ letter-spacing: 0px
+}
+
+.astlinux a:link , .astlinux a:visited , .astlinux a:active
+{
+ text-decoration: none;
+ color: #0000FF;
+}
+
+.astlinux a:hover
+{
+ text-decoration: underline;
+}
+
+.astlinux a:link .directory , .astlinux a:visited .directory , .astlinux a:active .directory
+{
+ text-decoration: none;
+ color: #006600;
+}
+
+.astlinux a:hover .directory
+{
+ text-decoration: underline;
+ color: #006600;
+}
+
+.astlinux a:link .dir-view , .astlinux a:visited .dir-view , .astlinux a:active .dir-view
+{
+ color: #000000;
+}
+
+.astlinux a:hover .dir-view
+{
+ color: #009900;
+}
+
+.astlinux td.file
+{
+ padding: 1px;
+ border-bottom: 1px
+ dashed #CCCCCC;
+}
+
+.astlinux span.dir-view
+{
+ height: 18px;
+ width: 20px;
+ background-color: #99FFCC;
+ padding-left: 3px;
+ padding-right: 3px;
+ padding-top: 2px;
+ padding-bottom: 3px;
+ font-size: 10px;
+ text-decoration: none;
+}
+
+.astlinux .error_msg
+{
+ color: #FF0000;
+}
+
+.astlinux tr.header
+{
+ background-color: #EEEEEE;
+ font-weight: bold;
+}
+
+.astlinux td.file-property
+{
+ text-align: right;
+ padding-right: 5px;
+ padding: 1px;
+ border-bottom: 1px dashed #CCCCCC;
+}
+
+.astlinux td.file-options
+{
+ text-align: center;
+ padding-right: 5px;
+ padding: 1px;
+ border-bottom: 1px dashed #CCCCCC;
+ background-color: #F6F6F6;
+}
+
+input
+{
+ font-family: courier new, courier;
+ font-weight: normal;
+ font-size: 9pt;
+}
+
+pre
+{
+ border: 1px solid #435370;
+ background: #F3F3F3;
+ padding: 1em;
+ font-family: courier new, courier;
+ white-space: pre;
+ line-height: 10pt;
+ font-size: 10pt;
+}
+
+.label
+{
+ font-size: 11px;
+ font-weight: bold;
+}
+
+.button
+{
+ font-weight: bold;
+ font-size: 11px;
+}
+
+body,td
+{
+ color: #000000;
+ font-weight: normal;
+ font-size: 12px;
+ font-family: Verdana, Arial, Helvetica;
+ text-decoration: none;
+ letter-spacing: 0px
+}
+
+
Deleted: branches/s2s/package/minihttpd/www/admin/dir.php
===================================================================
--- trunk/package/minihttpd/www/admin/dir.php 2007-04-18 18:38:03 UTC (rev 854)
+++ branches/s2s/package/minihttpd/www/admin/dir.php 2007-04-18 18:40:09 UTC (rev 855)
@@ -1,12 +0,0 @@
-<?php
-
-require("dirphp_class.php");
-
-// CREATE AN INSTANCE OF DirPHP TO WORK WITH.
-$dirphp = new DirPHP("m/d/y", $header, $footer);
-
-// THIS FUNCTION DOES ALL THE WORK
-$dirphp->handle_events();
-
-?>
-
Copied: branches/s2s/package/minihttpd/www/admin/dir.php (from rev 854, trunk/package/minihttpd/www/admin/dir.php)
===================================================================
--- branches/s2s/package/minihttpd/www/admin/dir.php (rev 0)
+++ branches/s2s/package/minihttpd/www/admin/dir.php 2007-04-18 18:40:09 UTC (rev 855)
@@ -0,0 +1,12 @@
+<?php
+
+require("dirphp_class.php");
+
+// CREATE AN INSTANCE OF DirPHP TO WORK WITH.
+$dirphp = new DirPHP("m/d/y", $header, $footer);
+
+// THIS FUNCTION DOES ALL THE WORK
+$dirphp->handle_events();
+
+?>
+
Deleted: branches/s2s/package/minihttpd/www/admin/dirphp_class.php
===================================================================
--- trunk/package/minihttpd/www/admin/dirphp_class.php 2007-04-18 18:38:03 UTC (rev 854)
+++ branches/s2s/package/minihttpd/www/admin/dirphp_class.php 2007-04-18 18:40:09 UTC (rev 855)
@@ -1,257 +0,0 @@
-<?php
-/************************************************************ GENERAL INFO ***\
-| DirPHP version 1.0 |
-| Created by Stuart Montgomery as a simple solution for |
-| easy directory printing and uploading. |
-|*****************************************************************************|
-| Copyright 2004 Stuart Montgomery |
-| GNU General Public License notice: |
-| |
-| This program is free software; you can redistribute it and/or modify |
-| it under the terms of the GNU General Public License as published by |
-| the Free Software Foundation; either version 2 of the License, or |
-| (at your option) any later version. |
-| |
-| This program is distributed in the hope that it will be useful, |
-| but WITHOUT ANY WARRANTY; without even the implied warranty of |
-| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
-| GNU General Public License for more details. |
-| |
-| You should have received a copy of the GNU General Public License |
-| along with this program; if not, write to the Free Software |
-| Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
-| |
-| Place this file on any PHP capable server to view its containing |
-| directory's contents and upload to it (if allowed by server). There |
-| are several configurable options to control all functions of the script |
-| to customize it to your needs. The script is written as a PHP class |
-| and should be called from another PHP file. Refer to the documentation |
-| (dirphp_readme.htm) for installation and configuration instructions. |
-| |
-| http://scripts.ensitehosting.com/ |
-| st...@en... |
-\*****************************************************************************/
-
-class DirPHP {
-
- var $version;
- var $dir;
- var $use_dir;
- var $parent_dir;
- var $date_format;
- var $msg;
-
- function DirPHP($date_format, $time_limit = 300)
- {
- $this->version = "1.0";
- $this->date_format = $date_format;
- $use_dir = $this->find_use_dir();
- error_reporting(E_ALL ^ E_NOTICE); // Turn of annoying error notices (comment-out line for debugging)
- set_time_limit($time_limit);
- if ($use_dir == FALSE) {
- $this->dir = opendir(".");
- $this->use_dir = "";
- } else {
- $this->dir = opendir($use_dir);
- $this->use_dir = $use_dir;
- }
- array_pop($dirtree = explode("/", $this->use_dir));
- $num_levels = count($dirtree) - 1;
- $this->parent_dir = "?dir=";
- for ($i = 0; $i < $num_levels; $i++) {
- $this->parent_dir .= $dirtree[$i]."/";
- }
- if ($this->parent_dir == "?dir=") $this->parent_dir = "";
- } // End of DirPHP function (class constructor)
-
- function display_header()
- {
- include "header.php";
- $header = "Current Path: <B>" . $this->find_use_dir() . "</B><br><BR>";
-
- // For editing file page
- if (isset($_GET['edit']) && is_file($_GET['edit'])) {
- $header .= "\xA0\xA0\xA0\xA0\xA0<span style=\"font-style: italic; color: green\">Editing:</span>\xA0" . $_GET['edit'] . "</a> \xA0\xA0\xA0\xA0\xA0<a href=\"" . $_SERVER['PHP_SELF'];
- if (isset($_GET['dir']))
- $header .= "?dir=" . $_GET['dir'];
- $header .= "\">< Return to directory</a>";
- }
- $header .= "\n";
- echo $header;
- }
-
- function display_footer()
- {
- include "footer.php";
- }
-
- function find_use_dir()
- {
- if (isset($_GET['dir'])) $use_dir = $_GET['dir'];
- if (isset($_POST['dir'])) $use_dir = $_POST['dir'];
- if (!isset($use_dir)) {
- $use_dir = FALSE;
- }
- return $use_dir;
- }
-
- function display_dir()
- {
- echo "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n";
- echo "<tr class=\"header\"><td class=\"file\" style=\"padding: 2px\">File</td><td width=\"90\" class=\"file-property\">Size</td><td width=\"78\" class=\"file-property\">Modified</td></tr>\n";
- // Show parent directory link, if applicable
- if ($this->use_dir != "")
- echo "<tr height=\"24\"><td colspan=\"3\" class=\"file\" align=\"left\"><a href=\"" .$_SERVER['PHP_SELF'] . $this->parent_dir . "\"><span class=\"directory\">> .. (parent)</span></a></td></tr>";
- // Show error message
- $this->show_msg();
- // Begin directory read loop
- while (($file = readdir($this->dir)) != FALSE) {
- $filename = $file; // $filename will be unedited, while $file will have $use_dir tacked onto the front of it
- $file = $this->use_dir . $file;
- if ($filename == "." || $filename == "..") continue; // Ignore self and parent directory links (first two entries in each directory)
- $fsize = $this->file_property("size", $file);
- $fmtime = $this->file_property("modified", $file);
- // Check if it's a directory or not
- if (is_dir($file)) {
- $dir_files[$filename] = "<tr><td class=\"file\"><a href=\"" . $_SERVER['PHP_SELF'] . "?dir=" . $file . "/\"><span class=\"directory\">> " . $filename . "/</span></a></td><td class=\"file\">\xA0</td><td class=\"file\">\xA0</td></tr>\n";
- // Check if it's a php file
- }
- else
- {
- $non_dir_files[$filename] = "<tr style=\"border-top: 1px solid #000000\"><td class=\"file\"><a href=\"" . $_SERVER['PHP_SELF'] . "?edit=" . $file;
- if ($this->use_dir != "")
- $non_dir_files[$filename] .= "&dir=" . $this->use_dir;
- $non_dir_files[$filename] .= "\" title=\"Edit " . $file . "\">" . $filename . "</a></td><td class=\"file-property\">" . $fsize . "</td><td class=\"file-property\">" . $fmtime . "</td></tr>\n";
- }
- }
- // Sort the arrays alphabetically and output them
- if (isset($dir_files)) {
- ksort($dir_files);
- foreach ($dir_files as $value) echo $value;
- }
- if (isset($non_dir_files)) {
- ksort($non_dir_files);
- foreach ($non_dir_files as $value) echo $value;
- }
- echo "</table>\n";
-
- closedir($this->dir);
- } // End of display_dir function
-
- function cleanup_text_file($file)
- {
- // chr(13) = CR (carridge return) = Macintosh
- // chr(10) = LF (line feed) = Unix
- // Win line break = CRLF
- $new_file = '';
- $old_file = '';
- $fcontents = file($file);
- while (list ($line_num, $line) = each($fcontents))
- {
- $old_file .= $line;
- $new_file .= str_replace(chr(13), chr(10), $line);
- }
- if ($old_file != $new_file)
- {
- // Open the uploaded file, and re-write it with the new changes
- $fp = fopen($file, "w");
- fwrite($fp, $new_file);
- fclose($fp);
- }
- }
-
-
- function edit_file($file, $change_file = 0, $newfile = 0)
- {
- if ($change_file == 1) {
- $fp = fopen($file, "w");
- $newfile = stripslashes($newfile);
- $newfile = str_replace(chr(13), '', $newfile);
-
- if (fwrite($fp, $newfile))
- $this->msg = "File <u>" . $filename . "</u> successfully edited.";
- fclose($fp);
- } else {
- if (is_writable($file)) {
- $ret = "<form action=\"" . $_SERVER['PHP_SELF'] . "\" method=\"POST\">\n";
- $ret .= "<p><text" . "area cols=\"80\" rows=\"30\" wrap=\"off\" name=\"newfile\">\n";
-
- $contents = file_get_contents($file);
- $contents = str_replace(" ", "&nbsp;", $contents); // <--- Check for non-breaking space characters and maintain them
- $contents = str_replace(">", "&gt;", $contents);
- $contents = str_replace("<", "&lt;", $contents);
-
- $ret .= $contents;
- $ret .= "</text" . "area>\n";
- $ret .= "<p>Save As: <br><input type=\"text\" name=\"filename\" value=\"" . $file . "\">";
- $ret .= "<input type=\"hidden\" name=\"edit\" value=\"true\">\n";
- $ret .= "<input type=\"hidden\" name=\"dir\" value=\"" . $this->use_dir . "\">\n";
- $ret .= "<p><input type=\"submit\" name=\"submit\" value=\"Submit Changes\">\n";
- $ret .= "</form></p>\n";
- } else {
- $ret .= "<p>Cannot edit file: system permission denied.</p>\n";
- }
- return $ret;
- }
- } // End of edit_file function
-
- function file_property($property, $file)
- {
- $prev_display_errors = ini_get("display_errors");
- ini_set("display_errors", "0");
- if ($property == "size") { // File size property
- $size = filesize($file);
- if ($size > 1024 && $size < 1048576) {
- $size = round($size / 1024, 2) . " KB";
- } elseif ($size > 1048576) {
- $size = round($size / 1048576, 1) . " MB";
- } elseif ($size > 1073741824) {
- $size = round($size / 1073741824, 1) . " GB";
- } else {
- $size = $size . " B";
- }
- ini_set("display_errors", $prev_display_errors);
-
- return $size;
- } elseif ($property == "modified") { // Last modified date of file
- $modtime = date($this->date_format, filemtime($file));
- $modtime .= " ";
- ini_set("display_errors", $prev_display_errors);
-
- return $modtime;
- }
- ini_set("display_errors", $prev_display_errors);
- } // End of file_property function
-
- function show_msg()
- {
- if (isset($this->msg))
- echo "<tr height=\"24\"><td colspan=\"3\" class=\"file\" align=\"center\"><span class=\"error_msg\">" . $this->msg . "</span></td></td><td class=\"file-options\">\xA0</td></tr>";
- }
-
- function handle_events()
- {
- // Handle normal events
-
- $this->display_header();
- if (isset($_GET['edit'])) {
- echo $this->edit_file($_GET['edit']);
- } elseif (isset($_POST['edit'], $_POST['dir'])) {
- $this->edit_file($_POST['filename'], 1, $_POST['newfile']);
- $this->use_dir = $_POST['dir'];
- $this->display_dir();
- } else {
- $this->display_dir();
- }
-
- $this->display_footer();
- } // End of handle_events function
-
-
-} // End of DirPHP class
-
-
-?>
-
-
-
Copied: branches/s2s/package/minihttpd/www/admin/dirphp_class.php (from rev 854, trunk/package/minihttpd/www/admin/dirphp_class.php)
===================================================================
--- branches/s2s/package/minihttpd/www/admin/dirphp_class.php (rev 0)
+++ branches/s2s/package/minihttpd/www/admin/dirphp_class.php 2007-04-18 18:40:09 UTC (rev 855)
@@ -0,0 +1,257 @@
+<?php
+/************************************************************ GENERAL INFO ***\
+| DirPHP version 1.0 |
+| Created by Stuart Montgomery as a simple solution for |
+| easy directory printing and uploading. |
+|*****************************************************************************|
+| Copyright 2004 Stuart Montgomery |
+| GNU General Public License notice: |
+| |
+| This program is free software; you can redistribute it and/or modify |
+| it under the terms of the GNU General Public License as published by |
+| the Free Software Foundation; either version 2 of the License, or |
+| (at your option) any later version. |
+| |
+| This program is distributed in the hope that it will be useful, |
+| but WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
+| GNU General Public License for more details. |
+| |
+| You should have received a copy of the GNU General Public License |
+| along with this program; if not, write to the Free Software |
+| Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
+| |
+| Place this file on any PHP capable server to view its containing |
+| directory's contents and upload to it (if allowed by server). There |
+| are several configurable options to control all functions of the script |
+| to customize it to your needs. The script is written as a PHP class |
+| and should be called from another PHP file. Refer to the documentation |
+| (dirphp_readme.htm) for installation and configuration instructions. |
+| |
+| http://scripts.ensitehosting.com/ |
+| st...@en... |
+\*****************************************************************************/
+
+class DirPHP {
+
+ var $version;
+ var $dir;
+ var $use_dir;
+ var $parent_dir;
+ var $date_format;
+ var $msg;
+
+ function DirPHP($date_format, $time_limit = 300)
+ {
+ $this->version = "1.0";
+ $this->date_format = $date_format;
+ $use_dir = $this->find_use_dir();
+ error_reporting(E_ALL ^ E_NOTICE); // Turn of annoying error notices (comment-out line for debugging)
+ set_time_limit($time_limit);
+ if ($use_dir == FALSE) {
+ $this->dir = opendir(".");
+ $this->use_dir = "";
+ } else {
+ $this->dir = opendir($use_dir);
+ $this->use_dir = $use_dir;
+ }
+ array_pop($dirtree = explode("/", $this->use_dir));
+ $num_levels = count($dirtree) - 1;
+ $this->parent_dir = "?dir=";
+ for ($i = 0; $i < $num_levels; $i++) {
+ $this->parent_dir .= $dirtree[$i]."/";
+ }
+ if ($this->parent_dir == "?dir=") $this->parent_dir = "";
+ } // End of DirPHP function (class constructor)
+
+ function display_header()
+ {
+ include "header.php";
+ $header = "Current Path: <B>" . $this->find_use_dir() . "</B><br><BR>";
+
+ // For editing file page
+ if (isset($_GET['edit']) && is_file($_GET['edit'])) {
+ $header .= "\xA0\xA0\xA0\xA0\xA0<span style=\"font-style: italic; color: green\">Editing:</span>\xA0" . $_GET['edit'] . "</a> \xA0\xA0\xA0\xA0\xA0<a href=\"" . $_SERVER['PHP_SELF'];
+ if (isset($_GET['dir']))
+ $header .= "?dir=" . $_GET['dir'];
+ $header .= "\">< Return to directory</a>";
+ }
+ $header .= "\n";
+ echo $header;
+ }
+
+ function display_footer()
+ {
+ include "footer.php";
+ }
+
+ function find_use_dir()
+ {
+ if (isset($_GET['dir'])) $use_dir = $_GET['dir'];
+ if (isset($_POST['dir'])) $use_dir = $_POST['dir'];
+ if (!isset($use_dir)) {
+ $use_dir = FALSE;
+ }
+ return $use_dir;
+ }
+
+ function display_dir()
+ {
+ echo "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n";
+ echo "<tr class=\"header\"><td class=\"file\" style=\"padding: 2px\">File</td><td width=\"90\" class=\"file-property\">Size</td><td width=\"78\" class=\"file-property\">Modified</td></tr>\n";
+ // Show parent directory link, if applicable
+ if ($this->use_dir != "")
+ echo "<tr height=\"24\"><td colspan=\"3\" class=\"file\" align=\"left\"><a href=\"" .$_SERVER['PHP_SELF'] . $this->parent_dir . "\"><span class=\"directory\">> .. (parent)</span></a></td></tr>";
+ // Show error message
+ $this->show_msg();
+ // Begin directory read loop
+ while (($file = readdir($this->dir)) != FALSE) {
+ $filename = $file; // $filename will be unedited, while $file will have $use_dir tacked onto the front of it
+ $file = $this->use_dir . $file;
+ if ($filename == "." || $filename == "..") continue; // Ignore self and parent directory links (first two entries in each directory)
+ $fsize = $this->file_property("size", $file);
+ $fmtime = $this->file_property("modified", $file);
+ // Check if it's a directory or not
+ if (is_dir($file)) {
+ $dir_files[$filename] = "<tr><td class=\"file\"><a href=\"" . $_SERVER['PHP_SELF'] . "?dir=" . $file . "/\"><span class=\"directory\">> " . $filename . "/</span></a></td><td class=\"file\">\xA0</td><td class=\"file\">\xA0</td></tr>\n";
+ // Check if it's a php file
+ }
+ else
+ {
+ $non_dir_files[$filename] = "<tr style=\"border-top: 1px solid #000000\"><td class=\"file\"><a href=\"" . $_SERVER['PHP_SELF'] . "?edit=" . $file;
+ if ($this->use_dir != "")
+ $non_dir_files[$filename] .= "&dir=" . $this->use_dir;
+ $non_dir_files[$filename] .= "\" title=\"Edit " . $file . "\">" . $filename . "</a></td><td class=\"file-property\">" . $fsize . "</td><td class=\"file-property\">" . $fmtime . "</td></tr>\n";
+ }
+ }
+ // Sort the arrays alphabetically and output them
+ if (isset($dir_files)) {
+ ksort($dir_files);
+ foreach ($dir_files as $value) echo $value;
+ }
+ if (isset($non_dir_files)) {
+ ksort($non_dir_files);
+ foreach ($non_dir_files as $value) echo $value;
+ }
+ echo "</table>\n";
+
+ closedir($this->dir);
+ } // End of display_dir function
+
+ function cleanup_text_file($file)
+ {
+ // chr(13) = CR (carridge return) = Macintosh
+ // chr(10) = LF (line feed) = Unix
+ // Win line break = CRLF
+ $new_file = '';
+ $old_file = '';
+ $fcontents = file($file);
+ while (list ($line_num, $line) = each($fcontents))
+ {
+ $old_file .= $line;
+ $new_file .= str_replace(chr(13), chr(10), $line);
+ }
+ if ($old_file != $new_file)
+ {
+ // Open the uploaded file, and re-write it with the new changes
+ $fp = fopen($file, "w");
+ fwrite($fp, $new_file);
+ fclose($fp);
+ }
+ }
+
+
+ function edit_file($file, $change_file = 0, $newfile = 0)
+ {
+ if ($change_file == 1) {
+ $fp = fopen($file, "w");
+ $newfile = stripslashes($newfile);
+ $newfile = str_replace(chr(13), '', $newfile);
+
+ if (fwrite($fp, $newfile))
+ $this->msg = "File <u>" . $filename . "</u> successfully edited.";
+ fclose($fp);
+ } else {
+ if (is_writable($file)) {
+ $ret = "<form action=\"" . $_SERVER['PHP_SELF'] . "\" method=\"POST\">\n";
+ $ret .= "<p><text" . "area cols=\"80\" rows=\"30\" wrap=\"off\" name=\"newfile\">\n";
+
+ $contents = file_get_contents($file);
+ $contents = str_replace(" ", "&nbsp;", $contents); // <--- Check for non-breaking space characters and maintain them
+ $contents = str_replace(">", "&gt;", $contents);
+ $contents = str_replace("<", "&lt;", $contents);
+
+ $ret .= $contents;
+ $ret .= "</text" . "area>\n";
+ $ret .= "<p>Save As: <br><input type=\"text\" name=\"filename\" value=\"" . $file . "\">";
+ $ret .= "<input type=\"hidden\" name=\"edit\" value=\"true\">\n";
+ $ret .= "<input type=\"hidden\" name=\"dir\" value=\"" . $this->use_dir . "\">\n";
+ $ret .= "<p><input type=\"submit\" name=\"submit\" value=\"Submit Changes\">\n";
+ $ret .= "</form></p>\n";
+ } else {
+ $ret .= "<p>Cannot edit file: system permission denied.</p>\n";
+ }
+ return $ret;
+ }
+ } // End of edit_file function
+
+ function file_property($property, $file)
+ {
+ $prev_display_errors = ini_get("display_errors");
+ ini_set("display_errors", "0");
+ if ($property == "size") { // File size property
+ $size = filesize($file);
+ if ($size > 1024 && $size < 1048576) {
+ $size = round($size / 1024, 2) . " KB";
+ } elseif ($size > 1048576) {
+ $size = round($size / 1048576, 1) . " MB";
+ } elseif ($size > 1073741824) {
+ $size = round($size / 1073741824, 1) . " GB";
+ } else {
+ $size = $size . " B";
+ }
+ ini_set("display_errors", $prev_display_errors);
+
+ return $size;
+ } elseif ($property == "modified") { // Last modified date of file
+ $modtime = date($this->date_format, filemtime($file));
+ $modtime .= " ";
+ ini_set("display_errors", $prev_display_errors);
+
+ return $modtime;
+ }
+ ini_set("display_errors", $prev_display_errors);
+ } // End of file_property function
+
+ function show_msg()
+ {
+ if (isset($this->msg))
+ echo "<tr height=\"24\"><td colspan=\"3\" class=\"file\" align=\"center\"><span class=\"error_msg\">" . $this->msg . "</span></td></td><td class=\"file-options\">\xA0</td></tr>";
+ }
+
+ function handle_events()
+ {
+ // Handle normal events
+
+ $this->display_header();
+ if (isset($_GET['edit'])) {
+ echo $this->edit_file($_GET['edit']);
+ } elseif (isset($_POST['edit'], $_POST['dir'])) {
+ $this->edit_file($_POST['filename'], 1, $_POST['newfile']);
+ $this->use_dir = $_POST['dir'];
+ $this->display_dir();
+ } else {
+ $this->display_dir();
+ }
+
+ $this->display_footer();
+ } // End of handle_events function
+
+
+} // End of DirPHP class
+
+
+?>
+
+
+
Deleted: branches/s2s/package/minihttpd/www/admin/exec.php
===================================================================
--- trunk/package/minihttpd/www/admin/exec.php 2007-04-18 18:38:03 UTC (rev 854)
+++ branches/s2s/package/minihttpd/www/admin/exec.php 2007-04-18 18:40:09 UTC (rev 855)
@@ -1,203 +0,0 @@
-<?php
-if (($_POST['submit'] == "Download") && file_exists($_POST['dlPath'])) {
- session_cache_limiter('public');
- $fd = fopen($_POST['dlPath'], "rb");
- header("Content-Type: application/octet-stream");
- header("Content-Length: " . filesize($_POST['dlPath']));
- header("Content-Disposition: attachment; filename=\"" .
- trim(htmlentities(basename($_POST['dlPath']))) . "\"");
-
- fpassthru($fd);
- exit;
-} else if (($_POST['submit'] == "Upload") && is_uploaded_file($_FILES['ulfile']['tmp_name'])) {
- move_uploaded_file($_FILES['ulfile']['tmp_name'], "/tmp/" . $_FILES['ulfile']['name']);
- $ulmsg = "Uploaded file to /tmp/" . htmlentities($_FILES['ulfile']['name']);
- unset($_POST['txtCommand']);
-}
-
-include "header.php";
-
-/*
- Exec+ v1.02-000 - Copyright 2001-2003, All rights reserved
- Created by technologEase (http://www.technologEase.com).
-
- (modified for m0n0wall by Manuel Kasper <mk...@ne...>)
- (further modified for AstLinux)
-*/
-
-// Function: is Blank
-// Returns true or false depending on blankness of argument.
-
-function isBlank( $arg ) { return ereg( "^\s*$", $arg ); }
-
-
-// Function: Puts
-// Put string, Ruby-style.
-
-function puts( $arg ) { echo "$arg\n"; }
-
-
-// "Constants".
-
-$Version = '';
-$ScriptName = $HTTP_SERVER_VARS['SCRIPT_NAME'];
-$Title = 'AstLinux: execute command';
-
-// Get year.
-
-$arrDT = localtime();
-$intYear = $arrDT[5] + 1900;
-
-?>
-<script language="javascript">
-
-
- // Create recall buffer array (of encoded strings).
-
-<?php
-
-if (isBlank( $_POST['txtRecallBuffer'] )) {
- puts( " var arrRecallBuffer = new Array;" );
-} else {
- puts( " var arrRecallBuffer = new Array(" );
- $arrBuffer = explode( "&", $_POST['txtRecallBuffer'] );
- for ($i=0; $i < (count( $arrBuffer ) - 1); $i++) puts( " '" . $arrBuffer[$i] . "'," );
- puts( " '" . $arrBuffer[count( $arrBuffer ) - 1] . "'" );
- puts( " );" );
-}
-
-?>
-
- // Set pointer to end of recall buffer.
- var intRecallPtr = arrRecallBuffer.length-1;
-
- // Functions to extend String class.
- function str_encode() { return escape( this ) }
- function str_decode() { return unescape( this ) }
-
- // Extend string class to include encode() and decode() functions.
- String.prototype.encode = str_encode
- String.prototype.decode = str_decode
-
- // Function: is Blank
- // Returns boolean true or false if argument is blank.
- function isBlank( strArg ) { return strArg.match( /^\s*$/ ) }
-
- // Function: frmExecPlus onSubmit (event handler)
- // Builds the recall buffer from the command string on submit.
- function frmExecPlus_onSubmit( form ) {
-
- if (!isBlank(form.txtCommand.value)) {
- // If this command is repeat of last command, then do not store command.
- if (form.txtCommand.value.encode() == arrRecallBuffer[arrRecallBuffer.length-1]) { return true }
-
- // Stuff encoded command string into the recall buffer.
- if (isBlank(form.txtRecallBuffer.value))
- form.txtRecallBuffer.value = form.txtCommand.value.encode();
- else
- form.txtRecallBuffer.value += '&' + form.txtCommand.value.encode();
- }
-
- return true;
- }
-
- // Function: btnRecall onClick (event handler)
- // Recalls command buffer going either up or down.
- function btnRecall_onClick( form, n ) {
-
- // If nothing in recall buffer, then error.
- if (!arrRecallBuffer.length) {
- alert( 'Nothing to recall!' );
- form.txtCommand.focus();
- return;
- }
-
- // Increment recall buffer pointer in positive or negative direction
- // according to <n>.
- intRecallPtr += n;
-
- // Make sure the buffer stays circular.
- if (intRecallPtr < 0) { intRecallPtr = arrRecallBuffer.length - 1 }
- if (intRecallPtr > (arrRecallBuffer.length - 1)) { intRecallPtr = 0 }
-
- // Recall the command.
- form.txtCommand.value = arrRecallBuffer[intRecallPtr].decode();
- }
-
- // Function: Reset onClick (event handler)
- // Resets form on reset button click event.
- function Reset_onClick( form ) {
-
- // Reset recall buffer pointer.
- intRecallPtr = arrRecallBuffer.length;
-
- // Clear form (could have spaces in it) and return focus ready for cmd.
- form.txtCommand.value = '';
- form.txtCommand.focus();
-
- return true;
- }
-//-->
-</script>
-<p>
-<?php if (isBlank($_POST['txtCommand'])): ?>
-</p>
-<?php endif; ?>
-<?php if ($ulmsg) echo "<p><strong>" . $ulmsg . "</strong></p>\n"; ?>
-<?php
-
-// pre { border: 2px solid #435370; background: #F0F0F0; padding: 1em; font-family: courier new, courier; line-height: 10pt; font-size: 10pt; }
-
-if (!isBlank($_POST['txtCommand'])) {
- puts("<pre>");
- puts("\$ " . htmlspecialchars(stripslashes($_POST['txtCommand'])));
- putenv("PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin");
- putenv("SCRIPT_FILENAME=" . strtok(stripslashes($_POST['txtCommand']), " ")); /* PHP scripts */
- $ph = popen(stripslashes($_POST['txtCommand']), "r" );
- while ($line = fgets($ph)) echo htmlspecialchars($line);
- pclose($ph);
- puts("</pre>");
-}
-
-?>
-
-<form action="<?=$ScriptName ?>" method="POST" enctype="multipart/form-data" name="frmExecPlus" onSubmit="return frmExecPlus_onSubmit( this );">
- <table>
- <tr>
- <td class="label" align="right">Command:</td>
- <td class="type"><input name="txtCommand" type="text" size="70" value="<?=htmlspecialchars($_POST['txtCommand']);?>"></td>
- </tr>
- <tr>
- <td valign="top"> </td>
- <td valign="top" class="label">
- <input type="hidden" name="txtRecallBuffer" value="<?=$_POST['txtRecallBuffer'] ?>">
- <input type="button" class="button" name="btnRecallPrev" value="<" onClick="btnRecall_onClick( this.form, -1 );">
- <input type="submit" class="button" value="Execute">
- <input type="button" class="button" name="btnRecallNext" value=">" onClick="btnRecall_onClick( this.form, 1 );">
- <input type="button" class="button" value="Clear" onClick="return Reset_onClick( this.form );">
- </td>
- </tr>
- <tr>
- <td height="8"></td>
- <td></td>
- </tr>
- <tr>
- <td align="right">Download:</td>
- <td>
- <input name="dlPath" type="text" id="dlPath" size="50">
- <input name="submit" type="submit" class="button" id="download" value="Download">
- </td>
- </tr>
- <tr>
- <td align="right">Upload:</td>
- <td valign="top" class="label">
-<input name="ulfile" type="file" class="button" id="ulfile">
- <input name="submit" type="submit" class="button" id="upload" value="Upload"></td>
- </tr>
- </table>
-</form>
-<?php
-include "footer.php";
-?>
-
-
Copied: branches/s2s/package/minihttpd/www/admin/exec.php (from rev 854, trunk/package/minihttpd/www/admin/exec.php)
===================================================================
--- branches/s2s/package/minihttpd/www/admin/exec.php (rev 0)
+++ branches/s2s/package/minihttpd/www/admin/exec.php 2007-04-18 18:40:09 UTC (rev 855)
@@ -0,0 +1,203 @@
+<?php
+if (($_POST['submit'] == "Download") && file_exists($_POST['dlPath'])) {
+ session_cache_limiter('public');
+ $fd = fopen($_POST['dlPath'], "rb");
+ header("Content-Type: application/octet-stream");
+ header("Content-Length: " . filesize($_POST['dlPath']));
+ header("Content-Disposition: attachment; filename=\"" .
+ trim(htmlentities(basename($_POST['dlPath']))) . "\"");
+
+ fpassthru($fd);
+ exit;
+} else if (($_POST['submit'] == "Upload") && is_uploaded_file($_FILES['ulfile']['tmp_name'])) {
+ move_uploaded_file($_FILES['ulfile']['tmp_name'], "/tmp/" . $_FILES['ulfile']['name']);
+ $ulmsg = "Uploaded file to /tmp/" . htmlentities($_FILES['ulfile']['name']);
+ unset($_POST['txtCommand']);
+}
+
+include "header.php";
+
+/*
+ Exec+ v1.02-000 - Copyright 2001-2003, All rights reserved
+ Created by technologEase (http://www.technologEase.com).
+
+ (modified for m0n0wall by Manuel Kasper <mk...@ne...>)
+ (further modified for AstLinux)
+*/
+
+// Function: is Blank
+// Returns true or false depending on blankness of argument.
+
+function isBlank( $arg ) { return ereg( "^\s*$", $arg ); }
+
+
+// Function: Puts
+// Put string, Ruby-style.
+
+function puts( $arg ) { echo "$arg\n"; }
+
+
+// "Constants".
+
+$Version = '';
+$ScriptName = $HTTP_SERVER_VARS['SCRIPT_NAME'];
+$Title = 'AstLinux: execute command';
+
+// Get year.
+
+$arrDT = localtime();
+$intYear = $arrDT[5] + 1900;
+
+?>
+<script language="javascript">
+
+
+ // Create recall buffer array (of encoded strings).
+
+<?php
+
+if (isBlank( $_POST['txtRecallBuffer'] )) {
+ puts( " var arrRecallBuffer = new Array;" );
+} else {
+ puts( " var arrRecallBuffer = new Array(" );
+ ...
[truncated message content] |