Subversion Repositories general

Compare Revisions

Ignore whitespace Rev 1285 → Rev 1286

/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>