// All rights reserved. This script is part of PHPWCMS. The PHPWCMS web content management system is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. The GNU General Public License can be found at http://www.gnu.org/copyleft/gpl.html A copy is found in the textfile GPL.txt and important notices to the license from the author is found in LICENSE.txt distributed with these scripts. This script is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. This copyright notice MUST APPEAR in all copies of the script! *************************************************************************************/ // session_name('hashID'); session_start(); $phpwcms = array(); $ref = $_SESSION['REFERER_URL']; require_once ('../../config/phpwcms/conf.inc.php'); require_once ('../inc_lib/default.inc.php'); require_once (PHPWCMS_ROOT.'/include/inc_lib/dbcon.inc.php'); require_once (PHPWCMS_ROOT.'/include/inc_lib/general.inc.php'); checkLogin(); require_once (PHPWCMS_ROOT.'/include/inc_lib/backend.functions.inc.php'); if(isset($_GET['del']) && intval($_GET['del'])) { $sql = "UPDATE ".DB_PREPEND."phpwcms_guestbook SET "; $sql .= "guestbook_trashed=9 WHERE guestbook_cid="; $sql .= intval($_GET['cid'])." AND guestbook_id=".intval($_GET['del']); $sql .= " LIMIT 1;"; mysql_query($sql, $db); } if(isset($_GET['edit']) && intval($_GET['edit'])) { $gberror = ''; if(isset($_POST['gbsubmit'])) { $gbemail = clean_slweg(remove_unsecure_rptags($_POST['gbemail'])); $gbname = clean_slweg(remove_unsecure_rptags($_POST['gbname'])); $gburl = clean_slweg(remove_unsecure_rptags($_POST['gburl'])); $gbmsg = clean_slweg(remove_unsecure_rptags($_POST['gbmsg'])); $gbshow = intval($_POST['gbshow']); if($gbshow > 2) $gbshow = 0; $gbid = intval($_POST['gbid']); $gbcid = intval($_POST['gbcid']); if(!$gbemail || !$gbname) { $gberror = 'Old values recovered - no changes made'; } if(!$gberror) { $sql = "UPDATE ".DB_PREPEND."phpwcms_guestbook SET "; $sql .= "guestbook_msg='".aporeplace($gbmsg)."', "; $sql .= "guestbook_name='".aporeplace($gbname)."', "; $sql .= "guestbook_email='".aporeplace($gbemail)."', "; $sql .= "guestbook_url='".aporeplace($gburl)."', "; $sql .= "guestbook_show='".$gbshow."' WHERE "; $sql .= "guestbook_cid='".$gbcid."' AND guestbook_id='".$gbid."' LIMIT 1;"; mysql_query($sql, $db); } } $edit_ID = ' AND guestbook_id='.intval($_GET['edit']); } else { $edit_ID = ''; } ?> phpwcms Backend Guestbook
'.$row['guestbook_ip'].' | WHOIS' ?> edit guestbook entrydelete entry
'.htmlspecialchars($row['guestbook_email']).''; if($row['guestbook_url']) { echo ' (URL)'; } if($row['guestbook_msg']) { echo '
'.nl2br(htmlspecialchars($row['guestbook_msg'])); } ?>
[close]
'.$row['guestbook_ip'].' | WHOIS' ?>
error: 
name: 
email: 
URL: 
msg: 
display:  /> show email   />hide email
/>show email as "info at mail dot com"
No guestbook entry available