You can subscribe to this list here.
| 2011 |
Jan
|
Feb
|
Mar
(4) |
Apr
(57) |
May
(31) |
Jun
(21) |
Jul
(11) |
Aug
(23) |
Sep
(22) |
Oct
(36) |
Nov
(62) |
Dec
(85) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2012 |
Jan
(24) |
Feb
(24) |
Mar
(65) |
Apr
(232) |
May
(118) |
Jun
(22) |
Jul
(54) |
Aug
(57) |
Sep
(14) |
Oct
(27) |
Nov
(16) |
Dec
(19) |
| 2013 |
Jan
(16) |
Feb
(12) |
Mar
(3) |
Apr
(17) |
May
(2) |
Jun
(30) |
Jul
(33) |
Aug
(19) |
Sep
(35) |
Oct
(58) |
Nov
(27) |
Dec
(64) |
| 2014 |
Jan
(102) |
Feb
(80) |
Mar
(15) |
Apr
(4) |
May
(3) |
Jun
(3) |
Jul
(5) |
Aug
(11) |
Sep
(15) |
Oct
|
Nov
(3) |
Dec
(5) |
| 2015 |
Jan
(5) |
Feb
(4) |
Mar
(2) |
Apr
(11) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(9) |
Nov
(10) |
Dec
|
| 2016 |
Jan
(3) |
Feb
(2) |
Mar
(18) |
Apr
(13) |
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
(4) |
Oct
|
Nov
|
Dec
|
|
From: <os...@us...> - 2011-11-07 09:13:15
|
Revision: 3869
http://oscss.svn.sourceforge.net/oscss/?rev=3869&view=rev
Author: oscim
Date: 2011-11-07 09:13:07 +0000 (Mon, 07 Nov 2011)
Log Message:
-----------
correction coquille coherance dans la gestion des produits, avec les prix par groupe
Mise ?\195?\160 niveau de l'extension customers_groups
Ajout fonctionnalit?\195?\169 permettant de lister les clients et les produits modifi?\195?\169 pour chaque groupes
Modified Paths:
--------------
trunk/catalog/admin/includes/gabarit/products/display_view.edit.gab
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/products.txt
trunk/catalog/admin/includes/modules/pages/customers.php
trunk/extensions/CUSTOMERS_GROUPS_stable/catalog/admin/includes/languages/fr_FR/modules/pages/customers_groups.txt
trunk/extensions/CUSTOMERS_GROUPS_stable/catalog/admin/includes/modules/pages/customers_groups.php
trunk/extensions/CUSTOMERS_GROUPS_stable/install.xml
Added Paths:
-----------
trunk/extensions/CUSTOMERS_GROUPS_stable/catalog/admin/includes/gabarit/customers_groups/
trunk/extensions/CUSTOMERS_GROUPS_stable/catalog/admin/includes/gabarit/customers_groups/display_view.delete.gab
trunk/extensions/CUSTOMERS_GROUPS_stable/catalog/admin/includes/gabarit/customers_groups/display_view.edit.gab
trunk/extensions/CUSTOMERS_GROUPS_stable/catalog/admin/includes/gabarit/customers_groups/display_view.listing.gab
Removed Paths:
-------------
trunk/extensions/CUSTOMERS_GROUPS_stable/catalog/admin/includes/gabarit/customers_groups.edit.gab
trunk/extensions/CUSTOMERS_GROUPS_stable/catalog/admin/includes/gabarit/customers_groups.listing.gab
Modified: trunk/catalog/admin/includes/gabarit/products/display_view.edit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/products/display_view.edit.gab 2011-11-06 19:42:35 UTC (rev 3868)
+++ trunk/catalog/admin/includes/gabarit/products/display_view.edit.gab 2011-11-07 09:13:07 UTC (rev 3869)
@@ -3,8 +3,8 @@
@licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.1.0
- @date 18/12/10, 08:30
+ @version 2.1.1
+ @date 07/11/11, 10:08
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -102,16 +102,23 @@
</li>
+ <?php
+ /**
+ @brief Call variation price for products
+ */
+ ?>
<?php foreach (products::$modules->__call('display_inline',array('flag'=>'price','pid'=> products::$pInfo->products_id)) as $value){ $title[]=$value['title']; $text[]=$value['text']; } ?>
- <?php if(isset($title) && is_array($title)): ?>
+
<li>
<h4 class="Ctrtirroir"><?php echo __('Option de prix supplementaire') ?></h4>
<ul class="tirroir tabs_lang">
<li>
<ul>
- <?php $i=0; foreach ($title as $item): ?>
- <li><a href="#products_price-<?php echo $i++; ?>"><?php echo $item; ?></a></li>
- <?php endforeach ; ?>
+ <?php if(isset($title) && is_array($title)): ?>
+ <?php $i=0; foreach ($title as $item): ?>
+ <li><a href="#products_price-<?php echo $i++; ?>"><?php echo $item; ?></a></li>
+ <?php endforeach ; ?>
+ <?php endif; ?>
<?php if (isset(products::$pInfo->products_sppc)): ?>
<li><a href="#products_price-<?php echo $i++; ?>"><?php echo __('text customers groups note').tep_image(DIR_WS_ICONS.'icon_help.gif', __('text customers groups note detail')) ?></a></li>
<?php endif; ?>
@@ -119,9 +126,11 @@
</li>
<li>
<ul>
- <?php $i=0; foreach ($text as $item): ?>
- <li id="products_price-<?php echo $i++; ?>"><?php echo $item; ?></li>
- <?php endforeach ; ?>
+ <?php if(isset($title) && is_array($title)): ?>
+ <?php $i=0; foreach ($text as $item): ?>
+ <li id="products_price-<?php echo $i++; ?>"><?php echo $item; ?></li>
+ <?php endforeach ; ?>
+ <?php endif; ?>
<?php if (isset(products::$pInfo->products_sppc)): ?>
<li id="products_price-<?php echo $i++; ?>" class="block_input">
<ul>
@@ -140,7 +149,6 @@
</li>
</ul>
</li>
- <?php endif; ?>
<li class="block_input">
<label for="products_price_gross"><?php echo __('text products final price'); ?></label>
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/pages/products.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/pages/products.txt 2011-11-06 19:42:35 UTC (rev 3868)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/products.txt 2011-11-07 09:13:07 UTC (rev 3869)
@@ -111,7 +111,7 @@
$lang['txt categories']="Catégories" ;
$lang['txt cat all']=" Toute(s) catégorie(s)" ;
$lang['text customers groups']="Groupe : " ;
-$lang['text customers groups note']="[ Gestion du tarif par groupe de clients ]" ;
+$lang['text customers groups note']="Tarif Groupe" ;
$lang['text customers groups note detail']="Notez que si un champ est laissé vide, aucun prix pour ce groupe de clients sera inséré dans la base de données. Si un champ est rempli, mais la case n'est pas cochée, aucun prix ne sera inséré. Si un prix est déjà inséré dans la base de données, mais la case n'est pas cochée, celui-ci sera supprimé de la base de données." ;
$lang['text info intro choose product type']="Vous devez définir le type du produit, ce type déterminera les fonctionnalités associées. Pour tous les produits qui ne sont pas virtuels, ou ayant des caractéristiques spéciales, le type de 'produit physique'. Pour les produits de type virtuel (logiciel, abonnement, etc, préciser alors son type. ) " ;
Modified: trunk/catalog/admin/includes/modules/pages/customers.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/customers.php 2011-11-06 19:42:35 UTC (rev 3868)
+++ trunk/catalog/admin/includes/modules/pages/customers.php 2011-11-07 09:13:07 UTC (rev 3869)
@@ -4,8 +4,8 @@
@portion code Copyright (c) 2002 osCommerce
@Portioncode products class for ACA v2 (Advanced Categories Admin) by Rigadin2, www.osc-help.net
@package osCSS-2 <www http://www.oscss.org>
- @version 2.1.0
- @date 04/07/11, 08:55
+ @version 2.1.1
+ @date 07/11/11, 09:40
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class customers
@@ -183,6 +183,7 @@
$customers_group_ra = (int)tep_db_prepare_input($_POST['customers_group_ra']);
$customers_gender = (isset($_POST['customers_gender'])) ? tep_db_prepare_input($_POST['customers_gender']) : 1 ;
if (_cst_bool('ACCOUNT_DOB')) $customers_dob = tep_db_prepare_input($_POST['customers_dob']);
+ $customers_group_id = (isset($_POST['customers_group_id'])) ? tep_db_prepare_input($_POST['customers_group_id']) : 0 ;
$global_product_notifications = tep_db_prepare_input($_POST['global_product_notifications']);
@@ -210,6 +211,7 @@
'customers_fax' => $customers_fax,
'customers_newsletter' => $customers_newsletter,
'customers_group_ra' => $customers_group_ra,
+ 'customers_group_id' => $customers_group_id,
'customers_shopping_points' => ((isset($_POST['customers_shopping_points'])) ? (int)tep_db_prepare_input($_POST['customers_shopping_points']) : 0) );
if (_cst_bool('ACCOUNT_GENDER')) $sql_data_array['customers_gender'] = $customers_gender;
Added: trunk/extensions/CUSTOMERS_GROUPS_stable/catalog/admin/includes/gabarit/customers_groups/display_view.delete.gab
===================================================================
--- trunk/extensions/CUSTOMERS_GROUPS_stable/catalog/admin/includes/gabarit/customers_groups/display_view.delete.gab (rev 0)
+++ trunk/extensions/CUSTOMERS_GROUPS_stable/catalog/admin/includes/gabarit/customers_groups/display_view.delete.gab 2011-11-07 09:13:07 UTC (rev 3869)
@@ -0,0 +1,28 @@
+<?php
+/**
+ @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @sub-package Customers_groups
+ @sub-version 2.4
+ @date 07/11/11, 10:04
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+?>
+<h3><?php echo __('text info heading delete group') ; ?></h3>
+
+<div class="box_uniq block_form">
+
+ <?php echo tep_draw_form('customers_groups', customers_groups::FILENAME, tep_get_all_get_params(array('cID', 'action','forceajax')) . 'cID=' . customers_groups::$cInfo->customers_group_id . '&action=deleteconfirm'); ?>
+
+ <p>
+ <strong><?php echo customers_groups::$cInfo->customers_group_name ?></strong>
+ </p>
+
+ <div class="button_nav">
+ <?php echo tep_image_submit('button_delete.gif', IMAGE_DELETE) . tep_js_back(tep_href_link(customers_groups::FILENAME), IMAGE_CANCEL) ; ?>
+ </div>
+</div>
+</form>
Added: trunk/extensions/CUSTOMERS_GROUPS_stable/catalog/admin/includes/gabarit/customers_groups/display_view.edit.gab
===================================================================
--- trunk/extensions/CUSTOMERS_GROUPS_stable/catalog/admin/includes/gabarit/customers_groups/display_view.edit.gab (rev 0)
+++ trunk/extensions/CUSTOMERS_GROUPS_stable/catalog/admin/includes/gabarit/customers_groups/display_view.edit.gab 2011-11-07 09:13:07 UTC (rev 3869)
@@ -0,0 +1,165 @@
+<?php
+/**
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @sub-package Customers_groups
+ @sub-version 2.4
+ @date 07/11/11, 10:04
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+?>
+<h3><?php echo __('heading title'); ?></h3>
+
+
+ <div class="button_nav">
+ <?php echo '<a class="button" href="' . tep_href_link(customers_groups::FILENAME, 'action=new') . '">' . tep_image(DIR_WS_ICONS.'icon_add_new.png' , IMAGE_NEW_PRODUCT) . IMAGE_INSERT . '</a>'; ?>
+ </div>
+
+<div class="box_uniq block_form">
+
+
+ <div id="tabs">
+ <ul>
+ <li><a href="#tabs-1"><?php echo __('tab groups data'); ?></a></li>
+ <li><a href="#tabs-2"><?php echo __('tab groups customers'); ?></a></li>
+ <li><a href="#tabs-3"><?php echo __('tab groups products'); ?></a></li>
+ </ul>
+
+
+
+ <?php
+ /**
+ @brief detail this groups
+ */
+ ?>
+ <div id="tabs-1" class="tabPage">
+ <?php echo tep_draw_form('customers', customers_groups::FILENAME, tep_get_all_get_params(array('action')) . 'action='.((customers_groups::$action == 'edit')?'update':'new') , 'post', 'onSubmit="return check_form();"'); ?>
+
+
+ <p class="block_input">
+ <label for="customers_group_name"><?php echo __('entry groups name'); ?></label>
+ <?php echo tep_draw_input_field('customers_group_name','', customers_groups::$cInfo->customers_group_name, 'maxlength="32"', false) . __('entry group name max length'); ?>
+ </p>
+
+ <div class="fright block_input">
+ <label for="customers_firstname"><?php echo __('entry group tax exempt'); ?></label>
+ <?php echo tep_draw_pull_down_menu('customers_group_tax_exempt', customers_groups::$cg_tax_exempt_array, (customers_groups::$cInfo->customers_group_tax_exempt==1) ? '1' : '0'); ?>
+
+ <label for="customers_group_show_tax"><?php echo __('entry group show tax'); ?></label>
+ <?php echo tep_draw_pull_down_menu('customers_group_show_tax', customers_groups::$cg_show_tax_array, (customers_groups::$cInfo->customers_group_show_tax==1 ) ? '1' : '0') ; ?>
+ <p><?php echo __('entry group show tax explain 1'); ?></p>
+ <p><?php echo __('entry group show tax explain 2'); ?></p>
+ </div>
+
+ <div class="block_input">
+ <label for="group_shipment_settings"><?php echo __('heading title modules payment'); ?></label>
+ <br />
+ <?php echo tep_draw_radio_field('group_payment_settings','', '1', (tep_not_null(customers_groups::$cInfo->group_payment_allowed)? '1' : '0' )) . ' ' . __('entry group payment set') . ' ' . tep_draw_radio_field('group_payment_settings','', '0', (tep_not_null(customers_groups::$cInfo->group_payment_allowed)? '0' : '1' )) . ' ' . __('entry group payment default') ; ?>
+ <ul>
+ <?php foreach(customers_groups::get_array_mod('payment') as $item) echo '<li>'.$item['input'].' '.$item['name'].'</li>'; ?>
+ </ul>
+ <p><?php echo __('entry payment set explain') ?></p>
+ </div>
+
+
+ <div class="block_input">
+ <label for="group_shipment_settings"><?php echo __('heading title modules shipping'); ?></label>
+ <br />
+ <?php echo tep_draw_radio_field('group_shipment_settings','', '1', (tep_not_null(customers_groups::$cInfo->group_shipment_allowed)? '1' : '0' )) . ' ' . __('entry group shipping set') . ' ' . tep_draw_radio_field('group_shipment_settings','', '0', (tep_not_null(customers_groups::$cInfo->group_shipment_allowed)? '0' : '1' )) . ' ' . __('entry group shipping default') ; ?>
+ <ul>
+ <?php foreach(customers_groups::get_array_mod('shipping') as $item) echo '<li>'.$item['input'].' '.$item['name'].'</li>'; ?>
+ </ul>
+ <p><?php echo __('entry shipping set explain') ?></p>
+ </div>
+
+
+ <div class="block_input">
+ <label for="group_shipment_settings"><?php echo __('heading title modules order total'); ?></label>
+ <br />
+ <?php echo tep_draw_radio_field('group_order_total_settings','', '1', (tep_not_null(customers_groups::$cInfo->group_order_total_allowed)? '1' : '0' )) . ' ' . __('entry group order total set') . ' ' . tep_draw_radio_field('group_order_total_settings', '','0', (tep_not_null(customers_groups::$cInfo->group_order_total_allowed)? '0' : '1' )) . ' ' . __('entry group order total default') ; ?>
+ <ul>
+ <?php foreach(customers_groups::get_array_mod('order_total') as $item) echo '<li>'.$item['input'].' '.$item['name'].'</li>'; ?>
+ </ul>
+ <p><?php echo __('entry order total set explain') ?></p>
+ </div>
+
+ <div class="block_input">
+ <h4><?php echo __('heading title group tax rates exempt'); ?></h4>
+ <?php echo tep_draw_radio_field('group_tax_rate_exempt_settings','', '1', (tep_not_null(customers_groups::$cInfo->group_specific_taxes_exempt)? '1' : '0' )) . ' ' . __('entry group tax rates exempt') . ' ' . tep_draw_radio_field('group_tax_rate_exempt_settings', '','0', ((tep_not_null(customers_groups::$cInfo->group_specific_taxes_exempt)) ? '0' : '1' )) . ' ' . __('entry group tax rates default') ; ?>
+ <ul>
+ <?php $tax_query = tep_db_query("select tax_rates_id, tax_rate, tax_description from " . TABLE_TAX_RATES . " order by tax_rates_id");
+ while ($tax_rate = tep_db_fetch_array($tax_query)) { ?>
+ <li><?php echo tep_draw_checkbox_field('group_tax_rate_exempt_id[' . $tax_rate['tax_rates_id'] . ']','', $tax_rate['tax_rates_id'] , (in_array($tax_rate['tax_rates_id'], (array)@$group_tax_ids_exempt)) ? 1 : 0); ?> <?php echo $tax_rate['tax_description']; ?></li>
+ <?php } ?>
+ </ul>
+ <p><?php echo __('entry tax rates exempt explain') ?></p>
+ </div>
+
+ <div class="button_nav">
+ <?php echo tep_image_submit('button_update.gif', IMAGE_UPDATE) . tep_js_back(tep_href_link(customers_groups::FILENAME), IMAGE_CANCEL) ; ?>
+ </div>
+ </form>
+ </div>
+
+
+
+ <?php
+ /**
+ @brief list customers in groups
+ */
+ ?>
+ <div id="tabs-2" class="tabPage">
+
+
+ <table class="dataTableBase">
+ <thead>
+ <tr>
+ <th style="width:20px;"><?php echo __('table heading name'); ?></th>
+ </tr>
+ </thead>
+ <tbody>
+ <?php foreach(customers_groups::$cInfo->customers as $row): ?>
+ <tr>
+ <td><?php echo tep_customers_row_action($row['customers_id']); ?></td>
+ </tr>
+ <?php endforeach; ?>
+ </tbody>
+ </table>
+ </div>
+
+
+
+
+ <?php
+ /**
+ @brief list customers in groups
+ */
+ ?>
+ <div id="tabs-3" class="tabPage">
+
+
+ <table class="dataTableBase">
+ <thead>
+ <tr>
+ <th style="width:20px;"><?php echo __('table heading name'); ?></th>
+ <th style="width:20px;"><?php echo __('table heading normal price'); ?></th>
+ <th style="width:20px;"><?php echo __('table heading group price'); ?></th>
+ </tr>
+ </thead>
+ <tbody>
+ <?php foreach(customers_groups::$cInfo->products as $row): ?>
+ <tr>
+ <td style="width:20px;"><?php echo $row['products_id']; ?></td>
+ <td style="width:20px;"><?php echo $row['products_price']; ?></td>
+ <td style="width:20px;"><?php echo $row['customers_group_price']; ?></td>
+ </tr>
+ <?php endforeach; ?>
+ </tbody>
+ </table>
+ </div>
+
+</div>
+
Added: trunk/extensions/CUSTOMERS_GROUPS_stable/catalog/admin/includes/gabarit/customers_groups/display_view.listing.gab
===================================================================
--- trunk/extensions/CUSTOMERS_GROUPS_stable/catalog/admin/includes/gabarit/customers_groups/display_view.listing.gab (rev 0)
+++ trunk/extensions/CUSTOMERS_GROUPS_stable/catalog/admin/includes/gabarit/customers_groups/display_view.listing.gab 2011-11-07 09:13:07 UTC (rev 3869)
@@ -0,0 +1,36 @@
+<?php
+/**
+ @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @sub-package Customers_groups
+ @sub-version 2.4
+ @date 07/11/11, 10:04
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+?>
+<h3><?php echo __('heading title'); ?></h3>
+
+
+ <div class="button_nav">
+ <?php echo '<a class="button" href="' . tep_href_link(customers_groups::FILENAME, 'action=new') . '">' . tep_image(DIR_WS_ICONS.'icon_add_new.png' , IMAGE_NEW_PRODUCT) . IMAGE_INSERT . '</a>'; ?>
+ </div>
+
+ <div class="box_uniq">
+
+ <table class="dataTable">
+ <thead>
+ <tr>
+ <th style="width:20px;"><?php echo __('table heading id'); ?></th>
+ <th style="width:70%"><?php echo __('table heading name'); ?></th>
+ <th style="width:20px;"><?php echo __('table heading group discount'); ?></th>
+ <th class="tright"><?php echo __('table heading action'); ?></th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- BLOCK AJAX -->
+ </tbody>
+ </table>
+</div>
\ No newline at end of file
Deleted: trunk/extensions/CUSTOMERS_GROUPS_stable/catalog/admin/includes/gabarit/customers_groups.edit.gab
===================================================================
--- trunk/extensions/CUSTOMERS_GROUPS_stable/catalog/admin/includes/gabarit/customers_groups.edit.gab 2011-11-06 19:42:35 UTC (rev 3868)
+++ trunk/extensions/CUSTOMERS_GROUPS_stable/catalog/admin/includes/gabarit/customers_groups.edit.gab 2011-11-07 09:13:07 UTC (rev 3869)
@@ -1,86 +0,0 @@
-<?php
-/**
- @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
- @package osCSS-2 <www http://www.oscss.org>
- @version 2.0.9
- @date 17/07/10, 16:35
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-8
-*/
-?>
-<h3><?php echo __('heading title'); ?></h3>
-
-
- <div class="button_nav">
- <?php echo '<a class="button" href="' . tep_href_link(customers_groups::FILENAME, 'action=new') . '">' . tep_image(DIR_WS_ICONS.'icon_add_new.png' , IMAGE_NEW_PRODUCT) . IMAGE_INSERT . '</a>'; ?>
- </div>
-
-<div class="box_uniq block_form">
-
- <?php echo tep_draw_form('customers', customers_groups::FILENAME, tep_get_all_get_params(array('action')) . 'action='.((customers_groups::$action == 'edit')?'update':'new') , 'post', 'onSubmit="return check_form();"'); ?>
-
-
- <p class="block_input">
- <label for="customers_group_name"><?php echo __('entry groups name'); ?></label>
- <?php echo tep_draw_input_field('customers_group_name','', customers_groups::$cInfo->customers_group_name, 'maxlength="32"', false) . __('entry group name max length'); ?>
- </p>
-
- <div class="fright block_input">
- <label for="customers_firstname"><?php echo __('entry group tax exempt'); ?></label>
- <?php echo tep_draw_pull_down_menu('customers_group_tax_exempt', customers_groups::$cg_tax_exempt_array, (customers_groups::$cInfo->customers_group_tax_exempt==1) ? '1' : '0'); ?>
-
- <label for="customers_group_show_tax"><?php echo __('entry group show tax'); ?></label>
- <?php echo tep_draw_pull_down_menu('customers_group_show_tax', customers_groups::$cg_show_tax_array, (customers_groups::$cInfo->customers_group_show_tax==1 ) ? '1' : '0') ; ?>
- <p><?php echo __('entry group show tax explain 1'); ?></p>
- <p><?php echo __('entry group show tax explain 2'); ?></p>
- </div>
-
- <div class="block_input">
- <label for="group_shipment_settings"><?php echo __('heading title modules payment'); ?></label>
- <br />
- <?php echo tep_draw_radio_field('group_payment_settings','', '1', (tep_not_null(customers_groups::$cInfo->group_payment_allowed)? '1' : '0' )) . ' ' . __('entry group payment set') . ' ' . tep_draw_radio_field('group_payment_settings','', '0', (tep_not_null(customers_groups::$cInfo->group_payment_allowed)? '0' : '1' )) . ' ' . __('entry group payment default') ; ?>
- <ul>
- <?php foreach(customers_groups::get_array_mod('payment') as $item) echo '<li>'.$item['input'].' '.$item['name'].'</li>'; ?>
- </ul>
- <p><?php echo __('entry payment set explain') ?></p>
- </div>
-
-
- <div class="block_input">
- <label for="group_shipment_settings"><?php echo __('heading title modules shipping'); ?></label>
- <br />
- <?php echo tep_draw_radio_field('group_shipment_settings','', '1', (tep_not_null(customers_groups::$cInfo->group_shipment_allowed)? '1' : '0' )) . ' ' . __('entry group shipping set') . ' ' . tep_draw_radio_field('group_shipment_settings','', '0', (tep_not_null(customers_groups::$cInfo->group_shipment_allowed)? '0' : '1' )) . ' ' . __('entry group shipping default') ; ?>
- <ul>
- <?php foreach(customers_groups::get_array_mod('shipping') as $item) echo '<li>'.$item['input'].' '.$item['name'].'</li>'; ?>
- </ul>
- <p><?php echo __('entry shipping set explain') ?></p>
- </div>
-
-
- <div class="block_input">
- <label for="group_shipment_settings"><?php echo __('heading title modules order total'); ?></label>
- <br />
- <?php echo tep_draw_radio_field('group_order_total_settings','', '1', (tep_not_null(customers_groups::$cInfo->group_order_total_allowed)? '1' : '0' )) . ' ' . __('entry group order total set') . ' ' . tep_draw_radio_field('group_order_total_settings', '','0', (tep_not_null(customers_groups::$cInfo->group_order_total_allowed)? '0' : '1' )) . ' ' . __('entry group order total default') ; ?>
- <ul>
- <?php foreach(customers_groups::get_array_mod('order_total') as $item) echo '<li>'.$item['input'].' '.$item['name'].'</li>'; ?>
- </ul>
- <p><?php echo __('entry order total set explain') ?></p>
- </div>
-
- <div class="block_input">
- <h4><?php echo __('heading title group tax rates exempt'); ?></h4>
- <?php echo tep_draw_radio_field('group_tax_rate_exempt_settings','', '1', (tep_not_null(customers_groups::$cInfo->group_specific_taxes_exempt)? '1' : '0' )) . ' ' . __('entry group tax rates exempt') . ' ' . tep_draw_radio_field('group_tax_rate_exempt_settings', '','0', ((tep_not_null(customers_groups::$cInfo->group_specific_taxes_exempt)) ? '0' : '1' )) . ' ' . __('entry group tax rates default') ; ?>
- <ul>
- <?php $tax_query = tep_db_query("select tax_rates_id, tax_rate, tax_description from " . TABLE_TAX_RATES . " order by tax_rates_id");
- while ($tax_rate = tep_db_fetch_array($tax_query)) { ?>
- <li><?php echo tep_draw_checkbox_field('group_tax_rate_exempt_id[' . $tax_rate['tax_rates_id'] . ']','', $tax_rate['tax_rates_id'] , (in_array($tax_rate['tax_rates_id'], $group_tax_ids_exempt)) ? 1 : 0); ?> <?php echo $tax_rate['tax_description']; ?></li>
- <?php } ?>
- </ul>
- <p><?php echo __('entry tax rates exempt explain') ?></p>
- </div>
-
- <div class="button_nav">
- <?php echo tep_image_submit('button_update.gif', IMAGE_UPDATE) . ' <a class="button" href="' . tep_href_link(customers_groups::FILENAME, tep_get_all_get_params(array('action','cID'))) .'">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'; ?>
- </div>
-
-</form>
Deleted: trunk/extensions/CUSTOMERS_GROUPS_stable/catalog/admin/includes/gabarit/customers_groups.listing.gab
===================================================================
--- trunk/extensions/CUSTOMERS_GROUPS_stable/catalog/admin/includes/gabarit/customers_groups.listing.gab 2011-11-06 19:42:35 UTC (rev 3868)
+++ trunk/extensions/CUSTOMERS_GROUPS_stable/catalog/admin/includes/gabarit/customers_groups.listing.gab 2011-11-07 09:13:07 UTC (rev 3869)
@@ -1,35 +0,0 @@
-<?php
-/**
- @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
- @package osCSS-2 <www http://www.oscss.org>
- @version 2.0.9
- @date 17/07/10, 16:35
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-8
-*/
-?>
-<h3><?php echo __('heading title'); ?></h3>
-
-
- <div class="button_nav">
- <?php echo '<a class="button" href="' . tep_href_link(customers_groups::FILENAME, 'action=new') . '">' . tep_image(DIR_WS_ICONS.'icon_add_new.png' , IMAGE_NEW_PRODUCT) . IMAGE_INSERT . '</a>'; ?>
- </div>
-
- <div class="box_uniq">
- <div class="box_left">
- <table class="dataTable">
- <thead>
- <tr>
- <th style="width:20px;"><?php echo __('table heading name'); ?></th>
- <th class="tright"><?php echo __('table heading action'); ?></th>
- </tr>
- </thead>
- <tbody>
- <!-- BLOCK AJAX -->
- </tbody>
- </table>
- </div>
- <div class="box_right ">
- <?php echo customers_groups::get_right_bar() ?>
- </div>
-</div>
\ No newline at end of file
Modified: trunk/extensions/CUSTOMERS_GROUPS_stable/catalog/admin/includes/languages/fr_FR/modules/pages/customers_groups.txt
===================================================================
--- trunk/extensions/CUSTOMERS_GROUPS_stable/catalog/admin/includes/languages/fr_FR/modules/pages/customers_groups.txt 2011-11-06 19:42:35 UTC (rev 3868)
+++ trunk/extensions/CUSTOMERS_GROUPS_stable/catalog/admin/includes/languages/fr_FR/modules/pages/customers_groups.txt 2011-11-07 09:13:07 UTC (rev 3869)
@@ -1,9 +1,12 @@
<?php
/**
- @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.0.9
- @date 20/07/10, 15:25
+ @version 2.1.1
+ @sub-package Customers_groups
+ @sub-version 2.4
+ @date 07/11/11, 10:04
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -13,9 +16,21 @@
$lang['heading title modules shipping']='Modules d\'expédition';
$lang['heading title modules order total']='Modules Total Commande';
+
+$lang['tab groups data']='Caractéristiques';
+$lang['tab groups customers']='Clients';
+$lang['tab groups products']='Produits';
+
+
$lang['table heading name']='Nom';
$lang['table heading action']='Action';
+$lang['table heading id']='n°';
+$lang['table heading group discount']='Remise';
+$lang['table heading normal price']='Prix';
+$lang['table heading group price']='Prix de ce groupe';
+
+
$lang['entry groups name']='Groupe  Nom :';
$lang['entry group name max length']='  Longueur maximum : 32 caractères';
$lang['entry group show tax']='Voir prix avec/sans taxe :';
Modified: trunk/extensions/CUSTOMERS_GROUPS_stable/catalog/admin/includes/modules/pages/customers_groups.php
===================================================================
--- trunk/extensions/CUSTOMERS_GROUPS_stable/catalog/admin/includes/modules/pages/customers_groups.php 2011-11-06 19:42:35 UTC (rev 3868)
+++ trunk/extensions/CUSTOMERS_GROUPS_stable/catalog/admin/includes/modules/pages/customers_groups.php 2011-11-07 09:13:07 UTC (rev 3869)
@@ -1,16 +1,19 @@
<?php if (!defined('HTTP_SERVER')) die('You can not access this file directly!');
/**
@licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.0.9
- @date 20/07/10, 15:25
+ @version 2.1.1
+ @sub-package Customers_groups
+ @sub-version 2.4
+ @date 07/11/11, 10:04
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
- @class currencies
+ @class customers_groups
*/
class customers_groups
- implements ExtModPage, InterfacedTJsonS, InterfaceModule {
+ implements ExtModPage, InterfacedTJsonS {
const FILENAME = FILENAME_CUSTOMERS_GROUPS;
@@ -52,28 +55,29 @@
case 'update':
$error = false;
- $customers_group_id = tep_db_prepare_input($_GET['cID']);
- $customers_group_name = tep_db_prepare_input($_POST['customers_group_name']);
- $customers_group_show_tax = tep_db_prepare_input($_POST['customers_group_show_tax']);
- $customers_group_tax_exempt = tep_db_prepare_input($_POST['customers_group_tax_exempt']);
- $group_payment_allowed = '';
- if ($_POST['payment_allowed'] && $_POST['group_payment_settings'] == '1') {
- foreach($_POST['payment_allowed'] as $val) {
- if ($val == true) {
- $group_payment_allowed .= tep_db_prepare_input($val).';';
- }
- } // end while
- $group_payment_allowed = substr($group_payment_allowed,0,strlen($group_payment_allowed)-1);
- } // end if ($_POST['payment_allowed'])
- $group_shipment_allowed = '';
- if ($_POST['shipping_allowed'] && $_POST['group_shipment_settings'] == '1') {
- foreach($_POST['shipping_allowed'] as $val) {
- if ($val == true) {
- $group_shipment_allowed .= tep_db_prepare_input($val).';';
- }
- } // end while
- $group_shipment_allowed = substr($group_shipment_allowed,0,strlen($group_shipment_allowed)-1);
- } // end if ($_POST['shipment_allowed'])
+ $customers_group_id = tep_db_prepare_input($_GET['gID']);
+ $customers_group_name = tep_db_prepare_input($_POST['customers_group_name']);
+ $customers_group_show_tax = tep_db_prepare_input($_POST['customers_group_show_tax']);
+ $customers_group_tax_exempt = tep_db_prepare_input($_POST['customers_group_tax_exempt']);
+ $customers_group_discount = tep_db_prepare_input($_POST['customers_group_discount']);
+ $group_payment_allowed = '';
+ if ($_POST['payment_allowed'] && $_POST['group_payment_settings'] == '1') {
+ foreach($_POST['payment_allowed'] as $val) {
+ if ($val == true) {
+ $group_payment_allowed .= tep_db_prepare_input($val).';';
+ }
+ } // end while
+ $group_payment_allowed = substr($group_payment_allowed,0,strlen($group_payment_allowed)-1);
+ } // end if ($_POST['payment_allowed'])
+ $group_shipment_allowed = '';
+ if ($_POST['shipping_allowed'] && $_POST['group_shipment_settings'] == '1') {
+ foreach($_POST['shipping_allowed'] as $val) {
+ if ($val == true) {
+ $group_shipment_allowed .= tep_db_prepare_input($val).';';
+ }
+ } // end while
+ $group_shipment_allowed = substr($group_shipment_allowed,0,strlen($group_shipment_allowed)-1);
+ } // end if ($_POST['shipment_allowed'])
$group_tax_rates_exempt = '';
if ($_POST['group_tax_rate_exempt_id'] && $_POST['group_tax_rate_exempt_settings'] == '1') {
foreach($_POST['group_tax_rate_exempt_id'] as $val) {
@@ -93,24 +97,25 @@
$group_order_total_allowed = substr($group_order_total_allowed,0,strlen($group_order_total_allowed)-1);
} // end if ($_POST['order_total_allowed'])
- tep_db_query("update " . TABLE_CUSTOMERS_GROUPS . " set customers_group_name='" . $customers_group_name . "', customers_group_show_tax = '" . $customers_group_show_tax . "', customers_group_tax_exempt = '" . $customers_group_tax_exempt . "', group_payment_allowed = '". $group_payment_allowed ."', group_shipment_allowed = '". $group_shipment_allowed ."', group_order_total_allowed = '". $group_order_total_allowed ."', group_specific_taxes_exempt = '". $group_tax_rates_exempt ."' where customers_group_id = '" . $customers_group_id ."'");
- tep_redirect(tep_href_link(self::FILENAME, tep_get_all_get_params(array('cID', 'action')) . 'cID=' . $customers_group_id));
+ tep_db_query("update " . TABLE_CUSTOMERS_GROUPS . " set customers_group_name='" . $customers_group_name . "', customers_group_show_tax = '" . $customers_group_show_tax . "', customers_group_tax_exempt = '" . $customers_group_tax_exempt . "', group_payment_allowed = '". $group_payment_allowed ."', group_shipment_allowed = '". $group_shipment_allowed ."', group_order_total_allowed = '". $group_order_total_allowed ."', group_specific_taxes_exempt = '". $group_tax_rates_exempt ."', group_discount = '".$customers_group_discount."' where customers_group_id = '" . $customers_group_id ."'");
+ tep_redirect(tep_href_link(self::FILENAME, tep_get_all_get_params(array('gID', 'action')) . 'gID=' . $customers_group_id));
break;
case 'deleteconfirm':
- $group_id = tep_db_prepare_input($_GET['cID']);
+ $group_id = tep_db_prepare_input($_GET['gID']);
tep_db_query("delete from " . TABLE_CUSTOMERS_GROUPS . " where customers_group_id= " . $group_id);
$customers_id_query = tep_db_query("select customers_id from " . TABLE_CUSTOMERS . " where customers_group_id=" . $group_id);
while($customers_id = tep_db_fetch_array($customers_id_query)) {
tep_db_query("UPDATE " . TABLE_CUSTOMERS . " set customers_group_id = '0' where customers_id=" . $customers_id['customers_id']);
}
- tep_redirect(tep_href_link(self::FILENAME, tep_get_all_get_params(array('cID', 'action'))));
+ tep_redirect(tep_href_link(self::FILENAME, tep_get_all_get_params(array('gID', 'action'))));
break;
case 'new' :
$customers_group_name = (isset($_POST['customers_group_name'])) ?tep_db_prepare_input($_POST['customers_group_name']) : __('new groupe');
$customers_group_tax_exempt = (isset($_POST['customers_group_tax_exempt'])) ?tep_db_prepare_input($_POST['customers_group_tax_exempt']) : false;
$customers_group_show_tax = (isset($_POST['customers_group_show_tax'])) ?tep_db_prepare_input($_POST['customers_group_show_tax']):true;
+ $customers_group_discount = (isset($_POST['customers_group_discount'])) ?tep_db_prepare_input($_POST['customers_group_discount']) : 0;
$group_payment_allowed = '';
if ($_POST['payment_allowed']) {
foreach($_POST['payment_allowed'] as $val) {
@@ -151,7 +156,7 @@
$last_id_query = tep_db_query("select MAX(customers_group_id) as last_cg_id from " . TABLE_CUSTOMERS_GROUPS . "");
$last_cg_id_inserted = tep_db_fetch_array($last_id_query);
$new_cg_id = $last_cg_id_inserted['last_cg_id'] +1;
- tep_db_query("insert into " . TABLE_CUSTOMERS_GROUPS . " set customers_group_id = " . $new_cg_id . ", customers_group_name = '" . tep_db_input($customers_group_name) . "', customers_group_show_tax = '" . $customers_group_show_tax . "', customers_group_tax_exempt = '" . $customers_group_tax_exempt . "', group_payment_allowed = '". $group_payment_allowed ."', group_shipment_allowed = '". $group_shipment_allowed ."', group_order_total_allowed = '". $group_order_total_allowed ."', group_specific_taxes_exempt = '". $group_tax_rates_exempt ."'");
+ tep_db_query("insert into " . TABLE_CUSTOMERS_GROUPS . " set customers_group_id = " . $new_cg_id . ", customers_group_name = '" . tep_db_input($customers_group_name) . "', customers_group_show_tax = '" . $customers_group_show_tax . "', customers_group_tax_exempt = '" . $customers_group_tax_exempt . "', group_payment_allowed = '". $group_payment_allowed ."', group_shipment_allowed = '". $group_shipment_allowed ."', group_order_total_allowed = '". $group_order_total_allowed ."', group_specific_taxes_exempt = '". $group_tax_rates_exempt ."' , group_discount = '". $customers_group_discount ."' ");
tep_redirect(tep_href_link(self::FILENAME, tep_get_all_get_params(array('action'))));
break;
}
@@ -189,23 +194,59 @@
$DB=Database::getInstance();
- $currency_query_raw = "select g.* from " . TABLE_CUSTOMERS_GROUPS . " g WHERE customers_group_id='".$ID."' ";
- $currency_query = $DB->query($currency_query_raw);
+ $_query_raw = "select g.* from " . TABLE_CUSTOMERS_GROUPS . " g WHERE customers_group_id='".$ID."' ";
+ $_query = $DB->query($_query_raw);
- return new objectInfo($currency_query->fetchAssoc() );
+ $grp = new objectInfo($_query->fetchAssoc() );
+
+ $_query_raw = "select * from " . TABLE_CUSTOMERS . " WHERE customers_group_id='".$ID."' ";
+ $_query = $DB->query($_query_raw);
+
+ $grp->customers = $_query->fetchAllAssoc();
+ $grp->customers_count = count($grp->customers);
+
+ $_query_raw = "select * from " . TABLE_PRODUCTS . " p LEFT JOIN " . TABLE_PRODUCTS_GROUPS . " pg USING(products_id) WHERE customers_group_id='".$ID."' ";
+ $_query = $DB->query($_query_raw);
+
+ $grp->products = $_query->fetchAllAssoc();
+ $grp->products_count = count($grp->products);
+
+
+ return $grp;
+
}
public function display_view(){
+
+ $function = __FUNCTION__;
+
+
switch (self::$action) {
+ case 'customers_listing':
+ $action='listing';
+ $function = 'customers' ;
+ self::$cInfo=self::load_db_values((isset($_GET['gID'])?(int)$_GET['gID'] : 0));
+ break;
+
+
+ case 'confirm':
+ self::$cInfo=self::load_db_values((isset($_GET['gID'])?(int)$_GET['gID'] : 0));
+// return tep_get_include_contents(__CLASS__.'.delete');
+ $action='delete';
+ break;
case 'new':
case 'edit':
- self::$cInfo=self::load_db_values((isset($_GET['cID'])?(int)$_GET['cID'] : 0));
- return tep_get_include_contents(self::$code.'.edit');
+ self::$cInfo=self::load_db_values((isset($_GET['gID'])?(int)$_GET['gID'] : 0));
+// return tep_get_include_contents(self::$code.'.edit');
+ $action='edit';
break;
default:
self::tep_get_list();
- return tep_get_include_contents(self::$code.'.listing');
+// return tep_get_include_contents(self::$code.'.listing');
+ $action='listing';
+
}
+ return MGabCont::CallGab($action,$function,__CLASS__);
}
/**
@@ -215,8 +256,8 @@
*/
public static function get_array_mod($type){
$m=array();
- $etat='customers_'.$type.'_allowed';
- $mod_allowed = explode (";",self::$cInfo->$etat);
+ $etat='group_'.(($type!='shipping') ? $type : 'shipment').'_allowed';
+ $mod_allowed = explode (",",self::$cInfo->$etat);
$module_active = explode (";",constant(strtoupper('MODULE_'.$type.'_INSTALLED')));
$installed_modules = array();
for ($i = 0, $n = sizeof($module_active); $i < $n; $i++) {
@@ -224,7 +265,7 @@
$class = substr($file, 0, strrpos($file, '.'));
if(!empty($class)){
$installed_modules[] = $file;
- $m[]=array('input'=> tep_draw_checkbox_field($type.'_allowed[' . $i . ']', $class , $file, (in_array ($file, $mod_allowed)&& tep_not_null($cInfo->$etat)) ? 1 : 0),
+ $m[]=array('input'=> tep_draw_checkbox_field($type.'_allowed[' . $i . ']', $class , $file, ((in_array ($file,$mod_allowed)) ? 1 : 0) ),
'name'=>$class
);
}
@@ -232,55 +273,31 @@
return $m;
}
- public static function get_right_bar(){
- global $currencies;
- $heading = array();
- $contents = array();
- if(isset($_GET['cID'])) $cInfo=self::load_db_values($_GET['cID']);
+ /** public static InterfacedTJsonS */
- switch (self::$action) {
- case 'confirm':
- if ($_GET['cID'] != '0') {
- $heading[] = array('text' => '<b>' . __('text info heading delete group') . '</b>');
- $contents = array('form' => tep_draw_form('customers_groups', self::FILENAME, tep_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_group_id . '&action=deleteconfirm'));
- $contents[] = array('text' => __('text delete intro') . '<br /><br /><strong>' . $cInfo->customers_group_name . ' </strong>');
- $contents[] = array('align' => 'center', 'text' => '<br />' . tep_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a class="button" href="' . tep_href_link(self::FILENAME, tep_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_group_id) . '">' . IMAGE_CANCEL . '</a>');
- } else {
- $heading[] = array('text' => ''. tep_draw_separator('pixel_trans.gif', '11', '12') .' <br /><strong>' . __('text info heading delete group') . '</strong>');
- $contents[] = array('text' => 'You are not allowed to delete this group:<br /><br /><strong>' . $cInfo->customers_group_name . ' </strong>');
- }
- break;
- default:
- if (is_object($cInfo)) {
- $heading[] = array('text' => '<b>' . $cInfo->customers_group_name . '</b>');
- $contents[] = array('align' => 'center', 'text' => '<a class="button" href="' . tep_href_link(self::FILENAME, tep_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_group_id . '&action=edit') . '">' . IMAGE_EDIT . '</a> <a class="button" href="' . tep_href_link(self::FILENAME, tep_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_group_id . '&action=confirm') . '">' . IMAGE_DELETE . '</a>');
+ private static function get_item_action($grp){
- }
- break;
- }
+ return sprintf(
+ CsrtAction::getFormat('row_action'),
+ '' ,
+// sprintf(CsrtAction::getLink('row_action_right', __('customers in groups'), 'info_listing'), '', tep_href_link(self::FILENAME, 'gID=' . $grp['customers_group_id'] . '&action=customers_listing') ,'' ).
+// sprintf(CsrtAction::getLink('row_action_right', __('products in groups'), 'info_listing'), '', tep_href_link(self::FILENAME, 'gID=' . $grp['customers_group_id'] . '&action=products_listing') ,'' ).
- if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) {
- $box = new box;
- echo $box->infoBox($heading, $contents);
-
- }
+ sprintf(CsrtAction::getLink('row_action_right', IMAGE_EDIT, 'edit'), '', tep_href_link(self::FILENAME, 'gID=' . $grp['customers_group_id']. '&action=edit') ,'' ).
+ (($grp['customers_group_id'] !=0)
+ ? sprintf(CsrtAction::getLink('row_action_right', IMAGE_DELETE, 'delete'), 'fancy', tep_href_link(self::FILENAME, 'gID=' . $grp['customers_group_id'] . '&action=confirm') ,'' )
+ : ''
+ )
+// sprintf(CsrtAction::getLink('row_action_right', __('image view public') , 'publiclink'), '', tep_catalog_href_link('product_info.php', 'products_id=' . $grp['products_id']) ,' target="blank"' )
+ );
}
-
- /** public static InterfacedTJsonS */
-
- private static function get_item_action($currency){
- $s ='<span class="view fils fleft">'.
- '<a class="buttonimg" href="' . tep_href_link(self::FILENAME, 'cID=' . $currency['customers_group_id']. '&action=edit') . '">' . tep_image(DIR_WS_ICONS . 'icon_edit.png',IMAGE_EDIT) . '</a> ';
- //! block delete groupe id = 0
- if($currency['customers_group_id'] !=0) $s .='<a class="buttonimg" href="' . tep_href_link(self::FILENAME, 'cID=' . $currency['customers_group_id'] . '&action=delete') . '">' . tep_image(DIR_WS_ICONS . 'icon_delete.png',IMAGE_DELETE ). '</a>';
-
- return $s . '</span>';
- }
-
public static function tep_get_modele(){
- return array( 'customers_group_name'
+ return array( 'customers_group_id'=>true,
+ 'customers_group_name'=>true,
+ 'group_discount'=>true,
+ 'action'=>false
);
}
@@ -289,19 +306,20 @@
$DB=Database::getInstance();
- $query_raw="select g.customers_group_id, g.customers_group_name from " . TABLE_CUSTOMERS_GROUPS . " g " . $sWhere." ORDER BY ".((!empty($sOrder)) ? $sOrder : 'g.customers_group_name ASC');
- $currency_split = new splitPageResults($page, $rowbyp, $query_raw, $query_numrows);
+ $query_raw="select g.customers_group_id, g.customers_group_name , group_discount from " . TABLE_CUSTOMERS_GROUPS . " g " . $sWhere." ORDER BY ".((!empty($sOrder)) ? $sOrder : 'g.customers_group_name ASC');
+ $_split = new splitPageResults($page, $rowbyp, $query_raw, $query_numrows);
- $currency_query = $DB->query($query_raw);
+ $_query = $DB->query($query_raw);
- while ($currency = $currency_query->fetchAssoc() ) {
- self::$list[]=$currency;
+ while ($grp = $_query->fetchAssoc() ) {
+ $grp['group_discount'] .=' %';
+ $grp['action']=self::get_item_action($grp);
+ self::$list[]=$grp;
}
$li=$res=array();
foreach(self::$list as $item){
- foreach(self::tep_get_modele() as $k) $li[$k]=$item[$k];
- $li['action']=self::get_item_action($item);
+ foreach(self::tep_get_modele() as $k=>$v) $li[$k]=$item[$k];
$res[]=$li;
}
@@ -309,13 +327,6 @@
}
-
- /** Interface module */
-
- function check() { return false; }
- function install() { return false; }
- function remove() { return false; }
- function keys() { return false; }
}
?>
\ No newline at end of file
Modified: trunk/extensions/CUSTOMERS_GROUPS_stable/install.xml
===================================================================
--- trunk/extensions/CUSTOMERS_GROUPS_stable/install.xml 2011-11-06 19:42:35 UTC (rev 3868)
+++ trunk/extensions/CUSTOMERS_GROUPS_stable/install.xml 2011-11-07 09:13:07 UTC (rev 3869)
@@ -1,20 +1,24 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<contrib>
<description><!-- Description of the contribution -->
- <details contrib_ref="" forum_ref="" contrib_type="aca" status="0" last_update="2010-07-19" />
+ <details contrib_ref="" forum_ref="" contrib_type="aca" status="0" last_update="2011-11-09" />
<author_pkg>www.oscim.fr</author_pkg>
<comments><![CDATA[ ]]></comments>
<credits>oscim</credits>
- <version>2.0</version>
+ <version>2.4</version>
<post_install_notes><![CDATA[ ]]></post_install_notes>
</description>
<!-- Install new files -->
<addfile>
<file name="admin/includes/modules/pages/customers_groups.php" />
- <file name="admin/includes/gabarit/customers_groups.listing.gab" />
- <file name="admin/includes/gabarit/customers_groups.edit.gab" />
+
+ <file name="admin/includes/gabarit/customers_groups/display_view.listing.gab" />
+ <file name="admin/includes/gabarit/customers_groups/display_view.edit.gab" />
+ <file name="admin/includes/gabarit/customers_groups/display_view.delete.gab" />
+
<file name="admin/includes/modules/account/sppc_cust_force.php" />
+ <file name="admin/includes/gabarit/customers.customers_groups.edit.gab" />
</addfile>
<!-- LAng -->
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2011-11-06 19:42:41
|
Revision: 3868
http://oscss.svn.sourceforge.net/oscss/?rev=3868&view=rev
Author: oscim
Date: 2011-11-06 19:42:35 +0000 (Sun, 06 Nov 2011)
Log Message:
-----------
correction coquille
Ajout class installer pour lire des fichiers sql
Modified Paths:
--------------
trunk/catalog/install/includes/functions/database.php
Added Paths:
-----------
trunk/catalog/admin/includes/exts/package/tags/filesql.php
Added: trunk/catalog/admin/includes/exts/package/tags/filesql.php
===================================================================
--- trunk/catalog/admin/includes/exts/package/tags/filesql.php (rev 0)
+++ trunk/catalog/admin/includes/exts/package/tags/filesql.php 2011-11-06 19:42:35 UTC (rev 3868)
@@ -0,0 +1,279 @@
+<?php
+/**
+ @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 06/11/11, 15:12
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+ @class Tc_filesql
+ @brief install/remove table and data based in file and folder
+ @example
+ <filesql></filesql>
+*/
+
+
+class Tc_filesql
+ extends ContribInstallerBaseTag
+ {
+
+ public $tag_name='filesql';
+
+ public $priority = 200;
+
+
+ /**
+ @brief Constructor
+ */
+ function Tc_filesql($contrib='', $id='', $xml_data='', $dep='') {
+ $this->params=array(
+ 'tables'=>array(
+ 'sql_type'=>'text',
+ 'xml_error'=>__('no query tag in sql section text')
+ ),
+ 'keys'=>array(
+ 'sql_type'=>'text',
+ 'xml_error'=>__('no query tag in sql section text')
+ ),
+ 'data'=>array(
+ 'sql_type'=>'text',
+ 'xml_error'=>__('no query tag in sql section text')
+ ),
+ 'remove_tables'=>array(
+ 'sql_type'=>'text',
+ 'xml_error'=>__('no query tag in sql section text')
+ ),
+ 'remove_keys'=>array(
+ 'sql_type'=>'text',
+ 'xml_error'=>__('no query tag in sql section text')
+ ),
+ 'remove_data'=>array(
+ 'sql_type'=>'text',
+ 'xml_error'=>__('no query tag in sql section text')
+ ),
+ );
+ $this->ContribInstallerBaseTag($contrib, $id, $xml_data, $dep);
+ }
+
+
+
+ /**
+ @brief create virtual data xml based in folder and file
+ */
+ function get_data_from_xml_parser($xml_data='') {
+
+ $dbtype = DB_MOTOR_TYPE;
+ $dbmotor = strtolower(DB_CONNECTOR);
+ $action='install';
+ $path=DIR_FS_CIP.$this->contrib.'/'.'sql/'.$dbmotor.'/'.$action.'/';
+
+ $files=$this->SqlFileBrowse($path);
+
+ foreach($files[0] as $row){
+ $this->data['tables'][] = $row;
+ }
+ foreach($files[1] as $row){
+ $this->data['keys'][] = $row;
+ }
+ foreach($files[2] as $row){
+ $this->data['data'][] = $row;
+ }
+
+ $action='remove';
+ $path=DIR_FS_CIP.$this->contrib.'/'.'sql/'.$dbmotor.'/'.$action.'/';
+ $files=$this->SqlFileBrowse($path);
+
+ foreach($files[0] as $row){
+ $this->data['remove_tables'][] = $row;
+ }
+ foreach($files[1] as $row){
+ $this->data['remove_keys'][] = $row;
+ }
+ foreach($files[2] as $row){
+ $this->data['remove_data'][] = $row;
+ }
+
+ }
+
+
+
+ function do_install($data='') {
+
+ $dbtype = DB_MOTOR_TYPE;
+ $dbmotor = strtolower(DB_CONNECTOR);
+ $action='install';
+ $path=DIR_FS_CIP.$this->contrib.'/'.'sql/'.$dbmotor.'/'.$action.'/';
+
+ foreach($this->data['tables'] as $row){
+ $this->SqlFileProcess( $path.'/tables/' . $row, DB_TABLE_PREFIX );
+ }
+ foreach($this->data['keys'] as $row){
+ $this->SqlFileProcess( $path.'/tables/' . $row, DB_TABLE_PREFIX );
+ }
+ foreach($this->data['data'] as $row){
+ $this->SqlFileDataProcess( $path.'/data/' . $row, DB_TABLE_PREFIX );
+ }
+
+ return true;
+ }
+
+ function do_remove() {
+
+ $dbtype = DB_MOTOR_TYPE;
+ $dbmotor = strtolower(DB_CONNECTOR);
+ $action='remove';
+ $path=DIR_FS_CIP.$this->contrib.'/'.'sql/'.$dbmotor.'/'.$action.'/';
+
+ foreach($this->data['remove_tables'] as $row){
+ $this->SqlFileProcess( $path.'/tables/' . $row, DB_TABLE_PREFIX );
+ }
+ foreach($this->data['remove_keys'] as $row){
+ $this->SqlFileProcess( $path.'/tables/' . $row, DB_TABLE_PREFIX );
+ }
+ foreach($this->data['remove_data'] as $row){
+ $this->SqlFileDataProcess( $path.'/data/' . $row, DB_TABLE_PREFIX );
+ }
+
+ return true;
+ }
+
+ public function permissions_check_for_install() { return true; }
+ public function conflicts_check_for_install() { return true; }
+ public function permissions_check_for_remove() { return true; }
+ public function conflicts_check_for_remove() { return true; }
+
+
+
+
+/** =============================================================== PRIVATE =============================================================== */
+
+
+
+ /**
+ @brief ordonne les fichier pour l'install
+ @param path path directory for scan
+ @return array
+ [0] tables
+ [1] keys
+ [2] data
+ */
+ function SqlFileBrowse($path){
+
+ $result=array();
+ $result[0]=array();
+ $result[1]=array();
+ $result[2]=array();
+
+
+
+ foreach(scan($path.'tables/') as $row){
+ if(substr($row,-1) !='~') {
+ if(strpos($row , '.key')===false)
+ $result[0][]=$row;
+
+ elseif(strpos($row , '.key') > 0){
+ if(DB_MOTOR_TYPE =='InnoDB')
+ $result[1][]=$row;
+ }
+ }
+ }
+
+ foreach(scan($path.'data/') as $row){
+ if(substr($row,-1) !='~')
+ $result[2][]=$row;
+ }
+
+
+ return $result;
+
+ }
+
+
+ /**
+ @brief Process for load and install .sql or .key.sql
+ */
+ function SqlFileDataProcess( $sql_file, $table_prefix = -1,$file_lg_sample='') {
+ global $language;
+ $buffer = '';
+ $lg=false;
+
+
+ if( $file_lg_sample !='')include($file_lg_sample);
+ else{
+// $file_lg= dirname($_SERVER['SCRIPT_FILENAME']).'/'.WS_LANGUAGE.DC_LOADER_LANG.'/'.preg_replace(array('#(.sql)#i','#^([0-9]*_)#i'),array('.txt','') ,basename($sql_file));
+// if(file_exists($file_lg))include($file_lg);
+ }
+
+ $fp = fopen($sql_file, 'rb');
+
+ while (!feof ($fp)){
+ $buf = fgets($fp, 4096);
+ if (substr($buf, 0, 2) <> '--' ){
+ $buf=preg_replace('/--(.+)*/' ,'',$buf);
+ $buffer .= $buf;
+ }
+ }
+
+ $DB=Database::getInstance();
+ $repl = ((is_array($lg) && count($lg) >0)? true : false);
+ $buffer=preg_replace('/[ ](OSC_)([A-Z])/i', ' '.$table_prefix.'$2',$buffer);
+ $buffer = trim($buffer);
+
+ $query=preg_split("/\n/i",$buffer,-1,PREG_SPLIT_NO_EMPTY);
+
+
+ if($repl) {
+ $lg_k = array_keys($lg);
+ $lg_v = array_map('addslashes',$lg);
+ }
+ foreach($query as $row){
+ $row = trim($row);
+ if(strlen($row) > 3){
+ $sql=($repl)? str_replace($lg_k,$lg_v,$row) : $row ;
+
+ $DB->query($row);
+
+ }
+ }
+
+ }
+
+ /**
+ @brief Process for load and install .sql or .key.sql
+ */
+ function SqlFileProcess( $sql_file, $table_prefix = -1) {
+
+ $buffer = '';
+ $lg=false;
+
+ $fp = fopen($sql_file, 'rb');
+
+ while (!feof ($fp)){
+ $buf = fgets($fp, 4096);
+ if (substr($buf, 0, 2) <> '--' ){
+ $buf=preg_replace('/--(.+)*/' ,'',$buf);
+ $buffer .= $buf;
+ }
+ }
+ fclose($fp);
+
+
+ $DB=Database::getInstance();
+
+ $buffer=preg_replace('/[ ](OSC_)([A-Z])/i', ' '.$table_prefix.'$2',$buffer);
+
+ $query=explode(';',$buffer);
+ foreach($query as $row){
+ $row = trim($row);
+ if(strlen($row) > 3){
+ $DB->query($row);
+ }
+ }
+
+ }
+
+
+}
+
+?>
\ No newline at end of file
Modified: trunk/catalog/install/includes/functions/database.php
===================================================================
--- trunk/catalog/install/includes/functions/database.php 2011-11-05 08:16:39 UTC (rev 3867)
+++ trunk/catalog/install/includes/functions/database.php 2011-11-06 19:42:35 UTC (rev 3868)
@@ -277,14 +277,14 @@
$query=preg_split ("/(;[ ]{0,}\n)/i",$buffer);
- if(is_array($lg)) {
+ if($repl) {
$lg_k = array_keys($lg);
$lg_v = array_map('addslashes',$lg);
}
foreach($query as $row){
$row = trim($row);
if(strlen($row) > 3){
- $sql=(is_array($lg))? str_replace($lg_k,$lg_v,$row) : $row ;
+ $sql=($repl)? str_replace($lg_k,$lg_v,$row) : $row ;
$DB->query($row);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2011-11-05 08:16:46
|
Revision: 3867
http://oscss.svn.sourceforge.net/oscss/?rev=3867&view=rev
Author: oscim
Date: 2011-11-05 08:16:39 +0000 (Sat, 05 Nov 2011)
Log Message:
-----------
correction coquille
Modified Paths:
--------------
trunk/catalog/admin/includes/modules/pages/products.php
trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/content/account_edit.php
trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/content/advanced_search.php
trunk/catalog/install/includes/functions/unzip.php
Modified: trunk/catalog/admin/includes/modules/pages/products.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/products.php 2011-11-04 16:26:25 UTC (rev 3866)
+++ trunk/catalog/admin/includes/modules/pages/products.php 2011-11-05 08:16:39 UTC (rev 3867)
@@ -567,7 +567,6 @@
}
private static function emptyResult(){
-// return array( 'null', 'id', 'image', 'pv.typeID', 'model', 'name', 'categorie', 'quantity', 'price', 'status', 'action' );
$mod[] = 'null';
$mod[] = 'null';
$mod[] = 'null';
@@ -604,7 +603,7 @@
if(self::$cPath>0) self::$DiversInfo['current_category_id']=self::$cPath;
else self::$DiversInfo['current_category_id']=(isset($options['current_category_id'])?$options['current_category_id'] :'');
- $sta=(!empty(self::$Vtype)? " AND pv.typeID ='".(int)self::$Vtype."' " : '' );
+ $sta=(!empty(self::$Vtype)? " AND p.products_type ='".(int)self::$Vtype."' " : '' );
$DB=Database::getInstance();
$listing_products=array();
@@ -630,7 +629,7 @@
$pq=$DB->query($products_query);
while ($products = tep_db_fetch_array($pq)) {
-// $products['pv.typeID']=(!empty($products['typeID'])? $products['typeID']: '0');
+
$products['products_image']=(!empty($products['products_image']))
? tep_info_image($products['products_image'], $products['products_name'], TEMP_BO_SMALL_IMAGE_WIDTH, TEMP_BO_SMALL_IMAGE_HEIGHT)
: tep_info_image(IMAGE_NONEXISTENT, $products['products_name'], TEMP_BO_SMALL_IMAGE_WIDTH, TEMP_BO_SMALL_IMAGE_HEIGHT) ;
Modified: trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/content/account_edit.php
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/content/account_edit.php 2011-11-04 16:26:25 UTC (rev 3866)
+++ trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/content/account_edit.php 2011-11-05 08:16:39 UTC (rev 3867)
@@ -10,12 +10,12 @@
$account = $page->_call('customer','the_customer');
?>
-<header>
+<header class="main-content">
<h1 class="content title <?php echo $language ;?>"><?php echo HEADING_TITLE_7; ?></h1>
</header>
-<div id="accountEdit">
+<div id="accountEdit" class="main-content">
<?php $page->messageStack->_draw('account_edit');?>
@@ -25,13 +25,13 @@
<fieldset class="account">
<legend><?php echo MY_ACCOUNT_TITLE; ?></legend>
-
+ <ul>
<?php if ( $page->_draw_in_page('ACCOUNT_GENDER')) {
$male = ($account['customers_gender'] == 'm' ? true : false);
$female = ($account['customers_gender'] == 'f'? true : false);
$mlle = ($account['customers_gender'] == 'l' ? true : false);
?>
- <p class="gender">
+ <li class="BlockRows gender">
<label><?php echo ENTRY_GENDER; ?></label>
<?php echo tep_draw_radio_field('gender','male', 'm', $male) ;?>
<?php echo MALE ;?>
@@ -40,61 +40,61 @@
<?php echo tep_draw_radio_field('gender','mlle', 'l', $mlle) ;?>
<?php echo MLLE ;?>
<?php echo (tep_not_null(ENTRY_GENDER_TEXT) ? '<span class="inputRequirement">' . ENTRY_GENDER_TEXT . '</span>': ''); ?>
- </p>
+ </li>
<?php } ?>
- <p>
+
+
+ <li class="BlockRows">
<label for="accountEditFirstname"><?php echo ENTRY_FIRST_NAME; ?></label>
- <?php echo tep_draw_input_field('firstname','accountEditFirstname', $account['customers_firstname']) . ' ' . (tep_not_null(ENTRY_FIRST_NAME_TEXT) ? '<span class="inputRequirement">' . ENTRY_FIRST_NAME_TEXT . '</span>': ''); ?>
- </p>
+ <?php echo tep_draw_input_field('firstname','accountEditFirstname', $account['customers_firstname']) . ' ' . (tep_not_null(ENTRY_FIRST_NAME_TEXT) ? '<span class="inputRequirement">' . ENTRY_FIRST_NAME_TEXT . '</span>': ''); ?>
+ </li>
- <p>
+ <li class="BlockRows">
<label for="accountEditLastname"><?php echo ENTRY_LAST_NAME; ?></label>
<?php echo tep_draw_input_field('lastname','accountEditLastname', $account['customers_lastname']) . ' ' . (tep_not_null(ENTRY_LAST_NAME_TEXT) ? '<span class="inputRequirement">' . ENTRY_LAST_NAME_TEXT . '</span>': ''); ?>
- </p>
+ </li>
- <?php if ( $page->_draw_in_page('ACCOUNT_DOB')) { ?>
- <p>
+ <?php if ( $page->_draw_in_page('ACCOUNT_DOB')): ?>
+ <li class="BlockRows">
<label for="accountEditDob"><?php echo ENTRY_DATE_OF_BIRTH; ?></label>
<?php echo tep_draw_input_field('dob','accountEditDob', tep_date_short($account['customers_dob'])) . ' ' . (tep_not_null(ENTRY_DATE_OF_BIRTH_TEXT) ? '<span class="inputRequirement">' . ENTRY_DATE_OF_BIRTH_TEXT . '</span>': ''); ?>
- </p>
- <?php } ?>
+ </li>
+ <?php endif; ?>
- <p>
+ <li class="BlockRows">
<label for="accountEditEmail"><?php echo ENTRY_EMAIL_ADDRESS; ?></label>
<?php echo tep_draw_input_field('email_address', 'accountEditEmail',$account['customers_email_address']) . ' ' . (tep_not_null(ENTRY_EMAIL_ADDRESS_TEXT) ? '<span class="inputRequirement">' . ENTRY_EMAIL_ADDRESS_TEXT . '</span>': ''); ?>
- </p>
+ </li>
- <p>
+ <li class="BlockRows">
<label for="accountEditPhone"><?php echo ENTRY_TELEPHONE_NUMBER; ?></label>
<?php echo tep_draw_input_field('telephone','accountEditPhone', $account['customers_telephone']) . ' ' . (tep_not_null(ENTRY_TELEPHONE_NUMBER_TEXT) ? '<span class="inputRequirement">' . ENTRY_TELEPHONE_NUMBER_TEXT . '</span>': ''); ?>
- </p>
+ </li>
<?php if (_cst_bool('ACCOUNT_FAXNUM')): ?>
- <p>
+ <li class="BlockRows">
<label for="accountEditFax"><?php echo ENTRY_FAX_NUMBER; ?></label>
<?php echo tep_draw_input_field('fax', 'accountEditFax',$account['customers_fax']) . ' ' . (tep_not_null(ENTRY_FAX_NUMBER_TEXT) ? '<span class="inputRequirement">' . ENTRY_FAX_NUMBER_TEXT . '</span>': ''); ?>
- </p>
+ </li>
<?php endif; ?>
+ </ul>
<!-- // BOF Customers extra fields -->
<?php echo tep_get_extra_fields($customer_id, $languages_id)?>
<!-- // EOF Customers extra fields -->
- <p class="formBt"><?php echo tep_draw_hidden_field('action', 'process') ;?><input type="submit" class="submitBt" value="<?php echo IMAGE_BUTTON_CONTINUE; ?>" /></p>
+ <p class="BlockRows Button formBt">
+ <?php echo tep_draw_hidden_field('action', 'process') ;?>
+ <input type="submit" class="submitBt" value="<?php echo IMAGE_BUTTON_CONTINUE; ?>" />
+ </p>
+
</fieldset>
</form>
- <div class="navBt">
+ <div class="Button navBt">
<?php echo '<a class="navBt" href="' . tep_href_link(FILENAME_ACCOUNT) . '">' . IMAGE_BUTTON_BACK . '</a>'; ?>
</div>
- <!-- extra divs to add extra pictures. -->
- <div class="extraDiv1"><span></span></div>
- <div class="extraDiv2"><span></span></div>
- <div class="extraDiv3"><span></span></div>
- <div class="extraDiv4"><span></span></div>
- <div class="extraDiv5"><span></span></div>
-
</div>
\ No newline at end of file
Modified: trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/content/advanced_search.php
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/content/advanced_search.php 2011-11-04 16:26:25 UTC (rev 3866)
+++ trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/content/advanced_search.php 2011-11-05 08:16:39 UTC (rev 3867)
@@ -1,94 +1,150 @@
<?php
/**
- @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
- @portion code Copyright (c) 2002 osCommerce
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @subpackage 2cShopHtml5Oscim
@package osCSS-2 <www http://www.oscss.org>
- @version 2.1.0
- @date 16/09/10, 21:53
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @date 16/09/10, 21:54
@encode UTF-8
+ @brief this page draw form for requete search in db
+ this item search is only product type
*/
+
+/**
+ @remarks Load split page , and Load the module with the result of the split
+*/
+if (isset($listing_sql) && tep_not_null($listing_sql) ){
+ $listing_split = new splitPageResults($listing_sql, $page->_conf_value('MAX_DISPLAY_SEARCH_RESULTS'), 'p.products_id');
+ $page->oscss_modules->_add(FILENAME_PRODUCT_LISTING,'center', array('listing_split'=>$listing_split,'listing_query'=>$listing_sql) );
+}
?>
-<div id="advancedSearch">
+
+<header class="main-content">
+ <h1 class="content title <?php echo $language ;?>"><?php echo HEADING_TITLE_1; ?></h1>
+</header>
+
+<div id="advancedSearch" class="main-content">
<?php $page->messageStack->_draw('search');?>
- <h2 class="content title <?php echo $language ;?>"><?php echo HEADING_TITLE_1; ?></h2>
- <?php
- if ( ($replace=$page->prop_ctrl('text_search_help_link', 'text_search_help_link')) !=false) echo $replace();
- else {
- echo '<p id="text_search_help_link" class="infoText"><a href="javascript:popupWindow(\'' . tep_href_link(FILENAME_SEARCH_HELP,'&popup=true') . '\')">' . TEXT_SEARCH_HELP_LINK . '</a></p>';
- } ?>
+ <?php /**
+ @remarks Selecteur du texte
+ 1 : Page CMS
+ 2 : plugins use prop_ctrl
+ 3 : link popup text help
+ */ ?>
+ <?php if( (($conti=tep_get_cms_content('text_search_help', true,
+ '<header>
+ <h2 class="content title '.$language.'">%s</h2>
+ </header>
+ <div class="">
+ %s
+ </div>'
+ )) !=false ) ):/** Page cms de contenu text_search_help */ ?>
+ <?php echo $conti; ?>
+ <?php elseif( ($replace=$page->prop_ctrl('text_search_help_link', 'text_search_help_link')) !=false): /** Prise en charge des plugin exploitant la propriété text_search_help_link */ ?>
+ <?php echo $replace(); ?>
+ <?php else: ?>
+ <p id="text_search_help_link" class="infoText">
+ <a href="javascript:popupWindow('<?php echo tep_href_link(FILENAME_SEARCH_HELP,'&popup=true') ?>')"><?php echo TEXT_SEARCH_HELP_LINK ?></a>
+ </p>
+ <?php endif; ?>
+
+
+
+
+
+
+
+ <?php /**
+ @remarks Block draw form
+ This search Use GET values
+ */ ?>
+
<?php echo tep_draw_form('advanced_search', tep_href_link(FILENAME_ADVANCED_SEARCH, '', 'NONSSL', false), 'get', 'onsubmit="return check_form(this);"') ;?>
<fieldset class="advancedSearch">
<legend><?php echo HEADING_SEARCH_CRITERIA ; ?></legend>
<?php echo tep_hide_session_id().tep_draw_hidden_field('search_in_description', '1') ;?>
+
<ul>
- <li>
- <label><?php echo ENTRY_KEYWORDS ; ?></label>
+ <li class="BlockRows">
+ <label for="keywords"><?php echo ENTRY_KEYWORDS ; ?></label>
<?php echo tep_draw_input_field('keywords', 'keywords','','onfocus="this.value=\'\'"') ; ?>
</li>
- <li>
- <label><?php echo ENTRY_CATEGORIES; ?></label>
- <?php echo tep_draw_pull_down_menu('categories_id', 'categories_id', tep_get_categories(array(array('id' => '', 'text' => TEXT_ALL_CATEGORIES)))); ?>
- </li>
+ <li class="BlockRows">
+ <span class="BlockInput">
+ <label for="categories_id"><?php echo ENTRY_CATEGORIES; ?></label>
+ <?php echo tep_draw_pull_down_menu('categories_id', 'categories_id', tep_get_categories(array(array('id' => '', 'text' => TEXT_ALL_CATEGORIES)))); ?>
+ </span>
- <li class="check">
- <label><?php echo ENTRY_INCLUDE_SUBCATEGORIES; ?></label>
- <?php echo tep_draw_checkbox_field('inc_subcat','inc_subcat', '1', true) ;?>
+ <span class="BlockInput">
+ <label for="inc_subcat"><?php echo ENTRY_INCLUDE_SUBCATEGORIES; ?></label>
+ <?php echo tep_draw_checkbox_field('inc_subcat','inc_subcat', '1', true) ;?>
+ </span>
</li>
<li>
- <label><?php echo ENTRY_MANUFACTURERS; ?></label>
+ <label for="manufacturers_id"><?php echo ENTRY_MANUFACTURERS; ?></label>
<?php echo tep_draw_pull_down_menu('manufacturers_id', 'manufacturers_id', tep_get_manufacturers(array(array('id' => '', 'text' => TEXT_ALL_MANUFACTURERS)))); ?>
</li>
- <li>
+ <li class="BlockRows">
+ <span class="BlockInput">
<label for="pfrom"><?php echo ENTRY_PRICE_FROM; ?></label>
<?php echo tep_draw_input_field('pfrom','pfrom'); ?>
- </li>
+ </span>
- <li>
+ <span class="BlockInput">
<label for="pto"><?php echo ENTRY_PRICE_TO; ?></label>
<?php echo tep_draw_input_field('pto','pto'); ?>
+ </span>
</li>
- <li>
+
+ <li class="BlockRows">
+ <span class="BlockInput">
<label for="dfrom"><?php echo ENTRY_DATE_FROM; ?></label>
<?php echo tep_draw_input_field('dfrom','dfrom', DOB_FORMAT_STRING, 'onfocus="this.value=\'\'"'); ?>
- </li>
+ </span>
- <li>
+ <span class="BlockInput">
<label for="dto"><?php echo ENTRY_DATE_TO; ?></label>
<?php echo tep_draw_input_field('dto','dto', DOB_FORMAT_STRING, 'onfocus="this.value=\'\'"'); ?>
+ </span>
</li>
- <li>
- <label for="dto"><?php echo ENTRY_DATE_TO; ?></label>
+<!-- <li class="BlockRows">
+ <label for="dto"><?php echo ENTRY_OPTION; ?></label>
<?php echo tep_list_option_value_dipso(); ?>
+ </li>-->
+
+ <li class="BlockRows Button">
+ <input type="submit" class="submitBt" value="<?php echo IMAGE_BUTTON_SEARCH; ?>" />
</li>
- <li class="formBt"><input type="submit" class="submitBt" value="<?php echo IMAGE_BUTTON_SEARCH; ?>" /></li>
</ul>
</fieldset>
</form>
</div>
-<?php if (isset($listing_sql) && tep_not_null($listing_sql) ) {
-$listing_split = new splitPageResults($listing_sql, $page->_conf_value('MAX_DISPLAY_SEARCH_RESULTS'), 'p.products_id');
-?>
-<div id="advancedSearchResult">
- <h2 class="content title <?php echo $language ;?>"><?php echo HEADING_TITLE_2; ?></h2>
+ <?php /**
+ @remarks Result by $string query sql $listing_sql
+ Draw title. This result use module (no type) listing product
+ and is call by template file in loop module
+ */ ?>
- <?php $page->oscss_modules->_add(FILENAME_PRODUCT_LISTING,'center', array('listing_split'=>$listing_split,'listing_query'=>$listing_sql) ); ?>
+<?php if (isset($listing_sql) && tep_not_null($listing_sql) ): ?>
+ <div id="advancedSearchResult" class="main-content">
- <div class="navBt">
- <?php echo '<a class="navBt" href="' . tep_href_link(FILENAME_ADVANCED_SEARCH, tep_get_all_get_params(array('sort', 'page')), 'NONSSL', true, false) . '">' . IMAGE_BUTTON_BACK . '</a>'; ?>
+ <h2 class="content title <?php echo $language ;?>"><?php echo HEADING_TITLE_2; ?></h2>
+
+ <div class="navBt Button">
+ <a class="navBt" href="<?php echo tep_href_link(FILENAME_ADVANCED_SEARCH, tep_get_all_get_params(array('sort', 'page')), 'NONSSL', true, false) ?>"><?php echo IMAGE_BUTTON_BACK ?></a>
+ </div>
+
</div>
-
-</div>
- <?php } ?>
\ No newline at end of file
+<?php endif; ?>
\ No newline at end of file
Modified: trunk/catalog/install/includes/functions/unzip.php
===================================================================
--- trunk/catalog/install/includes/functions/unzip.php 2011-11-04 16:26:25 UTC (rev 3866)
+++ trunk/catalog/install/includes/functions/unzip.php 2011-11-05 08:16:39 UTC (rev 3867)
@@ -57,7 +57,7 @@
// Set the rights
if(file_exists($file_name))
{
- chmod($file_name, 0777);
+ @chmod($file_name, 0777);
// echo "<span style=\"color:#1da319;\">file saved: </span>".$file_name."<br />";
}
else
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2011-11-04 16:26:35
|
Revision: 3866
http://oscss.svn.sourceforge.net/oscss/?rev=3866&view=rev
Author: oscim
Date: 2011-11-04 16:26:25 +0000 (Fri, 04 Nov 2011)
Log Message:
-----------
Refonte de l'installation (process trop lent ~1min)
Reorganisation de l'appel et la prise en charge des fichier d'install
Retouche de tous les fichiers d'install , qui doivent respecter le .sql standard, y compris sur les commentaires
Modified Paths:
--------------
trunk/catalog/install/includes/content/core.installdb.php
trunk/catalog/install/includes/functions/database.php
trunk/catalog/install/includes/sql/mysql/data/20_osc_address_format.sql
trunk/catalog/install/includes/sql/mysql/data/20_osc_countries.sql
trunk/catalog/install/includes/sql/mysql/data/20_osc_currencies.sql
trunk/catalog/install/includes/sql/mysql/data/20_osc_languages.sql
trunk/catalog/install/includes/sql/mysql/data/20_osc_status.sql
trunk/catalog/install/includes/sql/mysql/data/20_osc_zones.sql
trunk/catalog/install/includes/sql/mysql/data/40_osc_admin_groups.sql
trunk/catalog/install/includes/sql/mysql/data/40_osc_admin_users.sql
trunk/catalog/install/includes/sql/mysql/data/40_osc_categories.sql
trunk/catalog/install/includes/sql/mysql/data/40_osc_content.sql
trunk/catalog/install/includes/sql/mysql/data/40_osc_full_tag.sql
trunk/catalog/install/includes/sql/mysql/data/40_osc_navigation_links.sql
trunk/catalog/install/includes/sql/mysql/data/91_osc_admin_cip.sql
trunk/catalog/install/includes/sql/mysql/data/91_osc_admin_m_files.sql
trunk/catalog/install/includes/sql/mysql/data/91_osc_categories_description.sql
trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql
trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration_group.sql
trunk/catalog/install/includes/sql/mysql/data/91_osc_content_description.sql
trunk/catalog/install/includes/sql/mysql/data/91_osc_cronjob.sql
trunk/catalog/install/includes/sql/mysql/data/91_osc_customers_groups.sql
trunk/catalog/install/includes/sql/mysql/data/91_osc_full_tag_description.sql
trunk/catalog/install/includes/sql/mysql/data/91_osc_geo_zones.sql
trunk/catalog/install/includes/sql/mysql/data/91_osc_navigation_links_description.sql
trunk/catalog/install/includes/sql/mysql/data/91_osc_tax_class.sql
trunk/catalog/install/includes/sql/mysql/data/91_osc_tax_rates.sql
trunk/catalog/install/includes/sql/mysql/data/91_osc_zones_to_geo_zones.sql
trunk/catalog/install/includes/sql/mysql/data/92_osc_content_to_categories.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_address_book.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_address_format.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_admin_cip.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_admin_cip_depend.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_admin_groups.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_admin_m_files.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_admin_m_files_to_right.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_admin_notification.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_admin_users.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_categories.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_categories_description.key.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_categories_description.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_categories_extra.key.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_categories_extra.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_checknotif.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_configuration.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_configuration_group.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_configuration_text.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_content.key.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_content.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_content_description.key.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_content_description.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_content_to_categories.key.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_content_to_categories.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_countries.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_cronjob.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_currencies.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_customers.key.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_customers.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_customers_basket.key.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_customers_basket.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_customers_basket_attributes.key.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_customers_basket_attributes.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_customers_groups.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_customers_info.key.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_customers_info.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_customers_to_extra_fields.key.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_customers_to_extra_fields.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_extra_field_labels.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_extra_field_values.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_extra_fields.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_extra_fields_info.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_full_tag.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_full_tag_description.key.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_full_tag_description.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_geo_zones.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_holding_orders.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_holding_orders_products.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_holding_orders_products_attributes.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_holding_orders_products_download.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_holding_orders_status_history.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_holding_orders_total.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_languages.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_manufacturers.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_manufacturers_info.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_navigation_links.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_navigation_links_description.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_newsletters.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_newsletters_modeles.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_newsletters_sent.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_orders.key.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_orders.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_orders_products.key.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_orders_products.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_orders_products_attributes.key.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_orders_products_attributes.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_orders_products_download.key.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_orders_products_download.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_orders_status_history.key.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_orders_status_history.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_orders_total.key.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_orders_total.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_products.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_products_am_attributes_to_templates.key.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_products_am_attributes_to_templates.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_products_am_templates.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_products_attributes.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_products_attributes_download.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_products_attributes_groups.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_products_description.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_products_extra_fields.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_products_extra_fields_labels.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_products_extra_fields_values.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_products_groups.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_products_options.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_products_options_values.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_products_options_values_to_products_options.key.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_products_options_values_to_products_options.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_products_stock.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_products_to_categories.key.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_products_to_categories.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_products_to_products_extra_fields.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_scart.key.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_scart.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_seo_cache.key.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_seo_cache.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_sessions.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_specials.key.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_specials.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_status.key.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_status.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_tax_class.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_tax_rates.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_whos_online.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_zones.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_zones_to_geo_zones.sql
Modified: trunk/catalog/install/includes/content/core.installdb.php
===================================================================
--- trunk/catalog/install/includes/content/core.installdb.php 2011-11-04 08:06:23 UTC (rev 3865)
+++ trunk/catalog/install/includes/content/core.installdb.php 2011-11-04 16:26:25 UTC (rev 3866)
@@ -37,7 +37,7 @@
}
}
- // add key
+ // add key
if($this->db['DBMOTOR_TYPE'] =='InnoDB')
foreach(core::browse_rep($this->fs_document_root . 'install/includes/sql/mysql/tables/') as $file){
if(strpos($file['file'] , '.key') > 0){
@@ -47,13 +47,10 @@
// add data config
if ( ($db_error == false) ) {
-
- foreach(core::browse_rep($this->fs_document_root . 'install/includes/sql/mysql/data/') as $file){
-// echo $file['file'].'<br>';
- osc_db_install($this->db['DB_DATABASE'], $this->fs_document_root . 'install/includes/sql/mysql/data/'.$file['file'] , $this->db['DB_TABLE_PREFIX']);
- }
-
-
+ // data insert in db
+ foreach(core::browse_rep($this->fs_document_root . 'install/includes/sql/mysql/data/') as $file){
+ osc_db_install($this->db['DB_DATABASE'], $this->fs_document_root . 'install/includes/sql/mysql/data/'.$file['file'] , $this->db['DB_TABLE_PREFIX']);
+ }
}
if ($db_error != false) $this->PileMessage('error', core::l10n("Un problème à eu lieu durant la phase d'installation de la base de données" ) ) ;
@@ -70,7 +67,7 @@
$db_error = false;
$sql_file = $this->fs_document_root . 'install/includes/upgrade/'.$file.'.sql';
-// osc_set_time_limit(0);
+ osc_set_time_limit(0);
//
osc_db_upgrade($this->db['DB_DATABASE'], $sql_file, $this->db['DB_TABLE_PREFIX']);
//
@@ -91,6 +88,7 @@
+
/* Mise a jour db et config diverse */
osc_db_query($sql="update ".$this->db['DB_TABLE_PREFIX']."configuration set configuration_value='".$this->fs_document_root.$this->ws_admin_rand."/sessions/page_parse_time.log' where configuration_key='STORE_PAGE_PARSE_TIME_LOG'" );
osc_db_query($sql="update ".$this->db['DB_TABLE_PREFIX']."configuration set configuration_value='".substr(DC_LOADER_LANG,0,2)."' where configuration_key='DEFAULT_LANGUAGE'" );
Modified: trunk/catalog/install/includes/functions/database.php
===================================================================
--- trunk/catalog/install/includes/functions/database.php 2011-11-04 08:06:23 UTC (rev 3865)
+++ trunk/catalog/install/includes/functions/database.php 2011-11-04 16:26:25 UTC (rev 3866)
@@ -250,100 +250,46 @@
}
if (!$db_error) {
- if (file_exists($sql_file)) {
- $file_lg= dirname($_SERVER['SCRIPT_FILENAME']).'/'.WS_LANGUAGE.DC_LOADER_LANG.'/'.preg_replace(array('#(.sql)#i','#^([0-9]*_)#i'),array('.txt','') ,basename($sql_file));
+
if( $file_lg_sample !='')include($file_lg_sample);
- elseif(file_exists($file_lg))include($file_lg);
+ else{
+ $file_lg= dirname($_SERVER['SCRIPT_FILENAME']).'/'.WS_LANGUAGE.DC_LOADER_LANG.'/'.preg_replace(array('#(.sql)#i','#^([0-9]*_)#i'),array('.txt','') ,basename($sql_file));
+ if(file_exists($file_lg))include($file_lg);
+ }
- $fd = fopen($sql_file, 'rb');
- $import_queries = fread($fd, filesize($sql_file));
- fclose($fd);
- } else {
- $db_error = 'SQL file does not exist: ' . $sql_file;
- return false;
- }
+ $fp = fopen($sql_file, 'rb');
- if (!get_cfg_var('safe_mode')) {
- @set_time_limit(0);
- }
+ while (!feof ($fp))
+ {
+ $buf = fgets($fp, 4096);
+ if (substr($buf, 0, 2) <> '--' )
+ {
+ $buf=preg_replace('/--(.+)*/' ,'',$buf);
+ $buffer .= $buf;
+ }
+ }
+ fclose($fp);
- $sql_queries = array();
- $sql_length = strlen($import_queries);
- $pos = strpos($import_queries, ';');
+ $DB=Database::getInstance();
+ $repl = ((is_array($lg) && count($lg) >0)? true : false);
+ $buffer=preg_replace('/[ ](OSC_)([A-Z])/i', ' '.$table_prefix.'$2',$buffer);
+ $buffer = trim($buffer);
- for ($i=$pos; $i<($sql_length+1); $i++) {
-// remove comments
- if (isset($import_queries[0]) && $import_queries[0] == '#') {
- $import_queries = ltrim(substr($import_queries, strpos($import_queries, "\n")));
- $sql_length = strlen($import_queries);
- $i = strpos($import_queries, ';')-1;
- continue;
- }
+ $query=preg_split ("/(;[ ]{0,}\n)/i",$buffer);
- if (isset( $import_queries[($i+1)]) && $import_queries[($i+1)] == "\n") {
- for ($j=($i+2); $j<$sql_length; $j++) {
- if (!empty($import_queries[$j]) && $import_queries[$j]!= "\n") {
- $next = substr($import_queries, $j, 6);
+ if(is_array($lg)) {
+ $lg_k = array_keys($lg);
+ $lg_v = array_map('addslashes',$lg);
+ }
+ foreach($query as $row){
+ $row = trim($row);
+ if(strlen($row) > 3){
+ $sql=(is_array($lg))? str_replace($lg_k,$lg_v,$row) : $row ;
- if ($next[0] == '#') {
-// find out where the break position is so we can remove this line (#comment line)
- for ($k=$j; $k<$sql_length; $k++) {
- if ($import_queries[$k] == "\n") {
- break;
- }
- }
+ $DB->query($row);
- $query = substr($import_queries, 0, $i+1);
-
- $import_queries = substr($import_queries, $k);
-
-// join the query before the comment appeared, with the rest of the dump
- $import_queries = $query . $import_queries;
- $sql_length = strlen($import_queries);
- $i = strpos($import_queries, ';')-1;
- continue 2;
- }
-
- break;
- }
- }
-
- if (empty($next)) { // get the last insert query
- $next = 'insert';
- }
- if (in_array(strtoupper($next), array('TRUNCA','DROP V','DROP T','CREATE','INSERT','COMMIT','UPDATE') )) {
- $next = '';
-
- $sql_query = substr($import_queries, 0, $i);
-
- if ($table_prefix !== -1) {
- if (strtoupper(substr($sql_query, 0, 25)) == 'DROP TABLE IF EXISTS OSC_') {
- $sql_query = 'DROP TABLE IF EXISTS ' . $table_prefix . substr($sql_query, 25);
- } elseif (strtoupper(substr($sql_query, 0, 17)) == 'CREATE TABLE OSC_') {
- $sql_query = 'CREATE TABLE ' . $table_prefix . substr($sql_query, 17);
- } elseif (strtoupper(substr($sql_query, 0, 16)) == 'INSERT INTO OSC_') {
- $sql_query = 'INSERT INTO ' . $table_prefix . substr($sql_query, 16);
- } elseif (strtoupper(substr($sql_query, 0, 18)) == 'TRUNCATE TABLE OSC_') {
- $sql_query = 'TRUNCATE TABLE ' . $table_prefix . substr($sql_query, 18);
- }elseif (strtoupper(substr($sql_query, 0, 11)) == 'UPDATE OSC_') {
- $sql_query = 'UPDATE ' . $table_prefix . substr($sql_query, 11);
- }
- }
-
- $sql_queries[] = $sql_query;
-
- $import_queries = ltrim(substr($import_queries, $i+1));
- $sql_length = strlen($import_queries);
- $i = strpos($import_queries, ';')-1;
- }
- }
- }
-
-
- for ($i=0; $i<=sizeof($sql_queries); $i++) {
- if(is_array($lg) && isset($sql_queries[$i])) osc_db_query(str_replace(array_keys($lg),array_map('addslashes',$lg),$sql_queries[$i]));
- elseif(isset($sql_queries[$i])) osc_db_query($sql_queries[$i]);
- }
+ }
+ }
} else {
return false;
}
@@ -352,115 +298,35 @@
function osc_db_upgrade($database, $sql_file, $table_prefix = -1) {
global $db_error,$language;
-
-error_reporting(E_ALL);
-
$db_error = false;
$lg=false;
if (!$db_error) {
+ $fp = fopen($sql_file, 'rb');
-// if (!get_cfg_var('safe_mode')) {
-// @set_time_limit(0);
-// }
- $fd = fopen($sql_file, 'rb');
- $import_queries = fread($fd, filesize($sql_file));
- fclose($fd);
+ while (!feof ($fp))
+ {
+ $buf = fgets($fp, 4096);
+ if (substr($buf, 0, 2) <> '--' )
+ {
+ $buf=preg_replace('/--(.+)*/' ,'',$buf);
+ $buffer .= $buf;
+ }
+ }
+ fclose($fp);
- $sql_queries = array();
- $sql_length = strlen($import_queries);
- $pos = strpos($import_queries, ';');
-
- for ($i=$pos; $i<($sql_length+1); $i++) {
-// remove comments
- if (isset($import_queries[0]) && $import_queries[0] == '#') {
- $import_queries = ltrim(substr($import_queries, strpos($import_queries, "\n")));
- $sql_length = strlen($import_queries);
- $i = strpos($import_queries, ';')-1;
- continue;
- }
-
- if (isset( $import_queries[($i+1)]) && $import_queries[($i+1)] == "\n") {
- for ($j=($i+2); $j<$sql_length; $j++) {
- if (!empty($import_queries[$j]) && $import_queries[$j]!= "\n") {
- $next = substr($import_queries, $j, 6);
-
- if ($next[0] == '#') {
-// find out where the break position is so we can remove this line (#comment line)
- for ($k=$j; $k<$sql_length; $k++) {
- if ($import_queries[$k] == "\n") {
- break;
- }
- }
-
- $query = substr($import_queries, 0, $i+1);
-
- $import_queries = substr($import_queries, $k);
-
-// join the query before the comment appeared, with the rest of the dump
- $import_queries = $query . $import_queries;
- $sql_length = strlen($import_queries);
- $i = strpos($import_queries, ';')-1;
- continue 2;
- }
-
- break;
- }
- }
-
- if (empty($next)) { // get the last insert query
- $next = 'insert';
- }
- if (in_array(strtoupper($next), array('ALTER ','TRUNCA','DROP V','DROP T','CREATE','INSERT','COMMIT','RENAME','UPDATE', 'IF NOT', 'IF EXI') )) {
- $next = '';
-
- $sql_query = substr($import_queries, 0, $i);
-
- if ($table_prefix !== -1) {
- if (strtoupper(substr($sql_query, 0, 25)) == 'DROP TABLE IF EXISTS OSC_') {
- $sql_query = 'DROP TABLE IF EXISTS ' . $table_prefix . substr($sql_query, 25);
- } elseif (strtoupper(substr($sql_query, 0, 17)) == 'CREATE TABLE OSC_') {
- $sql_query = 'CREATE TABLE ' . $table_prefix . substr($sql_query, 17);
- } elseif (strtoupper(substr($sql_query, 0, 31)) == 'CREATE TABLE IF NOT EXISTS OSC_') {
- $sql_query = 'CREATE TABLE IF NOT EXISTS ' . $table_prefix . substr($sql_query, 31);
- } elseif (strtoupper(substr($sql_query, 0, 16)) == 'INSERT INTO OSC_') {
- $sql_query = 'INSERT INTO ' . $table_prefix . substr($sql_query, 16);
- }elseif (strtoupper(substr($sql_query, 0, 16)) == 'ALTER TABLE OSC_') {
- $sql_query = 'ALTER TABLE ' . $table_prefix . substr($sql_query, 16);
- } elseif (strtoupper(substr($sql_query, 0, 11)) == 'UPDATE OSC_') {
- $sql_query = 'UPDATE ' . $table_prefix . substr($sql_query, 11);
- }elseif (strtoupper(substr($sql_query, 0, 18)) == 'TRUNCATE TABLE OSC_') {
- $sql_query = 'TRUNCATE TABLE ' . $table_prefix . substr($sql_query, 18);
- } elseif (strtoupper(substr($sql_query, 0, 12)) == 'RENAME TABLE') {
- $sql_query = str_replace(' OSC_',' '.$table_prefix,$sql_query);
- }
- elseif (strtoupper(substr($sql_query, 0, 16)) == 'IF NOT EXISTS') {
- $sql_query = str_replace(' OSC_',' '.$table_prefix,$sql_query);
- }
- elseif (strtoupper(substr($sql_query, 0, 12)) == 'IF EXISTS') {
- $sql_query = str_replace(' OSC_',' '.$table_prefix,$sql_query);
- }
- }
-
- $sql_queries[] = $sql_query;
-
- $import_queries = ltrim(substr($import_queries, $i+1));
- $sql_length = strlen($import_queries);
- $i = strpos($import_queries, ';')-1;
- }
- }
- }
-
- for ($i=0; $i<=sizeof($sql_queries); $i++) {
- if(isset($sql_queries[$i])){
-// echo $sql_queries[$i];
- osc_db_query_noblock($sql_queries[$i]);
-// echo '<br />';
+ $buffer=preg_replace('/[ ](OSC_)([A-Z])/i', ' '.$table_prefix.'$2',$buffer);
+ $query=explode(';',$buffer);
+ foreach($query as $row){
+ $row = trim($row);
+ if(strlen($row) > 3){
+ osc_db_query_noblock($row);
+ }
}
- }
+
} else {
return false;
}
Modified: trunk/catalog/install/includes/sql/mysql/data/20_osc_address_format.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/data/20_osc_address_format.sql 2011-11-04 08:06:23 UTC (rev 3865)
+++ trunk/catalog/install/includes/sql/mysql/data/20_osc_address_format.sql 2011-11-04 16:26:25 UTC (rev 3866)
@@ -1,26 +1,16 @@
-#+#######################################################################+
-#| osCSS Open Source E-commerce |
-#+#######################################################################+
-#| Copyright (c) 2005-2011 The osCSS developers |
-#| |
-#| http://www.oscss.org |
-#| Portions Copyright (c) 2003 osCommerce |
-#+#######################################################################+
-#| This source file is subject to version 2.0 of the GPL license, |
-#| available at the following url: |
-#| http://www.oscss.org/license/2_0.txt. |
-#+#######################################################################+
+--+######################################################################--+
+--| osCSS Open Source E-commerce |
+--+######################################################################--+
+--| Copyright (c) 2005-2011 The osCSS developers |
+--| |
+--| http://www.oscss.org |
+--| Portions Copyright (c) 2003 osCommerce |
+--+######################################################################--+
+--| This source file is subject to version 2.0 of the GPL license, |
+--| available at the following url: |
+--| http://www.oscss.org/ |
+--+######################################################################--+
-# NOTE: * Please make any modifications to this file by hand!
-# * DO NOT use a mysqldump created file for new changes!
-# * Please take note of the table structure, and use this
-# structure as a standard for future modifications!
-# * Any tables you add here should be added in admin/backup.php
-# and in catalog/install/includes/functions/database.php
-# * Comments should be like these, full line comments.
-# (don't use inline comments '--', but use #)
-
-
insert into osc_address_format (address_format_id, address_format, address_summary) values ('1', '$firstname $lastname$cr$streets$cr$city, $postcode$cr$statecomma$country', '$city / $country');
insert into osc_address_format (address_format_id, address_format, address_summary) values ('2', '$firstname $lastname$cr$streets$cr$city, $state $postcode$cr$country', '$city, $state / $country');
insert into osc_address_format (address_format_id, address_format, address_summary) values ('3', '$firstname $lastname$cr$streets$cr$city$cr$postcode - $statecomma$country', '$state / $country');
Modified: trunk/catalog/install/includes/sql/mysql/data/20_osc_countries.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/data/20_osc_countries.sql 2011-11-04 08:06:23 UTC (rev 3865)
+++ trunk/catalog/install/includes/sql/mysql/data/20_osc_countries.sql 2011-11-04 16:26:25 UTC (rev 3866)
@@ -1,25 +1,16 @@
-#+#######################################################################+
-#| osCSS Open Source E-commerce |
-#+#######################################################################+
-#| Copyright (c) 2005-2011 The osCSS developers |
-#| |
-#| http://www.oscss.org |
-#| Portions Copyright (c) 2003 osCommerce |
-#+#######################################################################+
-#| This source file is subject to version 2.0 of the GPL license, |
-#| available at the following url: |
-#| http://www.oscss.org/license/2_0.txt. |
-#+#######################################################################+
+--+######################################################################--+
+--| osCSS Open Source E-commerce |
+--+######################################################################--+
+--| Copyright (c) 2005-2011 The osCSS developers |
+--| |
+--| http://www.oscss.org |
+--| Portions Copyright (c) 2003 osCommerce |
+--+######################################################################--+
+--| This source file is subject to version 2.0 of the GPL license, |
+--| available at the following url: |
+--| http://www.oscss.org/ |
+--+######################################################################--+
-# NOTE: * Please make any modifications to this file by hand!
-# * DO NOT use a mysqldump created file for new changes!
-# * Please take note of the table structure, and use this
-# structure as a standard for future modifications!
-# * Any tables you add here should be added in admin/backup.php
-# and in catalog/install/includes/functions/database.php
-# * Comments should be like these, full line comments.
-# (don't use inline comments '--', but use #)
-
insert into osc_countries (countries_id, countries_name, countries_localname, countries_iso_code_2, countries_iso_code_3, address_format_id, country_visible) values ('1', 'Afghanistan', 'Afghanestan', 'AF', 'AFG', '1', '0');
insert into osc_countries (countries_id, countries_name, countries_localname, countries_iso_code_2, countries_iso_code_3, address_format_id, country_visible) values ('2', 'Albania', 'Shqiperia', 'AL', 'ALB', '1', '0');
insert into osc_countries (countries_id, countries_name, countries_localname, countries_iso_code_2, countries_iso_code_3, address_format_id, country_visible) values ('3', 'Algeria', 'Al Jaza\'ir', 'DZ', 'DZA', '1', '0');
Modified: trunk/catalog/install/includes/sql/mysql/data/20_osc_currencies.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/data/20_osc_currencies.sql 2011-11-04 08:06:23 UTC (rev 3865)
+++ trunk/catalog/install/includes/sql/mysql/data/20_osc_currencies.sql 2011-11-04 16:26:25 UTC (rev 3866)
@@ -1,25 +1,17 @@
-#+#######################################################################+
-#| osCSS Open Source E-commerce |
-#+#######################################################################+
-#| Copyright (c) 2005-2011 The osCSS developers |
-#| |
-#| http://www.oscss.org |
-#| Portions Copyright (c) 2003 osCommerce |
-#+#######################################################################+
-#| This source file is subject to version 2.0 of the GPL license, |
-#| available at the following url: |
-#| http://www.oscss.org/license/2_0.txt. |
-#+#######################################################################+
+--+######################################################################--+
+--| osCSS Open Source E-commerce |
+--+######################################################################--+
+--| Copyright (c) 2005-2011 The osCSS developers |
+--| |
+--| http://www.oscss.org |
+--| Portions Copyright (c) 2003 osCommerce |
+--+######################################################################--+
+--| This source file is subject to version 2.0 of the GPL license, |
+--| available at the following url: |
+--| http://www.oscss.org/ |
+--+######################################################################--+
-# NOTE: * Please make any modifications to this file by hand!
-# * DO NOT use a mysqldump created file for new changes!
-# * Please take note of the table structure, and use this
-# structure as a standard for future modifications!
-# * Any tables you add here should be added in admin/backup.php
-# and in catalog/install/includes/functions/database.php
-# * Comments should be like these, full line comments.
-# (don't use inline comments '--', but use #)
-insert into osc_currencies (currencies_id, title, code, symbol_left, symbol_right, decimal_point, thousands_point, decimal_places, value, last_updated) values ('1', 'Euro', 'EUR', '', ' €', '.', ',', '2', '1.00000000', '2005-03-13 17:51:14');
+insert into osc_currencies (currencies_id, title, code, symbol_left, symbol_right, decimal_point, thousands_point, decimal_places, value, last_updated) values ('1', 'Euro', 'EUR', '', '€', '.', ',', '2', '1.00000000', '2005-03-13 17:51:14');
insert into osc_currencies (currencies_id, title, code, symbol_left, symbol_right, decimal_point, thousands_point, decimal_places, value, last_updated) values ('2', 'US Dollar', 'USD', '$', '', '.', ',', '2', '1.07819998', '2005-03-13 17:51:14');
Modified: trunk/catalog/install/includes/sql/mysql/data/20_osc_languages.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/data/20_osc_languages.sql 2011-11-04 08:06:23 UTC (rev 3865)
+++ trunk/catalog/install/includes/sql/mysql/data/20_osc_languages.sql 2011-11-04 16:26:25 UTC (rev 3866)
@@ -1,26 +1,16 @@
-#+#######################################################################+
-#| osCSS Open Source E-commerce |
-#+#######################################################################+
-#| Copyright (c) 2005-2011 The osCSS developers |
-#| |
-#| http://www.oscss.org |
-#| Portions Copyright (c) 2003 osCommerce |
-#+#######################################################################+
-#| This source file is subject to version 2.0 of the GPL license, |
-#| available at the following url: |
-#| http://www.oscss.org/license/2_0.txt. |
-#+#######################################################################+
+--+######################################################################--+
+--| osCSS Open Source E-commerce |
+--+######################################################################--+
+--| Copyright (c) 2005-2011 The osCSS developers |
+--| |
+--| http://www.oscss.org |
+--| Portions Copyright (c) 2003 osCommerce |
+--+######################################################################--+
+--| This source file is subject to version 2.0 of the GPL license, |
+--| available at the following url: |
+--| http://www.oscss.org/ |
+--+######################################################################--+
-# NOTE: * Please make any modifications to this file by hand!
-# * DO NOT use a mysqldump created file for new changes!
-# * Please take note of the table structure, and use this
-# structure as a standard for future modifications!
-# * Any tables you add here should be added in admin/backup.php
-# and in catalog/install/includes/functions/database.php
-# * Comments should be like these, full line comments.
-# (don't use inline comments '--', but use #)
-
-
insert into osc_languages (languages_id, name, code, image, directory, sort_order) values ('1', 'LANGUAGE_NAME_S', 'LANGUAGE_NAME_CODE_S', 'icon.gif', 'LANGUAGE_NAME_REP_S', '1');
Modified: trunk/catalog/install/includes/sql/mysql/data/20_osc_status.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/data/20_osc_status.sql 2011-11-04 08:06:23 UTC (rev 3865)
+++ trunk/catalog/install/includes/sql/mysql/data/20_osc_status.sql 2011-11-04 16:26:25 UTC (rev 3866)
@@ -1,25 +1,18 @@
-#+#######################################################################+
-#| osCSS Open Source E-commerce |
-#+#######################################################################+
-#| Copyright (c) 2005-2011 The osCSS developers |
-#| |
-#| http://www.oscss.org |
-#| Portions Copyright (c) 2003 osCommerce |
-#+#######################################################################+
-#| This source file is subject to version 2.0 of the GPL license, |
-#| available at the following url: |
-#| http://www.oscss.org/license/2_0.txt. |
-#+#######################################################################+
+--+######################################################################--+
+--| osCSS Open Source E-commerce |
+--+######################################################################--+
+--| Copyright (c) 2005-2011 The osCSS developers |
+--| |
+--| http://www.oscss.org |
+--| Portions Copyright (c) 2003 osCommerce |
+--+######################################################################--+
+--| This source file is subject to version 2.0 of the GPL license, |
+--| available at the following url: |
+--| http://www.oscss.org/ |
+--+######################################################################--+
-# NOTE: * Please make any modifications to this file by hand!
-# * DO NOT use a mysqldump created file for new changes!
-# * Please take note of the table structure, and use this
-# structure as a standard for future modifications!
-# * Any tables you add here should be added in admin/backup.php
-# and in catalog/install/includes/functions/database.php
-# * Comments should be like these, full line comments.
-# (don't use inline comments '--', but use #)
+
INSERT INTO osc_status VALUES (1, 'orders', 1, 'OSC_ORDERS_STATUS_PENDING', '#FF1A00');
INSERT INTO osc_status VALUES (2, 'orders', 1, 'OSC_ORDERS_STATUS_PROCESSING', '#3393D9');
INSERT INTO osc_status VALUES (3, 'orders', 1, 'OSC_ORDERS_STATUS_DELIVERED', '#66FF00');
Modified: trunk/catalog/install/includes/sql/mysql/data/20_osc_zones.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/data/20_osc_zones.sql 2011-11-04 08:06:23 UTC (rev 3865)
+++ trunk/catalog/install/includes/sql/mysql/data/20_osc_zones.sql 2011-11-04 16:26:25 UTC (rev 3866)
@@ -1,25 +1,16 @@
-#+#######################################################################+
-#| osCSS Open Source E-commerce |
-#+#######################################################################+
-#| Copyright (c) 2005-2011 The osCSS developers |
-#| |
-#| http://www.oscss.org |
-#| Portions Copyright (c) 2003 osCommerce |
-#+#######################################################################+
-#| This source file is subject to version 2.0 of the GPL license, |
-#| available at the following url: |
-#| http://www.oscss.org/license/2_0.txt. |
-#+#######################################################################+
+--+######################################################################--+
+--| osCSS Open Source E-commerce |
+--+######################################################################--+
+--| Copyright (c) 2005-2011 The osCSS developers |
+--| |
+--| http://www.oscss.org |
+--| Portions Copyright (c) 2003 osCommerce |
+--+######################################################################--+
+--| This source file is subject to version 2.0 of the GPL license, |
+--| available at the following url: |
+--| http://www.oscss.org/ |
+--+######################################################################--+
-# NOTE: * Please make any modifications to this file by hand!
-# * DO NOT use a mysqldump created file for new changes!
-# * Please take note of the table structure, and use this
-# structure as a standard for future modifications!
-# * Any tables you add here should be added in admin/backup.php
-# and in catalog/install/includes/functions/database.php
-# * Comments should be like these, full line comments.
-# (don't use inline comments '--', but use #)
-
insert into osc_zones (zone_id, zone_country_id, zone_code, zone_name) values ('1', '223', 'AL', 'Alabama');
insert into osc_zones (zone_id, zone_country_id, zone_code, zone_name) values ('2', '223', 'AK', 'Alaska');
insert into osc_zones (zone_id, zone_country_id, zone_code, zone_name) values ('3', '223', 'AS', 'American Samoa');
Modified: trunk/catalog/install/includes/sql/mysql/data/40_osc_admin_groups.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/data/40_osc_admin_groups.sql 2011-11-04 08:06:23 UTC (rev 3865)
+++ trunk/catalog/install/includes/sql/mysql/data/40_osc_admin_groups.sql 2011-11-04 16:26:25 UTC (rev 3866)
@@ -1,24 +1,16 @@
-#+#######################################################################+
-#| osCSS Open Source E-commerce |
-#+#######################################################################+
-#| Copyright (c) 2005-2011 The osCSS developers |
-#| |
-#| http://www.oscss.org |
-#| Portions Copyright (c) 2003 osCommerce |
-#+#######################################################################+
-#| This source file is subject to version 2.0 of the GPL license, |
-#| available at the following url: |
-#| http://www.oscss.org/license/2_0.txt. |
-#+#######################################################################+
+--+######################################################################--+
+--| osCSS Open Source E-commerce |
+--+######################################################################--+
+--| Copyright (c) 2005-2011 The osCSS developers |
+--| |
+--| http://www.oscss.org |
+--| Portions Copyright (c) 2003 osCommerce |
+--+######################################################################--+
+--| This source file is subject to version 2.0 of the GPL license, |
+--| available at the following url: |
+--| http://www.oscss.org/ |
+--+######################################################################--+
-# NOTE: * Please make any modifications to this file by hand!
-# * DO NOT use a mysqldump created file for new changes!
-# * Please take note of the table structure, and use this
-# structure as a standard for future modifications!
-# * Any tables you add here should be added in admin/backup.php
-# and in catalog/install/includes/functions/database.php
-# * Comments should be like these, full line comments.
-# (don't use inline comments '--', but use #)
Modified: trunk/catalog/install/includes/sql/mysql/data/40_osc_admin_users.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/data/40_osc_admin_users.sql 2011-11-04 08:06:23 UTC (rev 3865)
+++ trunk/catalog/install/includes/sql/mysql/data/40_osc_admin_users.sql 2011-11-04 16:26:25 UTC (rev 3866)
@@ -1,24 +1,16 @@
-#+#######################################################################+
-#| osCSS Open Source E-commerce |
-#+#######################################################################+
-#| Copyright (c) 2005-2011 The osCSS developers |
-#| |
-#| http://www.oscss.org |
-#| Portions Copyright (c) 2003 osCommerce |
-#+#######################################################################+
-#| This source file is subject to version 2.0 of the GPL license, |
-#| available at the following url: |
-#| http://www.oscss.org/license/2_0.txt. |
-#+#######################################################################+
+--+######################################################################--+
+--| osCSS Open Source E-commerce |
+--+######################################################################--+
+--| Copyright (c) 2005-2011 The osCSS developers |
+--| |
+--| http://www.oscss.org |
+--| Portions Copyright (c) 2003 osCommerce |
+--+######################################################################--+
+--| This source file is subject to version 2.0 of the GPL license, |
+--| available at the following url: |
+--| http://www.oscss.org/ |
+--+######################################################################--+
-# NOTE: * Please make any modifications to this file by hand!
-# * DO NOT use a mysqldump created file for new changes!
-# * Please take note of the table structure, and use this
-# structure as a standard for future modifications!
-# * Any tables you add here should be added in admin/backup.php
-# and in catalog/install/includes/functions/database.php
-# * Comments should be like these, full line comments.
-# (don't use inline comments '--', but use #)
insert into osc_admin_users (admin_id, admin_groups_id, admin_firstname, admin_lastname, admin_email_address, admin_password, admin_created, admin_modified, admin_logdate, admin_lognum) values ('1', '1', 'AdminFirstname', 'AdminLastname', 'admin@localhost', '351683ea4e19efe34874b501fdbf9792:9b', NOW(), '1000-01-01 00:00:00', NOW(), '0');
Modified: trunk/catalog/install/includes/sql/mysql/data/40_osc_categories.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/data/40_osc_categories.sql 2011-11-04 08:06:23 UTC (rev 3865)
+++ trunk/catalog/install/includes/sql/mysql/data/40_osc_categories.sql 2011-11-04 16:26:25 UTC (rev 3866)
@@ -1,24 +1,16 @@
-#+#######################################################################+
-#| osCSS Open Source E-commerce |
-#+#######################################################################+
-#| Copyright (c) 2005-2011 The osCSS developers |
-#| |
-#| http://www.oscss.org |
-#| Portions Copyright (c) 2003 osCommerce |
-#+#######################################################################+
-#| This source file is subject to version 2.0 of the GPL license, |
-#| available at the following url: |
-#| http://www.oscss.org/license/2_0.txt. |
-#+#######################################################################+
+--+######################################################################--+
+--| osCSS Open Source E-commerce |
+--+######################################################################--+
+--| Copyright (c) 2005-2011 The osCSS developers |
+--| |
+--| http://www.oscss.org |
+--| Portions Copyright (c) 2003 osCommerce |
+--+######################################################################--+
+--| This source file is subject to version 2.0 of the GPL license, |
+--| available at the following url: |
+--| http://www.oscss.org/ |
+--+######################################################################--+
-# NOTE: * Please make any modifications to this file by hand!
-# * DO NOT use a mysqldump created file for new changes!
-# * Please take note of the table structure, and use this
-# structure as a standard for future modifications!
-# * Any tables you add here should be added in admin/backup.php
-# and in catalog/install/includes/functions/database.php
-# * Comments should be like these, full line comments.
-# (don't use inline comments '--', but use #)
Modified: trunk/catalog/install/includes/sql/mysql/data/40_osc_content.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/data/40_osc_content.sql 2011-11-04 08:06:23 UTC (rev 3865)
+++ trunk/catalog/install/includes/sql/mysql/data/40_osc_content.sql 2011-11-04 16:26:25 UTC (rev 3866)
@@ -1,26 +1,17 @@
-#+#######################################################################+
-#| osCSS Open Source E-commerce |
-#+#######################################################################+
-#| Copyright (c) 2005-2011 The osCSS developers |
-#| |
-#| http://www.oscss.org |
-#| Portions Copyright (c) 2003 osCommerce |
-#+#######################################################################+
-#| This source file is subject to version 2.0 of the GPL license, |
-#| available at the following url: |
-#| http://www.oscss.org/license/2_0.txt. |
-#+#######################################################################+
+--+######################################################################--+
+--| osCSS Open Source E-commerce |
+--+######################################################################--+
+--| Copyright (c) 2005-2011 The osCSS developers |
+--| |
+--| http://www.oscss.org |
+--| Portions Copyright (c) 2003 osCommerce |
+--+######################################################################--+
+--| This source file is subject to version 2.0 of the GPL license, |
+--| available at the following url: |
+--| http://www.oscss.org/ |
+--+######################################################################--+
-# NOTE: * Please make any modifications to this file by hand!
-# * DO NOT use a mysqldump created file for new changes!
-# * Please take note of the table structure, and use this
-# structure as a standard for future modifications!
-# * Any tables you add here should be added in admin/backup.php
-# and in catalog/install/includes/functions/database.php
-# * Comments should be like these, full line comments.
-# (don't use inline comments '--', but use #)
-
insert into osc_content (content_id, content_name, date_added, last_modified, content_status) values ('1', 'informationBox_shipping', NOW(), NULL, '1');
insert into osc_content (content_id, content_name, date_added, last_modified, content_status) values ('2', 'informationBox_privacy', NOW(), NULL, '1');
insert into osc_content (content_id, content_name, date_added, last_modified, content_status) values ('3', 'informationBox_conditions', NOW(), NULL, '1');
Modified: trunk/catalog/install/includes/sql/mysql/data/40_osc_full_tag.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/data/40_osc_full_tag.sql 2011-11-04 08:06:23 UTC (rev 3865)
+++ trunk/catalog/install/includes/sql/mysql/data/40_osc_full_tag.sql 2011-11-04 16:26:25 UTC (rev 3866)
@@ -1,24 +1,16 @@
-#+#######################################################################+
-#| osCSS Open Source E-commerce |
-#+#######################################################################+
-#| Copyright (c) 2005-2011 The osCSS developers |
-#| |
-#| http://www.oscss.org |
-#| Portions Copyright (c) 2003 osCommerce |
-#+#######################################################################+
-#| This source file is subject to version 2.0 of the GPL license, |
-#| available at the following url: |
-#| http://www.oscss.org/license/2_0.txt. |
-#+#######################################################################+
+--+######################################################################--+
+--| osCSS Open Source E-commerce |
+--+######################################################################--+
+--| Copyright (c) 2005-2011 The osCSS developers |
+--| |
+--| http://www.oscss.org |
+--| Portions Copyright (c) 2003 osCommerce |
+--+######################################################################--+
+--| This source file is subject to version 2.0 of the GPL license, |
+--| available at the following url: |
+--| http://www.oscss.org/ |
+--+######################################################################--+
-# NOTE: * Please make any modifications to this file by hand!
-# * DO NOT use a mysqldump created file for new changes!
-# * Please take note of the table structure, and use this
-# structure as a standard for future modifications!
-# * Any tables you add here should be added in admin/backup.php
-# and in catalog/install/includes/functions/database.php
-# * Comments should be like these, full line comments.
-# (don't use inline comments '--', but use #)
INSERT INTO osc_full_tag (tag_id, page_type, page_id) VALUES (1, 'generic', 'generic');
Modified: trunk/catalog/install/includes/sql/mysql/data/40_osc_navigation_links.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/data/40_osc_navigation_links.sql 2011-11-04 08:06:23 UTC (rev 3865)
+++ trunk/catalog/install/includes/sql/mysql/data/40_osc_navigation_links.sql 2011-11-04 16:26:25 UTC (rev 3866)
@@ -1,24 +1,16 @@
-#+#######################################################################+
-#| osCSS Open Source E-commerce |
-#+#######################################################################+
-#| Copyright (c) 2005-2011 The osCSS developers |
-#| |
-#| http://www.oscss.org |
-#| Portions Copyright (c) 2003 osCommerce |
-#+#######################################################################+
-#| This source file is subject to version 2.0 of the GPL license, |
-#| available at the following url: |
-#| http://www.oscss.org/license/2_0.txt. |
-#+#######################################################################+
+--+######################################################################--+
+--| osCSS Open Source E-commerce |
+--+######################################################################--+
+--| Copyright (c) 2005-2011 The osCSS developers |
+--| |
+--| http://www.oscss.org |
+--| Portions Copyright (c) 2003 osCommerce |
+--+######################################################################--+
+--| This source file is subject to version 2.0 of the GPL license, |
+--| available at the following url: |
+--| http://www.oscss.org/ |
+--+######################################################################--+
-# NOTE: * Please make any modifications to this file by hand!
-# * DO NOT use a mysqldump created file for new changes!
-# * Please take note of the table structure, and use this
-# structure as a standard for future modifications!
-# * Any tables you add here should be added in admin/backup.php
-# and in catalog/install/includes/functions/database.php
-# * Comments should be like these, full line comments.
-# (don't use inline comments '--', but use #)
insert into osc_navigation_links (nav_link_id, nav_sort_order, nav_css_id, nav_file, nav_link_type, customers_status, nav_link_status, parent_id) values (1, 1, 'menuHome', '', 0, 0, 1, 0);
Modified: trunk/catalog/install/includes/sql/mysql/data/91_osc_admin_cip.sql
===================================================================
--- trunk/catalog/inst...
[truncated message content] |
|
From: <os...@us...> - 2011-11-04 08:06:30
|
Revision: 3865
http://oscss.svn.sourceforge.net/oscss/?rev=3865&view=rev
Author: oscim
Date: 2011-11-04 08:06:23 +0000 (Fri, 04 Nov 2011)
Log Message:
-----------
correction coquille install
Modified Paths:
--------------
trunk/catalog/common/classes/sql_drivers/DB_Mysql.php
trunk/catalog/install/includes/modele/admin_configure.txt
trunk/catalog/install/includes/modele/configure.txt
trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql
trunk/catalog/install/includes/team_info/base.inc
Modified: trunk/catalog/common/classes/sql_drivers/DB_Mysql.php
===================================================================
--- trunk/catalog/common/classes/sql_drivers/DB_Mysql.php 2011-11-04 07:38:45 UTC (rev 3864)
+++ trunk/catalog/common/classes/sql_drivers/DB_Mysql.php 2011-11-04 08:06:23 UTC (rev 3865)
@@ -71,8 +71,6 @@
if (is_resource($this->resConnection))
{
- @mysql_query("SET sql_mode=''", $this->resConnection);
- @mysql_query("SET NAMES " . parent::CHARSET, $this->resConnection);
if($db)
$this->set_database(parent::DB);
}
@@ -183,6 +181,8 @@
*/
protected function set_database($strDatabase)
{
+ @mysql_query("SET sql_mode=''", $this->resConnection);
+ @mysql_query("SET NAMES " . parent::CHARSET, $this->resConnection);
return @mysql_select_db($strDatabase, $this->resConnection);
}
Modified: trunk/catalog/install/includes/modele/admin_configure.txt
===================================================================
--- trunk/catalog/install/includes/modele/admin_configure.txt 2011-11-04 07:38:45 UTC (rev 3864)
+++ trunk/catalog/install/includes/modele/admin_configure.txt 2011-11-04 08:06:23 UTC (rev 3865)
@@ -94,8 +94,8 @@
define('DB_CONNECTOR', '%DBMOTOR%');
define('DB_MOTOR', '%DBMOTOR%');
define('DB_MOTOR_TYPE', '%DBMOTOR_TYPE%');
- define('DB_PORT', '%DB_PORT%');
- define('DB_CHARSET', '%DB_CHARSET%');
+ define('DB_PORT', '%DBMOTOR_PORT%');
+ define('DB_CHARSET', '%DBMOTOR_CHARSET%');
define('DB_SERVER', '%DB_SERVER%'); // eg, localhost - should not be empty for productive servers
define('DB_SERVER_USERNAME', '%DB_SERVER_USERNAME%');
define('DB_SERVER_PASSWORD', '%DB_SERVER_PASSWORD%');
Modified: trunk/catalog/install/includes/modele/configure.txt
===================================================================
--- trunk/catalog/install/includes/modele/configure.txt 2011-11-04 07:38:45 UTC (rev 3864)
+++ trunk/catalog/install/includes/modele/configure.txt 2011-11-04 08:06:23 UTC (rev 3865)
@@ -84,8 +84,8 @@
define('DB_CONNECTOR', '%DBMOTOR%');
define('DB_MOTOR', '%DBMOTOR%');
define('DB_MOTOR_TYPE', '%DBMOTOR_TYPE%');
- define('DB_PORT', '%DB_PORT%');
- define('DB_CHARSET', '%DB_CHARSET%');
+ define('DB_PORT', '%DBMOTOR_PORT%');
+ define('DB_CHARSET', '%DBMOTOR_CHARSET%');
define('DB_SERVER', '%DB_SERVER%'); // eg, localhost - should not be empty for productive servers
define('DB_SERVER_USERNAME', '%DB_SERVER_USERNAME%');
define('DB_SERVER_PASSWORD', '%DB_SERVER_PASSWORD%');
Modified: trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql 2011-11-04 07:38:45 UTC (rev 3864)
+++ trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql 2011-11-04 08:06:23 UTC (rev 3865)
@@ -353,7 +353,7 @@
## 129 option orders
-insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('DEFAULT_ORDERS_STATUS_ID_S', 'DEFAULT_ORDERS_STATUS_ID', '1', 'DEFAULT_ORDERS_STATUS_ID_L', '129', '2', NULL, NOW(), 'tep_cfg_pull_down_order_statuses(', 'tep_get_order_status_name',2, configuration_type);
+insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function,configuration_type) values ('DEFAULT_ORDERS_STATUS_ID_S', 'DEFAULT_ORDERS_STATUS_ID', '1', 'DEFAULT_ORDERS_STATUS_ID_L', '129', '2', NULL, NOW(), 'tep_cfg_pull_down_order_statuses(', 'tep_get_order_status_name',2);
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, configuration_type) values ('ORDERS_NUMBER_PREFIX_S', 'ORDERS_NUMBER_PREFIX', 'ym-5', 'ORDERS_NUMBER_PREFIX_L', '129', '0', NULL, NOW(), '2');
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function, configuration_type) values ('USE_LOCAL_GENERAT_ORDER_REF_S', 'USE_LOCAL_GENERAT_ORDER_REF', '10', 'USE_LOCAL_GENERAT_ORDER_REF_L', '129', '5', NULL, NOW(), 'tep_value_for_humain', 'tep_cfg_select_option(array(\'true\', \'false\'),','3');
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function, configuration_type) values ('DEFAULT_ORDERS_STATUS_COMPLETED_S', 'DEFAULT_ORDERS_STATUS_COMPLETED', '3', 'DEFAULT_ORDERS_STATUS_COMPLETED_L', '129', '0', NULL, NOW(), 'tep_cfg_pull_down_order_statuses(', 'tep_get_order_status_name',2);
Modified: trunk/catalog/install/includes/team_info/base.inc
===================================================================
--- trunk/catalog/install/includes/team_info/base.inc 2011-11-04 07:38:45 UTC (rev 3864)
+++ trunk/catalog/install/includes/team_info/base.inc 2011-11-04 08:06:23 UTC (rev 3865)
@@ -9,5 +9,5 @@
</p>
<p><strong>Soutenez nous !</strong> Participez à la promotion, au développement, aux remontées de bug, afin d'améliorer les performances, la stabilité et la cohérence de l'ensemble. Toutes informations liées à votre utilisation nous intéressent. Quelques minutes pour nous faire connaître vos remarques sur cette solution seront les bienvenues.
</p>
-<p>osCSS, 2005 - 2010. - Basé à l'origine sur osCommerce</p>
+<p>osCSS, 2005 - <?php echo date('Y') ?>. - Basé à l'origine sur osCommerce</p>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2011-11-04 07:38:52
|
Revision: 3864
http://oscss.svn.sourceforge.net/oscss/?rev=3864&view=rev
Author: oscim
Date: 2011-11-04 07:38:45 +0000 (Fri, 04 Nov 2011)
Log Message:
-----------
amelioration et ajustement sql lors de l'install
Modified Paths:
--------------
trunk/catalog/admin/editeur/tiny_mce/oscss_init.php
trunk/catalog/admin/includes/gabarit/configuration/modadminconfig.listing.gab
trunk/catalog/admin/includes/modules/configuration/modadminconfig.php
trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql
trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration_group.sql
Modified: trunk/catalog/admin/editeur/tiny_mce/oscss_init.php
===================================================================
--- trunk/catalog/admin/editeur/tiny_mce/oscss_init.php 2011-11-02 14:12:13 UTC (rev 3863)
+++ trunk/catalog/admin/editeur/tiny_mce/oscss_init.php 2011-11-04 07:38:45 UTC (rev 3864)
@@ -3,11 +3,11 @@
@licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.1.0
- @date 09/01/11, 03:00
+ @version 2.1.1
+ @date 03/11/11, 21:18
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
- Chargeur pour oscss
+ @brief Chargeur pour oscss
Output a form textarea field w/ tiny_mce
NOTE:
@@ -22,7 +22,8 @@
-class tiny_mce_oscss extends oscss_cstr {
+class tiny_mce_oscss
+ extends oscss_cstr {
function tiny_mce_options(){
global $oscss;
@@ -109,5 +110,28 @@
return $field;
}
+
+
+
+
+
+
+// function check() {
+// if (!isset($this->_check)) {
+// $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_GENERIC_SVNUPDATE_SORT_ORDER'");
+// $this->_check = tep_db_num_rows($check_query);
+// }
+// return $this->_check;
+// }
+//
+// function install() {
+// tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added,configuration_type) values ('".addslashes(__("Ordre de tri"))."', 'MODULE_GENERIC_SVNUPDATE_SORT_ORDER', '0', '".addslashes(__("Ordre de tri, dans l'affichage"))."', '1', '0', now(),1)");
+// }
+//
+// function remove() { return false; }
+//
+// function keys() {
+// return array();
+// }
}
?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/gabarit/configuration/modadminconfig.listing.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/configuration/modadminconfig.listing.gab 2011-11-02 14:12:13 UTC (rev 3863)
+++ trunk/catalog/admin/includes/gabarit/configuration/modadminconfig.listing.gab 2011-11-04 07:38:45 UTC (rev 3864)
@@ -34,7 +34,6 @@
<?php echo $row->value_field ; ?>
</p>
</div>
- </p>
@@ -65,13 +64,27 @@
</fieldset>
+ <fieldset class="block_field">
+ <?php /** */ $row = modadminconfig::$list['BO_WISIWYG_SELECTED']; ?>
+ <legend title="<?php echo '('.$row->key.' - ' . $row->set . ')'; ?>"><?php echo __($row->title). tep_image(DIR_WS_ICONS . 'icon_help.gif'); ?></legend>
+
+ <div class="block_input">
+ <label><?php if (tep_not_null($row->description))echo __($row->description); ?></label>
+ <p>
+ <?php echo $row->value_field ; ?>
+ </p>
+ </div>
+ </fieldset>
+
+
+
<?php /** */ ?>
<fieldset class="block_field">
<legend class="block_field-title"><?php echo __('modadminconfig legend other') ?></legend>
<ul class="block_input">
<?php foreach(modadminconfig::$list as $row)
- if(!in_array($row->key,array('CHECKUP_WARN',)) && substr($row->key,0,4) !='WARN' ) { ?>
+ if(!in_array($row->key,array('CHECKUP_WARN','BO_WISIWYG_SELECTED')) && substr($row->key,0,4) !='WARN' ) { ?>
<li id="nav_<?php echo $row->key ?>"><h5 title="<?php echo '('.$row->key.' - ' . $row->set . ')'; ?>"><?php echo __($row->title). tep_image(DIR_WS_ICONS . 'icon_help.gif'); ?></h5>
<div class="block_input tirroir">
Modified: trunk/catalog/admin/includes/modules/configuration/modadminconfig.php
===================================================================
--- trunk/catalog/admin/includes/modules/configuration/modadminconfig.php 2011-11-02 14:12:13 UTC (rev 3863)
+++ trunk/catalog/admin/includes/modules/configuration/modadminconfig.php 2011-11-04 07:38:45 UTC (rev 3864)
@@ -8,7 +8,6 @@
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class modadminconfig
- Mise en forme et structuration des options de stock
*/
@@ -90,7 +89,6 @@
$gID = 17;
$list=sqlconfiguration::fetch(array('group_id'=> (int)$gID), true);
-
foreach($list as $row) {
$cfgValue =configUtility::CallExecConfigLine($row->use, $row->key, $row->value);
@@ -127,10 +125,7 @@
}
/**
- Contenu central
- @param
- @e global $action
- @e global $gparentID
+ @brief Contenu central
*/
public function draw(){
global $action,$gparentID;
@@ -138,6 +133,20 @@
self::$list = $this->load_db_values('');
return tep_get_include_contents('configuration/'.__CLASS__.'.listing');
}
+
+
+ /**
+ @brief Scan and retrun wisiwyg in /editeur/
+ */
+ function GetBrowser(){
+ $list = array();
+ foreach(scan(DIR_FS_ADMIN .'editeur/') as $row){
+ if(is_dir(DIR_FS_ADMIN .'editeur/'.$row) && file_exists(DIR_FS_ADMIN .'editeur/'.$row.'/oscss_init.php')){
+ $list[$row]= $row;
+ }
+ }
+ return $list;
+ }
}
?>
\ No newline at end of file
Modified: trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql 2011-11-02 14:12:13 UTC (rev 3863)
+++ trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql 2011-11-04 07:38:45 UTC (rev 3864)
@@ -244,7 +244,7 @@
## 17 General Backoffice
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function, configuration_type) values ('BO_FILEBROSWER_SERVER_USE_S', 'BO_FILEBROSWER_SERVER_USE', 'tinybrowser', 'BO_FILEBROSWER_SERVER_USE_L', '17', '0', NOW(), NOW(), NULL, NULL, '1');
-insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function, configuration_type) values ('BO_WISIWYG_SELECTED_S', 'BO_WISIWYG_SELECTED', 'tiny_mce', 'BO_WISIWYG_SELECTED_L', '17', '0', NOW(), NOW(), NULL, NULL, '1');
+insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function, configuration_type) values ('BO_WISIWYG_SELECTED_S', 'BO_WISIWYG_SELECTED', 'tiny_mce', 'BO_WISIWYG_SELECTED_L', '17', '0', NOW(), NOW(), NULL, 'tep_cfg_select_option_bis(modadminconfig::GetBrowser(),', '1');
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function , set_function,configuration_type ) values ('CHECKUP_WARN_S', 'CHECKUP_WARN', 'true', 'CHECKUP_WARN_L', '17', '6', NOW(), NOW(),'tep_value_for_humain', 'tep_cfg_select_option(array(\'true\', \'false\'),','1');
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function , set_function,configuration_type) values ('WARN_INSTALL_EXISTENCE_S', 'WARN_INSTALL_EXISTENCE', 'true', 'WARN_INSTALL_EXISTENCE_L', '17', '7', NOW(), NOW(),'tep_value_for_humain', 'tep_cfg_select_option(array(\'true\', \'false\'),','1');
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function , set_function,configuration_type) values ('WARN_CONFIG_WRITEABLE_S', 'WARN_CONFIG_WRITEABLE', 'true', 'WARN_CONFIG_WRITEABLE_L', '17', '8', NOW(), NOW(),'tep_value_for_humain', 'tep_cfg_select_option(array(\'true\', \'false\'),','1');
@@ -353,11 +353,11 @@
## 129 option orders
-insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('DEFAULT_ORDERS_STATUS_ID_S', 'DEFAULT_ORDERS_STATUS_ID', '1', 'DEFAULT_ORDERS_STATUS_ID_L', '129', '2', NULL, NOW(), NULL, NULL);
+insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('DEFAULT_ORDERS_STATUS_ID_S', 'DEFAULT_ORDERS_STATUS_ID', '1', 'DEFAULT_ORDERS_STATUS_ID_L', '129', '2', NULL, NOW(), 'tep_cfg_pull_down_order_statuses(', 'tep_get_order_status_name',2, configuration_type);
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, configuration_type) values ('ORDERS_NUMBER_PREFIX_S', 'ORDERS_NUMBER_PREFIX', 'ym-5', 'ORDERS_NUMBER_PREFIX_L', '129', '0', NULL, NOW(), '2');
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function, configuration_type) values ('USE_LOCAL_GENERAT_ORDER_REF_S', 'USE_LOCAL_GENERAT_ORDER_REF', '10', 'USE_LOCAL_GENERAT_ORDER_REF_L', '129', '5', NULL, NOW(), 'tep_value_for_humain', 'tep_cfg_select_option(array(\'true\', \'false\'),','3');
-insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function, configuration_type) values ('DEFAULT_ORDERS_STATUS_COMPLETED_S', 'DEFAULT_ORDERS_STATUS_COMPLETED', '3', 'DEFAULT_ORDERS_STATUS_COMPLETED_L', '129', '0', NULL, NOW(), NULL, NULL,2);
-insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function, configuration_type) values ('DEFAULT_ORDERS_STATUS_ID_S', 'DEFAULT_ORDERS_STATUS_ANNULATE', '4', 'DEFAULT_ORDERS_STATUS_ID_L', '129', '0', NULL, NOW(), NULL, NULL,2);
+insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function, configuration_type) values ('DEFAULT_ORDERS_STATUS_COMPLETED_S', 'DEFAULT_ORDERS_STATUS_COMPLETED', '3', 'DEFAULT_ORDERS_STATUS_COMPLETED_L', '129', '0', NULL, NOW(), 'tep_cfg_pull_down_order_statuses(', 'tep_get_order_status_name',2);
+insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function, configuration_type) values ('DEFAULT_ORDERS_STATUS_ID_S', 'DEFAULT_ORDERS_STATUS_ANNULATE', '4', 'DEFAULT_ORDERS_STATUS_ID_L', '129', '0', NULL, NOW(),'tep_cfg_pull_down_order_statuses(', 'tep_get_order_status_name',2);
## 130 option data types
Modified: trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration_group.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration_group.sql 2011-11-02 14:12:13 UTC (rev 3863)
+++ trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration_group.sql 2011-11-04 07:38:45 UTC (rev 3864)
@@ -59,5 +59,5 @@
insert into osc_configuration_group values (34 , 'BOX_CONFIGURATION_PRODUCTS_EXTRA_FIELDS', NULL, 0 , 1, 120, '1', 'MODPRODEXTRA');
insert into osc_configuration_group values (128,'BOX_CONFIGURATION_ENVIRONEMENT', NULL, 0, 1, 120, '1', 'CFG_ENVIRONEMENT');
insert into osc_configuration_group values (129,'CONFIGURATION_ORDERS', NULL, 0, 1, 127, '1', 'MODORDER');
-insert into osc_configuration_group values (130,'CONFIGURATION_DATATYPES', NULL, 0, 1, 127, '1', 'MODDATATYPE');
+#insert into osc_configuration_group values (130,'CONFIGURATION_DATATYPES', NULL, 0, 1, 127, '1', 'MODDATATYPE');
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2011-11-02 14:12:19
|
Revision: 3863
http://oscss.svn.sourceforge.net/oscss/?rev=3863&view=rev
Author: oscim
Date: 2011-11-02 14:12:13 +0000 (Wed, 02 Nov 2011)
Log Message:
-----------
Ajout control mini dans les champs d'une page produits via jquery.validate
Modified Paths:
--------------
trunk/catalog/admin/includes/modules/pages/products.php
Modified: trunk/catalog/admin/includes/modules/pages/products.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/products.php 2011-11-02 06:57:40 UTC (rev 3862)
+++ trunk/catalog/admin/includes/modules/pages/products.php 2011-11-02 14:12:13 UTC (rev 3863)
@@ -432,6 +432,53 @@
}
//--></script>
+ <?php
+ tep_include_file (DIR_WS_TEMPLATE."jquery.validate.css",true);
+ tep_include_file ("includes/javascript/jquery.validate.min.js",true);
+ ?>
+ <script type="text/javascript">
+ $(function(){
+ // validate signup form on keyup and submit
+ $("#new_product").validate({
+ rules: {
+ <?php for ($i=0, $n=sizeof(self::$languages); $i<$n; $i++): ?>
+ "products_name[<?php echo self::$languages[$i]['id']; ?>]": {
+ required: true,
+ minlength: 3
+ },
+ <?php endfor; ?>
+
+ <?php if(products::CheckClassProduct('CLASS_PRICE')): /** Si Class de prix defini, les prix sont pris en charge par un onglet */ ?>
+ products_price: {
+ required: true,
+ minlength: 1
+ },
+ <?php endif; ?>
+ },
+ messages: {
+ <?php for ($i=0, $n=sizeof(self::$languages); $i<$n; $i++): ?>
+ "products_name[<?php echo self::$languages[$i]['id']; ?>]": {
+ required: " <?php echo addslashes(__('js alert products name')) ?>",
+ minlength: " <?php echo addslashes(__('your products name must consist of at least 3 characters')) ?>"
+ },
+ <?php endfor; ?>
+
+ <?php if(products::CheckClassProduct('CLASS_PRICE')): /** Si Class de prix defini, les prix sont pris en charge par un onglet */ ?>
+ products_price: {
+ required: " <?php echo addslashes(__('js alert price')) ?>",
+ minlength: " <?php echo addslashes(__('your price must consist of at least 1 characters')) ?>"
+ },
+ <?php endif; ?>
+ },
+ errorElement: "span",
+ errorPlacement: function(error, element) {
+ error.appendTo( element.parent());
+ },
+ onkeyup: true
+ });
+ });
+
+ //--></script>
<?php /** aca */ self::$modules->get_header_js('new_product'); ?>
<?php endif;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2011-11-02 06:57:46
|
Revision: 3862
http://oscss.svn.sourceforge.net/oscss/?rev=3862&view=rev
Author: oscim
Date: 2011-11-02 06:57:40 +0000 (Wed, 02 Nov 2011)
Log Message:
-----------
coquille
Modified Paths:
--------------
trunk/catalog/includes/classes/drivers/data/content.php
Modified: trunk/catalog/includes/classes/drivers/data/content.php
===================================================================
--- trunk/catalog/includes/classes/drivers/data/content.php 2011-11-01 21:02:36 UTC (rev 3861)
+++ trunk/catalog/includes/classes/drivers/data/content.php 2011-11-02 06:57:40 UTC (rev 3862)
@@ -98,6 +98,8 @@
public static function get_content_path($id){ return contentData::get_content_path($id); }
public static function get_content_in_cat($current_category_id=0, $exclude=''){ return contentData::get_content_in_cat($current_category_id=0, $exclude=''); }
public static function get_cms_liste_byDate($max, $exclude){ return contentData::get_cms_liste_byDate($max, $exclude); }
+
+ public static function get_img($id, $img_num=0){ return contentData::get_img($id, $img_num); }
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2011-11-01 21:02:43
|
Revision: 3861
http://oscss.svn.sourceforge.net/oscss/?rev=3861&view=rev
Author: oscim
Date: 2011-11-01 21:02:36 +0000 (Tue, 01 Nov 2011)
Log Message:
-----------
convertion en module de la listes des archives de commande pour les clients
ajustement des fichiers account li?\195?\169s
Modified Paths:
--------------
trunk/catalog/account.php
trunk/catalog/includes/content/account.php
trunk/catalog/includes/languages/fr_FR/account.php
trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/content/account.php
trunk/catalog/install/data/templates/appareil_photo/electronix/includes/content/account.php
Added Paths:
-----------
trunk/catalog/includes/gabarit/orders_history.display_view.gab
trunk/catalog/includes/languages/fr_FR/modules/account/orders_history.txt
trunk/catalog/includes/modules/account/orders_history.php
Removed Paths:
-------------
trunk/catalog/includes/content/account_history.php
trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/content/account_history.php
Modified: trunk/catalog/account.php
===================================================================
--- trunk/catalog/account.php 2011-11-01 19:17:19 UTC (rev 3860)
+++ trunk/catalog/account.php 2011-11-01 21:02:36 UTC (rev 3861)
@@ -117,14 +117,8 @@
break;
+
/**
- * \internal execution historique liste des commandes
- * Display list customers order
- */
- case 'history':
- $page->force_content('account_history.php');
- break;
- /**
* \section execution affiche une commande
* \a (int) $_GET['order_id']
*/
Modified: trunk/catalog/includes/content/account.php
===================================================================
--- trunk/catalog/includes/content/account.php 2011-11-01 19:17:19 UTC (rev 3860)
+++ trunk/catalog/includes/content/account.php 2011-11-01 21:02:36 UTC (rev 3861)
@@ -57,7 +57,7 @@
<div class="contentBox myOrders">
<h3><?php echo MY_ORDERS_TITLE; ?></h3>
<ul>
- <li><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT, 'action=history', 'SSL') . '">' . MY_ORDERS_VIEW . '</a>'; ?></li>
+ <?php /** ACA module */ foreach($module as $k){ if (method_exists($k, 'display_view_min_listMyOrders')) foreach($k->display_view_min_listMyOrders($customer_id) as $kt=>$vt){ $i++; echo '<li><a href="'.$vt->href_link.'">'.$vt->title.'</a> </li>'; } } ?>
</ul>
</div>
Deleted: trunk/catalog/includes/content/account_history.php
===================================================================
--- trunk/catalog/includes/content/account_history.php 2011-11-01 19:17:19 UTC (rev 3860)
+++ trunk/catalog/includes/content/account_history.php 2011-11-01 21:02:36 UTC (rev 3861)
@@ -1,64 +0,0 @@
-<?php
-/**
- @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
- @portion code Copyright (c) 2002 osCommerce
- @package osCSS-2 <www http://www.oscss.org>
- @version 2.1.0
- @date 16/12/10, 21:52
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-8
-*/
-?>
-<div id="accountHistory">
-
- <h2 class="content title <?php echo $language ;?>"><?php echo HEADING_TITLE_6; ?></h2>
-
-<?php
- $orders_total = tep_count_customer_orders();
-
- if ($orders_total > 0) {
- $history_query_raw = "select o.orders_id,o.orders_prefix, o.date_purchased, o.delivery_name, o.billing_name, ot.text as order_total,o.orders_status, s.status_name as orders_status_name from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_TOTAL . " ot, " . TABLE_STATUS . " s where o.customers_id = '" . (int)$customer_id . "' and o.orders_id = ot.orders_id and ot.class = 'ot_total' and o.orders_status = s.status_id AND status_type='orders' AND s.language_id = '" . (int)$languages_id . "' order by orders_id DESC";
- $history_split = new splitPageResults($history_query_raw, MAX_DISPLAY_ORDER_HISTORY);
- $history_query = tep_db_query($history_split->sql_query);
-
- while ($history = tep_db_fetch_array($history_query)) {
- $products_query = tep_db_query("select count(*) as count from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$history['orders_id'] . "'");
- $products = tep_db_fetch_array($products_query);
-
- if (tep_not_null($history['delivery_name'])) {
- $order_type = TEXT_ORDER_SHIPPED_TO;
- $order_name = $history['delivery_name'];
- } else {
- $order_type = TEXT_ORDER_BILLED_TO;
- $order_name = $history['billing_name'];
- }
-?>
- <dl class="orderHistory">
- <dt><?php echo TEXT_ORDER_NUMBER . $history['orders_prefix'].$history['orders_id']; ?> <span class="linkPdf"><a href="<?php echo tep_href_link(FILENAME_ACCOUNT, 'action=pdf&'.(isset($_GET['page']) ? 'page=' . $_GET['page'] . '&' : '') . 'order_id=' . $history['orders_id'], 'SSL') ?>">PDF</a></span></dt>
- <dd><?php echo TEXT_ORDER_STATUS . $history['orders_status_name']; ?></dd>
- <dd><?php echo TEXT_ORDER_DATE . tep_date_long($history['date_purchased']) ;?></dd>
- <dd><?php echo $order_type . tep_output_string_protected($order_name); ?></dd>
- <dd><?php echo TEXT_ORDER_PRODUCTS . $products['count'] ;?></dd>
- <dd><?php echo TEXT_ORDER_COST . strip_tags($history['order_total']); ?></dd>
- <dd><?php echo '<a class="navBtMini" href="' . tep_href_link(FILENAME_ACCOUNT, 'action=history_info&'.(isset($_GET['page']) ? 'page=' . $_GET['page'] . '&' : '') . 'order_id=' . $history['orders_id'], 'SSL') . '">' . SMALL_IMAGE_BUTTON_VIEW . '</a>'; ?></dd>
- </dl>
-
-<?php }
- } else { ?>
- <p class="infoText"><?php echo TEXT_NO_PURCHASES; ?></p>
-<?php } ?>
-
-<?php if ($orders_total > 0) { ?>
-
-<div id="splitPageBottom">
- <p class="sP1"><?php echo $history_split->display_count(TEXT_DISPLAY_NUMBER_OF_ORDERS); ?></p>
- <p class="sP2"><?php echo TEXT_RESULT_PAGE . ' ' . $history_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></p>
-</div>
-
-<?php } ?>
-
- <div class="navBt">
- <?php echo '<a class="navBt" href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . IMAGE_BUTTON_BACK . '</a>'; ?>
- </div>
-
-</div>
\ No newline at end of file
Added: trunk/catalog/includes/gabarit/orders_history.display_view.gab
===================================================================
--- trunk/catalog/includes/gabarit/orders_history.display_view.gab (rev 0)
+++ trunk/catalog/includes/gabarit/orders_history.display_view.gab 2011-11-01 21:02:36 UTC (rev 3861)
@@ -0,0 +1,68 @@
+<?php
+/**
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 01/11/11, 21:42
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+ @brief This listing orders for module account/orders_history
+*/
+global $language,$customer_id;
+?>
+<div class="main-orders_history">
+
+ <?php if (count(orders_history::$current) > 0): ?>
+
+ <?php foreach(orders_history::$current as $row): ?>
+ <dl class="orderHistory">
+ <dt>
+ <?php echo __('orders_history text order number') . $row->orders_prefix.$row->orders_id; ?>
+
+ </dt>
+ <dd>
+ <?php echo __('orders_history text order status') . $row->orders_status_name; ?>
+ </dd>
+ <dd>
+ <?php echo __('orders_history text order date') . $row->date_purchased ;?>
+ </dd>
+ <dd>
+ <?php echo $order_type . tep_output_string_protected($order_name); ?>
+ </dd>
+ <dd>
+ <?php echo __('orders_history text order products') . $row->count_products ;?>
+ </dd>
+ <dd>
+ <?php echo __('orders_history text order cost') . strip_tags($row->order_total); ?>
+ </dd>
+ <dd>
+ <span class="linkView">
+ <a class="navBtMini" href="<?php echo $row->linkView ?>" >
+ <?php echo __('orders_history small image button view'); ?>
+ </a>
+ </span>
+ <span class="linkPdf">
+ <a class="linkPdf" href="<?php echo $row->linkPdf ?>">
+ <?php echo __('orders_history pdf link') ?>
+ </a>
+ </span>
+ </dd>
+ </dl>
+ <?php endforeach; ?>
+
+ <div id="splitPageBottom" class="split">
+ <p class="sP1"><?php echo orders_history::$history_split->display_count(__('orders_history text display number of orders %s')); ?></p>
+ <p class="sP2"><?php echo __('orders_history text result page') . ' ' . orders_history::$history_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></p>
+ </div>
+
+ <?php else : ?>
+ <p class="infoText"><?php echo TEXT_NO_PURCHASES; ?></p>
+ <?php endif; ?>
+
+
+ <div class="navBt">
+ <?php echo '<a class="navBt" href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . IMAGE_BUTTON_BACK . '</a>'; ?>
+ </div>
+
+</div>
\ No newline at end of file
Modified: trunk/catalog/includes/languages/fr_FR/account.php
===================================================================
--- trunk/catalog/includes/languages/fr_FR/account.php 2011-11-01 19:17:19 UTC (rev 3860)
+++ trunk/catalog/includes/languages/fr_FR/account.php 2011-11-01 21:02:36 UTC (rev 3861)
@@ -1,9 +1,9 @@
<?php
/**
- @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.1.0
- @date 07/06/10, 14:47
+ @version 2.1.1
+ @date 01/11/11, 21:42
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -83,3 +83,7 @@
define('HEADING_BILLING_ADDRESS',"Adresse de facturation" );
define('HEADING_PAYMENT_METHOD',"Méthode de paiement " );
define('HEADING_ORDER_HISTORY',"Historique de la commande" );
+define('HEADING_HISTORY_DATE',"Date" );
+define('HEADING_HISTORY_STATUS',"Statut" );
+define('HEADING_HISTORY_COMMENT',"Commentaires" );
+?>
Added: trunk/catalog/includes/languages/fr_FR/modules/account/orders_history.txt
===================================================================
--- trunk/catalog/includes/languages/fr_FR/modules/account/orders_history.txt (rev 0)
+++ trunk/catalog/includes/languages/fr_FR/modules/account/orders_history.txt 2011-11-01 21:02:36 UTC (rev 3861)
@@ -0,0 +1,29 @@
+<?php
+/**
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 01/11/11, 21:42
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+
+$lang['orders_history tab']="Voir mes anciennes commandes" ;
+
+$lang['orders_history heading listing']="Historique des Commandes" ;
+$lang['orders_history text order number']="Numéro de commande : " ;
+$lang['orders_history text order status']="Statut de la commande : " ;
+$lang['orders_history text order date']="Date de la commande : " ;
+$lang['orders_history text order products']="Produit(s) : " ;
+$lang['orders_history text order cost']="Coût de la commande : " ;
+
+
+$lang['orders_history small image button view']="Afficher" ;
+$lang['orders_history pdf link']="Pdf" ;
+
+
+$lang['orders_history text result %s']="result %s" ;
+
+
+?>
\ No newline at end of file
Added: trunk/catalog/includes/modules/account/orders_history.php
===================================================================
--- trunk/catalog/includes/modules/account/orders_history.php (rev 0)
+++ trunk/catalog/includes/modules/account/orders_history.php 2011-11-01 21:02:36 UTC (rev 3861)
@@ -0,0 +1,171 @@
+<?php
+/**
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 01/11/11, 21:42
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+ *\class orders_history
+ *\group modules
+ *\brief Address book for customers
+*/
+
+class orders_history
+ extends AbstractAccount
+ implements InterfaceModule{
+
+ /**
+ @var array
+ */
+ public static $current;
+ /**
+ @var array
+ */
+ public static $history_split;
+
+ /**
+ */
+ function __construct(){
+ $this->code =__CLASS__;
+ $this->type ='account';
+ $this->title = __('module orders_history text title');
+ $this->description = __('module orders_history text description') ;
+ $this->sort_order = (defined('MODULE_ACA_HISTORY_SORT_ORDER')) ? MODULE_ACA_HISTORY_SORT_ORDER : 0;
+ $this->enabled = true;
+
+
+ $this->sql_data_array=array();
+ $this->cInfo = new objectInfo(array());
+
+ }
+
+ public function get_header($action=''){}
+
+ /**
+ * \fn check_action($action)
+ * \brief Action exe
+ * @param $action string la var d'action
+ * @p $cID int recupere le Session[]
+ */
+ public function check_action($action) {
+
+ if (!tep_session_is_registered('customer_id')) return false;
+
+ global $page;
+ $customer_id=$page->the_var('customer_id');
+
+
+// switch ($action) {
+// }
+
+ return true;
+ }
+
+ /**
+ */
+ public function after_check_action ($action) {
+ if($action=='new') tep_redirect(tep_href_link(FILENAME_ACCOUNT, 'aca_mod='.$this->code.'&aca_type='.$this->type.'&aca_action=display_view', 'SSL'));
+ }
+
+
+
+ /**
+ */
+ public function load_db_values($cID) {
+ global $languages_id;
+
+ $DB=Database::getInstance();
+
+ $sql="SELECT o.orders_id,o.orders_prefix, o.date_purchased, o.delivery_name, o.billing_name, ot.text as order_total,o.orders_status, s.status_name as orders_status_name from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_TOTAL . " ot, " . TABLE_STATUS . " s WHERE o.customers_id = '" . (int)$cID . "' AND o.orders_id = ot.orders_id and ot.class = 'ot_total' and o.orders_status = s.status_id AND status_type='orders' AND s.language_id = '" . (int)$languages_id . "' ORDER BY orders_id DESC";
+
+ self::$history_split = new splitPageResults($sql, MAX_DISPLAY_ORDER_HISTORY);
+ $_query = $DB->query(self::$history_split->sql_query);
+
+ foreach($_query->fetchAllAssoc() as $row){
+
+ $products_query = tep_db_query("select count(*) as count from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$row['orders_id'] . "'");
+ $products = tep_db_fetch_array($products_query);
+
+ if (tep_not_null($row['delivery_name'])) {
+ $order_type = TEXT_ORDER_SHIPPED_TO;
+ $order_name = $row['delivery_name'];
+ } else {
+ $order_type = TEXT_ORDER_BILLED_TO;
+ $order_name = $row['billing_name'];
+ }
+
+
+ $n = new objectInfo($row);
+ $n->date_purchased = tep_date_short($row['date_purchased']);
+ $n->type = 'order';
+ $n->count_products = $products['count'];
+ $n->destinataire = $order_type.' '.$order_name;
+// $n->linkView = tep_href_link(FILENAME_ACCOUNT, 'aca_mod='.$this->code.'&aca_type='.$this->type.'&aca_action=display_info&oID='. (int)$row['orders_id'], 'SSL');
+ $n->linkView = tep_href_link(FILENAME_ACCOUNT, 'action=history_info&order_id=' . (int)$row['orders_id'], 'SSL');
+ $n->linkPdf = tep_href_link(FILENAME_ACCOUNT, 'action=pdf&order_id=' . (int)$row['orders_id'], 'SSL');
+
+ $result[strtotime($row['date_purchased'])]=$n;
+ }
+
+
+ krsort($result);
+
+ return ($result);
+ }
+
+
+
+
+ /**
+ List des element du block my account
+ */
+ public function display_view_min_listMyOrders($cID){
+ global $page;
+
+ $v['title']=__("orders_history tab");
+ $v['href_link']= tep_href_link(FILENAME_ACCOUNT, 'aca_mod='.$this->code.'&aca_type='.$this->type.'&aca_action=display_view', 'SSL');
+ return array(new objectInfo($v));
+ }
+
+ /**
+ * \fn display_view($pID='')
+ * \brief Affiche Block edit/modif reviews
+ * @param $pID int id products
+ * @p $customer_id int current
+ */
+ public function display_view($pID=''){
+ global $page;
+
+ $customer_id=$page->the_var('customer_id');
+
+ self::$current = $this->load_db_values($customer_id);
+
+ return new objectInfo(array('title'=>__("orders_history heading listing"),'content'=> tep_output_string_protected(tep_get_include_contents(__CLASS__.'.'.__FUNCTION__),false,true) ) );
+ }
+
+
+ /**
+ * \brief select function for display
+ */
+// public function display_info(){
+// global $page;
+//
+// $customer_id=$page->the_var('customer_id');
+//
+// self::$current = $this->load_db_values($customer_id);
+//
+// return new objectInfo(array('title'=>__("orders_history heading listing"),'content'=> tep_output_string_protected(tep_get_include_contents(__CLASS__.'.'.__FUNCTION__),false,true) ) );
+// }
+
+
+
+/** implements InterfaceModule depend */
+ public function check() {}
+ public function install() {}
+ public function remove() {}
+ public function keys() {}
+}
+
+?>
\ No newline at end of file
Modified: trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/content/account.php
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/content/account.php 2011-11-01 19:17:19 UTC (rev 3860)
+++ trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/content/account.php 2011-11-01 21:02:36 UTC (rev 3861)
@@ -36,6 +36,27 @@
<?php } ?>
+
+
+ <div class="contentBox myAccount">
+ <h3><?php echo MY_ACCOUNT_TITLE; ?></h3>
+ <ul>
+ <li><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT, 'action=edit', 'SSL') . '">' . MY_ACCOUNT_INFORMATION . '</a>'; ?></li>
+ <li><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT, 'action=password', 'SSL') . '">' . MY_ACCOUNT_PASSWORD . '</a>'; ?></li>
+ <?php /** ACA module */ foreach($module as $k){ if (method_exists($k, 'display_view_min_listMyAccount')) foreach($k->display_view_min_listMyAccount($customer_id) as $kt=>$vt){ $i++; echo '<li><a href="'.$vt->href_link.'">'.$vt->title.'</a> </li>'; } } ?>
+ </ul>
+ </div>
+
+ <div class="contentBox myEmail">
+ <h3><?php echo HEADER_TITLE_LOGOFF; ?></h3>
+ <ul>
+ <li><?php echo '<a href="' . tep_href_link(FILENAME_LOGOFF, '', 'NONSSL') . '">' .TEXT_LOGOFF . '</a>'; ?></li>
+ </ul>
+ </div>
+
+ <div class="contentBox myOrders">
+ <h3><?php echo MY_ORDERS_TITLE; ?></h3>
+
<?php while ($orders = tep_db_fetch_array($orders_query)) {
if (tep_count_customer_orders() > 0) { ?>
<div class="contentBox overview">
@@ -47,26 +68,14 @@
else echo tep_output_string_protected($orders['billing_name']) . ', ' . $orders['billing_country']; ?></li>
</ul>
<?php } ?>
- <p><?php echo '<a class="navBtMini" href="' . tep_href_link(FILENAME_ACCOUNT, 'action=history', 'SSL') . '">' . OVERVIEW_SHOW_ALL_ORDERS . '</a>'; ?></p>
</div>
<?php } ?>
- <div class="contentBox myAccount">
- <h3><?php echo MY_ACCOUNT_TITLE; ?></h3>
<ul>
- <li><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT, 'action=edit', 'SSL') . '">' . MY_ACCOUNT_INFORMATION . '</a>'; ?></li>
- <li><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT, 'action=password', 'SSL') . '">' . MY_ACCOUNT_PASSWORD . '</a>'; ?></li>
- <?php /** ACA module */ foreach($module as $k){ if (method_exists($k, 'display_view_min_listMyAccount')) foreach($k->display_view_min_listMyAccount($customer_id) as $kt=>$vt){ $i++; echo '<li><a href="'.$vt->href_link.'">'.$vt->title.'</a> </li>'; } } ?>
+ <?php /** ACA module */ foreach($module as $k){ if (method_exists($k, 'display_view_min_listMyOrders')) foreach($k->display_view_min_listMyOrders($customer_id) as $kt=>$vt){ $i++; echo '<li><a href="'.$vt->href_link.'">'.$vt->title.'</a> </li>'; } } ?>
</ul>
</div>
- <div class="contentBox myOrders">
- <h3><?php echo MY_ORDERS_TITLE; ?></h3>
- <ul>
- <li><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT, 'action=history', 'SSL') . '">' . MY_ORDERS_VIEW . '</a>'; ?></li>
- </ul>
- </div>
-
<div class="contentBox myEmail">
<h3><?php echo EMAIL_NOTIFICATIONS_TITLE; ?></h3>
<ul>
@@ -74,11 +83,6 @@
</ul>
</div>
- <div class="contentBox myEmail">
- <h3><?php echo HEADER_TITLE_LOGOFF; ?></h3>
- <ul>
- <li><?php echo '<a href="' . tep_href_link(FILENAME_LOGOFF, '', 'NONSSL') . '">' .TEXT_LOGOFF . '</a>'; ?></li>
- </ul>
- </div>
+
</div>
\ No newline at end of file
Deleted: trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/content/account_history.php
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/content/account_history.php 2011-11-01 19:17:19 UTC (rev 3860)
+++ trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/content/account_history.php 2011-11-01 21:02:36 UTC (rev 3861)
@@ -1,68 +0,0 @@
-<?php
-/**
- @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
- @subpackage 2cShopHtml5Oscim
- @package osCSS-2 <www http://www.oscss.org>
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @date 16/09/10, 21:54
- @encode UTF-8
-*/
-?>
-
-<header>
- <h1 class="content title <?php echo $language ;?>"><?php echo HEADING_TITLE_6; ?></h1>
-</header>
-
-
-
-<div id="accountHistory">
-
-<?php
- $orders_total = tep_count_customer_orders();
-
- if ($orders_total > 0) {
- $history_query_raw = "select o.orders_id,o.orders_prefix, o.date_purchased, o.delivery_name, o.billing_name, ot.text as order_total,o.orders_status, s.status_name as orders_status_name from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_TOTAL . " ot, " . TABLE_STATUS . " s where o.customers_id = '" . (int)$customer_id . "' and o.orders_id = ot.orders_id and ot.class = 'ot_total' and o.orders_status = s.status_id AND status_type='orders' AND s.language_id = '" . (int)$languages_id . "' order by orders_id DESC";
- $history_split = new splitPageResults($history_query_raw, MAX_DISPLAY_ORDER_HISTORY);
- $history_query = tep_db_query($history_split->sql_query);
-
- while ($history = tep_db_fetch_array($history_query)) {
- $products_query = tep_db_query("select count(*) as count from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$history['orders_id'] . "'");
- $products = tep_db_fetch_array($products_query);
-
- if (tep_not_null($history['delivery_name'])) {
- $order_type = TEXT_ORDER_SHIPPED_TO;
- $order_name = $history['delivery_name'];
- } else {
- $order_type = TEXT_ORDER_BILLED_TO;
- $order_name = $history['billing_name'];
- }
-?>
- <dl class="orderHistory">
- <dt><?php echo TEXT_ORDER_NUMBER . $history['orders_prefix'].$history['orders_id']; ?> <span class="linkPdf"><a href="<?php echo tep_href_link(FILENAME_ACCOUNT, 'action=pdf&'.(isset($_GET['page']) ? 'page=' . $_GET['page'] . '&' : '') . 'order_id=' . $history['orders_id'], 'SSL') ?>">PDF</a></span></dt>
- <dd><?php echo TEXT_ORDER_STATUS . $history['orders_status_name']; ?></dd>
- <dd><?php echo TEXT_ORDER_DATE . tep_date_long($history['date_purchased']) ;?></dd>
- <dd><?php echo $order_type . tep_output_string_protected($order_name); ?></dd>
- <dd><?php echo TEXT_ORDER_PRODUCTS . $products['count'] ;?></dd>
- <dd><?php echo TEXT_ORDER_COST . strip_tags($history['order_total']); ?></dd>
- <dd><?php echo '<a class="navBtMini" href="' . tep_href_link(FILENAME_ACCOUNT, 'action=history_info&'.(isset($_GET['page']) ? 'page=' . $_GET['page'] . '&' : '') . 'order_id=' . $history['orders_id'], 'SSL') . '">' . SMALL_IMAGE_BUTTON_VIEW . '</a>'; ?></dd>
- </dl>
-
-<?php }
- } else { ?>
- <p class="infoText"><?php echo TEXT_NO_PURCHASES; ?></p>
-<?php } ?>
-
-<?php if ($orders_total > 0) { ?>
-
-<div id="splitPageBottom">
- <p class="sP1"><?php echo $history_split->display_count(TEXT_DISPLAY_NUMBER_OF_ORDERS); ?></p>
- <p class="sP2"><?php echo TEXT_RESULT_PAGE . ' ' . $history_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></p>
-</div>
-
-<?php } ?>
-
- <div class="navBt">
- <?php echo '<a class="navBt" href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . IMAGE_BUTTON_BACK . '</a>'; ?>
- </div>
-
-</div>
\ No newline at end of file
Modified: trunk/catalog/install/data/templates/appareil_photo/electronix/includes/content/account.php
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/electronix/includes/content/account.php 2011-11-01 19:17:19 UTC (rev 3860)
+++ trunk/catalog/install/data/templates/appareil_photo/electronix/includes/content/account.php 2011-11-01 21:02:36 UTC (rev 3861)
@@ -60,7 +60,7 @@
<div class="contentBox myOrders">
<h3><?php echo MY_ORDERS_TITLE; ?></h3>
<ul>
- <li><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT, 'action=history', 'SSL') . '">' . MY_ORDERS_VIEW . '</a>'; ?></li>
+ <?php /** ACA module */ foreach($module as $k){ if (method_exists($k, 'display_view_min_listMyOrders')) foreach($k->display_view_min_listMyOrders($customer_id) as $kt=>$vt){ $i++; echo '<li><a href="'.$vt->href_link.'">'.$vt->title.'</a> </li>'; } } ?>
</ul>
</div>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2011-11-01 19:17:25
|
Revision: 3860
http://oscss.svn.sourceforge.net/oscss/?rev=3860&view=rev
Author: oscim
Date: 2011-11-01 19:17:19 +0000 (Tue, 01 Nov 2011)
Log Message:
-----------
element manquant
Added Paths:
-----------
trunk/catalog/Documents/docs/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2011-11-01 19:13:40
|
Revision: 3859
http://oscss.svn.sourceforge.net/oscss/?rev=3859&view=rev
Author: oscim
Date: 2011-11-01 19:13:33 +0000 (Tue, 01 Nov 2011)
Log Message:
-----------
correction coquille
Ajout module d'un historique clients cot?\195?\169 admin
Modified Paths:
--------------
trunk/catalog/admin/includes/content/configuration.top.inc
trunk/catalog/admin/includes/gabarit/orders/display_view.edit.gab
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/orders.txt
trunk/catalog/admin/includes/template/oscss/stylesheet-1.css
Added Paths:
-----------
trunk/catalog/admin/includes/gabarit/customers/history/
trunk/catalog/admin/includes/gabarit/customers/history/display_edit.noedit.gab
trunk/catalog/admin/includes/languages/fr_FR/modules/account/history.txt
trunk/catalog/admin/includes/modules/account/history.php
Modified: trunk/catalog/admin/includes/content/configuration.top.inc
===================================================================
--- trunk/catalog/admin/includes/content/configuration.top.inc 2011-11-01 15:12:35 UTC (rev 3858)
+++ trunk/catalog/admin/includes/content/configuration.top.inc 2011-11-01 19:13:33 UTC (rev 3859)
@@ -80,8 +80,13 @@
$list=sqlconfiguration::fetch(array('group_id'=> (int)$gID), true);
- foreach($list as $row) {
+ if(is_object($list))
+ $liste[]=$list;
+ else
+ $liste=$list;
+ foreach($liste as $row) {
+
if(isset($_POST['configuration'][$row->key])) {
$configuration_value = tep_db_prepare_input($_POST['configuration'][$row->key]);
Added: trunk/catalog/admin/includes/gabarit/customers/history/display_edit.noedit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/customers/history/display_edit.noedit.gab (rev 0)
+++ trunk/catalog/admin/includes/gabarit/customers/history/display_edit.noedit.gab 2011-11-01 19:13:33 UTC (rev 3859)
@@ -0,0 +1,34 @@
+<?php
+/**
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 01/11/11, 20:00
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+?>
+
+<div class="main-customers history noedit">
+
+ <table class="dataTableBase">
+ <thead>
+ <tr>
+ <th><?php echo __('history table heading type') ?></th>
+ <th><?php echo __('history table heading date') ?></th>
+ <th><?php echo __('history table heading text') ?></th>
+ </tr>
+ </thead>
+ <tbody>
+ <?php foreach(history::$cInfo as $row): ?>
+ <tr>
+ <td class="tleft"><?php echo __('history '.$row->type) ?></td>
+ <td class="tcenter"><?php echo $row->date ?></td>
+ <td class="tleft"><?php echo $row->text ?></td>
+ </tr>
+ <?php endforeach; ?>
+ </tbody>
+ </table>
+
+</div>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/gabarit/orders/display_view.edit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/orders/display_view.edit.gab 2011-11-01 15:12:35 UTC (rev 3858)
+++ trunk/catalog/admin/includes/gabarit/orders/display_view.edit.gab 2011-11-01 19:13:33 UTC (rev 3859)
@@ -24,14 +24,14 @@
<!-- DRAW DETAIL CUSTOMERS -->
<div class="box_uniq">
- <fieldset class="block_field fleft w_40" >
+ <fieldset class="block_field fleft w_50" >
<legend><?php echo __('entry customer'); ?></legend>
<p class="block_input">
<?php echo tep_address_format(orders::$order->customer['format_id'], orders::$order->customer, 1, '', '<br />'); ?><br />
</p>
</fieldset>
- <fieldset class="block_field fleft w_40" >
+ <fieldset class="block_field fleft w_50" >
<legend><?php echo __('legend contact customers'); ?></legend>
<p class="block_input">
<strong><?php echo __('entry telephone number'); ?></strong><?php echo orders::$order->customer['telephone']; ?>
@@ -48,14 +48,14 @@
<!-- DRAW ADRESS SHIPING / BILLING -->
<div class="box_uniq">
- <fieldset class="block_field fleft w_40" >
+ <fieldset class="block_field fleft w_50" >
<legend><?php echo __('entry shipping address'); ?></legend>
<p class="block_input">
<?php echo tep_address_format(orders::$order->delivery['format_id'], orders::$order->delivery, 1, '', '<br />'); ?></p>
</p>
</fieldset>
- <fieldset class="block_field fleft w_40" >
+ <fieldset class="block_field fleft w_50" >
<legend><?php echo __('entry billing address'); ?></legend>
<p class="block_input">
<?php echo tep_address_format(orders::$order->billing['format_id'], orders::$order->billing, 1, '', '<br />'); ?>
@@ -65,7 +65,7 @@
<!-- DRAW METHOD SHIPING / BILLING -->
<div class="box_uniq">
- <fieldset class="block_field fleft w_40">
+ <fieldset class="block_field fleft w_50">
<legend><?php echo __('entry payment method'); ?></legend>
<p class="block_input">
<?php echo orders::$order->info['payment_method'] ; ?>
@@ -87,7 +87,7 @@
- <table class="main-orders history">
+ <table class="main-orders history padd_w">
<thead>
<tr>
<th><?php echo __('table heading date added'); ?></th>
@@ -271,7 +271,51 @@
</div>
+<!-- DRAW BLOCK DOCS EXISTS OR LINK PDF CREATE -->
+ <div class="main-orders block fleft w_50 padd_w">
+ <h4><?php echo __('heading documents') ?></h4>
+ <table class="main-orders docs">
+ <thead>
+ <tr>
+ <th>Fichier</th>
+ <th>poids</th>
+ <th>Date</th>
+ </tr>
+ </thead>
+
+ <?php $datadocs=new DatasFiles; ?>
+ <tr>
+ <th colspan="2"><?php echo IMAGE_ORDERS_PACKINGSLIP ?></th>
+ <th><?php if(_cst_bool('USE_LOCAL_GENERAT_PDF')) echo '<a class="button" href="' . tep_href_link(FILENAME_BATCH_PRINT, tep_get_all_get_params(array('page_admin','action')).'forceview=pdf&file_type=packingslip&action=exe') . '" onclick="window.open(this.href); return false;">' . __('pdf generate') . '</a>' ; ?></th>
+ </tr>
+
+ <?php if(( $filepath=$datadocs->GetDoc('packingslip', $_GET['oID'])) && file_exists($filepath)): ?>
+ <tr>
+ <td><a href="<?php echo tep_href_link('document.php', 'mod=packingslip&id='.$_GET['oID']) ?>"><?php echo basename($filepath) ?></a></td>
+ <td><?php echo round((filesize($filepath)/1000),1).' Ko' ; ?></td>
+ <td><?php echo tep_datetime_short(date('Y-m-d H:i:s',filemtime($filepath))) ; ?></td>
+ </tr>
+ <?php endif; ?>
+
+ <tr>
+ <th colspan="2"><?php echo IMAGE_ORDERS_INVOICE ?></th>
+ <th><?php if(_cst_bool('USE_LOCAL_GENERAT_PDF')) echo '<a class="button" href="' . tep_href_link(FILENAME_BATCH_PRINT, tep_get_all_get_params(array('page_admin','action','forceview')).'forceview=pdf&file_type=invoice&action=exe') . '">' . __('pdf generate') . '</a>' ; ?></th>
+ </tr>
+
+ <?php if(( $filepath=$datadocs->GetDoc('invoices', $_GET['oID'])) && file_exists($filepath)): ?>
+ <tr>
+ <td><a href="<?php echo tep_href_link('document.php', 'mod=invoice&id='.$_GET['oID']) ?>"><?php echo basename($filepath) ?></a></td>
+ <td><?php echo round((filesize($filepath)/1000),1).' Ko' ; ?></td>
+ <td><?php echo tep_datetime_short(date('Y-m-d H:i:s',filemtime($filepath))) ; ?></td>
+ </tr>
+ <?php endif; ?>
+
+ </table>
+ </div>
+
+
+
<div class="button_nav">
<?php echo tep_js_back(tep_href_link(orders::FILENAME), IMAGE_CANCEL);?>
</div>
Added: trunk/catalog/admin/includes/languages/fr_FR/modules/account/history.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/account/history.txt (rev 0)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/account/history.txt 2011-11-01 19:13:33 UTC (rev 3859)
@@ -0,0 +1,27 @@
+<?php
+/**
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 01/11/11, 20:01
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+$lang['history text title']="Liste des évènements d'un client" ;
+$lang['history text description']="Liste les évènements d'un client" ;
+
+$lang['history tab']="Suivi" ;
+
+$lang['history table heading type']="Type" ;
+$lang['history table heading date']="Date" ;
+$lang['history table heading text']="Details" ;
+
+$lang['history order']="Commande" ;
+$lang['history account']="Compte" ;
+
+$lang['history new commande n %s']="Nouvelle commande n°%s" ;
+$lang['history last logon']="Dernière connexion" ;
+$lang['history last update']="Dernière modification du compte" ;
+$lang['history date created']="Compte créer" ;
+?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/pages/orders.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/pages/orders.txt 2011-11-01 15:12:35 UTC (rev 3858)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/orders.txt 2011-11-01 19:13:33 UTC (rev 3859)
@@ -12,6 +12,7 @@
$lang['heading title']="Commandes" ;
$lang['heading title search']="ID commande :" ;
$lang['heading title status']="Statut :" ;
+$lang['heading documents']="Documents" ;
$lang['tab orders briefs']="Details" ;
$lang['tab orders details']="Commande" ;
@@ -39,7 +40,7 @@
$lang['table heading date added']="Date d'ajout" ;
$lang['table heading return']="Retour" ;
-$lang['legend contact customers']="Contact" ;
+
$lang['entry customer']="Client" ;
$lang['entry sold to']="VENDU À :" ;
$lang['entry delivery to']="Livraison à :" ;
@@ -87,6 +88,10 @@
$lang['text no order history']="Aucun historique de commande disponible" ;
$lang['text shedule return']="engager une procédure de retour produit ou d'échange" ;
+$lang['legend contact customers']="Contact" ;
+$lang['legend update order history']="Mise à jour" ;
+$lang['pdf generate']="Generer" ;
+
$lang['error order does not exist']="Erreur : La commande n'existe pas." ;
$lang['success order updated']="Succès : La commande est mise à jour avec succès." ;
$lang['warning order not updated']="Attention : Aucune modification n'a été effectuée. La commande n'a pas été mise à jour." ;
Added: trunk/catalog/admin/includes/modules/account/history.php
===================================================================
--- trunk/catalog/admin/includes/modules/account/history.php (rev 0)
+++ trunk/catalog/admin/includes/modules/account/history.php 2011-11-01 19:13:33 UTC (rev 3859)
@@ -0,0 +1,152 @@
+<?php
+/**
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 01/11/11, 20:02
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+ @class history
+*/
+
+
+class history
+ implements InterfaceModule{
+
+ public static $cInfo;
+
+ public static $action;
+
+ /**
+ */
+ function __construct(){
+
+ $this->code = __CLASS__;
+ $this->title = __('history text title');
+ $this->description = __('history text description') ;
+ $this->sort_order = (defined('MODULE_ACA_ORDERS_HISTORY_SORT_ORDER')) ? MODULE_ACA_ORDERS_HISTORY_SORT_ORDER : 10;
+ $this->enabled = true;
+
+ $this->sql_data_array=array();
+ self::$cInfo = new objectInfo(array());
+ }
+
+ public function check_action($actions){
+ global $oscss;
+ self::$action=$actions['action'];
+ $languages = tep_get_languages();
+ $messageStack=messageStack::getInstance();
+
+ switch(self::$action){
+ case 'noedit':
+
+ break;
+ }
+
+ return $actions;
+ }
+
+ public function get_header(){
+
+ }
+
+
+
+ public function deleteconfirm_account($id){
+// tep_db_query("delete from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$id . "'");
+ }
+
+
+ /**
+ * \fn type filter text
+ * \brief Load each module parameters from database
+ * @param $cID integer Id customers current
+ */
+ public function load_db_values($cID) {
+ global $languages_id;
+
+ $DB=Database::getInstance();
+
+ $_query = $DB->query($sql="SELECT o.orders_id,o.orders_prefix, o.date_purchased, o.delivery_name, o.billing_name, ot.text as order_total,o.orders_status, s.status_name as orders_status_name from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_TOTAL . " ot, " . TABLE_STATUS . " s WHERE o.customers_id = '" . (int)$cID . "' AND o.orders_id = ot.orders_id and ot.class = 'ot_total' and o.orders_status = s.status_id AND status_type='orders' AND s.language_id = '" . (int)$languages_id . "' ORDER BY orders_id DESC");
+
+
+ foreach($_query->fetchAllAssoc() as $row){
+ $n = new stdClass();
+ $n->date = tep_datetime_short($row['date_purchased']);
+ $n->type = 'order';
+ $n->text = sprintf(__('history new commande n %s'), $row['orders_id']);
+
+ $result[strtotime($row['date_purchased'])]=$n;
+ }
+
+
+ $_query = $DB->query($sql="SELECT customers_info_date_of_last_logon ,customers_info_date_account_created ,customers_info_date_account_last_modified from " . TABLE_CUSTOMERS_INFO . " c WHERE customers_info_id = '" . (int)$cID . "' ");
+
+ $row=$_query->fetchAssoc();
+
+ $n = new stdClass();
+ $n->date = tep_datetime_short($row['customers_info_date_of_last_logon']);
+ $n->text = __('history last logon');
+ $n->type = 'account';
+ $result[strtotime($row['customers_info_date_of_last_logon'])]=$n;
+
+ $n = new stdClass();
+ $n->date = tep_datetime_short($row['customers_info_date_account_created']);
+ $n->text = __('history date created');
+ $n->type = 'account';
+ $result[strtotime($row['customers_info_date_account_created'])]=$n;
+
+ $n = new stdClass();
+ $n->date = tep_datetime_short($row['customers_info_date_account_last_modified']);
+ $n->text = __('history last update');
+ $n->type = 'account';
+ $result[strtotime($row['customers_info_date_account_last_modified'])]=$n;
+
+ krsort($result);
+
+ return ($result);
+ }
+
+ /**
+ * \fn load_post_values ($post)
+ * @param $post array
+ */
+ public function load_post_values ($post) {
+ return $post;
+ }
+
+
+ function display_edit(&$contents,$id) {
+ global $processed;
+
+
+ switch(self::$action){
+ case 'noedit':
+ self::$cInfo=$this->load_db_values($id);
+ $contents []= array('title'=> __('history tab'),
+ 'text'=> tep_get_include_contents('customers/'.__CLASS__.'/'.__FUNCTION__.'.'.self::$action) );
+ break;
+ }
+
+ }
+
+/** Force implements InterfaceModule class to define this method */
+ function check() {
+ if (!isset($this->_check)) {
+ $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_ACA_ORDERS_HISTORY_SORT_ORDER'");
+ $this->_check = tep_db_num_rows($check_query);
+ }
+ return $this->_check;
+ }
+
+ function install() { return false; }
+
+ function remove() {return false; }
+
+ function keys() {
+ return array( 'MODULE_ACA_ORDERS_HISTORY_SORT_ORDER' );
+ }
+}
+
+?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/template/oscss/stylesheet-1.css
===================================================================
--- trunk/catalog/admin/includes/template/oscss/stylesheet-1.css 2011-11-01 15:12:35 UTC (rev 3858)
+++ trunk/catalog/admin/includes/template/oscss/stylesheet-1.css 2011-11-01 19:13:33 UTC (rev 3859)
@@ -61,6 +61,8 @@
.w_50 {width:49%;}
.w_40 {width:39%;}
.w_30 {width:29%;}
+ .padd_w {padding-left:10px; padding-right:10px;}
+ .padd_h {padding-top:10px; padding-bottom:10px;}
/* buttons */
.button,
@@ -257,7 +259,7 @@
/* content */
#central h3{ font-size:15px; font-weight:bold; margin:0 0 10px; padding:0 5px 10px 3px; clear:both; }
- #central h4{font-weight:bold; padding:20px 5px 10px; clear:both; }
+ #central h4{font-weight:bold; padding:15px 5px 8px; clear:both; }
/* Block formulaire central */
#central .block_form { -moz-border-radius:6px; -webkit-border-radius:6px; width:99%; margin:0;padding:5px 0.2em 10px 0.2em; display:inline-block; text-align: left; background:#C9C9C9;}
#central .block_form .tabs_lang{width:98%; float:left;}
@@ -284,11 +286,23 @@
/* Ajsutement Page Orders*/
- #central .block_form.main-orders .box_right form label {width:90%}
- #central .block_form.main-orders .block_input br,
- #central .block_form.main-orders .block_input span.value_edit br{display:block;height:0;}
+ #central .box_uniq.block_form.main-orders fieldset{margin:10px 0 0 0;padding:0 5px;}
+ #central div.main-orders.block {background:#c9c9c9; -moz-border-radius: 6px 6px 6px 6px;}
+ #central .block_form.main-orders .block_input br,
+ #central .block_form.main-orders .block_input span.value_edit br{display:block;height:0;}
+
+ #central table.main-orders {width:100%;}
+ #central table.main-orders thead tr th{background:#303030; color:white;}
+ #central table.main-orders tr th{background:#eee; height:20px;line-height: 20px; }
+ #central table.main-orders tr th a{margin:0;}
+
+ /* Ajsutement customer page */
+ #central .box_uniq.block_form.main-customers .block_input label{width:35%;}
+
+
+
/* central form .block_input */
#central form .block_input .hasDatepicker{ margin:0; display:inline-block; text-align: left; padding: 0 5px; background:#DEDADE;float:left;line-height:30px; min-width:0;}
#central form .block_field { text-shadow:0 1px 0 #fff;-moz-border-radius:6px; -webkit-border-radius:6px; min-width:96%; width:96.5%; max-width:97%; margin:2px ; display:inline-block; text-align: left; padding: 5px; float:left;background:#eee;}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2011-11-01 15:12:48
|
Revision: 3858
http://oscss.svn.sourceforge.net/oscss/?rev=3858&view=rev
Author: oscim
Date: 2011-11-01 15:12:35 +0000 (Tue, 01 Nov 2011)
Log Message:
-----------
amelioration edition des commande
Correction css
Ajout contrainte sql
prise en charge image produits sur admin/document.php
Modified Paths:
--------------
trunk/catalog/admin/document.php
trunk/catalog/admin/includes/classes/drivers/sqlamattribute2template.php
trunk/catalog/admin/includes/classes/drivers/sqlorder.php
trunk/catalog/admin/includes/database_tables.php
trunk/catalog/admin/includes/gabarit/orders/display_view.edit.gab
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/orders.txt
trunk/catalog/admin/includes/modules/pages/orders.php
trunk/catalog/admin/includes/template/oscss/stylesheet-1.css
trunk/catalog/common/classes/order.php
trunk/extensions/ATTRIBUTEMANAGER_stable/attributeManager/classes/attributeManager.class.php
trunk/extensions/ATTRIBUTEMANAGER_stable/attributeManager/classes/attributeManagerConfig.class.php
Added Paths:
-----------
trunk/catalog/install/includes/sql/mysql/tables/osc_products_am_attributes_to_templates.key.sql
Modified: trunk/catalog/admin/document.php
===================================================================
--- trunk/catalog/admin/document.php 2011-11-01 08:56:16 UTC (rev 3857)
+++ trunk/catalog/admin/document.php 2011-11-01 15:12:35 UTC (rev 3858)
@@ -11,35 +11,79 @@
-switch($_REQUEST['mod']){
- case 'packingslip':
- if(( $filepath=DatasFiles::GetDoc('packingslip', $_REQUEST['id'])) && file_exists(DIR_FS_ROOT_DOCS.$filepath)) {
- //We send to a browser
- header('Content-Type: application/pdf');
- // header('Content-Length: '.strlen($this->buffer));
- header('Content-Disposition: inline; filename="'.basename($filepath).'"');
- header('Cache-Control: private, max-age=0, must-revalidate');
- header('Pragma: public');
- ini_set('zlib.output_compression','0');
+switch((string)$_REQUEST['mod']){
+ /**
+ @brief Traitement des images
+ Prise en charge des images
+ */
+ case 'images':
+ case 'image':
+ case 'img':
- readfile(DIR_FS_ROOT_DOCS.$filepath);
- }
- break;
+ $width=((isset($_REQUEST['w']) && (int)$_REQUEST['w'] > 0)? (int)$_REQUEST['w'] : '');
+ $height=((isset($_REQUEST['h']) && (int)$_REQUEST['h'] > 0)? (int)$_REQUEST['h'] : '');
- case 'invoice':
- if(( $filepath=DatasFiles::GetDoc('invoices', $_REQUEST['id'])) && file_exists(DIR_FS_ROOT_DOCS.$filepath)) {
- //We send to a browser
- header('Content-Type: application/pdf');
- // header('Content-Length: '.strlen($this->buffer));
- header('Content-Disposition: inline; filename="'.basename($filepath).'"');
- header('Cache-Control: private, max-age=0, must-revalidate');
- header('Pragma: public');
- ini_set('zlib.output_compression','0');
- readfile(DIR_FS_ROOT_DOCS.$filepath);
- }
- break;
+ /**
+ @remarks Adjust type requete
+ */
+ switch((string)$_REQUEST['typ']){
+ case 'product':
+ $res=sqlproduct::fetch(array('id'=>(int)$_REQUEST['id'],'language_id'=>$languages_id), true);
+ $img = $res->image;
+ $ext1 = $ext = str_replace('.','',substr($img,-4));
+ break;
+ }
+
+
+ $get=image_ratio::get_image(DIR_WS_CATALOG_IMAGES.$img,'',$width,$height);
+
+ if($ext='jpg')$ext='jpeg';
+
+ $img=$get['src'];
+
+ header('Content-type: image/'.$ext1);
+
+ readfile(HTTP_SERVER.$img);
+ exit;
+
+ break;
+
+
+
+
+ /**
+ @brief Traitement des pdf
+ */
+ case 'packingslip':
+ if(( $filepath=DatasFiles::GetDoc('packingslip', $_REQUEST['id'])) && file_exists(DIR_FS_ROOT_DOCS.$filepath)) {
+ //We send to a browser
+ header('Content-Type: application/pdf');
+ // header('Content-Length: '.strlen($this->buffer));
+ header('Content-Disposition: inline; filename="'.basename($filepath).'"');
+ header('Cache-Control: private, max-age=0, must-revalidate');
+ header('Pragma: public');
+ ini_set('zlib.output_compression','0');
+
+ readfile(DIR_FS_ROOT_DOCS.$filepath);
+ }
+ break;
+
+ case 'invoice':
+ if(( $filepath=DatasFiles::GetDoc('invoices', $_REQUEST['id'])) && file_exists(DIR_FS_ROOT_DOCS.$filepath)) {
+ //We send to a browser
+ header('Content-Type: application/pdf');
+ // header('Content-Length: '.strlen($this->buffer));
+ header('Content-Disposition: inline; filename="'.basename($filepath).'"');
+ header('Cache-Control: private, max-age=0, must-revalidate');
+ header('Pragma: public');
+ ini_set('zlib.output_compression','0');
+
+ readfile(DIR_FS_ROOT_DOCS.$filepath);
+ }
+ break;
+
}
Modified: trunk/catalog/admin/includes/classes/drivers/sqlamattribute2template.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlamattribute2template.php 2011-11-01 08:56:16 UTC (rev 3857)
+++ trunk/catalog/admin/includes/classes/drivers/sqlamattribute2template.php 2011-11-01 15:12:35 UTC (rev 3858)
@@ -89,6 +89,8 @@
$sql ="";
if(isset($option['id'])) $sql .="AND template_id = '".(int)tep_db_input($option['id'])."' ";
+ if(isset($option['options_id'])) $sql .="AND options_id = '".(int)tep_db_input($option['options_id'])."' ";
+ if(isset($option['option_values_id'])) $sql .="AND option_values_id = '".(int)tep_db_input($option['option_values_id'])."' ";
$sql ="SELECT * FROM ".TABLE_PRODUCTS_AM_ATTRIBUTES_TO_TEMPLATES." WHERE ".substr($sql,3);
@@ -120,6 +122,8 @@
$sql ="";
if(isset($option['id'])) $sql .="AND template_id = '".(int)tep_db_input($option['id'])."' ";
+ if(isset($option['options_id'])) $sql .="AND options_id = '".(int)tep_db_input($option['options_id'])."' ";
+ if(isset($option['option_values_id'])) $sql .="AND option_values_id = '".(int)tep_db_input($option['option_values_id'])."' ";
if(strlen($sql)==0)
return false;
Modified: trunk/catalog/admin/includes/classes/drivers/sqlorder.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlorder.php 2011-11-01 08:56:16 UTC (rev 3857)
+++ trunk/catalog/admin/includes/classes/drivers/sqlorder.php 2011-11-01 15:12:35 UTC (rev 3858)
@@ -100,7 +100,9 @@
$DB=Database::getInstance();
// $sql ="";
-// if(isset($option['id'])) $sql .="AND configuration_id = '".(int)tep_db_input($option['id'])."' ";
+ if(!isset($option['id']))
+ return 'id';
+// $sql .="AND configuration_id = '".(int)tep_db_input($option['id'])."' ";
// if(isset($option['key'])) $sql .="AND configuration_key = '".(string)tep_db_input($option['key'])."' ";
// if(isset($option['group_id'])) $sql .="AND configuration_group_id = '".(int)(string)tep_db_input($option['group_id'])."' ";
//
@@ -123,7 +125,10 @@
// return $array;
// }
- return false;
+ return new order((int)tep_db_input($option['id']));
+
+
+// return false;
}
/**
@@ -147,7 +152,7 @@
//
if(isset($option['cid']))
- $cid = $option['cid']
+ $cid = $option['cid'];
else {
$check_status_query = tep_db_query("select customers_id from " . TABLE_ORDERS . " where orders_id = '" . (int)$_oID . "'");
Modified: trunk/catalog/admin/includes/database_tables.php
===================================================================
--- trunk/catalog/admin/includes/database_tables.php 2011-11-01 08:56:16 UTC (rev 3857)
+++ trunk/catalog/admin/includes/database_tables.php 2011-11-01 15:12:35 UTC (rev 3858)
@@ -4,93 +4,121 @@
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 09/10/11, 10:46
+ @date 01/11/11, 09:50
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
-//Admin begin
+## Admin begin
+ ## Specific table for manage BO
define('TABLE_ADMIN', DB_TABLE_PREFIX . 'admin_users');
define('TABLE_ADMIN_GROUPS', DB_TABLE_PREFIX . 'admin_groups');
define('TABLE_ADMIN_NOTIFICATION', DB_TABLE_PREFIX.'admin_notification');
define('TABLE_CIP', DB_TABLE_PREFIX . 'admin_cip');
define('TABLE_CIP_DEPEND', DB_TABLE_PREFIX . 'admin_cip_depend');
+ define('TABLE_CRONJOB', DB_TABLE_PREFIX . 'cronjob');
+ define('TABLE_CONFIGURATION_GROUP', DB_TABLE_PREFIX . 'configuration_group');
define('TABLE_ADMIN_FILES', DB_TABLE_PREFIX . 'admin_m_files');
define('TABLE_ADMIN_FILES2RIGHT', DB_TABLE_PREFIX . 'admin_m_files_to_right');
-//Admin end
+## Admin end
-// Dictionnaires begin
+## Dictionnaires begin
+ ## Table used in core BO/FO but is stock data, not regularly change
define('TABLE_ADDRESS_FORMAT', DB_TABLE_PREFIX . 'address_format');
define('TABLE_COUNTRIES', DB_TABLE_PREFIX . 'countries');
-// Dictionnaires end
+ define('TABLE_CURRENCIES', DB_TABLE_PREFIX . 'currencies');
+ define('TABLE_LANGUAGES', DB_TABLE_PREFIX . 'languages');
+ define('TABLE_STATUS',DB_TABLE_PREFIX.'status');
+ define('TABLE_GEO_ZONES', DB_TABLE_PREFIX . 'geo_zones');
+ define('TABLE_TAX_CLASS', DB_TABLE_PREFIX . 'tax_class');
+ define('TABLE_TAX_RATES', DB_TABLE_PREFIX . 'tax_rates');
+ define('TABLE_ZONES_TO_GEO_ZONES', DB_TABLE_PREFIX . 'zones_to_geo_zones');
+ define('TABLE_ZONES', DB_TABLE_PREFIX . 'zones');
+## Dictionnaires end
// define the database table names used in the project
- define('TABLE_ADDRESS_BOOK', DB_TABLE_PREFIX . 'address_book');
- define('TABLE_CATEGORIES', DB_TABLE_PREFIX . 'categories');
- define('TABLE_CATEGORIES_DESCRIPTION', DB_TABLE_PREFIX . 'categories_description');
- define('TABLE_CATEGORIES_EXTRA', DB_TABLE_PREFIX . 'categories_extra');
-
+## Core tables
define('TABLE_CONFIGURATION', DB_TABLE_PREFIX . 'configuration');
- define('TABLE_CONFIGURATION_GROUP', DB_TABLE_PREFIX . 'configuration_group');
- define('TABLE_CONTENT', DB_TABLE_PREFIX . 'content');
- define('TABLE_CONTENT_DESCRIPTION', DB_TABLE_PREFIX . 'content_description');
- define('TABLE_CONTENT_TO_CATEGORIES', DB_TABLE_PREFIX . 'content_to_categories');
- define('TABLE_CRONJOB', DB_TABLE_PREFIX . 'cronjob');
+ ## session if
+ if(STORE_SESSIONS =='mysql')
+ define('TABLE_SESSIONS', DB_TABLE_PREFIX . 'sessions');
+ ## SEO class
+ define('TABLE_SEO_CACHE', DB_TABLE_PREFIX . 'seo_cache');
+ ## online guest public shop
+ define('TABLE_WHOS_ONLINE', DB_TABLE_PREFIX . 'whos_online');
+ ## notif for admin users
+ define('TABLE_NOTIFICATION', DB_TABLE_PREFIX.'checknotif');
- define('TABLE_CURRENCIES', DB_TABLE_PREFIX . 'currencies');
- define('TABLE_CUSTOMERS', DB_TABLE_PREFIX . 'customers');
- define('TABLE_CUSTOMERS_GROUPS', DB_TABLE_PREFIX . 'customers_groups');
- define('TABLE_CUSTOMERS_BASKET', DB_TABLE_PREFIX . 'customers_basket');
- define('TABLE_CUSTOMERS_BASKET_ATTRIBUTES', DB_TABLE_PREFIX . 'customers_basket_attributes');
- define('TABLE_CUSTOMERS_INFO', DB_TABLE_PREFIX .'customers_info');
- define('TABLE_EXTRA_FIELDS',DB_TABLE_PREFIX . 'extra_fields');
- define('TABLE_EXTRA_FIELDS_INFO',DB_TABLE_PREFIX . 'extra_fields_info');
- define('TABLE_CUSTOMERS_TO_EXTRA_FIELDS',DB_TABLE_PREFIX . 'customers_to_extra_fields');
+## Transversal tables
+ # header tag / title (use by products, cat, content, seo, etc.. )
define('TABLE_FULL_TAG', DB_TABLE_PREFIX . 'full_tag');
define('TABLE_FULL_TAG_DESCRIPTION', DB_TABLE_PREFIX . 'full_tag_description');
- define('TABLE_HOLDING_ORDERS', DB_TABLE_PREFIX . 'holding_orders');
- define('TABLE_HOLDING_ORDERS_PRODUCTS', DB_TABLE_PREFIX . 'holding_orders_products');
- define('TABLE_HOLDING_ORDERS_TOTAL', DB_TABLE_PREFIX . 'holding_orders_total');
- define('TABLE_HOLDING_ORDERS_STATUS', DB_TABLE_PREFIX . 'holding_orders_status');
- define('TABLE_HOLDING_ORDERS_PRODUCTS_ATTRIBUTES', DB_TABLE_PREFIX . 'holding_orders_products_attributes');
- define('TABLE_HOLDING_ORDERS_PRODUCTS_DOWNLOAD', DB_TABLE_PREFIX . 'holding_orders_products_download');
- define('TABLE_HOLDING_ORDERS_STATUS_HISTORY', DB_TABLE_PREFIX . 'holding_orders_status_history');
-/// TOP Not Used for dev
- define('TABLE_IMAGES', DB_TABLE_PREFIX . 'images');
- define('TABLE_IMAGES_USED', DB_TABLE_PREFIX . 'images_used');
-/// END Not Used for dev
- define('TABLE_LANGUAGES', DB_TABLE_PREFIX . 'languages');
- define('TABLE_MANUFACTURERS', DB_TABLE_PREFIX . 'manufacturers');
- define('TABLE_MANUFACTURERS_INFO', DB_TABLE_PREFIX . 'manufacturers_info');
+## Orders
+ # Pre order
+ define('TABLE_HOLDING_ORDERS', DB_TABLE_PREFIX . 'holding_orders');
+ define('TABLE_HOLDING_ORDERS_PRODUCTS', DB_TABLE_PREFIX . 'holding_orders_products');
+ define('TABLE_HOLDING_ORDERS_PRODUCTS_ATTRIBUTES', DB_TABLE_PREFIX . 'holding_orders_products_attributes');
+ define('TABLE_HOLDING_ORDERS_PRODUCTS_DOWNLOAD', DB_TABLE_PREFIX . 'holding_orders_products_download');
+ define('TABLE_HOLDING_ORDERS_STATUS_HISTORY', DB_TABLE_PREFIX . 'holding_orders_status_history');
+ define('TABLE_HOLDING_ORDERS_TOTAL', DB_TABLE_PREFIX . 'holding_orders_total');
+ # Reel orders
+ define('TABLE_ORDERS', DB_TABLE_PREFIX . 'orders');
+ define('TABLE_ORDERS_PRODUCTS', DB_TABLE_PREFIX . 'orders_products');
+ define('TABLE_ORDERS_PRODUCTS_ATTRIBUTES', DB_TABLE_PREFIX . 'orders_products_attributes');
+ define('TABLE_ORDERS_PRODUCTS_DOWNLOAD', DB_TABLE_PREFIX . 'orders_products_download');
+ define('TABLE_ORDERS_STATUS_HISTORY', DB_TABLE_PREFIX . 'orders_status_history');
+ define('TABLE_ORDERS_TOTAL', DB_TABLE_PREFIX . 'orders_total');
- define('TABLE_NAVIGATION_LINKS', DB_TABLE_PREFIX . 'navigation_links');
- define('TABLE_NAVIGATION_LINKS_DESCRIPTION', DB_TABLE_PREFIX . 'navigation_links_description');
- define('TABLE_NAVIGATION_LINKS_TO_CATEGORIES', DB_TABLE_PREFIX . 'navigation_links_to_categories');
+## Customers tables
+ # Master tables
+ define('TABLE_CUSTOMERS', DB_TABLE_PREFIX . 'customers');
+ define('TABLE_CUSTOMERS_GROUPS', DB_TABLE_PREFIX . 'customers_groups');
+ define('TABLE_CUSTOMERS_INFO', DB_TABLE_PREFIX .'customers_info');
+ ## Customers Associed specifics tables
+ # Adress book
+ define('TABLE_ADDRESS_BOOK', DB_TABLE_PREFIX . 'address_book');
+ # Cart
+ define('TABLE_CUSTOMERS_BASKET', DB_TABLE_PREFIX . 'customers_basket');
+ define('TABLE_CUSTOMERS_BASKET_ATTRIBUTES', DB_TABLE_PREFIX . 'customers_basket_attributes');
+ # extra
+ define('TABLE_EXTRA_FIELDS',DB_TABLE_PREFIX . 'extra_fields');
+ define('TABLE_EXTRA_FIELDS_INFO',DB_TABLE_PREFIX . 'extra_fields_info');
+ define('TABLE_CUSTOMERS_TO_EXTRA_FIELDS',DB_TABLE_PREFIX . 'customers_to_extra_fields');
+
+
+## newsletters
+ # Master tables
define('TABLE_NEWSLETTERS', DB_TABLE_PREFIX . 'newsletters');
- define('TABLE_NEWSLETTERS_MODELES', DB_TABLE_PREFIX . 'newsletters_modeles');
- define('TABLE_NEWSLETTERS_SENT', DB_TABLE_PREFIX . 'newsletters_sent');
+ ## newsletters Associed specifics tables
+ # use modele
+ define('TABLE_NEWSLETTERS_MODELES', DB_TABLE_PREFIX . 'newsletters_modeles');
+ # track sent news for customers
+ define('TABLE_NEWSLETTERS_SENT', DB_TABLE_PREFIX . 'newsletters_sent');
- define('TABLE_NOTIFICATION', DB_TABLE_PREFIX.'checknotif');
+## Category tables
+ # Master tables
+ define('TABLE_CATEGORIES', DB_TABLE_PREFIX . 'categories');
+ define('TABLE_CATEGORIES_DESCRIPTION', DB_TABLE_PREFIX . 'categories_description');
- define('TABLE_ORDERS', DB_TABLE_PREFIX . 'orders');
- define('TABLE_ORDERS_PRODUCTS', DB_TABLE_PREFIX . 'orders_products');
- define('TABLE_ORDERS_PRODUCTS_ATTRIBUTES', DB_TABLE_PREFIX . 'orders_products_attributes');
- define('TABLE_ORDERS_PRODUCTS_DOWNLOAD', DB_TABLE_PREFIX . 'orders_products_download');
- define('TABLE_ORDERS_STATUS_HISTORY', DB_TABLE_PREFIX . 'orders_status_history');
- define('TABLE_ORDERS_TOTAL', DB_TABLE_PREFIX . 'orders_total');
+ ## Category Associed specifics tables
+ # extra
+ define('TABLE_CATEGORIES_EXTRA', DB_TABLE_PREFIX . 'categories_extra');
+
+## Products Tables
+ # Master tables
define('TABLE_PRODUCTS', DB_TABLE_PREFIX . 'products');
define('TABLE_PRODUCTS_GROUPS', DB_TABLE_PREFIX . 'products_groups');
define('TABLE_PRODUCTS_GROUP_PRICES', DB_TABLE_PREFIX . 'products_group_prices_cg_');
@@ -98,36 +126,61 @@
define('TABLE_PRODUCTS_ATTRIBUTES', DB_TABLE_PREFIX . 'products_attributes');
define('TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD', DB_TABLE_PREFIX . 'products_attributes_download');
define('TABLE_PRODUCTS_DESCRIPTION', DB_TABLE_PREFIX . 'products_description');
- define('TABLE_PRODUCTS_OPTIONS', DB_TABLE_PREFIX . 'products_options');
- define('TABLE_PRODUCTS_OPTIONS_VALUES', DB_TABLE_PREFIX . 'products_options_values');
+ define('TABLE_PRODUCTS_STOCK', DB_TABLE_PREFIX .'products_stock');
+ # link to value option
define('TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS', DB_TABLE_PREFIX . 'products_options_values_to_products_options');
+ # link to cat
define('TABLE_PRODUCTS_TO_CATEGORIES', DB_TABLE_PREFIX . 'products_to_categories');
- define('TABLE_PRODUCTS_STOCK', DB_TABLE_PREFIX .'products_stock');
- define('TABLE_PRODUCTS_EXTRA_FIELDS', DB_TABLE_PREFIX .'products_extra_fields');
- define('TABLE_PRODUCTS_EXTRA_FIELDS_LABELS', DB_TABLE_PREFIX .'products_extra_fields_labels');
- define('TABLE_PRODUCTS_EXTRA_FIELDS_VALUES', DB_TABLE_PREFIX .'products_extra_fields_values');
+ # link to extra
define('TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS', DB_TABLE_PREFIX .'products_to_products_extra_fields');
- define('TABLE_PRODUCTS_TO_VENDORS', DB_TABLE_PREFIX .'products_to_vendors');
- define('TABLE_PRODUCTS_VIRTUAL', DB_TABLE_PREFIX .'products_virtual');
- define('TABLE_SCART', DB_TABLE_PREFIX . 'scart');
- define('TABLE_SESSIONS', DB_TABLE_PREFIX . 'sessions');
- define('TABLE_SEO_CACHE', DB_TABLE_PREFIX . 'seo_cache');
- define('TABLE_STATUS',DB_TABLE_PREFIX.'status');
- define('TABLE_SPECIALS', DB_TABLE_PREFIX . 'specials');
- define('TABLE_TAX_CLASS', DB_TABLE_PREFIX . 'tax_class');
- define('TABLE_TAX_RATES', DB_TABLE_PREFIX . 'tax_rates');
- define('TABLE_TEMPLATE', DB_TABLE_PREFIX . 'template_config');
- define('TABLE_GEO_ZONES', DB_TABLE_PREFIX . 'geo_zones');
+ ## Products Associed specifics tables
+ # Specials
+ define('TABLE_SPECIALS', DB_TABLE_PREFIX . 'specials');
+ # Option for attribute
+ define('TABLE_PRODUCTS_OPTIONS', DB_TABLE_PREFIX . 'products_options');
+ define('TABLE_PRODUCTS_OPTIONS_VALUES', DB_TABLE_PREFIX . 'products_options_values');
+ # Template d'option for products
+ define('TABLE_PRODUCTS_AM_TEMPLATES', DB_TABLE_PREFIX . 'products_am_templates');
+ define('TABLE_PRODUCTS_AM_ATTRIBUTES_TO_TEMPLATES', DB_TABLE_PREFIX . 'products_am_attributes_to_templates');
+ ## Extra value for products
+ define('TABLE_PRODUCTS_EXTRA_FIELDS', DB_TABLE_PREFIX .'products_extra_fields');
+ define('TABLE_PRODUCTS_EXTRA_FIELDS_LABELS', DB_TABLE_PREFIX .'products_extra_fields_labels');
+ define('TABLE_PRODUCTS_EXTRA_FIELDS_VALUES', DB_TABLE_PREFIX .'products_extra_fields_values');
- define('TABLE_VENDORS', DB_TABLE_PREFIX . 'vendors');
- define('TABLE_WHOS_ONLINE', DB_TABLE_PREFIX . 'whos_online');
- define('TABLE_ZONES_TO_GEO_ZONES', DB_TABLE_PREFIX . 'zones_to_geo_zones');
- define('TABLE_ZONES', DB_TABLE_PREFIX . 'zones');
+## Fabricants (linked by products)
+ # Master tables
+ define('TABLE_MANUFACTURERS', DB_TABLE_PREFIX . 'manufacturers');
+ define('TABLE_MANUFACTURERS_INFO', DB_TABLE_PREFIX . 'manufacturers_info');
+## Page cms
+ # Master tables
+ define('TABLE_CONTENT', DB_TABLE_PREFIX . 'content');
+ define('TABLE_CONTENT_DESCRIPTION', DB_TABLE_PREFIX . 'content_description');
+ # link to cat
+ define('TABLE_CONTENT_TO_CATEGORIES', DB_TABLE_PREFIX . 'content_to_categories');
+
+
+## naviagtion links
+ # Master tables
+ define('TABLE_NAVIGATION_LINKS', DB_TABLE_PREFIX . 'navigation_links');
+ define('TABLE_NAVIGATION_LINKS_DESCRIPTION', DB_TABLE_PREFIX . 'navigation_links_description');
+ # link to cat
+ define('TABLE_NAVIGATION_LINKS_TO_CATEGORIES', DB_TABLE_PREFIX . 'navigation_links_to_categories');
+
+
+/// TOP Not Used for dev
+ define('TABLE_IMAGES', DB_TABLE_PREFIX . 'images');
+ define('TABLE_IMAGES_USED', DB_TABLE_PREFIX . 'images_used');
+
+
+
+ define('TABLE_TEMPLATE', DB_TABLE_PREFIX . 'template_config');
+
+/// END Not Used for dev
/* Begin CIP-osCSS-RvBO-banner_manager - installed by Contrib_Installer */
-define('TABLE_BANNERS', DB_TABLE_PREFIX . 'banners');
-define('TABLE_BANNERS_HISTORY', DB_TABLE_PREFIX . 'banners_history');
+// define('TABLE_BANNERS', DB_TABLE_PREFIX . 'banners');
+// define('TABLE_BANNERS_HISTORY', DB_TABLE_PREFIX . 'banners_history');
/* End CIP-osCSS-RvBO-banner_manager - installed by Contrib_Installer */
?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/gabarit/orders/display_view.edit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/orders/display_view.edit.gab 2011-11-01 08:56:16 UTC (rev 3857)
+++ trunk/catalog/admin/includes/gabarit/orders/display_view.edit.gab 2011-11-01 15:12:35 UTC (rev 3858)
@@ -3,21 +3,36 @@
@licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.1.0
- @date 15/05/11, 09:53
+ @version 2.1.1
+ @date 01/11/11, 11:35
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
global $price;
?>
- <div class="box_uniq block_form">
- <fieldset class="block_field">
+<div class="box_uniq block_form main-orders">
- <div class="fleft w_30" style="margin:0 0.5em">
- <h4><?php echo __('entry customer'); ?></h4>
+ <div id="tabs">
+ <ul>
+ <li><a href="#tabs-1"><?php echo __('tab orders briefs'); ?></a></li>
+ <li><a href="#tabs-2"><?php echo __('tab orders details'); ?></a></li>
+ <li><a href="#tabs-3"><?php echo __('tab orders history'); ?></a></li>
+ </ul>
+
+ <div id="tabs-1" class="tabPage">
+
+
+<!-- DRAW DETAIL CUSTOMERS -->
+ <div class="box_uniq">
+ <fieldset class="block_field fleft w_40" >
+ <legend><?php echo __('entry customer'); ?></legend>
<p class="block_input">
<?php echo tep_address_format(orders::$order->customer['format_id'], orders::$order->customer, 1, '', '<br />'); ?><br />
</p>
+ </fieldset>
+
+ <fieldset class="block_field fleft w_40" >
+ <legend><?php echo __('legend contact customers'); ?></legend>
<p class="block_input">
<strong><?php echo __('entry telephone number'); ?></strong><?php echo orders::$order->customer['telephone']; ?>
<br />
@@ -27,55 +42,131 @@
<strong><?php echo __('entry ip'); ?></strong><?php echo orders::$order->info['ip_address']; ?>
</p>
- </div>
+ </fieldset>
- <div class="fleft w_30" style="margin:0 0.5em">
- <h4><?php echo __('entry shipping address'); ?></h4>
+ </div>
+
+<!-- DRAW ADRESS SHIPING / BILLING -->
+ <div class="box_uniq">
+ <fieldset class="block_field fleft w_40" >
+ <legend><?php echo __('entry shipping address'); ?></legend>
<p class="block_input">
<?php echo tep_address_format(orders::$order->delivery['format_id'], orders::$order->delivery, 1, '', '<br />'); ?></p>
</p>
- </div>
+ </fieldset>
- <div class="fleft w_30" style="margin:0 0.5em">
- <h4><?php echo __('entry billing address'); ?></h4>
+ <fieldset class="block_field fleft w_40" >
+ <legend><?php echo __('entry billing address'); ?></legend>
<p class="block_input">
<?php echo tep_address_format(orders::$order->billing['format_id'], orders::$order->billing, 1, '', '<br />'); ?>
</p>
- </div>
+ </fieldset>
+ </div>
- <div class="fleft w_30" style="margin:0 0.5em">
+<!-- DRAW METHOD SHIPING / BILLING -->
+ <div class="box_uniq">
+ <fieldset class="block_field fleft w_40">
+ <legend><?php echo __('entry payment method'); ?></legend>
<p class="block_input">
- <strong><?php echo __('entry payment method'); ?></strong><?php echo orders::$order->info['payment_method'] ; ?>
- <br />
- <?php if (tep_not_null(orders::$order->info['cc_type']) || tep_not_null(orders::$order->info['cc_owner']) || tep_not_null(orders::$order->info['cc_number'])) { ?>
- <strong><?php echo __('entry credit card type'); ?></strong><?php echo orders::$order->info['cc_type']; ?>
+ <?php echo orders::$order->info['payment_method'] ; ?>
+ </p>
+ <?php if (tep_not_null(orders::$order->info['cc_type']) || tep_not_null(orders::$order->info['cc_owner']) || tep_not_null(orders::$order->info['cc_number'])) { ?>
+ <p class="block_input">
+ <strong><?php echo __('entry credit card type'); ?></strong><?php echo orders::$order->info['cc_type']; ?>
<br />
- <strong><?php echo __('entry credit card owner'); ?></strong><?php echo orders::$order->info['cc_owner']; ?>
+ <strong><?php echo __('entry credit card owner'); ?></strong><?php echo orders::$order->info['cc_owner']; ?>
<br />
- <strong><?php echo __('entry credit card number'); ?></strong><?php echo orders::$order->info['cc_number']; ?>
+ <strong><?php echo __('entry credit card number'); ?></strong><?php echo orders::$order->info['cc_number']; ?>
<br />
- <strong><?php echo __('entry credit card expires'); ?></strong><?php echo orders::$order->info['cc_expires']; ?>
- <?php } ?>
- </p>
- </div>
+ <strong><?php echo __('entry credit card expires'); ?></strong><?php echo orders::$order->info['cc_expires']; ?>
+ </p>
+ <?php } ?>
- </fieldset>
+ </fieldset>
+ </div>
- <div class="separator"></div>
- <div class="box_left">
+ <table class="main-orders history">
+ <thead>
+ <tr>
+ <th><?php echo __('table heading date added'); ?></th>
+ <th class="tcenter"><?php echo __('table heading customer notified'); ?></th>
+ <th class="tcenter"><?php echo __('table heading status'); ?></th>
+ <th><?php echo __('table heading comments'); ?></th>
+ </tr>
+ </thead>
+ <tbody>
+ <?php
+ if( !is_array(orders::$order->lasthistory)): echo '<tr>' . "\n" . '<td colspan="5">' . __('text no order history') . '</td>' . "\n" . '</tr>' . "\n";
+ else : ?>
+ <tr>
+ <td><?php echo orders::$order->lasthistory['date_added']; ?></td>
+ <td class="tcenter"><?php echo orders::$order->lasthistory['customer_notified']; ?></td>
+ <td class="tcenter"><?php echo orders::$order->lasthistory['orders_status']; ?></td>
+ <td><?php echo orders::$order->lasthistory['comments']; ?></td>
+ </tr>
+ <?php endif; ?>
+ </tbody>
+ </table>
+
+
+
+ <?php if(orders::$update) :?>
+<!-- DRAW FORM UPDATE BLOCK -->
+ <?php echo tep_draw_form('status_form', orders::FILENAME,'oID='.orders::$oID.'&action=update_order', 'post', ' class="block_form"'); ?>
+ <fieldset class="block_field">
+ <legend><?php echo __('legend update order history'); ?></legend>
+
+ <p class="block_input">
+ <label for="status"><?php echo __('entry status'); ?></label>
+ <?php echo tep_draw_pull_down_menu('status', orders::$orders_statuses, orders::$order->info['orders_status']); ?>
+ </p>
+
+ <p class="block_input inline">
+ <label for ="notify"><?php echo __('entry notify customer'); ?></label>
+ <?php echo tep_draw_checkbox_field('notify', '', '', true); ?>
+ <br style="clear:both"/>
+ <label for ="notify_comments"><?php echo __('entry notify comments'); ?></label>
+ <?php echo tep_draw_checkbox_field('notify_comments', '', '', false ,'class="radio" onclick="activ(\'#cont_comments\')"'); ?>
+ </p>
+
+ <fieldset id="cont_comments" class="block_field">
+ <legend><?php echo __('table heading comments'); ?></legend>
+ <?php echo tep_draw_textarea_field('comments', '', '30', '5', '','style="width:100%"'); ?>
+ <br /><br />
+ </fieldset>
+
+ <div class="button_nav">
+ <?php echo tep_image_submit('button_update.gif', IMAGE_UPDATE); ?>
+ </div>
+ </fieldset>
+ </form>
+ <?php endif; ?>
+
+
+ </div>
+
+ <div id="tabs-2" class="tabPage">
+<!-- <div class="separator"></div> -->
+
+ <?php echo tep_draw_form('status_form', orders::FILENAME,'oID='.orders::$oID.'&action=update_order', 'post', ' class="block_form"'); ?>
+<!-- <div class="box_uniq"> -->
<table class="dataTableBase orders">
<thead>
<tr>
<?php if(_cst_bool('MODULE_ACCOUNT_RETURN_PRODUCTS_STATUS')): ?>
<th><?php echo __('table heading return'); ?></th>
<?php endif; ?>
- <th colspan="2"><?php echo __('table heading products'); ?></th>
+ <th><?php echo __('table heading id'); ?></th>
+ <th><?php echo __('table heading products'); ?></th>
<th><?php echo __('table heading products model'); ?></th>
- <th><?php echo __('table heading tax'); ?></th>
+
+
<th><?php echo __('table heading price excluding tax'); ?></th>
<th><?php echo __('table heading price including tax'); ?></th>
+ <th><?php echo __('table heading tax'); ?></th>
+ <th><?php echo __('table heading quantity'); ?></th>
<th><?php echo __('table heading total excluding tax'); ?></th>
<th><?php echo __('table heading total including tax'); ?></th>
</tr>
@@ -100,14 +191,26 @@
echo $return_link; ?>
</td>
<?php endif; ?>
- <td class="tleft"><a href="javascript: updateProduct('<?php echo orders::$oID ?> ', '<?php orders::$order->products[$i]['id'] ?> ', 'products_quantity', 'update', '', ' <?php echo orders::$order->products[$i]['qty'] ?> ');"><?php echo orders::$order->products[$i]['qty'] . ' x' ?></a></td>
- <td class="tleft"><span class="fleft"><?php echo orders::$order->products[$i]['name'] ?></span> <?php echo tep_draw_attribute_products(orders::$order,$i).' ' ?></td>
+ <td class="tcenter"><?php echo orders::$order->products[$i]['id'] ?></td>
+ <td class="tleft">
+ <span class="fleft">
+ <a href="#" class="screenshot" rel="<?php echo tep_href_link('document.php', 'mod=img&typ=product&w=200&h=200&id='.orders::$order->products[$i]['id']) ?>">
+ <?php echo orders::$order->products[$i]['name'] ?>
+ </a>
+ </span>
+ <span><?php echo tep_draw_attribute_products(orders::$order,$i).' ' ?></span>
+ </td>
<td class="tcenter"><?php echo orders::$order->products[$i]['model'] ?></td>
- <td class="tcenter"><?php echo tep_display_tax_value(orders::$order->products[$i]['tax']) . '%' ?></td>
<td class="tcenter"><?php echo $price->format(orders::$order->products[$i]['final_price'], true, orders::$order->info['currency'], orders::$order->info['currency_value']) ?></td>
<td class="tcenter"><?php echo $price->format(tep_add_tax(orders::$order->products[$i]['final_price'], orders::$order->products[$i]['tax']), true, orders::$order->info['currency'], orders::$order->info['currency_value']) ?></td>
- <td class="tcenter"><?php echo $price->format(orders::$order->products[$i]['final_price'] * orders::$order->products[$i]['qty'], true, orders::$order->info['currency'], orders::$order->info['currency_value']) ?></td>
- <td class="tcenter"><?php echo $price->format(tep_add_tax(orders::$order->products[$i]['final_price'], orders::$order->products[$i]['tax']) * orders::$order->products[$i]['qty'], true, orders::$order->info['currency'], orders::$order->info['currency_value']) ?></td>
+ <td class="tcenter"><?php echo tep_display_tax_value(orders::$order->products[$i]['tax']) . '%' ?></td>
+ <td class="tcenter">
+ <?php /** TODO Integrer update
+ Integrer Etat des stocks courant si stock actif */ ?>
+ <?php echo orders::$order->products[$i]['qty'] ?>
+ </td>
+ <td class="tright"><?php echo $price->format(orders::$order->products[$i]['final_price'] * orders::$order->products[$i]['qty'], true, orders::$order->info['currency'], orders::$order->info['currency_value']) ?></td>
+ <td class="tright"><?php echo $price->format(tep_add_tax(orders::$order->products[$i]['final_price'], orders::$order->products[$i]['tax']) * orders::$order->products[$i]['qty'], true, orders::$order->info['currency'], orders::$order->info['currency_value']) ?></td>
</tr>
<?php endfor; ?>
@@ -117,15 +220,31 @@
<?php if(_cst_bool('MODULE_ACCOUNT_RETURN_PRODUCTS_STATUS')): ?>
<td> </td>
<?php endif; ?>
- <td colspan="7" class="tright"><?php echo orders::$order->totals[$i]['title'] ?></td>
- <td class="tcenter"><?php echo orders::$order->totals[$i]['text'] ?></td>
+ <td colspan="8" class="tright"><?php echo orders::$order->totals[$i]['title'] ?></td>
+ <td class="tright"><?php echo orders::$order->totals[$i]['text'] ?></td>
</tr>
<?php } ?>
<!-- Block Total eof-->
</tbody>
</table>
- <table>
+ <div class="button_nav">
+ <?php echo tep_image_submit('button_update.gif', IMAGE_UPDATE); ?>
+ </div>
+ </fieldset>
+ </form>
+
+<!-- </div> -->
+
+ </div>
+
+
+
+
+
+ <div id="tabs-3" class="tabPage">
+
+ <table class="main-orders history">
<thead>
<tr>
<th><?php echo __('table heading date added'); ?></th>
@@ -136,9 +255,9 @@
</thead>
<tbody>
<?php
- if( ($list=orders::load_status_history(orders::$oID) ) && $list ==false ) echo '<tr>' . "\n" . '<td colspan="5">' . __('text no order history') . '</td>' . "\n" . '</tr>' . "\n";
+ if( orders::$order->history ==false ) echo '<tr>' . "\n" . '<td colspan="5">' . __('text no order history') . '</td>' . "\n" . '</tr>' . "\n";
else
- foreach($list as $item): ?>
+ foreach(orders::$order->history as $item): ?>
<tr>
<td><?php echo $item['date_added']; ?></td>
<td class="tcenter"><?php echo $item['customer_notified']; ?></td>
@@ -149,51 +268,21 @@
</tbody>
</table>
-</div>
+ </div>
- <!-- Block suivi etat -->
- <div class="box_right">
- <?php if(orders::$update) :?>
- <?php echo tep_draw_form('status_form', orders::FILENAME,'oID='.orders::$oID.'&action=update_order', 'post', ' class="block_form"'); ?>
- <fieldset class="block_field">
-
- <p class="block_input">
- <label for="status"><?php echo __('entry status'); ?></label>
- <?php echo tep_draw_pull_down_menu('status', orders::$orders_statuses, orders::$order->info['orders_status']); ?>
- </p>
-
- <p class="block_input inline">
- <label for ="notify"><?php echo __('entry notify customer'); ?></label>
- <?php echo tep_draw_checkbox_field('notify', '', '', true); ?>
- <br style="clear:both"/>
- <label for ="notify_comments"><?php echo __('entry notify comments'); ?></label>
- <?php echo tep_draw_checkbox_field('notify_comments', '', '', false ,'class="radio" onclick="activ(\'#cont_comments\')"'); ?>
- </p>
-
- <fieldset id="cont_comments" class="block_field">
- <legend><?php echo __('table heading comments'); ?></legend>
- <?php echo tep_draw_textarea_field('comments', '', '30', '5', '','style="width:100%"'); ?>
- <br /><br />
- </fieldset>
-
- <div class="button_nav">
- <?php echo tep_image_submit('button_update.gif', IMAGE_UPDATE); ?>
- </div>
- </fieldset>
- </form>
- <?php endif; ?>
- </div>
- <!-- Block suivi etat eof-->
-
<div class="button_nav">
<?php echo tep_js_back(tep_href_link(orders::FILENAME), IMAGE_CANCEL);?>
</div>
+
<div class="button_action">
<?php echo '<a class="button" href="' . tep_href_link(FILENAME_BATCH_PRINT, tep_get_all_get_params(array('page_admin','action','forceview')).'forceview=pdf&file_type=invoice&action=exe') . '">' . IMAGE_ORDERS_INVOICE . '</a>'.
'<a class="button" href="' . tep_href_link(FILENAME_BATCH_PRINT, tep_get_all_get_params(array('page_admin','action')).'forceview=pdf&file_type=packingslip&action=exe') . '" onclick="window.open(this.href); return false;">' . IMAGE_ORDERS_PACKINGSLIP . '</a>';
; ?>
</div>
- </div>
+
+
+
+</div>
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/pages/orders.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/pages/orders.txt 2011-11-01 08:56:16 UTC (rev 3857)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/orders.txt 2011-11-01 15:12:35 UTC (rev 3858)
@@ -3,8 +3,8 @@
@licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.1.0
- @date 15/05/11, 09:57
+ @version 2.1.1
+ @date 01/11/11, 16:07
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -12,6 +12,11 @@
$lang['heading title']="Commandes" ;
$lang['heading title search']="ID commande :" ;
$lang['heading title status']="Statut :" ;
+
+$lang['tab orders briefs']="Details" ;
+$lang['tab orders details']="Commande" ;
+$lang['tab orders history']="Suivi" ;
+
$lang['table heading order id']="n°" ;
$lang['table heading comments']="Commentaires" ;
@@ -19,6 +24,7 @@
$lang['table heading order total']="Total" ;
$lang['table heading date purchased']="Achat le" ;
$lang['table heading status']="Statut" ;
+$lang['table heading id']="Id" ;
$lang['table heading action']="Action" ;
$lang['table heading quantity']="Qté." ;
$lang['table heading products model']="Modèle" ;
@@ -33,13 +39,14 @@
$lang['table heading date added']="Date d'ajout" ;
$lang['table heading return']="Retour" ;
-$lang['entry customer']="Client :" ;
+$lang['legend contact customers']="Contact" ;
+$lang['entry customer']="Client" ;
$lang['entry sold to']="VENDU À :" ;
$lang['entry delivery to']="Livraison à :" ;
$lang['entry ship to']="LIVRÉ À :" ;
-$lang['entry shipping address']="Adresse d'expédition :" ;
-$lang['entry billing address']="Adresse de facturation :" ;
-$lang['entry payment method']="Méthode de paiement :" ;
+$lang['entry shipping address']="Adresse d'expédition" ;
+$lang['entry billing address']="Adresse de facturation" ;
+$lang['entry payment method']="Méthode de paiement" ;
$lang['entry credit card type']="Type de carte de crédit :" ;
$lang['entry credit card owner']="Propriétaire de la carte de crédit :" ;
$lang['entry credit card number']="Numéro de la carte de crédit :" ;
Modified: trunk/catalog/admin/includes/modules/pages/orders.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/orders.php 2011-11-01 08:56:16 UTC (rev 3857)
+++ trunk/catalog/admin/includes/modules/pages/orders.php 2011-11-01 15:12:35 UTC (rev 3858)
@@ -285,8 +285,62 @@
<script type="text/javascript"><!--
function disabled(inputs){$(inputs).css.display='none';}
function activ(inputs){$(inputs).css.display='inline';}
- $(function() {disabled('#cont_comments');});
+
+ this.screenshotPreview = function(){
+ /* CONFIG */
+
+ xOffset = 10;
+ yOffset = 30;
+
+ // these 2 variable determine popup's distance from the cursor
+ // you might want to adjust to get the right result
+
+ /* END CONFIG */
+ $("a.screenshot").hover(function(e){
+ this.t = this.title;
+ this.title = "";
+ var c = (this.t != "") ? "<br/>" + this.t : "";
+ $("body").append("<p id='screenshot'><img src='"+ this.rel +"' alt='url preview' />"+ c +"</p>");
+ $("#screenshot")
+ .css("top",(e.pageY - xOffset) + "px")
+ .css("left",(e.pageX + yOffset) + "px")
+ .fadeIn("fast");
+ },
+ function(){
+ this.title = this.t;
+ $("#screenshot").remove();
+ });
+ $("a.screenshot").mousemove(function(e){
+ $("#screenshot")
+ .css("top",(e.pageY - xOffset) + "px")
+ .css("left",(e.pageX + yOffset) + "px");
+ });
+ };
+
+
+ // starting the script on page load
+ $(document).ready(function(){
+ screenshotPreview();
+ disabled('#cont_comments');
+ });
+
//--></script>
+
+<style type="text/css">
+/* */
+
+#screenshot{
+ position:absolute;
+ border:1px solid #ccc;
+ background:#333;
+ padding:5px;
+ display:none;
+ color:#fff;
+ }
+
+/* */
+</style>
+
<?php endif;
}
@@ -368,7 +422,10 @@
break;
case 'edit':
if(self::test_oID((int)self::$oID)) {
- self::$order= new order(self::$oID);
+ self::$order= sqlorder::fetch(array('id'=>self::$oID));
+ self::$order->history=self::load_status_history((int)self::$oID);
+ self::$order->lasthistory=self::$order->history[(count(self::$order->history)-1)];
+
return MGabCont::CallGab(parent::$action,__FUNCTION__,__CLASS__); //tep_get_include_contents(self::$code.'.edit');
}
break;
@@ -387,7 +444,7 @@
public static function load_status_history($oID){
-// self::init();
+
$list=array();
$DB=Database::getInstance();
$orders_history_query = $DB->query("select orders_status_id, date_added, customer_notified, comments from " . TABLE_ORDERS_STATUS_HISTORY . " where orders_id = '" . tep_db_input($oID) . "' order by date_added");
@@ -400,9 +457,7 @@
$li['orders_status']=self::$orders_status_array[$orders_history['orders_status_id']];
$li['comments']=nl2br(tep_db_output($orders_history['comments'])) ;
$list[]=$li;
-// echo '<tr>' . "\n" .
-// '<td colspan="5">' . __('text no order history') . '</td>' . "\n" .
-// '</tr>' . "\n";
+
}
return $list;
}
Modified: trunk/catalog/admin/includes/template/oscss/stylesheet-1.css
===================================================================
--- trunk/catalog/admin/includes/template/oscss/stylesheet-1.css 2011-11-01 08:56:16 UTC (rev 3857)
+++ trunk/catalog/admin/includes/template/oscss/stylesheet-1.css 2011-11-01 15:12:35 UTC (rev 3858)
@@ -268,6 +268,7 @@
+
#central .block_form .block_input span.value_edit {display:inline-block; width:100%;}
#central .block_form .block_input br,
#central .block_form .block_input span.value_edit br{display:none;}
@@ -282,6 +283,10 @@
#central .block_form .block_input span.edit-input .edit-input-value-alternate.Val-false {background:transparent url(img/1/busy.png) left top no-repeat;}
+ /* Ajsutement Page Orders*/
+ #central .block_form.main-orders .box_right form label {width:90%}
+ #central .block_form.main-orders .block_input br,
+ #central .block_form.main-orders .block_input span.value_edit br{display:block;height:0;}
/* central form .block_input */
Modified: trunk/catalog/common/classes/order.php
===================================================================
--- trunk/catalog/common/classes/order.php 2011-11-01 08:56:16 UTC (rev 3857)
+++ trunk/catalog/common/classes/order.php 2011-11-01 15:12:35 UTC (rev 3858)
@@ -3,8 +3,8 @@
\licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
\portion code Copyright (c) 2002 osCommerce
\package osCSS-2 <www http://www.oscss.org>
- \version 2.1.0
- \date 15/11/10, 21:37
+ @version 2.1.1
+ @date 01/11/11, 16:07
\author oscim <mail aur...@os...> <www http://www.oscim.fr>
\encode UTF-8
\class order
@@ -357,31 +357,65 @@
$this->products[$index]['total_line'] =tep_round($this->products[$index]['total_line'],$currencies->currencies[DEFAULT_CURRENCY]['decimal_places']);
$this->products[$index]['total_line_ttc'] =tep_round($this->products[$index]['total_line_ttc'],$currencies->currencies[DEFAULT_CURRENCY]['decimal_places']);
- $products_tax = $this->products[$index]['tax'];
- $products_tax_description = $this->products[$index]['tax_description'];
+// $products_tax = $this->products[$index]['tax'];
+// $products_tax_description = $this->products[$index]['tax_description'];
+//
+// // $ttax= $shown_taxe;
+// $ttax = $this->products[$index]['total_line_taxe'];
+// $this->info['tax'] += $ttax;
+//
+// if (isset($this->info['tax_groups']["$products_tax_description"])) $this->info['tax_groups']["$products_tax_description"] +=$ttax;
+// else $this->info['tax_groups']["$products_tax_description"] =$ttax;
+//
+// $this->info['total_weight'] += $this->products[$index]['weight'];
+// $this->info['subtotal_ht'] += $this->products[$index]['total_line'];
+// $this->info['subtotal_taxe'] += $this->products[$index]['total_line_taxe'];
+// $this->info['subtotal'] += $this->products[$index]['total_line_ttc'];
-// $ttax= $shown_taxe;
- $ttax = $this->products[$index]['total_line_taxe'];
- $this->info['tax'] += $ttax;
+ $this->AdjustTotLine($this->products[$index]);
- if (isset($this->info['tax_groups']["$products_tax_description"])) $this->info['tax_groups']["$products_tax_description"] +=$ttax;
- else $this->info['tax_groups']["$products_tax_description"] =$ttax;
-
- $this->info['total_weight'] += $this->products[$index]['weight'];
-
- $this->info['subtotal_ht'] += $this->products[$index]['total_line'];
- $this->info['subtotal_taxe'] += $this->products[$index]['total_line_taxe'];
- $this->info['subtotal'] += $this->products[$index]['total_line_ttc'];
$index++;
}
- $this->info['total'] = $this->info['subtotal'] ;
- $this->info['total_ht'] = $this->info['subtotal_ht'] + $this->info['shipping_cost_ht'];
+// $this->info['total'] = $this->info['subtotal'] ;
+// $this->info['total_ht'] = $this->info['subtotal_ht'] + $this->info['shipping_cost_ht'];
if( is_object( $this->coupon ) ) $this->info = $this->coupon->finalize_discount($this->info);
}
+
+
+
+
+ /**
+ @brief Adjust sous tot for calculate total order
+ */
+ private function AdjustTotLine($ArrayLine){
+
+ $line=new objectInfo($ArrayLine);
+ $products_tax_description =$line->tax_description;
+
+ // SPPC taxe groups
+ if (isset($this->info['tax_groups']["$products_tax_description"])) $this->info['tax_groups']["$products_tax_description"] +=$line->total_line_taxe;
+ else $this->info['tax_groups']["$products_tax_description"] =$line->total_line_taxe;
+
+ // tot weight
+ $this->info['total_weight'] += $line->weight;
+ // tot HT
+ $this->info['subtotal_ht'] += $line->total_line;
+ // tot taxe
+ $this->info['tax'] += $line->total_line_taxe;
+ $this->info['subtotal_taxe'] += $line->total_line_taxe;
+ // tot TTC
+ $this->info['subtotal'] += $line->total_line_ttc;
+
+
+ // force adjust tot generaux
+ $this->info['total'] = $this->info['subtotal'] ;
+ $this->info['total_ht'] = $this->info['subtotal_ht'] + $this->info['shipping_cost_ht'];
+ }
+
}
?>
\ No newline at end of file
Added: trunk/catalog/install/includes/sql/mysql/tables/osc_products_am_attributes_to_templates.key.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/tables/osc_products_am_attributes_to_templates.key.sql (rev 0)
+++ trunk/catalog/install/includes/sql/mysql/tables/osc_products_am_attributes_to_templates.key.sql 2011-11-01 15:12:35 UTC (rev 3858)
@@ -0,0 +1,7 @@
+
+
+ALTER TABLE osc_products_am_attributes_to_templates ADD INDEX idx_pama2t_id (template_id);
+ALTER TABLE osc_products_am_attributes_to_templates ADD CONSTRAINT idx_pama2t_id FOREIGN KEY (template_id) REFERENCES osc_products_am_templates (template_id);
+
+
+COMMIT;
\ No newline at end of file
Modified: trunk/extensions/ATTRIBUTEMANAGER_stable/attributeManager/classes/attributeManager.class.php
===================================================================
--- trunk/extensions/ATTRIBUTEMANAGER_stable/attributeManager/classes/attributeManager.class.php 2011-11-01 08:56:16 UTC (rev 3857)
+++ trunk/extensions/ATTRIBUTEMANAGER_stable/attributeManager/classes/attributeManager.class.php 2011-11-01 15:12:35 UTC (rev 3858)
@@ -300,7 +300,6 @@
if (AM_USE_QT_PRO)
$arrData['track_stock'] = amDB::input($optionTrack);
-// amDB::perform(TABLE_PRODUCTS_OPTIONS,$arrData);
sqlproductoption::create($arrData);
}
@@ -316,43 +315,42 @@
*/
function addOptionValue($get) {
- $this->getAndPrepare('option_id', $get, $optionId);
- $this->getAndPrepare('option_values', $get, $optionValues);
+ $this->getAndPrepare('option_id', $get, $optionId);
+ $this->getAndPrepare('option_values', $get, $optionValues);
- if(strpos($optionValues,'|'))
- $arrOptionValues = explode('|', $optionValues);
- else
- $arrOptionValues[] = $optionValues;
+ if(strpos($optionValues,'|'))
+ $arrOptionValues = explode('|', $optionValues);
+ else
+ $arrOptionValues[] = $optionValues;
- $newId = amDB::getNextAutoValue(TABLE_PRODUCTS_OPTIONS_VALUES,'products_options_values_id');
+ $newId = amDB::getNextAutoValue(TABLE_PRODUCTS_OPTIONS_VALUES,'products_options_values_id');
- foreach($arrOptionValues as $optionValue) {
+ foreach($arrOptionValues as $optionValue) {
- list($langId,$name) = explode(':',$optionValue);
+ list($langId,$name) = explode(':',$optionValue);
- if ($newId == 0) {
- $newId = 1;
- }
+ if ($newId == 0) {
+ $newId = 1;
+ }
- $ovData = array (
- 'id' => $newId,
- 'language_id' => amDB::input($langId),
- 'name' => amDB::input($name)
+ $ovData = array (
+ 'id' => $newId,
+ 'language_id' => amDB::input($langId),
+ 'name' => amDB::input($name)
);
-// amDB::perform(TABLE_PRODUCTS_OPTIONS_VALUES,$ovData);
- sqlproductoptionvalue::create($ovData);
- }
+ sqlproductoptionvalue::create($ovData);
+ }
- $ov2oData = array(
- 'options_id' => $optionId,
- 'values_id' => $newId
- );
+ $ov2oData = array(
+ 'options_id' => $optionId,
+ 'values_id' => $newId
+ );
-// amDB::perform(TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS,$ov2oData);
- sqlproductoptionvalue2option::create($ov2oData);
- return array('selectedOption' => $optionId, 'selectedOptionValue' => $newId);
+ sqlproductoptionvalue2option::create($ov2oData);
+
+ return array('selectedOption' => $optionId, 'selectedOptionValue' => $newId);
}
/**
@@ -484,39 +482,31 @@
if(0 !== count($allProdOptionsAndValues)) {
if(0 != $newTemplateId) {
- $db->query("delete from ".AM_TABLE_ATTRIBUTES_TO_TEMPLATES." where template_id='$newTemplateId'");
+ sqlamattribute2template::delete(array('id'=>$newTemplateId));
}
else {
$data = array(
- 'template_name' => $templateName
+ 'name' => $templateName
);
- $res=amDB::perform(AM_TABLE_TEMPLATES,$data);
- $newTemplateId = $res->__get('insertId');
+ $newTemplateId = sqlamtemplate::create($data);
}
foreach($allProdOptionsAndValues as $optionId => $values) {
if(is_array($values['values'])) {
foreach ($values['values'] as $optionValuesId => $allOptionValues){
- if (!AM_USE_SORT_ORDER) {
- $data = array(
- 'template_id' => $newTemplateId,
- 'options_id' => $optionId,
- 'option_values_id' => $optionValuesId,
- 'price_prefix' => $values['values'][$optionValuesId]['prefix'],
- 'options_values_price' => $values['values'][$optionValuesId]['price']
- );
- } else {
- $data = array(
- 'template_id' => $newTemplateId,
- 'options_id' => $optionId,
- 'option_values_id' => $optionValuesId,
- 'price_prefix' => $values['values'][$optionValuesId]['prefix'],
- 'options_values_price' => $values['values'][$optionValuesId]['price'],
- 'products_options_sort_order' => $values['values'][$optionValuesId]['sortOrder']
- );
- }
- amDB::perform(AM_TABLE_ATTRIBUTES_TO_TEMPLATES,$data);
+ $data = array(
+ 'template_id' => $newTemplateId,
+ 'options_id' => $optionId,
+ 'option_values_id' => $optionValuesId,
+ 'price_prefix' => $values['values'][$optionValuesId]['prefix'],
+ 'options_values_price' => $values['values'][$optionValuesId]['price']
+ );
+
+ if (AM_USE_SORT_ORDER)
+ $data['products_options_sort_order']=$values['values'][$optionValuesId]['sortOrder'];
+
+ sqlamattribute2template::create($data); amDB::perform(AM_TABLE_ATTRIBUTES_TO_TEMPLATES,$data);
}
}
}
Modified: trunk/extensions/ATTRIBUTEMANAGER_stable/attributeManager/classes/attributeManagerConfig.class.php
===================================================================
--- trunk/extensions/ATTRIBUTEMANAGER_stable/attributeManager/classes/attributeManagerConfig.class.php 2011-11-01 08:56:16 UTC (rev 3857)
+++ trunk/extensions/ATTRIBUTEMANAGER_stable/attributeManager/classes/attributeManagerConfig.class.php 2011-11-01 15:12:35 UTC (rev 3858)
@@ -70,7 +70,7 @@
/**
* Template Table names
*/
- $this->add('AM_TABLE_TEMPLATES',TABLE_PRODUCTS_AM_TEMPLATE);
+ $this->add('AM_TABLE_TEMPLATES',TABLE_PRODUCTS_AM_TEMPLATES);
$this->add('AM_TABLE_ATTRIBUTES_TO_TEMPLATES',TABLE_PRODUCTS_AM_ATTRIBUTES_TO_TEMPLATES);
$this->add('AM_USE_SORT_ORDER' , true);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2011-11-01 08:56:23
|
Revision: 3857
http://oscss.svn.sourceforge.net/oscss/?rev=3857&view=rev
Author: oscim
Date: 2011-11-01 08:56:16 +0000 (Tue, 01 Nov 2011)
Log Message:
-----------
suite ajout des class de sqlxxx
Ajout contrainte externe sur la table de liaison entre option et value option des produits
Modified Paths:
--------------
trunk/catalog/admin/includes/modules/pages/attributes.php
Added Paths:
-----------
trunk/catalog/admin/includes/classes/drivers/sqlamattribute2template.php
trunk/catalog/admin/includes/classes/drivers/sqlamtemplate.php
trunk/catalog/admin/includes/classes/drivers/sqlproductoption.php
trunk/catalog/admin/includes/classes/drivers/sqlproductoptionvalue.php
trunk/catalog/admin/includes/classes/drivers/sqlproductoptionvalue2option.php
trunk/catalog/install/includes/sql/mysql/tables/osc_products_options_values_to_products_options.key.sql
Added: trunk/catalog/admin/includes/classes/drivers/sqlamattribute2template.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlamattribute2template.php (rev 0)
+++ trunk/catalog/admin/includes/classes/drivers/sqlamattribute2template.php 2011-11-01 08:56:16 UTC (rev 3857)
@@ -0,0 +1,155 @@
+<?php if (!defined('HTTP_SERVER')) die('You can not access this file directly!');
+/**
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 01/11/11, 09:50
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+ @class sqlamattribute2template
+ @brief Use for stock modele attribute option for products
+*/
+
+
+
+
+class sqlamattribute2template
+ implements ModSqlDataDriver{
+
+
+ /**
+ @brief create new ligne in table configuration
+ */
+ public static function create($option){
+
+ if(!isset($option['id'])) return 'id';
+
+ if(isset($option['id'])) $sql_data_array['template_id'] = $option['id'];
+ if(isset($option['options_id'])) $sql_data_array['options_id'] = $option['options_id'];
+ if(isset($option['values_id'])) $sql_data_array['option_values_id'] = $option['values_id'];
+ if(isset($option['price_prefix'])) $sql_data_array['price_prefix'] = $option['price_prefix'];
+ if(isset($option['values_price'])) $sql_data_array['options_values_price'] = $option['values_price'];
+ if(isset($option['sort_order'])) $sql_data_array['products_options_sort_order'] = $option['sort_order'];
+
+
+ $res=tep_db_perform(TABLE_PRODUCTS_AM_ATTRIBUTES_TO_TEMPLATES, $sql_data_array);
+
+ if(!$res)
+ return $res;
+ else
+ return $res->__get('insertId');
+ }
+
+ /**
+ @brief update ligne in table configuration
+ */
+ public static function update($option){
+
+ if(!isset($option['id'])) return 'id';
+
+ if(isset($option['id'])) $where .="AND template_id = '".(int)tep_db_input($option['id'])."' ";
+ if(isset($option['options_id'])) $where .="AND options_id = '".(int)tep_db_input($option['options_id'])."' ";
+
+ if(isset($option['id'])) $sql_data_array['template_id'] = $option['id'];
+ if(isset($option['options_id'])) $sql_data_array['options_id'] = $option['options_id'];
+ if(isset($option['values_id'])) $sql_data_array['option_values_id'] = $option['values_id'];
+ if(isset($option['price_prefix'])) $sql_data_array['price_prefix'] = $option['price_prefix'];
+ if(isset($option['values_price'])) $sql_data_array['options_values_price'] = $option['values_price'];
+ if(isset($option['sort_order'])) $sql_data_array['products_options_sort_order'] = $option['sort_order'];
+
+ $res=tep_db_perform(TABLE_PRODUCTS_AM_ATTRIBUTES_TO_TEMPLATES, $sql_data_array, 'update' , substr($where,3) );
+
+ return $res;
+ }
+
+ /**
+ @brief load ligne in table configuration
+ @param option array
+ id => row id int (configuration_id)
+ key => string key (configuration_key)
+ group_id => group_id int (configuration_group_id)
+
+ @return
+
+ object(stdClass)[13]
+ public 'id' => string '1' (length=1)
+
+ OR
+ array(
+ object(stdClass)[13]
+ ...
+ object(stdClass)[13]
+ ..
+ )
+
+ */
+ public static function fetch($option,$shortkey=false){
+ $DB=Database::getInstance();
+
+ $sql ="";
+ if(isset($option['id'])) $sql .="AND template_id = '".(int)tep_db_input($option['id'])."' ";
+
+ $sql ="SELECT * FROM ".TABLE_PRODUCTS_AM_ATTRIBUTES_TO_TEMPLATES." WHERE ".substr($sql,3);
+
+ $res=$DB->query($sql);
+
+ $num = $res->__get('numRows');
+
+ if($num == 1){
+ $result=$res->fetchAssoc();
+ return ((!$shortkey)? $result : self::CleanKey($result));
+ }
+ elseif($num > 1){
+ $array=array();
+
+ foreach($res->fetchAllAssoc() as $result)
+ $array[]= ((!$shortkey)? $result : self::CleanKey($result));
+
+ return $array;
+ }
+
+ return false;
+ }
+
+ /**
+ @brief delete row
+ */
+ public static function delete($option){
+ $DB=Database::getInstance();
+
+ $sql ="";
+ if(isset($option['id'])) $sql .="AND template_id = '".(int)tep_db_input($option['id'])."' ";
+
+ if(strlen($sql)==0)
+ return false;
+
+ $sql ="DELETE FROM ".TABLE_PRODUCTS_AM_ATTRIBUTES_TO_TEMPLATES." WHERE ".substr($sql,3);
+
+ $res=$DB->query($sql);
+
+ return $res;
+ }
+
+ /**
+ @fn CleanKey()
+ @brief Clean string name key
+ */
+ private static function CleanKey($array){
+
+ $object= new stdclass();
+
+ foreach($array as $key=>$value){
+ if( strpos($key,'template_') ===0)
+ $key=substr($key,9);
+
+ $object->$key = $value;
+ }
+
+ return $object;
+ }
+
+}
+
+
+?>
\ No newline at end of file
Added: trunk/catalog/admin/includes/classes/drivers/sqlamtemplate.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlamtemplate.php (rev 0)
+++ trunk/catalog/admin/includes/classes/drivers/sqlamtemplate.php 2011-11-01 08:56:16 UTC (rev 3857)
@@ -0,0 +1,145 @@
+<?php if (!defined('HTTP_SERVER')) die('You can not access this file directly!');
+/**
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 01/11/11, 09:50
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+ @class sqlamtemplate
+ @brief Use for stock modele attribute option for products
+*/
+
+
+
+
+class sqlamtemplate
+ implements ModSqlDataDriver{
+
+
+ /**
+ @brief create new ligne in table configuration
+ */
+ public static function create($option){
+
+// if(!isset($option['id'])) return 'id';
+
+ if(isset($option['id'])) $sql_data_array['template_id'] = $option['id'];
+ if(isset($option['name'])) $sql_data_array['template_name'] = $option['name'];
+
+
+ $res=tep_db_perform(TABLE_PRODUCTS_AM_TEMPLATES, $sql_data_array);
+
+ if(!$res)
+ return $res;
+ else
+ return $res->__get('insertId');
+ }
+
+ /**
+ @brief update ligne in table configuration
+ */
+ public static function update($option){
+
+ if(!isset($option['id'])) return 'id';
+
+ if(isset($option['id'])) $where .="AND template_id = '".(int)tep_db_input($option['id'])."' ";
+
+ if(isset($option['name'])) $sql_data_array['template_name'] = $option['name'];
+
+ $res=tep_db_perform(TABLE_PRODUCTS_AM_TEMPLATES, $sql_data_array, 'update' , substr($where,3) );
+
+ return $res;
+ }
+
+ /**
+ @brief load ligne in table configuration
+ @param option array
+ id => row id int (configuration_id)
+ key => string key (configuration_key)
+ group_id => group_id int (configuration_group_id)
+
+ @return
+
+ object(stdClass)[13]
+ public 'id' => string '1' (length=1)
+
+ OR
+ array(
+ object(stdClass)[13]
+ ...
+ object(stdClass)[13]
+ ..
+ )
+
+ */
+ public static function fetch($option,$shortkey=false){
+ $DB=Database::getInstance();
+
+ $sql ="";
+ if(isset($option['id'])) $sql .="AND template_id = '".(int)tep_db_input($option['id'])."' ";
+
+ $sql ="SELECT * FROM ".TABLE_PRODUCTS_AM_TEMPLATES." WHERE ".substr($sql,3);
+
+ $res=$DB->query($sql);
+
+ $num = $res->__get('numRows');
+
+ if($num == 1){
+ $result=$res->fetchAssoc();
+ return ((!$shortkey)? $result : self::CleanKey($result));
+ }
+ elseif($num > 1){
+ $array=array();
+
+ foreach($res->fetchAllAssoc() as $result)
+ $array[]= ((!$shortkey)? $result : self::CleanKey($result));
+
+ return $array;
+ }
+
+ return false;
+ }
+
+ /**
+ @brief delete row
+ */
+ public static function delete($option){
+ $DB=Database::getInstance();
+
+ $sql ="";
+ if(isset($option['id'])) $sql .="AND template_id = '".(int)tep_db_input($option['id'])."' ";
+
+ if(strlen($sql)==0)
+ return false;
+
+ $sql ="DELETE FROM ".TABLE_PRODUCTS_AM_TEMPLATES." WHERE ".substr($sql,3);
+
+ $res=$DB->query($sql);
+
+ return $res;
+ }
+
+ /**
+ @fn CleanKey()
+ @brief Clean string name key
+ */
+ private static function CleanKey($array){
+
+ $object= new stdclass();
+
+ foreach($array as $key=>$value){
+ if( strpos($key,'template_') ===0)
+ $key=substr($key,9);
+
+ $object->$key = $value;
+ }
+
+ return $object;
+ }
+
+}
+
+
+?>
\ No newline at end of file
Added: trunk/catalog/admin/includes/classes/drivers/sqlproductoption.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlproductoption.php (rev 0)
+++ trunk/catalog/admin/includes/classes/drivers/sqlproductoption.php 2011-11-01 08:56:16 UTC (rev 3857)
@@ -0,0 +1,167 @@
+<?php if (!defined('HTTP_SERVER')) die('You can not access this file directly!');
+/**
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 01/11/11, 09:50
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+ @class manage link table configuration
+*/
+
+
+
+
+class sqlproductoption
+ implements ModSqlDataDriver{
+
+
+ /**
+ @brief create new ligne in table options
+ @note id (products_options_id) is not auto incremente
+ */
+ public static function create($option){
+
+ if(!isset($option['id'])) return 'id';
+
+ if(isset($option['id'])) $sql_data_array['products_options_id'] = $option['id'];
+ if(isset($option['language_id'])) $sql_data_array['language_id'] = $option['language_id'];
+ if(isset($option['name'])) $sql_data_array['products_options_name'] = $option['name'];
+ if(isset($option['track_stock'])) $sql_data_array['products_options_track_stock'] = $option['track_stock'];
+ if(isset($option['sort_order'])) $sql_data_array['products_options_sort_order'] = $option['sort_order'];
+ if(isset($option['images_enabled'])) $sql_data_array['products_options_images_enabled'] = $option['images_enabled'];
+ if(isset($option['type'])) $sql_data_array['products_options_type'] = $option['type'];
+ if(isset($option['length'])) $sql_data_array['products_options_length'] = $option['length'];
+ if(isset($option['comment'])) $sql_data_array['products_options_comment'] = $option['comment'];
+ if(isset($option['condition'])) $sql_data_array['products_options_condition'] = $option['condition'];
+
+ $res=tep_db_perform(TABLE_PRODUCTS_OPTIONS, $sql_data_array);
+
+ if(!$res)
+ return $res;
+ else
+ return $option['id'];
+ }
+
+ /**
+ @brief update ligne in table configuration
+ */
+ public static function update($option){
+
+ if(!isset($option['id'])) return 'id';
+
+ if(isset($option['id'])) $where .="AND products_options_id = '".(int)tep_db_input($option['id'])."' ";
+ if(isset($option['language_id'])) $where .="AND language_id = '".(string)tep_db_input($option['language_id'])."' ";
+
+ if($where =='')
+ return false;
+
+// if(isset($option['products_options_id'])) $sql_data_array['products_options_id'] = $option['id'];
+// if(isset($option['language_id'])) $sql_data_array['language_id'] = $option['language_id'];
+ if(isset($option['name'])) $sql_data_array['products_options_name'] = $option['name'];
+ if(isset($option['track_stock'])) $sql_data_array['products_options_track_stock'] = $option['track_stock'];
+ if(isset($option['sort_order'])) $sql_data_array['products_options_sort_order'] = $option['sort_order'];
+ if(isset($option['images_enabled'])) $sql_data_array['products_options_images_enabled'] = $option['images_enabled'];
+ if(isset($option['type'])) $sql_data_array['products_options_type'] = $option['type'];
+ if(isset($option['length'])) $sql_data_array['products_options_length'] = $option['length'];
+ if(isset($option['comment'])) $sql_data_array['products_options_comment'] = $option['comment'];
+ if(isset($option['condition'])) $sql_data_array['products_options_condition'] = $option['condition'];
+
+ $res=tep_db_perform(TABLE_PRODUCTS_OPTIONS, $sql_data_array, 'update' , substr($where,3) );
+
+ return $res;
+ }
+
+ /**
+ @brief load ligne in table configuration
+ @param option array
+ id => row id int (configuration_id)
+ key => string key (configuration_key)
+ group_id => group_id int (configuration_group_id)
+
+ @return
+
+ object(stdClass)[13]
+ public 'id' => string '1' (length=1)
+
+ OR
+ array(
+ object(stdClass)[13]
+ ...
+ object(stdClass)[13]
+ ..
+ )
+
+ */
+ public static function fetch($option,$shortkey=false){
+ $DB=Database::getInstance();
+
+ $sql ="";
+ if(isset($option['id'])) $sql .="AND products_options_id = '".(int)tep_db_input($option['id'])."' ";
+ if(isset($option['language_id'])) $sql .="AND language_id = '".(string)tep_db_input($option['language_id'])."' ";
+
+ $sql ="SELECT * FROM ".TABLE_PRODUCTS_OPTIONS." WHERE ".substr($sql,3);
+
+ $res=$DB->query($sql);
+
+ $num = $res->__get('numRows');
+
+ if($num == 1){
+ $result=$res->fetchAssoc();
+ return ((!$shortkey)? $result : self::CleanKey($result));
+ }
+ elseif($num > 1){
+ $array=array();
+
+ foreach($res->fetchAllAssoc() as $result)
+ $array[]= ((!$shortkey)? $result : self::CleanKey($result));
+
+ return $array;
+ }
+
+ return false;
+ }
+
+ /**
+ @brief delete row
+ */
+ public static function delete($option){
+ $DB=Database::getInstance();
+
+ $sql ="";
+ if(isset($option['id'])) $sql .="AND products_options_id = '".(int)tep_db_input($option['id'])."' ";
+
+ if(strlen($sql)==0)
+ return false;
+
+ $sql ="DELETE FROM ".TABLE_PRODUCTS_OPTIONS." WHERE ".substr($sql,3);
+
+ $res=$DB->query($sql);
+
+ return $res;
+ }
+
+ /**
+ @fn CleanKey()
+ @brief Clean string name key
+ */
+ private static function CleanKey($array){
+
+ $object= new stdclass();
+
+ foreach($array as $key=>$value){
+ if( strpos($key,'products_options_') ===0)
+ $key=substr($key,17);
+
+
+ $object->$key = $value;
+ }
+
+ return $object;
+ }
+
+}
+
+
+?>
\ No newline at end of file
Added: trunk/catalog/admin/includes/classes/drivers/sqlproductoptionvalue.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlproductoptionvalue.php (rev 0)
+++ trunk/catalog/admin/includes/classes/drivers/sqlproductoptionvalue.php 2011-11-01 08:56:16 UTC (rev 3857)
@@ -0,0 +1,157 @@
+<?php if (!defined('HTTP_SERVER')) die('You can not access this file directly!');
+/**
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 01/11/11, 09:50
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+ @class sqlproductoptionvalue
+*/
+
+
+
+
+class sqlproductoptionvalue
+ implements ModSqlDataDriver{
+
+
+ /**
+ @brief create new ligne in table configuration
+ */
+ public static function create($option){
+
+ if(!isset($option['id'])) return 'id';
+
+ if(isset($option['id'])) $sql_data_array['products_options_values_id'] = $option['id'];
+ if(isset($option['language_id'])) $sql_data_array['language_id'] = $option['language_id'];
+ if(isset($option['name'])) $sql_data_array['products_options_values_name'] = $option['name'];
+ if(isset($option['thumbnail'])) $sql_data_array['products_options_values_thumbnail'] = $option['thumbnail'];
+
+
+ $res=tep_db_perform(TABLE_PRODUCTS_OPTIONS_VALUES, $sql_data_array);
+
+ if(!$res)
+ return $res;
+ else
+ return $option['id'];
+ }
+
+ /**
+ @brief update ligne in table configuration
+ */
+ public static function update($option){
+
+ if(!isset($option['id'])) return 'id';
+
+ if(isset($option['id'])) $where .="AND products_options_values_id = '".(int)tep_db_input($option['id'])."' ";
+ if(isset($option['language_id'])) $where .="AND language_id = '".(string)tep_db_input($option['language_id'])."' ";
+
+ if($where =='')
+ return false;
+
+ if(isset($option['name'])) $sql_data_array['products_options_values_name'] = $option['name'];
+ if(isset($option['thumbnail'])) $sql_data_array['products_options_values_thumbnail'] = $option['thumbnail'];
+
+ $res=tep_db_perform(TABLE_PRODUCTS_OPTIONS_VALUES, $sql_data_array, 'update' , substr($where,3) );
+
+ return $res;
+ }
+
+ /**
+ @brief load ligne in table configuration
+ @param option array
+ id => row id int (configuration_id)
+ key => string key (configuration_key)
+ group_id => group_id int (configuration_group_id)
+
+ @return
+
+ object(stdClass)[13]
+ public 'id' => string '1' (length=1)
+
+ OR
+ array(
+ object(stdClass)[13]
+ ...
+ object(stdClass)[13]
+ ..
+ )
+
+ */
+ public static function fetch($option,$shortkey=false){
+ $DB=Database::getInstance();
+
+ $sql ="";
+ if(isset($option['id'])) $sql .="AND products_options_values_id = '".(int)tep_db_input($option['id'])."' ";
+ if(isset($option['language_id'])) $sql .="AND language_id = '".(string)tep_db_input($option['language_id'])."' ";
+
+ $sql ="SELECT * FROM ".TABLE_PRODUCTS_OPTIONS_VALUES." WHERE ".substr($sql,3);
+
+ $res=$DB->query($sql);
+
+ $num = $res->__get('numRows');
+
+ if($num == 1){
+ $result=$res->fetchAssoc();
+ return ((!$shortkey)? $result : self::CleanKey($result));
+ }
+ elseif($num > 1){
+ $array=array();
+
+ foreach($res->fetchAllAssoc() as $result)
+ $array[]= ((!$shortkey)? $result : self::CleanKey($result));
+
+ return $array;
+ }
+
+ return false;
+ }
+
+ /**
+ @brief delete row
+ */
+ public static function delete($option){
+ $DB=Database::getInstance();
+
+ $sql ="";
+ if(isset($option['id'])) $sql .="AND products_options_values_id = '".(int)tep_db_input($option['id'])."' ";
+
+ if(strlen($sql)==0)
+ return false;
+
+ // supp link external key sql
+ $res=$DB->query("DELETE FROM ".TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS." WHERE ".substr($sql,3));
+
+ $sql ="DELETE FROM ".TABLE_PRODUCTS_OPTIONS_VALUES." WHERE ".substr($sql,3);
+
+ $res=$DB->query($sql);
+
+ return $res;
+ }
+
+ /**
+ @fn CleanKey()
+ @brief Clean string name key
+ */
+ private static function CleanKey($array){
+
+ $object= new stdclass();
+
+ foreach($array as $key=>$value){
+ if( strpos($key,'products_options_') ===0)
+ $key=substr($key,17);
+ if( strpos($key,'products_options_values_id') ===0)
+ $key='id';
+
+ $object->$key = $value;
+ }
+
+ return $object;
+ }
+
+}
+
+
+?>
\ No newline at end of file
Added: trunk/catalog/admin/includes/classes/drivers/sqlproductoptionvalue2option.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlproductoptionvalue2option.php (rev 0)
+++ trunk/catalog/admin/includes/classes/drivers/sqlproductoptionvalue2option.php 2011-11-01 08:56:16 UTC (rev 3857)
@@ -0,0 +1,165 @@
+<?php if (!defined('HTTP_SERVER')) die('You can not access this file directly!');
+/**
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 01/11/11, 09:50
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+ @class sqlproductoptionvalue2option
+*/
+
+
+
+
+class sqlproductoptionvalue2option
+ implements ModSqlDataDriver{
+
+
+ /**
+ @brief create new ligne in table option to option value
+ @param $option array
+ options_id => int
+ values_id => int
+ */
+ public static function create($option){
+
+ if(!isset($option['options_id']))
+ return 'options_id';
+ if(!isset($option['values_id']))
+ return 'values_id';
+
+// if(isset($option['products_options_values_to_products_options_id'])) $sql_data_array['products_options_values_to_products_options_id '] = $option['id'];
+ if(isset($option['options_id'])) $sql_data_array['products_options_id'] = $option['options_id'];
+ if(isset($option['values_id'])) $sql_data_array['products_options_values_id'] = $option['values_id'];
+
+ $res=tep_db_perform(TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS, $sql_data_array);
+
+ if(!$res)
+ return $res;
+ else
+ return $res->__get('insertId');
+ }
+
+ /**
+ @brief update ligne in table configuration
+ */
+ public static function update($option){
+
+ if(!isset($option['id'])) return 'id';
+
+ if(isset($option['id'])) $where .="AND products_options_values_to_products_options_id = '".(int)tep_db_input($option['id'])."' ";
+
+ if($where =='')
+ return false;
+
+ if(isset($option['options_id'])) $sql_data_array['products_options_id'] = $option['options_id'];
+ if(isset($option['values_id'])) $sql_data_array['products_options_values_id'] = $option['values_id'];
+
+ $res=tep_db_perform(TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS, $sql_data_array, 'update' , substr($where,3) );
+
+ return $res;
+ }
+
+ /**
+ @brief load ligne in table configuration
+ @param option array
+ id => row id int (configuration_id)
+ key => string key (configuration_key)
+ group_id => group_id int (configuration_group_id)
+
+ @return
+
+ object(stdClass)[13]
+ public 'id' => string '1' (length=1)
+
+ OR
+ array(
+ object(stdClass)[13]
+ ...
+ object(stdClass)[13]
+ ..
+ )
+
+ */
+ public static function fetch($option,$shortkey=false){
+ $DB=Database::getInstance();
+
+ $sql ="";
+ if(isset($option['id'])) $sql .="AND products_options_values_to_products_options_id = '".(int)tep_db_input($option['id'])."' ";
+ if(isset($option['options_id'])) $sql .="AND products_options_id = '".(int)tep_db_input($option['options_id'])."' ";
+ if(isset($option['values_id'])) $sql .="AND products_options_values_id = '".(int)tep_db_input($option['options_values_id'])."' ";
+
+ $sql ="SELECT * FROM ".TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS." WHERE ".substr($sql,3);
+
+ $res=$DB->query($sql);
+
+ $num = $res->__get('numRows');
+
+ if($num == 1){
+ $result=$res->fetchAssoc();
+ return ((!$shortkey)? $result : self::CleanKey($result));
+ }
+ elseif($num > 1){
+ $array=array();
+
+ foreach($res->fetchAllAssoc() as $result)
+ $array[]= ((!$shortkey)? $result : self::CleanKey($result));
+
+ return $array;
+ }
+
+ return false;
+ }
+
+ /**
+ @brief delete row
+ @param option array
+ id => int row id
+ option_id => int value row id option in products_options
+ value_id => int value row in products_option_value
+ */
+ public static function delete($option){
+ $DB=Database::getInstance();
+
+ $sql ="";
+ if(isset($option['id'])) $sql .="AND products_options_values_to_products_options_id = '".(int)tep_db_input($option['id'])."' ";
+ if(isset($option['options_id'])) $sql .="AND products_options_id = '".(int)tep_db_input($option['options_id'])."' ";
+ if(isset($option['values_id'])) $sql .="AND products_options_values_id = '".(int)tep_db_input($option['values_id'])."' ";
+
+ if(strlen($sql)==0)
+ return false;
+
+
+ $sql ="DELETE FROM ".TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS." WHERE ".substr($sql,3);
+
+ $res=$DB->query($sql);
+
+ return $res;
+ }
+
+ /**
+ @fn CleanKey()
+ @brief Clean string name key
+ */
+ private static function CleanKey($array){
+
+ $object= new stdclass();
+
+ foreach($array as $key=>$value){
+ if( strpos($key,'products_options_') ===0)
+ $key=substr($key,17);
+ if( strpos($key,'products_options_values_to_products_options_') ===0)
+ $key=substr($key,strlen('products_options_values_to_products_options_'));
+
+ $object->$key = $value;
+ }
+
+ return $object;
+ }
+
+}
+
+
+?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/modules/pages/attributes.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/attributes.php 2011-11-01 08:55:07 UTC (rev 3856)
+++ trunk/catalog/admin/includes/modules/pages/attributes.php 2011-11-01 08:56:16 UTC (rev 3857)
@@ -4,7 +4,7 @@
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 31/10/11, 16:21
+ @date 01/11/11, 09:50
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class attributes
@@ -88,7 +88,7 @@
public function check_action($actions){
global $messageStack;
-
+error_reporting(E_ALL);
self::$action=$actions;
switch (self::$action) {
@@ -101,9 +101,14 @@
break;
case 'delete':
if(self::$type=='options') {
+ $poID=tep_db_prepare_input($_GET['poID']);
+
+ sqlproductoption::delete(array('id'=>$poID));
}
elseif(self::$type=='values') {
+ $povID=tep_db_prepare_input($_GET['povID']);
+ sqlproductoptionvalue::delete(array('id'=>$povID));
}
break;
case 'insert':
@@ -114,23 +119,24 @@
? self::getNextAutoValue(TABLE_PRODUCTS_OPTIONS,'products_options_id')
: tep_db_prepare_input($_GET['poID']) ;
- $sql_data_array['products_options_condition']= (int)tep_db_prepare_input($_POST['products_options_condition']);
- $sql_data_array['products_options_sort_order']= tep_db_prepare_input($_POST['products_options_sort_order']);
- $sql_data_array['products_options_track_stock']= (int)tep_db_prepare_input($_POST['products_options_track_stock']);
- $sql_data_array['products_options_images_enabled']= (int)tep_db_prepare_input($_POST['products_options_images_enabled']);
- $sql_data_array['products_options_type']= tep_db_prepare_input($_POST['products_options_type']);
- $sql_data_array['products_options_length']= tep_db_prepare_input($_POST['products_options_length']);
+ $sql_data_array['id']= $poID;
+ $sql_data_array['condition']= (int)tep_db_prepare_input($_POST['products_options_condition']);
+ $sql_data_array['sort_order']= tep_db_prepare_input($_POST['products_options_sort_order']);
+ $sql_data_array['track_stock']= (int)tep_db_prepare_input($_POST['products_options_track_stock']);
+ $sql_data_array['images_enabled']= (int)tep_db_prepare_input($_POST['products_options_images_enabled']);
+ $sql_data_array['type']= tep_db_prepare_input($_POST['products_options_type']);
+ $sql_data_array['length']= tep_db_prepare_input($_POST['products_options_length']);
for ($i=0, $n=sizeof(self::$languages); $i<$n; $i++) {
- $sql_data_array['products_options_name']= $_POST['products_options_name'][self::$languages[$i]['id']];
- $sql_data_array['products_options_comment']= $_POST['products_options_comment'][self::$languages[$i]['id']];
+ $sql_data_array['name']= $_POST['products_options_name'][self::$languages[$i]['id']];
+ $sql_data_array['comment']= $_POST['products_options_comment'][self::$languages[$i]['id']];
+ $sql_data_array['language_id']= self::$languages[$i]['id'];
- if(self::$action=='insert'){
- $sql_data_array['products_options_id']= $poID;
- tep_db_perform(TABLE_PRODUCTS_OPTIONS, $sql_data_array);
- }
- else tep_db_perform(TABLE_PRODUCTS_OPTIONS, $sql_data_array, 'update', ' language_id = \''.(int)self::$languages[$i]['id'].'\' and products_options_id=\''.$poID.'\'');
+ if(self::$action=='insert')
+ sqlproductoption::create($sql_data_array);
+ else
+ sqlproductoption::update($sql_data_array);
}
tep_redirect(tep_href_link(self::FILENAME));
@@ -146,24 +152,25 @@
: tep_db_prepare_input($_GET['povID']) ;
for ($i=0, $n=sizeof(self::$languages); $i<$n; $i++) {
- $sql_data_array['products_options_values_name']= $_POST['products_options_values_name'][self::$languages[$i]['id']];
- $sql_data_array['products_options_values_thumbnail']= $_POST['products_options_values_thumbnail'][self::$languages[$i]['id']];
- if(self::$action=='insert') {
- $sql_data_array['products_options_values_id']= $povID;
- $sql_data_array['language_id']= self::$languages[$i]['id'];
- $res=tep_db_perform(TABLE_PRODUCTS_OPTIONS_VALUES, $sql_data_array);
- }
- else{
- tep_db_perform(TABLE_PRODUCTS_OPTIONS_VALUES, $sql_data_array, 'update', ' language_id = \''.(int)self::$languages[$i]['id'].'\' and products_options_values_id=\''.$povID.'\'');
- }
+
+ $sql_data_array['name']= tep_db_prepare_input($_POST['products_options_values_name'][self::$languages[$i]['id']]);
+ $sql_data_array['thumbnail']= tep_db_prepare_input($_POST['products_options_values_thumbnail'][self::$languages[$i]['id']]);
+ $sql_data_array['id']= $povID;
+ $sql_data_array['language_id']= self::$languages[$i]['id'];
+
+
+ if(self::$action=='insert')
+ sqlproductoptionvalue::create($sql_data_array);
+ else
+ sqlproductoptionvalue::update($sql_data_array);
}
//! liaison value avec option
if(self::$action=='insert') {
$sql_data_array=array();
- $sql_data_array['products_options_id']= $poID;
- $sql_data_array['products_options_values_id']= $povID;
- tep_db_perform(TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS, $sql_data_array);
+ $sql_data_array['options_id']= $poID;
+ $sql_data_array['values_id']= $povID;
+ sqlproductoptionvalue2option::create($sql_data_array);
}
tep_redirect(tep_href_link(self::FILENAME));
@@ -259,6 +266,8 @@
}
case 'new':
$action='edit';
+ if(self::$type=='values')
+ self::$poID=(int)$_GET['poID'];
break;
case 'delete_confirm':
self::$poID=(int)$_GET['poID'];
@@ -395,9 +404,12 @@
/** static InterfacedInnerHtml */
public static function detail_row_page($id){
+// error_reporting(E_ALL);
+
self::$poID=(int)$id;
self::$type='values_for_option';
self::load_db_values((int)$id);
+// var_dump(MGabCont::CallGab('option.inline','display_view',__CLASS__));
return MGabCont::CallGab('options.inline','display_view',__CLASS__);
}
@@ -422,7 +434,7 @@
$db=Database::getInstance();
$objres=$db->query("select max($strField) + 1 as next from $strTable limit 1");
$res=$objres->fetchAssoc();
- return (int)$res['next']; //amDB::getOne("select max($strField) + 1 as next from $strTable limit 1");
+ return (int)$res['next'];
}
/**
Added: trunk/catalog/install/includes/sql/mysql/tables/osc_products_options_values_to_products_options.key.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/tables/osc_products_options_values_to_products_options.key.sql (rev 0)
+++ trunk/catalog/install/includes/sql/mysql/tables/osc_products_options_values_to_products_options.key.sql 2011-11-01 08:56:16 UTC (rev 3857)
@@ -0,0 +1,10 @@
+
+
+ALTER TABLE osc_products_options_values_to_products_options ADD INDEX idx_pov2po_options_id (products_options_id);
+ALTER TABLE osc_products_options_values_to_products_options ADD CONSTRAINT idx_pov2po_options_id FOREIGN KEY (products_options_id) REFERENCES osc_products_options (products_options_id);
+
+ALTER TABLE osc_products_options_values_to_products_options ADD INDEX idx_pov2po_options_values_id (products_options_values_id);
+ALTER TABLE osc_products_options_values_to_products_options ADD CONSTRAINT idx_pov2po_options_values_id FOREIGN KEY (products_options_values_id) REFERENCES osc_products_options_values (products_options_values_id);
+
+
+COMMIT;
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2011-11-01 08:55:13
|
Revision: 3856
http://oscss.svn.sourceforge.net/oscss/?rev=3856&view=rev
Author: oscim
Date: 2011-11-01 08:55:07 +0000 (Tue, 01 Nov 2011)
Log Message:
-----------
correction et mise a jour du code suite evoution du core
Modified Paths:
--------------
trunk/extensions/ATTRIBUTEMANAGER_stable/attributeManager/classes/attributeManager.class.php
trunk/extensions/ATTRIBUTEMANAGER_stable/attributeManager/classes/attributeManagerConfig.class.php
Modified: trunk/extensions/ATTRIBUTEMANAGER_stable/attributeManager/classes/attributeManager.class.php
===================================================================
--- trunk/extensions/ATTRIBUTEMANAGER_stable/attributeManager/classes/attributeManager.class.php 2011-10-31 19:18:42 UTC (rev 3855)
+++ trunk/extensions/ATTRIBUTEMANAGER_stable/attributeManager/classes/attributeManager.class.php 2011-11-01 08:55:07 UTC (rev 3856)
@@ -3,8 +3,8 @@
@licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
Copyright @ 2006 Kangaroo Partners http://kangaroopartners.com os...@ka...
@package osCSS-2 <www http://www.oscss.org>
- @version 2.0.9
- @date 26/05/10, 20:36
+ @version 2.1.1
+ @date 01/11/11, 09:50
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class attributeManager
@@ -20,58 +20,62 @@
// }
-/*abstract*/ class attributeManager /*implements attributeManagerInterface*/ {
+/*abstract*/
+class attributeManager
+/*implements attributeManagerInterface*/
+ {
- /**
- * Holds all of the options in the database
- * @access private
- */
- var $arrAllOptions = array();
+ /**
+ * Holds all of the options in the database
+ * @access private
+ */
+ private $arrAllOptions = array();
- /**
- * Holds all of the option values in the database
- * @access private
- */
- var $arrAllOptionValues = array();
+ /**
+ * Holds all of the option values in the database
+ * @access private
+ */
+ private $arrAllOptionValues = array();
- /**
- * Holds all of the options and their values where they are releated to each other
- * @access private
- */
- var $arrAllOptionsAndValues = array();
+ /**
+ * Holds all of the options and their values where they are releated to each other
+ * @access private
+ */
+ private $arrAllOptionsAndValues = array();
- /**
- * Holds all of the current products options and option values
- * @access protected
- */
- var $arrAllProductOptionsAndValues = array();
+ /**
+ * Holds all of the current products options and option values
+ * @access protected
+ */
+ protected $arrAllProductOptionsAndValues = array();
- /**
- * Currently selected language id
- * @todo make multilingual
- * @access private
- */
- var $intLanguageId;
+ /**
+ * Currently selected language id
+ * @todo make multilingual
+ * @access private
+ */
+ private $intLanguageId;
- /**
- * Page actions
- * @var $arrPageActions Array
- * @access private
- */
- var $arrPageActions = array();
+ /**
+ * Page actions
+ * @var $arrPageActions Array
+ * @access private
+ */
+ private $arrPageActions = array();
- /**
- * All templates
- * @var $arrAllTemplatesAndAttributes Array
- */
- var $arrAllTemplatesAndAttributes = array();
+ /**
+ * All templates
+ * @var $arrAllTemplatesAndAttributes Array
+ */
+ public $arrAllTemplatesAndAttributes = array();
+ /**
+ * Type product
+ * @var $TypeProduct int
+ */
+ public $TypeProduct ;
+
/**
- * Type product
- * @var $TypeProduct int
- */
- var $TypeProduct ;
- /**
* __construct()-
* Sets up page actions and sets the interface language
* @access protected
@@ -108,12 +112,12 @@
@param int $pID: product Id
*/
public function setTypeProduct($pID){
- $queryString = "select * from ".TABLE_PRODUCTS_VIRTUAL." where productsID=".(int)$pID;
+ $queryString = "select products_type from ".TABLE_PRODUCTS." where products_id='".(int)$pID."'";
$query = amDB::query($queryString);
$res = amDB::fetchArray($query);
- return ((isset($res['typeID']) && !empty($res['typeID']))? (int)$res['typeID']:1) ;
+ return ((isset($res['products_type']) && !empty($res['products_type']))? (int)$res['products_type']:1) ;
}
/**
@@ -262,45 +266,45 @@
*/
function addOption($get) {
- $this->getAndPrepare('options', $get, $options);
- if (AM_USE_SORT_ORDER) {
- $this->getAndPrepare('optionSort', $get, $optionSort);
- }
- if (AM_USE_QT_PRO) {
- $this->getAndPrepare('optionTrack', $get, $optionTrack);
- }
+ $this->getAndPrepare('options', $get, $options);
+ if (AM_USE_SORT_ORDER)
+ $this->getAndPrepare('optionSort', $get, $optionSort);
- if(strpos($options,'|'))
- $arrOptions = explode('|', $options);
- else
- $arrOptions[] = $options;
+ if (AM_USE_QT_PRO)
+ $this->getAndPrepare('optionTrack', $get, $optionTrack);
- $id = amDB::getNextAutoValue(TABLE_PRODUCTS_OPTIONS,'products_options_id');
- foreach($arrOptions as $option) {
+ if(strpos($options,'|'))
+ $arrOptions = explode('|', $options);
+ else
+ $arrOptions[] = $options;
- list($langId,$name) = explode(':',$option);
+ $id = amDB::getNextAutoValue(TABLE_PRODUCTS_OPTIONS,'products_options_id');
- if ($id == 0){
- $id = 1;
- }
+ foreach($arrOptions as $option) {
- $arrData = array (
- 'products_options_id' => $id,
- 'language_id' => amDB::input($langId),
- 'products_options_name' => amDB::input($name)
- );
- if (AM_USE_SORT_ORDER) {
- $arrData[AM_FIELD_OPTION_SORT_ORDER] = amDB::input($optionSort);
- }
- if (AM_USE_QT_PRO) {
- $arrData['products_options_track_stock'] = amDB::input($optionTrack);
- }
+ list($langId,$name) = explode(':',$option);
- amDB::perform(TABLE_PRODUCTS_OPTIONS,$arrData);
- }
+ if ($id == 0)
+ $id = 1;
- return array('selectedOption' => $id);
+
+ $arrData = array (
+ 'id' => $id,
+ 'language_id' => amDB::input($langId),
+ 'name' => amDB::input($name)
+ );
+ if (AM_USE_SORT_ORDER)
+ $arrData[AM_FIELD_OPTION_SORT_ORDER] = amDB::input($optionSort);
+
+ if (AM_USE_QT_PRO)
+ $arrData['track_stock'] = amDB::input($optionTrack);
+
+// amDB::perform(TABLE_PRODUCTS_OPTIONS,$arrData);
+ sqlproductoption::create($arrData);
+ }
+
+ return array('selectedOption' => $id);
}
/**
@@ -331,20 +335,22 @@
}
$ovData = array (
- 'products_options_values_id' => $newId,
+ 'id' => $newId,
'language_id' => amDB::input($langId),
- 'products_options_values_name' => amDB::input($name)
+ 'name' => amDB::input($name)
);
- amDB::perform(TABLE_PRODUCTS_OPTIONS_VALUES,$ovData);
+// amDB::perform(TABLE_PRODUCTS_OPTIONS_VALUES,$ovData);
+ sqlproductoptionvalue::create($ovData);
}
$ov2oData = array(
- 'products_options_id' => $optionId,
- 'products_options_values_id' => $newId
+ 'options_id' => $optionId,
+ 'values_id' => $newId
);
- amDB::perform(TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS,$ov2oData);
+// amDB::perform(TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS,$ov2oData);
+ sqlproductoptionvalue2option::create($ov2oData);
return array('selectedOption' => $optionId, 'selectedOptionValue' => $newId);
}
Modified: trunk/extensions/ATTRIBUTEMANAGER_stable/attributeManager/classes/attributeManagerConfig.class.php
===================================================================
--- trunk/extensions/ATTRIBUTEMANAGER_stable/attributeManager/classes/attributeManagerConfig.class.php 2011-10-31 19:18:42 UTC (rev 3855)
+++ trunk/extensions/ATTRIBUTEMANAGER_stable/attributeManager/classes/attributeManagerConfig.class.php 2011-11-01 08:55:07 UTC (rev 3856)
@@ -2,8 +2,8 @@
/**
@licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.0.9
- @date 23/05/10, 01:00
+ @version 2.1.1
+ @date 01/11/11, 09:50
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
Copyright @ 2006 Kangaroo Partners
@@ -17,7 +17,7 @@
if(file_exists('attributeManager/languages/'.$_SESSION['language'].'/attributeManager.php'))
include_once('attributeManager/languages/'.$_SESSION['language'].'/attributeManager.php');
else
- include_once('attributeManager/languages/'.'english'.'/attributeManager.php');
+ include_once('attributeManager/languages/'.'en_EN'.'/attributeManager.php');
class attributeManagerConfig {
@@ -70,8 +70,8 @@
/**
* Template Table names
*/
- $this->add('AM_TABLE_TEMPLATES',DB_TABLE_PREFIX . 'products_am_templates');
- $this->add('AM_TABLE_ATTRIBUTES_TO_TEMPLATES',DB_TABLE_PREFIX . 'products_am_attributes_to_templates');
+ $this->add('AM_TABLE_TEMPLATES',TABLE_PRODUCTS_AM_TEMPLATE);
+ $this->add('AM_TABLE_ATTRIBUTES_TO_TEMPLATES',TABLE_PRODUCTS_AM_ATTRIBUTES_TO_TEMPLATES);
$this->add('AM_USE_SORT_ORDER' , true);
$this->add('AM_USE_QT_PRO' , true);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2011-10-31 19:18:48
|
Revision: 3855
http://oscss.svn.sourceforge.net/oscss/?rev=3855&view=rev
Author: oscim
Date: 2011-10-31 19:18:42 +0000 (Mon, 31 Oct 2011)
Log Message:
-----------
Added Paths:
-----------
trunk/extensions/ATTRIBUTEMANAGER_stable/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2011-10-31 19:18:17
|
Revision: 3854
http://oscss.svn.sourceforge.net/oscss/?rev=3854&view=rev
Author: oscim
Date: 2011-10-31 19:18:09 +0000 (Mon, 31 Oct 2011)
Log Message:
-----------
Ajustement sql
ajustement fichier de langue de l'install
Modified Paths:
--------------
trunk/catalog/admin/includes/exts/package/packageRepository.php
trunk/catalog/admin/includes/modules/pages/attributes.php
trunk/catalog/install/includes/functions/database.php
trunk/catalog/install/includes/language/fr_FR/oscss_config.txt
trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_products.sql
Added Paths:
-----------
trunk/catalog/install/includes/language/fr_FR/osc_admin_groups.txt
trunk/catalog/install/includes/language/fr_FR/osc_categories_description.txt
trunk/catalog/install/includes/language/fr_FR/osc_configuration.txt
trunk/catalog/install/includes/language/fr_FR/osc_content_description.txt
trunk/catalog/install/includes/language/fr_FR/osc_customers_groups.txt
trunk/catalog/install/includes/language/fr_FR/osc_full_tag_description.txt
trunk/catalog/install/includes/language/fr_FR/osc_languages.txt
trunk/catalog/install/includes/language/fr_FR/osc_navigation_links_description.txt
trunk/catalog/install/includes/language/fr_FR/osc_status.txt
Modified: trunk/catalog/admin/includes/exts/package/packageRepository.php
===================================================================
--- trunk/catalog/admin/includes/exts/package/packageRepository.php 2011-10-31 14:19:40 UTC (rev 3853)
+++ trunk/catalog/admin/includes/exts/package/packageRepository.php 2011-10-31 19:18:09 UTC (rev 3854)
@@ -3,8 +3,8 @@
@licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.1.0
- @date 27/05/11, 14:28
+ @version 2.1.1
+ @date 31/10/11, 15:47
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class packageRepository
@@ -39,7 +39,7 @@
global $messageStack,$osCSS_Cache;
try{
//! load xml file
- if(!$Parser = @simplexml_load_file(DIR_FS_ADMIN.DIR_WS_INCLUDES.'data/'.self::REPOSITORY_SOURCE)) throw new Exception('Flux introuvable');
+ if(!$Parser = @simplexml_load_file(DIR_FS_ROOT_DOCS.'admin/data/'.self::REPOSITORY_SOURCE)) throw new Exception('Flux introuvable');
$FeedItem = $Parser->xpath('channel');
if(!$osCSS_Cache->read(parent::REPOSITORY_CACHE,0,true)) throw new Exception('Cache introuvable');
@@ -67,7 +67,7 @@
global $messageStack;
try{
//! load xml file
- if(!$Parser = @simplexml_load_file(DIR_FS_ADMIN.DIR_WS_INCLUDES.'data/'.self::REPOSITORY_SOURCE)) throw new Exception('Flux introuvable');
+ if(!$Parser = @simplexml_load_file(DIR_FS_ROOT_DOCS.'admin/data/'.self::REPOSITORY_SOURCE)) throw new Exception('Flux introuvable');
$FeedItem = $Parser->xpath('channel');
foreach($FeedItem as $item){
if((string)$item->key == (string)$key) return $item;
@@ -104,7 +104,7 @@
$channel = $dom->createElement("channel");
$rss->appendChild($channel);
- if(!$SP = simplexml_load_file(DIR_FS_ADMIN.DIR_WS_INCLUDES.'data/'.parent::REPOSITORY_SOURCE)) throw new Exception('Fichier Source introuvable '.DIR_WS_ADMIN.DIR_WS_INCLUDES.'data/'.parent::REPOSITORY_SOURCE);
+ if(!$SP = simplexml_load_file(DIR_FS_ROOT_DOCS.'admin/data/'.parent::REPOSITORY_SOURCE)) throw new Exception('Fichier Source introuvable '.DIR_WS_ADMIN.DIR_WS_INCLUDES.'data/'.parent::REPOSITORY_SOURCE);
foreach($SP as $repo){
if(!$re= fileUtility::url_fopen($repo->repository.$repo->rep_listing) ) $messageStack->add_session('recuperation repository impossible :'.$repo->repository,'error' );
@@ -210,9 +210,9 @@
else $messageStack->add_session(__('repository ok :').' local','success' );
- @unlink(DIR_FS_ADMIN.DIR_WS_INCLUDES.'data/'.parent::REPOSITORY_DATA);
+ @unlink(DIR_FS_ROOT_DOCS.'admin/data/'.parent::REPOSITORY_DATA);
- if($dom->save(DIR_FS_ADMIN.DIR_WS_INCLUDES.'data/'.parent::REPOSITORY_DATA) !=true)throw new Exception('erreur enregistrement');
+ if($dom->save(DIR_FS_ROOT_DOCS.'admin/data/'.parent::REPOSITORY_DATA) !=true)throw new Exception('erreur enregistrement');
$osCSS_Cache->writeBuffer($var_file,true);
Modified: trunk/catalog/admin/includes/modules/pages/attributes.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/attributes.php 2011-10-31 14:19:40 UTC (rev 3853)
+++ trunk/catalog/admin/includes/modules/pages/attributes.php 2011-10-31 19:18:09 UTC (rev 3854)
@@ -3,8 +3,8 @@
@licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.1.0
- @date 15/05/11, 19:25
+ @version 2.1.1
+ @date 31/10/11, 16:21
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class attributes
@@ -398,7 +398,7 @@
self::$poID=(int)$id;
self::$type='values_for_option';
self::load_db_values((int)$id);
- return MGabCont::CallGab('inline','display_view',__CLASS__);
+ return MGabCont::CallGab('options.inline','display_view',__CLASS__);
}
Modified: trunk/catalog/install/includes/functions/database.php
===================================================================
--- trunk/catalog/install/includes/functions/database.php 2011-10-31 14:19:40 UTC (rev 3853)
+++ trunk/catalog/install/includes/functions/database.php 2011-10-31 19:18:09 UTC (rev 3854)
@@ -251,7 +251,7 @@
if (!$db_error) {
if (file_exists($sql_file)) {
- $file_lg= dirname($_SERVER['SCRIPT_FILENAME']).'/'.WS_LANGUAGE.DC_LOADER_LANG.'/'.str_replace('.sql','.txt',basename($sql_file));
+ $file_lg= dirname($_SERVER['SCRIPT_FILENAME']).'/'.WS_LANGUAGE.DC_LOADER_LANG.'/'.preg_replace(array('#(.sql)#i','#^([0-9]*_)#i'),array('.txt','') ,basename($sql_file));
if( $file_lg_sample !='')include($file_lg_sample);
elseif(file_exists($file_lg))include($file_lg);
Added: trunk/catalog/install/includes/language/fr_FR/osc_admin_groups.txt
===================================================================
--- trunk/catalog/install/includes/language/fr_FR/osc_admin_groups.txt (rev 0)
+++ trunk/catalog/install/includes/language/fr_FR/osc_admin_groups.txt 2011-10-31 19:18:09 UTC (rev 3854)
@@ -0,0 +1,16 @@
+<?php
+/**
+ @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.0
+ @date 18/12/10, 10:50
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+
+
+/* osc_admin_groups */
+$lg['OSC_ADMIN_GROUPS_ADMIN']="Administrateur" ;
+$lg['OSC_ADMIN_GROUPS_SELLER']="Vendeur" ;
+
+?>
\ No newline at end of file
Added: trunk/catalog/install/includes/language/fr_FR/osc_categories_description.txt
===================================================================
--- trunk/catalog/install/includes/language/fr_FR/osc_categories_description.txt (rev 0)
+++ trunk/catalog/install/includes/language/fr_FR/osc_categories_description.txt 2011-10-31 19:18:09 UTC (rev 3854)
@@ -0,0 +1,17 @@
+<?php
+/**
+ @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.0
+ @date 18/12/10, 10:50
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+
+
+/* osc_categories_description */
+$lg['CAT1']="Non classé(s)" ;
+$lg['CAT2']="Informations" ;
+$lg['CAT3']="Home" ;
+
+?>
\ No newline at end of file
Added: trunk/catalog/install/includes/language/fr_FR/osc_configuration.txt
===================================================================
--- trunk/catalog/install/includes/language/fr_FR/osc_configuration.txt (rev 0)
+++ trunk/catalog/install/includes/language/fr_FR/osc_configuration.txt 2011-10-31 19:18:09 UTC (rev 3854)
@@ -0,0 +1,67 @@
+<?php
+/**
+ @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.0
+ @date 18/12/10, 10:50
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+
+
+$lg['MODULE_GENERIC_INSTALLED_S']="Modules génériques installés" ;
+$lg['MODULE_GENERIC_INSTALLED_L']="Liste des modules génériques installés séparés par un point virgule. Mise à jour automatique. Ne pas éditer. (Exemple: cc.php;cod.php;paypal.php)" ;
+$lg['MODULE_GENERIC_INSTALLED_BO_S']="[admin]Modules génériques installés" ;
+$lg['MODULE_GENERIC_INSTALLED_BO_L']="Liste des modules génériques installés séparés par un point virgule. Mise à jour automatique. Ne pas éditer. (Exemple: cc.php;cod.php;paypal.php)" ;
+$lg['MODULE_ACAPRO_INSTALLED_S']="Modules de produit installés" ;
+$lg['MODULE_ACAPRO_INSTALLED_L']="Liste des modules de produit installés séparés par un point virgule. Mise à jour automatique. Ne pas éditer. (Exemple: cc.php;cod.php;paypal.php)" ;
+$lg['MODULE_ACAPRO_INSTALLED_BO_S']="[admin]Modules de produit installés" ;
+$lg['MODULE_ACAPRO_INSTALLED_BO_L']="Liste des modules de produit installés séparés par un point virgule. Mise à jour automatique. Ne pas éditer. (Exemple: cc.php;cod.php;paypal.php)" ;
+$lg['MODULE_CONTENT_INSTALLED_S']="Modules de contenu installés" ;
+$lg['MODULE_CONTENT_INSTALLED_L']="Liste des modules de contenu installés séparés par un point virgule. Mise à jour automatique. Ne pas éditer. (Exemple: cc.php;cod.php;paypal.php)" ;
+$lg['MODULE_CONTENT_INSTALLED_BO_S']="[admin] Modules de contenu installés" ;
+$lg['MODULE_CONTENT_INSTALLED_BO_L']="Liste des modules de contenu installés séparés par un point virgule. Mise à jour automatique. Ne pas éditer. (Exemple: cc.php;cod.php;paypal.php)" ;
+$lg['MODULE_ACACAT_INSTALLED_S']="Modules de catégorie installés" ;
+$lg['MODULE_ACACAT_INSTALLED_L']="Liste des modules de catégories installés séparés par un point virgule. Mise à jour automatique. Ne pas éditer. (Exemple: cc.php;cod.php;paypal.php)" ;
+$lg['MODULE_ACACAT_INSTALLED_BO_S']="[admin]Modules de catégorie installés" ;
+$lg['MODULE_ACACAT_INSTALLED_BO_L']="Liste des modules de catégorie installés séparés par un point virgule. Mise à jour automatique. Ne pas éditer. (Exemple: cc.php;cod.php;paypal.php)" ;
+$lg['MODULE_ACCOUNT_INSTALLED_S']="Modules de compte installés" ;
+$lg['MODULE_ACCOUNT_INSTALLED_L']="Liste des modules de compte installés séparés par un point virgule. Mise à jour automatique. Ne pas éditer. (Exemple: cc.php;cod.php;paypal.php)" ;
+$lg['MODULE_ACCOUNT_INSTALLED_BO_S']="[admin]Modules de compte installés" ;
+$lg['MODULE_ACCOUNT_INSTALLED_BO_L']="Liste des modules de compte installés séparés par un point virgule. Mise à jour automatique. Ne pas éditer. (Exemple: cc.php;cod.php;paypal.php)" ;
+$lg['MODULE_LISTING_INSTALLED_S']="Modules de liste installés" ;
+$lg['MODULE_LISTING_INSTALLED_L']="Liste des modules de liste installés séparés par un point virgule. Mise à jour automatique. Ne pas éditer. (Exemple: cc.php;cod.php;paypal.php)" ;
+$lg['MODULE_LISTING_INSTALLED_BO_S']="[admin]Modules de liste installés" ;
+$lg['MODULE_LISTING_INSTALLED_BO_L']="Liste des modules de liste installés séparés par un point virgule. Mise à jour automatique. Ne pas éditer. (Exemple: cc.php;cod.php;paypal.php)" ;
+$lg['MODULE_HOME_INSTALLED_S']="Modules d'accueil installés" ;
+$lg['MODULE_HOME_INSTALLED_L']="Liste des modules d'accueil installés séparés par un point virgule. Mise à jour automatique. Ne pas éditer. (Exemple: cc.php;cod.php;paypal.php)" ;
+$lg['MODULE_HOME_INSTALLED_BO_S']="[admin]Modules d'accueil installés" ;
+$lg['MODULE_HOME_INSTALLED_BO_L']="Liste des modules d'accueil installés séparés par un point virgule. Mise à jour automatique. Ne pas éditer. (Exemple: cc.php;cod.php;paypal.php)" ;
+$lg['MODULE_CHECKOUT_PROCESS_INSTALLED_S']="Modules de commande installés" ;
+$lg['MODULE_CHECKOUT_PROCESS_INSTALLED_L']="Liste des modules de commande installés séparés par un point virgule. Mise à jour automatique. Ne pas éditer. (Exemple: cc.php;cod.php;paypal.php)" ;
+$lg['MODULE_CHECKOUT_PROCESS_INSTALLED_BO_S']="[admin]Modules de commande installés" ;
+$lg['MODULE_CHECKOUT_PROCESS_INSTALLED_BO_L']="Liste des modules de commande installés séparés par un point virgule. Mise à jour automatique. Ne pas éditer. (Exemple: cc.php;cod.php;paypal.php)" ;
+$lg['MODULE_SHIPPING_INSTALLED_S']="Modules de livraison installés" ;
+$lg['MODULE_SHIPPING_INSTALLED_L']="Liste des modules de livraison installés séparés par un point virgule. Mise à jour automatique. Ne pas éditer. (Exemple: ups.php;flat.php;item.php)" ;
+$lg['MODULE_PAYMENT_INSTALLED_S']="Modules de paiement installés" ;
+$lg['MODULE_PAYMENT_INSTALLED_L']="Liste des modules de paiement installés séparés par un point virgule. Mise à jour automatique. Ne pas éditer. (Exemple: cc.php;cod.php;paypal.php)" ;
+$lg['MODULE_ORDER_TOTAL_INSTALLED_S']="Modules total commande installés" ;
+$lg['MODULE_ORDER_TOTAL_INSTALLED_L']="Liste des modules de total installés; séparés par un point virgule. Mise à jour automatique. Ne pas éditer. (Exemple: ot_subtotal.php;ot_tax.php;ot_shipping.php;ot_total.php)" ;
+$lg['PLUGIN_GENERIC_INSTALLED_S']="Plugins génériques installés" ;
+$lg['PLUGIN_GENERIC_INSTALLED_L']="Liste des plugins génériques installés séparés par un point virgule. Mise à jour automatique. Ne pas éditer. (Exemple: cc.php;cod.php;paypal.php)" ;
+$lg['PLUGIN_PRODUCT_INSTALLED_S']="Plugins de produit installés" ;
+$lg['PLUGIN_PRODUCT_INSTALLED_L']="Liste des plugins de produit installés séparés par un point virgule. Mise à jour automatique. Ne pas éditer. (Exemple: cc.php;cod.php;paypal.php)" ;
+$lg['PLUGIN_ACCOUNT_INSTALLED_S']="Plugins de compte installés" ;
+$lg['PLUGIN_ACCOUNT_INSTALLED_L']="Liste des plugins de compte installés séparés par un point virgule. Mise à jour automatique. Ne pas éditer. (Exemple: cc.php;cod.php;paypal.php)" ;
+$lg['PLUGIN_LISTING_INSTALLED_S']="Plugins de liste installés" ;
+$lg['PLUGIN_LISTING_INSTALLED_L']="Liste des plugins de liste installés séparés par un point virgule. Mise à jour automatique. Ne pas éditer. (Exemple: cc.php;cod.php;paypal.php)" ;
+$lg['PLUGIN_HOME_INSTALLED_S']="Plugins d'accueil installés" ;
+$lg['PLUGIN_HOME_INSTALLED_L']="Liste des plugins d'accueil installés séparés par un point virgule. Mise à jour automatique. Ne pas éditer. (Exemple: cc.php;cod.php;paypal.php)" ;
+
+
+/// 19 tell a friend
+$lg['ALLOW_GUEST_TO_TELL_A_FRIEND_S']="Permettre la recommandation d'un article" ;
+$lg['ALLOW_GUEST_TO_TELL_A_FRIEND_L']="Permettre aux visiteurs de recommander un article." ;
+
+
+?>
\ No newline at end of file
Added: trunk/catalog/install/includes/language/fr_FR/osc_content_description.txt
===================================================================
--- trunk/catalog/install/includes/language/fr_FR/osc_content_description.txt (rev 0)
+++ trunk/catalog/install/includes/language/fr_FR/osc_content_description.txt 2011-10-31 19:18:09 UTC (rev 3854)
@@ -0,0 +1,23 @@
+<?php
+/**
+ @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.0
+ @date 18/12/10, 10:50
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+
+
+/* osc_content_description */
+$lg['OSC_CONTENT_DESCRIPTION_SHIPPING_T']="Expédition et retours" ;
+$lg['OSC_CONTENT_DESCRIPTION_SHIPPING_D']="<p>Insérer ici vos informations d'expédition & retours.</p>" ;
+$lg['OSC_CONTENT_DESCRIPTION_PRIVACY_T']="Vie privée" ;
+$lg['OSC_CONTENT_DESCRIPTION_PRIVACY_D']="<p>Insérer ici vos remarques de confidentialité.</p>" ;
+$lg['OSC_CONTENT_DESCRIPTION_CONDITIONS_T']="Conditions d'utilisation" ;
+$lg['OSC_CONTENT_DESCRIPTION_CONDITIONS_D']="<p>Insérer ici vos conditions d'usage.</p>" ;
+$lg['OSC_CONTENT_DESCRIPTION_CONTACT_T']="Contact" ;
+$lg['OSC_CONTENT_DESCRIPTION_CONTACT_D']="<p>Utiliser ce formulaire pour contacter notre service clientèle.</p>" ;
+
+
+?>
\ No newline at end of file
Added: trunk/catalog/install/includes/language/fr_FR/osc_customers_groups.txt
===================================================================
--- trunk/catalog/install/includes/language/fr_FR/osc_customers_groups.txt (rev 0)
+++ trunk/catalog/install/includes/language/fr_FR/osc_customers_groups.txt 2011-10-31 19:18:09 UTC (rev 3854)
@@ -0,0 +1,14 @@
+<?php
+/**
+ @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.0
+ @date 18/12/10, 10:50
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+
+
+/* osc_customers_groups */
+$lg['OSC_CUSTOMERS_GROUPS_RETAIL']="particuliers" ;
+?>
\ No newline at end of file
Added: trunk/catalog/install/includes/language/fr_FR/osc_full_tag_description.txt
===================================================================
--- trunk/catalog/install/includes/language/fr_FR/osc_full_tag_description.txt (rev 0)
+++ trunk/catalog/install/includes/language/fr_FR/osc_full_tag_description.txt 2011-10-31 19:18:09 UTC (rev 3854)
@@ -0,0 +1,14 @@
+<?php
+/**
+ @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.0
+ @date 18/12/10, 10:50
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+
+
+/* osc_customers_groups */
+$lg['OSC_CUSTOMERS_GROUPS_RETAIL']="particuliers" ;
+?>
\ No newline at end of file
Added: trunk/catalog/install/includes/language/fr_FR/osc_languages.txt
===================================================================
--- trunk/catalog/install/includes/language/fr_FR/osc_languages.txt (rev 0)
+++ trunk/catalog/install/includes/language/fr_FR/osc_languages.txt 2011-10-31 19:18:09 UTC (rev 3854)
@@ -0,0 +1,16 @@
+<?php
+/**
+ @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.0
+ @date 18/12/10, 10:50
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+
+
+/* osc_languages */
+$lg['LANGUAGE_NAME_S']="Français" ;
+$lg['LANGUAGE_NAME_CODE_S']="fr" ;
+$lg['LANGUAGE_NAME_REP_S']="fr_FR" ;
+?>
\ No newline at end of file
Added: trunk/catalog/install/includes/language/fr_FR/osc_navigation_links_description.txt
===================================================================
--- trunk/catalog/install/includes/language/fr_FR/osc_navigation_links_description.txt (rev 0)
+++ trunk/catalog/install/includes/language/fr_FR/osc_navigation_links_description.txt 2011-10-31 19:18:09 UTC (rev 3854)
@@ -0,0 +1,31 @@
+<?php
+/**
+ @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.0
+ @date 18/12/10, 10:50
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+
+
+/* osc_navigation_links_description */
+$lg['OSC_NAVIGATION_LINKS_DESCRIPTION_HOME']="Accueil" ;
+$lg['OSC_NAVIGATION_LINKS_DESCRIPTION_NEWS']="Nouveautés" ;
+$lg['OSC_NAVIGATION_LINKS_DESCRIPTION_ACCOUNT']="Mon compte" ;
+$lg['OSC_NAVIGATION_LINKS_DESCRIPTION_LOGOFF']="Fermer la session" ;
+$lg['OSC_NAVIGATION_LINKS_DESCRIPTION_CART']="Panier" ;
+$lg['OSC_NAVIGATION_LINKS_DESCRIPTION_CATEGORIES']="Catégories" ;
+$lg['OSC_NAVIGATION_LINKS_DESCRIPTION_SELECTION']="Sélection" ;
+$lg['OSC_NAVIGATION_LINKS_DESCRIPTION_HISTORY']="Historique" ;
+$lg['OSC_NAVIGATION_LINKS_DESCRIPTION_PERSONAL_INFORMATION']="Informations personnel" ;
+$lg['OSC_NAVIGATION_LINKS_DESCRIPTION_BESTSELLERS']="Meilleures ventes" ;
+$lg['OSC_NAVIGATION_LINKS_DESCRIPTION_SMALLPRICE']="Petit prix" ;
+$lg['OSC_NAVIGATION_LINKS_DESCRIPTION_INFORMATION']="Informations" ;
+$lg['OSC_NAVIGATION_LINKS_DESCRIPTION_SITEMAP']="Plan du site" ;
+$lg['OSC_NAVIGATION_LINKS_DESCRIPTION_CONTACT']="Contact" ;
+$lg['OSC_NAVIGATION_LINKS_DESCRIPTION_CAT']="Catégories" ;
+$lg['OSC_NAVIGATION_LINKS_DESCRIPTION_LISTCAT']="Liste catégories" ;
+$lg['OSC_NAVIGATION_LINKS_DESCRIPTION_SPECIAL']="Promotions" ;
+$lg['OSC_NAVIGATION_LINKS_DESCRIPTION_CREDITS']="Crédits" ;
+?>
\ No newline at end of file
Added: trunk/catalog/install/includes/language/fr_FR/osc_status.txt
===================================================================
--- trunk/catalog/install/includes/language/fr_FR/osc_status.txt (rev 0)
+++ trunk/catalog/install/includes/language/fr_FR/osc_status.txt 2011-10-31 19:18:09 UTC (rev 3854)
@@ -0,0 +1,44 @@
+<?php
+/**
+ @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.0
+ @date 18/12/10, 10:50
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+
+
+/* osc_orders_status */
+$lg['OSC_ORDERS_STATUS_PENDING']="En attente" ;
+$lg['OSC_ORDERS_STATUS_PROCESSING']="Traitement en cours" ;
+$lg['OSC_ORDERS_STATUS_DELIVERED']="Livré" ;
+$lg['OSC_ORDERS_STATUS_CANCELED']="Annulé" ;
+
+
+/* osc_products_virtual_types */
+$lg['OSC_PRODUCTS_VIRTUAL_TYPES_PHYSICAL']="Physique" ;
+$lg['OSC_PRODUCTS_VIRTUAL_TYPES_SUBSCRIPTION']="Abonnement" ;
+$lg['OSC_PRODUCTS_VIRTUAL_TYPES_SERVICE']="Services" ;
+$lg['OSC_PRODUCTS_VIRTUAL_TYPES_SOFTWARE']="Logiciels" ;
+$lg['OSC_PRODUCTS_VIRTUAL_TYPES_MEMBERS']="Membre uniquement" ;
+
+/* osc_refund_method */
+$lg['OSC_REFUND_METHOD_PAYPAL']="Paypal" ;
+$lg['OSC_REFUND_METHOD_NOCHEX']="Pas de remboursement" ;
+$lg['OSC_REFUND_METHOD_EXCHANGE']="Échange" ;
+$lg['OSC_REFUND_METHOD_GIFT_VOUCHERS']="Chèques Cadeaux" ;
+$lg['OSC_REFUND_METHOD_CUSTOMERS_POINTS']="Valeur en points" ;
+
+/* osc_return_reasons */
+$lg['OSC_RETURN_REASONS_FAULTY']="Défectueux" ;
+$lg['OSC_RETURN_REASONS_DAMAGED']="Endommagé" ;
+$lg['OSC_RETURN_REASONS_INCORRECT_ITEM']="Erreur" ;
+$lg['OSC_RETURN_REASONS_WARRANTY']="Garantie" ;
+
+/* osc_returns_status */
+$lg['OSC_RETURNS_STATUS_PENDING']="En attente" ;
+$lg['OSC_RETURNS_STATUS_AWAITING_RETURN']="Attente du retour" ;
+$lg['OSC_RETURNS_STATUS_CANCELLED']="Annulé" ;
+$lg['OSC_RETURNS_STATUS_COMPLETE']="Terminé" ;
+?>
\ No newline at end of file
Modified: trunk/catalog/install/includes/language/fr_FR/oscss_config.txt
===================================================================
--- trunk/catalog/install/includes/language/fr_FR/oscss_config.txt 2011-10-31 14:19:40 UTC (rev 3853)
+++ trunk/catalog/install/includes/language/fr_FR/oscss_config.txt 2011-10-31 19:18:09 UTC (rev 3854)
@@ -8,17 +8,11 @@
@encode UTF-8
*/
-/* osc_categories_description */
-$lg['CAT1']="Non classé(s)" ;
-$lg['CAT2']="Informations" ;
-$lg['CAT3']="Home" ;
-/* osc_admin_groups */
-$lg['OSC_ADMIN_GROUPS_ADMIN']="Administrateur" ;
-$lg['OSC_ADMIN_GROUPS_SELLER']="Vendeur" ;
+
/// 6 module option
@@ -29,141 +23,20 @@
$lg['DEFAULT_REFUND_METHOD_S']="Méthode de remboursement par défaut" ;
$lg['DEFAULT_REFUND_METHOD_L']="Méthode de remboursement par défaut." ;
-$lg['MODULE_GENERIC_INSTALLED_S']="Modules génériques installés" ;
-$lg['MODULE_GENERIC_INSTALLED_L']="Liste des modules génériques installés séparés par un point virgule. Mise à jour automatique. Ne pas éditer. (Exemple: cc.php;cod.php;paypal.php)" ;
-$lg['MODULE_GENERIC_INSTALLED_BO_S']="[admin]Modules génériques installés" ;
-$lg['MODULE_GENERIC_INSTALLED_BO_L']="Liste des modules génériques installés séparés par un point virgule. Mise à jour automatique. Ne pas éditer. (Exemple: cc.php;cod.php;paypal.php)" ;
-$lg['MODULE_ACAPRO_INSTALLED_S']="Modules de produit installés" ;
-$lg['MODULE_ACAPRO_INSTALLED_L']="Liste des modules de produit installés séparés par un point virgule. Mise à jour automatique. Ne pas éditer. (Exemple: cc.php;cod.php;paypal.php)" ;
-$lg['MODULE_ACAPRO_INSTALLED_BO_S']="[admin]Modules de produit installés" ;
-$lg['MODULE_ACAPRO_INSTALLED_BO_L']="Liste des modules de produit installés séparés par un point virgule. Mise à jour automatique. Ne pas éditer. (Exemple: cc.php;cod.php;paypal.php)" ;
-$lg['MODULE_CONTENT_INSTALLED_S']="Modules de contenu installés" ;
-$lg['MODULE_CONTENT_INSTALLED_L']="Liste des modules de contenu installés séparés par un point virgule. Mise à jour automatique. Ne pas éditer. (Exemple: cc.php;cod.php;paypal.php)" ;
-$lg['MODULE_CONTENT_INSTALLED_BO_S']="[admin] Modules de contenu installés" ;
-$lg['MODULE_CONTENT_INSTALLED_BO_L']="Liste des modules de contenu installés séparés par un point virgule. Mise à jour automatique. Ne pas éditer. (Exemple: cc.php;cod.php;paypal.php)" ;
-$lg['MODULE_ACACAT_INSTALLED_S']="Modules de catégorie installés" ;
-$lg['MODULE_ACACAT_INSTALLED_L']="Liste des modules de catégories installés séparés par un point virgule. Mise à jour automatique. Ne pas éditer. (Exemple: cc.php;cod.php;paypal.php)" ;
-$lg['MODULE_ACACAT_INSTALLED_BO_S']="[admin]Modules de catégorie installés" ;
-$lg['MODULE_ACACAT_INSTALLED_BO_L']="Liste des modules de catégorie installés séparés par un point virgule. Mise à jour automatique. Ne pas éditer. (Exemple: cc.php;cod.php;paypal.php)" ;
-$lg['MODULE_ACCOUNT_INSTALLED_S']="Modules de compte installés" ;
-$lg['MODULE_ACCOUNT_INSTALLED_L']="Liste des modules de compte installés séparés par un point virgule. Mise à jour automatique. Ne pas éditer. (Exemple: cc.php;cod.php;paypal.php)" ;
-$lg['MODULE_ACCOUNT_INSTALLED_BO_S']="[admin]Modules de compte installés" ;
-$lg['MODULE_ACCOUNT_INSTALLED_BO_L']="Liste des modules de compte installés séparés par un point virgule. Mise à jour automatique. Ne pas éditer. (Exemple: cc.php;cod.php;paypal.php)" ;
-$lg['MODULE_LISTING_INSTALLED_S']="Modules de liste installés" ;
-$lg['MODULE_LISTING_INSTALLED_L']="Liste des modules de liste installés séparés par un point virgule. Mise à jour automatique. Ne pas éditer. (Exemple: cc.php;cod.php;paypal.php)" ;
-$lg['MODULE_LISTING_INSTALLED_BO_S']="[admin]Modules de liste installés" ;
-$lg['MODULE_LISTING_INSTALLED_BO_L']="Liste des modules de liste installés séparés par un point virgule. Mise à jour automatique. Ne pas éditer. (Exemple: cc.php;cod.php;paypal.php)" ;
-$lg['MODULE_HOME_INSTALLED_S']="Modules d'accueil installés" ;
-$lg['MODULE_HOME_INSTALLED_L']="Liste des modules d'accueil installés séparés par un point virgule. Mise à jour automatique. Ne pas éditer. (Exemple: cc.php;cod.php;paypal.php)" ;
-$lg['MODULE_HOME_INSTALLED_BO_S']="[admin]Modules d'accueil installés" ;
-$lg['MODULE_HOME_INSTALLED_BO_L']="Liste des modules d'accueil installés séparés par un point virgule. Mise à jour automatique. Ne pas éditer. (Exemple: cc.php;cod.php;paypal.php)" ;
-$lg['MODULE_CHECKOUT_PROCESS_INSTALLED_S']="Modules de commande installés" ;
-$lg['MODULE_CHECKOUT_PROCESS_INSTALLED_L']="Liste des modules de commande installés séparés par un point virgule. Mise à jour automatique. Ne pas éditer. (Exemple: cc.php;cod.php;paypal.php)" ;
-$lg['MODULE_CHECKOUT_PROCESS_INSTALLED_BO_S']="[admin]Modules de commande installés" ;
-$lg['MODULE_CHECKOUT_PROCESS_INSTALLED_BO_L']="Liste des modules de commande installés séparés par un point virgule. Mise à jour automatique. Ne pas éditer. (Exemple: cc.php;cod.php;paypal.php)" ;
-$lg['MODULE_SHIPPING_INSTALLED_S']="Modules de livraison installés" ;
-$lg['MODULE_SHIPPING_INSTALLED_L']="Liste des modules de livraison installés séparés par un point virgule. Mise à jour automatique. Ne pas éditer. (Exemple: ups.php;flat.php;item.php)" ;
-$lg['MODULE_PAYMENT_INSTALLED_S']="Modules de paiement installés" ;
-$lg['MODULE_PAYMENT_INSTALLED_L']="Liste des modules de paiement installés séparés par un point virgule. Mise à jour automatique. Ne pas éditer. (Exemple: cc.php;cod.php;paypal.php)" ;
-$lg['MODULE_ORDER_TOTAL_INSTALLED_S']="Modules total commande installés" ;
-$lg['MODULE_ORDER_TOTAL_INSTALLED_L']="Liste des modules de total installés; séparés par un point virgule. Mise à jour automatique. Ne pas éditer. (Exemple: ot_subtotal.php;ot_tax.php;ot_shipping.php;ot_total.php)" ;
-$lg['PLUGIN_GENERIC_INSTALLED_S']="Plugins génériques installés" ;
-$lg['PLUGIN_GENERIC_INSTALLED_L']="Liste des plugins génériques installés séparés par un point virgule. Mise à jour automatique. Ne pas éditer. (Exemple: cc.php;cod.php;paypal.php)" ;
-$lg['PLUGIN_PRODUCT_INSTALLED_S']="Plugins de produit installés" ;
-$lg['PLUGIN_PRODUCT_INSTALLED_L']="Liste des plugins de produit installés séparés par un point virgule. Mise à jour automatique. Ne pas éditer. (Exemple: cc.php;cod.php;paypal.php)" ;
-$lg['PLUGIN_ACCOUNT_INSTALLED_S']="Plugins de compte installés" ;
-$lg['PLUGIN_ACCOUNT_INSTALLED_L']="Liste des plugins de compte installés séparés par un point virgule. Mise à jour automatique. Ne pas éditer. (Exemple: cc.php;cod.php;paypal.php)" ;
-$lg['PLUGIN_LISTING_INSTALLED_S']="Plugins de liste installés" ;
-$lg['PLUGIN_LISTING_INSTALLED_L']="Liste des plugins de liste installés séparés par un point virgule. Mise à jour automatique. Ne pas éditer. (Exemple: cc.php;cod.php;paypal.php)" ;
-$lg['PLUGIN_HOME_INSTALLED_S']="Plugins d'accueil installés" ;
-$lg['PLUGIN_HOME_INSTALLED_L']="Liste des plugins d'accueil installés séparés par un point virgule. Mise à jour automatique. Ne pas éditer. (Exemple: cc.php;cod.php;paypal.php)" ;
-/// 19 tell a friend
-$lg['ALLOW_GUEST_TO_TELL_A_FRIEND_S']="Permettre la recommandation d'un article" ;
-$lg['ALLOW_GUEST_TO_TELL_A_FRIEND_L']="Permettre aux visiteurs de recommander un article." ;
-
-
/// 128 Config environement shop
-/* osc_content_description */
-$lg['OSC_CONTENT_DESCRIPTION_SHIPPING_T']="Expédition et retours" ;
-$lg['OSC_CONTENT_DESCRIPTION_SHIPPING_D']="<p>Insérer ici vos informations d'expédition & retours.</p>" ;
-$lg['OSC_CONTENT_DESCRIPTION_PRIVACY_T']="Vie privée" ;
-$lg['OSC_CONTENT_DESCRIPTION_PRIVACY_D']="<p>Insérer ici vos remarques de confidentialité.</p>" ;
-$lg['OSC_CONTENT_DESCRIPTION_CONDITIONS_T']="Conditions d'utilisation" ;
-$lg['OSC_CONTENT_DESCRIPTION_CONDITIONS_D']="<p>Insérer ici vos conditions d'usage.</p>" ;
-$lg['OSC_CONTENT_DESCRIPTION_CONTACT_T']="Contact" ;
-$lg['OSC_CONTENT_DESCRIPTION_CONTACT_D']="<p>Utiliser ce formulaire pour contacter notre service clientèle.</p>" ;
-/* header tag */
-$lg['HEAD_TITLE_TAG_ALL']="osCSS 2 boutique en ligne" ;
-$lg['HEAD_DESC_TAG_ALL']="Shop osCSS, solution ecommerce de gestion complète d'une boutique; fonctionnalités avancées (stats, module, plugin, extension, multilingue, valide xhtml, valide css2), 100% GNU/GPL, Open Source" ;
-$lg['HEAD_KEY_TAG_ALL']="osCSS, osCSS Team, ecommerce, shop, boutique en ligne, vente en ligne, open source, open-source, GNU, GPL, oscommerce, stats, module, plugin, extension, multilingue, valide xhtml, valide css2" ;
-/* osc_navigation_links_description */
-$lg['OSC_NAVIGATION_LINKS_DESCRIPTION_HOME']="Accueil" ;
-$lg['OSC_NAVIGATION_LINKS_DESCRIPTION_NEWS']="Nouveautés" ;
-$lg['OSC_NAVIGATION_LINKS_DESCRIPTION_ACCOUNT']="Mon compte" ;
-$lg['OSC_NAVIGATION_LINKS_DESCRIPTION_LOGOFF']="Fermer la session" ;
-$lg['OSC_NAVIGATION_LINKS_DESCRIPTION_CART']="Panier" ;
-$lg['OSC_NAVIGATION_LINKS_DESCRIPTION_CATEGORIES']="Catégories" ;
-$lg['OSC_NAVIGATION_LINKS_DESCRIPTION_SELECTION']="Sélection" ;
-$lg['OSC_NAVIGATION_LINKS_DESCRIPTION_HISTORY']="Historique" ;
-$lg['OSC_NAVIGATION_LINKS_DESCRIPTION_PERSONAL_INFORMATION']="Informations personnel" ;
-$lg['OSC_NAVIGATION_LINKS_DESCRIPTION_BESTSELLERS']="Meilleures ventes" ;
-$lg['OSC_NAVIGATION_LINKS_DESCRIPTION_SMALLPRICE']="Petit prix" ;
-$lg['OSC_NAVIGATION_LINKS_DESCRIPTION_INFORMATION']="Informations" ;
-$lg['OSC_NAVIGATION_LINKS_DESCRIPTION_SITEMAP']="Plan du site" ;
-$lg['OSC_NAVIGATION_LINKS_DESCRIPTION_CONTACT']="Contact" ;
-$lg['OSC_NAVIGATION_LINKS_DESCRIPTION_CAT']="Catégories" ;
-$lg['OSC_NAVIGATION_LINKS_DESCRIPTION_LISTCAT']="Liste catégories" ;
-$lg['OSC_NAVIGATION_LINKS_DESCRIPTION_SPECIAL']="Promotions" ;
-$lg['OSC_NAVIGATION_LINKS_DESCRIPTION_CREDITS']="Crédits" ;
-/* osc_orders_status */
-$lg['OSC_ORDERS_STATUS_PENDING']="En attente" ;
-$lg['OSC_ORDERS_STATUS_PROCESSING']="Traitement en cours" ;
-$lg['OSC_ORDERS_STATUS_DELIVERED']="Livré" ;
-$lg['OSC_ORDERS_STATUS_CANCELED']="Annulé" ;
-/* osc_products_virtual_types */
-$lg['OSC_PRODUCTS_VIRTUAL_TYPES_PHYSICAL']="Physique" ;
-$lg['OSC_PRODUCTS_VIRTUAL_TYPES_SUBSCRIPTION']="Abonnement" ;
-$lg['OSC_PRODUCTS_VIRTUAL_TYPES_SERVICE']="Services" ;
-$lg['OSC_PRODUCTS_VIRTUAL_TYPES_SOFTWARE']="Logiciels" ;
-$lg['OSC_PRODUCTS_VIRTUAL_TYPES_MEMBERS']="Membre uniquement" ;
-/* osc_refund_method */
-$lg['OSC_REFUND_METHOD_PAYPAL']="Paypal" ;
-$lg['OSC_REFUND_METHOD_NOCHEX']="Pas de remboursement" ;
-$lg['OSC_REFUND_METHOD_EXCHANGE']="Échange" ;
-$lg['OSC_REFUND_METHOD_GIFT_VOUCHERS']="Chèques Cadeaux" ;
-$lg['OSC_REFUND_METHOD_CUSTOMERS_POINTS']="Valeur en points" ;
-/* osc_return_reasons */
-$lg['OSC_RETURN_REASONS_FAULTY']="Défectueux" ;
-$lg['OSC_RETURN_REASONS_DAMAGED']="Endommagé" ;
-$lg['OSC_RETURN_REASONS_INCORRECT_ITEM']="Erreur" ;
-$lg['OSC_RETURN_REASONS_WARRANTY']="Garantie" ;
-
-/* osc_returns_status */
-$lg['OSC_RETURNS_STATUS_PENDING']="En attente" ;
-$lg['OSC_RETURNS_STATUS_AWAITING_RETURN']="Attente du retour" ;
-$lg['OSC_RETURNS_STATUS_CANCELLED']="Annulé" ;
-$lg['OSC_RETURNS_STATUS_COMPLETE']="Terminé" ;
-
-/* osc_languages */
-$lg['LANGUAGE_NAME_S']="Français" ;
-$lg['LANGUAGE_NAME_CODE_S']="fr" ;
-$lg['LANGUAGE_NAME_REP_S']="fr_FR" ;
-
-/* osc_customers_groups */
-$lg['OSC_CUSTOMERS_GROUPS_RETAIL']="particuliers" ;
?>
\ No newline at end of file
Modified: trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql 2011-10-31 14:19:40 UTC (rev 3853)
+++ trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql 2011-10-31 19:18:09 UTC (rev 3854)
@@ -27,10 +27,10 @@
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('DEFAULT_LANGUAGE_S', 'DEFAULT_LANGUAGE', 'fr', 'DEFAULT_LANGUAGE_L', '0', '1', NULL, NOW(), NULL, NULL);
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function , set_function) values ('WHOS_ONLINE_ACTIVE_S', 'WHOS_ONLINE_FLAG', 'false', 'WHOS_ONLINE_ACTIVE_L', '0', '0', NOW(), NOW(),NULL, 'tep_cfg_Non_Edit(\';\',');
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function , set_function,configuration_type) values ('CFG_CLASS_VIRTUAL_TYPE_1_S', 'CFG_CLASS_VIRTUAL_TYPE_1', '', 'CFG_CLASS_VIRTUAL_TYPE_L', '0', '0', NOW(), NOW(),NULL, 'tep_cfg_text_auto(', 1);
-insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function , set_function,configuration_type) values ('CFG_CLASS_VIRTUAL_TYPE_2_S', 'CFG_CLASS_VIRTUAL_TYPE_2', '', 'CFG_CLASS_VIRTUAL_TYPE_L', '0', '0', NOW(), NOW(),NULL, 'tep_cfg_text_auto(', 1);
-insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function , set_function,configuration_type) values ('CFG_CLASS_VIRTUAL_TYPE_3_S', 'CFG_CLASS_VIRTUAL_TYPE_3', '', 'CFG_CLASS_VIRTUAL_TYPE_L', '0', '0', NOW(), NOW(),NULL, 'tep_cfg_text_auto(', 1);
-insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function , set_function,configuration_type) values ('CFG_CLASS_VIRTUAL_TYPE_4_S', 'CFG_CLASS_VIRTUAL_TYPE_4', '', 'CFG_CLASS_VIRTUAL_TYPE_L', '0', '0', NOW(), NOW(),NULL, 'tep_cfg_text_auto(', 1);
-insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function , set_function,configuration_type) values ('TYPE_VIRTUAL_PRODUCTS_S', 'TYPE_VIRTUAL_PRODUCTS', '3,4', 'TYPE_VIRTUAL_PRODUCTS_L', '0', '0', NOW(), NOW(),NULL, NULL, 2);
+insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function , set_function,configuration_type) values ('CFG_CLASS_VIRTUAL_TYPE_2_S', 'CFG_CLASS_VIRTUAL_TYPE_2', 'CLASS_WEIGHT;', 'CFG_CLASS_VIRTUAL_TYPE_L', '0', '0', NOW(), NOW(),NULL, 'tep_cfg_text_auto(', 1);
+insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function , set_function,configuration_type) values ('CFG_CLASS_VIRTUAL_TYPE_3_S', 'CFG_CLASS_VIRTUAL_TYPE_3', 'CLASS_WEIGHT;', 'CFG_CLASS_VIRTUAL_TYPE_L', '0', '0', NOW(), NOW(),NULL, 'tep_cfg_text_auto(', 1);
+insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function , set_function,configuration_type) values ('CFG_CLASS_VIRTUAL_TYPE_4_S', 'CFG_CLASS_VIRTUAL_TYPE_4', 'CLASS_WEIGHT;', 'CFG_CLASS_VIRTUAL_TYPE_L', '0', '0', NOW(), NOW(),NULL, 'tep_cfg_text_auto(', 1);
+insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function , set_function,configuration_type) values ('TYPE_VIRTUAL_PRODUCTS_S', 'TYPE_VIRTUAL_PRODUCTS', '2,3,4', 'TYPE_VIRTUAL_PRODUCTS_L', '0', '0', NOW(), NOW(),NULL, NULL, 2);
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function , set_function,configuration_type) values ('ORPHELIN_COLLECTOR_S', 'ORPHELIN_COLLECTOR', '1', 'ORPHELIN_COLLECTOR_L', '0', '0', NOW(), NOW(),NULL, NULL, 1);
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function , set_function,configuration_type) values ('PUBLIC_DRIVERS_PAGE_S', 'PUBLIC_DRIVERS_PAGE', 'GabaritTemplate', 'PUBLIC_DRIVERS_PAGE_L', '0', '0', NOW(), NOW(),NULL, NULL, 2);
Modified: trunk/catalog/install/includes/sql/mysql/tables/osc_products.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/tables/osc_products.sql 2011-10-31 14:19:40 UTC (rev 3853)
+++ trunk/catalog/install/includes/sql/mysql/tables/osc_products.sql 2011-10-31 19:18:09 UTC (rev 3854)
@@ -26,7 +26,7 @@
drop table if exists osc_products;
create table osc_products (
products_id int(11) not null auto_increment,
- products_type int(2) not null default '0',
+ products_type int(2) not null default '1',
products_quantity int(4) default '0' not null ,
products_model varchar(12) null,
products_image varchar(128) null,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2011-10-31 14:19:46
|
Revision: 3853
http://oscss.svn.sourceforge.net/oscss/?rev=3853&view=rev
Author: oscim
Date: 2011-10-31 14:19:40 +0000 (Mon, 31 Oct 2011)
Log Message:
-----------
correction coquille
Ajout enregsitrement / mise a jour du cpath en db
suite ajustement des chemins
correction reliquat table virtual pour les produits
Modified Paths:
--------------
trunk/catalog/admin/includes/classes/categorieUtility.php
trunk/catalog/admin/includes/classes/drivers/sqlcategorie.php
trunk/catalog/admin/includes/modules/pages/index.php
trunk/catalog/common/classes/shoppingCart.php
trunk/catalog/includes/appli_top_Test.php
trunk/catalog/install/includes/modele/configure.txt
trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_categories.sql
Modified: trunk/catalog/admin/includes/classes/categorieUtility.php
===================================================================
--- trunk/catalog/admin/includes/classes/categorieUtility.php 2011-10-31 11:49:06 UTC (rev 3852)
+++ trunk/catalog/admin/includes/classes/categorieUtility.php 2011-10-31 14:19:40 UTC (rev 3853)
@@ -60,21 +60,27 @@
}
/**
- Calcul et mise en forme du cpath
- @package oscss
- @author oscim - OscssTeam
+ @fn get_generated_category_path_ids($id, $from = 'category')
+ @brief Calcul et mise en forme du cpath
+ @param $id int id current category
+ @param $from string category/products
@return string (10_15 ou 8)
*/
public static function get_generated_category_path_ids($id, $from = 'category') {
$calculated_category_path_string = '';
$calculated_category_path = tep_generate_category_path($id, $from);
- for ($i=0, $n=sizeof($calculated_category_path); $i<$n; $i++) {
- for ($j=0, $k=sizeof($calculated_category_path[$i]); $j<$k; $j++) {
- $calculated_category_path_string .= $calculated_category_path[$i][$j]['id'] . '_';
- }
+
+ $carr=$calculated_category_path[0];
+
+ if(count($carr)>1) {
+ foreach(array_reverse($carr) as $v)
+ $calculated_category_path_string .=$v['id'] . '_';
+
$calculated_category_path_string = substr($calculated_category_path_string, 0, -1);
}
- if (strlen($calculated_category_path_string) < 1) $calculated_category_path_string = 0;
+ else
+ $calculated_category_path_string = $id;
+
return $calculated_category_path_string;
}
@@ -162,7 +168,8 @@
$category_query = tep_db_query("select cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . (int)$id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "'");
$category = tep_db_fetch_array($category_query);
$categories_array[$index][] = array('id' => $id, 'text' => $category['categories_name']);
- if ( (tep_not_null($category['parent_id'])) && ($category['parent_id'] != '0') ) $categories_array = tep_generate_category_path($category['parent_id'], 'category', $categories_array, $index);
+ if ( (tep_not_null($category['parent_id'])) && ($category['parent_id'] != '0') )
+ $categories_array = tep_generate_category_path($category['parent_id'], 'category', $categories_array, $index);
}
return $categories_array;
Modified: trunk/catalog/admin/includes/classes/drivers/sqlcategorie.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlcategorie.php 2011-10-31 11:49:06 UTC (rev 3852)
+++ trunk/catalog/admin/includes/classes/drivers/sqlcategorie.php 2011-10-31 14:19:40 UTC (rev 3853)
@@ -7,7 +7,7 @@
@date 22/09/11, 20:11
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
- @class manage link table configuration
+ @class sqlcategorie
*/
@@ -74,6 +74,7 @@
$sql_data_array['date_added'] = 'now()';
$sql_data_array['sort_order'] = (!empty($post['sort_order'])) ? tep_db_prepare_input((int)$post['sort_order']) : 0 ;
$sql_data_array['parent_id'] = (!empty($sql_data_array['parent_id'])) ? tep_db_prepare_input((int)$sql_data_array['parent_id']) : 0 ;
+
$sql_data_array['categories_status'] = (!empty($post['categories_status'])) ? tep_db_prepare_input((int)$post['categories_status']) : 0 ;
$sql_data_array['categories_hidden'] = (!empty($post['categories_hidden'])) ? tep_db_prepare_input((int)$post['categories_hidden']) : 0 ;
@@ -84,12 +85,20 @@
$res=tep_db_perform(TABLE_CATEGORIES, $sql_data_array);
+
+
if(!$res)
return $res;
else
$categories_id = $res->__get('insertId');
+ // cpath adjust
+ $sql_data_array=array();
+ $sql_data_array['categories_cpath'] = categorieUtility::get_generated_category_path_ids($categories_id);
+ $res=tep_db_perform(TABLE_CATEGORIES, $sql_data_array, 'update', "categories_id = '" . $categories_id . "'");
+
+ // table language adjust
$categories_name_array = $_POST['categories_name'];
$categories_desc_array = $_POST['categories_description'];
@@ -143,6 +152,7 @@
$sql_data_array['last_modified'] = 'now()';
$sql_data_array['sort_order'] = (!empty($post['sort_order'])) ? tep_db_prepare_input((int)$post['sort_order']) : 0 ;
$sql_data_array['parent_id'] = (!empty($sql_data_array['parent_id'])) ? tep_db_prepare_input((int)$sql_data_array['parent_id']) : 0 ;
+ $sql_data_array['categories_cpath'] = categorieUtility::get_generated_category_path_ids($id,'category');
$sql_data_array['categories_status'] = (!empty($post['categories_status'])) ? tep_db_prepare_input((int)$post['categories_status']) : 0 ;
$sql_data_array['categories_hidden'] = (!empty($post['categories_hidden'])) ? tep_db_prepare_input((int)$post['categories_hidden']) : 0 ;
Modified: trunk/catalog/admin/includes/modules/pages/index.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/index.php 2011-10-31 11:49:06 UTC (rev 3852)
+++ trunk/catalog/admin/includes/modules/pages/index.php 2011-10-31 14:19:40 UTC (rev 3853)
@@ -3,8 +3,8 @@
@licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.1.0
- @date 18/04/11, 18:46
+ @version 2.1.1
+ @date 31/10/11, 12:59
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class index
@@ -126,7 +126,7 @@
public static function load_db_values($ID){
global $messageStack, $languages_id;
try{
- if(!$SParser = simplexml_load_file(DIR_WS_INCLUDES.'data/'.$ID)) throw new Exception('Flux introuvable');
+ if(!$SParser = simplexml_load_file(DIR_FS_ROOT_DOCS.'admin/data/'.$ID)) throw new Exception('Flux introuvable');
foreach($SParser->xpath(self::$type) as $item){
foreach($item as $k=>$col){
Modified: trunk/catalog/common/classes/shoppingCart.php
===================================================================
--- trunk/catalog/common/classes/shoppingCart.php 2011-10-31 11:49:06 UTC (rev 3852)
+++ trunk/catalog/common/classes/shoppingCart.php 2011-10-31 14:19:40 UTC (rev 3853)
@@ -403,11 +403,11 @@
if ($this->count_contents() > 0) {
reset($this->contents);
while (list($products_id, ) = each($this->contents)) {
- $virtual_products_result = tep_db_query("select * from ".TABLE_PRODUCTS_VIRTUAL." where productsID=".(int)$products_id);
+ $virtual_products_result = tep_db_query("select products_type from ".TABLE_PRODUCTS." where products_id=".(int)$products_id);
if (tep_db_num_rows($virtual_products_result) > 0) {
$res=tep_db_fetch_array($virtual_products_result);
- $array_content_type[] = (in_array($res['typeID'], explode(';',TYPE_VIRTUAL_PRODUCTS)))? 'virtual' : 'physical';
+ $array_content_type[] = (in_array($res['products_type'], explode(';',TYPE_VIRTUAL_PRODUCTS)))? 'virtual' : 'physical';
}
else $array_content_type[] = 'physical';
}
Modified: trunk/catalog/includes/appli_top_Test.php
===================================================================
--- trunk/catalog/includes/appli_top_Test.php 2011-10-31 11:49:06 UTC (rev 3852)
+++ trunk/catalog/includes/appli_top_Test.php 2011-10-31 14:19:40 UTC (rev 3853)
@@ -29,6 +29,16 @@
}else require('includes/configure.php');
+/**
+ @remarks Force create folder in docs
+*/
+if(!is_dir(DIR_FS_ROOT_DOCS.'dev/'))
+ mkdir(DIR_FS_ROOT_DOCS.'dev/');
+
+if(!is_dir(DIR_FS_ROOT_DOCS.'dev/logs/'))
+ mkdir(DIR_FS_ROOT_DOCS.'dev/logs/');
+
+
if (OSCSS_DEBUG == true) {
$oscss_debug_infos = array();
error_reporting(-1);
@@ -88,7 +98,7 @@
include(DIR_WS_INCLUDES . 'inc_base_lib.php');
if(OSCSS_GARBAGE_ERROR == true){
- if (_cst_bool('STORE_PAGE_PARSE_STOCK_ERROR')) $errorHandler->attachFileWriter('sessions/err-php.log');
+ if (_cst_bool('STORE_PAGE_PARSE_STOCK_ERROR')) $errorHandler->attachFileWriter(DIR_FS_ROOT_DOCS.'dev/logs/dev-php.log');
if (_cst_bool('STORE_PAGE_PARSE_EMAIL_OWNER')) $errorHandler->attachMailWriter(STORE_OWNER_EMAIL_ADDRESS);
}
Modified: trunk/catalog/install/includes/modele/configure.txt
===================================================================
--- trunk/catalog/install/includes/modele/configure.txt 2011-10-31 11:49:06 UTC (rev 3852)
+++ trunk/catalog/install/includes/modele/configure.txt 2011-10-31 14:19:40 UTC (rev 3853)
@@ -34,8 +34,8 @@
define('HTTPS_COOKIE_DOMAIN', '%HTTPS_COOKIE_DOMAIN%');
define('HTTP_COOKIE_PATH', '%HTTP_COOKIE_PATH%');
define('HTTPS_COOKIE_PATH', '%HTTPS_COOKIE_PATH%');
- define('DIR_WS_HTTP_CATALOG', '%HTTP_SERVER%');
- define('DIR_WS_HTTPS_CATALOG', '%HTTPS_SERVER%');
+ define('DIR_WS_HTTP_CATALOG', '%HTTP_CATALOG%');
+ define('DIR_WS_HTTPS_CATALOG', '%HTTP_CATALOG%');
define('DIR_CLASSES', 'classes/');
define('DIR_FUNCTIONS', 'functions/');
@@ -54,7 +54,7 @@
define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');
define('DIR_FS_CATALOG', '%FS_DOCUMENT_ROOT%');
- define('DIR_FS_ROOT_DOCS', '%FS_DOCUMENT_ROOT%/Documents/');
+ define('DIR_FS_ROOT_DOCS', '%FS_DOCUMENT_ROOT%Documents/');
define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');
define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');
Modified: trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql 2011-10-31 11:49:06 UTC (rev 3852)
+++ trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql 2011-10-31 14:19:40 UTC (rev 3853)
@@ -360,4 +360,9 @@
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function, configuration_type) values ('DEFAULT_ORDERS_STATUS_ID_S', 'DEFAULT_ORDERS_STATUS_ANNULATE', '4', 'DEFAULT_ORDERS_STATUS_ID_L', '129', '0', NULL, NOW(), NULL, NULL,2);
## 130 option data types
-insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function , set_function,configuration_type) values ('PUBLIC_PAGE_TYPE_S', 'PUBLIC_PAGE_TYPE', 'listing,product,account,home,content', 'PUBLIC_PAGE_TYPE_L', '130', '0', NOW(), NOW(),NULL, NULL, 2);
\ No newline at end of file
+
+insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function , set_function,configuration_type) values ('PUBLIC_PAGE_TYPE_S', 'PUBLIC_PAGE_TYPE', 'listing,product,account,home,content', 'PUBLIC_PAGE_TYPE_L', '130', '0', NOW(), NOW(),NULL, NULL, 2);
+
+
+COMMIT;
+
Modified: trunk/catalog/install/includes/sql/mysql/tables/osc_categories.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/tables/osc_categories.sql 2011-10-31 11:49:06 UTC (rev 3852)
+++ trunk/catalog/install/includes/sql/mysql/tables/osc_categories.sql 2011-10-31 14:19:40 UTC (rev 3853)
@@ -4,6 +4,7 @@
categories_id int(11) not null auto_increment,
categories_image varchar(64) ,
parent_id int(11) default '0' not null ,
+ categories_cpath varchar(64) not null,
sort_order int(3) ,
date_added datetime default '1000-01-01 00:00:00' null ,
last_modified datetime default '1000-01-01 00:00:00' null ,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2011-10-31 11:49:14
|
Revision: 3852
http://oscss.svn.sourceforge.net/oscss/?rev=3852&view=rev
Author: oscim
Date: 2011-10-31 11:49:06 +0000 (Mon, 31 Oct 2011)
Log Message:
-----------
Deport du dossier Documents dans le dossier catalog, et deport lors install si utilisation vhost
Modification creation des fichiers lors de l'install bas?\195?\169 sur des modeles
Ajustement de l'instalation, prise en compte vhost/classique
Modified Paths:
--------------
trunk/catalog/install/includes/classes/core.php
trunk/catalog/install/includes/content/core.base.php
trunk/catalog/install/includes/content/core.configuration.php
trunk/catalog/install/includes/content/core.modes.php
trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration_group.sql
Added Paths:
-----------
trunk/catalog/Documents/
trunk/catalog/install/includes/modele/
trunk/catalog/install/includes/modele/admin_configure.txt
trunk/catalog/install/includes/modele/admin_htaccess.txt
trunk/catalog/install/includes/modele/configure.txt
trunk/catalog/install/includes/modele/htaccess.txt
trunk/catalog/install/includes/modele/robot.txt
trunk/catalog/install/includes/modele/tables_files_modules.txt
Removed Paths:
-------------
trunk/Documents/
Modified: trunk/catalog/install/includes/classes/core.php
===================================================================
--- trunk/catalog/install/includes/classes/core.php 2011-10-31 08:02:09 UTC (rev 3851)
+++ trunk/catalog/install/includes/classes/core.php 2011-10-31 11:49:06 UTC (rev 3852)
@@ -73,7 +73,7 @@
}
/**
- Delete repertoire recursif
+ @brief Delete repertoire recursif
*/
function recurse_delete($src){
$dir = opendir($src);
@@ -93,11 +93,11 @@
}
/**
- Copy repertoire recursif
+ @brief Copy repertoire recursif
*/
function recurse_copy($src,$dst){
$dir = opendir($src);
- @mkdir($dst);
+ if(!is_dir($dst))@mkdir($dst);
while(false !== ( $file = readdir($dir)) ) {
if (( $file != '.' ) && ( $file != '..' )) {
if ( is_dir($src . '/' . $file) ) {
@@ -112,7 +112,7 @@
}
/**
- retour lang item
+ @brief retour lang item
*/
public function l10n($str) {
global $lang;
@@ -245,7 +245,7 @@
$res=array();
$count=0;
while($file = readdir($fichier)){
- if(!in_array($file, array(".","..")) && !is_dir($file)){
+ if(!in_array($file, array(".","..")) && (substr($file,-1) !='~') && (substr($file,-4) !='.svn') && !is_dir($file)){
$count++;
$name=substr($file, 0,-4);
$res[(isset($orderby[$name])?$orderby[$name] : $count)]=
Modified: trunk/catalog/install/includes/content/core.base.php
===================================================================
--- trunk/catalog/install/includes/content/core.base.php 2011-10-31 08:02:09 UTC (rev 3851)
+++ trunk/catalog/install/includes/content/core.base.php 2011-10-31 11:49:06 UTC (rev 3852)
@@ -23,38 +23,49 @@
// 'conf_f_admin'=>'admin/includes/filenames.php',
'root_doc'=>'Documents/',
-// 'root_doc'=>'Documents/',
-// 'root_doc_oscss_data'=>'Documents/oscss_data/',
- 'root_doc_sessions'=>'Documents/sessions/',
-// 'root_doc_sessions'=>'Documents/admin/sessions/',
+ 'root_doc_a_a'=>'Documents/admin/',
+ 'root_doc_a_backups'=>'Documents/admin/backups/',
+ 'root_doc_a_cache'=>'Documents/admin/cache/',
+ 'root_doc_a_contrib'=>'Documents/admin/contributions/',
+ 'root_doc_a_data'=>'Documents/admin/data/',
+ 'root_doc_a_logs'=>'Documents/admin/logs/',
+ 'root_doc_a_sessions'=>'Documents/admin/sessions/',
+ 'root_doc_a_tmp'=>'Documents/admin/tmp/',
+ 'root_doc_p_p'=>'Documents/public/',
+ 'root_doc_p_log'=>'Documents/public/logs/',
+ 'root_doc_p_data'=>'Documents/public/oscss_data/',
+ 'root_doc_p_sessions'=>'Documents/public/sessions/',
+
+
+
'htacces_admin'=>'admin/.htaccess',
- 'admin_back'=>'admin/backups/',
- 'admin_cip'=>'admin/contributions/',
+ 'admin'=>'admin/',
+ 'admin_inc'=>'admin/includes/',
'admin_image'=>'admin/images/',
'admin_graph'=>'admin/images/graphs/',
'admin_image'=>'admin/images/imagecache/',
- 'admin_mod_a'=>'admin/includes/modules/account/',
- 'admin_mod_c'=>'admin/includes/modules/categories/',
- 'admin_mod_g'=>'admin/includes/modules/generic/',
- 'admin_mod_p'=>'admin/includes/modules/products/',
- 'admin_tmp'=>'admin/includes/tmp/',
- 'admin_tmp_cache'=>'admin/includes/tmp/cache/',
- 'admin_sessions'=>'admin/sessions/',
- 'common'=>'common/',
- 'common_classes'=>'common/classes/',
+// 'admin_mod_a'=>'admin/includes/modules/account/',
+// 'admin_mod_c'=>'admin/includes/modules/categories/',
+// 'admin_mod_g'=>'admin/includes/modules/generic/',
+// 'admin_mod_p'=>'admin/includes/modules/products/',
+// 'admin_tmp'=>'admin/includes/tmp/',
+// 'admin_tmp_cache'=>'admin/includes/tmp/cache/',
+// 'admin_sessions'=>'admin/sessions/',
+// 'common'=>'common/',
+// 'common_classes'=>'common/classes/',
'download'=>'download/',
- 'images'=>'images/',
+// 'images'=>'images/',
'images'=>'images/imagecache/',
- 'mod_a'=>'includes/modules/account/',
- 'mod_g'=>'includes/modules/generic/',
- 'mod_l'=>'includes/modules/listing/',
- 'mod_o'=>'includes/modules/order_total/',
- 'mod_py'=>'includes/modules/payment/',
- 'mod_p'=>'includes/modules/products/',
- 'mod_s'=>'includes/modules/shipping/',
- 'oscss_data'=>'oscss_data/',
+// 'mod_a'=>'includes/modules/account/',
+// 'mod_g'=>'includes/modules/generic/',
+// 'mod_l'=>'includes/modules/listing/',
+// 'mod_o'=>'includes/modules/order_total/',
+// 'mod_py'=>'includes/modules/payment/',
+// 'mod_p'=>'includes/modules/products/',
+// 'mod_s'=>'includes/modules/shipping/',
+// 'oscss_data'=>'oscss_data/',
'pub'=>'pub/',
// 'sessions'=>'sessions/',
'templates'=>'templates/'
@@ -106,6 +117,7 @@
while ($r=each($this->ctr)){
$type= (preg_match("#/$#i",$r['value'])) ?'rep' : 'file';
if(!isset($_POST['WS_STORE_ADMIN']) && !empty($_POST['WS_STORE_ADMIN']))$r['value']=str_replace('admin', $_POST['WS_STORE_ADMIN'],$r['value']);
+
if ($type=='file'){
if (file_exists($path.$r['value'])) {
if (!is_writable($path.$r['value'])){
@@ -115,20 +127,22 @@
}else {
$rep=preg_replace("#[a-z]*\.[a-z]*#i",'',$r['value']);
if (!is_writable($path.$rep)){
- $this->PileMessage('alert',core::l10n("Le répertoire n'est pas accessible en écriture : ").$rep);
+ $this->PileMessage('alert',core::l10n("Le répertoire n'est pas accessible en écriture : ").$path.$rep);
$this->err=true;
}
}
- } else {
- chdir($path);
+ }
+ else {
+ if(!empty($path))chdir($path);
+
if(!is_dir($r['value']) && !@mkdir($r['value'],0777)){
$this->PileMessage('alert',core::l10n("Le répertoire n'existe pas et ne peut être créé : "). $r['value']);
$this->err=true;
}elseif (!is_writable($r['value'])){
- $this->PileMessage('alert',core::l10n("Le répertoire n'existe pas et ne peut être créé : "). $r['value']);
+ $this->PileMessage('alert',core::l10n("Le répertoire existe mais les droits ne sont pas suffisants: "). $r['value']);
$this->err=true;
}
- chdir('install/');
+ if(!empty($path))chdir('install/');
}
unset($type);
}
Modified: trunk/catalog/install/includes/content/core.configuration.php
===================================================================
--- trunk/catalog/install/includes/content/core.configuration.php 2011-10-31 08:02:09 UTC (rev 3851)
+++ trunk/catalog/install/includes/content/core.configuration.php 2011-10-31 11:49:06 UTC (rev 3852)
@@ -2,21 +2,82 @@
/**
@licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
@package oscss-2 <www http://www.oscss.org>
- @version 2.1.0
- @date 12/12/10, 09:15
+ @version 2.1.1
+ @date 31/10/11, 11:30
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
Ayatus <www http://www.ayatus.org>
@encode UTF-8
+
+ @brief This class use modele in includes/modele/xxx.txt
+ In the modele , use %XXXX_XXX% For replace in reel file
+
+ For call and install new file, use in this class
+
+ $res=file_get_contents(self::$modele_path.'configure.txt');
+
+ $file_contents = '<?php' ."\n";
+ $file_contents .=str_replace(self::$c_k, self::$c_v ,$res);
+ $file_contents .= "\n".'?>';
+
+
+ Tableau des Correspodnance
+ [CURRENT_VERSION] => 2.1.1
+ [CREATE_DATE] => 2011-10-31 12:00:44
+ [VAR_OSCSS_DEBUG] => true
+ [HTTP_SERVER] => http://localhost
+ [HTTPS_SERVER] =>
+ [ENABLE_SSL] => false
+ [HTTP_COOKIE_DOMAIN] =>
+ [HTTPS_COOKIE_DOMAIN] =>
+ [HTTP_COOKIE_PATH] => /workspace/oscss_test/2.1.1/08/trunk/catalog/
+ [HTTPS_COOKIE_PATH] =>
+ [HTTP_CATALOG] => /workspace/oscss_test/2.1.1/08/trunk/catalog/
+ [FS_DOCUMENT_ROOT] => /var/www/workspace/oscss_test/2.1.1/08/trunk/catalog/
+ [WS_DOCUMENT_ROOT] => /workspace/oscss_test/2.1.1/08/trunk/catalog/
+ [FS_ROOT_DOCS] => /var/www/workspace/oscss_test/2.1.1/08/trunk/Documents/
+ [WS_ADMIN] => /workspace/oscss_test/2.1.1/08/trunk/catalog/admin613
+ [FS_ADMIN] => /var/www/workspace/oscss_test/2.1.1/08/trunk/catalog/admin613
+ [HTTP_WORK_DIRECTORY] => Documents/
+ [DB_SERVER] => localhost
+ [DB_SERVER_USERNAME] => root
+ [DB_SERVER_PASSWORD] => aurelien
+ [DB_DATABASE] => oscss_211_08_innodb
+ [DB_TABLE_PREFIX] => osc_
+ [USE_PCONNECT] => false
+ [STORE_SESSIONS] =>
+ [DBMOTOR] => Mysql
+ [DBMOTOR_CHARSET] => utf8
+ [DBMOTOR_PORT] => 3306
+ [DBMOTOR_TYPE] => InnoDB
+ [SECURE_KEY] => 1d2bf0664163e0b7562f90c9f3de2518b26cac28
+
+
*/
class configuration extends core {
+ /**
+ @var
+ */
+ static protected $c_k = array() ;
+ /**
+ @var
+ */
+ static protected $c_v = array() ;
+ /**
+ @var
+ */
+ static protected $corresp = array() ;
+ /**
+ @var
+ */
+ static protected $modele_path = 'includes/modele/';
/**
- Installation des fichier de configurations
+ @brief create all linnk and var for global configuration
*/
- private function install_base_conf(){
+ private function AdjustConf(){
$http_url = parse_url($_POST['HTTP_WWW_ADDRESS']);
$http_server = $http_url['scheme'] . '://' . $http_url['host'];
@@ -44,257 +105,124 @@
$http_work_directory = $_POST['HTTP_WORK_DIRECTORY'];
if (substr($http_work_directory, -1) != '/') $http_work_directory .= '/';
+
+ $root_docs = $this->fs_document_root . $http_work_directory;
+ if (isset($_POST['ARBORESANCE']) )
+ if($_POST['ARBORESANCE'] =='vhost')
+ $root_docs = substr($this->fs_document_root,0, -(int)strlen('catalog/') ) . $http_work_directory;
+
$Key=sha1(mt_rand(10000,99999).time());
- $file_contents = '<?php' . "\n" .
- '/**'. "\n" .
- ' @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce '. "\n" .
- ' @package oscss-2 <www http://www.oscss.org>'. "\n" .
- ' @version 2.1.0'. "\n" .
- ' @date '.date("Y-m-d").''. "\n" .
- ' @author oscim <mail aur...@os...> <www http://www.oscim.fr>'. "\n" .
- ' @encode UTF-8'. "\n" .
- '*/'. "\n" .
- '' . "\n" .
+ $this->get_db_conf();
- ' /**' . "\n" .
- ' * \brief as active / inactive cache and error return' . "\n" .
- ' * @var boolean default:false' . "\n" .
- ' */' . "\n" .
- ' define(\'OSCSS_DEBUG\', true);' . "\n" .
- ' /**' . "\n" .
- ' * \brief as active view query in error requet sql' . "\n" .
- ' * @var boolean default:false' . "\n" .
- ' */' . "\n" .
- ' define(\'OSCSS_SHOW_QUERIES\', true);' . "\n" .
- ' /**' . "\n" .
- ' * \brief as active / incative garbage collector error' . "\n" .
- ' * @var boolean default: true' . "\n" .
- ' */' . "\n" .
- ' define(\'OSCSS_GARBAGE_ERROR\', true);' . "\n" .
- '' . "\n" .
- '// Define the webserver and path parameters' . "\n" .
- '// * DIR_FS_* = Filesystem directories (local/physical)' . "\n" .
- '// * DIR_WS_* = Webserver directories (virtual/URL)' . "\n" .
- ' define(\'HTTP_SERVER\', \'' . $http_server . '\'); // eg, http://localhost - should not be empty for productive servers' . "\n" .
- ' define(\'HTTPS_SERVER\', \'' . $https_server . '\'); // eg, https://localhost - should not be empty for productive servers' . "\n" .
- ' define(\'ENABLE_SSL\', ' . $enable_ssl . '); // secure webserver for checkout procedure?' . "\n" .
- ' define(\'HTTP_COOKIE_DOMAIN\', \'' . (($http_cookie_domain !='localhost')? $http_cookie_domain: '') . '\');' . "\n" .
- ' define(\'HTTPS_COOKIE_DOMAIN\', \'' . (($https_cookie_domain !='localhost')? $https_cookie_domain: '') . '\');' . "\n" .
- ' define(\'HTTP_COOKIE_PATH\', \'' . $http_cookie_path . '\');' . "\n" .
- ' define(\'HTTPS_COOKIE_PATH\', \'' . $https_cookie_path . '\');' . "\n" .
- ' define(\'DIR_WS_HTTP_CATALOG\', \'' . $http_catalog . '\');' . "\n" .
- ' define(\'DIR_WS_HTTPS_CATALOG\', \'' . $https_catalog . '\');' . "\n" .
- ' define(\'DIR_CLASSES\', \'classes/\');' . "\n" .
- ' define(\'DIR_FUNCTIONS\', \'functions/\');' . "\n" .
- ' define(\'DIR_FONTS\', \'fonts/\');' . "\n" .
- '' . "\n" .
- ' define(\'DIR_WS_IMAGES\', \'images/\');' . "\n" .
- ' define(\'DIR_WS_ICONS\', DIR_WS_IMAGES . \'icons/\');' . "\n" .
- ' define(\'DIR_WS_INCLUDES\', \'includes/\');' . "\n" .
- ' define(\'DIR_WS_BOXES\', DIR_WS_INCLUDES . \'boxes/\');' . "\n" .
- ' define(\'DIR_WS_FUNCTIONS\', DIR_WS_INCLUDES . DIR_FUNCTIONS);' . "\n" .
- ' define(\'DIR_WS_CLASSES\', DIR_WS_INCLUDES . DIR_CLASSES);' . "\n" .
- ' define(\'DIR_WS_MODULES\', DIR_WS_INCLUDES . \'modules/\');' . "\n" .
- ' define(\'DIR_WS_LANGUAGES\', DIR_WS_INCLUDES . \'languages/\');' . "\n" .
- ' define(\'DIR_WS_TRIGGERS\', DIR_WS_INCLUDES . \'triggers/\');' . "\n" .
- ' define(\'DIR_WS_DOWNLOAD_PUBLIC\', \'pub/\');' . "\n" .
- '' . "\n" .
- ' define(\'DIR_FS_CATALOG\', \'' . $this->fs_document_root . '\');' . "\n" .
- ' define(\'DIR_FS_ROOT_DOCS\', \'' . $this->fs_document_root . 'Documents/\');' . "\n" .
- ' define(\'DIR_FS_CATALOG_IMAGES\', DIR_FS_CATALOG . \'images/\');' . "\n" .
- ' define(\'DIR_FS_CATALOG_MODULES\', DIR_FS_CATALOG . \'includes/modules/\');' . "\n" .
- ' define(\'DIR_FS_CATALOG_LANGUAGES\', DIR_FS_CATALOG . \'includes/languages/\');' . "\n" .
- ' define(\'DIR_FS_CATALOG_TEMPLATE\', DIR_FS_CATALOG . \'templates/\');' . "\n" .
- ' define(\'DIR_FS_WORK\', \'' . $http_work_directory . '\');' . "\n" .
- ' define(\'DIR_FS_DOWNLOAD\', DIR_FS_CATALOG . \'download/\');' . "\n" .
- ' define(\'DIR_FS_DOWNLOAD_PUBLIC\', DIR_FS_CATALOG . \'pub/\');' . "\n" .
- '' . "\n" .
- ' define(\'DIR_FS_SESSIONS\', DIR_FS_ROOT_DOCS . \'public/sessions/\');' . "\n" .
- '' . "\n" .
- '// Template System files' . "\n" .
- ' define(\'DIR_FS_TEMPLATES\', DIR_FS_CATALOG . \'templates/\');' . "\n" .
- ' define(\'DIR_WS_TEMPLATES\', \'templates/\');' . "\n" .
- '' . "\n" .
- '// Common' . "\n" .
- ' define(\'DIR_WS_COMMON\', \'common/\');' . "\n" .
- ' define(\'DIR_WS_COMMON_FUNCTIONS\', DIR_WS_COMMON . DIR_FUNCTIONS);' . "\n" .
- ' define(\'DIR_WS_COMMON_FONTS\', DIR_WS_COMMON . DIR_FONTS);' . "\n" .
- ' define(\'DIR_WS_COMMON_CLASSES\', DIR_WS_COMMON . DIR_CLASSES);' . "\n" .
- ' define(\'DIR_WS_COMMON_IMAGES\', DIR_WS_TEMPLATES . \'layout/\');' . "\n" .
- '' . "\n" .
- '// define our database connection' . "\n" .
- ' define(\'DB_CONNECTOR\', \'mysql\');' . "\n" .
- ' define(\'DB_PORT\', \'3306\');' . "\n" .
- ' define(\'DB_CHARSET\', \'utf8\');' . "\n" .
- ' define(\'DB_SERVER\', \'' . $_POST['DB_SERVER'] . '\'); // eg, localhost - should not be empty for productive servers' . "\n" .
- ' define(\'DB_SERVER_USERNAME\', \'' . $_POST['DB_SERVER_USERNAME'] . '\');' . "\n" .
- ' define(\'DB_SERVER_PASSWORD\', \'' . $_POST['DB_SERVER_PASSWORD']. '\');' . "\n" .
- ' define(\'DB_DATABASE\', \'' . $_POST['DB_DATABASE']. '\');' . "\n" .
- ' define(\'DB_TABLE_PREFIX\', \'' . $_POST['DB_TABLE_PREFIX']. '\');' . "\n" .
- ' define(\'USE_PCONNECT\', \'' . ((isset($_POST['USE_PCONNECT']) && $_POST['USE_PCONNECT'] == 'on') ? 'true' : 'false') . '\'); // use persistent connections?' . "\n" .
- ' define(\'STORE_SESSIONS\', \'' . ((isset($_POST['STORE_SESSIONS']) && $_POST['STORE_SESSIONS'] == 'files') ? '' : 'mysql') . '\'); // leave empty \'\' for default handler or set to \'mysql\'' . "\n" .
- '' . "\n" .
- ' /**' . "\n" .
- ' @var Security key' . "\n" .
- ' @brief use by offline mode' . "\n" .
- ' */' . "\n" .
- ' $SecuKey=\''.$Key.'\';' . "\n" .
- '?>';
+ /**
+ Creation admin configure
+ */
+ $corresp = array();
+ $corresp['CURRENT_VERSION'] = '2.1.1';
+ $corresp['CREATE_DATE'] = date("Y-m-d H:i:s");
+ $corresp['VAR_OSCSS_DEBUG'] = 'true';
+ $corresp['HTTP_SERVER'] = $http_server;
+ $corresp['HTTPS_SERVER'] = $https_server;
+ $corresp['ENABLE_SSL'] = $enable_ssl;
+ $corresp['HTTP_COOKIE_DOMAIN'] = (($http_cookie_domain !='localhost')? $http_cookie_domain: '');
+ $corresp['HTTPS_COOKIE_DOMAIN'] = (($https_cookie_domain !='localhost')? $https_cookie_domain: '');
+ $corresp['HTTP_COOKIE_PATH'] = $http_cookie_path;
+ $corresp['HTTPS_COOKIE_PATH'] = $https_cookie_path;
+ $corresp['HTTP_CATALOG'] = $http_catalog;
+ $corresp['FS_DOCUMENT_ROOT'] = $this->fs_document_root;
+ $corresp['WS_DOCUMENT_ROOT'] = $this->ws_document_root;
+ $corresp['FS_ROOT_DOCS'] = $root_docs;
+ $corresp['WS_ADMIN'] = $http_catalog .$this->ws_admin_rand.'/';
+ $corresp['FS_ADMIN'] = $this->fs_document_root.$this->ws_admin_rand.'/' ;
+ $corresp['HTTP_WORK_DIRECTORY'] = $http_work_directory;
+ $corresp['DB_SERVER'] = $this->db['DB_SERVER'];
+ $corresp['DB_SERVER_USERNAME'] = $this->db['DB_SERVER_USERNAME'];
+ $corresp['DB_SERVER_PASSWORD'] = $this->db['DB_SERVER_PASSWORD'];
+ $corresp['DB_DATABASE'] = $this->db['DB_DATABASE'];
+ $corresp['DB_TABLE_PREFIX'] = $this->db['DB_TABLE_PREFIX'];
+ $corresp['USE_PCONNECT'] = ((isset($_POST['USE_PCONNECT']) && $_POST['USE_PCONNECT'] == 'on') ? 'true' : 'false');
+ $corresp['STORE_SESSIONS'] = ((isset($_POST['STORE_SESSIONS']) && $_POST['STORE_SESSIONS'] == 'files') ? '' : 'mysql');
+ $corresp['DBMOTOR'] = $this->db['DBMOTOR'];
+ $corresp['DBMOTOR_CHARSET'] = $this->db['DBMOTOR_CHARSET'];
+ $corresp['DBMOTOR_PORT'] = $this->db['DBMOTOR_PORT'];
+ $corresp['DBMOTOR_TYPE'] = $this->db['DBMOTOR_TYPE'];
+ $corresp['SECURE_KEY'] = $Key;
+// print_r($corresp);
+// exit;
+ self::$corresp = $corresp;
+ function remove(&$item2){
+ $item2 = "%".$item2."%";
+ }
+ self::$c_k=array_keys($corresp);
+ array_walk(self::$c_k, 'remove');
+
+ self::$c_v=array_values($corresp);
+
+ }
+
+
+ /**
+ Installation des fichier de configurations
+ */
+ private function install_base_conf(){
+
+
+
+
+ /**
+ @remarks adjust hierarchie folder by radio select
+ */
+ if (isset($_POST['ARBORESANCE']) ){
+
+ if($_POST['ARBORESANCE'] =='all'){
+
+ /**
+ @remarks Add htacess for secure folder and childs
+ */
+
+ }
+ elseif($_POST['ARBORESANCE'] =='vhost'){
+ /**
+ @remarks Copy to up folder
+ */
+ if(file_exists(self::$corresp['FS_DOCUMENT_ROOT']. 'Documents/')) {
+ parent::recurse_copy(self::$corresp['FS_DOCUMENT_ROOT']. 'Documents/', self::$corresp['FS_ROOT_DOCS']);
+
+ parent::recurse_delete(self::$corresp['FS_DOCUMENT_ROOT']. 'Documents/');
+ }
+ }
+ }
+
+
+
+
+ $res=file_get_contents(self::$modele_path.'configure.txt');
+
+ $file_contents = '<?php' ."\n";
+ $file_contents .=str_replace(self::$c_k, self::$c_v ,$res);
+ $file_contents .= "\n".'?>';
+
$fp = fopen($this->fs_document_root . 'includes/configure.php', 'w');
fputs($fp, $file_contents);
fclose($fp);
- $file_contents =
- '<?php' . "\n" .
- '/**'. "\n" .
- ' @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce '. "\n" .
- ' @package oscss-2 <www http://www.oscss.org>'. "\n" .
- ' @version 2.1.0'. "\n" .
- ' @date '.date("Y-m-d").''. "\n" .
- ' @author oscim <mail aur...@os...> <www http://www.oscim.fr>'. "\n" .
- ' @encode UTF-8'. "\n" .
- '*/'. "\n" .
- '' . "\n" .
- ' /**' . "\n" .
- ' * \brief as active / inactive cache and error return' . "\n" .
- ' * @var boolean default:false' . "\n" .
- ' */' . "\n" .
- ' define(\'OSCSS_DEBUG\', true);' . "\n" .
- ' /**' . "\n" .
- ' * \brief as active view query in error requet sql' . "\n" .
- ' * @var boolean default:false' . "\n" .
- ' */' . "\n" .
- ' define(\'OSCSS_SHOW_QUERIES\', true);' . "\n" .
- ' /**' . "\n" .
- ' * \brief as active / incative garbage collector error' . "\n" .
- ' * @var boolean default:true' . "\n" .
- ' */' . "\n" .
- ' define(\'OSCSS_GARBAGE_ERROR\', true);' . "\n" .
- '' . "\n" .
- '// Define the webserver and path parameters' . "\n" .
- '// * DIR_FS_* = Filesystem directories (local/physical)' . "\n" .
- '// * DIR_WS_* = Webserver directories (virtual/URL)' . "\n" .
- ' define(\'HTTP_SERVER\', \'' . $http_server . '\'); // eg, http://localhost - should not be empty for productive servers' . "\n" .
- ' define(\'HTTPS_SERVER\', \'' . $https_server . '\'); // eg, https://localhost - should not be empty for productive servers' . "\n" .
- ' define(\'HTTP_CATALOG_SERVER\', \'' . $http_server . '\');' . "\n" .
- ' define(\'HTTPS_CATALOG_SERVER\', \'' . $https_server . '\');' . "\n" .
- ' define(\'ENABLE_SSL\', ' . $enable_ssl . ');' . "\n" .
- ' define(\'ENABLE_SSL_CATALOG\', \'' . $enable_ssl . '\'); // secure webserver for catalog module' . "\n" .
- ' define(\'DIR_FS_DOCUMENT_ROOT\', \'' . $this->fs_document_root . '\'); // where the pages are located on the server' . "\n" .
- ' define(\'DIR_WS_ADMIN\', \'' . $http_catalog .$this->ws_admin_rand. '/\'); // absolute path required' . "\n" .
- ' define(\'DIR_FS_ADMIN\', \'' . $this->fs_document_root.$this->ws_admin_rand . '/\'); // absolute pate required' . "\n" .
- ' define(\'DIR_WS_CATALOG\', \'' . $http_catalog . '\'); // absolute path required' . "\n" .
- ' define(\'DIR_WS_HTTP_CATALOG\',DIR_WS_CATALOG);// compatibilité SEO' . "\n" .
- ' define(\'DIR_WS_HTTPS_CATALOG\', \'' . $https_catalog . '\');' . "\n" .
- ' define(\'DIR_FS_CATALOG\', \'' . $this->fs_document_root . '\'); // absolute path required' . "\n" .
- ' define(\'DIR_FS_ROOT_DOCS\', \'' . $this->fs_document_root . 'Documents/\');' . "\n" .
- ' define(\'DIR_CLASSES\', \'classes/\');' . "\n" .
- ' define(\'DIR_FUNCTIONS\', \'functions/\');' . "\n" .
- ' define(\'DIR_FONTS\', \'fonts/\');' . "\n" .
- ' define(\'DIR_LOGS\', \'logs/\');' . "\n" .
- ' define(\'DIR_CACHE\', \'cache/\');' . "\n" .
- '' . "\n" .
- ' define(\'DIR_WS_IMAGES\', \'images/\');' . "\n" .
- ' define(\'DIR_WS_ICONS\', DIR_WS_IMAGES . \'icons/\');' . "\n" .
- ' define(\'DIR_WS_CATALOG_IMAGES\', DIR_WS_CATALOG . \'images/\');' . "\n" .
- ' define(\'DIR_WS_INCLUDES\', \'includes/\');' . "\n" .
- ' define(\'DIR_WS_BOXES\', DIR_WS_INCLUDES . \'boxes/\');' . "\n" .
- ' define(\'DIR_WS_DOWNLOAD\', \'download/\');' . "\n" .
- ' define(\'DIR_WS_FUNCTIONS\', DIR_WS_INCLUDES . DIR_FUNCTIONS);' . "\n" .
- ' define(\'DIR_WS_CLASSES\', DIR_WS_INCLUDES . DIR_CLASSES);' . "\n" .
- ' define(\'DIR_WS_MODULES\', DIR_WS_INCLUDES . \'modules/\');' . "\n" .
- ' define(\'DIR_WS_LIB\', DIR_WS_INCLUDES . \'lib/\');' . "\n" .
- ' define(\'DIR_WS_PLUGINS\', DIR_WS_INCLUDES . \'plugins/\');' . "\n" .
- ' define(\'DIR_WS_FONTS\', DIR_WS_INCLUDES . DIR_FONTS);' . "\n" .
- ' define(\'DIR_WS_JS\', DIR_WS_INCLUDES . \'javascript/\');' . "\n" .
- ' define(\'DIR_WS_WIDGET\', DIR_WS_INCLUDES . \'widget/\');' . "\n" .
- ' define(\'DIR_WS_LANGUAGES\', DIR_WS_INCLUDES . \'languages/\');' . "\n" .
- ' define(\'DIR_WS_CATALOG_LANGUAGES\', DIR_WS_CATALOG . \'includes/languages/\');' . "\n" .
- '' . "\n" .
- ' define(\'DIR_FS_CATALOG_LANGUAGES\', DIR_FS_CATALOG . \'includes/languages/\');' . "\n" .
- ' define(\'DIR_FS_CATALOG_IMAGES\', DIR_FS_CATALOG . \'images/\');' . "\n" .
- ' define(\'DIR_FS_CATALOG_MODULES\', DIR_FS_CATALOG . \'includes/modules/\');' . "\n" .
- '' . "\n" .
- ' define(\'DIR_FS_BACKUP\', DIR_FS_ROOT_DOCS . \'admin/backups/\');' . "\n" .
- ' define(\'DIR_FS_WORK\', DIR_FS_ROOT_DOCS . \'admin/public/oscss_data/\');' . "\n" .
- ' define(\'DIR_FS_SESSIONS\', DIR_FS_ROOT_DOCS . \'admin/sessions/\');' . "\n" .
- ' define(\'DIR_FS_CIP\', DIR_FS_ROOT_DOCS . \'admin/contributions/\');' . "\n" .
- '' . "\n" .
- '// Template System files' . "\n" .
- ' define(\'DIR_FS_TEMPLATES\', DIR_FS_CATALOG . \'templates/\');' . "\n" .
- ' define(\'DIR_WS_TEMPLATES\', DIR_WS_CATALOG . \'templates/\');' . "\n" .
- ' define(\'DIR_WS_CATALOG_DOWNLOAD\', DIR_WS_CATALOG . \'download/\');' . "\n" .
- '' . "\n" .
- '// Common' . "\n" .
- ' define(\'DIR_WS_COMMON\', \'common/\');' . "\n" .
- ' define(\'DIR_WS_COMMON_FUNCTIONS\', DIR_WS_COMMON . DIR_FUNCTIONS);' . "\n" .
- ' define(\'DIR_WS_COMMON_FONTS\', DIR_WS_COMMON . DIR_FONTS);' . "\n" .
- ' define(\'DIR_WS_COMMON_CLASSES\', DIR_WS_COMMON . DIR_CLASSES);' . "\n" .
- ' define(\'DIR_WS_COMMON_IMAGES\', DIR_WS_TEMPLATES . \'layout/\');' . "\n" .
- '' . "\n" .
- '// define our database connection' . "\n" .
- ' define(\'DB_CONNECTOR\', \'mysql\');' . "\n" .
- ' define(\'DB_PORT\', \'3306\');' . "\n" .
- ' define(\'DB_CHARSET\', \'utf8\');' . "\n" .
- ' define(\'DB_SERVER\', \'' . $_POST['DB_SERVER'] . '\'); // eg, localhost - should not be empty for productive servers' . "\n" .
- ' define(\'DB_SERVER_USERNAME\', \'' . $_POST['DB_SERVER_USERNAME'] . '\');' . "\n" .
- ' define(\'DB_SERVER_PASSWORD\', \'' . $_POST['DB_SERVER_PASSWORD']. '\');' . "\n" .
- ' define(\'DB_DATABASE\', \'' . $_POST['DB_DATABASE']. '\');' . "\n" .
- ' define(\'DB_TABLE_PREFIX\', \'' . $_POST['DB_TABLE_PREFIX']. '\');' . "\n" .
- ' define(\'USE_PCONNECT\', \'' . ((isset($_POST['USE_PCONNECT']) && $_POST['USE_PCONNECT'] == 'true') ? 'true' : 'false') . '\'); // use persisstent connections?' . "\n" .
- ' define(\'STORE_SESSIONS\', \'mysql\'); // leave empty \'\' for default handler or set to \'mysql\'' . "\n" .
+ $res=file_get_contents(self::$modele_path.'admin_configure.txt');
+ $file_contents = '<?php' ."\n";
+ $file_contents .=str_replace(self::$c_k, self::$c_v ,$res);
+ $file_contents .= "\n".'?>';
- ''."\n".
- ' /**' . "\n" .
- ' * @brief method login active, separate by ;. the method is call in sort ' . "\n" .
- ' * @example $conf[\'login\']=\'oscss;openid\';' . "\n" .
- ' * @var $conf->login string ' . "\n" .
- ' */' . "\n" .
- ' $conf[\'login\']=\'oscss;\';' . "\n" .
- '' . "\n" .
- ' /**' . "\n" .
- ' @var Security key' . "\n" .
- ' @brief use by offline mode' . "\n" .
- ' */' . "\n" .
- ' $SecuKey=\''.$Key.'\';' . "\n" .
- '?>';
-
-
$fp = fopen($this->fs_document_root .$this->ws_admin_rand.'/includes/configure.php', 'w');
fputs($fp, $file_contents);
fclose($fp);
- $file_contents =
- '' . "\n" .
- '# @licence GPL 2005-'.date('Y').' The osCSS developers - osCSS Open Source E-commerce '. "\n" .
- '# @package oscss-2 <www http://www.oscss.org>'. "\n" .
- '# @version 2.1.0'. "\n" .
- '# @date '.date("Y-m-d").''. "\n" .
- '# @author oscim <mail aur...@os...> <www http://www.oscim.fr>'. "\n" .
- '# @encode UTF-8'. "\n" .
- '# Default OsCss exclusions' . "\n" .
- 'User-agent: *' . "\n" .
- 'Allow: /' . "\n" .
- ' Disallow: /admin*/' . "\n" .
- ' Disallow: /common/' . "\n" .
- ' Disallow: /download/' . "\n" .
- ' Disallow: /ext/' . "\n" .
- ' Disallow: /images/' . "\n" .
- ' Disallow: /includes/' . "\n" .
- ' Disallow: /install/' . "\n" .
- ' Disallow: /oscss_data/' . "\n" .
- ' Disallow: /sessions/' . "\n" .
- ' Disallow: /templates/' . "\n" .
- ' Disallow: /pub/' . "\n" .
- '' . "\n" .
- '# For sitemaps.xml autodiscovery.' . "\n" .
- ' Sitemap:http://www.monsite.com/sitemapindex.xml' . "\n" .
- '' . "\n";
+ $res=file_get_contents(self::$modele_path.'robot.txt');
+ $file_contents =str_replace(self::$c_k, self::$c_v ,$res);
+
$fp = fopen($this->fs_document_root . 'robots.txt', 'w');
fputs($fp, $file_contents);
fclose($fp);
@@ -311,191 +239,21 @@
if(file_exists($this->fs_document_root.'admin'))rename($this->fs_document_root.'admin',$this->fs_document_root.$this->ws_admin_rand);
}
elseif((isset($_POST['install']['rewrite']) && $_POST['install']['rewrite'] =='on' ) ) {
- /* Ecriture du htaccess admin */
- $file_contents =
- '# $Id: .htaccess,v 2.0 '.date("y.m.d").' oscim Exp $' . "\n" .
- '# <Directory "/usr/local/apache/htdocs">' . "\n" .
- '# AllowOverride Options' . "\n" .
- '# </Directory>' . "\n" .
- '# The following makes adjustments to the SSL protocol for Internet' . "\n" .
- '# Explorer browsers' . "\n" .
- '# <IfModule mod_setenvif.c>' . "\n" .
- '# <IfDefine SSL>' . "\n" .
- '# SetEnvIf User-Agent ".*MSIE.*" \ ' . "\n" .
- '# nokeepalive ssl-unclean-shutdown \ ' . "\n" .
- '# downgrade-1.0 force-response-1.0' . "\n" .
- '# </IfDefine>' . "\n" .
- '# </IfModule>' . "\n" .
- '# Fix certain PHP values' . "\n" .
- ' AddDefaultCharset UTF-8' . "\n" .
- '# FIX' . "\n" .
- '<IfModule mod_php5.c>' . "\n" .
- ' php_flag register_long_arrays Off' . "\n" .
- ' php_value register_globals off' . "\n" .
- '</IfModule>' . "\n" .
- '<IfModule mod_rewrite.c>' . "\n" .
- ' RewriteEngine on' . "\n" .
- ' RewriteBase '.$this->ws_document_root.$this->ws_admin_rand.'/' . "\n" .
- '' . "\n" .
- '# comment this line , if you not execute cron' . "\n" .
- ' RewriteRule (.*cronfile\.ph.*)$ $1 [L]' . "\n" .
- '' . "\n" .
- ' RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]' . "\n" .
- ' RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]' . "\n" .
- ' RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})' . "\n" .
- ' RewriteRule ^(.*)$ index.php [F,L]' . "\n" .
- ' RewriteRule ^$ index.php?page_admin=index [L]' . "\n" .
- ' RewriteRule ^rss.php rss.php?%{QUERY_STRING} [L]' . "\n" .
- '' . "\n" .
- ' RewriteRule ^attributeManager/attributeManager/(.*)$ attributeManager/$1 [L]' . "\n" .
- ' RewriteRule ^(attributeManager/.*)$ $1 [L]' . "\n" .
- ' RewriteRule (.*plugins/.*)$ $1 [L]' . "\n" .
- ' RewriteRule (.*editeur/.*)$ $1 [L]' . "\n" .
- ' RewriteRule (.*template/.*)$ $1 [L]' . "\n" .
- ' RewriteRule (.*images/.*)$ $1 [L]' . "\n" .
- ' RewriteRule (.*includes/.*)$ $1 [L]' . "\n" .
- ' RewriteRule (.*\.css)$ $1[L]' . "\n" .
+ $res=file_get_contents(self::$modele_path.'admin_htaccess.txt');
+ $file_contents =str_replace(self::$c_k, self::$c_v ,$res);
- ' RewriteRule (.*logoff\.ph.*)$ $1 [L]' . "\n" .
- ' RewriteRule (.*login\.ph.*)$ $1 [L]' . "\n" .
- ' RewriteRule (.*document\.ph.*)$ $1 [L]' . "\n" .
- ' RewriteRule (.*password_forgotten\.ph.*)$ $1 [L]' . "\n" .
- ' RewriteRule (.*popup_image\.ph.*)$ $1 [L]' . "\n" .
- ' RewriteRule (.*login\.ph.*)$ $1 [L]' . "\n" .
- ' RewriteRule ([0-9A-Za-z_&=-]*)(.php)?(.*)$ index.php?page_admin=$1&%{QUERY_STRING} [L]' . "\n" .
-
- ' ErrorDocument 401 /' . "\n" .
- ' ErrorDocument 402 /' . "\n" .
- ' ErrorDocument 403 /' . "\n" .
- ' ErrorDocument 404 /' . "\n" .
- ' ErrorDocument 500 /' . "\n" .
- '</IfModule>' . "\n";
-
$fp = fopen($this->fs_document_root .$this->ws_admin_rand.'/.htaccess', 'w');
fputs($fp, $file_contents);
fclose($fp);
- /* Ecriture du htaccess */
- $file_contents =
- '# $Id: .htaccess,v 2.0 '.date("y.m.d").' oscim Exp $' . "\n" .
- '# <Directory "/usr/local/apache/htdocs">' . "\n" .
- '# AllowOverride Options' . "\n" .
- '# </Directory>' . "\n" .
- '# The following makes adjustments to the SSL protocol for Internet' . "\n" .
- '# Explorer browsers' . "\n" .
- '# <IfModule mod_setenvif.c>' . "\n" .
- '# <IfDefine SSL>' . "\n" .
- '# SetEnvIf User-Agent ".*MSIE.*" \ ' . "\n" .
- '# nokeepalive ssl-unclean-shutdown \ ' . "\n" .
- '# downgrade-1.0 force-response-1.0' . "\n" .
- '# </IfDefine>' . "\n" .
- '# </IfModule>' . "\n" .
- '# Fix certain PHP values' . "\n" .
- '## element pur hebergement mutulaiser, a commenter si inutile' . "\n" .
- 'SetEnv REGISTER_GLOBALS 0' . "\n" .
- 'SetEnv MAGIC_QUOTES 1' . "\n" .
- 'SetEnv PHP_VER 5' . "\n" .
- '' . "\n" .
- '# force default charset' . "\n" .
- ' AddDefaultCharset UTF-8' . "\n" .
- '# FIX' . "\n" .
- '<IfModule mod_php5.c>' . "\n" .
- ' php_flag register_long_arrays Off' . "\n" .
- ' php_value register_globals off' . "\n" .
- '</IfModule>' . "\n" .
- '' . "\n" .
- '<IfModule mod_rewrite.c>' . "\n" .
- '' . "\n" .
- '# 404 error ' . "\n" .
- ' ErrorDocument 404 /404.php' . "\n" .
- '' . "\n" .
- ' RewriteEngine on' . "\n" .
- ' RewriteBase '.$this->ws_document_root.'' . "\n" .
- '' . "\n" .
- ' RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]' . "\n" .
- ' RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]' . "\n" .
- ' RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})' . "\n" .
- ' RewriteRule ^(.*)$ index.php [F,L]' . "\n" .
- '' . "\n" .
- '# rule for 404 page ' . "\n" .
- ' RewriteRule ^404.php$ index.php?_ID=404.php&%{QUERY_STRING}' . "\n" .
- '' . "\n" .
- '##newsletter trace opened email ' . "\n" .
- ' RewriteRule n-([0-9]+)-([0-9]+).jpg newsletters.php?mode=opened&newsID=$1&cID=$2 [L,QSA]' . "\n" .
- '' . "\n" .
- '# DEB Sans rewrite, placer des fichier du même nom a la racine' . "\n" .
- '# DEB Retrocompatibiliter' . "\n" .
- ' RewriteRule ^conditions.php$ index.php?content=3&%{QUERY_STRING}' . "\n" .
- ' RewriteRule ^contact.php$ index.php?_ID=contact.php&%{QUERY_STRING}' . "\n" .
- ' RewriteRule ^cookie_usage.php$ index.php?_ID=cookie_usage.php&%{QUERY_STRING}' . "\n" .
- ' RewriteRule ^info_shopping_cart.php$ index.php?_ID=info_shopping_cart.php&%{QUERY_STRING}' . "\n" .
- ' RewriteRule ^tell_a_friend.php$ index.php?_ID=tell_a_friend.php&%{QUERY_STRING}' . "\n" .
- ' RewriteRule ^featured_products.php$ index.php?_ID=featured_products.php&%{QUERY_STRING}' . "\n" .
- ' RewriteRule ^template.php$ index.php?_ID=template.php&%{QUERY_STRING}' . "\n" .
- ' RewriteRule ^privacy.php$ index.php?_ID=privacy.php&%{QUERY_STRING}' . "\n" .
- ' RewriteRule ^listing_best_sellers.php$ index.php?_ID=listing_best_sellers.php&%{QUERY_STRING}' . "\n" .
- ' RewriteRule ^listing_products_new.php$ index.php?_ID=listing_products_new.php&%{QUERY_STRING}' . "\n" .
- ' RewriteRule ^listing_small_price.php$ index.php?_ID=listing_small_price.php&%{QUERY_STRING}' . "\n" .
- ' RewriteRule ^listing_specials.php$ index.php?_ID=listing_specials.php&%{QUERY_STRING}' . "\n" .
- ' RewriteRule ^search_help.php$ index.php?_ID=search_help.php&%{QUERY_STRING}' . "\n" .
- ' RewriteRule ^ssl_check.php$ index.php?_ID=ssl_check.php&%{QUERY_STRING}' . "\n" .
- ' RewriteRule ^shopping_cart.php(.{0,})$ index.php?_ID=shopping_cart.php&%{QUERY_STRING}' . "\n" .
- ' RewriteRule ^shipping.php(.{0,})$ index.php?_ID=shipping.php&%{QUERY_STRING}' . "\n" .
- ' RewriteRule ^sitemap.php$ index.php?_ID=sitemap.php&%{QUERY_STRING}' . "\n" .
- ' RewriteRule ^remove_cart.php$ index.php?_ID=remove_cart.php&%{QUERY_STRING}' . "\n" .
- ' RewriteRule ^product_reviews.php$ index.php?_ID=listing_reviews.php&%{QUERY_STRING}' . "\n" .
- ' RewriteRule ^product_info.php$ index.php?products_id=$2&%{QUERY_STRING}' . "\n" .
- ' RewriteRule ^home.php?(.*)$ index.php?content=$1&%{QUERY_STRING}' . "\n" .
+ $res=file_get_contents(self::$modele_path.'htaccess.txt');
+ $file_contents =str_replace(self::$c_k, self::$c_v ,$res);
- ' RewriteRule ^account_([a-z_]*).php$ account.php?action=$1&%{QUERY_STRING}' . "\n" .
- ' RewriteRule ^address_([a-z_]*).php$ account.php?aca_mod=address_book&aca_type=account&aca_action=display_view&%{QUERY_STRING}' . "\n" .
- '' . "\n" .
- '# FIN Sans rewrite, placer des fichier du même nom a la racine' . "\n" .
- '# Prise en charge des appels vers les vidéo' . "\n" .
- '# RewriteRule ^playlist:([0-9]*)::type:([a-z]*)::pID:([0-9]*)::ext:.flv$ counter.php?action_type=$2&action_class=portfolio&method=counter_media&ppID=$1&products_id=$3 [L]' . "\n" .
- '# RewriteRule ^playlist:([0-9]*)::type:([a-z]*)::pID:([0-9]*)::ext:.mp3 counter.php?action_type=$2&action_class=portfolio&method=counter_media&ppID=$1&products_id=$3 [L]' . "\n" .
- '' . "\n" .
- '' . "\n" .
- '# MODE SEO Rewrite'. "\n" .
- ' RewriteRule ^(.*)-p-(.*).html$ index.php?products_id=$2&%{QUERY_STRING}' . "\n" .
- ' RewriteRule ^(.*)-c-(.*).html$ index.php?cPath=$2&%{QUERY_STRING}' . "\n" .
- ' RewriteRule ^(.*)-b-(.*).html$ index.php?content=$2&%{QUERY_STRING}' . "\n" .
- ' RewriteRule ^(.*)-m-(.*).html$ index.php?manufacturers_id=$2&%{QUERY_STRING}' . "\n" .
- ' RewriteRule ^(.*)-pi-(.*).html$ popup_image.php?pID=$2&%{QUERY_STRING}' . "\n" .
- ' RewriteRule ^(.*)-t-(.*).html$ index.php?content=$2&%{QUERY_STRING}' . "\n" .
- '# RewriteRule ^(.*)-pr-(.*).html$ product_reviews.php?products_id=$2&%{QUERY_STRING}' . "\n" .
- ' RewriteRule ^(.*)-pr-(.*).html$ index.php?_ID=listing_reviews.php&products_id=$2&%{QUERY_STRING}' . "\n" .
- '# RewriteRule ^(.*)-pri-(.*).html$ product_reviews_info.php?products_id=$2&%{QUERY_STRING}' . "\n" .
- ' RewriteRule ^(.*)-i-(.*).html$ information.php?info_id=$2&%{QUERY_STRING}' . "\n" .
- ' RewriteRule ^(.*)-d-(.*).html$ $2.php?divers=$2&%{QUERY_STRING}' . "\n" .
- ' RewriteRule ^(.*)-l-(.*).html$ $2.php?lID=$2&%{QUERY_STRING} [L]' . "\n" .
- ' RewriteRule ^(.*)-u-(.*).html$ index.php?customers_id=$2&%{QUERY_STRING} [L]' . "\n" .
- '' . "\n" .
- '# MODE SEO Rewrite-mode2 '. "\n" .
- ' RewriteRule ^p/([0-9]*)/(.*).html$ index.php?products_id=$1&%{QUERY_STRING} [L]' . "\n" .
- ' RewriteRule ^c/(.*)/(.*).html$ index.php?cPath=$1&%{QUERY_STRING} [L]' . "\n" .
- ' RewriteRule ^b/(.*)/(.*).html$ index.php?content=$1&%{QUERY_STRING} [L]' . "\n" .
- ' RewriteRule ^m/(.*)/(.*).html$ index.php?manufacturers_id=$1&%{QUERY_STRING} [L]' . "\n" .
- ' RewriteRule ^pi/(.*)/(.*).html$ popup_image.php?pID=$1&%{QUERY_STRING} [L]' . "\n" .
- ' RewriteRule ^t/(.*)/(.*).html$ index.php?content=$1%{QUERY_STRING} [L]' . "\n" .
- ' RewriteRule ^pr/(.*)/(.*).html$ index.php?_ID=listing_reviews.php&products_id=$1&%{QUERY_STRING} [L]' . "\n" .
- ' RewriteRule ^i/(.*)/(.*).html$ information.php?info_id=$1&%{QUERY_STRING} [L]' . "\n" .
- ' RewriteRule ^d/(.*)/(.*).html$ $1.php?divers=$1.php&%{QUERY_STRING} [L]' . "\n" .
- ' RewriteRule ^l/(.*)/(.*).html$ $1.php?lID=$1&%{QUERY_STRING} [L]' . "\n" .
- ' RewriteRule ^u/(.*)/(.*).html$ index.php?customers_id=$1&%{QUERY_STRING} [L]' . "\n" .
-
- ' ErrorDocument 401 /' . "\n" .
- ' ErrorDocument 402 /' . "\n" .
- ' ErrorDocument 403 /' . "\n" .
- ' ErrorDocument 404 /' . "\n" .
- ' ErrorDocument 500 /' . "\n" .
- '</IfModule>' . "\n";
-
$fp = fopen($this->fs_document_root . '.htaccess', 'w');
fputs($fp, $file_contents);
fclose($fp);
@@ -511,18 +269,12 @@
private function install_extents(){
$file='includes/tables_files_modules.php';
- $file_contents='<?php' . "\n" .
- '/**' . "\n" .
- ' @licence GPL 2005-'.date('Y').' The osCSS developers - osCSS Open Source E-commerce' . "\n" .
- ' @package oscss-2 <www http://www.oscss.org>' . "\n" .
- ' @date '.date("Y/m/d").'' . "\n" .
- ' @author oscim <mail aur...@os...> <www http://www.oscim.fr>' . "\n" .
- ' @encode UTF-8' . "\n" .
- ' Placer ici Vos definition de table et filename pour les elements modulaire, extensions et plugins.' . "\n" .
- 'ex:' . "\n" .
- ' define(\'TABLE_EPF\', DB_TABLE_PREFIX .\'products_virtual\');' . "\n" .
- '*/' . "\n" .
- '?>';
+ $res=file_get_contents(self::$modele_path.'tables_files_modules.txt');
+
+ $file_contents = '<?php' ."\n";
+ $file_contents .=str_replace(self::$c_k, self::$c_v ,$res);
+ $file_contents .= "\n".'?>';
+
$fp = fopen($this->fs_document_root .$this->ws_admin_rand.'/'.$file, 'w');
fputs($fp, $file_contents);
fclose($fp);
@@ -649,6 +401,9 @@
*/
+
+
+
/**
Email admin
*/
@@ -748,6 +503,9 @@
$this->get_fs_document_root();
$this->get_server_conf();
$this->get_db_conf();
+
+
+
if(file_exists($this->fs_document_root.'admin')) rename($this->fs_document_root.'admin',$this->fs_document_root.$this->ws_admin_rand);
define('TABLE_CONFIGURATION', $this->db['DB_TABLE_PREFIX'].'configuration');
@@ -757,7 +515,9 @@
require($this->fs_document_root.$this->ws_admin_rand.'/includes/functions/lib.configuration.php');
+ $this->AdjustConf();
+
//! ecriture des fichier de conf
$this->install_base_conf();
$this->install_rewrite();
Modified: trunk/catalog/install/includes/content/core.modes.php
===================================================================
--- trunk/catalog/install/includes/content/core.modes.php 2011-10-31 08:02:09 UTC (rev 3851)
+++ trunk/catalog/install/includes/content/core.modes.php 2011-10-31 11:49:06 UTC (rev 3852)
@@ -86,9 +86,9 @@
.'</p>'."\n";
echo '<p class="smallDesc">'."\n"
- .'<label>'.core::l10n('Répertoire de travail:').'</label>'."\n"
- .osc_draw_input_field('HTTP_WORK_DIRECTORY', '', $this->fs_document_root . 'oscss_data')."\n"
- .core::draw_help('httpWork', core::l10n("Ce chemin peut être en dehors du répertoire HTML public, il est même recommandé d'utiliser un répertoire qui ne soit pas accessible par le web. Pour des raisons de sécurité n'utilisez pas le répertoire /tmp/ .")/*, core::l10n('Le chemin du repertoire ou osCSS stockeras ses informations (cache, sessions)')*/)."\n"
+ .'<label>'.core::l10n('Nom du répertoire des dossier inscriptibles:').'</label>'."\n"
+ .osc_draw_input_field('HTTP_WORK_DIRECTORY', '', 'Documents')."\n"
+ .core::draw_help('httpWork', core::l10n("y seront placé tous les fichier est dossier necessaire au fonctionnement.")/*, core::l10n('Le chemin du repertoire ou osCSS stockeras ses informations (cache, sessions)')*/)."\n"
.'</p>'."\n";
echo '<p class="smallDesc">'."\n"
@@ -217,11 +217,11 @@
.'<label>'.core::l10n('Choix de l\'arboresance des dossiers inscriptibles').'</label>'."\n"
.'<ul>'
.'<li>'
- .osc_draw_radio_field('ARBORESANCE', '1', ( (!isset($_POST['ARBORESANCE']) || $_POST['ARBORESANCE'] == '1')? true : false) )."\n" . core::l10n('Classique')
+ .osc_draw_radio_field('ARBORESANCE', '1', 'all',( (!isset($_POST['ARBORESANCE']) || $_POST['ARBORESANCE'] == '1')? true : false) )."\n" . core::l10n('Classique')
.core::draw_help('httpSSL', core::l10n('Un dossier contient l\'ensemble des donnée de l\'application')/*, core::l10n('Activer les connections SSL:')*/)."\n"
.'</li>'
.'<li>'
- .osc_draw_radio_field('ARBORESANCE', '2', ( (isset($_POST['ARBORESANCE'])&& $_POST['ARBORESANCE'] == '2')? true : false) )."\n" . core::l10n('Vhost')
+ .osc_draw_radio_field('ARBORESANCE', '2', 'vhost', ( (isset($_POST['ARBORESANCE'])&& $_POST['ARBORESANCE'] == '2')? true : false) )."\n" . core::l10n('Vhost')
.core::draw_help('httpSSL', core::l10n('Le dossier des données et document est placé au dessus du dossier de l\'application. modificatio du vhost ou acces au dossier superieur')/*, core::l10n('Activer les connections SSL:')*/)."\n"
.'</li>'
.'</ul>'
@@ -297,6 +297,7 @@
Callback
*/
function exe_prev(){
+
}
function draw(){
Added: trunk/catalog/install/includes/modele/admin_configure.txt
===================================================================
--- trunk/catalog/install/includes/modele/admin_configure.txt (rev 0)
+++ trunk/catalog/install/includes/modele/admin_configure.txt 2011-10-31 11:49:06 UTC (rev 3852)
@@ -0,0 +1,118 @@
+ /**
+ @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
+ @package oscss-2 <www http://www.oscss.org>
+ @version %CURRENT_VERSION%
+ @date %CREATE_DATE%
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+ */
+
+ /**
+ * \brief as active / inactive cache and error return
+ * @var boolean default:false
+ */
+ define('OSCSS_DEBUG', %VAR_OSCSS_DEBUG% );
+ /**
+ * \brief as active view query in error requet sql
+ * @var boolean default:false
+ */
+ define('OSCSS_SHOW_QUERIES', true);
+ /**
+ * \brief as active / incative garbage collector error
+ * @var boolean default:true
+ */
+ define('OSCSS_GARBAGE_ERROR', true);
+
+// Define the webserver and path parameters
+// * DIR_FS_* = Filesystem directories (local/physical)
+// * DIR_WS_* = Webserver directories (virtual/URL)
+ define('HTTP_SERVER', '%HTTP_SERVER%'); // eg, http://localhost - should not be empty for productive servers
+ define('HTTPS_SERVER', '%HTTPS_SERVER%'); // eg, https://localhost - should not be empty for productive servers
+ define('HTTP_CATALOG_SERVER', '%HTTP_SERVER%');
+ define('HTTPS_CATALOG_SERVER', '%HTTPS_SERVER%');
+
+ define('ENABLE_SSL', %ENABLE_SSL% );
+ define('ENABLE_SSL_CATALOG', %ENABLE_SSL%); // secure webserver for catalog module
+
+ define('DIR_FS_DOCUMENT_ROOT', '%FS_DOCUMENT_ROOT%'); // where the pages are located on the server
+ define('DIR_FS_ADMIN', '%FS_ADMIN%'); // absolute pate required
+ define('DIR_FS_CATALOG', '%FS_DOCUMENT_ROOT%'); // absolute path required
+ define('DIR_FS_ROOT_DOCS', '%FS_ROOT_DOCS%');
+
+ define('DIR_WS_ADMIN', '%WS_ADMIN%'); // absolute path required
+ define('DIR_WS_CATALOG', '%HTTP_CATALOG%'); // absolute path required
+ define('DIR_WS_HTTP_CATALOG',DIR_WS_CATALOG);// compatibilité SEO
+ define('DIR_WS_HTTPS_CATALOG', '%HTTPS_CATALOG%');
+
+
+ define('DIR_CLASSES', 'classes/');
+ define('DIR_FUNCTIONS', 'functions/');
+ define('DIR_FONTS', 'fonts/');
+ define('DIR_LOGS', 'logs/');
+ define('DIR_CACHE', 'cache/');
+
+ define('DIR_WS_IMAGES', 'images/');
+ define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
+ define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/');
+ define('DIR_WS_INCLUDES', 'includes/');
+ define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
+ define('DIR_WS_DOWNLOAD', 'download/');
+
+ define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . DIR_FUNCTIONS);
+ define('DIR_WS_CLASSES', DIR_WS_INCLUDES . DIR_CLASSES);
+ define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
+ define('DIR_WS_LIB', DIR_WS_INCLUDES . 'lib/');
+ define('DIR_WS_PLUGINS', DIR_WS_INCLUDES . 'plugins/');
+ define('DIR_WS_FONTS', DIR_WS_INCLUDES . DIR_FONTS);
+ define('DIR_WS_JS', DIR_WS_INCLUDES . 'javascript/');
+ define('DIR_WS_WIDGET', DIR_WS_INCLUDES . 'widget/');
+ define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
+ define('DIR_WS_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes/languages/');
+ define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/');
+ define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');
+ define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');
+
+// Documents
+ define('DIR_FS_BACKUP', DIR_FS_ROOT_DOCS . 'admin/backups/');
+ define('DIR_FS_WORK', DIR_FS_ROOT_DOCS . 'admin/public/oscss_data/');
+ define('DIR_FS_SESSIONS', DIR_FS_ROOT_DOCS . 'admin/sessions/');
+ define('DIR_FS_CIP', DIR_FS_ROOT_DOCS . 'admin/contributions/');
+
+// Template System files
+ define('DIR_FS_TEMPLATES', DIR_FS_CATALOG . 'templates/');
+ define('DIR_WS_TEMPLATES', DIR_WS_CATALOG . 'templates/');
+ define('DIR_WS_CATALOG_DOWNLOAD', DIR_WS_CATALOG . 'download/');
+
+// Common
+ define('DIR_WS_COMMON', 'common/');
+ define('DIR_WS_COMMON_FUNCTIONS', DIR_WS_COMMON . DIR_FUNCTIONS);
+ define('DIR_WS_COMMON_FONTS', DIR_WS_COMMON . DIR_FONTS);
+ define('DIR_WS_COMMON_CLASSES', DIR_WS_COMMON . DIR_CLASSES);
+ define('DIR_WS_COMMON_IMAGES', DIR_WS_TEMPLATES . 'layout/');
+
+// define our database connection
+ define('DB_CONNECTOR', '%DBMOTOR%');
+ define('DB_MOTOR', '%DBMOTOR%');
+ define('DB_MOTOR_TYPE', '%DBMOTOR_TYPE%');
+ define('DB_PORT', '%DB_PORT%');
+ define('DB_CHARSET', '%DB_CHARSET%');
+ define('DB_SERVER', '%DB_SERVER%'); // eg, localhost - should not be empty for productive servers
+ define('DB_SERVER_USERNAME', '%DB_SERVER_USERNAME%');
+ define('DB_SERVER_PASSWORD', '%DB_SERVER_PASSWORD%');
+ define('DB_DATABASE', '%DB_DATABASE%');
+ define('DB_TABLE_PREFIX', '%DB_TABLE_PREFIX%');
+ define('USE_PCONNECT', '%USE_PCONNECT%'); // use persisstent connections?
+ define('STORE_SESSIONS', '%STORE_SESSIONS%'); // leave empty '' for default handler or set to 'mysql'
+
+ /**
+ * @brief method login active, separate by ;. the method is call in sort
+ * @example $conf['login']='oscss;openid';
+ * @var $conf->login string
+ */
+ $conf['login']='oscss;';
+
+ /**
+ @var Security key
+ @brief use by offline mode
+ */
+ $SecuKey='%SECURE_KEY%';
Added: trunk/catalog/install/includes/modele/admin_htaccess.txt
===================================================================
--- trunk/catalog/install/includes/modele/admin_htaccess.txt (rev 0)
+++ trunk/catalog/install/includes/modele/admin_htaccess.txt 2011-10-31 11:49:06 UTC (rev 3852)
@@ -0,0 +1,83 @@
+# licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
+# package oscss-2 <www http://www.oscss.org>
+# version %CURRENT_VERSION%
+# date %CREATE_DATE%
+# author oscim <mail aur...@os...> <www http://www.oscim.fr>
+# encode UTF-8
+# Default OsCss Htaccess
+
+
+
+# <Directory "/usr/local/apache/htdocs">
+# AllowOverride Options
+# </Directory>
+# The following makes adjustments to the SSL protocol for Internet
+# Explorer browsers
+# <IfModule mod_setenvif.c>
+# <IfDefine SSL>
+# SetEnvIf User-Agent ".*MSIE.*" \
+# nokeepalive ssl-unclean-shutdown \
+# downgrade-1.0 force-response-1.0
+# </IfDefine>
+# </IfModule>
+
+
+
+# Fix certain PHP values
+## element pur hebergement mutulalise, a commenter si inutile
+ SetEnv REGISTER_GLOBALS 0
+ SetEnv MAGIC_QUOTES 1
+ SetEnv PHP_VER 5
+
+# force default charset
+ AddDefaultCharset UTF-8
+
+# FIX
+<IfModule mod_php5.c>
+ php_flag register_long_arrays Off
+ php_value register_globals off
+</IfModule>
+
+<IfModule mod_rewrite.c>
+
+# 404 error
+ ErrorDocument 404 /404.php
+
+ RewriteEngine on
+ RewriteBase %WS_ADMIN%
+
+ RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
+ RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
+ RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
+ RewriteRule ^(.*)$ index.php [F,L]
+
+ RewriteRule (.*cronfile\.ph.*)$ $1 [L]
+
+ RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
+ RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
+ RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
+ RewriteRule ^(.*)$ index.php [F,L]
+ RewriteRule ^$ index.php?page_admin=index [L]
+ RewriteRule ^rss.php rss.php?%{QUERY_STRING} [L]
+
+ RewriteRule ^attributeManager/attributeManager/(.*)$ attributeManager/$1 [L]
+ RewriteRule ^(attributeManager/.*)$ $1 [L]
+ RewriteRule (.*plugins/.*)$ $1 [L]
+ RewriteRule (.*editeur/.*)$ $1 [L]
+ RewriteRule (.*template/.*)$ $1 [L]
+ RewriteRule (.*images/.*)$ $1 [L]
+ RewriteRule (.*includes/.*)$ $1 [L]
+ RewriteRule (.*\.css)$ $1[L]
+ RewriteRule (.*logoff\.ph.*)$ $1 [L]
+ RewriteRule (.*login\.ph.*)$ $1 [L]
+ RewriteRule (.*document\.ph.*)$ $1 [L]
+ RewriteRule (.*password_forgotten\.ph.*)$ $1 [L]
+ RewriteRule (.*popup_image\.ph.*)$ $1 [L]
+ RewriteRule (.*login\.ph.*)$ $1 [L]
+ RewriteRule ([0-9A-Za-z_&=-]*)(.php)?(.*)$ index.php?page_admin=$1&%{QUERY_STRING} [L]
+ ErrorDocument 401 /
+ ErrorDocument 402 /
+ ErrorDocument 403 /
+ ErrorDocument 404 /
+ ErrorDocument 500 /
+</IfModule>
Added: trunk/catalog/install/includes/modele/configure.txt
===================================================================
--- trunk/catalog/install/includes/modele/configure.txt (rev 0)
+++ trunk/catalog/install/includes/modele/configure.txt 2011-10-31 11:49:06 UTC (rev 3852)
@@ -0,0 +1,101 @@
+/**
+ @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
+ @package oscss-2 <www http://www.oscss.org>
+ @version %CURRENT_VERSION%
+ @date %CREATE_DATE%
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+
+ /**
+ * \brief as active / inactive cache and error return
+ * @var boolean default:false
+ */
+ define('OSCSS_DEBUG', true);
+ /**
+ * \brief as active view query in error requet sql
+ * @var boolean default:false
+ */
+ define('OSCSS_SHOW_QUERIES', true);
+ /**
+ * \brief as active / incative garbage collector error
+ * @var boolean default: true
+ */
+ define('OSCSS_GARBAGE_ERROR', true);
+
+// Define the webserver and path parameters
+// * DIR_FS_* = Filesystem directories (local/physical)
+// * DIR_WS_* = Webserver directories (virtual/URL)
+
+ define('HTTP_SERVER', '%HTTP_SERVER%'); // eg, http://localhost - should not be empty for productive servers
+ define('HTTPS_SERVER', '%HTTPS_SERVER%'); // eg, https://localhost - should not be empty for productive servers
+ define('ENABLE_SSL', %ENABLE_SSL%); // secure webserver for checkout procedure?
+ define('HTTP_COOKIE_DOMAIN', '%HTTP_COOKIE_DOMAIN%');
+ define('HTTPS_COOKIE_DOMAIN', '%HTTPS_COOKIE_DOMAIN%');
+ define('HTTP_COOKIE_PATH', '%HTTP_COOKIE_PATH%');
+ define('HTTPS_COOKIE_PATH', '%HTTPS_COOKIE_PATH%');
+ define('DIR_WS_HTTP_CATALOG', '%HTTP_SERVER%');
+ define('DIR_WS_HTTPS_CATALOG', '%HTTPS_SERVER%');
+
+ define('DIR_CLASSES', 'classes/');
+ define('DIR_FUNCTIONS', 'functions/');
+ define('DIR_FONTS', 'fonts/');
+
+
+ define('DIR_WS_IMAGES', 'images/');
+ define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
+ define('DIR_WS_INCLUDES', 'includes/');
+ define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
+ define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . DIR_FUNCTIONS);
+ define('DIR_WS_CLASSES', DIR_WS_INCLUDES . DIR_CLASSES);
+ define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
+ define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
+ define('DIR_WS_TRIGGERS', DIR_WS_INCLUDES . 'triggers/');
+ define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');
+
+ define('DIR_FS_CATALOG', '%FS_DOCUMENT_ROOT%');
+ define('DIR_FS_ROOT_DOCS', '%FS_DOCUMENT_ROOT%/Documents/');
+
+ define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');
+ define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');
+ define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/');
+ define('DIR_FS_CATALOG_TEMPLATE', DIR_FS_CATALOG . 'templates/');
+
+// public docs
+ define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
+ define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');
+
+// Documents
+ define('DIR_FS_SESSIONS', DIR_FS_ROOT_DOCS . 'public/sessions/');
+ define('DIR_FS_WORK', DIR_FS_ROOT_DOCS . 'public/oscss_data/');
+
+// Template System files
+ define('DIR_FS_TEMPLATES', DIR_FS_CATALOG . 'templates/');
+ define('DIR_WS_TEMPLATES', 'templates/');
+
+// Common
+ define('DIR_WS_COMMON', 'common/');
+ define('DIR_WS_COMMON_FUNCTIONS', DIR_WS_COMMON . DIR_FUNCTIONS);
+ define('DIR_WS_COMMON_FONTS', DIR_WS_COMMON . DIR_FONTS);
+ define('DIR_WS_COMMON_CLASSES', DIR_WS_COMMON . DIR_CLASSES);
+ define('DIR_WS_COMMON_IMAGES', DIR_WS_TEMPLATES . 'layout/');
+
+// define our database connection
+ define('DB_CONNECTOR', '%DBMOTOR%');
+ define('DB_MOTOR', '%DBMOTOR%');
+ define('DB_MOTOR_TYPE', '%DBMOTOR_TYPE%');
+ define('DB_PORT', '%DB_PORT%');
+ define('DB_CHARSET', '%DB_CHARSET%');
+ define('DB_SERVER', '%DB_SERVER%'); // eg, localhost - should not be empty for productive servers
+ define('DB_SERVER_USERNAME', '%DB_SERVER_USERNAME%');
+ define('DB_SERVER_PASSWORD', '%DB_SERVER_PASSWORD%');
+ define('DB_DATABASE', '%DB_DATABASE%');
+ define('DB_TABLE_PREFIX', '%DB_TABLE_PREFIX%');
+ define('USE_PCONNECT', '%USE_PCONNECT%'); // use persisstent connections?
+ define('STORE_SESSIONS', '%STORE_SESSIONS%'); // leave empty '' for default handler or set to 'mysql'
+
+ /**
+ @var Security key
+ @brief use by offline mode
+ */
+ $SecuKey='%SECURE_KEY%';
\ No newline at end of file
Added: trunk/catalog/install/includes/modele/htaccess.txt
===================================================================
--- trunk/catalog/install/includes/modele/htaccess.txt (rev 0)
+++ trunk/catalog/install/includes/modele/htaccess.txt 2011-10-31 11:49:06 UTC (rev 3852)
@@ -0,0 +1,125 @@
+# licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
+# package oscss-2 <www http://www.oscss.org>
+# version %CURRENT_VERSION%
+# date %CREATE_DATE%
+# author oscim <mail aur...@os...> <www http://www.oscim.fr>
+# encode UTF-8
+# Default OsCss Htaccess
+
+
+
+# <Directory "/usr/local/apache/htdocs">
+# AllowOverride Options
+# </Directory>
+# The following makes adjustments to the SSL protocol for Internet
+# Explorer browsers
+# <IfModule mod_setenvif.c>
+# <IfDefine SSL>
+# SetEnvIf User-Agent ".*MSIE.*" \
+# nokeepalive ssl-unclean-shutdown \
+# downgrade-1.0 force-response-1.0
+# </IfDefine>
+# </IfModule>
+
+
+
+# Fix certain PHP values
+## element pur hebergement mutulalise, a commenter si inutile
+ SetEnv REGISTER_GLOBALS 0
+ SetEnv MAGIC_QUOTES 1
+ SetEnv PHP_VER 5
+
+# force default charset
+ AddDefaultCharset UTF-8
+
+# FIX
+<IfModule mod_php5.c>
+ php_flag register_long_arrays Off
+ php_value register_globals off
+</IfModule>
+
+<IfModule mod_rewrite.c>
+
+# 404 error
+ ErrorDocument 404 /404.php
+
+ RewriteEngine on
+ RewriteBase %WS_DOCUMENT_ROOT%
+
+ RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
+ RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
+ RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2}...
[truncated message content] |
|
From: <os...@us...> - 2011-10-31 08:02:15
|
Revision: 3851
http://oscss.svn.sourceforge.net/oscss/?rev=3851&view=rev
Author: oscim
Date: 2011-10-31 08:02:09 +0000 (Mon, 31 Oct 2011)
Log Message:
-----------
correction chemin de configure public
Modified Paths:
--------------
trunk/catalog/install/includes/content/core.configuration.php
Modified: trunk/catalog/install/includes/content/core.configuration.php
===================================================================
--- trunk/catalog/install/includes/content/core.configuration.php 2011-10-31 07:28:27 UTC (rev 3850)
+++ trunk/catalog/install/includes/content/core.configuration.php 2011-10-31 08:02:09 UTC (rev 3851)
@@ -109,9 +109,9 @@
' define(\'DIR_FS_WORK\', \'' . $http_work_directory . '\');' . "\n" .
' define(\'DIR_FS_DOWNLOAD\', DIR_FS_CATALOG . \'download/\');' . "\n" .
' define(\'DIR_FS_DOWNLOAD_PUBLIC\', DIR_FS_CATALOG . \'pub/\');' . "\n" .
- ' define(\'DIR_FS_SESSIONS\', DIR_FS_ROOT_DOCS . \'sessions/\');' . "\n" .
-
'' . "\n" .
+ ' define(\'DIR_FS_SESSIONS\', DIR_FS_ROOT_DOCS . \'public/sessions/\');' . "\n" .
+ '' . "\n" .
'// Template System files' . "\n" .
' define(\'DIR_FS_TEMPLATES\', DIR_FS_CATALOG . \'templates/\');' . "\n" .
' define(\'DIR_WS_TEMPLATES\', \'templates/\');' . "\n" .
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2011-10-31 07:28:33
|
Revision: 3850
http://oscss.svn.sourceforge.net/oscss/?rev=3850&view=rev
Author: oscim
Date: 2011-10-31 07:28:27 +0000 (Mon, 31 Oct 2011)
Log Message:
-----------
ajustement install et configure admin
Modified Paths:
--------------
trunk/catalog/install/includes/content/core.configuration.php
Modified: trunk/catalog/install/includes/content/core.configuration.php
===================================================================
--- trunk/catalog/install/includes/content/core.configuration.php 2011-10-31 07:15:48 UTC (rev 3849)
+++ trunk/catalog/install/includes/content/core.configuration.php 2011-10-31 07:28:27 UTC (rev 3850)
@@ -88,6 +88,7 @@
' define(\'DIR_CLASSES\', \'classes/\');' . "\n" .
' define(\'DIR_FUNCTIONS\', \'functions/\');' . "\n" .
' define(\'DIR_FONTS\', \'fonts/\');' . "\n" .
+ '' . "\n" .
' define(\'DIR_WS_IMAGES\', \'images/\');' . "\n" .
' define(\'DIR_WS_ICONS\', DIR_WS_IMAGES . \'icons/\');' . "\n" .
' define(\'DIR_WS_INCLUDES\', \'includes/\');' . "\n" .
@@ -97,8 +98,8 @@
' define(\'DIR_WS_MODULES\', DIR_WS_INCLUDES . \'modules/\');' . "\n" .
' define(\'DIR_WS_LANGUAGES\', DIR_WS_INCLUDES . \'languages/\');' . "\n" .
' define(\'DIR_WS_TRIGGERS\', DIR_WS_INCLUDES . \'triggers/\');' . "\n" .
+ ' define(\'DIR_WS_DOWNLOAD_PUBLIC\', \'pub/\');' . "\n" .
'' . "\n" .
- ' define(\'DIR_WS_DOWNLOAD_PUBLIC\', \'pub/\');' . "\n" .
' define(\'DIR_FS_CATALOG\', \'' . $this->fs_document_root . '\');' . "\n" .
' define(\'DIR_FS_ROOT_DOCS\', \'' . $this->fs_document_root . 'Documents/\');' . "\n" .
' define(\'DIR_FS_CATALOG_IMAGES\', DIR_FS_CATALOG . \'images/\');' . "\n" .
@@ -192,6 +193,9 @@
' define(\'DIR_CLASSES\', \'classes/\');' . "\n" .
' define(\'DIR_FUNCTIONS\', \'functions/\');' . "\n" .
' define(\'DIR_FONTS\', \'fonts/\');' . "\n" .
+ ' define(\'DIR_LOGS\', \'logs/\');' . "\n" .
+ ' define(\'DIR_CACHE\', \'cache/\');' . "\n" .
+ '' . "\n" .
' define(\'DIR_WS_IMAGES\', \'images/\');' . "\n" .
' define(\'DIR_WS_ICONS\', DIR_WS_IMAGES . \'icons/\');' . "\n" .
' define(\'DIR_WS_CATALOG_IMAGES\', DIR_WS_CATALOG . \'images/\');' . "\n" .
@@ -208,14 +212,16 @@
' define(\'DIR_WS_WIDGET\', DIR_WS_INCLUDES . \'widget/\');' . "\n" .
' define(\'DIR_WS_LANGUAGES\', DIR_WS_INCLUDES . \'languages/\');' . "\n" .
' define(\'DIR_WS_CATALOG_LANGUAGES\', DIR_WS_CATALOG . \'includes/languages/\');' . "\n" .
+ '' . "\n" .
' define(\'DIR_FS_CATALOG_LANGUAGES\', DIR_FS_CATALOG . \'includes/languages/\');' . "\n" .
' define(\'DIR_FS_CATALOG_IMAGES\', DIR_FS_CATALOG . \'images/\');' . "\n" .
' define(\'DIR_FS_CATALOG_MODULES\', DIR_FS_CATALOG . \'includes/modules/\');' . "\n" .
- ' define(\'DIR_FS_BACKUP\', DIR_FS_ADMIN . \'backups/\');' . "\n" .
- ' define(\'DIR_FS_WORK\', \'' . $http_work_directory . '\');' . "\n" .
- ' define(\'DIR_FS_SESSIONS\', DIR_FS_ADMIN . \'sessions/\');' . "\n" .
- ' define(\'DIR_FS_CIP\', DIR_FS_ADMIN . \'contributions/\');' . "\n" .
'' . "\n" .
+ ' define(\'DIR_FS_BACKUP\', DIR_FS_ROOT_DOCS . \'admin/backups/\');' . "\n" .
+ ' define(\'DIR_FS_WORK\', DIR_FS_ROOT_DOCS . \'admin/public/oscss_data/\');' . "\n" .
+ ' define(\'DIR_FS_SESSIONS\', DIR_FS_ROOT_DOCS . \'admin/sessions/\');' . "\n" .
+ ' define(\'DIR_FS_CIP\', DIR_FS_ROOT_DOCS . \'admin/contributions/\');' . "\n" .
+ '' . "\n" .
'// Template System files' . "\n" .
' define(\'DIR_FS_TEMPLATES\', DIR_FS_CATALOG . \'templates/\');' . "\n" .
' define(\'DIR_WS_TEMPLATES\', DIR_WS_CATALOG . \'templates/\');' . "\n" .
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2011-10-31 07:15:55
|
Revision: 3849
http://oscss.svn.sourceforge.net/oscss/?rev=3849&view=rev
Author: oscim
Date: 2011-10-31 07:15:48 +0000 (Mon, 31 Oct 2011)
Log Message:
-----------
Mise en place nouvelle arborescance de fichier
Deport des dossier necessitant droit ecriture au dessus du dossier catalog
Deport de tous les dossiers admin et public
Ajustement du code pour les liaisons
Modified Paths:
--------------
trunk/catalog/admin/includes/application_top.php
trunk/catalog/admin/includes/exts/package/ci_tag.class.php
trunk/catalog/admin/includes/exts/package/packageInstaller.php
trunk/catalog/admin/includes/exts/package/packageUtility.php
trunk/catalog/admin/includes/exts/package/tags/addfile.php
trunk/catalog/admin/includes/modules/pages/package.php
trunk/catalog/admin/login.php
trunk/catalog/common/classes/osCSS_Cache.php
trunk/catalog/includes/application_top.php
Added Paths:
-----------
trunk/Documents/
trunk/Documents/admin/
trunk/Documents/admin/backups/
trunk/Documents/admin/cache/
trunk/Documents/admin/contributions/
trunk/Documents/admin/data/
trunk/Documents/admin/data/dashboard.xml
trunk/Documents/admin/data/notification_src.xml
trunk/Documents/admin/data/repository_sources.xml
trunk/Documents/admin/logs/
trunk/Documents/admin/sessions/
trunk/Documents/admin/tmp/
trunk/Documents/public/
trunk/Documents/public/logs/
trunk/Documents/public/oscss_data/
trunk/Documents/public/sessions/
Removed Paths:
-------------
trunk/catalog/admin/backups/
trunk/catalog/admin/contributions/index.html
trunk/catalog/admin/includes/data/
trunk/catalog/admin/includes/tmp/
trunk/catalog/ext/images/modules/
Copied: trunk/Documents/admin/data/dashboard.xml (from rev 3847, trunk/catalog/admin/includes/data/dashboard.xml)
===================================================================
--- trunk/Documents/admin/data/dashboard.xml (rev 0)
+++ trunk/Documents/admin/data/dashboard.xml 2011-10-31 07:15:48 UTC (rev 3849)
@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<root>
+ <home>
+ <left>
+ <widget>Notification</widget>
+ <widget>homeStock</widget>
+
+
+ <widget>dashbordInfo</widget>
+ <widget>quickview</widget>
+ <widget>orderStats</widget>
+ <widget>customerStats</widget>
+ <widget>info_connexion</widget>
+ </left>
+ <right>
+ <widget class="graph" querystring="Sales">salesStats</widget>
+ <widget>homeNews</widget>
+
+ </right>
+ </home>
+
+ <catalog>
+ <left>
+ <widget>homeStock</widget>
+ <widget>ProductsExpected</widget>
+ </left>
+ <right>
+ <widget class="graph" querystring="Sales">salesStats</widget>
+ </right>
+ </catalog>
+
+ <cms>
+ <left>
+ <widget>quickview</widget>
+ </left>
+ <right>
+<!-- <widget>salesStats</widget> -->
+ </right>
+ </cms>
+
+ <commercial>
+ <left>
+<!-- <widget>homeStock</widget> -->
+ </left>
+ <right>
+<!-- <widget>salesStats</widget> -->
+ </right>
+ </commercial>
+
+ <customers>
+ <left>
+ <widget>orderStats</widget>
+ <widget>customerStats</widget>
+ </left>
+ <right>
+ <widget class="graph" querystring="NewCustomers">NewCustomersStats</widget>
+ <widget class="graph" querystring="Sales">salesStats</widget>
+ </right>
+ </customers>
+
+ <tools>
+ <left>
+ <widget>currencies_update_server</widget>
+ </left>
+ <right>
+ <widget>homeStats</widget>
+ </right>
+ </tools>
+
+ <modules>
+ <left>
+<!-- <widget>packageGeneral</widget> -->
+ <widget>packageRepository</widget>
+ </left>
+ <right>
+<!-- <widget>salesStats</widget> -->
+ </right>
+ </modules>
+
+ <configuration>
+ <left>
+ <widget>brief_config</widget>
+ </left>
+ <right>
+ <widget>info_connexion</widget>
+ </right>
+ </configuration>
+
+ <config_100>
+ <left>
+ <widget>HelpConfig</widget>
+ </left>
+ <right>
+ <widget>SsMenuConfig</widget>
+ </right>
+ </config_100>
+ <config_110>
+ <left>
+ <widget>HelpConfig</widget>
+ </left>
+ <right>
+ <widget>SsMenuConfig</widget>
+ </right>
+ </config_110>
+ <config_120>
+ <left>
+ <widget>HelpConfig</widget>
+ </left>
+ <right>
+ <widget>SsMenuConfig</widget>
+ </right>
+ </config_120>
+ <config_126>
+ <left>
+ <widget>HelpConfig</widget>
+ </left>
+ <right>
+ <widget>SsMenuConfig</widget>
+ </right>
+ </config_126>
+ <config_127>
+ <left>
+ <widget>HelpConfig</widget>
+ </left>
+ <right>
+ <widget>SsMenuConfig</widget>
+ </right>
+ </config_127>
+</root>
\ No newline at end of file
Copied: trunk/Documents/admin/data/notification_src.xml (from rev 3847, trunk/catalog/admin/includes/data/notification_src.xml)
===================================================================
--- trunk/Documents/admin/data/notification_src.xml (rev 0)
+++ trunk/Documents/admin/data/notification_src.xml 2011-10-31 07:15:48 UTC (rev 3849)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<root>
+ <sytem>
+ <action>cronjob</action>
+ </sytem>
+
+ <metier>
+ <action>create_account</action>
+ <action>checkout_process</action>
+ <action>contact_us</action>
+ <action>cronjob</action>
+ <action>returns</action>
+ </metier>
+
+ <method>
+ <mode>sql</mode>
+ <mode>email</mode>
+ <mode>auto</mode>
+ </method>
+</root>
\ No newline at end of file
Copied: trunk/Documents/admin/data/repository_sources.xml (from rev 3847, trunk/catalog/admin/includes/data/repository_sources.xml)
===================================================================
--- trunk/Documents/admin/data/repository_sources.xml (rev 0)
+++ trunk/Documents/admin/data/repository_sources.xml 2011-10-31 07:15:48 UTC (rev 3849)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<root>
+ <channel>
+ <title>Official</title>
+ <key>official</key>
+ <description>official repository</description>
+ <repository>http://plugins.oscss.org/</repository>
+ <rep_listing>rss.php?box=package</rep_listing>
+ <rep_detail>rss.php?box=products_info</rep_detail>
+ </channel>
+</root>
\ No newline at end of file
Deleted: trunk/catalog/admin/contributions/index.html
===================================================================
--- trunk/catalog/admin/contributions/index.html 2011-10-29 11:30:12 UTC (rev 3848)
+++ trunk/catalog/admin/contributions/index.html 2011-10-31 07:15:48 UTC (rev 3849)
@@ -1,8 +0,0 @@
-<html>
-<head>
-<title>.</title>
-</head>
-<body>
-.
-</body>
-</html>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/application_top.php
===================================================================
--- trunk/catalog/admin/includes/application_top.php 2011-10-29 11:30:12 UTC (rev 3848)
+++ trunk/catalog/admin/includes/application_top.php 2011-10-31 07:15:48 UTC (rev 3849)
@@ -71,7 +71,7 @@
if(OSCSS_GARBAGE_ERROR==true) {
if (_cst_bool('STORE_PAGE_PARSE_STOCK_ERROR')){
$file=( (getenv('HTTPS') == 'on')? 'err-php-ssl' : 'err-php' );
- $errorHandler->attachFileWriter($rpa.DIR_WS_INCLUDES.'tmp/'.$file.'.log');
+ $errorHandler->attachFileWriter(DIR_FS_ROOT_DOCS.'admin/'.DIR_LOGS.$file.'.log');
}
if (_cst_bool('STORE_PAGE_PARSE_EMAIL_OWNER')) $errorHandler->attachMailWriter(STORE_OWNER_EMAIL_ADDRESS);
}
Modified: trunk/catalog/admin/includes/exts/package/ci_tag.class.php
===================================================================
--- trunk/catalog/admin/includes/exts/package/ci_tag.class.php 2011-10-29 11:30:12 UTC (rev 3848)
+++ trunk/catalog/admin/includes/exts/package/ci_tag.class.php 2011-10-31 07:15:48 UTC (rev 3849)
@@ -3,15 +3,15 @@
@licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.1.0
- @date 18/12/10, 22:46
+ @version 2.1.1
+ @date 31/10/11, 08:07
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
Original:
Made: by Vlad Savitsky http://forums.oscommerce.com/index.php?showuser=20490
Support: http://forums.oscommerce.com/index.php?showtopic=156667
*/
-error_reporting(-1);
+
Interface PackageTags {
/// gerenal
public function get_data_from_xml_parser($xml_data='');
@@ -604,7 +604,7 @@
// global $messageStack;
// if(!_cst_bool('USE_LOG_SYSTEM')) return;
$tag_data='';
- $file_log=DIR_FS_ADMIN.'includes/tmp/cip_'.$this->contrib.'.log';
+ $file_log=DIR_FS_ROOT_DOCS.'admin/'.DIR_LOGS.'cip_'.$this->contrib.'.log';
if($this->data==null) return false;
foreach($this->data as $key=>$value) {
if(is_array($value)) {
Modified: trunk/catalog/admin/includes/exts/package/packageInstaller.php
===================================================================
--- trunk/catalog/admin/includes/exts/package/packageInstaller.php 2011-10-29 11:30:12 UTC (rev 3848)
+++ trunk/catalog/admin/includes/exts/package/packageInstaller.php 2011-10-31 07:15:48 UTC (rev 3849)
@@ -3,8 +3,8 @@
@licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.1.0
- @date 08/02/11, 15:04
+ @version 2.1.1
+ @date 31/10/11, 08:07
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class packageInstaller
Modified: trunk/catalog/admin/includes/exts/package/packageUtility.php
===================================================================
--- trunk/catalog/admin/includes/exts/package/packageUtility.php 2011-10-29 11:30:12 UTC (rev 3848)
+++ trunk/catalog/admin/includes/exts/package/packageUtility.php 2011-10-31 07:15:48 UTC (rev 3849)
@@ -3,8 +3,8 @@
@licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.1.0
- @date 10/02/11, 11:08
+ @version 2.1.1
+ @date 31/10/11, 08:07
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class packageUtility
Modified: trunk/catalog/admin/includes/exts/package/tags/addfile.php
===================================================================
--- trunk/catalog/admin/includes/exts/package/tags/addfile.php 2011-10-29 11:30:12 UTC (rev 3848)
+++ trunk/catalog/admin/includes/exts/package/tags/addfile.php 2011-10-31 07:15:48 UTC (rev 3849)
@@ -5,8 +5,8 @@
@original author Vlad Savitsky
@Support: http://forums.oscommerce.com/index.php?showuser=20490, http://forums.oscommerce.com/index.php?showtopic=156667
@package osCSS-2 <www http://www.oscss.org>
- @version 2.0.9
- @date 24/07/10, 18:07
+ @version 2.1.1
+ @date 31/10/11, 08:07
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class Tc_addfile
Modified: trunk/catalog/admin/includes/modules/pages/package.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/package.php 2011-10-29 11:30:12 UTC (rev 3848)
+++ trunk/catalog/admin/includes/modules/pages/package.php 2011-10-31 07:15:48 UTC (rev 3849)
@@ -3,8 +3,8 @@
@licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.1.0
- @date 10/04/11, 09:56
+ @version 2.1.1
+ @date 31/10/11, 08:07
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class package
@@ -268,7 +268,8 @@
$var_file = $osCSS_Cache->getCache();
//! load xml file
- if(!$Parser = simplexml_load_file(HTTP_SERVER.DIR_WS_ADMIN.DIR_WS_INCLUDES.'data/'.self::REPOSITORY_DATA)) throw new Exception('Flux introuvable');
+ if(!$Parser = simplexml_load_file(DIR_FS_ROOT_DOCS.'admin/data/'.self::REPOSITORY_DATA))
+ throw new Exception('Flux introuvable');
$Feed = $Parser->xpath('channel/item');
@@ -294,6 +295,8 @@
self::$FeedItem=$FeedI;
}
+// else
+
// else tep_redirect(tep_href_link(self::FILENAME, 'type_data=source&action=source_update'));
}
Modified: trunk/catalog/admin/login.php
===================================================================
--- trunk/catalog/admin/login.php 2011-10-29 11:30:12 UTC (rev 3848)
+++ trunk/catalog/admin/login.php 2011-10-31 07:15:48 UTC (rev 3849)
@@ -28,7 +28,7 @@
$errorHandler = osC_ErrorHandler::start();
$errorHandler->attach($mock=new MockWriter());
$file=( (getenv('HTTPS') == 'on')? 'err-login-php-ssl' : 'err-login-php' );
- $errorHandler->attachFileWriter(DIR_WS_INCLUDES.'tmp/'.$file.'.log');
+ $errorHandler->attachFileWriter(DIR_FS_ROOT_DOCS.'admin/'.DIR_LOGS.$file.'.log');
}
Modified: trunk/catalog/common/classes/osCSS_Cache.php
===================================================================
--- trunk/catalog/common/classes/osCSS_Cache.php 2011-10-29 11:30:12 UTC (rev 3848)
+++ trunk/catalog/common/classes/osCSS_Cache.php 2011-10-31 07:15:48 UTC (rev 3849)
@@ -3,8 +3,8 @@
\licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
\portion code Copyright (c) 2002 osCommerce
\package osCSS-2 <www http://www.oscss.org>
- \version 2.1.0
- \date 29/11/10, 11:33
+ @version 2.1.1
+ @date 31/10/11, 08:07
\author oscim <mail aur...@os...> <www http://www.oscim.fr>
\encode UTF-8
\class osCSS_Cache
@@ -41,7 +41,7 @@
function __construct(){
$this->cached_data=null;
$this->cache_key=null;
- self::$_folder=(defined('DIR_WS_ADMIN')? DIR_FS_ADMIN.DIR_WS_INCLUDES.'tmp/cache/' : DIR_FS_WORK);
+ self::$_folder=(defined('DIR_WS_ADMIN')? DIR_FS_ROOT_DOCS.'admin/'.DIR_CACHE : DIR_FS_WORK);
}
private static function write($key, $data, $force=false) {
Modified: trunk/catalog/includes/application_top.php
===================================================================
--- trunk/catalog/includes/application_top.php 2011-10-29 11:30:12 UTC (rev 3848)
+++ trunk/catalog/includes/application_top.php 2011-10-31 07:15:48 UTC (rev 3849)
@@ -93,7 +93,7 @@
include(DIR_WS_INCLUDES . 'inc_base_lib.php');
if(OSCSS_GARBAGE_ERROR == true){
- if (_cst_bool('STORE_PAGE_PARSE_STOCK_ERROR')) $errorHandler->attachFileWriter(DIR_FS_ROOT_DOCS.'public_err-php.log');
+ if (_cst_bool('STORE_PAGE_PARSE_STOCK_ERROR')) $errorHandler->attachFileWriter(DIR_FS_ROOT_DOCS.'public/logs/public_err-php.log');
if (_cst_bool('STORE_PAGE_PARSE_EMAIL_OWNER')) $errorHandler->attachMailWriter(STORE_OWNER_EMAIL_ADDRESS);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2011-10-29 11:30:18
|
Revision: 3848
http://oscss.svn.sourceforge.net/oscss/?rev=3848&view=rev
Author: oscim
Date: 2011-10-29 11:30:12 +0000 (Sat, 29 Oct 2011)
Log Message:
-----------
ajout sql drivers
Ajsutement databable pour mieux fragmenter les tables en fonction de leur orientation
Ajout d'une boxes pour seprarer la gestion des compte admin de la configurations
Modified Paths:
--------------
trunk/catalog/admin/includes/boxes/002_admin.php
trunk/catalog/admin/includes/classes/drivers/sqlgeozone.php
trunk/catalog/admin/includes/database_tables.php
trunk/catalog/includes/database_tables.php
Added Paths:
-----------
trunk/catalog/admin/includes/classes/drivers/sqlzonetogeozone.php
Modified: trunk/catalog/admin/includes/boxes/002_admin.php
===================================================================
--- trunk/catalog/admin/includes/boxes/002_admin.php 2011-10-25 17:48:09 UTC (rev 3847)
+++ trunk/catalog/admin/includes/boxes/002_admin.php 2011-10-29 11:30:12 UTC (rev 3848)
@@ -8,17 +8,9 @@
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
- $configuration_groups_query = tep_db_query("SELECT configuration_group_id AS cgID, configuration_group_title AS cgTitle ,configuration_group_parentid AS gparentID from " . TABLE_CONFIGURATION_GROUP . " ORDER BY configuration_group_parentid , sort_order ASC");
+ $tabl_link[]= array(FILENAME_ADMINUSERS, 'BOX_ADMINISTRATOR_MEMBERS', 'members');
+ $tabl_link[]= array(FILENAME_ADMINGROUP, 'BOX_ADMINISTRATOR_GROUPS', 'groups');
+ $tabl_link[]= array(FILENAME_ADMIN_MEMBERS.'?gID=groups', 'BOX_ADMINISTRATOR_GROUPS_PERMISSION', 'groups');
- while ($configuration_groups = tep_db_fetch_array($configuration_groups_query)) {
- if ($configuration_groups['gparentID'] =='0') $tabl_link[$configuration_groups['cgID']]= array('ss_menu', $configuration_groups['cgTitle'], 'config_'.$configuration_groups['cgID'], @$img['config_'.$configuration_groups['cgID']]);
- else $tabl_link[$configuration_groups['gparentID']][4][]= array(FILENAME_CONFIGURATION.'?gparentID=' . $configuration_groups['gparentID'].'&gID=' . $configuration_groups['cgID'], $configuration_groups['cgTitle'], 'config_'.$configuration_groups['cgID'], @$img['config_'.$configuration_groups['cgID']]);
- }
-
-/* taxe et zone de taxe*/
- $tabl_link[130]= array('ss_menu','BOX_ZONE_AND_TAXE','taxes_in_zone');
- $tabl_link[130][4][]= array(FILENAME_COUNTRIES, 'BOX_TAXES_COUNTRIES', 'countries');
- $tabl_link[130][4][]= array(FILENAME_GEO_ZONES, 'BOX_TAXES_GEO_ZONES', 'taxes_geo_zone');
- $tabl_link[130][4][]= array(FILENAME_TAX_CLASSES, 'BOX_TAXES_TAX_CLASSES', 'taxes_classes');
-
+ $tabl_link[]= array(FILENAME_ADMINNOTIF, 'BOX_ADMIN_NOTIFICATIONS', 'groups');
?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/classes/drivers/sqlgeozone.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlgeozone.php 2011-10-25 17:48:09 UTC (rev 3847)
+++ trunk/catalog/admin/includes/classes/drivers/sqlgeozone.php 2011-10-29 11:30:12 UTC (rev 3848)
@@ -8,7 +8,11 @@
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class sqlgeozone
+ @file sqlgeozone.php
@brief manage insert/update/delete in zone tables
+
+ @note
+ @depend sqlzonetogeozone.php
*/
@@ -145,7 +149,8 @@
else
return false;
- $DB->query("delete from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . (int)$_id . "' ");
+// $DB->query("delete from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . (int)$_id . "' ");
+ sqlzonetogeozone::delete();
$DB->query("delete from " . TABLE_GEO_ZONES . " where geo_zone_id = '" . (int)$_id . "'");
Added: trunk/catalog/admin/includes/classes/drivers/sqlzonetogeozone.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlzonetogeozone.php (rev 0)
+++ trunk/catalog/admin/includes/classes/drivers/sqlzonetogeozone.php 2011-10-29 11:30:12 UTC (rev 3848)
@@ -0,0 +1,198 @@
+<?php if (!defined('HTTP_SERVER')) die('You can not access this file directly!');
+/**
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 23/10/11, 16:51
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+ @class sqlzonetogeozone
+ @file sqlzonetogeozone.php
+ @brief manage insert/update/delete in zone tables
+*/
+
+
+
+
+class sqlzonetogeozone
+ implements ModSqlDataDriver{
+
+ public static $modules;
+
+ protected static $_instance;
+
+ protected function __construct(){
+ }
+
+
+ public static function getInstance() {
+ if(self::$_instance == null) self::$_instance = new self();
+ return self::$_instance;
+ }
+
+
+ /**
+ @brief create new ligne in table configuration
+ */
+ public static function create($option){
+ self::getInstance();
+
+ if(!isset($option['geo_zone_id']))
+ return 'geo_zone_id';
+
+ $sql_data_array['geo_zone_id'] = tep_db_prepare_input($option['geo_zone_id']);
+
+ $sql_data_array['zone_country_id'] = (isset($option['zone_country_id'])) ? tep_db_prepare_input($option['zone_country_id']) :'NULL';
+ $sql_data_array['zone_id'] = (isset($option['zone_id'])) ? tep_db_prepare_input($option['zone_id']) :'NULL';
+
+ $sql_data_array['date_added'] = 'now()';
+
+ $res=tep_db_perform(TABLE_ZONES_TO_GEO_ZONES, $sql_data_array);
+
+ if(!$res)
+ return $res;
+ else
+ return $res->__get('insertId');
+ }
+
+ /**
+ @brief update ligne in table configuration
+ */
+ public static function update($option){
+ self::getInstance();
+
+ if(!isset($option['id']))
+ return 'id';
+
+ $where ='';
+ if(isset($option['id'])) $where .="AND association_id = '".(int)$option['id']."' ";
+
+ $sql_data_array['geo_zone_id'] = tep_db_prepare_input($option['geo_zone_id']);
+
+ $sql_data_array['zone_country_id'] = (isset($option['zone_country_id'])) ? tep_db_prepare_input($option['zone_country_id']) :'NULL';
+ $sql_data_array['zone_id'] = (isset($option['zone_id'])) ? tep_db_prepare_input($option['zone_id']) :'NULL';
+
+ $sql_data_array['last_modified'] = 'now()';
+ $res=tep_db_perform(TABLE_ZONES_TO_GEO_ZONES, $sql_data_array, 'update' , substr($where,3) );
+
+ return $res;
+ }
+
+ /**
+ @brief load ligne in table configuration
+ @param option array
+ id => row id int (configuration_id)
+ key => string key (configuration_key)
+ group_id => group_id int (configuration_group_id)
+ @param $shortkey use cleankey for return short key
+ @return
+
+ object(stdClass)[13]
+ public 'id' => string '1' (length=1)
+
+ OR
+ array(
+ object(stdClass)[13]
+ ...
+ object(stdClass)[13]
+ ..
+ )
+
+ */
+ public static function fetch($option,$shortkey=false){
+ self::getInstance();
+ $DB=Database::getInstance();
+
+ $sql ="";
+ if(isset($option['id'])) $sql .="AND association_id = '".(int)tep_db_input($option['id'])."' ";
+ if(isset($option['geo_zone_id'])) $sql .="AND geo_zone_id = '".(int)tep_db_input($option['geo_zone_id'])."' ";
+ if(isset($option['zone_id'])) $sql .="AND zone_id = '".(int)tep_db_input($option['zone_id'])."' ";
+ if(isset($option['zone_country_id'])) $sql .="AND zone_country_id = '".(int)tep_db_input($option['zone_country_id'])."' ";
+
+ if($sql=='')
+ return false;
+
+
+ $sql="SELECT * FROM " . TABLE_ZONES_TO_GEO_ZONES . " a ".
+// " LEFT JOIN " . TABLE_IMAGES_USED . " g ON (a.rowid=g.rowid) ".
+ " WHERE ".substr($sql,3);
+
+ $res=$DB->query($sql);
+
+ $num = $res->__get('numRows');
+
+ if($num == 1){
+ $result=$res->fetchAssoc();
+ return ((!$shortkey)? $result : self::CleanKey($result));
+ }
+ elseif($num > 1){
+ $array=array();
+
+ foreach($res->fetchAllAssoc() as $result)
+ $array[]= ((!$shortkey)? $result : self::CleanKey($result));
+
+ return $array;
+ }
+
+ return false;
+ }
+
+ /**
+ @brief delete row
+ */
+ public static function delete($option){
+ self::getInstance();
+ $DB=Database::getInstance();
+
+ if(isset($option['id']))
+ $where = " where association_id = '" .(int)tep_db_input($option['id']) . "'";
+ elseif(isset($option['geo_zone_id']))
+ $where = " where geo_zone_id = '" .(int)tep_db_input($option['geo_zone_id']) . "'";
+ else
+ return false;
+
+ $DB->query("delete from " . TABLE_ZONES_TO_GEO_ZONES . $where );
+
+
+ return true;
+ }
+
+
+ /**
+ @brief
+ @return array product empty
+ */
+ public static function Specimen(){
+ $par = array('association_id' => '',
+ 'zone_country_id' => '',
+ 'zone_id' => '',
+ 'geo_zone_id' => '',
+ 'last_modified' => '',
+ 'date_added' => '',
+ );
+
+ return self::CleanKey($par);
+ }
+
+
+
+ /**
+ @fn CleanKey()
+ @brief Clean string name key
+ */
+ private static function CleanKey($array){
+ self::getInstance();
+ $object= new stdclass();
+
+ foreach($array as $key=>$value){
+ $object->$key = $value;
+ }
+
+ return $object;
+ }
+
+}
+
+
+?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/database_tables.php
===================================================================
--- trunk/catalog/admin/includes/database_tables.php 2011-10-25 17:48:09 UTC (rev 3847)
+++ trunk/catalog/admin/includes/database_tables.php 2011-10-29 11:30:12 UTC (rev 3848)
@@ -20,9 +20,16 @@
define('TABLE_ADMIN_FILES2RIGHT', DB_TABLE_PREFIX . 'admin_m_files_to_right');
//Admin end
+
+// Dictionnaires begin
+ define('TABLE_ADDRESS_FORMAT', DB_TABLE_PREFIX . 'address_format');
+ define('TABLE_COUNTRIES', DB_TABLE_PREFIX . 'countries');
+// Dictionnaires end
+
+
+
// define the database table names used in the project
define('TABLE_ADDRESS_BOOK', DB_TABLE_PREFIX . 'address_book');
- define('TABLE_ADDRESS_FORMAT', DB_TABLE_PREFIX . 'address_format');
define('TABLE_CATEGORIES', DB_TABLE_PREFIX . 'categories');
define('TABLE_CATEGORIES_DESCRIPTION', DB_TABLE_PREFIX . 'categories_description');
@@ -36,7 +43,6 @@
define('TABLE_CONTENT_DESCRIPTION', DB_TABLE_PREFIX . 'content_description');
define('TABLE_CONTENT_TO_CATEGORIES', DB_TABLE_PREFIX . 'content_to_categories');
- define('TABLE_COUNTRIES', DB_TABLE_PREFIX . 'countries');
define('TABLE_CRONJOB', DB_TABLE_PREFIX . 'cronjob');
define('TABLE_CURRENCIES', DB_TABLE_PREFIX . 'currencies');
Modified: trunk/catalog/includes/database_tables.php
===================================================================
--- trunk/catalog/includes/database_tables.php 2011-10-25 17:48:09 UTC (rev 3847)
+++ trunk/catalog/includes/database_tables.php 2011-10-29 11:30:12 UTC (rev 3848)
@@ -9,13 +9,21 @@
@encode UTF-8
*/
+//Admin begin
define('TABLE_ADMIN_NOTIFICATION', DB_TABLE_PREFIX.'admin_notification');
define('TABLE_NOTIFICATION', DB_TABLE_PREFIX.'checknotif');
define('TABLE_ADMIN', DB_TABLE_PREFIX . 'admin_users');
+//Admin end
+
+// Dictionnaires begin
+ define('TABLE_ADDRESS_FORMAT', DB_TABLE_PREFIX . 'address_format');
+ define('TABLE_COUNTRIES', DB_TABLE_PREFIX . 'countries');
+// Dictionnaires end
+
+
// define the database table names used in the project
define('TABLE_ADDRESS_BOOK', DB_TABLE_PREFIX . 'address_book');
- define('TABLE_ADDRESS_FORMAT', DB_TABLE_PREFIX . 'address_format');
define('TABLE_CATEGORIES', DB_TABLE_PREFIX . 'categories');
define('TABLE_CATEGORIES_DESCRIPTION', DB_TABLE_PREFIX . 'categories_description');
@@ -28,7 +36,6 @@
define('TABLE_CONTENT_DESCRIPTION', DB_TABLE_PREFIX . 'content_description');
define('TABLE_CONTENT_TO_CATEGORIES', DB_TABLE_PREFIX . 'content_to_categories');
- define('TABLE_COUNTRIES', DB_TABLE_PREFIX . 'countries');
define('TABLE_CURRENCIES', DB_TABLE_PREFIX . 'currencies');
define('TABLE_CUSTOMERS', DB_TABLE_PREFIX . 'customers');
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2011-10-25 17:48:17
|
Revision: 3847
http://oscss.svn.sourceforge.net/oscss/?rev=3847&view=rev
Author: oscim
Date: 2011-10-25 17:48:09 +0000 (Tue, 25 Oct 2011)
Log Message:
-----------
suite ajout ete ajustement espace configuration
Ajout d'une page modorders
Modified Paths:
--------------
trunk/catalog/admin/includes/content/configuration.top.inc
trunk/catalog/admin/includes/languages/fr_FR/boxes/01_configuration.php
trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/cfg_128.txt
trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/modstock.txt
trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/my_boutique.txt
trunk/catalog/admin/includes/template/oscss/stylesheet-1.css
trunk/catalog/install/includes/language/fr_FR/oscss_config.txt
trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql
trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration_group.sql
Added Paths:
-----------
trunk/catalog/admin/includes/gabarit/configuration/modorder.listing.gab
trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/cfg_25.txt
trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/modorder.txt
trunk/catalog/admin/includes/modules/configuration/modorder.php
Modified: trunk/catalog/admin/includes/content/configuration.top.inc
===================================================================
--- trunk/catalog/admin/includes/content/configuration.top.inc 2011-10-25 09:04:08 UTC (rev 3846)
+++ trunk/catalog/admin/includes/content/configuration.top.inc 2011-10-25 17:48:09 UTC (rev 3847)
@@ -132,11 +132,15 @@
$cfg->load_db_values();
}
elseif(tep_not_null($gID) && is_numeric($gID) ){
-
$list=sqlconfiguration::fetch(array('group_id'=> (int)$gID), true);
- foreach($list as $row) {
+ if(is_object($list))
+ $liste[]=$list;
+ else
+ $liste=$list;
+ foreach($liste as $row) {
+
$cfgValue =configUtility::CallExecConfigLine($row->use, $row->key, $row->value);
if ($row->set) eval($s[]='$value_field = ' . $row->set . '"' . htmlspecialchars($row->value) . '","'.$row->key.'");');
@@ -152,6 +156,7 @@
}
+// exit;
$cfg_group_query = tep_db_query("select configuration_group_title from " . TABLE_CONFIGURATION_GROUP . " where configuration_group_id = '" . (int)$gID . "'");
Added: trunk/catalog/admin/includes/gabarit/configuration/modorder.listing.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/configuration/modorder.listing.gab (rev 0)
+++ trunk/catalog/admin/includes/gabarit/configuration/modorder.listing.gab 2011-10-25 17:48:09 UTC (rev 3847)
@@ -0,0 +1,111 @@
+<?php
+/**
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 22/09/11, 20:05
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+ @brief mise en forme de la gestion du stock
+*/
+?>
+
+<div id="ssmenu">
+ <?php echo tep_ssmenu_configuration($_GET['gparentID']) ?>
+</div>
+
+
+
+<h3 class="main-title"><?php echo __('modorder heading') ?></h3>
+
+<?php echo tep_draw_form('configuration', FILENAME_CONFIGURATION, 'gparentID=' . $_GET['gparentID'].'&gID=' . $_GET['gID'] . '&action=save_mutli') ?>
+
+
+<div class="block_form">
+
+ <fieldset class="block_field">
+
+ <legend><?php echo __('modorder legend status orders'). tep_image(DIR_WS_ICONS . 'icon_help.gif'); ?></legend>
+
+ <?php /** */ $row = modorder::$list['DEFAULT_ORDERS_STATUS_ID']; ?>
+ <h4 title="<?php echo '('.$row->key.' - ' . $row->set . ')'; ?>"><?php echo __($row->title). tep_image(DIR_WS_ICONS . 'icon_help.gif'); ?></h4>
+ <div class="block_input">
+ <label><?php if (tep_not_null($row->description))echo __($row->description); ?></label>
+ <p>
+ <?php echo $row->value_field ; ?>
+ </p>
+ </div>
+
+ <?php /** */ $row = modorder::$list['DEFAULT_ORDERS_STATUS_COMPLETED']; ?>
+ <h4 title="<?php echo '('.$row->key.' - ' . $row->set . ')'; ?>"><?php echo __($row->title). tep_image(DIR_WS_ICONS . 'icon_help.gif'); ?></h4>
+ <div class="block_input">
+ <label><?php if (tep_not_null($row->description))echo __($row->description); ?></label>
+ <p>
+ <?php echo $row->value_field ; ?>
+ </p>
+ </div>
+
+ <?php /** */ $row = modorder::$list['DEFAULT_ORDERS_STATUS_ANNULATE']; ?>
+ <h4 title="<?php echo '('.$row->key.' - ' . $row->set . ')'; ?>"><?php echo __($row->title). tep_image(DIR_WS_ICONS . 'icon_help.gif'); ?></h4>
+ <div class="block_input">
+ <label><?php if (tep_not_null($row->description))echo __($row->description); ?></label>
+ <p>
+ <?php echo $row->value_field ; ?>
+ </p>
+ </div>
+ </fieldset>
+
+
+
+ <fieldset class="block_field">
+ <?php /** */ $row = modorder::$list['USE_LOCAL_GENERAT_ORDER_REF']; ?>
+ <legend title="<?php echo '('.$row->key.' - ' . $row->set . ')'; ?>"><?php echo __($row->title). tep_image(DIR_WS_ICONS . 'icon_help.gif'); ?></legend>
+
+ <div class="block_input">
+ <label><?php if (tep_not_null($row->description))echo __($row->description); ?></label>
+ <p>
+ <?php echo $row->value_field ; ?>
+ </p>
+ </div>
+ </p>
+
+
+ <?php /** option de la gestion de stock, disponible que ci value precendente a true */ ?>
+ <?php if(_test_bool(modorder::$list['USE_LOCAL_GENERAT_ORDER_REF']->value)): ?>
+ <?php /** */ $row = modorder::$list['ORDERS_NUMBER_PREFIX']; ?>
+ <div class="block_input">
+ <label><?php if (tep_not_null($row->description))echo __($row->description); ?></label>
+ <p>
+ <?php echo $row->value_field ; ?>
+ </p>
+ </div>
+
+ <?php endif; ?>
+ </fieldset>
+
+ <fieldset class="block_field">
+ <legend class="block_field-title"><?php echo __('modorder legend other') ?></legend>
+
+ <ul class="block_input">
+ <?php foreach(modorder::$list as $row)
+ if(!in_array($row->key,array('DEFAULT_ORDERS_STATUS_ID', 'DEFAULT_ORDERS_STATUS_ANNULATE', 'DEFAULT_ORDERS_STATUS_COMPLETED', 'ORDERS_NUMBER_PREFIX', 'USE_LOCAL_GENERAT_ORDER_REF')) ) { ?>
+ <li id="nav_<?php echo $row->key ?>"><h5 title="<?php echo '('.$row->key.' - ' . $row->set . ')'; ?>"><?php echo __($row->title). tep_image(DIR_WS_ICONS . 'icon_help.gif'); ?></h5>
+
+ <div class="block_input tirroir">
+ <label><?php echo __($row->description); ?></label>
+ <p>
+ <?php echo $row->value_field ; ?>
+ </p>
+ </div>
+ </li>
+ <?php } ?>
+ </ul>
+ </fieldset>
+
+ <div class="button_nav">
+ <?php print tep_image_submit('button_copy.gif', IMAGE_UPDATE) .tep_js_back(tep_href_link(FILENAME_CONFIGURATION, 'gparentID=' . $_GET['gparentID'].'&gID=' . $_GET['gID'] )) ; ?>
+ </div>
+
+</div>
+</form>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/languages/fr_FR/boxes/01_configuration.php
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/boxes/01_configuration.php 2011-10-25 09:04:08 UTC (rev 3846)
+++ trunk/catalog/admin/includes/languages/fr_FR/boxes/01_configuration.php 2011-10-25 17:48:09 UTC (rev 3847)
@@ -60,4 +60,6 @@
define('BOX_HEADING_CONF_TEMPLATE',"Template" );
define('BOX_HEADING_CONF_BOX_CONFIGURATION_ENVIRONEMENT',"Environement" );
define('BOX_HEADING_CONF_TITLE_BOX_CONFIGURATION_ENVIRONEMENT',"Environement" );
+
+define('BOX_HEADING_CONF_CONFIGURATION_ORDERS',"Option des commandes" );
?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/cfg_128.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/cfg_128.txt 2011-10-25 09:04:08 UTC (rev 3846)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/cfg_128.txt 2011-10-25 17:48:09 UTC (rev 3847)
@@ -11,7 +11,6 @@
$lang['USE_LOCAL_GENERAT_PDF_S']="Generation des pdf(commande/BL..)" ;
$lang['USE_LOCAL_GENERAT_PDF_L']="Utiliser un outils externe pour la generation des document pdf, disponible coté public et privé" ;
-$lang['USE_LOCAL_GENERAT_ORDER_REF_S']="Référence des commandes" ;
-$lang['USE_LOCAL_GENERAT_ORDER_REF_L']="Utiliser la numerotaion interne, ou laisser un outils externe prendre en charge cette référence. Celle ci ne sera donc disponible qu'apres la prise en compte par l'outil tiers de la commande. Coté public, le numero generic interne est utilisé en attente de reference" ;
+
?>
\ No newline at end of file
Added: trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/cfg_25.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/cfg_25.txt (rev 0)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/cfg_25.txt 2011-10-25 17:48:09 UTC (rev 3847)
@@ -0,0 +1,15 @@
+<?php
+/**
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 24/10/11, 11:18
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+$lang['MAX_DATEADDED_FOR_NEWX_PRODUCT_S']="durée des nouveaux produits" ;
+$lang['MAX_DATEADDED_FOR_NEWX_PRODUCT_L']="Nombre de jourspour être un nouveaux produits" ;
+
+
+?>
\ No newline at end of file
Added: trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/modorder.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/modorder.txt (rev 0)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/modorder.txt 2011-10-25 17:48:09 UTC (rev 3847)
@@ -0,0 +1,41 @@
+<?php
+/**
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 27/09/11, 18:29
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+
+
+$lang['modorder heading']="Configuration gestion de commande" ;
+
+$lang['modorder legend status orders']="Gestion des status" ;
+$lang['modorder legend other']="Autres" ;
+
+
+
+
+/**
+ @remarks stock Valeur stocké en db pour conversion
+ @note
+ XXXX : key de configuration
+ XXXX_S : desciption courte
+ XXXX_L description longue
+*/
+
+$lang['DEFAULT_ORDERS_STATUS_ID_S']="État par défaut pour une nouvelle commande" ;
+$lang['DEFAULT_ORDERS_STATUS_ID_L']="Quand une nouvelle commande est créée, ce statut de commande lui sera assigné." ;
+$lang['DEFAULT_ORDERS_STATUS_COMPLETED_S']="Commande Cloturé" ;
+$lang['DEFAULT_ORDERS_STATUS_COMPLETED_L']="definir le status final d'une commande livre" ;
+$lang['DEFAULT_ORDERS_STATUS_ID_S']="Commande annulée" ;
+$lang['DEFAULT_ORDERS_STATUS_ID_L']="definir le status d'une commande annule." ;
+
+$lang['ORDERS_NUMBER_PREFIX_S']="Préfixe numéro commande" ;
+$lang['ORDERS_NUMBER_PREFIX_L']="Indiquer le préfixe des numéros de commande le chiffre precise le nombre de chiffre du numéro; ex: 'ym-5'(1005-00001); Laissez vide si vous ne voulez pas de préfixe." ;
+
+$lang['USE_LOCAL_GENERAT_ORDER_REF_S']="Référence des commandes" ;
+$lang['USE_LOCAL_GENERAT_ORDER_REF_L']="Utiliser la numerotaion interne, ou laisser un outils externe prendre en charge cette référence. Celle ci ne sera donc disponible qu'apres la prise en compte par l'outil tiers de la commande. Coté public, le numero generic interne est utilisé en attente de reference" ;
+?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/modstock.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/modstock.txt 2011-10-25 09:04:08 UTC (rev 3846)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/modstock.txt 2011-10-25 17:48:09 UTC (rev 3847)
@@ -61,4 +61,6 @@
$lang['PRODINFO_ATTRIBUTE_ACTUAL_PRICE_PULL_DOWN_L']="<strong>NOTE:</strong></font> N'affiche un résultat satisfaisant que si vous avez une seule option par produit.<br /><strong> Si True:</strong> Le prix des options sera affiché comme un prix de produit final.<br /><strong> False par défaut.</strong>" ;
$lang['PRODINFO_ATTRIBUTE_DISPLAY_STOCK_LIST_S']="Affichage table avec information stock" ;
$lang['PRODINFO_ATTRIBUTE_DISPLAY_STOCK_LIST_L']="<strong>Si True:</strong> Un tableau avec les informations sur le stock sera affiché au client. Si le produit n'a pas tous les attributs de stock suivi, la table ne sera pas affichée.<br /><strong>True par défaut.</strong>" ;
+$lang['PRODINFO_ATTRIBUTE_NO_ADD_OUT_OF_STOCK_S']="Avertir lors d\une rupture de stock lors d'un ajout au panier." ;
+$lang['PRODINFO_ATTRIBUTE_NO_ADD_OUT_OF_STOCK_L']="<strong>Si True:</strong> Le client ne pourra pas ajouter de produit hors stock avec une combinaison d'attributs. Un message javascript lui sera affiché." ;
?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/my_boutique.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/my_boutique.txt 2011-10-25 09:04:08 UTC (rev 3846)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/configuration/my_boutique.txt 2011-10-25 17:48:09 UTC (rev 3847)
@@ -34,8 +34,6 @@
-$lang['ORDERS_NUMBER_PREFIX_S']="Préfixe numéro commande" ;
-$lang['ORDERS_NUMBER_PREFIX_L']="Indiquer le préfixe des numéros de commande le chiffre precise le nombre de chiffre du numéro; ex: 'ym-5'(1005-00001); Laissez vide si vous ne voulez pas de préfixe." ;
$lang['STORE_OWNER_S']="Propriétaire de la boutique" ;
$lang['STORE_OWNER_L']="Indiquer le nom du propriétaire de la boutique." ;
Added: trunk/catalog/admin/includes/modules/configuration/modorder.php
===================================================================
--- trunk/catalog/admin/includes/modules/configuration/modorder.php (rev 0)
+++ trunk/catalog/admin/includes/modules/configuration/modorder.php 2011-10-25 17:48:09 UTC (rev 3847)
@@ -0,0 +1,149 @@
+<?php
+/**
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 22/09/11, 19:49
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+ @class modorder
+ @brief Mise en forme et structuration des options de stock
+*/
+
+
+Class modorder
+ implements ext_configuration
+ {
+ /**
+ @var array list template
+ */
+ public static $list;
+
+ public static $cfg;
+
+ /**
+ */
+ function __construct(){
+ global $oscss;
+ $this->code=__CLASS__;
+ global $messageStack, $language,$lang;
+ if (!is_writeable(DIR_FS_TEMPLATES)) $messageStack->add(ERROR_DESTINATION_NOT_WRITEABLE. 'template/', 'error');
+
+ $oscss->pile_file_lang(DIR_FS_ADMIN.DIR_WS_LANGUAGES.$language.'/modules/configuration/'.$this->code.'.txt');
+
+ self::$cfg =new sqlconfiguration();
+ }
+
+
+ /**
+ Action Prise en charge par le modules
+ @param
+ @e global $action
+ @e global $messageStack
+ */
+ public function draw_action(){
+ global $action,$messageStack;
+
+ $DB=Database::getInstance();
+ $gparentID = tep_db_prepare_input($_GET['gparentID']);
+ $gID= tep_db_prepare_input($_GET['gID']);
+
+ switch($action){
+ /**
+ @brief save page groupe
+ */
+ case 'save_mutli':
+ if(tep_not_null($gID) ){
+
+ $list=sqlconfiguration::fetch(array('group_id'=> (int)$gID), true);
+
+ foreach($list as $row) {
+
+ if(isset($_POST['configuration'][$row->key])) {
+ $configuration_value = tep_db_prepare_input($_POST['configuration'][$row->key]);
+
+ if( ($res=sqlconfiguration::update(array('key'=>$row->key , 'value'=>tep_db_input($configuration_value) ))) == false)$erreur[]=false;
+ else $erreur[]=true;
+
+ }
+
+ }
+
+ if(!in_array(false,$erreur)) $messageStack->add_session(SAVE_CONFIG_OK, 'success');
+ else $messageStack->add_session(SAVE_CONFIG_NOT_OK, 'error');
+
+ }
+
+ tep_redirect(tep_href_link(FILENAME_CONFIGURATION, 'gparentID=' . $gparentID.'&gID=' . $_GET['gID'] . '&cID=' . $cID));
+ break;
+ }
+ }
+
+ /**
+ @return array
+ */
+ public function load_db_values($Id){
+
+
+ $list_edit=array();
+ $gID = 129;
+
+ $list=sqlconfiguration::fetch(array('group_id'=> (int)$gID), true);
+
+ if(is_object($list))
+ $liste[]=$list;
+ else
+ $liste=$list;
+
+ foreach($liste as $row) {
+
+ $cfgValue =configUtility::CallExecConfigLine($row->use, $row->key, $row->value);
+
+ if ($row->set) eval($s[]='$value_field = ' . $row->set . '"' . htmlspecialchars($row->value) . '","'.$row->key.'");');
+ else $value_field = tep_draw_input_field('configuration['.$row->key.']', '',$row->value);
+
+ $conf = $row;
+ $row->cfgValue=$cfgValue;
+ $row->value_field=$value_field;
+
+ $list_edit[$row->key]=$conf;
+ }
+
+ return $list_edit;
+ }
+
+ /**
+ Appelé dans le header de page
+ */
+ public static function draw_header(){
+ ?>
+ <style type="text/css">
+ #central form label {
+ display: inline-block;
+ font-weight: normal;
+ margin: 5px 10px;
+ text-align: left;
+ white-space: pre-wrap;
+ width: 90%;
+ }
+ </style>
+ <?php
+ }
+
+ /**
+ Contenu central
+ @param
+ @e global $action
+ @e global $gparentID
+ */
+ public function draw(){
+ global $action,$gparentID;
+ if($action=='cfg') return;
+
+ self::$list = $this->load_db_values('');
+ return tep_get_include_contents('configuration/'.__CLASS__.'.listing');
+ }
+}
+
+?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/template/oscss/stylesheet-1.css
===================================================================
--- trunk/catalog/admin/includes/template/oscss/stylesheet-1.css 2011-10-25 09:04:08 UTC (rev 3846)
+++ trunk/catalog/admin/includes/template/oscss/stylesheet-1.css 2011-10-25 17:48:09 UTC (rev 3847)
@@ -224,6 +224,10 @@
#ssmenu a:hover { float:left; padding:5px 10px ; margin:0;font-size:10px;background:#eee;color:#000;text-shadow: 0 1px 0 #fff;-moz-box-shadow: 0 1px 3px rgba(0,0,0,0.5);-webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.5);}
#menu_theme * {display:block;}
+ /* sous menu en widget */
+ #central #SsMenuConfig #ssmenu {background:none;}
+ #SsMenuConfig #ssmenu a { background: none repeat scroll 0 0 #797979; border-right: 1px solid #444444; clear: both; color: white; font-size: 10px; margin: 0 0 1px 25px; padding: 5px 10px; text-shadow: 0 1px 0 #000000; width: 40%;}
+ #SsMenuConfig #ssmenu a:hover { float:left; padding:5px 10px ; margin:0;font-size:10px;background:#eee;color:#000;text-shadow: 0 1px 0 #fff;-moz-box-shadow: 0 1px 3px rgba(0,0,0,0.5);-webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.5);}
/* Habillage */
Modified: trunk/catalog/install/includes/language/fr_FR/oscss_config.txt
===================================================================
--- trunk/catalog/install/includes/language/fr_FR/oscss_config.txt 2011-10-25 09:04:08 UTC (rev 3846)
+++ trunk/catalog/install/includes/language/fr_FR/oscss_config.txt 2011-10-25 17:48:09 UTC (rev 3847)
@@ -17,25 +17,18 @@
$lg['OSC_ADMIN_GROUPS_ADMIN']="Administrateur" ;
$lg['OSC_ADMIN_GROUPS_SELLER']="Vendeur" ;
-/* osc_configuration */
-/// 0 template
-/// 2 Unite
-
-/// 3 max value
-
-
/// 6 module option
-$lg['DEFAULT_ORDERS_STATUS_ID_S']="État par défaut pour une nouvelle commande" ;
-$lg['DEFAULT_ORDERS_STATUS_ID_L']="Quand une nouvelle commande est créée, ce statut de commande lui sera assigné." ;
+
$lg['DEFAULT_RETURN_REASON_S']="Raison des retours par défaut" ;
$lg['DEFAULT_RETURN_REASON_L']="La raison par défaut appliquée pour tous retours." ;
$lg['DEFAULT_RETURN_STATUS_ID_S']="Statut des retours par défaut" ;
$lg['DEFAULT_RETURN_STATUS_ID_L']="Retour d'état par défaut attribué à tous nouveaux retours." ;
$lg['DEFAULT_REFUND_METHOD_S']="Méthode de remboursement par défaut" ;
$lg['DEFAULT_REFUND_METHOD_L']="Méthode de remboursement par défaut." ;
+
$lg['MODULE_GENERIC_INSTALLED_S']="Modules génériques installés" ;
$lg['MODULE_GENERIC_INSTALLED_L']="Liste des modules génériques installés séparés par un point virgule. Mise à jour automatique. Ne pas éditer. (Exemple: cc.php;cod.php;paypal.php)" ;
$lg['MODULE_GENERIC_INSTALLED_BO_S']="[admin]Modules génériques installés" ;
@@ -92,17 +85,8 @@
-/// 25 new products
-$lg['MAX_DATEADDED_FOR_NEWX_PRODUCT_S']="durée des nouveaux produits" ;
-$lg['MAX_DATEADDED_FOR_NEWX_PRODUCT_L']="Nombre de jourspour être un nouveaux produits" ;
-/// 26 products option
-$lg['PRODINFO_ATTRIBUTE_NO_ADD_OUT_OF_STOCK_S']="Avertir lors d\une rupture de stock lors d'un ajout au panier." ;
-$lg['PRODINFO_ATTRIBUTE_NO_ADD_OUT_OF_STOCK_L']="<strong>Si True:</strong> Le client ne pourra pas ajouter de produit hors stock avec une combinaison d'attributs. Un message javascript lui sera affiché." ;
-/// 27 general appearance
-
-
/// 128 Config environement shop
Modified: trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql 2011-10-25 09:04:08 UTC (rev 3846)
+++ trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql 2011-10-25 17:48:09 UTC (rev 3847)
@@ -23,8 +23,6 @@
## 0 Nom editable directement
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('TEMPLATE_NAME_S', 'TEMPLATE_NAME', 'genericLight', 'TEMPLATE_NAME_L', '0', '0', NOW(), NOW(), NULL, NULL);
-insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function, configuration_type) values ('Order completed', 'DEFAULT_ORDERS_STATUS_COMPLETED', '3', 'definir le status final d\'une commande livre', '0', '0', NULL, NOW(), NULL, NULL,2);
-insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function, configuration_type) values ('Order annulate', 'DEFAULT_ORDERS_STATUS_ANNULATE', '4', 'definir le status d\'une commande annule', '0', '0', NULL, NOW(), NULL, NULL,2);
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('DEFAULT_CURRENCY_S', 'DEFAULT_CURRENCY', 'EUR', 'DEFAULT_CURRENCY_L', '0', '0', NULL, NOW(), NULL, NULL);
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('DEFAULT_LANGUAGE_S', 'DEFAULT_LANGUAGE', 'fr', 'DEFAULT_LANGUAGE_L', '0', '1', NULL, NOW(), NULL, NULL);
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function , set_function) values ('WHOS_ONLINE_ACTIVE_S', 'WHOS_ONLINE_FLAG', 'false', 'WHOS_ONLINE_ACTIVE_L', '0', '0', NOW(), NOW(),NULL, 'tep_cfg_Non_Edit(\';\',');
@@ -34,7 +32,7 @@
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function , set_function,configuration_type) values ('CFG_CLASS_VIRTUAL_TYPE_4_S', 'CFG_CLASS_VIRTUAL_TYPE_4', '', 'CFG_CLASS_VIRTUAL_TYPE_L', '0', '0', NOW(), NOW(),NULL, 'tep_cfg_text_auto(', 1);
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function , set_function,configuration_type) values ('TYPE_VIRTUAL_PRODUCTS_S', 'TYPE_VIRTUAL_PRODUCTS', '3,4', 'TYPE_VIRTUAL_PRODUCTS_L', '0', '0', NOW(), NOW(),NULL, NULL, 2);
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function , set_function,configuration_type) values ('ORPHELIN_COLLECTOR_S', 'ORPHELIN_COLLECTOR', '1', 'ORPHELIN_COLLECTOR_L', '0', '0', NOW(), NOW(),NULL, NULL, 1);
-insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function , set_function,configuration_type) values ('PUBLIC_PAGE_TYPE_S', 'PUBLIC_PAGE_TYPE', 'listing,product,account,home,content', 'PUBLIC_PAGE_TYPE_L', '0', '0', NOW(), NOW(),NULL, NULL, 2);
+
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function , set_function,configuration_type) values ('PUBLIC_DRIVERS_PAGE_S', 'PUBLIC_DRIVERS_PAGE', 'GabaritTemplate', 'PUBLIC_DRIVERS_PAGE_L', '0', '0', NOW(), NOW(),NULL, NULL, 2);
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function , set_function,configuration_type) values ('NO_DISPLAY_SYMBOL_TAXE_S', 'NO_DISPLAY_SYMBOL_TAXE', 'GabaritTemplate', 'NO_DISPLAY_SYMBOL_TAXE_L', '0', '0', NOW(), NOW(),NULL, NULL, 2);
@@ -43,7 +41,7 @@
## 1 store
-insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, configuration_type) values ('ORDERS_NUMBER_PREFIX_S', 'ORDERS_NUMBER_PREFIX', 'ym-5', 'ORDERS_NUMBER_PREFIX_L', '1', '0', NULL, NOW(), '2');
+
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added) values ('STORE_NAME_S', 'STORE_NAME', 'osCSS Demo Shop', 'STORE_NAME_L', '1', '1', NULL, NOW());
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added) values ('STORE_OWNER_S', 'STORE_OWNER', 'osCSS Demo Shop', 'STORE_OWNER_L', '1', '2', NULL, NOW());
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, configuration_type) values ('STORE_OWNER_EMAIL_ADDRESS_S', 'STORE_OWNER_EMAIL_ADDRESS', 'root@localhost', 'STORE_OWNER_EMAIL_ADDRESS_L', '1', '3', NULL, NOW(), 2);
@@ -87,7 +85,6 @@
## 6 module option
-insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('DEFAULT_ORDERS_STATUS_ID_S', 'DEFAULT_ORDERS_STATUS_ID', '1', 'DEFAULT_ORDERS_STATUS_ID_L', '6', '2', NULL, NOW(), NULL, NULL);
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function, configuration_type ) values ('DEFAULT_RETURN_REASON_S', 'DEFAULT_RETURN_REASON', '2', 'DEFAULT_RETURN_REASON_L', '6', '3', '2003-02-27 06:44:29', '1000-01-01 00:00:00', NULL, NULL,4);
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function, configuration_type ) values ('DEFAULT_RETURN_STATUS_ID_S', 'DEFAULT_RETURN_STATUS_ID', '1', 'DEFAULT_RETURN_STATUS_ID_L', '6', '4', '2003-02-28 07:10:04', '1000-01-01 00:00:00', NULL, NULL,4);
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function, configuration_type ) values ('DEFAULT_REFUND_METHOD_S', 'DEFAULT_REFUND_METHOD', '1', 'DEFAULT_REFUND_METHOD_L', '6', '5', '2003-03-01 16:46:12', '1000-01-01 00:00:00', NULL, NULL,4);
@@ -350,8 +347,17 @@
## 128 General environement
insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function, configuration_type) values ('USE_LOCAL_GENERAT_PDF_S', 'USE_LOCAL_GENERAT_PDF', '10', 'USE_LOCAL_GENERAT_PDF_L', '128', '5', NULL, NOW(), 'tep_value_for_humain', 'tep_cfg_select_option(array(\'true\', \'false\'),','3');
-insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function, configuration_type) values ('USE_LOCAL_GENERAT_ORDER_REF_S', 'USE_LOCAL_GENERAT_ORDER_REF', '10', 'USE_LOCAL_GENERAT_ORDER_REF_L', '128', '5', NULL, NOW(), 'tep_value_for_humain', 'tep_cfg_select_option(array(\'true\', \'false\'),','3');
+## 129 option orders
+
+insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('DEFAULT_ORDERS_STATUS_ID_S', 'DEFAULT_ORDERS_STATUS_ID', '1', 'DEFAULT_ORDERS_STATUS_ID_L', '129', '2', NULL, NOW(), NULL, NULL);
+insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, configuration_type) values ('ORDERS_NUMBER_PREFIX_S', 'ORDERS_NUMBER_PREFIX', 'ym-5', 'ORDERS_NUMBER_PREFIX_L', '129', '0', NULL, NOW(), '2');
+insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function, configuration_type) values ('USE_LOCAL_GENERAT_ORDER_REF_S', 'USE_LOCAL_GENERAT_ORDER_REF', '10', 'USE_LOCAL_GENERAT_ORDER_REF_L', '129', '5', NULL, NOW(), 'tep_value_for_humain', 'tep_cfg_select_option(array(\'true\', \'false\'),','3');
+insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function, configuration_type) values ('DEFAULT_ORDERS_STATUS_COMPLETED_S', 'DEFAULT_ORDERS_STATUS_COMPLETED', '3', 'DEFAULT_ORDERS_STATUS_COMPLETED_L', '129', '0', NULL, NOW(), NULL, NULL,2);
+insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function, configuration_type) values ('DEFAULT_ORDERS_STATUS_ID_S', 'DEFAULT_ORDERS_STATUS_ANNULATE', '4', 'DEFAULT_ORDERS_STATUS_ID_L', '129', '0', NULL, NOW(), NULL, NULL,2);
+
+## 130 option data types
+insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function , set_function,configuration_type) values ('PUBLIC_PAGE_TYPE_S', 'PUBLIC_PAGE_TYPE', 'listing,product,account,home,content', 'PUBLIC_PAGE_TYPE_L', '130', '0', NOW(), NOW(),NULL, NULL, 2);
\ No newline at end of file
Modified: trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration_group.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration_group.sql 2011-10-25 09:04:08 UTC (rev 3846)
+++ trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration_group.sql 2011-10-25 17:48:09 UTC (rev 3847)
@@ -54,9 +54,10 @@
insert into osc_configuration_group values (28 , 'MEMBRES_DETAIL', NULL, 0 , 1, 110, '1', 'MODMEMBRES');
insert into osc_configuration_group values (29 , 'BOX_CONFIGURATION_TEMPLATE', NULL, 0 , 1, 100, '1', 'MODTEMPLATE');
insert into osc_configuration_group values (30 , 'BOX_LOCALIZATION_ORDERS_STATUS', NULL, 0 , 1, 110, '1', 'MODSTATUS');
-insert into osc_configuration_group values (31 , 'BOX_LOCALIZATION_LANGUAGES', NULL, 0 , 1, 110, '1', 'BOX_LOCALIZATION_LANGUAGES');
+insert into osc_configuration_group values (31 , 'BOX_LOCALIZATION_LANGUAGES', NULL, 0 , 1, 110, '1', 'MODLANGUE');
insert into osc_configuration_group values (33 , 'BOX_CONFIGURATION_EXTRA_FIELDS', NULL, 0 , 1, 120, '1', 'MODCUSTEXTRA');
insert into osc_configuration_group values (34 , 'BOX_CONFIGURATION_PRODUCTS_EXTRA_FIELDS', NULL, 0 , 1, 120, '1', 'MODPRODEXTRA');
insert into osc_configuration_group values (128,'BOX_CONFIGURATION_ENVIRONEMENT', NULL, 0, 1, 120, '1', 'CFG_ENVIRONEMENT');
+insert into osc_configuration_group values (129,'CONFIGURATION_ORDERS', NULL, 0, 1, 127, '1', 'MODORDER');
+insert into osc_configuration_group values (129,'CONFIGURATION_DATATYPES', NULL, 0, 1, 127, '1', 'MODDATATYPE');
-
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2011-10-25 09:04:14
|
Revision: 3846
http://oscss.svn.sourceforge.net/oscss/?rev=3846&view=rev
Author: oscim
Date: 2011-10-25 09:04:08 +0000 (Tue, 25 Oct 2011)
Log Message:
-----------
Ajout element manquant des dashbords, ajout de widget de base a completer
correction coquille notice class language
Modified Paths:
--------------
trunk/catalog/admin/includes/data/dashboard.xml
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/index.txt
trunk/catalog/common/classes/language.php
trunk/catalog/common/oscss.version.xml
trunk/catalog/install/includes/content/core.template_sample.php
Added Paths:
-----------
trunk/catalog/admin/includes/languages/fr_FR/widget/HelpConfig.txt
trunk/catalog/admin/includes/languages/fr_FR/widget/SsMenuConfig.txt
trunk/catalog/admin/includes/widget/HelpConfig.php
trunk/catalog/admin/includes/widget/SsMenuConfig.php
Modified: trunk/catalog/admin/includes/data/dashboard.xml
===================================================================
--- trunk/catalog/admin/includes/data/dashboard.xml 2011-10-24 21:23:43 UTC (rev 3845)
+++ trunk/catalog/admin/includes/data/dashboard.xml 2011-10-25 09:04:08 UTC (rev 3846)
@@ -85,4 +85,45 @@
<widget>info_connexion</widget>
</right>
</configuration>
+
+ <config_100>
+ <left>
+ <widget>HelpConfig</widget>
+ </left>
+ <right>
+ <widget>SsMenuConfig</widget>
+ </right>
+ </config_100>
+ <config_110>
+ <left>
+ <widget>HelpConfig</widget>
+ </left>
+ <right>
+ <widget>SsMenuConfig</widget>
+ </right>
+ </config_110>
+ <config_120>
+ <left>
+ <widget>HelpConfig</widget>
+ </left>
+ <right>
+ <widget>SsMenuConfig</widget>
+ </right>
+ </config_120>
+ <config_126>
+ <left>
+ <widget>HelpConfig</widget>
+ </left>
+ <right>
+ <widget>SsMenuConfig</widget>
+ </right>
+ </config_126>
+ <config_127>
+ <left>
+ <widget>HelpConfig</widget>
+ </left>
+ <right>
+ <widget>SsMenuConfig</widget>
+ </right>
+ </config_127>
</root>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/pages/index.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/pages/index.txt 2011-10-24 21:23:43 UTC (rev 3845)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/index.txt 2011-10-25 09:04:08 UTC (rev 3846)
@@ -2,8 +2,8 @@
/**
@licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.1.0
- @date 23/03/11, 16:10
+ @version 2.1.1
+ @date 25/10/11, 11:00
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -17,7 +17,13 @@
$lang['heading title modules']="Aperçu" ;
$lang['heading title configuration']="Aperçu de la configuration" ;
+$lang['heading title config_100']="Configuration de l'apparence" ;
+$lang['heading title config_110']="Configuration de base" ;
+$lang['heading title config_120']="Configuration avancée" ;
+$lang['heading title config_126']="Configuration de l'environement admin" ;
+$lang['heading title config_127']="Configuration commerciale de votre boutique" ;
+
$lang['HEADING_STOCK']="Stock Alerte" ;
$lang['TEXT_OSCSS_VERSION']="version d'osCSS" ;
$lang['ERROR_FOPEN']="Ne peut pas vérifier la mise à jour si 'allow_url_fopen' est désactivé sur votre système.." ;
Added: trunk/catalog/admin/includes/languages/fr_FR/widget/HelpConfig.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/widget/HelpConfig.txt (rev 0)
+++ trunk/catalog/admin/includes/languages/fr_FR/widget/HelpConfig.txt 2011-10-25 09:04:08 UTC (rev 3846)
@@ -0,0 +1,20 @@
+<?php
+/**
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 25/10/11, 11:00
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+
+$lang['widget help config config_110']="Configuration de base" ;
+$lang['widget help config config_100']="Configuration de l'apparence" ;
+$lang['widget help config config_120']="Configuration avancée" ;
+$lang['widget help config config_126']="Configuration de l'environement admin" ;
+$lang['widget help config config_127']="Configuration commerciale de votre boutique" ;
+
+
+$lang['widget text help config_110']="Dans cette section de la configuration, vous pouvez regler les informations de base de la boutique. Cette Etape est un prerequis pour un le focntionnement normal de votre shop. Notez que ces information ne sont en generale reglé qu'une seule fois; " ;
+?>
\ No newline at end of file
Added: trunk/catalog/admin/includes/languages/fr_FR/widget/SsMenuConfig.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/widget/SsMenuConfig.txt (rev 0)
+++ trunk/catalog/admin/includes/languages/fr_FR/widget/SsMenuConfig.txt 2011-10-25 09:04:08 UTC (rev 3846)
@@ -0,0 +1,16 @@
+<?php
+/**
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 25/10/11, 11:00
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+$lang['widget ssmenuconfig config_110']="Menu" ;
+$lang['widget ssmenuconfig config_100']="Menu" ;
+$lang['widget ssmenuconfig config_120']="Menu" ;
+$lang['widget ssmenuconfig config_126']="Menu" ;
+$lang['widget ssmenuconfig config_127']="Menu" ;
+?>
\ No newline at end of file
Added: trunk/catalog/admin/includes/widget/HelpConfig.php
===================================================================
--- trunk/catalog/admin/includes/widget/HelpConfig.php (rev 0)
+++ trunk/catalog/admin/includes/widget/HelpConfig.php 2011-10-25 09:04:08 UTC (rev 3846)
@@ -0,0 +1,28 @@
+<?php
+/**
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 25/10/11, 11:00
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+?>
+
+<div id="HelpConfig" class="<?php echo $widg['class'] ?>" >
+ <h3><?php echo __('widget help config '.@$_GET['type']) ?></h3>
+
+
+ <?php
+ switch(@$_GET['type']){
+
+ case 'config_110':
+ echo __('widget text help config_110');
+ break;
+
+
+ }
+
+ ?>
+</div>
\ No newline at end of file
Added: trunk/catalog/admin/includes/widget/SsMenuConfig.php
===================================================================
--- trunk/catalog/admin/includes/widget/SsMenuConfig.php (rev 0)
+++ trunk/catalog/admin/includes/widget/SsMenuConfig.php 2011-10-25 09:04:08 UTC (rev 3846)
@@ -0,0 +1,22 @@
+<?php
+/**
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 25/10/11, 11:00
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+require_once(DIR_WS_FUNCTIONS.'lib.configuration.php');
+?>
+
+
+<div id="SsMenuConfig" class="<?php echo $widg['class'] ?>" >
+ <h3><?php echo __('widget ssmenuconfig '.@$_GET['type']) ?></h3>
+
+ <div id="ssmenu">
+ <?php echo tep_ssmenu_configuration((int)substr($_GET['type'],7)) ?>
+ </div>
+ <br />
+</div>
\ No newline at end of file
Modified: trunk/catalog/common/classes/language.php
===================================================================
--- trunk/catalog/common/classes/language.php 2011-10-24 21:23:43 UTC (rev 3845)
+++ trunk/catalog/common/classes/language.php 2011-10-25 09:04:08 UTC (rev 3846)
@@ -175,7 +175,7 @@
private static function check_langue($directory,$public){
$base=(!$public)? DIR_FS_ADMIN : DIR_FS_CATALOG ;
if(is_dir($base.DIR_WS_LANGUAGES.$directory)) return true;
- elseif(tep_cst_define('OSCSS_ALTERNATE') == true && is_dir(CORE_PATH.DIR_WS_LANGUAGES.$directory)) return true;
+// elseif(tep_cst_define('OSCSS_ALTERNATE') == true && is_dir(CORE_PATH.DIR_WS_LANGUAGES.$directory)) return true;
return false;
}
}
Modified: trunk/catalog/common/oscss.version.xml
===================================================================
--- trunk/catalog/common/oscss.version.xml 2011-10-24 21:23:43 UTC (rev 3845)
+++ trunk/catalog/common/oscss.version.xml 2011-10-25 09:04:08 UTC (rev 3846)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<core>
<version>2.1.0 RC</version>
- <svn>3786</svn>
+ <svn>3845</svn>
<level>stable</level>
<template_admin>oscss</template_admin>
Modified: trunk/catalog/install/includes/content/core.template_sample.php
===================================================================
--- trunk/catalog/install/includes/content/core.template_sample.php 2011-10-24 21:23:43 UTC (rev 3845)
+++ trunk/catalog/install/includes/content/core.template_sample.php 2011-10-25 09:04:08 UTC (rev 3846)
@@ -71,7 +71,7 @@
Langue supplementaire
*/
- include($this->fs_document_root.$this->ws_admin_rand.'/includes/modules/configuration/cfg_31.php');
+ include($this->fs_document_root.$this->ws_admin_rand.'/includes/modules/configuration/modlangue.php');
if(isset($_POST['lang']) && is_array($_POST['lang']))
foreach($_POST['lang'] as $key=>$cfg){
core::recurse_copy( $this->fs_document_root . 'install/'.I_WS_DATA.'language/'.$key.'/public/', $this->fs_document_root .'includes/languages/');
@@ -81,7 +81,7 @@
osc_db_query($sql="insert into ".$this->db['DB_TABLE_PREFIX']."languages (name,code,image,directory,sort_order) VALUES ('".core::l10n($key)."','".$key."','icon.gif','".$key."','2') " );
$insert_id=tep_db_insert_id();
- cfg_31::repliqu_db_lang('1',$insert_id);
+ modlangue::repliqu_db_lang('1',$insert_id);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2011-10-24 21:23:49
|
Revision: 3845
http://oscss.svn.sourceforge.net/oscss/?rev=3845&view=rev
Author: oscim
Date: 2011-10-24 21:23:43 +0000 (Mon, 24 Oct 2011)
Log Message:
-----------
suite amelioration gestion expedition / livraisons
Modified Paths:
--------------
trunk/catalog/admin/includes/classes/modulesUtility.php
trunk/catalog/admin/includes/gabarit/configuration/modexpedition.listing.gab
trunk/catalog/admin/includes/modules/configuration/modexpedition.php
Modified: trunk/catalog/admin/includes/classes/modulesUtility.php
===================================================================
--- trunk/catalog/admin/includes/classes/modulesUtility.php 2011-10-24 16:21:27 UTC (rev 3844)
+++ trunk/catalog/admin/includes/classes/modulesUtility.php 2011-10-24 21:23:43 UTC (rev 3845)
@@ -39,7 +39,28 @@
}
+ /**
+ @fn GetModttype($type)
+ @brief Get detail type module
+ @param $type string type
+ */
+ static public function GetModttype($type){
+ self::getInstance();
+ if(isset(self::$pathType[$type]))
+ return new objectInfo(self::$pathType[$type]);
+ else
+ return false;
+ }
+
+
+
+ /**
+ @fn
+ @brief
+ @param
+ @param
+ */
static public function GetModule($type, $filename){
self::getInstance();
@@ -49,10 +70,7 @@
- if(isset(self::$pathType[$type])){
-
- $dt=new objectInfo(self::$pathType[$type]);
-
+ if( ($dt = self::GetModttype($type)) !=false ){
$r->detail = self::info_module($filename,DIR_FS_CATALOG.DIR_WS_MODULES.$dt->module_directory, DIR_FS_ADMIN.DIR_WS_MODULES.$dt->module_directory, '.php');
}
@@ -60,7 +78,12 @@
return $r;
}
-
+ /**
+ @fn LoadModule($type, $filename)
+ @brief Load module
+ @param $type
+ @param $filename
+ */
static public function LoadModule($type, $filename){
global $language,$oscss;
@@ -74,11 +97,8 @@
- if(isset(self::$pathType[$type])){
+ if( ($dt = self::GetModttype($type)) !=false ){
- $dt=new objectInfo(self::$pathType[$type]);
-
-
$r->status = (bool)(in_array($filename,explode(';',$dt->value)));
$r->detail = self::info_module($filename,DIR_FS_CATALOG.DIR_WS_MODULES.$dt->module_directory, DIR_FS_ADMIN.DIR_WS_MODULES.$dt->module_directory, '.php');
Modified: trunk/catalog/admin/includes/gabarit/configuration/modexpedition.listing.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/configuration/modexpedition.listing.gab 2011-10-24 16:21:27 UTC (rev 3844)
+++ trunk/catalog/admin/includes/gabarit/configuration/modexpedition.listing.gab 2011-10-24 21:23:43 UTC (rev 3845)
@@ -156,7 +156,7 @@
<div id="tabs-3" class="tabPage">
<?php /** Liste des moduel de livraison */ ?>
- <?php echo tep_draw_form('configuration', FILENAME_CONFIGURATION, 'gparentID=' . $_GET['gparentID'].'&gID=' . $_GET['gID'] . '&action=modules') ?>
+
<div id="modexpedition-module" class="block_form">
<h4 class="main-title"><?php echo __('modexpedition heading modules shipping'); ?></h4>
@@ -181,13 +181,17 @@
<td class="tcenter"><?php echo $row->content->sort_order; ?></td>
<td class="tcenter"><?php
if($row->status) {
- echo tep_image(DIR_WS_ICONS . 'icon_status_green.gif', IMAGE_ICON_STATUS_GREEN) . ' <a href="' . tep_href_link(FILENAME_CONFIGURATION, 'gparentID=' . $_GET['gparentID'].'&gID=' . $_GET['gID'] . '&action=modules'.'&flag=0' ) . '">' . tep_image(DIR_WS_ICONS . 'icon_status_red_light.gif', IMAGE_ICON_STATUS_RED_LIGHT) . '</a>';
+ echo tep_image(DIR_WS_ICONS . 'icon_status_green.gif', IMAGE_ICON_STATUS_GREEN) . ' <a href="' . tep_href_link(FILENAME_CONFIGURATION, 'gparentID=' . $_GET['gparentID'].'&gID=' . $_GET['gID'] . '&action=modules&mod='.$row->content->code.'&flag=0' ) . '">' . tep_image(DIR_WS_ICONS . 'icon_status_red_light.gif', IMAGE_ICON_STATUS_RED_LIGHT) . '</a>';
} else {
- echo '<a href="' . tep_href_link(FILENAME_CONFIGURATION, 'gparentID=' . $_GET['gparentID'].'&gID=' . $_GET['gID'] . '&action=modules'.'&flag=1') . '">' . tep_image(DIR_WS_ICONS . 'icon_status_green_light.gif', IMAGE_ICON_STATUS_GREEN_LIGHT) . '</a> ' . tep_image(DIR_WS_ICONS . 'icon_status_red.gif', IMAGE_ICON_STATUS_RED);
+ echo '<a href="' . tep_href_link(FILENAME_CONFIGURATION, 'gparentID=' . $_GET['gparentID'].'&gID=' . $_GET['gID'] . '&action=modules&mod='.$row->content->code.'&flag=1') . '">' . tep_image(DIR_WS_ICONS . 'icon_status_green_light.gif', IMAGE_ICON_STATUS_GREEN_LIGHT) . '</a> ' . tep_image(DIR_WS_ICONS . 'icon_status_red.gif', IMAGE_ICON_STATUS_RED);
}
?></td>
<td class="tright">
- <?php echo '' ?>
+<?php
+ if($row->status) {
+ echo ' <a href="' . tep_href_link(FILENAME_CONFIGURATION, 'gparentID=' . $_GET['gparentID'].'&gID=' . $_GET['gID'] . '&action=modules-edit&mod='.$row->content->code.'' ) . '"> Config </a>' ;
+}
+ ?>
</td>
</tr>
<?php endforeach; ?>
@@ -195,12 +199,28 @@
</table>
+
+
+
+ <?php if(isset(modexpedition::$moduleEdit)): ?>
+
+ <?php echo tep_draw_form('configuration', FILENAME_CONFIGURATION, 'gparentID=' . $_GET['gparentID'].'&gID=' . $_GET['gID'] . '&mod='.$_GET['mod'].'&action=modules-save') ?>
+ <fieldset class="block_field">
+ <legend><?php echo __('modexpedition heading Configuration du modules') ?></legend>
+ <?php echo modexpedition::$moduleEdit; ?>
+
<div class="button_nav">
<?php print tep_image_submit('button_copy.gif', IMAGE_UPDATE) .tep_js_back(tep_href_link(FILENAME_CONFIGURATION, 'gparentID=' . $_GET['gparentID'].'&gID=' . $_GET['gID'] )) ; ?>
</div>
+ </fieldset>
+ </form>
+ <?php endif; ?>
+
+
</div>
- </form>
+
+
</div>
</div>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/modules/configuration/modexpedition.php
===================================================================
--- trunk/catalog/admin/includes/modules/configuration/modexpedition.php 2011-10-24 16:21:27 UTC (rev 3844)
+++ trunk/catalog/admin/includes/modules/configuration/modexpedition.php 2011-10-24 21:23:43 UTC (rev 3845)
@@ -32,7 +32,14 @@
*/
public static $module;
/**
+ @var array
*/
+ public static $moduleEdit;
+
+
+
+ /**
+ */
function __construct(){
global $oscss;
$this->code=__CLASS__;
@@ -111,13 +118,90 @@
*/
case 'modules':
+
if(isset($_GET['flag'])){
+ $mod=tep_db_prepare_input($_GET['mod']);
+ $flag=(int)tep_db_prepare_input($_GET['flag']);
+
+ // call type module
+ $typeOri=modulesUtility::GetModttype('shipping');
+ // get current value
+ $current = sqlconfiguration::fetch(array('key'=>$typeOri->key), true);
+
+
+
+ // call
+ $type=modulesUtility::LoadModule('shipping',$mod.'.php');
+ // force install
+ if( $flag ==1 && !$type->content->check()){
+ $type->content->remove();
+ $type->content->install();
+ }
+ // force remove
+ elseif( $flag == 0 && $type->content->check())
+ $type->content->remove();
+
+ // up module
+ $r=explode(';',$typeOri->value);
+ $result[]=( ($flag ==1 ) ? $mod.'.php;' : '' );
+
+ foreach($r as $v)
+ if(trim($v) !='')
+ if( (
+ $flag ==1
+ || ($flag == 0 && $v != trim($mod).'.php' )
+ )
+ && !in_array($v,$result)
+ ){
+ $result[]=$v;
+ }
+
+ sqlconfiguration::update(array('id'=>$current->id, 'value'=>implode(';',$result)) );
+
+
tep_redirect(tep_href_link(FILENAME_CONFIGURATION, 'gparentID=' . $gparentID.'&gID=' . $_GET['gID'] . '#modexpedition-module' ));
}
+ break;
+ case 'modules-edit':
+ $mod=tep_db_prepare_input($_GET['mod']);
+ // call
+ $Mod=modulesUtility::LoadModule('shipping',$mod.'.php');
+ $ModCurr = $Mod->content;
+ $i=0;
+ foreach($ModCurr->keys() as $value){
+ $i++;
+ $current = sqlconfiguration::fetch(array('key'=>$value));
+
+ $keys_extra[$value]['title'] = $current['configuration_title'];
+ $keys_extra[$value]['value'] = $current['configuration_value'];
+ $keys_extra[$value]['description'] = $current['configuration_description'];
+ $keys_extra[$value]['use_function'] = $current['use_function'];
+ $keys_extra[$value]['set_function'] = $current['set_function'];
+ }
+
+ self::$moduleEdit = configUtility::FormatEditAuto(array('array'=>$keys_extra));
break;
+ /**
+ @brief save Config base page
+ */
+ case 'modules-save':
+ foreach($_POST['configuration'] as $key=>$value) {
+
+ $configuration_value = tep_db_prepare_input($value);
+
+ if( ($res=sqlconfiguration::update(array('key'=>$key , 'value'=>tep_db_input($value) ))) == false)$erreur[]=false;
+ else $erreur[]=true;
+
+ }
+
+ if(!in_array(false,$erreur)) $messageStack->add_session(SAVE_CONFIG_OK, 'success');
+ else $messageStack->add_session(SAVE_CONFIG_NOT_OK, 'error');
+
+ tep_redirect(tep_href_link(FILENAME_CONFIGURATION, 'gparentID=' . $gparentID.'&gID=' . $_GET['gID'] . '&action=modules-edit&mod='. $_GET['mod'] ));
+ break;
}
}
@@ -163,6 +247,10 @@
white-space: pre-wrap;
width: 90%;
}
+#central form label {
+ width:100%;
+ font-weight:bold;
+}
</style>
<?php
}
@@ -191,6 +279,10 @@
}
}
+
+
+
+
return tep_get_include_contents('configuration/'.__CLASS__.'.listing');
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|