function email_build_note_message($p_note_id, &$subject, &$content) { $note = note_get_info(note_where_id_equals($p_note_id)); if ($note === false) { return false; } extract($note, EXTR_PREFIX_ALL, 'note'); $page = page_get_info(page_where_id_equals($note_page_id)); if ($page === false) { return false; } extract($page, EXTR_PREFIX_ALL, 'page'); $subject = "[{$page_page}] {$note_email}"; $content = ''; $content .= str_pad('', 70, '=') . "\n"; $content .= 'http://' . $_SERVER['SERVER_ADDR'] . $page_url . "\n"; $content .= str_pad('', 70, '-') . "\n"; $content .= "Note Id: {$note_id}\n"; $content .= "Email: {$note_email}\n"; $content .= "IP: {$note_ip}\n"; $content .= "Date Submitted: " . date('d-M-Y H:i:s', $note_date_submitted) . "\n"; $content .= "Visible: " . ($note_visible ? "Yes" : "No") . "\n"; $content .= str_pad('', 70, '-') . "\n"; $content .= $note_note . "\n"; $content .= str_pad('', 70, '=') . "\n"; return true; }
# Copyright (C) 2000-2002 Webnotes Team - webnotes-devel@sourceforge.net # This program is distributed under the terms and conditions of the GPL # See the files README and LICENSE for details # -------------------------------------------------------- # $Id: action.php,v 1.11 2002/10/06 15:23:36 vboctor Exp $ # -------------------------------------------------------- require_once 'core' . DIRECTORY_SEPARATOR . 'api.php'; login_cookie_check(); if (!isset($f_action)) { echo 'f_action not defined<br />'; exit; } # @@@@ add handling for confirm? # The access level check is done in the APIs if (isset($f_note_id)) { $t_note_info = note_get_info(note_where_id_equals($f_note_id)); if (false === $t_note_info) { echo "note not found"; exit; } $t_page_info = page_get_info(page_where_id_equals($t_note_info['page_id'])); if (false === $t_page_info) { echo "page not found"; exit; } $t_url = $t_page_info['url']; if ('accept' === $f_action) { note_accept($f_note_id); } else { if ('decline' === $f_action) { note_decline($f_note_id);
function note_get_page_id($p_note_id) { $t_note_info = note_get_info(note_where_id_equals($p_note_id)); if (false === $t_note_info) { return false; } return $t_note_info['page_id']; }