<?php require_once "pages.php"; $act = false; pageHeader(array('title' => T_("Upload result"))); // final url msgTicketCreate($DATA, $subject, $body); $url = ticketUrl($DATA); $mailto = "mailto:?subject=" . rawurlencode($subject) . "&body=" . rawurlencode($body); ?> <div> <label class="description"> <?php printf(T_("Your ticket %s"), htmlEntUTF8(ticketStr($DATA))); ?> </label> <p><span class="ticketid"><?php echo htmlentities($url); ?> </span></p> <?php if ($DATA['pass']) { echo "<p>" . T_("The required password is:") . " <tt>" . htmlEntUTF8($DATA['pass']) . "</tt></p>"; } if ($DATA['sent_email']) { echo "<p>" . T_("A download link has been sent to:") . " "; $addrs = getEMailAddrs($DATA['sent_email']); foreach ($addrs as &$addr) { $addr = '<a href="mailto:' . urlencode($addr) . '">' . htmlentities($addr) . '</a>'; }
function msgTicketExpire($DATA, &$subject, &$body) { global $masterPath; $subject = sprintf(T_("[dl] ticket %s purge notification"), ticketStr($DATA)); $body = sprintf(T_("The ticket %s expired automatically after %d downloads from %s"), ticketStr($DATA), $DATA["downloads"], $masterPath); }
function logTicketEvent($DATA, $logLine, $logType = LOG_INFO) { logEvent('t/' . ticketStr($DATA) . ": {$logLine}", $logType); }
$sel =& $_REQUEST["sel"]; if (!is_array($sel)) { $sel = array($sel); } // purge immediately foreach ($sel as $id) { if (!isTicketId($id)) { continue; } $sql = "SELECT * FROM ticket WHERE id = " . $db->quote($id); $DATA = $db->query($sql)->fetch(); if ($DATA === false) { continue; } // actually purge the ticket $list[] = htmlEntUTF8(ticketStr($DATA)); ticketPurge($DATA, false); } if (count($list)) { infoMessage(T_("Purged"), $list); } } // list active tickets $totalSize = 0; $sql = 'SELECT t.*, u.name AS "user" FROM ticket t' . ' LEFT JOIN "user" u ON u.id = t.user_id' . ' ORDER BY time DESC'; ?> <form action="<?php echo $ref; ?> " method="post"> <table class="sortable" id="alltickets">