Example #1
0
/**
 * Writes out the details and comments of a list item
 *
 * @param unknown_type $item_id
 * @param unknown_type $lid
 */
function writeListItem($item_id, $lid, &$application)
{
    $sql = "SELECT I.*, U.* FROM ListItems AS I, Users AS U WHERE U.UserID=I.ListItemOwner AND " . "ListItemID={$item_id}";
    $rs = mysql_query($sql) or die("ERROR: " . mysql_error() . "<br>SQL: " . $sql . "<br>");
    $row = mysql_fetch_array($rs);
    echo "<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" width=\"100%\">" . "<tr>" . "<td width=\"90\" rowspan=\"2\" class=\"oddCell\" align=\"center\" valign=\"top\">" . "<img src=\"/images/signatures/" . $row["ListItemOwner"] . ".sig\">" . "<br><span class=\"smallBlueText\">" . date("m/d/Y h:i a", strtotime($row["CreatedDate"])) . "</span>";
    if ($application->getTopTimeWaster() == $row["ListItemOwner"]) {
        echo "<div align=\"center\"><img src=\"images/top_waster.gif\"></div>\t";
    }
    echo "</td>" . "<td class=\"oddCell\">" . $row["ListItemText"] . "</td>" . "</tr>";
    //echo "<tr><td>";	//print_r ($row);	//echo "</td></tr>";
    if ($row["ListItemFile"] !== "") {
        echo "<tr>" . "<td class=\"oddCell\">";
        $ftype = $row["ListItemFile"];
        $ftype = strtoupper($ftype);
        if ($ftype == "JPG" || $ftype == "JPEG" || $ftype == "GIF" || $ftype == "BMP") {
            echo "<img width=\"500\" src=\"" . getListItemsDir() . "/" . $row["ListID"] . "/" . $row["ListItemID"] . "." . $row["ListItemFile"] . "\">";
        } else {
            echo "<a class=\"blueLink\" href=\"/misc/listitems/" . $row["ListID"] . "/" . $row["ListItemID"] . "." . $row["ListItemFile"] . "\">" . $row["ListItemText"] . "</a>";
        }
        "</td>" . "</tr>";
    } else {
        if ($row["ListItemURL"] !== "") {
            echo "<tr>" . "<td class=\"oddCell\">" . "<a target=\"_blank\" class=\"blueLink\" href=\"" . $row["ListItemURL"] . "\">" . $row["ListItemText"] . "</a>" . "</td>" . "</tr>";
        }
    }
    echo "</table>";
}
Example #2
0
?>
" class="boldWhiteLink">
					<?php 
echo substr($curr_list->listTitle, 0, 30);
?>
				</a>
				&nbsp;&gt;&gt;&nbsp;List Item
			</span>
		</td>
		<td width="25"><img border="0" height="32" width="25" src="images/section.header.e.gif"></td>
	</tr>
	<tr>
		<td></td>
		<td align="center">
			<?php 
WriteListItem($item_id, getListItemsDir(), $application);
?>
		</td>
		<td></td>
	</tr>
	<tr><td colspan="3"><br></td></tr>


	<tr>
		<td width="25" background="images/section.header.bg.gif"><img height="32" width="25" src="images/section.header.w.gif"></td>
		<td width="700" background="images/section.header.bg.gif">
			<table border="0" cellpadding="0" cellspacing="0" width="100%">
				<tr>
					<td>
						<span class="sectionHeader">
							<a href="lists.php" class="boldWhiteLink">All lists</a>