|
From: <be...@us...> - 2014-01-30 11:31:26
|
Revision: 12285
http://sourceforge.net/p/xoops/svn/12285
Author: beckmi
Date: 2014-01-30 11:31:16 +0000 (Thu, 30 Jan 2014)
Log Message:
-----------
Fixed bug with $_POST table (Montuy337513 alias black_beard), changed icons (Mamba)
Modified Paths:
--------------
XoopsModules/contact/trunk/contact/admin/menu.php
XoopsModules/contact/trunk/contact/docs/changelog.txt
XoopsModules/contact/trunk/contact/index.php
Modified: XoopsModules/contact/trunk/contact/admin/menu.php
===================================================================
--- XoopsModules/contact/trunk/contact/admin/menu.php 2014-01-30 11:19:28 UTC (rev 12284)
+++ XoopsModules/contact/trunk/contact/admin/menu.php 2014-01-30 11:31:16 UTC (rev 12285)
@@ -43,12 +43,12 @@
$adminmenu[$i]["title"] = _MI_CONTACT_MENU_LOGS;
$adminmenu[$i]["link"] = "admin/log.php";
$adminmenu[$i]["desc"] = _MI_CONTACT_MENU_LOGS_DESC;
-$adminmenu[$i]["icon"] = $pathIcon32 . '/exec.png';
+$adminmenu[$i]["icon"] = $pathIcon32 . '/identity.png';
$i++;
$adminmenu[$i]["title"] = _MI_CONTACT_MENU_TOOLS;
$adminmenu[$i]["link"] = "admin/tools.php";
$adminmenu[$i]["desc"] = _MI_CONTACT_MENU_TOOLS_DESC;
-$adminmenu[$i]["icon"] = $pathIcon32 . '/exec.png';
+$adminmenu[$i]["icon"] = $pathIcon32 . '/delete.png';
$i++;
$adminmenu[$i]["title"] = _MI_CONTACT_MENU_ABOUT;
$adminmenu[$i]["link"] = "admin/about.php";
Modified: XoopsModules/contact/trunk/contact/docs/changelog.txt
===================================================================
--- XoopsModules/contact/trunk/contact/docs/changelog.txt 2014-01-30 11:19:28 UTC (rev 12284)
+++ XoopsModules/contact/trunk/contact/docs/changelog.txt 2014-01-30 11:31:16 UTC (rev 12285)
@@ -7,6 +7,7 @@
- making Captcha optional for Anonymous/Registered users (mamba)
- Fixed an error when sending anonymous (mamba)
- Fixed an error when sending Captcha (Montuy337513 alias black_beard)
+- Fixed bug with $_POST table (Montuy337513 alias black_beard)
Version 1.80 from 2012-1-19
=================================
Modified: XoopsModules/contact/trunk/contact/index.php
===================================================================
--- XoopsModules/contact/trunk/contact/index.php 2014-01-30 11:19:28 UTC (rev 12284)
+++ XoopsModules/contact/trunk/contact/index.php 2014-01-30 11:31:16 UTC (rev 12285)
@@ -1,100 +1,100 @@
-<?php
-/*
- You may not change or alter any portion of this comment or credits
- of supporting developers from this source code or any supporting source code
- which is considered copyrighted (c) material of the original comment or credit authors.
-
- This program 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.
-*/
-
-/**
- * Contact module
- *
- * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
- * @license http://www.fsf.org/copyleft/gpl.html GNU public license
- * @author Kazumi Ono (aka Onokazu)
- * @author Trabis <lus...@gm...>
- * @author Hossein Azizabadi (AKA Voltan)
- * @version $Id$
- */
-
-include 'header.php';
-$xoopsOption['template_main'] = 'contact_index.html';
-
-include XOOPS_ROOT_PATH . "/header.php";
-
-global $xoopsConfig, $xoopsOption, $xoopsTpl, $xoopsUser, $xoopsUserIsAdmin, $xoopsLogger;
-
-$op = $contact_handler->Contact_CleanVars($_POST, 'op', 'form', 'string');
-$department = $contact_handler->Contact_CleanVars($_GET, 'department', '', 'string');
-
-switch ($op) {
- case 'form':
- default:
- $obj = $contact_handler->create();
- $form = $obj->Contact_ContactForm($department);
- $xoopsTpl->assign('form', $form->render());
- $xoopsTpl->assign('breadcrumb', '<a href="' . XOOPS_URL . '">' . _YOURHOME . '</a> » ' . $xoopsModule->name());
- $xoopsTpl->assign('info', xoops_getModuleOption('contact_info', 'contact'));
- break;
-
- case 'save':
-
-// if (empty($_POST['submit']) | !$GLOBALS['xoopsSecurity']->check()) { //mb
- if (empty($_POST['submit']) ) {
- redirect_header(XOOPS_URL, 3, _MD_CONTACT_MES_ERROR);
- exit();
- } else {
- // check captcha
- if ((!$xoopsUser && $xoopsModuleConfig['captchaAnonymous'])
- || ($xoopsUser && !$xoopsUserIsAdmin && $xoopsModuleConfig['captchaRegistered'])
- ) {
- // Verify entered code
- xoops_load('XoopsCaptcha');
- if (class_exists('XoopsFormCaptcha')) {
- $xoopsCaptcha = XoopsCaptcha::getInstance();
- if (!$xoopsCaptcha->verify()) {
- // $err[] = $xoopsCaptcha->getMessage();
- redirect_header("javascript:history.go(-1)", 1, $xoopsCaptcha->getMessage());
- exit();
- }
- }
- }
-
- // check email
- if (!$contact_handler->Contact_CleanVars($_POST, 'contact_mail', '', 'mail')) {
- redirect_header("javascript:history.go(-1)", 1, _MD_CONTACT_MES_NOVALIDEMAIL);
- exit();
- }
-
- // Info Processing
- $contact = $contact_handler->Contact_InfoProcessing($_POST);
-
- // insert in DB
- if ($saveinfo = true) {
- $obj = $contact_handler->create();
- $obj->setVars($contact);
- if (!$contact_handler->insert($obj)) {
- redirect_header("index.php", 3, _MD_CONTACT_MES_NOTSAVE);
- exit();
- }
- }
-
- // send mail can send message
- if ($sendmail = true) {
- $message = $contact_handler->Contact_SendMail($contact);
- } elseif ($saveinfo = true) {
- $message = _MD_CONTACT_MES_SAVEINDB;
- } else {
- $message = _MD_CONTACT_MES_SENDERROR;
- }
- redirect_header(XOOPS_URL, 3, $message);
- exit();
- }
-
- break;
-}
-
-include XOOPS_ROOT_PATH . "/footer.php";
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program 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.
+*/
+
+/**
+ * Contact module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license http://www.fsf.org/copyleft/gpl.html GNU public license
+ * @author Kazumi Ono (aka Onokazu)
+ * @author Trabis <lus...@gm...>
+ * @author Hossein Azizabadi (AKA Voltan)
+ * @version $Id$
+ */
+include 'header.php';
+$xoopsOption['template_main'] = 'contact_index.html';
+//unset($_SESSION);
+include XOOPS_ROOT_PATH . "/header.php";
+
+global $xoopsConfig, $xoopsOption, $xoopsTpl, $xoopsUser, $xoopsUserIsAdmin, $xoopsLogger;
+
+$op = $contact_handler->Contact_CleanVars($_POST, 'op', 'form', 'string');
+$department = $contact_handler->Contact_CleanVars($_GET, 'department', '', 'string');
+switch ($op) {
+ case 'save':
+
+// if (empty($_POST['submit']) | !$GLOBALS['xoopsSecurity']->check()) { //mb
+ if (empty($_POST['submit']) ) {
+ redirect_header(XOOPS_URL, 3, _MD_CONTACT_MES_ERROR);
+ exit();
+ } else {
+ // check captcha
+
+ if ((!$xoopsUser && $xoopsModuleConfig['captchaAnonymous'])
+ || ($xoopsUser && !$xoopsUserIsAdmin && $xoopsModuleConfig['captchaRegistered'])
+ ) {
+ // Verify entered code
+
+ xoops_load('XoopsCaptcha');
+ if (class_exists('XoopsFormCaptcha')) {
+ $xoopsCaptcha = XoopsCaptcha::getInstance();
+ if (!$xoopsCaptcha->verify()) {
+ $err[] = $xoopsCaptcha->getMessage();
+ redirect_header("index.php", 1, $xoopsCaptcha->getMessage());
+
+ exit();
+ }
+ }
+ }
+
+ // check email
+ if (!$contact_handler->Contact_CleanVars($_POST, 'contact_mail', '', 'mail')) {
+ redirect_header("index.php", 1, _MD_CONTACT_MES_NOVALIDEMAIL);
+ exit();
+ }
+
+ // Info Processing
+ $contact = $contact_handler->Contact_InfoProcessing($_POST);
+
+ // insert in DB
+ if ($saveinfo = true) {
+ $obj = $contact_handler->create();
+ $obj->setVars($contact);
+ if (!$contact_handler->insert($obj)) {
+ redirect_header("index.php", 3, _MD_CONTACT_MES_NOTSAVE);
+ exit();
+ }
+ }
+
+ // send mail can send message
+ if ($sendmail = true) {
+ $message = $contact_handler->Contact_SendMail($contact);
+ } elseif ($saveinfo = true) {
+ $message = _MD_CONTACT_MES_SAVEINDB;
+ } else {
+ $message = _MD_CONTACT_MES_SENDERROR;
+ }
+ redirect_header(XOOPS_URL, 3, $message);
+ exit();
+ }
+
+ break;
+ case 'form';
+ default:
+ $obj = $contact_handler->create();
+ $form = $obj->Contact_ContactForm($department);
+ $xoopsTpl->assign('form', $form->render());
+ $xoopsTpl->assign('breadcrumb', '<a href="' . XOOPS_URL . '">' . _YOURHOME . '</a> » ' . $xoopsModule->name());
+ $xoopsTpl->assign('info', xoops_getModuleOption('contact_info', 'contact'));
+ break;
+}
+
+include XOOPS_ROOT_PATH . "/footer.php";
|