Location: PHPKode > projects > MiniBB > bb_func_unsub.php
This file is part of miniBB. miniBB is free discussion forums/message board software, without any warranty. See COPYING file for more details. Copyright (C) 2011 Paul Puzyrev. www.minibb.com
Latest File Update: 2011-Mar-02
if (!defined('INCLUDED776')) die ('Fatal error.');



if(isset($_GET['code']) and preg_match("#[a-zA-Z0-9]+#", $_GET['code'])){
//trying to unsubscribe directly from email
//manual unsubsribe

if ($topic!=0 and $usrid>0 and $userCondition and $ids=db_simpleSelect(0, $Ts, 'id, user_id', 'topic_id', '=', $topic, '', '', $chkField, '=', $chkVal)) {

$finalAllow=( ($chkCode and $ids[1]==$usrid) OR (!$chkCode and $user_id==$usrid) );

if($finalAllow) $op=db_delete($Ts,'id','=',$ids[0]);

if ($op>0) {
$errorMSG=$l_completed; $title.=$l_completed;

else {
$title.=$l_itseemserror; $errorMSG=$l_itseemserror;

else {
$title.=$l_forbidden; $errorMSG=$l_accessDenied;

echo load_header(); echo ParseTpl(makeUp('main_warning')); return;
Return current item: MiniBB