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...> - 2012-05-07 19:14:36
|
Revision: 4395
http://oscss.svn.sourceforge.net/oscss/?rev=4395&view=rev
Author: oscim
Date: 2012-05-07 19:14:30 +0000 (Mon, 07 May 2012)
Log Message:
-----------
suppression des plugin de abse deport?\195?\169 sur le template par defaut
Removed Paths:
-------------
trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/plugins/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-05-07 19:06:48
|
Revision: 4394
http://oscss.svn.sourceforge.net/oscss/?rev=4394&view=rev
Author: oscim
Date: 2012-05-07 19:06:39 +0000 (Mon, 07 May 2012)
Log Message:
-----------
correction coquille
amelioration recuperation des cat avec datatype precis
correction sitemap et ajout comementaire
nettoage elemetn de configuration
implementation de la prise en charge des plugin dans le template par defaut
Ajout des plugin de base
Modified Paths:
--------------
trunk/catalog/admin/includes/modules/pages/plugins.php
trunk/catalog/includes/classes/category_tree.php
trunk/catalog/includes/classes/core_page/javascript.php
trunk/catalog/includes/classes/core_page/overlay/oscss_plugins.php
trunk/catalog/includes/classes/page.php
trunk/catalog/includes/functions/template.php
trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql
trunk/catalog/templates/defaut/includes/content/sitemap.php
Added Paths:
-----------
trunk/catalog/templates/defaut/includes/plugins/
trunk/catalog/templates/defaut/includes/plugins/generic/
trunk/catalog/templates/defaut/includes/plugins/generic/lazyload/
trunk/catalog/templates/defaut/includes/plugins/generic/lazyload/includes_header.php
trunk/catalog/templates/defaut/includes/plugins/generic/lazyload/lib/
trunk/catalog/templates/defaut/includes/plugins/generic/lazyload/lib/jquery.lazyload.js
trunk/catalog/templates/defaut/includes/plugins/generic/slider/
trunk/catalog/templates/defaut/includes/plugins/generic/slider/images/
trunk/catalog/templates/defaut/includes/plugins/generic/slider/images/header-bg.png
trunk/catalog/templates/defaut/includes/plugins/generic/slider/images/nav-bg.png
trunk/catalog/templates/defaut/includes/plugins/generic/slider/images/silde-nav.png
trunk/catalog/templates/defaut/includes/plugins/generic/slider/images/slide-bg.png
trunk/catalog/templates/defaut/includes/plugins/generic/slider/inc/
trunk/catalog/templates/defaut/includes/plugins/generic/slider/inc/easySlider.css
trunk/catalog/templates/defaut/includes/plugins/generic/slider/inc/easySlider1.7.js
trunk/catalog/templates/defaut/includes/plugins/generic/slider/inc/slider.js
trunk/catalog/templates/defaut/includes/plugins/generic/slider/includes_header.php
trunk/catalog/templates/defaut/includes/plugins/product/
trunk/catalog/templates/defaut/includes/plugins/product/slimbox/
trunk/catalog/templates/defaut/includes/plugins/product/slimbox/inc/
trunk/catalog/templates/defaut/includes/plugins/product/slimbox/inc/closelabel.gif
trunk/catalog/templates/defaut/includes/plugins/product/slimbox/inc/loading.gif
trunk/catalog/templates/defaut/includes/plugins/product/slimbox/inc/nextlabel.gif
trunk/catalog/templates/defaut/includes/plugins/product/slimbox/inc/prevlabel.gif
trunk/catalog/templates/defaut/includes/plugins/product/slimbox/inc/slimbox2-rtl.css
trunk/catalog/templates/defaut/includes/plugins/product/slimbox/inc/slimbox2.css
trunk/catalog/templates/defaut/includes/plugins/product/slimbox/inc/slimbox2.js
trunk/catalog/templates/defaut/includes/plugins/product/slimbox/includes_header.php
trunk/catalog/templates/defaut/includes/plugins/product/uicoretabs/
trunk/catalog/templates/defaut/includes/plugins/product/uicoretabs/includes_header.php
Modified: trunk/catalog/admin/includes/modules/pages/plugins.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/plugins.php 2012-05-07 17:11:15 UTC (rev 4393)
+++ trunk/catalog/admin/includes/modules/pages/plugins.php 2012-05-07 19:06:39 UTC (rev 4394)
@@ -1,10 +1,10 @@
<?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
+ @licence GPL 2005-2012 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 02/10/10, 22:52
+ @version 2.1.1
+ @date 09/05/2012, 22:52
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class plugins
@@ -14,7 +14,10 @@
class plugins
extends package
- implements ExtModPage, InterfaceModule {
+// implements
+// ExtModPage,
+// InterfaceModule
+ {
const FILENAME =FILENAME_PLUGINS;
@@ -55,7 +58,8 @@
$module_type = '';
- self::$plugin_directory = DIR_FS_TEMPLATES . TEMPLATE_NAME . '/includes/plugins/' ;
+ self::$plugin_directory[] = DIR_FS_TEMPLATES . DEFAULT_TEMPLATE_NAME . '/includes/plugins/' ;
+ self::$plugin_directory[] = DIR_FS_TEMPLATES . TEMPLATE_NAME . '/includes/plugins/' ;
require(DIR_WS_FUNCTIONS . 'lib.configuration.php');
}
@@ -113,7 +117,7 @@
$(function(){
$(".tirroir").slideToggle("slow");
$("h5").click(function () {
- $(this).next().slideToggle("slow");
+ $(this).next().slideToggle("slow");
});
});
@@ -133,12 +137,12 @@
self::$src=parent::load_repository();
$modules_array= array();
- foreach(self::$code_inistalletd_array as $key=>$value) {
- $plugin_directory3235=self::$plugin_directory.$key.'/';
+ foreach(self::$plugin_directory as $path)
+ foreach(self::$code_inistalletd_array as $key=>$value) {
+ $plugin_directory3235=$path.$key.'/';
+ $modules_array=self::cstr_menu($plugin_directory3235,$modules_array,$key);
+ }
- $modules_array=self::cstr_menu($plugin_directory3235,$modules_array,$key);
-
- }
}
public function display_view(){
@@ -230,11 +234,11 @@
$k=preg_replace('#(.*/)#i','',$direct);
if(file_exists($direct.'/admin_config.php')) {
- $modules_array[$type][$k]=array('path'=>$direct,'file'=>$file, 'edit'=>'admin_config.php');
- self::$list[]=array('key'=>$k,'type'=>$type,'path'=>$direct,'file'=>$file, 'edit'=>'admin_config.php', 'detail'=>self::SeraccInSrc($k));
+ $modules_array[$type][$k]=array('path'=>$direct,'file'=>$file, 'edit'=>'admin_config.php');
+ self::$list[]=array('key'=>$k,'type'=>$type,'path'=>$direct,'file'=>$file, 'edit'=>'admin_config.php', 'detail'=>self::SeraccInSrc($k));
}else{
- $modules_array[$type][$k]=array('path'=>$direct,'file'=>$file);
- self::$list[]=array('key'=>$k,'type'=>$type,'path'=>$direct,'file'=>$file, 'detail'=>self::SeraccInSrc($k));
+ $modules_array[$type][$k]=array('path'=>$direct,'file'=>$file);
+ self::$list[]=array('key'=>$k,'type'=>$type,'path'=>$direct,'file'=>$file, 'detail'=>self::SeraccInSrc($k));
}
Modified: trunk/catalog/includes/classes/category_tree.php
===================================================================
--- trunk/catalog/includes/classes/category_tree.php 2012-05-07 17:11:15 UTC (rev 4393)
+++ trunk/catalog/includes/classes/category_tree.php 2012-05-07 19:06:39 UTC (rev 4394)
@@ -68,6 +68,8 @@
if(tep_not_null($this->datatype))
$sql .= "AND categories_datatype = '".$this->datatype."' ";
+ else
+ $sql .= "AND categories_datatype = '".DATATYPES_DEFAULT_NOSELECTED."' ";
categorie::add_where_query($sql);
$list = categorie::get_query('','','',array('limit'=>0));
Modified: trunk/catalog/includes/classes/core_page/javascript.php
===================================================================
--- trunk/catalog/includes/classes/core_page/javascript.php 2012-05-07 17:11:15 UTC (rev 4393)
+++ trunk/catalog/includes/classes/core_page/javascript.php 2012-05-07 19:06:39 UTC (rev 4394)
@@ -1,10 +1,10 @@
<?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
+ @licence GPL 2005-2012 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/01/11, 14:13
+ @version 2.1.1
+ @date 09/05/2012, 18:40
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
\class javascript
@@ -182,8 +182,9 @@
default:
if (isset($r['value']['file']) && is_array($r['value']['file'])){
foreach($r['value']['file'] as $key=>$value){
- if(isset($r['value']['place']) && $r['value']['place']=='footer') $page->add_file_footer($value,array('sort'=>$r['value']['sort']));
- elseif(!isset($r['value']['place']) || $r['value']['place']=='header') $this->add_script($value, array('sort'=>$r['value']['sort']) );
+ if(isset($r['value']['place']) && $r['value']['place']=='footer') $page->add_file_footer($value,array('sort'=>$r['value']['sort']));
+ elseif(!isset($r['value']['place']) || $r['value']['place']=='header') $this->add_script($value, array('sort'=>$r['value']['sort']) );
+ else $this->add_script($value, array('sort'=>$r['value']['sort']) );
}
}
}
@@ -200,7 +201,8 @@
function cstr_header(){
global $page;
- if (isset($this->framework['name'])) $page->add_file_header($this->framework['path'].$this->framework['name'],array('sort'=>3));
+ if (isset($this->framework['name']))
+ $page->add_file_header($this->framework['path'].$this->framework['name'],array('sort'=>3));
/** Appel element ACA get_header_js */
if( ($name=$page->the_type()) && ($page->return_object($name) !=false) ) {
@@ -211,10 +213,12 @@
while ($e=each($this->script)){
if(isset($e['value']['file'])) {
$s=(isset($e['value']['sort']))? $e['value']['sort'] : 5;
+
if(!isset($e['value']['place']) || $e['value']['place']=='header') $page->add_file_header($e['value']['path'].$e['value']['file'],array('sort'=>$s));
- elseif(isset($e['value']['place']) && $e['value']['place']=='footer') $page->add_file_footer($e['value']['path'].$e['value']['file'],array('sort'=>$s));
+ elseif(isset($e['value']['place']) && $e['value']['place']=='footer') $page->add_file_footer($e['value']['path'].$e['value']['file'],array('sort'=>$s));
}
- else print unhtmlentities($e['value']['script']);
+ else
+ print unhtmlentities($e['value']['script']);
}
}
Modified: trunk/catalog/includes/classes/core_page/overlay/oscss_plugins.php
===================================================================
--- trunk/catalog/includes/classes/core_page/overlay/oscss_plugins.php 2012-05-07 17:11:15 UTC (rev 4393)
+++ trunk/catalog/includes/classes/core_page/overlay/oscss_plugins.php 2012-05-07 19:06:39 UTC (rev 4394)
@@ -1,10 +1,10 @@
<?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
+ @licence GPL 2005-2012 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 24/10/10, 18:40
+ @version 2.1.1
+ @date 09/05/2012, 18:40
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class oscss_plugins
@@ -43,6 +43,7 @@
while (list ($key, $file) = each ($files_array)) $class[]=substr($file,0, strlen($file)-4 );
}
}
+
return $class;
}
@@ -88,51 +89,83 @@
if(is_array($page->page['plugins']['present']))
while ($r = each($page->page['plugins']['present'])) {
+
+ $active = false;
$res=5;
$file=$r['value'];
$dir_ws_here = $page->getPathTemplate(). DIR_WS_INCLUDES. 'plugins/generic/'.$file. '/';
$path= $dir_ws_here. 'includes_header.php';
if (page::TestFile($path)){
- $array_file[]=$path;
- if(!self::testCache($path) && !function_exists($r['value'].'_scripts')){
- require_once($path);
- $recache[]=true;
- }
- $fct=$r['value'].'_sort';
- if (function_exists($fct))$res=$fct();
- $i=(isset($res)? $res : $i_sort);
- $sort[$file]=$i;
+ $active = true;
+ $fpath = $path;
+ }
+ $dir_ws_here = DIR_WS_TEMPLATES . DEFAULT_TEMPLATE_NAME.'/'. DIR_WS_INCLUDES. 'plugins/generic/'.$file. '/';
+ $path= $dir_ws_here. 'includes_header.php';
+ if (page::TestFile($path)){
+ $active = true;
+ $fpath = $path;
+ }
+
+ if($active){
+ $array_file[]=$fpath;
+ if(!self::testCache($fpath) && !function_exists($r['value'].'_scripts')){
+
+ require_once($fpath);
+ $recache[]=true;
+ }
+ $fct=$r['value'].'_sort';
+ if (function_exists($fct))$res=$fct();
+ $i=(isset($res)? $res : $i_sort);
+ $sort[$file]=$i;
}
}
if(isset($page->page['plugins']['type']) && is_array($page->page['plugins']['type']))
while ($r = each($page->page['plugins']['type'])) {
+
+ $active = false;
$res=5;
$file=$r['value'];
$dir_ws_here = $page->getPathTemplate(). DIR_WS_INCLUDES. 'plugins/'.$page->the_type().'/'.$file. '/';
$path= $dir_ws_here. 'includes_header.php';
if (page::TestFile($path)){
- $array_file[]=$path;
- if(!self::testCache($path) && !function_exists($r['value'].'_scripts')){
- require_once($path);
- $recache[]=true;
- }
- $fct=$r['value'].'_sort';
- if (function_exists($fct))$res=$fct();
- $i=(isset($res)? $res : $i_sort);
- $sort[$file]=$i;
+ $active = true;
+ $fpath = $path;
+ }
+ $dir_ws_here = DIR_WS_TEMPLATES . DEFAULT_TEMPLATE_NAME.'/'. DIR_WS_INCLUDES. 'plugins/'.$page->the_type().'/'.$file. '/';
+ $path= $dir_ws_here. 'includes_header.php';
+ if (page::TestFile($path)){
+ $active = true;
+ $fpath = $path;
+ }
+
+ if($active){
+ $array_file[]=$fpath;
+ if(!self::testCache($fpath) && !function_exists($r['value'].'_scripts')){
+ require_once($fpath);
+ $recache[]=true;
+ }
+ $fct=$r['value'].'_sort';
+ if (function_exists($fct))
+ $res=$fct();
+
+ $i=(isset($res)? $res : $i_sort);
+ $sort[$file]=$i;
}
}
-
asort($sort);
foreach($sort as $file=>$i)
$page->page['plugins']['actif'][]=$file;
+
if ($cache === false || in_array(true,$recache) ) {
- if(! _test_bool(OSCSS_DEBUG) )CacheLib::addfiles($array_file);
+ if(! _test_bool(OSCSS_DEBUG) )
+ CacheLib::addfiles($array_file);
}
}
+
+
}
?>
\ No newline at end of file
Modified: trunk/catalog/includes/classes/page.php
===================================================================
--- trunk/catalog/includes/classes/page.php 2012-05-07 17:11:15 UTC (rev 4393)
+++ trunk/catalog/includes/classes/page.php 2012-05-07 19:06:39 UTC (rev 4394)
@@ -550,10 +550,8 @@
$this->oscss_get_gabarit_template();
///! recup elements des plugins
$this->page['plugins']['present']=$this->oscss_plugins->plugins_active('generic');
+ $this->page['plugins']['type']=$this->oscss_plugins->plugins_active($this->the_type());
- if(self::TestFile($this->getPathTemplate() . DIR_WS_INCLUDES. 'plugins/'.$this->the_type().'/'))
- $this->page['plugins']['type']=$this->oscss_plugins->plugins_active($this->the_type());
-
//! fil rouge
if($bread) {
if(($this->page['type']=='account')&& $this->page['script'] !=FILENAME_ACCOUNT ) $this->breadcrumb->add(NAVBAR_TITLE_1, tep_href_link(FILENAME_ACCOUNT, '', 'SSL'));
Modified: trunk/catalog/includes/functions/template.php
===================================================================
--- trunk/catalog/includes/functions/template.php 2012-05-07 17:11:15 UTC (rev 4393)
+++ trunk/catalog/includes/functions/template.php 2012-05-07 19:06:39 UTC (rev 4394)
@@ -4,13 +4,12 @@
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.2
- @date 10/01/12, 20:33
+ @date 10/01/2012, 20:33
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
-
- \file
- \dir includes/functions/
- \brief lib for front template usage, function for display
+ @file template.php
+ @dir includes/functions/
+ @brief lib for front template usage, function for display
*/
@@ -100,7 +99,7 @@
$max_level=(isset($cf['max_level'])? $cf['max_level'] : 1);
$catID=(isset($cf['catID'])? $cf['catID'] : 0);
$ParentGroupString=(isset($cf['ParentGroupString'])? $cf['ParentGroupString'] : '');
- $datatype=(isset($cf['datatype'])? $cf['datatype'] : DATATYPEs_DEFUALT_NOSELECTED );
+ $datatype=(isset($cf['datatype'])? $cf['datatype'] : DATATYPES_DEFAULT_NOSELECTED );
$osC_CategoryTree = new category_tree($datatype);
Modified: trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql 2012-05-07 17:11:15 UTC (rev 4393)
+++ trunk/catalog/install/includes/sql/mysql/data/91_osc_configuration.sql 2012-05-07 19:06:39 UTC (rev 4394)
@@ -245,10 +245,10 @@
-- 19 tell a friend
-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 ('ALLOW_GUEST_TO_TELL_A_FRIEND_S', 'ALLOW_GUEST_TO_TELL_A_FRIEND', 'false', 'ALLOW_GUEST_TO_TELL_A_FRIEND_L', '19', '15', 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 ('ALLOW_GUEST_TO_TELL_A_FRIEND_S', 'ALLOW_GUEST_TO_TELL_A_FRIEND', 'false', 'ALLOW_GUEST_TO_TELL_A_FRIEND_L', '19', '15', NULL, NOW(), 'tep_value_for_humain', 'tep_cfg_select_option(array(\'true\', \'false\'),',3);
-- 20 expected products
-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 ('EXPECTED_PRODUCTS_SORT_S', 'EXPECTED_PRODUCTS_SORT', 'desc', 'EXPECTED_PRODUCTS_SORT_L', '20', '8', NULL, NOW(), NULL, 'tep_cfg_select_option(array(\'asc\', \'desc\'),');
+-- 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 ('EXPECTED_PRODUCTS_SORT_S', 'EXPECTED_PRODUCTS_SORT', 'desc', 'EXPECTED_PRODUCTS_SORT_L', '20', '8', NULL, NOW(), NULL, 'tep_cfg_select_option(array(\'asc\', \'desc\'),');
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 ('EXPECTED_PRODUCTS_FIELD_S', 'EXPECTED_PRODUCTS_FIELD', 'date_expected', 'EXPECTED_PRODUCTS_FIELD_L', '20', '9', NULL, NOW(), NULL, 'tep_cfg_select_option(array(\'products_name\', \'date_expected\'),');
-- 21 boxes
Modified: trunk/catalog/templates/defaut/includes/content/sitemap.php
===================================================================
--- trunk/catalog/templates/defaut/includes/content/sitemap.php 2012-05-07 17:11:15 UTC (rev 4393)
+++ trunk/catalog/templates/defaut/includes/content/sitemap.php 2012-05-07 19:06:39 UTC (rev 4394)
@@ -1,13 +1,24 @@
<?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 30/11/10, 21:57
- \author oscim <mail aur...@os...> <www http://www.oscim.fr>
- \encode UTF-8
- \brief Sitmap website
+ @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 30/11/10, 21:57
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+ @brief Sitmap website
+ @note
+ For construct Categorie and sub cat use in_menu_cat() and put param
+ view lib/template.php for detail function
+ @example in_menu_cat for sitemap
+
+ in_menu_cat('ParentGroupString=ul&catID=0&max_level=3&datatype=product');
+
+ - ParentGroupString for encadre listby ul html balise
+ - catID is int root id
+ - max_level int profondeur
+ - datatype for force list specifical datatype
*/
?>
<div id="sitemap">
@@ -17,7 +28,8 @@
<!-- <li id="home"><?php echo HTTP_SERVER ?></li> -->
<li><a href="?cPath=0"><?php echo BOX_HEADING_CATEGORIES; ?></a>
- <?php echo in_menu_cat('ParentGroupString=ul&catID=0&max_level=3'); ?>
+ <?php
+ echo in_menu_cat('ParentGroupString=ul&catID=0&max_level=3&datatype=product'); ?>
</li>
<li><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . PAGE_ACCOUNT . '</a>'; ?>
<ul>
@@ -37,7 +49,6 @@
<li><?php echo '<a href="' . tep_href_link(FILENAME_BEST_SELLERS) . '">' . PAGE_BEST_SELLERS . '</a>'; ?></li>
<li><?php echo '<a href="' . tep_href_link(FILENAME_SMALL_PRICE) . '">' . PAGE_SMALL_PRICE . '</a>'; ?></li>
<li><?php echo '<a href="' . tep_href_link(FILENAME_SPECIALS) . '">' . PAGE_SPECIALS . '</a>'; ?></li>
-<!-- <li><?php //echo '<a href="' . tep_href_link(FILENAME_FEATURED_PRODUCTS) . '">' . BOX_CATALOG_FEATURED_PRODUCTS . '</a>'; ?></li> -->
</ul>
</li>
<li>
Added: trunk/catalog/templates/defaut/includes/plugins/generic/lazyload/includes_header.php
===================================================================
--- trunk/catalog/templates/defaut/includes/plugins/generic/lazyload/includes_header.php (rev 0)
+++ trunk/catalog/templates/defaut/includes/plugins/generic/lazyload/includes_header.php 2012-05-07 19:06:39 UTC (rev 4394)
@@ -0,0 +1,58 @@
+<?php
+/**
+ @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
+ @subpackage plugin lazyload
+ @package osCSS-2 <www http://www.oscss.org>
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+
+/**
+ Definition des scripts du plugins
+*/
+function lazyload_scripts(){
+ global $page;
+ $dir_ws_here= $dir_ws_here=substr(dirname(__FILE__), strlen(DIR_FS_CATALOG) ).'/';
+ $scripts=array('jquery'=> array(
+ 'type'=>'framework',
+ 'file'=>"ext/jquery/jquery.min.js",
+ 'pages'=>''
+ ),
+ 'lazyload'=>array(
+ 'type'=>'script',
+ 'place'=>'footer',
+ 'file'=>array(
+ $dir_ws_here."lib/jquery.lazyload.js"
+ ),
+ 'sort'=> 6
+ ),
+ );
+ return $scripts;
+}
+
+function lazyload_init_scripts(){
+ $scripts=array(
+ 'exec_lazyload'=>array(
+ 'type'=>'function',
+ 'code_exe'=>'lazyload_exec'
+ )
+ );
+ return $scripts;
+}
+
+function lazyload_exec(){
+ $s ='<script type="text/javascript">//<!--'."\n"
+ .'$(function() {'."\n"
+ .'$("img").lazyload({'."\n"
+ .'effect : "fadeIn", '."\n"
+ .'});'."\n"
+// .' '."\n"
+ .'});'."\n"
+
+
+ .'// --></script>';
+
+
+ return $s;
+}
+?>
\ No newline at end of file
Added: trunk/catalog/templates/defaut/includes/plugins/generic/lazyload/lib/jquery.lazyload.js
===================================================================
--- trunk/catalog/templates/defaut/includes/plugins/generic/lazyload/lib/jquery.lazyload.js (rev 0)
+++ trunk/catalog/templates/defaut/includes/plugins/generic/lazyload/lib/jquery.lazyload.js 2012-05-07 19:06:39 UTC (rev 4394)
@@ -0,0 +1,164 @@
+/*
+ * Lazy Load - jQuery plugin for lazy loading images
+ *
+ * Copyright (c) 2007-2009 Mika Tuupola
+ *
+ * Licensed under the MIT license:
+ * http://www.opensource.org/licenses/mit-license.php
+ *
+ * Project home:
+ * http://www.appelsiini.net/projects/lazyload
+ *
+ * Version: 1.5.0
+ *
+ */
+(function($) {
+
+ $.fn.lazyload = function(options) {
+ var settings = {
+ threshold : 0,
+ failurelimit : 0,
+ event : "scroll",
+ effect : "show",
+ container : window
+ };
+
+ if(options) {
+ $.extend(settings, options);
+ }
+
+ /* Fire one scroll event per scroll. Not one scroll event per image. */
+ var elements = this;
+ if ("scroll" == settings.event) {
+ $(settings.container).bind("scroll", function(event) {
+
+ var counter = 0;
+ elements.each(function() {
+ if ($.abovethetop(this, settings) ||
+ $.leftofbegin(this, settings)) {
+ /* Nothing. */
+ } else if (!$.belowthefold(this, settings) &&
+ !$.rightoffold(this, settings)) {
+ $(this).trigger("appear");
+ } else {
+ if (counter++ > settings.failurelimit) {
+ return false;
+ }
+ }
+ });
+ /* Remove image from array so it is not looped next time. */
+ var temp = $.grep(elements, function(element) {
+ return !element.loaded;
+ });
+ elements = $(temp);
+ });
+ }
+
+ this.each(function() {
+ var self = this;
+
+ /* Save original only if it is not defined in HTML. */
+ if (undefined == $(self).attr("original")) {
+ $(self).attr("original", $(self).attr("src"));
+ }
+
+ if ("scroll" != settings.event ||
+ undefined == $(self).attr("src") ||
+ settings.placeholder == $(self).attr("src") ||
+ ($.abovethetop(self, settings) ||
+ $.leftofbegin(self, settings) ||
+ $.belowthefold(self, settings) ||
+ $.rightoffold(self, settings) )) {
+
+ if (settings.placeholder) {
+ $(self).attr("src", settings.placeholder);
+ } else {
+ $(self).removeAttr("src");
+ }
+ self.loaded = false;
+ } else {
+ self.loaded = true;
+ }
+
+ /* When appear is triggered load original image. */
+ $(self).one("appear", function() {
+ if (!this.loaded) {
+ $("<img />")
+ .bind("load", function() {
+ $(self)
+ .hide()
+ .attr("src", $(self).attr("original"))
+ [settings.effect](settings.effectspeed);
+ self.loaded = true;
+ })
+ .attr("src", $(self).attr("original"));
+ };
+ });
+
+ /* When wanted event is triggered load original image */
+ /* by triggering appear. */
+ if ("scroll" != settings.event) {
+ $(self).bind(settings.event, function(event) {
+ if (!self.loaded) {
+ $(self).trigger("appear");
+ }
+ });
+ }
+ });
+
+ /* Force initial check if images should appear. */
+ $(settings.container).trigger(settings.event);
+
+ return this;
+
+ };
+
+ /* Convenience methods in jQuery namespace. */
+ /* Use as $.belowthefold(element, {threshold : 100, container : window}) */
+
+ $.belowthefold = function(element, settings) {
+ if (settings.container === undefined || settings.container === window) {
+ var fold = $(window).height() + $(window).scrollTop();
+ } else {
+ var fold = $(settings.container).offset().top + $(settings.container).height();
+ }
+ return fold <= $(element).offset().top - settings.threshold;
+ };
+
+ $.rightoffold = function(element, settings) {
+ if (settings.container === undefined || settings.container === window) {
+ var fold = $(window).width() + $(window).scrollLeft();
+ } else {
+ var fold = $(settings.container).offset().left + $(settings.container).width();
+ }
+ return fold <= $(element).offset().left - settings.threshold;
+ };
+
+ $.abovethetop = function(element, settings) {
+ if (settings.container === undefined || settings.container === window) {
+ var fold = $(window).scrollTop();
+ } else {
+ var fold = $(settings.container).offset().top;
+ }
+ return fold >= $(element).offset().top + settings.threshold + $(element).height();
+ };
+
+ $.leftofbegin = function(element, settings) {
+ if (settings.container === undefined || settings.container === window) {
+ var fold = $(window).scrollLeft();
+ } else {
+ var fold = $(settings.container).offset().left;
+ }
+ return fold >= $(element).offset().left + settings.threshold + $(element).width();
+ };
+ /* Custom selectors for your convenience. */
+ /* Use as $("img:below-the-fold").something() */
+
+ $.extend($.expr[':'], {
+ "below-the-fold" : "$.belowthefold(a, {threshold : 0, container: window})",
+ "above-the-fold" : "!$.belowthefold(a, {threshold : 0, container: window})",
+ "right-of-fold" : "$.rightoffold(a, {threshold : 0, container: window})",
+ "left-of-fold" : "!$.rightoffold(a, {threshold : 0, container: window})"
+ });
+
+})(jQuery);
Added: trunk/catalog/templates/defaut/includes/plugins/generic/slider/images/header-bg.png
===================================================================
(Binary files differ)
Property changes on: trunk/catalog/templates/defaut/includes/plugins/generic/slider/images/header-bg.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/catalog/templates/defaut/includes/plugins/generic/slider/images/nav-bg.png
===================================================================
(Binary files differ)
Property changes on: trunk/catalog/templates/defaut/includes/plugins/generic/slider/images/nav-bg.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/catalog/templates/defaut/includes/plugins/generic/slider/images/silde-nav.png
===================================================================
(Binary files differ)
Property changes on: trunk/catalog/templates/defaut/includes/plugins/generic/slider/images/silde-nav.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/catalog/templates/defaut/includes/plugins/generic/slider/images/slide-bg.png
===================================================================
(Binary files differ)
Property changes on: trunk/catalog/templates/defaut/includes/plugins/generic/slider/images/slide-bg.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/catalog/templates/defaut/includes/plugins/generic/slider/inc/easySlider.css
===================================================================
--- trunk/catalog/templates/defaut/includes/plugins/generic/slider/inc/easySlider.css (rev 0)
+++ trunk/catalog/templates/defaut/includes/plugins/generic/slider/inc/easySlider.css 2012-05-07 19:06:39 UTC (rev 4394)
@@ -0,0 +1,91 @@
+ .graphic, #prevBtn, #nextBtn, #slider1prev, #slider1next{
+ margin:0;
+ padding:0;
+ display:block;
+ overflow:hidden;
+ text-indent:-8000px;
+ }
+ /* // image replacement */
+
+
+/* Easy Slider */
+ #slider {margin:-10px 0 0 0 ; height:161px}
+ #slider ul, #slider li,
+ #slider2 ul, #slider2 li{
+ margin:0;
+ padding:0;
+ list-style:none;
+ }
+ #slider2{margin-top:1em;}
+ #slider li, #slider2 li{
+ /*
+ define width and height of list item (slide)
+ entire slider area will adjust according to the parameters provided here
+ */
+ width:596px;
+ height:140px;
+ overflow:hidden;
+ }
+ #prevBtn, #nextBtn,
+ #slider1next, #slider1prev{
+ display:block;
+ width:30px;
+ height:77px;
+ position:absolute;
+ left:-30px;
+ top:71px;
+ z-index:1000;
+ }
+ #nextBtn, #slider1next{
+ left:696px;
+ }
+ #prevBtn a, #nextBtn a,
+ #slider1next a, #slider1prev a{
+ display:block;
+ position:relative;
+ width:30px;
+ height:77px;
+ background:url(../images/btn_prev.gif) no-repeat 0 0;
+ }
+ #nextBtn a, #slider1next a{
+ background:url(../images/btn_next.gif) no-repeat 0 0;
+ }
+ .slide {height:150px;}
+
+ /* numeric controls */
+
+ ol#controls{
+ clear:both;
+ margin:0 0 -10px 385px ;
+ padding:0;
+ height:28px;
+
+ position:relative;
+top:-10px
+ }
+ ol#controls li{
+ margin:0 10px 0 0;
+ padding:0;
+ float:left;
+ list-style:none;
+ height:28px;
+ line-height:28px;
+ }
+ ol#controls li a{
+/* float:left; */
+ height:28px;
+ line-height:28px;
+/* border:1px solid #ccc; */
+/* background:#e9d6e8; */
+/* color:#555; */
+ padding:0 10px;
+ text-decoration:none;
+ }
+/* ol#controls li.current a{
+ background:#b56aae;
+ color:#fff;
+ }*/
+ ol#controls li a:focus, #prevBtn a:focus, #nextBtn a:focus{outline:none;}
+
+/* // Easy Slider */
+
Added: trunk/catalog/templates/defaut/includes/plugins/generic/slider/inc/easySlider1.7.js
===================================================================
--- trunk/catalog/templates/defaut/includes/plugins/generic/slider/inc/easySlider1.7.js (rev 0)
+++ trunk/catalog/templates/defaut/includes/plugins/generic/slider/inc/easySlider1.7.js 2012-05-07 19:06:39 UTC (rev 4394)
@@ -0,0 +1,226 @@
+/*
+ * Easy Slider 1.7 - jQuery plugin
+ * written by Alen Grakalic
+ * http://cssglobe.com/post/4004/easy-slider-15-the-easiest-jquery-plugin-for-sliding
+ *
+ * Copyright (c) 2009 Alen Grakalic (http://cssglobe.com)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * Built for jQuery library
+ * http://jquery.com
+ *
+ */
+
+/*
+ * markup example for $("#slider").easySlider();
+ *
+ * <div id="slider">
+ * <ul>
+ * <li><img src="images/01.jpg" alt="" /></li>
+ * <li><img src="images/02.jpg" alt="" /></li>
+ * <li><img src="images/03.jpg" alt="" /></li>
+ * <li><img src="images/04.jpg" alt="" /></li>
+ * <li><img src="images/05.jpg" alt="" /></li>
+ * </ul>
+ * </div>
+ *
+ */
+
+(function($) {
+
+ $.fn.easySlider = function(options){
+
+ // default configuration properties
+ var defaults = {
+ prevId: 'prevBtn',
+ prevText: 'Previous',
+ nextId: 'nextBtn',
+ nextText: 'Next',
+ controlsShow: true,
+ controlsBefore: '',
+ controlsAfter: '',
+ controlsFade: true,
+ firstId: 'firstBtn',
+ firstText: 'First',
+ firstShow: false,
+ lastId: 'lastBtn',
+ lastText: 'Last',
+ lastShow: false,
+ vertical: false,
+ speed: 1500,
+ auto: false,
+ pause: 3000,
+ continuous: false,
+ numeric: false,
+ numericId: 'controls'
+ };
+
+ var options = $.extend(defaults, options);
+
+ this.each(function() {
+ var obj = $(this);
+ var s = $("li", obj).length;
+ var w = $("li", obj).width();
+ var h = $("li", obj).height();
+ var clickable = true;
+ obj.width(w);
+ obj.height(h);
+ obj.css("overflow","hidden");
+ var ts = s-1;
+ var t = 0;
+ $("ul", obj).css('width',s*w);
+
+ if(options.continuous){
+ $("ul", obj).prepend($("ul li:last-child", obj).clone().css("margin-left","-"+ w +"px"));
+ $("ul", obj).append($("ul li:nth-child(2)", obj).clone());
+ $("ul", obj).css('width',(s+1)*w);
+ };
+
+ if(!options.vertical) $("li", obj).css('float','left');
+
+ if(options.controlsShow){
+ var html = options.controlsBefore;
+ if(options.numeric){
+ html += '<ol id="'+ options.numericId +'"></ol>';
+ } else {
+ if(options.firstShow) html += '<span id="'+ options.firstId +'"><a href=\"javascript:void(0);\">'+ options.firstText +'</a></span>';
+ html += ' <span id="'+ options.prevId +'"><a href=\"javascript:void(0);\">'+ options.prevText +'</a></span>';
+ html += ' <span id="'+ options.nextId +'"><a href=\"javascript:void(0);\">'+ options.nextText +'</a></span>';
+ if(options.lastShow) html += ' <span id="'+ options.lastId +'"><a href=\"javascript:void(0);\">'+ options.lastText +'</a></span>';
+ };
+
+ html += options.controlsAfter;
+ $(obj).after(html);
+ };
+
+ if(options.numeric){
+ for(var i=0;i<s;i++){
+ $(document.createElement("li"))
+ .attr('id',options.numericId + (i+1))
+ .html('<a rel='+ i +' href=\"javascript:void(0);\">'+ (i+1) +'</a>')
+ .appendTo($("#"+ options.numericId))
+ .click(function(){
+ animate($("a",$(this)).attr('rel'),true);
+ });
+ };
+ } else {
+ $("a","#"+options.nextId).click(function(){
+ animate("next",true);
+ });
+ $("a","#"+options.prevId).click(function(){
+ animate("prev",true);
+ });
+ $("a","#"+options.firstId).click(function(){
+ animate("first",true);
+ });
+ $("a","#"+options.lastId).click(function(){
+ animate("last",true);
+ });
+ };
+
+ function setCurrent(i){
+ i = parseInt(i)+1;
+ $("li", "#" + options.numericId).removeClass("current");
+ $("li#" + options.numericId + i).addClass("current");
+ };
+
+ function adjust(){
+ if(t>ts) t=0;
+ if(t<0) t=ts;
+ if(!options.vertical) {
+ $("ul",obj).css("margin-left",(t*w*-1));
+ } else {
+ $("ul",obj).css("margin-left",(t*h*-1));
+ }
+ clickable = true;
+ if(options.numeric) setCurrent(t);
+ };
+
+ function animate(dir,clicked){
+ if (clickable){
+ clickable = false;
+ var ot = t;
+ switch(dir){
+ case "next":
+ t = (ot>=ts) ? (options.continuous ? t+1 : ts) : t+1;
+ break;
+ case "prev":
+ t = (t<=0) ? (options.continuous ? t-1 : 0) : t-1;
+ break;
+ case "first":
+ t = 0;
+ break;
+ case "last":
+ t = ts;
+ break;
+ default:
+ t = dir;
+ break;
+ };
+ var diff = Math.abs(ot-t);
+ var speed = diff*options.speed;
+ if(!options.vertical) {
+ p = (t*w*-1);
+ $("ul",obj).animate(
+ { marginLeft: p },
+ { queue:false, duration:speed, complete:adjust }
+ );
+ } else {
+ p = (t*h*-1);
+ $("ul",obj).animate(
+ { marginTop: p },
+ { queue:false, duration:speed, complete:adjust }
+ );
+ };
+
+ if(!options.continuous && options.controlsFade){
+ if(t==ts){
+ $("a","#"+options.nextId).hide();
+ $("a","#"+options.lastId).hide();
+ } else {
+ $("a","#"+options.nextId).show();
+ $("a","#"+options.lastId).show();
+ };
+ if(t==0){
+ $("a","#"+options.prevId).hide();
+ $("a","#"+options.firstId).hide();
+ } else {
+ $("a","#"+options.prevId).show();
+ $("a","#"+options.firstId).show();
+ };
+ };
+
+ if(clicked) clearTimeout(timeout);
+ if(options.auto && dir=="next" && !clicked){;
+ timeout = setTimeout(function(){
+ animate("next",false);
+ },diff*options.speed+options.pause);
+ };
+
+ };
+
+ };
+ // init
+ var timeout;
+ if(options.auto){;
+ timeout = setTimeout(function(){
+ animate("next",false);
+ },options.pause);
+ };
+
+ if(options.numeric) setCurrent(0);
+
+ if(!options.continuous && options.controlsFade){
+ $("a","#"+options.prevId).hide();
+ $("a","#"+options.firstId).hide();
+ };
+
+ });
+
+ };
+
+})(jQuery);
+
+
+
Added: trunk/catalog/templates/defaut/includes/plugins/generic/slider/inc/slider.js
===================================================================
--- trunk/catalog/templates/defaut/includes/plugins/generic/slider/inc/slider.js (rev 0)
+++ trunk/catalog/templates/defaut/includes/plugins/generic/slider/inc/slider.js 2012-05-07 19:06:39 UTC (rev 4394)
@@ -0,0 +1,841 @@
+window.onerror=function(desc,page,line,chr){
+/* alert('JavaScript error occurred! \n'
+ +'\nError description: \t'+desc
+ +'\nPage address: \t'+page
+ +'\nLine number: \t'+line
+ );*/
+}
+var _siteRoot='svh2/templates/svh/includes/plugins/home/slider/';
+
+
+$(function(){
+ $('a').focus(function(){this.blur();});
+ SI.Files.stylizeAll();
+ slider.init();
+ mc.init();
+
+ $('input.text-default').each(function(){
+ $(this).attr('default',$(this).val());
+ }).focus(function(){
+ if($(this).val()==$(this).attr('default'))
+ $(this).val('');
+ }).blur(function(){
+ if($(this).val()=='')
+ $(this).val($(this).attr('default'));
+ });
+
+ $('input.text,textarea.text').focus(function(){
+ $(this).addClass('textfocus');
+ }).blur(function(){
+ $(this).removeClass('textfocus');
+ });
+
+ var popopenobj=0,popopenaobj=null;
+ $('a.popup').click(function(){
+ var pid=$(this).attr('rel').split('|')[0],_os=parseInt($(this).attr('rel').split('|')[1]);
+ var pobj=$('#'+pid);
+ if(!pobj.length)
+ return false;
+ if(typeof popopenobj=='object' && popopenobj.attr('id')!=pid){
+ popopenobj.hide(50);
+ $(popopenaobj).parent().removeClass(popopenobj.attr('id').split('-')[1]+'-open');
+ popopenobj=null;
+ }
+
+ if(pobj.is(':hidden')){
+ var _o=$(this).offset();
+ //var _l=parseInt(_o.left)-parseInt(_os)+parseInt($(this).width())/2;
+ var _l=($('.wrap','#top').offset().left+$('.wrap','#top').width())-pobj.width();
+ var _t=parseInt(_o.top)+parseInt($(this).height())+5;
+ pobj.css({left:_l,top:_t}).slideDown(function(){
+ $('div.close a',pobj).click(function(){
+ pobj.slideUp();
+ $(popopenaobj).parent().removeClass(pobj.attr('id').split('-')[1]+'-open');
+ popopenobj=0;
+ });
+ var fobj=$('form input.text:first',pobj);
+ if(fobj.length)
+ fobj.get(0).focus();
+ });
+ $(this).parent().addClass(pid.split('-')[1]+'-open');
+ popopenobj=pobj;
+ popopenaobj=this;
+ }else{
+ pobj.slideUp();
+ $(this).parent().removeClass(pid.split('-')[1]+'-open');
+ popopenobj=0;
+ }
+ return false;
+ });
+
+ $('p.images img').click(function(){
+ var newbg=$(this).attr('src').split('bg/bg')[1].split('-thumb')[0];
+ $(document.body).css('backgroundImage','url('+_siteRoot+'images/bg/bg'+newbg+'.jpg)');
+
+ $(this).parent().find('img').removeClass('on');
+ $(this).addClass('on');
+ return false;
+ });
+
+ $(window).load(function(){
+ var css_ims=['bar-brand-bg.jpg','bar-brand.html','bar-cms-bg.html','bar-cms.html','bar-crm-bg.html','bar-crm.html',
+ 'bar-ecommerce-bg.html','bar-ecommerce.html','bar-email-bg.html','bar-email.html','bar-real-estate-bg.html',
+ 'bar-real-estate.html','bar-seo-bg.html','bar-seo.html','bar-video-bg.html','bar-video.html','bar-web-design-bg.html',
+ 'bar-web-design.html','blog-large-img-bg.html','blog-tiny-img-bg.html','bookmark.html','bookmarks.html','cal-arrl.html',
+ 'cal-arrr.html','cal-bg.html','cal-bl.html','cal-br.html','cal-tl.html','cal-tr.html','cal-year.html','close-map.html',
+ 'close-tabs.html','colours.html','column-third-bg.html','contact-reset.html','content-bg.html','down.html','error.html',
+ 'feedback-bg.html','feedback.html','file.html','find-out-more.html','footer-bg.html','google.html','h2-award-info.html',
+ 'h2-awards-and-features.html','h2-careers-form.html','h2-careers.html','h2-cms.html','h2-comment-on-this-video.html',
+ 'h2-current-positions.html','h2-enquiry-form.html','h2-latest-news.html','h2-london-office-map.html','h2-london-office.html',
+ 'h2-perth-office.html','h2-post-a-comment.html','h2-recent-posts.html','h4-blog-archive.html','h4-blog-categories.html',
+ 'h4-recent-posts.html','h4b-blog-archive.html','h4b-blog-categories.html','h4b-calendar.html','h4b-latest-comments.html',
+ 'h4b-recent-posts.html','header-bg.html','hr.html','li-arrow.html','media-centre-bg.html','media-centre-pulse.html',
+ 'media-centre-video-bg.html','media-centre-video-hover.html','media-centre.html','nav-bg.html','newsletter-text.html',
+ 'ontwerp-tag.html','ontwerp.html','popup-client-bg.html','popup-cms-bg.html','popup-toolbox-bg.html','post-your-comments.html',
+ 'sc-img-bg.html','search-bg.html','text-bg.html','text-small-bg.html','textarea-bg.html','textarea-blog-bg.html',
+ 'textarea-small-bg.html','toolbox-arrow.html','toolbox-arrow-2.html','toolbox-reset.html','toolbox-save.html','top-bg.html',
+ 'top.html','view-brand.html','view-cms.html','view-crm.html','view-ecommerce.html','view-email.html','view-real-estate.html',
+ 'view-seo.html','view-video.html','view-web-design.png'];
+ $.each(css_ims,function(){(new Image()).src=_siteRoot+'css/images/'+this;});
+ var css_cims=['a2006.png','a2007.html','a2008.html','a2009.html','add-a-comment.html','all-services.html',
+ 'application-development.html','apps.html','archive.html','calendar.html','comment.html','comments-bg.html',
+ 'e-com.html','featured.html','feeback-submit.html','get-directions.html','go.html','h4-cms.html','h4-crm.html',
+ 'h4-otp.html','li-arrow.html','login.html','logo.html','misc.html','nav.html','noresult.html','online.html',
+ 'pagination-on.html','pagination.html','perma-bg.html','sign-up-now.html','sign-up.html','silde-nav.html',
+ 'submit-form.html','submit.html','tab-cms.html','tab-crm.html','tab-featured.html','tab-news.html','colour.html',
+ 'tab-otp.html','tab-video.html','testimonial-bg.html','testimonial.html','user-login.html','web-services.png'];
+ $.each(css_cims,function(){
+ var css_im=this;
+ $.each(['blue','purple','pink','red','grey','green','yellow','orange'],function(){
+ (new Image()).src=_siteRoot+'css/'+this+'/'+css_im;
+ });
+ });
+ });
+
+ $('p.colours a').click(function(){
+ var sheet=document.createElement('link');
+ sheet.setAttribute('rel','stylesheet');
+ sheet.setAttribute('type','text/css');
+ sheet.setAttribute('media','all');
+ sheet.setAttribute('href',_siteRoot+'css/'+this.id+'/colour.css');
+
+ if($.browser.safari)
+ $('head').append(sheet);
+ else
+ $(document.body).append(sheet);
+
+ $(this).parent().find('a').removeClass('on');
+ $(this).addClass('on');
+ return false;
+ });
+
+ $('div.bar').slice(1).each(function(){
+ $('h2',this).addClass('closed');
+ $('div',this).hide();
+ });
+ $('div.bar h2').click(function(){
+ scroll(this,-120);
+ $(this).toggleClass('closed').parent().find('div').slideToggle();
+ });
+ $('#close-tabs').click(function(){
+ $('div.bar div:visible').slideUp().parent().find('h2').addClass('closed');
+ return false;
+ });
+
+ function h42h4(obj,t){
+ var aobjs=$('div.column-right>*'),sel=false;
+ var len=aobjs.length;
+ for(var i=0;i<len;i++){
+ if(aobjs[i].tagName.toLowerCase()=='h4') sel=false;
+ if(sel) switch(t){
+ case 's' : $(aobjs[i]).show();break;
+ case 'h' : $(aobjs[i]).hide();break;
+ case 't' : $(aobjs[i]).toggle();break;
+ default : $(aobjs[i]).slideToggle(500);break;
+ }
+ if(aobjs[i]==obj) sel=true;
+ }
+ switch(t){
+ case 's' : $(obj).removeClass('closed');break;
+ case 'h' : $(obj).addClass('closed');break;
+ default : $(obj).toggleClass('closed');break;
+ }
+ }
+ var h4rp=unescape(get_cookie('id_blog_pref')||'').split(' ');
+
+ $('div.column-right h4').css({cursor:'pointer'}).each(function(){
+ if($(this).is('.blog-archive'))
+ h42h4(this,'h');
+
+ }).click(function(){
+ var rel=$(this).attr('class').replace(/\s?closed\s?/,'');
+
+ if(!h4rp.in_array(rel))
+ h4rp[h4rp.length]=rel;
+ else if(h4rp.in_array(rel))
+ h4rp.remove(rel);
+
+ set_cookie('id_blog_pref',h4rp.join(' '),365,'index.html');
+
+ h42h4(this);
+ });
+ for(var h=0;h<h4rp.length;h42h4($('div.column-right h4.'+h4rp[h++]).get(0),'t'));
+
+ var bopen=false,bobj=null;
+ var bdhtml='<div id="bkm-d">%links%</div>';
+ var blhtml='<a href="%link%" id="bkm-l-%n%"> </a>';
+ var burl=[
+ 'http://www.stumbleupon.com/submit?url=%url%&title=%title%&newcomment=&tagnames=',
+ 'http://del.icio.us/post/?url=%url%&title=%title%&notes=&tags=,',
+ 'http://www.furl.net/savedialog.jsp?p=1&t=%title%&u=%url%&r=&v=1&c=&topics=&description=&keywords=,',
+ 'http://digg.com/submit?phase=2&url=%url%&title=%title%&bodytext=&topic=',
+ 'http://reddit.com/submit?url=%url%&title=%title%',
+ 'http://www.facebook.com/share.php?src=bm&u=%url%&t=%title%&sharer_popup_message=&v=3',
+ 'http://technorati.com/faves/?add=%url%'
+ ];
+ $('p.bookmark a').click(function(){
+ if(bopen)
+ bclose();
+ if(bobj && bobj==this){
+ bobj=null;
+ return false;
+ }
+ bopen=true;
+ bobj=this;
+ $(this).addClass('on');
+ tmp=$(this).attr('rel').split('|');
+ var url=tmp[0],title=tmp[1],html='';
+
+ for(var n=0;n<burl.length;n++)
+ html+=blhtml.replace(/%link%/g,burl[n].replace(/%url%/g,url).replace(/%title%/g,escape(title))).replace(/%n%/g,n);
+ html=bdhtml.replace(/%links%/g,html);
+
+ $(document.body).append(html);
+ var _o=$(this).offset();
+ var _l=parseInt(_o.left),_t=_o.top-182;
+ $('#bkm-d').css({left:_l,top:_t});
+
+ $(document).click(function(e){
+ var _obj=e.target,_id=[],close=true;
+ while(_obj.parentNode){
+ _id[_id.length]=_obj.id;
+ _obj=_obj.parentNode;
+ }
+ for(var q=0;q<_id.length;q++)
+ if(_id[q].indexOf('bkm')>-1)
+ close=false;
+ if(close){
+ bclose();
+ bobj=null;
+ }
+ });
+ });
+ function bclose(){
+ if($(bobj).length)
+ $(bobj).removeClass('on');
+ $('#bkm-d').remove();
+ bopen=false;
+ }
+
+ $('div.sc-large div.img:has(div.tml)').each(function(){
+ $('div.tml',this).hide();
+ $(this).append('<a href="#" class="tml_open"> </a>').find('a').css({
+ left:parseInt($(this).offset().left)+864,top:parseInt($(this).offset().top)+1
+ }).click(function(){
+ $(this).siblings('div.tml').slideToggle();
+ return false;
+ }).focus(function(){this.blur();});
+ });
+});
+
+// Other functions -->
+function scroll(obj,offset){
+ if(typeof obj.pathname=='undefined'){
+ var $target=$(obj);
+ }else if(location.pathname.replace(/^\//,'')==obj.pathname.replace(/^\//,'') && location.hostname==obj.hostname){
+ var $target=$(obj.hash);
+ $target=$target.length&&$target||$('[name='+obj.hash.slice(1)+']');
+ }
+ if($target.length){
+ var targetOffset=$target.offset().top+offset;
+ $('html,body').stop().animate({scrollTop:targetOffset},500,'swing');
+ return false;
+ }
+}
+
+var slider={
+ num:-1,
+ cur:0,
+ cr:[],
+ al:null,
+ at:10*1000,
+ ar:true,
+ init:function(){
+ if(!slider.data || !slider.data.length)
+ return false;
+
+ var d=slider.data;
+ slider.num=d.length;
+ var pos=Math.floor(Math.random()*1);//slider.num);
+ for(var i=0;i<slider.num;i++){
+ $('#'+d[i].id).css({left:((i-pos)*1000)});
+ $('#slide-nav').append('<a id="slide-link-'+i+'" href="#" onclick="slider.slide('+i+');return false;" onfocus="this.blur();">'+(i+1)+'</a>');
+ }
+
+ $('img,div#slide-controls',$('div#slide-holder')).fadeIn();
+ slider.text(d[pos]);
+ slider.on(pos);
+ slider.cur=pos;
+ window.setTimeout('slider.auto();',slider.at);
+ },
+ auto:function(){
+ if(!slider.ar)
+ return false;
+
+ var next=slider.cur+1;
+ if(next>=slider.num) next=0;
+ slider.slide(next);
+ },
+ slide:function(pos){
+ if(pos<0 || pos>=slider.num || pos==slider.cur)
+ return;
+
+ window.clearTimeout(slider.al);
+ slider.al=window.setTimeout('slider.auto();',slider.at);
+
+ var d=slider.data;
+ for(var i=0;i<slider.num;i++)
+ $('#'+d[i].id).stop().animate({left:((i-pos)*1000)},1000,'swing');
+
+ slider.on(pos);
+ slider.text(d[pos]);
+ slider.cur=pos;
+ },
+ on:function(pos){
+ $('#slide-nav a').removeClass('on');
+ $('#slide-nav a#slide-link-'+pos).addClass('on');
+ },
+ text:function(di){
+ slider.cr['a']=di.client;
+ slider.cr['b']=di.desc;
+ slider.ticker('#slide-client span',di.client,0,'a');
+ slider.ticker('#slide-desc',di.desc,0,'b');
+ },
+ ticker:function(el,text,pos,unique){
+ if(slider.cr[unique]!=text)
+ return false;
+
+ ctext=text.substring(0,pos)+(pos%2?'-':'_');
+ $(el).html(ctext);
+
+ if(pos==text.length)
+ $(el).html(text);
+ else
+ window.setTimeout('slider.ticker("'+el+'","'+text+'",'+(pos+1)+',"'+unique+'");',30);
+ }
+};
+
+var mc={
+ flag:0,
+ auto_open:true,
+ auto_play:true,
+ pulse_go:false,
+ hov_html:'<div id="mcdivhover"></div>',
+ init:function(){
+ if(!$('#media-centre').length)
+ return;
+
+ if(mc.auto_open && !get_cookie('id_visited')){
+ $(window).load(function(){
+ setTimeout(function(){mc.toggle(0);},500);
+ });
+ }
+ set_cookie('id_visited','true',365,'index.html');
+ if(!get_cookie('id_pclicked')){
+ mc.pulse_go=true;
+ mc.pulse(1);
+ }
+ $('#media-centre').css({top:-419});
+ $('#media-centre-holder').css({height:0}).show();
+ $('#media-centre-tabs a:first').addClass('on');
+ $('#'+$('#media-centre-tabs a:first').attr('rel')).show();
+
+ $('#media-centre-tabs a').click(function(){
+ $('#media-centre-tabs a').removeClass('on');
+ $(this).addClass('on');
+
+ $('div#media-centre-videos div').hide();
+ $('#'+$(this).attr('rel')).show();
+ });
+
+ $('div#media-centre-videos div p.video').hover(function(){
+ $(this).append(mc.hov_html);
+ var o=$(this).find('img').offset();
+
+ $('#mcdivhover').show();
+ },function(){
+ $('#mcdivhover').remove();
+ }).click(function(){
+ $('div#media-centre-videos div p.video').removeClass('playing');
+ $(this).addClass('playing');
+ mc.play($(this).find('span.file').html());
+ if($(this).is('.ontwerp'))
+ $('#ontwerp-tag').fadeIn();
+ else
+ $('#ontwerp-tag').fadeOut();
+ });
+
+ $('div#media-centre-videos div p.news').hover(function(){
+ $(this).addClass('hover');
+ },function(){
+ $(this).removeClass('hover');
+ }).click(function(){
+ location.href=$(this).find('span.url').html();
+ });
+ },
+ toggle:function(pulse_set){
+ if(mc.flag) mc.pause();
+ if(pulse_set && !get_cookie('id_pclicked')){
+ mc.pulse_go=false;
+ set_cookie('id_pclicked','true',365,'index.html');
+ }
+ $('.mca').toggleClass('t');
+
+ $('#media-centre-holder').stop().animate({height:mc.flag?0:419},1000,'swing');
+ $('#media-centre').stop().animate({top:mc.flag?-419:0},1000,'swing',function(){try{
+ if(mc.flag && mc.auto_play){
+ var f=$('div#media-centre-videos div p.video:first');
+ $('div#media-centre-videos div p.video').removeClass('playing');
+ f.addClass('playing');
+ mc.play($(this).find('span.file').html());
+ if(f.is('.ontwerp')) $('#ontwerp-tag').fadeIn();
+ else $('#ontwerp-tag').fadeOut();
+ mc.auto_play=false;
+ }
+ }catch(e){}});
+ if($('#pusher').length){
+ $('.tml_open').hide();
+ $('#pusher div').stop().animate({height:mc.flag?0:419},1000,'swing',function(){
+ $('.tml_open').each(function(){
+ $(this).show().css({top:$(this).offset().top+((mc.flag?1:-1)*120)});
+ });
+ });
+ }
+ set_cookie('id_mc',mc.flag?'closed':'open',30,'index.html');
+ mc.flag=!mc.flag;
+ },
+ play:function(src){
+ if(!document.getElementById || !document.getElementById('objectmc'))
+ return false;
+ document.getElementById('objectmc').playVideo(_siteRoot+src);
+ },
+ pause:function(){
+ if(!document.getElementById || !document.getElementById('objectmc'))
+ return false;
+ document.getElementById('objectmc').pauseVideo();
+ },
+ pulse:function(s){
+ if(!mc.pulse_go)
+ $('#mc-pulse').fadeOut(750);
+ else if(s)
+ $('#mc-pulse').fadeIn(750,function(){mc.pulse(0);});
+ else
+ $('#mc-pulse').fadeOut(750,function(){mc.pulse(1);});
+ },
+ checkHash:function(){
+ if(!document.getElementById || !document.getElementById('objectvp'))
+ return false;
+ var id=location.hash.replace(/[^0-9]/,'');
+ if(id!=''){
+ setTimeout(function(){
+ document.getElementById('objectvp').moveId(id);
+ load_comments(id);
+ },750);
+ }
+ },
+ live:function(){
+ mc.toggle(0);
+ if(mc.flag){
+ window.setTimeout(function(){mc.play($('p.video:first').attr('rel'));},1100);
+ window.setTimeout('mc.live();',42*1000);
+ }else
+ window.setTimeout('mc.live();',2.5*60*1000);
+ }
+};
+
+var cmap={
+ is_open:false,
+ gmap:false,
+ form_id:'contact-form',
+ map_id:'contact-map',
+ time:750,
+ open:function(){
+ if(cmap.is_open) return false;
+ $('#'+cmap.form_id).fadeOut(cmap.time,function(){
+ $('#'+cmap.map_id).fadeIn(cmap.time,function(){
+ if(GBrowserIsCompatible() && !cmap.gmap){
+ cmap.gmap=true;
+ var map=new GMap2(document.getElementById('gmap'));
+ var ll=new GLatLng(51.465772,-0.298347);
+ map.setCenter(ll,13);
+ map.addOverlay(new GMarker(ll));
+ map.addControl(new GSmallMapControl());
+ map.addControl(new GMapTypeControl());
+ cmap.gdir=new GDirections(map,document.getElementById('cmap_dir'));
+ GEvent.addListener(cmap.gdir,'error',cmap.handleErrors);
+ }
+ });
+ });
+ cmap.is_open=true;
+ },
+ close:function(){
+ if(!cmap.is_open) return false;
+ $('#'+cmap.map_id).fadeOut(cmap.time,function(){$('#'+cmap.form_id).fadeIn(cmap.time);});
+ cmap.is_open=false;
+ },
+ directions:function(to){
+ cmap.gdir.load('from: Kew Road, Richmond, UK to: '+to,{'locale':'en_UK'});
+ },
+ handleErrors:function(){
+ if(cmap.gdir.getStatus().code==G_GEO_UNKNOWN_ADDRESS)
+ alert("No corresponding geographic location could be found for one of the specified addresses. This may be due to the fact that the address is relatively new, or it may be incorrect.\nError code: " + cmap.gdir.getStatus().code);
+ else if (cmap.gdir.getStatus().code==G_GEO_SERVER_ERROR)
+ alert("A geocoding or directions request could not be successfully processed, yet the exact reason for the failure is not known.\n Error code: " + cmap.gdir.getStatus().code);
+ else if (cmap.gdir.getStatus().code==G_GEO_MISSING_QUERY)
+ alert("The HTTP q parameter was either missing or had no value. For geocoder requests, this means that an empty address was specified as input. For directions requests, this means that no query was specified in the input.\n Error code: " + cmap.gdir.getStatus().code);
+ else if (cmap.gdir.getStatus().code==G_GEO_BAD_KEY)
+ alert("The given key is either invalid or does not match the domain for which it was given. \n Error code: " + cmap.gdir.getStatus().code);
+ else if (cmap.gdir.getStatus().code==G_GEO_BAD_REQUEST)
+ alert("A directions request could not be successfully parsed.\n Error code: " + cmap.gdir.getStatus().code);
+ else alert("An unknown error occurred.");
+ }
+};
+
+function toolbox_save(){
+ if($('#popup-toolbox').length){
+ var bg=$('#popup-toolbox img.on').attr('src').split('bg/bg')[1].split('-thumb')[0];
+ var colour=$('#popup-toolbox a.on').attr('id');
+
+ if($('#toolbox-remember').is(':checked')){
+ $.get(_root,{set_bg:bg,set_colour:colour},function(){});
+ }
+ $('#popup-toolbox').fadeOut();
+ $('li.toolbox').removeClass('toolbox-open');
+ }
+}
+
+// var client_root=_root+'client/';
+// function client_login(form){
+// $.post(client_root,{user:form.client_user.value,pass:form.client_pass.value},
+// function(data){
+// if(data=='0') $('#popup-client p.error').fadeIn();
+// else location.href=client_root;
+// }
+// );
+// }
+// function cms_login(form){
+// $.post(_siteRoot+'ajax-login.php',{user:form.cms_user.value,pass:form.cms_pass.value},
+// function(data){
+// if(data=='0') $('#popup-cms p.error').fadeIn();
+// else location.href=_root+'wp-admin/';
+// }
+// );
+// }
+
+Array.prototype.in_array=function(v){
+ for(var i in this)
+ if(this[i]==v)
+ return true;
+ return false;
+}
+Array.prototype.remove=function(s){
+ for(i=0;i<this.length;i++)
+ if(s==this[i])
+ this.splice(i,1);
+}
+
+var star_off=_siteRoot+'images/star-off.png',star_on=_siteRoot+'images/star-on.png',star_html='<...
[truncated message content] |
|
From: <os...@us...> - 2012-05-07 18:25:11
|
Revision: 4393
http://oscss.svn.sourceforge.net/oscss/?rev=4393&view=rev
Author: oscim
Date: 2012-05-07 17:11:15 +0000 (Mon, 07 May 2012)
Log Message:
-----------
FS#1044 FIX
Modified Paths:
--------------
trunk/catalog/templates/defaut/includes/content/checkout_payment.php
Modified: trunk/catalog/templates/defaut/includes/content/checkout_payment.php
===================================================================
--- trunk/catalog/templates/defaut/includes/content/checkout_payment.php 2012-05-07 14:10:20 UTC (rev 4392)
+++ trunk/catalog/templates/defaut/includes/content/checkout_payment.php 2012-05-07 17:11:15 UTC (rev 4393)
@@ -104,12 +104,15 @@
<p id="checkoutcouponerror" class="warning"><?php if(isset($_GET['error_message'])) echo $_GET['error_message'] ?></p>
<?php } ?>
-<!-- <fieldset>
- <legend><?php //echo CHECKOUT_CGV ;?></legend>
+<!-- DEB Comment if use Uniq checkout page -->
- <label for="conditions"><?php //printf(TEXT_CONDITIONS , tep_href_link(FILENAME_CONDITIONS, 'origin=checkout_payment') );?></label>
- <input name="conditions" id="conditions" type="checkbox" <?php //echo isset($_GET['consult_conditions']) ? 'checked="checked"' : '' ;?> />
+ <fieldset>
+ <legend><?php echo CHECKOUT_CGV ;?></legend>
+
+ <label for="conditions"><?php printf(TEXT_CONDITIONS , tep_href_link(FILENAME_CONDITIONS, 'origin=checkout_payment') );?></label>
+ <input name="conditions" id="conditions" type="checkbox" <?php echo isset($_GET['consult_conditions']) ? 'checked="checked"' : '' ;?> />
</fieldset>-->
+<!-- END Comment if use Uniq checkout page -->
<p class="formBt ieExtractFieldset">
<?php echo TITLE_CONTINUE_CHECKOUT_PROCEDURE ;?>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-05-07 14:10:31
|
Revision: 4392
http://oscss.svn.sourceforge.net/oscss/?rev=4392&view=rev
Author: oscim
Date: 2012-05-07 14:10:20 +0000 (Mon, 07 May 2012)
Log Message:
-----------
Modified Paths:
--------------
trunk/catalog/admin/login.php
Modified: trunk/catalog/admin/login.php
===================================================================
--- trunk/catalog/admin/login.php 2012-05-07 13:59:13 UTC (rev 4391)
+++ trunk/catalog/admin/login.php 2012-05-07 14:10:20 UTC (rev 4392)
@@ -12,8 +12,7 @@
define('PAGE_PARSE_START_TIME', microtime());
// Set the level of error reporting
-// error_reporting(0);
- error_reporting(E_ALL);
+ error_reporting(0);
// Set the local configuration parameters - mainly for developers
if (file_exists('includes/local/configure.php'))include('includes/local/configure.php');
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-05-07 13:59:24
|
Revision: 4391
http://oscss.svn.sourceforge.net/oscss/?rev=4391&view=rev
Author: oscim
Date: 2012-05-07 13:59:13 +0000 (Mon, 07 May 2012)
Log Message:
-----------
correction coquille
correction erreur installateur (cip) sur les fichier de langue
ajustement minime dans l'install sur les chemin des log et les champs email (strore_owner / email_from / admin_email)
deport var max tentative de login dans le configure
Modified Paths:
--------------
trunk/catalog/admin/includes/exts/package/tags/add2endlg.php
trunk/catalog/admin/includes/modules/configuration/my_boutique.php
trunk/catalog/admin/includes/modules/pages/mail.php
trunk/catalog/admin/login.php
trunk/catalog/install/includes/content/core.configuration.php
trunk/catalog/install/includes/content/core.installdb.php
trunk/catalog/install/includes/modele/admin_configure.txt
trunk/catalog/templates/defaut/includes/content/home.php
trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/classes/drivers/sql_DATATYPE_REPLACE_.php
Modified: trunk/catalog/admin/includes/exts/package/tags/add2endlg.php
===================================================================
--- trunk/catalog/admin/includes/exts/package/tags/add2endlg.php 2012-05-07 09:44:40 UTC (rev 4390)
+++ trunk/catalog/admin/includes/exts/package/tags/add2endlg.php 2012-05-07 13:59:13 UTC (rev 4391)
@@ -61,6 +61,7 @@
for ($j=0; $j<$n; $j++) {
$path = $languages[$j]['directory'];
+ $this->data['cip_file'][$j] = str_replace('%LANGUAGE%',$path ,$this->getTagAttr($xml_data,'file',0,'name'));
$this->data['filename'][$j] = str_replace('%LANGUAGE%',$path ,replace_path_admin($this->getTagAttr($xml_data,'file',0,'name')) );
$this->data['lgref'][$j] = $this->getTagAttr($xml_data,'add',0,'lgref') ;
$this->data['add'][$j] =$this->getTagText($xml_data,'add',0);
@@ -83,28 +84,26 @@
public function permissions_check_for_install() {
if (!CIP::check_bylevel(1))return false;
+ return true;
+ }
+
+ public function permissions_check_for_remove() {
for($i = 0; $i < count($this->data['filename']);$i++){
$fs_filename=replace_path_admin($this->fs_filename($i));
$path=dirname($fs_filename);
- if(!is_dir($path))parent::recursive_mkdir($path);
-
if(!is_writable($path)) {
- CIP::InProcess('check'.__('write permissins needed text').$path, __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
+ CIP::InProcess('check'.__('write permissins needed text').$path."/", __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
return false;
}
if(file_exists($fs_filename) && !is_writable($fs_filename)) {
- CIP::InProcess('check'.__('write permissins needed text').$this->fs_filename($i), __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
+ CIP::InProcess('check'.__('write permissins needed text').$fs_filename, __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
return false;
}
}
return true;
}
- public function permissions_check_for_remove() {
- return $this->permissions_check_for_install($this->fs_filename());
- }
-
/**-----------------------------conflicts--------------------------- */
public function conflicts_check_for_remove() { return true; }
@@ -125,7 +124,9 @@
*/
function do_install() {
for($i = 0; $i < count($this->data['filename']);$i++){
- if(!$this->add_file_end($this->data['filename'][$i],$this->add_str($this->data['add'][$i]))) return false;
+ if(file_exists($this->data['filename'][$i]))
+ if(!$this->add_file_end($this->data['filename'][$i],$this->add_str($this->data['add'][$i])))
+ return false;
}
return true;
}
@@ -137,7 +138,9 @@
*/
function do_remove() {
for($i = 0; $i < count($this->data['filename']);$i++){
- if(!$this->remove_file_part($this->data['filename'][$i],$this->add_str($this->data['add'][$i]))) return false;
+ if(file_exists($this->data['filename'][$i]))
+ if(!$this->remove_file_part($this->data['filename'][$i],$this->add_str($this->data['add'][$i])))
+ return false;
}
return true;
}
Modified: trunk/catalog/admin/includes/modules/configuration/my_boutique.php
===================================================================
--- trunk/catalog/admin/includes/modules/configuration/my_boutique.php 2012-05-07 09:44:40 UTC (rev 4390)
+++ trunk/catalog/admin/includes/modules/configuration/my_boutique.php 2012-05-07 13:59:13 UTC (rev 4391)
@@ -28,7 +28,6 @@
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');
Modified: trunk/catalog/admin/includes/modules/pages/mail.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/mail.php 2012-05-07 09:44:40 UTC (rev 4390)
+++ trunk/catalog/admin/includes/modules/pages/mail.php 2012-05-07 13:59:13 UTC (rev 4391)
@@ -172,7 +172,6 @@
}
-var_dump(self::$action);
$oscss->_add_ext(BO_WISIWYG_SELECTED,'editeur/');
echo $oscss->_call(BO_WISIWYG_SELECTED,'_top','message_form','600','400');
Modified: trunk/catalog/admin/login.php
===================================================================
--- trunk/catalog/admin/login.php 2012-05-07 09:44:40 UTC (rev 4390)
+++ trunk/catalog/admin/login.php 2012-05-07 13:59:13 UTC (rev 4391)
@@ -12,7 +12,8 @@
define('PAGE_PARSE_START_TIME', microtime());
// Set the level of error reporting
- error_reporting(0);
+// error_reporting(0);
+ error_reporting(E_ALL);
// Set the local configuration parameters - mainly for developers
if (file_exists('includes/local/configure.php'))include('includes/local/configure.php');
@@ -129,7 +130,7 @@
*\brief Block access for admin login, if test process >3
*/
if(!isset($_SESSION['init_login'])) $_SESSION['init_login']=1;
- if($_SESSION['init_login']>30) exit;
+ if($_SESSION['init_login']> $conf->max_init_login) exit;
$login=new login_ident;
@@ -151,10 +152,11 @@
$origin_href = tep_href_link($navigation->snapshot['page'], tep_array_to_string($navigation->snapshot['get'], array(tep_session_name(), 'action')));
$navigation->clear_snapshot();
tep_redirect($origin_href);
- /* } elseif (($login_lognum == 0) || !($login_logdate) || ($login_email_address == 'admin@localhost') || ($login_modified == '0000-00-00 00:00:00')) {
- tep_redirect(tep_href_link(FILENAME_ADMIN_ACCOUNT));*/
- } else {
- tep_redirect(tep_href_link(FILENAME_DEFAULT));
+ /* } elseif (($login_lognum == 0) || !($login_logdate) || ($login_email_address == 'admin@localhost') || ($login_modified == '0000-00-00 00:00:00')) {
+ tep_redirect(tep_href_link(FILENAME_ADMIN_ACCOUNT));*/
+ }
+ else {
+ tep_redirect(tep_href_link(FILENAME_DEFAULT));
}
}
else $_GET['login'] = 'fail';
Modified: trunk/catalog/install/includes/content/core.configuration.php
===================================================================
--- trunk/catalog/install/includes/content/core.configuration.php 2012-05-07 09:44:40 UTC (rev 4390)
+++ trunk/catalog/install/includes/content/core.configuration.php 2012-05-07 13:59:13 UTC (rev 4391)
@@ -137,12 +137,12 @@
$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'] = (bool)$enable_ssl;
+ $corresp['HTTPS_SERVER'] = (($enable_ssl =='true')?$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['HTTPS_COOKIE_DOMAIN'] = (($enable_ssl =='true' && $https_cookie_domain !='localhost')? $https_cookie_domain: '');
$corresp['HTTP_COOKIE_PATH'] = $http_cookie_path;
- $corresp['HTTPS_COOKIE_PATH'] = $https_cookie_path;
+ $corresp['HTTPS_COOKIE_PATH'] = (($enable_ssl =='true')?$https_cookie_path : '');
$corresp['HTTP_CATALOG'] = $http_catalog;
$corresp['FS_DOCUMENT_ROOT'] = $this->fs_document_root;
$corresp['WS_DOCUMENT_ROOT'] = $this->ws_document_root;
@@ -396,8 +396,9 @@
Config base
*/
osc_db_query($sql="update ".TABLE_ADMIN." set admin_email_address='".$_POST['EMAIL_ADMIN']."' where admin_id='1'" );
- osc_db_query($sql="update ".TABLE_CONFIGURATION." set configuration_value='".$_POST['STORE_OWNER_EMAIL_ADDRESS']."' where configuration_key='STORE_OWNER_EMAIL_ADDRESS'" );
- osc_db_query($sql="update ".TABLE_CONFIGURATION." set configuration_value='".$_POST['EMAIL_FROM']."' where configuration_key='EMAIL_FROM'" );
+ osc_db_query($sql="update ".TABLE_CONFIGURATION." set configuration_value='".$_POST['EMAIL_ADMIN']."' where configuration_key='STORE_OWNER_EMAIL_ADDRESS'" );
+ osc_db_query($sql="update ".TABLE_CONFIGURATION." set configuration_value='".$_POST['EMAIL_ADMIN']."' where configuration_key='EMAIL_FROM'" );
+
osc_db_query($sql="update ".TABLE_CONFIGURATION." set configuration_value='".$_POST['STORE_NAME']."' where configuration_key='STORE_NAME'" );
Modified: trunk/catalog/install/includes/content/core.installdb.php
===================================================================
--- trunk/catalog/install/includes/content/core.installdb.php 2012-05-07 09:44:40 UTC (rev 4390)
+++ trunk/catalog/install/includes/content/core.installdb.php 2012-05-07 13:59:13 UTC (rev 4391)
@@ -137,9 +137,9 @@
/* 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'" );
- osc_db_query($sql="update ".$this->db['DB_TABLE_PREFIX']."configuration set configuration_value='".$this->www_location."images/oscss_logo.png' where configuration_key='STORE_LOGO'" );
- osc_db_query($sql="update ".$this->db['DB_TABLE_PREFIX']."configuration set configuration_value='".$this->www_location."images/oscss_logo.jpg' where configuration_key='STORE_LOGO_PRINT'" );
- osc_db_query($sql="update ".$this->db['DB_TABLE_PREFIX']."configuration set configuration_value='".$this->www_location."images/noscreenshot.png' where configuration_key='IMAGE_NONEXISTENT'" );
+ osc_db_query($sql="update ".$this->db['DB_TABLE_PREFIX']."configuration set configuration_value='".$this->ws_document_root."images/oscss_logo.png' where configuration_key='STORE_LOGO'" );
+ osc_db_query($sql="update ".$this->db['DB_TABLE_PREFIX']."configuration set configuration_value='".$this->ws_document_root."images/oscss_logo.jpg' where configuration_key='STORE_LOGO_PRINT'" );
+ osc_db_query($sql="update ".$this->db['DB_TABLE_PREFIX']."configuration set configuration_value='".$this->ws_document_root."images/noscreenshot.png' where configuration_key='IMAGE_NONEXISTENT'" );
$driver = ( (strtolower( $this->db['DBMOTOR']) == 'mysqli')? 'mysql' : strtolower( $this->db['DBMOTOR']) );
Modified: trunk/catalog/install/includes/modele/admin_configure.txt
===================================================================
--- trunk/catalog/install/includes/modele/admin_configure.txt 2012-05-07 09:44:40 UTC (rev 4390)
+++ trunk/catalog/install/includes/modele/admin_configure.txt 2012-05-07 13:59:13 UTC (rev 4391)
@@ -124,6 +124,12 @@
$conf['ModPassword'] = 'Classic';
/**
+ @var max login page test con*nect
+ block page after nbr login, based on lifetime sessions
+ */
+ $conf['max_init_login'] = 7;
+
+ /**
@var Define var for display result
*/
// nbr de ligne dans les widget
Modified: trunk/catalog/templates/defaut/includes/content/home.php
===================================================================
--- trunk/catalog/templates/defaut/includes/content/home.php 2012-05-07 09:44:40 UTC (rev 4390)
+++ trunk/catalog/templates/defaut/includes/content/home.php 2012-05-07 13:59:13 UTC (rev 4391)
@@ -1,10 +1,10 @@
<?php
/**
- @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @licence GPL 2005-2012 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 09/09/11, 22:25
+ @date 08/05/2012, 22:25
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -15,7 +15,4 @@
<p class="customerGreeting"><?php echo tep_customer_greeting(); ?></p>
<div class="textMain"><?php printf(TEXT_MAIN, PROJECT_VERSION ) ; ?></div>
- <div class="banner_main">
- <?php $page->oscss_modules->_add(FILENAME_NEW_PRODUCTS,'center'); ?>
- </div>
</div>
\ No newline at end of file
Modified: trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/classes/drivers/sql_DATATYPE_REPLACE_.php
===================================================================
--- trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/classes/drivers/sql_DATATYPE_REPLACE_.php 2012-05-07 09:44:40 UTC (rev 4390)
+++ trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/classes/drivers/sql_DATATYPE_REPLACE_.php 2012-05-07 13:59:13 UTC (rev 4391)
@@ -447,7 +447,7 @@
foreach($array as $key=>$value){
if( strpos($key,'_DATATYPE_REPLACE__') ===0)
- $key=substr($key,8);
+ $key=substr($key,strlen('_DATATYPE_REPLACE__'));
$object->$key = $value;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-05-07 09:44:51
|
Revision: 4390
http://oscss.svn.sourceforge.net/oscss/?rev=4390&view=rev
Author: oscim
Date: 2012-05-07 09:44:40 +0000 (Mon, 07 May 2012)
Log Message:
-----------
Correction coquille
Ajout prise en charge datatype dans la gestion des categories public
Modified Paths:
--------------
trunk/catalog/admin/includes/classes/worldUtility.php
trunk/catalog/admin/includes/modules/pages/categories.php
trunk/catalog/common/classes/datatype_drivers/Data_customer.php
trunk/catalog/includes/classes/category_tree.php
trunk/catalog/includes/functions/template.php
Modified: trunk/catalog/admin/includes/classes/worldUtility.php
===================================================================
--- trunk/catalog/admin/includes/classes/worldUtility.php 2012-05-06 15:44:46 UTC (rev 4389)
+++ trunk/catalog/admin/includes/classes/worldUtility.php 2012-05-07 09:44:40 UTC (rev 4390)
@@ -125,6 +125,20 @@
}
/**
+ @brief return name zone search by id
+ @param $country_id int
+ @return string name
+ */
+ public static function get_zone_name($zone_id) {
+ $country_query = tep_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . (int)$zone_id . "' ");
+ if (!tep_db_num_rows($country_query)) return $zone_id;
+ else {
+ $country = tep_db_fetch_array($country_query);
+ return $country['zone_name'];
+ }
+ }
+
+ /**
@brief return id country by local name search
@param $country_name string name country
@return int id country
Modified: trunk/catalog/admin/includes/modules/pages/categories.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/categories.php 2012-05-06 15:44:46 UTC (rev 4389)
+++ trunk/catalog/admin/includes/modules/pages/categories.php 2012-05-07 09:44:40 UTC (rev 4390)
@@ -214,7 +214,7 @@
if( ! $res )
$messageStack->add_session(sprintf(__('error save categorie : %s'), sqlcategorie::$error ), 'error');
else
- $messageStack->add_session(sprintf(__('save categorie %s success'), $categories_id ), 'success');
+ $messageStack->add_session(sprintf(__('save categorie %s success'), $res ), 'success');
osCSS_Cache::clear('categoriesBox');
@@ -225,7 +225,7 @@
if(isset($_POST['origin']) ) tep_redirect(tep_href_link($_POST['origin']));
else tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . self::$cPath . ''));
else
- tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . self::$cPath . '&cID=' . $categories_id.'&action=edit'));
+ tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . self::$cPath . '&cID=' . $res.'&action=edit'));
break;
case 'update':
@@ -308,12 +308,12 @@
$col = $row;
$table = constant(strtoupper('TABLE_'.$row.'_TO_CATEGORIES'));
}
-
+
for ($i=0, $n=sizeof($categories); $i<$n; $i++) {
/* Calcul produist et enfant herite */
echo $sql = "select ".$col."_id as id from " . $table . " where categories_id = '" . (int)$categories[$i]['id'] . "'";
$_ids_query = tep_db_query($sql);
- while ($_ids = tep_db_fetch_array($_ids_query))
+ while ($_ids = tep_db_fetch_array($_ids_query))
$subcount[$row][$_ids['id']]['categories'][] = $categories[$i]['id'];
}
}
@@ -335,7 +335,7 @@
while (list($key, $value) = each($row)) {
$category_ids = '';
- for ($i=0, $n=sizeof($value['categories']); $i<$n; $i++)
+ for ($i=0, $n=sizeof($value['categories']); $i<$n; $i++)
$category_ids .= "'" . (int)$value['categories'][$i] . "', ";
$category_ids = substr($category_ids, 0, -2);
@@ -344,7 +344,7 @@
$check_query = tep_db_query("select count(*) as total from " . $table . " where ".$col."_id = '" . (int)$key . "' and categories_id not in (" . $category_ids . ")");
$check = tep_db_fetch_array($check_query);
- if ($check['total'] < 1)
+ if ($check['total'] < 1)
$subdelete[$k][$key] = $key;
}
@@ -354,7 +354,7 @@
tep_set_time_limit(0);
foreach($subdelete as $k=>$row){
-
+
if(isset($_POST['delete_in_cat'][$k]) && $_POST['delete_in_cat'][$k]=='on')
while (list($key) = each($row)){
$chidlclass = 'sql'.$k;
@@ -460,7 +460,7 @@
public static function load_db_values($ID){
global $languages_id;
- $myarray = sqlcategorie::fetch(array('id'=> (int) $ID, 'language_id'=>(int)$languages_id));
+ $myarray = sqlcategorie::fetch(array('id'=> (int) $ID, 'language_id'=>(int)$languages_id));
$myarray['cPath']= categorieUtility::get_generated_category_path_ids($ID);
Modified: trunk/catalog/common/classes/datatype_drivers/Data_customer.php
===================================================================
--- trunk/catalog/common/classes/datatype_drivers/Data_customer.php 2012-05-06 15:44:46 UTC (rev 4389)
+++ trunk/catalog/common/classes/datatype_drivers/Data_customer.php 2012-05-07 09:44:40 UTC (rev 4390)
@@ -19,13 +19,28 @@
public $DataType = 'customer';
/**
- @var DataType array reg for seo class
+ @var DataType array reg for seo class
*/
public $reg_anchors = array(
- 'customers_id' => 'u'
+ 'customers_id' => 'u'
);
/**
+ @var DataType files for folder /content
+ */
+ public $reg_filenames = array(
+ 'FILENAME_CUSTOMERS' => FILENAME_DEFAULT // unique page
+ );
+
+ /**
+ @var DataType array reg check for control get params , please respect order $reg_anchors
+ */
+ public $reg_check = array(
+ '([0-9]*)' // unique page
+ );
+
+
+ /**
@var DataType dynamic
*/
public $DataTypeDynamic = true;
@@ -41,6 +56,7 @@
@param $mode le type de control (page/cpath/seo)
*/
function is_type($mode='unique'){
+
switch(strtolower($mode)){
case 'unique':
// default:
Modified: trunk/catalog/includes/classes/category_tree.php
===================================================================
--- trunk/catalog/includes/classes/category_tree.php 2012-05-06 15:44:46 UTC (rev 4389)
+++ trunk/catalog/includes/classes/category_tree.php 2012-05-07 09:44:40 UTC (rev 4390)
@@ -1,10 +1,10 @@
<?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
+ *\licence GPL 2005-2012 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 18/12/11, 08:18
+ *\date 10/05/2012, 08:18
*\author oscim <mail aur...@os...> <www http://www.oscim.fr>
*\encode UTF-8
*\group boxes
@@ -47,26 +47,35 @@
$category_product_count_start_string = ' (',
$category_product_count_end_string = ')';
+ protected $datatype = '';
+
/**
* \fn __construct()
*/
- function __construct() {
+ function __construct($datatype ="") {
global $languages_id, $osCSS_Cache , $language;
+
+ $this->SetDatatype($datatype);
// if (_cst_bool('SHOW_COUNTS')) $this->show_category_product_count = true;
if ($osCSS_Cache->read('category_tree-' . $language.'-type', 720)) {
$this->data = $osCSS_Cache->getCache();
- }
+ }
else {
- $this->data = array();
- categorie::add_where_query(" and c.categories_hidden='1' ");
- $list = categorie::get_query('','','',array('limit'=>0));
+ $this->data = array();
+ $sql = " and c.categories_hidden='1' ";
- foreach($list as $categories)
- if( (bool)$categories->status) $this->data[$categories->parent_id][$categories->categories_id] = array('href' => $categories->href, 'name' => $categories->categories_name, 'count' => 0);
+ if(tep_not_null($this->datatype))
+ $sql .= "AND categories_datatype = '".$this->datatype."' ";
+ categorie::add_where_query($sql);
+ $list = categorie::get_query('','','',array('limit'=>0));
+ foreach($list as $categories)
+ if( (bool)$categories->status) $this->data[$categories->parent_id][$categories->categories_id] = array('href' => $categories->href, 'name' => $categories->categories_name, 'count' => 0);
+
+
// if ($this->show_category_product_count === true) $this->calculateCategoryProductCount();
$osCSS_Cache->writeBuffer($this->data);
@@ -232,7 +241,7 @@
// foreach ($parent_categories as $parent_category_id => $parent_category_info) {
// if ($parent_category_id == $parent_category) {
// $this->data[$parent_parent][$parent_category_id]['count'] += $this->data[$parent][$id]['count'];
-//
+//
// $parent_category = $parent_parent;
// break 2;
// }
@@ -245,7 +254,9 @@
// }
// }
-
+ public function SetDatatype($datatype) {
+ $this->datatype = $datatype;
+ }
/**
* \fn setRootCategoryID($root_category_id)
* @param $root_category_id int
Modified: trunk/catalog/includes/functions/template.php
===================================================================
--- trunk/catalog/includes/functions/template.php 2012-05-06 15:44:46 UTC (rev 4389)
+++ trunk/catalog/includes/functions/template.php 2012-05-07 09:44:40 UTC (rev 4390)
@@ -100,8 +100,9 @@
$max_level=(isset($cf['max_level'])? $cf['max_level'] : 1);
$catID=(isset($cf['catID'])? $cf['catID'] : 0);
$ParentGroupString=(isset($cf['ParentGroupString'])? $cf['ParentGroupString'] : '');
+ $datatype=(isset($cf['datatype'])? $cf['datatype'] : DATATYPEs_DEFUALT_NOSELECTED );
- $osC_CategoryTree = new category_tree();
+ $osC_CategoryTree = new category_tree($datatype);
if(!empty($ParentGroupString)) $osC_CategoryTree->setParentGroupString('<'.$ParentGroupString.'>'."\n", '</'.$ParentGroupString.'>'."\n");
else $osC_CategoryTree->setParentGroupString(''."\n", ''."\n");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-05-06 15:44:53
|
Revision: 4389
http://oscss.svn.sourceforge.net/oscss/?rev=4389&view=rev
Author: oscim
Date: 2012-05-06 15:44:46 +0000 (Sun, 06 May 2012)
Log Message:
-----------
Correction coquille, erreur , bug
Ajout methode dans le driver.categorie pour extraire les extra
Nettoyage code et ajout de comment
Modified Paths:
--------------
trunk/catalog/admin/includes/gabarit/configuration/modcustextra/draw.edit.gab
trunk/catalog/admin/includes/gabarit/configuration/modprodextra/draw.label.listing.gab
trunk/catalog/admin/includes/modules/configuration/modprodextra.php
trunk/catalog/common/classes/ExtraUtility.php
trunk/catalog/includes/classes/drivers/data/categorie.php
trunk/catalog/includes/classes/drivers/data/product.php
trunk/catalog/includes/functions/general.php
trunk/catalog/includes/functions/html_output.php
trunk/catalog/templates/defaut/includes/content/advanced_search.php
Modified: trunk/catalog/admin/includes/gabarit/configuration/modcustextra/draw.edit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/configuration/modcustextra/draw.edit.gab 2012-05-05 22:12:31 UTC (rev 4388)
+++ trunk/catalog/admin/includes/gabarit/configuration/modcustextra/draw.edit.gab 2012-05-06 15:44:46 UTC (rev 4389)
@@ -38,7 +38,7 @@
<?php } ?>
</ul>
<?php for ($i=0, $n=sizeof($languages); $i<$n; $i++) {?>
- <ul>
+ <ul id="detail-<?php echo ($i+1) ?>">
<li class="block_input">
<label for="<?php echo 'fields_name_' . $languages[$i]['id']; ?>"><?php echo __('text field name'); ?></label>
<?php echo tep_draw_input_field('fields_name[' . $languages[$i]['id'] . ']','fields_name_' . $languages[$i]['id'],modcustextra::$fInfo->lg[$languages[$i]['id']]->fields_name).'<span class="required">*</span>'; ?>
@@ -94,11 +94,11 @@
<fieldset class="tabs_lang block_field">
<ul>
<?php for ($i=0, $n=sizeof($languages); $i<$n; $i++) { ?>
- <li><?php echo '<a href="#products_name-' . ($i+1).'" title="'.$languages[$i]['name'].'">' . tep_language_image( $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']). '</a>' ?></li>
+ <li><?php echo '<a href="#subdetail-' . ($i+1).'" title="'.$languages[$i]['name'].'">' . tep_language_image( $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']). '</a>' ?></li>
<?php } ?>
</ul>
<?php for ($i=0, $n=sizeof($languages); $i<$n; $i++) {?>
- <ul>
+ <ul id="subdetail-<?php echo ($i+1) ?>">
<li class="block_input">
<label for="<?php echo 'fields_name_' . $languages[$i]['id']; ?>"><?php echo __('text field format'); ?></label>
<?php echo tep_draw_input_field('fields_format[' . $languages[$i]['id'] . ']','fields_format_' . $languages[$i]['id'],modcustextra::$fInfo->lg[$languages[$i]['id']]->fields_format ).'<span class="required">*</span>'; ?>
Modified: trunk/catalog/admin/includes/gabarit/configuration/modprodextra/draw.label.listing.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/configuration/modprodextra/draw.label.listing.gab 2012-05-05 22:12:31 UTC (rev 4388)
+++ trunk/catalog/admin/includes/gabarit/configuration/modprodextra/draw.label.listing.gab 2012-05-06 15:44:46 UTC (rev 4389)
@@ -41,10 +41,7 @@
<tr class="dataTableRow">
<td class="dataTableContent"><?php echo $epf->epf_id; ?></td>
<td class="dataTableContent">
- <?php $label_query = tep_db_query("select languages_id, epf_label from " . TABLE_PRODUCTS_EXTRA_FIELDS_LABELS . " where (epf_id = " . (int)$epf->epf_id . ") ");
- while ($label = tep_db_fetch_array($label_query)) {
- echo tep_language_image( modprodextra::$lang[$label['languages_id']]['directory'] . '/images/' . modprodextra::$lang[$label['languages_id']]['image'], modprodextra::$lang[$label['languages_id']]['name']) . ' ' . $label['epf_label'] . '<br>';
- }
+ <?php echo tep_language_image( modprodextra::$lang[$epf->languages_id]['directory'] . '/images/' . modprodextra::$lang[$epf->languages_id]['image'], modprodextra::$lang[$epf->languages_id]['name']) . ' ' . $epf->epf_label;
?>
</td>
<td class="tcenter"><?php echo $epf->epf_order; ?></td>
Modified: trunk/catalog/admin/includes/modules/configuration/modprodextra.php
===================================================================
--- trunk/catalog/admin/includes/modules/configuration/modprodextra.php 2012-05-05 22:12:31 UTC (rev 4388)
+++ trunk/catalog/admin/includes/modules/configuration/modprodextra.php 2012-05-06 15:44:46 UTC (rev 4389)
@@ -13,7 +13,7 @@
define('FILENAME_CFG_34',"gparentID=".@$_GET['gparentID']."&gID=".@$_GET['gID']);
-error_reporting(E_ALL);
+
Class modprodextra{
/**
@@ -72,6 +72,34 @@
if(!defined('AJAXSTATMENTDETAIL')) define('AJAXSTATMENTDETAIL', 'mod=page');
self::$eid=(isset($_GET['eid']) ? $_GET['eid'] : '');
+
+
+
+ //! @remarks Force load language centralised
+ global $oscss,$language;
+ $oscss->pile_file_lang(DIR_FS_ADMIN.DIR_WS_LANGUAGES.$language.'/modules/filters.txt');
+
+
+ if(isset($_SESSION['filters'][__CLASS__]['language_id']))
+ $new_languages_id = $_SESSION['filters'] [__CLASS__]['language_id'];
+ else
+ $new_languages_id =$languages_id;
+
+ $_SESSION['filters']['language_id'] = $new_languages_id;
+
+ /**
+ @remarks Active forms filter
+ */
+ self::$InitInfo['tfilter']['listing']=array(
+ array(
+ 'title'=>__('@products filter tab clause'),
+ 'content'=>tep_get_include_contents('MGabCont/filter.language'),
+ ),
+// array(
+// 'title'=>__('@products filter tab clause'),
+// 'content'=>tep_get_include_contents('configuration/'.__CLASS__.'/filter.clause'),
+// ),
+ );
}
@@ -89,7 +117,20 @@
$error = false;
switch ($action) {
+ /**
+ @remarks specific save in session value filters
+ */
+ case 'filters':
+ $_SESSION['filters'] =array();
+ if(isset($_POST['filters']['language'] ) )
+ $_SESSION['filters'][__CLASS__]['language_id'] = (int)$_POST['filters']['language'];
+
+
+ tep_redirect(tep_href_link(self::FILENAME, FILENAME_CFG_ac));
+ break;
+
+
case 'insert':
try{
@@ -252,7 +293,7 @@
sqlproductsextrafields::delete(array('id'=> (int)self::$eid));
- tep_redirect(tep_href_link(FILENAME_CONFIGURATION, FILENAME_CFG_34));
+ tep_redirect(tep_href_link(self::FILENAME, FILENAME_CFG_34));
}
} else {
self::$double_check = 'no';
@@ -282,7 +323,7 @@
}
if(!isset($_GET['forceajax']))
- tep_redirect(tep_href_link(FILENAME_CONFIGURATION, FILENAME_CFG_34));
+ tep_redirect(tep_href_link(self::FILENAME, FILENAME_CFG_34));
break;
@@ -317,7 +358,7 @@
$r=sqlproductsextrafieldsvalues::update($data_array);
}
- tep_redirect(tep_href_link(FILENAME_CONFIGURATION, FILENAME_CFG_34 . '&eid=' . self::$eid.'&action=value_listing'));
+ tep_redirect(tep_href_link(self::FILENAME, FILENAME_CFG_34 . '&eid=' . self::$eid.'&action=value_listing'));
break;
@@ -352,7 +393,7 @@
$r=sqlproductsextrafieldsvalues::create($data_array);
}
- tep_redirect(tep_href_link(FILENAME_CONFIGURATION, FILENAME_CFG_34 . '&eid=' . self::$eid.'&action=value_listing'));
+ tep_redirect(tep_href_link(self::FILENAME, FILENAME_CFG_34 . '&eid=' . self::$eid.'&action=value_listing'));
break;
@@ -362,7 +403,7 @@
$r=sqlproductsextrafieldsvalues::delete(array('epf_id'=>(int)self::$eid, 'id'=>(int)$_GET['vid']));
- tep_redirect(tep_href_link(FILENAME_CONFIGURATION, FILENAME_CFG_34. '&action=value_listing&eid=' . (int)self::$eid));
+ tep_redirect(tep_href_link(self::FILENAME, FILENAME_CFG_34. '&action=value_listing&eid=' . (int)self::$eid));
break;
@@ -510,12 +551,10 @@
'directory' => $languages[$i]['directory']);
}
- $field_query = tep_db_query("select * from " . TABLE_PRODUCTS_EXTRA_FIELDS . " order by epf_order,epf_admin, epf_special_mod ");
- $selected_labels = array();
+ $field_query = tep_db_query("select ef.*, efl.epf_label, efl.languages_id from " . TABLE_ANNONCE_EXTRA_FIELDS . " ef LEFT JOIN " . TABLE_ANNONCE_EXTRA_FIELDS_LABELS . " efl ON( efl.epf_id = ef.epf_id AND efl.languages_id = '".$new_languages_id."') ORDER BY epf_order,epf_admin, epf_special_mod ");
+
$list=array();
while ($epf = tep_db_fetch_array($field_query)) {
- $class= ($epf['epf_id'] == self::$eid)? "Selected" : '';
- if ($epf['epf_id'] == self::$eid)$selected=$epf;
$list[]=new objectInfo($epf);
}
return $list;
Modified: trunk/catalog/common/classes/ExtraUtility.php
===================================================================
--- trunk/catalog/common/classes/ExtraUtility.php 2012-05-05 22:12:31 UTC (rev 4388)
+++ trunk/catalog/common/classes/ExtraUtility.php 2012-05-06 15:44:46 UTC (rev 4389)
@@ -76,10 +76,6 @@
break;
case 7: // checkbox mutli
case 3: // checkbox
-
-
-// exit;
-// $cnt = 1;
/// Put Id extra_fields_id in value !!!
foreach($_POST['fields_' . $rows->id] as $k=>$item) {
if($item =='on' ) $val .= $k.',';
@@ -94,8 +90,7 @@
case 4: // select
case 5: // hidden
default:
-// print_r($_POST);
- if($rows->active_value_language){
+ if($rows->active_value_language && !in_array($rows->type, array(4, 2)) ){
foreach($_POST['fields_' . $rows->id] as $k=>$v)
$val[$k] = ( (!empty($v)) ? tep_db_prepare_input($v) : '') ;
}
@@ -185,7 +180,7 @@
*/
case 0: // classic
default:
-// print_r($rows);
+
$input .= tep_draw_input_field('fields_' . $rows->id. (($rows->active_value_language)? '['.$rows->languages_id.']': '') ,'fields_' . $rows->id ,$rows->input_value). $flag_r;
}
Modified: trunk/catalog/includes/classes/drivers/data/categorie.php
===================================================================
--- trunk/catalog/includes/classes/drivers/data/categorie.php 2012-05-05 22:12:31 UTC (rev 4388)
+++ trunk/catalog/includes/classes/drivers/data/categorie.php 2012-05-06 15:44:46 UTC (rev 4389)
@@ -54,7 +54,7 @@
public static function get_has_category_subcategories($category_id){ return categorieData::get_has_category_subcategories($category_id); }
public static function get_parent_categories($categories, $categories_id) { return categorieData::get_parent_categories($categories, $categories_id); }
public static function get_subcategories(&$subcategories_array, $parent_id = 0){ return categorieData::get_subcategories($subcategories_array, $parent_id); }
- public static function get_categories($categories_array = '', $parent_id = '0', $indent = '') { return categorieData::get_categories($categories_array , $parent_id, $indent); }
+ public static function get_categories($categories_array = '', $parent_id = '0', $indent = '', $datatype ='') { return categorieData::get_categories($categories_array , $parent_id, $indent, $datatype); }
public static function get_query($id='',$search='',$exclude='',$option=''){ global $languages_id; return categorieData::get_query($id,$search,$exclude,$option); }
public static function get_item($id){ return categorieData::get_item($id); }
@@ -74,6 +74,8 @@
*/
public static function get_option_data($_array){ $pdm=self::Getmodule();return $pdm->get_option_data($_array);}
+
+ public static function get_extra($id, $key=''){ return categorieData::GetExtra($id, $key); }
}
@@ -311,11 +313,16 @@
* \param $indent
* \return array result
*/
- public static function get_categories($categories_array = '', $parent_id = '0', $indent = '') {
+ public static function get_categories($categories_array = '', $parent_id = '0', $indent = '', $datatype='') {
global $languages_id;
+
+ $where= '';
+ if(tep_not_null($datatype))
+ $where .=" AND categories_datatype LIKE '".$datatype."' ";
+
if (!is_array($categories_array)) $categories_array = array();
$categories_query = tep_db_query("select c.categories_id, cd.categories_name from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where parent_id = '" . (int)$parent_id . "'
-and c.categories_status='1' and c.categories_hidden='1' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name");
+and c.categories_status='1' and c.categories_hidden='1' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' ".$where." order by sort_order, cd.categories_name");
while ($categories = tep_db_fetch_array($categories_query)) {
$categories_array[] = array('id' => $categories['categories_id'], 'text' => $indent . $categories['categories_name']);
@@ -325,6 +332,25 @@
return $categories_array;
}
+
+ /**
+ @brief Extra for categorie
+ @param $id categorie id int
+ @param $key string or null for generic extra
+ */
+ public static function GetExtra($id, $key=''){
+ $DB=Database::getInstance();
+
+ $_q = $DB->query("SELECT cat_value FROM ".TABLE_CATEGORIES_EXTRA." WHERE categories_id = '".(int)$id."' AND cat_key = '".strtoupper($key)."' ");
+
+ if(!$_q->__get('numRows'))
+ return false;
+
+ $res = $_q->fetchAssoc();
+ return unserialize($res['cat_value']) ;
+
+ }
+
}
Modified: trunk/catalog/includes/classes/drivers/data/product.php
===================================================================
--- trunk/catalog/includes/classes/drivers/data/product.php 2012-05-05 22:12:31 UTC (rev 4388)
+++ trunk/catalog/includes/classes/drivers/data/product.php 2012-05-06 15:44:46 UTC (rev 4389)
@@ -355,21 +355,19 @@
while( $e = $epf_query->fetchAssoc() ) {
- $val = $DB->query( $sql ="SELECT p2epf.products_extra_fields_value as value FROM " . TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS . " p2epf WHERE p2epf.products_extra_fields_id=".$e['epf_id']." AND products_id = '" . (int)$product_id . "' AND languages_id='". (($e['epf_active_value_language']==1)? self::$lg_id : 0)."' ");
+ $val = $DB->query( $sql ="SELECT p2epf.products_extra_fields_value as value FROM " . TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS . " p2epf WHERE p2epf.products_extra_fields_id=".$e['epf_id']." AND products_id = '" . (int)$product_id . "' AND languages_id='". (($e['epf_active_value_language']==1 && !in_array( (int)$e['epf_input_type'] , array(4,2)) )? self::$lg_id : 0)."' ");
$result = $val->fetchAssoc();
switch((int)$e['epf_input_type'] ) {
-
+ case 2: // radio
+ case 4: // select
case 6: // select mutli
case 7: // checkbox mutli
case 3: // checkbox
$val = self::GetEFValue($e['epf_id'] ,$result['value'] , (($e['epf_active_value_language']==1)? self::$lg_id : 0) );
break;
-
case 0: // classic
case 1: // textarea
- case 2: // radio
- case 4: // select
case 5: // hidden
default:
$val = $result['value'];
Modified: trunk/catalog/includes/functions/general.php
===================================================================
--- trunk/catalog/includes/functions/general.php 2012-05-05 22:12:31 UTC (rev 4388)
+++ trunk/catalog/includes/functions/general.php 2012-05-06 15:44:46 UTC (rev 4389)
@@ -358,48 +358,45 @@
}
-
-
-
-
-
-
/**
- Returns an array with countries
-// TABLES: countries
+ @fn tep_get_countries($countries_id = '', $with_iso_codes = false)
+ @brief Returns an array with countries
+ TABLES: countries
+ @param $countries_id int countrie id for retrun one result in array
+ @param $with_iso_codes add info iso code
+ @return array (
+ countries_id
+ countries_name
+ )
*/
function tep_get_countries($countries_id = '', $with_iso_codes = false) {
$DB=Database::getInstance();
$countries_array = array();
- if (tep_not_null($countries_id)) {
- if ($with_iso_codes == true) {
- $countries = $DB->query("select countries_name, countries_iso_code_2, countries_iso_code_3 from " . TABLE_COUNTRIES . " where countries_id = '" . (int)$countries_id . "' order by countries_name");
- $countries_values = $countries->fetchAssoc();
- $countries_array = array('countries_name' => $countries_values['countries_name'],
- 'countries_iso_code_2' => $countries_values['countries_iso_code_2'],
- 'countries_iso_code_3' => $countries_values['countries_iso_code_3']);
- } else {
- $countries = $DB->query("select countries_name from " . TABLE_COUNTRIES . " where countries_id = '" . (int)$countries_id . "'");
- $countries_values = $countries->fetchAssoc();
- $countries_array = array('countries_name' => $countries_values['countries_name']);
- }
- } else {
- if (_cst_bool('COUNTRY_LOCALNAME')) {
- $countries = $DB->query("select countries_id, countries_localname from " . TABLE_COUNTRIES . " where country_visible = '1' order by countries_localname");
- while ($countries_values = $countries->fetchAssoc()) {
- $countries_array[] = array('countries_id' => $countries_values['countries_id'],
- 'countries_name' => $countries_values['countries_localname']);
- }
- } else {
- $countries = $DB->query("select countries_id, countries_name from " . TABLE_COUNTRIES . " where country_visible = '1' order by countries_name");
- while ($countries_values = $countries->fetchAssoc()) {
- $countries_array[] = array('countries_id' => $countries_values['countries_id'],
- 'countries_name' => $countries_values['countries_name']);
- }
- }
- }
+ $list = '';
+ $where = '';
- return $countries_array;
+ if (_cst_bool('COUNTRY_LOCALNAME'))
+ $list .=" ,countries_localname as countries_name, countries_localname ";
+ else
+ $list .=" , countries_name ";
+
+ if ($with_iso_codes == true)
+ $list .= " , countries_iso_code_2, countries_iso_code_3 ";
+
+ if (tep_not_null($countries_id) && (int)$countries_id > 0)
+ $where = " AND countries_id = '" . (int)$countries_id . "' ";
+
+
+ $countries = $DB->query("SELECT countries_id ".$list." FROM " . TABLE_COUNTRIES . " WHERE country_visible = '1' ".$where." ORDER BY countries_name");
+
+ if($countries->__get('numRows'))
+ foreach($countries->fetchAllAssoc() as $row)
+ $countries_array[] = $row;
+
+ if (tep_not_null($countries_id) && (int)$countries_id > 0)
+ return $countries_array[0];
+ else
+ return $countries_array;
}
@@ -1136,7 +1133,7 @@
function tep_has_category_subcategories($category_id){return categorie::get_has_category_subcategories($category_id); }
function tep_get_parent_categories($categories, $categories_id) { return categorie::get_parent_categories($categories, $categories_id); }
function tep_get_subcategories(&$subcategories_array, $parent_id = 0) { return categorie::get_subcategories($subcategories_array, $parent_id); }
-function tep_get_categories($categories_array = '', $parent_id = '0', $indent = '') { return categorie::get_categories($categories_array , $parent_id, $indent); }
+function tep_get_categories($categories_array = '', $parent_id = '0', $indent = '', $datatype='') { return categorie::get_categories($categories_array , $parent_id, $indent, $datatype); }
function tep_get_content_cat($content_id){ return content::get_content_cat($content_id); }
function tep_get_content_path($content_id) { return content::get_content_path($content_id); }
Modified: trunk/catalog/includes/functions/html_output.php
===================================================================
--- trunk/catalog/includes/functions/html_output.php 2012-05-05 22:12:31 UTC (rev 4388)
+++ trunk/catalog/includes/functions/html_output.php 2012-05-06 15:44:46 UTC (rev 4389)
@@ -67,20 +67,21 @@
}
/**
- * \fn tep_get_country_list($name,$id, $selected = '', $parameters = '')
- * \brief Creates a pull-down list of countries
- * @param $name string
- * @param $id integer
- * @param $selected null|
- * @param $parameters null | string
+ @fn tep_get_country_list($name,$id, $selected = '', $parameters = '')
+ @brief Creates a pull-down list of countries
+ @param $name string
+ @param $id integer
+ @param $selected null|
+ @param $parameters null | string
*/
function tep_get_country_list($name,$id, $selected = '', $parameters = '') {
$countries_array = array(array('id' => '', 'text' => PULL_DOWN_DEFAULT));
- $countries = tep_get_countries();
- for ($i=0, $n=sizeof($countries); $i<$n; $i++) {
- $countries_array[] = array('id' => $countries[$i]['countries_id'], 'text' => $countries[$i]['countries_name']);
- }
+ foreach(tep_get_countries() as $row) {
+ $row['id'] = $row['countries_id'];
+ $row['text'] = $row['countries_name'];
+ $countries_array[] =$row;
+ }
return tep_draw_pull_down_menu($name,$id, $countries_array, $selected, $parameters);
}
Modified: trunk/catalog/templates/defaut/includes/content/advanced_search.php
===================================================================
--- trunk/catalog/templates/defaut/includes/content/advanced_search.php 2012-05-05 22:12:31 UTC (rev 4388)
+++ trunk/catalog/templates/defaut/includes/content/advanced_search.php 2012-05-06 15:44:46 UTC (rev 4389)
@@ -1,90 +1,104 @@
<?php
/**
- @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
- @portion code Copyright (c) 2002 osCommerce
+ @licence GPL 2005-2012 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
*/
+
+
+global $page;
+
+/**
+ @remarks Load split page , and Load the module with the result of the split
+*/
+if (isset($listing_sql) && tep_not_null($listing_sql) )
+ $page->oscss_modules->_add('listing.php','center', array('listing_split'=>$listing_split,'listing_query'=>$listing_sql) );
?>
-<div id="advancedSearch">
- <?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 echo tep_draw_form('advanced_search', tep_href_link(FILENAME_ADVANCED_SEARCH, '', 'NONSSL', false), 'get', 'onsubmit="return check_form(this);"') ;?>
+<div id="advancedSearch" class="main-content">
+ <?php $page->messageStack->_draw('search');?>
- <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>
- <?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="check">
- <label><?php echo ENTRY_INCLUDE_SUBCATEGORIES; ?></label>
- <?php echo tep_draw_checkbox_field('inc_subcat','inc_subcat', '1', true) ;?>
- </li>
+ <?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; ?>
- <li>
- <label><?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>
- <label for="pfrom"><?php echo ENTRY_PRICE_FROM; ?></label>
- <?php echo tep_draw_input_field('pfrom','pfrom'); ?>
- </li>
- <li>
- <label for="pto"><?php echo ENTRY_PRICE_TO; ?></label>
- <?php echo tep_draw_input_field('pto','pto'); ?>
- </li>
- <li>
- <label for="dfrom"><?php echo ENTRY_DATE_FROM; ?></label>
- <?php echo tep_draw_input_field('dfrom','dfrom', DOB_FORMAT_STRING, 'onfocus="this.value=\'\'"'); ?>
- </li>
- <li>
- <label for="dto"><?php echo ENTRY_DATE_TO; ?></label>
- <?php echo tep_draw_input_field('dto','dto', DOB_FORMAT_STRING, 'onfocus="this.value=\'\'"'); ?>
- </li>
- <li class="formBt"><input type="submit" class="submitBt" value="<?php echo IMAGE_BUTTON_SEARCH; ?>" /></li>
- </ul>
- </fieldset>
- </form>
+ <?php /** @remarks Block draw form base and add childs gab for complet forms. 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() ;?>
+
+ <ul>
+ <li class="BlockRows">
+ <label for="keywords"><?php echo ENTRY_KEYWORDS ; ?></label>
+ <?php echo tep_draw_input_field('keywords', 'keywords','','onfocus="this.value=\'\'"') ; ?>
+ </li>
+
+ <?php /// call childs gabarit for add input html value based in datatype
+ echo tep_get_include_contents($page->GetVar('childs_gab')); ?>
+
+ <li class="BlockRows Button">
+ <?php echo tep_draw_hidden_field('data', tep_db_prepare_input(@$_REQUEST['data']) ) ; ?>
+ <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
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-05-05 22:12:38
|
Revision: 4388
http://oscss.svn.sourceforge.net/oscss/?rev=4388&view=rev
Author: oscim
Date: 2012-05-05 22:12:31 +0000 (Sat, 05 May 2012)
Log Message:
-----------
correction bug sur les enresgitrement de la table extra value lors de mutli-langu
correction definition table correspondante
Modified Paths:
--------------
trunk/catalog/admin/includes/classes/drivers/sqlproductsextrafields.php
trunk/catalog/admin/includes/gabarit/MGabCont/filter.language.gab
trunk/catalog/admin/includes/gabarit/MGabCont/filter.listfield.gab
trunk/catalog/admin/includes/modules/configuration/modprodextra.php
trunk/catalog/install/includes/sql/mysql/data/20_osc_status.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_products_extra_fields_values.sql
trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/classes/drivers/sql_DATATYPE_REPLACE_extrafields.php
trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/modules/configuration/mod_DATATYPE_REPLACE_extra.php
Modified: trunk/catalog/admin/includes/classes/drivers/sqlproductsextrafields.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlproductsextrafields.php 2012-05-05 08:25:28 UTC (rev 4387)
+++ trunk/catalog/admin/includes/classes/drivers/sqlproductsextrafields.php 2012-05-05 22:12:31 UTC (rev 4388)
@@ -461,7 +461,15 @@
if(!isset($option['epf_id']))
return 'epf_id';
- $sql_data_array['epf_id'] = tep_db_prepare_input($option['id']);
+ $DB=Database::getInstance();
+ $sql="SELECT COUNT(*) as id FROM " . TABLE_PRODUCTS_EXTRA_FIELDS_VALUES . " a WHERE epf_id ='".(int)$option['epf_id']."' GROUP BY languages_id ";
+ $query = $DB->query($sql);
+ $res = $query->fetchAssoc();
+
+
+ $sql_data_array['value_id'] = ( (int) tep_db_prepare_input($res['id']) + 1 );
+
+ $sql_data_array['epf_id'] = tep_db_prepare_input($option['epf_id']);
$sql_data_array['languages_id'] =(isset($option['languages_id']))? tep_db_prepare_input($option['languages_id']) : 0;
@@ -475,7 +483,7 @@
if(!$res)
return $res;
else
- return $res->__get('insertId');
+ return $sql_data_array['value_id'];
}
/**
Modified: trunk/catalog/admin/includes/gabarit/MGabCont/filter.language.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/MGabCont/filter.language.gab 2012-05-05 08:25:28 UTC (rev 4387)
+++ trunk/catalog/admin/includes/gabarit/MGabCont/filter.language.gab 2012-05-05 22:12:31 UTC (rev 4388)
@@ -15,7 +15,7 @@
<ul >
<?php foreach(tep_get_languages() as $k=>$item): ?>
<li>
- <?php echo tep_draw_radio_field('filters[language]['.$item['id'].']', 'filters[language]['.$item['id'].']', 'on', (bool)(count($_SESSION['filters']['language']) <=0 || (string)$_SESSION['filters']['language'][$item['id']] == 'on')); ?>
+ <?php echo tep_draw_radio_field('filters[language]', 'filters[language]', $item['id'], (bool)((int)@$_SESSION['filters']['language_id'] == (int)$item['id']) ); ?>
<span class="language image">
<?php echo tep_language_image($item['directory'] . '/images/' . $item['image'], $item['name']); ?>
</span>
Modified: trunk/catalog/admin/includes/gabarit/MGabCont/filter.listfield.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/MGabCont/filter.listfield.gab 2012-05-05 08:25:28 UTC (rev 4387)
+++ trunk/catalog/admin/includes/gabarit/MGabCont/filter.listfield.gab 2012-05-05 22:12:31 UTC (rev 4388)
@@ -16,7 +16,7 @@
<?php foreach(MGabCont::CallSt('DFilterAllfields') as $k=>$item):
$clean = substr($k, (strpos($k, '.')+1)); ?>
<li>
- <?php echo tep_draw_checkbox_field('filters[listfield]['.$clean.']', 'filters[listfield]['.$clean.']', 'on', (bool)(count($_SESSION['filters']['allfields']) <=1 || (string)$_SESSION['filters']['allfields'][$clean] == 'on')); ?>
+ <?php echo tep_draw_checkbox_field('filters[listfield]['.$clean.']', 'filters[listfield]['.$clean.']', 'on', (bool)(count($_SESSION['filters']['allfields']) <=1 || (string)@$_SESSION['filters']['allfields'][$clean] == 'on')); ?>
<?php echo (is_array($item)? $item['text'] : $item ) ?>
</li>
<?php endforeach; ?>
Modified: trunk/catalog/admin/includes/modules/configuration/modprodextra.php
===================================================================
--- trunk/catalog/admin/includes/modules/configuration/modprodextra.php 2012-05-05 08:25:28 UTC (rev 4387)
+++ trunk/catalog/admin/includes/modules/configuration/modprodextra.php 2012-05-05 22:12:31 UTC (rev 4388)
@@ -13,7 +13,7 @@
define('FILENAME_CFG_34',"gparentID=".@$_GET['gparentID']."&gID=".@$_GET['gID']);
-
+error_reporting(E_ALL);
Class modprodextra{
/**
@@ -294,22 +294,29 @@
if($fields->active_value_language) {
foreach ( tep_get_languages() as $row){
- $data_array = array(
- 'sort_order' => (int)(isset($_POST['sort_order'][$row['id']]) ? tep_db_prepare_input($_POST['sort_order'][$row['id']]) : 0),
- 'epf_value' => (isset($_POST['value'][$row['id']]) ? tep_db_prepare_input($_POST['value'][$row['id']]) :''),
- 'languages_id'=> $row['id']
- );
+ $data_array = array(
+ 'sort_order' => (int)(isset($_POST['sort_order'][$row['id']]) ? tep_db_prepare_input($_POST['sort_order'][$row['id']]) : 0),
+ 'value' => (isset($_POST['value'][$row['id']]) ? tep_db_prepare_input($_POST['value'][$row['id']]) :''),
+ 'languages_id'=> $row['id'],
+ 'id'=>(int)$_GET['vid'],
+ 'epf_id'=> self::$eid
+ );
+
+ $r=sqlproductsextrafieldsvalues::update($data_array);
}
}
else{
$data_array = array(
'sort_order' => (int)(isset($_POST['sort_order'][0]) ? tep_db_prepare_input($_POST['sort_order'][0]) : 0),
- 'epf_value' => (isset($_POST['value'][0]) ? tep_db_prepare_input($_POST['value'][0]) : ''),
- 'languages_id'=> '0'
+ 'value' => (isset($_POST['value'][0]) ? tep_db_prepare_input($_POST['value'][0]) : ''),
+ 'languages_id'=> '0',
+ 'id'=>(int)$_GET['vid'],
+ 'epf_id'=> self::$eid
);
- }
- tep_db_perform(TABLE_PRODUCTS_EXTRA_FIELDS_VALUES, $data_array, 'update',"value_id = '" . (int)$_GET['vid']."' and epf_id='".self::$eid."' ");
+ $r=sqlproductsextrafieldsvalues::update($data_array);
+ }
+
tep_redirect(tep_href_link(FILENAME_CONFIGURATION, FILENAME_CFG_34 . '&eid=' . self::$eid.'&action=value_listing'));
break;
@@ -320,29 +327,29 @@
case 'value_insert':
$fields=sqlproductsextrafields::fetch(array('id'=>(int)self::$eid ), true);
-
+ sqlproductsextrafields::fetch(array('id'=> (int)self::$eid ));
if($fields->active_value_language) {
$languages = tep_get_languages();
for ($i=0, $n=sizeof($languages); $i<$n; $i++){
$data_array = array(
'sort_order' => (int)(isset($_POST['sort_order'][$languages[$i]['id']]) ? tep_db_prepare_input($_POST['sort_order'][$languages[$i]['id']]) : 0),
- 'epf_value' => (isset($_POST['value'][$languages[$i]['id']]) ? tep_db_prepare_input($_POST['value'][$languages[$i]['id']]) : 0),
+ 'value' => (isset($_POST['value'][$languages[$i]['id']]) ? tep_db_prepare_input($_POST['value'][$languages[$i]['id']]) : 0),
'languages_id'=> $languages[$i]['id'],
'epf_id' => (int)self::$eid,
'parent_id' => (int)0,
);
- $r=tep_db_perform(TABLE_PRODUCTS_EXTRA_FIELDS_VALUES, $data_array);
+ $r=sqlproductsextrafieldsvalues::create($data_array);
}
}
else {
$data_array = array(
'sort_order' => (int)(isset($_POST['sort_order'][0]) ? tep_db_prepare_input($_POST['sort_order'][0]) : 0),
- 'epf_value' => (isset($_POST['value'][0]) ? tep_db_prepare_input($_POST['value'][0]) : 0),
+ 'value' => (isset($_POST['value'][0]) ? tep_db_prepare_input($_POST['value'][0]) : 0),
'languages_id'=> 0,
'epf_id' => (int)self::$eid,
'parent_id' => (int)0,
);
- $r=tep_db_perform(TABLE_PRODUCTS_EXTRA_FIELDS_VALUES, $data_array);
+ $r=sqlproductsextrafieldsvalues::create($data_array);
}
tep_redirect(tep_href_link(FILENAME_CONFIGURATION, FILENAME_CFG_34 . '&eid=' . self::$eid.'&action=value_listing'));
@@ -350,29 +357,15 @@
case 'value_delete_confirm':
- if ($confirm == 'yes') {
- if (isset($_GET['used']) && ($_GET['used'] > 0)) {
- $double_check = 'yes';
- } else {
- $children = tep_list_epf_children($vid);
- $field = 'extra_value_id' . (int)$eid;
- $query = tep_db_query("update " . TABLE_PRODUCTS_DESCRIPTION . " set " . $field . " = 0 where language_id = " . (int)$lid . " and " . $field . " in (" . (int)$vid . $children . ")");
- tep_db_query('delete from ' . TABLE_PRODUCTS_EXTRA_FIELDS_VALUES . ' where value_id in (' . (int)$vid . $children . ")");
- tep_redirect(tep_href_link(FILENAME_CONFIGURATION, FILENAME_CFG_34. '&list_id=' . $list_id));
- }
- } else {
- $double_check = 'no';
- }
- break;
+ case 'delete_value_confirm':
+ sqlproductsextrafields::fetch(array('id'=> (int)self::$eid ));
+
+ $r=sqlproductsextrafieldsvalues::delete(array('epf_id'=>(int)self::$eid, 'id'=>(int)$_GET['vid']));
- case 'value_delete':
- case 'value_edit':
+ tep_redirect(tep_href_link(FILENAME_CONFIGURATION, FILENAME_CFG_34. '&action=value_listing&eid=' . (int)self::$eid));
- $list_id = (isset($_GET['list_id']) ? $_GET['list_id'] : '_');
- list($eid, $lid) = explode('_', $list_id);
- $vid = (isset($_GET['vid']) ? $_GET['vid'] : '');
- $confirm = (isset($_GET['confirm']) ? $_GET['confirm'] : '');
break;
+
default:
}
@@ -694,11 +687,15 @@
private function build_value_list($epf_id, $lang_id, $value_array = '', $parent_id = 0) {
if (!is_array($value_array)) $value_array = array();
$sql = tep_db_query($sql_="select * from " . TABLE_PRODUCTS_EXTRA_FIELDS_VALUES . " where epf_id = " . (int)$epf_id . " and (languages_id = " . (int)$lang_id . " OR languages_id = 0) and parent_id = " . (int)$parent_id . " order by sort_order, epf_value");
-// echo $sql_;
- while ($v = tep_db_fetch_array($sql)) {
+
+ if( $sql ==false || $sql->__get('numRows')<=0 )
+ return array();
+
+ foreach($sql->fetchAllAssoc() as $v) {
$value_array[] = $v;
- $value_array = $this->build_value_list($epf_id, $lang_id, $value_array, $v['value_id']);
+// $value_array = $this->build_value_list($epf_id, $lang_id, $value_array, $v['value_id']);
}
+
return $value_array;
}
Modified: trunk/catalog/install/includes/sql/mysql/data/20_osc_status.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/data/20_osc_status.sql 2012-05-05 08:25:28 UTC (rev 4387)
+++ trunk/catalog/install/includes/sql/mysql/data/20_osc_status.sql 2012-05-05 22:12:31 UTC (rev 4388)
@@ -12,48 +12,51 @@
--+######################################################################--+
-INSERT INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (-1, 'orders', 1, 'OSC_ORDERS_STATUS_CANCELED', '#666');
-INSERT INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (1, 'orders', 1, 'OSC_ORDERS_STATUS_PENDING', '#FF1A00');
-INSERT INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (11, 'orders', 1, 'OSC_ORDERS_STATUS_PENDING_MONEY_ORDER', '#3393D9');
-INSERT INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (2, 'orders', 1, 'OSC_ORDERS_STATUS_PAYED', '#3393D9');
-INSERT INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (21, 'orders', 1, 'OSC_ORDERS_STATUS_PAYED_MONEY_ORDER', '#3393D9');
-INSERT INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (3, 'orders', 1, 'OSC_ORDERS_STATUS_PROCESSING', '#66FF00');
-INSERT INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (4, 'orders', 1, 'OSC_ORDERS_STATUS_EXPEDIED', '#66FF00');
-INSERT INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (5, 'orders', 1, 'OSC_ORDERS_STATUS_DELIVERED', '#66FF00');
-INSERT INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (6, 'orders', 1, 'OSC_ORDERS_STATUS_CLOSED', '#66FF00');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (-1, 'orders', 1, 'OSC_ORDERS_STATUS_CANCELED', '#666');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (1, 'orders', 1, 'OSC_ORDERS_STATUS_PENDING', '#FF1A00');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (11, 'orders', 1, 'OSC_ORDERS_STATUS_PENDING_MONEY_ORDER', '#3393D9');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (2, 'orders', 1, 'OSC_ORDERS_STATUS_PAYED', '#3393D9');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (21, 'orders', 1, 'OSC_ORDERS_STATUS_PAYED_MONEY_ORDER', '#3393D9');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (3, 'orders', 1, 'OSC_ORDERS_STATUS_PROCESSING', '#66FF00');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (4, 'orders', 1, 'OSC_ORDERS_STATUS_EXPEDIED', '#66FF00');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (5, 'orders', 1, 'OSC_ORDERS_STATUS_DELIVERED', '#66FF00');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (6, 'orders', 1, 'OSC_ORDERS_STATUS_CLOSED', '#66FF00');
-INSERT INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (1, 'returns', 1, 'OSC_RETURNS_STATUS_PENDING','#FF1A00');
-INSERT INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (2, 'returns',1, 'OSC_RETURNS_STATUS_AWAITING_RETURN', '#3393D9');
-INSERT INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (3, 'returns',1, 'OSC_RETURNS_STATUS_CANCELLED', '#66FF00');
-INSERT INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (4, 'returns',1, 'OSC_RETURNS_STATUS_COMPLETE', '#666');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (1, 'returns', 1, 'OSC_RETURNS_STATUS_PENDING','#FF1A00');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (2, 'returns',1, 'OSC_RETURNS_STATUS_AWAITING_RETURN', '#3393D9');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (3, 'returns',1, 'OSC_RETURNS_STATUS_CANCELLED', '#66FF00');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (4, 'returns',1, 'OSC_RETURNS_STATUS_COMPLETE', '#666');
-INSERT INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (1, 'return_reasons', 1, 'OSC_RETURN_REASONS_FAULTY','#FF1A00');
-INSERT INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (2, 'return_reasons',1, 'OSC_RETURN_REASONS_DAMAGED', '#3393D9');
-INSERT INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (3, 'return_reasons',1, 'OSC_RETURN_REASONS_INCORRECT_ITEM', '#66FF00');
-INSERT INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (4, 'return_reasons',1, 'OSC_RETURN_REASONS_WARRANTY', '#666');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (1, 'return_reasons', 1, 'OSC_RETURN_REASONS_FAULTY','#FF1A00');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (2, 'return_reasons',1, 'OSC_RETURN_REASONS_DAMAGED', '#3393D9');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (3, 'return_reasons',1, 'OSC_RETURN_REASONS_INCORRECT_ITEM', '#66FF00');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (4, 'return_reasons',1, 'OSC_RETURN_REASONS_WARRANTY', '#666');
-INSERT INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (1, 'refund_method', 1, 'OSC_REFUND_METHOD_PAYPAL','');
-INSERT INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (2, 'refund_method', 1, 'OSC_REFUND_METHOD_NOCHEX','');
-INSERT INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (3, 'refund_method', 1, 'OSC_REFUND_METHOD_EXCHANGE','');
-INSERT INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (4, 'refund_method', 1, 'OSC_REFUND_METHOD_GIFT_VOUCHERS','');
-INSERT INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (5, 'refund_method', 1, 'OSC_REFUND_METHOD_CUSTOMERS_POINTS','');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (1, 'refund_method', 1, 'OSC_REFUND_METHOD_PAYPAL','');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (2, 'refund_method', 1, 'OSC_REFUND_METHOD_NOCHEX','');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (3, 'refund_method', 1, 'OSC_REFUND_METHOD_EXCHANGE','');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (4, 'refund_method', 1, 'OSC_REFUND_METHOD_GIFT_VOUCHERS','');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (5, 'refund_method', 1, 'OSC_REFUND_METHOD_CUSTOMERS_POINTS','');
insert into osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (1, 'product', 1, 'OSC_PRODUCTS_VIRTUAL_TYPES_PHYSICAL','');
insert into osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (2, 'product',1, 'OSC_PRODUCTS_VIRTUAL_TYPES_SUBSCRIPTION','');
insert into osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (3, 'product',1, 'OSC_PRODUCTS_VIRTUAL_TYPES_SERVICE','');
insert into osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (4, 'product',1, 'OSC_PRODUCTS_VIRTUAL_TYPES_SOFTWARE','');
-INSERT INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (1, 'attribute_optiontype', 1, 'OSC_ATTRIBUTE_OPTIONTYPE_SELECT','');
-INSERT INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (2, 'attribute_optiontype', 1, 'OSC_ATTRIBUTE_OPTIONTYPE_TEXT','');
-INSERT INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (3, 'attribute_optiontype', 1, 'OSC_ATTRIBUTE_OPTIONTYPE_RADIO','');
-INSERT INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (4, 'attribute_optiontype', 1, 'OSC_ATTRIBUTE_OPTIONTYPE_CHECKBOX','');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (1, 'attribute_optiontype', 1, 'OSC_ATTRIBUTE_OPTIONTYPE_SELECT','');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (2, 'attribute_optiontype', 1, 'OSC_ATTRIBUTE_OPTIONTYPE_TEXT','');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (3, 'attribute_optiontype', 1, 'OSC_ATTRIBUTE_OPTIONTYPE_RADIO','');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (4, 'attribute_optiontype', 1, 'OSC_ATTRIBUTE_OPTIONTYPE_CHECKBOX','');
-INSERT INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (1, 'geo_zone_type', 1, 'OSC_GEO_ZONE_VAT','');
-INSERT INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (2, 'geo_zone_type', 1, 'OSC_GEO_ZONE_SHIPPING','');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (1, 'geo_zone_type', 1, 'OSC_GEO_ZONE_VAT','');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (2, 'geo_zone_type', 1, 'OSC_GEO_ZONE_SHIPPING','');
-INSERT INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (1, 'content', 1, 'OSC_CMS_CONTENT_SIMPLE','');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (1, 'content', 1, 'OSC_CMS_CONTENT_SIMPLE','');
-INSERT INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (1, 'featured', 1, 'OSC_FEATURED_UNE','');
-INSERT INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (2, 'featured', 1, 'OSC_FEATURED_SELECTION','');
\ No newline at end of file
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (1, 'featured', 1, 'OSC_FEATURED_UNE','');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (2, 'featured', 1, 'OSC_FEATURED_SELECTION','');
+
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (1, 'customers', 1, 'OSC_CUSTOMERS_RETAIL','');
+INSERT IGNORE INTO osc_status (status_id, status_type, language_id, status_name, status_color) VALUES (2, 'customers', 1, 'OSC_CUSTOMERS_PROFESSIONNAL','');
\ No newline at end of file
Modified: trunk/catalog/install/includes/sql/mysql/tables/osc_products_extra_fields_values.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/tables/osc_products_extra_fields_values.sql 2012-05-05 08:25:28 UTC (rev 4387)
+++ trunk/catalog/install/includes/sql/mysql/tables/osc_products_extra_fields_values.sql 2012-05-05 22:12:31 UTC (rev 4388)
@@ -13,7 +13,7 @@
drop table if exists osc_products_extra_fields_values;
create table osc_products_extra_fields_values (
- value_id int unsigned not null auto_increment,
+ value_id int unsigned not null,
epf_id int unsigned not null,
languages_id int not null,
parent_id int unsigned not null default 0,
Modified: trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/classes/drivers/sql_DATATYPE_REPLACE_extrafields.php
===================================================================
--- trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/classes/drivers/sql_DATATYPE_REPLACE_extrafields.php 2012-05-05 08:25:28 UTC (rev 4387)
+++ trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/classes/drivers/sql_DATATYPE_REPLACE_extrafields.php 2012-05-05 22:12:31 UTC (rev 4388)
@@ -458,6 +458,13 @@
if(!isset($option['epf_id']))
return 'epf_id';
+ $DB=Database::getInstance();
+ $sql="SELECT COUNT(*) as id FROM " . TABLE__DATATYPE_REPLACE_MAJ__EXTRA_FIELDS_VALUES . " a ". " GROUP BY epf_id ";
+ $query = $DB->query($sql);
+ $res = $query->fetchAssoc();
+
+ $sql_data_array['value_id'] = tep_db_prepare_input($res['id']);
+
$sql_data_array['epf_id'] = tep_db_prepare_input($option['id']);
$sql_data_array['languages_id'] =(isset($option['languages_id']))? tep_db_prepare_input($option['languages_id']) : 0;
@@ -472,7 +479,7 @@
if(!$res)
return $res;
else
- return $res->__get('insertId');
+ return $sql_data_array['value_id'];
}
/**
Modified: trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/modules/configuration/mod_DATATYPE_REPLACE_extra.php
===================================================================
--- trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/modules/configuration/mod_DATATYPE_REPLACE_extra.php 2012-05-05 08:25:28 UTC (rev 4387)
+++ trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/modules/configuration/mod_DATATYPE_REPLACE_extra.php 2012-05-05 22:12:31 UTC (rev 4388)
@@ -661,11 +661,15 @@
private function build_value_list($epf_id, $lang_id, $value_array = '', $parent_id = 0) {
if (!is_array($value_array)) $value_array = array();
$sql = tep_db_query($sql_="select * from " . TABLE__DATATYPE_REPLACE_MAJ__EXTRA_FIELDS_VALUES . " where epf_id = " . (int)$epf_id . " and languages_id = " . (int)$lang_id . " and parent_id = " . (int)$parent_id . " order by sort_order, epf_value");
-// echo $sql_;
- while ($v = tep_db_fetch_array($sql)) {
+
+ if( $sql ==false || $sql->__get('numRows')<=0 )
+ return array();
+
+ foreach($sql->fetchAllAssoc() as $v) {
$value_array[] = $v;
- $value_array = $this->build_value_list($epf_id, $lang_id, $value_array, $v['value_id']);
+// $value_array = $this->build_value_list($epf_id, $lang_id, $value_array, $v['value_id']);
}
+
return $value_array;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-05-05 08:25:35
|
Revision: 4387
http://oscss.svn.sourceforge.net/oscss/?rev=4387&view=rev
Author: oscim
Date: 2012-05-05 08:25:28 +0000 (Sat, 05 May 2012)
Log Message:
-----------
Correction coquille
suite travail modele
Modified Paths:
--------------
trunk/catalog/admin/includes/modules/pages/cms_content.php
trunk/catalog/includes/appli_top_Test.php
trunk/dev/GenerCode/datatype/Modele/catalog/common/classes/datatype_drivers/Data__DATATYPE_REPLACE_.php
Added Paths:
-----------
trunk/dev/GenerCode/datatype/Modele/catalog/common/classes/datatype_drivers/Data__DATATYPE_REPLACE_.php.modele2
Modified: trunk/catalog/admin/includes/modules/pages/cms_content.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/cms_content.php 2012-05-05 06:14:39 UTC (rev 4386)
+++ trunk/catalog/admin/includes/modules/pages/cms_content.php 2012-05-05 08:25:28 UTC (rev 4387)
@@ -141,6 +141,7 @@
'default'=>true,
'width'=>'18%',
),
+
'cat.categories_id' => array(
'sort'=>true,
'alias'=>'categories_id',
Modified: trunk/catalog/includes/appli_top_Test.php
===================================================================
--- trunk/catalog/includes/appli_top_Test.php 2012-05-05 06:14:39 UTC (rev 4386)
+++ trunk/catalog/includes/appli_top_Test.php 2012-05-05 08:25:28 UTC (rev 4387)
@@ -88,7 +88,7 @@
$DB=Database::getInstance();
//! element optionnel
-// if (file_exists(DIR_WS_INCLUDES . 'tables_files_modules.php')) require(DIR_WS_INCLUDES . 'tables_files_modules.php');
+ if (file_exists(DIR_WS_INCLUDES . 'tables_files_modules.php')) require(DIR_WS_INCLUDES . 'tables_files_modules.php');
/// set the application parameters
$res=$DB->query("SELECT configuration_key AS cfgKey, configuration_value AS cfgValue FROM " . TABLE_CONFIGURATION ." where configuration_type IN (2,3) ");
Modified: trunk/dev/GenerCode/datatype/Modele/catalog/common/classes/datatype_drivers/Data__DATATYPE_REPLACE_.php
===================================================================
--- trunk/dev/GenerCode/datatype/Modele/catalog/common/classes/datatype_drivers/Data__DATATYPE_REPLACE_.php 2012-05-05 06:14:39 UTC (rev 4386)
+++ trunk/dev/GenerCode/datatype/Modele/catalog/common/classes/datatype_drivers/Data__DATATYPE_REPLACE_.php 2012-05-05 08:25:28 UTC (rev 4387)
@@ -63,6 +63,12 @@
*/
public $p = '_DATATYPE_REPLACE_SEOTAG_xx';
/**
+ @var DataType root listing
+ Use for generate listing based on current data type precised in array
+ based on conf DATATYPES_ROOTLISTING_MANUFACTURER
+ */
+ public $RootListing = array();
+ /**
@var base listing sql
*/
public $listing_sql;
@@ -74,6 +80,9 @@
function __construct($next=false){
global $languages_id;
+
+ $this->RootListing = array_map('trim',explode(',',DATATYPES_ROOTLISTING__DATATYPE_REPLACE_MAJ_));
+
if($next) {
$this->listing_sql['tables'] = " FROM " . TABLE__DATATYPE_REPLACE_MAJ_ . " ".$this->p." ".
" LEFT JOIN " . TABLE__DATATYPE_REPLACE_MAJ__DESCRIPTION . " ".$this->p."d ON( ".$this->p."d._DATATYPE_REPLACE__id = ".$this->p."._DATATYPE_REPLACE__id AND ".$this->p."d.language_id = '" . (int)$languages_id . "' ) ".
@@ -134,6 +143,11 @@
$DB=Database::getInstance();
switch($mode){
+
+/**
+ TODO le flag doit utiliser le $reg_anchors
+*/
+
case 't':
default:
$sql = "select ft.page_id as ID, head_title_tag as tName, head_desc_tag, head_keywords_tag from " . TABLE_FULL_TAG . " ft, " . TABLE_FULL_TAG_DESCRIPTION . " ftd where ft.tag_id=ftd.tag_id and ft.page_type='".$this->DataType."' and ftd.language_id = '" . (int)$language_id. "' Limit 1";
Added: trunk/dev/GenerCode/datatype/Modele/catalog/common/classes/datatype_drivers/Data__DATATYPE_REPLACE_.php.modele2
===================================================================
--- trunk/dev/GenerCode/datatype/Modele/catalog/common/classes/datatype_drivers/Data__DATATYPE_REPLACE_.php.modele2 (rev 0)
+++ trunk/dev/GenerCode/datatype/Modele/catalog/common/classes/datatype_drivers/Data__DATATYPE_REPLACE_.php.modele2 2012-05-05 08:25:28 UTC (rev 4387)
@@ -0,0 +1,414 @@
+<?php if (!defined('HTTP_SERVER')) die('You can not access this file directly!');
+/**
+ @licence GPL 2005-2012 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 04/03/2012, 21:54
+ @author genrated by dev/datatype/generat
+ @encode UTF-8
+ @class Data__DATATYPE_REPLACE_
+ @brief This class is base datatype for _DATATYPE_REPLACE_
+*/
+
+class Data__DATATYPE_REPLACE_ {
+
+
+ /**
+ @var DataType string
+ */
+ public $DataType = '_DATATYPE_REPLACE_';
+
+ /**
+ @var DataType array reg for seo class
+ */
+ public $reg_anchors = array(
+ '_DATATYPE_REPLACE_' => '_DATATYPE_REPLACE_SEOTAG_'
+ );
+ /**
+ @var DataType array reg check for control get params , please respect order $reg_anchors
+ */
+ public $reg_check = array(
+ '([0-9]*)' // unique page
+ );
+ /**
+ @var DataType files for folder /_DATATYPE_REPLACE_
+ */
+ public $reg_filenames = array(
+ 'FILENAME__DATATYPE_REPLACE_MAJ_' => FILENAME_DEFAULT // unique page
+ );
+ /**
+ @var DataType Tables define
+ */
+ public $db_tables = array(
+ ## table master
+ 'TABLE__DATATYPE_REPLACE_MAJ_' => '_DATATYPE_REPLACE_', //
+ ## table language
+ 'TABLE__DATATYPE_REPLACE_MAJ__INFO' => '_DATATYPE_REPLACE__info', //
+ ## table extra
+// 'TABLE__DATATYPE_REPLACE_MAJ__EXTRA' => '_DATATYPE_REPLACE__extra', //
+ 'TABLE__DATATYPE_REPLACE_MAJ__EXTRA_FIELDS' => '_DATATYPE_REPLACE__extra_fields', //
+ 'TABLE__DATATYPE_REPLACE_MAJ__EXTRA_FIELDS_LABELS' => '_DATATYPE_REPLACE__extra_fields_labels', //
+ 'TABLE__DATATYPE_REPLACE_MAJ__EXTRA_FIELDS_VALUES' => '_DATATYPE_REPLACE__extra_fields_values', //
+ 'TABLE__DATATYPE_REPLACE_MAJ__TO__DATATYPE_REPLACE_MAJ__EXTRA_FIELDS' => '_DATATYPE_REPLACE__to__DATATYPE_REPLACE__extra_fields', //
+ ## table link datatype categorie
+ 'TABLE__DATATYPE_REPLACE_MAJ__TO_CATEGORIES' => '_DATATYPE_REPLACE__to_categories' //
+ );
+ /**
+ @var DataType dynamic
+ */
+ public $DataTypeDynamic = true;
+ /**
+ @var DataType root listing
+ Use for generate listing based on current data type precised in array
+ based on conf DATATYPES_ROOTLISTING_MANUFACTURER
+ */
+ public $RootListing = array();
+ /**
+ @var prefix alias a utilise systematiquement dans les requete sql
+ */
+ public $p = '_DATATYPE_REPLACE_SEOTAG_xx';
+ /**
+ @var base listing sql
+ */
+ public $listing_sql;
+
+ /**
+ @brief constructor
+ @param next bool true for complete load , but use 2 call
+ */
+ function __construct($next=false){
+ global $languages_id;
+
+
+ $this->RootListing = array_map('trim',explode(',',DATATYPES_ROOTLISTING__DATATYPE_REPLACE_MAJ_));
+
+ if($next) {
+ $this->listing_sql['tables'] = " FROM " . TABLE__DATATYPE_REPLACE_MAJ_ . " ".$this->p." ".
+// " LEFT JOIN " . TABLE__DATATYPE_REPLACE_MAJ__INFO . " ".$this->p."i ON( ".$this->p."i._DATATYPE_REPLACE__id = ".$this->p."._DATATYPE_REPLACE__id AND ".$this->p."d.language_id = '" . (int)$languages_id . "' ) ".
+ "";
+
+ $this->listing_sql['where'] = " WHERE ".$this->p."._DATATYPE_REPLACE__status = '1' ";
+ $this->listing_sql['sort'] = " ".$this->p."._DATATYPE_REPLACE__name ";
+ $this->listing_sql['base_key'] = "_DATATYPE_REPLACE__id ";
+ $this->listing_sql['col_count'] = " ".$this->p."._DATATYPE_REPLACE__id ";
+ }
+ }
+
+ /**
+ @brief test si al page est du type produits
+ @param $mode le type de control (page/cpath/seo)
+ */
+ function is_type($mode='unique'){
+ switch(strtolower($mode)){
+ case 'preload_root':
+ $page = page::getInstance();
+
+ $category_depth = $page->GetVar('category_depth');
+
+ if($category_depth == 'top'){
+ $category_depth = 'product';
+ $page->add_var_page('category_depth',$category_depth);
+ }
+ break;
+
+ case 'transversal':
+ return true;
+ break;
+ case 'listing':
+ return true;
+ break;
+ // listing mode, block home page
+// case 'unique':
+// DataTypes::ForceChilds($this->DataType, 'product');
+// break;
+
+ case 'search':
+ if(isset($_GET['data']) && $_GET['data'] == $this->DataType )
+ return true;
+ break;
+// case 'cpath':
+// if( isset($_GET['_DATATYPE_REPLACE_']) && is_numeric($_GET['_DATATYPE_REPLACE_']) )
+// return true;
+// break;
+// case 'unique':
+// // default:
+// if(isset($_GET['_DATATYPE_REPLACE_']) && ( is_int($_GET['_DATATYPE_REPLACE_']) || is_numeric($_GET['_DATATYPE_REPLACE_'])) )
+// return true;
+// break;
+ }
+ return false;
+ }
+
+
+ /**
+ @brief calcul du cpath specifique a ce tyep de donnée
+ */
+ function GetcPath(){
+ return _DATATYPE_REPLACE_::get__DATATYPE_REPLACE__path($_GET['_DATATYPE_REPLACE_']);
+ }
+
+ /**
+ @brief Prepare an retrun result Seo request
+ @param $mode string anchor key used
+ @param $subtype Not used
+ @param $id integer current id
+ @param $language_id integer current language id
+ @return array (
+ ID => '',
+ tName => '',
+ head_desc_tag => '',
+ head_keywords_tag =>''
+ )
+ */
+ public function SeoGetQuery($mode, $subtype, $id, $language_id){
+ $DB=Database::getInstance();
+
+ switch($mode){
+ case 't':
+ default:
+ $sql = "select ft.page_id as ID, head_title_tag as tName, head_desc_tag, head_keywords_tag from " . TABLE_FULL_TAG . " ft, " . TABLE_FULL_TAG_DESCRIPTION . " ftd where ft.tag_id=ftd.tag_id and ft.page_type='".$this->DataType."' and ftd.language_id = '" . (int)$language_id. "' Limit 1";
+ $rsql = $DB->query($sql);
+ if(!$rsql->__get('numRows')) {
+ $sql = "select c._DATATYPE_REPLACE__id as ID, _DATATYPE_REPLACE__name as tName from " . TABLE__DATATYPE_REPLACE_MAJ_ . " c where c._DATATYPE_REPLACE__status = '1' and c._DATATYPE_REPLACE__id='".(int)$id."' Limit 1" ;
+ $rsql = $DB->query($sql);
+ }
+ $result = $rsql->fetchAssoc();
+ $result['head_desc_tag']=(isset($result['head_desc_tag'])?$result['head_desc_tag']:'');
+ $result['head_keywords_tag']=(isset($result['head_keywords_tag'])?$result['head_keywords_tag']:'');
+
+ $result['sql']=$sql;
+
+ }
+
+ return $result;
+ }
+
+ /**
+ @brief Prepare an dgenere all cache for divers
+ */
+ public function SeoCacheQuery(/*$language_id*/){
+ global $languages_id;
+ $DB=Database::getInstance();
+ $return_array = array();
+
+ if( _test_bool('SEO_ADD_CAT_PARENT') )
+ $res=$DB->query( "select ft.page_id as ID, head_title_tag as tName, head_desc_tag, head_keywords_tag from " . TABLE_FULL_TAG . " ft, " . TABLE_FULL_TAG_DESCRIPTION . " ftd where ft.tag_id=ftd.tag_id and ft.page_type='".$this->DataType."' and ftd.language_id = '" . (int)$languages_id. "'" );
+ else
+ $res=$DB->query( $sql="SELECT DISTINCT ft.page_id as ID , head_title_tag as tName, head_desc_tag, head_keywords_tag, cd.categories_cpath from " . TABLE_FULL_TAG . " ft LEFT JOIN ".TABLE__DATATYPE_REPLACE_MAJ__TO_CATEGORIES." cd2 ON page_id=cd2._DATATYPE_REPLACE__id JOIN ".TABLE_CATEGORIES." cd ON cd.categories_id = cd2.categories_id , " . TABLE_FULL_TAG_DESCRIPTION . " ftd where ft.tag_id=ftd.tag_id and ft.page_type='".$this->DataType."' and ftd.language_id = '" . (int)$languages_id. "' GROUP BY ID" );
+
+ while ($result =$res->fetchAssoc()){
+ $path = '';
+
+ if(isset($result['categories_cpath']) && !empty($result['categories_cpath'])) {
+ $list = explode('_',$result['categories_cpath']);
+
+ foreach($list as $row )
+ $path .= DataTypes::Getseoquery('c', '', $row, $languages_id).'-';
+ }
+
+ $result['path']= $path . ((isset($result['url']) && !empty($result['url']) )? $result['url'] : $result['tName']) ;
+
+ $return_array[] = array ($result['ID'], $result, '_DATATYPE_REPLACE_MAJ_') ;
+ }
+
+
+ return $return_array;
+ }
+
+
+ /**
+ @brief chargement des données transversal
+ @param $type string name childs type for listing
+ @param subtype object childs DataType
+ */
+ function FO_load_listing($type,$subtype){
+ global $current_category_id, $languages_id;
+ $page = page::getInstance();
+ $category_depth = $page->GetVar('category_depth');
+
+ $this->ChildsType = $type;
+
+
+ $sql_tmp = $subtype->listing_sql;
+
+ $this->listing_sql =
+ "SELECT DISTINCT ". $sql_tmp['col_count'] ." ".
+ $sql_tmp['tables'] .
+ $sql_tmp['where'] .
+ " AND _DATATYPE_REPLACE__id = '" . (int)$_GET['_DATATYPE_REPLACE__id'] . "' ";
+ $this->listing_sort = $sql_tmp['sort'] ;
+ $this->listing_col_count = $sql_tmp['col_count'] ;
+
+ }
+
+
+ /**
+ @brief calcul du cpath specifique a ce tyep de donnée
+ */
+ function FO_load_page(){
+ global $aca_product,$product_info, $page__DATATYPE_REPLACE_, $language, $cPath;
+
+ $page = page::getInstance();
+ $DB=Database::getInstance();
+
+
+
+ switch(strtolower(DataTypes::$CurrentMode)){
+ case 'search':
+ global $keywords, $search_keywords, $pto, $dto, $pfrom, $dfrom;
+
+
+
+ // calcul extra actived for search
+ $allextraactived = array();
+ $query = $DB->query("SELECT epf_id, epf_uses_value_list, epf_active_value_language FROM " . TABLE_PRODUCTS_EXTRA_FIELDS . " WHERE epf_status = '1' AND epf_advanced_search = '1' ");
+ $allextraactived = $query->fetchAllAssoc();
+
+ foreach($allextraactived as $row)
+ if($row['epf_uses_value_list'] == 0)
+ $use_value_list[] = false;
+ else
+ $use_value_list[] = true;
+
+
+
+ $this->listing_sql['col_count'] = " ".$this->p."._DATATYPE_REPLACE__id ";
+ $this->listing_sql['sort'] = " ".$this->p."d._DATATYPE_REPLACE__title ";
+ /// add input entry in advanced search page forms
+ $this->listing_sql['gab'] = $this->DataType.'/advanced_search.other.input';
+
+
+ $this->listing_sql['tables'] = " FROM " . TABLE__DATATYPE_REPLACE_MAJ_ . " ".$this->p." ";
+ $this->listing_sql['tables'] .=" LEFT JOIN " . TABLE__DATATYPE_REPLACE_MAJ__DESCRIPTION . " ".$this->p."d using(_DATATYPE_REPLACE__id) ";
+ $this->listing_sql['tables'] .=" LEFT JOIN " . TABLE__DATATYPE_REPLACE_MAJ__TO_CATEGORIES . " ".$this->p."2c using(_DATATYPE_REPLACE__id) ";
+ $this->listing_sql['tables'] .= " LEFT JOIN " . TABLE_CATEGORIES . " cat ON( ".$this->p."2c.categories_id = cat.categories_id and cat.categories_status='1' ) ";
+
+ /// Add search in Extra value
+ $this->listing_sql['tables'] .= " LEFT JOIN " . TABLE__DATATYPE_REPLACE_MAJ__TO__DATATYPE_REPLACE_MAJ__EXTRA_FIELDS . " p2pef ON(p2pef._DATATYPE_REPLACE__id = p."._DATATYPE_REPLACE_."_id AND ( p2pef.languages_id = '" . (int)$languages_id . "' OR p2pef.languages_id = '0' ) ) ";
+
+ if(in_array(true, (array)$use_value_list))
+ $this->listing_sql['tables'] .= " LEFT JOIN " . TABLE__DATATYPE_REPLACE_MAJ__EXTRA_FIELDS_VALUES . " pefv ON(pefv.epf_id = p2pef._DATATYPE_REPLACE__extra_fields_id AND ( pefv.languages_id = '" . (int)$languages_id . "' OR pefv.languages_id = '0' ) ) ";
+
+
+ $this->listing_sql['where'] = " WHERE ".$this->p."._DATATYPE_REPLACE__status > 0 AND ".$this->p."d.language_id = '" . (int)$languages_id . "' ";
+
+ if (isset($_GET['categories_id']) && tep_not_null($_GET['categories_id'])) {
+ if (isset($_GET['inc_subcat']) && ($_GET['inc_subcat'] == '1')) {
+ $subcategories_array = array();
+ tep_get_subcategories($subcategories_array, $_GET['categories_id']);
+
+ $this->listing_sql['where'] .= " and ".$this->p."2c._DATATYPE_REPLACE__id = ".$this->p."._DATATYPE_REPLACE__id and ".$this->p."2c._DATATYPE_REPLACE__id = ".$this->p."d._DATATYPE_REPLACE__id and (".$this->p."2c.categories_id = '" . (int)$_GET['categories_id'] . "'";
+
+ for ($i=0, $n=sizeof($subcategories_array); $i<$n; $i++ ) {
+ $this->listing_sql['where'] .= " or ".$this->p."2c.categories_id = '" . (int)$subcategories_array[$i] . "'";
+ }
+
+ $this->listing_sql['where'] .= ")";
+ } else {
+ $this->listing_sql['where'] .= " and ".$this->p."2c._DATATYPE_REPLACE__id = ".$this->p."._DATATYPE_REPLACE__id and ".$this->p."2c._DATATYPE_REPLACE__id = ".$this->p."d._DATATYPE_REPLACE__id and ".$this->p."d.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$_GET['categories_id'] . "'";
+ }
+ }
+
+
+ if (isset($search_keywords) && (sizeof($search_keywords) > 0)) {
+ $this->listing_sql['where'] .= " and (";
+ for ($i=0, $n=sizeof($search_keywords); $i<$n; $i++ ) {
+ switch ($search_keywords[$i]) {
+ case '(':
+ case ')':
+ case 'and':
+ case 'or':
+ $this->listing_sql['where'] .= " " . $search_keywords[$i] . " ";
+ break;
+ default:
+ $keyword = tep_db_prepare_input($search_keywords[$i]);
+ $this->listing_sql['where'] .= "(".$this->p."d._DATATYPE_REPLACE__title like '%" . tep_db_input($keyword) . "%' ";
+// if (isset($_GET['search_in_description']) && ($_GET['search_in_description'] == '1'))
+ $this->listing_sql['where'] .= " or ".$this->p."d._DATATYPE_REPLACE__description like '%" . tep_db_input($keyword) . "%'";
+ $this->listing_sql['where'] .= ')';
+ break;
+ }
+ }
+ $this->listing_sql['where'] .= " )";
+ }
+
+ if (tep_not_null($dfrom)) $this->listing_sql['where'] .= " and ".$this->p.".date_added >= '" . tep_date_raw($dfrom) . "'";
+
+ if (tep_not_null($dto)) $this->listing_sql['where'] .= " and ".$this->p.".date_added <= '" . tep_date_raw($dto) . "'";
+
+
+
+ /// Add search in Extra value
+ if(count($allextraactived) > 0){
+ $tmp = '';
+ foreach($allextraactived as $row) {
+ if($row['epf_uses_value_list'] == 0)
+ $tmp .= " OR ( p2pef._DATATYPE_REPLACE__extra_fields_id = '".$row['epf_id']."' AND p2pef._DATATYPE_REPLACE__extra_fields_value like '%" . tep_db_input($keyword) . "%' ) ";
+ else
+ $tmp .= " OR ( pefv.epf_id = '".$row['epf_id']."' AND pefv.epf_value like '%" . tep_db_input($keyword) . "%' ) ";
+ }
+ $this->listing_sql['where'] .= " OR ( " . substr($tmp, 3) . " ) ";
+ }
+
+
+ return $this;
+
+ break;
+
+
+
+ case 'transversal':
+ case 'listing':
+ case 'unique':
+ default:
+ $page->init('_DATATYPE_REPLACE_.php',$language);
+ $breadcrumb=$page->return_object('breadcrumb');
+
+ // call transversal load in other modules
+ DataTypes::transversal('transversal');
+
+ /** init aca module */
+ $aca=$page->new_class('_DATATYPE_REPLACE_',true);
+
+ if (isset($_GET['action'])) {
+ $action=(string)tep_db_prepare_input($_GET['action']);
+ if ($aca->check_action('',$action) ) {
+ $aca->after_check_action('',$action);
+ tep_redirect(tep_href_link('_DATATYPE_REPLACE_.php', tep_get_all_get_params(array('action'))));
+ }
+ }
+
+ $_DATATYPE_REPLACE_=_DATATYPE_REPLACE_::get_item( (int)$_GET['_DATATYPE_REPLACE_'] );
+
+ /**
+ Incremente nbr de vus du produits
+ */
+ $DB->query("update " . TABLE__DATATYPE_REPLACE_MAJ__DESCRIPTION . " set _DATATYPE_REPLACE__viewed = _DATATYPE_REPLACE__viewed+1 where _DATATYPE_REPLACE__id = '" . (int)$_GET['_DATATYPE_REPLACE_'] . "' AND language_id = '" . (int)$languages_id . "'");
+
+ $page->add_var_page('_DATATYPE_REPLACE_',$_DATATYPE_REPLACE_);
+
+ $page->title=$_DATATYPE_REPLACE_->title;
+ $breadcrumb->add($_DATATYPE_REPLACE_->title, $_DATATYPE_REPLACE_->href );
+//
+// $page_content = $page->force_content('_DATATYPE_REPLACE_.php');
+// $page->add_var_page('current_id',(int)$_GET['_DATATYPE_REPLACE_']);
+
+
+ // var use in draw master detail listing
+ $obj = new stdClass();
+ $obj->image = $manuf['_DATATYPE_REPLACE__image'];
+ $obj->name = $manuf['_DATATYPE_REPLACE__name'];
+ $obj->description = false;
+
+ $page->add_var_page('RootListing',$obj);
+ $page->add_var_page('current_id',(int)$_GET['_DATATYPE_REPLACE__id']);
+ }
+
+
+ return $page_content;
+ }
+
+
+}
+?>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-05-05 06:14:47
|
Revision: 4386
http://oscss.svn.sourceforge.net/oscss/?rev=4386&view=rev
Author: oscim
Date: 2012-05-05 06:14:39 +0000 (Sat, 05 May 2012)
Log Message:
-----------
erreur ecras?\195?\169 lors de modification precedente
Modified Paths:
--------------
trunk/catalog/includes/functions/initialize.php
Modified: trunk/catalog/includes/functions/initialize.php
===================================================================
--- trunk/catalog/includes/functions/initialize.php 2012-05-04 21:10:24 UTC (rev 4385)
+++ trunk/catalog/includes/functions/initialize.php 2012-05-05 06:14:39 UTC (rev 4386)
@@ -3,371 +3,202 @@
@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 17/11/11, 10:06
+ @version 2.1.0
+ @date 22/01/11, 20:23
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
- @class SvnUpdate
+ *\file initialize.php
+ *\brief Function de base, appelé en tete de application_top, equivalent preload
+ Rassemble les function mini avant chargement appli
+*/
- Mise a jour version, tools SourceForge, utilise viewSVN, trac
- apres install renseigne correctement cip manage, et prepare les element du zip d'install via cip
- NOTE:
- Require config php
- @par set_time_limit(0)
- @par file_get_contents(url)
+/**
+ @brief class chargeur autoload by sort level
+ @class autoload
+ @example
+ Add path for level 45
+ autoload::addPath(DIR_FS_TEMPLATES.TEMPLATE_NAME.'/'.DIR_WS_CLASSES .'%s.php',4);
*/
+class autoload {
+ public static $path=array();
+ protected static $_instance;
-error_reporting(E_ALL);
-
-class SvnUpdate implements InterfaceModule{
-
- /// Configuration
- /// -> Settings you *must* adjust
-// public static $URL_OSCSS_ORG_TRAC = 'http://sourceforge.net/apps/trac/oscss/changeset/?format=zip&new=SVN_REV_MAX&old=SVN_REV&new_path=trunk%2Fcatalog&old_path=trunk%2Fcatalog';
-// public static $URL_OSCSS_GET_REV = 'http://oscss.svn.sourceforge.net/viewvc/oscss?view=revision';
-// public static $PATH_SVN_BRANCHE = 'trunk/catalog/';
- public static $FILEPATH_SVN_CORE = 'oscss.version.xml';
-
-
-
- public static $URL_OSCSS_ORG_TRAC ;
- public static $URL_OSCSS_GET_REV ;
- public static $PATH_SVN_BRANCHE ;
-
-
-
- //! page de redirection apres exec
- const REDIRECT = FILENAME_PACKAGE;
-
- /// version module
- public $version='2.1.0';
-
- public static $code;
- public $title;
- public $description;
- public $sort_order;
- public $enabled;
- /**
-
- */
- public static $actu_rev;
- public static $current_rev;
-
- /**
- class constructor
- @author oscim <mail os...@os...> <www http://www.oscim.fr>
- */
- function __construct() {
-
- self::$code = __CLASS__;
- $this->type='generic';
- $this->enabled = true;
- $this->sort_order = (defined('MODULE_GENERIC_SVNUPDATE_SORT_ORDER'))?MODULE_GENERIC_SVNUPDATE_SORT_ORDER : 0;
-
- $this->title = __('Synchro Svn');
- $this->description = __('Synchronisation Svn');
-
- global $languages_id, $messageStack;
- $this->language_id = $languages_id;
-
-
- $svnupdate=0;
- if(!tep_session_is_registered('svnupdate')) {
-
- $info = get_info_core(DIR_FS_ROOT_DOCS .self::$FILEPATH_SVN_CORE, 'all');
-
- self::$actu_rev= (int)$info->svn;
- self::$URL_OSCSS_ORG_TRAC = $info->urloscssorgtrac;
- self::$URL_OSCSS_GET_REV = $info->urloscssgetrev;
- self::$PATH_SVN_BRANCHE = (string)$info->pathsvnbranche;
-
- self::$current_rev=$this->get_current_rev(self::$URL_OSCSS_GET_REV);
- if(self::$actu_rev!=self::$current_rev)$svnupdate=1;
- $_SESSION['svnupdate']=$svnupdate;
- }
- else $svnupdate=(int)$_SESSION['svnupdate'];
-
- if($svnupdate==1) {
- $messageStack->add( __("mise a jour disponible ").'<a href="'.tep_href_link(FILENAME_ACA,'action_type='.$this->type.'&action_class='.self::$code.'&action_method=draw_form&action_type=generic').'">'.__('detail').'</a>', 'info' ) ;
- }
-
+ private function __construct(){
+ self::addPath(DIR_FS_CATALOG.DIR_WS_CLASSES .'%s.php');// standard
+ self::addPath(DIR_FS_CATALOG.DIR_WS_CLASSES .'core_page/%s.php'); // page contructeur
+ self::addPath(DIR_FS_CATALOG.DIR_WS_CLASSES .'core_page/overlay/%s.php'); // page contructeur ressource surcouche template
+ self::addPath(DIR_FS_CATALOG.DIR_WS_CLASSES .'drivers/page/%s.php'); // data ressource type
+ self::addPath(DIR_FS_CATALOG.DIR_WS_CLASSES .'drivers/data/%s.php'); // data ressource type
+ self::addPath(DIR_FS_CATALOG.DIR_WS_CLASSES .'osCSS.%s.php');
+ self::addPath(DIR_FS_CATALOG.DIR_WS_COMMON_CLASSES .'%s.php');// Common
}
-
- function check_action($actions){
-
- if(isset($_POST['ACTU_REV'])){
- $S=$this->exe_update($_POST['ACTU_REV'],$_POST['CURENT_REV']);
- tep_redirect(tep_href_link(self::REDIRECT, 'type_data=source&action=source_update'));
- }
-
- return $actions;
- }
-
-//=====================================
-// Functions for modules specific
-//=====================================
-
/**
- Ajout menu
- @author oscim <mail os...@os...> <www http://www.oscim.fr>
+ @brief singeltown call
*/
- public function _add_menu() {
- return('<a href="'.tep_href_link(FILENAME_ACA,'action_type='.$this->type.'&action_class='.self::$code.'&action_method=draw_form&action_type=generic').'">'.__('Svn synchro').'</a>');
+ public static function getInstance() {
+ if(self::$_instance == null) self::$_instance = new self();
+ return self::$_instance;
}
/**
- @author oscim <mail os...@os...> <www http://www.oscim.fr>
+ @fn getPath($strClassName)
+ @brief call in __autoload()
+ @param $strClassName
+ @return path or false
*/
- public function draw_form(){
- if((int)self::$actu_rev==0) self::$actu_rev=get_info_core(DIR_FS_ROOT_DOCS .self::$FILEPATH_SVN_CORE);
- if((int)self::$current_rev==0) self::$current_rev=$this->get_current_rev(self::$URL_OSCSS_GET_REV);
+ public static function getPath($strClassName){
+ ksort(self::$path );
+ foreach(self::$path as $level => $array)
+ foreach($array as $path)
+ if (file_exists(sprintf($path,$strClassName )) )
+ return(sprintf($path,$strClassName ));
-
- if(!isset($_POST['ACTU_REV'])) {
- if(self::$actu_rev==self::$current_rev) $S='<p>'. __('Pas de nouvelle revisions, actuel:').' '.self::$actu_rev.'</p>';
- else $S=tep_get_include_contents(self::$code.'.form');
- }
- return $S;
+ return false;
}
/**
- @author oscim <mail os...@os...> <www http://www.oscim.fr>
+ @brief add path for loop in autoload function
+ @param $string string for sprintf
+ @param $level niveau de priorite
*/
- static private function write_dest($str, &$dest) {
- if (is_resource($dest)) fwrite($dest, $str);
- else $dest .= $str;
+ public static function addPath($string, $level=5){
+ self::$path[(int)$level][]=$string;
+ ksort(self::$path );
}
+}
- /**
- Recup current version svn, basé sur ViewVC fournis pas Sourceforge , vieVC 1.0.5
- @author oscim <mail os...@os...> <www http://www.oscim.fr>
- */
- private function get_current_rev($src) {
- $content=fileUtility::url_fopen($src);
- if ($content !== false){
- preg_match("#.oscss..Revision.([0-9]*).*#i",strip_tags($content),$val );
- if(isset($val[1]) && is_numeric($val[1])) return $val[1];
- }
- else return false;
- }
+/**
+ @brief magic function php , load class
+ @param $strClassName string
+*/
+function __autoload($strClassName) {
+ autoload::getInstance();
+ if( ($path=autoload::getPath($strClassName)) && $path != false) include_once($path);
+// trigger_error(sprintf(__CLASS__.'Could not load class %s', $strClassName), E_USER_ERROR);
+}
- /**
- Execution synhro
- @author oscim <mail os...@os...> <www http://www.oscim.fr>
- */
- private function exe_update($corre_rev,$curent_rev){
- global $messageStack;
+/**
+ \brief Scan a directory and return its files and folders as array
+ \original-code TYPOlight Open Source CMS Copyright (C) 2005-2010 Leo Feyer
+ \param $strFolder string
+ \return array
+*/
+function scan($strFolder) {
+ global $arrScanCache;
- //! bloque delai
- @set_time_limit(0);
- $folder_admin=substr(DIR_WS_ADMIN, strlen(DIR_WS_CATALOG) );
- $name='old'.$corre_rev.'new'.$curent_rev.'_patch.zip';
- $file=DIR_FS_ROOT_DOCS.'admin/contributions/'.$name;
+ // Add trailing slash
+ if (substr($strFolder, -1, 1) != '/') $strFolder .= '/';
- //! recup zip fournis par trac SF
- $oscss_zip = @fopen($file,'wb');
- // recup zip
- $tp=@file_get_contents/*fileUtility::url_fopen*/(str_replace( array('SVN_REV_MAX', 'SVN_REV'), array($curent_rev, $corre_rev), self::$URL_OSCSS_ORG_TRAC));
- fputs( $oscss_zip,$tp);
- fclose($oscss_zip);
- if ($file!=false) $messageStack->add( __("Le fichier à été enregistré"),'succes' ) ;
- else $messageStack->add( __("Le fichier n'as pas été enregistré"), 'error' ) ;
- //! dezipp
- sleep(1);
- tep_zip_extractto( $file,DIR_FS_CATALOG);
- //! mode admin folder
- // report branche dans le core
- if(file_exists(DIR_FS_CATALOG.self::$PATH_SVN_BRANCHE)){
- $this->recurse_copy(DIR_FS_CATALOG.self::$PATH_SVN_BRANCHE,DIR_FS_CATALOG);
- $this->recurse_delete(DIR_FS_CATALOG.self::$PATH_SVN_BRANCHE);
- }
- // deplacement admin
- if(file_exists(DIR_FS_CATALOG.'admin')){
- $this->recurse_copy(DIR_FS_CATALOG.'admin',DIR_FS_ADMIN);
- if($folder_admin !='admin/') $this->recurse_delete(DIR_FS_CATALOG.'admin/');
- }
+ // Load from cache
+ if (isset($arrScanCache[$strFolder])) return $arrScanCache[$strFolder];
-
- //! update core.xml
- $this->new_version_xml($curent_rev, $corre_rev);
- //! db recup merge
-
- //! exe db update
-
-
- //! bascule en cip.zip
-// $this->gener_install($name,$curent_rev, $corre_rev);
-
- //! reset alert messageStack
- $_SESSION['svnupdate']=0;
-
+ $arrReturn = array();
+ // Scan directory
+ foreach (scandir($strFolder) as $strFile) {
+ if ($strFile == '.' || $strFile == '..') continue;
+ $arrReturn[] = $strFile;
}
- /**
- Ecriture fichier version moteur
- @author oscim <mail os...@os...> <www http://www.oscim.fr>
- @param
- @a int $curent_rev version courante
- @a int $corre_rev n° revision patch
- */
- private function new_version_xml($curent_rev, $corre_rev){
+ $arrScanCache[$strFolder] = $arrReturn;
+ return $arrReturn;
+}
-
- $SimpleParser = get_info_core(DIR_FS_ROOT_DOCS .self::$FILEPATH_SVN_CORE, 'all');
-
- $SimpleParser->svn = (int)$curent_rev;
-
-
- // Create a new DOMDocument object
- $doc = new DOMDocument('1.0');
-
- // add spaces, new lines and make the XML more readable format
- $doc->formatOutput = true;
-
- // Get a DOMElement object from a SimpleXMLElement object
- $domnode = dom_import_simplexml($SimpleParser);
-
- $domnode->preserveWhiteSpace = false;
-
- // Import node into current document
- $domnode = $doc->importNode($domnode, true);
-
- // Add new child at the end of the children
- $domnode = $doc->appendChild($domnode);
-
- // Dump the internal XML tree back into a string
- $saveXml = $doc->saveXML();
- $r = unlink(DIR_FS_ROOT_DOCS.self::$FILEPATH_SVN_CORE);
- $r = $file_vers= fopen(DIR_FS_ROOT_DOCS.self::$FILEPATH_SVN_CORE,'w+');
- $r = fputs( $file_vers,$saveXml);
- $r = fclose($file_vers);
- }
-
- /**
- Ajout element table cip suivi pkg
- @author oscim <mail os...@os...> <www http://www.oscim.fr>
- @param
- @a string $name le nom sans ext
- */
- private function insert_db_cip($name){
- $DB=Database::getInstance();
- $DB->query("INSERT INTO ".TABLE_CIP." (cip_folder_name,cip_installed) VALUES ('".$name."','1')");
- }
-
- /**
- Tranformation du zip en paquet pour cip, ajout rep + construction file install.xml
- @author oscim <mail os...@os...> <www http://www.oscim.fr>
- @param
- @a string $name_zip le nom du zip existant
- @a int $curent_rev version courante
- @a int $corre_rev n° revision patch
- */
- private function gener_install($name_zip,$curent_rev, $corre_rev){
-
- $folder=substr($name_zip, 0, strlen($name_zip)-4);
-
- $file='<?xml version="1.0" encoding="UTF-8" standalone="yes"?>'."\n".
- '<contrib>'."\n".
- '<description><!-- Description of the contribution -->'."\n".
- '<details contrib_ref="" forum_ref="" contrib_type="upgrade" status="0" last_update="'.date("Y-m-d").'" />'."\n".
- '<author_pkg>www.oscim.fr</author_pkg>'."\n".
- '<comments>'.sprintf(__("installation automatisé patch mise à jour, generer par le module SvnUpdate; Vou permet de reappliquer ou recuprer les elements de mise à jour entre ces version : avant patch %s, revision patch %s"), $corre_rev,$curent_rev) .'</comments>'."\n".
- '<credits>'.self::$code.'</credits>'."\n".
- '<version>'.$this->version.'</version>'."\n".
- '<post_install_notes><![CDATA['."\n".
- __("fichier creer dynamiquement. les mises à jour ne concerne que les fichier, la base de donnée n'est pas modifié")."\n".
- ']]></post_install_notes>'."\n".
- '</description>'."\n".
- '<extractzip>'."\n".
- '<zip name="'.$name_zip.'" />'."\n".
- '<path name="catalog/" />'."\n".
- '</extractzip>'."\n".
- '</contrib>'."\n";
-
-
- mkdir(DIR_FS_ROOT_DOCS.'admin/contributions/'.$folder.'/');
- copy(DIR_FS_ROOT_DOCS.'admin/contributions/'.$name_zip,DIR_FS_ROOT_DOCS.'admin/contributions/'.$folder.'/'.$name_zip);
-
-
- //! ne pas supp le zip, sert a être traité par cip
-// unlink(DIR_FS_ADMIN.'contributions/'.$name_zip);
- $this->insert_db_cip($folder);
-
- $file_vers= @fopen(DIR_FS_ROOT_DOCS.'admin/contributions/'.$folder.'/install.xml','w');
- fputs( $file_vers,$file);
- fclose($file_vers);
- }
-
- /**
- Delete repertoire recursif
- @author oscim <mail os...@os...> <www http://www.oscim.fr>
- */
- static function recurse_delete($src){
- if(strlen($src)<=strlen(DIR_FS_CATALOG))
- return false;
-
- $dir = opendir($src);
- @mkdir($dst);
- while(false !== ( $file = readdir($dir)) ) {
- if (( $file != '.' ) && ( $file != '..' )) {
- if ( is_dir($src . '/' . $file) ) {
- SvnUpdate::recurse_delete($src . '/' . $file);
- }
- else {
- @unlink($src . '/' . $file);
- }
+/**
+ @fn exception_handler()
+ @brief Gestionnaire d'exception
+*/
+function exception_handler() {
+ try {
+// // throw new MyException();
+ throw new Exception();
}
- }
- closedir($dir);
- rmdir($src);
- }
+ catch (MyException $e) {
+// echo $e->getMessage();
+ echo("FATAL:: '{$e->__toString()}')\n{$e}\n" );
- /**
- Copy repertoire recursif
- @author oscim <mail os...@os...> <www http://www.oscim.fr>
- */
- static function recurse_copy($src,$dst){
- $dir = opendir($src);
- @mkdir($dst);
- while(false !== ( $file = readdir($dir)) ) {
- if (( $file != '.' ) && ( $file != '..' )) {
- if ( is_dir($src . '/' . $file) ) {
- SvnUpdate::recurse_copy($src . '/' . $file,$dst . '/' . $file);
- }
- else {
- @copy($src . '/' . $file,$dst . '/' . $file);
- }
}
+ catch (Exception $e) {
+ echo $e->getMessage();
+// print_r($e);
}
- closedir($dir);
- }
+}
+/**
+ @brief Test si une constante est défini , si celle-ci existe, renvoi sa valeur, sinon return (string)'false'
+*/
+function tep_cst_define($text){
+ if(defined(strtoupper($text))) return constant(strtoupper($text));
+ else return 'false';
+}
-//=====================================
-// Functions for modules administration
-//=====================================
- 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;
- }
+/**
+ * \fn _cst_bool($text)
+ * \a string/boolean défini par une constante!
+ * \return boolean true/false
+*/
+function _cst_bool($text){
+ if(!tep_not_null($text)) return false;
+ $value=tep_cst_define($text);
+ if( (is_string($value) && strtoupper($value)=='TRUE')||( is_bool($value) && $value==TRUE) ) return true;
+ elseif( (is_string($value) && (strtoupper($value)=='FALSE')) || ( is_bool($value) && $value==FALSE) ) return false;
+ return false;
+}
- 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)");
- }
+/**
+ * \fn _test_bool($value)
+ * \a string/boolean
+ * \return boolean true/false
+*/
+function _test_bool($value){
+ if(!tep_not_null($value)) return false;
+ if( (is_string($value) && (strtoupper($value)=='TRUE' || $value=='1' ) )||( is_bool($value) && ($value==TRUE || $value==1) ) || (is_numeric($value) && $value=1) ) return true;
+ elseif( (is_string($value) && (strtoupper($value)=='FALSE')) || ( is_bool($value) && $value==FALSE) ) return false;
+ return false;
+}
- function remove() { return false; }
- function keys() {
- return array();
- }
+/**
+ @fn ($file,$name='svn')
+ @brief Recuperation des element de svn basé sur le fichier oscss.version.xml
+ @param $file string path file xml oscss.version.xml
+ @param $name balise html
+ @return content balise xml
+*/
+function get_info_core($file,$name='svn'){
+ if(!file_exists($file)) return die(__("erreur recuperation fichier"));
+ $SimpleParser = simplexml_load_file($file);
+ if(!isset($SimpleParser->$name)) die(__("erreur recuperation n° revision courant")) ;
+ else return $SimpleParser->$name;
+}
+/**
+ @fn __($str)
+ @brief Convertion de langue Generation 2
+ @param $str string for convert lang
+*/
+function __($str) {
+ global $lang;
+ return isset($lang[$str]) ? $lang[$str] : $str;
}
+
+/**
+ @fn tep_not_null($value)
+ @brief check if is not null value , return boolean
+ @param $value string
+ @return boolean
+*/
+function tep_not_null($value) {
+ if (is_array($value)) {
+ if (sizeof($value) > 0) return true;
+ else return false;
+ } else {
+ if ( ($value != '' && $value != '1000-01-01 00:00:00') && (strtolower($value) != 'null') && (strlen(trim($value)) > 0)) return true;
+ else return false;
+ }
+}
?>
\ 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...> - 2012-05-04 21:10:31
|
Revision: 4385
http://oscss.svn.sourceforge.net/oscss/?rev=4385&view=rev
Author: oscim
Date: 2012-05-04 21:10:24 +0000 (Fri, 04 May 2012)
Log Message:
-----------
coquille
Modified Paths:
--------------
trunk/catalog/admin/includes/languages/fr_FR/modeles/email/mouton/add_customer.txt
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/customers.txt
trunk/catalog/admin/includes/modules/generic/SvnUpdate.php
trunk/catalog/admin/includes/modules/pages/customers.php
Modified: trunk/catalog/admin/includes/languages/fr_FR/modeles/email/mouton/add_customer.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modeles/email/mouton/add_customer.txt 2012-05-04 14:46:55 UTC (rev 4384)
+++ trunk/catalog/admin/includes/languages/fr_FR/modeles/email/mouton/add_customer.txt 2012-05-04 21:10:24 UTC (rev 4385)
@@ -8,7 +8,7 @@
@encode UTF-8
*/
$lang['EMAIL_SEPARATOR']="------------------------------------------------------" ;
-$lang['EMAIL_TEXT_SUBJECT']="Changement des informations personnelles" ;
+$lang['EMAIL_TEXT_SUBJECT']="Confirmation de votre inscription" ;
$lang['EMAIL_TEXT_FOOTER_LG1']="Ceci est un message automatisé, veuillez ne pas répondre ! " ;
$lang['ADMIN_EMAIL_TEXT_BONOUR']="Bonjour " ;
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/pages/customers.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/pages/customers.txt 2012-05-04 14:46:55 UTC (rev 4384)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/customers.txt 2012-05-04 21:10:24 UTC (rev 4385)
@@ -125,10 +125,17 @@
/* alert */
- $lang['customers save success']="Enresgitrement du client reussie" ;
+ $lang['error in process notification for %s']="Erreur lors de la notification à " ;
+ $lang['error in process send mail for %s'] = "Erreur lors de l'envoi email à %s";
+ $lang['send mail for %s ok'] = "Envoi email reussie à %s";
+ $lang['customers save success']="Enregistrement du client reussie" ;
$lang['error save in process']="Erreur lors de l'enregistrement du client" ;
+ $lang['action delete for %s ok']="Erreur lors de la suppresion du client %s" ;
+ $lang['error delete for %s']="Suppression du client %s effectué" ;
+
+
/* js alert */
$lang['js gender']="* La valeur de 'Genre' doit être choisie." ;
$lang['js first_name']="* L'entrée 'Prénom' doit avoir au moins %s caractères." ;
@@ -139,4 +146,8 @@
$lang['js city']="* L'entrée 'Ville' doit avoir au moins %s caractères." ;
+
+/* Email subject */
+ $lang['subject copy creat new compte for customers']="Copie - creation de compte client par un admin" ;
+ $lang['creat new compte for customers']="Confirmation de votre inscription" ;
?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/modules/generic/SvnUpdate.php
===================================================================
--- trunk/catalog/admin/includes/modules/generic/SvnUpdate.php 2012-05-04 14:46:55 UTC (rev 4384)
+++ trunk/catalog/admin/includes/modules/generic/SvnUpdate.php 2012-05-04 21:10:24 UTC (rev 4385)
@@ -22,11 +22,19 @@
/// Configuration
/// -> Settings you *must* adjust
- public static $URL_OSCSS_ORG_TRAC = 'http://sourceforge.net/apps/trac/oscss/changeset/?format=zip&new=SVN_REV_MAX&old=SVN_REV&new_path=trunk%2Fcatalog&old_path=trunk%2Fcatalog';
- public static $URL_OSCSS_GET_REV = 'http://oscss.svn.sourceforge.net/viewvc/oscss?view=revision';
- public static $PATH_SVN_BRANCHE = 'trunk/catalog/';
+// public static $URL_OSCSS_ORG_TRAC = 'http://sourceforge.net/apps/trac/oscss/changeset/?format=zip&new=SVN_REV_MAX&old=SVN_REV&new_path=trunk%2Fcatalog&old_path=trunk%2Fcatalog';
+// public static $URL_OSCSS_GET_REV = 'http://oscss.svn.sourceforge.net/viewvc/oscss?view=revision';
+// public static $PATH_SVN_BRANCHE = 'trunk/catalog/';
public static $FILEPATH_SVN_CORE = 'Documents/oscss.version.xml';
+
+
+ public static $URL_OSCSS_ORG_TRAC ;
+ public static $URL_OSCSS_GET_REV ;
+ public static $PATH_SVN_BRANCHE ;
+
+
+
//! page de redirection apres exec
const REDIRECT = FILENAME_PACKAGE;
@@ -166,13 +174,15 @@
// report branche dans le core
if(file_exists(DIR_FS_CATALOG.self::$PATH_SVN_BRANCHE)){
$this->recurse_copy(DIR_FS_CATALOG.self::$PATH_SVN_BRANCHE,DIR_FS_CATALOG);
- $this->recurse_delete(DIR_FS_CATALOG.'branches/');
+ $this->recurse_delete(DIR_FS_CATALOG.self::$PATH_SVN_BRANCHE);
}
// deplacement admin
if(file_exists(DIR_FS_CATALOG.'admin')){
$this->recurse_copy(DIR_FS_CATALOG.'admin',DIR_FS_ADMIN);
if($folder_admin !='admin/') $this->recurse_delete(DIR_FS_CATALOG.'admin/');
}
+
+
//! update core.xml
$this->new_version_xml($curent_rev, $corre_rev);
//! db recup merge
@@ -181,7 +191,7 @@
//! bascule en cip.zip
- $this->gener_install($name,$curent_rev, $corre_rev);
+// $this->gener_install($name,$curent_rev, $corre_rev);
//! reset alert messageStack
$_SESSION['svnupdate']=0;
Modified: trunk/catalog/admin/includes/modules/pages/customers.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/customers.php 2012-05-04 14:46:55 UTC (rev 4384)
+++ trunk/catalog/admin/includes/modules/pages/customers.php 2012-05-04 21:10:24 UTC (rev 4385)
@@ -550,7 +550,7 @@
$message_final=tep_post_prepare_email('add_customer.tpl',$language,$myarray);
- if( ! tep_mail($result['customers_firstname'] . ' ' . $result['customers_lastname'], $result['customers_email_address'],__('email text subject'), $message_final) )
+ if( ! tep_mail($result['customers_firstname'] . ' ' . $result['customers_lastname'], $result['customers_email_address'],__('creat new compte for customers'), $message_final) )
$messageStack->add_session(sprintf(__('error in process send mail for %s'), $result['customers_firstname'] .' '. $result['customers_email_address'] ), 'error');
else
$messageStack->add_session(sprintf(__('send mail for %s ok'), $result['customers_firstname'] .' '. $result['customers_email_address']), 'success');
@@ -585,8 +585,15 @@
break;
case 'deleteconfirm':
$customers_id = tep_db_prepare_input(self::$Id);
+ $result=sqlcustomer::fetch(array('id'=>$_id), false );
+
+ if($result ==false)
+ tep_redirect(tep_href_link(self::FILENAME));
- $result=sqlcustomer::delete(array('id'=>$customers_id));
+ if( sqlcustomer::delete(array('id'=>$customers_id)) !=false )
+ $messageStack->add_session(sprintf(__('action delete for %s ok'), $result['customers_firstname'] .' '. $result['customers_email_address']), 'success');
+ else
+ $messageStack->add_session(sprintf(__('error delete for %s'), $result['customers_firstname'] .' '. $result['customers_email_address'] ), 'error');
tep_redirect(tep_href_link(self::FILENAME));
break;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-05-04 14:47:07
|
Revision: 4384
http://oscss.svn.sourceforge.net/oscss/?rev=4384&view=rev
Author: oscim
Date: 2012-05-04 14:46:55 +0000 (Fri, 04 May 2012)
Log Message:
-----------
FIX bug and force use correct xml file version
Modified Paths:
--------------
trunk/catalog/includes/functions/initialize.php
Modified: trunk/catalog/includes/functions/initialize.php
===================================================================
--- trunk/catalog/includes/functions/initialize.php 2012-05-04 13:34:32 UTC (rev 4383)
+++ trunk/catalog/includes/functions/initialize.php 2012-05-04 14:46:55 UTC (rev 4384)
@@ -3,202 +3,371 @@
@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 22/01/11, 20:23
+ @version 2.1.1
+ @date 17/11/11, 10:06
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
- *\file initialize.php
- *\brief Function de base, appelé en tete de application_top, equivalent preload
- Rassemble les function mini avant chargement appli
-*/
+ @class SvnUpdate
+ Mise a jour version, tools SourceForge, utilise viewSVN, trac
+ apres install renseigne correctement cip manage, et prepare les element du zip d'install via cip
-/**
- @brief class chargeur autoload by sort level
- @class autoload
- @example
- Add path for level 45
- autoload::addPath(DIR_FS_TEMPLATES.TEMPLATE_NAME.'/'.DIR_WS_CLASSES .'%s.php',4);
+ NOTE:
+ Require config php
+ @par set_time_limit(0)
+ @par file_get_contents(url)
*/
-class autoload {
- public static $path=array();
- protected static $_instance;
- private function __construct(){
- self::addPath(DIR_FS_CATALOG.DIR_WS_CLASSES .'%s.php');// standard
- self::addPath(DIR_FS_CATALOG.DIR_WS_CLASSES .'core_page/%s.php'); // page contructeur
- self::addPath(DIR_FS_CATALOG.DIR_WS_CLASSES .'core_page/overlay/%s.php'); // page contructeur ressource surcouche template
- self::addPath(DIR_FS_CATALOG.DIR_WS_CLASSES .'drivers/page/%s.php'); // data ressource type
- self::addPath(DIR_FS_CATALOG.DIR_WS_CLASSES .'drivers/data/%s.php'); // data ressource type
- self::addPath(DIR_FS_CATALOG.DIR_WS_CLASSES .'osCSS.%s.php');
- self::addPath(DIR_FS_CATALOG.DIR_WS_COMMON_CLASSES .'%s.php');// Common
+error_reporting(E_ALL);
+
+class SvnUpdate implements InterfaceModule{
+
+ /// Configuration
+ /// -> Settings you *must* adjust
+// public static $URL_OSCSS_ORG_TRAC = 'http://sourceforge.net/apps/trac/oscss/changeset/?format=zip&new=SVN_REV_MAX&old=SVN_REV&new_path=trunk%2Fcatalog&old_path=trunk%2Fcatalog';
+// public static $URL_OSCSS_GET_REV = 'http://oscss.svn.sourceforge.net/viewvc/oscss?view=revision';
+// public static $PATH_SVN_BRANCHE = 'trunk/catalog/';
+ public static $FILEPATH_SVN_CORE = 'oscss.version.xml';
+
+
+
+ public static $URL_OSCSS_ORG_TRAC ;
+ public static $URL_OSCSS_GET_REV ;
+ public static $PATH_SVN_BRANCHE ;
+
+
+
+ //! page de redirection apres exec
+ const REDIRECT = FILENAME_PACKAGE;
+
+ /// version module
+ public $version='2.1.0';
+
+ public static $code;
+ public $title;
+ public $description;
+ public $sort_order;
+ public $enabled;
+ /**
+
+ */
+ public static $actu_rev;
+ public static $current_rev;
+
+ /**
+ class constructor
+ @author oscim <mail os...@os...> <www http://www.oscim.fr>
+ */
+ function __construct() {
+
+ self::$code = __CLASS__;
+ $this->type='generic';
+ $this->enabled = true;
+ $this->sort_order = (defined('MODULE_GENERIC_SVNUPDATE_SORT_ORDER'))?MODULE_GENERIC_SVNUPDATE_SORT_ORDER : 0;
+
+ $this->title = __('Synchro Svn');
+ $this->description = __('Synchronisation Svn');
+
+ global $languages_id, $messageStack;
+ $this->language_id = $languages_id;
+
+
+ $svnupdate=0;
+ if(!tep_session_is_registered('svnupdate')) {
+
+ $info = get_info_core(DIR_FS_ROOT_DOCS .self::$FILEPATH_SVN_CORE, 'all');
+
+ self::$actu_rev= (int)$info->svn;
+ self::$URL_OSCSS_ORG_TRAC = $info->urloscssorgtrac;
+ self::$URL_OSCSS_GET_REV = $info->urloscssgetrev;
+ self::$PATH_SVN_BRANCHE = (string)$info->pathsvnbranche;
+
+ self::$current_rev=$this->get_current_rev(self::$URL_OSCSS_GET_REV);
+ if(self::$actu_rev!=self::$current_rev)$svnupdate=1;
+ $_SESSION['svnupdate']=$svnupdate;
+ }
+ else $svnupdate=(int)$_SESSION['svnupdate'];
+
+ if($svnupdate==1) {
+ $messageStack->add( __("mise a jour disponible ").'<a href="'.tep_href_link(FILENAME_ACA,'action_type='.$this->type.'&action_class='.self::$code.'&action_method=draw_form&action_type=generic').'">'.__('detail').'</a>', 'info' ) ;
+ }
+
}
+
+ function check_action($actions){
+
+ if(isset($_POST['ACTU_REV'])){
+ $S=$this->exe_update($_POST['ACTU_REV'],$_POST['CURENT_REV']);
+ tep_redirect(tep_href_link(self::REDIRECT, 'type_data=source&action=source_update'));
+ }
+
+ return $actions;
+ }
+
+//=====================================
+// Functions for modules specific
+//=====================================
+
/**
- @brief singeltown call
+ Ajout menu
+ @author oscim <mail os...@os...> <www http://www.oscim.fr>
*/
- public static function getInstance() {
- if(self::$_instance == null) self::$_instance = new self();
- return self::$_instance;
+ public function _add_menu() {
+ return('<a href="'.tep_href_link(FILENAME_ACA,'action_type='.$this->type.'&action_class='.self::$code.'&action_method=draw_form&action_type=generic').'">'.__('Svn synchro').'</a>');
}
/**
- @fn getPath($strClassName)
- @brief call in __autoload()
- @param $strClassName
- @return path or false
+ @author oscim <mail os...@os...> <www http://www.oscim.fr>
*/
- public static function getPath($strClassName){
- ksort(self::$path );
- foreach(self::$path as $level => $array)
- foreach($array as $path)
- if (file_exists(sprintf($path,$strClassName )) )
- return(sprintf($path,$strClassName ));
+ public function draw_form(){
+ if((int)self::$actu_rev==0) self::$actu_rev=get_info_core(DIR_FS_ROOT_DOCS .self::$FILEPATH_SVN_CORE);
+ if((int)self::$current_rev==0) self::$current_rev=$this->get_current_rev(self::$URL_OSCSS_GET_REV);
- return false;
+
+ if(!isset($_POST['ACTU_REV'])) {
+ if(self::$actu_rev==self::$current_rev) $S='<p>'. __('Pas de nouvelle revisions, actuel:').' '.self::$actu_rev.'</p>';
+ else $S=tep_get_include_contents(self::$code.'.form');
+ }
+ return $S;
}
/**
- @brief add path for loop in autoload function
- @param $string string for sprintf
- @param $level niveau de priorite
+ @author oscim <mail os...@os...> <www http://www.oscim.fr>
*/
- public static function addPath($string, $level=5){
- self::$path[(int)$level][]=$string;
- ksort(self::$path );
+ static private function write_dest($str, &$dest) {
+ if (is_resource($dest)) fwrite($dest, $str);
+ else $dest .= $str;
}
-}
+ /**
+ Recup current version svn, basé sur ViewVC fournis pas Sourceforge , vieVC 1.0.5
+ @author oscim <mail os...@os...> <www http://www.oscim.fr>
+ */
+ private function get_current_rev($src) {
+ $content=fileUtility::url_fopen($src);
+ if ($content !== false){
+ preg_match("#.oscss..Revision.([0-9]*).*#i",strip_tags($content),$val );
+ if(isset($val[1]) && is_numeric($val[1])) return $val[1];
+ }
+ else return false;
+ }
-/**
- @brief magic function php , load class
- @param $strClassName string
-*/
-function __autoload($strClassName) {
- autoload::getInstance();
- if( ($path=autoload::getPath($strClassName)) && $path != false) include_once($path);
-// trigger_error(sprintf(__CLASS__.'Could not load class %s', $strClassName), E_USER_ERROR);
-}
-/**
- \brief Scan a directory and return its files and folders as array
- \original-code TYPOlight Open Source CMS Copyright (C) 2005-2010 Leo Feyer
- \param $strFolder string
- \return array
-*/
-function scan($strFolder) {
- global $arrScanCache;
+ /**
+ Execution synhro
+ @author oscim <mail os...@os...> <www http://www.oscim.fr>
+ */
+ private function exe_update($corre_rev,$curent_rev){
+ global $messageStack;
- // Add trailing slash
- if (substr($strFolder, -1, 1) != '/') $strFolder .= '/';
+ //! bloque delai
+ @set_time_limit(0);
+ $folder_admin=substr(DIR_WS_ADMIN, strlen(DIR_WS_CATALOG) );
+ $name='old'.$corre_rev.'new'.$curent_rev.'_patch.zip';
+ $file=DIR_FS_ROOT_DOCS.'admin/contributions/'.$name;
- // Load from cache
- if (isset($arrScanCache[$strFolder])) return $arrScanCache[$strFolder];
+ //! recup zip fournis par trac SF
+ $oscss_zip = @fopen($file,'wb');
+ // recup zip
+ $tp=@file_get_contents/*fileUtility::url_fopen*/(str_replace( array('SVN_REV_MAX', 'SVN_REV'), array($curent_rev, $corre_rev), self::$URL_OSCSS_ORG_TRAC));
+ fputs( $oscss_zip,$tp);
+ fclose($oscss_zip);
+ if ($file!=false) $messageStack->add( __("Le fichier à été enregistré"),'succes' ) ;
+ else $messageStack->add( __("Le fichier n'as pas été enregistré"), 'error' ) ;
+ //! dezipp
+ sleep(1);
+ tep_zip_extractto( $file,DIR_FS_CATALOG);
+ //! mode admin folder
+ // report branche dans le core
+ if(file_exists(DIR_FS_CATALOG.self::$PATH_SVN_BRANCHE)){
+ $this->recurse_copy(DIR_FS_CATALOG.self::$PATH_SVN_BRANCHE,DIR_FS_CATALOG);
+ $this->recurse_delete(DIR_FS_CATALOG.self::$PATH_SVN_BRANCHE);
+ }
+ // deplacement admin
+ if(file_exists(DIR_FS_CATALOG.'admin')){
+ $this->recurse_copy(DIR_FS_CATALOG.'admin',DIR_FS_ADMIN);
+ if($folder_admin !='admin/') $this->recurse_delete(DIR_FS_CATALOG.'admin/');
+ }
- $arrReturn = array();
- // Scan directory
- foreach (scandir($strFolder) as $strFile) {
- if ($strFile == '.' || $strFile == '..') continue;
- $arrReturn[] = $strFile;
+
+ //! update core.xml
+ $this->new_version_xml($curent_rev, $corre_rev);
+ //! db recup merge
+
+ //! exe db update
+
+
+ //! bascule en cip.zip
+// $this->gener_install($name,$curent_rev, $corre_rev);
+
+ //! reset alert messageStack
+ $_SESSION['svnupdate']=0;
+
}
- $arrScanCache[$strFolder] = $arrReturn;
- return $arrReturn;
-}
+ /**
+ Ecriture fichier version moteur
+ @author oscim <mail os...@os...> <www http://www.oscim.fr>
+ @param
+ @a int $curent_rev version courante
+ @a int $corre_rev n° revision patch
+ */
+ private function new_version_xml($curent_rev, $corre_rev){
-/**
- @fn exception_handler()
- @brief Gestionnaire d'exception
-*/
-function exception_handler() {
- try {
-// // throw new MyException();
- throw new Exception();
+
+ $SimpleParser = get_info_core(DIR_FS_ROOT_DOCS .self::$FILEPATH_SVN_CORE, 'all');
+
+ $SimpleParser->svn = (int)$curent_rev;
+
+
+ // Create a new DOMDocument object
+ $doc = new DOMDocument('1.0');
+
+ // add spaces, new lines and make the XML more readable format
+ $doc->formatOutput = true;
+
+ // Get a DOMElement object from a SimpleXMLElement object
+ $domnode = dom_import_simplexml($SimpleParser);
+
+ $domnode->preserveWhiteSpace = false;
+
+ // Import node into current document
+ $domnode = $doc->importNode($domnode, true);
+
+ // Add new child at the end of the children
+ $domnode = $doc->appendChild($domnode);
+
+ // Dump the internal XML tree back into a string
+ $saveXml = $doc->saveXML();
+ $r = unlink(DIR_FS_ROOT_DOCS.self::$FILEPATH_SVN_CORE);
+ $r = $file_vers= fopen(DIR_FS_ROOT_DOCS.self::$FILEPATH_SVN_CORE,'w+');
+ $r = fputs( $file_vers,$saveXml);
+ $r = fclose($file_vers);
+ }
+
+ /**
+ Ajout element table cip suivi pkg
+ @author oscim <mail os...@os...> <www http://www.oscim.fr>
+ @param
+ @a string $name le nom sans ext
+ */
+ private function insert_db_cip($name){
+ $DB=Database::getInstance();
+ $DB->query("INSERT INTO ".TABLE_CIP." (cip_folder_name,cip_installed) VALUES ('".$name."','1')");
+ }
+
+ /**
+ Tranformation du zip en paquet pour cip, ajout rep + construction file install.xml
+ @author oscim <mail os...@os...> <www http://www.oscim.fr>
+ @param
+ @a string $name_zip le nom du zip existant
+ @a int $curent_rev version courante
+ @a int $corre_rev n° revision patch
+ */
+ private function gener_install($name_zip,$curent_rev, $corre_rev){
+
+ $folder=substr($name_zip, 0, strlen($name_zip)-4);
+
+ $file='<?xml version="1.0" encoding="UTF-8" standalone="yes"?>'."\n".
+ '<contrib>'."\n".
+ '<description><!-- Description of the contribution -->'."\n".
+ '<details contrib_ref="" forum_ref="" contrib_type="upgrade" status="0" last_update="'.date("Y-m-d").'" />'."\n".
+ '<author_pkg>www.oscim.fr</author_pkg>'."\n".
+ '<comments>'.sprintf(__("installation automatisé patch mise à jour, generer par le module SvnUpdate; Vou permet de reappliquer ou recuprer les elements de mise à jour entre ces version : avant patch %s, revision patch %s"), $corre_rev,$curent_rev) .'</comments>'."\n".
+ '<credits>'.self::$code.'</credits>'."\n".
+ '<version>'.$this->version.'</version>'."\n".
+ '<post_install_notes><![CDATA['."\n".
+ __("fichier creer dynamiquement. les mises à jour ne concerne que les fichier, la base de donnée n'est pas modifié")."\n".
+ ']]></post_install_notes>'."\n".
+ '</description>'."\n".
+ '<extractzip>'."\n".
+ '<zip name="'.$name_zip.'" />'."\n".
+ '<path name="catalog/" />'."\n".
+ '</extractzip>'."\n".
+ '</contrib>'."\n";
+
+
+ mkdir(DIR_FS_ROOT_DOCS.'admin/contributions/'.$folder.'/');
+ copy(DIR_FS_ROOT_DOCS.'admin/contributions/'.$name_zip,DIR_FS_ROOT_DOCS.'admin/contributions/'.$folder.'/'.$name_zip);
+
+
+ //! ne pas supp le zip, sert a être traité par cip
+// unlink(DIR_FS_ADMIN.'contributions/'.$name_zip);
+ $this->insert_db_cip($folder);
+
+ $file_vers= @fopen(DIR_FS_ROOT_DOCS.'admin/contributions/'.$folder.'/install.xml','w');
+ fputs( $file_vers,$file);
+ fclose($file_vers);
+ }
+
+ /**
+ Delete repertoire recursif
+ @author oscim <mail os...@os...> <www http://www.oscim.fr>
+ */
+ static function recurse_delete($src){
+ if(strlen($src)<=strlen(DIR_FS_CATALOG))
+ return false;
+
+ $dir = opendir($src);
+ @mkdir($dst);
+ while(false !== ( $file = readdir($dir)) ) {
+ if (( $file != '.' ) && ( $file != '..' )) {
+ if ( is_dir($src . '/' . $file) ) {
+ SvnUpdate::recurse_delete($src . '/' . $file);
+ }
+ else {
+ @unlink($src . '/' . $file);
+ }
}
- catch (MyException $e) {
-// echo $e->getMessage();
- echo("FATAL:: '{$e->__toString()}')\n{$e}\n" );
+ }
+ closedir($dir);
+ rmdir($src);
+ }
+ /**
+ Copy repertoire recursif
+ @author oscim <mail os...@os...> <www http://www.oscim.fr>
+ */
+ static function recurse_copy($src,$dst){
+ $dir = opendir($src);
+ @mkdir($dst);
+ while(false !== ( $file = readdir($dir)) ) {
+ if (( $file != '.' ) && ( $file != '..' )) {
+ if ( is_dir($src . '/' . $file) ) {
+ SvnUpdate::recurse_copy($src . '/' . $file,$dst . '/' . $file);
+ }
+ else {
+ @copy($src . '/' . $file,$dst . '/' . $file);
+ }
}
- catch (Exception $e) {
- echo $e->getMessage();
-// print_r($e);
}
-}
+ closedir($dir);
+ }
-/**
- @brief Test si une constante est défini , si celle-ci existe, renvoi sa valeur, sinon return (string)'false'
-*/
-function tep_cst_define($text){
- if(defined(strtoupper($text))) return constant(strtoupper($text));
- else return 'false';
-}
+//=====================================
+// Functions for modules administration
+//=====================================
-/**
- * \fn _cst_bool($text)
- * \a string/boolean défini par une constante!
- * \return boolean true/false
-*/
-function _cst_bool($text){
- if(!tep_not_null($text)) return false;
- $value=tep_cst_define($text);
- if( (is_string($value) && strtoupper($value)=='TRUE')||( is_bool($value) && $value==TRUE) ) return true;
- elseif( (is_string($value) && (strtoupper($value)=='FALSE')) || ( is_bool($value) && $value==FALSE) ) return false;
- return false;
-}
+ 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;
+ }
-/**
- * \fn _test_bool($value)
- * \a string/boolean
- * \return boolean true/false
-*/
-function _test_bool($value){
- if(!tep_not_null($value)) return false;
- if( (is_string($value) && (strtoupper($value)=='TRUE' || $value=='1' ) )||( is_bool($value) && ($value==TRUE || $value==1) ) || (is_numeric($value) && $value=1) ) return true;
- elseif( (is_string($value) && (strtoupper($value)=='FALSE')) || ( is_bool($value) && $value==FALSE) ) return false;
- return false;
-}
+ 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; }
-/**
- @fn ($file,$name='svn')
- @brief Recuperation des element de svn basé sur le fichier oscss.version.xml
- @param $file string path file xml oscss.version.xml
- @param $name balise html
- @return content balise xml
-*/
-function get_info_core($file,$name='svn'){
- if(!file_exists($file)) return die(__("erreur recuperation fichier"));
- $SimpleParser = simplexml_load_file($file);
- if(!isset($SimpleParser->$name)) die(__("erreur recuperation n° revision courant")) ;
- else return $SimpleParser->$name;
-}
+ function keys() {
+ return array();
+ }
-/**
- @fn __($str)
- @brief Convertion de langue Generation 2
- @param $str string for convert lang
-*/
-function __($str) {
- global $lang;
- return isset($lang[$str]) ? $lang[$str] : $str;
}
-
-/**
- @fn tep_not_null($value)
- @brief check if is not null value , return boolean
- @param $value string
- @return boolean
-*/
-function tep_not_null($value) {
- if (is_array($value)) {
- if (sizeof($value) > 0) return true;
- else return false;
- } else {
- if ( ($value != '' && $value != '1000-01-01 00:00:00') && (strtolower($value) != 'null') && (strlen(trim($value)) > 0)) return true;
- else return false;
- }
-}
?>
\ 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...> - 2012-05-04 13:34:42
|
Revision: 4383
http://oscss.svn.sourceforge.net/oscss/?rev=4383&view=rev
Author: oscim
Date: 2012-05-04 13:34:32 +0000 (Fri, 04 May 2012)
Log Message:
-----------
ajutement page email
Modified Paths:
--------------
trunk/catalog/Documents/modeles/email/mouton/publicCustomers/footer.inc
trunk/catalog/admin/includes/gabarit/adminNotif/display_view.listing.gab
trunk/catalog/admin/includes/gabarit/mail.page.gab
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/adminNotif.txt
trunk/catalog/admin/includes/modules/pages/mail.php
Modified: trunk/catalog/Documents/modeles/email/mouton/publicCustomers/footer.inc
===================================================================
--- trunk/catalog/Documents/modeles/email/mouton/publicCustomers/footer.inc 2012-05-04 12:09:24 UTC (rev 4382)
+++ trunk/catalog/Documents/modeles/email/mouton/publicCustomers/footer.inc 2012-05-04 13:34:32 UTC (rev 4383)
@@ -1,6 +1,5 @@
<br/>
- <p><a href="http://www.oscss.org">Get your <strong>osCSS team</strong></a><br>
- By <a href="http://www.oscim.fr">Oscim</a> for <strong>osCSS team</strong>
+ <p>By <a href="http://www.oscss.org">Get your <strong>osCSS team</strong></a>
<p>Thank you again,<br/> Supporté par <strong><a href="http://www.oscss.org">osCSS-2</a></strong></p>
</td>
</tr>
Modified: trunk/catalog/admin/includes/gabarit/adminNotif/display_view.listing.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/adminNotif/display_view.listing.gab 2012-05-04 12:09:24 UTC (rev 4382)
+++ trunk/catalog/admin/includes/gabarit/adminNotif/display_view.listing.gab 2012-05-04 13:34:32 UTC (rev 4383)
@@ -49,12 +49,11 @@
?tep_customers_row_action($notif['customers_id'], array('origin'=>adminNotif::FILENAME))
: (!empty($notif['user_email'])? ' <a href="mailto:'.$notif['user_email'].'" >'.$notif['user'].'</a>' : '')
),
+
+// sprintf(CsrtAction::getLink('row_action_right', __('@adminNotif image reload mail'), 'reload'), '', tep_href_link(FILENAME_MAIL, 'customer='..'action=usemod&mod=adminNotif&id=' . $notif['notif_id'] . '') ,'' ).
sprintf(CsrtAction::getLink('row_action_right', IMAGE_VIEW, 'view'), 'fancyView', tep_href_link(adminNotif::FILENAME, 'nID=' . $notif['notif_id'] . '&action=view') ,'' ).
- sprintf(CsrtAction::getLink('row_action_right', IMAGE_DELETE, 'delete'), '', tep_href_link(adminNotif::FILENAME, 'nID=' . $notif['notif_id'] . '&action=delete') ,'' ) .
- ((isset($_GET['nID']) && $notif['notif_id'] == $_GET['nID'])
- ? CsrtAction::getImage('row_action_right', IMAGE_ICON_INFO, 'arrow_right')
- : sprintf(CsrtAction::getLink('row_action_right', IMAGE_ICON_INFO, 'info'), 'fancyView', tep_href_link(adminNotif::FILENAME, 'nID=' . $notif['notif_id'] . '&action=view') ,'' )
- )
+ sprintf(CsrtAction::getLink('row_action_right', IMAGE_DELETE, 'delete'), '', tep_href_link(adminNotif::FILENAME, 'nID=' . $notif['notif_id'] . '&action=delete') ,'' )
+
);
?>
</td>
Modified: trunk/catalog/admin/includes/gabarit/mail.page.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/mail.page.gab 2012-05-04 12:09:24 UTC (rev 4382)
+++ trunk/catalog/admin/includes/gabarit/mail.page.gab 2012-05-04 13:34:32 UTC (rev 4383)
@@ -1,20 +1,21 @@
<?php
/**
- @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @licence GPL 2005-2012 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 22/03/11, 16:14
+ @version 2.1.1
+ @date 07/05/2012, 14:46
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
global $oscss;
+
?>
<h3><?php echo __('heading title') ?></h3>
<!-- PREVIEW -->
<?php if (mail::$action == 'preview') : ?>
- <div class="box_left">
+ <div class="box_uniq">
<?php echo tep_draw_form('mail', FILENAME_MAIL, 'action=send_email_to_user'); ?>
<p><?php echo mail::repost() ?></p>
<table class="dataTableBase">
@@ -34,50 +35,51 @@
<?php echo tep_image_submit('button_send_mail.gif', __('image send email')); ?>
</form>
</div>
-<?php endif; ?>
-<!-- FORM -->
-<?php echo tep_draw_form('mail', FILENAME_MAIL, 'action=preview'); ?>
- <div class="box_left">
- <fieldset class="block_field">
- <p class="block_input">
- <label for="customers_email_address" class="main"><?php echo __('text customer'); ?></label>
- <?php echo mail::get_list_customers() ?>
- </p>
+<?php else: ?>
+ <!-- FORM -->
+ <?php echo tep_draw_form('mail', FILENAME_MAIL, 'action=preview'); ?>
+ <div class="box_left">
+ <fieldset class="block_field">
+ <p class="block_input">
+ <label for="customers_email_address" class="main"><?php echo __('text customer'); ?></label>
+ <?php echo mail::get_list_customers() ?>
+ </p>
- <p class="block_input">
- <label for="from"><?php echo __('text from'); ?></label>
- <?php echo tep_draw_input_field('from','', (isset($_POST['from']) ? $_POST['from'] : EMAIL_FROM) ); ?>
- </p>
+ <p class="block_input">
+ <label for="from"><?php echo __('text from'); ?></label>
+ <?php echo tep_draw_input_field('from','', mail::$list->from); ?>
+ </p>
- <p class="block_input">
- <label for="subject"><?php echo __('text subject'); ?></label>
- <?php echo tep_draw_input_field('subject','',(isset($_POST['subject']) ? $_POST['subject'] : '')); ?>
- </p>
+ <p class="block_input">
+ <label for="subject"><?php echo __('text subject'); ?></label>
+ <?php echo tep_draw_input_field('subject','',mail::$list->subject); ?>
+ </p>
- <p class="block_input">
- <label for="p_format"><?php echo __('text format'); ?></label>
- <?php echo tep_draw_pull_down_menu('p_format', array(array('id'=>'HTML', 'text'=>'html'),array('id'=>'TEXT', 'text'=>'text')), (isset($_POST['customer']) ? $_POST['customer'] : ''));?>
- </p>
+ <p class="block_input">
+ <label for="p_format"><?php echo __('text format'); ?></label>
+ <?php echo tep_draw_pull_down_menu('p_format', array(array('id'=>'HTML', 'text'=>'html'),array('id'=>'TEXT', 'text'=>'text')), (isset($_POST['customer']) ? $_POST['customer'] : ''));?>
+ </p>
- <br style="clear:both" />
- <p class="block_uniq tcenter">
- <label for="message"><?php echo __('text message'); ?></label>
- <br style="clear:both" />
- <?php echo $oscss->_call(BO_WISIWYG_SELECTED,'_draw','message_form','800','400',(isset($_POST['message_form']) ? $_POST['message_form'] : '')); ?>
- </p>
+ <br style="clear:both" />
+ <p class="block_uniq tcenter">
+ <label for="message"><?php echo __('text message'); ?></label>
+ <br style="clear:both" />
+ <?php echo $oscss->_call(BO_WISIWYG_SELECTED,'_draw','message_form','800','400',mail::$list->content); ?>
+ </p>
- </fieldset>
+ </fieldset>
- </div>
+ </div>
- <div class="box_right">
- <?php echo __('txt usage code in mail') ?>
+ <div class="box_right">
+ <?php echo __('txt usage code in mail') ?>
- <div class="button_nav">
- <?php if (mail::$action == 'preview')echo '<a class="button" href="' . tep_href_link(FILENAME_MAIL) . '">' . IMAGE_CANCEL . '</a> '; ?>
- <?php echo tep_image_submit('button_send_mail.gif', __('image preview')); ?>
- </div>
- </div>
-</form>
\ No newline at end of file
+ <div class="button_nav">
+ <?php if (mail::$action == 'preview')echo '<a class="button" href="' . tep_href_link(FILENAME_MAIL) . '">' . IMAGE_CANCEL . '</a> '; ?>
+ <?php echo tep_image_submit('button_send_mail.gif', __('image preview')); ?>
+ </div>
+ </div>
+ </form>
+<?php endif; ?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/pages/adminNotif.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/pages/adminNotif.txt 2012-05-04 12:09:24 UTC (rev 4382)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/adminNotif.txt 2012-05-04 13:34:32 UTC (rev 4383)
@@ -1,10 +1,10 @@
<?php
/**
- @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @licence GPL 2005-2012 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 12/02/11, 14:46
+ @version 2.1.1
+ @date 07/05/2012, 14:46
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -36,6 +36,7 @@
$lang['image notification config list']="Configuration" ;
$lang['image notification list']="Évènements" ;
+$lang['@adminNotif image reload mail']="Relancer" ;
$lang['error in update notification']="Erreur lors de la mise à jour de la notification" ;
$lang['success notification update']="Notification de mise à jour" ;
Modified: trunk/catalog/admin/includes/modules/pages/mail.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/mail.php 2012-05-04 12:09:24 UTC (rev 4382)
+++ trunk/catalog/admin/includes/modules/pages/mail.php 2012-05-04 13:34:32 UTC (rev 4383)
@@ -1,10 +1,10 @@
<?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
+ @licence GPL 2005-2012 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 22/03/11, 16:14
+ @version 2.1.1
+ @date 07/05/2012, 14:46
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class mail
@@ -18,9 +18,11 @@
public static $code;
public static $action;
+ /**
+ @var object detail content page
+ */
+ public static $list;
- public static $list=array();
-
/**
class constructor
*/
@@ -42,97 +44,136 @@
switch (self::$action) {
case 'send_email_to_user':
- $err=array();
+ $err=array();
- switch ($_POST['customers_email_address']) {
- case '***':
- $mail_query = tep_db_query("select * from " . TABLE_CUSTOMERS);
- $mail_sent_to = TEXT_ALL_CUSTOMERS;
- break;
- case '**D':
- $mail_query = tep_db_query("select * from " . TABLE_CUSTOMERS . " where customers_newsletter = '1'");
- $mail_sent_to = TEXT_NEWSLETTER_CUSTOMERS;
- break;
- default:
- $customers_email_address = tep_db_prepare_input($_POST['customers_email_address']);
+ switch ($_POST['customers_email_address']) {
+ case '***':
+ $mail_query = tep_db_query("select * from " . TABLE_CUSTOMERS);
+ $mail_sent_to = TEXT_ALL_CUSTOMERS;
+ break;
+ case '**D':
+ $mail_query = tep_db_query("select * from " . TABLE_CUSTOMERS . " where customers_newsletter = '1'");
+ $mail_sent_to = TEXT_NEWSLETTER_CUSTOMERS;
+ break;
+ default:
+ $customers_email_address = tep_db_prepare_input($_POST['customers_email_address']);
- $mail_query = tep_db_query("select * from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($customers_email_address) . "'");
- $mail_sent_to = $_POST['customers_email_address'];
- break;
- }
+ $mail_query = tep_db_query("select * from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($customers_email_address) . "'");
+ $mail_sent_to = $_POST['customers_email_address'];
+ break;
+ }
- $from = tep_db_prepare_input($_POST['from']);
- $subject = tep_db_prepare_input($_POST['subject']);
- $message = tep_db_prepare_input($_POST['message']);
+ $from = tep_db_prepare_input($_POST['from']);
+ $subject = tep_db_prepare_input($_POST['subject']);
+ $message = tep_db_prepare_input($_POST['message']);
- /* Convertion */
-// $html_reg['license']=HTML_REG_LICENSE;
-// $html_reg['desinscription']=HTML_REG_DESINSCRIPTION;
-// $html_reg['signature']=HTML_REG_SIGN;
-// $text_reg['license']=TEXT_REG_LICENSE;
-// $text_reg['desinscription']=TEXT_REG_DESINSCRIPTION;
-// $text_reg['signature']=TEXT_REG_SIGN;
+ /* Convertion */
+ // $html_reg['license']=HTML_REG_LICENSE;
+ // $html_reg['desinscription']=HTML_REG_DESINSCRIPTION;
+ // $html_reg['signature']=HTML_REG_SIGN;
+ // $text_reg['license']=TEXT_REG_LICENSE;
+ // $text_reg['desinscription']=TEXT_REG_DESINSCRIPTION;
+ // $text_reg['signature']=TEXT_REG_SIGN;
- while ($mail = tep_db_fetch_array($mail_query)) {
+ while ($mail = tep_db_fetch_array($mail_query)) {
- $mymessage = array(
- 'to_name'=>$mail['customers_firstname'].' '.$mail['customers_lastname'],
- 'to_email_address'=>$mail['customers_email_address'],
- 'email_subject'=>$subject,
- 'email'=>$message,
- 'from_email_name'=>$from,
- 'from_email_address'=>$mail_sent_to
- );
+ $mymessage = array(
+ 'to_name'=>$mail['customers_firstname'].' '.$mail['customers_lastname'],
+ 'to_email_address'=>$mail['customers_email_address'],
+ 'email_subject'=>$subject,
+ 'email'=>$message,
+ 'from_email_name'=>$from,
+ 'from_email_address'=>$mail_sent_to
+ );
- $html_reg['numero_client']=$mail['customers_id'];
- $text_reg['numero_client']=$mail['customers_id'];
- $html_reg['genre']=$mail['customers_gender'];
- $text_reg['genre']=$mail['customers_gender'];
- $html_reg['firstname']=$mail['customers_firstname'];
- $text_reg['firstname']=$mail['customers_firstname'];
- $html_reg['lastname']=$mail['customers_lastname'];
- $text_reg['lastname']=$mail['customers_lastname'];
- $html_reg['email_address']=$mail['customers_email_address'];
- $text_reg['email_address']=$mail['customers_email_address'];
+ $html_reg['numero_client']=$mail['customers_id'];
+ $text_reg['numero_client']=$mail['customers_id'];
+ $html_reg['genre']=$mail['customers_gender'];
+ $text_reg['genre']=$mail['customers_gender'];
+ $html_reg['firstname']=$mail['customers_firstname'];
+ $text_reg['firstname']=$mail['customers_firstname'];
+ $html_reg['lastname']=$mail['customers_lastname'];
+ $text_reg['lastname']=$mail['customers_lastname'];
+ $html_reg['email_address']=$mail['customers_email_address'];
+ $text_reg['email_address']=$mail['customers_email_address'];
- $content=($_POST['p_format'] == 'HTML') ? tep_replace_for_mail($message,$subject,$html_reg,$text_reg,'HTML') : tep_replace_for_mail(strip_tags($message),$subject,$html_reg,$text_reg,'TXT');
- $myarray = array(
- 'email_use_html'=>(($_POST['p_format'] == 'HTML')?true:false),
- 'mail_sent_to'=>$mail_sent_to,
- 'from'=>$from,
- 'subject'=>$subject,
- 'message'=>$content
- );
+ $content=($_POST['p_format'] == 'HTML') ? tep_replace_for_mail($message,$subject,$html_reg,$text_reg,'HTML') : tep_replace_for_mail(strip_tags($message),$subject,$html_reg,$text_reg,'TXT');
+ $myarray = array(
+ 'email_use_html'=>(($_POST['p_format'] == 'HTML')?true:false),
+ 'mail_sent_to'=>$mail_sent_to,
+ 'from'=>$from,
+ 'subject'=>$subject,
+ 'message'=>$content
+ );
- $message_final=emailUtility::post_prepare_email("mail.tpl",$language,$myarray);
+ $message_final=emailUtility::post_prepare_email("mail.tpl",$language,$myarray);
- if ( tep_mail($mymessage['to_name'], $mymessage['to_email_address'], $mymessage['email_subject'], $message_final, $mymessage['from_email_name'], @$mymessage['from_email_address']) !=false) $err[]=true;
- else $err[$mymessage['to_email_address']]=false;
+ if ( tep_mail($mymessage['to_name'], $mymessage['to_email_address'], $mymessage['email_subject'], $message_final, $mymessage['from_email_name'], @$mymessage['from_email_address']) !=false) $err[]=true;
+ else $err[$mymessage['to_email_address']]=false;
- }
+ }
- if(!in_array(false,$err) ) {
- $messageStack->add_session(sprintf(__('notice email sent to %s'), $mail_sent_to), 'success');
- tep_redirect(tep_href_link(FILENAME_MAIL));
+ if(!in_array(false,$err) ) {
+ $messageStack->add_session(sprintf(__('notice email sent to %s'), $mail_sent_to), 'success');
+ tep_redirect(tep_href_link(FILENAME_MAIL));
- }else {
- $messageStack->add_session(sprintf(__('warning email not sent to %s'), $mail_sent_to), 'error');
- tep_redirect(tep_href_link(FILENAME_MAIL, 'action=edit'));
- }
+ }else {
+ $messageStack->add_session(sprintf(__('warning email not sent to %s'), $mail_sent_to), 'error');
+ tep_redirect(tep_href_link(FILENAME_MAIL, 'action=edit'));
+ }
- break;
- }
+ break;
+ case 'usemod':
+// self::$list
+ $id = tep_db_prepare_input($_REQUEST['id']);
+
+ switch ($_REQUEST['mod']) {
+// localhost/test/oscss/04/catalog/admin/mail.php?cus...@os...&origin=adminNotif.php&action=usemod&mod=adminNotif
+ case 'adminNotif':
+
+
+ $DB=Database::getInstance();
+ $query=$DB->query($sql="SELECT notif_id,notif_type,user_id,notif_key,notif_data,notif_text, notif_date FROM ".TABLE_ADMIN_NOTIFICATION." WHERE notif_id='".(int)$id."' ");
+
+ $res = $query->fetchAssoc();
+
+
+// exit;
+
+ self::$list->from = (tep_cst_define('EMAIL_FROM') ? EMAIL_FROM : STORE_OWNER_EMAIL_ADDRESS );
+ self::$list->subject =__('@mail reload manually');
+ self::$list->content = $res['notif_text'];
+ self::$list->sign = '';
+ break;
+ }
+
+
+
+ break;
+
+
+ default:
+
+ self::$list->from = (isset($_POST['from']) ? $_POST['from'] : (tep_cst_define('EMAIL_FROM') ? EMAIL_FROM : STORE_OWNER_EMAIL_ADDRESS ) );
+ self::$list->subject =(isset($_POST['subject']) ? $_POST['subject'] : '');
+ self::$list->content = (isset($_POST['message_form']) ? $_POST['message_form'] : '');
+ self::$list->sign = (isset($_POST['sign']) ? $_POST['sign'] : '');
+
+ }
+
+var_dump(self::$action);
+
$oscss->_add_ext(BO_WISIWYG_SELECTED,'editeur/');
echo $oscss->_call(BO_WISIWYG_SELECTED,'_top','message_form','600','400');
@@ -145,6 +186,8 @@
public static function load_db_values($ID){ return false; }
public function display_view(){
+// $this->check_action(@$_REQUEST['action']);
+
return tep_get_include_contents(self::$code.'.page');
}
@@ -162,7 +205,7 @@
$customers[] = array('id' => '**D', 'text' => __('text newsletter customers'));
$mail_query = $DB->query("select customers_email_address, customers_firstname, customers_lastname from " . TABLE_CUSTOMERS . " order by customers_lastname");
while($customers_values = $mail_query->fetchAssoc() ) {
- $customers[] = array('id' => $customers_values['customers_email_address'],
+ $customers[] = array('id' => $customers_values['customers_email_address'],
'text' => $customers_values['customers_lastname'] . ', ' . $customers_values['customers_firstname'] . ' (' . $customers_values['customers_email_address'] . ')');
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-05-04 12:09:35
|
Revision: 4382
http://oscss.svn.sourceforge.net/oscss/?rev=4382&view=rev
Author: oscim
Date: 2012-05-04 12:09:24 +0000 (Fri, 04 May 2012)
Log Message:
-----------
FS#1041
Modified Paths:
--------------
trunk/catalog/admin/includes/modules/graph_stats/NewCustomers.php
trunk/catalog/admin/includes/modules/pages/graphs_stats.php
Modified: trunk/catalog/admin/includes/modules/graph_stats/NewCustomers.php
===================================================================
--- trunk/catalog/admin/includes/modules/graph_stats/NewCustomers.php 2012-05-04 09:13:06 UTC (rev 4381)
+++ trunk/catalog/admin/includes/modules/graph_stats/NewCustomers.php 2012-05-04 12:09:24 UTC (rev 4382)
@@ -81,7 +81,9 @@
*/
public function tep_get_th(){
$les_color_name[]=__('mois');
- return array_merge($les_color_name,$this->les_color_name);
+ $r = array_merge($les_color_name,$this->les_color_name);
+// $r[] = __('total');
+ return $r;
}
/**
@@ -105,6 +107,7 @@
$max=0;
while ($orders = tep_db_fetch_array($query)){
+
$value_sommme=$orders['total'];
$mit=($orders['mois']-1);
$anne=($this->base_year==$orders['annee'])? 0 : (($orders['annee']-$this->base_year)*12);
@@ -112,7 +115,7 @@
if(isset($this->value[($anne+$mit)])) {
if($max<=$value_sommme) $max=$value_sommme;
- $this->value[($anne+$mit)][($orders['status']+1)]=$value_sommme;
+ $this->value[($anne+$mit)][($orders['gpr'])]=$value_sommme;
}
}
@@ -125,7 +128,7 @@
private function les_orders(){
global $languages_id;
$DB=Database::getInstance();
- $customers_account = $DB->query($sql="select EXTRACT(YEAR FROM customers_info_date_account_created) AS annee, EXTRACT(MONTH FROM customers_info_date_account_created) AS mois, customers_info_date_account_created as date, COUNT(*) as total, c.customers_group_ra as status from ".TABLE_CUSTOMERS." c, ".TABLE_CUSTOMERS_INFO." ci WHERE c.customers_id= ci.customers_info_id and customers_info_date_account_created >= '".$this->base_date."' GROUP BY year(customers_info_date_account_created),month(customers_info_date_account_created)");
+ $customers_account = $DB->query($sql="select EXTRACT(YEAR FROM customers_info_date_account_created) AS annee, EXTRACT(MONTH FROM customers_info_date_account_created) AS mois, customers_info_date_account_created as date, COUNT(*) as total, c.customers_group_ra as gpr from ".TABLE_CUSTOMERS." c, ".TABLE_CUSTOMERS_INFO." ci WHERE c.customers_id= ci.customers_info_id and customers_info_date_account_created >= '".$this->base_date."' GROUP BY year(customers_info_date_account_created),month(customers_info_date_account_created)");
if ($customers_account->__get('numRows')> 0) return $customers_account;
else return false;
@@ -137,14 +140,24 @@
*/
private function les_status(){
$DB=Database::getInstance();
+
+ $color[] = '#4086d1';
+ $color[] = '#ffc652';
+
+ $this->les_color_name = array();
$status_color = $DB->query("select customers_group_id, customers_group_name FROM ".TABLE_CUSTOMERS_GROUPS." ");
while ($sales_products = $status_color->fetchAssoc())
$this->les_color_name[]=$sales_products['customers_group_name'];
- $this->les_color[]=GraphUtility::html2rgb('#4086d1');
- $this->les_color[]=GraphUtility::html2rgb('#ffc652');
- $this->nbr_val=count($this->les_color_name);
+ $i = 0;
+ $this->les_color = array();
+ foreach($this->les_color_name as $row){
+ $this->les_color[]=GraphUtility::html2rgb(@$color[$i++]);
+ }
+
+
+ $this->nbr_val=count($this->les_color_name) ;
}
}
Modified: trunk/catalog/admin/includes/modules/pages/graphs_stats.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/graphs_stats.php 2012-05-04 09:13:06 UTC (rev 4381)
+++ trunk/catalog/admin/includes/modules/pages/graphs_stats.php 2012-05-04 12:09:24 UTC (rev 4382)
@@ -224,7 +224,7 @@
$s=array();
for($is=0; $is<=self::$Mod->nbr_val; $is++ )
- $s[$is]=true;
+ $s[$is]=false;
return $s;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-05-04 09:13:17
|
Revision: 4381
http://oscss.svn.sourceforge.net/oscss/?rev=4381&view=rev
Author: oscim
Date: 2012-05-04 09:13:06 +0000 (Fri, 04 May 2012)
Log Message:
-----------
report des table non fondamentale ou activ?\195?\169 par datatype
Added Paths:
-----------
trunk/catalog/Documents/admin/origin/db/remove/tables/osc_featured.sql
trunk/catalog/Documents/admin/origin/db/remove/tables/osc_featured_data.sql
Added: trunk/catalog/Documents/admin/origin/db/remove/tables/osc_featured.sql
===================================================================
--- trunk/catalog/Documents/admin/origin/db/remove/tables/osc_featured.sql (rev 0)
+++ trunk/catalog/Documents/admin/origin/db/remove/tables/osc_featured.sql 2012-05-04 09:13:06 UTC (rev 4381)
@@ -0,0 +1,16 @@
+--+######################################################################--+
+--| osCSS Open Source E-commerce |
+--+######################################################################--+
+--| Copyright (c) 2005-2012 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/ |
+--+######################################################################--+
+
+
+
+DROP TABLE IF EXISTS osc_featured ;
Added: trunk/catalog/Documents/admin/origin/db/remove/tables/osc_featured_data.sql
===================================================================
--- trunk/catalog/Documents/admin/origin/db/remove/tables/osc_featured_data.sql (rev 0)
+++ trunk/catalog/Documents/admin/origin/db/remove/tables/osc_featured_data.sql 2012-05-04 09:13:06 UTC (rev 4381)
@@ -0,0 +1,16 @@
+--+######################################################################--+
+--| osCSS Open Source E-commerce |
+--+######################################################################--+
+--| Copyright (c) 2005-2012 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/ |
+--+######################################################################--+
+
+
+
+DROP TABLE IF EXISTS osc_featured_data ;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-05-04 08:41:01
|
Revision: 4380
http://oscss.svn.sourceforge.net/oscss/?rev=4380&view=rev
Author: oscim
Date: 2012-05-04 08:40:51 +0000 (Fri, 04 May 2012)
Log Message:
-----------
correction coquille
Modified Paths:
--------------
trunk/extensions/PAYPAL_IPN_stable/catalog/includes/languages/fr_FR/modules/payment/paypal_ipn/paypal_ipn.txt
trunk/extensions/PAYPAL_IPN_stable/catalog/includes/modules/payment/paypal_ipn/paypal_ipn.php
trunk/extensions/PAYPAL_IPN_stable/catalog/includes/modules/payment/paypal_ipn/response.php
Modified: trunk/extensions/PAYPAL_IPN_stable/catalog/includes/languages/fr_FR/modules/payment/paypal_ipn/paypal_ipn.txt
===================================================================
--- trunk/extensions/PAYPAL_IPN_stable/catalog/includes/languages/fr_FR/modules/payment/paypal_ipn/paypal_ipn.txt 2012-05-04 08:36:53 UTC (rev 4379)
+++ trunk/extensions/PAYPAL_IPN_stable/catalog/includes/languages/fr_FR/modules/payment/paypal_ipn/paypal_ipn.txt 2012-05-04 08:40:51 UTC (rev 4380)
@@ -1,10 +1,10 @@
<?php
/**
- @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
+ @licence GPL 2005-2012 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 14/06/10, 09:40
+ @version 2.1.1
+ @date 06/05/2012, 09:40
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -18,4 +18,7 @@
$lang['module payment paypal ipn text last confirm']="Paiment par carte bancaire ou compte paypal" ;
+/* Bouton sur site paypal */
+ $lang['@paypal_ipn confirmation button text in website paypal']="Revenir au magasin, afin de confirmer votre commande" ;
+
?>
\ No newline at end of file
Modified: trunk/extensions/PAYPAL_IPN_stable/catalog/includes/modules/payment/paypal_ipn/paypal_ipn.php
===================================================================
--- trunk/extensions/PAYPAL_IPN_stable/catalog/includes/modules/payment/paypal_ipn/paypal_ipn.php 2012-05-04 08:36:53 UTC (rev 4379)
+++ trunk/extensions/PAYPAL_IPN_stable/catalog/includes/modules/payment/paypal_ipn/paypal_ipn.php 2012-05-04 08:40:51 UTC (rev 4380)
@@ -1,10 +1,10 @@
<?php
/**
- @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @licence GPL 2005-2012 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 06/07/11, 09:27
+ @version 2.1.1
+ @date 06/05/2012, 09:40
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
Modified: trunk/extensions/PAYPAL_IPN_stable/catalog/includes/modules/payment/paypal_ipn/response.php
===================================================================
--- trunk/extensions/PAYPAL_IPN_stable/catalog/includes/modules/payment/paypal_ipn/response.php 2012-05-04 08:36:53 UTC (rev 4379)
+++ trunk/extensions/PAYPAL_IPN_stable/catalog/includes/modules/payment/paypal_ipn/response.php 2012-05-04 08:40:51 UTC (rev 4380)
@@ -1,10 +1,10 @@
<?php
/**
- @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
+ @licence GPL 2005-2012 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 01/11/10, 09:31
+ @version 2.1.1
+ @date 06/05/2012, 09:40
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@@ -30,7 +30,7 @@
$curl = false;
$result = false;
- if ( (PHP_VERSION >= 4.3) && ($fp = @fsockopen('ssl://' . $server, 443, $errno, $errstr, 30)) ) $fsocket = true;
+ if ( $fp = @fsockopen('ssl://' . $server, 443, $errno, $errstr, 30) ) $fsocket = true;
elseif (function_exists('curl_exec')) $curl = true;
elseif ($fp = @fsockopen($server, 80, $errno, $errstr, 30)) $fsocket = true;
@@ -78,8 +78,9 @@
}
+// var_dump($result);
+// exit;
-
if (strtoupper($result) == 'VERIFIED') {
//! check and extract id process pre-order
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-05-04 08:37:00
|
Revision: 4379
http://oscss.svn.sourceforge.net/oscss/?rev=4379&view=rev
Author: oscim
Date: 2012-05-04 08:36:53 +0000 (Fri, 04 May 2012)
Log Message:
-----------
correction coquille desactivation class process not used
correction fr manquant dans commande abandonn?\195?\169e
Modified Paths:
--------------
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/held_orders.txt
trunk/catalog/document.php
trunk/catalog/includes/classes/checkout_process.php
trunk/catalog/includes/classes/core_page/checkout.php
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/pages/held_orders.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/pages/held_orders.txt 2012-05-04 08:23:52 UTC (rev 4378)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/held_orders.txt 2012-05-04 08:36:53 UTC (rev 4379)
@@ -1,10 +1,10 @@
<?php
/**
- @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @licence GPL 2005-2012 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 23/03/11, 15:00
+ @version 2.1.1
+ @date 206/05/2012, 15:00
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -25,7 +25,11 @@
$lang['entry shipping address']="Adresse livraison" ;
$lang['entry billing address']="Adresse facturation" ;
+$lang['table heading order id']="Id" ;
$lang['table heading products']="Produits " ;
+$lang['table heading customers']="Client " ;
+$lang['table heading order total']="Total" ;
+$lang['table heading date purchased']="date" ;
$lang['table heading products model']="Modèle " ;
$lang['table heading tax']="% taxe " ;
$lang['table heading price excluding tax']="HT " ;
Modified: trunk/catalog/document.php
===================================================================
--- trunk/catalog/document.php 2012-05-04 08:23:52 UTC (rev 4378)
+++ trunk/catalog/document.php 2012-05-04 08:36:53 UTC (rev 4379)
@@ -30,7 +30,7 @@
/**
@remarks Adjust type requete
*/
- switch((string)$_REQUEST['typ']){
+ switch((string)@$_REQUEST['typ']){
case 'product':
break;
case 'db':
Modified: trunk/catalog/includes/classes/checkout_process.php
===================================================================
--- trunk/catalog/includes/classes/checkout_process.php 2012-05-04 08:23:52 UTC (rev 4378)
+++ trunk/catalog/includes/classes/checkout_process.php 2012-05-04 08:36:53 UTC (rev 4379)
@@ -256,14 +256,17 @@
}
/**
- * \brief Control de la chaine transmise et retoruné par service de paiement.
- LA chaine est composé de diverse info, contenu dans la pre_commande
+ * \brief Control de la chaine transmise et retouruné par service de paiement.
+ LA chaine est composé de diverse info, contenu dans la pre_commande
* @return $string false | pre_order_id
*/
public static function check_string_return($string){
$res=explode('|',$string);
$DB=Database::getInstance();
$query=$DB->query($sql="Select customers_id, date_purchased from " . TABLE_HOLDING_ORDERS . " where orders_id = '" . (int)$res[0] . "' ");
+
+// trigger_error(sprintf(__FILE__.'::'.__LINE__, $sql ) , E_USER_ERROR);
+
$item=$query->fetchAssoc();
if($item['customers_id'] != (int)$res[1] ) return false;
if($item['date_purchased'] !=$res[2]) return false;
Modified: trunk/catalog/includes/classes/core_page/checkout.php
===================================================================
--- trunk/catalog/includes/classes/core_page/checkout.php 2012-05-04 08:23:52 UTC (rev 4378)
+++ trunk/catalog/includes/classes/core_page/checkout.php 2012-05-04 08:36:53 UTC (rev 4379)
@@ -24,6 +24,13 @@
*/
function __construct($step=false) {
+
+
+/**
+ NOT USED , In DEV
+*/
+ return ;
+
global $language, $page;
$this->name='checkout';
$this->homes_id='';
@@ -46,13 +53,13 @@
if($step !=false) {
if($step == 'init'){
- var_dump($step);
- $this->ResetProcess();
+// var_dump($step);
+ $this->ResetProcess();
}
elseif(isset($this->modules['Pr'.$step])){
-// var_dump('Pr'.$step);
- $this->modules['Pr'.$step]->ResetProcess();
-// exit;
+ // var_dump('Pr'.$step);
+ $this->modules['Pr'.$step]->ResetProcess();
+ // exit;
}
}
@@ -74,13 +81,10 @@
$i = 0;
foreach($etape as $key=>$row)
if($this->modules[$key]->step)
- $this->process[$i++] = false;
+ $this->process[$i++] = false;
else
- $this->process[$i++] = $row;
+ $this->process[$i++] = $row;
-// var_dump( $this->etape);
-// var_dump( $this->process);
-
}
public static function getInstance($full=false) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-05-04 08:24:01
|
Revision: 4378
http://oscss.svn.sourceforge.net/oscss/?rev=4378&view=rev
Author: oscim
Date: 2012-05-04 08:23:52 +0000 (Fri, 04 May 2012)
Log Message:
-----------
FS#973
Modified Paths:
--------------
trunk/catalog/includes/modules/shipping/spu.php
Modified: trunk/catalog/includes/modules/shipping/spu.php
===================================================================
--- trunk/catalog/includes/modules/shipping/spu.php 2012-05-04 06:52:58 UTC (rev 4377)
+++ trunk/catalog/includes/modules/shipping/spu.php 2012-05-04 08:23:52 UTC (rev 4378)
@@ -1,10 +1,10 @@
<?php
/**
- @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @licence GPL 2005-2012 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 20/11/11, 00:04
+ @date 06/05/2012, 00:04
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@CONTRIB is Store Pickup Shipping Module (http://www.oscommerce.com/community/contributions,164)
@@ -45,7 +45,7 @@
$codep_query = tep_db_query("select c.configuration_value, ab.entry_postcode from " . TABLE_CONFIGURATION . " c, " . TABLE_ADDRESS_BOOK . " ab where c.configuration_key = 'MODULE_SHIPPING_SPU_ZIP' and ab.customers_id = '" . (int)$customer_id . "'");
$codep = tep_db_fetch_array($codep_query);
- $dept_allow = split("[, ]", $codep['configuration_value']);
+ $dept_allow = explode(", ", $codep['configuration_value']);
$cust_cp = substr($codep['entry_postcode'], 0, 2);
if((in_array($cust_cp, $dept_allow))||($codep['configuration_value'] == '')){
$this->quotes = array('id' => $this->code,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-05-04 06:53:05
|
Revision: 4377
http://oscss.svn.sourceforge.net/oscss/?rev=4377&view=rev
Author: oscim
Date: 2012-05-04 06:52:58 +0000 (Fri, 04 May 2012)
Log Message:
-----------
Correction d'erreur lors de la manuipulation de module dans un sous rep propre
Ajustement fichier et detection .
correction detection chemin
correction / manipulation / edition / configuration des sous module dans le cip , et erreur dans la gestion de liens de retour
Modified Paths:
--------------
trunk/catalog/admin/includes/classes/modulesUtility.php
trunk/catalog/admin/includes/exts/package/packageUtility.php
trunk/catalog/admin/includes/gabarit/package/display_view.package.configedit.gab
trunk/catalog/admin/includes/modules/configuration/modpayment.php
trunk/catalog/admin/includes/modules/pages/package.php
trunk/catalog/includes/modules/payment/cod.php
Modified: trunk/catalog/admin/includes/classes/modulesUtility.php
===================================================================
--- trunk/catalog/admin/includes/classes/modulesUtility.php 2012-05-03 20:10:05 UTC (rev 4376)
+++ trunk/catalog/admin/includes/classes/modulesUtility.php 2012-05-04 06:52:58 UTC (rev 4377)
@@ -19,18 +19,6 @@
protected function __construct(){
self::$pathType['checkout_process']=array('key'=>'MODULE_CHECKOUT_PROCESS_INSTALLED', 'value'=>MODULE_CHECKOUT_PROCESS_INSTALLED, 'module_directory'=> 'process/');
-// self::$pathType['shipping']=array('key'=>'MODULE_SHIPPING_INSTALLED', 'value'=>MODULE_SHIPPING_INSTALLED, 'module_directory'=>'shipping/');
-// self::$pathType['payment']=array('key'=>'MODULE_PAYMENT_INSTALLED', 'value'=>MODULE_PAYMENT_INSTALLED, 'module_directory'=> 'payment/');
-// self::$pathType['order_total']=array('key'=>'MODULE_ORDER_TOTAL_INSTALLED', 'value'=>MODULE_ORDER_TOTAL_INSTALLED, 'module_directory'=> 'order_total/');
-// self::$pathType['generic']=array('key'=>'MODULE_GENERIC_INSTALLED', 'value'=>MODULE_GENERIC_INSTALLED, 'key_BO'=>'MODULE_GENERIC_INSTALLED_BO', 'value_BO'=>MODULE_GENERIC_INSTALLED_BO,'module_directory'=>'generic/','module_language'=>DIR_FS_ADMIN.'includes/languages/');
-// self::$pathType['products']=array('key'=>'MODULE_ACAPRO_INSTALLED', 'value'=>MODULE_ACAPRO_INSTALLED,'key_BO'=>'MODULE_ACAPRO_INSTALLED_BO', 'value_BO'=>MODULE_ACAPRO_INSTALLED_BO,'module_directory'=> 'products/','module_language'=>DIR_FS_ADMIN.'includes/languages/' );
-// self::$pathType['content']=array('key'=>'MODULE_CONTENT_INSTALLED', 'value'=>MODULE_CONTENT_INSTALLED, 'key_BO'=>'MODULE_CONTENT_INSTALLED_BO', 'value_BO'=>MODULE_CONTENT_INSTALLED_BO,'module_directory'=>'content/','module_language'=>DIR_FS_ADMIN.'includes/languages/');
-// self::$pathType['categories']=array('key'=>'MODULE_ACACAT_INSTALLED', 'value'=>MODULE_ACACAT_INSTALLED ,'key_BO'=>'MODULE_ACACAT_INSTALLED_BO', 'value_BO'=>MODULE_ACACAT_INSTALLED_BO,'module_directory'=> 'categories/','module_language'=>DIR_FS_ADMIN.DIR_WS_LANGUAGES );
-// self::$pathType['account']=array('key'=>'MODULE_ACCOUNT_INSTALLED', 'value'=>MODULE_ACCOUNT_INSTALLED,'key_BO'=>'MODULE_ACCOUNT_INSTALLED_BO', 'value_BO'=>MODULE_ACCOUNT_INSTALLED_BO,'module_directory'=> 'account/','module_language'=>DIR_FS_ADMIN.DIR_WS_LANGUAGES );
-// self::$pathType['listing']=array('key'=>'MODULE_LISTING_INSTALLED', 'value'=>MODULE_LISTING_INSTALLED,'key_BO'=>'MODULE_LISTING_INSTALLED_BO', 'value_BO'=>@MODULE_LISTING_INSTALLED_BO,'module_directory'=> 'listing/','module_language'=>DIR_FS_ADMIN.DIR_WS_LANGUAGES );
-// self::$pathType['home']=array('key'=>'MODULE_HOME_INSTALLED', 'value'=>MODULE_HOME_INSTALLED, 'key_BO'=>'MODULE_HOME_INSTALLED_BO', 'value_BO'=>MODULE_HOME_INSTALLED_BO ,'module_directory'=>'home/','module_language'=>DIR_FS_ADMIN.DIR_WS_LANGUAGES );
-
-
}
protected static function getInstance() {
@@ -81,6 +69,7 @@
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');
}
@@ -106,16 +95,16 @@
$r->classe = (( substr($filename,-3) =='php') ? substr($filename,0, -4) : $filename );
-
if( ($dt = self::GetModttype($type)) !=false ){
- $r->status = (bool)(in_array($filename,explode(';',$dt->value)));
+ $r->status = (bool)(in_array($r->classe.'.php',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');
$oscss->pile_file_lang(DIR_FS_ADMIN.DIR_WS_LANGUAGES.$language.'/modules/'.$type . '/' .$r->detail->filelg.'.txt');
$oscss->pile_file_lang(DIR_FS_CATALOG.DIR_WS_LANGUAGES.$language.'/modules/'.$type . '/' .$r->detail->filelg.'.txt');
+
include_once($r->detail->path.$r->detail->filemod);
if (class_exists($r->detail->classe)) {
@@ -134,15 +123,16 @@
/**
- @param
- @a string element file/dir
- @a string path shop
- @a string path admin
- @a string ext
+ @param $file string element file/dir
+ @param $ref_shop string path shop
+ @param $ref_admin string path admin
+ @param $ref_ext string ext
*/
private static function info_module($file,$ref_shop, $ref_admin, $ref_ext='.php'){
$_obj=new stdClass;
$filelg='';
+
+
//! module dans leur propre sous rep
if(is_dir($ref_shop.$file)) {
$ref_shop .= $file.'/';
@@ -156,8 +146,11 @@
$class=substr($file, 0, (strlen($file)-strlen($ref_ext)));
$code=strtoupper($class);
- if (file_exists($ref_admin.$file))$_obj->path_BO=$ref_admin;
- if(file_exists($ref_shop.$file)) $_obj->path=$ref_shop;
+ if (file_exists($ref_admin.$file))
+ $_obj->path_BO=$ref_admin;
+ if(file_exists($ref_shop.$file))
+ $_obj->path=$ref_shop;
+
$_obj->filemod=$file;
$_obj->classe=$class;
$_obj->filelg=$filelg.$class;
Modified: trunk/catalog/admin/includes/exts/package/packageUtility.php
===================================================================
--- trunk/catalog/admin/includes/exts/package/packageUtility.php 2012-05-03 20:10:05 UTC (rev 4376)
+++ trunk/catalog/admin/includes/exts/package/packageUtility.php 2012-05-04 06:52:58 UTC (rev 4377)
@@ -9,7 +9,7 @@
@encode UTF-8
@class packageUtility
*/
-error_reporting(E_ALL);
+
if(!class_exists('package')) include_once(DIR_WS_MODULES .'pages/package.php');
class packageUtility
@@ -22,6 +22,24 @@
parent::$class = (isset($_GET['class']) ? $_GET['class'] : '');
+
+ foreach(scan(DIR_FS_CATALOG.DIR_WS_MODULES) as $row){
+ if( substr($row, 0,1) !='.' )
+ if(is_dir(DIR_FS_CATALOG.DIR_WS_MODULES.$row)){
+ $fo =strtoupper('MODULE_'.self::adjustkey($row).'_INSTALLED');
+ $bo = $fo.'_BO';
+
+ parent::$code_inistalletd_array[$row] = array(
+ 'key'=>$fo,
+ 'value'=>(defined($fo)? constant($fo) : ''),
+ 'key_BO'=>$bo,
+ 'value_BO'=>(defined($bo)? constant($bo) : ''),
+ 'module_directory'=>$row.'/',
+ 'module_language'=>DIR_FS_CATALOG.DIR_WS_LANGUAGES
+ );
+ }
+ }
+
foreach(scan(DIR_FS_CATALOG.'templates/'.DEFAULT_TEMPLATE_NAME.'/'.DIR_WS_MODULES) as $row){
if( substr($row, 0,1) !='.' )
if(is_dir(DIR_FS_CATALOG.'templates/'.DEFAULT_TEMPLATE_NAME.'/'.DIR_WS_MODULES.$row)){
@@ -144,8 +162,14 @@
include_once(DIR_FS_ADMIN.DIR_WS_MODULES.$objres->typetype.'/'.$objres->filename);
elseif(file_exists(DIR_FS_ADMIN.DIR_WS_MODULES.$objres->typetype.'/'.$cls .'/'.$objres->filename ))
include_once(DIR_FS_ADMIN.DIR_WS_MODULES.$objres->typetype.'/'.$cls .'/'.$objres->filename);
+
+
}
else{
+ if(file_exists(DIR_FS_CATALOG.DIR_WS_MODULES.$objres->typetype.'/'.$objres->filename))
+ include_once(DIR_FS_CATALOG.DIR_WS_MODULES.$objres->typetype.'/'.$objres->filename);
+ elseif(file_exists(DIR_FS_CATALOG.DIR_WS_MODULES.$objres->typetype.'/'.$cls .'/'.$objres->filename ))
+ include_once(DIR_FS_CATALOG.DIR_WS_MODULES.$objres->typetype.'/'.$cls .'/'.$objres->filename);
if(file_exists(DIR_FS_CATALOG.'templates/'.DEFAULT_TEMPLATE_NAME.'/'.DIR_WS_MODULES.$objres->typetype.'/'.$objres->filename))
include_once(DIR_FS_CATALOG.'templates/'.DEFAULT_TEMPLATE_NAME.'/'.DIR_WS_MODULES.$objres->typetype.'/'.$objres->filename);
@@ -155,8 +179,10 @@
include_once(DIR_FS_CATALOG.'templates/'.TEMPLATE_NAME.'/'.DIR_WS_MODULES.$objres->typetype.'/'.$objres->filename);
elseif(file_exists(DIR_FS_CATALOG.'templates/'.TEMPLATE_NAME.'/'.DIR_WS_MODULES.$objres->typetype.'/'.$cls .'/'.$objres->filename ))
include_once(DIR_FS_CATALOG.'templates/'.TEMPLATE_NAME.'/'.DIR_WS_MODULES.$objres->typetype.'/'.$cls .'/'.$objres->filename);
+
}
+
$module = new $cls;
$module_info = array('code' => $module->code,
'title' => $module->title,
Modified: trunk/catalog/admin/includes/gabarit/package/display_view.package.configedit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/package/display_view.package.configedit.gab 2012-05-03 20:10:05 UTC (rev 4376)
+++ trunk/catalog/admin/includes/gabarit/package/display_view.package.configedit.gab 2012-05-04 06:52:58 UTC (rev 4377)
@@ -12,7 +12,7 @@
?>
<h3><?php echo __('title heading configuration package') ?></h3>
<div class="button_nav">
- <?php echo tep_js_back(tep_href_link(package::FILENAME, 'class='.package::$class.'&action=config'), IMAGE_BACK) ?>
+ <?php echo tep_js_back(tep_href_link(package::FILENAME, 'class='.package::$list->ident.'&action=config'), IMAGE_BACK) ?>
</div>
<div class="box_uniq">
Modified: trunk/catalog/admin/includes/modules/configuration/modpayment.php
===================================================================
--- trunk/catalog/admin/includes/modules/configuration/modpayment.php 2012-05-03 20:10:05 UTC (rev 4376)
+++ trunk/catalog/admin/includes/modules/configuration/modpayment.php 2012-05-04 06:52:58 UTC (rev 4377)
@@ -10,9 +10,9 @@
@class modpayment
*/
+error_reporting(E_ALL);
+define('FILENAME_CFG_127',"gparentID=".$_GET['gparentID']."&gID=".$_GET['gID']."&");
-define('FILENAME_CFG_127',"gparentID=127&gID=39&");
-
Class modpayment
implements ext_configuration
{
@@ -116,7 +116,7 @@
}
- tep_redirect(tep_href_link(FILENAME_CONFIGURATION, 'gparentID=' . $gparentID.'&gID=' . $_GET['gID'] . '#modpayment-zone' ));
+ tep_redirect(tep_href_link(FILENAME_CONFIGURATION, FILENAME_CFG_127 . '#modpayment-zone' ));
break;
/**
@@ -174,8 +174,13 @@
$mod=tep_db_prepare_input($_GET['mod']);
// call
- $Mod=modulesUtility::LoadModule('payment',$mod.'.php');
+ $Mod=modulesUtility::LoadModule('payment',$mod);
+
$ModCurr = $Mod->content;
+
+ if(!is_object($ModCurr))
+ tep_redirect(tep_href_link(FILENAME_CONFIGURATION, FILENAME_CFG_127 . '#error-noloadmod'));
+
$i=0;
foreach($ModCurr->keys() as $value){
$i++;
@@ -292,7 +297,7 @@
foreach(scan(DIR_FS_CATALOG_MODULES.'payment/') as $row){
- if( substr($row,-3) =='php'){
+ if( substr($row, 0,1) !='.' && substr($row, -1) !='~' && substr($row,-4) !='html'){
$class = substr($row,0, -4);
Modified: trunk/catalog/admin/includes/modules/pages/package.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/package.php 2012-05-03 20:10:05 UTC (rev 4376)
+++ trunk/catalog/admin/includes/modules/pages/package.php 2012-05-04 06:52:58 UTC (rev 4377)
@@ -135,6 +135,7 @@
break;
case 'package':
default:
+ if(!defined('AJAXSTATMENTDETAIL'))
//! detail item in ajax
define('AJAXSTATMENTDETAIL', 'mod=page&type='.__CLASS__.'&type_data='.self::$type_data.'&mode='.$mode);
@@ -254,7 +255,7 @@
while (list($key, $value) = each($_POST['configuration'])) {
tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . $value . "' where configuration_key = '" . $key . "'");
}
- tep_redirect(tep_href_link(self::FILENAME, 'set=' . self::$set .'&class='.$_GET['class'].'&core='.@$_GET['core'].'&action=edit' ));
+ tep_redirect(tep_href_link(self::FILENAME, 'extension=' .$_REQUEST['extension'].'&action=edit' ));
break;
/**
@@ -476,6 +477,10 @@
break;
case 'edit':
+ $obj= sqlcip_modfiles::fetch(array('id'=>$_GET['extension']), true);
+ self::$list = sqlcip::fetch(array('id'=>$obj->cip_id), true);
+
+
$action='configedit';
call_user_func(array(self::$objChild, 'load_config_value'));
break;
Modified: trunk/catalog/includes/modules/payment/cod.php
===================================================================
--- trunk/catalog/includes/modules/payment/cod.php 2012-05-03 20:10:05 UTC (rev 4376)
+++ trunk/catalog/includes/modules/payment/cod.php 2012-05-04 06:52:58 UTC (rev 4377)
@@ -22,10 +22,10 @@
$this->code = 'cod';
$this->title = __('MODULE_PAYMENT_COD_TEXT_TITLE');
$this->description = __('MODULE_PAYMENT_COD_TEXT_DESCRIPTION');
- $this->sort_order = (!defined('MODULE_PAYMENT_COD_SORT_ORDER') ? MODULE_PAYMENT_COD_SORT_ORDER : 0 );
+ $this->sort_order = (defined('MODULE_PAYMENT_COD_SORT_ORDER') ? MODULE_PAYMENT_COD_SORT_ORDER : 0 );
$this->enabled = _cst_bool('MODULE_PAYMENT_COD_STATUS');
- if ((int)MODULE_PAYMENT_COD_ORDER_STATUS_ID > 0) {
+ if (defined('MODULE_PAYMENT_COD_ORDER_STATUS_ID') && (int)MODULE_PAYMENT_COD_ORDER_STATUS_ID > 0) {
$this->order_status = MODULE_PAYMENT_COD_ORDER_STATUS_ID;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-05-03 20:25:51
|
Revision: 4376
http://oscss.svn.sourceforge.net/oscss/?rev=4376&view=rev
Author: oscim
Date: 2012-05-03 20:10:05 +0000 (Thu, 03 May 2012)
Log Message:
-----------
suite featured
Modified Paths:
--------------
trunk/catalog/common/classes/datatype_drivers/Data_featured.php
Modified: trunk/catalog/common/classes/datatype_drivers/Data_featured.php
===================================================================
--- trunk/catalog/common/classes/datatype_drivers/Data_featured.php 2012-05-03 19:43:59 UTC (rev 4375)
+++ trunk/catalog/common/classes/datatype_drivers/Data_featured.php 2012-05-03 20:10:05 UTC (rev 4376)
@@ -77,18 +77,18 @@
global $languages_id;
$this->listing_sql['tables'] = " FROM " . TABLE_FEATURED . " ".$this->p." ".
- " LEFT JOIN " . TABLE_FEATURED_DATA . " ".$this->p."d ON( ".$this->p."d.featureds_id = ".$this->p.".featureds_id AND ".$this->p."d.languages_id = '" . (int)$languages_id . "' ) ".
+ " LEFT JOIN " . TABLE_FEATURED_DATA . " ".$this->p."d ON( ".$this->p."d.featured_id = ".$this->p.".row_id ) ".
"";
// permanente contrainte
$this->listing_sql['where'] = " WHERE 1 ";
// sort in sitemap
- $this->listing_sql['sort'] = " ".$this->p.".featureds_name ";
+ $this->listing_sql['sort'] = " ".$this->p.".row_id ";
// l id
- $this->listing_sql['id'] = " ".$this->p.".featureds_id ";
+ $this->listing_sql['id'] = " ".$this->p.".row_id ";
// colone utilsie pour le ratio
- $this->listing_sql['ratio'] = " ".$this->p."d.url_clicked ";
+ $this->listing_sql['ratio'] = " ".$this->p.".date_update ";
// list normalise date
- $this->listing_sql['dates'] = " ".$this->p.".date_added as added, ".$this->p.".last_modified as modified ";
+ $this->listing_sql['dates'] = " ".$this->p.".date_added as added, ".$this->p.".date_update as modified ";
return true;
}
@@ -154,7 +154,7 @@
switch($mode){
default:
- $sql = "SELECT featureds_id as ID , featureds_name as tName FROM ".TABLE_FEATURED." WHERE featureds_id='".(int)$id."' LIMIT 1";
+ $sql = "SELECT row_id as ID , featured_name as tName FROM ".TABLE_FEATURED." WHERE row_id='".(int)$id."' LIMIT 1";
$rsql = $DB->query($sql);
$result = $rsql->fetchAssoc();
$result['head_desc_tag']='';
@@ -185,7 +185,7 @@
"SELECT DISTINCT ". $sql_tmp['col_count'] ." ".
$sql_tmp['tables'] .
$sql_tmp['where'] .
- " AND featureds_id = '" . (int)$_GET['featureds_id'] . "' ";
+ " AND row_id = '" . (int)$_GET['featureds_id'] . "' ";
$this->listing_sort = $sql_tmp['sort'] ;
$this->listing_col_count = $sql_tmp['col_count'] ;
@@ -210,7 +210,7 @@
/// get the categorie name and put it on the header
if (isset($_GET['featureds_id'])) {
- $man=$DB->query("select * from " . TABLE_FEATURED . " f where f.featureds_id = '" . (int)$_GET['featureds_id'] . "' ");
+ $man=$DB->query("select * from " . TABLE_FEATURED . " f where f.row_id = '" . (int)$_GET['featureds_id'] . "' ");
$manuf= $man->fetchAssoc();
tep_db_free_result($man);
$image = $manuf['featureds_image'];
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-05-03 20:25:40
|
Revision: 4374
http://oscss.svn.sourceforge.net/oscss/?rev=4374&view=rev
Author: oscim
Date: 2012-05-03 19:23:23 +0000 (Thu, 03 May 2012)
Log Message:
-----------
suppression fichier obsolete
Removed Paths:
-------------
trunk/catalog/admin/includes/gabarit/rapport/filter.products_purchased.gab
Deleted: trunk/catalog/admin/includes/gabarit/rapport/filter.products_purchased.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/rapport/filter.products_purchased.gab 2012-05-03 17:29:08 UTC (rev 4373)
+++ trunk/catalog/admin/includes/gabarit/rapport/filter.products_purchased.gab 2012-05-03 19:23:23 UTC (rev 4374)
@@ -1,24 +0,0 @@
-<?php
-/**
- @licence GPL 2005-2012 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/04/2012 ,22:50:08
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-8
-*/
-?>
-
- <fieldset>
- <ul>
-Not implemented
- <li><?php //echo tep_draw_checkbox_field('clause['.$clean.']', 'clause['.$clean.']', 'on', (bool)(count($_SESSION['filters']['clause']) <=1 || (string)$_SESSION['filters']['clause'][$clean] == 'on')); ?> <?php echo __('products_purchased view exclusively products puchased not null') ?> </li>
-
-
- </ul>
-
- <p style="">
- <?php //echo tep_draw_checkbox_field('allfields['.$clean.']', 'allfields['.$clean.']', 'on', (bool)(count($_SESSION['filters']['allfields']) <=1 || (string)$_SESSION['filters']['allfields'][$clean] == 'on')); ?> <?php //echo $item ?>
- </p>
- </fieldset>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-05-03 20:14:43
|
Revision: 4375
http://oscss.svn.sourceforge.net/oscss/?rev=4375&view=rev
Author: oscim
Date: 2012-05-03 19:43:59 +0000 (Thu, 03 May 2012)
Log Message:
-----------
ajout filter centarlise por perdiode de date
correction coquille
FIX FS#1038
Implement FS#1027
Modified Paths:
--------------
trunk/catalog/admin/includes/languages/fr_FR/modules/filters.txt
trunk/catalog/admin/includes/modules/rapport/customers_purchase.php
trunk/catalog/admin/includes/modules/rapport/products_purchased.php
trunk/catalog/includes/application_top.php
Added Paths:
-----------
trunk/catalog/admin/includes/gabarit/MGabCont/filter.dates.gab
Added: trunk/catalog/admin/includes/gabarit/MGabCont/filter.dates.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/MGabCont/filter.dates.gab (rev 0)
+++ trunk/catalog/admin/includes/gabarit/MGabCont/filter.dates.gab 2012-05-03 19:43:59 UTC (rev 4375)
@@ -0,0 +1,28 @@
+<?php
+/**
+ @licence GPL 2005-2012 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/04/2012 ,22:50:08
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+?>
+
+<fieldset>
+ <legend><?php echo __('@filters filter legend choose dates'); ?></legend>
+ <ul class="inline">
+ <li class="inline">
+ <label for="filters[dates][start]"><?php echo __('@filters text products date start'); ?></label>
+ <?php echo tep_draw_input_field('filters[dates][start]', 'filters_start', tep_date_short( @$_SESSION['filters']['dates']['start'] ), ' maxlength="10" size="10"') . tep_draw_hidden_field('bt_filters_start'); ?>
+ </li>
+ <li class="inline">
+ <label for="filters[dates][end]"><?php echo __('@filters text products date end'); ?></label>
+ <?php echo tep_draw_input_field('filters[dates][end]', 'filters_end', tep_date_short( @$_SESSION['filters']['dates']['end'] ), ' maxlength="10" size="10"') . tep_draw_hidden_field('bt_filters_end'); ?>
+ </li>
+ <li class="inline">
+ <?php echo ' ' . __('@filters text products date format'); ?>
+ </li>
+ </ul>
+</fieldset>
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/filters.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/filters.txt 2012-05-03 19:23:23 UTC (rev 4374)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/filters.txt 2012-05-03 19:43:59 UTC (rev 4375)
@@ -12,14 +12,25 @@
$lang['@filters view filtres for listing'] = "Filtres" ;
$lang['@filters filter tab listfield'] = "Colonnes" ;
+$lang['@filters filter legend choose fields'] = "Listes des colonnes visibles" ;
+
+
$lang['@filters filter tab categorie'] = "Catégories" ;
+$lang['@filters filter legend choose categorie'] = "Catégories" ;
+
+
$lang['@filters filter tab language'] = "Langues" ;
+$lang['@filters filter legend choose language'] = "La langue utilisée" ;
+
+
$lang['@filters filter tab subtype'] = "Sous-types" ;
-
-$lang['@filters filter legend choose fields'] = "Listes des colonnes visibles" ;
-$lang['@filters filter legend choose categorie'] = "Catégories" ;
-$lang['@filters filter legend choose language'] = "La langue utilisée" ;
$lang['@filters filter legend choose subtype'] = "Listes des types visibles" ;
+$lang['@filters filter tab dates'] = "Dates" ;
+$lang['@filters filter legend choose dates'] = "Période" ;
+$lang['@filters text products date start'] = "Début" ;
+$lang['@filters text products date end'] = "Fin" ;
+$lang['@filters text products date format'] = "format de date locale" ;
+
$lang['image filters'] = "Filtrer" ;
?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/modules/rapport/customers_purchase.php
===================================================================
--- trunk/catalog/admin/includes/modules/rapport/customers_purchase.php 2012-05-03 19:23:23 UTC (rev 4374)
+++ trunk/catalog/admin/includes/modules/rapport/customers_purchase.php 2012-05-03 19:43:59 UTC (rev 4375)
@@ -69,40 +69,107 @@
*/
function load_db_values ($id) {
- /**
- @remarks this define col theader title, and ajust html code
- Just for Edit listing
- */
- $this->listing['theader']=array(
- array('width'=>'5%','class'=>'tcenter', 'txt'=>__('customers_purchase table heading id') ) ,
- array('width'=>'25%','class'=>'tcenter', 'txt'=>__('customers_purchase table heading firstname') ) ,
- array('width'=>'25%','class'=>'tcenter', 'txt'=>__('customers_purchase table heading lastname') ),
- array('class'=>'tcenter', 'txt'=>__('customers_purchase table heading email') ),
- array('width'=>'10%','class'=>'tcenter', 'txt'=>__('customers_purchase table heading ordernum') ),
- array('width'=>'10%','class'=>'tcenter', 'txt'=>__('customers_purchase table heading ordersum') ),
- array('width'=>'10%','class'=>'tcenter', 'txt'=>__('customers_purchase table heading moycart') ),
- );
+ $this->allfields = array(
+ 'c.customers_id' => __('customers_purchase table heading id'),
+ 'c.customers_firstname' =>array(
+ 'text'=> __('customers_purchase table heading firstname'),
+ 'default'=>true,
+ ),
+ 'c.customers_lastname' =>array(
+ 'text'=> __('customers_purchase table heading lastname'),
+ 'default'=>true,
+ ),
+ 'c.customers_email_address' => __('customers_purchase table heading email'),
+ 'sum(op.products_quantity * op.final_price)' =>array(
+ 'alias'=>'ordersum',
+ 'text'=> __('customers_purchase table heading ordersum'),
+ 'default'=>true,
+ ),
+ 'COUNT(o.orders_id)' =>array(
+ 'alias'=>'ordernum',
+ 'text'=> __('customers_purchase table heading ordernum') ,
+ 'default'=>true,
+ ),
+ '( SUM(op.products_quantity * op.final_price) /COUNT(o.orders_id) )' =>array(
+ 'alias'=>'moycart',
+ 'text'=> __('customers_purchase table heading moycart'),
+ 'default'=>true,
+ ),
+ );
+
+ if(isset($_SESSION['filters'][__CLASS__]['allfields']))
+ $_SESSION['filters']['allfields'] = $_SESSION['filters'] [__CLASS__]['allfields'];
+ else
+ $_SESSION['filters']['allfields'] = array();
+
+ $in_session = $_SESSION['filters']['allfields'];
+
+ $listfield = '';
+ foreach($this->allfields as $key=>$row){
+ $clean = substr($key, (strpos($key, '.')+1));
+
+ if(
+ ( isset($in_session[$clean]) && (string)$in_session[$clean] == 'on' )
+ || ( count($in_session) <=1 && ( is_array($row) && isset($row['default']) && $row['default'] == true) )
+ ) {
+
+ $_SESSION['filters']['allfields'][$clean] = 'on';
+
+ if(is_array($row)){
+ $txt = $row['text'];
+ $alias = (isset($row['alias'])? $row['alias'] : $clean);
+ $css = (isset($row['class'])? $row['class'] : 'tcenter');
+ $width = (isset($row['width'])? $row['width'] : '5%');
+ }
+ else{
+ $txt = $row;
+ $alias = $clean;
+ $css = 'tcenter';
+ $width = '5%';
+ }
+
+ /**
+ @remarks this define col theader title, and ajust html code
+ */
+ $this->listing['theader'][]= array( 'txt'=> (is_array($row)? $row['text'] : $row ) );
+ /**
+ @remarks this define col in table, and if is possible sort
+ */
+ $this->listing['modele'][$alias]=true;
+
+ if($clean !=$alias)
+ $listfield .=$key.' as '.$alias.',';
+ else
+ $listfield .=$key.',';
+ }
+ }
+
+ $this->listing['allfields'] = $this->allfields ;
+
/**
@remarks this define col in table, and if is possible sort
- Just for Edit listing
+ Just for Filter listing
*/
- $this->listing['modele']=array(
- 'customers_id'=>true,
- 'customers_firstname' =>true,
- 'customers_lastname' =>true,
- 'customers_email_address' =>true,
- 'ordernum' =>true,
- 'ordersum' =>true,
- 'moycart' =>true,
- );
+ $this->listing['tfilter']=array(
+ array(
+ 'type'=>'listfield'
+ ),
+ );
- $this->query['select'] = " c.customers_id, c.customers_firstname, c.customers_lastname,c.customers_email_address, sum(op.products_quantity * op.final_price) as ordersum, COUNT(o.orders_id) as ordernum , ( SUM(op.products_quantity * op.final_price) /COUNT(o.orders_id) ) as moycart ";
+
+
+ global $languages_id;
+
+ $this->query['select'] = substr($listfield,0,-1);
$this->query['tables'] = " " . TABLE_CUSTOMERS . " c, " . TABLE_ORDERS_PRODUCTS . " op, " . TABLE_ORDERS . " o ";
- $this->query['where'] = " c.customers_id = o.customers_id and o.orders_id = op.orders_id ";
+
+ $this->query['where'] = " c.customers_id = o.customers_id and o.orders_id = op.orders_id "; //" p.products_ordered > 0 ";
$this->query['groupby'] = " c.customers_firstname, c.customers_lastname ";
$this->query['orderby'] = " ordersum DESC ";
+
+
}
/**
Modified: trunk/catalog/admin/includes/modules/rapport/products_purchased.php
===================================================================
--- trunk/catalog/admin/includes/modules/rapport/products_purchased.php 2012-05-03 19:23:23 UTC (rev 4374)
+++ trunk/catalog/admin/includes/modules/rapport/products_purchased.php 2012-05-03 19:43:59 UTC (rev 4375)
@@ -144,12 +144,7 @@
Just for Filter listing
*/
$this->listing['tfilter']=array(
-// array(
-// 'title'=>__('products_purchased filter tab clause'),
-// 'content' => tep_get_include_contents('rapport/filter.'.__CLASS__.''),
-// ),
array(
- 'title'=>__('products_purchased filter tab fields'),
'type'=>'listfield'
),
);
Modified: trunk/catalog/includes/application_top.php
===================================================================
--- trunk/catalog/includes/application_top.php 2012-05-03 19:23:23 UTC (rev 4374)
+++ trunk/catalog/includes/application_top.php 2012-05-03 19:43:59 UTC (rev 4375)
@@ -237,7 +237,7 @@
tep_session_register('aauth');
$aauth = 'yes';
// force redirect by not GET
- if(isset($_GET['admin']) )header("Location: /");
+ if(isset($_GET['admin']) )header("Location: ".DIR_WS_CATALOG);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-05-03 19:35:17
|
Revision: 4373
http://oscss.svn.sourceforge.net/oscss/?rev=4373&view=rev
Author: oscim
Date: 2012-05-03 17:29:08 +0000 (Thu, 03 May 2012)
Log Message:
-----------
prise en charge des menu avec arguements dans les page product / orders
ajutement menu
correction css
Modified Paths:
--------------
trunk/catalog/admin/includes/boxes/10_orders.php
trunk/catalog/admin/includes/gabarit/orders/filter.clause.gab
trunk/catalog/admin/includes/gabarit/products/filter.clause.gab
trunk/catalog/admin/includes/languages/fr_FR/boxes/10_orders.php
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/orders.txt
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/products.txt
trunk/catalog/admin/includes/modules/pages/orders.php
trunk/catalog/admin/includes/modules/pages/products.php
trunk/catalog/admin/includes/template/oscss/stylesheet-1.css
Modified: trunk/catalog/admin/includes/boxes/10_orders.php
===================================================================
--- trunk/catalog/admin/includes/boxes/10_orders.php 2012-05-03 09:49:37 UTC (rev 4372)
+++ trunk/catalog/admin/includes/boxes/10_orders.php 2012-05-03 17:29:08 UTC (rev 4373)
@@ -15,10 +15,9 @@
@$img['orders'],
4=> array(
array(FILENAME_ORDERS.'?view=thisday', 'BOX_CUSTOMERS_ORDERS_THISDAY', 'orders',@$img['orders']),
- array(FILENAME_ORDERS.'?view=opened', 'BOX_CUSTOMERS_ORDERS_OPENED', 'orders',@$img['orders']),
- array(FILENAME_ORDERS.'?view=nopayed', 'BOX_CUSTOMERS_ORDERS_NOPAYED', 'orders',@$img['orders']),
+ array(FILENAME_ORDERS.'?view=thisweek', 'BOX_CUSTOMERS_ORDERS_THISWEEK', 'orders',@$img['orders']),
array(FILENAME_ORDERS.'?view=allnoclosed', 'BOX_CUSTOMERS_ORDERS_ALLNOCLOSED', 'orders',@$img['orders']),
- array(FILENAME_ORDERS, 'BOX_CUSTOMERS_ORDERS_ALL', 'orders',@$img['orders']),
+ array(FILENAME_ORDERS.'?view=allclosed', 'BOX_CUSTOMERS_ORDERS_ALLCLOSED', 'orders',@$img['orders']),
)
);
@@ -34,7 +33,7 @@
4=> array(
array('shipping.php?view=opened', 'BOX_CUSTOMERS_SHIPPING_OPENNED', 'orders',@$img['orders']),
array('shipping.php?view=progress', 'BOX_CUSTOMERS_SHIPPING_PROGRESS', 'orders',@$img['orders']),
- array('shipping.php?view=clsed', 'BOX_CUSTOMERS_SHIPPING_CLOSE', 'orders',@$img['orders']),
+ array('shipping.php?view=closed', 'BOX_CUSTOMERS_SHIPPING_CLOSE', 'orders',@$img['orders']),
)
);
Modified: trunk/catalog/admin/includes/gabarit/orders/filter.clause.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/orders/filter.clause.gab 2012-05-03 09:49:37 UTC (rev 4372)
+++ trunk/catalog/admin/includes/gabarit/orders/filter.clause.gab 2012-05-03 17:29:08 UTC (rev 4373)
@@ -9,26 +9,29 @@
@encode UTF-8
*/
?>
-<!-- <fieldset> -->
-<!-- <legend><?php echo __('orders filter legend choose status'); ?></legend>
+<fieldset>
+ <legend><?php echo __('@orders filter legend choose dates'); ?></legend>
<ul class="inline">
- <li>
- <label class="inline" for="products_date_available"><?php echo __('text products date available'); ?></label>
- <?php echo tep_draw_input_field('products_date_available', '', '', ' maxlength="10" size="10"') . tep_draw_hidden_field('bt_products_date_available') . ' ' . __('text products date format'); ?>
+ <li class="inline">
+ <label for="filters[dates][start]"><?php echo __('@orders text products date start'); ?></label>
+ <?php echo tep_draw_input_field('filters[dates][start]', 'filters_start', tep_date_short( @$_SESSION['filters']['dates']['start'] ), ' maxlength="10" size="10"') . tep_draw_hidden_field('bt_filters_start'); ?>
</li>
- <li>
- <label class="inline" for="products_date_available"><?php echo __('text products date available'); ?></label>
- <?php echo tep_draw_input_field('products_date_available', '', '', ' maxlength="10" size="10"') . tep_draw_hidden_field('bt_products_date_available') . ' ' . __('text products date format'); ?>
+ <li class="inline">
+ <label for="filters[dates][end]"><?php echo __('@orders text products date end'); ?></label>
+ <?php echo tep_draw_input_field('filters[dates][end]', 'filters_end', tep_date_short( @$_SESSION['filters']['dates']['end'] ), ' maxlength="10" size="10"') . tep_draw_hidden_field('bt_filters_end'); ?>
</li>
- </ul>-->
-<!-- </fieldset> -->
+ <li class="inline">
+ <?php echo ' ' . __('text products date format'); ?>
+ </li>
+ </ul>
+</fieldset>
<fieldset>
- <legend><?php echo __('orders filter legend choose status'); ?></legend>
+ <legend><?php echo __('@orders filter legend choose status'); ?></legend>
<ul class="inline">
<?php foreach(orders::$orders_statuses as $item): ?>
<li>
- <?php echo tep_draw_checkbox_field('viewstatus['.$item['id'] .']', 'viewstatus['.$item['id'].']', 'on', (bool)(count(@$_SESSION['filters']['viewstatus']) <=1 || (string)@$_SESSION['filters']['viewstatus'][$item['id']] == 'on')); ?>
+ <?php echo tep_draw_checkbox_field('filters[viewstatus]['.$item['id'] .']', 'filters[viewstatus]['.$item['id'].']', 'on', (bool)(count(@$_SESSION['filters']['viewstatus']) <=1 || (string)@$_SESSION['filters']['viewstatus'][$item['id']] == 'on')); ?>
<?php echo $item['text'] ?>
</li>
<?php endforeach; ?>
Modified: trunk/catalog/admin/includes/gabarit/products/filter.clause.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/products/filter.clause.gab 2012-05-03 09:49:37 UTC (rev 4372)
+++ trunk/catalog/admin/includes/gabarit/products/filter.clause.gab 2012-05-03 17:29:08 UTC (rev 4373)
@@ -26,13 +26,29 @@
<!-- </fieldset> -->
<fieldset>
- <legend><?php echo __('orders filter legend choose status'); ?></legend>
+ <legend><?php echo __('@products filter legend products expected'); ?></legend>
<ul class="inline">
- <?php foreach(tep_get_status_array('product') as $item): ?>
<li>
- <?php echo tep_draw_checkbox_field('viewstatus['.$item['id'] .']', 'viewstatus['.$item['id'].']', 'on', (bool)(count(@$_SESSION['filters']['viewstatus']) <=1 || (string)@$_SESSION['filters']['viewstatus'][$item['id']] == 'on')); ?>
- <?php echo $item['text'] ?>
+ <label class="inline" for="products_date_available"><?php echo __('@products label text expected publied'); ?></label>
+ <?php echo tep_draw_checkbox_field('filters[expected][publied]', 'filters_publied', 'on', (bool)(@$_SESSION['filters']['expected']['publied'] == 'on') ); ?>
</li>
- <?php endforeach; ?>
+ <li>
+ <label class="inline" for="products_date_available"><?php echo __('@products label text expected no publied'); ?></label>
+ <?php echo tep_draw_checkbox_field('filters[expected][nopublied]', 'filters_publied', 'on', (bool)(@$_SESSION['filters']['expected']['nopublied'] == 'on') ); ?>
+ </li>
</ul>
</fieldset>
+
+<fieldset>
+ <legend><?php echo __('@products filter legend products status'); ?></legend>
+ <ul class="inline">
+ <li>
+ <label class="inline" for="products_date_available"><?php echo __('@products label text status publied'); ?></label>
+ <?php echo tep_draw_checkbox_field('filters[status][publied]', 'filters_publied', 'on', (bool)(@$_SESSION['filters']['status']['publied'] == 'on') ); ?>
+ </li>
+ <li>
+ <label class="inline" for="products_date_available"><?php echo __('@products label text status no publied'); ?></label>
+ <?php echo tep_draw_checkbox_field('filters[status][nopublied]', 'filters_publied', 'on', (bool)(@$_SESSION['filters']['status']['nopublied'] == 'on') ); ?>
+ </li>
+ </ul>
+</fieldset>
Modified: trunk/catalog/admin/includes/languages/fr_FR/boxes/10_orders.php
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/boxes/10_orders.php 2012-05-03 09:49:37 UTC (rev 4372)
+++ trunk/catalog/admin/includes/languages/fr_FR/boxes/10_orders.php 2012-05-03 17:29:08 UTC (rev 4373)
@@ -12,10 +12,9 @@
define('BOX_CUSTOMERS_ORDERS',"Commandes" );
define('BOX_CUSTOMERS_ORDERS_THISDAY',"Commande du jour" );
+define('BOX_CUSTOMERS_ORDERS_THISWEEK',"Commande du la semaine" );
define('BOX_CUSTOMERS_ORDERS_ALLNOCLOSED',"Commandes ouvertes" );
-define('BOX_CUSTOMERS_ORDERS_ALL',"Toutes les commandes" );
-define('BOX_CUSTOMERS_ORDERS_OPENED',"Commandes en traitement" );
-define('BOX_CUSTOMERS_ORDERS_NOPAYED',"Commandes en attente" );
+define('BOX_CUSTOMERS_ORDERS_ALLCLOSED',"Commandes fermées" );
define('BOX_CUSTOMERS_SHIPPING',"Livraisons" );
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/pages/orders.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/pages/orders.txt 2012-05-03 09:49:37 UTC (rev 4372)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/orders.txt 2012-05-03 17:29:08 UTC (rev 4373)
@@ -8,168 +8,180 @@
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
+
+
$lang['heading title orders']="Commandes" ;
$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" ;
-$lang['tab orders history']="Suivi" ;
-$lang['tab orders shipping']="Livraisons" ;
-$lang['tab orders service']="Services" ;
+/* Listing */
+ /* Filter */
+ $lang['view filtres for listing']="Options des filtres" ;
+ $lang['orders filter tab clause']="Filtre" ;
+ $lang['@orders filter legend choose status']="Statut visible" ;
+ $lang['@orders filter legend choose dates']="Periode" ;
-/* Filter */
- $lang['view filtres for listing']="Options des filtres" ;
- $lang['orders filter tab clause']="Filtre" ;
- $lang['orders filter tab fields']="Colonnes" ;
- $lang['image filters']="Filtrer" ;
+ $lang['@orders text products date start']="Début" ;
+ $lang['@orders text products date end']="Fin" ;
- $lang['orders filter legend choose status']="Statut visible" ;
- $lang['filter legend choose fields']="Colonnes visible" ;
+ /* Fields */
+ $lang['orders table heading order id']="n°" ;
+ $lang['orders table heading customers']="Clients" ;
+ $lang['orders table heading order total']="Total" ;
+ $lang['orders table heading date purchased']="Achat le" ;
+ $lang['orders table heading last modified']="Modifié le" ;
+ $lang['orders table heading payment']="Payé par" ;
+ $lang['orders table heading status']="Statut" ;
+ $lang['orders table heading currency']="Devise" ;
+ $lang['orders table heading ip_address']="ip" ;
+ $lang['orders table heading total_weight']="Poids" ;
+ $lang['orders table heading facture_id']="Fact." ;
+ $lang['orders table heading class_payment']="Class. pay" ;
+ $lang['orders table heading class_shipping']="Class. ship" ;
-/* Listing */
- $lang['orders table heading order id']="n°" ;
- $lang['orders table heading customers']="Clients" ;
- $lang['orders table heading order total']="Total" ;
- $lang['orders table heading date purchased']="Achat le" ;
- $lang['orders table heading last modified']="Modifié le" ;
- $lang['orders table heading payment']="Payé par" ;
- $lang['orders table heading status']="Statut" ;
- $lang['orders table heading currency']="Devise" ;
- $lang['orders table heading ip_address']="ip" ;
- $lang['orders table heading total_weight']="Poids" ;
- $lang['orders table heading facture_id']="Fact." ;
- $lang['orders table heading class_payment']="Class. pay" ;
- $lang['orders table heading class_shipping']="Class. ship" ;
-$lang['table heading comments']="Commentaires" ;
+/* Edit */
+ /* heading tabs */
+ $lang['tab orders briefs']="Details" ;
+ $lang['tab orders details']="Commande" ;
+ $lang['tab orders history']="Suivi" ;
+ $lang['tab orders shipping']="Livraisons" ;
+ $lang['tab orders service']="Services" ;
-$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" ;
-$lang['table heading products']="Produits" ;
-$lang['table heading tax']="Taxe" ;
-$lang['table heading total']="Total" ;
-$lang['table heading price excluding tax']="Prix (HT)" ;
-$lang['table heading price including tax']="Prix (TTC)" ;
-$lang['table heading total excluding tax']="Total (HT)" ;
-$lang['table heading total including tax']="Total (TTC)" ;
-$lang['table heading customer notified']="Client notifié" ;
-$lang['table heading date added']="Date d'ajout" ;
-$lang['table heading return']="Retour" ;
+ /* Section tabs 1*/
+ $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 method']="Méthode de livraison" ;
+ $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 :" ;
+ $lang['entry credit card expires']="Date d'expiration de la carte de crédit :" ;
+ $lang['entry sub total']="Sous-Total :" ;
+ $lang['entry tax']="Taxe :" ;
+ $lang['entry shipping']="Expédition :" ;
+ $lang['entry total']="Total :" ;
+ $lang['entry date purchased']="Date d'achat :" ;
+ $lang['entry status']="Statut :" ;
+ $lang['entry date last updated']="Dernière date de mise à jour :" ;
+ $lang['entry notify customer']="Informer le client :" ;
+ $lang['entry notify comments']="Ajouter un commentaire :" ;
+ $lang['entry printable']="Imprimer la facture" ;
+ $lang['entry ip']="Adresse IP : " ;
+ $lang['entry telephone number']="Tél. : " ;
+ $lang['entry email address']="Email : " ;
+ $lang['entry shipping address actived']="Utilisation d'une adresse de livraison" ;
+
+ $lang['table heading comments']="Commentaires" ;
-$lang['table heading active initial']="Depuis" ;
-$lang['table heading revival']="Alerte" ;
-$lang['table heading current status']="Statut" ;
-$lang['table heading auto_retry']="Auto-renouvellement" ;
-$lang['table heading quantity a expedie']="Reste à expedié" ;
-$lang['table heading quantity deja expedie']="Déjà expedié" ;
-$lang['table heading quantity in order']="Commande" ;
+ /* Section tabs 2 */
+ $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" ;
+ $lang['table heading products']="Produits" ;
+ $lang['table heading tax']="Taxe" ;
+ $lang['table heading total']="Total" ;
+ $lang['table heading price excluding tax']="Prix (HT)" ;
+ $lang['table heading price including tax']="Prix (TTC)" ;
+ $lang['table heading total excluding tax']="Total (HT)" ;
+ $lang['table heading total including tax']="Total (TTC)" ;
+ $lang['table heading customer notified']="Client notifié" ;
+ $lang['table heading date added']="Date d'ajout" ;
+ $lang['table heading return']="Retour" ;
-$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 method']="Méthode de livraison" ;
-$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 :" ;
-$lang['entry credit card expires']="Date d'expiration de la carte de crédit :" ;
-$lang['entry sub total']="Sous-Total :" ;
-$lang['entry tax']="Taxe :" ;
-$lang['entry shipping']="Expédition :" ;
-$lang['entry total']="Total :" ;
-$lang['entry date purchased']="Date d'achat :" ;
-$lang['entry status']="Statut :" ;
-$lang['entry date last updated']="Dernière date de mise à jour :" ;
-$lang['entry notify customer']="Informer le client :" ;
-$lang['entry notify comments']="Ajouter un commentaire :" ;
-$lang['entry printable']="Imprimer la facture" ;
-$lang['entry ip']="Adresse IP : " ;
-$lang['entry telephone number']="Tél. : " ;
-$lang['entry email address']="Email : " ;
-$lang['entry shipping address actived']="Utilisation d'une adresse de livraison" ;
+ /* Section tabs shipping */
+ $lang['heading form expedition']="Ajouter une expedition" ;
+ $lang['table heading date expedition']="Expedié le " ;
+ $lang['table heading tracking number']="N° suivi" ;
+ $lang['table heading quantity a expedie']="Reste à expedié" ;
+ $lang['table heading quantity deja expedie']="Déjà expedié" ;
+ $lang['table heading quantity in order']="Commande" ;
+ $lang['entry shipping new expedition details']="Detail de l'expedition " ;
+ $lang['label shipping tracking number']="Numéro d'expedition : " ;
+ $lang['label shipping tracking url']="Url de suivi : " ;
-$lang['heading form expedition']="Ajouter une expedition" ;
-$lang['table heading date expedition']="Expedié le " ;
-$lang['table heading tracking number']="N° suivi" ;
-$lang['table heading methode']="methode" ;
+ /* Section tabs service */
+ $lang['table heading active initial']="Depuis" ;
+ $lang['table heading revival']="Alerte" ;
+ $lang['table heading current status']="Statut" ;
+ $lang['table heading auto_retry']="Auto-renouvellement" ;
-$lang['heading title search name']="Nom : " ;
-$lang['heading title search montant']="Montant : " ;
+ /* Table pdf list */
+ $lang['heading documents']="Documents" ;
+ $lang['order table pdf heading file']="Fichiers" ;
+ $lang['order table pdf heading weight']="Poids" ;
+ $lang['order table pdf heading date']="Date" ;
+ $lang['pdf generate']="Generer" ;
+ $lang['image orders delivery']="Bon de livraison" ;
-$lang['entry shipping new expedition details']="Detail de l'expedition " ;
-$lang['label shipping tracking number']="Numéro d'expedition : " ;
-$lang['label shipping tracking url']="Url de suivi : " ;
+/* Action multi */
+ $lang['action multiple']="Actions multiples : " ;
+ $lang['text action multiple orders']="Status " ;
+ $lang['text info multi intro']="Êtes-vous sûr de vouloir changer les commande(s) suivante(s) " ;
+ $lang['text info multi notify']="Notifier les clients" ;
+ $lang['text info multi action detail']="Changer les status pour : " ;
+ $lang['text info multi heading upload order']="Actions multiples " ;
+ $lang['image modify multi']="Executer " ;
-$lang['not this status']="Sauf " ;
-$lang['txt all']="Choix " ;
-$lang['action multiple']="Actions multiples : " ;
-$lang['text action multiple orders']="Status " ;
-$lang['text info multi intro']="Êtes-vous sûr de vouloir changer les commande(s) suivante(s) " ;
-$lang['text info multi notify']="Notifier les clients" ;
-$lang['text info multi action detail']="Changer les status pour : " ;
-$lang['text info multi heading upload order']="Actions multiples " ;
-$lang['image modify multi']="Executer " ;
-$lang['text info heading delete order']="Supprimer la commande" ;
-$lang['text info delete intro']="Êtes-vous sûr de vouloir supprimer cette commande ?" ;
-$lang['text info restock product quantity']="Restaurer la valeur de stock" ;
-$lang['text info delete shipping']="Supprimer les livraisons associées " ;
-$lang['text info delete service']="Supprimer les services associés" ;
+/* Delete */
+ $lang['text info heading delete order']="Supprimer la commande" ;
+ $lang['text info delete intro']="Êtes-vous sûr de vouloir supprimer cette commande ?" ;
+ $lang['text info restock product quantity']="Restaurer la valeur de stock" ;
+ $lang['text info delete shipping']="Supprimer les livraisons associées " ;
+ $lang['text info delete service']="Supprimer les services associés" ;
-$lang['text date order created']="Date de création :" ;
-$lang['text date order last modified']="Dernière modification :" ;
-$lang['text info payment method']="Méthode de paiement :" ;
-$lang['text all orders']="Toutes les commandes" ;
-$lang['text all orders not in finish']="SAUF livré et annulé" ;
-$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['order table pdf heading file']="Fichiers" ;
-$lang['order table pdf heading weight']="Poids" ;
-$lang['order table pdf heading date']="Date" ;
-$lang['legend contact customers']="Contact" ;
-$lang['legend update order history']="Mise à jour" ;
+/* Alert / errors */
+ $lang['error order not update address']="Erreur : adresse de la commande non mise à jour" ;
+ $lang['success order update address']="Succes, mise à jour de l'adresse de la commande" ;
-$lang['image orders delivery']="Bon de livraison" ;
+ $lang['error order not update mod']="Erreur : methode de la commande non mise à jour" ;
+ $lang['success order update mod']="Succes, mise à jour de la méthode" ;
+ $lang['error order not update status']="Erreur : statut de ce service non mis à jour" ;
+ $lang['success order update status']="Succes, mise à jour du statut de ce service" ;
+ $lang['error order not update auto_retry']="Erreur : auto-renouvellement du service non mis à jour" ;
+ $lang['success order update auto_retry']="Succes, mise à jour de l'auto-renouvellement du service" ;
+ $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." ;
+ $lang['success order delete']="Supression de la commande effectué" ;
+ $lang['error order not delete']="Erreur lors de la suppresion de la commande" ;
- /* PDF */
- $lang['qty orders']="Cmd" ;
- $lang['qty exedie']="Exp" ;
- $lang['table heading products model']="Modèles" ;
- $lang['table heading products']="Produits" ;
- $lang['pdf generate']="Generer" ;
- $lang['pdf generate']="Generer" ;
-$lang['error order not update address']="Erreur : adresse de la commande non mise à jour" ;
-$lang['success order update address']="Succes, mise à jour de l'adresse de la commande" ;
-$lang['error order not update mod']="Erreur : methode de la commande non mise à jour" ;
-$lang['success order update mod']="Succes, mise à jour de la méthode" ;
-$lang['error order not update status']="Erreur : statut de ce service non mis à jour" ;
-$lang['success order update status']="Succes, mise à jour du statut de ce service" ;
-$lang['error order not update auto_retry']="Erreur : auto-renouvellement du service non mis à jour" ;
-$lang['success order update auto_retry']="Succes, mise à jour de l'auto-renouvellement du service" ;
-$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." ;
-$lang['success order delete']="Supression de la commande effectué" ;
-$lang['error order not delete']="Erreur lors de la suppresion de la commande" ;
+ /* A voir si encoer utilise */
+$lang['qty orders']="Cmd" ;
+$lang['qty exedie']="Exp" ;
+$lang['table heading products model']="Modèles" ;
+$lang['table heading products']="Produits" ;
+$lang['legend contact customers']="Contact" ;
+$lang['legend update order history']="Mise à jour" ;
+$lang['txt all']="Choix " ;
+$lang['table heading methode']="methode" ;
+$lang['text date order created']="Date de création :" ;
+$lang['text date order last modified']="Dernière modification :" ;
+$lang['text info payment method']="Méthode de paiement :" ;
+$lang['text all orders']="Toutes les commandes" ;
+$lang['text all orders not in finish']="SAUF livré et annulé" ;
+$lang['text no order history']="Aucun historique de commande disponible" ;
+$lang['text shedule return']="engager une procédure de retour produit ou d'échange" ;
+
+
?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/pages/products.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/pages/products.txt 2012-05-03 09:49:37 UTC (rev 4372)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/products.txt 2012-05-03 17:29:08 UTC (rev 4373)
@@ -44,8 +44,16 @@
$lang['heading title products']="Produits" ;
/* Filtre */
- $lang['@products filter tab clause']="Produits" ;
+ $lang['@products filter tab clause']="Autres" ;
+ $lang['@products filter legend products expected']="Produits à venir" ;
+ $lang['@products label text expected publied']="Produits publiés " ;
+ $lang['@products label text expected no publied']="Produits à venir" ;
+ $lang['@products filter legend products status']="Produits en ligne " ;
+ $lang['@products label text status publied']="Actif" ;
+ $lang['@products label text status no publied']="Inactif" ;
+
+
/* All fields used on listign and filters */
$lang['products table heading id']="id" ;
$lang['products table heading name']="Produits" ;
Modified: trunk/catalog/admin/includes/modules/pages/orders.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/orders.php 2012-05-03 09:49:37 UTC (rev 4372)
+++ trunk/catalog/admin/includes/modules/pages/orders.php 2012-05-03 17:29:08 UTC (rev 4373)
@@ -299,6 +299,22 @@
/**
@remarks filter based on status orders
*/
+ $allclosed = array(DEFAULT_ORDERS_STATUS_COMPLETED =>'on' , DEFAULT_ORDERS_STATUS_ANNULATE =>'on');
+
+ if(self::$view =='allclosed'){
+ $_SESSION['filters'][__CLASS__]['viewstatus'] = $allclosed;
+ }
+ if(self::$view =='allnoclosed'){
+ $arr = array();
+ $rev = array_keys($allclosed) ;
+
+ foreach(self::$orders_statuses as $row)
+ if( !in_array( $row['id'] , $rev ) )
+ $arr[$row['id']] = 'on' ;
+
+ $_SESSION['filters'][__CLASS__]['viewstatus'] = $arr;
+ }
+
if(isset($_SESSION['filters'][__CLASS__]['viewstatus']))
$_SESSION['filters']['viewstatus'] = $_SESSION['filters'] [__CLASS__]['viewstatus'];
else
@@ -316,6 +332,33 @@
/**
+ @remarks filter based on date_purchased orders
+ */
+ if(self::$view =='thisday'){
+ $_SESSION['filters'][__CLASS__]['dates']['start'] = date('Y-m-d');
+ $_SESSION['filters'][__CLASS__]['dates']['end'] = date('Y-m-d');
+ }
+ elseif(self::$view =='thisweek'){
+ $_SESSION['filters'][__CLASS__]['dates']['start'] = date('Y-m-d', time() - (7 * 24 * 3600));
+ $_SESSION['filters'][__CLASS__]['dates']['end'] = date('Y-m-d');
+ }
+
+ if(isset($_SESSION['filters'][__CLASS__]['dates']['start']))
+ $_SESSION['filters']['dates']['start'] = $_SESSION['filters'][__CLASS__]['dates']['start'].' 00:00:00';
+ else
+ $_SESSION['filters']['dates']['start'] = date('Y-m-d', time() - 7 * 24 * 60).' 00:00:00';
+
+ if(isset($_SESSION['filters'][__CLASS__]['dates']['end']))
+ $_SESSION['filters']['dates']['end'] = $_SESSION['filters'][__CLASS__]['dates']['end'].' 23:59:59';
+ else
+ $_SESSION['filters']['dates']['end'] = date('Y-m-d').' 23:59:59';
+
+ if(tep_not_null($_SESSION['filters']['dates']['start']))
+ self::$InitInfo['adjust']['sWhere'] .=" AND date_purchased >= '".tep_db_input($_SESSION['filters']['dates']['start'])."'";
+ if(tep_not_null($_SESSION['filters']['dates']['end']))
+ self::$InitInfo['adjust']['sWhere'] .=" AND date_purchased <= '".tep_db_input($_SESSION['filters']['dates']['end'])."'";
+
+ /**
@remarks Active forms filter
*/
self::$InitInfo['tfilter']['listing']=array(
@@ -338,21 +381,7 @@
}
-// =array();
-// if(self::$view =='opened')
-// self::$InitInfo['adjust']['sWhere'] .=" AND SUBSTRING(o.orders_status,1,2) >= '".DEFAULT_ORDERS_STATUS_ID."' AND SUBSTRING(orders_status,1,2) < '".DEFAULT_ORDERS_STATUS_COMPLETED."' ";
-// elseif(self::$view =='nopayed')
-// self::$InitInfo['adjust']['sWhere'] .=" AND orders_status >=0 AND SUBSTRING(orders_status,1,2) >= '".DEFAULT_ORDERS_STATUS_ID."' AND SUBSTRING(orders_status,1,2) < '".DEFAULT_ORDERS_STATUS_PAYED."' ";
-// elseif(self::$view =='allnoclosed')
-// self::$InitInfo['adjust']['sWhere'] .=" AND orders_status >=0 ";
-// elseif(self::$view =='all')
-// self::$InitInfo['adjust']['sWhere'] .='';
-// elseif(self::$view =='thisday')
-// self::$InitInfo['adjust']['sWhere'] .=' AND SUBSTRING(date_purchased,1,10) =\''.date('Y-m-d').'\' ';
-// else {
-
-
global $oscss;
$oscss->_add_ext(BO_WISIWYG_SELECTED,'editeur/');
echo $oscss->_call(BO_WISIWYG_SELECTED,'_top','comments','800','400');
@@ -380,7 +409,9 @@
@remarks specific save in session value filters
*/
case 'filters':
- $_SESSION['filters'][__CLASS__]['allfields'] =array();
+ $_SESSION['filters']=array();
+
+ // appli result fields hidden/visible
foreach($_POST['filters']['listfield'] as $key=>$row){
if( $row =='on' )
$_SESSION['filters'][__CLASS__]['allfields'][$key] = 'on';
@@ -388,14 +419,21 @@
unset($_SESSION['filters'][__CLASS__]['allfields'][$key]);
}
- $_SESSION['filters'][__CLASS__]['viewstatus'] =array();
- foreach($_POST['viewstatus'] as $key=>$row){
+ // status orders restric list
+ foreach($_POST['filters']['viewstatus'] as $key=>$row){
if( $row =='on' )
$_SESSION['filters'][__CLASS__]['viewstatus'][$key] = 'on';
else
unset($_SESSION['filters'][__CLASS__]['viewstatus'][$key]);
}
+ // date order
+ if(isset($_POST['filters']['dates']) ){
+ if( tep_not_null($_POST['filters']['dates']['start']))
+ $_SESSION['filters'][__CLASS__]['dates']['start'] = tep_date_raw(tep_db_prepare_input($_POST['filters']['dates']['start']));
+ if(tep_not_null($_POST['filters']['dates']['end']))
+ $_SESSION['filters'][__CLASS__]['dates']['end'] = tep_date_raw(tep_db_prepare_input($_POST['filters']['dates']['end']));
+ }
tep_redirect(tep_href_link(self::FILENAME));
break;
Modified: trunk/catalog/admin/includes/modules/pages/products.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/products.php 2012-05-03 09:49:37 UTC (rev 4372)
+++ trunk/catalog/admin/includes/modules/pages/products.php 2012-05-03 17:29:08 UTC (rev 4373)
@@ -397,7 +397,7 @@
self::$InitInfo['adjust']['sWhere'] .=" AND cat.categories_id IN (".substr($list, 0,-1).") ";
/**
- @remarks filter based on categorie
+ @remarks filter based on subtype products
*/
if(isset($_SESSION['filters'][__CLASS__]['subtype']))
$_SESSION['filters']['subtype'] = $_SESSION['filters'] [__CLASS__]['subtype'];
@@ -415,7 +415,48 @@
}
self::$InitInfo['adjust']['sWhere'] .=" AND products_type IN (".substr($list_type, 0,-1).") ";
+
/**
+ @remarks filter based on expected
+ */
+ if(isset($_SESSION['filters'][__CLASS__]['expected']))
+ $_SESSION['filters']['expected'] = $_SESSION['filters'] [__CLASS__]['expected'];
+ else
+ $_SESSION['filters']['expected'] =array();
+
+ $array = array();
+ foreach($_SESSION['filters']['expected'] as $key=>$row)
+ $array[] = $key;
+
+ if((!in_array('publied', $array) && in_array('nopublied', $array) )|| isset($_GET['expected']) ){
+ $_SESSION['filters']['expected'] =array();
+ $_SESSION['filters']['expected']['nopublied'] = 'on';
+ self::$InitInfo['adjust']['sWhere'] .=" AND products_date_available IS NOT NULL ";
+ }
+ elseif(in_array('publied', $array) && !in_array('nopublied', $array) )
+ self::$InitInfo['adjust']['sWhere'] .=" AND products_date_available IS NULL ";
+
+
+
+ /**
+ @remarks filter based on status
+ */
+ if(isset($_SESSION['filters'][__CLASS__]['status']))
+ $_SESSION['filters']['status'] = $_SESSION['filters'] [__CLASS__]['status'];
+ else
+ $_SESSION['filters']['status'] =array();
+
+ $array = array();
+ foreach($_SESSION['filters']['status'] as $key=>$row)
+ $array[] = $key;
+
+ if(in_array('publied', $array) && !in_array('nopublied', $array) )
+ self::$InitInfo['adjust']['sWhere'] .=" AND products_status >= 0";
+ elseif(!in_array('publied', $array) && in_array('nopublied', $array) )
+ self::$InitInfo['adjust']['sWhere'] .=" AND products_status < 0 ";
+
+
+ /**
@remarks Put detail for listing methode
*/
self::$InitInfo['adjust']['languages_id'] = $new_languages_id;
@@ -440,10 +481,10 @@
array(
'type'=>'subtype'
),
-// array(
-// 'title'=>__('@products filter tab clause'),
-// 'content'=>tep_get_include_contents(__CLASS__.'/filter.clause'),
-// ),
+ array(
+ 'title'=>__('@products filter tab clause'),
+ 'content'=>tep_get_include_contents(__CLASS__.'/filter.clause'),
+ ),
);
/**
@@ -549,6 +590,16 @@
$_SESSION['filters'][__CLASS__]['subtype'][$key] = 'on';
}
+ foreach($_POST['filters']['expected'] as $key=>$row){
+ if( $row =='on' )
+ $_SESSION['filters'][__CLASS__]['expected'][$key] = 'on';
+ }
+
+ foreach($_POST['filters']['status'] as $key=>$row){
+ if( $row =='on' )
+ $_SESSION['filters'][__CLASS__]['status'][$key] = 'on';
+ }
+
tep_redirect(tep_href_link(self::FILENAME));
break;
Modified: trunk/catalog/admin/includes/template/oscss/stylesheet-1.css
===================================================================
--- trunk/catalog/admin/includes/template/oscss/stylesheet-1.css 2012-05-03 09:49:37 UTC (rev 4372)
+++ trunk/catalog/admin/includes/template/oscss/stylesheet-1.css 2012-05-03 17:29:08 UTC (rev 4373)
@@ -64,8 +64,9 @@
.tleft{text-align:left}
.tright{text-align:right}
.tcenter{text-align:center}
-.inline { display:inline-block; }
-.inline * { display:inline-block; }
+.inline ,
+.inline *,
+#central .inline *{ display:inline-block; }
.nobr {white-space:nowrap;}
#central form {padding:0.5em 1em;}
.w_100 {width:99%;}
@@ -364,7 +365,7 @@
#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 thead tr th{background:#303030; color:white;font-weight: normal; text-shadow: none;}
#central table.main-orders tr th{background:#eee; height:20px;line-height: 20px; }
#central table.main-orders tr th a{margin:0;}
@@ -442,7 +443,7 @@
.dataTable th{ background-color: #303030; font-size:1em; font-weight:bold; text-align:center; color:white; text-shadow:none; }
.dataTableBase tr td,
.dataTableSearch tr td,
-.dataTable tr td{ line-height:12px; color: #000000;padding: 2px; font-size: 10px;cursor:default;text-shadow:0 1px 0 #fff;}
+.dataTable tr td{ line-height:12px; color: #000000;padding: 2px; font-size: 10px;cursor:default;}
.dataTableBase td.row_action,
.dataTableSearch td.row_action,
.dataTable td.row_action { width:150px; text-align:right;}
@@ -581,8 +582,8 @@
form#filters #filtre {padding:0;}
form#filters #filtre ul.ui-tabs-nav {width:99.6%}
form#filters #filtre ul.ui-tabs-nav li{line-height:1em;}
+form#filters fieldset label{width:auto;}
-
/* Ext */
#central .dataTables_wrapper {min-height:200px}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-05-03 09:49:43
|
Revision: 4372
http://oscss.svn.sourceforge.net/oscss/?rev=4372&view=rev
Author: oscim
Date: 2012-05-03 09:49:37 +0000 (Thu, 03 May 2012)
Log Message:
-----------
correction coquille ssl enable
Modified Paths:
--------------
trunk/catalog/install/includes/content/core.configuration.php
trunk/catalog/install/includes/content/core.installdb.php
Modified: trunk/catalog/install/includes/content/core.configuration.php
===================================================================
--- trunk/catalog/install/includes/content/core.configuration.php 2012-05-03 08:12:11 UTC (rev 4371)
+++ trunk/catalog/install/includes/content/core.configuration.php 2012-05-03 09:49:37 UTC (rev 4372)
@@ -80,7 +80,7 @@
public static function GetSort(){
- // sort in process
+ // sort in process
return 60;
}
@@ -107,7 +107,8 @@
if (substr($https_catalog, -1) != '/') $https_catalog .= '/';
}
- $enable_ssl = (isset($_POST['ENABLE_SSL']) && ($_POST['ENABLE_SSL'] == 'true') ? 'true' : 'false');
+ $enable_ssl = (isset($_POST['ENABLE_SSL']) && ($_POST['ENABLE_SSL'] == 'on') ? 'true' : 'false');
+
$http_cookie_domain = $_POST['HTTP_COOKIE_DOMAIN'];
$https_cookie_domain = (isset($_POST['HTTPS_COOKIE_DOMAIN']) ? $_POST['HTTPS_COOKIE_DOMAIN'] : '');
$http_cookie_path = $_POST['HTTP_COOKIE_PATH'];
@@ -124,7 +125,6 @@
$_POST['FS_ROOT_DOCS'] = $root_docs;
-// print_r('EEE');
$Key=sha1(mt_rand(10000,99999).time());
$this->get_db_conf();
@@ -138,7 +138,7 @@
$corresp['VAR_OSCSS_DEBUG'] = 'true';
$corresp['HTTP_SERVER'] = $http_server;
$corresp['HTTPS_SERVER'] = $https_server;
- $corresp['ENABLE_SSL'] = $enable_ssl;
+ $corresp['ENABLE_SSL'] = (bool)$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;
Modified: trunk/catalog/install/includes/content/core.installdb.php
===================================================================
--- trunk/catalog/install/includes/content/core.installdb.php 2012-05-03 08:12:11 UTC (rev 4371)
+++ trunk/catalog/install/includes/content/core.installdb.php 2012-05-03 09:49:37 UTC (rev 4372)
@@ -142,8 +142,13 @@
osc_db_query($sql="update ".$this->db['DB_TABLE_PREFIX']."configuration set configuration_value='".$this->www_location."images/noscreenshot.png' where configuration_key='IMAGE_NONEXISTENT'" );
$driver = ( (strtolower( $this->db['DBMOTOR']) == 'mysqli')? 'mysql' : strtolower( $this->db['DBMOTOR']) );
+
+
+/**
+ TODO Documents en dur !!!
+*/
// copy in document
- parent::recurse_copy($this->fs_document_root . 'install/includes/sql/'.$driver.'/', $this->fs_document_root. 'Documents/admin/origin/db/install/');
+ parent::recurse_copy($this->fs_document_root . 'install/includes/sql/'.$driver, $this->fs_document_root. 'Documents/admin/origin/db/install');
$this->PileMessage('succes', core::l10n("La configuration est terminée" ) ) ;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-05-03 08:12:17
|
Revision: 4371
http://oscss.svn.sourceforge.net/oscss/?rev=4371&view=rev
Author: oscim
Date: 2012-05-03 08:12:11 +0000 (Thu, 03 May 2012)
Log Message:
-----------
coquille gestion country/state if logged in admin by incarn
Modified Paths:
--------------
trunk/catalog/includes/classes/core_page/customer.php
Modified: trunk/catalog/includes/classes/core_page/customer.php
===================================================================
--- trunk/catalog/includes/classes/core_page/customer.php 2012-05-03 08:11:27 UTC (rev 4370)
+++ trunk/catalog/includes/classes/core_page/customer.php 2012-05-03 08:12:11 UTC (rev 4371)
@@ -945,8 +945,11 @@
$check_country = $check_country_query->fetchAssoc();
$_SESSION['customer_country_id']=$customer_country_id = $check_country['entry_country_id'];
- if (_cst_bool('ACCOUNT_STATE'))
+ $_SESSION['country_id']=$customer_country_id = $check_country['entry_country_id'];
+ if (_cst_bool('ACCOUNT_STATE')){
$_SESSION['customer_zone_id']=$customer_zone_id = $check_country['entry_zone_id'];
+ $_SESSION['zone_id']=$customer_zone_id = $check_country['entry_zone_id'];
+ }
$check_customer_group_tax = tep_db_query($sql="select * from " . TABLE_CUSTOMERS_GROUPS . " where customers_group_id = '" .(int)$sppc_customer_group_id . "'");
$customer_group_tax = tep_db_fetch_array($check_customer_group_tax);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|