View Single Post
  #12  
Old 10-01-2004, 05:25 AM
 
cotc2001 cotc2001 is offline
 

X-Man
  
Join Date: Feb 2003
Location: Shrewsbury, UK
Posts: 2,351
 

Default

sure no problem this is from 3.5.10

Code:
<?php /*****************************************************************************\ +-----------------------------------------------------------------------------+ | X-Cart | | Copyright (c) 2001-2004 Ruslan R. Fazliev <rrf@rrf.ru> | | All rights reserved. | +-----------------------------------------------------------------------------+ | PLEASE READ THE FULL TEXT OF SOFTWARE LICENSE AGREEMENT IN THE "COPYRIGHT" | | FILE PROVIDED WITH THIS DISTRIBUTION. THE AGREEMENT TEXT IS ALSO AVAILABLE | | AT THE FOLLOWING URL: http://www.x-cart.com/license.php | | | | THIS AGREEMENT EXPRESSES THE TERMS AND CONDITIONS ON WHICH YOU MAY USE | | THIS SOFTWARE PROGRAM AND ASSOCIATED DOCUMENTATION THAT RUSLAN R. | | FAZLIEV (hereinafter referred to as "THE AUTHOR") IS FURNISHING OR MAKING | | AVAILABLE TO YOU WITH THIS AGREEMENT (COLLECTIVELY, THE "SOFTWARE"). | | PLEASE REVIEW THE TERMS AND CONDITIONS OF THIS LICENSE AGREEMENT | | CAREFULLY BEFORE INSTALLING OR USING THE SOFTWARE. BY INSTALLING, | | COPYING OR OTHERWISE USING THE SOFTWARE, YOU AND YOUR COMPANY | | (COLLECTIVELY, "YOU") ARE ACCEPTING AND AGREEING TO THE TERMS OF THIS | | LICENSE AGREEMENT. IF YOU ARE NOT WILLING TO BE BOUND BY THIS | | AGREEMENT, DO NOT INSTALL OR USE THE SOFTWARE. VARIOUS COPYRIGHTS AND | | OTHER INTELLECTUAL PROPERTY RIGHTS PROTECT THE SOFTWARE. THIS | | AGREEMENT IS A LICENSE AGREEMENT THAT GIVES YOU LIMITED RIGHTS TO USE | | THE SOFTWARE AND NOT AN AGREEMENT FOR SALE OR FOR TRANSFER OF TITLE.| | THE AUTHOR RETAINS ALL RIGHTS NOT EXPRESSLY GRANTED BY THIS AGREEMENT. | | | | The Initial Developer of the Original Code is Ruslan R. Fazliev | | Portions created by Ruslan R. Fazliev are Copyright (C) 2001-2004 | | Ruslan R. Fazliev. All Rights Reserved. | +-----------------------------------------------------------------------------+ \*****************************************************************************/ # # $Id: help.php,v 1.33.2.1 2004/02/05 12:25:46 mclap Exp $ # if ( !defined('XCART_SESSION_START') ) { header("Location: ../"); die("Access denied"); } if (!empty($login)) $userinfo = func_userinfo($login,$login_type); if (empty($section)) $section = ""; if ($REQUEST_METHOD=="POST" and $action=="contactus") { # # Send mail to support # $HTTP_POST_VARS["body"] = stripslashes($HTTP_POST_VARS["body"]); while (list($key,$val) = each($HTTP_POST_VARS)) $contact[$key]=$val; $fillerror = (empty($contact["firstname"]) || empty($contact["lastname"]) || empty($contact["b_address"]) || empty($contact["b_city"]) || empty($contact["b_country"]) || empty($contact["b_zipcode"]) || empty($contact["phone"]) || empty($contact["email"]) || empty($contact["subject"]) || empty($contact["body"])); if(!$fillerror) { $contact["b_statename"]= func_get_state($contact["b_state"], $contact["b_country"]); $contact["b_countryname"]= func_get_country($contact["b_country"]); $mail_smarty->assign("contact",$contact); func_send_mail($config["Company"]["support_department"], "mail/help_contactus_subj.tpl", "mail/help_contactus.tpl", $contact["email"], true); func_header_location("help.php?section=contactus"); } else { $userinfo = $HTTP_POST_VARS; $userinfo["login"] = $userinfo["uname"]; } } # # Recover password # if ($REQUEST_METHOD=="POST" and $action=="recover_password") { $accounts = func_query("select login, password, usertype from $sql_tbl[customers] where email='$email' and status='Y'"); # # Decrypt passwords # if($accounts) { foreach($accounts as $key=>$account) $accounts[$key]["password"]=text_decrypt($accounts[$key]["password"]); $mail_smarty->assign("accounts",$accounts); func_send_mail($email, "mail/password_recover_subj.tpl", "mail/password_recover.tpl", $config["Company"]["support_department"], false); func_header_location("help.php?section=Password_Recovery_message&email=".urlencode($email)); } else func_header_location("help.php?section=Password_Recovery_error&email=".urlencode($email)); } if ($section=="contactus") { include $xcart_dir."/include/states.php"; include $xcart_dir."/include/countries.php"; } $smarty->assign("userinfo",@$userinfo); $smarty->assign("fillerror",@$fillerror); $smarty->assign("main","help"); $smarty->assign("help_section",$section); ?>

and for reference this is from 3.3.3 which i know for a fact worls as it should

Code:
<? /*****************************************************************************\ +-----------------------------------------------------------------------------+ | X-Cart | | Copyright (c) 2001-2002 Ruslan R. Fazliev. All rights reserved. | +-----------------------------------------------------------------------------+ | The Ruslan R. Fazliev forbids, under any circumstances, the unauthorized | | reproduction of software or use of illegally obtained software. Making | | illegal copies of software is prohibited. Individuals who violate copyright | | law and software licensing agreements may be subject to criminal or civil | | action by the owner of the copyright. | | | | 1. It is illegal to copy a software, and install that single program for | | simultaneous use on multiple machines. | | | | 2. Unauthorized copies of software may not be used in any way. This applies | | even though you yourself may not have made the illegal copy. | | | | 3. Purchase of the appropriate number of copies of a software is necessary | | for maintaining legal status. | | | | DISCLAIMER | | | | THIS SOFTWARE IS PROVIDED BY Ruslan R. Fazliev ``AS IS'' AND ANY | | EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | | DISCLAIMED. IN NO EVENT SHALL Ruslan R. Fazliev OR ITS | | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; | | OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | | OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF | | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | | | | The Initial Developer of the Original Code is Ruslan R. Fazliev. | | Portions created by Ruslan R. Fazliev are Copyright (C) 2001-2002 | | Ruslan R. Fazliev. All Rights Reserved. | +-----------------------------------------------------------------------------+ \*****************************************************************************/ # # $Id: help.php,v 1.26 2002/11/14 07:58:19 zorg Exp $ # $userinfo = func_userinfo($login,$login_type); if ($REQUEST_METHOD=="POST" and $action=="contactus") { # # Send mail to support # $HTTP_POST_VARS["body"] = stripslashes($HTTP_POST_VARS["body"]); while (list($key,$val) = each($HTTP_POST_VARS)) $contact[$key]=$val; $fillerror = (empty($contact["firstname"]) || empty($contact["lastname"]) || empty($contact["b_address"]) || empty($contact["b_city"]) || empty($contact["b_country"]) || empty($contact["b_zipcode"]) || empty($contact["phone"]) || empty($contact["email"]) || empty($contact["subject"]) || empty($contact["body"])); if(!$fillerror) { $contact["b_statename"]= array_pop(func_query_first("SELECT $sql_tbl[states].state FROM $sql_tbl[customers], $sql_tbl[states] WHERE $sql_tbl[states].code='$contact[b_state]'")); $contact["b_countryname"]= array_pop(func_query_first("SELECT $sql_tbl[countries].country FROM $sql_tbl[customers], $sql_tbl[countries] WHERE $sql_tbl[countries].code='$contact[b_country]'")); $mail_smarty->assign("contact",$contact); func_send_mail($config["Company"]["support_department"], "mail/help_contactus_subj.tpl", "mail/help_contactus.tpl", $contact["email"], true); header("Location: help.php?section=contactus"); exit; } else { $userinfo = $HTTP_POST_VARS; $userinfo["login"] = $userinfo["uname"]; } } # # Recover password # if ($REQUEST_METHOD=="POST" and $action=="recover_password") { $accounts = func_query("select login, password, usertype from $sql_tbl[customers] where email='$email' and status='Y'"); # # Decrypt passwords # if($accounts) { foreach($accounts as $key=>$account) $accounts[$key]["password"]=text_decrypt($accounts[$key]["password"]); $mail_smarty->assign("accounts",$accounts); func_send_mail($email, "mail/password_recover_subj.tpl", "mail/password_recover.tpl", $config["Company"]["support_department"], false); header("Location: help.php?section=Password_Recovery_message&email=".urlencode($email)); } else header("Location: help.php?section=Password_Recovery_error&email=".urlencode($email)); } require "../include/states.php"; require "../include/countries.php"; $smarty->assign("userinfo",$userinfo); $smarty->assign("fillerror",$fillerror); $smarty->assign("main","help"); $smarty->assign("help_section",$section); ?>
__________________
x-cart 4.0.5 (live and heavily modded)
Server: freebsd
Reply With Quote