{ $apt->errmsg(LANG_ERROR_VALID_EMIAL); } @extract($HTTP_POST_VARS); $email = $apt->format_data($apt->post['email']); $result = $apt->query("SELECT * FROM rafia_email WHERE email ='$email'"); if ($apt->dbnumrows($result) < 1){ $email = $apt->format_data($apt->post['email']); $result = $apt->query("insert into rafia_email (email) values ('$email')"); if ($result) { $apt->bodymsg(LANG_MSG_ADDEMAIL_OK,"index.php"); } else { $apt->bodymsg(LANG_ERROR_ADD_DB,"index.php"); } } else { $apt->bodymsg(LANG_ERROR_EMIAL_EXISTED,"index.php"); } } elseif($posttybe=="delete") { @extract($HTTP_POST_VARS); if (!$apt->check_email($apt->post['email'])) { $apt->errmsg(LANG_ERROR_VALID_EMIAL); } $email = $apt->format_data($apt->post['email']); $result = $apt->query("SELECT * FROM rafia_email WHERE email ='$email'"); if ($apt->dbnumrows($result) < 1) { $apt->bodymsg(LANG_ERROR_VALID_EMIAL,"index.php"); } else { $result = $apt->query("delete from rafia_email where email='$email'"); if ($result) { $apt->bodymsg(LANG_MSG_DELEMAIL_OK,"index.php"); } else { $apt->bodymsg(LANG_ERROR_ADD_DB,"index.php"); } } } } else if($apt->get['action']=="send") { @extract($HTTP_POST_VARS); if (!$apt->full($HTTP_POST_VARS)) { $apt->errmsg(LANG_ERROR_VALIDATE); } if (!$apt->check_email($apt->post['tomail'])) { $apt->errmsg(LANG_ERROR_VALID_EMIAL); } if (!$apt->check_email($apt->post['fromail'])) { $apt->errmsg(LANG_ERROR_VALID_EMIAL); } $mail = new email; $mail->send($tomail,@constant($apt->getsettings("sendpage")),$message,$fromname,$fromail,0); $apt->bodymsg($lang_form['41'],"index.php"); } else if($apt->get['action']=="sendreport") { @extract($HTTP_POST_VARS); if (!$apt->full($HTTP_POST_VARS)){ $apt->errmsg(LANG_ERROR_VALIDATE); } $fromname = $apt->format_post($apt->post[fromname]); $message = $apt->format_post($apt->post[message]); $replace = array( "{name}" => $fromname, "{url}" => $apt->getsettings("siteURL")."forum.php?action=view&id=$uid#comment$comment", "{message}" => $message, "{sitetitle}" => $apt->getsettings("sitetitle")); eval ("\$allmessage = \"".$apt->getmessage("msg_report",0,$replace)."\";"); $mail = new email;