Example #1
0
<?php

require_once '_db.lost.php';
?>
<style type="text/css">
	.lost .content .post h3 {
		font-size: 12px;
		color: #777777;
		font-style: italic;
	}
</style>
<?php 
$lost_db = new LostDB();
$lost_items = $lost_db->getCurrentItems();
if (count($lost_items) > 0) {
    ?>
<div class="mason"><?php 
    foreach ($lost_items as $item) {
        echo $item;
    }
    ?>
</div><?php 
    $lost_script = <<<EOC
<script type="text/javascript">
\$('.lost .content .mason').masonry({
\titemSelector: 'div.post'
});
</script>
EOC;
    if (isset($GLOBALS['page'])) {
        $GLOBALS['page']->postJQueryScript .= $lost_script;
Example #2
0
<?php

require_once '_db.php';
require_once '_db.lost.php';
require_once '_functions.php';
$lost_db = new LostDB();
$ItemName = $_POST['ItemName'];
$Location = $_POST['Location'];
$Description = $_POST['Description'];
$Date = strtotime(date('Y') . '-' . $_POST['Date_Month'] . '-' . $_POST['Date_Day']);
if ($Date > strtotime('tomorrow')) {
    $Date = strtotime('-1 year', $Date);
}
$Date = date('Y-m-d', $Date);
$Email = IWU_Auth::getUser() . '@iwu.edu';
$ContactName = IWU_Auth::getAttribute('displayName');
if ($_POST['type'] == 'found') {
    $lost_db->addFoundItem(array('ItemName' => $ItemName, 'Location' => $Location, 'Description' => $Description, 'Date' => $Date, 'Email' => $Email, 'ContactName' => $ContactName));
} else {
    if ($_POST['type'] == 'lost') {
        $lost_db->addLostItem(array('ItemName' => $ItemName, 'Location' => $Location, 'Description' => $Description, 'Date' => $Date, 'Email' => $Email, 'ContactName' => $ContactName));
    }
}
header('Location: _channel.lost.php');