Subversion Repositories general

Compare Revisions

Ignore whitespace Rev 1285 → Rev 1286

/FileXch/branches/php-impl/pages/admin_list.php
0,0 → 1,87
<?php checkDataCollected(); ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
 
<head>
<title>FilExch Admin</title>
</head>
 
<body>
 
<h1>FilExch Admin</h1>
 
<?php if($ex) { ?>
<p><?= $ex->getMessage() ?></p>
<?php } ?>
 
<p><a href="manage.php">Create a new session.</a></p>
 
<?php if(!$aliveList) { ?>
<p>No session alive.</p>
<?php } else { ?>
<table border=1>
<tr>
<th>Session</th>
<th>Owner</th>
<th>Created</th>
<th>Expire</th>
<th>Size</th>
<th>Count</th>
<th colspan=4>Flags</th>
<th colspan=2>Comments</th>
<th>Active</th>
<th>&nbsp;</th>
</tr>
<?php foreach($aliveList as $s) { ?>
<tr>
<td><a href="guest.php?s=<?= $f->htmlUrlPart($s->getName()) ?>"><?= $f->string($s->getName()) ?></a></td>
<td><?= $s->getOwner() ?></td>
<td><?= $f->date($s->getCreated(), "&nbsp;") ?></td>
<td><?= $f->date($s->getExpire(), "&nbsp;") ?></td>
<td><?= $f->size($s->getSizeCurrent(), "0 B") ?> / <?= $f->size($s->getSizeLimit(), "-") ?></td>
<td><?= $f->string($s->getCountCurrent(), "0") ?> / <?= $f->string($s->getCountLimit(), "-") ?></td>
<td title="<?= $f->boolean($s->getDownloadable(), "Guest may download files",
"Guest may NOT download files") ?>"><?= $f->boolean($s->getDownloadable(), "D", "&nbsp;") ?></td>
<td title="<?= $f->boolean($s->getUploadable(), "Guest may upload files",
"Guest may NOT upload files") ?>"><?= $f->boolean($s->getUploadable(), "U", "&nbsp;") ?></td>
<td title="<?= $f->boolean($s->getDeletable(), "Guest may delete files",
"Guest may NOT delete files") ?>"><?= $f->boolean($s->getDeletable(), "x", "&nbsp;") ?></td>
<td title="<?= $f->boolean($s->getBlocked(), "Session is blocked",
"Session is not blocked") ?>"><?= $f->boolean($s->getBlocked(), "B", "&nbsp;") ?></td>
<td title="<?= $f->string($s->getPublicComment()) ?>"><?=
$f->stringBegin($s->getPublicComment(), 10) ?></td>
<td title="<?= $f->string($s->getPrivateComment()) ?>"><?=
$f->stringBegin($s->getPrivateComment(), 10) ?></td>
<td><?= $f->boolean($s->isActive(), "x", "&nbsp;") ?></td>
<td nowrap>
<a href="manage.php?id=<?= $f->htmlUrlPart($s->getId()) ?>">Manage</a>
<a href="admin.php?remove=<?= $f->htmlUrlPart($s->getId()) ?>">Remove</a>
</td>
</tr>
<?php } ?>
<tr>
<th>Total</th>
<td colspan="3">&nbsp;</td>
<td><?= $f->size($aliveSummary['sizeCurrent'], "0 B") ?>
/ <?= $f->size($aliveSummary['sizeLimit'], "-") ?></td>
<td><?= $f->string($aliveSummary['countCurrent'], "0") ?>
/ <?= $f->string($aliveSummary['countLimit'], "-") ?></td>
<td colspan="7">&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
<?php } ?>
 
<?php if(!$removedList) { ?>
<p>No removed sessions.</p>
<?php } else { ?>
<p><a href="removed.php">Removed sessions</a>
(<?= count($removedList) ?> sessions,
<?= $f->string($removedSummary['countCurrent'], "0") ?> files,
<?= $f->size($removedSummary['sizeCurrent'], "0 B") ?>)</p>
<?php } ?>
 
</body>
 
</html>
 
/FileXch/branches/php-impl/pages/general_error.php
0,0 → 1,22
<?php checkDataCollected(); ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
 
<head>
<title>FilExch - Error</title>
</head>
 
<body>
 
<h1>FilExch - Error</h1>
 
<?php if($ex) { ?>
<p><?= $ex->getMessage() ?></p>
<?php } else { ?>
<p>Internal error</p>
<?php } ?>
 
</body>
 
</html>
 
/FileXch/branches/php-impl/pages/removed_list.php
0,0 → 1,79
<?php checkDataCollected(); ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
 
<head>
<title>FilExch Admin - Removed Sessions</title>
</head>
 
<body>
 
<h1>FilExch Admin - Removed Sessions</h1>
 
<?php if($ex) { ?>
<p><?= $ex->getMessage() ?></p>
<?php } ?>
 
<p><a href="admin.php">Back to admin</a></p>
 
<?php if(!$removedList) { ?>
<p>No removed sessions.</p>
<?php } else { ?>
<table border=1>
<tr>
<th>Session</th>
<th>Owner</th>
<th>Created</th>
<th>Expire</th>
<th>Size</th>
<th>Count</th>
<th colspan=4>Flags</th>
<th colspan=2>Comments</th>
<th>Active</th>
<th>&nbsp;</th>
</tr>
<?php foreach($removedList as $s) { ?>
<tr>
<td><a href="admin_show.php?s=<?= $f->htmlUrlPart($s->getName()) ?>"><?= $f->string($s->getName()) ?></a></td>
<td><?= $s->getOwner() ?></td>
<td><?= $f->date($s->getCreated(), "&nbsp;") ?></td>
<td><?= $f->date($s->getExpire(), "&nbsp;") ?></td>
<td><?= $f->size($s->getSizeCurrent(), "0 B") ?> / <?= $f->size($s->getSizeLimit(), "-") ?></td>
<td><?= $f->string($s->getCountCurrent(), "0") ?> / <?= $f->string($s->getCountLimit(), "-") ?></td>
<td title="<?= $f->boolean($s->getDownloadable(), "Guest may download files",
"Guest may NOT download files") ?>"><?= $f->boolean($s->getDownloadable(), "D", "&nbsp;") ?></td>
<td title="<?= $f->boolean($s->getUploadable(), "Guest may upload files",
"Guest may NOT upload files") ?>"><?= $f->boolean($s->getUploadable(), "U", "&nbsp;") ?></td>
<td title="<?= $f->boolean($s->getDeletable(), "Guest may delete files",
"Guest may NOT delete files") ?>"><?= $f->boolean($s->getDeletable(), "x", "&nbsp;") ?></td>
<td title="<?= $f->boolean($s->getBlocked(), "Session is blocked",
"Session is not blocked") ?>"><?= $f->boolean($s->getBlocked(), "B", "&nbsp;") ?></td>
<td title="<?= $f->string($s->getPublicComment()) ?>"><?=
$f->stringBegin($s->getPublicComment(), 10) ?></td>
<td title="<?= $f->string($s->getPrivateComment()) ?>"><?=
$f->stringBegin($s->getPrivateComment(), 10) ?></td>
<td><?= $f->boolean($s->isActive(), "x", "&nbsp;") ?></td>
<td nowrap>
<a href="removed.php?restore=<?= $f->htmlUrlPart($s->getId()) ?>">Restore</a>
</td>
</tr>
<?php } ?>
<tr>
<th>Total</th>
<td colspan="3">&nbsp;</td>
<td><?= $f->size($removedSummary['sizeCurrent'], "0 B") ?>
/ <?= $f->size($removedSummary['sizeLimit'], "-") ?></td>
<td><?= $f->string($removedSummary['countCurrent'], "0") ?>
/ <?= $f->string($removedSummary['countLimit'], "-") ?></td>
<td colspan="7">&nbsp;</td>
<td>
<a href="removed.php?purge">Purge All</a>
</td>
</tr>
</table>
<?php } ?>
 
</body>
 
</html>
 
/FileXch/branches/php-impl/pages/manage_display.php
0,0 → 1,148
<?php checkDataCollected(); ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
 
<head>
<title>FilExch - Manage Session</title>
</head>
 
<body>
 
<h1>FilExch - Manage Session</h1>
 
<?php if($s->isActive()) { ?>
<p>Session is active</p>
<?php } else { ?>
<p>Session is NOT active</p>
<?php } ?>
 
<?php if($ex) { ?>
<p><?= $ex->getMessage() ?></p>
<?php } ?>
 
<form method=POST action="manage.php">
<input type=hidden name=id value="<?= $f->integer($s->getId()) ?>">
 
<h2>Settings</h2>
 
<table border=1>
<tr>
<th>Name</th>
<td><?= $f->string($s->getName(), "&nbsp;") ?></td>
</tr>
<tr>
<th>Owner (created by)</th>
<td><?= $f->string($s->getOwner(), "&nbsp;") ?></td>
</tr>
<tr>
<th>Created</th>
<td><?= $f->date($s->getCreated(), "&nbsp;") ?></td>
</tr>
<tr>
<th>Expires</th>
<td><input type=text name=expire value="<?= $f->date($s->getExpire()) ?>"></td>
</tr>
<tr>
<th>Current Size</th>
<td><?= $f->size($s->getSizeCurrent(), "0 B") ?></td>
</tr>
<tr>
<th>Size Limit</th>
<td><input type=text name=size_limit value="<?= $f->size($s->getSizeLimit()) ?>"></td>
</tr>
<tr>
<th>Files Count</th>
<td><?= $f->string($s->getCountCurrent(), "0") ?></td>
</tr>
<tr>
<th>Files Limit</th>
<td><input type=text name=count_limit value="<?= $f->string($s->getCountLimit()) ?>"></td>
</tr>
<tr>
<th>Guest may download</th>
<td><input type=checkbox name=downloadable <?= $f->boolean($s->getDownloadable(), "checked", "") ?>></td>
</tr>
<tr>
<th>Guest may upload</th>
<td><input type=checkbox name=uploadable <?= $f->boolean($s->getUploadable(), "checked", "") ?>></td>
</tr>
<tr>
<th>Guest may delete files</th>
<td><input type=checkbox name=deletable <?= $f->boolean($s->getDeletable(), "checked", "") ?>></td>
</tr>
<tr>
<th>Public comment</th>
<td><textarea name="public_comment"><?= $f->string($s->getPublicComment()) ?></textarea></td>
</tr>
<tr>
<th>Private comment</th>
<td><textarea name="private_comment"><?= $f->string($s->getPrivateComment()) ?></textarea></td>
</tr>
<tr>
<th>Blocked</th>
<td><input type=checkbox name=blocked <?= $f->boolean($s->getBlocked(), "checked", "") ?>></td>
</tr>
</table>
 
<p><input type=submit name="save" value="Save"> <a href="admin.php">Back</a></p>
 
</form>
 
<h2>Current Files</h2>
 
<?php if(!$s->getFileList()) { ?>
<p>No files</p>
<?php } else { ?>
<table border=1>
<tr>
<th>Name</th>
<th>Size</th>
<th>&nbsp;</th>
</tr>
<?php foreach($s->getFileList() as $file) { ?>
<tr>
<td><?= $f->string($file->name) ?></td>
<td><?= $f->size($file->size) ?></td>
<td><a href="download.php?name=<?= $f->htmlUrlPart($s->getName()) ?>/<?=
$f->htmlUrlPart($file->name) ?>">Download</a>
<a href="manage.php?id=<?= $f->integer($s->getId()) ?>&amp;rename=<?=
$f->htmlUrlPart($file->name) ?>">Rename</a>
<a href="manage.php?id=<?= $f->integer($s->getId()) ?>&amp;delete=<?=
$f->htmlUrlPart($file->name) ?>">Delete</a></td>
</tr>
<?php } ?>
</table>
<?php } ?>
 
<h2>Upload New Files</h2>
 
<form method=POST action="upload.php" enctype="multipart/form-data">
<input type=hidden name=id value="<?= $f->integer($s->getId()) ?>">
 
<table border=1>
<tr>
<td>File 1</td>
<td><input name="file[]" type=file></td>
</tr>
<tr>
<td>File 2</td>
<td><input name="file[]" type=file></td>
</tr>
<tr>
<td>File 3</td>
<td><input name="file[]" type=file></td>
</tr>
<tr>
<td>File 4</td>
<td><input name="file[]" type=file></td>
</tr>
</table>
 
<p><input type=submit name="upload" value="Upload"></p>
 
</form>
 
</body>
 
</html>