Example #1
0
File: hooks.php Project: dg-wfk/dl
function onGrantCreate($DATA)
{
    global $fromAddr;
    // log
    $type = !$DATA["expire"] ? "permanent" : "temporary";
    logGrantEvent($DATA, "{$type} grant created");
    // send emails to recipient
    foreach (getEMailAddrs($DATA['sent_email']) as $email) {
        logGrantEvent($DATA, "sending link to {$email}");
        // please note that address splitting is performed to avoid
        // disclosing the recipient list (not normally needed)
        withLocale($DATA['locale'], 'msgGrantCreate', array($DATA, &$subject, &$body));
        mailUTF8($email, $subject, $body, "From: {$fromAddr}");
    }
}
Example #2
0
  <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>';
    }
    echo join(', ', $addrs);
    echo '</p>';
}
?>
</div>

<span class="buttons">
  <input type="button" onclick="document.location='<?php 
echo htmlentities($mailto);
?>
';" value="<?php 
echo T_("Send via e-mail");
Example #3
0
if ($DATA["user_id"] != $auth["id"]) {
    $sql = 'SELECT name FROM "user"' . " WHERE id = " . $db->quote($DATA["user_id"]);
    $user = $db->query($sql)->fetch();
    $details[T_('Created by')] = htmlEntUTF8($user["name"]);
}
$details[T_('File size')] = humanSize($DATA["size"]);
$details[T_('Download link')] = "<a class=\"ticketid\" href=\"{$ticketUrl}\">" . htmlEntUTF8($ticketUrl) . "</a>";
// downloads
if ($DATA["downloads"]) {
    $details[T_("Download count")] = $DATA["downloads"];
    $details[T_("Last download")] = date($dateFmtFull, $DATA["last_stamp"]);
}
// sent-to
if ($DATA["sent_email"]) {
    $addrs = array();
    foreach (getEMailAddrs($DATA['sent_email']) as $email) {
        $addrs[] = '<a href="mailto:' . urlencode($email) . '">' . htmlEntUTF8($email) . '</a>';
    }
    $details[T_("Initially sent to")] = implode(", ", $addrs);
}
infoTable($details);
?>

<form enctype="multipart/form-data" method="post"
      onsubmit="validate(event);" action="<?php 
echo $ref;
?>
" >
  <ul>
    <li>
      <?php