Пример #1
0
$id = $_GET['id'];
$data = db_query("SELECT * FROM LikeBack WHERE id={$id} LIMIT 1");
$comment = db_fetch_object($data);
if (!$comment) {
    //header("Location: view.php?useSessionFilter=true");
    echo "<script>window.location = 'view.php?useSessionFilter=true'</script>";
    exit;
}
?>
  <div class="subBar <?php 
echo $comment->type;
?>
">
   <a href="view.php?useSessionFilter=true"><img src="icons/gohome.png" width="32" height="32" alt=""></a> &nbsp; &nbsp;
   <strong><?php 
echo iconForType($comment->type) . " #{$comment->id}";
?>
</strong> &nbsp; &nbsp; <?php 
echo $comment->date . "\n";
?>
  </div>
<?php 
if (isset($_POST['newRemark'])) {
    db_query("INSERT INTO LikeBackRemarks(dateTime, developer, commentId, remark) " . "VALUES('" . get_iso_8601_date(time()) . "', " . "'{$developer->id}', " . "'{$id}', " . "'" . addslashes($_POST['newRemark']) . "')");
}
?>

<?php 
$email = htmlentities($comment->email, ENT_QUOTES, "UTF-8");
if (!empty($email)) {
    $email = "<a href=\"mailto:{$email}?subject=Your%20{$comment->type}%20Comment\">{$email}</a>";
Пример #2
0
echo "      <th>Comment</th>\n";
echo "      <th>&nbsp;</th>\n";
echo "     </tr>\n";
echo "    </thead>\n";
echo "    <tbody>\n";
$commentCount = 0;
while ($line = db_fetch_object($data)) {
    $commentCount++;
    if (empty($line->email)) {
        $emailCell = "";
    } else {
        $email = htmlentities($line->email, ENT_QUOTES, "UTF-8");
        $emailCell = "<img src=\"icons/email.png\" width=\"16\" height=\"16\" title=\"{$email}\" />";
        $emailCell = "<a href=\"mailto:{$email}?subject=Your%20{$line->type}%20Comment\">{$emailCell}</a>";
    }
    $typeCell = iconForType($line->type);
    $date = split(" ", $line->date);
    $dateCell = "<div title=\"{$date['0']}, at {$date['1']}\"><nobr>{$date['0']}</nobr></div>";
    $window = htmlentities($line->window, ENT_QUOTES, "UTF-8");
    $lastSeparation = strrpos($window, "~~");
    if ($lastSeparation === false) {
        $windowCell = "<div title=\"{$window}\"><nobr>{$window}</nobr></div>";
    } else {
        $lastWindow = substr($window, $lastSeparation + 1);
        $windowCell = "<div title=\"{$window}\"><nobr>...{$lastWindow}</nobr></div>";
    }
    $id = $line->id;
    if ($line->status == "New") {
        $statusCell = "<img src=\"icons/new.png\"       id=\"status_comment_{$id}\" width=\"16\" height=\"16\" title=\"New\" />";
    } else {
        if ($line->status == "Confirmed") {