?> </th> <th data-sort="int" class="sorting-desc"><?php echo T_("Date"); ?> </th> <th data-sort="int"><?php echo T_("Expiration"); ?> </th> </tr> </thead> <tbody> <?php foreach ($db->query($sql) as $DATA) { if (isGrantExpired($DATA)) { continue; } $our = $DATA["user_id"] == $auth["id"]; $class = "file expanded " . $DATA['id']; if ($our) { $class .= " our"; } echo "<tr class=\"{$class}\">"; // selection echo "<td><input class=\"element checkbox\" type=\"checkbox\" name=\"sel[]\" value=\"" . $DATA['id'] . "\"/></td>"; // upload echo '<td><a href="' . grantUrl($DATA) . '">' . '<img title="' . T_("Upload") . "\" src=\"{$style}/static/upload.png\"/></a></td>"; // delete echo "<td><a href=\"" . pageLinkAct(array('purge' => null, 'sel' => $DATA['id'])) . "\">" . "<img title=\"" . T_("Purge") . "\" src=\"{$style}/static/cross.png\"/></a></td>"; // name
<?php // process a grant require_once "grantfuncs.php"; // try to fetch the grant $id = $_REQUEST["g"]; if (!isGrantId($id)) { $id = false; $GRANT = false; } else { $sql = "SELECT * FROM \"grant\" WHERE id = " . $db->quote($id); $GRANT = $db->query($sql)->fetch(); } $ref = "{$masterPath}?g={$id}"; if ($GRANT === false || isGrantExpired($GRANT)) { includeTemplate("{$style}/include/nogrant.php", array('id' => $id)); exit; } if (hasPassHash($GRANT) && !isset($_SESSION['g'][$id])) { if (!empty($_POST['p']) && checkPassHash('"grant"', $GRANT, $_POST['p'])) { // authorize the grant for this session $_SESSION['g'][$id] = array('pass' => $_POST["p"]); } else { include "grantp.php"; exit; } } // upload handler function failUpload($file) { unlink($file);