Merge branch 'master' of gitlab.antadis.fr:dev-antadis/bebeboutik

This commit is contained in:
Thibault GUILLAUME 2016-02-24 16:28:25 +01:00
commit 56f10467f8
23 changed files with 606 additions and 212 deletions

1
.gitignore vendored
View File

@ -41,6 +41,7 @@ tools/smarty*/cache/*.php
#### CONFIG ####
config/settings.*.php
config/config.inc.php
config/xml/*.xml
config/settings.inc.php
config/settings.old.php

View File

@ -604,6 +604,12 @@ class AdminImport extends AdminTab
// && $info['weight'] != "0") {
// $product->weight = 0.2;
// }
$iso_lang = trim(Tools::getValue('iso_lang'));
if ($iso_lang == 'fr') {
if (empty($info['weight']) && $info['weight'] != "0") {
$product->weight = 0.2;
}
}
if ((int)$product->id_tax_rules_group != 0)
{

View File

@ -178,7 +178,7 @@ class AdminProducts extends AdminTab
*/
public function postProcess($token = null)
{
if(Tools::isSubmit('editProduct')){
if (Tools::isSubmit('editProduct')) {
global $cookie, $currentIndex;
$products = Tools::getValue('productBox');
$id_lang_fast = Tools::getValue('id_lang_fast');
@ -188,10 +188,10 @@ class AdminProducts extends AdminTab
Tools::redirectAdmin($redirect . "&id_product=". json_encode($products)."&id_lang_fast=".(int) $id_lang_fast."&token=". $token_redirect);
}
if(Tools::isSubmit('addCategoryProduct')){
if (Tools::isSubmit('addCategoryProduct')) {
global $cookie, $currentIndex;
$id_category = Tools::getValue('id_category');
$id_category = Tools::getValue('id_category');
$products = Tools::getValue('productBox');
$id_category_paste = Tools::getValue('id_category_paste');
$keep_category = Tools::getValue('keep_category');
@ -209,11 +209,19 @@ class AdminProducts extends AdminTab
}
}
$sale = false;
foreach ($products as $key => $product) {
if (Validate::isLoadedObject($product = new Product((int)$product ) ))
{
// adding - ticket #8267
if (!$sale) {
include_once(_PS_ROOT_DIR_.'/modules/privatesales/Sale.php');
$sale = Sale::getSaleFromCategory((int) $id_category);
}
if($keep_category == 1){
Db::getInstance()->delete( _DB_PREFIX_.'category_product', 'id_product = ' . $product->id);
/*Db::getInstance()->delete( _DB_PREFIX_.'category_product', 'id_product = ' . $product->id);*/
Db::getInstance()->delete( _DB_PREFIX_.'category_product', 'id_product = ' . $product->id . ' AND id_category != ' . $sale->id_category);
}
$categories_product = $product->getCategories();
@ -1665,16 +1673,17 @@ class AdminProducts extends AdminTab
<input style="margin:2px" type="radio" id="keep_category_yes" name="keep_category" value="1" >
</p>
<div class="clear"></div>
';
';
echo '<h3>Choisir la catégorie à associer :</h3>';
if ($array_categories['id_category'] != $id_category) {
// adding comment - ticket #8267
/*if ($array_categories['id_category'] != $id_category) {
echo '<input type="checkbox" id="cat_'. $array_categories['id_category'] .'" name="id_category_paste[]" value="'. $array_categories['id_category'] .'">';
echo ' <label for="cat_'. $array_categories['id_category'] .'" style="font-weight:normal; float:none">' . $array_categories['name'] . '</label>';
} else {
echo '<input type="checkbox" id="cat_'. $array_categories['id_category'] .'" name="id_category_paste[]" checked value="'. $array_categories['id_category'] .'">';
echo ' <label for="cat_'. $array_categories['id_category'] .'" style="font-weight:normal; float:none">' . $array_categories['name'] . '</label>';
}
}*/
if ($array_categories['childrens']) {
foreach ($array_categories['childrens'] as $key => $catchild) {
@ -1699,7 +1708,9 @@ class AdminProducts extends AdminTab
}
}
}
}
}/*else {
echo '<p> Il n\'y a pas de sous catégorie</p>';
}*/
// foreach($categories_vp as $category) {
// if($category['id_category'] != $id_category){

View File

@ -1,199 +0,0 @@
<?php
/*
* 2007-2011 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2011 PrestaShop SA
* @version Release: $Revision: 8937 $
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
/* Debug only */
@ini_set('display_errors', 'off');
define('_PS_DEBUG_SQL_', false);
$start_time = microtime(true);
/* Compatibility warning */
define('_PS_DISPLAY_COMPATIBILITY_WARNING_', false);
/* SSL configuration */
define('_PS_SSL_PORT_', 443);
/* Improve PHP configuration to prevent issues */
ini_set('upload_max_filesize', '100M');
ini_set('default_charset', 'utf-8');
ini_set('magic_quotes_runtime', 0);
// correct Apache charset (except if it's too late
if (!headers_sent())
header('Content-Type: text/html; charset=utf-8');
/* No settings file? goto installer...*/
if (!file_exists(dirname(__FILE__).'/settings.inc.php'))
{
$dir = ((is_dir($_SERVER['REQUEST_URI']) OR substr($_SERVER['REQUEST_URI'], -1) == '/') ? $_SERVER['REQUEST_URI'] : dirname($_SERVER['REQUEST_URI']).'/');
if (!file_exists(dirname(__FILE__).'/../install'))
die('Error: \'install\' directory is missing');
header('Location: install/');
exit;
}
require_once(dirname(__FILE__).'/settings.inc.php');
define('_PS_OPEN_SHOP_', 0);
/* Include all defines */
require_once(dirname(__FILE__).'/defines.inc.php');
if (!defined('_PS_MAGIC_QUOTES_GPC_'))
define('_PS_MAGIC_QUOTES_GPC_', get_magic_quotes_gpc());
if (!defined('_PS_MODULE_DIR_'))
define('_PS_MODULE_DIR_', _PS_ROOT_DIR_.'/modules/');
if (!defined('_PS_MYSQL_REAL_ESCAPE_STRING_'))
define('_PS_MYSQL_REAL_ESCAPE_STRING_', function_exists('mysql_real_escape_string'));
/* Autoload */
require_once(dirname(__FILE__).'/autoload.php');
/* Redefine REQUEST_URI if empty (on some webservers...) */
if (!isset($_SERVER['REQUEST_URI']) OR empty($_SERVER['REQUEST_URI']))
{
if (substr($_SERVER['SCRIPT_NAME'], -9) == 'index.php' && empty($_SERVER['QUERY_STRING']))
$_SERVER['REQUEST_URI'] = dirname($_SERVER['SCRIPT_NAME']).'/';
else
{
$_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'];
if (isset($_SERVER['QUERY_STRING']) AND !empty($_SERVER['QUERY_STRING']))
$_SERVER['REQUEST_URI'] .= '?'.$_SERVER['QUERY_STRING'];
}
}
/* Trying to redefine HTTP_HOST if empty (on some webservers...) */
if (!isset($_SERVER['HTTP_HOST']) OR empty($_SERVER['HTTP_HOST']))
$_SERVER['HTTP_HOST'] = @getenv('HTTP_HOST');
/* aliases */
function p($var) {
return (Tools::p($var));
}
function d($var) {
Tools::d($var);
}
function ppp($var) {
return (Tools::p($var));
}
function ddd($var) {
Tools::d($var);
}
global $_MODULES;
$_MODULES = array();
/* Load all configuration keys */
Configuration::loadConfiguration();
/* Load all language definitions */
Language::loadLanguages();
/* Define order state */
// DEPRECATED : these defines are going to be deleted on 1.6 version of Prestashop
// USE : Configuration::get() method in order to getting the id of order state
define('_PS_OS_CHEQUE_', Configuration::get('PS_OS_CHEQUE'));
define('_PS_OS_PAYMENT_', Configuration::get('PS_OS_PAYMENT'));
define('_PS_OS_PREPARATION_', Configuration::get('PS_OS_PREPARATION'));
define('_PS_OS_SHIPPING_', Configuration::get('PS_OS_SHIPPING'));
define('_PS_OS_DELIVERED_', Configuration::get('PS_OS_DELIVERED'));
define('_PS_OS_CANCELED_', Configuration::get('PS_OS_CANCELED'));
define('_PS_OS_REFUND_', Configuration::get('PS_OS_REFUND'));
define('_PS_OS_ERROR_', Configuration::get('PS_OS_ERROR'));
define('_PS_OS_OUTOFSTOCK_', Configuration::get('PS_OS_OUTOFSTOCK'));
define('_PS_OS_BANKWIRE_', Configuration::get('PS_OS_BANKWIRE'));
define('_PS_OS_PAYPAL_', Configuration::get('PS_OS_PAYPAL'));
define('_PS_OS_WS_PAYMENT_', Configuration::get('PS_OS_WS_PAYMENT'));
/* It is not safe to rely on the system's timezone settings, and this would generate a PHP Strict Standards notice. */
if (function_exists('date_default_timezone_set'))
@date_default_timezone_set(Configuration::get('PS_TIMEZONE'));
/* Smarty */
require_once(dirname(__FILE__).'/smarty.config.inc.php');
/* Possible value are true, false, 'URL'
(for 'URL' append SMARTY_DEBUG as a parameter to the url)
default is false for production environment */
define('SMARTY_DEBUG_CONSOLE', false);
// INTERNATIONALISATION
global $site_versions, $site_version;
$site_versions = array('com', 'es', /*'it'*/);
$domain_chunks = explode('.bebeboutik.', strtolower($_SERVER['HTTP_HOST']));
if(count($domain_chunks) !== 2) {
$extensions = explode('.', $domain_chunks[0]);
if(in_array($extensions[1], $site_versions)) {
header('Location: http://www.bebeboutik.'.$extensions[1]);
exit;
} else {
header('Location: http://www.bebeboutik.com');
exit;
}
}
$cookie_version = (
isset($_COOKIE['site_version']) && in_array(strtolower($_COOKIE['site_version']), $site_versions)
? strtolower($_COOKIE['site_version'])
: FALSE
);
if(!in_array($domain_chunks[0], array('www', 'm',/*'dev'*/))
|| ($domain_chunks[1] !== 'com' && !in_array($domain_chunks[1], $site_versions))
|| ($domain_chunks[1] === 'com' && $domain_chunks[0] !== 'bo' && $cookie_version !== FALSE)) {
/*
* Security check in case of a misconfigured web server
* If the selected domain is not allowed, redirect to default site
*/
header('Location: http://'
.(in_array($domain_chunks[0], array('www', 'm', 'bo'))? $domain_chunks[0]: 'www')
.'.bebeboutik.'
.($cookie_version
? $cookie_version
: (in_array($domain_chunks[1], $site_versions)
? $domain_chunks[1]
: 'com'
)
)
.$_SERVER['REQUEST_URI']
);
exit;
}
$_COOKIE['site_version'] = $domain_chunks[1];
$_GET['isolang'] = $domain_chunks[1];
$site_version = $domain_chunks[1];
if ($site_version == 'com') {
$site_version_front = 'fr';
} else {
$site_version_front = $site_version;
}
if(isset($site_version)) {
global $smarty;
$smarty->assign('site_version', $site_version);
}

View File

@ -0,0 +1,139 @@
<?php
class Process
{
private $data;
private $mail_dir;
private $to;
public function __construct()
{
$this->mail_dir = dirname(__FILE__);
$this->to = 'simonet@antadis.com';
}
public function addProvider($post)
{
$this->data = $post;
$errors = [];
$isCorrect = $this->validate(Contactform::TYPE_PROVIDER);
if (!$isCorrect) {
$errors[] = 'Tous les champs ne sont pas remplis';
} else {
$query = Db::getInstance()->autoExecute(_DB_PREFIX_.'contactform', [
'brand' => pSQL($this->data['brand']),
'compagny' => pSQL($this->data['compagny']),
'lastname' => pSQL($this->data['lastname']),
'firstname' => pSQL($this->data['firstname']),
'function' => pSQL($this->data['function']),
'email1' => pSQL($this->data['email1']),
'email2' => pSQL($this->data['email2']),
'phone1' => pSQL($this->data['phone1']),
'phone2' => pSQL($this->data['phone2']),
'purpose' => pSQL($this->data['purpose']),
'content' => pSQL($this->data['content']),
'type' => Contactform::TYPE_PROVIDER
], 'INSERT');
if (!$query) {
$errors[] = "Une erreur s'est produite. Votre message n'a pas été envoyé";
} else {
Mail::Send(
intval($cookie->id_lang),
'provider',
'sujet',
$this->data,
$this->to,
NULL,
NULL,
NULL,
NULL,
NULL,
$this->mail_dir
);
}
}
if (!empty($errors)) {
return $errors;
}
return true;
}
public function addPress($post)
{
$this->data = $post;
$errors = [];
$isCorrect = $this->validate(Contactform::TYPE_PRESS);
if (!$isCorrect) {
$errors[] = 'Tous les champs ne sont pas remplis';
} else {
$query = Db::getInstance()->autoExecute(_DB_PREFIX_.'contactform', [
'compagny' => pSQL($this->data['compagny']),
'lastname' => pSQL($this->data['lastname']),
'firstname' => pSQL($this->data['firstname']),
'function' => pSQL($this->data['function']),
'email1' => pSQL($this->data['email1']),
'email2' => pSQL($this->data['email2']),
'phone1' => pSQL($this->data['phone1']),
'phone2' => pSQL($this->data['phone2']),
'content' => pSQL($this->data['content']),
'type' => Contactform::TYPE_PRESS
], 'INSERT');
if (!$query) {
$errors[] = "Une erreur s'est produite. Votre message n'a pas été envoyé";
} else {
Mail::Send(
intval($cookie->id_lang),
'press',
'sujet',
$this->data,
$this->to,
NULL,
NULL,
NULL,
NULL,
NULL,
$this->mail_dir
);
}
}
if (!empty($errors)) {
return $errors;
}
return true;
}
private function validate($type)
{
switch ($type) {
case Contactform::TYPE_PROVIDER:
return (!empty($this->data['brand'])
&& !empty($this->data['compagny'])
&& !empty($this->data['lastname'])
&& !empty($this->data['firstname'])
&& !empty($this->data['function'])
&& !empty($this->data['email1'])
&& !empty($this->data['phone1'])
&& !empty($this->data['purpose'])
&& !empty($this->data['content']));
break;
case Contactform::TYPE_PRESS:
return (!empty($this->data['compagny'])
&& !empty($this->data['lastname'])
&& !empty($this->data['firstname'])
&& !empty($this->data['function'])
&& !empty($this->data['email1'])
&& !empty($this->data['phone1'])
&& !empty($this->data['content']));
break;
default:
return false;
break;
}
}
}

View File

@ -0,0 +1,67 @@
<?php
if (!defined('_PS_VERSION_'))
exit;
class Contactform extends Module {
const TYPE_PRESS = 1;
const TYPE_PROVIDER = 2;
private $assets_module_dir;
public function __construct() {
$this->name = 'Contactform';
$this->tab = 'advertising_marketing';
$this->version = '1.0';
$this->author = 'Antadis';
$this->need_instance = 0;
parent::__construct();
$this->displayName = $this->l('Contact form for press and providers');
$this->description = $this->l('Integrate contact form.');
$this->assets_module_dir = dirname(__FILE__);
}
public function installDB() {
return Db::getInstance()->Execute('
CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'contactform` (
`id_contactform` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`brand` VARCHAR(255) NULL,
`compagny` VARCHAR(255) NOT NULL,
`lastname` VARCHAR(128) NOT NULL,
`firstname` VARCHAR(128) NOT NULL,
`function` VARCHAR(255) NOT NULL,
`email1` VARCHAR(255) NOT NULL,
`email2` VARCHAR(255) NULL,
`phone1` VARCHAR(255) NOT NULL,
`phone2` VARCHAR(255) NULL,
`purpose` VARCHAR(255) NULL,
`content` TEXT(65535) NOT NULL,
`date_add` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
`type` INT(11) NOT NULL,
PRIMARY KEY (`id_contactform`)
) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8;
');
}
public function uninstallDB() {
return Db::getInstance()->Execute('DROP TABLE `'._DB_PREFIX_.'contactform`;');
}
public function install() {
if(!parent::install() || !$this->installDB()) {
return FALSE;
}
return TRUE;
}
public function uninstall() {
if (!parent::uninstall() || !$this->uninstallDB() ) {
return FALSE;
}
return TRUE;
}
}

View File

@ -0,0 +1,24 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Message de votre boutique</title>
</head>
<body>
<table style="font-family: tahoma,arial,sans-serif; font-size: 12px; color:#000000; width: 550px;">
<tr>
<td align="left" style="background: #514c8c; color:#ffffff; font-size: 12px; font-weight:bold; padding: 0.5em 1em;">Vous avez reçu un message de la part d'un client depuis votre boutique</td>
</tr>
<tr><td>&nbsp;</td></tr>
<tr>
<td align="left"> <b>{lastname} {firstname}</b> </td>
<td align="left"> {function} </td>
<td align="left"> {compagny} </td>
<td align="left"> Adresse électronique : {email1} {if email2 =! ''} - {email2}{/if} </td>
<td align="left"> Téléphone : Adresse électronique : {phone1} {if phone2 =! ''} - {phone2}{/if} </td>
<td align="left"> &nbsp; </td>
<td align="left"> {content} </td>
</tr>
</table>
</body>
</html>

View File

@ -0,0 +1,9 @@
Vous avez reçu un message de la part d'un client depuis votre boutique
Nom: {lastname} {firstname}
{function}
{compagny}
Adresse électronique : {email1} {if email2 =! ''} - {email2}{/if}
Téléphone : Adresse électronique : {phone1} {if phone2 =! ''} - {phone2}{/if}
{content}

View File

@ -0,0 +1,26 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Message de votre boutique</title>
</head>
<body>
<table style="font-family: tahoma,arial,sans-serif; font-size: 12px; color:#000000; width: 550px;">
<tr>
<td align="left" style="background: #514c8c; color:#ffffff; font-size: 12px; font-weight:bold; padding: 0.5em 1em;">Vous avez reçu un message de la part d'un client depuis votre boutique</td>
</tr>
<tr><td>&nbsp;</td></tr>
<tr>
<td align="left"> <b>{lastname} {firstname}</b> </td>
<td align="left"> {function} </td>
<td align="left"> {brand} - {compagny} </td>
<td align="left"> Adresse électronique : {email1} {if email2 =! ''} - {email2}{/if} </td>
<td align="left"> Téléphone : Adresse électronique : {phone1} {if phone2 =! ''} - {phone2}{/if} </td>
<td align="left"> &nbsp; </td>
<td align="left"> Proposition : {purpose} </td>
<td align="left"> &nbsp; </td>
<td align="left"> {content} </td>
</tr>
</table>
</body>
</html>

View File

@ -0,0 +1,11 @@
Vous avez reçu un message de la part d'un client depuis votre boutique
Nom: {lastname} {firstname}
{function}
{brand} - {compagny}
Adresse électronique : {email1} {if email2 =! ''} - {email2}{/if}
Téléphone : Adresse électronique : {phone1} {if phone2 =! ''} - {phone2}{/if}
Proposition : {purpose}
{content}

View File

@ -0,0 +1,21 @@
<?php
require_once(dirname(__FILE__).'/../../config/config.inc.php');
require_once(dirname(__FILE__).'/../../init.php');
$controller->preProcess();
include_once(dirname(__FILE__).'/contactform.php');
include_once(dirname(__FILE__).'/Process.php');
include(dirname(__FILE__).'/../../header.php');
$result = null;
if (!empty($_POST['type'])) {
$Process = new Process();
$result = $Process->addPress($_POST);
}
$smarty->assign('result', $result);
$smarty->assign('_POST', $_POST);
echo Module::display(dirname(__FILE__).'/contactform.php', 'press.tpl');
include(dirname(__FILE__).'/../../footer.php');

View File

@ -0,0 +1,81 @@
<h1 class="module-contactform-h1">{l s='Formulaire de contact presse' mod='contactform'}</h1>
<ul class="idTabs module-contactform-idTabs">
<li><a href="/modules/contactform/provider.php" >{l s='Fournisseur' mod='invite'}</a></li>
<li><a href="/modules/contactform/press.php" class="selected">{l s='Presse' mod='invite'}</a></li>
</ul>
<div class="sheets module-contactform-sheets clear" style="padding: 20px 20px;">
<div id="idTab1">
{if $_POST}
{if $result|is_array}
{foreach from=$result item=error}
<p class="bold text" style="color: red">{$error}</p>
{/foreach}
{else}
<p class="bold text">{l s='Votre message à été envoye' mod='contactform'}</p>
{/if}
{/if}
<form action="/modules/contactform/press.php" method="post">
<div>
<p class="text module-contactform-input-group" style="display: inline-block">
<label for="compagny">{l s='Entreprise' mod='contactform'}*</label>
<input type="text" name="compagny" id="compagny">
</p>
<p class="text module-contactform-input-group" style="display: inline-block; margin-left: 30px">
<label for="function">{l s='Fonction' mod='contactform'}*</label>
<input type="text" name="function" id="function">
</p>
</div>
<div>
<p class="text module-contactform-input-group" style="display: inline-block">
<label for="lastname">{l s='Nom' mod='contactform'}*</label>
<input type="text" name="lastname" id="lastname">
</p>
<p class="text module-contactform-input-group" style="display: inline-block; margin-left: 30px">
<label for="firstname">{l s='Prénom' mod='contactform'}*</label>
<input type="text" name="firstname" id="firstname">
</p>
</div>
<div>
<p class="text module-contactform-input-group" style="display: inline-block">
<label for="email1">{l s='Email' mod='contactform'}*</label>
<input type="text" name="email1" id="email1">
</p>
<p class="text module-contactform-input-group" style="display: inline-block; margin-left: 30px">
<label for="email2">{l s='Email secondaire' mod='contactform'}</label>
<input type="text" name="email2" id="email2">
</p>
</div>
<div>
<p class="text module-contactform-input-group" style="display: inline-block">
<label for="phone1">{l s='Téléphone' mod='contactform'}*</label>
<input type="text" name="phone1" id="phone1">
</p>
<p class="text module-contactform-input-group" style="display: inline-block; margin-left: 30px">
<label for="phone2">{l s='Téléphone secondaire' mod='contactform'}</label>
<input type="text" name="phone2" id="phone2">
</p>
</div>
<p class="text module-contactform-input-group">
<label for="content">{l s='Message' mod='contactform'}*</label>
<textarea name="content" id="content" cols="65" rows="10"></textarea>
</p>
<input type="hidden" name="type" value="{Contactform::TYPE_PRESS}">
<button type="submit" id="SubmitLogin" class="module-contactform-button">{l s='Envoyer' mod='contactform'}</button>
</form>
</div>

View File

@ -0,0 +1,23 @@
<?php
require_once(dirname(__FILE__).'/../../config/config.inc.php');
require_once(dirname(__FILE__).'/../../init.php');
$controller->preProcess();
include_once(dirname(__FILE__).'/contactform.php');
include_once(dirname(__FILE__).'/Process.php');
include(dirname(__FILE__).'/../../header.php');
$result = null;
if (!empty($_POST['type'])) {
$Process = new Process();
$result = $Process->addProvider($_POST);
}
$smarty->assign('result', $result);
$smarty->assign('_POST', $_POST);
echo Module::display(dirname(__FILE__).'/contactform.php', 'provider.tpl');
include(dirname(__FILE__).'/../../footer.php');

View File

@ -0,0 +1,91 @@
<h1 class="module-contactform-h1">{l s='Formulaire de contact fournisseur' mod='contactform'}</h1>
<ul class="idTabs module-contactform-idTabs">
<li><a href="/modules/contactform/provider.php" class="selected">{l s='Fournisseur' mod='invite'}</a></li>
<li><a href="/modules/contactform/press.php" >{l s='Presse' mod='invite'}</a></li>
</ul>
<div class="sheets module-contactform-sheets clear" style="padding: 20px 20px;" class="module-contactform-sheets">
<div id="idTab1">
{if $_POST}
{if $result|is_array}
{foreach from=$result item=error}
<p class="bold text" style="color: red">{$error}</p>
{/foreach}
{else}
<p class="bold text">{l s='Votre message à été envoye' mod='contactform'}</p>
{/if}
{/if}
<form action="/modules/contactform/provider.php" method="post">
<div>
<p class="text module-contactform-input-group" style="display: inline-block">
<label for="brand">{l s='Marque' mod='contactform'}*</label>
<input type="text" name="brand" id="brand">
</p>
<p class="text module-contactform-input-group" style="display: inline-block; margin-left: 30px">
<label for="compagny">{l s='Entreprise' mod='contactform'}*</label>
<input type="text" name="compagny" id="compagny">
</p>
</div>
<p class="text module-contactform-input-group">
<label for="function">{l s='Fonction' mod='contactform'}*</label>
<input type="text" name="function" id="function">
</p>
<div>
<p class="text module-contactform-input-group" style="display: inline-block">
<label for="lastname">{l s='Nom' mod='contactform'}*</label>
<input type="text" name="lastname" id="lastname">
</p>
<p class="text module-contactform-input-group" style="display: inline-block; margin-left: 30px">
<label for="firstname">{l s='Prénom' mod='contactform'}*</label>
<input type="text" name="firstname" id="firstname">
</p>
</div>
<div>
<p class="text module-contactform-input-group" style="display: inline-block">
<label for="email1">{l s='Email' mod='contactform'}*</label>
<input type="text" name="email1" id="email1">
</p>
<p class="text module-contactform-input-group" style="display: inline-block; margin-left: 30px">
<label for="email2">{l s='Email secondaire' mod='contactform'}</label>
<input type="text" name="email2" id="email2">
</p>
</div>
<div>
<p class="text module-contactform-input-group" style="display: inline-block">
<label for="phone1">{l s='Téléphone' mod='contactform'}*</label>
<input type="text" name="phone1" id="phone1">
</p>
<p class="text module-contactform-input-group" style="display: inline-block; margin-left: 30px">
<label for="phone2">{l s='Téléphone secondaire' mod='contactform'}</label>
<input type="text" name="phone2" id="phone2">
</p>
</div>
<p class="text module-contactform-input-group">
<label for="purpose">{l s='Proposition' mod='contactform'}*</label>
<input type="text" name="purpose" id="purpose">
</p>
<p class="text module-contactform-input-group">
<label for="content">{l s='Message' mod='contactform'}*</label>
<textarea name="content" id="content" cols="65" rows="10"></textarea>
</p>
<input type="hidden" name="type" value="{Contactform::TYPE_PROVIDER}">
<button type="submit" id="SubmitLogin" class="btn_box login_box module-contactform-button">{l s='Envoyer' mod='contactform'}</button>
</form>
</div>
</div>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,12 +1,17 @@
<?php
if(isset($_SERVER['REMOTE_ADDR'])) exit;
$_SERVER['SERVER_PORT'] = 80;
$_SERVER['HTTP_HOST'] = 'www.bebeboutik.com';
include(dirname(__FILE__).'/../../config/config.inc.php');
include(dirname(__FILE__).'/Sale.php');
$sales = Sale::getSales(TRUE, NULL, NULL, FALSE);
$file = fopen('lastupdate.txt', 'w');
fwrite($file, date('Ymd His'));
fclose($file);
foreach($sales as $sale) {
$sale->end(TRUE);
}

View File

@ -0,0 +1 @@
20160224 162301

View File

@ -373,7 +373,11 @@ class FrontController extends FrontControllerCore {
'module-referralprogram-referral-program', 'module-cheque-payment',
'module-bankwire-payment', 'module-invite-invite-rules',
'module-advsendtoafriend-sendtoafriend-form', 'featured',
'list-tag-sales','module-ant_support-help','module-ant_support_form-support',
'list-tag-sales',
'module-contactform-provider',
'module-contactform-press',
'module-ant_support-help',
'module-ant_support_form-support',
);
$displayRight = array(

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -569,6 +569,8 @@ $_LANG['product-list_2d0f6b8300be19cf35e89e66f0677f95'] = 'Añadir a la cesta';
$_LANG['product-list_b55197a49e8c4cd8c314bc2aa39d6feb'] = 'Agotado';
$_LANG['product-list_78945de8de090e90045d299651a68a9b'] = 'Disponible';
$_LANG['product-list_4351cfebe4b61d8aa5efa1d020710005'] = 'Ver';
$_LANG['product-list_4391a5fd21c767037fbb3bcad0c1f595'] = 'Producto agotado';
$_LANG['product-list_763ea78c330dfb4adafcaf118747de76'] = 'Comprar expreso';
$_LANG['product-list_77798ad342555ffa834758a2aaa6fc11'] = 'Comparar';
$_LANG['product-sort_cfab1ba8c67c7c838db98d666f02a132'] = '--';
$_LANG['product-sort_b3c4afbd8ec3b1e28710fcbdc8cc0549'] = 'Precio: más baratos primero';

View File

@ -4316,4 +4316,74 @@ body#index .jqibuttons span.gradient{
}
.fancybox-ie #fancybox-bg-nw {
filter: progid:dximagetransform.microsoft.alphaimageloader(src="../../../js/jquery/fancybox/fancy_shadow_nw.png", sizingMethod="scale");
}
.module-contactform-h1 {
color: #1e1633;
font-size: 26px;
text-align: center;
font-weight: normal;
padding: 20px 0;
}
.module-contactform-sheets {
background: #ffffff;
}
.module-contactform-idTabs {
margin: 0;
padding: 0;
font-size: 12px;
line-height: 1.5em;
}
.module-contactform-idTabs li {
float: left;
list-style: none;
}
.module-contactform-idTabs li a {
color: #1e1633;
display: block;
text-decoration: none;
background: #ebe8e9;
padding: 10px 20px;
}
.module-contactform-idTabs li a.selected {
display: block;
text-decoration: none;
padding: 10px 20px;
background: #ffffff;
}
.module-contactform-input-group {
margin: 12px 0;
}
.module-contactform-input-group input, .module-contactform-input-group textarea {
margin-top: 3px;
}
.module-contactform-input-group textarea {
height: 100px;
}
.module-contactform-button {
text-align: center;
text-transform: none;
color: #ffffff;
border: none;
padding: 8px 20px;
text-decoration: none;
font-weight: normal;
-moz-border-radius: 20px;
-webkit-border-radius: 20px;
border-radius: 20px;
font-family: georgia, times new roman, serif;
font-style: italic;
font-size: 13px;
background: #504d8b;
}