Exemple #1
0
<?php

include '../include.php';
url_query_require();
if (url_action('delete')) {
    db_delete('press_clips', $_GET['delete_id']);
    url_change('/press-clips/');
}
echo drawTop();
echo drawTableStart();
echo drawHeaderRow($page['breadcrumbs'] . $page['title'], 2, getString('edit'), 'edit/?id=' . $_GET['id'], getString('delete'), drawDeleteLink());
$r = db_grab('SELECT c.title' . langExt() . ' title, c.url, c.pub_date, c.publication' . langExtT() . ' publication, c.type_id, c.description' . langExt() . ' description, t.title' . langExt() . ' type FROM press_clips c JOIN press_clips_types t ON c.type_id = t.id WHERE c.id = ' . $_GET['id']);
?>
	<tr>
		<td class="left"><?php 
echo getString('title');
?>
</td>
		<td class='title'><?php 
echo $r['title'];
?>
</td>
	</tr>
	<tr>
		<td class="left"><?php 
echo getString('category');
?>
</td>
		<td><?php 
echo draw_link('categories.php?id=' . $r['type_id'], $r['type']);
?>
Exemple #2
0
function email_user($address, $title, $content, $colspan = 1)
{
    global $_josh;
    $message = drawEmailHeader() . drawTableStart() . drawHeaderRow($title, $colspan) . $content . drawTableEnd() . drawEmailFooter();
    $headers = "MIME-Version: 1.0\r\n";
    $headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
    $headers .= "From: " . $_josh["email_default"] . "\r\n";
    if (!mail($address, $title, $message, $headers)) {
        error_handle("Couldn't Send Email", "The message to " . $address . " was rejected by the mailserver for some reason", true);
    }
}