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-01-18 17:13:40
|
Revision: 4019
http://oscss.svn.sourceforge.net/oscss/?rev=4019&view=rev
Author: oscim
Date: 2012-01-18 17:13:31 +0000 (Wed, 18 Jan 2012)
Log Message:
-----------
coquille lors de l'extraction des images de sample lors de l'installation
Modified Paths:
--------------
trunk/catalog/install/includes/content/core.configuration.php
trunk/catalog/install/includes/content/core.template_sample.php
Modified: trunk/catalog/install/includes/content/core.configuration.php
===================================================================
--- trunk/catalog/install/includes/content/core.configuration.php 2012-01-16 16:56:07 UTC (rev 4018)
+++ trunk/catalog/install/includes/content/core.configuration.php 2012-01-18 17:13:31 UTC (rev 4019)
@@ -1,9 +1,9 @@
<?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
@package oscss-2 <www http://www.oscss.org>
@version 2.1.1
- @date 31/10/11, 11:30
+ @date 18/01/12, 11:30
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
Ayatus <www http://www.ayatus.org>
@encode UTF-8
@@ -109,8 +109,11 @@
$root_docs = $this->fs_document_root . $http_work_directory;
if (isset($_POST['ARBORESANCE']) )
if($_POST['ARBORESANCE'] =='vhost')
- $root_docs = substr($this->fs_document_root,0, -(int)strlen('catalog/') ) . $http_work_directory;
+ $root_docs = substr($this->fs_document_root,0, -(int)strlen('catalog/') ) . $http_work_directory;
+ $_POST['FS_ROOT_DOCS'] = $root_docs;
+
+// print_r('EEE');
$Key=sha1(mt_rand(10000,99999).time());
$this->get_db_conf();
@@ -148,8 +151,7 @@
$corresp['DBMOTOR_PORT'] = $this->db['DBMOTOR_PORT'];
$corresp['DBMOTOR_TYPE'] = $this->db['DBMOTOR_TYPE'];
$corresp['SECURE_KEY'] = $Key;
-// print_r($corresp);
-// exit;
+
self::$corresp = $corresp;
function remove(&$item2){
@@ -427,6 +429,7 @@
$this->writeMessage();
echo '<form id="install" action="?etape='.$this->get_current_etape(1).'" method="post">'."\n";
$this->repet_post();
+ echo osc_draw_hidden_field('FS_ROOT_DOCS', '',$_POST['FS_ROOT_DOCS']);
echo '<h3>'.core::l10n("Obligatoire").'</h3>'."\n";
Modified: trunk/catalog/install/includes/content/core.template_sample.php
===================================================================
--- trunk/catalog/install/includes/content/core.template_sample.php 2012-01-16 16:56:07 UTC (rev 4018)
+++ trunk/catalog/install/includes/content/core.template_sample.php 2012-01-18 17:13:31 UTC (rev 4019)
@@ -1,9 +1,9 @@
<?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
@package oscss-2 <www http://www.oscss.org>
- @version 2.1.0
- @date 12/12/10, 09:15
+ @version 2.1.1
+ @date 18/01/12, 09:15
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@author Ayatus <www http://www.ayatus.org>
@encode UTF-8
@@ -35,7 +35,7 @@
include($this->fs_document_root.$this->ws_admin_rand.'/includes/database_tables.php');
// osc_db_connect($this->db['DB_SERVER'], $this->db['DB_SERVER_USERNAME'], $this->db['DB_SERVER_PASSWORD']);
-osc_db_connect($this->db['DBMOTOR'], $this->db['DBMOTOR_PORT'],$this->db['DBMOTOR_CHARSET'],$this->db['DB_SERVER'], $this->db['DB_SERVER_USERNAME'], $this->db['DB_SERVER_PASSWORD'],strtolower( $this->db['DBMOTOR_TYPE']) );
+ osc_db_connect($this->db['DBMOTOR'], $this->db['DBMOTOR_PORT'],$this->db['DBMOTOR_CHARSET'],$this->db['DB_SERVER'], $this->db['DB_SERVER_USERNAME'], $this->db['DB_SERVER_PASSWORD'],strtolower( $this->db['DBMOTOR_TYPE']) );
osc_db_select_db($this->db['DB_DATABASE']);
$db_error = false;
@@ -60,7 +60,9 @@
$sql_file_lg = $this->fs_document_root . 'install/'.I_WS_DATA.'sample/'.$get[0].'/language/'.DC_LOADER_LANG.'/oscss_sample_data.txt';
osc_db_install($this->db['DB_DATABASE'], $sql_file, $this->db['DB_TABLE_PREFIX'],$sql_file_lg);
// add img sample
- tep_zip_extractto( $this->fs_document_root . 'install/'.I_WS_DATA.'sample/'.$get[0].'/sample_images.zip', '../images/');
+
+
+ tep_zip_extractto( $this->fs_document_root . 'install/'.I_WS_DATA.'sample/'.$get[0].'/sample_images.zip', $_POST['FS_ROOT_DOCS'].'images/');
}
// add configuration shop tempale
@@ -74,14 +76,14 @@
include($this->fs_document_root.$this->ws_admin_rand.'/includes/modules/configuration/modlangue.php');
if(isset($_POST['lang']) && is_array($_POST['lang']))
foreach($_POST['lang'] as $key=>$cfg){
- core::recurse_copy( $this->fs_document_root . 'install/'.I_WS_DATA.'language/'.$key.'/public/', $this->fs_document_root .'includes/languages/');
- if(isset($_POST['lang_admin'][$key]) && $_POST['lang_admin'][$key]=='on')
- core::recurse_copy( $this->fs_document_root . 'install/'.I_WS_DATA.'language/'.$key.'/admin/', $this->fs_document_root.$this->ws_admin_rand .'/includes/languages/');
- //db
- osc_db_query($sql="insert into ".$this->db['DB_TABLE_PREFIX']."languages (name,code,image,directory,sort_order) VALUES ('".core::l10n($key)."','".$key."','icon.gif','".$key."','2') " );
- $insert_id=tep_db_insert_id();
+ core::recurse_copy( $this->fs_document_root . 'install/'.I_WS_DATA.'language/'.$key.'/public/', $this->fs_document_root .'includes/languages/');
+ if(isset($_POST['lang_admin'][$key]) && $_POST['lang_admin'][$key]=='on')
+ core::recurse_copy( $this->fs_document_root . 'install/'.I_WS_DATA.'language/'.$key.'/admin/', $this->fs_document_root.$this->ws_admin_rand .'/includes/languages/');
+ //db
+ osc_db_query($sql="insert into ".$this->db['DB_TABLE_PREFIX']."languages (name,code,image,directory,sort_order) VALUES ('".core::l10n($key)."','".$key."','icon.gif','".$key."','2') " );
+ $insert_id=tep_db_insert_id();
- modlangue::repliqu_db_lang('1',$insert_id);
+ modlangue::repliqu_db_lang('1',$insert_id);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-01-16 16:56:17
|
Revision: 4018
http://oscss.svn.sourceforge.net/oscss/?rev=4018&view=rev
Author: oscim
Date: 2012-01-16 16:56:07 +0000 (Mon, 16 Jan 2012)
Log Message:
-----------
correction
Modified Paths:
--------------
trunk/catalog/admin/document.php
trunk/catalog/admin/includes/exts/package/CIP.php
trunk/catalog/admin/includes/gabarit/geo_zones/display_view.new.gab
trunk/catalog/admin/includes/gabarit/package/display_view.source.edit.gab
trunk/catalog/common/classes/seo_url.php
trunk/catalog/includes/filenames.php
Modified: trunk/catalog/admin/document.php
===================================================================
--- trunk/catalog/admin/document.php 2012-01-14 18:32:31 UTC (rev 4017)
+++ trunk/catalog/admin/document.php 2012-01-16 16:56:07 UTC (rev 4018)
@@ -49,7 +49,7 @@
$get=image_ratio::get_image(DIR_WS_CATALOG_IMAGES.$img,'',$width,$height);
- $img=preg_replace('#^('.DIR_WS_CATALOG_IMAGES.')#' , '', $get['src']);
+ $img=preg_replace('#^('.DIR_WS_IMAGES.')#' , '', $get['src']);
$ext = str_replace('.','',substr($img,-4));
if($ext='jpg')$ext='jpeg';
Modified: trunk/catalog/admin/includes/exts/package/CIP.php
===================================================================
--- trunk/catalog/admin/includes/exts/package/CIP.php 2012-01-14 18:32:31 UTC (rev 4017)
+++ trunk/catalog/admin/includes/exts/package/CIP.php 2012-01-16 16:56:07 UTC (rev 4018)
@@ -25,9 +25,6 @@
*/
-include_once(dirname(__FILE__).'/sqlcip.php');
-include_once(dirname(__FILE__).'/sqlcip_modfiles.php');
-
include_once(dirname(__FILE__).'/cip_modfiles.php');
class CIP {
Modified: trunk/catalog/admin/includes/gabarit/geo_zones/display_view.new.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/geo_zones/display_view.new.gab 2012-01-14 18:32:31 UTC (rev 4017)
+++ trunk/catalog/admin/includes/gabarit/geo_zones/display_view.new.gab 2012-01-16 16:56:07 UTC (rev 4018)
@@ -1,73 +1,35 @@
<?php
/**
- @licence GPL 2005-2011 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
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 28/12/11, 16:51
+ @date 10/01/12, 16:35
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
?>
-<h3><?php echo __('text info heading edit zone'); ?></h3>
+<h3><?php echo __('heading title'); ?></h3>
+ <div class="button_nav">
+ <?php if (!geo_zones::$action) echo '<a class="button" href="' . tep_href_link(FILENAME_GEO_ZONES, tep_get_all_get_params(array('action','sID')). '&action=new_zone') . '">' .tep_image(DIR_WS_ICONS . 'icon_add_new.png', IMAGE_ICON_INFO).' '. __('image insert new zone') . '</a>'; ?>
+ </div>
- <p><?php echo __('text info edit zone intro'); ?></p>
-
-
- <?php echo tep_draw_form('zones', geo_zones::FILENAME, 'zID=' . geo_zones::$zInfo->geo_zone_id . '&action=insert_zone') ?>
- <div class="box_form">
- <!--
- <div class="button_nav">
- <?php //if (!geo_zones::$action) echo '<a class="button" href="' . tep_href_link(FILENAME_GEO_ZONES, tep_get_all_get_params(array('action','sID')). '&action=new_zone') . '">' .tep_image(DIR_WS_ICONS . 'icon_add_new.png', IMAGE_ICON_INFO).' '. __('image insert new zone') . '</a>'; ?>
- </div>-->
-
- <fieldset class="block_input">
-
- <!-- <div class="box_left"> -->
-
- <p class="block_input">
- <label for="geo_zone_name" ><?php echo __('text info zone name'); ?></label>
- <?php echo tep_draw_input_field('geo_zone_name','','') ?>
- </p>
-
- <p class="block_input">
- <label for="geo_zone_description" ><?php echo __('text info zone description') ; ?></label>
- <?php echo tep_draw_input_field('geo_zone_description','', '') ?>
- </p>
-
- <p class="block_input">
- <label for="geo_zone_name" ><?php echo __('text info zone name'); ?></label>
- <?php echo tep_draw_pull_down_menu('geo_zone_type',geo_zones::$geoTypes,'') ?>
- </p>
-
- <p class="block_input">
- <label for="geo_zone_name" ><?php echo __('text info zone grp'); ?></label>
- <span class="nobr">
- <?php echo tep_draw_pull_down_menu('geo_zone_grp',geo_zones::$geoGrpDispo,'') ?>
- <?php echo tep_draw_input_field('geo_zone_grp_add','','') ?>
- </span>
- </p>
- </fieldset>
-
- <fieldset class="block_input">
- <h4><?php echo __('geo_zone text info zone pre-programmed'); ?></h4>
-
- <p class="block_input">
- <label for="geo_zone_name" ><?php echo __('text info zone name'); ?></label>
- <?php echo tep_draw_pull_down_menu('geo_zone_model',geo_zones::$zInfo->modeleszones,'') ?>
- </p>
- </fieldset>
-
- <fieldset class="block_input">
- <div class="block_input button_nav" style="width:95%;">
- <?php
- echo tep_image_submit('', IMAGE_INSERT);
- echo tep_js_back(tep_href_link(geo_zones::FILENAME, '&zID=' . geo_zones::$zInfo->geo_zone_id ), IMAGE_CANCEL) ;
- ?>
- </div>
- </fieldset>
- </div>
- </form>
-
+ <div class="box_uniq">
+<!-- <div class="box_left"> -->
+ <table class="dataTable">
+ <thead>
+ <tr>
+ <th style="width:20px;"><?php echo __('table heading tax zones type'); ?></th>
+ <th style="width:20px;"><?php echo __('table heading tax zones grp'); ?></th>
+ <th><?php echo __('table heading tax zones'); ?></th>
+ <th><?php echo __('table heading tax zones desc'); ?></th>
+ <th><?php echo __('table heading nbr sub'); ?></th>
+ <th class="tright"><?php echo __('table heading action'); ?></th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- AJAX BLOCK -->
+ </tbody>
+ </table>
+</div>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/gabarit/package/display_view.source.edit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/package/display_view.source.edit.gab 2012-01-14 18:32:31 UTC (rev 4017)
+++ trunk/catalog/admin/includes/gabarit/package/display_view.source.edit.gab 2012-01-16 16:56:07 UTC (rev 4018)
@@ -1,33 +1,73 @@
<?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
@package osCSS-2 <www http://www.oscss.org>
- @version 2.0.9
- @date 22/06/10, 18:12
+ @version 2.1.1
+ @date 10/01/12, 18:12
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
+// print_r(package::$list->service);
+$r =package::$list->service;
?>
-<h3><?php echo __('title heading configuration source repository') ?></h3>
-<table class="dataTable">
- <thead>
- <tr>
- <th><?php echo __('heading key') ?></th>
- <th><?php echo __('heading title') ?></th>
- <th><?php echo __('heading last update') ?></th>
- <th><?php echo __('heading action') ?></th>
- </tr>
- </thead>
- <tfoot>
- <tr>
- <td><?php echo __('heading key') ?></td>
- <td><?php echo __('heading title') ?></td>
- <td><?php echo __('heading last update') ?></td>
- <td><?php echo __('heading action') ?></td>
- </tr>
- </tfoot>
- <tbody>
- <!-- AJAX BLOCK -->
- </tbody>
-</table>
+<h3><?php echo __('title heading configuration source repository edit') ?></h3>
+
+ <?php echo tep_draw_form('new_product', package::FILENAME, 'type_data=source&action=source_update', 'post'); ?>
+
+ <div class="box_uniq block_form">
+ <?php echo tep_draw_hidden_field('key', '', (string)package::$list->key, ' ') ?>
+
+ <p class="block_input">
+ <label class="inline" for="package_date_available"><?php echo __('package src url'); ?></label>
+ <?php echo tep_draw_input_field('repository', '', (string)package::$list->repository, ' style="width:500px" ') //. '<a class="ajaxinline" href="'.tep_href_link( package::FILENAME , 'type_data=source&key='. (string)package::$list->key.'&action=source_test').'">Test</a>'; ?>
+
+ </p>
+
+ <fieldset class="block_field">
+ <legend><?php echo __('package source legend ident') ?></legend>
+ <p class="block_input">
+ <label class="inline" for="package_date_available"><?php echo __('package text package user id'); ?></label>
+ <?php echo tep_draw_input_field('user', 'useradd', (string)package::$list->ident->user, ' ') ?>
+ </p>
+ <p class="block_input">
+ <label class="inline" for="package_date_available"><?php echo __('package text package token'); ?></label>
+ <?php echo tep_draw_input_field('token', '', (string)package::$list->ident->token, 'style="width:500px" ') ?>
+ </p>
+ </fieldset>
+
+
+
+
+
+
+ <fieldset class="block_field">
+<legend><?php echo __('package source legend service declared') ?></legend>
+ <ul class="block_input">
+ <?php foreach($r->children() as $k=>$row): ?>
+<li>
+ <?php echo $k ?> <?php echo $row?>
+</li>
+ <?php endforeach; ?>
+</ul>
+ </fieldset>
+
+
+
+<!-- <fieldset class="block_field"> -->
+ <div class="block_input button_nav" >
+ <?php
+ echo tep_image_submit('', IMAGE_UPDATE);
+ echo tep_js_back(tep_href_link(package::FILENAME, 'type_data=source'), IMAGE_CANCEL) ;
+ ?>
+ </div>
+<!-- </fieldset> -->
+
+
+
+ </div>
+ </form>
+
+
+
+
Modified: trunk/catalog/common/classes/seo_url.php
===================================================================
--- trunk/catalog/common/classes/seo_url.php 2012-01-14 18:32:31 UTC (rev 4017)
+++ trunk/catalog/common/classes/seo_url.php 2012-01-16 16:56:07 UTC (rev 4018)
@@ -547,7 +547,7 @@
}
- $url = isset($url) ? $url : $page;
+ $url = (isset($url) && !empty($url) ? $url : $page);
if ( sizeof($container) > 0 ){
if ( $imploded_params = $this->implode_assoc($container) ){
@@ -555,7 +555,7 @@
$separator = '&';
}
}
-// var_dump($url);s
+
return $url;
}
Modified: trunk/catalog/includes/filenames.php
===================================================================
--- trunk/catalog/includes/filenames.php 2012-01-14 18:32:31 UTC (rev 4017)
+++ trunk/catalog/includes/filenames.php 2012-01-16 16:56:07 UTC (rev 4018)
@@ -106,7 +106,7 @@
FILENAME_POPUP_IMAGE,
// FILENAME_PRODUCT_INFO,
// FILENAME_CONTENT,
- FILENAME_ADVANCED_SEARCH,
+// FILENAME_ADVANCED_SEARCH,
FILENAME_PRODUCTS_NEW,
FILENAME_SMALL_PRICE,
FILENAME_SPECIALS,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-01-14 18:32:37
|
Revision: 4017
http://oscss.svn.sourceforge.net/oscss/?rev=4017&view=rev
Author: oscim
Date: 2012-01-14 18:32:31 +0000 (Sat, 14 Jan 2012)
Log Message:
-----------
erreur si recherche deja utilis?\195?\169 dans le listing principal
Modified Paths:
--------------
trunk/catalog/admin/includes/header.php
Modified: trunk/catalog/admin/includes/header.php
===================================================================
--- trunk/catalog/admin/includes/header.php 2012-01-11 10:29:49 UTC (rev 4016)
+++ trunk/catalog/admin/includes/header.php 2012-01-14 18:32:31 UTC (rev 4017)
@@ -261,7 +261,7 @@
<?php else: ?>
$('.dataTable').dataTable( {
"sDom": '<"top"flp<"toolbar"><"clear">>rt',
- "bStateSave": true,
+// "bStateSave": true,
"bPaginate": false,
"bLengthChange": false,
"bFilter": true,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-01-11 10:30:00
|
Revision: 4016
http://oscss.svn.sourceforge.net/oscss/?rev=4016&view=rev
Author: oscim
Date: 2012-01-11 10:29:49 +0000 (Wed, 11 Jan 2012)
Log Message:
-----------
notice php adjust
Modified Paths:
--------------
trunk/catalog/includes/functions/template.php
Modified: trunk/catalog/includes/functions/template.php
===================================================================
--- trunk/catalog/includes/functions/template.php 2012-01-11 10:28:36 UTC (rev 4015)
+++ trunk/catalog/includes/functions/template.php 2012-01-11 10:29:49 UTC (rev 4016)
@@ -135,7 +135,7 @@
$result = TempModRes('type='.$type.'&key='.$key);
- if($result ==-1)
+ if(is_int($result) && $result ==-1)
return templ_draw_list($arg);
else
return $result;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-01-11 10:28:46
|
Revision: 4015
http://oscss.svn.sourceforge.net/oscss/?rev=4015&view=rev
Author: oscim
Date: 2012-01-11 10:28:36 +0000 (Wed, 11 Jan 2012)
Log Message:
-----------
correction coquille
correction erreur logique dans le process de boucle des boxes et modules utilis?\195?\169 dans le template
Modified Paths:
--------------
trunk/catalog/download.php
trunk/catalog/includes/functions/template.php
trunk/catalog/includes/languages/fr_FR/fr_FR.php
Modified: trunk/catalog/download.php
===================================================================
--- trunk/catalog/download.php 2012-01-10 14:05:54 UTC (rev 4014)
+++ trunk/catalog/download.php 2012-01-11 10:28:36 UTC (rev 4015)
@@ -1,30 +1,36 @@
<?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 31/10/10, 22:59
+ *\version 2.1.2
+ *\date 10/01/12, 22:59
*\author oscim <mail aur...@os...> <www http://www.oscim.fr>
*\encode UTF-8
*\file
- *\dir catalog/
+ *\dir catalog/
*\brief page process download products; No display
*/
include('includes/application_top.php');
$page->init(basename(__FILE__),$language);
- if (!tep_session_is_registered('customer_id')) die;
+ if (!tep_session_is_registered('customer_id'))
+ tep_redirect(FILENAME_DEFAULT);
// Check download.php was called with proper GET parameters
if ((isset($_GET['order']) && !is_numeric($_GET['order'])) || (isset($_GET['id']) && !is_numeric($_GET['id'])) ) {
- die;
+ tep_redirect(FILENAME_DEFAULT);
}
-
+
// Check that order_id, customer_id and filename match
$downloads_query = tep_db_query("select date_format(o.date_purchased, '%Y-%m-%d') as date_purchased_day, opd.download_maxdays, opd.download_count, opd.download_maxdays, opd.orders_products_filename from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_PRODUCTS . " op, " . TABLE_ORDERS_PRODUCTS_DOWNLOAD . " opd where o.customers_id = '" . $customer_id . "' and o.orders_id = '" . (int)$_GET['order'] . "' and o.orders_id = op.orders_id and op.orders_products_id = opd.orders_products_id and opd.orders_products_download_id = '" . (int)$_GET['id'] . "' and opd.orders_products_filename != ''");
- if (!tep_db_num_rows($downloads_query)) die;
+
+
+ if (!tep_db_num_rows($downloads_query))
+ tep_redirect(FILENAME_DEFAULT);
+
+
$downloads = tep_db_fetch_array($downloads_query);
// MySQL 3.22 does not have INTERVAL
list($dt_year, $dt_month, $dt_day) = explode('-', $downloads['date_purchased_day']);
@@ -36,7 +42,7 @@
if ($downloads['download_count'] <= 0) die;
// Die if file is not there
if (!file_exists(DIR_FS_DOWNLOAD . $downloads['orders_products_filename'])) die;
-
+
// Now decrement counter
tep_db_query("update " . TABLE_ORDERS_PRODUCTS_DOWNLOAD . " set download_count = download_count-1 where orders_products_download_id = '" . (int)$_GET['id'] . "'");
@@ -71,7 +77,7 @@
if ($file == '.' || $file == '..') continue;
@unlink($dir . $subdir . '/' . $file);
}
- closedir($h2);
+ closedir($h2);
@rmdir($dir . $subdir);
}
closedir($h1);
Modified: trunk/catalog/includes/functions/template.php
===================================================================
--- trunk/catalog/includes/functions/template.php 2012-01-10 14:05:54 UTC (rev 4014)
+++ trunk/catalog/includes/functions/template.php 2012-01-11 10:28:36 UTC (rev 4015)
@@ -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 14/09/11, 20:33
+ @version 2.1.2
+ @date 10/01/12, 20:33
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@@ -133,13 +133,19 @@
$page->pos_init($type,$pile,$page->$methode->_call('',$pile));
$key=$page->pos_next($type,$pile);
- return TempModRes('type='.$type.'&key='.$key);
+ $result = TempModRes('type='.$type.'&key='.$key);
+
+ if($result ==-1)
+ return templ_draw_list($arg);
+ else
+ return $result;
}
/**
* \fn TempModRes($arg=array())
* \brief return object current in pile
* @param $arg array key=>value
+ @return false if no key, -1 si empty result or object if ok
*/
function TempModRes($arg=array()){
global $page;
@@ -148,11 +154,14 @@
$sortie=array();
$type=(isset($cf['type'])? $cf['type'] : 'modules'); /* modules, boxes */
$methode='oscss_'.$type;
- if(!isset($cf['key'])) return false;
+ if(!isset($cf['key']) || empty($cf['key']) )
+ return false;
$key=$cf['key'] ;
+
$mo =$page->$methode->_return($key);
+
if(is_array($mo) && !isset($mo['result_sql'])) $page->$methode->_call($key);
elseif(is_object($mo) && !isset($mo->result_sql)) $page->$methode->_call($key);
@@ -168,9 +177,9 @@
}elseif(is_object($mo)) {
return $mo;
}
- else return false;
+ else return -1;
}
- else return false;
+ else return -1;
}
/**
Modified: trunk/catalog/includes/languages/fr_FR/fr_FR.php
===================================================================
--- trunk/catalog/includes/languages/fr_FR/fr_FR.php 2012-01-10 14:05:54 UTC (rev 4014)
+++ trunk/catalog/includes/languages/fr_FR/fr_FR.php 2012-01-11 10:28:36 UTC (rev 4015)
@@ -252,7 +252,6 @@
define('PASSWORD_HIDDEN',"--CACHE--" );
define('FORM_REQUIRED_INFORMATION',"* Information requise" );
-define('TEXT_FIELD_REQUIRED',"ORM_REQUIRED_INFORMATIO" );
// constants for use in tep_prev_next_display function
define('TEXT_RESULT_PAGE',"Pages de résultat :" );
@@ -391,6 +390,9 @@
/// titre option dispo
define('TEXT_PRODUCT_OPTIONS',"Options disponibles" );
+// no touch
+define('TEXT_FIELD_REQUIRED', FORM_REQUIRED_INFORMATION );
+
/*
The following copyright announcement can only be
appropriately modified or removed if the layout of
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-01-10 14:06:05
|
Revision: 4014
http://oscss.svn.sourceforge.net/oscss/?rev=4014&view=rev
Author: oscim
Date: 2012-01-10 14:05:54 +0000 (Tue, 10 Jan 2012)
Log Message:
-----------
coquille ordancement du chargement des elements de langue du template
Modified Paths:
--------------
trunk/catalog/includes/classes/page.php
Modified: trunk/catalog/includes/classes/page.php
===================================================================
--- trunk/catalog/includes/classes/page.php 2012-01-09 16:26:38 UTC (rev 4013)
+++ trunk/catalog/includes/classes/page.php 2012-01-10 14:05:54 UTC (rev 4014)
@@ -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.1
- @date 18/12/11, 21:44
+ @date 09/01/12, 21:44
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
\class page
@@ -325,6 +325,13 @@
$load = self::$load_theme ;
+ /**
+ \brief Langue specifique au template
+ \note specifique text __()
+ */
+ if(($path=self::fix_file(DIR_WS_LANGUAGES . $language.'.php' ,true)) !=false) $this->pile_file_lang($path);
+ elseif(($path=self::fix_file(DIR_WS_LANGUAGES . 'fr_FR.php' ,true)) !=false) $this->pile_file_lang($path);
+
$init_theme=call_user_func(array(PUBLIC_DRIVERS_PAGE,'GetInit'));
if(self::TestFile($init_theme)) include($init_theme);
@@ -940,13 +947,6 @@
/**
- \brief Langue specifique au template
- \note specifique text __()
- */
- if(($path=self::fix_file(DIR_WS_LANGUAGES . $language.'.php' ,true)) !=false) $this->pile_file_lang($path);
- elseif(($path=self::fix_file(DIR_WS_LANGUAGES . 'fr_FR.php' ,true)) !=false) $this->pile_file_lang($path);
-
- /**
@brief Chargement des module actifs
*/
$this->oscss_plugins->active_plugins();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-01-09 16:26:49
|
Revision: 4013
http://oscss.svn.sourceforge.net/oscss/?rev=4013&view=rev
Author: oscim
Date: 2012-01-09 16:26:38 +0000 (Mon, 09 Jan 2012)
Log Message:
-----------
coquille
Modified Paths:
--------------
trunk/catalog/admin/includes/gabarit/cms_content/display_view.edit.gab
trunk/catalog/admin/includes/gabarit/header_tags.form.gab
trunk/catalog/common/classes/image_ratio.php
trunk/catalog/includes/application_top.php
trunk/catalog/includes/classes/split_page_results.php
trunk/catalog/includes/modules/products/desc_base.php
Modified: trunk/catalog/admin/includes/gabarit/cms_content/display_view.edit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/cms_content/display_view.edit.gab 2012-01-07 08:27:36 UTC (rev 4012)
+++ trunk/catalog/admin/includes/gabarit/cms_content/display_view.edit.gab 2012-01-09 16:26:38 UTC (rev 4013)
@@ -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 07/02/11, 19:18
+ @version 2.1.1
+ @date 09/01/12, 19:18
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -33,7 +33,7 @@
<div class="tabs_lang">
<ul>
<?php for ($i=0, $n=sizeof(cms_content::$languages); $i<$n; $i++) { ?>
- <li><a href="#fieldset_<?php echo $i ?>"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . cms_content::$languages[$i]['directory'] . '/images/' . cms_content::$languages[$i]['image'], cms_content::$languages[$i]['name']); ?></a></li>
+ <li><a href="#fieldset_<?php echo $i ?>"><?php echo tep_language_image(cms_content::$languages[$i]['directory'] . '/images/' . cms_content::$languages[$i]['image'], cms_content::$languages[$i]['name']); ?></a></li>
<?php } ?>
</ul>
Modified: trunk/catalog/admin/includes/gabarit/header_tags.form.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/header_tags.form.gab 2012-01-07 08:27:36 UTC (rev 4012)
+++ trunk/catalog/admin/includes/gabarit/header_tags.form.gab 2012-01-09 16:26:38 UTC (rev 4013)
@@ -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 29/08/10, 14:32
+ @version 2.1.1
+ @date 09/01/12, 19:18
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -13,7 +13,7 @@
<ul>
<?php for ($i=0, $n=sizeof(header_tags::$languages); $i<$n; $i++): ?>
<li>
- <a href="#content_head-<?php echo ($i+1) ?>" ><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . header_tags::$languages[$i]['directory'] . '/images/' . header_tags::$languages[$i]['image'], header_tags::$languages[$i]['name']) . ' ' . header_tags::$languages[$i]['name'] ?></a>
+ <a href="#content_head-<?php echo ($i+1) ?>" ><?php echo tep_language_image(header_tags::$languages[$i]['directory'] . '/images/' . header_tags::$languages[$i]['image'], header_tags::$languages[$i]['name']) . ' ' . header_tags::$languages[$i]['name'] ?></a>
</li>
<?php endfor; ?>
</ul>
@@ -22,7 +22,7 @@
<div id="content_head-<?php echo ($i+1) ?>">
<fieldset>
<legend>
- <?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . header_tags::$languages[$i]['directory'] . '/images/' . header_tags::$languages[$i]['image'], header_tags::$languages[$i]['name']) . ' ' . header_tags::$languages[$i]['name'] ?>
+ <?php echo tep_language_image( header_tags::$languages[$i]['directory'] . '/images/' . header_tags::$languages[$i]['image'], header_tags::$languages[$i]['name']) . ' ' . header_tags::$languages[$i]['name'] ?>
</legend>
<label for="<?php echo 'header_tags' ?>_content_head_title_tag_<?php echo header_tags::$languages[$i]['id'] ?>"><?php echo __('text htc page title').tep_image(DIR_WS_ICONS .'icon_help.gif', __('text products page title help')) ?></label>
Modified: trunk/catalog/common/classes/image_ratio.php
===================================================================
--- trunk/catalog/common/classes/image_ratio.php 2012-01-07 08:27:36 UTC (rev 4012)
+++ trunk/catalog/common/classes/image_ratio.php 2012-01-09 16:26:38 UTC (rev 4013)
@@ -353,9 +353,11 @@
if (self::$env->inadmin){
self::$CacheImage[self::$key]['conf']['mode']='BO';
if(strpos($src, DIR_WS_ADMIN)===false && strpos($src, DIR_WS_CATALOG)===false && file_exists(DIR_FS_ADMIN.$src)) $src_dir = $src;
- elseif (strpos($src, DIR_WS_ADMIN) >0 || ( strpos($src, DIR_WS_IMAGES) ==0 && file_exists(DIR_FS_ADMIN.$src) ) ) $src_dir = DIR_FS_ADMIN . $src;
+ elseif (strpos('_'.$src, DIR_WS_ADMIN) >0 || ( strpos('_'.$src, DIR_WS_IMAGES) >0 && file_exists(DIR_FS_ADMIN.$src) ) ) $src_dir = DIR_FS_ADMIN . $src;
elseif(strpos($src, DIR_WS_CATALOG)===false ) $src_dir = DIR_FS_ROOT_DOCS . $src;
else $src_dir = DIR_FS_ROOT_DOCS . substr ($src, (strrpos (DIR_WS_CATALOG , '/'))+1);
+
+// var_dump($src_dir);
}
else {
self::$CacheImage[self::$key]['conf']['mode']='FO';
@@ -504,9 +506,10 @@
@param string pathname
*/
private static function CleanPathReturn($img){
-
- $ws_=(strpos($img, DIR_WS_CATALOG)===false)?false:true;
- $ws_admin=(self::$env->inadmin && strpos($img, DIR_WS_ADMIN)===false )?false:true;
+// echo $img.'<br>';
+// var_dump(strpos('_'.$img, DIR_WS_ADMIN));
+ $ws_=(strpos('_'.$img, DIR_WS_CATALOG) >0)?false:true;
+ $ws_admin=(self::$env->inadmin && strpos('_'.$img, DIR_WS_ADMIN) >0 )?false:true;
$ws_lg=(strpos($img, DIR_WS_LANGUAGES)===false)?false:true;
$ws_img=(strpos($img, DIR_WS_IMAGES)===false)?false:true;
@@ -516,7 +519,9 @@
$image.=DIR_WS_CATALOG;
$mask .='(.*'.DIR_WS_CATALOG.'){0,1}';
}
- if(self::$env->inadmin && $ws_admin) $image.=DIR_WS_ADMIN;
+// if(self::$env->inadmin && $ws_admin)
+// $image.=DIR_WS_ADMIN;
+
if($ws_lg){
$image.=DIR_WS_LANGUAGES;
$mask .='(.*'.DIR_WS_LANGUAGES.'){0,1}';
@@ -527,7 +532,7 @@
}
$image.=preg_replace('#'.$mask.'#i','',$img);
-
+// echo $image.'<br>';
return $image;
}
Modified: trunk/catalog/includes/application_top.php
===================================================================
--- trunk/catalog/includes/application_top.php 2012-01-07 08:27:36 UTC (rev 4012)
+++ trunk/catalog/includes/application_top.php 2012-01-09 16:26:38 UTC (rev 4013)
@@ -238,7 +238,7 @@
if(isset($_GET['admin']) )header("Location: /");
}
}
- elseif( isset($_GET['admin']) && $_GET['admin'] !=md5($SecuKey)) {
+ elseif( isset($_GET['admin']) && $_GET['admin'] ==md5($SecuKey)) {
tep_session_register('aauth');
$aauth = 'yes';
// force redirect by not GET
Modified: trunk/catalog/includes/classes/split_page_results.php
===================================================================
--- trunk/catalog/includes/classes/split_page_results.php 2012-01-07 08:27:36 UTC (rev 4012)
+++ trunk/catalog/includes/classes/split_page_results.php 2012-01-09 16:26:38 UTC (rev 4013)
@@ -1,9 +1,10 @@
<?php if (!defined('HTTP_SERVER')) die('You can not access this file directly!');
/**
- @licence GPL 2005-2009 The osCSS developers - osCSS Open Source E-commerce
- @package oscss-2 <www http://www.oscss.org>
- @version Rc-3
- @date 25/04/10, 12:29
+ \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 06/01/12, 11:16
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@@ -11,12 +12,12 @@
*/
class splitPageResults {
- var $sql_query;
- var $number_of_rows;
- var $current_page_number;
- var $number_of_pages;
- var $number_of_rows_per_page;
- var $page_name;
+ public $sql_query;
+ public $number_of_rows;
+ public $current_page_number;
+ public $number_of_pages;
+ public $number_of_rows_per_page;
+ public $page_name;
/* class constructor */
function splitPageResults($query, $max_rows, $count_key = '*', $page_holder = 'page') {
@@ -54,12 +55,18 @@
$count_string = ' '.tep_db_input($count_key).'';
- if (strpos($this->SQL_QUERY, 'DISTINCT') || strpos($this->SQL_QUERY, 'GROUP BY')) $sql="SELECT DISTINCT COUNT(" . $count_string . ") AS total " . substr($this->sql_query, $pos_from, ($pos_to - $pos_from));
- else $sql="SELECT COUNT(" . $count_string . ") AS total " . substr($this->sql_query, $pos_from, ($pos_to - $pos_from));
+// if (strpos($this->SQL_QUERY, 'DISTINCT') || strpos($this->SQL_QUERY, 'GROUP BY')) $sql="SELECT DISTINCT COUNT(" . $count_string . ") AS total " . substr($this->sql_query, $pos_from, ($pos_to - $pos_from));
+// else $sql="SELECT COUNT(" . $count_string . ") AS total " . substr($this->sql_query, $pos_from, ($pos_to - $pos_from));
+ if (strpos($this->SQL_QUERY, 'DISTINCT') || strpos($this->SQL_QUERY, 'GROUP BY')) $sql="SELECT DISTINCT " . $count_string . " " . substr($this->sql_query, $pos_from, ($pos_to - $pos_from));
+ else $sql="SELECT " . $count_string . " " . substr($this->sql_query, $pos_from, ($pos_to - $pos_from));
+
+
$count_query = tep_db_query($sql);
+// $res_count = $count_query->fetchAssoc();
- $this->number_of_rows = tep_db_num_rows($count_query);
+// $this->number_of_rows = $res_count['total'];
+ $this->number_of_rows =$count_query->__get('numRows'); //tep_db_num_rows($count_query);
$this->number_of_pages = ceil($this->number_of_rows / $this->number_of_rows_per_page);
Modified: trunk/catalog/includes/modules/products/desc_base.php
===================================================================
--- trunk/catalog/includes/modules/products/desc_base.php 2012-01-07 08:27:36 UTC (rev 4012)
+++ trunk/catalog/includes/modules/products/desc_base.php 2012-01-09 16:26:38 UTC (rev 4013)
@@ -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 24/08/10, 11:16
+ \version 2.1.1
+ \date 06/01/12, 11:16
\author oscim <mail aur...@os...> <www http://www.oscim.fr>
\encode UTF-8
\class desc_base
@@ -15,11 +15,14 @@
implements InterfaceModule {
/**
- Var access in .gab
+ @var access in .gab
*/
public static $products_description;
/**
- *
+ @var access in .gab
+ */
+ public static $products_chapo;
+ /**
* @var string
*/
public static $products_url;
@@ -52,9 +55,9 @@
$c=explode('<img',$this->content['products_description']);
foreach($c as $l){
if( (preg_match_all('/src=.([a-zA-Z0-9.:\/_-]*)/i', strip_tags($l) , $match)) !=false){
- $lg=strlen(HTTP_SERVER.DIR_WS_CATALOG.DIR_WS_IMAGES);
- $img=substr($match[1][0], ( (substr($match[1][0],0, $lg)==HTTP_SERVER.DIR_WS_CATALOG.DIR_WS_IMAGES) ? $lg :strlen(DIR_WS_IMAGES) ) );
- if(!in_array( $img,$page->product->pile_img)) $page->product->pile_img[]=$img;
+ $lg=strlen(HTTP_SERVER.DIR_WS_CATALOG.DIR_WS_IMAGES);
+ $img=substr($match[1][0], ( (substr($match[1][0],0, $lg)==HTTP_SERVER.DIR_WS_CATALOG.DIR_WS_IMAGES) ? $lg :strlen(DIR_WS_IMAGES) ) );
+ if(!in_array( $img,$page->product->pile_img)) $page->product->pile_img[]=$img;
}
}
}
@@ -66,21 +69,23 @@
*/
public function load_db_values($pID){
$DB=Database::getInstance();
- $product_query = $DB->query("select pd.products_id, pd.language_id, pd.products_name , pd.products_description,pd.products_url from " . TABLE_PRODUCTS_DESCRIPTION . " pd where pd.products_id= '" . $pID . "' and language_id='".$this->language_id."' ");
+ $product_query = $DB->query("select pd.products_id, pd.language_id, pd.products_name , pd.products_description, products_chapo, pd.products_url from " . TABLE_PRODUCTS_DESCRIPTION . " pd where pd.products_id= '" . $pID . "' and language_id='".$this->language_id."' ");
$this->content=$product_query->fetchAssoc();
+
+ self::$products_description= $this->content['products_description'];
+ self::$products_chapo= $this->content['products_chapo'];
+ self::$products_url= $this->content['products_url'];
+
}
/**
* \brief display
- * @param $pID int product id
+ * @param $pID int product id
* @param $class null
*/
public function display_view($pID,$class=''){
$this->load_db_values((int)$pID);
- self::$products_description= $this->content['products_description'];
- self::$products_url= $this->content['products_url'];
-
$v=$this->content;
$v['title']=__('tab products desc base');
$v['content']=tep_output_string_protected(tep_get_include_contents(__CLASS__.'.'.__FUNCTION__), false, true);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-01-07 08:27:43
|
Revision: 4012
http://oscss.svn.sourceforge.net/oscss/?rev=4012&view=rev
Author: oscim
Date: 2012-01-07 08:27:36 +0000 (Sat, 07 Jan 2012)
Log Message:
-----------
coquille
Modified Paths:
--------------
trunk/catalog/admin/includes/classes/drivers/sqlcip.php
trunk/catalog/admin/includes/widget/homeStock.php
trunk/catalog/install/includes/sql/mysql/data/91_osc_admin_cip.sql
Modified: trunk/catalog/admin/includes/classes/drivers/sqlcip.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlcip.php 2012-01-05 17:01:17 UTC (rev 4011)
+++ trunk/catalog/admin/includes/classes/drivers/sqlcip.php 2012-01-07 08:27:36 UTC (rev 4012)
@@ -7,15 +7,15 @@
@date 03/01/12, 08:07
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
- @class sqlcip_modfiles
- @file sqlcip_modfiles.php
+ @class sqlcip
+ @file sqlcip.php
@brief manage insert/update/delete in zone tables
*/
-define('TABLE_MODFILES', DB_TABLE_PREFIX . 'admin_cip_modfiles');
+// define('TABLE_CIP', DB_TABLE_PREFIX . 'admin_cip');
-class sqlcip_modfiles
+class sqlcip
implements ModSqlDataDriver{
public static $modules;
@@ -38,21 +38,24 @@
public static function create($option){
self::getInstance();
- if(!isset($option['cip_id']))
- return 'cip_id';
+ if(!isset($option['ident']))
+ return 'ident';
+ preg_match('#([a-zA-Z0-9_-]*)_(unstable|stable|test)#i', trim($option['ident']), $match);
- $sql_data_array['k_cip_id'] = tep_db_prepare_input($option['cip_id']);
- $sql_data_array['cip_filename'] = tep_db_prepare_input($option['filename']);
- $sql_data_array['cip_folder'] = tep_db_prepare_input($option['folder']);
- $sql_data_array['cip_type'] = tep_db_prepare_input($option['type']);
- $sql_data_array['cip_typetype'] = tep_db_prepare_input($option['typetype']);
- $sql_data_array['core'] = tep_db_prepare_input($option['core']);
- $sql_data_array['cip_install'] = tep_db_prepare_input($option['install']);
+ $sql_data_array['cip_ident'] = tep_db_prepare_input($match[1]);
+ $sql_data_array['cip_checksum'] = tep_db_prepare_input(md5($match[1]));
+ $sql_data_array['cip_level'] = tep_db_prepare_input($match[2] );
- $res=tep_db_perform(TABLE_MODFILES, $sql_data_array);
+ $sql_data_array['cip_folder_name'] = tep_db_prepare_input($option['folder_name']);
+ $sql_data_array['cip_installed'] = tep_db_prepare_input($option['installed']);
+ $sql_data_array['cip_version'] =(!isset($option['version'])? tep_db_prepare_input($option['version']): '0.0.1') ;
+
+
+ $res=tep_db_perform(TABLE_CIP, $sql_data_array);
+
if(!$res)
return $res;
else
@@ -69,20 +72,16 @@
return 'id';
$where ='';
- if(isset($option['id'])) $where .="AND rowid = '".(int)$option['id']."' ";
- if(isset($option['cip_id'])) $where .="AND k_cip_id = '".(int)$option['cip_id']."' ";
+ if(isset($option['id'])) $where .="AND cip_id = '".(int)$option['id']."' ";
+ if(isset($option['ident'])) $where .="AND cip_ident = '".(int)$option['ident']."' ";
- if(isset($option['new_cip_id'])) $sql_data_array['k_cip_id'] = tep_db_prepare_input($option['cip_id']);
+ if(isset($option['folder_name']))$sql_data_array['cip_folder_name'] = tep_db_prepare_input($option['folder_name']);
+ if(isset($option['installed'])) $sql_data_array['cip_installed'] = tep_db_prepare_input($option['installed']);
+ if(isset($option['version'])) $sql_data_array['cip_version'] = tep_db_prepare_input($option['version']);
+// if(isset($option['level'])) $sql_data_array['cip_level'] = tep_db_prepare_input($option['level']);
- if(isset($option['filename'])) $sql_data_array['cip_filename'] = tep_db_prepare_input($option['filename']);
- if(isset($option['folder'])) $sql_data_array['cip_folder'] = tep_db_prepare_input($option['folder']);
- if(isset($option['type'])) $sql_data_array['cip_type'] = tep_db_prepare_input($option['type']);
- if(isset($option['typetype'])) $sql_data_array['cip_typetype'] = tep_db_prepare_input($option['typetype']);
- if(isset($option['core'])) $sql_data_array['core'] = tep_db_prepare_input($option['core']);
- if(isset($option['install'])) $sql_data_array['cip_install'] = tep_db_prepare_input($option['install']);
+ $res=tep_db_perform(TABLE_CIP, $sql_data_array, 'update' , substr($where,3) );
- $res=tep_db_perform(TABLE_MODFILES, $sql_data_array, 'update' , substr($where,3) );
-
return $res;
}
@@ -112,22 +111,19 @@
$DB=Database::getInstance();
$sql ="";
- if(isset($option['id'])) $sql .="AND rowid = '".(int)$option['id']."' ";
- if(isset($option['cip_id'])) $sql .="AND k_cip_id = '".(int)$option['cip_id']."' ";
- if(isset($option['type'])) $sql .="AND cip_type = '".(string)$option['type']."' ";
- if(isset($option['typetype'])) $sql .="AND cip_typetype = '".(string)$option['typetype']."' ";
- if(isset($option['core'])) $sql .="AND core = '".(int)$option['core']."' ";
- if(isset($option['filename'])) $sql .="AND cip_filename = '".(string)$option['filename']."' ";
- if(isset($option['folder'])) $sql .="AND cip_folder = '".(string)$option['folder']."' ";
+ if(isset($option['id'])) $sql .="AND cip_id = '".(int)$option['id']."' ";
+ if(isset($option['ident'])) $sql .="AND ( cip_ident = '".(string)$option['ident']."' OR cip_checksum = '".(string)md5($option['ident'])."' ) ";
+ if(isset($option['level'])) $sql .="AND cip_level = '".(string)$option['level']."' ";
+
if($sql=='')
return false;
- $sql="SELECT * FROM " . TABLE_MODFILES . " a ".
+ $sql="SELECT * FROM " . TABLE_CIP . " a ".
// " LEFT JOIN " . TABLE_IMAGES_USED . " g ON (a.rowid=g.rowid) ".
" WHERE ".substr($sql,3);
-// echo '<br>';
+
$res=$DB->query($sql);
$num = $res->__get('numRows');
@@ -157,14 +153,24 @@
$sql ="";
- if(isset($option['id'])) $sql .="AND rowid = '".(int)$option['id']."' ";
- if(isset($option['cip_id'])) $sql .="AND k_cip_id = '".(int)$option['cip_id']."' ";
+ if(isset($option['id'])) $sql .="AND cip_id = '".(int)$option['id']."' ";
+ if(isset($option['ident'])) $sql .="AND cip_ident = '".(int)$option['ident']."' ";
+ if(isset($option['level'])) $sql .="AND cip_level = '".(string)$option['level']."' ";
+
if(strlen($sql) < 5)
return false;
- $DB->query($s="DELETE FROM " . TABLE_MODFILES ." WHERE ". substr($sql,3) );
+ $res = $DB->query($s="SELECT cip_id FROM " . TABLE_CIP ." WHERE ". substr($sql,3) );
+ $row=$res->fetchAssoc();
+
+ // depend tables
+ sqlcip_modfiles::delete(array('cip_id'=>$row['cip_id']));
+
+
+ $DB->query($s="DELETE FROM " . TABLE_CIP ." WHERE ". substr($sql,3) );
+
return true;
}
@@ -174,14 +180,13 @@
@return array product empty
*/
public static function Specimen($shortkey=false){
- $par = array('rowid' => '',
- 'k_cip_id' => '',
- 'cip_filename' => '',
- 'cip_folder' => '',
- 'cip_type' => '',
- 'cip_typetype' => '',
- 'core' => '',
- 'cip_install' => '',
+ $par = array('cip_id' => '',
+ 'cip_checksum' => '',
+ 'cip_folder_name' => '',
+ 'cip_installed' => '',
+ 'cip_ident' => '',
+ 'cip_version' => '',
+ 'cip_level' => '',
);
return ((!$shortkey)? $par : self::CleanKey($par));
@@ -198,11 +203,7 @@
$object= new stdclass();
foreach($array as $key=>$value){
- if( strpos($key,'k_') ===0)
- $key=substr($key,2);
- elseif( $key == 'rowid' )
- $key='id';
- elseif( strpos($key,'cip_') ===0)
+ if( strpos($key,'cip_') ===0)
$key=substr($key,4);
$object->$key = $value;
Modified: trunk/catalog/admin/includes/widget/homeStock.php
===================================================================
--- trunk/catalog/admin/includes/widget/homeStock.php 2012-01-05 17:01:17 UTC (rev 4011)
+++ trunk/catalog/admin/includes/widget/homeStock.php 2012-01-07 08:27:36 UTC (rev 4012)
@@ -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 23/10/11, 11:36
+ @date 06/01/12, 11:36
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -13,14 +13,16 @@
if(!_cst_bool('STOCK_CHECK'))
return false;
-?>
-<div id="homeStock" class="<?php echo $widg['class'] ?>">
- <h3><a href="<?php echo tep_href_link(FILENAME_STATS,'module=stats_low_stock_attrib') ?>"><?php echo __('heading stock') ;?></a></h3>
-<?php
if(!class_exists('tracked_stock'))require_once(DIR_WS_CLASSES . 'tracked_stock.php');
$tracked_stock = new tracked_stock();
$l=$tracked_stock->db_low_stock();
+
+if(!is_array($l) || count($l) <=0)
+ return false;
?>
+<div id="homeStock" class="<?php echo $widg['class'] ?>">
+ <h3><a href="<?php echo tep_href_link(FILENAME_STATS,'module=stats_low_stock_attrib') ?>"><?php echo __('heading stock') ;?></a></h3>
+
<ul>
<?php foreach(@$l as $p) : ?>
<?php if(isset($p['option']) && is_array($p['option'])) { ?>
Modified: trunk/catalog/install/includes/sql/mysql/data/91_osc_admin_cip.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/data/91_osc_admin_cip.sql 2012-01-05 17:01:17 UTC (rev 4011)
+++ trunk/catalog/install/includes/sql/mysql/data/91_osc_admin_cip.sql 2012-01-07 08:27:36 UTC (rev 4012)
@@ -17,7 +17,7 @@
INSERT INTO osc_admin_cip (cip_id, cip_checksum, cip_folder_name, cip_installed, cip_ident, cip_version, cip_level) VALUES (2, '4f88808dacb5a4460eb57bdd1dc3189b', 'ADDRESS_BOOK_stable', 1, 'ADDRESS_BOOK', '1.0', 'stable');
INSERT INTO osc_admin_cip (cip_id, cip_checksum, cip_folder_name, cip_installed, cip_ident, cip_version, cip_level) VALUES (3, 'eec88916a23139e55400cf0dd834856f', 'DESC_BASE_stable', 1, 'DESC_BASE', '1.0', 'stable');
INSERT INTO osc_admin_cip (cip_id, cip_checksum, cip_folder_name, cip_installed, cip_ident, cip_version, cip_level) VALUES (4, '451a84aa41e342884b84890af7cf69e7', 'HEADER_TAGS_stable', 1, 'HEADER_TAGS', '1.0', 'stable');
-INSERT INTO osc_admin_cip (cip_id, cip_checksum, cip_folder_name, cip_installed, cip_ident, cip_version, cip_level) VALUES (5, 'e62f47533278a4cacb1c9324a1aa7f27', 'ACCOUNT_EXTRA_stable', 1, 'ACCOUNT_EXTRA', '1.0'), 'stable';
+INSERT INTO osc_admin_cip (cip_id, cip_checksum, cip_folder_name, cip_installed, cip_ident, cip_version, cip_level) VALUES (5, 'e62f47533278a4cacb1c9324a1aa7f27', 'ACCOUNT_EXTRA_stable', 1, 'ACCOUNT_EXTRA', '1.0', 'stable');
INSERT INTO osc_admin_cip (cip_id, cip_checksum, cip_folder_name, cip_installed, cip_ident, cip_version, cip_level) VALUES (6, 'a72e4a34f10af98a9814d865e717399f', 'SPECIAL_stable', 1, 'SPECIAL', '1.0', 'stable');
INSERT INTO osc_admin_cip (cip_id, cip_checksum, cip_folder_name, cip_installed, cip_ident, cip_version, cip_level) VALUES (7, '1415dd6d4b211ace908a6ac84621f88a', 'SVNUPDATE_unstable', 1, 'SVNUPDATE', '1.0', 'unstable');
INSERT INTO osc_admin_cip (cip_id, cip_checksum, cip_folder_name, cip_installed, cip_ident, cip_version, cip_level) VALUES (8, 'da8a0d4a6c802e4d0bb48065258582b1', 'SPU_stable', 1, 'SPU', '1.0', 'stable');
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-01-05 17:01:23
|
Revision: 4011
http://oscss.svn.sourceforge.net/oscss/?rev=4011&view=rev
Author: oscim
Date: 2012-01-05 17:01:17 +0000 (Thu, 05 Jan 2012)
Log Message:
-----------
oubli
Modified Paths:
--------------
trunk/catalog/install/includes/sql/mysql/data/91_osc_geo_zones.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_geo_zones.sql
Modified: trunk/catalog/install/includes/sql/mysql/data/91_osc_geo_zones.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/data/91_osc_geo_zones.sql 2012-01-05 13:20:53 UTC (rev 4010)
+++ trunk/catalog/install/includes/sql/mysql/data/91_osc_geo_zones.sql 2012-01-05 17:01:17 UTC (rev 4011)
@@ -11,14 +11,14 @@
--| http://www.oscss.org/ |
--+######################################################################--+
-insert into osc_geo_zones values (1,1, 'Vat: France', 'France', NULL, NOW() );
-insert into osc_geo_zones values (2,1, 'Vat: Florida', 'Florida local sales tax zone',NULL, NOW() );
-insert into osc_geo_zones values (3,1, 'Vat: EU all', 'Europe All', NULL, NOW() );
-insert into osc_geo_zones values (4,1, 'Vat: Reste du monde', 'Reste du monde', NULL, NOW() );
-insert into osc_geo_zones values (5,2, 'Shp: France', '', NULL, NOW() );
-insert into osc_geo_zones values (6,2, 'Shp: France DOM/TOM', '',NULL, NOW() );
-insert into osc_geo_zones values (7,2, 'shp: International', '', NULL, NOW() );
-insert into osc_geo_zones values (8,2, 'shp: EU all', '', NULL, NOW() );
+insert into osc_geo_zones (geo_zone_id, geo_zone_type, geo_zone_name, geo_zone_description, last_modified, date_added) values (1,1, 'Vat: France', 'France', NULL, NOW() );
+insert into osc_geo_zones (geo_zone_id, geo_zone_type, geo_zone_name, geo_zone_description, last_modified, date_added) values (2,1, 'Vat: Florida', 'Florida local sales tax zone',NULL, NOW() );
+insert into osc_geo_zones (geo_zone_id, geo_zone_type, geo_zone_name, geo_zone_description, last_modified, date_added) values (3,1, 'Vat: EU all', 'Europe All', NULL, NOW() );
+insert into osc_geo_zones (geo_zone_id, geo_zone_type, geo_zone_name, geo_zone_description, last_modified, date_added) values (4,1, 'Vat: Reste du monde', 'Reste du monde', NULL, NOW() );
+insert into osc_geo_zones (geo_zone_id, geo_zone_type, geo_zone_name, geo_zone_description, last_modified, date_added) values (5,2, 'Shp: France', '', NULL, NOW() );
+insert into osc_geo_zones (geo_zone_id, geo_zone_type, geo_zone_name, geo_zone_description, last_modified, date_added) values (6,2, 'Shp: France DOM/TOM', '',NULL, NOW() );
+insert into osc_geo_zones (geo_zone_id, geo_zone_type, geo_zone_name, geo_zone_description, last_modified, date_added) values (7,2, 'shp: International', '', NULL, NOW() );
+insert into osc_geo_zones (geo_zone_id, geo_zone_type, geo_zone_name, geo_zone_description, last_modified, date_added) values (8,2, 'shp: EU all', '', NULL, NOW() );
Modified: trunk/catalog/install/includes/sql/mysql/tables/osc_geo_zones.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/tables/osc_geo_zones.sql 2012-01-05 13:20:53 UTC (rev 4010)
+++ trunk/catalog/install/includes/sql/mysql/tables/osc_geo_zones.sql 2012-01-05 17:01:17 UTC (rev 4011)
@@ -15,6 +15,7 @@
create table osc_geo_zones (
geo_zone_id int(11) not null auto_increment,
geo_zone_type TINYINT(11) not null default '1',
+ geo_zone_grp varchar(32) not null ,
geo_zone_name varchar(32) not null ,
geo_zone_description varchar(255) not null ,
last_modified datetime ,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-01-05 13:21:01
|
Revision: 4010
http://oscss.svn.sourceforge.net/oscss/?rev=4010&view=rev
Author: oscim
Date: 2012-01-05 13:20:53 +0000 (Thu, 05 Jan 2012)
Log Message:
-----------
Suite refonte gestion des paquets
Modified Paths:
--------------
trunk/catalog/Documents/admin/data/repository_sources.xml
trunk/catalog/admin/includes/exts/package/CIP.php
trunk/catalog/admin/includes/exts/package/cip_modfiles.php
trunk/catalog/admin/includes/exts/package/packageInstaller.php
trunk/catalog/admin/includes/exts/package/packageRepository.php
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/package.txt
trunk/catalog/admin/includes/modules/pages/package.php
Modified: trunk/catalog/Documents/admin/data/repository_sources.xml
===================================================================
--- trunk/catalog/Documents/admin/data/repository_sources.xml 2012-01-03 15:40:57 UTC (rev 4009)
+++ trunk/catalog/Documents/admin/data/repository_sources.xml 2012-01-05 13:20:53 UTC (rev 4010)
@@ -1,11 +1,33 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<root>
+
<channel>
<title>Official</title>
<key>official</key>
<description>official repository</description>
- <repository>http://plugins.oscss.org/</repository>
- <rep_listing>rss.php?box=package</rep_listing>
- <rep_detail>rss.php?box=products_info</rep_detail>
+ <repository>http://localhost/plugins.oscss.org/services.php</repository>
+ <ident>
+ <user></user>
+ <token></token>
+ </ident>
+ <service>
+ <listing>listing_package</listing>
+ <view>detail_package</view>
+ <download>download_package</download>
+ </service>
</channel>
+
+
+
+ <channel>
+ <title>Local</title>
+ <key>local</key>
+ <description>local folder</description>
+ <repository>
+ </repository>
+ <rep_listing>
+ </rep_listing>
+ <rep_detail>
+ </rep_detail>
+ </channel>
</root>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/exts/package/CIP.php
===================================================================
--- trunk/catalog/admin/includes/exts/package/CIP.php 2012-01-03 15:40:57 UTC (rev 4009)
+++ trunk/catalog/admin/includes/exts/package/CIP.php 2012-01-05 13:20:53 UTC (rev 4010)
@@ -399,17 +399,17 @@
//! Erreur fatal before process, delete and exit
if(!$this->check_bylevel(1)){
- self::InProcess(__("Erreur suite lecture XML file "), __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
- return false;
+ self::InProcess(__("Erreur suite lecture XML file "), __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
+ return false;
- $this->DeleteContribFull();
+// $this->DeleteContribFull();
}
else
- return true;
+ return true;
}
elseif ($this->was_unpacked()) {
$messageStack->add( 'Couldn\'t unpack <strong>'.$this->get_zip_name().'</strong> to read data about CIP. ', 'warning');
- $this->DeleteContribFull();
+// $this->DeleteContribFull();
}
return false;
}
Modified: trunk/catalog/admin/includes/exts/package/cip_modfiles.php
===================================================================
--- trunk/catalog/admin/includes/exts/package/cip_modfiles.php 2012-01-03 15:40:57 UTC (rev 4009)
+++ trunk/catalog/admin/includes/exts/package/cip_modfiles.php 2012-01-05 13:20:53 UTC (rev 4010)
@@ -57,15 +57,14 @@
/**
@remarks file process
*/
+// echo $fs_filename .'<br>';
if(!is_dir(DIR_FS_CIP.CIP::$cInfo->name.'/catalog/'.$fs_filename)){
- if(!in_array(substr($fs_filename, 0,-4), array('.svn', '.csv')) && substr($fs_filename, 0,-1) !='~' ){
+
+ if(!in_array(substr($fs_filename, 0,-4), array('.svn', '.csv')) && substr($fs_filename,-1) !='~' ){
// echo $fs_filename .'<br>';
-// echo DIR_FS_CIP.CIP::$cInfo->name.'/catalog/'.$fs_filename .'---'.DIR_FS_CATALOG . replace_path_admin($fs_filename) .'<br>';
-
$act_install=self::CheckBackupFile(DIR_FS_CIP.CIP::$cInfo->name.'/catalog/'.$fs_filename , DIR_FS_CATALOG . replace_path_admin($fs_filename) );
-// var_dump($act_install, basename($fs_filename));
-// echo '<br>';
+
/**
@remarks Not File language
*/
Modified: trunk/catalog/admin/includes/exts/package/packageInstaller.php
===================================================================
--- trunk/catalog/admin/includes/exts/package/packageInstaller.php 2012-01-03 15:40:57 UTC (rev 4009)
+++ trunk/catalog/admin/includes/exts/package/packageInstaller.php 2012-01-05 13:20:53 UTC (rev 4010)
@@ -24,7 +24,7 @@
}
/**
- Recup du package distant
+ @brief Recup du package distant
*/
public function download_exts($pkgID){
global $messageStack;
@@ -37,17 +37,19 @@
tep_redirect(tep_href_link(self::FILENAME, 'action=view&pkgID='.(int)$obj->item->internalID ));
}
else {
+
$dest=fopen(DIR_FS_CIP.(string)$obj->item->ident.'_'.(string)$obj->item->level.'.zip',"wb");
- if($this->fetchRemote((string)$obj->item->url_src,$dest)) {
- $messageStack->add_session('good', 'succes');
+
+ if($this->fetchRemote((string)$obj->item->url_download,$dest)) {
+ $messageStack->add_session(__('packageInstaller download file exts good'), 'success');
fclose($dest);
$cip= new CIP( (string)$obj->item->ident.'_'.(string)$obj->item->level.'.zip');
tep_redirect(tep_href_link(self::FILENAME, 'action=view&pkgID='.$pkgID));
}
else{
- $messageStack->add_session('error recup zip url ', 'error');
+ $messageStack->add_session(__('packageInstaller error recup zip url'), 'error');
tep_redirect(tep_href_link(self::FILENAME));
}
}
@@ -80,7 +82,8 @@
$array=$this->cip_description($description->data);
parent::$Rightlist=array_merge(parent::$Rightlist,ErrorAndBlockProcess::$ArrayError);
}
- else $array[]= '<strong style="color:red;">'.CIP::CONFIG_FILENAME. __('text doesnt exists').'!!!</strong>';
+ else
+ $array[]= '<strong style="color:red;">'.CIP::CONFIG_FILENAME. __('text doesnt exists').'!!!</strong>';
@@ -233,10 +236,11 @@
/**
*/
private function fetchRemote($src,&$dest,$step=0) {
+ if (($content=fileUtility::url_fopen($src)) ==false)
+ return false;
+ else
+ $this->write_dest($content, $dest);
- if (($content=fileUtility::url_fopen($src)) ==false) return false;
- else $this->write_dest($content, $dest);
-
return true;
}
Modified: trunk/catalog/admin/includes/exts/package/packageRepository.php
===================================================================
--- trunk/catalog/admin/includes/exts/package/packageRepository.php 2012-01-03 15:40:57 UTC (rev 4009)
+++ trunk/catalog/admin/includes/exts/package/packageRepository.php 2012-01-05 13:20:53 UTC (rev 4010)
@@ -21,34 +21,46 @@
/**
- Ajout d'un depot
+ @brief Ajout d'un depot
*/
public static function SourceAdd(){
}
/**
- Suppression d'un depot
+ @brief Suppression d'un depot
*/
public static function SourceRemove(){
}
/**
- Load xml data,
+ @brief Load xml data,
+ @note this methode adjust static var parent class $FeedItem
+ @param $key string key source
+ @return if key no empty retrun object result current source, else no result
*/
- public static function SourceLoad(){
+ public static function SourceLoad($key=''){
global $messageStack,$osCSS_Cache;
+
try{
//! load xml file
- if(!$Parser = @simplexml_load_file(DIR_FS_ROOT_DOCS.'admin/data/'.self::REPOSITORY_SOURCE)) throw new Exception('Flux introuvable');
+ if(!$Parser = @simplexml_load_file(DIR_FS_ROOT_DOCS.'admin/data/'.self::REPOSITORY_SOURCE))
+ throw new Exception(__('package packageRepository link source no found or incorrectly formatted'));
+
$FeedItem = $Parser->xpath('channel');
- if(!$osCSS_Cache->read(parent::REPOSITORY_CACHE,0,true)) throw new Exception('Cache introuvable');
+ if(!$osCSS_Cache->read(parent::REPOSITORY_CACHE,0,true))
+ throw new Exception(__('package packageRepository cache no found'));
//! recup info cache
$var_file = $osCSS_Cache->getCache();
foreach($FeedItem as $item){
- $item->last_update=(isset($var_file[(string)$item->key]['last_update'] ) ? $var_file[(string)$item->key]['last_update'] : 'N/A');
- parent::$FeedItem[]=$item;
+ $item->last_update=(isset($var_file[(string)$item->key]['last_update'] ) ? $var_file[(string)$item->key]['last_update'] : 'N/A');
+
+ /// adjust parent var
+ if(!empty($key) && $key == (string)$item->key )
+ return $item;
+ else
+ parent::$FeedItem[]=$item;
}
}
catch(Exception $e){
@@ -60,17 +72,20 @@
public static function SourceLastUpdate($key){
}
+
+
/**
- Recup info depot par rapport a sa key
+ @brief Recup info depot par rapport a sa key
*/
public static function SourceLoadByKey($key){
global $messageStack;
try{
//! load xml file
- if(!$Parser = @simplexml_load_file(DIR_FS_ROOT_DOCS.'admin/data/'.self::REPOSITORY_SOURCE)) throw new Exception('Flux introuvable');
+ if(!$Parser = @simplexml_load_file(DIR_FS_ROOT_DOCS.'admin/data/'.self::REPOSITORY_SOURCE)) throw new Exception('file cache introuvable');
$FeedItem = $Parser->xpath('channel');
foreach($FeedItem as $item){
- if((string)$item->key == (string)$key) return $item;
+ if((string)$item->key == (string)$key)
+ return $item;
}
}
catch(Exception $e){
@@ -78,9 +93,39 @@
}
}
+
+ /**
+ @brief Test connextion and content
+ */
+ public static function InitConnexion($repo, $action = ''){
+ global $messageStack;
+
+ if(!$re= fileUtility::url_fopen( self::HrefSrc($repo, $action ) ) ){
+ $messageStack->add_session('recuperation repository impossible :'.$repo->repository,'error' );
+ return false;
+ }
+ else {
+
+ if(!$Repos = simplexml_load_string($re)){
+ $messageStack->add_session(sprintf(__('package packageRepository contenu illisible pour %s') , $repo->title) ,'error' );
+ return false;
+ }
+
+ if(isset($Repos->error)){
+ $messageStack->add_session(sprintf(__('package packageRepository error in process for repository %s :>> %s') , $repo->repository , addslashes(self::FomatError($Repos->error )) ),'error' );
+ break;
+ }
+
+ return $Repos;
+ }
+
+ return false;
+ }
+
+
/**
- Write file xml global source respoitory
- and mise en cache
+ @brief Write file xml global source respoitory and cache
+ @param $key string key source
*/
public static function SourceUpdate(){
global $messageStack;
@@ -104,115 +149,142 @@
$channel = $dom->createElement("channel");
$rss->appendChild($channel);
- if(!$SP = simplexml_load_file(DIR_FS_ROOT_DOCS.'admin/data/'.parent::REPOSITORY_SOURCE)) throw new Exception('Fichier Source introuvable '.DIR_WS_ADMIN.DIR_WS_INCLUDES.'data/'.parent::REPOSITORY_SOURCE);
+ if(!$SP = simplexml_load_file(DIR_FS_ROOT_DOCS.'admin/data/'.parent::REPOSITORY_SOURCE))
+ throw new Exception('Fichier Source introuvable '.DIR_WS_ADMIN.DIR_WS_INCLUDES.'data/'.parent::REPOSITORY_SOURCE);
foreach($SP as $repo){
- if(!$re= fileUtility::url_fopen($repo->repository.$repo->rep_listing) ) $messageStack->add_session('recuperation repository impossible :'.$repo->repository,'error' );
- else {
+ if((string)$repo->key =='local'){
+ //! add local package
+ $locale=0;
+ foreach(scan(DIR_FS_CIP) as $item){
+ $pkg=(!is_dir(DIR_FS_CIP.$item))?substr($item, 0,(strlen($item) -4) ) : $item;
- if(!$Repos = simplexml_load_string($re)) $messageStack->add_session('Impossible lire le contenu :'.$repo->title,'error' );
- else{
- //! compteur entree / repository
- $comp=0;
- //! concatene
+ if(!isset($temparray[md5($pkg)]) && $pkg !='index.' && !empty($pkg)) {
+ $st=strpos($pkg,'_stable');
+ $unst=strpos($pkg,'_unstable');
+ if($st>0){
+ $ident=substr($pkg,0,$st);
+ $level=substr($pkg,$st+1);
+ }
+ elseif($unst>0){
+ $ident=substr($pkg,0,$unst);
+ $level=substr($pkg,$unst+1);
+ }
+ else{
+ $ident=$pkg;
+ $level='unstable';
+ }
+ $InternalID++;
+ $comp++;
+ $locale++;
+ $re="\n".'<item>'."\n".
+ '<title>'.$pkg.'</title>'."\n".
+ '<ident>'.$ident.'</ident>'."\n".
+ '<author>local</author>'."\n".
+ '<version>N/A</version>'."\n".
+ '<level>'.$level.'</level>'."\n".
+ '<checksum>'.md5(DIR_FS_CIP.$pkg).'</checksum>'."\n".
+ '<url_src></url_src>'."\n".
+ '<pid>'.$locale.'</pid>'."\n".
+ '<internalID>'.$InternalID.'</internalID>'."\n".
+ '<link></link>'."\n".
+ '<image></image>'."\n".
+ '<description>'.$ident.'</description>'."\n".
+ '<sourceTitle>'.(string)$repo->title.'</sourceTitle>'."\n".
+ '<sourceKey>'.(string)$repo->key.'</sourceKey>'."\n".
+ '</item>'."\n";
+ $res=simplexml_load_string($re);
+ $dom_sxe = dom_import_simplexml($res);
+ $dom_sxe=$dom->importNode($dom_sxe, true);
+ $channel->appendChild($dom_sxe);
+ $dom->saveXML();
+ $temparray[md5($pkg)]='';
- $objres=$Repos->channel->item;
- foreach($objres as $item){
- $item->sourceTitle=(string)$repo->title;
- $item->sourceKey=(string)$repo->key;
- $item->internalID=$InternalID;
- $comp++;
- $InternalID++;
- $dom_sxe = dom_import_simplexml($item);
- $dom_sxe=$dom->importNode($dom_sxe, true);
- $channel->appendChild($dom_sxe);
- $dom->saveXML();
+ //! mise en cache info
+ $var_file[$pkg]['last_update']= date("Y-m-d H:n:s");
+ $var_file[$pkg]['count']= $comp;
+ }
+ }
+ //! message
+ if(count($var_file)==0)
+ throw new Exception('Erreur recuperation');
+ else
+ $messageStack->add_session(sprintf(__('package packageRepository repository %supdate ok'),$repo->title) ,'success' );
- $temparray[(string)$repo->ident.'_'.(string)$repo->level]='';
- }
+ }
+ else{
- //! mise en cache info
- $var_file[(string)$repo->key]['last_update']= date("Y-m-d H:n:s");
- $var_file[(string)$repo->key]['count']= $comp;
- $var_file[(string)$repo->key]['title']= (string)$repo->title;
- $var_file[(string)$repo->key]['link']= (string)$repo->repository;
-// $var_file[(string)$repo->key]['object']=$objres;
+// if(!$re= fileUtility::url_fopen( self::HrefSrc($repo, 'listing') ) )
+// $messageStack->add_session('recuperation repository impossible :'.$repo->repository,'error' );
+// else {
+//
+// if(!$Repos = simplexml_load_string($re))
+// $messageStack->add_session('Impossible lire le contenu :'.$repo->title,'error' );
+// else
+ if($Repos = self::InitConnexion($repo, 'listing') ){
- //! message
- $messageStack->add_session(__('repository ok :').$repo->title,'success' );
- }
+ //! compteur entree / repository
+ $comp=0;
- $compteur +=$comp;
- }
+ if(!isset($Repos->channel->item))
+ return $Repos;
- //! mise en cache global
- $var_file['global']['last_update']= date("Y-m-d H:n:s");
- $var_file['global']['count']= $compteur;
-// $var_file['global']['object']=new objectInfo($globalRepository);
+ $objres=$Repos->channel->item;
+ foreach($objres as $item){
+// print_r($item);
+// exit;
+ if(!isset($temparray[md5((string)$item->ident.'_'.(string)$item->level)]) ) {
+ $item->sourceTitle=(string)$repo->title;
+ $item->sourceKey=(string)$repo->key;
+ $item->internalID=$InternalID;
+ $comp++;
+ $InternalID++;
+ $dom_sxe = dom_import_simplexml($item);
+ $dom_sxe=$dom->importNode($dom_sxe, true);
+ $channel->appendChild($dom_sxe);
+ $dom->saveXML();
+
+ $temparray[md5((string)$item->ident.'_'.(string)$item->level)]='';
+ }
+ }
+
+ //! mise en cache info
+ $var_file[(string)$repo->key]['last_update']= date("Y-m-d H:n:s");
+ $var_file[(string)$repo->key]['count']= $comp;
+ $var_file[(string)$repo->key]['title']= (string)$repo->title;
+ $var_file[(string)$repo->key]['link']= (string)$repo->repository;
+ // $var_file[(string)$repo->key]['object']=$objres;
+
+ //! message
+ $messageStack->add_session(sprintf(__('package packageRepository repository %supdate ok'),$repo->title) ,'success' );
+
+ $compteur +=$comp;
+ }
+
+
+// }
+
+
+ }
+ //! mise en cache global
+ $var_file['global']['last_update']= date("Y-m-d H:n:s");
+ $var_file['global']['count']= $compteur;
+ // $var_file['global']['object']=new objectInfo($globalRepository);
+
}
// if(count($var_file)==0) throw new Exception('Erreur recuperation');
- //! add local package
- $locale=0;
- foreach(scan(DIR_FS_CIP) as $item){
- $pkg=(!is_dir(DIR_FS_CIP.$item))?substr($item, 0,(strlen($item) -4) ) : $item;
- if(!isset($temparray[$pkg]) && $pkg !='index.' && !empty($pkg)) {
- $st=strpos($pkg,'_stable');
- $unst=strpos($pkg,'_unstable');
- if($st>0){
- $ident=substr($pkg,0,$st);
- $level=substr($pkg,$st+1);
- }
- elseif($unst>0){
- $ident=substr($pkg,0,$unst);
- $level=substr($pkg,$unst+1);
- }
- else{
- $ident=$pkg;
- $level='unstable';
- }
- $InternalID++;
- $comp++;
- $locale++;
- $re="\n".'<item>'."\n".
- '<title>'.$pkg.'</title>'."\n".
- '<ident>'.$ident.'</ident>'."\n".
- '<author>local</author>'."\n".
- '<version>N/A</version>'."\n".
- '<level>'.$level.'</level>'."\n".
- '<checksum>'.md5(DIR_FS_CIP.$pkg).'</checksum>'."\n".
- '<url_src></url_src>'."\n".
- '<pid>'.$locale.'</pid>'."\n".
- '<internalID>'.$InternalID.'</internalID>'."\n".
- '<link></link>'."\n".
- '<image></image>'."\n".
- '<description>'.$ident.'</description>'."\n".
- '<sourceTitle>local</sourceTitle>'."\n".
- '</item>'."\n";
- $res=simplexml_load_string($re);
- $dom_sxe = dom_import_simplexml($res);
- $dom_sxe=$dom->importNode($dom_sxe, true);
- $channel->appendChild($dom_sxe);
- $dom->saveXML();
- //! mise en cache info
- $var_file[$pkg]['last_update']= date("Y-m-d H:n:s");
- $var_file[$pkg]['count']= $comp;
- }
- }
- //! message
- if(count($var_file)==0) throw new Exception('Erreur recuperation');
- else $messageStack->add_session(__('repository ok :').' local','success' );
+ fileUtility::_unlink(DIR_FS_ROOT_DOCS.'admin/data/'.parent::REPOSITORY_DATA);
- @unlink(DIR_FS_ROOT_DOCS.'admin/data/'.parent::REPOSITORY_DATA);
-
- if($dom->save(DIR_FS_ROOT_DOCS.'admin/data/'.parent::REPOSITORY_DATA) !=true)throw new Exception('erreur enregistrement');
+ if($dom->save(DIR_FS_ROOT_DOCS.'admin/data/'.parent::REPOSITORY_DATA) !=true)
+ throw new Exception('erreur enregistrement');
$osCSS_Cache->writeBuffer($var_file,true);
@@ -225,6 +297,50 @@
}
+ /**
+ @brief Ajout d'un depot
+ @param $obj xml_load
+ @param $service [precise service call]
+ @return link src (string)
+ */
+ public static function HrefSrc($obj, $service=''){
+ $src = (string)$obj->repository.'?';
+
+ /// put service
+ if(!empty($service) && isset($obj->service)){
+ $src .='service='.(string)$obj->service->$service.'&';
+ }
+
+ /// put user
+ if(isset($obj->ident)){
+ $src .='user='.(string)$obj->ident->user.'&token='.(string)$obj->ident->token;
+ }
+
+ /// put local environement
+// $src .='&language='.$_SESSION['language_iso'];
+ /// put version
+ preg_match('#([0-9\.]*)#i', get_info_core( DIR_FS_ROOT_DOCS.'oscss.version.xml','version'), $match );
+ $src .='&core='.$match[1] ;
+
+ return $src;
+ }
+
+ /**
+ @brief Ajout d'un depot
+ @param $obj xml_load
+ @return link src (string)
+ */
+ private static function FomatError($obj){
+ $s = (string)$obj->text;
+
+ if(isset($obj->link)){
+ $s .='<a href="'.(string)$obj->link.'"> '.__('view').' </a>';
+ }
+
+ return $s;
+ }
+
+
}
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/pages/package.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/pages/package.txt 2012-01-03 15:40:57 UTC (rev 4009)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/package.txt 2012-01-05 13:20:53 UTC (rev 4010)
@@ -15,7 +15,7 @@
$lang['title heading configuration package']="Configuration de l'extension " ;
-/* Menu */
+/** Menu */
/* paquet */
$lang['image upload package']="Ajouter un paquet" ;
$lang['image package updatable']="Paquets à mettre à jour" ;
@@ -29,7 +29,7 @@
-/* listing*/
+/** listing*/
/* paquet */
$lang['table heading nom']="Nom" ;
$lang['table heading description']="Description" ;
@@ -45,7 +45,7 @@
$lang['heading source key']="Clef" ;
$lang['heading source last update']="Dernière mise a jour" ;
-/* Add */
+/** Add */
/* paquet */
$lang['title heading upload package']="Ajouter un paquet" ;
@@ -54,48 +54,65 @@
/* source */
-/* Install */
+/** UnInstall */
$lang['msg was removed']="Extension desinstallée" ;
-/* view */
+/** view */
+ /* source */
+ $lang['title heading configuration source repository edit']="Modifié un depot" ;
+ $lang['package source legend ident']="Identification" ;
+ $lang['package source legend service declared']="services declaré" ;
+ $lang['package text package user id']="Numéro d'utilisateur" ;
+ $lang['package text package token']="Clef utilisateur" ;
+ $lang['package src url']="Url du dêpot" ;
- /* bouton */
- $lang['image cip install']="Installer cette extension " ;
- /* text */
- $lang['package heading title detail']="Detail du paquet" ;
- $lang['package heading title detail logs']="Detail des logs et nodes" ;
+ /* paquet */
+ /* bouton */
+ $lang['image cip install']="Installer cette extension " ;
+ /* text */
+ $lang['package heading title detail']="Detail du paquet" ;
+ $lang['package heading title detail logs']="Detail des logs et nodes" ;
- $lang['text info support']="Support " ;
- $lang['text info contrib']="Detail du paquet " ;
+ $lang['text info support']="Support " ;
+ $lang['text info contrib']="Detail du paquet " ;
- $lang['contribs page oscss']="osCSSS.org page de support" ;
- $lang['contribs cip pkg']="osCSS.org page" ;
+ $lang['contribs page oscss']="osCSSS.org page de support" ;
+ $lang['contribs cip pkg']="osCSS.org page" ;
-
-/* install */
+/** install */
/* bouton */
$lang['config extension']="Configurer cette extension " ;
/* text */
$lang['package heading title install']="installation du paquet" ;
$lang['package heading title install logs']="Detail des logs et nodes de l'installation" ;
+ /* errors / alert / message */
+ $lang['packageInstaller download file exts good']="Extension téléchargé" ;
+ $lang['packageInstaller error recup zip url']="Erreur lors de la récuperation du paquet" ;
-
-
-/* view config */
+/** view config */
/* bouton */
// $lang['config extension']="Configurer cette extension " ;
/* text */
$lang['package text frontend']="Frontend / public " ;
- $lang['package text frontend']="Backend / private " ;
+ $lang['package text backend']="Backend / private " ;
+/** update source */
+ /* errors / alert / message */
+ $lang['package packageRepository error in process for repository %s :>> %s']="Erreur lors de la recuperation du depot<strong>%s</strong>; message d'erreur retourné : %s" ;
+ $lang['package packageRepository contenu illisible pour %s']="Erreur sur la lecture du depot <strong>%s</strong>" ;
+
+
+ $lang['package packageRepository repository %supdate ok']="Récuperation du depot <strong>%s</strong> effectué" ;
+
+
/*
$lang['contribs cip pkg']="contribs cip pkg" ;
- $lang['contribs cip pkg']="contribs cip pkg" ;*/
+;*/
$lang['contribs contrib_type']="Type " ;
$lang['contribs status']="Etat " ;
Modified: trunk/catalog/admin/includes/modules/pages/package.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/package.php 2012-01-03 15:40:57 UTC (rev 4009)
+++ trunk/catalog/admin/includes/modules/pages/package.php 2012-01-05 13:20:53 UTC (rev 4010)
@@ -34,7 +34,8 @@
*/
const FILENAME = FILENAME_PACKAGE;
/**
- @var obj
+ @var obj for one result or array( obj, obj ) for mutli result
+ @brief this var is modified by childs class package
*/
public static $FeedItem;
/**
@@ -112,11 +113,11 @@
self::$code=__CLASS__;
self::$action=(isset($_REQUEST['action'])? $_REQUEST['action'] : 'listing' );
- self::$type_data=(isset($_GET['type_data'])?$_GET['type_data']:'package');
+ self::$type_data=(isset($_GET['type_data'])?$_GET['type_data']: 'package');
$mode=(isset($_GET['mode'])?$_GET['mode']:'');
+// var_dump( self::$type_data);
-
/**
@remarks not load if not first init
*/
@@ -150,7 +151,34 @@
global $messageStack;
switch(self::$action){
+ case 'source_test';
+ if(isset($_GET['mode'])) {
+//
+// if(self::$objChild->SourceUpdate()==true)
+// InitConnexion($repo, $action = '')
+ }
+
+// tep_redirect(tep_href_link(self::FILENAME), 'type_data=source');
+ break;
+
+
+ case 'source_synchro';
+ if(isset($_GET['key'])) {
+//
+// if(self::$objChild->SourceUpdate()==true)
+
+// if(self::$objChild->SourceUpdate()==true)
+
+//
+ }
+
+ if(!isset($_GET['forceajax']))
+ tep_redirect(tep_href_link(self::FILENAME, tep_get_all_get_params(array('action','cPath','pID','setflag','flag'), false) ));
+// tep_redirect(tep_href_link(self::FILENAME), 'type_data=source');
+ break;
+
case 'source_update':
+// // self::$objChild->SourceUpdate();
if(self::$objChild->SourceUpdate()==true)
tep_redirect(tep_href_link(self::FILENAME));
break;
@@ -234,24 +262,34 @@
self::load_repository();
+
//! recup element pkg
foreach(self::$FeedItem as $item){
if((int)$pkg_code == (int)$item->internalID)$ObjPkg =$item;
}
//! recup depot, si != local ; local pas info supp
- if((string)$ObjPkg->sourceTitle !='local') {
+ if((string)$ObjPkg->sourceKey !='local') {
$class=__CLASS__.'Repository';
if(!class_exists($class) && !tep_class_exists('exts_'.__CLASS__.'_'.$class)) return false;
$obj=new $class;
$ObjDepot=call_user_func(array($obj, 'SourceLoadByKey'),(string)$ObjPkg->sourceKey);
+
try{
//! load xml file
- if(!$Parser = @simplexml_load_file((string)$ObjDepot->repository.(string)$ObjDepot->rep_detail.'&pid='.(int)$ObjPkg->pid) ) throw new Exception('Flux introuvable');
+ if(!$Parser = @simplexml_load_file(packageRepository::HrefSrc($ObjDepot, 'view').'&pid='.(int)$ObjPkg->pid) )
+ throw new Exception('Flux introuvable');
$FeedItem = $Parser->xpath('channel');
+ $FeedItem[0]->item->url_download = packageRepository::HrefSrc($ObjDepot, 'download').'&pid='.(int)$ObjPkg->pid;
+ $FeedItem[0]->item->ident = (string)$ObjPkg->ident;
+ $FeedItem[0]->item->level = (string)$ObjPkg->level;
+ $FeedItem[0]->item->sourceKey =(string)$ObjPkg->sourceKey ;
+ $FeedItem[0]->item->sourceTitle =(string)$ObjPkg->sourceTitle ;
+ $FeedItem[0]->item->internalID =(string)$ObjPkg->internalID ;
+
return $FeedItem;
}
catch(Exception $e){
@@ -259,8 +297,9 @@
}
}
//! local depot
- elseif((string)$ObjPkg->sourceTitle =='local')
- return array(new objectInfo(array('item'=>$ObjPkg)));
+ elseif((string)$ObjPkg->sourceKey =='local'){
+ return array(new objectInfo(array('item'=>$ObjPkg)) );
+ }
}
@@ -292,7 +331,8 @@
Mise à jour cache paquet installed / updatable / non install
*/
foreach($Feed as $item){
-
+// print_r($item);
+// exit;
$item->etat=(self::pkg_is_installed($item->ident.'_'.$item->level)? 1 : 0);
switch($mode){
@@ -330,19 +370,42 @@
switch(self::$action){
//! source repository
+ /**
+ @remarks Ajax View result
+ */
+
+
+ /**
+ @remarks Normal display
+ */
case 'source_update':
break;
case 'source_add':
$action='edit';
break;
+ case 'source_edit':
+ $class=self::$code.'Repository';
+ if(!tep_class_exists('exts_'.self::$code.'_'.$class)) return false;
+ $obj=new $class;
+ self::$list=$obj->SourceLoad((string)$_GET['key']);
+ $action='edit';
+ break;
+
+
+
//! paquets
+ /**
+ @remarks Ajax View result
+ */
case 'setflag':
return self::status_flag((int)$_GET['flag'],'dbset='.(int)$_GET['dbset']);
break;
-
+ /**
+ @remarks Normal display
+ */
case 'upload':
break;
@@ -413,40 +476,55 @@
}
private static function get_item_action($pkg, $pkg_full, $url_pck, $pkgobj){
- return sprintf(
- CsrtAction::getFormat('row_action'),
- '' ,
- (($pkgobj->etat==1)
- ?
- sprintf(CsrtAction::getLink('row_action_right', __('icon remove'), 'install'), '', tep_href_link(self::FILENAME,'action=remove&pkgID='.urlencode($pkg_full)) ,'' ).
- sprintf(CsrtAction::getLink('row_action_right', __('image edit'), 'edit'), '', tep_href_link(self::FILENAME,'action=config&class='.$pkg) ,'' )
- :
- sprintf(CsrtAction::getLink('row_action_right', __('icon install'), 'remove'), '', tep_href_link(self::FILENAME,'action=download&pkgID='.urlencode($pkg_full)) ,'' )
- )
- );
+// var_dump(self::$type_data);
+// exit;
+ switch(self::$type_data){
+ case 'source':
+ return sprintf(
+ CsrtAction::getFormat('row_action'),
+ '' ,
+ sprintf(CsrtAction::getLink('row_action_right', __('image synchro'), 'synchro'), 'fancy', tep_href_link(self::FILENAME,'type_data=source&action=source_synchro&key='.$pkgobj->key) ,'' ).
+ sprintf(CsrtAction::getLink('row_action_right', __('image edit'), 'edit'), '', tep_href_link(self::FILENAME,'type_data=source&action=source_edit&key='.$pkgobj->key) ,'' ).
+ sprintf(CsrtAction::getLink('row_action_right', __('image delete'), 'delete'), '', tep_href_link(self::FILENAME,'type_data=source&action=source_delete&key='.$pkgobj->key) ,'' )
+ );
+ break;
+ case 'package':
+ default:
+ return sprintf(
+ CsrtAction::getFormat('row_action'),
+ '' ,
+ (($pkgobj->etat==1)
+ ?
+ sprintf(CsrtAction::getLink('row_action_right', __('icon remove'), 'install'), '', tep_href_link(self::FILENAME,'action=remove&pkgID='.urlencode($pkg_full)) ,'' ).
+ sprintf(CsrtAction::getLink('row_action_right', __('image edit'), 'edit'), '', tep_href_link(self::FILENAME,'action=config&class='.$pkg) ,'' )
+ :
+ sprintf(CsrtAction::getLink('row_action_right', __('icon install'), 'remove'), '', tep_href_link(self::FILENAME,'action=download&pkgID='.urlencode($pkg_full)) ,'' )
+ )
+ );
+ }
}
public static function tep_get_modele(){
switch(self::$type_data){
case 'source':
- return array(
- 'key'=>false,
- 'title'=>false,
- 'last_update'=>false,
- 'action'=>false,
- );
+ return array(
+ 'key'=>false,
+ 'title'=>false,
+ 'last_update'=>false,
+ 'action'=>false,
+ );
break;
case 'package':
default:
- return array( 0 =>false,
- 'title'=>true,
- 'description'=>true,
- 'level'=>true,
- 'sourceTitle'=>true,
- 'status'=>false,
- 'action'=>false,
- );
+ return array( 0 =>false,
+ 'title'=>true,
+ 'description'=>true,
+ 'level'=>true,
+ 'sourceTitle'=>true,
+ 'status'=>false,
+ 'action'=>false,
+ );
}
}
@@ -509,7 +587,9 @@
case 'source':
foreach(self::$list as $item){
foreach(self::tep_get_modele() as $k=>$v) $li[$k]=(tep_not_null((string)$item->$k)? (string)$item->$k : ' ');
- $li['action']=' ';
+ $li['last_update']=tep_date_short($item->last_update);
+ if($item->key == 'local') $li['action']=' ';
+ else $li['action']=self::get_item_action($item->ident,(int)$item->internalID,$item->url_src ,$item);
$res[]=$li;
}
break;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-01-03 15:41:07
|
Revision: 4009
http://oscss.svn.sourceforge.net/oscss/?rev=4009&view=rev
Author: oscim
Date: 2012-01-03 15:40:57 +0000 (Tue, 03 Jan 2012)
Log Message:
-----------
suite et fin de la reprise de la manipulation des paquet et l'indexation automatqiue des element interne aux extension
Modified Paths:
--------------
trunk/catalog/admin/includes/exts/package/cip_modfiles.php
trunk/catalog/admin/includes/exts/package/packageUtility.php
trunk/catalog/admin/includes/gabarit/package/display_view.package.config.gab
trunk/catalog/admin/includes/gabarit/package/display_view.package.configedit.gab
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/package.txt
trunk/catalog/admin/includes/modules/pages/package.php
Modified: trunk/catalog/admin/includes/exts/package/cip_modfiles.php
===================================================================
--- trunk/catalog/admin/includes/exts/package/cip_modfiles.php 2012-01-03 08:20:31 UTC (rev 4008)
+++ trunk/catalog/admin/includes/exts/package/cip_modfiles.php 2012-01-03 15:40:57 UTC (rev 4009)
@@ -88,6 +88,24 @@
$core = ((strpos( '_'.$fs_filename, 'admin')>0)?'1':'0');
$process = true;
}
+ /// modules in folder name module
+ elseif(preg_match('#(modules/)([a-zA-Z0-9_]*)/([a-zA-Z0-9_]*)/([a-zA-Z0-9_.-]*)(\.[a-z]{2,4})$#i', $fs_filename, $match) && $match[3] == $match[4]){
+ // Array
+ // (
+ // [0] => modules/products/prdct_package.php
+ // [1] => modules/
+ // [2] => products
+ // [3] => prdct_package
+ // [4] => prdct_package
+ // [5] => .php
+ // )
+ $filename = $match[4].$match[5];
+ $folder = dirname($match[0]);
+ $type='module';
+ $typetype=$match[2];
+ $core = ((strpos( '_'.$fs_filename, 'admin')>0)?'1':'0');
+ $process = true;
+ }
elseif(preg_match('#(plugins/)([a-zA-Z0-9_]*)/([a-zA-Z0-9_.-]*)(\.[a-z]{2,4})$#i', $fs_filename, $match)){
// Array
// (
Modified: trunk/catalog/admin/includes/exts/package/packageUtility.php
===================================================================
--- trunk/catalog/admin/includes/exts/package/packageUtility.php 2012-01-03 08:20:31 UTC (rev 4008)
+++ trunk/catalog/admin/includes/exts/package/packageUtility.php 2012-01-03 15:40:57 UTC (rev 4009)
@@ -21,27 +21,77 @@
parent::$set = (isset($_GET['set']) ? $_GET['set'] : '');
parent::$class = (isset($_GET['class']) ? $_GET['class'] : '');
- parent::$code_inistalletd_array['checkout_process']=array('key'=>'MODULE_CHECKOUT_PROCESS_INSTALLED', 'value'=>MODULE_CHECKOUT_PROCESS_INSTALLED, 'module_directory'=> 'checkout/');
- parent::$code_inistalletd_array['orders']=array('key_BO'=>'MODULE_ORDERS_INSTALLED_BO', 'value_BO'=>MODULE_ORDERS_INSTALLED_BO, 'module_directory'=> 'orders/', 'prefix'=>'');
- parent::$code_inistalletd_array['shipping']=array('key'=>'MODULE_SHIPPING_INSTALLED', 'value'=>MODULE_SHIPPING_INSTALLED, 'module_directory'=>'shipping/');
- parent::$code_inistalletd_array['payment']=array('key'=>'MODULE_PAYMENT_INSTALLED', 'value'=>MODULE_PAYMENT_INSTALLED, 'module_directory'=> 'payment/');
- parent::$code_inistalletd_array['order_total']=array('key'=>'MODULE_ORDER_TOTAL_INSTALLED', 'value'=>MODULE_ORDER_TOTAL_INSTALLED, 'module_directory'=> 'order_total/');
+ foreach(scan(DIR_FS_CATALOG_MODULES) as $row){
+ if(is_dir(DIR_FS_CATALOG_MODULES.$row)){
- parent::$code_inistalletd_array['configuration']=array( 'key_BO'=>'MODULE_GENERIC_INSTALLED_BO', 'value_BO'=>'MODULE_GENERIC_INSTALLED','module_directory'=>'configuration/','module_language'=>DIR_FS_ADMIN.'includes/languages/');
- parent::$code_inistalletd_array['pages']=array('key_BO'=>'MODULE_GENERIC_INSTALLED_BO', 'value_BO'=>'MODULE_GENERIC_INSTALLED','module_directory'=>'pages/','module_language'=>DIR_FS_ADMIN.'includes/languages/');
+ $fo =strtoupper('MODULE_'.self::adjustkey($row).'_INSTALLED');
+ $bo = $fo.'_BO';
- parent::$code_inistalletd_array['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/');
- parent::$code_inistalletd_array['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/' );
- parent::$code_inistalletd_array['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/');
- parent::$code_inistalletd_array['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 );
- parent::$code_inistalletd_array['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 );
- parent::$code_inistalletd_array['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 );
- parent::$code_inistalletd_array['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 );
+ 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/'.TEMPLATE_NAME.'/'.DIR_WS_MODULES) as $row){
+ if(!isset(parent::$code_inistalletd_array[$row]) && is_dir(DIR_FS_CATALOG.'templates/'.TEMPLATE_NAME.'/'.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_ADMIN.DIR_WS_MODULES) as $row){
+ if(!isset(parent::$code_inistalletd_array[$row]) && is_dir(DIR_FS_ADMIN.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_ADMIN.DIR_WS_LANGUAGES
+ );
+ }
+ }
+
+
}
+ /**
+ @brief adjust name key for reto-compatibilité
+ */
+ protected static function adjustkey($key){
+ switch($key){
+ case 'products':
+ return 'ACAPRO';
+ break;
+ case 'categories':
+ return 'ACACAT';
+ break;
+ }
+ return $key;
+ }
+
public static function load_product_info($id, $src){
try{
if(!$Sparser = @simplexml_load_file($FeedUrl)) throw new Exception('Flux introuvable');
@@ -65,156 +115,99 @@
global $language,$heading,$contents;
switch (parent::$action) {
- case 'edit':
+ case 'edit':
- $cls=strtoupper($_GET['class']);
- $oscss = oscss_cstr::getInstance();
- if(isset($_GET['core']) && !empty($_GET['core'])) $oscss->pile_file_lang(DIR_FS_ADMIN.DIR_WS_LANGUAGES.$language.'/modules/'.$_GET['set'] . '/'.parent::$modules_array[$_GET['set']][$cls]['filelg'].'.txt');
- else $oscss->pile_file_lang(DIR_FS_CATALOG.DIR_WS_LANGUAGES.$language.'/modules/'.$_GET['set'] . '/' .parent::$modules_array[$_GET['set']][$cls]['filelg'].'.txt');
- if(isset($_GET['core']) && !empty($_GET['core']) ) include_once(parent::$modules_array[$_GET['set']][$cls]['path_BO'].parent::$modules_array[$_GET['set']][$cls]['file']);
- else include_once(parent::$modules_array[$_GET['set']][$cls]['path'].parent::$modules_array[$_GET['set']][$cls]['file']);
+ $objres =sqlcip_modfiles::fetch(array('id'=>(int)$_GET['extension']), true);
+ $cls=substr($objres->filename,0, -4);
- $module = new $_GET['class'];
- $module_info = array('code' => $module->code,
- 'title' => $module->title,
- 'description' => $module->description,
- 'status' => $module->check());
- $keys = '';
- $module_keys = $module->keys();
+ $obj =sqlcip::fetch(array('id'=>$objres->cip_id), true);
+ parent::$class = $obj->ident;
- if(!$module->check()){
- $module->remove();
- $module->install();
- }
+ $oscss = oscss_cstr::getInstance();
- $keys_extra = array();
- for ($j=0, $k=sizeof($module_keys); $j<$k; $j++) {
- $key_value_query = tep_db_query("select configuration_title, configuration_value, configuration_description, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $module_keys[$j] . "'");
- $key_value = tep_db_fetch_array($key_value_query);
+ if($objres->core)
+ $oscss->pile_file_lang(DIR_FS_ADMIN.DIR_WS_LANGUAGES.$language.'/modules/'.$objres->typetype . '/'.$cls.'.txt');
+ else{
+ $oscss->pile_file_lang(DIR_FS_CATALOG.DIR_WS_LANGUAGES.$language.'/modules/'.$objres->typetype. '/' .$cls.'.txt');
+ $oscss->pile_file_lang(DIR_FS_CATALOG.DIR_WS_LANGUAGES.$language.'/modules/'.$objres->typetype. '/' .$cls. '/' .$cls.'.txt');
+ }
- $keys_extra[$module_keys[$j]]['title'] = $key_value['configuration_title'];
- $keys_extra[$module_keys[$j]]['value'] = $key_value['configuration_value'];
- $keys_extra[$module_keys[$j]]['description'] = $key_value['configuration_description'];
- $keys_extra[$module_keys[$j]]['use_function'] = $key_value['use_function'];
- $keys_extra[$module_keys[$j]]['set_function'] = $key_value['set_function'];
- }
+ /**
+ @remarks load module class and search in module FO/BO , And module in childs folder, And or in current template folder
+ */
+ if($objres->core){
+ if(file_exists(DIR_FS_ADMIN.DIR_WS_MODULES.$objres->typetype.'/'.$objres->filename))
+ 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{
- $module_info['keys'] = $keys_extra;
+ 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);
+ elseif(file_exists(DIR_FS_CATALOG.'templates/'.TEMPLATE_NAME.'/'.DIR_WS_MODULES.$objres->typetype.'/'.$objres->filename))
+ 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);
+ }
- $mInfo = new objectInfo($module_info);
+ $module = new $cls;
+ $module_info = array('code' => $module->code,
+ 'title' => $module->title,
+ 'description' => $module->description,
+ 'status' => $module->check());
+ $keys = '';
+ $module_keys = $module->keys();
- $get =(isset($_GET['class'] )) ? 'class='.$_GET['class'] : '';
- $get .=(isset($_GET['core'] )) ? '&core='.$_GET['core'] : '';
- $get .=(isset($_GET['set'] )) ? '&set='.$_GET['set'] : '';
+ if(!$module->check()){
+ $module->remove();
+ $module->install();
+ }
+ $keys_extra = array();
+ for ($j=0, $k=sizeof($module_keys); $j<$k; $j++) {
+ $key_value_query = tep_db_query("select configuration_title, configuration_value, configuration_description, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $module_keys[$j] . "'");
+ $key_value = tep_db_fetch_array($key_value_query);
- $format['title']='<dt>%s</dt>';
- $format['description']='<dd><label>%s</label>';
- $format['block']='%s</dd>';
+ $keys_extra[$module_keys[$j]]['title'] = $key_value['configuration_title'];
+ $keys_extra[$module_keys[$j]]['value'] = $key_value['configuration_value'];
+ $keys_extra[$module_keys[$j]]['description'] = $key_value['configuration_description'];
+ $keys_extra[$module_keys[$j]]['use_function'] = $key_value['use_function'];
+ $keys_extra[$module_keys[$j]]['set_function'] = $key_value['set_function'];
+ }
- $keys .= '<dl>';
- $keys .= configUtility::FormatEditAuto(array('array'=>$keys_extra, 'format'=>$format));
- $keys .= '</dl>';
+ $module_info['keys'] = $keys_extra;
- $heading[] = array('text' => '['.$_GET['set'].']'.$mInfo->title );
+ $mInfo = new objectInfo($module_info);
- $contents = array('form' => tep_draw_form('modules', parent::FILENAME, $get.'&action=save'));
- $contents[] = array('class' => 'block_input','text' => $keys);
- $contents[] = array('class' => 'button_nav', 'text' => tep_image_submit('button_update.gif', IMAGE_UPDATE) . tep_js_back(tep_href_link(parent::FILENAME, $get.'&action=config'), IMAGE_CANCEL));
- break;
- default:
- if(isset($mInfo) && is_object($mInfo)) {
- $heading[] = array('text' => $mInfo->title );
- if ($mInfo->status == '1') {
- $keys = '';
- reset($mInfo->keys);
- while (list(, $value) = each($mInfo->keys)) {
- $keys .= '<strong>' . $value['title'] . '</strong><br />';
- if ($value['use_function']) {
- $use_function = $value['use_function'];
- $set_function =(isset($value['set_function'])) ? $value['set_function'] : $class_method[1];
- if (preg_match('/->/', $use_function)) {
- $class_method = explode('->', $use_function);
- if ( isset(${$class_method[0]}) && !is_object(${$class_method[0]})) {
- include_once(DIR_WS_CLASSES . $class_method[0] . '.php');
- ${$class_method[0]} = new $class_method[0]();
- }
- $keys .= tep_call_function($set_function, $value['value'], ${$class_method[0]});
- } else {
- $keys .= tep_call_function($use_function, $value['value']);
- }
- } else {
- $keys .= $value['value'];
- }
- $keys .= '<br /><br />';
- }
- $keys = substr($keys, 0, strrpos($keys, '<br /><br />'));
+ $format['title']='<dt>%s</dt>';
+ $format['description']='<dd><label>%s</label>';
+ $format['block']='%s</dd>';
- $contents[] = array('text' => $mInfo->description);
- $contents[] = array('text' => $keys);
- } else {
- $contents[] = array('text' => $mInfo->description);
- }
- }
- break;
- }
- }
+ $keys .= '<dl>';
+ $keys .= configUtility::FormatEditAuto(array('array'=>$keys_extra, 'format'=>$format));
+ $keys .= '</dl>';
+ $heading[] = array('text' =>$mInfo->title );
+ $contents = array('form' => tep_draw_form('modules', parent::FILENAME, 'extension='.$objres->id.'&action=save'));
+ $contents[] = array('class' => 'block_input','text' => $keys);
+ $contents[] = array('class' => 'button_nav', 'text' => tep_image_submit('button_update.gif', IMAGE_UPDATE) . tep_js_back(tep_href_link(parent::FILENAME, 'class='.$obj->ident.'&action=config'), IMAGE_CANCEL));
+ break;
+ default:
- public static function load_config_value(){
-
- $file_extension = '.php';
- $directory_array =$modules_array= array();
- foreach(parent::$code_inistalletd_array as $key=>$value) {
-
- if(!isset(parent::$modules_array[$key]))parent::$modules_array[$key]=array();
-
- //! Scan file FO
- $module_directory=DIR_FS_CATALOG_MODULES.$value['module_directory'];
- $module_directory_template=DIR_FS_CATALOG.'templates/'.TEMPLATE_NAME.'/'.DIR_WS_MODULES.$value['module_directory'];
- $module_directory_admin=DIR_FS_ADMIN.DIR_WS_MODULES.$value['module_directory'];
- if ($dir = @dir($module_directory)) {
- while ($file = $dir->read()) {
- if(!in_array($file,array('.','..','.svn','.htaccess','index.html')))
- parent::$modules_array[$key]=array_merge((array) parent::$modules_array[$key],self::info_module($file,$module_directory, $module_directory_admin, $file_extension) );
- }
- sort($directory_array);
- $dir->close();
+ break;
}
- //! Scan file template courant FO
- if ($dir = @dir($module_directory_template)) {
- while ($file = $dir->read()) {
- if(!in_array($file,array('.','..','.svn','.htaccess','index.html')))
- parent::$modules_array[$key]=array_merge((array) parent::$modules_array[$key],self::info_module($file,$module_directory_template, $module_directory_admin, $file_extension) );
+ }
- }
- sort($directory_array);
- $dir->close();
- }
- //! Scan file BO
-
- if ($dir = @dir($module_directory_admin)) {
-
- while ($file = $dir->read()) {
-
- if(!in_array($file,array('.','..','.svn','.htaccess','index.html')))
- parent::$modules_array[$key]=array_merge((array) parent::$modules_array[$key],self::info_module($file,$module_directory, $module_directory_admin, $file_extension) );
-
- }
- sort($directory_array);
- $dir->close();
- }
- }
-
-
-// print_r(parent::$modules_array);
-
+ public static function load_config_value(){
}
/**
Modified: trunk/catalog/admin/includes/gabarit/package/display_view.package.config.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/package/display_view.package.config.gab 2012-01-03 08:20:31 UTC (rev 4008)
+++ trunk/catalog/admin/includes/gabarit/package/display_view.package.config.gab 2012-01-03 15:40:57 UTC (rev 4009)
@@ -19,10 +19,8 @@
?>
<h3><?php echo __('title heading configuration package').' '. $_GET['class'] ?></h3>
-<div class="button_nav">
- <?php echo tep_js_back(tep_href_link(package::FILENAME), IMAGE_BACK) ?>
-</div>
+
<div class="box_uniq">
<table class="dataTableBase">
<thead>
@@ -37,83 +35,39 @@
</thead>
<tbody>
- <?php foreach($res2 as $row): ?>
+ <?php foreach($res2 as $row): ?>
<tr class="view parent">
- <?php if (!$row->core): ?>
- <td><?php echo '[FO] ' ?></td>
- <td><?php echo $row->type ?></td>
- <td><?php echo $row->typetype ?></td>
- <td><?php echo $row->filename ?></td>
- <td><?php //echo package::status_flag(in_array($v2[$class]['file'],explode(';',package::$code_inistalletd_array[$k2]['value'])),'action=setflag&set='.$k2.'&class='.$v2[$class]['class']); ?></td>
- <td>
- <?php if( in_array( $row->type, array('module')) && !in_array( $row->typetype, array('page')) ): ?>
- <span class="view fils fleft"><?php echo ' <a class="buttonimg" href="' . tep_href_link(package::FILENAME, 'extension='.$ident.'&set='.$row->typetype.'&class='.substr($row->filename, 0,-4) . '&action=edit' ) . '">' . tep_image(DIR_WS_ICONS . 'icon_edit.png', IMAGE_EDIT ) . '</a>'; ?></span>
- <?php endif; ?>
- </td>
- <?php else: ?>
-
- <td><?php echo '[BO] ' ?></td>
- <td><?php echo $row->type ?></td>
- <td><?php echo $row->typetype ?></td>
+ <td class="tcenter"><?php echo ((!$row->core) ? __('package text frontend') : __('package text backend'))?></td>
+ <td class="tcenter"><?php echo $row->type ?></td>
+ <td class="tcenter"><?php echo $row->typetype ?></td>
<td><?php echo $row->filename ?></td>
- <td><?php //echo package::status_flag(in_array($v2[$class]['file'], explode(';',package::$code_inistalletd_array[$k2]['value_BO'])) ,'action=setflag&set='.$k2.'&class='.$v2[$class]['class'].'&core=BO'); ?></td>
+ <td class="tcenter">
+ <?php if( in_array( $row->type, array('module')) ): ?>
+ <?php echo package::status_flag(in_array($row->filename,explode(';', @package::$code_inistalletd_array[$row->typetype]['value'])), 'dbset='.$row->id); ?>
+ <?php else: ?>
+ <?php echo tep_image(DIR_WS_ICONS . 'icon_status_green.gif', IMAGE_ICON_STATUS_GREEN) ?>
+ <?php endif; ?>
+ </td>
<td>
- <?php if( in_array( $row->type, array('module')) && !in_array( $row->typetype, array('page')) ): ?>
- <span class="view fils fleft"><?php echo ' <a class="buttonimg" href="' . tep_href_link(package::FILENAME, 'extension='.$ident.'&set='.$row->typetype.'&class='.substr($row->filename, 0,-4) . '&action=edit'.'&core=BO') . '">' . tep_image(DIR_WS_ICONS . 'icon_edit.png', IMAGE_EDIT ) . '</a>'; ?></span>
+ <?php if( in_array( $row->type, array('module')) ): ?>
+ <span class="view fils fright">
+ <?php if (!$row->core): ?>
+ <?php echo ' <a class="buttonimg" href="' . tep_href_link(package::FILENAME, 'extension='.$row->id. '&action=edit' ) . '">' . tep_image(DIR_WS_ICONS . 'icon_edit.png', IMAGE_EDIT ) . '</a>'; ?>
+ <?php else: ?>
+ <?php echo ' <a class="buttonimg" href="' . tep_href_link(package::FILENAME, 'extension='.$row->id. '&action=edit') . '">' . tep_image(DIR_WS_ICONS . 'icon_edit.png', IMAGE_EDIT ) . '</a>'; ?>
+ <?php endif; ?>
+ </span>
+ <?php else: ?>
+ <span class="fright">---</span>
<?php endif; ?>
- </td>
-
- <?php endif; ?>
+ </td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
-
-<?php /**
-<div class="fleft w_40">
-<table class="dataTableBase">
- <thead>
- <tr>
- <th><?php echo __('core') ?></th>
- <th><?php echo __('type') ?></th>
- <th><?php echo __('status') ?></th>
- <th><?php echo __('action') ?></th>
- </tr>
- </thead>
- <tbody>
-
- <?php foreach(package::$modules_array as $k2=>$v2): $class=strtoupper(trim(package::$class)); ?>
- <?php if (isset($v2[$class]['path'])): ?>
- <tr class="view parent">
- <td><?php echo '[FO] ' ?></td>
- <td><?php echo $k2 ?></td>
- <td><?php echo package::status_flag(in_array($v2[$class]['file'],explode(';',package::$code_inistalletd_array[$k2]['value'])),'action=setflag&set='.$k2.'&class='.$v2[$class]['class']); ?></td>
- <td><?php if(!isset(package::$modules_array[$k2][$class]['path_BO'])): ?>
- <span class="view fils fleft"><?php echo ' <a class="buttonimg" href="' . tep_href_link(package::FILENAME, 'set='.$k2.'&class='.$v2[$class]['class'] . '&action=edit' ) . '">' . tep_image(DIR_WS_ICONS . 'icon_edit.png', IMAGE_EDIT ) . '</a>'; ?></span><?php endif; ?>
- </td>
- </tr>
- <?php endif; ?>
-
- <?php if(isset($v2[$class]['path_BO'])): ?>
- <tr class="view parent">
- <td><?php echo '[BO] ' ?></td>
- <td><?php echo $k2 ?></td>
- <td><?php echo package::status_flag(in_array($v2[$class]['file'], explode(';',package::$code_inistalletd_array[$k2]['value_BO'])) ,'action=setflag&set='.$k2.'&class='.$v2[$class]['class'].'&core=BO'); ?></td>
- <td><span class="view fils fleft"><?php echo ' <a class="buttonimg" href="' . tep_href_link(package::FILENAME, 'set='.$k2.'&class='.$v2[$class]['class'] . '&action=edit'.'&core=BO') . '">' . tep_image(DIR_WS_ICONS . 'icon_edit.png', IMAGE_EDIT ) . '</a>'; ?></span>
- </td>
- </tr>
- <?php endif; ?>
-
- <?php endforeach; ?>
-
- </tbody>
-</table>
+<div class="button_nav">
+ <?php echo tep_js_back(tep_href_link(package::FILENAME), IMAGE_BACK) ?>
</div>
-*/ ?>
-
-<div class="fright w_60">
- <?php //echo package::get_right_bar() ?>
-</div>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/gabarit/package/display_view.package.configedit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/package/display_view.package.configedit.gab 2012-01-03 08:20:31 UTC (rev 4008)
+++ trunk/catalog/admin/includes/gabarit/package/display_view.package.configedit.gab 2012-01-03 15:40:57 UTC (rev 4009)
@@ -1,23 +1,18 @@
<?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 10/02/11, 11:08
+ @version 2.1.1
+ @date 03/01/12, 08:07
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
-// $ident = trim(package::$class);
-//
-// $res = sqlcip::fetch(array('ident'=>$ident), true);
-// $res2 =sqlcip_modfiles::fetch(array('cip_id'=>$res->id), true);
-// print_r($res2);
?>
-<h3><?php echo __('title heading configuration package').' '. $_GET['class'] ?></h3>
+<h3><?php echo __('title heading configuration package') ?></h3>
<div class="button_nav">
- <?php echo tep_js_back(tep_href_link(package::FILENAME, 'class='.$_GET['extension'].'&action=config'), IMAGE_BACK) ?>
+ <?php echo tep_js_back(tep_href_link(package::FILENAME, 'class='.package::$class.'&action=config'), IMAGE_BACK) ?>
</div>
<div class="box_uniq">
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/pages/package.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/pages/package.txt 2012-01-03 08:20:31 UTC (rev 4008)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/package.txt 2012-01-03 15:40:57 UTC (rev 4009)
@@ -27,6 +27,8 @@
$lang['image source catalog']="Liste des sources" ;
$lang['image source update']="Mise à jour des dépôts" ;
+
+
/* listing*/
/* paquet */
$lang['table heading nom']="Nom" ;
@@ -38,12 +40,13 @@
$lang['table heading level']="Develop" ;
$lang['table heading repository']="Dépot" ;
- /* source */
+ /* source */
$lang['heading source title']="Titre" ;
$lang['heading source key']="Clef" ;
$lang['heading source last update']="Dernière mise a jour" ;
/* Add */
+
/* paquet */
$lang['title heading upload package']="Ajouter un paquet" ;
$lang['text heading upload package']="Télécharger un paquet, celui ci doit être au format correct des paquet pour oscss, rapprochez vous de la commuanuté pour obtenir des informations. Si le format du fichier n'est pas correct, il ne sera pas installable" ;
@@ -69,6 +72,26 @@
$lang['contribs page oscss']="osCSSS.org page de support" ;
$lang['contribs cip pkg']="osCSS.org page" ;
+
+
+/* install */
+ /* bouton */
+ $lang['config extension']="Configurer cette extension " ;
+ /* text */
+ $lang['package heading title install']="installation du paquet" ;
+ $lang['package heading title install logs']="Detail des logs et nodes de l'installation" ;
+
+
+
+
+/* view config */
+ /* bouton */
+// $lang['config extension']="Configurer cette extension " ;
+ /* text */
+ $lang['package text frontend']="Frontend / public " ;
+ $lang['package text frontend']="Backend / private " ;
+
+
/*
$lang['contribs cip pkg']="contribs cip pkg" ;
@@ -84,15 +107,8 @@
-/* install */
- /* bouton */
- $lang['config extension']="Configurer cette extension " ;
- /* text */
- $lang['package heading title install']="installation du paquet" ;
- $lang['package heading title install logs']="Detail des logs et nodes de l'installation" ;
-
/* Error */
$lang['write file permissins needed text']="Erreur: revoir les permission de ce fichier : " ;
$lang['write folder permissins needed text']="Erreur: revoir les permission de ce dossier : " ;
Modified: trunk/catalog/admin/includes/modules/pages/package.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/package.php 2012-01-03 08:20:31 UTC (rev 4008)
+++ trunk/catalog/admin/includes/modules/pages/package.php 2012-01-03 15:40:57 UTC (rev 4009)
@@ -124,19 +124,19 @@
switch(self::$type_data){
case 'source':
- $class=__CLASS__.'Repository';
- if(!tep_class_exists('exts_'.__CLASS__.'_'.$class)) die('class no found '.$class);
- self::$objChild=new $class;
+ $class=__CLASS__.'Repository';
+ if(!tep_class_exists('exts_'.__CLASS__.'_'.$class)) die('class no found '.$class);
+ self::$objChild=new $class;
break;
case 'package':
default:
- //! detail item in ajax
- define('AJAXSTATMENTDETAIL', 'mod=page&type='.__CLASS__.'&type_data='.self::$type_data.'&mode='.$mode);
+ //! detail item in ajax
+ define('AJAXSTATMENTDETAIL', 'mod=page&type='.__CLASS__.'&type_data='.self::$type_data.'&mode='.$mode);
- $class=__CLASS__.'Utility';
- if(!tep_class_exists('exts_'.__CLASS__.'_'.$class)) die('class no found '.$class);
- self::$objChild=new $class;
+ $class=__CLASS__.'Utility';
+ if(!tep_class_exists('exts_'.__CLASS__.'_'.$class)) die('class no found '.$class);
+ self::$objChild=new $class;
}
//! active datatable in ajax, precise les GET necessaire
@@ -151,61 +151,76 @@
switch(self::$action){
case 'source_update':
- if(self::$objChild->SourceUpdate()==true) tep_redirect(tep_href_link(self::FILENAME));
+ if(self::$objChild->SourceUpdate()==true)
+ tep_redirect(tep_href_link(self::FILENAME));
break;
case 'download':
- $class=self::$code.'Installer';
- if(!tep_class_exists('exts_'.self::$code.'_'.$class)) return false;
- $obj=new $class;
- $obj->download_exts((string)$_GET['pkgID']);
+ $class=self::$code.'Installer';
+ if(!tep_class_exists('exts_'.self::$code.'_'.$class)) return false;
+ $obj=new $class;
+ $obj->download_exts((string)$_GET['pkgID']);
-// self::load_db_values(self::REPOSITORY_OFFICIAL,'action=view');
+ // self::load_db_values(self::REPOSITORY_OFFICIAL,'action=view');
break;
case 'upload_confirm':
- if ( !empty($_FILES['new_package']['tmp_name']) ) {
- $categories_image = new upload('new_package', DIR_FS_CIP);
- }
- tep_redirect(tep_href_link(self::FILENAME, 'type_data=source&action=source_update'));
+ if ( !empty($_FILES['new_package']['tmp_name']) ) {
+ $categories_image = new upload('new_package', DIR_FS_CIP);
+ }
+ tep_redirect(tep_href_link(self::FILENAME, 'type_data=source&action=source_update'));
break;
case 'setflag':
- $t=$ts=array();
- $module=$_GET['set'];
- $tclass=$_GET['class'];
- $flag=$_GET['flag'];
- $core=(!isset($_GET['core']))? '' :'_'.$_GET['core'];
- $t=(tep_not_null(self::$code_inistalletd_array[$module]['value'.$core])? explode(';',self::$code_inistalletd_array[$module]['value'.$core]) : array() );
- if($flag ==0) {
- foreach($t as $v){
- if(!empty($v) && $tclass.'.php' != $v)$ts[]=$v;
- }
- }
- else {
- $ts=((count($t)>0)?$t:array());
- $ts[]=$tclass.'.php';
- }
- if(count($ts)==1)$ts[]='';
- $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = '" . self::$code_inistalletd_array[$module]['key'].$core . "'");
- if (tep_db_num_rows($check_query)) {
- $check = tep_db_fetch_array($check_query);
- tep_db_query($sql="update " . TABLE_CONFIGURATION . " set configuration_value = '" . implode(';', $ts) . "', last_modified = now() where configuration_key = '" . self::$code_inistalletd_array[$module]['key'].$core . "'");
+ $t=$ts=$tss =array();
+ $moduleid=(int)$_GET['dbset'];
+ $flag=(int)$_GET['flag'];
- } else {
- tep_db_query($sql="insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Installed Modules ".$type."', '" . self::$code_inistalletd_array[$module]['key'].$core . "', '" .$ts . ";', 'This is automatically updated. No need to edit.', '6', '0', now())");
- }
+ $objres =sqlcip_modfiles::fetch(array('id'=>$moduleid), true);
- tep_redirect(tep_href_link(self::FILENAME, 'set=' . self::$set.'&class='.strtoupper($_GET['class']).'&action=config' ));
+ $core=(!$objres->core)? '' :'_BO';
+ $t=(isset(self::$code_inistalletd_array[$objres->typetype]['value'.$core])? explode(';',str_replace(';;',';', self::$code_inistalletd_array[$objres->typetype]['value'.$core]) ): array() );
+ if($flag ==0) {
+ foreach($t as $v){
+ if(!empty($v) && $objres->filename != $v)$ts[]=$v;
+ }
+ }
+ else {
+ $ts=((count($t)>0)?$t: array());
+ if(!in_array($objres->filename , $t))
+ $ts[]=$objres->filename;
+ }
+ if(count($ts)==1)$ts[]='';
+ // clean value
+ foreach($ts as $v)
+ if(!in_array($v , $tss) && $v !='.php' )
+ $tss[]=str_replace('.php.php', '.php',$v);
+
+
+ $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = '" . self::$code_inistalletd_array[$objres->typetype]['key'].$core . "'");
+
+ if (!tep_db_num_rows($check_query)) {
+ tep_db_query($sql="insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Installed Modules ".$objres->typetype."', '" . self::$code_inistalletd_array[$objres->typetype]['key'].$core . "', '" .$tss . ";', 'This is automatically updated. No need to edit.', '6', '0', now())");
+
+ }
+
+ tep_db_query($sql="update " . TABLE_CONFIGURATION . " set configuration_value = '" . implode(';', $tss) . "', last_modified = now() where configuration_key = '" . self::$code_inistalletd_array[$objres->typetype]['key'].$core . "'");
+
+ $objres =sqlcip::fetch(array('id'=>$objres->cip_id), true);
+
+ if(!isset($_GET['forceajax']))
+ tep_redirect(tep_href_link(self::FILENAME, 'action=config&class='.$objres->ident ));
break;
+
+
case 'save':
- 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' ));
+ 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' ));
break;
default:
- self::load_repository();
+ self::load_repository();
}
}
@@ -318,10 +333,16 @@
case 'source_update':
break;
case 'source_add':
- $action='edit';
+ $action='edit';
break;
+
//! paquets
+ case 'setflag':
+ return self::status_flag((int)$_GET['flag'],'dbset='.(int)$_GET['dbset']);
+ break;
+
+
case 'upload':
break;
@@ -530,11 +551,17 @@
public static function status_flag($cond,$get){
- if($cond) {
- return tep_image(DIR_WS_ICONS . 'icon_status_green.gif', IMAGE_ICON_STATUS_GREEN) . ' <a href="' . tep_href_link(self::FILENAME, $get.'&flag=0' ) . '">' . tep_image(DIR_WS_ICONS . 'icon_status_red_light.gif', IMAGE_ICON_STATUS_RED_LIGHT) . '</a>';
- } else {
- return '<a href="' . tep_href_link(self::FILENAME, $get.'&flag=1') . '">' . tep_image(DIR_WS_ICONS . 'icon_status_green_light.gif', IMAGE_ICON_STATUS_GREEN_LIGHT) . '</a> ' . tep_image(DIR_WS_ICONS . 'icon_status_red.gif', IMAGE_ICON_STATUS_RED);
- }
+ $exclude=array('action','pID','forceajax','type','class','function','funct', 'mod');
+ $query_s=$get.'&action=setflag&flag=';
+
+ return '<a class="ajaxinline" href="' . tep_href_link(self::FILENAME, tep_get_all_get_params($exclude).$query_s.(((int)$cond)? '0' : '1') ) . '">'.
+ sprintf(
+ CsrtAction::getFormat('row_flag'),
+ (int)$cond,
+ ( ((int)$cond)? IMAGE_ICON_STATUS_GREEN : IMAGE_ICON_STATUS_RED)
+ ).
+ '</a>';
+
}
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-01-03 08:20:43
|
Revision: 4008
http://oscss.svn.sourceforge.net/oscss/?rev=4008&view=rev
Author: oscim
Date: 2012-01-03 08:20:31 +0000 (Tue, 03 Jan 2012)
Log Message:
-----------
coquille suite commit precedent
Modified Paths:
--------------
trunk/catalog/admin/includes/exts/package/CIP.php
trunk/catalog/admin/includes/exts/package/packageInstaller.php
trunk/catalog/admin/includes/exts/package/tags/addfile.php
trunk/catalog/admin/includes/exts/package/tags/extractzip.php
trunk/catalog/admin/includes/gabarit/package/display_view.package.config.gab
trunk/catalog/admin/includes/modules/pages/package.php
Modified: trunk/catalog/admin/includes/exts/package/CIP.php
===================================================================
--- trunk/catalog/admin/includes/exts/package/CIP.php 2012-01-03 00:05:41 UTC (rev 4007)
+++ trunk/catalog/admin/includes/exts/package/CIP.php 2012-01-03 08:20:31 UTC (rev 4008)
@@ -25,6 +25,8 @@
*/
+include_once(dirname(__FILE__).'/sqlcip.php');
+include_once(dirname(__FILE__).'/sqlcip_modfiles.php');
include_once(dirname(__FILE__).'/cip_modfiles.php');
@@ -154,26 +156,24 @@
//! control db etat
// $resObj = sqlcip::fetch(array());
- $result=self::$DB->query("select cip_id, cip_installed, cip_version from ".TABLE_CIP. " where cip_folder_name='".self::$cip_name."'; ");
+ $result=self::$DB->query("select cip_id from ".TABLE_CIP. " where cip_folder_name='".self::$cip_name."'; ");
$installed=$result->fetchAssoc();
//! Register CIP in database:
if (!isset($installed['cip_id'])) $this->register();
else{
$this->cip_id=(string)$installed['cip_id'];
- $this->cip_installed=(int)$installed['cip_installed'];
}
+
+
+
/// Transversal info base paquet
- self::$cInfo = new stdClass;
- self::$cInfo->id = $this->cip_id;
- self::$cInfo->installed = $this->cip_installed;
-// self::$cInfo->version = $this->cip_installed;
- self::$cInfo->name = self::$cip_name;
+ $resObj = sqlcip::fetch(array('id'=>$this->cip_id), true);
+ self::$cInfo = $resObj;
+ self::$cInfo->name = $resObj->folder_name;
-// print_r(self::$cInfo);
-
define('CONTRIB_INSTALLER_NAME', 'CIP');
define('CONTRIB_INSTALLER_VERSION', 'oscss 2 2.0.1');
}
Modified: trunk/catalog/admin/includes/exts/package/packageInstaller.php
===================================================================
--- trunk/catalog/admin/includes/exts/package/packageInstaller.php 2012-01-03 00:05:41 UTC (rev 4007)
+++ trunk/catalog/admin/includes/exts/package/packageInstaller.php 2012-01-03 08:20:31 UTC (rev 4008)
@@ -138,7 +138,7 @@
$menu->cstr_return(array('for_user'=>'1'));
$array[]='<div class="button_nav">'.
- '<a class="button ActionYes" href="'.tep_href_link(parent::FILENAME,'action=config&class='.(string)$obj->item->ident).'" >'.__('config extension').'</a> '.
+ '<a class="button ActionYes" href="'.tep_href_link(parent::FILENAME,'action=config&class='.(string)CIP::$cInfo->ident).'" >'.__('config extension').'</a> '.
tep_js_back(tep_href_link(parent::FILENAME), IMAGE_CANCEL).
'</div>';
Modified: trunk/catalog/admin/includes/exts/package/tags/addfile.php
===================================================================
--- trunk/catalog/admin/includes/exts/package/tags/addfile.php 2012-01-03 00:05:41 UTC (rev 4007)
+++ trunk/catalog/admin/includes/exts/package/tags/addfile.php 2012-01-03 08:20:31 UTC (rev 4008)
@@ -84,12 +84,12 @@
$path=dirname($fs_filename);
if(!is_writable($path)) {
- CIP::InProcess('check'.__('write permissins needed text').$path."/", __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
- return false;
+ 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').$fs_filename, __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
- return false;
+ CIP::InProcess('check'.__('write permissins needed text').$fs_filename, __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
+ return false;
}
}
return true;
@@ -104,12 +104,12 @@
if(!is_dir($path))parent::recursive_mkdir($path);
if(!is_writable($path)) {
- CIP::InProcess('check'.__('write permissins needed text').$path, __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
- return false;
+ 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');
- return false;
+ CIP::InProcess('check'.__('write permissins needed text').$this->fs_filename($i), __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
+ return false;
}
}
return true;
@@ -128,22 +128,22 @@
if(fileUtility::equal_files($backup_file,$fs_filename)) continue;
if (!_cst_bool('ALLOW_OVERWRITE_MODIFIED')) {
- if (!is_file($cip_file)) {
+ if (!is_file($cip_file)) {
- $msg="Backup file ".$backup_file." is not exists. This file needed to check if file". $fs_filename. " was modified since Contrib Installer have been installed.
- <br /><b>CIP.NET.UA Advise</b>:<br />
- Set \"Allow Overwrite Existing Modified Files\" to TRUE and all modified files will be overwritten.
- All changes will be lost!<br />
- <i>or</i><br />
- Copy clean osCommerce files to ".DIR_FS_CIP."/".CONTRIB_INSTALLER_NAME."_".CONTRIB_INSTALLER_VERSION. "/catalog/ and try again.";
+ $msg="Backup file ".$backup_file." is not exists. This file needed to check if file". $fs_filename. " was modified since Contrib Installer have been installed.
+ <br /><b>CIP.NET.UA Advise</b>:<br />
+ Set \"Allow Overwrite Existing Modified Files\" to TRUE and all modified files will be overwritten.
+ All changes will be lost!<br />
+ <i>or</i><br />
+ Copy clean osCommerce files to ".DIR_FS_CIP."/".CONTRIB_INSTALLER_NAME."_".CONTRIB_INSTALLER_VERSION. "/catalog/ and try again.";
- CIP::InProcess($msg, __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'noblock');
- }
- elseif (file_exists($fs_filename) && file_exists($backup_file)&& !fileUtility::equal_files($fs_filename, $backup_file)) {
- $msg="File ".$current_file." exists and was modified since Contrib Installer have been installed. Overwriting is not allowed.<br /><b>CIP.NET.UA Advise</b>:<br />Set \"Allow Overwrite Existing Modified Files\" to TRUE or change install.xml.";
- CIP::InProcess($msg, __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
- return false;
- }
+ CIP::InProcess($msg, __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'noblock');
+ }
+ elseif (file_exists($fs_filename) && file_exists($backup_file)&& !fileUtility::equal_files($fs_filename, $backup_file)) {
+ $msg="File ".$current_file." exists and was modified since Contrib Installer have been installed. Overwriting is not allowed.<br /><b>CIP.NET.UA Advise</b>:<br />Set \"Allow Overwrite Existing Modified Files\" to TRUE or change install.xml.";
+ CIP::InProcess($msg, __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
+ return false;
+ }
}
}
return true;
@@ -160,32 +160,33 @@
if (!file_exists($backup_file)) CIP::InProcess(__('backup file not exists text').' '. $backup_file, __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'noblock');
/**
- If file doesn't exists it's not an error and we will restore him.
- An error if file exists and have been modified and ALLOW_OVERWRITE_MODIFIED=='false'
+ If file doesn't exists it's not an error and we will restore him.
+ An error if file exists and have been modified and ALLOW_OVERWRITE_MODIFIED=='false'
*/
if (!is_file($current_file)){
- CIP::InProcess(__('Le fichier est manquant ').$current_file, __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'info');
- self::$Exceptions[]=$current_file;
+ CIP::InProcess(__('Le fichier est manquant ').$current_file, __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'info');
+ self::$Exceptions[]=$current_file;
}
/**
- If file was modified since CIP have been installed and
- ALLOW_OVERWRITE_MODIFIED set to FALSE we couldn't overwrite.
+ If file was modified since CIP have been installed and
+ ALLOW_OVERWRITE_MODIFIED set to FALSE we couldn't overwrite.
*/
if (!_cst_bool('ALLOW_OVERWRITE_MODIFIED')) {
- if (is_file($cip_file)) {
- if (!fileUtility::equal_files($current_file, $cip_file)) {
- CIP::InProcess("File ".$current_file." exists and was modified since CIP have been installed. Overwriting is not allowed.<br /><b>CIP.NET.UA Advise</b>:<br />Set \"Allow Overwrite Existing Modified Files\" to TRUE or change install.xml.".$cip_file, __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
- return false;
- }
- } else {
- CIP::InProcess("File ".$cip_file." needed to check if file". $current_file. " was modified since CIP have been installed.
- <br /><b>CIP.NET.UA Advise</b>:<br />
- Restore CIP files in Contributions folder and try again.<br />
- <i>or</i><br />
- Set \"Allow Overwrite Existing Modified Files\" to TRUE and all modified files will be overwritten.
- All changes will be lost!", __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
- return false;
- }
+ if (is_file($cip_file)) {
+ if (!fileUtility::equal_files($current_file, $cip_file)) {
+ CIP::InProcess("File ".$current_file." exists and was modified since CIP have been installed. Overwriting is not allowed.<br /><b>CIP.NET.UA Advise</b>:<br />Set \"Allow Overwrite Existing Modified Files\" to TRUE or change install.xml.".$cip_file, __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
+ return false;
+ }
+ }
+ else {
+ CIP::InProcess("File ".$cip_file." needed to check if file". $current_file. " was modified since CIP have been installed.
+ <br /><b>CIP.NET.UA Advise</b>:<br />
+ Restore CIP files in Contributions folder and try again.<br />
+ <i>or</i><br />
+ Set \"Allow Overwrite Existing Modified Files\" to TRUE and all modified files will be overwritten.
+ All changes will be lost!", __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
+ return false;
+ }
}
}
return true;
@@ -201,9 +202,12 @@
for($i = 0; $i < count($this->data['filename']);$i++){
$cip_file=DIR_FS_CIP.$this->contrib.'/'.$this->data['srcdir'][$i].'/'.$this->data['filename'][$i];
+ /**
+ @brief add in db table for list modules
+ */
+ cip_modfiles::AdjustModFiles($this->fs_filename($i));
-
$fs_filename=replace_path_admin($this->fs_filename($i));
if (!file_exists($cip_file) && is_file($cip_file)) {
Modified: trunk/catalog/admin/includes/exts/package/tags/extractzip.php
===================================================================
--- trunk/catalog/admin/includes/exts/package/tags/extractzip.php 2012-01-03 00:05:41 UTC (rev 4007)
+++ trunk/catalog/admin/includes/exts/package/tags/extractzip.php 2012-01-03 08:20:31 UTC (rev 4008)
@@ -41,7 +41,6 @@
);
$this->ContribInstallerBaseTag($contrib, $id, $xml_data, $dep);
-// var_dump(__CLASS__);
}
@@ -171,24 +170,17 @@
$path=dirname($rs_filename); //['filename']);
$fs_filename = $rs_filename; //['filename'];
-// var_dump(file_exists(DIR_FS_CATALOG.$fs_filename),$fs_filename);
-// echo '<br>';
if(!is_dir(DIR_FS_CATALOG.$fs_filename) ){
-// var_dump(DIR_FS_CATALOG.$fs_filename);
-// echo '<br>';
+;
if(file_exists(DIR_FS_CATALOG.$fs_filename) && is_writable(DIR_FS_CATALOG.$fs_filename) ){
- // var_dump($fs_filename);
-// echo '<br>';
if(! fileUtility::_unlink(DIR_FS_CATALOG. $fs_filename) ){
CIP::InProcess(__('write file permissins needed text').' '.$fs_filename, __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'noblock');
// return false;
}
}
else{
-var_dump(DIR_FS_CATALOG.$fs_filename);
-echo '<br>';
-}
+ }
}
}
return true;
@@ -202,8 +194,6 @@
private function unpack_plus($file,$dir) {
$DB = Database::getInstance();
-// var_dump('unpack_plus '.$dir);
-// return true;
/**
@brief add in db table for list modules
*/
Modified: trunk/catalog/admin/includes/gabarit/package/display_view.package.config.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/package/display_view.package.config.gab 2012-01-03 00:05:41 UTC (rev 4007)
+++ trunk/catalog/admin/includes/gabarit/package/display_view.package.config.gab 2012-01-03 08:20:31 UTC (rev 4008)
@@ -11,7 +11,11 @@
$ident = trim(package::$class);
$res = sqlcip::fetch(array('ident'=>$ident), true);
+
+
$res2 =sqlcip_modfiles::fetch(array('cip_id'=>$res->id), true);
+if(!is_array($res2))
+ $res2 = array($res2);
?>
<h3><?php echo __('title heading configuration package').' '. $_GET['class'] ?></h3>
Modified: trunk/catalog/admin/includes/modules/pages/package.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/package.php 2012-01-03 00:05:41 UTC (rev 4007)
+++ trunk/catalog/admin/includes/modules/pages/package.php 2012-01-03 08:20:31 UTC (rev 4008)
@@ -365,7 +365,7 @@
default:
}
-echo self::$type_data.'.'.$action;
+
/// use master gabarit
return MGabCont::CallGab(self::$type_data.'.'.$action,__FUNCTION__,__CLASS__);
}
@@ -437,14 +437,14 @@
switch(self::$type_data){
case 'source':
- call_user_func(array(self::$objChild, 'SourceLoad'));
- $res=self::$FeedItem;
+ call_user_func(array(self::$objChild, 'SourceLoad'));
+ $res=self::$FeedItem;
break;
default:
- $mode=(isset($_GET['mode'])?$_GET['mode']:'');
+ $mode=(isset($_GET['mode'])?$_GET['mode']:'');
- self::load_repository($mode);
- $res=self::$FeedItem;
+ self::load_repository($mode);
+ $res=self::$FeedItem;
}
@@ -456,12 +456,12 @@
$li=array();
$match=explode('%',$sWhere);
foreach($res as $item){
- $etat=array();
- foreach(self::tep_get_modele() as $k=>$v)
- if( strpos( strtoupper((string)$item->$k),strtoupper(trim($match[1])) )===false) $etat[]=false;
- else $etat[]=true;
+ $etat=array();
+ foreach(self::tep_get_modele() as $k=>$v)
+ if( strpos( strtoupper((string)$item->$k),strtoupper(trim($match[1])) )===false) $etat[]=false;
+ else $etat[]=true;
- if(in_array(true,$etat )) $li[]=$item;
+ if(in_array(true,$etat )) $li[]=$item;
}
}
else $li=self::$FeedItem;
@@ -486,20 +486,20 @@
switch(self::$type_data){
case 'source':
- foreach(self::$list as $item){
- foreach(self::tep_get_modele() as $k=>$v) $li[$k]=(tep_not_null((string)$item->$k)? (string)$item->$k : ' ');
- $li['action']=' ';
- $res[]=$li;
- }
- break;
- default:
- foreach(self::$list as $item){
- foreach(self::tep_get_modele() as $k=>$v) $li[$k]=(string)$item->$k;
- $li[0]=(int)$item->internalID;
- $li['status']=self::get_item_status((string)$item->ident.'_'.(string)$item->level, $item);
- $li['action']=self::get_item_action($item->ident,(int)$item->internalID,$item->url_src ,$item);
- $res[]=$li;
- }
+ foreach(self::$list as $item){
+ foreach(self::tep_get_modele() as $k=>$v) $li[$k]=(tep_not_null((string)$item->$k)? (string)$item->$k : ' ');
+ $li['action']=' ';
+ $res[]=$li;
+ }
+ break;
+ default:
+ foreach(self::$list as $item){
+ foreach(self::tep_get_modele() as $k=>$v) $li[$k]=(string)$item->$k;
+ $li[0]=(int)$item->internalID;
+ $li['status']=self::get_item_status((string)$item->ident.'_'.(string)$item->level, $item);
+ $li['action']=self::get_item_action($item->ident,(int)$item->internalID,$item->url_src ,$item);
+ $res[]=$li;
+ }
}
return $res;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-01-03 00:05:49
|
Revision: 4007
http://oscss.svn.sourceforge.net/oscss/?rev=4007&view=rev
Author: oscim
Date: 2012-01-03 00:05:41 +0000 (Tue, 03 Jan 2012)
Log Message:
-----------
Amelioration , correction et developpement de l'installateur
Ajout de class sqlxx pour manipuler les db associ?\195?\169
centralisation du control des fichier install?\195?\169 , et report en base des modules, drivers, plugin en db
usage de la nouvelle table de bd pour acceder a l'ensemble des elements de configuration associ?\195?\169 a une extension
Modified Paths:
--------------
trunk/catalog/admin/includes/exts/package/CIP.php
trunk/catalog/admin/includes/exts/package/CipUtility.php
trunk/catalog/admin/includes/exts/package/ci_tag.class.php
trunk/catalog/admin/includes/exts/package/packageInstaller.php
trunk/catalog/admin/includes/exts/package/packageUtility.php
trunk/catalog/admin/includes/exts/package/tags/addfile.php
trunk/catalog/admin/includes/exts/package/tags/depend.php
trunk/catalog/admin/includes/exts/package/tags/extractzip.php
trunk/catalog/admin/includes/exts/package/tags/filesql.php
trunk/catalog/admin/includes/exts/package/tags/sql.php
trunk/catalog/admin/includes/gabarit/package/display_view.package.config.gab
trunk/catalog/admin/includes/modules/pages/package.php
trunk/catalog/install/includes/sql/mysql/data/91_osc_admin_cip.sql
trunk/catalog/install/includes/sql/mysql/tables/osc_admin_cip.sql
Added Paths:
-----------
trunk/catalog/admin/includes/classes/drivers/sqlcip.php
trunk/catalog/admin/includes/classes/drivers/sqlcip_modfiles.php
trunk/catalog/admin/includes/exts/package/cip_modfiles.php
trunk/catalog/admin/includes/gabarit/package/display_view.package.configedit.gab
trunk/catalog/install/includes/sql/mysql/tables/osc_admin_cip_modfiles.sql
Added: trunk/catalog/admin/includes/classes/drivers/sqlcip.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlcip.php (rev 0)
+++ trunk/catalog/admin/includes/classes/drivers/sqlcip.php 2012-01-03 00:05:41 UTC (rev 4007)
@@ -0,0 +1,217 @@
+<?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 03/01/12, 08:07
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+ @class sqlcip_modfiles
+ @file sqlcip_modfiles.php
+ @brief manage insert/update/delete in zone tables
+*/
+
+
+define('TABLE_MODFILES', DB_TABLE_PREFIX . 'admin_cip_modfiles');
+
+class sqlcip_modfiles
+ implements ModSqlDataDriver{
+
+ public static $modules;
+
+ protected static $_instance;
+
+ protected function __construct(){
+ }
+
+
+ public static function getInstance() {
+ if(self::$_instance == null) self::$_instance = new self();
+ return self::$_instance;
+ }
+
+
+ /**
+ @brief create new ligne in table configuration
+ */
+ public static function create($option){
+ self::getInstance();
+
+ if(!isset($option['cip_id']))
+ return 'cip_id';
+
+
+ $sql_data_array['k_cip_id'] = tep_db_prepare_input($option['cip_id']);
+ $sql_data_array['cip_filename'] = tep_db_prepare_input($option['filename']);
+ $sql_data_array['cip_folder'] = tep_db_prepare_input($option['folder']);
+ $sql_data_array['cip_type'] = tep_db_prepare_input($option['type']);
+ $sql_data_array['cip_typetype'] = tep_db_prepare_input($option['typetype']);
+ $sql_data_array['core'] = tep_db_prepare_input($option['core']);
+ $sql_data_array['cip_install'] = tep_db_prepare_input($option['install']);
+
+
+ $res=tep_db_perform(TABLE_MODFILES, $sql_data_array);
+
+ if(!$res)
+ return $res;
+ else
+ return $res->__get('insertId');
+ }
+
+ /**
+ @brief update ligne in table configuration
+ */
+ public static function update($option){
+ self::getInstance();
+
+ if(!isset($option['id']))
+ return 'id';
+
+ $where ='';
+ if(isset($option['id'])) $where .="AND rowid = '".(int)$option['id']."' ";
+ if(isset($option['cip_id'])) $where .="AND k_cip_id = '".(int)$option['cip_id']."' ";
+
+ if(isset($option['new_cip_id'])) $sql_data_array['k_cip_id'] = tep_db_prepare_input($option['cip_id']);
+
+ if(isset($option['filename'])) $sql_data_array['cip_filename'] = tep_db_prepare_input($option['filename']);
+ if(isset($option['folder'])) $sql_data_array['cip_folder'] = tep_db_prepare_input($option['folder']);
+ if(isset($option['type'])) $sql_data_array['cip_type'] = tep_db_prepare_input($option['type']);
+ if(isset($option['typetype'])) $sql_data_array['cip_typetype'] = tep_db_prepare_input($option['typetype']);
+ if(isset($option['core'])) $sql_data_array['core'] = tep_db_prepare_input($option['core']);
+ if(isset($option['install'])) $sql_data_array['cip_install'] = tep_db_prepare_input($option['install']);
+
+ $res=tep_db_perform(TABLE_MODFILES, $sql_data_array, 'update' , substr($where,3) );
+
+ return $res;
+ }
+
+ /**
+ @brief load ligne in table configuration
+ @param option array
+ id => row id int (configuration_id)
+ key => string key (configuration_key)
+ group_id => group_id int (configuration_group_id)
+ @param $shortkey use cleankey for return short key
+ @return
+
+ object(stdClass)[13]
+ public 'id' => string '1' (length=1)
+
+ OR
+ array(
+ object(stdClass)[13]
+ ...
+ object(stdClass)[13]
+ ..
+ )
+
+ */
+ public static function fetch($option,$shortkey=false){
+ self::getInstance();
+ $DB=Database::getInstance();
+
+ $sql ="";
+ if(isset($option['id'])) $sql .="AND rowid = '".(int)$option['id']."' ";
+ if(isset($option['cip_id'])) $sql .="AND k_cip_id = '".(int)$option['cip_id']."' ";
+ if(isset($option['type'])) $sql .="AND cip_type = '".(string)$option['type']."' ";
+ if(isset($option['typetype'])) $sql .="AND cip_typetype = '".(string)$option['typetype']."' ";
+ if(isset($option['core'])) $sql .="AND core = '".(int)$option['core']."' ";
+ if(isset($option['filename'])) $sql .="AND cip_filename = '".(string)$option['filename']."' ";
+ if(isset($option['folder'])) $sql .="AND cip_folder = '".(string)$option['folder']."' ";
+
+ if($sql=='')
+ return false;
+
+
+ $sql="SELECT * FROM " . TABLE_MODFILES . " a ".
+// " LEFT JOIN " . TABLE_IMAGES_USED . " g ON (a.rowid=g.rowid) ".
+ " WHERE ".substr($sql,3);
+// echo '<br>';
+ $res=$DB->query($sql);
+
+ $num = $res->__get('numRows');
+
+ if($num == 1){
+ $result=$res->fetchAssoc();
+ return ((!$shortkey)? $result : self::CleanKey($result));
+ }
+ elseif($num > 1){
+ $array=array();
+
+ foreach($res->fetchAllAssoc() as $result)
+ $array[]= ((!$shortkey)? $result : self::CleanKey($result));
+
+ return $array;
+ }
+
+ return false;
+ }
+
+ /**
+ @brief delete row
+ */
+ public static function delete($option){
+ self::getInstance();
+ $DB=Database::getInstance();
+
+ $sql ="";
+
+ if(isset($option['id'])) $sql .="AND rowid = '".(int)$option['id']."' ";
+ if(isset($option['cip_id'])) $sql .="AND k_cip_id = '".(int)$option['cip_id']."' ";
+
+ if(strlen($sql) < 5)
+ return false;
+
+ $DB->query($s="DELETE FROM " . TABLE_MODFILES ." WHERE ". substr($sql,3) );
+
+ return true;
+ }
+
+
+ /**
+ @brief
+ @return array product empty
+ */
+ public static function Specimen($shortkey=false){
+ $par = array('rowid' => '',
+ 'k_cip_id' => '',
+ 'cip_filename' => '',
+ 'cip_folder' => '',
+ 'cip_type' => '',
+ 'cip_typetype' => '',
+ 'core' => '',
+ 'cip_install' => '',
+ );
+
+ return ((!$shortkey)? $par : self::CleanKey($par));
+ }
+
+
+
+ /**
+ @fn CleanKey()
+ @brief Clean string name key
+ */
+ private static function CleanKey($array){
+ self::getInstance();
+ $object= new stdclass();
+
+ foreach($array as $key=>$value){
+ if( strpos($key,'k_') ===0)
+ $key=substr($key,2);
+ elseif( $key == 'rowid' )
+ $key='id';
+ elseif( strpos($key,'cip_') ===0)
+ $key=substr($key,4);
+
+ $object->$key = $value;
+ }
+
+ return $object;
+ }
+
+}
+
+
+?>
\ No newline at end of file
Added: trunk/catalog/admin/includes/classes/drivers/sqlcip_modfiles.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlcip_modfiles.php (rev 0)
+++ trunk/catalog/admin/includes/classes/drivers/sqlcip_modfiles.php 2012-01-03 00:05:41 UTC (rev 4007)
@@ -0,0 +1,217 @@
+<?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 03/01/12, 08:07
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+ @class sqlcip_modfiles
+ @file sqlcip_modfiles.php
+ @brief manage insert/update/delete in zone tables
+*/
+
+
+define('TABLE_MODFILES', DB_TABLE_PREFIX . 'admin_cip_modfiles');
+
+class sqlcip_modfiles
+ implements ModSqlDataDriver{
+
+ public static $modules;
+
+ protected static $_instance;
+
+ protected function __construct(){
+ }
+
+
+ public static function getInstance() {
+ if(self::$_instance == null) self::$_instance = new self();
+ return self::$_instance;
+ }
+
+
+ /**
+ @brief create new ligne in table configuration
+ */
+ public static function create($option){
+ self::getInstance();
+
+ if(!isset($option['cip_id']))
+ return 'cip_id';
+
+
+ $sql_data_array['k_cip_id'] = tep_db_prepare_input($option['cip_id']);
+ $sql_data_array['cip_filename'] = tep_db_prepare_input($option['filename']);
+ $sql_data_array['cip_folder'] = tep_db_prepare_input($option['folder']);
+ $sql_data_array['cip_type'] = tep_db_prepare_input($option['type']);
+ $sql_data_array['cip_typetype'] = tep_db_prepare_input($option['typetype']);
+ $sql_data_array['core'] = tep_db_prepare_input($option['core']);
+ $sql_data_array['cip_install'] = tep_db_prepare_input($option['install']);
+
+
+ $res=tep_db_perform(TABLE_MODFILES, $sql_data_array);
+
+ if(!$res)
+ return $res;
+ else
+ return $res->__get('insertId');
+ }
+
+ /**
+ @brief update ligne in table configuration
+ */
+ public static function update($option){
+ self::getInstance();
+
+ if(!isset($option['id']))
+ return 'id';
+
+ $where ='';
+ if(isset($option['id'])) $where .="AND rowid = '".(int)$option['id']."' ";
+ if(isset($option['cip_id'])) $where .="AND k_cip_id = '".(int)$option['cip_id']."' ";
+
+ if(isset($option['new_cip_id'])) $sql_data_array['k_cip_id'] = tep_db_prepare_input($option['cip_id']);
+
+ if(isset($option['filename'])) $sql_data_array['cip_filename'] = tep_db_prepare_input($option['filename']);
+ if(isset($option['folder'])) $sql_data_array['cip_folder'] = tep_db_prepare_input($option['folder']);
+ if(isset($option['type'])) $sql_data_array['cip_type'] = tep_db_prepare_input($option['type']);
+ if(isset($option['typetype'])) $sql_data_array['cip_typetype'] = tep_db_prepare_input($option['typetype']);
+ if(isset($option['core'])) $sql_data_array['core'] = tep_db_prepare_input($option['core']);
+ if(isset($option['install'])) $sql_data_array['cip_install'] = tep_db_prepare_input($option['install']);
+
+ $res=tep_db_perform(TABLE_MODFILES, $sql_data_array, 'update' , substr($where,3) );
+
+ return $res;
+ }
+
+ /**
+ @brief load ligne in table configuration
+ @param option array
+ id => row id int (configuration_id)
+ key => string key (configuration_key)
+ group_id => group_id int (configuration_group_id)
+ @param $shortkey use cleankey for return short key
+ @return
+
+ object(stdClass)[13]
+ public 'id' => string '1' (length=1)
+
+ OR
+ array(
+ object(stdClass)[13]
+ ...
+ object(stdClass)[13]
+ ..
+ )
+
+ */
+ public static function fetch($option,$shortkey=false){
+ self::getInstance();
+ $DB=Database::getInstance();
+
+ $sql ="";
+ if(isset($option['id'])) $sql .="AND rowid = '".(int)$option['id']."' ";
+ if(isset($option['cip_id'])) $sql .="AND k_cip_id = '".(int)$option['cip_id']."' ";
+ if(isset($option['type'])) $sql .="AND cip_type = '".(string)$option['type']."' ";
+ if(isset($option['typetype'])) $sql .="AND cip_typetype = '".(string)$option['typetype']."' ";
+ if(isset($option['core'])) $sql .="AND core = '".(int)$option['core']."' ";
+ if(isset($option['filename'])) $sql .="AND cip_filename = '".(string)$option['filename']."' ";
+ if(isset($option['folder'])) $sql .="AND cip_folder = '".(string)$option['folder']."' ";
+
+ if($sql=='')
+ return false;
+
+
+ $sql="SELECT * FROM " . TABLE_MODFILES . " a ".
+// " LEFT JOIN " . TABLE_IMAGES_USED . " g ON (a.rowid=g.rowid) ".
+ " WHERE ".substr($sql,3);
+// echo '<br>';
+ $res=$DB->query($sql);
+
+ $num = $res->__get('numRows');
+
+ if($num == 1){
+ $result=$res->fetchAssoc();
+ return ((!$shortkey)? $result : self::CleanKey($result));
+ }
+ elseif($num > 1){
+ $array=array();
+
+ foreach($res->fetchAllAssoc() as $result)
+ $array[]= ((!$shortkey)? $result : self::CleanKey($result));
+
+ return $array;
+ }
+
+ return false;
+ }
+
+ /**
+ @brief delete row
+ */
+ public static function delete($option){
+ self::getInstance();
+ $DB=Database::getInstance();
+
+ $sql ="";
+
+ if(isset($option['id'])) $sql .="AND rowid = '".(int)$option['id']."' ";
+ if(isset($option['cip_id'])) $sql .="AND k_cip_id = '".(int)$option['cip_id']."' ";
+
+ if(strlen($sql) < 5)
+ return false;
+
+ $DB->query($s="DELETE FROM " . TABLE_MODFILES ." WHERE ". substr($sql,3) );
+
+ return true;
+ }
+
+
+ /**
+ @brief
+ @return array product empty
+ */
+ public static function Specimen($shortkey=false){
+ $par = array('rowid' => '',
+ 'k_cip_id' => '',
+ 'cip_filename' => '',
+ 'cip_folder' => '',
+ 'cip_type' => '',
+ 'cip_typetype' => '',
+ 'core' => '',
+ 'cip_install' => '',
+ );
+
+ return ((!$shortkey)? $par : self::CleanKey($par));
+ }
+
+
+
+ /**
+ @fn CleanKey()
+ @brief Clean string name key
+ */
+ private static function CleanKey($array){
+ self::getInstance();
+ $object= new stdclass();
+
+ foreach($array as $key=>$value){
+ if( strpos($key,'k_') ===0)
+ $key=substr($key,2);
+ elseif( $key == 'rowid' )
+ $key='id';
+ elseif( strpos($key,'cip_') ===0)
+ $key=substr($key,4);
+
+ $object->$key = $value;
+ }
+
+ return $object;
+ }
+
+}
+
+
+?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/exts/package/CIP.php
===================================================================
--- trunk/catalog/admin/includes/exts/package/CIP.php 2012-01-02 14:25:25 UTC (rev 4006)
+++ trunk/catalog/admin/includes/exts/package/CIP.php 2012-01-03 00:05:41 UTC (rev 4007)
@@ -4,7 +4,7 @@
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 02/01/2012, 18:17
+ @date 03/01/12, 08:07
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
Original:
@@ -25,6 +25,9 @@
*/
+
+include_once(dirname(__FILE__).'/cip_modfiles.php');
+
class CIP {
public static $debugg=true;
/**
@@ -88,15 +91,20 @@
/**
Number of php tags in install.xml
*/
- var $count_php_tags=0;
+ public $count_php_tags=0;
/**
*/
- var $cip_id;
+ public $cip_id;
/**
* '1' if CIP was installed, '0' if not.
*/
- var $cip_installed;
+ public $cip_installed;
+ /**
+ @var object
+ @brief all base data current cip
+ */
+ public static $cInfo;
/**
Config
@@ -144,6 +152,8 @@
}
//! control db etat
+// $resObj = sqlcip::fetch(array());
+
$result=self::$DB->query("select cip_id, cip_installed, cip_version from ".TABLE_CIP. " where cip_folder_name='".self::$cip_name."'; ");
$installed=$result->fetchAssoc();
@@ -154,6 +164,16 @@
$this->cip_installed=(int)$installed['cip_installed'];
}
+ /// Transversal info base paquet
+ self::$cInfo = new stdClass;
+ self::$cInfo->id = $this->cip_id;
+ self::$cInfo->installed = $this->cip_installed;
+// self::$cInfo->version = $this->cip_installed;
+ self::$cInfo->name = self::$cip_name;
+
+
+// print_r(self::$cInfo);
+
define('CONTRIB_INSTALLER_NAME', 'CIP');
define('CONTRIB_INSTALLER_VERSION', 'oscss 2 2.0.1');
}
@@ -311,9 +331,12 @@
*/
private function register() {
- $resobj=self::$DB->query($sql="insert into ".TABLE_CIP." (cip_id, cip_folder_name, cip_installed, cip_ident, cip_version) values ('', '".self::$cip_name."', '0', '".$this->getIdent()."','".$this->getVersion()."')");
- $this->cip_id=$resobj->__get('insertId');
+// $resobj=self::$DB->query($sql="insert into ".TABLE_CIP." (cip_id, cip_folder_name, cip_installed, cip_ident, cip_version) values ('', '".self::$cip_name."', '0', '".$this->getIdent()."','".$this->getVersion()."')");
+// $this->cip_id=$resobj->__get('insertId');
+// if(is_object(self::$cInfo) && self::$cInfo->id > 0)
+ $this->cip_id=sqlcip::create(array('folder_name'=>self::$cip_name , 'ident'=>$this->getIdent() ,'version'=>$this->getVersion() ));
+
$this->cip_installed=0;
self::InProcess(__("register add db table_cip "), __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'info');
}
@@ -322,7 +345,8 @@
Delete in db this contrib
*/
public function unregister() {
- self::$DB->query("DELETE FROM ".TABLE_CIP." WHERE cip_folder_name='".self::$cip_name."' ");
+ if(is_object(self::$cInfo) && self::$cInfo->id > 0)
+ sqlcip::delete(array('id'=>self::$cInfo->id));
}
///================================================================== //Is installed? //==================================================================
@@ -331,6 +355,8 @@
*/
private function is_installed() {
if (!isset($this->cip_installed)) {
+
+
$result=tep_db_query("select cip_installed from ".TABLE_CIP." where cip_folder_name='".self::$cip_name."'");
if ($result===false) { trigger_error(__CLASS__.sprintf('error %s', __FUNCTION__.'::'.__LINE__), E_USER_ERROR); return $this->cip_installed=false; }
$installed=tep_db_fetch_array($result);
@@ -346,7 +372,9 @@
/**
*/
private function set_installed($status='1') {
- self::$DB->query("UPDATE ".TABLE_CIP." SET cip_installed='".$status."', cip_ident='".$this->getIdent()."', cip_version='".$this->getVersion()."' WHERE cip_folder_name='".self::$cip_name."'");
+ if(is_object(self::$cInfo) && self::$cInfo->id > 0)
+ sqlcip::update(array('id'=>self::$cInfo->id, 'installed'=>(int)$status ,'version'=>$this->getVersion() ));
+
self::InProcess(__("Install update db table_cip "), __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'normal');
}
@@ -491,27 +519,28 @@
}
//! backup
- if (!$this->total_backup()){
- self::InProcess(__("Erreur durant traitement de cette fonction total_backup()"), __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
- return false;
- }
+// if (!$this->total_backup()){
+// self::InProcess(__("Erreur durant traitement de cette fonction total_backup()"), __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
+// return false;
+// }
//! We passed by all checks. So if an error appears
foreach ($this->contrib_data as $id=>$tag)
if ( $tag->do_install() ===false){
- self::InProcess(__("Erreur durant traitement de cette fonction "),'tag_xml-['.$id.']'. $tag->tag_name.'->do_install()','block');
- break;
+ self::InProcess(__("Erreur durant traitement de cette fonction "),'tag_xml-['.$id.']'. $tag->tag_name.'->do_install()','block');
+ break;
}
//! If we had a problems at runtime we should remove this CIP.
- if (!self::check_bylevel(1)) $this->remove(true);
- else {
- $this->DeleteContribFull(false, 'ok');
-
- //! up db etat install cip name
+// if (!self::check_bylevel(1))
+// $this->remove(true);
+// else {
+// $this->DeleteContribFull(false, 'ok');
+//
+// //! up db etat install cip name
$this->set_installed();
- }
+// }
}
/**
@@ -584,12 +613,13 @@
if (self::$error=(int)$tag->do_install()) break;
//! If we had a problems at runtime we should remove this CIP.
- if (self::$error) $this->remove(true);
- else {
- if ($this->was_unpacked() && $this->is_unpacked()) {
- fileUtility::_rmdir(DIR_FS_CIP.$this->get_cip_name());
- }
- }
+// if (self::$error)
+// $this->remove(true);
+// else {
+// if ($this->was_unpacked() && $this->is_unpacked()) {
+// fileUtility::_rmdir(DIR_FS_CIP.$this->get_cip_name());
+// }
+// }
}
///================================================================== //Backup //==================================================================
@@ -598,24 +628,24 @@
//! prepare backup folder:
if (!is_dir(self::PATH_BACKUP.self::$cip_name)) {
if (!@mkdir(self::PATH_BACKUP.self::$cip_name, 0777)){
- self::InProcess(__("write permissins needed text").self::PATH_BACKUP.self::$cip_name, __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'error');
- return false;
+ self::InProcess(__("write permissins needed text").self::PATH_BACKUP.self::$cip_name, __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'error');
+ return false;
}
fileUtility::_chmod(self::PATH_BACKUP.self::$cip_name, 0777);
}
- if ( _cst_bool('ALLOW_FILES_BACKUP')){
+// if ( _cst_bool('ALLOW_FILES_BACKUP')){
//! Backup Files:
- if (!$this->backup() || !self::check_bylevel(1) /* !$this->is_all_right()*/){
- self::InProcess(__("Erreur apres traitement de cette fonction : backup()"), __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
- return false;
- }
+// if (!$this->backup() || !self::check_bylevel(1) /* !$this->is_all_right()*/){
+// self::InProcess(__("Erreur apres traitement de cette fonction : backup()"), __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
+// return false;
+// }
//! Backup DataBase:
- if (!CipUtility::sql_backup() || !self::check_bylevel(1)){
- self::InProcess(__("Erreur apres traitement de cette fonction : CipUtility::sql_backup()"), __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
- return false;
- }
- }
+// if (!CipUtility::sql_backup() || !self::check_bylevel(1)){
+// self::InProcess(__("Erreur apres traitement de cette fonction : CipUtility::sql_backup()"), __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
+// return false;
+// }
+// }
return true;
}
@@ -795,12 +825,12 @@
@return tag ident
*/
function getIdent(){
- if(self::$ident!=null) return self::$ident;
- if(isset($this->description_id) && isset( $this->contrib_data[$this->description_id]->data['ident']))
- return self::$ident=$this->contrib_data[$this->description_id]->data['ident'];
-
- self::InProcess(__("pas de tag de ident (obligatoire)"), __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
- return false;
+// if(self::$ident!=null) return self::$ident;
+// if(isset($this->description_id) && isset( $this->contrib_data[$this->description_id]->data['ident']))
+// return self::$ident=$this->contrib_data[$this->description_id]->data['ident'];
+ return self::$ident = self::$cip_name;
+// self::InProcess(__("pas de tag de ident (obligatoire)"), __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
+// return false;
}
/**
Modified: trunk/catalog/admin/includes/exts/package/CipUtility.php
===================================================================
--- trunk/catalog/admin/includes/exts/package/CipUtility.php 2012-01-02 14:25:25 UTC (rev 4006)
+++ trunk/catalog/admin/includes/exts/package/CipUtility.php 2012-01-03 00:05:41 UTC (rev 4007)
@@ -4,7 +4,7 @@
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 02/01/2012, 18:17
+ @date 03/01/12, 08:07
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
Modified: trunk/catalog/admin/includes/exts/package/ci_tag.class.php
===================================================================
--- trunk/catalog/admin/includes/exts/package/ci_tag.class.php 2012-01-02 14:25:25 UTC (rev 4006)
+++ trunk/catalog/admin/includes/exts/package/ci_tag.class.php 2012-01-03 00:05:41 UTC (rev 4007)
@@ -4,7 +4,7 @@
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 02/01/2012, 18:17
+ @date 03/01/12, 08:07
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
Original:
@@ -139,23 +139,25 @@
return $this->get_fs_filename($this->data['filename']);
}
- function get_fs_filename($fname) {
- if($this->isJoscom()){
+ public static function get_fs_filename($fname) {
+// if($this->isJoscom()){
$fname = str_replace(DIR_WS_CATALOG,"",$fname);
$fname = str_replace(DIR_WS_ADMIN,"admin/",$fname);
-
+//
if (strpos($fname, "admin/") === false) {
- $filepath = DIR_FS_CATALOG;
+ $filepath = DIR_FS_CATALOG;
} else {
- $filepath = DIR_FS_ADMIN;
- $fname = substr($fname, 6);
+ $filepath = DIR_FS_ADMIN;
+ $fname = substr($fname, 6);
}
return $filepath.$fname;
- }else{
- if ($fname)return DIR_FS_CATALOG.$fname;
- }
+// }else{
+// if ($fname)return DIR_FS_CATALOG.$fname;
+// }
}
+
+
function isJoscom(){return ((defined("JOSCOM_VERSION")) ? true : false);}
/**
@@ -318,66 +320,77 @@
///======================================================================= //Backup //=======================================================================
-// public function backup_file($filename=''){
-// $filename=((isset($filename))
-// ? (is_array($filename)
-// ? $filename
-// : array($filename)
-// )
-// : ((isset($this->data['filename']))
-// ? $this->data['filename']
-// : ''
-// )
-// );
-//
-// if(is_array($filename)) $filenames= $filename;
-// else $filenames[0] = $filename;
-//
-// foreach($filenames as $filename){
-// $full_path=$this->get_fs_filename($filename);
-// if(!is_file($full_path) or is_link($full_path))return false;
-//
-// // CIP::$ArrayError[]=
-// if(!$res=fileUtility::_mkdir(dirname(CIP::PATH_BACKUP.$this->contrib.'/'.$filename).'/'))CIP::InProcess(__('_medir error'). implode(',',$res). " to ".CIP::PATH_BACKUP.$this->contrib.'/'.$filename, __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
-//
-// if(in_array(false,CIP::$ArrayError)) return false ;
-//
-// if(!fileUtility::_copy($full_path, CIP::PATH_BACKUP.$this->contrib.'/'.$filename)){
-// CIP::InProcess(__('couldnt copy to text'). $full_path. " to ".CIP::PATH_BACKUP.$this->contrib.'/'.$filename, __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
-// return false;
-// }
-// elseif (file_exists(CIP::PATH_BACKUP.$this->contrib.'/'.$filename))
-// fileUtility::_chmod(CIP::PATH_BACKUP.$this->contrib.'/'.$filename, 0777);
-//
-// }
-// return true;
-// }
-// public function restore_file($filename=''){
-// $filename=((isset($filename)) ? $filename : ((isset($this->data['filename'])) ? $this->data['filename'] : ''));
-// if (!isset($filename)) return false;
-// if(is_array($filename)) $filenames= $filename;
-// else $filenames[0] = $filename;
-//
-// foreach($filenames as $filename){
-// $backup_file=CIP::PATH_BACKUP.$this->contrib.'/'.$filename;
-// $current_file=$this->get_fs_filename($filename);
-// if(is_link($current_file)) return false;
-// //Remove current_file
-// fileUtility::_rmdir($current_file);
-// if (!is_file($backup_file)) return false;
-// //Restore
-// if (!fileUtility::_copy($backup_file, $current_file)) {
-// CIP::InProcess(__("Couldn't restore file ").' '. $filename. __("from").' '.$backup_file, __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
-// return false;
-// }
-// else{
-// if(!ci_remove($backup_file)) return false;
-// }
-// }
-// return true;
-// }
+ /**
+ @brief backup one file
+ @param $filename absolute path required
+ */
+ public static function backup_file($filename){
+ $filename=( is_array($filename)
+ ? $filename
+ : array($filename)
+ );
+ if(is_array($filename)) $filenames= $filename;
+ else $filenames[0] = $filename;
+
+ foreach($filenames as $full_path){
+// echo $full_path.'<br>';
+// $full_path=self::get_fs_filename($filename);
+
+
+ if(strpos('_'.$full_path, DIR_FS_ADMIN)> 0 )
+ $filename = str_replace(DIR_FS_ADMIN,'',$full_path);
+ elseif(strpos('_'.$full_path, DIR_FS_CATALOG)>0)
+ $filename = str_replace(DIR_FS_CATALOG,'',$full_path);
+ else
+ $filename = $full_path;
+
+
+ if(!is_file($full_path)
+ or is_link($full_path))
+ return false;
+
+ if(!$res=fileUtility::_mkdir(dirname(CIP::PATH_BACKUP.CIP::$cInfo->name.'/'.$filename).'/'))
+ CIP::InProcess(__('_medir error'). implode(',',$res). " to ".CIP::PATH_BACKUP.CIP::$cInfo->name.'/'.$filename, __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
+
+
+ if(!fileUtility::_copy($full_path, CIP::PATH_BACKUP.CIP::$cInfo->name.'/'.$filename)){
+ CIP::InProcess(__('couldnt copy to text'). $full_path. " to ".CIP::PATH_BACKUP.CIP::$cInfo->name.'/'.$filename, __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
+ return false;
+ }
+ elseif (file_exists(CIP::PATH_BACKUP.CIP::$cInfo->name.'/'.$filename))
+ fileUtility::_chmod(CIP::PATH_BACKUP.CIP::$cInfo->name.'/'.$filename, 0777);
+
+ }
+ return true;
+ }
+
+ public function restore_file($filename=''){
+ $filename=((isset($filename)) ? $filename : ((isset($this->data['filename'])) ? $this->data['filename'] : ''));
+ if (!isset($filename)) return false;
+ if(is_array($filename)) $filenames= $filename;
+ else $filenames[0] = $filename;
+
+ foreach($filenames as $filename){
+ $backup_file=CIP::PATH_BACKUP.$this->contrib.'/'.$filename;
+ $current_file=self::get_fs_filename($filename);
+ if(is_link($current_file)) return false;
+ //Remove current_file
+ fileUtility::_rmdir($current_file);
+ if (!is_file($backup_file)) return false;
+ //Restore
+ if (!fileUtility::_copy($backup_file, $current_file)) {
+ CIP::InProcess(__("Couldn't restore file ").' '. $filename. __("from").' '.$backup_file, __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
+ return false;
+ }
+ else{
+ if(!ci_remove($backup_file)) return false;
+ }
+ }
+ return true;
+ }
+
//=======================================================================
//Helpfull functions:
//=======================================================================
Added: trunk/catalog/admin/includes/exts/package/cip_modfiles.php
===================================================================
--- trunk/catalog/admin/includes/exts/package/cip_modfiles.php (rev 0)
+++ trunk/catalog/admin/includes/exts/package/cip_modfiles.php 2012-01-03 00:05:41 UTC (rev 4007)
@@ -0,0 +1,218 @@
+<?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 03/01/12, 08:07
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+ @class cip_modfiles
+*/
+
+
+class cip_modfiles{
+ /**
+ @var ressource link
+ */
+ protected static $_instance;
+
+ /**
+ */
+ protected function __construct(){
+
+ }
+
+ /**
+ */
+ public static function getInstance() {
+ if(self::$_instance == null)
+ self::$_instance = new self();
+
+ return self::$_instance;
+ }
+
+ /**
+ */
+ public static function resetInstance() {
+ self::$_instance = null;
+ return self::getInstance();
+ }
+
+
+
+
+ /**
+ @fn AdjustModFiles($array)
+ @brief
+ @param $array array
+ */
+ public static function AdjustModFiles($array){
+
+ if(!is_array($array))
+ $array=array($array);
+
+ foreach($array as $fs_filename){
+ $process = false;
+ /**
+ @remarks file process
+ */
+ if(!is_dir(DIR_FS_CIP.CIP::$cInfo->name.'/catalog/'.$fs_filename)){
+ if(!in_array(substr($fs_filename, 0,-4), array('.svn', '.csv')) && substr($fs_filename, 0,-1) !='~' ){
+// echo $fs_filename .'<br>';
+// echo DIR_FS_CIP.CIP::$cInfo->name.'/catalog/'.$fs_filename .'---'.DIR_FS_CATALOG . replace_path_admin($fs_filename) .'<br>';
+
+
+ $act_install=self::CheckBackupFile(DIR_FS_CIP.CIP::$cInfo->name.'/catalog/'.$fs_filename , DIR_FS_CATALOG . replace_path_admin($fs_filename) );
+// var_dump($act_install, basename($fs_filename));
+// echo '<br>';
+ /**
+ @remarks Not File language
+ */
+ if(!preg_match('#(/languages/)#i', $fs_filename)){
+
+ /// modules
+ if(preg_match('#(modules/)([a-zA-Z0-9_]*)/([a-zA-Z0-9_.-]*)(\.[a-z]{2,4})$#i', $fs_filename, $match)){
+ // Array
+ // (
+ // [0] => modules/products/prdct_package.php
+ // [1] => modules/
+ // [2] => products
+ // [3] => prdct_package
+ // [4] => .php
+ // )
+ $filename = $match[3].$match[4];
+ $folder = dirname($match[0]);
+ $type='module';
+ $typetype=$match[2];
+ $core = ((strpos( '_'.$fs_filename, 'admin')>0)?'1':'0');
+ $process = true;
+ }
+ elseif(preg_match('#(plugins/)([a-zA-Z0-9_]*)/([a-zA-Z0-9_.-]*)(\.[a-z]{2,4})$#i', $fs_filename, $match)){
+ // Array
+ // (
+ // [0] => modules/products/prdct_package.php
+ // [1] => modules/
+ // [2] => products
+ // [3] => prdct_package
+ // [4] => .php
+ // )
+
+ $filename = $match[3].$match[4];
+ $folder = dirname($match[0]);
+ $type='plugin';
+ $typetype=$match[2];
+ $core = ((strpos('_admin', $fs_filename)>0)?'1':'0');
+ $process = true;
+ }
+ elseif(preg_match('#(drivers/)([a-zA-Z0-9_]*)/([a-zA-Z0-9_.-]*)(\.[a-z]{2,4})$#i', $fs_filename, $match)){
+ // Array
+ // (
+ // [0] => modules/products/prdct_package.php
+ // [1] => modules/
+ // [2] => products
+ // [3] => prdct_package
+ // [4] => .php
+ // )
+
+ $filename = $match[3].$match[4];
+ $folder = dirname($match[0]);
+ $type='drivers';
+ $typetype=$match[2];
+ $core = ((strpos('_admin', $fs_filename)>0)?'1':'0');
+ $process = true;
+ }
+ }
+ }
+ }
+
+ if($process){
+
+ $test=array(
+ 'cip_id'=>CIP::$cInfo->id,
+ 'filename'=>$filename,
+ 'folder'=>$folder,
+ 'type'=>$type,
+ 'typetype'=>$typetype,
+ 'core'=>$core,
+ // 'install'=>'i',
+ );
+
+
+ $obj = sqlcip_modfiles::fetch($test, true);
+
+ $myarray=array(
+ 'cip_id'=>CIP::$cInfo->id,
+ 'filename'=>$filename,
+ 'folder'=>$folder,
+ 'type'=>$type,
+ 'typetype'=>$typetype,
+ 'core'=>$core,
+ 'install'=>$act_install,
+ );
+
+ if($obj !=false && is_object($obj)){
+ $myarray['id']=$obj->id;
+ $res = sqlcip_modfiles::update($myarray);
+ }
+ else {
+ $res = sqlcip_modfiles::create($myarray);
+ }
+ }
+ }
+ }
+
+
+ /**
+ @brief adjust copie or not if file exists in core, and retrun operation for stock db
+ @param $cip_file path cip file
+ @param $fs_filename core file
+ @param $remove boolean specific for remove file in upgrade core
+ @return string process install
+ i : install add file
+ rp : replace
+ rm : remove
+ n : no touch identique
+ ef : no found core file
+ eg : no found cip file
+ */
+ private static function CheckBackupFile($cip_file, $fs_filename, $remove=false){
+// echo $fs_filename .'<br>';
+ if($remove){
+ if( is_file($fs_filename) )
+ return 'rm';
+ else
+ return 'ef';
+ }
+ else {
+ if (!is_file($fs_filename))
+ return 'i';
+ else {
+ //!if file is copied
+ if(fileUtility::equal_files($cip_file,$fs_filename)){
+// CIP::InProcess("Run time : ".__('les fichiers sont identique ok! sortie pour ').$fs_filename, __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'info');
+ return 'n';
+ // continue;
+ }
+
+ /**
+ If file exists we should backup them. Later we could restore him.
+ If we couldn't backup we should print an error and stop.
+ If Total_Backup havn't been done we should do it.
+ */
+ // if (_cst_bool('ALLOW_FILES_BACKUP'))
+ ContribInstallerBaseTag::backup_file($fs_filename);
+
+ if(!fileUtility::_unlink( $fs_filename))
+ CIP::InProcess("Run time error: ".__('impossible supprimer ce fichier ').$fs_filename, __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'info');
+
+ return 'rp';
+ }
+ }
+ }
+
+
+}
+
+
+?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/exts/package/packageInstaller.php
===================================================================
--- trunk/catalog/admin/includes/exts/package/packageInstaller.php 2012-01-02 14:25:25 UTC (rev 4006)
+++ trunk/catalog/admin/includes/exts/package/packageInstaller.php 2012-01-03 00:05:41 UTC (rev 4007)
@@ -4,7 +4,7 @@
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 02/01/2012, 18:17
+ @date 03/01/12, 08:07
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class packageInstaller
@@ -40,15 +40,15 @@
$dest=fopen(DIR_FS_CIP.(string)$obj->item->ident.'_'.(string)$obj->item->level.'.zip',"wb");
if($this->fetchRemote((string)$obj->item->url_src,$dest)) {
- $messageStack->add_session('good', 'succes');
- fclose($dest);
+ $messageStack->add_session('good', 'succes');
+ fclose($dest);
- $cip= new CIP( (string)$obj->item->ident.'_'.(string)$obj->item->level.'.zip');
- tep_redirect(tep_href_link(self::FILENAME, 'action=view&pkgID='.$pkgID));
+ $cip= new CIP( (string)$obj->item->ident.'_'.(string)$obj->item->level.'.zip');
+ tep_redirect(tep_href_link(self::FILENAME, 'action=view&pkgID='.$pkgID));
}
else{
- $messageStack->add_session('error recup zip url ', 'error');
- tep_redirect(tep_href_link(self::FILENAME));
+ $messageStack->add_session('error recup zip url ', 'error');
+ tep_redirect(tep_href_link(self::FILENAME));
}
}
}
@@ -105,6 +105,7 @@
$cip= new CIP( (string)$obj->item->ident.'_'.(string)$obj->item->level.'.zip');
$cip->install();
+
if (ErrorAndBlockProcess::$error) $messageStack->add('error in process install', 'error');
else $messageStack->add(__('msg was installed'), 'installed');
Modified: trunk/catalog/admin/includes/exts/package/packageUtility.php
===================================================================
--- trunk/catalog/admin/includes/exts/package/packageUtility.php 2012-01-02 14:25:25 UTC (rev 4006)
+++ trunk/catalog/admin/includes/exts/package/packageUtility.php 2012-01-03 00:05:41 UTC (rev 4007)
@@ -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.1
- @date 31/10/11, 08:07
+ @date 03/01/12, 08:07
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class packageUtility
@@ -212,6 +212,9 @@
}
}
+
+// print_r(parent::$modules_array);
+
}
/**
Modified: trunk/catalog/admin/includes/exts/package/tags/addfile.php
===================================================================
--- trunk/catalog/admin/includes/exts/package/tags/addfile.php 2012-01-02 14:25:25 UTC (rev 4006)
+++ trunk/catalog/admin/includes/exts/package/tags/addfile.php 2012-01-03 00:05:41 UTC (rev 4007)
@@ -6,7 +6,7 @@
@Support: http://forums.oscommerce.com/index.php?showuser=20490, http://forums.oscommerce.com/index.php?showtopic=156667
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 31/10/11, 08:07
+ @date 03/01/12, 08:07
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class Tc_addfile
@@ -125,7 +125,7 @@
$backup_file=DIR_FS_BACKUP.CONTRIB_INSTALLER_NAME."_".CONTRIB_INSTALLER_VERSION.'/'. $this->data['filename'][$i];
// check if file is already copied
- if($this->equal_files($backup_file,$fs_filename)) continue;
+ if(fileUtility::equal_files($backup_file,$fs_filename)) continue;
if (!_cst_bool('ALLOW_OVERWRITE_MODIFIED')) {
if (!is_file($cip_file)) {
@@ -139,7 +139,7 @@
CIP::InProcess($msg, __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'noblock');
}
- elseif (file_exists($fs_filename) && file_exists($backup_file)&& !$this->equal_files($fs_filename, $backup_file)) {
+ elseif (file_exists($fs_filename) && file_exists($backup_file)&& !fileUtility::equal_files($fs_filename, $backup_file)) {
$msg="File ".$current_file." exists and was modified since Contrib Installer have been installed. Overwriting is not allowed.<br /><b>CIP.NET.UA Advise</b>:<br />Set \"Allow Overwrite Existing Modified Files\" to TRUE or change install.xml.";
CIP::InProcess($msg, __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
return false;
@@ -173,7 +173,7 @@
*/
if (!_cst_bool('ALLOW_OVERWRITE_MODIFIED')) {
if (is_file($cip_file)) {
- if (!$this->equal_files($current_file, $cip_file)) {
+ if (!fileUtility::equal_files($current_file, $cip_file)) {
CIP::InProcess("File ".$current_file." exists and was modified since CIP have been installed. Overwriting is not allowed.<br /><b>CIP.NET.UA Advise</b>:<br />Set \"Allow Overwrite Existing Modified Files\" to TRUE or change install.xml.".$cip_file, __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
return false;
}
@@ -196,43 +196,50 @@
/**-----------------------------EXE--------------------------- */
public function do_install() {
- if (!CIP::check_bylevel(1)) return false;
+ if (!CIP::check_bylevel(1)) return false;
for($i = 0; $i < count($this->data['filename']);$i++){
- $cip_file=DIR_FS_CIP.$this->contrib.'/'.$this->data['srcdir'][$i].'/'.$this->data['filename'][$i];
- $fs_filename=replace_path_admin($this->fs_filename($i));
+ $cip_file=DIR_FS_CIP.$this->contrib.'/'.$this->data['srcdir'][$i].'/'.$this->data['filename'][$i];
- if (!file_exists($cip_file) && is_file($cip_file)) {
- CIP::InProcess("Run time error: <strong>".__("le fichier de la contrib n'existe pas ")."</strong><br /> fichier :: ".$cip_file, __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
- return true;
- }
- if (is_file($fs_filename)) {
- //!if file is copied
- if($this->equal_files($cip_file,$fs_filename)){
- CIP::InProcess("Run time : ".__('les fichiers sont identique ok! sortie pour ').$fs_filename, __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'info');
- continue;
- }
- /**
- If file exists we should backup them. Later we could restore him.
- If we couldn't backup we should print an error and stop.
- If Total_Backup havn't been done we should do it.
- */
- if (_cst_bool('ALLOW_FILES_BACKUP')) parent::backup_file(replace_path_admin($this->data['filename'][$i]));
+ $fs_filename=replace_path_admin($this->fs_filename($i));
- if(!ci_remove($this->fs_filename($i)))CIP::InProcess("Run time error: ".__('impossible supprimer ce fichier ').$fs_filename, __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'info');
- }
+ if (!file_exists($cip_file) && is_file($cip_file)) {
+ CIP::InProcess("Run time error: <strong>".__("le fichier de la contrib n'existe pas ")."</strong><br /> fichier :: ".$cip_file, __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
+ return true;
+ }
+ if (is_file($fs_filename)) {
+
+ //!if file is copied
+ if(fileUtility::equal_files($cip_file,$fs_filename)){
+ CIP::InProcess("Run time : ".__('les fichiers sont identique ok! sortie pour ').$fs_filename, __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'info');
+ continue;
+ }
+
+ /**
+ If file exists we should backup them. Later we could restore him.
+ If we couldn't backup we should print an error and stop.
+ If Total_Backup havn't been done we should do it.
+ */
+// if (_cst_bool('ALLOW_FILES_BACKUP'))
+ parent::backup_file(replace_path_admin($this->data['filename'][$i]));
+
+ if(!ci_remove($this->fs_filename($i)))
+ CIP::InProcess("Run time error: ".__('impossible supprimer ce fichier ').$fs_filename, __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'info');
+
+ }
+
//! We copy file to right location:
if(fileUtility::_copy($cip_file, $fs_filename) ===false) {
- CIP::InProcess("Run time error: ".__('couldnt copy to text')."<br /> original:: ".$cip_file."<br /> copy:: ".$fs_filename, __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
-// trigger_error(__CLASS__.sprintf(' error %s', __FUNCTION__), E_USER_ERROR);
- return false;
+ CIP::InProcess("Run time error: ".__('couldnt copy to text')."<br /> original:: ".$cip_file."<br /> copy:: ".$fs_filename, __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
+ return false;
}
- if (file_exists($fs_filename))fileUtility::_chmod($fs_filename, 0777);
+ if (file_exists($fs_filename))
+ fileUtility::_chmod($fs_filename, 0777);
}
return true;
@@ -242,14 +249,13 @@
foreach($this->data['filename'] as $file){
$fs_file=replace_path_admin($file);
if(!in_array($this->get_fs_filename($file) ,self::$Exceptions)){
- $backup_file=DIR_FS_BACKUP.$this->contrib.'/'.$file;
- if (_cst_bool('ALLOW_FILES_RESTORE') && file_exists($backup_file) && !dir($backup_file) ){
- if(!parent::restore_file($file)) return false;
- }
- else{
- if(!ci_remove(DIR_FS_CATALOG.$fs_file)) return false;
- }
-
+ $backup_file=DIR_FS_BACKUP.$this->contrib.'/'.$file;
+ if (_cst_bool('ALLOW_FILES_RESTORE') && file_exists($backup_file) && !dir($backup_file) ){
+ if(!parent::restore_file($file)) return false;
+ }
+ else{
+ if(!ci_remove(DIR_FS_CATALOG.$fs_file)) return false;
+ }
}
}
return true;
Modified: trunk/catalog/admin/includes/exts/package/tags/depend.php
===================================================================
--- trunk/catalog/admin/includes/exts/package/tags/depend.php 2012-01-02 14:25:25 UTC (rev 4006)
+++ trunk/catalog/admin/includes/exts/package/tags/depend.php 2012-01-03 00:05:41 UTC (rev 4007)
@@ -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 26/07/10, 11:30
+ @version 2.1.1
+ @date 03/01/12, 08:07
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@portion code by Imrich Schindler <ischindl at progis.sk>
Modified: trunk/catalog/admin/includes/exts/package/tags/extractzip.php
===================================================================
--- trunk/catalog/admin/includes/exts/package/tags/extractzip.php 2012-01-02 14:25:25 UTC (rev 4006)
+++ trunk/catalog/admin/includes/exts/package/tags/extractzip.php 2012-01-03 00:05:41 UTC (rev 4007)
@@ -4,7 +4,7 @@
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 02/01/2012, 18:17
+ @date 03/01/12, 08:07
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@@ -47,11 +47,11 @@
function get_data_from_xml_parser($xml_data='') {
$this->data['zip'] =$this->getTagAttr($xml_data,'zip',0,'name');
- $this->data['path'] =replace_path_admin(trim(str_replace("%TEMPLATE_NAME%",TEMPLATE_NAME,$this->getTagAttr($xml_data,'path',0,'name')))) ;
+ $tag = $this->getTagAttr($xml_data,'path',0,'name');
+ $this->data['path'] =replace_path_admin(trim(str_replace("%TEMPLATE_NAME%",TEMPLATE_NAME,$tag))) ;
+ $le_file=DIR_FS_CIP.$this->contrib.'/'.$this->data['zip'];
- $le_file=DIR_FS_CIP.'/'.$this->contrib.'/'.$this->data['zip'];
-
self::$PclZip = new PclZip( $le_file );
if($this->cip->is_Windows()) if(!defined('OS_WINDOWS'))define('OS_WINDOWS',1);
else if(!defined('OS_WINDOWS'))define('OS_WINDOWS',0);
@@ -60,7 +60,10 @@
}
+ protected static function loadZipFile(){
+ }
+
function write_to_xml() {
return '
<'.$this->tag_name.'>
@@ -73,12 +76,13 @@
public function permissions_check_for_install() {
if (!CIP::check_bylevel(1))return false;
+ reset($this->zipContent );
foreach($this->zipContent as $row){
- $rs_filename=replace_path_admin($row);
+ $rs_filename=replace_path_admin($row['filename']);
- $path=dirname($rs_filename['filename']);
- $fs_filename = $rs_filename['filename'];
+ $path=dirname($rs_filename); //['filename']);
+ $fs_filename = $rs_filename; //['filename'];
// if(!is_dir($path))
// parent::recursive_mkdir($path);
@@ -101,37 +105,37 @@
public function conflicts_check_for_install() {
if (!CIP::check_bylevel(1)) return false;
-
+ reset($this->zipContent );
foreach($this->zipContent as $row){
- $rs_filename=replace_path_admin($row);
+ $rs_filename=replace_path_admin($row['filename']);
- $path=dirname($rs_filename['filename']);
- $fs_filename = $rs_filename['filename'];
+ $path=dirname($rs_filename); //['filename']);
+ $fs_filename = $rs_filename; //['filename'];
$backup_file=DIR_FS_BACKUP.CONTRIB_INSTALLER_NAME."_".CONTRIB_INSTALLER_VERSION.'/'. $fs_filename;
// check if file is already copied
- if($this->equal_files($backup_file,$fs_filename)) continue;
+// if(fileUtility::equal_files($backup_file,$fs_filename)) continue;
- if (!_cst_bool('ALLOW_OVERWRITE_MODIFIED')) {
- if (!is_file($fs_filename)) {
-
- $msg="Backup file ".$backup_file." is not exists. This file needed to check if file". $fs_filename. " was modified since Contrib Installer have been installed.
- <br /><b>CIP.NET.UA Advise</b>:<br />
- Set \"Allow Overwrite Existing Modified Files\" to TRUE and all modified files will be overwritten.
- All changes will be lost!<br />
- <i>or</i><br />
- Copy clean osCommerce files to ".DIR_FS_CIP."/".CONTRIB_INSTALLER_NAME."_".CONTRIB_INSTALLER_VERSION. "/catalog/ and try again.";
-
- CIP::InProcess($msg, __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'noblock');
- }
- elseif (file_exists($fs_filename) && file_exists($backup_file)&& !$this->equal_files($fs_filename, $backup_file)) {
- $msg="File ".$fs_filename." exists and was modified since Contrib Installer have been installed. Overwriting is not allowed.<br /><b>CIP.NET.UA Advise</b>:<br />Set \"Allow Overwrite Existing Modified Files\" to TRUE or change install.xml.";
- CIP::InProcess($msg, __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
- return false;
- }
- }
+// if (!_cst_bool('ALLOW_OVERWRITE_MODIFIED')) {
+// if (!is_file($fs_filename)) {
+//
+// $msg="Backup file ".$backup_file." is not exists. This file needed to check if file". $fs_filename. " was modified since Contrib Installer have been installed.
+// <br /><b>CIP.NET.UA Advise</b>:<br />
+// Set \"Allow Overwrite Existing Modified Files\" to TRUE and all modified files will be overwritten.
+// All changes will be lost!<br />
+// <i>or</i><br />
+// Copy clean osCommerce files to ".DIR_FS_CIP."/".CONTRIB_INSTALLER_NAME."_".CONTRIB_INSTALLER_VERSION. "/catalog/ and try again.";
+//
+// CIP::InProcess($msg, __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'noblock');
+// }
+// elseif (file_exists($fs_filename) && file_exists($backup_file)&& !fileUtility::equal_files($fs_filename, $backup_file)) {
+// $msg="File ".$fs_filename." exists and was modified since Contrib Installer have been installed. Overwriting is not allowed.<br /><b>CIP.NET.UA Advise</b>:<br />Set \"Allow Overwrite Existing Modified Files\" to TRUE or change install.xml.";
+// CIP::InProcess($msg, __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
+// return false;
+// }
+// }
}
return true;
}
@@ -141,11 +145,10 @@
public function do_install() {
- if(!$this->unpack_plus($this->data['zip'],$this->data['path']))
+ if(!$this->unpack_plus($this->data['zip'],$this->data['path']) )
return false;
else{
-
- // deplacement admin
+ //deplacement admin
$folder_admin=substr(DIR_WS_ADMIN, strlen(DIR_WS_CATALOG) );
if(file_exists(DIR_FS_CATALOG.'admin') && $folder_admin !='admin/' ){
@@ -160,18 +163,32 @@
public function do_remove() {
+ reset($this->zipContent );
foreach($this->zipContent as $row){
- $rs_filename=replace_path_admin($row);
+ $rs_filename=replace_path_admin($row['filename']);
- $path=dirname($rs_filename['filename']);
- $fs_filename = $rs_filename['filename'];
+ $path=dirname($rs_filename); //['filename']);
+ $fs_filename = $rs_filename; //['filename'];
- if(file_exists(DIR_FS_CATALOG.$fs_filename) && is_writable(DIR_FS_CATALOG.$fs_filename) && !is_dir(DIR_FS_CATALOG.$fs_filename) ){
- if(! fileUtility::_unlink(DIR_FS_CATALOG. $fs_filename) ){
- CIP::InProcess(__('write file permissins needed text').' '.$fs_filename, __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'noblock');
-// return false;
- }
+// var_dump(file_exists(DIR_FS_CATALOG.$fs_filename),$fs_filename);
+// echo '<br>';
+ if(!is_dir(DIR_FS_CATALOG.$fs_filename) ){
+// var_dump(DIR_FS_CATALOG.$fs_filename);
+// echo '<br>';
+
+ if(file_exists(DIR_FS_CATALOG.$fs_filename) && is_writable(DIR_FS_CATALOG.$fs_filename) ){
+ // var_dump($fs_filename);
+// echo '<br>';
+ if(! fileUtility::_unlink(DIR_FS_CATALOG. $fs_filename) ){
+ CIP::InProcess(__('write file permissins needed text').' '.$fs_filename, __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'noblock');
+ // return false;
+ }
+ }
+ else{
+var_dump(DIR_FS_CATALOG.$fs_filename);
+echo '<br>';
+}
}
}
return true;
@@ -183,8 +200,22 @@
/** =============================================================== PRIVATE =============================================================== */
private function unpack_plus($file,$dir) {
+ $DB = Database::getInstance();
+// var_dump('unpack_plus '.$dir);
+// return true;
+ /**
+ @brief add in db table for list modules
+ */
+ foreach($this->zipContent as $row)
+ $arr_filename[]=$row['filename'];
+
+ cip_modfiles::AdjustModFiles($arr_filename);
+
+ reset($this->zipContent);
+
$ret = self::$PclZip->extract( PCLZIP_OPT_PATH, DIR_FS_CATALOG.$dir );
+// exit;
if($ret == 0) {
// CIP::$error=true;
// trigger_error(__CLASS__.sprintf(' error %s', __FUNCTION__).__('Unrecoverable error "').$zipfile->errorName(true).$le_file , E_USER_ERROR);
Modified: trunk/catalog/admin/includes/exts/package/tags/filesql.php
===================================================================
--- trunk/catalog/admin/includes/exts/package/tags/filesql.php 2012-01-02 14:25:25 UTC (rev 4006)
+++ trunk/catalog/admin/includes/exts/package/tags/filesql.php 2012-01-03 00:05:41 UTC (rev 4007)
@@ -4,7 +4,7 @@
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 02/01/2012, 18:17
+ @date 03/01/12, 08:07
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class Tc_filesql
Modified: trunk/catalog/admin/includes/exts/package/tags/sql.php
===================================================================
--- trunk/catalog/admin/includes/exts/package/tags/sql.php 2012-01-02 14:25:25 UTC (rev 4006)
+++ trunk/catalog/admin/includes/exts/package/tags/sql.php 2012-01-03 00:05:41 UTC (rev 4007)
@@ -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 21/12/10, 21:39
+ @version 2.1.1
+ @date 03/01/12, 08:07
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class Tc_sql
@@ -101,22 +101,24 @@
// }
function do_install($data='') {
+// var_dump(__FUNCTION__);
if (!$data) $data=$this->data['query'];
foreach ($data as $value){
- $sql_array=parse_sql($value);
- foreach ($sql_array as $query) {
- if(cip_db_query($query)===false) {
- $this->error('SQL error :<b>'.mysql_errno().' - '.mysql_error().'<br>'.$query);
- return false;
- }
- }
+ $sql_array=parse_sql($value);
+ foreach ($sql_array as $query) {
+ if(cip_db_query($query)===false) {
+ $this->error('SQL error :<b>'.mysql_errno().' - '.mysql_error().'<br>'.$query);
+ return false;
+ }
+ }
}
return true;
}
function do_remove() {
+// var_dump(__FUNCTION__);
if($this->data['remove_query'])
- return $this->do_install($this->data['remove_query']);
+ return $this->do_install($this->data['remove_query']);
}
public function permissions_check_for_install() { return true; }
Modified: trunk/catalog/admin/includes/gabarit/package/display_view.package.config.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/package/display_view.package.config.gab 2012-01-02 14:25:25 UTC (rev 4006)
+++ trunk/catalog/admin/includes/gabarit/package/display_view.package.config.gab 2012-01-03 00:05:41 UTC (rev 4007)
@@ -1,18 +1,74 @@
<?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 10/02/11, 11:08
+ @version 2.1.1
+ @date 03/01/12, 08:07
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
+
+$ident = trim(package::$class);
+$res = sqlcip::fetch(array('ident'=>$ident), true);
+$res2 =sqlcip_modfiles::fetch(array('cip_id'=>$res->id), true);
+
?>
<h3><?php echo __('title heading configuration package').' '. $_GET['class'] ?></h3>
<div class="button_nav">
<?php echo tep_js_back(tep_href_link(package::FILENAME), IMAGE_BACK) ?>
</div>
+
+<div class="box_uniq">
+<table class="dataTableBase">
+ <thead>
+ <tr>
+ <th><?php echo __('core') ?></th>
+ <th><?php echo __('item') ?></th>
+ <th><?php echo __('type') ?></th>
+ <th><?php echo __('file') ?></th>
+ <th><?php echo __('status') ?></th>
+ <th><?php echo __('action') ?></th>
+ </tr>
+ </thead>
+ <tbody>
+
+ <?php foreach($res2 as $row): ?>
+ <tr class="view parent">
+ <?php if (!$row->core): ?>
+ <td><?php echo '[FO] ' ?></td>
+ <td><?php echo $row->type ?></td>
+ <td><?php echo $row->typetype ?></td>
+ <td><?php echo $row->...
[truncated message content] |
|
From: <os...@us...> - 2012-01-02 14:25:35
|
Revision: 4006
http://oscss.svn.sourceforge.net/oscss/?rev=4006&view=rev
Author: oscim
Date: 2012-01-02 14:25:25 +0000 (Mon, 02 Jan 2012)
Log Message:
-----------
correction de l'installateur d'extension , debut du nettoyage des sorties text.
Correction erreur de notice
Amelioration des tags filesql et extractzip , ajout de la methode remove et de test avant install
correction fr
correction class support file fileUtility
Modified Paths:
--------------
trunk/catalog/admin/includes/classes/fileUtility.php
trunk/catalog/admin/includes/exts/package/CIP.php
trunk/catalog/admin/includes/exts/package/CipUtility.php
trunk/catalog/admin/includes/exts/package/ci_tag.class.php
trunk/catalog/admin/includes/exts/package/packageInstaller.php
trunk/catalog/admin/includes/exts/package/tags/add2end.php
trunk/catalog/admin/includes/exts/package/tags/description.php
trunk/catalog/admin/includes/exts/package/tags/extractzip.php
trunk/catalog/admin/includes/exts/package/tags/filesql.php
trunk/catalog/admin/includes/gabarit/package/display_view.package.detail.gab
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/package.txt
trunk/catalog/admin/includes/modules/pages/package.php
trunk/catalog/install/includes/modele/htaccess.txt
Added Paths:
-----------
trunk/catalog/admin/includes/gabarit/package/display_view.package.install.gab
Modified: trunk/catalog/admin/includes/classes/fileUtility.php
===================================================================
--- trunk/catalog/admin/includes/classes/fileUtility.php 2012-01-02 08:51:24 UTC (rev 4005)
+++ trunk/catalog/admin/includes/classes/fileUtility.php 2012-01-02 14:25:25 UTC (rev 4006)
@@ -1,9 +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
- @package oscss-2 <www http://www.oscss.org>
- @version 2.1.0
- @date 19/12/10, 09:26
+ @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 02/01/2012, 18:17
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class fileUtility
@@ -77,8 +78,7 @@
/**
- @package oscss
- @author OscssTeam
+ @brief delete recurisve folder
@param string path element a supprimer
*/
public static function _rmdir($source) {
@@ -86,29 +86,37 @@
if (isset($tep_remove_error)) $tep_remove_error = false;
if (is_dir($source)) {
- while ($file = self::_scandir($source)) {
- if ( ($file != '.') && ($file != '..') ) {
- if (is_writeable($source . '/' . $file)) self::_rmdir($source . '/' . $file);
- else {
- self::ComportForError(__CLASS__.'->'.__FUNCTION__.'::'.__LINE__.__('error file not removeable'). $source . '/' . $file, 'error');
- return false;
- }
- }
+ foreach(self::_scandir($source) as $file){
+ if ( ($file != '.') && ($file != '..') ) {
+ if(!is_writeable($source . '/' . $file)) {
+ self::ComportForError(__CLASS__.'->'.__FUNCTION__.'::'.__LINE__.__('error file not removeable'). $source . '/' . $file, 'error');
+ }
+ elseif (is_dir($source . '/' . $file) && is_writeable($source . '/' . $file))
+ self::_rmdir($source . '/' . $file);
+ elseif (file_exists($source . '/' . $file) && is_writeable($source . '/' . $file)){
+ self::_unlink($source . '/' . $file);
+ }
+
+ }
}
if (is_writeable($source)) rmdir($source);
else {
- self::ComportForError(__CLASS__.'->'.__FUNCTION__.'::'.__LINE__.__('error directory not removeable'). $source, 'error');
- return false;
+ self::ComportForError(__CLASS__.'->'.__FUNCTION__.'::'.__LINE__.__('error directory not removeable'). $source, 'error');
+ return false;
}
}
- else $tep_remove_error = self::_unlink($source);
+ else
+ $tep_remove_error = self::_unlink($source);
+
return $tep_remove_error;
}
public static function _unlink($source){
- if (is_writeable($source)) return unlink($source);
- else self::ComportForError(__CLASS__.'->'.__FUNCTION__.'::'.__LINE__.__('error file not removeable'). $source, 'error');
+ if (is_writeable($source))
+ return unlink($source);
+ else
+ self::ComportForError(__CLASS__.'->'.__FUNCTION__.'::'.__LINE__.__('error file not removeable'). $source, 'error');
return false;
}
@@ -153,10 +161,10 @@
public static function _chown($mypath, $uid, $gid) {
while(($file =self::_scandir($d)) !== false) {
if ($file != "." && $file != "..") {
- $typepath = $mypath . "/" . $file ;
- if (filetype ($typepath) == 'dir') self::_chown($typepath, $uid, $gid);
- self::_chmod($typepath, $uid);
- chgrp($typepath, $gid);
+ $typepath = $mypath . "/" . $file ;
+ if (filetype ($typepath) == 'dir') self::_chown($typepath, $uid, $gid);
+ self::_chmod($typepath, $uid);
+ chgrp($typepath, $gid);
}
}
}
@@ -166,16 +174,25 @@
@brief Copy repertoire recursif
*/
public static function _copy($src,$dst){
- if(!is_dir($src)) return @copy($src,$dst);
+ if(!is_dir($src))
+ return copy($src,$dst);
else {
+
+ if(substr($dst,-1) !='/')
+ $dst .='/' ;
+ if(substr($src,-1) !='/')
+ $src .='/' ;
+
foreach(self::_scandir($src) as $file){
- if (( $file != '.' ) && ( $file != '..' )) {
- if ( is_dir($src . '/' . $file) ) {
- self::_copy($src . '/' . $file,$dst . '/' . $file);
+ if (( $file != '.' ) && ( $file != '..' ) && substr($file,-1) !='~') {
+ if ( is_dir($src . $file) ){
+ if ( !is_dir($dst . $file) )
+ self::_mkdir($dst. $file);
+
+ self::_copy($src. $file,$dst. $file);
}
- else {
- copy($src . '/' . $file,$dst . '/' . $file);
- }
+ else
+ copy($src. $file,$dst . $file);
}
}
return true;
@@ -223,25 +240,25 @@
switch ($ext) {
case 'zip':
case 'gz':
- $in_file = $directory . $file_in;
- $out_file = $directory . $file_in . '.gz';
- if (!file_exists ($in_file) || !is_readable ($in_file))return false;
+ $in_file = $directory . $file_in;
+ $out_file = $directory . $file_in . '.gz';
+ if (!file_exists ($in_file) || !is_readable ($in_file))return false;
- if (file_exists($out_file)) return false;
+ if (file_exists($out_file)) return false;
- $fin_file = fopen($in_file, "rb");
- if (!$fout_file = gzopen($out_file, "wb".$level)) return false;
+ $fin_file = fopen($in_file, "rb");
+ if (!$fout_file = gzopen($out_file, "wb".$level)) return false;
- while (!feof ($fin_file)) {
- $buffer = fread($fin_file, 8192); // 8 kB is maximum value
- gzwrite($fout_file, $buffer, 8192);
- }
+ while (!feof ($fin_file)) {
+ $buffer = fread($fin_file, 8192); // 8 kB is maximum value
+ gzwrite($fout_file, $buffer, 8192);
+ }
- fclose($fin_file);
- gzclose($fout_file);
- if ($delete_file == true) {
- self::_unlink($in_file);
- }
+ fclose($fin_file);
+ gzclose($fout_file);
+ if ($delete_file == true) {
+ self::_unlink($in_file);
+ }
break;
}
return true;
Modified: trunk/catalog/admin/includes/exts/package/CIP.php
===================================================================
--- trunk/catalog/admin/includes/exts/package/CIP.php 2012-01-02 08:51:24 UTC (rev 4005)
+++ trunk/catalog/admin/includes/exts/package/CIP.php 2012-01-02 14:25:25 UTC (rev 4006)
@@ -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.0.9
- @date 08/06/10, 22:46
+ @version 2.1.1
+ @date 02/01/2012, 18:17
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
Original:
@@ -546,8 +546,9 @@
//! We passed by all checks. So if an error appears
foreach ($this->contrib_data as $id=>$tag)
if ( $tag->do_remove() ===false){
- self::InProcess(__("Erreur durant traitement de cette fonction "),'tag_xml-['.$id.']'. $tag->tag_name.'->do_remove()','block');
- break;
+// var_dump($tag->tag_name.'->do_remove()');
+ self::InProcess(__("Erreur durant traitement de cette fonction "),'tag_xml-['.$id.']'. $tag->tag_name.'->do_remove()','block');
+ break;
}
$this->DeleteContribFull(false);
@@ -580,14 +581,14 @@
*/
foreach ($this->contrib_data as $id=>$tag)
if($tag->isTagName('description') || $tag->isTagName('depend'))
- if (self::$error=(int)$tag->do_install()) break;
+ if (self::$error=(int)$tag->do_install()) break;
- //! If we had a problems at runtime we should remove this CIP.
- if (self::$error) $this->remove(true);
+ //! If we had a problems at runtime we should remove this CIP.
+ if (self::$error) $this->remove(true);
else {
- if ($this->was_unpacked() && $this->is_unpacked()) {
- fileUtility::_rmdir(DIR_FS_CIP.$this->get_cip_name());
- }
+ if ($this->was_unpacked() && $this->is_unpacked()) {
+ fileUtility::_rmdir(DIR_FS_CIP.$this->get_cip_name());
+ }
}
}
@@ -622,7 +623,7 @@
private function total_restore() {
if (false /*_cst_bool('ALLOW_FILES_BACKUP')*/){
//! Files restore
- if (!$this->restore() || !self::check_bylevel(1)/* !$this->is_all_right()*/){
+ if ( (method_exists($tag, 'restore_file' ) && !$this->restore()) || !self::check_bylevel(1)/* !$this->is_all_right()*/){
self::InProcess(__("Erreur apres traitement de cette fonction restore()"), __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'error');
return false;
}
@@ -642,9 +643,9 @@
*/
private function backup() {
foreach ($this->contrib_data as $id=>$tag)
- if ( $tag->backup_file() ===false){
- self::InProcess(__("Erreur durant traitement de cette fonction "),'tag_xml-['.$id.']'. $tag->tag_name.'->backup_file()','block');
- return false;
+ if ( method_exists($tag, 'backup_file' ) && $tag->backup_file() ===false){
+ self::InProcess(__("Erreur durant traitement de cette fonction "),'tag_xml-['.$id.']'. $tag->tag_name.'->backup_file()','block');
+ return false;
}
return true;
}
@@ -654,7 +655,7 @@
*/
private function restore() {
foreach ($this->contrib_data as $id=>$tag)
- if ( $tag->restore_file() ===false){
+ if ( method_exists($tag, 'restore_file' ) && $tag->restore_file() ===false){
self::InProcess(__("Erreur durant traitement de cette fonction "),'tag_xml-['.$id.']'. $tag->tag_name.'->restore_file()','block');
}
if(file_exists(self::PATH_BACKUP.self::$cip_name) && !fileUtility::_rmdir(self::PATH_BACKUP.self::$cip_name)){
Modified: trunk/catalog/admin/includes/exts/package/CipUtility.php
===================================================================
--- trunk/catalog/admin/includes/exts/package/CipUtility.php 2012-01-02 08:51:24 UTC (rev 4005)
+++ trunk/catalog/admin/includes/exts/package/CipUtility.php 2012-01-02 14:25:25 UTC (rev 4006)
@@ -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 25/07/10, 22:48
+ @version 2.1.1
+ @date 02/01/2012, 18:17
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -176,7 +176,7 @@
//chmod($backup_file, 0777);
tep_remove($backup_file);
}
- if (file_exists($backup_file.'.gz')) chmod($backup_file.'.gz', 0777);
+ if (file_exists($backup_file.'.gz')) @chmod($backup_file.'.gz', 0777);
return true;
}
Modified: trunk/catalog/admin/includes/exts/package/ci_tag.class.php
===================================================================
--- trunk/catalog/admin/includes/exts/package/ci_tag.class.php 2012-01-02 08:51:24 UTC (rev 4005)
+++ trunk/catalog/admin/includes/exts/package/ci_tag.class.php 2012-01-02 14:25:25 UTC (rev 4006)
@@ -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.1
- @date 31/10/11, 08:07
+ @date 02/01/2012, 18:17
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
Original:
@@ -426,7 +426,7 @@
fileUtility::CfgComport(true);
if( ($res= fileUtility::_copy($src,$dst)) && $res ==false) {
foreach(fileUtility::GetError() as $error)
- CIP::InProcess($error['text'].dirname($path), __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
+ CIP::InProcess($error['text'].dirname($path), __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
}
return $res;
}
@@ -436,7 +436,7 @@
fileUtility::CfgComport(true);
if( ($res= fileUtility::_mkdir($path)) && $res ==false) {
foreach(fileUtility::GetError() as $error)
- CIP::InProcess($error['text'].dirname($path), __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
+ CIP::InProcess($error['text'].dirname($path), __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'noblock');
}
return $res;
}
@@ -445,7 +445,7 @@
fileUtility::CfgComport(true);
if( ($res= fileUtility::_rmdir($path)) && $res ==false) {
foreach(fileUtility::GetError() as $error)
- CIP::InProcess($error['text'].dirname($path), __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
+ CIP::InProcess($error['text'].dirname($path), __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'noblock');
}
return $res;
}
Modified: trunk/catalog/admin/includes/exts/package/packageInstaller.php
===================================================================
--- trunk/catalog/admin/includes/exts/package/packageInstaller.php 2012-01-02 08:51:24 UTC (rev 4005)
+++ trunk/catalog/admin/includes/exts/package/packageInstaller.php 2012-01-02 14:25:25 UTC (rev 4006)
@@ -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.1
- @date 31/10/11, 08:07
+ @date 02/01/2012, 18:17
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class packageInstaller
@@ -55,7 +55,7 @@
/**
- View et check package
+ @brief View et check package
*/
public function view_exts($pkgID){
global $messageStack;
@@ -77,8 +77,8 @@
//Print description:
$description=$cip->get_data($cip->get_description_id());
if ($description) {
- $array=$this->cip_description($description->data);
- parent::$Rightlist=array_merge(parent::$Rightlist,ErrorAndBlockProcess::$ArrayError);
+ $array=$this->cip_description($description->data);
+ parent::$Rightlist=array_merge(parent::$Rightlist,ErrorAndBlockProcess::$ArrayError);
}
else $array[]= '<strong style="color:red;">'.CIP::CONFIG_FILENAME. __('text doesnt exists').'!!!</strong>';
@@ -121,16 +121,16 @@
foreach($cips as $cp){
$cp->compute_dependencies();
if ($cp->get_error()) {
- parent::$Rightlist=array_merge(parent::$Rightlist,ErrorAndBlockProcess::$ArrayError);
- return $array;
- }
- $messageStack->add_session("CIP ".$cp->getIdent().__('msg was applied'), 'installed');
- $array[]= '<h4>'.$cp->getIdent().'<h4>'.
- '<strong>'.__('text post install notes').':</strong><br />'.
- $cp->post_install_notes();
+ parent::$Rightlist=array_merge(parent::$Rightlist,ErrorAndBlockProcess::$ArrayError);
+ return $array;
+ }
+ $messageStack->add_session("CIP ".$cp->getIdent().__('msg was applied'), 'installed');
+ $array[]= '<h4>'.$cp->getIdent().'<h4>'.
+ '<strong>'.__('text post install notes').':</strong><br />'.
+ $cp->post_install_notes();
}
}
- $array=array_merge($array,(array)ErrorAndBlockProcess::$ArrayError);
+ parent::$Rightlist=array_merge(parent::$Rightlist,(array)ErrorAndBlockProcess::$ArrayError);
/// NOTE: force init menu admin
$menu=menu::getInstance();
@@ -197,6 +197,9 @@
/**
+ @fn cip_description($data='')
+ @brief adjust detail paquet based on description tag
+ @return array
*/
private function cip_description($data='') {
if (!$data) return null;
@@ -204,23 +207,23 @@
$contents[] = '<h3>'.__('text info support').':</h3>';
if (isset($data['oscss_forum_ref']) && $data['oscss_forum_ref'] !=0)
- $contents[]='<strong>• <a href="'.__('text link contr oscss') . $data['oscss_forum_ref'].'" title= "'. __('contribs page oscss alt') . '">' . __('contribs page oscss') .'</a></strong>';
+ $contents[]='<strong><a href="'. $data['oscss_forum_ref'].'" title= "'. __('contribs page oscss alt') . '">' . __('contribs page oscss') .'</a></strong>';
if (isset($data['contrib_ref']) && $data['contrib_ref'] !=0)
- $contents[]='<strong>• <a href="'. __('text link contr '). $data['contrib_ref'].'" title= "'. __('contribs page alt') . '">' . __('contribs page').'</a></strong>';
-
+ $contents[]='<strong><a href="'.$data['contrib_ref'].'" title= "'. __('contribs page alt') . '">' . __('contribs page').'</a></strong>';
+//
if (isset($data['forum_ref']) && $data['forum_ref'] !=0)
- $contents[]='<strong>• <a href="'. __('text link forum').$data['forum_ref']. '" title="'. __('contribs forum alt'). '">'. __('contribs forum').'</a></strong>';
+ $contents[]='<strong><a href="'. $data['forum_ref']. '" title="'. __('contribs forum alt'). '">'. __('contribs forum').'</a></strong>';
if (isset($data['author_pkg']) && $data['author_pkg'] !='')
- $contents[]='<strong>• <a href="http://'. $data['author_pkg'].'">' . __('contribs cip pkg'). $data['author_pkg'] .'</a></strong>';
+ $contents[]='<strong class="label text">'.__('contribs cip pkg').'</strong>' . '<a href="http://'. $data['author_pkg'].'">' . $data['author_pkg'] .'</a>';
$contents[] = '<br /><h3>'.__('text info contrib').':</h3>';
foreach ($data as $key=>$value) {
$value=htmlspecialchars($value);//convert to entries...
if (!in_array($key,array('post_install_notes','author_pkg','contrib_ref','forum_ref','oscss_forum_ref'))) {
- $contents[]='<strong>'.$key.'</strong>: '.nl2br($value);
+ $contents[]='<strong class="label text">'.__('contribs '.$key).'</strong>: '.nl2br($value);
}
}
return $contents;
Modified: trunk/catalog/admin/includes/exts/package/tags/add2end.php
===================================================================
--- trunk/catalog/admin/includes/exts/package/tags/add2end.php 2012-01-02 08:51:24 UTC (rev 4005)
+++ trunk/catalog/admin/includes/exts/package/tags/add2end.php 2012-01-02 14:25:25 UTC (rev 4006)
@@ -1,11 +1,11 @@
<?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
- @originla author Made by Imrich Schindler <ischindl at progis.sk>
+ @original author Made by Imrich Schindler <ischindl at progis.sk>
@package osCSS-2 <www http://www.oscss.org>
- @version 2.1.0
- @date 19/12/10, 18:52
+ @version 2.1.1
+ @date 02/01/2012, 18:17
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class Tc_add2end
@@ -82,16 +82,22 @@
/**-----------------------------conflicts--------------------------- */
public function conflicts_check_for_remove() {
- $find=$this->add_str();
+
+ $find=$this->add_str($this->data['add']);
$new_file=$this->linebreak_fixing(file_get_contents($this->fs_filename()));
- $this->write_to_file($this->fs_filename(), $new_file);
+
+
$count=substr_count($new_file, $find);
+
//We can also check a database records for conflicts.
if ($count==0) {
$sg=__('couldnt find text').": ".nl2br(htmlspecialchars($find)). "<br />". __('in the file text'). $this->fs_filename();
CIP::InProcess($sg, __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
- return false;
+// return false;
}
+
+ $this->write_to_file($this->fs_filename(), $new_file);
+
return true;
}
@@ -111,7 +117,8 @@
}
function do_remove() {
- if(!$this->remove_file_part($this->data['filename'],$this->add_str($this->data['add']))) return false;
+ if(!$this->remove_file_part($this->data['filename'],$this->add_str($this->data['add'])))
+ return false;
return true;
}
}
Modified: trunk/catalog/admin/includes/exts/package/tags/description.php
===================================================================
--- trunk/catalog/admin/includes/exts/package/tags/description.php 2012-01-02 08:51:24 UTC (rev 4005)
+++ trunk/catalog/admin/includes/exts/package/tags/description.php 2012-01-02 14:25:25 UTC (rev 4006)
@@ -1,12 +1,11 @@
<?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
@original author Vlad Savitsky
- @Support: http://forums.oscommerce.com/index.php?showuser=20490, http://forums.oscommerce.com/index.php?showtopic=156667
@package osCSS-2 <www http://www.oscss.org>
- @version 2.0.9
- @date 24/07/10, 18:07
+ @version 2.1.1
+ @date 02/01/2012, 18:17
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class Tc_description
Modified: trunk/catalog/admin/includes/exts/package/tags/extractzip.php
===================================================================
--- trunk/catalog/admin/includes/exts/package/tags/extractzip.php 2012-01-02 08:51:24 UTC (rev 4005)
+++ trunk/catalog/admin/includes/exts/package/tags/extractzip.php 2012-01-02 14:25:25 UTC (rev 4006)
@@ -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 23/06/10, 12:02
+ @version 2.1.1
+ @date 02/01/2012, 18:17
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@@ -17,8 +17,17 @@
class Tc_extractzip
extends ContribInstallerBaseTag {
- var $tag_name='extractzip';
+ public $tag_name='extractzip';
+ /**
+ @var array content file in zip
+ */
+ protected $zipContent;
+ /**
+ @var object result PclZip
+ */
+ protected static $PclZip;
+
function __construct($contrib='', $id='', $xml_data='', $dep='') {
$this->params=array(
'zip'=>array(
@@ -31,97 +40,162 @@
),
);
$this->ContribInstallerBaseTag($contrib, $id, $xml_data, $dep);
+
+// var_dump(__CLASS__);
}
function get_data_from_xml_parser($xml_data='') {
$this->data['zip'] =$this->getTagAttr($xml_data,'zip',0,'name');
$this->data['path'] =replace_path_admin(trim(str_replace("%TEMPLATE_NAME%",TEMPLATE_NAME,$this->getTagAttr($xml_data,'path',0,'name')))) ;
+
+
+ $le_file=DIR_FS_CIP.'/'.$this->contrib.'/'.$this->data['zip'];
+
+ self::$PclZip = new PclZip( $le_file );
+ if($this->cip->is_Windows()) if(!defined('OS_WINDOWS'))define('OS_WINDOWS',1);
+ else if(!defined('OS_WINDOWS'))define('OS_WINDOWS',0);
+
+ $this->zipContent = self::$PclZip->listContent( PCLZIP_OPT_PATH, DIR_FS_CATALOG.$this->data['path'] );
+
}
function write_to_xml() {
return '
<'.$this->tag_name.'>
- <zip name="'.$this->data['zip'].'" />
- <path name="'.$this->data['path'].'" />
+ <zip name="'.$this->data['zip'].'" />
+ <path name="'.$this->data['path'].'" />
</'.$this->tag_name.'>';
}
+ public function permissions_check_for_install() {
+ if (!CIP::check_bylevel(1))return false;
+ foreach($this->zipContent as $row){
- public function permissions_check_for_install() { return true; }
+ $rs_filename=replace_path_admin($row);
+
+ $path=dirname($rs_filename['filename']);
+ $fs_filename = $rs_filename['filename'];
+
+// if(!is_dir($path))
+// parent::recursive_mkdir($path);
+
+ if(is_dir($path) && !is_writable($path)) {
+ CIP::InProcess(__('write folder permissins needed text').$path, __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
+// return false;
+ }
+ elseif(file_exists($fs_filename) && !is_writable($fs_filename)) {
+ CIP::InProcess(__('write file permissins needed text').' '.$fs_filename, __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'noblock');
+// return false;
+ }
+ }
+ return true;
+ }
+
+// // public function permissions_check_for_install() { return true; }
public function permissions_check_for_remove() { return true; }
- public function conflicts_check_for_install() { return true; }
- public function conflicts_check_for_remove() { return true; }
+ public function conflicts_check_for_install() {
+ if (!CIP::check_bylevel(1)) return false;
+ foreach($this->zipContent as $row){
+
+ $rs_filename=replace_path_admin($row);
+
+ $path=dirname($rs_filename['filename']);
+ $fs_filename = $rs_filename['filename'];
+
+ $backup_file=DIR_FS_BACKUP.CONTRIB_INSTALLER_NAME."_".CONTRIB_INSTALLER_VERSION.'/'. $fs_filename;
+
+ // check if file is already copied
+ if($this->equal_files($backup_file,$fs_filename)) continue;
+
+ if (!_cst_bool('ALLOW_OVERWRITE_MODIFIED')) {
+ if (!is_file($fs_filename)) {
+
+ $msg="Backup file ".$backup_file." is not exists. This file needed to check if file". $fs_filename. " was modified since Contrib Installer have been installed.
+ <br /><b>CIP.NET.UA Advise</b>:<br />
+ Set \"Allow Overwrite Existing Modified Files\" to TRUE and all modified files will be overwritten.
+ All changes will be lost!<br />
+ <i>or</i><br />
+ Copy clean osCommerce files to ".DIR_FS_CIP."/".CONTRIB_INSTALLER_NAME."_".CONTRIB_INSTALLER_VERSION. "/catalog/ and try again.";
+
+ CIP::InProcess($msg, __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'noblock');
+ }
+ elseif (file_exists($fs_filename) && file_exists($backup_file)&& !$this->equal_files($fs_filename, $backup_file)) {
+ $msg="File ".$fs_filename." exists and was modified since Contrib Installer have been installed. Overwriting is not allowed.<br /><b>CIP.NET.UA Advise</b>:<br />Set \"Allow Overwrite Existing Modified Files\" to TRUE or change install.xml.";
+ CIP::InProcess($msg, __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
+ return false;
+ }
+ }
+ }
+ return true;
+ }
+
+ public function conflicts_check_for_remove() {return true; }
+
+
public function do_install() {
- if(!$this->unpack_plus($this->data['zip'],$this->data['path'])) return false;
+
+ if(!$this->unpack_plus($this->data['zip'],$this->data['path']))
+ return false;
else{
+
// deplacement admin
$folder_admin=substr(DIR_WS_ADMIN, strlen(DIR_WS_CATALOG) );
+
if(file_exists(DIR_FS_CATALOG.'admin') && $folder_admin !='admin/' ){
- parent::recurse_copy(DIR_FS_CATALOG.'admin',DIR_FS_ADMIN);
- parent::recursive_rmdir(DIR_FS_CATALOG.'admin/');
+ parent::recurse_copy(DIR_FS_CATALOG.'admin',DIR_FS_ADMIN);
+
+ $res=parent::recursive_rmdir(DIR_FS_CATALOG.'admin/');
}
+
return true;
}
}
public function do_remove() {
-// $this->recursive_rmdir();
- return true;
+
+ foreach($this->zipContent as $row){
+
+ $rs_filename=replace_path_admin($row);
+
+ $path=dirname($rs_filename['filename']);
+ $fs_filename = $rs_filename['filename'];
+
+ if(file_exists(DIR_FS_CATALOG.$fs_filename) && is_writable(DIR_FS_CATALOG.$fs_filename) && !is_dir(DIR_FS_CATALOG.$fs_filename) ){
+ if(! fileUtility::_unlink(DIR_FS_CATALOG. $fs_filename) ){
+ CIP::InProcess(__('write file permissins needed text').' '.$fs_filename, __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'noblock');
+// return false;
+ }
+ }
+ }
+ return true;
+
}
+
+
/** =============================================================== PRIVATE =============================================================== */
private function unpack_plus($file,$dir) {
- $le_file=DIR_FS_CIP.'/'.$this->contrib.'/'.$file;
- $zipfile = new PclZip( $le_file );
- if($this->cip->is_Windows()) if(!defined('OS_WINDOWS'))define('OS_WINDOWS',1);
- else if(!defined('OS_WINDOWS'))define('OS_WINDOWS',0);
- $ret = $zipfile->extract( PCLZIP_OPT_PATH, DIR_FS_CATALOG.$dir );
+ $ret = self::$PclZip->extract( PCLZIP_OPT_PATH, DIR_FS_CATALOG.$dir );
if($ret == 0) {
- CIP::$error=true;
- trigger_error(__CLASS__.sprintf(' error %s', __FUNCTION__).__('Unrecoverable error "').$zipfile->errorName(true).$le_file , E_USER_ERROR);
+// CIP::$error=true;
+// trigger_error(__CLASS__.sprintf(' error %s', __FUNCTION__).__('Unrecoverable error "').$zipfile->errorName(true).$le_file , E_USER_ERROR);
+ CIP::InProcess('check'.__('unpack with error').$file, __CLASS__.'->'.__FUNCTION__.'::'.__LINE__,'block');
return false;
}
return true;
}
-// function permissions_check_for_install($name='') {
-// if (!file_exists(DIR_FS_CATALOG.$this->data['path'])){
-// CIP::$error= true;
-// trigger_error(__CLASS__.sprintf('error %s', __FUNCTION__).__('Unrecoverable error "').$this->data['path'] , E_USER_ERROR);
-// }
-// elseif(!is_writable(DIR_FS_CATALOG.$this->data['path'])){
-// CIP::$error= true;
-// trigger_error(__CLASS__.sprintf('error %s', __FUNCTION__).__('impossible d\'ecrire dans : ').$this->data['path'] , E_USER_ERROR);
-// }
-//
-// return CIP::$error;
-// }
-// function permissions_check_for_remove() {
-// return $this->permissions_check_for_install();
-// }
-
-// function conflicts_check_for_remove() {
-// $find=$this->add_str();
-// $new_file=$this->linebreak_fixing(file_get_contents($this->fs_filename()));
-// $this->write_to_file($this->fs_filename(), $new_file);
-// $count=substr_count($new_file, $find);
-// //We can also check a database records for conflicts.
-// if ($count==0) {
-// CIP::$error(COULDNT_FIND_TEXT.": ".nl2br(htmlspecialchars($find)). "<br>". IN_THE_FILE_TEXT. $this->fs_filename());
-// }
-// return CIP::$error;
-// }
}
?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/exts/package/tags/filesql.php
===================================================================
--- trunk/catalog/admin/includes/exts/package/tags/filesql.php 2012-01-02 08:51:24 UTC (rev 4005)
+++ trunk/catalog/admin/includes/exts/package/tags/filesql.php 2012-01-02 14:25:25 UTC (rev 4006)
@@ -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.1
- @date 06/11/11, 15:12
+ @date 02/01/2012, 18:17
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class Tc_filesql
@@ -27,6 +27,7 @@
@brief Constructor
*/
function Tc_filesql($contrib='', $id='', $xml_data='', $dep='') {
+// var_dump(__FUNCTION__);
$this->params=array(
'tables'=>array(
'sql_type'=>'text',
@@ -62,7 +63,7 @@
@brief create virtual data xml based in folder and file
*/
function get_data_from_xml_parser($xml_data='') {
-
+// var_dump(__FUNCTION__);
$dbtype = DB_MOTOR_TYPE;
$dbmotor = strtolower(DB_CONNECTOR);
$action='install';
@@ -73,9 +74,10 @@
foreach($files[0] as $row){
$this->data['tables'][] = $row;
}
- foreach($files[1] as $row){
- $this->data['keys'][] = $row;
- }
+ if(DB_MOTOR_TYPE =='InnoDB')
+ foreach($files[1] as $row){
+ $this->data['keys'][] = $row;
+ }
foreach($files[2] as $row){
$this->data['data'][] = $row;
}
@@ -87,9 +89,11 @@
foreach($files[0] as $row){
$this->data['remove_tables'][] = $row;
}
+
foreach($files[1] as $row){
$this->data['remove_keys'][] = $row;
}
+
foreach($files[2] as $row){
$this->data['remove_data'][] = $row;
}
@@ -108,13 +112,17 @@
foreach($this->data['tables'] as $row){
$this->SqlFileProcess( $path.'/tables/' . $row, DB_TABLE_PREFIX );
}
- foreach($this->data['keys'] as $row){
- $this->SqlFileProcess( $path.'/tables/' . $row, DB_TABLE_PREFIX );
- }
- foreach($this->data['data'] as $row){
- $this->SqlFileDataProcess( $path.'/data/' . $row, DB_TABLE_PREFIX );
- }
+ if(isset($this->data['keys']) && is_array($this->data['keys']) && DB_MOTOR_TYPE =='InnoDB')
+ foreach($this->data['keys'] as $row){
+ $this->SqlFileProcess( $path.'/tables/' . $row, DB_TABLE_PREFIX );
+ }
+
+ if(isset($this->data['data']) && is_array($this->data['data']) )
+ foreach($this->data['data'] as $row){
+ $this->SqlFileDataProcess( $path.'/data/' . $row, DB_TABLE_PREFIX );
+ }
+
return true;
}
@@ -128,13 +136,17 @@
foreach($this->data['remove_tables'] as $row){
$this->SqlFileProcess( $path.'/tables/' . $row, DB_TABLE_PREFIX );
}
- foreach($this->data['remove_keys'] as $row){
- $this->SqlFileProcess( $path.'/tables/' . $row, DB_TABLE_PREFIX );
- }
- foreach($this->data['remove_data'] as $row){
- $this->SqlFileDataProcess( $path.'/data/' . $row, DB_TABLE_PREFIX );
- }
+ if(isset($this->data['keys']) && is_array($this->data['keys']) && DB_MOTOR_TYPE =='InnoDB')
+ foreach($this->data['remove_keys'] as $row){
+ $this->SqlFileProcess( $path.'/tables/' . $row, DB_TABLE_PREFIX );
+ }
+
+ if(isset($this->data['remove_data']) && is_array($this->data['remove_data']) )
+ foreach($this->data['remove_data'] as $row){
+ $this->SqlFileDataProcess( $path.'/data/' . $row, DB_TABLE_PREFIX );
+ }
+
return true;
}
Modified: trunk/catalog/admin/includes/gabarit/package/display_view.package.detail.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/package/display_view.package.detail.gab 2012-01-02 08:51:24 UTC (rev 4005)
+++ trunk/catalog/admin/includes/gabarit/package/display_view.package.detail.gab 2012-01-02 14:25:25 UTC (rev 4006)
@@ -1,25 +1,30 @@
<?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 26/07/10, 20:53
+ @version 2.1.1
+ @date 02/01/2012, 18:17
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
?>
-<div class="fleft w_40">
- <ul>
- <?php foreach(package::$list as $item): ?>
- <li><?php echo $item ?></li>
- <?php endforeach; ?>
- </ul>
-</div>
+<h3><?php echo __('package heading title detail') ?></h3>
+<div class="box_uniq">
+ <div class="block_form fleft w_50">
+ <ul>
+ <?php foreach(package::$list as $item): ?>
+ <li><?php echo $item ?></li>
+ <?php endforeach; ?>
+ </ul>
+ </div>
-<div class="fright w_60">
- <ul>
- <?php foreach(package::$Rightlist as $item): ?>
- <li>- <?php echo $item ?></li>
- <?php endforeach; ?>
- </ul>
+ <div class="fright w_50">
+ <h3><?php echo __('package heading title detail logs') ?></h3>
+ <ul>
+ <?php foreach(package::$Rightlist as $item): ?>
+ <li>- <?php echo $item ?></li>
+ <?php endforeach; ?>
+ </ul>
+ </div>
</div>
\ No newline at end of file
Added: trunk/catalog/admin/includes/gabarit/package/display_view.package.install.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/package/display_view.package.install.gab (rev 0)
+++ trunk/catalog/admin/includes/gabarit/package/display_view.package.install.gab 2012-01-02 14:25:25 UTC (rev 4006)
@@ -0,0 +1,30 @@
+<?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 02/01/2012, 18:17
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+?>
+<h3><?php echo __('package heading title install') ?></h3>
+<div class="box_uniq">
+ <div class="block_form fleft w_50">
+ <ul>
+ <?php foreach(package::$list as $item): ?>
+ <li><?php echo $item ?></li>
+ <?php endforeach; ?>
+ </ul>
+ </div>
+
+ <div class="fright w_50">
+ <h3><?php echo __('package heading title install logs') ?></h3>
+ <ul>
+ <?php foreach(package::$Rightlist as $item): ?>
+ <li>- <?php echo $item ?></li>
+ <?php endforeach; ?>
+ </ul>
+ </div>
+</div>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/pages/package.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/pages/package.txt 2012-01-02 08:51:24 UTC (rev 4005)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/package.txt 2012-01-02 14:25:25 UTC (rev 4006)
@@ -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 28/12/11, 10:05
+ @date 02/01/2012, 18:17
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@brief file for module class package, item language french
@@ -51,18 +51,70 @@
/* source */
+/* Install */
+ $lang['msg was removed']="Extension desinstallée" ;
+/* view */
+
+ /* bouton */
+ $lang['image cip install']="Installer cette extension " ;
+ /* text */
+ $lang['package heading title detail']="Detail du paquet" ;
+ $lang['package heading title detail logs']="Detail des logs et nodes" ;
+
+ $lang['text info support']="Support " ;
+ $lang['text info contrib']="Detail du paquet " ;
+
+
+ $lang['contribs page oscss']="osCSSS.org page de support" ;
+ $lang['contribs cip pkg']="osCSS.org page" ;
+/*
+
+ $lang['contribs cip pkg']="contribs cip pkg" ;
+ $lang['contribs cip pkg']="contribs cip pkg" ;*/
+
+ $lang['contribs contrib_type']="Type " ;
+ $lang['contribs status']="Etat " ;
+ $lang['contribs last_update']="Derniére mise a jour " ;
+ $lang['contribs credits']="Credit " ;
+ $lang['contribs comments']="Commentaires" ;
+ $lang['contribs ident']="clef unique" ;
+ $lang['contribs version']="Version" ;
+
+
+
+/* install */
+ /* bouton */
+ $lang['config extension']="Configurer cette extension " ;
+ /* text */
+ $lang['package heading title install']="installation du paquet" ;
+ $lang['package heading title install logs']="Detail des logs et nodes de l'installation" ;
+
+
+
+/* Error */
+ $lang['write file permissins needed text']="Erreur: revoir les permission de ce fichier : " ;
+ $lang['write folder permissins needed text']="Erreur: revoir les permission de ce dossier : " ;
+ $lang['error file not removeable']="Error: I can not remove this file. Please set the right user permissions on: " ;
+
+
+
+
+
+
$lang['text info heading upload']="Charger" ;
$lang['text file name']="Nom du fichier :" ;
$lang['text file size']="Taille :" ;
$lang['text delete intro']="Êtes-vous sûr de vouloir supprimer ce fichier ?" ;
-$lang['error directory not writeable']="Erreur: I can not write to this directory. Please set the right user permissions on: %s" ;
+
+
+
// $lang['ERROR FILE NOT WRITEABLE']='Error: I can not write to this file. Please set the right user permissions on: %s';
$lang['error directory not removeable']="Error: I can not remove this directory. Please set the right user permissions on: %s" ;
-$lang['error file not removeable']="Error: I can not remove this file. Please set the right user permissions on: %s" ;
+
$lang['error directory does not exist']="Error: Directory does not exist: %s" ;
//======================
$lang['icon unzip']="Décompresser" ;
Modified: trunk/catalog/admin/includes/modules/pages/package.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/package.php 2012-01-02 08:51:24 UTC (rev 4005)
+++ trunk/catalog/admin/includes/modules/pages/package.php 2012-01-02 14:25:25 UTC (rev 4006)
@@ -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.1
- @date 31/10/11, 08:07
+ @date 02/01/2012, 18:17
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class package
@@ -327,36 +327,36 @@
case 'view':
case 'detail':
- $action='detail';
- $class=self::$code.'Installer';
- if(!tep_class_exists('exts_'.self::$code.'_'.$class)) return false;
- $obj=new $class;
+ $action='detail';
+ $class=self::$code.'Installer';
+ if(!tep_class_exists('exts_'.self::$code.'_'.$class)) return false;
+ $obj=new $class;
- self::$list=$obj->view_exts((string)$_GET['pkgID']);
+ self::$list=$obj->view_exts((string)$_GET['pkgID']);
break;
case 'install':
- $action='detail';
- $class=self::$code.'Installer';
- if(!tep_class_exists('exts_'.self::$code.'_'.$class)) return false;
- $obj=new $class;
+ $action='install';
+ $class=self::$code.'Installer';
+ if(!tep_class_exists('exts_'.self::$code.'_'.$class)) return false;
+ $obj=new $class;
- self::$list=$obj->install_exts((string)$_GET['pkgID']);
+ self::$list=$obj->install_exts((string)$_GET['pkgID']);
break;
case 'remove':
- $action='detail';
- $class=self::$code.'Installer';
- if(!tep_class_exists('exts_'.self::$code.'_'.$class))return false;
- $obj=new $class;
+ $action='detail';
+ $class=self::$code.'Installer';
+ if(!tep_class_exists('exts_'.self::$code.'_'.$class))return false;
+ $obj=new $class;
- self::$list=$obj->remove_exts((string)$_GET['pkgID']);
+ self::$list=$obj->remove_exts((string)$_GET['pkgID']);
break;
case 'edit':
case 'config':
- $action='config';
- call_user_func(array(self::$objChild, 'load_config_value'));
+ $action='config';
+ call_user_func(array(self::$objChild, 'load_config_value'));
break;
default:
Modified: trunk/catalog/install/includes/modele/htaccess.txt
===================================================================
--- trunk/catalog/install/includes/modele/htaccess.txt 2012-01-02 08:51:24 UTC (rev 4005)
+++ trunk/catalog/install/includes/modele/htaccess.txt 2012-01-02 14:25:25 UTC (rev 4006)
@@ -154,10 +154,15 @@
## Mode SEO
# RewriteRule ^([a-zA-Z_]*)\.(php)$ $1d-$1.html?&%{QUERY_STRING} [R=301]
- ## Move images/ Or images/imagecache/ in document.php?..
- RewriteRule ^images/imagecache/([0-9]*)x([0-9]*)[_](.*)\.([a-z]{3,4})[_](.*)$ document.php?mod=img&i=$3.$4&w=$1&h=$2 [R=301]
- RewriteRule ^images/(.*)$ document.php?mod=img&i=$1&%{QUERY_STRING} [R=301]
+
+ ## RETRO - COMPATIBILITE
+ ## Move images/ Or images/imagecache/ in document.php?.. if image not defined id in db table
+ # RewriteRule ^images/imagecache/([0-9]*)x([0-9]*)[_](.*)\.([a-z]{3,4})[_](.*)$ document.php?mod=img&i=$3.$4&w=$1&h=$2 [R=301]
+ # RewriteRule ^images/(.*)$ document.php?mod=img&i=$1&%{QUERY_STRING} [R=301]
+
+
+
# SEO
# MODE SEO Rewrite-mode2 (Default)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-01-02 08:51:30
|
Revision: 4005
http://oscss.svn.sourceforge.net/oscss/?rev=4005&view=rev
Author: oscim
Date: 2012-01-02 08:51:24 +0000 (Mon, 02 Jan 2012)
Log Message:
-----------
coquille
Modified Paths:
--------------
trunk/catalog/admin/includes/classes/fileUtility.php
Modified: trunk/catalog/admin/includes/classes/fileUtility.php
===================================================================
--- trunk/catalog/admin/includes/classes/fileUtility.php 2012-01-01 20:07:41 UTC (rev 4004)
+++ trunk/catalog/admin/includes/classes/fileUtility.php 2012-01-02 08:51:24 UTC (rev 4005)
@@ -166,19 +166,17 @@
@brief Copy repertoire recursif
*/
public static function _copy($src,$dst){
-// self::_chmod($dst);
-
if(!is_dir($src)) return @copy($src,$dst);
else {
- while(( $file = self::_scandir($src)) && $file !==false ) {
- if (( $file != '.' ) && ( $file != '..' )) {
- if ( is_dir($src . '/' . $file) ) {
- self::_copy($src . '/' . $file,$dst . '/' . $file);
- }
- else {
- copy($src . '/' . $file,$dst . '/' . $file);
- }
- }
+ foreach(self::_scandir($src) as $file){
+ if (( $file != '.' ) && ( $file != '..' )) {
+ if ( is_dir($src . '/' . $file) ) {
+ self::_copy($src . '/' . $file,$dst . '/' . $file);
+ }
+ else {
+ copy($src . '/' . $file,$dst . '/' . $file);
+ }
+ }
}
return true;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-01-01 20:07:48
|
Revision: 4004
http://oscss.svn.sourceforge.net/oscss/?rev=4004&view=rev
Author: oscim
Date: 2012-01-01 20:07:41 +0000 (Sun, 01 Jan 2012)
Log Message:
-----------
FS#917
FS#957
correction coquille suite remont?\195?\169 precedente
correction suite evolution prise en charge des images
Modified Paths:
--------------
trunk/catalog/admin/includes/classes/drivers/productsACA.php
trunk/catalog/admin/includes/classes/drivers/sqlcategorie.php
trunk/catalog/admin/includes/functions/html_output.php
trunk/catalog/admin/includes/gabarit/categories/display_view.edit.gab
trunk/catalog/admin/includes/gabarit/products/display_view.edit.gab
trunk/catalog/admin/includes/modules/configuration/modtemplate.php
trunk/catalog/admin/includes/modules/pages/categories.php
trunk/catalog/admin/includes/modules/pages/products.php
trunk/catalog/admin/includes/template/oscss/jquery-ui-1.css
trunk/catalog/admin/includes/template/oscss/stylesheet-1.css
trunk/catalog/includes/modules/also_purchased_products.php
trunk/catalog/index.php
trunk/catalog/install/includes/content/core.base.php
trunk/catalog/install/includes/modele/admin_configure.txt
trunk/catalog/install/includes/sql/mysql/data/91_osc_images.sql
Modified: trunk/catalog/admin/includes/classes/drivers/productsACA.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/productsACA.php 2012-01-01 16:42:59 UTC (rev 4003)
+++ trunk/catalog/admin/includes/classes/drivers/productsACA.php 2012-01-01 20:07:41 UTC (rev 4004)
@@ -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.1
- @date 14/12/11, 20:11
+ @date 01/01/2012, 18:17
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -33,7 +33,7 @@
global $language, $languages_id,$language_code2, $lang,$oscss;
$this->name='products';
- $this->products_id=(int)(($id>0)?$Id : 0);
+ $this->products_id=(int)(($id>0)?$id : 0);
$this->image_handler='';
$this->type_flag=1;
Modified: trunk/catalog/admin/includes/classes/drivers/sqlcategorie.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlcategorie.php 2012-01-01 16:42:59 UTC (rev 4003)
+++ trunk/catalog/admin/includes/classes/drivers/sqlcategorie.php 2012-01-01 20:07:41 UTC (rev 4004)
@@ -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.1
- @date 22/09/11, 20:11
+ @date 01/01/12, 20:11
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class sqlcategorie
@@ -249,8 +249,8 @@
$check_q = $DB->query($sql="select * from " . TABLE_CATEGORIES_DESCRIPTION . " cd where categories_id = '" .(int) $ID . "'");
foreach($check_q->fetchAllAssoc() as $catlg){
- $result['categories_name'][$catlg['language_id']] = $catlg['categories_name'];
- $result['categories_description'][$catlg['language_id']] = $catlg['categories_description'];
+ $result['categories_name'][$catlg['language_id']] = $catlg['categories_name'];
+ $result['categories_description'][$catlg['language_id']] = $catlg['categories_description'];
}
$result['products_count'] = categorieUtility::products_in_category_count($ID);
$result['cms_count'] =categorieUtility::cms_in_category_count($ID);
@@ -399,13 +399,13 @@
public static function AddImage($cat_image='', $no_img=''){
if (tep_not_null($cat_image) && ($cat_image != 'none')){
- if( strpos($cat_image,DIR_WS_CATALOG_IMAGES) >=0 )
- $cat_image = tep_db_prepare_input(substr($cat_image, strlen( DIR_WS_CATALOG_IMAGES) ) );
+ if( strpos($cat_image,DIR_WS_CATALOG_IMAGES) ===0 )
+ $cat_image = tep_db_prepare_input(substr($cat_image, strlen( DIR_WS_CATALOG_IMAGES) ) );
else
- $cat_image = tep_db_prepare_input($cat_image);
+ $cat_image = tep_db_prepare_input($cat_image);
}
- $cat_image =(empty($cat_image) || ($no_img=='' && $cat_image=='on') ) ? '' : tep_db_prepare_input($cat_image) ;
+ $cat_image =(empty($cat_image) || (/*$no_img=='' &&*/ $no_img=='on') ) ? '' : tep_db_prepare_input($cat_image) ;
return $cat_image;
}
Modified: trunk/catalog/admin/includes/functions/html_output.php
===================================================================
--- trunk/catalog/admin/includes/functions/html_output.php 2012-01-01 16:42:59 UTC (rev 4003)
+++ trunk/catalog/admin/includes/functions/html_output.php 2012-01-01 20:07:41 UTC (rev 4004)
@@ -234,6 +234,10 @@
return '<img src="'.tep_href_link('document.php', 'mod=img&typ=db&key='.md5(DIR_WS_IMAGES.$image).'&w='.$width.'&h='.$height).'" alt="'.$alt.'" title="'.$alt.'" '.$parameters.'/>';
}
+function tep_language_image($image, $alt, $width = '', $height = '', $parameters = '') {
+ return '<img src="'.tep_catalog_href_link(DIR_WS_LANGUAGES.$image).'" width="'.$width.'" height="'.$height.'" alt="'.$alt.'" title="'.$alt.'" '.$parameters.'/>';
+ }
+
/**
Fonctions remplacé par des class
=> Retrocompatibilité
Modified: trunk/catalog/admin/includes/gabarit/categories/display_view.edit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/categories/display_view.edit.gab 2012-01-01 16:42:59 UTC (rev 4003)
+++ trunk/catalog/admin/includes/gabarit/categories/display_view.edit.gab 2012-01-01 20:07:41 UTC (rev 4004)
@@ -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 07/10/11, 23:13
+ @date 01/01/12, 23:13
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -44,7 +44,7 @@
<div class="tabs_lang">
<ul>
<?php for ($i=0, $n=sizeof(categories::$languages); $i<$n; $i++) { ?>
- <li><a href="#fieldset_<?php echo $i ?>"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . categories::$languages[$i]['directory'] . '/images/' . categories::$languages[$i]['image'], categories::$languages[$i]['name']); ?></a></li>
+ <li><a href="#fieldset_<?php echo $i ?>"><?php echo tep_language_image( categories::$languages[$i]['directory'] . '/images/' . categories::$languages[$i]['image'], categories::$languages[$i]['name']); ?></a></li>
<?php } ?>
</ul>
@@ -81,11 +81,11 @@
<div class="edit box_right fright w_30">
<dl>
- <dt class="block_input" style="width:95%; text-align:center;">
- <?php echo tep_image(DIR_WS_CATALOG_IMAGES . categories::$cInfo->categories_image, 'image', TEMP_BO_HEADING_IMAGE_WIDTH, TEMP_BO_HEADING_IMAGE_HEIGHT) ?>
+ <dt class="block_input tcenter" style=" text-align:center;">
+ <?php echo tep_info_image( categories::$cInfo->categories_image, 'image', TEMP_BO_HEADING_IMAGE_WIDTH, TEMP_BO_HEADING_IMAGE_HEIGHT) ?>
<?php if(tep_not_null(categories::$cInfo->categories_image)) echo tep_draw_checkbox_field('categories_image_no', 'categories_image_no', 'on'). ' '.__('text delete image cat'); ?>
</dt>
- <dt class="block_input" style="width:95%; ">
+ <dt class="block_input" >
<Label><?php echo __('text choose img') ?></label>
<?php echo '<a class="button" href="#" onclick="'.tep_get_filebroswerserveur("categories_image", "image", '').'">'.tep_draw_input_field('categories_image','', categories::$cInfo->categories_image ).' '.tep_image(DIR_WS_ICONS . 'icon_browser.png', PARCOURIR_SERVER).'</a>' ?>
</dt>
Modified: trunk/catalog/admin/includes/gabarit/products/display_view.edit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/products/display_view.edit.gab 2012-01-01 16:42:59 UTC (rev 4003)
+++ trunk/catalog/admin/includes/gabarit/products/display_view.edit.gab 2012-01-01 20:07:41 UTC (rev 4004)
@@ -1,13 +1,14 @@
<?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.1
- @date 07/11/11, 10:08
+ @date 01/01/12, 23:13
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
+
?>
<h3><?php echo __('heading title'); ?></h3>
@@ -33,13 +34,13 @@
<fieldset class="tabs_lang block_field">
<ul>
<?php for ($i=0, $n=sizeof(products::$languages); $i<$n; $i++) { ?>
- <li><?php echo '<a href="#products_name-' . ($i+1).'" >' . tep_image(DIR_WS_CATALOG_LANGUAGES . products::$languages[$i]['directory'] . '/images/' . products::$languages[$i]['image'], products::$languages[$i]['name']) . ' ' . products::$languages[$i]['name'] . '</a>' ?></li>
+ <li><?php echo '<a href="#products_name-' . ($i+1).'" title="'.products::$languages[$i]['name'].'">' . tep_language_image( products::$languages[$i]['directory'] . '/images/' . products::$languages[$i]['image'], products::$languages[$i]['name']). '</a>' ?></li>
<?php } ?>
</ul>
- <?php for ($i=0, $n=sizeof(products::$languages); $i<$n; $i++) { ?>
+ <?php for ($i=0, $n=sizeof(products::$languages); $i<$n; $i++) {?>
<ul id="<?php echo 'products_name-'.($i+1) ?>">
<li class="block_input">
- <label for="<?php echo 'products_name_' . products::$languages[$i]['id']; ?>"><?php echo __('text products name'); ?></label>
+ <label for="<?php echo 'products_name_' . products::$languages[$i]['id']; ?>"><?php echo __('product text products name'); ?></label>
<?php echo tep_draw_input_field('products_name[' . products::$languages[$i]['id'] . ']', 'products_name_' . products::$languages[$i]['id'], (isset($products_name[products::$languages[$i]['id']]) ? stripslashes($products_name[products::$languages[$i]['id']]) : tep_get_products_name(products::$pInfo->products_id, products::$languages[$i]['id']))).'<span class="required">*</span>'; ?>
</li>
</ul>
@@ -205,7 +206,7 @@
<legend><?php echo __('text legend image'); ?></legend>
<dl>
<dt class="block_input">
- <p class="new_product_img" ><?php echo tep_image((!empty(products::$pInfo->products_image)?DIR_WS_CATALOG_IMAGES.products::$pInfo->products_image:IMAGE_NONEXISTENT) , products::$pInfo->products_image, TEMP_BO_HEADING_IMAGE_WIDTH, TEMP_BO_HEADING_IMAGE_HEIGHT, 'class="new_product_img" id="products_imageimg"'); ?></p>
+ <p class="new_product_img" ><?php echo tep_info_image(products::$pInfo->products_image, products::$pInfo->products_image, TEMP_BO_HEADING_IMAGE_WIDTH, TEMP_BO_HEADING_IMAGE_HEIGHT, 'class="new_product_img" id="products_imageimg"'); ?></p>
</dt>
<?php if(products::CheckClassProduct('CLASS_IMAGE')): /** Si image de prix defini, les prix sont pris en charge par un onglet */ ?>
<dt class="block_input">
Modified: trunk/catalog/admin/includes/modules/configuration/modtemplate.php
===================================================================
--- trunk/catalog/admin/includes/modules/configuration/modtemplate.php 2012-01-01 16:42:59 UTC (rev 4003)
+++ trunk/catalog/admin/includes/modules/configuration/modtemplate.php 2012-01-01 20:07:41 UTC (rev 4004)
@@ -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 22/09/11, 19:49
+ @date 01/01/12, 19:49
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class modtemplate
@@ -97,7 +97,9 @@
$template_infos = @simplexml_load_file($file);
if (!empty($template_infos->thumb) && file_exists(DIR_FS_TEMPLATES.$theme.'/'.$template_infos->thumb)) {
- $picture = '<a href="'. DIR_WS_TEMPLATES.$theme.'/'.$template_infos->thumb.'" class="fancy" rel="template" title="'.$theme.' / '.$template_infos->desc.' ('.__('version').' : '.$template_infos->version.') '.__('by ').$template_infos->author.'" >'.tep_image(DIR_WS_TEMPLATES.$theme . '/' . $template_infos->thumb, $theme, SMALL_IMAGE_WIDTH).'</a>';
+ $picture = '<a href="'. DIR_WS_TEMPLATES.$theme.'/'.$template_infos->thumb.'" class="fancy" rel="template" title="'.$theme.' / '.$template_infos->desc.' ('.__('version').' : '.$template_infos->version.') '.__('by ').$template_infos->author.'" >
+<img title="image" alt="image" src="'.DIR_WS_TEMPLATES.$theme . '/' . $template_infos->thumb.'" width="150" />
+'/*.tep_image(DIR_WS_TEMPLATES.$theme . '/' . $template_infos->thumb, $theme, SMALL_IMAGE_WIDTH)*/.'</a>';
} else $picture = __('text no preview');
if ($theme == TEMPLATE_NAME ) {
Modified: trunk/catalog/admin/includes/modules/pages/categories.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/categories.php 2012-01-01 16:42:59 UTC (rev 4003)
+++ trunk/catalog/admin/includes/modules/pages/categories.php 2012-01-01 20:07:41 UTC (rev 4004)
@@ -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.1
- @date 02/10/11, 09:44
+ @date 01/01/12, 09:44
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@brief manage category and module aca for cat
@@ -196,9 +196,14 @@
'parent_id' => tep_db_prepare_input((int)@$_POST['cPath']),
'categories_status' => (isset($_POST['categories_status'])) ? tep_db_prepare_input((int)$_POST['categories_status']) : 0,
'categories_hidden' => (isset($_POST['categories_hidden'])) ? tep_db_prepare_input((int)$_POST['categories_hidden']) : 0 ,
- 'categories_image'=>sqlcategorie::AddImage(@$_POST['categories_image'], @$_POST['categories_image_no'])
);
+ if (!isset($_POST['categories_image_no']) && !empty($_POST['categories_image']) )
+ $params['sqlarray']['categories_image']=sqlcategorie::AddImage(@$_POST['categories_image'], @$_POST['categories_image_no']);
+ else
+ $params['sqlarray']['categories_image']='';
+
+
$params['id']=$categories_id;
$params['action']=self::$action;
$params['post']=$_POST;
Modified: trunk/catalog/admin/includes/modules/pages/products.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/products.php 2012-01-01 16:42:59 UTC (rev 4003)
+++ trunk/catalog/admin/includes/modules/pages/products.php 2012-01-01 20:07:41 UTC (rev 4004)
@@ -4,7 +4,7 @@
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 01/01/2012, 18:17
+ @date 01/01/12, 09:44
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -247,22 +247,18 @@
unset($params['sqlarray']['products_quantity']);
}
- if (isset($_POST['products_image']) && tep_not_null($_POST['products_image']) && ($_POST['products_image'] != 'none')){
+ if (isset($_POST['products_image']) && !preg_match('#^[0-9]*$#',$_POST['products_image']) && ($_POST['products_image'] != 'none')){
if( substr($_POST['products_image'], 0,strlen( DIR_WS_CATALOG_IMAGES)) ==DIR_WS_CATALOG_IMAGES )
-// $params['sqlarray']['products_image']
-$img_src= tep_db_prepare_input(substr($_POST['products_image'], strlen( DIR_WS_CATALOG_IMAGES) ) );
+ $img_src= tep_db_prepare_input(substr($_POST['products_image'], strlen( DIR_WS_CATALOG_IMAGES) ) );
else
-// $params['sqlarray']['products_image'] =
-$img_src= tep_db_prepare_input($_POST['products_image']);
+ $img_src= tep_db_prepare_input($_POST['products_image']);
$sqli=sqlimage::fetch(array('pathkey'=>md5(DIR_WS_IMAGES.$img_src) ), true);
$params['sqlarray']['products_image'] = $sqli->rowid;
}
-/*
-var_dump($sqli->rowid);
-exit;*/
+
$params['id']=$products_id;
$params['action']=self::$action;
$params['post']=$_POST;
Modified: trunk/catalog/admin/includes/template/oscss/jquery-ui-1.css
===================================================================
--- trunk/catalog/admin/includes/template/oscss/jquery-ui-1.css 2012-01-01 16:42:59 UTC (rev 4003)
+++ trunk/catalog/admin/includes/template/oscss/jquery-ui-1.css 2012-01-01 20:07:41 UTC (rev 4004)
@@ -9,7 +9,7 @@
*/
/* Layout helpers
- - ---------------------------------*/ *
+ - ---------------------------------*/ * *
.ui-helper-hidden { display: none; }
.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
@@ -17,25 +17,25 @@
.ui-helper-clearfix { display: inline-block; }
/* required comment for clearfix to work in Opera \*/
* html .ui-helper-clearfix { height:1%; }
- . ui-helper-clearfix { display:block; } *
+ . ui-helper-clearfix { display:block; } * *
/* end clearfix */
.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
/* Interaction Cues
- - ---------------------------------*/ *
+ - ---------------------------------*/ * *
.ui-state-disabled { cursor: default !important; }
/* Icons
- - ---------------------------------*/ *
+ - ---------------------------------*/ * *
/* states and images */
.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
/* Misc visuals
- - ---------------------------------*/ *
+ - ---------------------------------*/ * *
/* Overlays */
.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
@@ -55,7 +55,7 @@
/* Component containers
- - ---------------------------------*/ *
+ - ---------------------------------*/ **
.ui-widget { font-family: Verdana,Arial,sans-serif; font-size: 1.1em; }
.ui-widget .ui-widget { font-size: 1em; }
.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif; font-size: 1em; }
@@ -65,7 +65,7 @@
.ui-widget-header a { color: #222222; }
/* Interaction states
- - ---------------------------------*/ *
+ - ---------------------------------*/ **
.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3; background: #e6e6e6 url(img/1/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #555555; }
.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555; text-decoration: none; }
.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #999999; background: #dadada url(img/1/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; }
@@ -75,7 +75,7 @@
.ui-widget :active { outline: none; }
/* Interaction Cues
- - ---------------------------------*/ *
+ - ---------------------------------*/ **
.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fcefa1; background: #fbf9ee url(img/1/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x; color: #363636; }
.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #fef1ec url(img/1/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x; color: #cd0a0a; }
@@ -86,7 +86,7 @@
.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
/* Icons
- - ---------------------------------*/ *
+ - ---------------------------------*/ **
/* states and images */
.ui-icon { width: 16px; height: 16px; background-image: url(img/1/ui-icons_222222_256x240.png); }
@@ -277,7 +277,7 @@
/* Misc visuals
- - ---------------------------------*/ *
+ - ---------------------------------*/ * *
/* Corner radius */
.ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; }
@@ -304,7 +304,7 @@
.ui-resizable { position: relative;}
.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;
/* http://bugs.jqueryui.com/ticket/7233
- - Resizable: resizable handles fail to work in IE if transparent *and content overlaps
+ - Resizable: resizable handles fail to work in IE if transparent *a*nd content overlaps
*/
background-image:url(data:);
}
Modified: trunk/catalog/admin/includes/template/oscss/stylesheet-1.css
===================================================================
--- trunk/catalog/admin/includes/template/oscss/stylesheet-1.css 2012-01-01 16:42:59 UTC (rev 4003)
+++ trunk/catalog/admin/includes/template/oscss/stylesheet-1.css 2012-01-01 20:07:41 UTC (rev 4004)
@@ -11,7 +11,7 @@
html { height: 100%;}
/* prepend */
* {margin:0;padding:0}
-a * :link, **
+a * * :link, **
a:visited {text-decoration: underline; color:#000;}
a:hover { text-decoration: none; }
img { border-width:0 ; margin:0; padding:0; }
@@ -23,7 +23,7 @@
h5 { font-size: 1em ;text-shadow:0 1px 0 #fff;}
p {padding:1em;}
ul {list-style:none;}
-#central li {padding-left:0;cursor:pointer;margin:0.1em 0;}
+/* #central li {padding-left:0;cursor:pointer;margin:0.1em 0;} */
th { text-shadow:0 1px 0 #fff;-moz-border-radius:6px; -webkit-border-radius:6px; margin:2px 1px; text-align: left; padding: 0 5px;line-height:30px;}
/* form defintion generale */
@@ -284,11 +284,11 @@
#central h3{ font-size:15px; font-weight:bold; margin:0 0 10px; padding:0 5px 10px 3px; clear:both; }
#central h4{font-weight:bold; padding:15px 5px 8px; clear:both; }
/* Block formulaire central */
-#central .block_form { -moz-border-radius:6px; -webkit-border-radius:6px; width:99%; margin:0;padding:5px 0.2em 10px 0.2em; display:inline-block; text-align: left; background:#C9C9C9;}
-#central .block_form .tabs_lang{width:98%; float:left;}
+#central .block_form { -moz-border-radius:6px; -webkit-border-radius:6px; margin:0;padding:5px 0.2em 10px 0.2em; display:inline-block; text-align: left; background:#C9C9C9;}
+#central .block_form .tabs_lang{/*width:98%;*/ float:left;}
#central .block_form div.tabPage {padding-left:0; padding-right:0;}
#central .block_form .block_input,
-#central form .block_input { text-shadow:0 1px 0 #fff;-moz-border-radius:6px; -webkit-border-radius:6px; width:98%; margin:2px 1px; display:inline-block; text-align: left; padding: 0 5px; background:#DEDADE;float:left;line-height:30px;}
+#central form .block_input { text-shadow:0 1px 0 #fff;-moz-border-radius:6px; -webkit-border-radius:6px; width:97%; margin:2px 1px; display:inline-block; text-align: left; padding: 0 5px; background:#DEDADE;float:left;line-height:30px;}
/* input[type="radio"] */
@@ -357,10 +357,12 @@
/* central form .block_input */
#central form .block_input .hasDatepicker{ margin:0; display:inline-block; text-align: left; padding: 0 5px; background:#DEDADE;float:left;line-height:30px; min-width:0;}
-#central form .block_field { text-shadow:0 1px 0 #fff;-moz-border-radius:6px; -webkit-border-radius:6px; min-width:96%; width:96.5%; max-width:97%; margin:2px ; display:inline-block; text-align: left; padding: 5px; float:left;background:#eee;}
-#central form .block_field.tabs_lang{width:96.9%}
-#central form .block_field.tabs_lang ul.ui-tabs-nav{padding:0; margin:0 -5px;}
-#central form .block_field.tabs_lang ul.ui-tabs-panel{padding:0; margin:0 -5px;}
+#central form .block_field { text-shadow:0 1px 0 #fff;-moz-border-radius:6px; -webkit-border-radius:6px; /*min-width:96%;*/ width:96.5%; /*max-width:97%; */margin:2px ; display:inline-block; text-align: left; padding: 5px; float:left;background:#eee;}
+#central form .block_field.tabs,
+#central form .block_field.tabs_lang{width:96.5%; margin:0 2px ; display:inline-block; text-align: left; padding:0 5px; float:left;background:#eee;}
+#central form ul.ui-tabs-nav {display: inline-block; margin: 0 ; padding: 1px; width: 99%;}
+#central form .block_field.tabs_lang ul.ui-tabs-nav,
+#central form .block_field.tabs_lang ul.ui-tabs-panel{display: inline-block; margin: 0 -5px; padding: 1px; width: 100%;}
#central form .edit.col_right .block_input{width:95%;}
#central form .edit.col_right .block_input label{width:20%;text-align:left;font-weight:bold}
#central form p.new_product_img { float:left; padding:5px; margin : 0 auto;text-align:center; width:98%;}
@@ -495,7 +497,7 @@
#salesStats p{float:left;min-height:50px;margin:0 auto;background:transparent url(img/1/header_sales.png) no-repeat bottom right;}
/* #orderStats,
* # customerStats, **
- # *customerInfos { height: 110px; }*/
+ * # *customerInfos { height: 110px; }*/
#orderStats ul,
#customerStats ul,
/* #salesStats ul { list-style-type:none; margin:0 0 0 2px; padding:0;} */
Modified: trunk/catalog/includes/modules/also_purchased_products.php
===================================================================
--- trunk/catalog/includes/modules/also_purchased_products.php 2012-01-01 16:42:59 UTC (rev 4003)
+++ trunk/catalog/includes/modules/also_purchased_products.php 2012-01-01 20:07:41 UTC (rev 4004)
@@ -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.1
- @date 17/12/11, 10:48
+ @date 01/01/2012, 18:17
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -26,7 +26,7 @@
"ON d.products_id = op2.products_id AND d.language_id='".$languages_id."'".
"WHERE op1.products_id = '" . (int)$_GET['products_id'] . "' ".
"GROUP BY op2.products_id, p2.products_image ".
- "ORDER BY 3 DESC ".
+// "ORDER BY 3 DESC ".
"LIMIT ".$page->_conf_value('MAX_DISPLAY_ALSO_PURCHASED') );
}
Modified: trunk/catalog/index.php
===================================================================
--- trunk/catalog/index.php 2012-01-01 16:42:59 UTC (rev 4003)
+++ trunk/catalog/index.php 2012-01-01 20:07:41 UTC (rev 4004)
@@ -72,7 +72,7 @@
* \section Page Customer public
\note For active public customer page , delete false
*/
- if (false/* isset($_GET['customers_id']*/) ) {
+ if (false/* isset($_GET['customers_id'])*/ ) {
$page->init('customers.php',$language);
$breadcrumb=$page->return_object('breadcrumb');
Modified: trunk/catalog/install/includes/content/core.base.php
===================================================================
--- trunk/catalog/install/includes/content/core.base.php 2012-01-01 16:42:59 UTC (rev 4003)
+++ trunk/catalog/install/includes/content/core.base.php 2012-01-01 20:07:41 UTC (rev 4004)
@@ -1,11 +1,12 @@
<?php
/**
- @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
- @package oscss-2 <www http://www.oscss.org>
- @version Rc-3
- @date 19/05/10, 09:10
+ @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 01/01/2012, 18:17
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @author Ayatus <www http://www.ayatus.org>
+ Ayatus <www http://www.ayatus.org>
@encode UTF-8
*/
@@ -37,37 +38,16 @@
'root_doc_p_log'=>'Documents/public/logs/',
'root_doc_p_data'=>'Documents/public/oscss_data/',
'root_doc_p_sessions'=>'Documents/public/sessions/',
+ 'root_doc_p_images'=>'Documents/images/imagecache/',
-
'htacces_admin'=>'admin/.htaccess',
'admin'=>'admin/',
'admin_inc'=>'admin/includes/',
'admin_image'=>'admin/images/',
'admin_graph'=>'admin/images/graphs/',
'admin_image'=>'admin/images/imagecache/',
-// 'admin_mod_a'=>'admin/includes/modules/account/',
-// 'admin_mod_c'=>'admin/includes/modules/categories/',
-// 'admin_mod_g'=>'admin/includes/modules/generic/',
-// 'admin_mod_p'=>'admin/includes/modules/products/',
-// 'admin_tmp'=>'admin/includes/tmp/',
-// 'admin_tmp_cache'=>'admin/includes/tmp/cache/',
-// 'admin_sessions'=>'admin/sessions/',
-// 'common'=>'common/',
-// 'common_classes'=>'common/classes/',
- 'download'=>'download/',
-// 'images'=>'images/',
- 'images'=>'images/imagecache/',
-// 'mod_a'=>'includes/modules/account/',
-// 'mod_g'=>'includes/modules/generic/',
-// 'mod_l'=>'includes/modules/listing/',
-// 'mod_o'=>'includes/modules/order_total/',
-// 'mod_py'=>'includes/modules/payment/',
-// 'mod_p'=>'includes/modules/products/',
-// 'mod_s'=>'includes/modules/shipping/',
-// 'oscss_data'=>'oscss_data/',
'pub'=>'pub/',
-// 'sessions'=>'sessions/',
'templates'=>'templates/'
);
Modified: trunk/catalog/install/includes/modele/admin_configure.txt
===================================================================
--- trunk/catalog/install/includes/modele/admin_configure.txt 2012-01-01 16:42:59 UTC (rev 4003)
+++ trunk/catalog/install/includes/modele/admin_configure.txt 2012-01-01 20:07:41 UTC (rev 4004)
@@ -70,7 +70,6 @@
define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
define('DIR_WS_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes/languages/');
define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/');
- define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');
define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');
// Documents
@@ -78,6 +77,7 @@
define('DIR_FS_SESSIONS', DIR_FS_ROOT_DOCS . 'admin/sessions/');
define('DIR_FS_CIP', DIR_FS_ROOT_DOCS . 'admin/contributions/');
define('DIR_FS_WORK', DIR_FS_ROOT_DOCS . 'public/oscss_data/');
+ define('DIR_FS_CATALOG_IMAGES', DIR_FS_ROOT_DOCS . 'images/');
// Template System files
define('DIR_FS_TEMPLATES', DIR_FS_CATALOG . 'templates/');
Modified: trunk/catalog/install/includes/sql/mysql/data/91_osc_images.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/data/91_osc_images.sql 2012-01-01 16:42:59 UTC (rev 4003)
+++ trunk/catalog/install/includes/sql/mysql/data/91_osc_images.sql 2012-01-01 20:07:41 UTC (rev 4004)
@@ -1,15 +1,15 @@
--+######################################################################--+
---| osCSS Open Source E-commerce |
+--| osCSS Open Source E-commerce
+
+--| Copyright (c) 2005-2012 The osCSS developers
+--|
+--| http://www.oscss.org
+--| Portions Copyright (c) 2003 osCommerce
--+######################################################################--+
---| Copyright (c) 2005-2011 The osCSS developers |
---| |
---| http://www.oscss.org |
---| Portions Copyright (c) 2003 osCommerce |
+--| This source file is subject to version 2.0 of the GPL license,
+--| available at the following url:
+--| http://www.oscss.org/
--+######################################################################--+
---| This source file is subject to version 2.0 of the GPL license, |
---| available at the following url: |
---| http://www.oscss.org/ |
---+######################################################################--+
@@ -18,7 +18,10 @@
--
INSERT INTO osc_images ( pathkey, path, file, date_added, last_modified, width, height, ext) VALUES
-('36484cc554ad547f9d51b1633e147877', 'images/oscss_logo.jpg', 'oscss_logo.jpg', '2011-12-26 23:40:29', '0000-00-00 00:00:00', 210, 103, 'jpeg'),
-( '4fde73e05351373690666b7f6d823e8b', 'images/noscreenshot.png', 'noscreenshot.png', '2011-12-26 23:40:29', '0000-00-00 00:00:00', 0, 0, ''),
-( '9230bdf5bb26ee77a0041c0b04adbb80', 'images/layout/oscss_logo.png', 'oscss_logo.png', '2011-12-26 23:40:33', '0000-00-00 00:00:00', 210, 103, 'png'),
+('36484cc554ad547f9d51b1633e147877', 'images/oscss_logo.jpg', 'oscss_logo.jpg', '2011-12-26 23:40:29', '0000-00-00 00:00:00', 210, 103, 'jpeg');
+INSERT INTO osc_images ( pathkey, path, file, date_added, last_modified, width, height, ext) VALUES
+( '4fde73e05351373690666b7f6d823e8b', 'images/noscreenshot.png', 'noscreenshot.png', '2011-12-26 23:40:29', '0000-00-00 00:00:00', 0, 0, '');
+INSERT INTO osc_images ( pathkey, path, file, date_added, last_modified, width, height, ext) VALUES
+( '9230bdf5bb26ee77a0041c0b04adbb80', 'images/layout/oscss_logo.png', 'oscss_logo.png', '2011-12-26 23:40:33', '0000-00-00 00:00:00', 210, 103, 'png');
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-01-01 16:43:07
|
Revision: 4003
http://oscss.svn.sourceforge.net/oscss/?rev=4003&view=rev
Author: oscim
Date: 2012-01-01 16:42:59 +0000 (Sun, 01 Jan 2012)
Log Message:
-----------
nombreuse correction et optimisation du code
suite evolution du code sur la normalisation des DataType
Amelioration des drivers associ?\195?\169
modification de la page membre public
Modified Paths:
--------------
trunk/catalog/admin/includes/classes/aca.php
trunk/catalog/admin/includes/classes/drivers/productsACA.php
trunk/catalog/admin/includes/gabarit/customers/address_book/display_view.tabs.gab
trunk/catalog/admin/includes/gabarit/customers/address_book/inline.delete.gab
trunk/catalog/admin/includes/gabarit/customers/address_book/inline.edit.gab
trunk/catalog/admin/includes/header.php
trunk/catalog/admin/includes/modules/pages/customers.php
trunk/catalog/admin/includes/modules/pages/products.php
trunk/catalog/admin/includes/template/oscss/inc/lib_general-1.js
trunk/catalog/admin/includes/template/oscss/stylesheet-1.css
trunk/catalog/common/class.interfaces.php
trunk/catalog/includes/classes/AbstractAcaModule.php
trunk/catalog/includes/classes/drivers/data/categorie.php
trunk/catalog/includes/classes/drivers/data/content.php
trunk/catalog/includes/classes/drivers/data/product.php
trunk/catalog/includes/classes/drivers/page/GabaritTemplate.php
trunk/catalog/includes/classes/page.php
trunk/catalog/includes/inc_base_lib.php
trunk/catalog/index.php
trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Css/habillage.css
trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/content/customers.php
trunk/catalog/install/includes/modele/htaccess.txt
Removed Paths:
-------------
trunk/catalog/admin/includes/functions/lib.customers_groups.php
Modified: trunk/catalog/admin/includes/classes/aca.php
===================================================================
--- trunk/catalog/admin/includes/classes/aca.php 2011-12-30 15:06:00 UTC (rev 4002)
+++ trunk/catalog/admin/includes/classes/aca.php 2012-01-01 16:42:59 UTC (rev 4003)
@@ -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.1
- @date 14/12/11, 22:53
+ @date 01/01/2012, 18:17
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@brief base class for aca extension
@@ -44,14 +44,14 @@
$this->image_handler='';
foreach(parent::initialise_type($const,$key) as $class){
- $cl[$class]=new $class ();
- $list_mod[$class] = $cl[$class]->sort_order;
+ $cl[$class]=new $class ();
+ $list_mod[$class] = $cl[$class]->sort_order;
- asort($list_mod);
- foreach($list_mod as $class=>$s){
- $this->modules[$class] =$cl[$class];
+ asort($list_mod);
+ foreach($list_mod as $class=>$s){
+ $this->modules[$class] =$cl[$class];
+ }
}
- }
}
public function ret_modules ($action){ return $this->modules;}
Modified: trunk/catalog/admin/includes/classes/drivers/productsACA.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/productsACA.php 2011-12-30 15:06:00 UTC (rev 4002)
+++ trunk/catalog/admin/includes/classes/drivers/productsACA.php 2012-01-01 16:42:59 UTC (rev 4003)
@@ -25,32 +25,47 @@
public $image_handler;
/**
- class constructor
+ @brief class constructor
+ @param $id int products id for load sub module
+ @note if $id is null serach $_GET['pID'] or $_REQUEST['pID']
*/
- function __construct() {
+ function __construct($id=0) {
global $language, $languages_id,$language_code2, $lang,$oscss;
$this->name='products';
- $this->products_id='';
+ $this->products_id=(int)(($id>0)?$Id : 0);
$this->image_handler='';
$this->type_flag=1;
+ /// force
+ if($this->products_id <= 0){
+ if (isset ($_GET['pID']))
+ $this->products_id=(int)$_GET['pID'];
+ elseif (isset ($_REQUEST['pID']))
+ $this->products_id=(int)$_REQUEST['pID'];
+ }
+
$this->modules=array();
$list_mod = array();
foreach(parent::initialise_type('MODULE_ACAPRO_INSTALLED_BO','products') as $class){
$cl[$class]=new $class ();
- // test flag type module, si aucun, produist base
- if(!isset($cl[$class]->flag_type_virtual)) $cl[$class]->flag_type_virtual=0;
- // incremente tableau module unqiuement si flag ok
- if($this->control_type_mod($cl[$class]->flag_type_virtual)) $list_mod[$class] = $cl[$class]->sort_order;
+
+ if($this->products_id > 0){
+ // test flag type module, si aucun, produist base
+ if(!isset($cl[$class]->flag_type_virtual)) $cl[$class]->flag_type_virtual=0;
+ // incremente tableau module unqiuement si flag ok
+ if($this->control_type_mod($cl[$class]->flag_type_virtual)) $list_mod[$class] = $cl[$class]->sort_order;
+ }
+ else
+ $list_mod[$class] = $cl[$class]->sort_order;
}
if(count($list_mod)>1) {
asort($list_mod);
foreach($list_mod as $class=>$s){
- $this->modules[$class] =$cl[$class];
+ $this->modules[$class] =$cl[$class];
}
unset($list_mod);
}
@@ -91,8 +106,10 @@
@return int, Id du type ou 1
*/
private function load_type_product(){
- if(!isset($_GET['pID'])) return ;
- $sql = "select * from ".TABLE_PRODUCTS." where products_id=".(int)$_GET['pID'];
+ if($this->products_id<=0)
+ return $this->type_flag=1;
+
+ $sql = "select * from ".TABLE_PRODUCTS." where products_id='".(int)$this->products_id."'";
$result = tep_db_query($sql);
if (tep_db_num_rows($result) > 0) { // this product is in the virtual table
$virtual = tep_db_fetch_array($result);
@@ -283,8 +300,8 @@
/**
Vue etat et list specifique modules
*/
- function display_view (&$contents) {
- }
+// function display_view (&$contents) {
+// }
/**
Return tableau complet des element à insrére dans la clause sql
Deleted: trunk/catalog/admin/includes/functions/lib.customers_groups.php
===================================================================
--- trunk/catalog/admin/includes/functions/lib.customers_groups.php 2011-12-30 15:06:00 UTC (rev 4002)
+++ trunk/catalog/admin/includes/functions/lib.customers_groups.php 2012-01-01 16:42:59 UTC (rev 4003)
@@ -1,16 +0,0 @@
-<?php
-/**
- @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
- @portion code Copyright (c) 2002 osCommerce
- @package osCSS-2 <www http://www.oscss.org>
- @version 2.1.0
- @date 19/12/10, 19:49
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-8
-*/
-
-
-function list_mod_shipping(){
-
-}
-?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/gabarit/customers/address_book/display_view.tabs.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/customers/address_book/display_view.tabs.gab 2011-12-30 15:06:00 UTC (rev 4002)
+++ trunk/catalog/admin/includes/gabarit/customers/address_book/display_view.tabs.gab 2012-01-01 16:42:59 UTC (rev 4003)
@@ -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.1
- @date 30/12/11, 19:31
+ @date 01/01/2012, 18:17
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@subpackage address_book
Modified: trunk/catalog/admin/includes/gabarit/customers/address_book/inline.delete.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/customers/address_book/inline.delete.gab 2011-12-30 15:06:00 UTC (rev 4002)
+++ trunk/catalog/admin/includes/gabarit/customers/address_book/inline.delete.gab 2012-01-01 16:42:59 UTC (rev 4003)
@@ -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.1
- @date 30/12/11, 19:31
+ @date 01/01/2012, 18:17
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@subpackage address_book
Modified: trunk/catalog/admin/includes/gabarit/customers/address_book/inline.edit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/customers/address_book/inline.edit.gab 2011-12-30 15:06:00 UTC (rev 4002)
+++ trunk/catalog/admin/includes/gabarit/customers/address_book/inline.edit.gab 2012-01-01 16:42:59 UTC (rev 4003)
@@ -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.1
- @date 30/12/11, 19:31
+ @date 01/01/2012, 18:17
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@subpackage address_book
Modified: trunk/catalog/admin/includes/header.php
===================================================================
--- trunk/catalog/admin/includes/header.php 2011-12-30 15:06:00 UTC (rev 4002)
+++ trunk/catalog/admin/includes/header.php 2012-01-01 16:42:59 UTC (rev 4003)
@@ -1,9 +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 05/01/11, 11:51
+ @version 2.1.1
+ @date 01/01/2012, 18:17
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@brief block in balise html head.
@@ -68,18 +69,25 @@
$('.tabs_lang').tabs().find('.ui-tabs-nav').sortable({axis:'x'});
- /** Flag ajax process Used in row status */
- $('a.ajaxinline').each(function(){
- var current = $(this);
- var ref =this.href +='&forceajax=true';
- current.click(function() {
- $.get(ref, function(data) {
- current.replaceWith(data);
- });
- return false;
- });
- });
+ /** Flag ajax process Used in row status */
+ $('a.ajaxinline').each(function(){
+ var current = $(this);
+ var reg = /(forceajax)/gi;
+ if( ! reg.test( this.href) )
+ var ref =this.href +='&forceajax=true';
+ else
+ var ref =this.href;
+ current.click(function() {
+ $.get(ref, function(data) {
+ current.replaceWith(data);
+ });
+ return false;
+ });
+ });
+
+
+// simple_tooltip("input","tooltip");
}
Modified: trunk/catalog/admin/includes/modules/pages/customers.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/customers.php 2011-12-30 15:06:00 UTC (rev 4002)
+++ trunk/catalog/admin/includes/modules/pages/customers.php 2012-01-01 16:42:59 UTC (rev 4003)
@@ -1,11 +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
- @Portioncode products class for ACA v2 (Advanced Categories Admin) by Rigadin2, www.osc-help.net
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 28/12/11, 09:40
+ @date 01/01/2012, 18:17
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class customers
@@ -113,6 +112,7 @@
$DB=Database::getInstance();
$_return=array();
+// var_dump(__CLASS__.'check_action');
if(isset($_GET['cID'])) self::$cID= (int)$_GET['cID'];
elseif(isset($_POST['customers_id'])) self::$cID= (int)$_POST['customers_id'];
@@ -291,9 +291,9 @@
A module has asked to privately take care of this action, check if class and method exist and run it.
*/
if (!empty(self::$actions['action_method']) && method_exists(self::$modules->modules[self::$actions['action_class']],self::$actions['action_method'] )){
- $metho=self::$actions['action_method'];
- self::$box = new box;
- self::$box=self::$modules->modules[self::$actions['action_class']]->$metho(self::$box,(int)$_GET['pID']);
+ $metho=self::$actions['action_method'];
+ self::$box = new box;
+ self::$box=self::$modules->modules[self::$actions['action_class']]->$metho(self::$box,(int)$_GET['pID']);
}
}
@@ -339,7 +339,7 @@
/**
@remarks Normal View Page
*/
- case 'confirm':
+ case 'delete':
self::load_db_values(self::$cID);
$action='delete';
break;
@@ -382,7 +382,7 @@
sprintf(CsrtAction::getLink('row_action_right', __('incarner'), 'incarner'), '', tep_catalog_href_link('login.php','osCAdminDirect='.md5($SecuKey.date('d')).'&id='.$customers['customers_id'],'SSL', false ) ,'').
sprintf(CsrtAction::getLink('row_action_right', IMAGE_EDIT, 'noedit'), '', tep_href_link(self::FILENAME,'cID=' . $customers['customers_id'].'&action=noedit' ),'' ).
sprintf(CsrtAction::getLink('row_action_right', IMAGE_EDIT, 'edit'), '', tep_href_link(self::FILENAME,'cID=' . $customers['customers_id'].'&action=edit' ),'' ).
- sprintf(CsrtAction::getLink('row_action_right', IMAGE_DELETE, 'delete'), 'fancy', tep_href_link(self::FILENAME, 'cID=' . $customers['customers_id'].'&action=confirm' ) ,'' )
+ sprintf(CsrtAction::getLink('row_action_right', IMAGE_DELETE, 'delete'), 'fancy', tep_href_link(self::FILENAME, 'cID=' . $customers['customers_id'].'&action=delete' ) ,'' )
);
}
Modified: trunk/catalog/admin/includes/modules/pages/products.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/products.php 2011-12-30 15:06:00 UTC (rev 4002)
+++ trunk/catalog/admin/includes/modules/pages/products.php 2012-01-01 16:42:59 UTC (rev 4003)
@@ -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.1
- @date 28/12/11, 17:30
+ @date 01/01/2012, 18:17
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -101,17 +101,23 @@
/**
@remarks not load if not first init
*/
- if(defined('JSONSTATMENT')) return;
+ if(!defined('JSONSTATMENT')){
+ //! active datatable in ajax, precise les GET necessaire
+ if(self::$action =='listing') define('JSONSTATMENT', 'mod=page&type='.self::$code.(isset($_GET['expected'])?'&expected=true':'').(isset($_GET['cPath'])?'&cPath='.$_GET['cPath']:'').(isset($_GET['Vtype'])?'&Vtype='.$_GET['Vtype']:''));
+ //! detail item in ajax
+ if(!defined('AJAXSTATMENTDETAIL')) define('AJAXSTATMENTDETAIL', 'mod=page&type='.self::$code);
+ }
+ /**
+ @remarks Specific product, force load current id for adjust module
+ */
+ if (isset ($_GET['pID']))
+ self::$modules=new productsACA($_GET['pID']);
+ elseif (isset ($_POST['pID']))
+ self::$modules=new productsACA($_POST['pID']);
+ else
+ self::$modules=new productsACA();
- //! active datatable in ajax, precise les GET necessaire
- if(!defined('JSONSTATMENT')) define('JSONSTATMENT', 'mod=page&type='.self::$code.(isset($_GET['expected'])?'&expected=true':'').(isset($_GET['cPath'])?'&cPath='.$_GET['cPath']:'').(isset($_GET['Vtype'])?'&Vtype='.$_GET['Vtype']:''));
- //! detail item in ajax
- if(!defined('AJAXSTATMENTDETAIL')) define('AJAXSTATMENTDETAIL', 'mod=page&type='.self::$code);
-
-
-
- self::$modules=new productsACA;
self::$modules->set_image_handler();
// check if the catalog image directory exists
@@ -138,21 +144,24 @@
$epf = array();
$xfields = array();
while ($e = tep_db_fetch_array($epf_query)) { // retrieve all active extra fields for all languages
- $field = 'extra_value' . ($e['epf_uses_value_list'] ? '_id' : '') . $e['epf_id'];
- $epf[] = array('id' => $e['epf_id'],
- 'label' => $e['epf_label'],
- 'uses_list' => $e['epf_uses_value_list'],
- 'show_chain' => $e['epf_show_parent_chain'],
- 'size' => $e['epf_size'],
- 'language' => $e['languages_id'],
- 'language_active' => $e['epf_active_for_language'],
- 'field' => $field);
- if (!in_array( $field, $xfields))
- $xfields[] = $field; // build list of distinct fields
+ $field = 'extra_value' . ($e['epf_uses_value_list'] ? '_id' : '') . $e['epf_id'];
+ $epf[] = array('id' => $e['epf_id'],
+ 'label' => $e['epf_label'],
+ 'uses_list' => $e['epf_uses_value_list'],
+ 'show_chain' => $e['epf_show_parent_chain'],
+ 'size' => $e['epf_size'],
+ 'language' => $e['languages_id'],
+ 'language_active' => $e['epf_active_for_language'],
+ 'field' => $field);
+ if (!in_array( $field, $xfields))
+ $xfields[] = $field; // build list of distinct fields
}
// end Extra Product Fields
+
+
+
self::$actions['action'] = self::$action;
self::$actions['display_file']='';
self::$actions['action_class']=(isset($_GET['action_class']))? $_GET['action_class'] : '';
@@ -160,6 +169,7 @@
// Ask categories modules if want to change the action
self::$actions = self::$modules->check_action(self::$actions);
+
self::$action = self::$actions['action'];
Modified: trunk/catalog/admin/includes/template/oscss/inc/lib_general-1.js
===================================================================
--- trunk/catalog/admin/includes/template/oscss/inc/lib_general-1.js 2011-12-30 15:06:00 UTC (rev 4002)
+++ trunk/catalog/admin/includes/template/oscss/inc/lib_general-1.js 2012-01-01 16:42:59 UTC (rev 4003)
@@ -1,11 +1,30 @@
function showmenu(num_id){
- for(i=0;i<8;i++){
- if (num_id !=='' && num_id===i) {
- $('#menu'+i+'Container').show().Fisheye({maxWidth: 90, items: 'a', itemsText: 'span', container: '.options', itemWidth: 50, proximity: 55, alignment: 'left', valign: 'top', halign: 'center'});
- }
- else {$('#menu'+i+'Container').hide();}
- }
-}
-$(function(){
- $(".adminBlock h3").click(function () {$(".adminBlock .tirroir").slideToggle("slow");});
-});
\ No newline at end of file
+ for(i=0;i<8;i++){
+ if (num_id !=='' && num_id===i) {
+ $('#menu'+i+'Container').show().Fisheye({maxWidth: 90, items: 'a', itemsText: 'span', container: '.options', itemWidth: 50, proximity: 55, alignment: 'left', valign: 'top', halign: 'center'});
+ }
+ else {$('#menu'+i+'Container').hide();}
+ }
+ }
+ $(function(){
+ $(".adminBlock h3").click(function () {$(".adminBlock .tirroir").slideToggle("slow");});
+ });
+
+
+
+ // function simple_tooltip(target_items, name){
+ // $(target_items).each(function(i){
+ // $("body").append("<div class='"+name+"' id='"+name+i+"'><p>"+$(this).attr('title')+"</p></div>");
+ // var my_tooltip = $("#"+name+i);
+ //
+ // var ref = $(this).attr("id");
+ //
+ // $("label[for='"+ref+"']").removeAttr("title").mouseover(function(){
+ // my_tooltip.css({opacity:0.8, display:"none"}).fadeIn(400);
+ // }).mousemove(function(kmouse){
+ // my_tooltip.css({left:kmouse.pageX+15, top:kmouse.pageY+15});
+ // }).mouseout(function(){
+ // my_tooltip.fadeOut(400);
+ // });
+ // });
+ // }
\ No newline at end of file
Modified: trunk/catalog/admin/includes/template/oscss/stylesheet-1.css
===================================================================
--- trunk/catalog/admin/includes/template/oscss/stylesheet-1.css 2011-12-30 15:06:00 UTC (rev 4002)
+++ trunk/catalog/admin/includes/template/oscss/stylesheet-1.css 2012-01-01 16:42:59 UTC (rev 4003)
@@ -1,17 +1,17 @@
/**
- @ licence GPL 2005-2010 The osCSS developers ***- osCSS Open Source E-commerce
- @portion code Copyright (c) 2002 osCommerce
- @package osCSS-2 <www http://www.oscss.org>
- @version 2.1.1
- @date 23/06/10, 17:42
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-8
+ * @ 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 01/01/2012, 18:17
+ * @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ * @encode UTF-8
*/
body { background:#faf9f7 url(img/1/body.jpg) repeat-x; color:#000; margin:0; padding:0; font: normal 11px Verdana, Arial, sans-serif; }
html { height: 100%;}
/* prepend */
* {margin:0;padding:0}
-a :link, ***
+a * :link, **
a:visited {text-decoration: underline; color:#000;}
a:hover { text-decoration: none; }
img { border-width:0 ; margin:0; padding:0; }
@@ -41,6 +41,17 @@
.noselected{}
.selected{background:#f0d4bf;}
+/* popup form by fancy */
+#fancybox-inner h3 { background: none repeat scroll 0 0 black; color: white; font-weight: normal; height: 21px; left: 0; line-height: 20px; padding: 0; position: absolute; text-align: center; text-shadow: none; top: 0; width: 100%;}
+#fancybox-inner form {margin:0; padding:0; position: relative;top:20px;min-height: 90%;}
+#fancybox-inner form h3{ top: -25px;}
+#fancybox-inner fieldset { margin: 5px; padding:5pxem; border:none; }
+#fancybox-inner fieldset label { width: 100%; line-height: 18px; margin-right: 10px; display:inline-block; text-align: left; padding: 0 0 2px 0;}
+#fancybox-inner fieldset select,
+#fancybox-inner fieldset input[type="text"] { min-width:65%; display:inline-block;float:right;}
+#fancybox-inner .button_nav {bottom: 0; position: absolute; right: 0;}
+
+
/* general class */
.error{ color:red; }
.info{ color:blue;}
@@ -357,7 +368,7 @@
#central form fieldset legend { color:#666666; font-size:1.2em; font-style:italic; font-weight:bold; padding:0 5px 0 20px;}
#central form p select,
#central form p input[type="text"] { margin:5px 15px; min-width:200px; }
-#central form p input[type="radio"],
+/* #central form p input[type="radio"], */
#central form p input[type="checkbox"] { float:right; margin:5px 15px; width:20px; }
#central form .input-multi input[type="radio"]{float:none;}
@@ -483,8 +494,8 @@
#customerInfos p{min-height:70px;background:transparent url(img/1/header_infos.png) no-repeat bottom right;}
#salesStats p{float:left;min-height:50px;margin:0 auto;background:transparent url(img/1/header_sales.png) no-repeat bottom right;}
/* #orderStats,
- # customerStats, ***
-#customerInfos { height: 110px; }*/
+ * # customerStats, **
+ # *customerInfos { height: 110px; }*/
#orderStats ul,
#customerStats ul,
/* #salesStats ul { list-style-type:none; margin:0 0 0 2px; padding:0;} */
@@ -647,4 +658,24 @@
/* Ext */
-#central .dataTables_wrapper {min-height:200px}
\ No newline at end of file
+#central .dataTables_wrapper {min-height:200px}
+
+/* Toolips */
+
+.tooltip{
+ position:absolute;
+ z-index:999;
+ left:-9999px;
+ background-color:#dedede;
+ padding:5px;
+ border:1px solid #fff;
+ width:250px;
+}
+
+.tooltip p{
+ margin:0;
+ padding:0;
+ color:#fff;
+ background-color:#222;
+ padding:2px 7px;
+}
\ No newline at end of file
Modified: trunk/catalog/common/class.interfaces.php
===================================================================
--- trunk/catalog/common/class.interfaces.php 2011-12-30 15:06:00 UTC (rev 4002)
+++ trunk/catalog/common/class.interfaces.php 2012-01-01 16:42:59 UTC (rev 4003)
@@ -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 05/07/10, 18:17
+ @version 2.1.1
+ @date 01/01/2012, 18:17
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -104,7 +104,23 @@
}
+/**
+ @class DataStatmentFO
+ @brief This class is master abstract class Data Statment FO by driverDataType
+*/
abstract class DataStatmentFO {
+ /**
+ @var $lg_id int
+ */
+ public static $lg_id;
+ /**
+ @var $obj_language query sql ressource result
+ */
+ public static $obj_language;
+ /**
+ @var $cache array cache result
+ */
+ public static $cache=array();
// Force la classe étendue à définir cette méthode
protected static function statment_query($content_query,$exclude='',$search=''){}
@@ -122,5 +138,31 @@
self::$obj_language = $DB->query("select code from " . TABLE_LANGUAGES . " where languages_id='" .self::$lg_id . "'");
}
+ /**
+ \brief delet item in cache
+ \param $id integer id cat
+ */
+ public static function resetCacheId($id){
+ foreach(self::$cache as $k=>$v)
+ if($v==$id) {
+ unset(self::$cache[$k]);
+ }
+ }
+
+ /**
+ * \brief Mise en pile de toutes les element des page de cms
+ * @param $id int
+ */
+ public static function add_cache($id){
+ self::$cache[]=$id;
+ }
+
+ /**
+ * \brief Appel et recup des element du cache
+ */
+ public static function in_cache(){
+ return implode("," ,self::$cache);
+ }
+
}
?>
\ No newline at end of file
Modified: trunk/catalog/includes/classes/AbstractAcaModule.php
===================================================================
--- trunk/catalog/includes/classes/AbstractAcaModule.php 2011-12-30 15:06:00 UTC (rev 4002)
+++ trunk/catalog/includes/classes/AbstractAcaModule.php 2012-01-01 16:42:59 UTC (rev 4003)
@@ -1,17 +1,97 @@
<?php if (!defined('HTTP_SERVER')) die('You can not access this file directly!');
/**
- \licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
- \portion code Copyright (c) 2002 osCommerce
- \package osCSS-2 <www http://www.oscss.org>
- \version 2.1.0
- \date 22/03/2011, 23:18
- \author oscim <mail aur...@os...> <www http://www.oscim.fr>
- \encode UTF-8
+ @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 01/01/2012, 18:17
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
\file AbstractAcaModule.php
\brief
Ces classes sont les classes de base de l'appel des structure aca, elle ne sont appelé que par l'intermisiaire de class enfants
*/
+
+Class DataTypeFactory{
+
+ public static $modules;
+ /**
+ @var current type datatype value
+ */
+ public static $type;
+
+ /**
+ @brief constructor
+ */
+ protected function __construct($full) {
+ global $languages_id;
+ if($full) $this->start_module();
+ }
+
+ /**
+ @brief Appel magic
+ @param $method string
+ @param $attrs array
+ */
+// public function __call($method, $attrs) {
+// $r=array();
+// foreach ($this->modules as $key=>$module) {
+// if (method_exists($module, $method )) /// control presence method
+// $r[$key]=$this->modules[$key]->$method($attrs);
+// }
+//
+// return $r;
+// }
+
+
+ /**
+ Module ACA
+ */
+
+ /**
+ * \fn ret_modules()
+ * \brief Retour tableau des modules type products actif
+ * @return plusieurs modules via array(object)
+ */
+ public function ret_modules(){ $pdm=$this->start_module(); return $pdm->ret_modules();}
+ /**
+ * \fn check_action($class='',$actions='')
+ * \brief execute la capture des actions par les modlues
+ * @param $class string
+ * @param $actions array
+ */
+ public function check_action($class='',$actions=''){ $pdm=$this->start_module(); return $pdm->check_action($class,$actions);}
+ /**
+ * \fn get_header($class='',$actions='')
+ * \brief traitement block header des module
+ * Display block header modules
+ * @param $class string
+ * @param $actions array
+ */
+ public function get_header($class='',$actions=''){ $pdm=$this->start_module(); return $pdm->get_header($class,$actions);}
+ /**
+ * \fn after_check_action($class='',$actions='')
+ * \brief after_check_action
+ * @param $class string
+ * @param $actions array
+ */
+ public function after_check_action($class='',$actions=''){ $pdm=$this->start_module(); return $pdm->after_check_action($class,$actions);}
+ /**
+ * \fn display_view($pID,$class='',$exclude=array())
+ * \brief after_check_action
+ * @param $pID int
+ * @param $class string
+ * @param $exclude array
+ */
+ public function display_view($ID,$class='',$exclude=array()){ $pdm=$this->start_module(); return $pdm->display_view($ID,$class,$exclude);}
+
+
+
+
+}
+
+
/**
\class AbstractAcaModule
\brief class d'appel des module aca
@@ -29,24 +109,26 @@
public static function initialise_type($cst, $folder_base){
global $page,$language,$messageStack;
$list_mod=array();
+
if(defined($cst)){
+// var_dump($cst);
$files_array=explode (';',str_replace(';;',';',constant($cst)));
if (tep_not_null($files_array[0])) {
- reset ($files_array);
- while (list ($key, $file) = each ($files_array)) {
- $class=substr($file,0, strlen($file)-4 );
- $folder=$folder_base;
- //! module dans leur propre sous rep
- if(is_dir(DIR_WS_MODULES . $folder.'/'.$class)) {
- $folder .= '/' . $class;
- }
- if (!empty($class)) {
- if(($path=page::fix_file(DIR_WS_INCLUDES .'languages/'. $language . '/modules/'. $folder.'/' . $file,true)) !=false) $page->pile_file_lang($path);
- if(!class_exists($class) && ( ($pathclass=page::fix_file(DIR_WS_MODULES . $folder.'/' . $file)) != false ) )include($pathclass);
- if(!class_exists($class)) trigger_error(sprintf(__CLASS__.' Could not load class %s', $class), E_USER_ERROR);
- else $list_mod[]=$class;
- }
- }
+ reset ($files_array);
+ while (list ($key, $file) = each ($files_array)) {
+ $class=substr($file,0, strlen($file)-4 );
+ $folder=$folder_base;
+ //! module dans leur propre sous rep
+ if(is_dir(DIR_WS_MODULES . $folder.'/'.$class)) {
+ $folder .= '/' . $class;
+ }
+ if (!empty($class)) {
+ if(($path=page::fix_file(DIR_WS_INCLUDES .'languages/'. $language . '/modules/'. $folder.'/' . $file,true)) !=false) $page->pile_file_lang($path);
+ if(!class_exists($class) && ( ($pathclass=page::fix_file(DIR_WS_MODULES . $folder.'/' . $file)) != false ) )include($pathclass);
+ if(!class_exists($class)) trigger_error(sprintf(__CLASS__.' Could not load class %s', $class), E_USER_ERROR);
+ else $list_mod[]=$class;
+ }
+ }
}
}
return $list_mod;
@@ -61,7 +143,7 @@
$r=array();
foreach ($this->modules as $key=>$module) {
if (method_exists($module, $method )) /// control presence method
- $r[$key]=$this->modules[$key]->$method($attrs);
+ $r[$key]=$this->modules[$key]->$method($attrs);
}
return $r;
@@ -248,7 +330,7 @@
global $language, $page, $lang;
// if $const is empty, use generic name based on value in $key
- if(empty($const)) $const = strtoupper('MODULE_'.$key.'_INSTALLED');
+ if(strlen($const) < 3 || !is_string($const)) $const = strtoupper('MODULE_'.$key.'_INSTALLED');
$this->name=$key;
$this->generics_id='';
@@ -269,10 +351,8 @@
return self::$_instance;
}
- public static function factory($class)
- {
- if (class_exists($class))
- {
+ public static function factory($class){
+ if (class_exists($class)){
if(isset(self::$instance) && self::$instance instanceof $class) {
return self::$instance;
}
@@ -321,18 +401,20 @@
if (!empty($class)) {
if (isset($this->modules[$class]) && $this->modules[$class]->enabled and (method_exists($class, 'display_view' ))){
$this->modules[$class]->load_db_values($pID);
- return $this->modules[$class]->display_view($pID);
+ $result = $this->modules[$class]->display_view($pID);
+ return $result[0];
}
} else {
- $c='';
+ $o = array();
if(isset($this->modules) && is_array($this->modules))
foreach ($this->modules as $key=>$module) {
if (($module->enabled) and (method_exists($module, 'display_view' ))) {
$this->modules[$key]->load_db_values($pID);
- $c .=$this->modules[$key]->display_view($pID);
+ $result = $this->modules[$key]->display_view($pID);
+ $o[] = $result;
}
}
- return $c;
+ return $o;
}
}
Modified: trunk/catalog/includes/classes/drivers/data/categorie.php
===================================================================
--- trunk/catalog/includes/classes/drivers/data/categorie.php 2011-12-30 15:06:00 UTC (rev 4002)
+++ trunk/catalog/includes/classes/drivers/data/categorie.php 2012-01-01 16:42:59 UTC (rev 4003)
@@ -1,13 +1,13 @@
<?php
/**
- \licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
- \portion code Copyright (c) 2002 osCommerce
- \package osCSS-2 <www http://www.oscss.org>
- \version 2.1.1
- \date 18/12/11, 11:33
- \author oscim <mail aur...@os...> <www http://www.oscim.fr>
- \encode UTF-8
-
+ @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 01/01/2012, 18:17
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+ @file driver.categorie.php
*/
@@ -15,24 +15,24 @@
\class categorie
\brief Control init et gestion des data product
*/
-class categorie {
+class categorie
+ Extends DataTypeFactory
+ {
//! @p object
protected static $_instance;
public static $modules;
- /**
- */
- protected function __construct($full) {
- global $languages_id;
-// productData::start();
- if($full) self::start_module();
+
+ protected function start_module(){
+ $pdm=self::Getmodule();
+ self::$modules=$pdm->ret_modules();
+ return $pdm;
}
- protected static function start_module(){
+ protected static function Getmodule(){
$pdm=categorieModule::getInstance();
- self::$modules=$pdm->ret_modules();
return $pdm;
}
@@ -46,12 +46,7 @@
return self::getInstance();
}
- /**
- Module configuration
- */
-// public function ret_modules(){ self::start_module(); return self::$modules;}
-
/**
Data function
*/
@@ -75,17 +70,11 @@
public static function resetCacheId($id){ return categorieData::resetCacheId($id); }
/**
- * \fn ret_modules()
- * \brief Retour tableau des modules type products actif
- * @return plusieurs modules via array(object)
- */
- public function ret_modules(){ self::start_module(); return self::$modules;}
- /**
* \fn get_option_data($product_array)
* \brief adjust products, depend class price, execute by productData
* @param $product_array array
*/
- public static function get_option_data($_array){ $pdm=self::start_module();return $pdm->get_option_data($_array);}
+ public static function get_option_data($_array){ $pdm=self::Getmodule();return $pdm->get_option_data($_array);}
}
@@ -97,12 +86,9 @@
class categorieData
extends DataStatmentFO
implements Interfacedata{
-
- //! @p int
- public static $lg_id;
- //! @p obj res db
- public static $obj_language;
- //! @p array
+ /**
+ @var $cache array cache result
+ */
public static $cache=array();
//! @p object cache
@@ -114,42 +100,9 @@
private static $where_query='';
- /**
- */
- public static function start(){
- global $languages_id;
- self::$lg_id=(int)$languages_id;
- $DB=Database::getInstance();
- self::$obj_language = $DB->query("select code from " . TABLE_LANGUAGES . " where languages_id='" .self::$lg_id . "'");
- }
- /**
- \brief delet item in cache
- \param $id integer id cat
- */
- public static function resetCacheId($id){
- foreach(self::$cache as $k=>$v)
- if($v==$id) {
- unset(self::$cache[$k]);
- }
- }
/**
- * \brief Mise en pile de toutes les element des page de cms
- * @param $id int
- */
- private static function add_cache($id){
- self::$cache[]=$id;
- }
-
- /**
- * \brief Appel et recup des element du cache
- */
- private static function in_cache(){
- return implode("," ,self::$cache);
- }
-
- /**
* \brief Prepa donnée sortie
* @param $content_query
* @param $exclude array
Modified: trunk/catalog/includes/classes/drivers/data/content.php
===================================================================
--- trunk/catalog/includes/classes/drivers/data/content.php 2011-12-30 15:06:00 UTC (rev 4002)
+++ trunk/catalog/includes/classes/drivers/data/content.php 2012-01-01 16:42:59 UTC (rev 4003)
@@ -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, 23:26
+ @date 01/01/2012, 18:17
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@file driver.content.php
@@ -22,15 +22,8 @@
public static $modules;
- /**
- */
- protected function __construct($full) {
- global $languages_id;
- contentData::start();
- if($full) self::start_module();
- }
- protected static function start_module(){
+ protected function start_module(){
$pdm=contentModule::getInstance();
self::$modules=$pdm->ret_modules();
return $pdm;
@@ -47,45 +40,6 @@
}
- /**
- Data function
- */
- /**
- * \fn ret_modules()
- * \brief Retour tableau des modules type products actif
- * @return plusieurs modules via array(object)
- */
- public function ret_modules(){ self::start_module(); return self::$modules;}
- /**
- * \fn check_action($class='',$actions='')
- * \brief execute la capture des actions par les modlues
- * @param $class string
- * @param $actions array
- */
- public function check_action($class='',$actions=''){ $pdm=self::start_module(); return $pdm->check_action($class,$actions);}
- /**
- * \fn get_header($class='',$actions='')
- * \brief traitement block header des module
- * Display block header modules
- * @param $class string
- * @param $actions array
- */
-// public function get_header($class='',$actions=''){ $pdm=self::start_module(); return $pdm->get_header($class,$actions);}
- /**
- * \fn after_check_action($class='',$actions='')
- * \brief after_check_action
- * @param $class string
- * @param $actions array
- */
- public function after_check_action($class='',$actions=''){ $pdm=self::start_module(); return $pdm->after_check_action($class,$actions);}
- /**
- * \fn display_view($pID,$class='',$exclude=array())
- * \brief after_check_action
- * @param $pID int
- * @param $class string
- * @param $exclude array
- */
- public function display_view($ID,$class='',$exclude=array()){$pdm=self::start_module(); return $pdm->display_view($ID,$class,$exclude);}
/**
@@ -111,13 +65,10 @@
extends DataStatmentFO
implements Interfacedata{
- //! @p int
- public static $lg_id;
- //! @p obj res db
- public static $obj_language;
- //! @p array
+ /**
+ @var $cache array cache result
+ */
public static $cache=array();
-
//! @p array
public static $opt=array();
@@ -136,37 +87,8 @@
self::start();
}
- /**
- */
- public static function start($option=''){
- global $languages_id;
- self::$lg_id=(int)$languages_id;
- $DB=Database::getInstance();
- self::$obj_language = $DB->query("select code from " . TABLE_LANGUAGES . " where languages_id='" .self::$lg_id . "'");
- if(!empty($option) && is_array($option)) {
- self::$opt=$option;
- self::$cache=array();
- }
-
- }
-
-
/**
- Mise en pile de toutes les element des page de cms
- */
- private static function add_cache($id){
- self::$cache[]=$id;
- }
-
- /**
- Appel et recup des element du cache
- */
- private static function in_cache(){
- return implode("," ,self::$cache);
- }
-
- /**
Prepa donnée sortie
*/
protected static function statment_query($content_query,$exclude='',$search=''){
Modified: trunk/catalog/includes/classes/drivers/data/product.php
===================================================================
--- trunk/catalog/includes/classes/drivers/data/product.php 2011-12-30 15:06:00 UTC (rev 4002)
+++ trunk/catalog/includes/classes/drivers/data/product.php 2012-01-01 16:42:59 UTC (rev 4003)
@@ -1,13 +1,16 @@
<?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 12/10/11, 13:40
+ @date 01/01/2012, 18:17
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
+ @dir DataDriver
+ @file driver.product.php
+
Prise en charge des product
\note
@@ -30,7 +33,9 @@
* \li Tous les appels vers les methodes de la class productData sont static
*
*/
-class product {
+class product
+ Extends DataTypeFactory
+ {
//! @p object
protected static $_instance;
@@ -41,18 +46,23 @@
Pile des images du porduit
@param array
*/
- var $pile_img;
+ public $pile_img;
/**
*/
protected function __construct($full) {
global $languages_id;
- productData::start();
+// productData::start();
if($full) self::start_module();
}
- protected static function start_module(){
+ protected static function Getmodule(){
$pdm=productModule::getInstance();
+ return $pdm;
+ }
+
+ protected function start_module(){
+ $pdm=self::Getmodule();
self::$modules=$pdm->ret_modules();
return $pdm;
}
@@ -67,59 +77,24 @@
return self::getInstance();
}
+
+
/**
Module ACA
*/
/**
- * \fn ret_modules()
- * \brief Retour tableau des modules type products actif
- * @return plusieurs modules via array(object)
- */
- public function ret_modules(){ self::start_module(); return self::$modules;}
- /**
- * \fn check_action($class='',$actions='')
- * \brief execute la capture des actions par les modlues
- * @param $class string
- * @param $actions array
- */
- public function check_action($class='',$actions=''){ $pdm=self::start_module(); return $pdm->check_action($class,$actions);}
- /**
- * \fn get_header($class='',$actions='')
- * \brief traitement block header des module
- * Display block header modules
- * @param $class string
- * @param $actions array
- */
- public function get_header($class='',$actions=''){ $pdm=self::start_module(); return $pdm->get_header($class,$actions);}
- /**
- * \fn after_check_action($class='',$actions='')
- * \brief after_check_action
- * @param $class string
- * @param $actions array
- */
- public function after_check_action($class='',$actions=''){ $pdm=self::start_module(); return $pdm->after_check_action($class,$actions);}
- /**
- * \fn display_view($pID,$class='',$exclude=array())
- * \brief after_check_action
- * @param $pID int
- * @param $class string
- * @param $exclude array
- */
- public function display_view($pID,$class='',$exclude=array()){ $pdm=self::start_module(); return $pdm->display_view($pID,$class,$exclude);}
-
- /**
* \fn get_adjust_price($product_array)
* \brief adjust price products , depend class price, execute by productData
* @param $product_array array
*/
- public static function get_adjust_price($product_array){ $pdm=self::start_module(); return $pdm->adjust_price($product_array);}
+ public static function get_adjust_price($product_array){ $pdm=self::Getmodule(); return $pdm->adjust_price($product_array);}
/**
* \fn get_option_data($product_array)
* \brief adjust products, depend class price, execute by productData
* @param $product_array array
*/
- public static function get_option_data($product_array){ $pdm=self::start_module(); return $pdm->get_option_data($product_array);}
+ public static function get_option_data($product_array){ $pdm=self::Getmodule(); return $pdm->get_option_data($product_array);}
/**
Data function
@@ -201,47 +176,21 @@
extends DataStatmentFO
implements Interfacedata{
- //! @p int
- public static $lg_id;
- //! @p obj res db
- public static $obj_language;
- //! @p array
- public static $cache=array();
+ /**
+ @var $cache array cache result
+ */
+ public static $cache=array();
- //! @p object cache
- public static $object_data;
- //! @p array cache
- public static $array_data=array();
+ //! @p object cache
+ public static $object_data;
+ //! @p array cache
+ public static $array_data=array();
- //! @p string
- private static $where_query='';
+ //! @p string
+ private static $where_query='';
/**
- */
- public static function start(){
- global $languages_id;
- self::$lg_id=(int)$languages_id;
- $DB=Database::getInstance();
- self::$obj_language = $DB->query("select code from " . TABLE_LANGUAGES . " where languages_id='" .self::$lg_id . "'");
- }
-
-
- /**
- Mise en pile de toutes les element des page de cms
- */
- private static function add_cache($id){
- self::$cache[]=$id;
- }
-
- /**
- Appel et recup des element du cache
- */
- private static function in_cache(){
- return implode("," ,self::$cache);
- }
-
- /**
Prepa donnée sortie
*/
protected static function statment_query($content_query,$exclude='',$search=''){
Modified: trunk/catalog/includes/classes/drivers/page/GabaritTemplate.php
===================================================================
--- trunk/catalog/includes/classes/drivers/page/GabaritTemplate.php 2011-12-30 15:06:00 UTC (rev 4002)
+++ trunk/catalog/includes/classes/drivers/page/GabaritTemplate.php 2012-01-01 16:42:59 UTC (rev 4003)
@@ -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.1
- @date 10/12/11, 10:44
+ @date 01/01/12, 00:44
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class GabaritTemplate
@@ -116,7 +116,7 @@
$page->page['type']='popup';
}elseif ($page->page['content']=='index.php' ||$page->page['content']=='home.php' && (empty($_SERVER['QUERY_STRING']) || (isset($_GET['osCsid']) || isset($_GET['divers']) ) )) {
$page->page['type']='home';
- }elseif ($page->page['content']=='index.php' && (!empty($_SERVER['QUERY_STRING']) && isset($_GET['customers_id']) )) {
+ }elseif ( (!empty($_SERVER['QUERY_STRING']) && isset($_GET['customers_id']) )) {
$page->page['type']='member';
$page->page['class']='single';
}elseif (in_array(substr($page->page['content'],0,7), array('account','address')) || in_array(substr(basename($_SERVER['SCRIPT_NAME']),0,-4), array('account','address')) ) {
Modified: trunk/catalog/includes/classes/page.php
===================================================================
--- trunk/catalog/includes/classes/page.php 2011-12-30 15:06:00 UTC (rev 4002)
+++ trunk/catalog/includes/classes/page.php 2012-01-01 16:42:59 UTC (rev 4003)
@@ -519,17 +519,16 @@
$this->new_class('categorie');
//! Class specifique type de page
- if (in_array($this->the_type(),explode(',',PUBLIC_PAGE_TYPE))){
+ if (in_array($this->the_type(),explode(',',str_replace(' ','',PUBLIC_PAGE_TYPE)))){
global $ACA;
if($this->new_class($this->the_type(),true) !=false) {
- $this->new_class($this->the_type(),true);
- $ACA = $this->return_object($this->the_type());
+ $this->new_class($this->the_type(),true);
+ $ACA = $this->return_object($this->the_type());
}
else{
- new AcaFactory($this->the_type());
- $ACA =$this->add_object($this->the_type(), new AcaFactory($this->the_type()) );
- // $this->new_class($this->the_type(),true);
- $ACA = $this->return_object($this->the_type());
+ $A=AcaFactory::getInstance($this->the_type(),true);
+ $this->add_object($this->the_type(), $A );
+ $ACA = $A->return_object($this->the_type());
}
if (isset($_REQUEST['action']))
Modified: trunk/catalog/includes/inc_base_lib.php
===================================================================
--- trunk/catalog/includes/inc_base_lib.php 2011-12-30 15:06:00 UTC (rev 4002)
+++ trunk/catalog/includes/inc_base_lib.php 2012-01-01 16:42:59 UTC (rev 4003)
@@ -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 18/04/11, 09:22
+ @version 2.1.1
+ @date 01/01/2012, 18:17
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@brief load base Gestion du cache des librairie et et class du core chargée pour toutes les pages
@@ -30,6 +30,9 @@
if( ($path=autoload::getPath('AbstractAcaModule')) && $path != false) $file[]=$path;
if( ($path=autoload::getPath('split_page_results')) && $path != false) $file[]=$path;
+/**
+ TODO Adjust load driver based on PUBLIC_TYPE_PAGE
+*/
if( ($path=autoload::getPath('driver.categorie')) && $path != false) $file[]=$path;
if( ($path=autoload::getPath('driver.product')) && $path != false) $file[]=$path;
if( ($path=autoload::getPath('driver.content')) && $path != false) $file[]=$path;
Modified: trunk/catalog/index.php
===================================================================
--- trunk/catalog/index.php 2011-12-30 15:06:00 UTC (rev 4002)
+++ trunk/catalog/index.php 2012-01-01 16:42:59 UTC (rev 4003)
@@ -70,13 +70,18 @@
/**
* \section Page Customer public
+ \note For active public customer page , delete false
*/
- if (isset($_GET['customers_id']) ) {
+ if (false/* isset($_GET['customers_id']*/) ) {
$page->init('customers.php',$language);
$breadcrumb=$page->return_object('breadcrumb');
$aca_account=$account=$page->new_class('account',$customer_id);
$account=$page->_call('customer','the_customer');
+
+ $page->add_var_page('user_id',$aca_account);
+ $page->add_var_page('user',$aca_account);
+
$page_content = $page->force_content('customers.php');
}
Modified: trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Css/habillage.css
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Css/habillage.css 2011-12-30 15:06:00 UTC (rev 4002)
+++ trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Css/habillage.css 2012-01-01 16:42:59 UTC (rev 4003)
@@ -17,6 +17,8 @@
img { border: none; }
.center { text-align: center; }
+.notice,
+.required{color:red}
/* Hx tags */
Modified: trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/content/customers.php
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/content/customers.php 2011-12-30 15:06:00 UTC (rev 4002)
+++ trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/content/customers.php 2012-01-01 16:42:59 UTC (rev 4003)
@@ -3,14 +3,15 @@
@licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.1.0
- @date 16/09/10, 21:54
+ @version 2.1.1
+ @date 31/12/11, 21:54
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
+ @brief Public information members pages
*/
- $customer=$page->new_class('customer',(int)$_GET['customers_id']);
- $customer=$page->_call('customer','the_customer');
+ $obj = customer::resetInstance();
+ $customer=$obj->the_customer($_GET['customers_id']);
?>
<div id="accountPublicInfo">
<h2 class="content title <?php echo $language ;?>"><?php echo constant('HEADING_TITLE'); ?></h2>
Modified: trunk/catalog/install/includes/modele/htaccess.txt
===================================================================
--- trunk/catalog/install/includes/modele/htaccess.txt 2011-12-30 15:06:00 UTC (rev 4002)
+++ trunk/catalog/install/includes/modele/htaccess.txt 2012-01-01 16:42:59 UTC (rev 4003)
@@ -184,7 +184,7 @@
## Divers page
RewriteRule ^d/(.*)/(.*).html$ index.php?d=$1.php&%{QUERY_STRING} [L]
## Public members page
- RewriteRule ^u/(.*)/([0-9]*).html$ index.php?customers_id=$1&%{QUERY_STRING} [L]
+ RewriteRule ^u/([0-9]*)/(.*).html$ index.php?customers_id=$1&%{QUERY_STRING} [L]
# RewriteRule ^b/(.*)/(.*).html$ index.php?content=$1&%{QUERY_STRING} [L]
# RewriteRule ^pr/(.*)/(.*).html$ index.php?d=listing_reviews.php&products_id=$1&%{QUERY_STRING} [L]
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2011-12-30 15:06:08
|
Revision: 4002
http://oscss.svn.sourceforge.net/oscss/?rev=4002&view=rev
Author: oscim
Date: 2011-12-30 15:06:00 +0000 (Fri, 30 Dec 2011)
Log Message:
-----------
FS#948
FS#338
correction de coquille + mise a niveau
refonte partiel de la gestion du carnet d'adresse lors de l'edition d'un client dans le BO
Modified Paths:
--------------
trunk/catalog/admin/includes/classes/drivers/sqladminuser.php
trunk/catalog/admin/includes/javascript/modules/pages/customers.js.php
trunk/catalog/admin/includes/languages/fr_FR/modules/account/address_book.txt
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/customers.txt
trunk/catalog/admin/includes/modules/account/address_book.php
trunk/catalog/admin/includes/modules/pages/attributes.php
Added Paths:
-----------
trunk/catalog/admin/includes/gabarit/customers/address_book/
trunk/catalog/admin/includes/gabarit/customers/address_book/display_view.tabs.gab
trunk/catalog/admin/includes/gabarit/customers/address_book/inline.delete.gab
trunk/catalog/admin/includes/gabarit/customers/address_book/inline.edit.gab
Modified: trunk/catalog/admin/includes/classes/drivers/sqladminuser.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqladminuser.php 2011-12-30 10:37:57 UTC (rev 4001)
+++ trunk/catalog/admin/includes/classes/drivers/sqladminuser.php 2011-12-30 15:06:00 UTC (rev 4002)
@@ -4,7 +4,7 @@
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 22/09/11, 20:11
+ @date 30/12/11, 20:11
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class manage link table configuration
Added: trunk/catalog/admin/includes/gabarit/customers/address_book/display_view.tabs.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/customers/address_book/display_view.tabs.gab (rev 0)
+++ trunk/catalog/admin/includes/gabarit/customers/address_book/display_view.tabs.gab 2011-12-30 15:06:00 UTC (rev 4002)
@@ -0,0 +1,126 @@
+<?php
+/**
+ @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 30/12/11, 19:31
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+ @subpackage address_book
+*/
+global $processed;
+?>
+<div id="tabs">
+
+ <h4><?php echo __('address_book edit') ?></h4>
+
+ <div class="button_nav">
+ <a class="button fancy" href="<?php echo tep_href_link('aca.php','cID='.customers::$cID.'&addressbook='.customers::$cInfo->customers_default_address_id.'&action_type=account&action_class=address_book&action_method=display_edit&action=inline-new') ?>"><?php echo __('address_book add new address') ?></a>
+ </div>
+ <br class="clear"/>
+
+
+ <ul>
+ <?php foreach(address_book::$cInfo as $k=>$row): ?>
+ <li><a href="#tabs-<?php echo $k ?>"><?php echo $k ?></a> <?php if(customers::$cInfo->customers_default_address_id == $row['address_book_id']) echo "**" ?> </li>
+ <?php endforeach; ?>
+ </ul>
+
+
+ <?php foreach(address_book::$cInfo as $k=>$row): /*print_r($row); */?>
+
+ <div id="tabs-<?php echo $k ?>" class="tabPage">
+ <div class="button_nav fright">
+ <?php printf(CsrtAction::getLink('row_action_right', __('address_book edit address'), 'edit'), 'fancy', tep_href_link('aca.php','cID='.$row['customers_id'].'&addressbook='.$row['address_book_id'].'&action_type=account&action_class=address_book&action_method=display_edit&action=inline-edit' ),'' ) ?>
+
+ <?php if(customers::$cInfo->customers_default_address_id != $row['address_book_id']) : ?>
+
+ <?php printf(CsrtAction::getLink('row_action_right', __('address_book delete address'), 'delete'), 'fancy', tep_href_link('aca.php','cID='.$row['customers_id'].'&addressbook='.$row['address_book_id'].'&action_type=account&action_class=address_book&action_method=display_edit&action=inline-delete' ),'' ) ?>
+ <?php endif; ?>
+ </div>
+
+
+ <p class="block_input">
+ <?php echo tep_draw_radio_field('default_address_id_define', '', $row['address_book_id'], ((customers::$cInfo->customers_default_address_id == $row['address_book_id'])? true : false )) ?> <?php echo __('address_book define default address') ?>
+ </p>
+
+ <div class="ajax-replace">
+
+ <fieldset class="block_field">
+ <legend><?php echo __('category customers') ?></legend>
+ <p class="block_input">
+ <label for="entry_company"><?php echo __('entry first name') ?></label>
+ <?php echo $row['entry_firstname']; ?>
+ </p>
+ <p class="block_input">
+ <label for="entry_company"><?php echo __('entry last name') ?></label>
+ <?php echo $row['entry_lastname']; ?>
+ </p>
+ </fieldset>
+
+ <?php if (_cst_bool('ACCOUNT_COMPANY')): ?>
+ <fieldset class="block_field">
+ <legend><?php echo __('category company') ?></legend>
+ <p class="block_input">
+ <label for="entry_company"><?php echo __('entry compagny') ?></label>
+ <?php echo $row['entry_company']; ?>
+ </p>
+ <p class="block_input">
+ <label for="entry_company"><?php echo __('entry compagny tax id') ?></label>
+ <?php echo $row['entry_company_tax_id']; ?>
+ </p>
+ </fieldset>
+ <?php endif; ?>
+
+ <fieldset class="block_field">
+ <legend><?php echo __('category address') ?></legend>
+
+ <p class="block_input">
+ <label for="entry_street_address"><?php echo __('Adresse :') ?></label>
+ <?php echo $row['entry_street_address']; ?>
+ </p>
+
+ <p class="block_input">
+ <?php if (_cst_bool('ACCOUNT_SUBURB')): ?>
+ <label for="entry_suburb"><?php echo __('entry suburb') ?></label>
+ <?php echo $row['entry_suburb']; ?>
+ <?php endif; ?>
+ </p>
+
+ <p class="block_input">
+ <label for="entry_postcode"><?php echo __('entry post code') ?></label>
+ <?php echo $row['entry_postcode']; ?>
+ </p>
+
+ <p class="block_input">
+ <label for="entry_city"><?php echo __('entry city') ?></label>
+ <?php echo $row['entry_city']; ?>
+ </p>
+
+ <?php if (_cst_bool('ACCOUNT_STATE')): ?>
+ <p class="block_input">
+ <label for="entry_state"><?php echo __('entry state') ?></label>
+ <?php echo worldUtility::get_zone_name($row['entry_country_id'], $row['entry_zone_id'], $row['entry_state']) ; ?>
+ </p>
+ <?php endif; ?>
+
+ <p class="block_input">
+ <label for="entry_country_id"><?php echo __('entry country') ?></label>
+ <?php echo worldUtility::get_country_name($row['entry_country_id']) ; ?>
+ </p>
+
+ </fieldset>
+ </div>
+
+
+
+ </div>
+ <?php endforeach; ?>
+
+ <br class="clear"/>
+</div>
+
+
+
+
Added: trunk/catalog/admin/includes/gabarit/customers/address_book/inline.delete.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/customers/address_book/inline.delete.gab (rev 0)
+++ trunk/catalog/admin/includes/gabarit/customers/address_book/inline.delete.gab 2011-12-30 15:06:00 UTC (rev 4002)
@@ -0,0 +1,35 @@
+<?php
+/**
+ @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 30/12/11, 19:31
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+ @subpackage address_book
+*/
+
+?>
+
+<h3><?php echo __('address_book heading delete') ?></h3>
+
+<?php echo tep_draw_form('customers', customers::FILENAME, 'forceajax=true&action=inline-delete-confirm', 'post', ''); ?>
+
+<fieldset class="block_field">
+
+
+ <p><?php echo __('category address') ?></p>
+
+ <?php echo tep_draw_hidden_field('address_book_id','address_book_id', address_book::$cInfo->address_book_id); ?>
+ <?php echo tep_draw_hidden_field('cID','cID', address_book::$cInfo->customers_id); ?>
+
+
+
+ <fieldset class="block_input button_nav">
+ <?php echo tep_image_submit('button_delete.gif', IMAGE_DELETE) .tep_js_back(tep_href_link(customers::FILENAME, 'cID=' .customers::$cInfo->customers_id.'&action=edit'), IMAGE_CANCEL) ?>
+ </fieldset>
+
+
+</fieldset>
+</form>
\ No newline at end of file
Added: trunk/catalog/admin/includes/gabarit/customers/address_book/inline.edit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/customers/address_book/inline.edit.gab (rev 0)
+++ trunk/catalog/admin/includes/gabarit/customers/address_book/inline.edit.gab 2011-12-30 15:06:00 UTC (rev 4002)
@@ -0,0 +1,123 @@
+<?php
+/**
+ @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 30/12/11, 19:31
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+ @subpackage address_book
+*/
+global $processed;
+$processed = true;
+?>
+
+<?php echo tep_draw_form('customers', customers::FILENAME, 'forceajax=true&action='.((address_book::$action=='inline-edit')?'inline-update':'inline-insert'), 'post', ''); ?>
+ <fieldset class="block_field">
+ <?php if (_cst_bool('ACCOUNT_GENDER')) { ?>
+ <div class="block_input input-mutli">
+ <label><?php echo __('entry gender'); ?></label>
+ <?php if(!$processed) echo tep_result_up_field(address_book::$cInfo,'customers_gender','tep_view_gender_human','', true, true);
+ else {
+ echo '<ul class="inline">' . "\n" .
+ '<li class="inline">' . tep_draw_radio_field('customers_gender', 'm', 'm', true, address_book::$cInfo->customers_gender) . ' ' . MALE . '' . '</li>' . "\n ".
+ '<li class="inline">' . tep_draw_radio_field('customers_gender', 'f', 'f', false, address_book::$cInfo->customers_gender) . ' ' . FEMALE . '' . '</li>' . "\n" .
+ '<li class="inline">' . tep_draw_radio_field('customers_gender', 'l', 'l', false, address_book::$cInfo->customers_gender) . ' ' . MLLE . '' . '</li>' . "\n" .
+ '</ul>' . "\n";
+ } ?>
+ </div>
+ <?php } ?>
+
+ <p class="block_input input-one">
+ <label for="customers_firstname"><?php echo __('entry first name'); ?></label>
+ <?php echo tep_result_up_field(address_book::$cInfo,'entry_firstname','','', true); ?>
+ </p>
+
+ <p class="block_input input-one">
+ <label for="customers_lastname"><?php echo __('entry last name'); ?></label>
+ <?php echo tep_result_up_field(address_book::$cInfo,'entry_lastname','','', true); ?>
+ </p>
+
+ </fieldset>
+
+<?php if (_cst_bool('ACCOUNT_COMPANY')): ?>
+ <fieldset class="block_field">
+ <legend><?php echo __('category company') ?></legend>
+ <p class="block_input">
+ <label for="entry_company"><?php echo __('entry compagny') ?></label>
+ <?php echo tep_result_up_field(address_book::$cInfo,'entry_company','',''); ?>
+ </p>
+ <p class="block_input">
+ <label for="entry_company"><?php echo __('entry compagny tax id') ?></label>
+ <?php echo tep_result_up_field(address_book::$cInfo,'entry_company_tax_id','',''); ?>
+ </p>
+ </fieldset>
+<?php endif; ?>
+
+<fieldset class="block_field">
+ <legend><?php echo __('category address') ?></legend>
+
+ <?php echo tep_draw_hidden_field('address_book_id','address_book_id', address_book::$cInfo->address_book_id); ?>
+ <?php echo tep_draw_hidden_field('cID','cID', address_book::$cInfo->customers_id); ?>
+
+ <p class="block_input">
+ <label for="entry_street_address"><?php echo __('Adresse :') ?></label>
+ <?php echo tep_result_up_field(address_book::$cInfo,'entry_street_address','','64'); ?>
+ </p>
+
+ <p class="block_input">
+ <?php if (_cst_bool('ACCOUNT_SUBURB')): ?>
+ <label for="entry_suburb"><?php echo __('entry suburb') ?></label>
+ <?php echo tep_result_up_field(address_book::$cInfo,'entry_suburb'); ?>
+ <?php endif; ?>
+ </p>
+
+ <p class="block_input">
+ <label for="entry_postcode"><?php echo __('entry post code') ?></label>
+ <?php echo tep_result_up_field(address_book::$cInfo,'entry_postcode','','8'); ?>
+ </p>
+
+ <p class="block_input">
+ <label for="entry_city"><?php echo __('entry city') ?></label>
+ <?php echo tep_result_up_field(address_book::$cInfo,'entry_city'); ?>
+ </p>
+
+ <?php if (_cst_bool('ACCOUNT_STATE')): ?>
+ <?php //$entry_state = tep_get_zone_name(address_book::$cInfo->entry_country_id, address_book::$cInfo->entry_zone_id, address_book::$cInfo->entry_state); ?>
+
+ <p class="block_input">
+ <label for="entry_state"><?php echo __('entry state') ?></label>
+ <?php
+ if ($processed) echo worldUtility::get_zone_name(address_book::$cInfo->entry_country_id, address_book::$cInfo->entry_zone_id, address_book::$cInfo->entry_state) . tep_draw_hidden_field('entry_zone_id') . tep_draw_hidden_field('entry_state') ;
+ else{
+ $zones_array = array();
+ $zones_query = tep_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . tep_db_input(address_book::$cInfo->entry_country_id) . "' order by zone_name");
+ while ($zones_values = tep_db_fetch_array($zones_query)) {
+ $zones_array[] = array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']);
+ }
+ echo tep_draw_pull_down_menu('entry_state', $zones_array,address_book::$cInfo->entry_state);
+ }
+ ?>
+ </p>
+ <?php endif; ?>
+
+ <p class="block_input">
+ <label for="entry_country_id"><?php echo __('entry country') ?></label>
+ <?php
+ if (!$processed) echo worldUtility::get_country_name(address_book::$cInfo->entry_country_id) . tep_draw_hidden_field('entry_country_id') ;
+ else echo tep_draw_pull_down_menu('entry_country_id', worldUtility::get_countries(),address_book::$cInfo->entry_country_id);
+ ?>
+ </p>
+
+
+ <div class="button_nav">
+ <?php /*if ($processed != true)*/ echo tep_image_submit('button_update.gif', IMAGE_UPDATE)/*. tep_image_submit('', IMAGE_UPDATE_AND_CLOSE,' name="up_and_close"' ); */;
+
+ echo tep_js_back(tep_href_link(customers::FILENAME, tep_get_all_get_params(array('action'))), IMAGE_CANCEL);
+ ?>
+
+ </div>
+
+</fieldset>
+</form>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/javascript/modules/pages/customers.js.php
===================================================================
--- trunk/catalog/admin/includes/javascript/modules/pages/customers.js.php 2011-12-30 10:37:57 UTC (rev 4001)
+++ trunk/catalog/admin/includes/javascript/modules/pages/customers.js.php 2011-12-30 15:06:00 UTC (rev 4002)
@@ -67,5 +67,6 @@
}
}
- </script>
- <?php } ?>
\ No newline at end of file
+
+ <?php } ?>
+ </script>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/account/address_book.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/account/address_book.txt 2011-12-30 10:37:57 UTC (rev 4001)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/account/address_book.txt 2011-12-30 15:06:00 UTC (rev 4002)
@@ -1,30 +1,49 @@
<?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.0.9
- @date 06/06/10, 17:51
+ @version 2.1.1
+ @date 30/12/11, 19:31
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
+ @subpackage address_book
*/
$lang['address book text title']="Gestion des adresses" ;
$lang['address book text description']="Gèrer la liaison entre carnet d'adresse et client/membre" ;
$lang['Adresse']="Adresse" ;
-$lang['entry compagny']="Nom de la société :" ;
-$lang['entry compagny tax id']="société :" ;
-$lang['ENTRY_COMPANY_TAX_ID']="Société Numéro(tva-intra)" ;
-$lang['ENTRY_COMPANY_ERROR']="" ;
-$lang['Adresse :']="Adresse :" ;
+
+/* Edit / view */
+ $lang['address_book edit']="Carnet d'adresse" ;
+ $lang['category customers']="Destinataire" ;
+ $lang['entry gender']="Genre :" ;
+ $lang['entry first name']="Nom :" ;
+ $lang['entry last name']="Prenom :" ;
+ $lang['category company']="Société" ;
+ $lang['entry compagny']="Nom de la société :" ;
+ $lang['entry compagny tax id']="Société Numéro(tva-intra)" ;
+ $lang['category address']="Adresse" ;
+ $lang['entry address']="Adresse :" ;
+ $lang['entry state']="Etat :" ;
+ $lang['entry suburb']="Complément d'adresse : " ;
+ $lang['entry country']="Pays :" ;
+ $lang['entry city']="Ville :" ;
+ $lang['entry post code']="Code postal :" ;
+
+ $lang['address_book add new address']="Ajouter une adresse" ;
+ $lang['address_book edit address']="Editer cette adresse" ;
+ $lang['address_book delete address']="Supprimer cette adresse" ;
+
+ /* Specific display normal */
+ $lang['address_book define default address']="Adresse par defaut" ;
+ /* Specific inline */
+
+
+
$lang['ENTRY_STREET_ADDRESS_ERROR']="<span class=\"errorText\">min. " . ENTRY_STREET_ADDRESS_MIN_LENGTH . " caractères.</span>" ;
-$lang['entry suburb']="Complément d'adresse : " ;
$lang['ENTRY_SUBURB_ERROR']="" ;
-$lang['entry post code']="Code postal :" ;
$lang['ENTRY_POST_CODE_ERROR']="<span class=\"errorText\">min. " . ENTRY_POSTCODE_MIN_LENGTH . " caractères.</span>" ;
-$lang['entry city']="Ville :" ;
$lang['ENTRY_CITY_ERROR']="<span class=\"errorText\">min. " . ENTRY_CITY_MIN_LENGTH . " caractères.</span>" ;
-$lang['ENTRY_STATE']="Etat :" ;
$lang['ENTRY_STATE_ERROR']="<span class=\"errorText\">requis</span>" ;
-$lang['entry country']="Pays :" ;
$lang['ENTRY_COUNTRY_ERROR']="" ;
-$lang['category address']="Adresse :" ;
?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/pages/customers.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/pages/customers.txt 2011-12-30 10:37:57 UTC (rev 4001)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/customers.txt 2011-12-30 15:06:00 UTC (rev 4002)
@@ -4,7 +4,7 @@
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 16/11/11, 22:00
+ @date 30/12/11, 22:00
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
Modified: trunk/catalog/admin/includes/modules/account/address_book.php
===================================================================
--- trunk/catalog/admin/includes/modules/account/address_book.php 2011-12-30 10:37:57 UTC (rev 4001)
+++ trunk/catalog/admin/includes/modules/account/address_book.php 2011-12-30 15:06:00 UTC (rev 4002)
@@ -1,15 +1,15 @@
<?php
/**
- @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @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 28/03/11, 18:54
+ @version 2.1.1
+ @date 30/12/11, 19:31
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
-
+ @subpackage address_book
@class address_book
- Gestion Des adresses d'un clients
+ @brief Gestion Des adresses d'un clients
*/
@@ -32,172 +32,349 @@
$this->sql_data_array=array();
self::$cInfo = new objectInfo(array());
+
}
+ /**
+ @brief methode for event action
+ @return array $actions
+ */
public function check_action($actions){
- global $oscss;
+
self::$action=$actions['action'];
$languages = tep_get_languages();
$messageStack=messageStack::getInstance();
switch(self::$action){
- case 'insert':
- //$default_address_id = tep_db_prepare_input($_POST['default_address_id']);
- $entry_street_address = tep_db_prepare_input($_POST['entry_street_address']);
- if (_cst_bool('ACCOUNT_SUBURB')) $entry_suburb = tep_db_prepare_input($_POST['entry_suburb']);
- $entry_postcode = tep_db_prepare_input($_POST['entry_postcode']);
- $entry_city = tep_db_prepare_input($_POST['entry_city']);
- $entry_country_id = tep_db_prepare_input($_POST['entry_country_id']);
- if (_cst_bool('ACCOUNT_COMPANY')){
- $entry_company = tep_db_prepare_input($_POST['entry_company']);
- $entry_company_tax_id = tep_db_prepare_input($_POST['entry_company_tax_id']);
- }
- if (_cst_bool('ACCOUNT_STATE')) {
- $entry_state = tep_db_prepare_input($_POST['entry_state']);
- if (isset($_POST['entry_zone_id'])) $entry_zone_id = tep_db_prepare_input($_POST['entry_zone_id']);
- }
+ /**
+ @remarks Ajax process
+ */
+ case 'inline-new':
+ include_once(DIR_WS_MODULES.'pages/customers.php');
+ include_once(DIR_WS_FUNCTIONS.'lib.customers.php');
+ $cid =tep_db_prepare_input($_GET['cID']);
- try{
- if (strlen($entry_street_address) < ENTRY_STREET_ADDRESS_MIN_LENGTH)throw new Exception(__("L'adresse est trop courte "));
- if (strlen($entry_postcode) < ENTRY_POSTCODE_MIN_LENGTH)throw new Exception(__("Le code postal de la ville est trop court "));
- if (strlen($entry_city) < ENTRY_CITY_MIN_LENGTH)throw new Exception(__("Le nom de la ville est trop court"));
- if ($entry_country_id == false)throw new Exception(__("Le code pays n'est pas correct"));
+ $customers = new customers();
+ $customers->load_db_values($cid);
+ $this->load_db_values(0);
- if (_cst_bool('ACCOUNT_STATE')) {
- $zone_id = 0;
- $entry_state_error = false;
- $check_query = tep_db_query("select count(*) as total from " . TABLE_ZONES . " where zone_country_id = '" . (int)$entry_country_id . "'");
- $check_value = tep_db_fetch_array($check_query);
+ $r = self::$cInfo;
+ foreach($r as $row)
+ self::$cInfo = new objectInfo( $row );
+ break;
- if (($check_value['total'] > 0) == false) throw new Exception(__("erreur aucun pays ne correpsond "));
- $zone_query = tep_db_query("select zone_id from " . TABLE_ZONES . " where zone_country_id = '" . (int)$entry_country_id . "' and zone_name = '" . tep_db_input($entry_state) . "'");
- if (tep_db_num_rows($zone_query) != 1)throw new Exception(__("erreur lors de l'enregistrement du pays "));
- $zone_values = tep_db_fetch_array($zone_query);
- $entry_zone_id = $zone_values['zone_id'];
- }
+ case 'inline-delete':
+ case 'inline-edit':
+ include_once(DIR_WS_MODULES.'pages/customers.php');
+ include_once(DIR_WS_FUNCTIONS.'lib.customers.php');
+ $cid = (int)tep_db_prepare_input($_GET['cID']);
+ $id = (int)tep_db_prepare_input($_GET['addressbook']);
+ $customers = new customers();
+ $customers->load_db_values($cid);
- }catch(Exception $e){
- $messageStack->add($e->getMessage(), 'error');
- customers::$error=true;
- }
+ $this->load_db_values($cid);
+ $r = self::$cInfo;
+ foreach($r as $row)
+ if($row['address_book_id'] ==$id) self::$cInfo = new objectInfo( $row );
+ break;
+
+ case 'inline-delete-confirm':
+
+ $cid = (int)tep_db_prepare_input($_POST['cID']);
+ $id = (int)tep_db_prepare_input($_POST['address_book_id']);
+
+ self::$cInfo->customers_id=$cid ;
+ self::$cInfo->address_book_id =$id;
+
+ self::SQLDelete();
+
+ /**
+ @remarks Adjust process if ajax exec
+ */
+ if(isset($_GET['forceajax'])){
+
+ tep_redirect(tep_href_link(customers::FILENAME, 'cID=' .$cid.'&action=edit'));
+
+ }
+
+
+ break;
+
+
+ case 'inline-insert':
+ //$default_address_id = tep_db_prepare_input($_POST['default_address_id']);
+ $entry_street_address = tep_db_prepare_input($_POST['entry_street_address']);
+ if (_cst_bool('ACCOUNT_SUBURB')) $entry_suburb = tep_db_prepare_input($_POST['entry_suburb']);
+ $entry_postcode = tep_db_prepare_input($_POST['entry_postcode']);
+ $entry_city = tep_db_prepare_input($_POST['entry_city']);
+
+
+
+ if (_cst_bool('ACCOUNT_COMPANY')){
+ $entry_company = tep_db_prepare_input($_POST['entry_company']);
+ $entry_company_tax_id = tep_db_prepare_input($_POST['entry_company_tax_id']);
+ }
+
+ if (_cst_bool('ACCOUNT_STATE')) {
+ $entry_state = tep_db_prepare_input($_POST['entry_state']);
+ if (isset($_POST['entry_zone_id'])) $entry_zone_id = tep_db_prepare_input($_POST['entry_zone_id']);
+ }
+
+ if (_cst_bool('ACCOUNT_COUNTRY'))
+ $entry_country_id = tep_db_prepare_input($_POST['entry_country_id']);
+ else
+ $entry_country_id = STORE_COUNTRY;
+
+
+ try{
+ if (strlen($entry_street_address) < ENTRY_STREET_ADDRESS_MIN_LENGTH)throw new Exception(__("L'adresse est trop courte "));
+ if (strlen($entry_postcode) < ENTRY_POSTCODE_MIN_LENGTH)throw new Exception(__("Le code postal de la ville est trop court "));
+ if (strlen($entry_city) < ENTRY_CITY_MIN_LENGTH)throw new Exception(__("Le nom de la ville est trop court"));
+ if ($entry_country_id == false)throw new Exception(__("Le code pays n'est pas correct"));
+ if (_cst_bool('ACCOUNT_STATE')) {
+ $zone_id = 0;
+ $entry_state_error = false;
+ $check_query = tep_db_query("select count(*) as total from " . TABLE_ZONES . " where zone_country_id = '" . (int)$entry_country_id . "'");
+ $check_value = tep_db_fetch_array($check_query);
+
+ if (($check_value['total'] > 0) == false) throw new Exception(__("erreur aucun pays ne correpsond "));
+ $zone_query = tep_db_query("select zone_id from " . TABLE_ZONES . " where zone_country_id = '" . (int)$entry_country_id . "' and zone_name = '" . tep_db_input($entry_state) . "'");
+ if (tep_db_num_rows($zone_query) != 1)throw new Exception(__("erreur lors de l'enregistrement du pays "));
+ $zone_values = tep_db_fetch_array($zone_query);
+ $entry_zone_id = $zone_values['zone_id'];
+ }
+ }catch(Exception $e){
+ $messageStack->add($e->getMessage(), 'error');
+ customers::$error=true;
+ }
+
+
+ /**
+ @remarks Adjust process if ajax exec
+ */
+ if(isset($_GET['forceajax'])){
+
+ /// recup post value
+ self:: load_post_values ($_POST);
+ $cID = (int)self::$cInfo->customers_id;
+
+ /// update db data
+ self:: SQLCreate();
+
+ tep_redirect(tep_href_link(customers::FILENAME, 'cID=' .$cID.'&action=edit'));
+ }
+
break;
- case 'update':
+ case 'inline-update':
+ $default_address_id = tep_db_prepare_input($_POST['customers_default_address_id']);
+ $cID = tep_db_prepare_input($_POST['cID']);
+ $entry_street_address = tep_db_prepare_input($_POST['entry_street_address']);
- $default_address_id = tep_db_prepare_input($_POST['customers_default_address_id']);
- $entry_street_address = tep_db_prepare_input($_POST['entry_street_address']);
- if (_cst_bool('ACCOUNT_SUBURB')) $entry_suburb = tep_db_prepare_input($_POST['entry_suburb']);
- $entry_postcode = tep_db_prepare_input($_POST['entry_postcode']);
- $entry_city = tep_db_prepare_input($_POST['entry_city']);
- $entry_country_id = tep_db_prepare_input($_POST['entry_country_id']);
- if (_cst_bool('ACCOUNT_COMPANY')){
- $entry_company = tep_db_prepare_input($_POST['entry_company']);
- $entry_company_tax_id = tep_db_prepare_input($_POST['entry_company_tax_id']);
- }
- if (_cst_bool('ACCOUNT_STATE')) {
- $entry_state = tep_db_prepare_input($_POST['entry_state']);
- if (isset($_POST['entry_zone_id'])) $entry_zone_id = tep_db_prepare_input($_POST['entry_zone_id']);
- }
+ if (_cst_bool('ACCOUNT_SUBURB')) $entry_suburb = tep_db_prepare_input($_POST['entry_suburb']);
+ $entry_postcode = tep_db_prepare_input($_POST['entry_postcode']);
+ $entry_city = tep_db_prepare_input($_POST['entry_city']);
+ $entry_country_id = tep_db_prepare_input($_POST['entry_country_id']);
+ if (_cst_bool('ACCOUNT_COMPANY')){
+ $entry_company = tep_db_prepare_input($_POST['entry_company']);
+ $entry_company_tax_id = tep_db_prepare_input($_POST['entry_company_tax_id']);
+ }
+ if (_cst_bool('ACCOUNT_STATE')) {
+ $entry_state = tep_db_prepare_input($_POST['entry_state']);
+ if (isset($_POST['entry_zone_id'])) $entry_zone_id = tep_db_prepare_input($_POST['entry_zone_id']);
+ }
- try{
- if (strlen($entry_street_address) < ENTRY_STREET_ADDRESS_MIN_LENGTH)throw new Exception(__("L'adresse est trop courte "));
- if (strlen($entry_postcode) < ENTRY_POSTCODE_MIN_LENGTH)throw new Exception(__("Le code postal de la ville est trop court "));
- if (strlen($entry_city) < ENTRY_CITY_MIN_LENGTH)throw new Exception(__("Le nom de la ville est trop court"));
- if ($entry_country_id == false)throw new Exception(__("Le code pays n'est pas correct"));
+ try{
+ if (strlen($entry_street_address) < ENTRY_STREET_ADDRESS_MIN_LENGTH)throw new Exception(__("L'adresse est trop courte "));
+ if (strlen($entry_postcode) < ENTRY_POSTCODE_MIN_LENGTH)throw new Exception(__("Le code postal de la ville est trop court "));
+ if (strlen($entry_city) < ENTRY_CITY_MIN_LENGTH)throw new Exception(__("Le nom de la ville est trop court"));
+ if ($entry_country_id == false)throw new Exception(__("Le code pays n'est pas correct"));
- if (_cst_bool('ACCOUNT_STATE')) {
- $zone_id = 0;
- $entry_state_error = false;
- $check_query = tep_db_query("select count(*) as total from " . TABLE_ZONES . " where zone_country_id = '" . (int)$entry_country_id . "'");
- $check_value = tep_db_fetch_array($check_query);
+ if (_cst_bool('ACCOUNT_STATE')) {
+ $zone_id = 0;
+ $entry_state_error = false;
+ $check_query = tep_db_query("select count(*) as total from " . TABLE_ZONES . " where zone_country_id = '" . (int)$entry_country_id . "'");
+ $check_value = tep_db_fetch_array($check_query);
- if (($check_value['total'] > 0) == false) throw new Exception(__("erreur aucun pays ne correpsond "));
- $zone_query = tep_db_query("select zone_id from " . TABLE_ZONES . " where zone_country_id = '" . (int)$entry_country_id . "' and zone_name = '" . tep_db_input($entry_state) . "'");
- if (tep_db_num_rows($zone_query) != 1)throw new Exception(__("erreur lors de l'enregistrement du pays "));
- $zone_values = tep_db_fetch_array($zone_query);
- $entry_zone_id = $zone_values['zone_id'];
- }
+ if (($check_value['total'] > 0) == false) throw new Exception(__("erreur aucun pays ne correpsond "));
+ $zone_query = tep_db_query("select zone_id from " . TABLE_ZONES . " where zone_country_id = '" . (int)$entry_country_id . "' and zone_name = '" . tep_db_input($entry_state) . "'");
+ if (tep_db_num_rows($zone_query) != 1)throw new Exception(__("erreur lors de l'enregistrement du pays "));
+ $zone_values = tep_db_fetch_array($zone_query);
+ $entry_zone_id = $zone_values['zone_id'];
+ }
- }catch(Exception $e){
- $messageStack->add($e->getMessage(), 'error');
- //!Force erreur class customers $error=true;
- customers::$error=true;
- }
+ }catch(Exception $e){
+ $messageStack->add($e->getMessage(), 'error');
+ //!Force erreur class customers $error=true;
+ customers::$error=true;
+ }
+
+ /**
+ @remarks Adjust process if ajax exec
+ */
+ if(isset($_GET['forceajax'])){
+
+ /// recup post value
+ self:: load_post_values ($_POST);
+
+
+ /// update db data
+ self:: SQLUpdate();
+
+ tep_redirect(tep_href_link(customers::FILENAME, 'cID=' .$cID.'&action=edit'));
+ }
break;
+
+
+ /**
+ @remarks Normal process
+ */
+ case 'insert':
+ /**
+ TODO:
+ Adjust Default addresse
+ */
+ /// recup post value
+ self:: load_post_values ($_POST);
+
+ /// update db data
+ $id=self:: SQLCreate();
+
+ self::$cInfo->customers_default_address_id =(int)$id;
+
+ /// Adjust default address id customers
+ self:: SQLDefaultAddress();
+
+ break;
+ case 'update':
+ /// recup post value
+ $default_address_id = tep_db_prepare_input($_POST['default_address_id_define']);
+ $cid = tep_db_prepare_input($_POST['customers_id']);
+
+ self::$cInfo->customers_id=$cid ;
+ self::$cInfo->customers_default_address_id =(int)$default_address_id;
+
+ /// Adjust default address id customers
+ self:: SQLDefaultAddress();
+
+
+ break;
+ case 'delete':
+ /**
+ TODO:
+ Add alert for inform number and detail adress book delete
+ */
+ break;
}
return $actions;
}
- public function get_header(){
+
+/** DEB METHODE LINK SQLCUSTOMER CLASS */
+
+ /**
+ @fn SQLCreate()
+ @brief update reference address book for one user
+ @return empty array()
+ */
+ protected static function SQLCreate() {
+
+ self::$cInfo->sql_data_array['customers_id'] = (int)self::$cInfo->customers_id;
+
+ return tep_db_perform(TABLE_ADDRESS_BOOK, self::$cInfo->sql_data_array);
}
- /**
- Insert TABLE_ADDRESS_BOOK
- */
- public function insert_table_second () {
- // add adress book
- $res=tep_db_perform(TABLE_ADDRESS_BOOK, self::$cInfo->sql_data_array);
+ /**
+ @fn SQLUpdate()
+ @brief update reference address book for one user
+ @return empty array()
+ */
+ protected static function SQLUpdate () {
- $sql_data_array=array('customers_default_address_id'=>tep_db_insert_id($res) ) ;
- $r=tep_db_perform(TABLE_CUSTOMERS, $sql_data_array, 'update', " customers_id = '" . (int)self::$cInfo->sql_data_array['customers_id'] . "' ");
+ tep_db_perform(TABLE_ADDRESS_BOOK, self::$cInfo->sql_data_array, 'update', "customers_id = '" . (int)self::$cInfo->customers_id . "' and address_book_id = '" . (int)self::$cInfo->address_book_id . "'");
return array();
}
- /**
- Update TABLE_ADDRESS_BOOK
- */
- public function update_table_second () {
+ /**
+ @fn SQLDelete()
+ @brief update reference address book for one user
+ @return empty array()
+ */
+ protected static function SQLDelete () {
+ return tep_db_query("delete from " . TABLE_ADDRESS_BOOK . " WHERE customers_id = '" . (int)self::$cInfo->customers_id . "' and address_book_id = '" . (int)self::$cInfo->address_book_id . "'");
+ }
- //! This function returns an array with variables to update into TABLE_ADDRESS_BOOK
- $sql_data_array=$this->sql_data_array;
- tep_db_perform(TABLE_ADDRESS_BOOK, self::$cInfo->sql_data_array, 'update', "customers_id = '" . (int)self::$cInfo->sql_data_array['customers_id'] . "' and address_book_id = '" . (int)self::$cInfo->customers_default_address_id . "'");
+ /**
+ @fn SQLDefaultAddress()
+ @brief update reference address book for one user
+ @return empty array()
+ */
+ protected static function SQLDefaultAddress () {
- return array();
+ /// add link in customers_table
+ $sql_data_array=array('customers_default_address_id'=> (int)self::$cInfo->customers_default_address_id ) ;
+ $r=tep_db_perform(TABLE_CUSTOMERS, $sql_data_array, 'update', " customers_id = '" . (int)self::$cInfo->customers_id. "' ");
+
+ return $r;
}
+ /**
+ @fn deleteconfirm_account($id)
+ @brief Delete reference address book for one user
+ @note Call sqlcustomer class
+ @return result query
+ */
public function deleteconfirm_account($id){
- tep_db_query("delete from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$id . "'");
+ return tep_db_query("delete from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$id . "'");
}
+/** END METHODE LINK SQLCUSTOMER CLASS */
+
+
+
/**
* \fn type filter text
* \brief Load each module parameters from database
* @param $cID integer Id customers current
*/
public function load_db_values($cID) {
- if(is_numeric($cID)) {
- $customers_query = tep_db_query($sql="select c.customers_id, c.customers_gender, c.customers_firstname, c.customers_lastname, c.customers_dob, c.customers_email_address, a.entry_company, a.entry_company_tax_id, a.entry_street_address, a.entry_suburb, a.entry_postcode, a.entry_city, a.entry_state, a.entry_zone_id, a.entry_country_id, c.customers_telephone, c.customers_fax, c.customers_newsletter, c.customers_group_id, c.customers_group_ra, c.customers_payment_allowed, c.customers_shipment_allowed, c.customers_order_total_allowed, c.customers_specific_taxes_exempt, c.customers_default_address_id from " . TABLE_CUSTOMERS . " c left join " . TABLE_ADDRESS_BOOK . " a on c.customers_default_address_id = a.address_book_id where a.customers_id = c.customers_id and c.customers_id = '" . (int)$cID . "'");
- $customers = tep_db_fetch_array($customers_query);
+ if((int)$cID > 0) {
+ $DB = Database::getInstance();
+
+ $sql="SELECT a.*, c.customers_default_address_id from " . TABLE_CUSTOMERS . " c , " . TABLE_ADDRESS_BOOK . " a where a.customers_id = c.customers_id and c.customers_id = '" . (int)$cID . "'";
+
+ $customers_query = $DB->query($sql);
+ $customers = $customers_query->fetchAllAssoc();
+
}else {
- $customers=array('customers_id'=>'',
- 'customers_newsletter'=>'',
- 'customers_default_address_id'=>'',
- 'entry_company'=>'',
- 'entry_company_tax_id'=>'',
- 'entry_street_address'=>'',
- 'entry_suburb'=>'',
- 'entry_postcode'=>'',
- 'entry_city'=>'',
- 'entry_state'=>'',
- 'entry_zone_id'=>'',
- 'entry_country_id'=>'',
- 'customers_group_name'=>'',
- 'customers_group_id'=>'',
- 'customers_group_ra'=>'',
- 'customers_payment_allowed'=>'',
- 'customers_shipment_allowed'=>'',
- 'customers_order_total_allowed'=>'',
- 'customers_specific_taxes_exempt'=>'',
- 'customers_default_address_id'=>'');
+ /// Specimen base
+ $customers=array(
+ array('address_book_id'=>'',
+ 'customers_id'=>customers::$cInfo->customers_id,
+ 'entry_gender'=>customers::$cInfo->customers_gender,
+ 'entry_lastname'=>customers::$cInfo->customers_lastname,
+ 'entry_firstname'=>customers::$cInfo->customers_firstname,
+
+ 'entry_company'=>'',
+ 'entry_company_tax_id'=>'',
+ 'entry_street_address'=>'',
+ 'entry_suburb'=>'',
+ 'entry_postcode'=>'',
+ 'entry_city'=>'',
+ 'entry_state'=>'',
+ 'entry_zone_id'=>'',
+ 'entry_country_id'=>'',
+ )
+ );
}
self::$cInfo->objectInfo($customers);
@@ -208,8 +385,8 @@
* @param $post array
*/
public function load_post_values ($post) {
- $sql_data_array = array('entry_firstname' => $post['customers_firstname'],
- 'entry_lastname' => $post['customers_lastname'],
+ $sql_data_array = array('entry_firstname' => $post['entry_firstname'],
+ 'entry_lastname' => $post['entry_lastname'],
'entry_street_address' => $post['entry_street_address'],
'entry_postcode' => $post['entry_postcode'],
'entry_city' => $post['entry_city'],
@@ -233,9 +410,17 @@
$sql_data_array['entry_state'] = $post['entry_state'];
}
}
+
if(isset($post['customers_default_address_id']))
$result['customers_default_address_id']=$post['customers_default_address_id'];
+ if(isset($post['address_book_id']))
+ $result['address_book_id']=$post['address_book_id'];
+
+
+ if(isset($post['cID']))
+ $result['customers_id']=$post['cID'];
+
$result['sql_data_array']=$sql_data_array;
@@ -243,23 +428,63 @@
self::$cInfo = new objectInfo($result);
}
- function repost_values () {
- // Repost all values that are not arrays
- foreach ($this->pInfo as $key=>$val) {
- if (!is_array($this->pInfo[$key])) {
- echo "\n".tep_draw_hidden_field($this->code .'['.$key.']', stripslashes($val))."\n";
- }
- }
+
+
+/** DEB DISPLAY METHODE */
+
+
+ /**
+ */
+ public function get_header_js(){
}
+
+ /**
+ */
function display_edit(&$contents,$id) {
global $processed;
- $this->load_db_values($id);
- $contents []= array('title'=> __('Adresse'),
- 'text'=> tep_get_include_contents(__CLASS__.'.form'));
+
+ switch($_GET['action']){
+ case 'inline-delete';
+ $this->check_action( array('action'=>$_GET['action']) );
+
+ $contents []= array('title'=> __('Adresse'),
+ 'text'=>
+ tep_get_include_contents('customers/'.__CLASS__.'/inline.delete')
+ );
+ break;
+
+ case 'inline-new';
+ case 'inline-edit';
+ $this->check_action( array('action'=>$_GET['action']) );
+
+ $contents []= array('title'=> __('Adresse'),
+ 'text'=>
+ tep_get_include_contents('customers/'.__CLASS__.'/inline.edit')
+
+ );
+ break;
+
+// default:
+ case 'edit';
+ $this->load_db_values($id);
+
+ $contents []= array('title'=> __('Adresse'),
+ 'text'=>
+ tep_get_include_contents('customers/'.__CLASS__.'/display_view.tabs')
+ );
+ break;
+ }
+
+
+ return $contents;
}
+/** END DISPLAY METHODE */
+
+
+
/** Force implements InterfaceModule class to define this method */
function check() {
if (!isset($this->_check)) {
Modified: trunk/catalog/admin/includes/modules/pages/attributes.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/attributes.php 2011-12-30 10:37:57 UTC (rev 4001)
+++ trunk/catalog/admin/includes/modules/pages/attributes.php 2011-12-30 15:06:00 UTC (rev 4002)
@@ -4,7 +4,7 @@
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 26/11/11, 21:49
+ @date 28/12/11, 21:49
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class attributes
@@ -96,95 +96,97 @@
case 'setimg';
case 'setstock';
case 'setcond';
- attr__UpExe_SetOption(self::$action,$_GET['flag'],tep_db_prepare_input($_GET['poID']));
- tep_redirect(tep_href_link(self::FILENAME));
+ attr__UpExe_SetOption(self::$action,$_GET['flag'],tep_db_prepare_input($_GET['poID']));
+
+ if(!isset($_GET['forceajax']))
+ tep_redirect(tep_href_link(self::FILENAME));
break;
case 'delete':
- if(self::$type=='options') {
- $poID=tep_db_prepare_input($_GET['poID']);
+ if(self::$type=='options') {
+ $poID=tep_db_prepare_input($_GET['poID']);
- sqlproductoption::delete(array('id'=>$poID));
- }
- elseif(self::$type=='values') {
- $povID=tep_db_prepare_input($_GET['povID']);
+ sqlproductoption::delete(array('id'=>$poID));
+ }
+ elseif(self::$type=='values') {
+ $povID=tep_db_prepare_input($_GET['povID']);
- sqlproductoptionvalue::delete(array('id'=>$povID));
- }
+ sqlproductoptionvalue::delete(array('id'=>$povID));
+ }
break;
case 'insert':
case 'update':
- //! option
- if(self::$type=='options') {
- $poID=(self::$action=='insert')
- ? self::getNextAutoValue(TABLE_PRODUCTS_OPTIONS,'products_options_id')
- : tep_db_prepare_input($_GET['poID']) ;
+ //! option
+ if(self::$type=='options') {
+ $poID=(self::$action=='insert')
+ ? self::getNextAutoValue(TABLE_PRODUCTS_OPTIONS,'products_options_id')
+ : tep_db_prepare_input($_GET['poID']) ;
- $sql_data_array['id']= $poID;
- $sql_data_array['condition']= (int)tep_db_prepare_input($_POST['products_options_condition']);
- $sql_data_array['sort_order']= tep_db_prepare_input($_POST['products_options_sort_order']);
- $sql_data_array['track_stock']= (int)tep_db_prepare_input($_POST['products_options_track_stock']);
- $sql_data_array['images_enabled']= (int)tep_db_prepare_input($_POST['products_options_images_enabled']);
- $sql_data_array['type']= tep_db_prepare_input($_POST['products_options_type']);
- $sql_data_array['length']= tep_db_prepare_input($_POST['products_options_length']);
+ $sql_data_array['id']= $poID;
+ $sql_data_array['condition']= (int)tep_db_prepare_input($_POST['products_options_condition']);
+ $sql_data_array['sort_order']= tep_db_prepare_input($_POST['products_options_sort_order']);
+ $sql_data_array['track_stock']= (int)tep_db_prepare_input($_POST['products_options_track_stock']);
+ $sql_data_array['images_enabled']= (int)tep_db_prepare_input($_POST['products_options_images_enabled']);
+ $sql_data_array['type']= tep_db_prepare_input($_POST['products_options_type']);
+ $sql_data_array['length']= tep_db_prepare_input($_POST['products_options_length']);
- for ($i=0, $n=sizeof(self::$languages); $i<$n; $i++) {
- $sql_data_array['name']= $_POST['products_options_name'][self::$languages[$i]['id']];
- $sql_data_array['comment']= $_POST['products_options_comment'][self::$languages[$i]['id']];
- $sql_data_array['language_id']= self::$languages[$i]['id'];
+ for ($i=0, $n=sizeof(self::$languages); $i<$n; $i++) {
+ $sql_data_array['name']= $_POST['products_options_name'][self::$languages[$i]['id']];
+ $sql_data_array['comment']= $_POST['products_options_comment'][self::$languages[$i]['id']];
+ $sql_data_array['language_id']= self::$languages[$i]['id'];
- if(self::$action=='insert')
- sqlproductoption::create($sql_data_array);
- else
- sqlproductoption::update($sql_data_array);
- }
+ if(self::$action=='insert')
+ sqlproductoption::create($sql_data_array);
+ else
+ sqlproductoption::update($sql_data_array);
+ }
- tep_redirect(tep_href_link(self::FILENAME));
- }
- //! valeur d'option
- elseif(self::$type=='values') {
+ tep_redirect(tep_href_link(self::FILENAME));
+ }
+ //! valeur d'option
+ elseif(self::$type=='values') {
- $poID=(isset($_GET['poID'])? (int)tep_db_prepare_input($_GET['poID']): '');
+ $poID=(isset($_GET['poID'])? (int)tep_db_prepare_input($_GET['poID']): '');
- //! insert option value
- $povID=(self::$action=='insert')
- ? self::getNextAutoValue(TABLE_PRODUCTS_OPTIONS_VALUES,'products_options_values_id')
- : tep_db_prepare_input($_GET['povID']) ;
+ //! insert option value
+ $povID=(self::$action=='insert')
+ ? self::getNextAutoValue(TABLE_PRODUCTS_OPTIONS_VALUES,'products_options_values_id')
+ : tep_db_prepare_input($_GET['povID']) ;
- for ($i=0, $n=sizeof(self::$languages); $i<$n; $i++) {
+ for ($i=0, $n=sizeof(self::$languages); $i<$n; $i++) {
- $sql_data_array['name']= tep_db_prepare_input($_POST['products_options_values_name'][self::$languages[$i]['id']]);
- $sql_data_array['thumbnail']= tep_db_prepare_input($_POST['products_options_values_thumbnail'][self::$languages[$i]['id']]);
- $sql_data_array['id']= $povID;
- $sql_data_array['language_id']= self::$languages[$i]['id'];
+ $sql_data_array['name']= tep_db_prepare_input($_POST['products_options_values_name'][self::$languages[$i]['id']]);
+ $sql_data_array['thumbnail']= tep_db_prepare_input($_POST['products_options_values_thumbnail'][self::$languages[$i]['id']]);
+ $sql_data_array['id']= $povID;
+ $sql_data_array['language_id']= self::$languages[$i]['id'];
- if(self::$action=='insert')
- sqlproductoptionvalue::create($sql_data_array);
- else
- sqlproductoptionvalue::update($sql_data_array);
- }
+ if(self::$action=='insert')
+ sqlproductoptionvalue::create($sql_data_array);
+ else
+ sqlproductoptionvalue::update($sql_data_array);
+ }
- //! liaison value avec option
- if(self::$action=='insert') {
- $sql_data_array=array();
- $sql_data_array['options_id']= $poID;
- $sql_data_array['values_id']= $povID;
- sqlproductoptionvalue2option::create($sql_data_array);
- }
+ //! liaison value avec option
+ if(self::$action=='insert') {
+ $sql_data_array=array();
+ $sql_data_array['options_id']= $poID;
+ $sql_data_array['values_id']= $povID;
+ sqlproductoptionvalue2option::create($sql_data_array);
+ }
- tep_redirect(tep_href_link(self::FILENAME));
- }
+ tep_redirect(tep_href_link(self::FILENAME));
+ }
break;
case 'new':
- $res=array();
- for ($i=0, $n=sizeof(self::$languages); $i<$n; $i++) {
- $res['products_options_values_name'][self::$languages[$i]['id']] = "";
- $res['products_options_values_thumbnail'][self::$languages[$i]['id']] = "";
- }
- self::$poIDInfo= new objectInfo($res);
+ $res=array();
+ for ($i=0, $n=sizeof(self::$languages); $i<$n; $i++) {
+ $res['products_options_values_name'][self::$languages[$i]['id']] = "";
+ $res['products_options_values_thumbnail'][self::$languages[$i]['id']] = "";
+ }
+ self::$poIDInfo= new objectInfo($res);
break;
}
@@ -204,52 +206,52 @@
//! recup list valeur pour une option
case 'values_for_option':
- //! recup toutes les langues
- $values = "select * from " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov LEFT JOIN " . TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS . " pov2po on(pov.products_options_values_id) where pov2po.products_options_id='".$ID."' ";
- $res=$DB->query($values);
+ //! recup toutes les langues
+ $values = "select * from " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov LEFT JOIN " . TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS . " pov2po on(pov.products_options_values_id) where pov2po.products_options_id='".$ID."' ";
+ $res=$DB->query($values);
- while ($result=$res->fetchAssoc()){
- $final['products_options_value_name'][$result['language_id']]=$result['products_options_value_name'];
- $final['products_options_values_thumbnail'][$result['language_id']]=$result['products_options_values_thumbnail'];
- }
- self::$poIDInfo = ((isset($final) && is_array($final))? new objectInfo($final): new objectInfo($reinit) );
+ while ($result=$res->fetchAssoc()){
+ $final['products_options_value_name'][$result['language_id']]=$result['products_options_value_name'];
+ $final['products_options_values_thumbnail'][$result['language_id']]=$result['products_options_values_thumbnail'];
+ }
+ self::$poIDInfo = ((isset($final) && is_array($final))? new objectInfo($final): new objectInfo($reinit) );
break;
//! recup detail une valeur
case 'values':
- //! recup toutes les langues
- $values = "select * from " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov LEFT JOIN " . TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS . " pov2po on(pov.products_options_values_id) where pov.products_options_values_id='".$ID."' ";
- $res=$DB->query($values);
+ //! recup toutes les langues
+ $values = "select * from " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov LEFT JOIN " . TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS . " pov2po on(pov.products_options_values_id) where pov.products_options_values_id='".$ID."' ";
+ $res=$DB->query($values);
- while ($result=$res->fetchAssoc()){
- $final['products_options_values_id']=$result['products_options_values_id'];
- $final['products_options_values_name'][$result['language_id']]=$result['products_options_values_name'];
- $final['products_options_values_thumbnail'][$result['language_id']]=$result['products_options_values_thumbnail'];
- }
- self::$poIDInfo = ((isset($final) && is_array($final))? new objectInfo($final): new objectInfo($reinit) );
+ while ($result=$res->fetchAssoc()){
+ $final['products_options_values_id']=$result['products_options_values_id'];
+ $final['products_options_values_name'][$result['language_id']]=$result['products_options_values_name'];
+ $final['products_options_values_thumbnail'][$result['language_id']]=$result['products_options_values_thumbnail'];
+ }
+ self::$poIDInfo = ((isset($final) && is_array($final))? new objectInfo($final): new objectInfo($reinit) );
break;
//! recup une option
case 'options':
default:
- if(tep_not_null($ID)){
- $options = "select * from " . TABLE_PRODUCTS_OPTIONS . " where products_options_id='".$ID."' ";
- $res=$DB->query($options);
+ if(tep_not_null($ID)){
+ $options = "select * from " . TABLE_PRODUCTS_OPTIONS . " where products_options_id='".$ID."' ";
+ $res=$DB->query($options);
- while ($result=$res->fetchAssoc()){
- $final['products_options_id']= $result['products_options_id'];
- $final['products_options_condition']= $result['products_options_condition'];
- $final['products_options_sort_order']= $result['products_options_sort_order'];
- $final['products_options_track_stock']= $result['products_options_track_stock'];
- $final['products_options_images_enabled']= $result['products_options_images_enabled'];
- $final['products_options_type']= $result['products_options_type'];
- $final['products_options_length']= $result['products_options_length'];
- $final['products_options_name'][$result['language_id']]=$result['products_options_name'];
- $final['products_options_comment'][$result['language_id']]=$result['products_options_comment'];
+ while ($result=$res->fetchAssoc()){
+ $final['products_options_id']= $result['products_options_id'];
+ $final['products_options_condition']= $result['products_options_condition'];
+ $final['products_options_sort_order']= $result['products_options_sort_order'];
+ $final['products_options_track_stock']= $result['products_options_track_stock'];
+ $final['products_options_images_enabled']= $result['products_options_images_enabled'];
+ $final['products_options_type']= $result['products_options_type'];
+ $final['products_options_length']= $result['products_options_length'];
+ $final['products_options_name'][$result['language_id']]=$result['products_options_name'];
+ $final['products_options_comment'][$result['language_id']]=$result['products_options_comment'];
- }
- }
- self::$poIDInfo = ((isset($final) && is_array($final))? new objectInfo($final): new objectInfo($reinit) );
+ }
+ }
+ self::$poIDInfo = ((isset($final) && is_array($final))? new objectInfo($final): new objectInfo($reinit) );
}
}
@@ -257,30 +259,46 @@
$action=self::$action;
switch (self::$action) {
+ /**
+ @remarks Ajax View result
+ */
+ case 'setcond':
+ return self::get_item_optionnel(array('products_options_condition'=>(int)$_GET['flag'], 'products_options_id'=>(int)$_GET['poID']));
+ break;
+ case 'setstock':
+ return self::get_item_stock(array('products_options_track_stock'=>(int)$_GET['flag'], 'products_options_id'=>(int)$_GET['poID']));
+ break;
+ case 'setimg':
+ return self::get_item_images(array('products_options_images_enabled'=>(int)$_GET['flag'], 'products_options_id'=>(int)$_GET['poID']));
+ break;
+
+ /**
+ @remarks Normal View Page
+ */
case 'edit':
- self::$poID=(int)$_GET['poID'];
- if(self::$type=='options') self::load_db_values(self::$poID);
- else{
- self::$povID=(int)$_GET['povID'];
- self::load_db_values(self::$povID);
- }
+ self::$poID=(int)$_GET['poID'];
+ if(self::$type=='options') self::load_db_values(self::$poID);
+ else{
+ self::$povID=(int)$_GET['povID'];
+ self::load_db_values(self::$povID);
+ }
case 'new':
- $action='edit';
- if(self::$type=='values')
- self::$poID=(int)$_GET['poID'];
+ $action='edit';
+ if(self::$type=='values')
+ self::$poID=(int)$_GET['poID'];
break;
case 'delete_confirm':
- self::$poID=(int)$_GET['poID'];
- if(self::$type=='options') self::load_db_values(self::$poID);
- else{
- self::$povID=(int)$_GET['povID'];
- self::getProductforOptionValue(self::$povID);
- }
- $action='delete';
+ self::$poID=(int)$_GET['poID'];
+ if(self::$type=='options') self::load_db_values(self::$poID);
+ else{
+ self::$povID=(int)$_GET['povID'];
+ self::getProductforOptionValue(self::$povID);
+ }
+ $action='delete';
break;
default:
- self::tep_get_list();
- $action='listing';
+ self::tep_get_list();
+ $action='listing';
}
/// use master gabarit
return MGabCont::CallGab(self::$type.'.'.$action,__FUNCTION__,__CLASS__);
@@ -308,10 +326,12 @@
/** public static InterfacedTJsonS */
private static function get_item_action($item){
- return '<span class="view fils fleft">'.
-// '<a class="button" href="' . tep_href_link(attributes::FILENAME,'poID='.$item['products_options_id'].'&action=list_option' ) . '">'.__('image list').'</a>'.
- '<a class="buttonimg" href="' . tep_href_link(attributes::FILENAME,'poID='.$item['products_options_id'].'&action=edit' ) . '">'.tep_image(DIR_WS_ICONS . 'icon_edit.png', IMAGE_EDIT).'</a>'.
- '</span>';
+ return sprintf(
+ CsrtAction::getFormat('row_action'),
+ '' ,
+ sprintf(CsrtAction::getLink('row_action_right', IMAGE_EDIT, 'edit'), '', tep_href_link(self::FILENAME,'poID='.$item['products_options_id'].'&action=edit' ),'' )
+// sprintf(CsrtAction::getLink('row_action_right', IMAGE_DELETE, 'delete'), 'fancy', tep_href_link(self::FILENAME, 'cID=' . $customers['customers_id'].'&action=confirm' ) ,'' )
+ );
}
@@ -322,9 +342,9 @@
*/
private static function get_item_optionnel($item){
$exclude=array('action','cID','forceajax','type','class','function','funct', 'mod');
- $query_s='action=setcond&cID=' . $item['products_options_id'].'&flag=';
+ $query_s='action=setcond&poID=' . $item['products_options_id'].'&flag=';
- return '<a href="' . tep_href_link(self::FILENAME, tep_get_all_get_params($exclude).$query_s.(($item['products_options_condition'] == '1')? '0' : '1') ) . '">'.
+ return '<a class="ajaxinline" href="' . tep_href_link(self::FILENAME, tep_get_all_get_params($exclude).$query_s.(($item['products_options_condition'] == '1')? '0' : '1') ) . '">'.
sprintf(
CsrtAction::getFormat('row_flag'),
(int)$item['products_options_condition'],
@@ -340,9 +360,9 @@
*/
private static function get_item_stock($item){
$exclude=array('action','cID','forceajax','type','class','function','funct', 'mod');
- $query_s='action=setstock&cID=' . $item['products_options_id'].'&flag=';
+ $query_s='action=setstock&poID=' . $item['products_options_id'].'&flag=';
- return '<a href="' . tep_href_link(self::FILENAME, tep_get_all_get_params($exclude).$query_s.(($item['products_options_track_stock'] == '1')? '0' : '1') ) . '">'.
+ return '<a class="ajaxinline" href="' . tep_href_link(self::FILENAME, tep_get_all_get_params($exclude).$query_s.(($item['products_options_track_stock'] == '1')? '0' : '1') ) . '">'.
sprintf(
CsrtAction::getFormat('row_flag'),
(int)$item['products_options_track_stock'],
@@ -358,9 +378,9 @@
*/
private static function get_item_images($item){
$exclude=array('action','cID','forceajax','type','class','function','funct', 'mod');
- $query_s='action=setimg&cID=' . $item['products_options_id'].'&flag=';
+ $query_s='action=setimg&poID=' . $item['products_options_id'].'&flag=';
- return '<a href="' . tep_href_link(self::FILENAME, tep_get_all_get_params($exclude).$query_s.(($item['products_options_images_enabled'] == '1')? '0' : '1') ) . '">'.
+ return '<a class="ajaxinline" href="' . tep_href_link(self::FILENAME, tep_get_all_get_params($exclude).$query_s.(($item['products_options_images_enabled'] == '1')? '0' : '1') ) . '">'.
sprintf(
CsrtAction::getFormat('row_flag'),
(int)$item['products_options_images_enabled'],
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2011-12-30 10:38:04
|
Revision: 4001
http://oscss.svn.sourceforge.net/oscss/?rev=4001&view=rev
Author: oscim
Date: 2011-12-30 10:37:57 +0000 (Fri, 30 Dec 2011)
Log Message:
-----------
correction erreur suite evolution du core, remplacement appel sub class obsolete, suppression reference return_text tables
Modified Paths:
--------------
trunk/catalog/admin/includes/modules/configuration/modlangue.php
Modified: trunk/catalog/admin/includes/modules/configuration/modlangue.php
===================================================================
--- trunk/catalog/admin/includes/modules/configuration/modlangue.php 2011-12-29 22:31:08 UTC (rev 4000)
+++ trunk/catalog/admin/includes/modules/configuration/modlangue.php 2011-12-30 10:37:57 UTC (rev 4001)
@@ -4,7 +4,7 @@
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 24/10/11, 17:00
+ @date 30/12/11, 17:00
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class modlangue Gestion des langues configurées sur la boutique
@@ -82,6 +82,7 @@
tep_redirect(tep_href_link(FILENAME_CONFIGURATION, tep_get_all_get_params(array('action','lID'),false). 'lID=' . $_GET['lID']));
break;
+
case 'deleteconfirm':
$lID = tep_db_prepare_input($_GET['lID']);
@@ -96,8 +97,8 @@
tep_db_query("delete from " . TABLE_PRODUCTS_OPTIONS . " where language_id = '" . (int)$lID . "'");
tep_db_query("delete from " . TABLE_PRODUCTS_OPTIONS_VALUES . " where language_id = '" . (int)$lID . "'");
tep_db_query("delete from " . TABLE_MANUFACTURERS_INFO . " where languages_id = '" . (int)$lID . "'");
- require(DIR_WS_MODULES.'configuration/cfg_30.php') ;
- cfg_30::del_language($lID);
+ require(DIR_WS_MODULES.'configuration/modstatus.php') ;
+ modstatus::del_language($lID);
tep_db_query("delete from " . TABLE_LANGUAGES . " where languages_id = '" . (int)$lID . "'");
@@ -105,6 +106,7 @@
tep_redirect(tep_href_link(FILENAME_CONFIGURATION, tep_get_all_get_params(array('action','lID'), false). 'page=' . $_GET['page']));
break;
+
case 'delete':
$lID = tep_db_prepare_input($_GET['lID']);
@@ -202,14 +204,14 @@
}
// Ajout de status / boucle par type
- require(DIR_WS_MODULES.'configuration/cfg_30.php') ;
- cfg_30::add_language($insert_id);
+ require(DIR_WS_MODULES.'configuration/modstatus.php') ;
+ modstatus::add_language($insert_id);
// create additional return return texte
- $orders_status_query = tep_db_query("select return_text_id, return_text_one from " . TABLE_RETURNS_TEXT . " where language_id = '" . (int)$languages_id . "'");
- while ($orders_status = tep_db_fetch_array($orders_status_query)) {
- tep_db_query("insert into " . TABLE_RETURNS_TEXT . " (return_text_id, language_id, return_text_one) values ('" . (int)$orders_status['return_text_id'] . "', '" . (int)$insert_id . "', '" . tep_db_input($orders_status['return_text_one']) . "')");
- }
+// $orders_status_query = tep_db_query("select return_text_id, return_text_one from " . TABLE_RETURNS_TEXT . " where language_id = '" . (int)$languages_id . "'");
+// while ($orders_status = tep_db_fetch_array($orders_status_query)) {
+// tep_db_query("insert into " . TABLE_RETURNS_TEXT . " (return_text_id, language_id, return_text_one) values ('" . (int)$orders_status['return_text_id'] . "', '" . (int)$insert_id . "', '" . tep_db_input($orders_status['return_text_one']) . "')");
+// }
// create additional full_tag_description records
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2011-12-29 22:31:15
|
Revision: 4000
http://oscss.svn.sourceforge.net/oscss/?rev=4000&view=rev
Author: oscim
Date: 2011-12-29 22:31:08 +0000 (Thu, 29 Dec 2011)
Log Message:
-----------
report correction suite evolution images
Modified Paths:
--------------
trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/plugins/product/slimbox/includes_header.php
trunk/catalog/install/data/templates/appareil_photo/electronix/includes/plugins/product/slimbox/includes_header.php
Modified: trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/plugins/product/slimbox/includes_header.php
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/plugins/product/slimbox/includes_header.php 2011-12-29 22:26:15 UTC (rev 3999)
+++ trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/plugins/product/slimbox/includes_header.php 2011-12-29 22:31:08 UTC (rev 4000)
@@ -3,6 +3,8 @@
@licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
@subpackage slimbox2
@package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 28/12/11, 21:44
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -29,10 +31,10 @@
$img_gd=(isset($product_info['products_image_xl']))? $product_info['products_image_xl']: $product_info['products_image'];
$m =''."\n";
- $m .='<p><a class="'.$class.'" rel="'.$class.'" href="' .tep_image(DIR_WS_IMAGES . $img_gd, $product_info['products_name'], $page->_conf_value('POPUP_IMAGE_WIDTH'), $page->_conf_value('POPUP_IMAGE_HEIGHT'), "", true) . '" title="' . addslashes($product_info['products_name']) . '" >' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), $page->_conf_value('HEADING_IMAGE_WIDTH'), $page->_conf_value('HEADING_IMAGE_HEIGHT'),' id="image_master" ','simple') . '</a></p>'."\n";
+ $m .='<p><a class="'.$class.'" rel="'.$class.'" href="' .tep_image(DIR_WS_IMAGES . $img_gd, $product_info['products_name'], $page->_conf_value('POPUP_IMAGE_WIDTH'), $page->_conf_value('POPUP_IMAGE_HEIGHT'), "", true) . '" title="' . addslashes($product_info['products_name']) . '" >' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), $page->_conf_value('HEADING_IMAGE_WIDTH'), $page->_conf_value('HEADING_IMAGE_HEIGHT'),' id="image_master" ' ) . '</a></p>'."\n";
$m .=''."\n";
$m .='<noscript>'."\n";
- $m .='<p><a class="'.$class.'" href="' .tep_image(DIR_WS_IMAGES . $img_gd, $product_info['products_name'], $page->_conf_value('POPUP_IMAGE_WIDTH'), $page->_conf_value('POPUP_IMAGE_HEIGHT'), "", true) . '">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], $img_w, $img_h,' id="image_master" ','simple') . '</a><br /><a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '">' . TEXT_CLICK_TO_ENLARGE . '</a></p>'."\n";
+ $m .='<p><a class="'.$class.'" href="' .tep_image(DIR_WS_IMAGES . $img_gd, $product_info['products_name'], $page->_conf_value('POPUP_IMAGE_WIDTH'), $page->_conf_value('POPUP_IMAGE_HEIGHT'), "", true) . '">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], $img_w, $img_h,' id="image_master" ') . '</a><br /><a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '">' . TEXT_CLICK_TO_ENLARGE . '</a></p>'."\n";
$m .='</noscript>'."\n";
return $m;
@@ -46,26 +48,26 @@
global $page;
$dir_ws_here=$page->getPathTemplate().'includes/plugins/product/slimbox/';
$scripts=array('jquery'=> array(
- 'type'=>'framework',
- 'file'=>"ext/jquery/jquery.min.js",
- 'pages'=>'product_info,'
+ 'type'=>'framework',
+ 'file'=>"ext/jquery/jquery.min.js",
+ 'pages'=>'product_info,'
),
'1'=>array(
- 'type'=>'script',
- 'place'=>'header',
- 'file'=>array(
- $dir_ws_here."inc/slimbox2.css",
- ),
- 'sort'=> 6
- ),
+ 'type'=>'script',
+ 'place'=>'header',
+ 'file'=>array(
+ $dir_ws_here."inc/slimbox2.css",
+ ),
+ 'sort'=> 6
+ ),
'2'=>array(
- 'type'=>'script',
- 'place'=>'footer',
- 'file'=>array(
- $dir_ws_here."inc/slimbox2.js"
- ),
- 'sort'=> 6
- ),
+ 'type'=>'script',
+ 'place'=>'footer',
+ 'file'=>array(
+ $dir_ws_here."inc/slimbox2.js"
+ ),
+ 'sort'=> 6
+ ),
);
return $scripts;
}
Modified: trunk/catalog/install/data/templates/appareil_photo/electronix/includes/plugins/product/slimbox/includes_header.php
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/electronix/includes/plugins/product/slimbox/includes_header.php 2011-12-29 22:26:15 UTC (rev 3999)
+++ trunk/catalog/install/data/templates/appareil_photo/electronix/includes/plugins/product/slimbox/includes_header.php 2011-12-29 22:31:08 UTC (rev 4000)
@@ -3,6 +3,8 @@
@licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
@subpackage slimbox2
@package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 28/12/11, 21:44
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -29,10 +31,10 @@
$img_gd=(isset($product_info['products_image_xl']))? $product_info['products_image_xl']: $product_info['products_image'];
$m =''."\n";
- $m .='<p><a class="'.$class.'" rel="'.$class.'" href="' .tep_image(DIR_WS_IMAGES . $img_gd, $product_info['products_name'], $page->_conf_value('POPUP_IMAGE_WIDTH'), $page->_conf_value('POPUP_IMAGE_HEIGHT'), "", true) . '" title="' . addslashes($product_info['products_name']) . '" >' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), $img_w, $img_h,' id="image_master" ','simple') . '</a></p>'."\n";
+ $m .='<p><a class="'.$class.'" rel="'.$class.'" href="' .tep_image(DIR_WS_IMAGES . $img_gd, $product_info['products_name'], $page->_conf_value('POPUP_IMAGE_WIDTH'), $page->_conf_value('POPUP_IMAGE_HEIGHT'), "", true) . '" title="' . addslashes($product_info['products_name']) . '" >' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), $page->_conf_value('HEADING_IMAGE_WIDTH'), $page->_conf_value('HEADING_IMAGE_HEIGHT'),' id="image_master" ' ) . '</a></p>'."\n";
$m .=''."\n";
$m .='<noscript>'."\n";
- $m .='<p><a class="'.$class.'" href="' .tep_image(DIR_WS_IMAGES . $img_gd, $product_info['products_name'], $page->_conf_value('POPUP_IMAGE_WIDTH'), $page->_conf_value('POPUP_IMAGE_HEIGHT'), "", true) . '">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], $img_w, $img_h,' id="image_master" ','simple') . '</a><br /><a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '">' . TEXT_CLICK_TO_ENLARGE . '</a></p>'."\n";
+ $m .='<p><a class="'.$class.'" href="' .tep_image(DIR_WS_IMAGES . $img_gd, $product_info['products_name'], $page->_conf_value('POPUP_IMAGE_WIDTH'), $page->_conf_value('POPUP_IMAGE_HEIGHT'), "", true) . '">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], $img_w, $img_h,' id="image_master" ') . '</a><br /><a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '">' . TEXT_CLICK_TO_ENLARGE . '</a></p>'."\n";
$m .='</noscript>'."\n";
return $m;
@@ -46,26 +48,26 @@
global $page;
$dir_ws_here=$page->getPathTemplate().'includes/plugins/product/slimbox/';
$scripts=array('jquery'=> array(
- 'type'=>'framework',
- 'file'=>"ext/jquery/jquery.min.js",
- 'pages'=>'product_info,'
+ 'type'=>'framework',
+ 'file'=>"ext/jquery/jquery.min.js",
+ 'pages'=>'product_info,'
),
'1'=>array(
- 'type'=>'script',
- 'place'=>'header',
- 'file'=>array(
- $dir_ws_here."inc/slimbox2.css",
- ),
- 'sort'=> 6
- ),
+ 'type'=>'script',
+ 'place'=>'header',
+ 'file'=>array(
+ $dir_ws_here."inc/slimbox2.css",
+ ),
+ 'sort'=> 6
+ ),
'2'=>array(
- 'type'=>'script',
- 'place'=>'footer',
- 'file'=>array(
- $dir_ws_here."inc/slimbox2.js"
- ),
- 'sort'=> 6
- ),
+ 'type'=>'script',
+ 'place'=>'footer',
+ 'file'=>array(
+ $dir_ws_here."inc/slimbox2.js"
+ ),
+ 'sort'=> 6
+ ),
);
return $scripts;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2011-12-29 22:26:21
|
Revision: 3999
http://oscss.svn.sourceforge.net/oscss/?rev=3999&view=rev
Author: oscim
Date: 2011-12-29 22:26:15 +0000 (Thu, 29 Dec 2011)
Log Message:
-----------
FS#952
Modified Paths:
--------------
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/cronjob.txt
trunk/catalog/admin/includes/modules/pages/cronjob.php
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/pages/cronjob.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/pages/cronjob.txt 2011-12-29 22:06:56 UTC (rev 3998)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/cronjob.txt 2011-12-29 22:26:15 UTC (rev 3999)
@@ -15,51 +15,52 @@
$lang['image insert job']="Ajouter une tâche" ;
/* listing */
-$lang['table heading id']="ID" ;
-$lang['table heading scriptpath']="Chemin du script" ;
-$lang['table heading name']="Nom" ;
-$lang['table heading time_interval']="Répétition" ;
-$lang['table heading fire_time']="Démarrage" ;
-$lang['table heading time_last_fired']="dernière" ;
-$lang['table heading run_only_once']="Unique" ;
-$lang['table heading status']="Status" ;
-$lang['table heading action']="action" ;
+ $lang['table heading id']="ID" ;
+ $lang['table heading scriptpath']="Chemin du script" ;
+ $lang['table heading name']="Nom" ;
+ $lang['table heading time_interval']="Répétition" ;
+ $lang['table heading fire_time']="Démarrage" ;
+ $lang['table heading time_last_fired']="dernière" ;
+ $lang['table heading run_only_once']="Unique" ;
+ $lang['table heading status']="Status" ;
+ $lang['table heading action']="action" ;
/* Edit */
-$lang['definir le module utilise']="Module utilisé" ;
-$lang['definir le delai de repetition']="Délais de répétition" ;
-$lang['definir la date de premiere execution']="Date de premiere execution" ;
-$lang["definir si l'execution est unique"]="Repetition" ;
+ $lang['definir le module utilise']="Module utilisé" ;
+ $lang['definir le delai de repetition']="Délais de répétition" ;
+ $lang['definir la date de premiere execution']="Date de premiere execution" ;
+ $lang["definir si l'execution est unique"]="Repetition" ;
-$lang['txt repetition']="Repetition" ;
-$lang['txt unique']="Unique" ;
+ $lang['txt repetition']="Repetition" ;
+ $lang['txt unique']="Unique" ;
-$lang['text 1 min']="Toutes les 1 min" ;
-$lang['text 5 min']="Toutes les 5 min" ;
-$lang['text 15 min']="Toutes les 15 min" ;
-$lang['text 30 min']="Toutes les 30 min" ;
-$lang['text 1 h']="Toutes les 1 heures" ;
-$lang['text 2 h']="Toutes les 2 heures" ;
-$lang['text 4 h']="Toutes les 4 heures" ;
-$lang['text 8 h']="Toutes les 8 heures" ;
-$lang['text 12 h']="Toutes les 12 heures" ;
-$lang['text 1 jour']="Tous les 1 jour" ;
-$lang['text 2 jour']="Tous les 2 jours" ;
-$lang['text 3 jour']="Tous les 3 jours" ;
-$lang['text 1 semaine']="Tous les 1 semaine" ;
-$lang['text 2 semaine']="Tous les 2 semaines" ;
-$lang['text 1 mois']="Tous les 1 mois" ;
+ $lang['text 1 min']="Toutes les 1 min" ;
+ $lang['text 5 min']="Toutes les 5 min" ;
+ $lang['text 15 min']="Toutes les 15 min" ;
+ $lang['text 30 min']="Toutes les 30 min" ;
+ $lang['text 1 h']="Toutes les 1 heures" ;
+ $lang['text 2 h']="Toutes les 2 heures" ;
+ $lang['text 4 h']="Toutes les 4 heures" ;
+ $lang['text 8 h']="Toutes les 8 heures" ;
+ $lang['text 12 h']="Toutes les 12 heures" ;
+ $lang['text 1 jour']="Tous les 1 jour" ;
+ $lang['text 2 jour']="Tous les 2 jours" ;
+ $lang['text 3 jour']="Tous les 3 jours" ;
+ $lang['text 1 semaine']="Tous les 1 semaine" ;
+ $lang['text 2 semaine']="Tous les 2 semaines" ;
+ $lang['text 1 mois']="Tous les 1 mois" ;
+ $lang['txt detail usage']="Les taches programmées vous permette d'automatiser certaines actions . Celle ci sont complément centralisé dans cette gestion.";
+ $lang['txt detail usage http']="Méthode http, pointer ce lien";
+ $lang['txt detail usage phpcli']="Méthode ligne de commande (nécessite phpcli)";
-$lang['txt detail usage']="Les taches programmées vous permette d'automatiser certaines actions . Celle ci sont complément centralisé dans cette gestion.";
-$lang['txt detail usage http']="Méthode http, pointer ce lien";
-$lang['txt detail usage phpcli']="Méthode ligne de commande (nécessite phpcli)";
+/* Delete*/
+ $lang['heading title delete']="Êtes vous sûr de vouloir supprimer cette tâche" ;
-
/* Module Name */
$lang['module txt name clean_cache_dir']="Nettoyage fichiers de caches" ;
$lang['module txt name customers_birthday']="Envoie de mail à la date d\'anniversaire des clients " ;
Modified: trunk/catalog/admin/includes/modules/pages/cronjob.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/cronjob.php 2011-12-29 22:06:56 UTC (rev 3998)
+++ trunk/catalog/admin/includes/modules/pages/cronjob.php 2011-12-29 22:26:15 UTC (rev 3999)
@@ -79,69 +79,70 @@
switch (self::$action) {
case 'setflag':
- if ( ($_GET['flag'] == '0') || ($_GET['flag'] == '1') ) {
- $_id = tep_db_prepare_input($_GET['cID']);
+ if ( ($_GET['flag'] == '0') || ($_GET['flag'] == '1') ) {
+ $_id = tep_db_prepare_input($_GET['cID']);
- if (!empty($_id))
- $DB->query("update " . TABLE_CRONJOB . " set status = '" .(int) $_GET['flag'] . "' where id = '" . (int)$_id . "'");
- }
+ if (!empty($_id))
+ $DB->query("update " . TABLE_CRONJOB . " set status = '" .(int) $_GET['flag'] . "' where id = '" . (int)$_id . "'");
+ }
- tep_redirect(tep_href_link(self::FILENAME, 'cID=' . $_id));
+ if(!isset($_GET['forceajax']))
+ tep_redirect(tep_href_link(self::FILENAME, 'cID=' . $_id));
break;
case 'deleteconfirm':
- $id=(int) $_GET['cID'];
- $DB->query("DELETE FROM ".TABLE_CRONJOB." WHERE id='".(int)$id."'");
- tep_redirect(tep_href_link(self::FILENAME));
+ $id=(int) $_GET['cID'];
+ $DB->query("DELETE FROM ".TABLE_CRONJOB." WHERE id='".(int)$id."'");
+ tep_redirect(tep_href_link(self::FILENAME));
break;
case 'insert':
- $name=substr(tep_db_prepare_input($_POST['name']),0,-4);
- $scriptpath=DIR_WS_MODULES.self::DIR_MODULE.$name;
- $time_interval=(int)tep_db_prepare_input($_POST['time_interval']);
- $fire_time=tep_date_raw(tep_db_prepare_input($_POST['fire_time'])).' '.tep_db_prepare_input($_POST['fire_time_begin_hour']).':00';
- $run_only_once=tep_db_prepare_input($_POST['run_only_once']);
+ $name=substr(tep_db_prepare_input($_POST['name']),0,-4);
+ $scriptpath=DIR_WS_MODULES.self::DIR_MODULE.$name;
+ $time_interval=(int)tep_db_prepare_input($_POST['time_interval']);
+ $fire_time=tep_date_raw(tep_db_prepare_input($_POST['fire_time'])).' '.tep_db_prepare_input($_POST['fire_time_begin_hour']).':00';
+ $run_only_once=tep_db_prepare_input($_POST['run_only_once']);
- $mod=self::loadCronMod($name);
- if(self::$CronMod->config)
- $string=$mod->insert($_POST['configuration']);
+ $mod=self::loadCronMod($name);
+ if(self::$CronMod->config)
+ $string=$mod->insert($_POST['configuration']);
- $query="INSERT INTO ".TABLE_CRONJOB." (id,scriptpath, name, time_interval, fire_time, time_last_fired,run_only_once, status,extra) VALUES ('','$scriptpath','$name','$time_interval','$fire_time','0','$run_only_once',0,'".$string."' )";
- $res=$DB->query($query);
- $id= tep_db_insert_id($res);
- tep_redirect(tep_href_link(self::FILENAME,'action=edit&cID=' . $id ));
+ $query="INSERT INTO ".TABLE_CRONJOB." (id,scriptpath, name, time_interval, fire_time, time_last_fired,run_only_once, status,extra) VALUES ('','$scriptpath','$name','$time_interval','$fire_time','0','$run_only_once',0,'".$string."' )";
+ $res=$DB->query($query);
+ $id= tep_db_insert_id($res);
+ tep_redirect(tep_href_link(self::FILENAME,'action=edit&cID=' . $id ));
break;
case 'update':
- $id=(int) $_GET['cID'];
- $name=substr(tep_db_prepare_input($_POST['name']),0,-4);
- $scriptpath=DIR_WS_MODULES.self::DIR_MODULE.$name;
- $time_interval=(int)tep_db_prepare_input($_POST['time_interval']);
- $fire_time=tep_date_raw(tep_db_prepare_input($_POST['fire_time'])).' '.tep_db_prepare_input($_POST['fire_time_begin_hour']).':00';
- $run_only_once=tep_db_prepare_input($_POST['run_only_once']);
+ $id=(int) $_GET['cID'];
+ $name=substr(tep_db_prepare_input($_POST['name']),0,-4);
+ $scriptpath=DIR_WS_MODULES.self::DIR_MODULE.$name;
+ $time_interval=(int)tep_db_prepare_input($_POST['time_interval']);
+ $fire_time=tep_date_raw(tep_db_prepare_input($_POST['fire_time'])).' '.tep_db_prepare_input($_POST['fire_time_begin_hour']).':00';
+ $run_only_once=tep_db_prepare_input($_POST['run_only_once']);
- $mod=self::loadCronMod($name);
- if(self::$CronMod->config)
- $string=$mod->update($_POST['configuration']);
+ $mod=self::loadCronMod($name);
+ if(self::$CronMod->config)
+ $string=$mod->update($_POST['configuration']);
- $query="UPDATE ".TABLE_CRONJOB." SET name='$name', scriptpath='$scriptpath', time_interval='$time_interval', fire_time='$fire_time', run_only_once='$run_only_once', extra='".$string."' WHERE id='$id'";
+ $query="UPDATE ".TABLE_CRONJOB." SET name='$name', scriptpath='$scriptpath', time_interval='$time_interval', fire_time='$fire_time', run_only_once='$run_only_once', extra='".$string."' WHERE id='$id'";
- $DB->query($query);
- tep_redirect(tep_href_link(self::FILENAME, 'cID=' . $id));
+ $DB->query($query);
+ tep_redirect(tep_href_link(self::FILENAME, 'cID=' . $id));
break;
case 'edit':
- require_once(DIR_WS_FUNCTIONS.'lib.configuration.php');
+ require_once(DIR_WS_FUNCTIONS.'lib.configuration.php');
break;
case 'new':
- self::$cInfo=new objectInfo(array('id'=>'',
- 'scriptpath'=>'',
- 'name'=>'',
- 'time_interval'=>'',
- 'fire_time'=>'',
- 'time_last_fired'=>'',
- 'run_only_once'=>'',
- 'status'=>''
- ) );
+ self::$cInfo=new objectInfo(array('id'=>'',
+ 'scriptpath'=>'',
+ 'name'=>'',
+ 'time_interval'=>'',
+ 'fire_time'=>'',
+ 'time_last_fired'=>'',
+ 'run_only_once'=>'',
+ 'status'=>''
+ ) );
break;
}
@@ -248,6 +249,16 @@
$action=self::$action;
switch (self::$action) {
+ /**
+ @remarks Ajax View result
+ */
+ case 'setflag':
+ return self::get_item_status(array('status'=>(int)$_GET['flag'], 'id'=>(int)$_GET['cID']));
+ break;
+
+ /**
+ @remarks Normal View Page
+ */
case 'delete':
self::$cInfo=self::load_db_values(@$_GET['cID']);
$action = 'delete';
@@ -296,7 +307,7 @@
$exclude=array('action','cID','forceajax','type','class','function','funct', 'mod');
$query_s='action=setflag&cID=' . $array['id'].'&flag=';
- return '<a href="' . tep_href_link(self::FILENAME, tep_get_all_get_params($exclude).$query_s.(($array['status'] == '1')? '0' : '1') ) . '">'.
+ return '<a class="ajaxinline" href="' . tep_href_link(self::FILENAME, tep_get_all_get_params($exclude).$query_s.(($array['status'] == '1')? '0' : '1') ) . '">'.
sprintf(
CsrtAction::getFormat('row_flag'),
(int)$array['status'],
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2011-12-29 22:07:02
|
Revision: 3998
http://oscss.svn.sourceforge.net/oscss/?rev=3998&view=rev
Author: oscim
Date: 2011-12-29 22:06:56 +0000 (Thu, 29 Dec 2011)
Log Message:
-----------
FS#943
Modified Paths:
--------------
trunk/catalog/includes/classes/shopping_cart_action.php
Modified: trunk/catalog/includes/classes/shopping_cart_action.php
===================================================================
--- trunk/catalog/includes/classes/shopping_cart_action.php 2011-12-29 21:55:10 UTC (rev 3997)
+++ trunk/catalog/includes/classes/shopping_cart_action.php 2011-12-29 22:06:56 UTC (rev 3998)
@@ -3,8 +3,8 @@
@licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.1.0
- @date 23/01/11, 20:53
+ @version 2.1.1
+ @date 28/12/11, 20:53
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
\class shopping_cart_action
@@ -156,7 +156,7 @@
}
- if (_cst_bool('DISPLAY_CART')) {
+ if (_cst_bool('DISPLAY_CART')|| $action=='update_product') {
$goto = FILENAME_SHOPPING_CART;
$parameters = array('action', 'cPath', 'products_id', 'pid');
} else {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2011-12-29 21:55:16
|
Revision: 3997
http://oscss.svn.sourceforge.net/oscss/?rev=3997&view=rev
Author: oscim
Date: 2011-12-29 21:55:10 +0000 (Thu, 29 Dec 2011)
Log Message:
-----------
FS#951
correction text menu extensions
Modified Paths:
--------------
trunk/catalog/admin/includes/languages/fr_FR/boxes/02_modules.php
trunk/catalog/includes/triggers/cart_totaux.inc
trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/triggers/cart_totaux.inc
Modified: trunk/catalog/admin/includes/languages/fr_FR/boxes/02_modules.php
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/boxes/02_modules.php 2011-12-29 18:55:35 UTC (rev 3996)
+++ trunk/catalog/admin/includes/languages/fr_FR/boxes/02_modules.php 2011-12-29 21:55:10 UTC (rev 3997)
@@ -2,8 +2,8 @@
/**
@licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.1.0
- @date 09/12/10, 17:23
+ @version 2.1.1
+ @date 28/12/10, 17:23
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@brief file languages for boxes menu
@@ -13,8 +13,8 @@
define('BOX_MODULES_SHIPPING',"Expédition" );
define('BOX_MODULES_ORDER_TOTAL',"Total commande" );
define('BOX_MODULES_INSTALLATEUR',"Extension Catalogue" );
-define('BOX_MODULES_PANEL',"Extension générale" );
-define('BOX_MODULES_CHECKOUT_PANEL',"Extension checkout" );
+define('BOX_MODULES_PANEL',"Modules générale" );
+define('BOX_MODULES_CHECKOUT_PANEL',"Modules checkout" );
define('BOX_PLUGINS_PANEL',"Plugins de thème" );
define('BOX_HEADING_CONF_BOX_PLUGIN',"Plugins du template" );
?>
\ No newline at end of file
Modified: trunk/catalog/includes/triggers/cart_totaux.inc
===================================================================
--- trunk/catalog/includes/triggers/cart_totaux.inc 2011-12-29 18:55:35 UTC (rev 3996)
+++ trunk/catalog/includes/triggers/cart_totaux.inc 2011-12-29 21:55:10 UTC (rev 3997)
@@ -4,12 +4,12 @@
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 20/10/11, 11:14
+ @date 28/12/11, 17:30
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
- @brief code is part of execution shopping cart by ajax control
*/
+
global $cart;
if (is_object($cart) && $cart->count_contents() > 0) {
@@ -21,7 +21,7 @@
$det .= '<li><span class="text">'.__('box shopping cart weight').'</span> <span class="value">'.$cart->show_weight().' '.UNIT_WEIGHT_NAME.'</span></li>'."\n";
}
+ /// force return by
+ echo $det.' ';
- echo $det;
-
?>
\ No newline at end of file
Modified: trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/triggers/cart_totaux.inc
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/triggers/cart_totaux.inc 2011-12-29 18:55:35 UTC (rev 3996)
+++ trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/triggers/cart_totaux.inc 2011-12-29 21:55:10 UTC (rev 3997)
@@ -4,7 +4,7 @@
@subpackage 2cShopHtml5Oscim
@package osCSS-2 <www http://www.oscss.org>
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @date 16/09/10, 21:54
+ @date 128/12/11, 21:54
@encode UTF-8
*/
@@ -20,7 +20,7 @@
$det .= '<li><span class="text">'.__('box shopping cart weight').'</span> <span class="value">'.$cart->show_weight().' '.UNIT_WEIGHT_NAME.'</span></li>'."\n";
}
+ /// force return by
+ echo $det.' ';
- echo $det;
-
?>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2011-12-29 18:55:44
|
Revision: 3996
http://oscss.svn.sourceforge.net/oscss/?rev=3996&view=rev
Author: oscim
Date: 2011-12-29 18:55:35 +0000 (Thu, 29 Dec 2011)
Log Message:
-----------
FS#541
correction du commit precedent sur le theme admin
Deport de la gestion pays et etats dans un modules de pages et refonte de la gestion des pays et regions
Correction de class sqlxxx dans les liaisons lors de suppression d'item d'une table
Modified Paths:
--------------
trunk/catalog/admin/includes/classes/drivers/sqlcountries.php
trunk/catalog/admin/includes/classes/drivers/sqlzonetogeozone.php
trunk/catalog/admin/includes/template/oscss/data/icon_set.xml
trunk/catalog/admin/includes/template/oscss/jquery-ui-1.css
trunk/catalog/admin/includes/template/oscss/stylesheet-1.css
Added Paths:
-----------
trunk/catalog/admin/includes/classes/drivers/sqladmingroups.php
trunk/catalog/admin/includes/classes/drivers/sqlzones.php
trunk/catalog/admin/includes/gabarit/countries/
trunk/catalog/admin/includes/gabarit/countries/display_view.delete.gab
trunk/catalog/admin/includes/gabarit/countries/display_view.delete_zone.gab
trunk/catalog/admin/includes/gabarit/countries/display_view.edit.gab
trunk/catalog/admin/includes/gabarit/countries/display_view.edit_zone.gab
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/countries.txt
trunk/catalog/admin/includes/modules/pages/countries.php
Removed Paths:
-------------
trunk/catalog/admin/includes/content/countries.central.inc
trunk/catalog/admin/includes/content/countries.top.inc
trunk/catalog/admin/includes/languages/fr_FR/countries.php
Added: trunk/catalog/admin/includes/classes/drivers/sqladmingroups.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqladmingroups.php (rev 0)
+++ trunk/catalog/admin/includes/classes/drivers/sqladmingroups.php 2011-12-29 18:55:35 UTC (rev 3996)
@@ -0,0 +1,206 @@
+<?php if (!defined('HTTP_SERVER')) die('You can not access this file directly!');
+/**
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 22/09/11, 20:11
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+ @class sqladmingroups
+*/
+
+
+
+
+class sqladmingroups
+ implements ModSqlDataDriver{
+
+ public static $modules;
+
+ protected static $_instance;
+
+ protected function __construct(){
+ self::$modules=new AcaFactory('admin_groups'/*,'MODULE_ACACAT_INSTALLED_BO'*/);
+// self::$modules->set_image_handler();
+ }
+
+
+ public static function getInstance() {
+ if(self::$_instance == null) self::$_instance = new self();
+ return self::$_instance;
+ }
+
+
+ /**
+ @brief create new ligne in table configuration
+ */
+ public static function create($option){
+ self::getInstance();
+
+ if(!isset($option['id']))
+ return 'id';
+
+ if(isset($option['id'])) $sql_data_array['admin_groups_id'] = $option['id'];
+ if(isset($option['name'])) $sql_data_array['admin_groups_name'] = $option['name'];
+
+
+
+// $sql_data_array['admin_created'] = 'now()';
+
+ $res=tep_db_perform(TABLE_ADMIN, $sql_data_array);
+
+ if(!$res)
+ return $res;
+ else
+ return $res->__get('insertId');
+ }
+
+ /**
+ @brief update ligne in table configuration
+ */
+ public static function update($option){
+ self::getInstance();
+
+ if(!isset($option['id']) ) return 'id';
+
+ $where ='';
+ if(isset($option['id'])) $where .="AND admin_groups_id = '".(int)$option['id']."' ";
+
+ if(isset($option['id'])) $sql_data_array['admin_groups_id'] = $option['id'];
+ if(isset($option['name'])) $sql_data_array['admin_groups_name'] = $option['name'];
+
+// $sql_data_array['admin_modified'] = 'now()';
+
+ $res=tep_db_perform(TABLE_ADMIN, $sql_data_array, 'update' , substr($where,3) );
+
+ return $res;
+ }
+
+ /**
+ @brief load ligne in table configuration
+ @param option array
+ id => row id int (configuration_id)
+ key => string key (configuration_key)
+ group_id => group_id int (configuration_group_id)
+ @param $shortkey use cleankey for return short key
+ @return
+
+ object(stdClass)[13]
+ public 'id' => string '1' (length=1)
+
+ OR
+ array(
+ object(stdClass)[13]
+ ...
+ object(stdClass)[13]
+ ..
+ )
+
+ */
+ public static function fetch($option,$shortkey=false){
+ self::getInstance();
+ $DB=Database::getInstance();
+
+ $sql ="";
+ if(isset($option['id'])) $sql .="AND admin_groups_id = '".(int)tep_db_input($option['id'])."' ";
+ if(isset($option['name'])) $sql .="AND admin_groups_name = '".(int)(string)tep_db_input($option['name'])."' ";
+
+
+ $sql="SELECT * FROM " . TABLE_ADMIN . " a ".
+ " LEFT JOIN " . TABLE_ADMIN_GROUPS . " g ON (a.admin_groups_id=g.admin_groups_id) ".
+ " WHERE ".substr($sql,3);
+
+ $res=$DB->query($sql);
+
+ $num = $res->__get('numRows');
+
+ if($num == 1){
+ $result=$res->fetchAssoc();
+ return ((!$shortkey)? $result : self::CleanKey($result));
+ }
+ elseif($num > 1){
+ $array=array();
+
+ foreach($res->fetchAllAssoc() as $result)
+ $array[]= ((!$shortkey)? $result : self::CleanKey($result));
+
+ return $array;
+ }
+
+ return false;
+ }
+
+ /**
+ @brief delete row
+ */
+ public static function delete($option){
+ self::getInstance();
+ $DB=Database::getInstance();
+
+ if(isset($option['id']))
+ $_id = (int)tep_db_input($option['id']) ;
+ else
+ return false;
+
+
+ // ACA START DELETE CATEGORY
+// self::$modules->delete($categories[$i]['id']);
+
+
+// $DB->query("delete from " . TABLE_ADMIN_NOTIFICATION . " where user_id = '" . (int)$_id . "' AND notif_type = '1' ");
+ $res = sqladminuser::fetch(array('group_id'=>(int)$_id));
+
+ print_r($res);
+
+exit;
+
+// $DB->query("delete from " . TABLE_ADMIN_GROUPS . " where admin_id = '" . (int)$_id . "'");
+
+
+ return true;
+ }
+
+
+ /**
+ @brief
+ @return array product empty
+ */
+ public static function Specimen(){
+ $par = array('admin_groups_id' => '',
+ 'admin_firstname' => '',
+ 'admin_lastname' => '',
+ 'admin_email_address' => '',
+ 'admin_modified' => '',
+ 'admin_password' => '',
+ 'url_openid' => '',
+ );
+
+ return self::CleanKey($par);
+ }
+
+
+
+ /**
+ @fn CleanKey()
+ @brief Clean string name key
+ */
+ private static function CleanKey($array){
+ self::getInstance();
+ $object= new stdclass();
+
+ foreach($array as $key=>$value){
+ if( strpos($key,'admin_') ===0)
+ $key=substr($key,6);
+
+
+ $object->$key = $value;
+ }
+
+ return $object;
+ }
+
+}
+
+
+?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/classes/drivers/sqlcountries.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlcountries.php 2011-12-29 00:02:26 UTC (rev 3995)
+++ trunk/catalog/admin/includes/classes/drivers/sqlcountries.php 2011-12-29 18:55:35 UTC (rev 3996)
@@ -43,10 +43,10 @@
$sql_data_array['countries_name'] = tep_db_prepare_input($option['name']);
$sql_data_array['countries_localname'] = (isset($option['localname'])) ? tep_db_prepare_input($option['localname']) :'NULL';
- $sql_data_array['countries_iso_code_2'] = (isset($option['iso_code_2'])) ? tep_db_prepare_input($option['iso_code_2']) :'NULL';
- $sql_data_array['countries_iso_code_3'] = (isset($option['iso_code_3'])) ? tep_db_prepare_input($option['iso_code_3']) :'NULL';
- $sql_data_array['address_format_id'] = (isset($option['address_format_id'])) ? tep_db_prepare_input($option['address_format_id']) :'1';
- $sql_data_array['country_visible'] = (isset($option['country_visible'])) ? tep_db_prepare_input($option['country_visible']) :'0';
+ $sql_data_array['countries_iso_code_2'] = (isset($option['iso_code_2'])) ?strtoupper( tep_db_prepare_input($option['iso_code_2'])) :'NULL';
+ $sql_data_array['countries_iso_code_3'] = (isset($option['iso_code_3'])) ?strtoupper( tep_db_prepare_input($option['iso_code_3'])) :'NULL';
+ $sql_data_array['address_format_id'] = (int) (isset($option['address_format_id'])) ? tep_db_prepare_input($option['address_format_id']) :'1';
+ $sql_data_array['country_visible'] = (isset($option['visible'])) ? tep_db_prepare_input($option['visible']) :'0';
$res=tep_db_perform(TABLE_COUNTRIES, $sql_data_array);
@@ -71,10 +71,10 @@
if(isset($option['name']))$sql_data_array['countries_name'] = tep_db_prepare_input($option['name']);
if(isset($option['localname'])) $sql_data_array['countries_localname'] = tep_db_prepare_input($option['localname']);
- if(isset($option['iso_code_2'])) $sql_data_array['countries_iso_code_2'] = tep_db_prepare_input($option['iso_code_2']) ;
- if(isset($option['iso_code_3'])) $sql_data_array['countries_iso_code_3'] = tep_db_prepare_input($option['iso_code_3']);
- if(isset($option['address_format_id'])) $sql_data_array['address_format_id'] = tep_db_prepare_input($option['address_format_id']);
- if(isset($option['country_visible'])) $sql_data_array['country_visible'] = tep_db_prepare_input($option['country_visible']);
+ if(isset($option['iso_code_2'])) $sql_data_array['countries_iso_code_2'] = strtoupper(tep_db_prepare_input($option['iso_code_2'])) ;
+ if(isset($option['iso_code_3'])) $sql_data_array['countries_iso_code_3'] = strtoupper(tep_db_prepare_input($option['iso_code_3']));
+ if(isset($option['address_format_id'])) $sql_data_array['address_format_id'] =(int) tep_db_prepare_input($option['address_format_id']);
+ if(isset($option['visible'])) $sql_data_array['country_visible'] = (int)tep_db_prepare_input($option['visible']);
$res=tep_db_perform(TABLE_COUNTRIES, $sql_data_array, 'update' , substr($where,3) );
@@ -110,8 +110,8 @@
if(isset($option['id'])) $sql .="AND countries_id = '".(int)$option['id']."' ";
if(isset($option['name'])) $sql .="AND countries_name = '".(string)tep_db_input($option['name'])."' ";
if(isset($option['localname'])) $sql .="AND countries_localname = '".(string)tep_db_input($option['localname'])."' ";
- if(isset($option['iso_code_2'])) $sql .="AND countries_iso_code_2 = '".(string)tep_db_input($option['iso_code_2'])."' ";
- if(isset($option['list_iso_code_2'])) $sql .="AND countries_iso_code_2 IN( '".(string)tep_db_input($option['list_iso_code_2'])."' ) ";
+ if(isset($option['iso_code_2'])) $sql .="AND countries_iso_code_2 = '".(string)strtoupper(tep_db_input($option['iso_code_2']))."' ";
+ if(isset($option['list_iso_code_2'])) $sql .="AND countries_iso_code_2 IN( '".(string)strtoupper(tep_db_input($option['list_iso_code_2']))."' ) ";
if(isset($option['iso_code_3'])) $sql .="AND countries_iso_code_3 = '".(string)tep_db_input($option['iso_code_3'])."' ";
if($sql=='')
@@ -152,22 +152,23 @@
if(isset($option['id'])) $where .="AND countries_id = '".(int)$option['id']."' ";
elseif(isset($option['name'])) $where .="AND countries_name = '".(string)tep_db_input($option['name'])."' ";
elseif(isset($option['localname'])) $where .="AND countries_localname = '".(string)tep_db_input($option['localname'])."' ";
- elseif(isset($option['iso_code_2'])) $where .="AND countries_iso_code_2 = '".(string)tep_db_input($option['iso_code_2'])."' ";
- elseif(isset($option['iso_code_3'])) $where .="AND countries_iso_code_3 = '".(string)tep_db_input($option['iso_code_3'])."' ";
+ elseif(isset($option['iso_code_2'])) $where .="AND countries_iso_code_2 = '".(string)strtoupper(tep_db_input($option['iso_code_2']))."' ";
+ elseif(isset($option['iso_code_3'])) $where .="AND countries_iso_code_3 = '".(string)strtoupper(tep_db_input($option['iso_code_3']))."' ";
else
return false;
-/// TODO integrer select pour suppression autre ref que id
+ $r = $DB->query("SELECT countries_id as id FROM " . TABLE_COUNTRIES ." WHERE ". substr($where, 3 ) );
+ $ref = $r->fetchAssoc();
- /**
- @remarks delete ref countrie in zone to geo table
- */
- sqlzonetogeozone::delete(array('geo_zone_id'=>$option['id']));
+ /// delete sub zone depend this country
+ sqlzones::delete(array('country_id'=>(int)$ref['id']));
+ /// delete ref countrie in zone to geo table
+ sqlzonetogeozone::delete(array('zone_country_id'=>(int)$ref['id']));
- $DB->query("delete from " . TABLE_COUNTRIES . $where );
+ $DB->query("DELETE FROM " . TABLE_COUNTRIES ." WHERE ". substr($where, 3 ) );
return true;
@@ -178,7 +179,7 @@
@brief
@return array product empty
*/
- public static function Specimen(){
+ public static function Specimen($shortkey=false){
$par = array('countries_id' => '',
'countries_name' => '',
'countries_localname' => '',
@@ -188,7 +189,7 @@
'country_visible' => '',
);
- return self::CleanKey($par);
+ return ((!$shortkey)? $par : self::CleanKey($par));
}
Added: trunk/catalog/admin/includes/classes/drivers/sqlzones.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlzones.php (rev 0)
+++ trunk/catalog/admin/includes/classes/drivers/sqlzones.php 2011-12-29 18:55:35 UTC (rev 3996)
@@ -0,0 +1,203 @@
+<?php if (!defined('HTTP_SERVER')) die('You can not access this file directly!');
+/**
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 23/10/11, 16:51
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+ @class sqlzones
+ @file sqlzones.php
+ @brief manage insert/update/delete in zone tables
+*/
+
+
+
+
+class sqlzones
+ implements ModSqlDataDriver{
+
+ public static $modules;
+
+ protected static $_instance;
+
+ protected function __construct(){
+ }
+
+
+ public static function getInstance() {
+ if(self::$_instance == null) self::$_instance = new self();
+ return self::$_instance;
+ }
+
+
+ /**
+ @brief create new ligne in table configuration
+ */
+ public static function create($option){
+ self::getInstance();
+
+ if(!isset($option['country_id']))
+ return 'country_id';
+
+ $sql_data_array['zone_country_id'] = tep_db_prepare_input($option['country_id']);
+ $sql_data_array['zone_code'] = tep_db_prepare_input($option['code']);
+ $sql_data_array['zone_name'] = (isset($option['name'])) ? tep_db_prepare_input($option['name']) :'NULL';
+
+ $res=tep_db_perform(TABLE_ZONES, $sql_data_array);
+
+ if(!$res)
+ return $res;
+ else
+ return $res->__get('insertId');
+ }
+
+ /**
+ @brief update ligne in table configuration
+ */
+ public static function update($option){
+ self::getInstance();
+
+ if(!isset($option['id']))
+ return 'id';
+
+ $where ='';
+ if(isset($option['id'])) $where .="AND zone_id = '".(int)$option['id']."' ";
+
+
+ if(isset($option['country_id']))$sql_data_array['zone_country_id'] = tep_db_prepare_input($option['country_id']);
+ if(isset($option['code'])) $sql_data_array['zone_code'] = tep_db_prepare_input($option['code']);
+ if(isset($option['name'])) $sql_data_array['zone_name'] = tep_db_prepare_input($option['name']) ;
+
+ $res=tep_db_perform(TABLE_ZONES, $sql_data_array, 'update' , substr($where,3) );
+
+ return $res;
+ }
+
+ /**
+ @brief load ligne in table configuration
+ @param option array
+ id => row id int (configuration_id)
+ key => string key (configuration_key)
+ group_id => group_id int (configuration_group_id)
+ @param $shortkey use cleankey for return short key
+ @return
+
+ object(stdClass)[13]
+ public 'id' => string '1' (length=1)
+
+ OR
+ array(
+ object(stdClass)[13]
+ ...
+ object(stdClass)[13]
+ ..
+ )
+
+ */
+ public static function fetch($option,$shortkey=false){
+ self::getInstance();
+ $DB=Database::getInstance();
+
+ $sql ="";
+ if(isset($option['id'])) $sql .="AND zone_id = '".(int)$option['id']."' ";
+ if(isset($option['country_id'])) $sql .="AND zone_country_id = '".(string)tep_db_input($option['country_id'])."' ";
+ if(isset($option['code'])) $sql .="AND zone_code = '".(string)tep_db_input($option['code'])."' ";
+
+ if($sql=='')
+ return false;
+
+
+ $sql="SELECT * FROM " . TABLE_ZONES . " a ".
+// " LEFT JOIN " . TABLE_IMAGES_USED . " g ON (a.rowid=g.rowid) ".
+ " WHERE ".substr($sql,3);
+
+ $res=$DB->query($sql);
+
+ $num = $res->__get('numRows');
+
+ if($num == 1){
+ $result=$res->fetchAssoc();
+ return ((!$shortkey)? $result : self::CleanKey($result));
+ }
+ elseif($num > 1){
+ $array=array();
+
+ foreach($res->fetchAllAssoc() as $result)
+ $array[]= ((!$shortkey)? $result : self::CleanKey($result));
+
+ return $array;
+ }
+
+ return false;
+ }
+
+ /**
+ @brief delete row
+ */
+ public static function delete($option){
+ self::getInstance();
+ $DB=Database::getInstance();
+
+ $sql ="";
+
+ if(isset($option['id'])) $sql .="AND zone_id = '".(int)$option['id']."' ";
+ if(isset($option['country_id'])) $sql .="AND zone_country_id = '".(string)tep_db_input($option['country_id'])."' ";
+ if(isset($option['code'])) $sql .="AND zone_code = '".(string)tep_db_input($option['code'])."' ";
+
+ if(strlen($sql) < 5)
+ return false;
+
+ $r = $DB->query("SELECT zone_id as id FROM " . TABLE_ZONES ." WHERE ". substr($sql,3) );
+ $ref = $r->fetchAssoc();
+
+ /// delete ref zone in zone to geo table
+ sqlzonetogeozone::delete(array('zone_id'=>(int)$ref['id']));
+
+
+ $DB->query($s="DELETE FROM " . TABLE_ZONES ." WHERE ". substr($sql,3) );
+
+ return true;
+ }
+
+
+ /**
+ @brief
+ @return array product empty
+ */
+ public static function Specimen($shortkey=false){
+ $par = array('zone_id' => '',
+ 'zone_country_id' => '',
+ 'zone_code' => '',
+ 'zone_name' => '',
+ );
+
+ return ((!$shortkey)? $par : self::CleanKey($par));
+ }
+
+
+
+ /**
+ @fn CleanKey()
+ @brief Clean string name key
+ */
+ private static function CleanKey($array){
+ self::getInstance();
+ $object= new stdclass();
+
+ foreach($array as $key=>$value){
+ if( strpos($key,'zone_') ===0)
+ $key=substr($key,5);
+
+
+ $object->$key = $value;
+ }
+
+ return $object;
+ }
+
+}
+
+
+?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/classes/drivers/sqlzonetogeozone.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlzonetogeozone.php 2011-12-29 00:02:26 UTC (rev 3995)
+++ trunk/catalog/admin/includes/classes/drivers/sqlzonetogeozone.php 2011-12-29 18:55:35 UTC (rev 3996)
@@ -151,6 +151,8 @@
$where = " where geo_zone_id = '" .(int)tep_db_input($option['geo_zone_id']) . "'";
elseif(isset($option['zone_country_id']))
$where = " where zone_country_id = '" .(int)tep_db_input($option['zone_country_id']) . "'";
+ elseif(isset($option['zone_id']))
+ $where = " where zone_id = '" .(int)tep_db_input($option['zone_id']) . "'";
else
return false;
Deleted: trunk/catalog/admin/includes/content/countries.central.inc
===================================================================
--- trunk/catalog/admin/includes/content/countries.central.inc 2011-12-29 00:02:26 UTC (rev 3995)
+++ trunk/catalog/admin/includes/content/countries.central.inc 2011-12-29 18:55:35 UTC (rev 3996)
@@ -1,228 +0,0 @@
-<?php
-/**
- @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
- @portion code Copyright (c) 2002 osCommerce
- @package osCSS-2 <www http://www.oscss.org>
- @version 2.1.1
- @date 22/09/11, 22:00
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-8
-*/
-?>
-<!-- body //-->
-
-<?php if($action=='list') { ?>
-<h3><?php echo HEADING_TITLE; ?></h3>
-<h4><?php echo HEADING_TITLE_COUNTRY_ZONE; ?></h4>
- <div class="button_nav">
- <?php echo '<a class="button" href="' . tep_href_link(FILENAME_COUNTRIES, tep_get_all_get_params(array('page_admin')) . 'saction=new') . '">' . tep_image(DIR_WS_ICONS . 'icon_add_new.png',IMAGE_INSERT) . IMAGE_NEW_ZONE . '</a>'; ?>
- <?php echo '<a class="button" href="' . tep_href_link(FILENAME_COUNTRIES, tep_get_all_get_params(array('rID','action','saction'))) . '">' . IMAGE_BACK . '</a>'; ?>
- </div>
-
-<div class="box_left">
- <table width="100%" class="dataTable">
- <thead>
- <tr>
- <th><?php echo TABLE_HEADING_COUNTRY_NAME.tep_link_sort_by(FILENAME_COUNTRIES,'c.countries_name'); ?></th>
- <th><?php echo TABLE_HEADING_ZONE_NAME.tep_link_sort_by(FILENAME_COUNTRIES,'z.zone_name'); ?></th>
- <th class="tcenter"><?php echo TABLE_HEADING_ZONE_CODE.tep_link_sort_by(FILENAME_COUNTRIES,'z.zone_code'); ?></th>
- <th class="tright" style="width:100px"><?php echo TABLE_HEADING_ACTION; ?></th>
- </tr>
- </thead>
- <tfoot>
- <tr>
- <td><?php echo $zones_split->display_count($zones_query_numrows, MAX_DISPLAY_ROW_BY_PAGE, $page, TEXT_DISPLAY_NUMBER_OF_ZONES); ?></td>
- <td><?php echo row_by_page(FILENAME_COUNTRIES, $row_bypage_array, $row_by_page, "fleft"); ?></td>
- <td colspan="2"><?php echo $zones_split->display_links($zones_query_numrows, MAX_DISPLAY_ROW_BY_PAGE, MAX_DISPLAY_PAGE_LINKS, $page,tep_get_all_get_params(array('page', 'oID'))); ?></td>
- </tr>
- </tfoot>
- <tbody>
- <?php foreach($list_z as $zones) { ?>
- <tr class="view parent dataTableRow <?php if(( $rID ==$zones['zone_id'])) echo 'Selected' ?>" >
- <td><?php echo $zones['countries_name']; ?></td>
- <td><?php echo $zones['zone_name']; ?></td>
- <td class="tcenter"><?php echo $zones['zone_code']; ?></td>
- <td>
- <span class="view fils fleft">
- <?php echo '<a class="buttonimg" href="' . tep_href_link(FILENAME_COUNTRIES, tep_get_all_get_params(array('page','rID')) .'rID=' . $zones['zone_id']. '&saction=edit') . '">' . tep_image(DIR_WS_ICONS . 'icon_edit.png',IMAGE_EDIT ) . '</a> <a class="buttonimg" href="' . tep_href_link(FILENAME_COUNTRIES, tep_get_all_get_params(array('page','rID')). 'rID=' . $zones['zone_id'] . '&saction=delete') . '">' . tep_image(DIR_WS_ICONS . 'icon_delete.png',IMAGE_DELETE ) . '</a>';
- ?>
- </span>
- <span class="fright">
- <?php if (isset($cInfo) && is_object($cInfo) && ($zones['zone_id'] == $cInfo->zone_id) ) { echo tep_image(DIR_WS_ICONS . 'icon_arrow_right.gif', ''); } else { echo '<a href="' . tep_href_link(FILENAME_COUNTRIES,tep_get_all_get_params(array('page','rID')). 'rID=' . $zones['zone_id']) . '">' . tep_image(DIR_WS_ICONS . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?>
- </span>
- </td>
- </tr>
- <?php } ?>
- </tbody>
- </table>
-</div>
-
-<?php } else { ?>
-<h3><?php echo HEADING_TITLE; ?></h3>
-<h4><?php echo HEADING_TITLE_COUNTRY; ?></h4>
- <div class="button_nav">
- <?php echo '<a class="button" href="' . tep_href_link(FILENAME_COUNTRIES,tep_get_all_get_params(array('page_admin')). 'action=new') . '">' . tep_image(DIR_WS_ICONS.'icon_add_new.png' , IMAGE_NEW_COUNTRY) . IMAGE_NEW_COUNTRY . '</a>'; ?>
- </div>
-<div class="box_uniq">
- <div class="box_left">
- <table width="100%" class="dataTable">
- <thead>
- <tr>
- <th><?php echo TABLE_HEADING_COUNTRY_NAME.tep_link_sort_by(FILENAME_COUNTRIES,'countries_name'); ?></th>
- <th><?php echo TABLE_HEADING_COUNTRY_LOCALNAME.tep_link_sort_by(FILENAME_COUNTRIES,'countries_localname' ); ?></th>
- <th style="width:40px"><?php echo TABLE_HEADING_COUNTRY_CODE_2.tep_link_sort_by(FILENAME_COUNTRIES,'countries_iso_code_2'); ?></th>
- <th style="width:40px"><?php echo TABLE_HEADING_COUNTRY_CODE_3.tep_link_sort_by(FILENAME_COUNTRIES,'countries_iso_code_3'); ?></th>
- <th><?php echo TABLE_HEADING_COUNTRY_VISIBLE.tep_link_sort_by(FILENAME_COUNTRIES,'country_visible'); ?></th>
- <th class="tright" style="width:100px"><?php echo TABLE_HEADING_ACTION; ?></th>
- </tr>
- </thead>
- <tfoot>
- <tr>
- <td colspan="1"><?php echo $countries_split->display_count($countries_query_numrows, MAX_DISPLAY_ROW_BY_PAGE, $page, TEXT_DISPLAY_NUMBER_OF_COUNTRIES); ?></td>
- <td colspan="3"><?php echo row_by_page(FILENAME_COUNTRIES, $row_bypage_array, $row_by_page, "fleft"); ?></td>
- <td colspan="2"><?php echo $countries_split->display_links($countries_query_numrows, MAX_DISPLAY_ROW_BY_PAGE, MAX_DISPLAY_PAGE_LINKS,$page, tep_get_all_get_params(array('page_admin','page','cID'))); ?></td>
- </tr>
- </tfoot>
- <tbody>
- <?php foreach($list_c as $countries) { ?>
- <tr class="view parent dataTableRow <?php if(isset($cID) && $cID==$countries['countries_id']) echo 'Selected' ?>">
- <td class="tleft"><?php echo $countries['countries_name']; ?></td>
- <td class="tleft"><?php echo $countries['countries_localname']; ?></td>
- <td class="tcenter"><?php echo $countries['countries_iso_code_2']; ?></td>
- <td class="tcenter"><?php echo $countries['countries_iso_code_3']; ?></td>
- <td class="tcenter">
- <?php if ($countries['country_visible'] == '1') echo tep_image(DIR_WS_ICONS . 'icon_status_green.gif', IMAGE_ICON_STATUS_GREEN) . ' <a href="' . tep_href_link(FILENAME_COUNTRIES, 'action=update&country_visible=0&cID=' . $countries['countries_id'] . '&page=' . $page) . '">' . tep_image(DIR_WS_ICONS . 'icon_status_red_light.gif', IMAGE_ICON_STATUS_RED_LIGHT) . '</a>';
- else echo '<a href="' . tep_href_link(FILENAME_COUNTRIES, 'action=update&country_visible=1&cID=' . $countries['countries_id'] . '&page=' . $page) . '">' . tep_image(DIR_WS_ICONS . 'icon_status_green_light.gif', IMAGE_ICON_STATUS_GREEN_LIGHT) . '</a> ' . tep_image(DIR_WS_ICONS . 'icon_status_red.gif', IMAGE_ICON_STATUS_RED); ?>
- </td>
- <td class="row_action">
- <span class="view fils fleft">
- <?php
- echo '<a href="' . tep_href_link(FILENAME_COUNTRIES, tep_get_all_get_params(array('action','cID')).'cID=' .$countries['countries_id'] . '&action=list') . '">' . tep_image(DIR_WS_ICONS . 'icon_plus.gif', ICON_FOLDER) . '</a>';
- echo '<a class="buttonimg" href="' . tep_href_link(FILENAME_COUNTRIES, 'page=' . $page . '&cID=' . $countries['countries_id'] . '&row_by_page='.$row_by_page.'&action=edit') . '">' . tep_image(DIR_WS_ICONS . 'icon_edit.png',IMAGE_EDIT ) . '</a> <a class="buttonimg" href="' . tep_href_link(FILENAME_COUNTRIES, 'page=' . $page . '&cID=' . $countries['countries_id'] .'&row_by_page='.$row_by_page. '&action=delete') . '">' . tep_image(DIR_WS_ICONS . 'icon_delete.png',IMAGE_DELETE ) . '</a> ';
- ?>
- </span>
- <span class="fright">
- <?php if (isset($cInfo) && is_object($cInfo) && ($countries['countries_id'] == $cInfo->countries_id) ) { echo tep_image(DIR_WS_ICONS . 'icon_arrow_right.gif', ''); }
- else { echo '<a href="' . tep_href_link(FILENAME_COUNTRIES, 'page=' . $page . '&cID=' . $countries['countries_id'].'&row_by_page='.$row_by_page) . '">' . tep_image(DIR_WS_ICONS . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?>
- </span>
- </td>
- </tr>
- <?php } ?>
- </tbody>
- </table>
- </div>
-<?php } ?>
-<?php
- $heading = array();
- $contents = array();
-
-if($action=='list'){
- switch ($saction) {
- case 'new':
- $heading[] = array('text' => TEXT_INFO_HEADING_NEW_ZONE );
- $contents = array('form' => tep_draw_form('zones', FILENAME_COUNTRIES, tep_get_all_get_params(array('saction')).'saction=insert'));
- $contents[] = array('text' => TEXT_INFO_INSERT_INTRO);
- $contents[] = array('class' => 'block_input', 'text' => TEXT_INFO_ZONES_NAME . tep_draw_input_field('zone_name'));
- $contents[] = array('class' => 'block_input', 'text' => TEXT_INFO_ZONES_CODE . tep_draw_input_field('zone_code'));
- $contents[] = array('class' => 'block_input', 'text' => TEXT_INFO_COUNTRY_NAME . tep_draw_pull_down_menu('zone_country_id', tep_get_countries(), $cID));
- $contents[] = array('class' => 'button_nav', 'text' => tep_image_submit('button_insert.gif', IMAGE_INSERT) . ' <a class="button" href="' . tep_href_link(FILENAME_COUNTRIES, tep_get_all_get_params(array('page_admin','saction')) ) . '">' . IMAGE_CANCEL . '</a>');
- break;
- case 'edit':
- $heading[] = array('text' => TEXT_INFO_HEADING_EDIT_ZONE );
- $contents = array('form' => tep_draw_form('zones', FILENAME_COUNTRIES, tep_get_all_get_params(array('saction','rID')).'rID=' . $cInfo->zone_id.'&saction=save'));
- $contents[] = array('text' => TEXT_INFO_EDIT_INTRO);
- $contents[] = array('class' => 'block_input', 'text' => TEXT_INFO_ZONES_NAME . tep_draw_input_field('zone_name','', $cInfo->zone_name));
- $contents[] = array('class' => 'block_input', 'text' => TEXT_INFO_ZONES_CODE . tep_draw_input_field('zone_code','', $cInfo->zone_code));
- $contents[] = array('class' => 'block_input', 'text' => TEXT_INFO_COUNTRY_NAME . tep_draw_pull_down_menu('zone_country_id', tep_get_countries(), $cInfo->countries_id));
- $contents[] = array('class' => 'button_nav', 'text' => tep_image_submit('button_update.gif', IMAGE_UPDATE) . ' <a class="button" href="' . tep_href_link(FILENAME_COUNTRIES, tep_get_all_get_params(array('saction')).'rID=' . $cInfo->zone_id) . '">' . IMAGE_CANCEL . '</a>');
- break;
- case 'delete':
- $heading[] = array('text' => TEXT_INFO_HEADING_DELETE_ZONE );
- $contents = array('form' => tep_draw_form('zones', FILENAME_COUNTRIES, tep_get_all_get_params(array('saction','rID')).'rID=' . $cInfo->zone_id.'&action=deleteconfirm'));
- $contents[] = array('text' => TEXT_INFO_DELETE_INTRO);
- $contents[] = array('text' => '<strong>' . $cInfo->zone_name . '</strong>');
- $contents[] = array('class' => 'button_nav', 'text' => tep_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a class="button" href="' . tep_href_link(FILENAME_COUNTRIES, tep_get_all_get_params(array('saction','rID')).'rID=' . $cInfo->zone_id) . '">' . IMAGE_CANCEL . '</a>');
- break;
- default:
- if (isset($cInfo) && is_object($cInfo)) {
- $heading[] = array('text' => $cInfo->zone_name);
- $contents[] = array('text' => TEXT_INFO_ZONES_NAME . $cInfo->zone_name . ' (' . $cInfo->zone_code . ')');
- $contents[] = array('text' => TEXT_INFO_COUNTRY_NAME . $cInfo->countries_name);
- }
-// break;
- }
-}else {
-
- if (isset($cInfo) && is_object($cInfo) && ($countries['countries_id'] == $cInfo->countries_id) ){
- $country_visible = ($cInfo->country_visible == '1') ? VISIBLE_YES : VISIBLE_NO;
- $country_visible_Y = ($cInfo->country_visible == '1') ? true : false;
- $country_visible_N = ($cInfo->country_visible == '0') ? true : false;
- } else {
- $country_visible = VISIBLE_YES ;
- $country_visible_Y = true ;
- $country_visible_N = false;
- }
-
-
- switch ($action) {
- case 'new':
- $heading[] = array('text' => TEXT_INFO_HEADING_NEW_COUNTRY );
- $contents = array('form' => tep_draw_form('countries', FILENAME_COUNTRIES, 'page=' . $page .'&row_by_page='.$row_by_page. '&action=insert'));
- $contents[] = array('text' => TEXT_INFO_INSERT_INTRO);
- $contents[] = array('class' => 'block_input','text' => TEXT_INFO_COUNTRY_NAME . tep_draw_input_field('countries_name'));
- $contents[] = array('class' => 'block_input','text' => TEXT_INFO_COUNTRY_LOCALNAME . tep_draw_input_field('countries_localname'));
- $contents[] = array('class' => 'block_input','text' => TEXT_INFO_COUNTRY_CODE_2 . tep_draw_input_field('countries_iso_code_2'));
- $contents[] = array('class' => 'block_input','text' => TEXT_INFO_COUNTRY_CODE_3 . tep_draw_input_field('countries_iso_code_3'));
- $contents[] = array('class' => 'block_input','text' => TEXT_INFO_ADDRESS_FORMAT . tep_draw_pull_down_menu('address_format_id', tep_get_address_formats()));
- $contents[] = array('class' => 'block_input','text' => TEXT_INFO_COUNTRY_VISIBLE . tep_draw_radio_field('country_visible', 'country_visible_1', '1', $country_visible_Y) . ' ' . VISIBLE_YES . ' ' . tep_draw_radio_field('country_visible', 'country_visible_0', '0', $country_visible_N) . ' ' . VISIBLE_NO);
- $contents[] = array('class' => 'button_nav', 'text' => tep_image_submit('button_insert.gif', IMAGE_INSERT) . ' <a class="button" href="' . tep_href_link(FILENAME_COUNTRIES, tep_get_all_get_params(array('page_admin', 'action'))) . '">' . IMAGE_CANCEL . '</a>');
- break;
- case 'edit':
- $heading[] = array('text' => TEXT_INFO_HEADING_EDIT_COUNTRY );
- $contents = array('form' => tep_draw_form('countries', FILENAME_COUNTRIES, 'page=' . $page . '&cID=' . $cInfo->countries_id .'&row_by_page='.$row_by_page. '&action=save'));
- $contents[] = array('text' => TEXT_INFO_EDIT_INTRO);
- $contents[] = array('class' => 'block_input','text' => TEXT_INFO_COUNTRY_NAME . tep_draw_input_field('countries_name', '', $cInfo->countries_name));
- $contents[] = array('class' => 'block_input','text' => TEXT_INFO_COUNTRY_LOCALNAME . tep_draw_input_field('countries_localname', '', $cInfo->countries_localname));
- $contents[] = array('class' => 'block_input','text' => TEXT_INFO_COUNTRY_CODE_2 . tep_draw_input_field('countries_iso_code_2', '', $cInfo->countries_iso_code_2));
- $contents[] = array('class' => 'block_input','text' => TEXT_INFO_COUNTRY_CODE_3 . tep_draw_input_field('countries_iso_code_3', '', $cInfo->countries_iso_code_3));
- $contents[] = array('class' => 'block_input','text' => TEXT_INFO_ADDRESS_FORMAT . tep_draw_pull_down_menu('address_format_id', tep_get_address_formats(), $cInfo->address_format_id));
- $contents[] = array('class' => 'block_input','text' => TEXT_INFO_COUNTRY_VISIBLE . tep_draw_radio_field('country_visible', 'country_visible_1', '1', $country_visible_Y) . ' ' . VISIBLE_YES . ' ' . tep_draw_radio_field('country_visible', 'country_visible_0', '0', $country_visible_N) . ' ' . VISIBLE_NO);
- $contents[] = array('class' => 'button_nav','text' => tep_image_submit('button_update.gif', IMAGE_UPDATE) . ' <a class="button" href="' . tep_href_link(FILENAME_COUNTRIES, 'page=' . $page . '&cID=' . $cInfo->countries_id .'&row_by_page='.$row_by_page) . '">' . IMAGE_CANCEL . '</a>');
- break;
- case 'delete':
- $heading[] = array('text' => TEXT_INFO_HEADING_DELETE_COUNTRY );
- $contents = array('form' => tep_draw_form('countries', FILENAME_COUNTRIES, 'page=' . $page . '&cID=' . $cInfo->countries_id .'&row_by_page='.$row_by_page. '&action=deleteconfirm'));
- $contents[] = array('text' => TEXT_INFO_DELETE_INTRO);
- $contents[] = array('text' => '<strong>' . $cInfo->countries_name . '</strong>');
- $contents[] = array('class' => 'button_nav','text' => tep_image_submit('button_delete.gif', IMAGE_UPDATE) . ' <a class="button" href="' . tep_href_link(FILENAME_COUNTRIES, 'page=' . $page . '&cID=' . $cInfo->countries_id) . '">' . IMAGE_CANCEL . '</a>');
- break;
-
- default:
- if (isset($cInfo) && is_object($cInfo)) {
- $heading[] = array('text' => $cInfo->countries_name );
- $contents[] = array('text' => TEXT_INFO_COUNTRY_NAME . $cInfo->countries_name);
- $contents[] = array('text' => TEXT_INFO_COUNTRY_LOCALNAME . $cInfo->countries_localname);
- $contents[] = array('text' => TEXT_INFO_COUNTRY_CODE_2 . $cInfo->countries_iso_code_2);
- $contents[] = array('text' => TEXT_INFO_COUNTRY_CODE_3 . $cInfo->countries_iso_code_3);
- $contents[] = array('text' => TEXT_INFO_ADDRESS_FORMAT . $cInfo->address_format_id .
-'<br />'.
-'<div class="ViewAddress ViewAddress-format">'.
-str_replace('\n','<br />',$address_format_array[$cInfo->address_format_id]).
-'</div>'
-);
-
- $contents[] = array('text' => TEXT_INFO_COUNTRY_VISIBLE . $country_visible);
- }
- break;
- }
- }
-?>
-<div class="box_right">
-<?php
- if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) {
- $box = new box;
- echo $box->infoBox($heading, $contents);
- }
-?>
-</div>
-</div>
\ No newline at end of file
Deleted: trunk/catalog/admin/includes/content/countries.top.inc
===================================================================
--- trunk/catalog/admin/includes/content/countries.top.inc 2011-12-29 00:02:26 UTC (rev 3995)
+++ trunk/catalog/admin/includes/content/countries.top.inc 2011-12-29 18:55:35 UTC (rev 3996)
@@ -1,126 +0,0 @@
-<?php
-/**
- @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
- @portion code Copyright (c) 2002 osCommerce
- @package osCSS-2 <www http://www.oscss.org>
- @version 2.1.1
- @date 22/09/11, 22:00
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-8
-*/
-
- $rID=(isset($_GET['rID'])) ? $_GET['rID'] : '';
- $cID=(isset($_GET['cID'])) ? $_GET['cID'] : '';
-
- $saction=(isset($_GET['saction'])) ? $_GET['saction'] : '';
-
-
- switch ($action) {
- case 'insert':
- $countries_name = tep_db_prepare_input($_POST['countries_name']);
- $countries_localname = tep_db_prepare_input($_POST['countries_localname']);
- $countries_iso_code_2 = tep_db_prepare_input($_POST['countries_iso_code_2']);
- $countries_iso_code_3 = tep_db_prepare_input($_POST['countries_iso_code_3']);
- $address_format_id = tep_db_prepare_input($_POST['address_format_id']);
- $country_visible = tep_db_prepare_input($_POST['country_visible']);
-
- tep_db_query("insert into " . TABLE_COUNTRIES . " (countries_name, countries_localname, countries_iso_code_2, countries_iso_code_3, address_format_id, country_visible) values ('" . tep_db_input($countries_name) . "', '" . tep_db_input($countries_localname) . "', '" . tep_db_input($countries_iso_code_2) . "', '" . tep_db_input($countries_iso_code_3) . "', '" . (int)$address_format_id . "', '" . (int)$country_visible . "')");
-
- tep_redirect(tep_href_link(FILENAME_COUNTRIES));
- break;
-
- case 'update':
- $countries_id = tep_db_prepare_input($_GET['cID']);
- $country_visible = tep_db_prepare_input($_GET['country_visible']);
-
- tep_db_query("update " . TABLE_COUNTRIES . " set country_visible = '" . (int)$country_visible . "' where countries_id = '" . (int)$countries_id . "'");
-
- tep_redirect(tep_href_link(FILENAME_COUNTRIES, 'page=' . $_GET['page'] . '&cID=' . $countries_id.'&row_by_page='.$row_by_page));
- break;
-
-
- case 'save':
- $countries_id = tep_db_prepare_input($_GET['cID']);
- $countries_name = tep_db_prepare_input($_POST['countries_name']);
- $countries_localname = tep_db_prepare_input($_POST['countries_localname']);
- $countries_iso_code_2 = tep_db_prepare_input($_POST['countries_iso_code_2']);
- $countries_iso_code_3 = tep_db_prepare_input($_POST['countries_iso_code_3']);
- $address_format_id = tep_db_prepare_input($_POST['address_format_id']);
- $country_visible = tep_db_prepare_input($_POST['country_visible']);
-
- tep_db_query("update " . TABLE_COUNTRIES . " set countries_name = '" . tep_db_input($countries_name) . "', countries_localname = '" . tep_db_input($countries_localname) . "', countries_iso_code_2 = '" . tep_db_input($countries_iso_code_2) . "', countries_iso_code_3 = '" . tep_db_input($countries_iso_code_3) . "', address_format_id = '" . (int)$address_format_id . "', country_visible = '" . (int)$country_visible . "' where countries_id = '" . (int)$countries_id . "'");
-
- tep_redirect(tep_href_link(FILENAME_COUNTRIES, 'page=' . $_GET['page'] . '&cID=' . $countries_id.'&row_by_page='.$row_by_page));
- break;
- case 'deleteconfirm':
- $countries_id = tep_db_prepare_input($_GET['cID']);
-
- tep_db_query("delete from " . TABLE_COUNTRIES . " where countries_id = '" . (int)$countries_id . "'");
-
- tep_redirect(tep_href_link(FILENAME_COUNTRIES, 'page=' . $_GET['page'].'&row_by_page='.$row_by_page));
- break;
- case 'list':
- break;
- default:
-
- $address_format_query = tep_db_query("select address_format_id, address_example from " . TABLE_ADDRESS_FORMAT . " order by address_format_id");
- $address_format_array = array();
- while ($address_format_values = tep_db_fetch_array($address_format_query)) {
- $address_format_array[$address_format_values['address_format_id']] = $address_format_values['address_example'] ;
- }
-// return $address_format_array;
-
-
-
- $countries_query_raw = "select countries_id, countries_name, countries_localname, countries_iso_code_2, countries_iso_code_3, address_format_id, country_visible from " . TABLE_COUNTRIES . " order by ".((isset($_GET['sort_by'])) ? $_GET['sort_by'] : 'countries_name ASC, country_visible DESC');
- $countries_split = new splitPageResults($page, MAX_DISPLAY_ROW_BY_PAGE, $countries_query_raw, $countries_query_numrows);
- $countries_query = tep_db_query($countries_query_raw);
- $list_c=array();
- while ($countries = tep_db_fetch_array($countries_query)) {
- if ($cID == $countries['countries_id']) $cInfo = new objectInfo($countries);
- $list_c[]=$countries;
- }
-
-}
-
- switch ($saction) {
- case 'insert':
- $zone_country_id = tep_db_prepare_input($_POST['zone_country_id']);
- $zone_code = tep_db_prepare_input($_POST['zone_code']);
- $zone_name = tep_db_prepare_input($_POST['zone_name']);
-
- tep_db_query("insert into " . TABLE_ZONES . " (zone_country_id, zone_code, zone_name) values ('" . (int)$zone_country_id . "', '" . tep_db_input($zone_code) . "', '" . tep_db_input($zone_name) . "')");
-
- tep_redirect(tep_href_link(FILENAME_ZONES, 'page=' . $_GET['page'].'&row_by_page='.$row_by_page));
- break;
- case 'save':
- $zone_id = tep_db_prepare_input($_GET['cID']);
- $zone_country_id = tep_db_prepare_input($_POST['zone_country_id']);
- $zone_code = tep_db_prepare_input($_POST['zone_code']);
- $zone_name = tep_db_prepare_input($_POST['zone_name']);
-
- tep_db_query("update " . TABLE_ZONES . " set zone_country_id = '" . (int)$zone_country_id . "', zone_code = '" . tep_db_input($zone_code) . "', zone_name = '" . tep_db_input($zone_name) . "' where zone_id = '" . (int)$zone_id . "'");
-
- tep_redirect(tep_href_link(FILENAME_ZONES, 'page=' . $_GET['page'] . '&cID=' . $zone_id.'&row_by_page='.$row_by_page));
- break;
- case 'deleteconfirm':
- $zone_id = tep_db_prepare_input($_GET['cID']);
-
- tep_db_query("delete from " . TABLE_ZONES . " where zone_id = '" . (int)$zone_id . "'");
-
- tep_redirect(tep_href_link(FILENAME_ZONES, 'page=' . $_GET['page'].'&row_by_page='.$row_by_page));
- break;
- default:
- $wh=(tep_not_null($cID)? " and z.zone_country_id = '".$cID."' ":'');
- $zones_query_raw = "select z.zone_id, c.countries_id, c.countries_name, z.zone_name, z.zone_code, z.zone_country_id from " . TABLE_ZONES . " z, " . TABLE_COUNTRIES . " c where z.zone_country_id = c.countries_id ".$wh." order by ".((isset($_GET['sort_by'])) ? $_GET['sort_by'] : 'c.countries_name, z.zone_name ASC');
- $zones_split = new splitPageResults($page, MAX_DISPLAY_ROW_BY_PAGE, $zones_query_raw, $zones_query_numrows);
- $zones_query = tep_db_query($zones_query_raw);
- $list_z=array();
- while ($zones = tep_db_fetch_array($zones_query)) {
- if ($rID == $zones['zone_id']) $cInfo = new objectInfo($zones);
- $list_z[]=$zones;
- }
-// break;
- }
-
-?>
\ No newline at end of file
Added: trunk/catalog/admin/includes/gabarit/countries/display_view.delete.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/countries/display_view.delete.gab (rev 0)
+++ trunk/catalog/admin/includes/gabarit/countries/display_view.delete.gab 2011-12-29 18:55:35 UTC (rev 3996)
@@ -0,0 +1,34 @@
+<?php
+/**
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 28/12/11, 10:30
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+?>
+<h3><?php echo __('heading title delete countries'); ?></h3>
+
+
+<div class="box_uniq block_form">
+
+
+ <?php echo tep_draw_form('zone', countries::FILENAME, 'action=delete_confirm', 'post') ?>
+
+
+ <p class="block_input button_nav">
+ <?php
+ echo tep_draw_hidden_field('cID', '', countries::$Id);
+
+ echo tep_image_submit('button_delete.gif', IMAGE_DELETE);
+ echo tep_js_back(tep_href_link(countries::FILENAME), IMAGE_CANCEL) ;
+ ?>
+ </p>
+ </form>
+ </div>
+
+ <br class="clear" />
+
+</div>
Added: trunk/catalog/admin/includes/gabarit/countries/display_view.delete_zone.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/countries/display_view.delete_zone.gab (rev 0)
+++ trunk/catalog/admin/includes/gabarit/countries/display_view.delete_zone.gab 2011-12-29 18:55:35 UTC (rev 3996)
@@ -0,0 +1,35 @@
+<?php
+/**
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 28/12/11, 10:30
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+?>
+<h3><?php echo __('heading title delete zone'); ?></h3>
+
+
+<div class="box_uniq block_form">
+
+
+ <?php echo tep_draw_form('zone', countries::FILENAME, 'action=delete_zone_confirm', 'post') ?>
+
+
+ <p class="block_input button_nav">
+ <?php
+ echo tep_draw_hidden_field('cID', '', countries::$Id);
+ echo tep_draw_hidden_field('id', '', countries::$Info->id);
+
+ echo tep_image_submit('button_delete.gif', IMAGE_DELETE);
+ echo tep_js_back(tep_href_link(countries::FILENAME), IMAGE_CANCEL) ;
+ ?>
+ </p>
+ </form>
+ </div>
+
+ <br class="clear" />
+
+</div>
Added: trunk/catalog/admin/includes/gabarit/countries/display_view.edit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/countries/display_view.edit.gab (rev 0)
+++ trunk/catalog/admin/includes/gabarit/countries/display_view.edit.gab 2011-12-29 18:55:35 UTC (rev 3996)
@@ -0,0 +1,108 @@
+<?php
+/**
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 28/12/11, 10:30
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+?>
+<h3><?php echo __('heading title edit'); ?></h3>
+
+<div class="box_uniq block_form">
+
+
+ <div id="tabs">
+ <ul>
+ <li><a href="#tabs-1"><?php echo __('countries tab specification'); ?></a></li>
+ <?php if(_cst_bool('STOCK_CHECK')) : ?>
+ <li><a href="#tabs-2"><?php echo __('countries tab state'); ?></a></li>
+ <?php endif; ?>
+ </ul>
+
+
+ <div id="tabs-1" class="tabPage">
+
+ <?php echo tep_draw_form('categories', countries::FILENAME, 'action='.((countries::$action == 'new')?'insert' : 'update&cID='.$_GET['cID']), 'post') ?>
+
+
+ <p class="block_input">
+ <Label><?php echo __('text info country name') ?></label>
+ <?php echo tep_draw_input_field('countries_name', '', countries::$Info->name) ?>
+ </p>
+
+ <p class="block_input">
+ <Label><?php echo __('text info country localname') ?></label>
+ <?php echo tep_draw_input_field('countries_localname', '', countries::$Info->localname) ?>
+ </p>
+
+ <p class="block_input">
+ <Label><?php echo __('text info country code 2') ?></label>
+ <?php echo tep_draw_input_field('countries_iso_code_2', '', countries::$Info->iso_code_2) ?>
+ </p>
+
+ <p class="block_input">
+ <Label><?php echo __('text info country code 3') ?></label>
+ <?php echo tep_draw_input_field('countries_iso_code_3', '', countries::$Info->iso_code_3) ?>
+ </p>
+
+ <p class="block_input">
+ <Label><?php echo __('text info address format') ?></label>
+ <?php echo tep_draw_pull_down_menu('address_format_id', tep_get_address_formats(), countries::$Info->address_format_id) ?>
+ </p>
+
+<!-- <p class="block_input">
+ <Label><?php //echo __('text info country visible') ?></label>
+ <?php //echo tep_draw_radio_field('country_visible', 'country_visible_1', '1', $country_visible_Y) . ' ' . VISIBLE_YES . ' ' . tep_draw_radio_field('country_visible', 'country_visible_0', '0', $country_visible_N) . ' ' . VISIBLE_NO ?>
+ </p>-->
+
+
+ <p class="block_input button_nav">
+ <?php
+ echo tep_image_submit('', IMAGE_UPDATE) /*. tep_image_submit('', IMAGE_UPDATE_AND_CLOSE,' name="up_and_close"' )*/;
+ echo tep_js_back(tep_href_link(countries::FILENAME), IMAGE_CANCEL) ;
+ ?>
+ </p>
+ </form>
+ </div>
+
+
+ <?php if(_cst_bool('STOCK_CHECK')) : ?>
+ <div id="tabs-2" class="tabPage">
+ <div class="button_nav">
+ <?php echo '<a class="button fancy" href="' . tep_href_link(countries::FILENAME,'action=new_zone&cID='.countries::$Id) . '">' .tep_image(DIR_WS_ICONS.'icon_add_new.png',IMAGE_INSERT ) . __('image insert zone') . '</a>'; ?>
+ </div>
+
+ <table class="dataTable">
+ <thead>
+ <tr>
+ <th><?php echo __('table heading zone name') ?></th>
+ <th class="tcenter"><?php echo __('table heading zone code') ?></th>
+ <th class="tright" style="width:100px"><?php echo __('table heading action'); ?></th>
+ </tr>
+ </thead>
+ <tbody>
+ <?php foreach(countries::$Info->childs as $zones) : ?>
+ <tr class="view parent " >
+ <td><?php echo $zones->name; ?></td>
+ <td class="tcenter"><?php echo $zones->code; ?></td>
+ <td>
+ <span class="view fils fright">
+ <?php
+ echo '<a class="buttonimg fancy" href="' . tep_href_link(countries::FILENAME, 'cID='.countries::$Id.'&id=' . $zones->id . '&action=edit_zone') . '">' . tep_image(DIR_WS_ICONS . 'icon_edit.png',IMAGE_EDIT ) . '</a> ';
+ echo '<a class="buttonimg fancy" href="' . tep_href_link(countries::FILENAME, 'cID='.countries::$Id.'&id=' . $zones->id . '&action=delete_zone') . '">' . tep_image(DIR_WS_ICONS . 'icon_delete.png',IMAGE_DELETE ) . '</a>';
+ ?>
+ </span>
+ </td>
+ </tr>
+ <?php endforeach; ?>
+ </tbody>
+ </table>
+ </div>
+ <?php endif; ?>
+ <br class="clear" />
+ </div>
+
+</div>
Added: trunk/catalog/admin/includes/gabarit/countries/display_view.edit_zone.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/countries/display_view.edit_zone.gab (rev 0)
+++ trunk/catalog/admin/includes/gabarit/countries/display_view.edit_zone.gab 2011-12-29 18:55:35 UTC (rev 3996)
@@ -0,0 +1,45 @@
+<?php
+/**
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 28/12/11, 10:30
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+?>
+<h3><?php echo __('heading title edit zone'); ?></h3>
+
+
+<div class="box_uniq block_form">
+
+
+ <?php echo tep_draw_form('zone', countries::FILENAME, 'action='.((countries::$action == 'new_zone')?'insert_zone' : 'update_zone'), 'post') ?>
+
+
+ <p class="block_input">
+ <Label><?php echo __('text info zone name') ?></label>
+ <?php echo tep_draw_input_field('zone_name', '', countries::$Info->name) ?>
+ </p>
+
+ <p class="block_input">
+ <Label><?php echo __('text info zone code') ?></label>
+ <?php echo tep_draw_input_field('zone_code', '', countries::$Info->code) ?>
+ </p>
+
+ <p class="block_input button_nav">
+ <?php
+ echo tep_draw_hidden_field('cID', '', countries::$Id);
+ echo tep_draw_hidden_field('id', '', countries::$Info->id);
+
+ echo tep_image_submit('', IMAGE_UPDATE) /*. tep_image_submit('', IMAGE_UPDATE_AND_CLOSE,' name="up_and_close"' )*/;
+ echo tep_js_back(tep_href_link(countries::FILENAME), IMAGE_CANCEL) ;
+ ?>
+ </p>
+ </form>
+ </div>
+
+ <br class="clear" />
+
+</div>
Deleted: trunk/catalog/admin/includes/languages/fr_FR/countries.php
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/countries.php 2011-12-29 00:02:26 UTC (rev 3995)
+++ trunk/catalog/admin/includes/languages/fr_FR/countries.php 2011-12-29 18:55:35 UTC (rev 3996)
@@ -1,47 +0,0 @@
-<?php
-/**
- @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
- @portion code Copyright (c) 2002 osCommerce
- @package osCSS-2 <www http://www.oscss.org>
- @version 2.0.9
- @date 06/09/10, 11:09
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-8
-*/
-define('HEADING_TITLE',"Pays et Régions" );
-define('HEADING_TITLE_COUNTRY',"Pays" );
-define('TABLE_HEADING_COUNTRY_NAME',"Pays" );
-define('TABLE_HEADING_COUNTRY_CODES',"Codes ISO" );
-define('TABLE_HEADING_COUNTRY_LOCALNAME',"Nom local" );
-define('TABLE_HEADING_COUNTRY_CODE_2',"Code ISO (2)" );
-define('TABLE_HEADING_COUNTRY_CODE_3',"Code ISO (3)" );
-define('TABLE_HEADING_COUNTRY_VISIBLE',"visible" );
-define('TABLE_HEADING_ACTION',"Action" );
-define('TEXT_INFO_EDIT_INTRO',"Merci de faire les changements nécessaires" );
-define('TEXT_INFO_COUNTRY_NAME',"Nom : " );
-define('TEXT_INFO_COUNTRY_LOCALNAME',"Nom local : " );
-define('TEXT_INFO_COUNTRY_CODE_2',"Code ISO (2) : " );
-define('TEXT_INFO_COUNTRY_CODE_3',"Code ISO (3) : " );
-define('TEXT_INFO_ADDRESS_FORMAT',"Format de l'adresse : " );
-define('TEXT_INFO_COUNTRY_VISIBLE',"visible : " );
-define('TEXT_INFO_INSERT_INTRO',"Merci d'entrer le nouveau pays avec ses données liées" );
-define('TEXT_INFO_DELETE_INTRO',"Êtes-vous sûr de vouloir supprimer ce pays ?" );
-define('TEXT_INFO_HEADING_NEW_COUNTRY',"Nouveau pays" );
-define('TEXT_INFO_HEADING_EDIT_COUNTRY',"Éditer le pays" );
-define('TEXT_INFO_HEADING_DELETE_COUNTRY',"Supprimer le pays" );
-define('VISIBLE_YES',"Oui" );
-define('VISIBLE_NO',"Non" );
-define('TEXT_DISPLAY_NUMBER_OF_COUNTRIES',"Affiche <strong>%d</strong> à <strong>%d</strong> (sur <strong>%d</strong> pays)" );
-
-define('HEADING_TITLE_COUNTRY_ZONE',"Régions" );
-define('TABLE_HEADING_ZONE_NAME',"Régions" );
-define('TABLE_HEADING_ZONE_CODE',"Code" );
-define('TEXT_DISPLAY_NUMBER_OF_ZONES',"Affiche <strong>%d</strong> à <strong>%d</strong> (sur <strong>%d</strong> régions)" );
-define('TEXT_INFO_ZONES_NAME',"Nom de la région :" );
-define('TEXT_INFO_ZONES_CODE',"Code de la région :" );
-define('TEXT_INFO_INSERT_INTRO_Z',"Merci d'entrer la nouvelle région avec ses données liées" );
-define('TEXT_INFO_DELETE_INTRO_Z',"Êtes-vous sûr de vouloir supprimer cette région ?" );
-define('TEXT_INFO_HEADING_NEW_ZONE',"Nouvelle région" );
-define('TEXT_INFO_HEADING_EDIT_ZONE',"Éditer la région" );
-define('TEXT_INFO_HEADING_DELETE_ZONE',"Supprimer la région" );
-?>
\ No newline at end of file
Added: trunk/catalog/admin/includes/languages/fr_FR/modules/pages/countries.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/pages/countries.txt (rev 0)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/countries.txt 2011-12-29 18:55:35 UTC (rev 3996)
@@ -0,0 +1,52 @@
+<?php
+/**
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 16/11/11, 22:00
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+
+$lang['heading title countries']="Pays et Régions" ;
+
+
+/* listing */
+ $lang['table heading name']="Pays" ;
+ $lang['table heading localname']="Nom local" ;
+ $lang['table heading iso 2']="Iso-2" ;
+ $lang['table heading iso 3']="Iso-3" ;
+ $lang['table heading status']="Statut" ;
+ $lang['table heading action']="Action" ;
+
+ $lang['image add countries']="Ajouter un pays" ;
+
+/* edit / new */
+ $lang['heading title edit']="Edition d'un pays" ;
+ $lang['countries tab specification']="Caractéristiques" ;
+ $lang['countries tab state']="Régions / Départements" ;
+ /* countries */
+ /* tab speci */
+ $lang['text info country name']="Pays" ;
+ $lang['text info country localname']="Nom local" ;
+ $lang['text info country code 2']="ISO Code 2" ;
+ $lang['text info country code 3']="ISO Code 3" ;
+ $lang['text info address format']="Format des addresses du pays" ;
+ $lang['text info country visible']="Etat visiblité" ;
+ /* tab listing sub zone */
+
+ /* zone */
+ $lang['heading title edit zone']="Edition d'une zone" ;
+ $lang['text info zone name']="Region / état" ;
+ $lang['text info zone code']="Code" ;
+
+/* delete */
+ /* countries */
+ $lang['heading title delete countries']="Suppresion d'un pays" ;
+ $lang['text info delete countries']="vous souhaitez supprimer ce payset toutes les zones (dept/regions) qui y sont liées " ;
+
+ /* zone */
+ $lang['heading title delete zone']="Suppresion d'une zone" ;
+
+?>
\ No newline at end of file
Added: trunk/catalog/admin/includes/modules/pages/countries.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/countries.php (rev 0)
+++ trunk/catalog/admin/includes/modules/pages/countries.php 2011-12-29 18:55:35 UTC (rev 3996)
@@ -0,0 +1,473 @@
+<?php if (!defined('HTTP_SERVER')) die('You can not access this file directly!');
+/**
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 26/11/11, 21:49
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+ @class countries
+*/
+
+class countries
+ extends ModTwo /// new abstract class for nextgen module
+ implements InterfaceModule
+ ,IntModTwo /// new interface module for nextgen module
+ ,ExtModConfig {
+
+ const FILENAME = FILENAME_COUNTRIES;
+
+ /**
+ @var string file
+ */
+ public static $Id;
+ /**
+ @var array list code action module
+ */
+ public static $list=array();
+ /**
+ @var bool $dir_ok
+ */
+ public static $dir_ok;
+ /**
+ @var current object
+ */
+ public static $Info;
+
+ /**
+ class constructor
+ */
+ public function __construct() {
+ self::GetConf();
+ }
+
+
+ /**
+ @brief Load , adjust and define var environement exe for module
+ Is use in module and class abstract for init value config this module
+ */
+ public static function GetConf(){
+ global $languages_id;
+
+ self::$code=__CLASS__;
+
+ self::$action=(isset($_REQUEST['action'])? (string)$_REQUEST['action'] : 'listing' );
+ self::$Id=(isset($_REQUEST['cID'])? (int)$_REQUEST['cID'] : 0 );
+
+ /**
+ @remarks define var execution sql in GetDBValue()
+ */
+ self::$InitInfo['adjus...
[truncated message content] |
|
From: <os...@us...> - 2011-12-29 00:02:34
|
Revision: 3995
http://oscss.svn.sourceforge.net/oscss/?rev=3995&view=rev
Author: oscim
Date: 2011-12-29 00:02:26 +0000 (Thu, 29 Dec 2011)
Log Message:
-----------
correction fr
amelioration css detail rowinpage pour le listing client
Modified Paths:
--------------
trunk/catalog/admin/includes/languages/fr_FR/fr_FR.php
trunk/catalog/admin/includes/template/oscss/jquery-ui-1.css
Modified: trunk/catalog/admin/includes/languages/fr_FR/fr_FR.php
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/fr_FR.php 2011-12-28 23:41:24 UTC (rev 3994)
+++ trunk/catalog/admin/includes/languages/fr_FR/fr_FR.php 2011-12-29 00:02:26 UTC (rev 3995)
@@ -4,7 +4,7 @@
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 26/11/11, 15:25
+ @date 28/12/11, 15:25
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@brief master file for languages
@@ -279,7 +279,7 @@
define('TEXT_CACHE_ALSO_PURCHASED',"Module d'achat supplémentaire" );
define('TEXT_NONE',"--aucun--" );
-define('TEXT_TOP',"Haut" );
+define('TEXT_TOP',"Choix d'une categorie" );
define('ERROR_DESTINATION_DOES_NOT_EXIST',"Erreur : le chemin cible n'existe pas." );
Modified: trunk/catalog/admin/includes/template/oscss/jquery-ui-1.css
===================================================================
--- trunk/catalog/admin/includes/template/oscss/jquery-ui-1.css 2011-12-28 23:41:24 UTC (rev 3994)
+++ trunk/catalog/admin/includes/template/oscss/jquery-ui-1.css 2011-12-29 00:02:26 UTC (rev 3995)
@@ -1,578 +1,650 @@
-/*
- * jQuery UI CSS Framework 1.8.12
- *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Theming/API
+/**
+ @ licence GPL 2005-2010 The osCSS developers ***- osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 23/06/10, 17:42
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
*/
+body { background:#faf9f7 url(img/1/body.jpg) repeat-x; color:#000; margin:0; padding:0; font: normal 11px Verdana, Arial, sans-serif; }
+html { height: 100%;}
+/* prepend */
+* {margin:0;padding:0}
+a :link, ***
+a:visited {text-decoration: underline; color:#000;}
+a:hover { text-decoration: none; }
+img { border-width:0 ; margin:0; padding:0; }
+h1 { font-size: 2em ; padding:1em; }
+h1 img {border-width:0 ; margin:0; padding:0;}
+h2 { font-size: 1.2em ;text-shadow:0 1px 0 #fff;}
+h3 { font-size: 1.2em ;text-shadow:0 1px 0 #fff;color:#666;}
+h4 { font-size: 1em ;text-shadow:0 1px 0 #fff;}
+h5 { font-size: 1em ;text-shadow:0 1px 0 #fff;}
+p {padding:1em;}
+ul {list-style:none;}
+#central li {padding-left:0;cursor:pointer;margin:0.1em 0;}
+th { text-shadow:0 1px 0 #fff;-moz-border-radius:6px; -webkit-border-radius:6px; margin:2px 1px; text-align: left; padding: 0 5px;line-height:30px;}
-/* Layout helpers
-----------------------------------*/
-.ui-helper-hidden { display: none; }
-.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
-.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
-.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
-.ui-helper-clearfix { display: inline-block; }
-/* required comment for clearfix to work in Opera \*/
-* html .ui-helper-clearfix { height:1%; }
-.ui-helper-clearfix { display:block; }
-/* end clearfix */
-.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
+/* form defintion generale */
+#form_bt { width: 80%; margin: 1em 2em;}
+input.radioInput {width:30px;}
+fieldset { margin: 1em 2em; padding:1em; border:none; }
+fieldset p { margin: 1em 0 0 0; }
+fieldset select,
+fieldset input[type="text"] { min-width:65%; display:inline-block;}
+fieldset select option {display:block; float:none;clear:both;width:100%}
+fieldset label { width: 70%; line-height: 18px; margin-right: 10px; display:inline-block; text-align: right; padding: 0 0 2px 0;}
+fieldset ul { list-style:none;}
+ul.form_radio_inline{display:inline-block;}
+.spacer {clear:both;}
+.noselected{}
+.selected{background:#f0d4bf;}
+/* general class */
+.error{ color:red; }
+.info{ color:blue;}
+div.info{ color:black;padding:10px 2px; border:2px solid #3A3B35; -moz-border-radius:6px; -webkit-border-radius:6px; background:#73756A;}
+.alert{ color:#ae0405; }
+.fright{ float:right; }
+.fleft {float:left; }
+.tleft{text-align:left}
+.tright{text-align:right}
+.tcenter{text-align:center}
+.inline { display:inline-block; }
+.inline * { display:inline-block; }
+.nobr {white-space:nowrap;}
+#central form {padding:0.5em 1em;}
+.w_100 {width:99%;}
+.w_90 {width:89%;}
+.w_80 {width:79%;}
+.w_70 {width:69%;}
+.w_60 {width:59%;}
+.w_50 {width:49%;}
+.w_40 {width:39%;}
+.w_30 {width:29%;}
+.padd_w {padding-left:10px; padding-right:10px;}
+.padd_h {padding-top:10px; padding-bottom:10px;}
-/* Interaction Cues
-----------------------------------*/
-.ui-state-disabled { cursor: default !important; }
+/* buttons */
+.button,
+select.button,
+input[type=submit].button,
+input[type=button].button,
+button.button,
+a.button{
+ display: inline-block;
+ font-family:Arial;
+ white-space:nowrap;
+ float:right;
+ color:white;
+ vertical-align:middle;
+ border:1px solid #fff;
+ height: 25px;
+ line-height: 25px;
+ -moz-border-radius:5px;
+ -webkit-border-radius: 5px;
+ -moz-box-shadow: 0 1px 3px rgba(0,0,0,0.5);
+ -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.5);
+ margin:8px 20px;
+ text-shadow: none;
+}
+input[type=image].button {
+ float:left;
+ height:18px;
+ width:18px;
+}
+input.button,
+button.button{font-size:11px; background:#ccc;padding:2px 5px; }
-/* Icons
-----------------------------------*/
-/* states and images */
-.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
+a.button{ background:#eee; padding:2px 5px; margin:10px 20px ;text-decoration:none;height:18px; line-height:18px;}
+a.button:hover{background:#797979; color:white;text-decoration:none; }
+a.button,
+select.button,
+input.button,
+button.button {background:#df1217 url(img/1/button.jpg) left top repeat-x;}
-/* Misc visuals
-----------------------------------*/
+a.button.ActionYes,
+input.button.ActionYes,
+input[type=image].button.ActionYes,
+input[type=submit].button.ActionYes,
+button.button.ActionYes {background:#ccc url(img/1/button-submit.jpg) left top repeat-x;}
-/* Overlays */
-.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
+a.button.ActionBack,
+input[type=image].button.ActionBack,
+button.button.ActionBack {background:#ccc url(img/1/button-back.jpg) left top repeat-x;}
-/*
- * jQuery UI CSS Framework 1.8.12
- *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Theming/API
- *
- * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana,Arial,sans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=03_highlight_soft.png&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=01_flat.png&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=02_glass.png&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=02_glass.png&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=02_glass.png&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
- */
+input:hover.button,
+button:hover.button{background:#797979;color:white;}
+a:hover.button,
+input:hover.button,
+button:hover.button {background:#ccc url(img/1/button.jpg) left -40px repeat-x; opacity:0.6;}
-/* Component containers
-----------------------------------*/
-.ui-widget { font-family: Verdana,Arial,sans-serif; font-size: 1.1em; }
-.ui-widget .ui-widget { font-size: 1em; }
-.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif; font-size: 1em; }
-.ui-widget-content { border: 1px solid #aaaaaa; background: #ffffff url(img/1/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x; color: #222222; }
-.ui-widget-content a { color: #222222; }
-.ui-widget-header { border: 1px solid #aaaaaa; background: #cccccc url(img/1/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x; color: #222222; font-weight: bold; }
-.ui-widget-header a { color: #222222; }
+a:hover.button.ActionYes,
+input:hover.button.ActionYes,
+button:hover.button.ActionYes {background:#ccc url(img/1/button-submit.jpg) left -40px repeat-x; color:black;}
-/* Interaction states
-----------------------------------*/
-.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3; background: #e6e6e6 url(img/1/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #555555; }
-.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555; text-decoration: none; }
-.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #999999; background: #dadada url(img/1/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; }
-.ui-state-hover a, .ui-state-hover a:hover { color: #212121; text-decoration: none; }
-.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa; background: #ffffff url(img/1/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; }
-.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121; text-decoration: none; }
-.ui-widget :active { outline: none; }
+a.button.ActionBack,
+input.button.ActionBack,
+button.button.ActionBack {background:#ccc url(img/1/button-back.jpg) left -40px repeat-x;}
-/* Interaction Cues
-----------------------------------*/
-.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fcefa1; background: #fbf9ee url(img/1/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x; color: #363636; }
-.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
-.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #fef1ec url(img/1/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x; color: #cd0a0a; }
-.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a; }
-.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a; }
-.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
-.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
-.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
-/* Icons
-----------------------------------*/
+input[type=image].button,
+a.buttonimg img{ opacity:1;}
-/* states and images */
-.ui-icon { width: 16px; height: 16px; background-image: url(img/1/ui-icons_222222_256x240.png); }
-.ui-widget-content .ui-icon {background-image: url(img/1/ui-icons_222222_256x240.png); }
-.ui-widget-header .ui-icon {background-image: url(img/1/ui-icons_222222_256x240.png); }
-.ui-state-default .ui-icon { background-image: url(img/1/ui-icons_888888_256x240.png); }
-.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(img/1/ui-icons_454545_256x240.png); }
-.ui-state-active .ui-icon {background-image: url(img/1/ui-icons_454545_256x240.png); }
-.ui-state-highlight .ui-icon {background-image: url(img/1/ui-icons_2e83ff_256x240.png); }
-.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(img/1/ui-icons_cd0a0a_256x240.png); }
+input[type=image]:hover.button ,
+a:hover.buttonimg img,
+a.buttonimg img:hover{ opacity:0.6;}
-/* positioning */
-.ui-icon-carat-1-n { background-position: 0 0; }
-.ui-icon-carat-1-ne { background-position: -16px 0; }
-.ui-icon-carat-1-e { background-position: -32px 0; }
-.ui-icon-carat-1-se { background-position: -48px 0; }
-.ui-icon-carat-1-s { background-position: -64px 0; }
-.ui-icon-carat-1-sw { background-position: -80px 0; }
-.ui-icon-carat-1-w { background-position: -96px 0; }
-.ui-icon-carat-1-nw { background-position: -112px 0; }
-.ui-icon-carat-2-n-s { background-position: -128px 0; }
-.ui-icon-carat-2-e-w { background-position: -144px 0; }
-.ui-icon-triangle-1-n { background-position: 0 -16px; }
-.ui-icon-triangle-1-ne { background-position: -16px -16px; }
-.ui-icon-triangle-1-e { background-position: -32px -16px; }
-.ui-icon-triangle-1-se { background-position: -48px -16px; }
-.ui-icon-triangle-1-s { background-position: -64px -16px; }
-.ui-icon-triangle-1-sw { background-position: -80px -16px; }
-.ui-icon-triangle-1-w { background-position: -96px -16px; }
-.ui-icon-triangle-1-nw { background-position: -112px -16px; }
-.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
-.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
-.ui-icon-arrow-1-n { background-position: 0 -32px; }
-.ui-icon-arrow-1-ne { background-position: -16px -32px; }
-.ui-icon-arrow-1-e { background-position: -32px -32px; }
-.ui-icon-arrow-1-se { background-position: -48px -32px; }
-.ui-icon-arrow-1-s { background-position: -64px -32px; }
-.ui-icon-arrow-1-sw { background-position: -80px -32px; }
-.ui-icon-arrow-1-w { background-position: -96px -32px; }
-.ui-icon-arrow-1-nw { background-position: -112px -32px; }
-.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
-.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
-.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
-.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
-.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
-.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
-.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
-.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
-.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
-.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
-.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
-.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
-.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
-.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
-.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
-.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
-.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
-.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
-.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
-.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
-.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
-.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
-.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
-.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
-.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
-.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
-.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
-.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
-.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
-.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
-.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
-.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
-.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
-.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
-.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
-.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
-.ui-icon-arrow-4 { background-position: 0 -80px; }
-.ui-icon-arrow-4-diag { background-position: -16px -80px; }
-.ui-icon-extlink { background-position: -32px -80px; }
-.ui-icon-newwin { background-position: -48px -80px; }
-.ui-icon-refresh { background-position: -64px -80px; }
-.ui-icon-shuffle { background-position: -80px -80px; }
-.ui-icon-transfer-e-w { background-position: -96px -80px; }
-.ui-icon-transferthick-e-w { background-position: -112px -80px; }
-.ui-icon-folder-collapsed { background-position: 0 -96px; }
-.ui-icon-folder-open { background-position: -16px -96px; }
-.ui-icon-document { background-position: -32px -96px; }
-.ui-icon-document-b { background-position: -48px -96px; }
-.ui-icon-note { background-position: -64px -96px; }
-.ui-icon-mail-closed { background-position: -80px -96px; }
-.ui-icon-mail-open { background-position: -96px -96px; }
-.ui-icon-suitcase { background-position: -112px -96px; }
-.ui-icon-comment { background-position: -128px -96px; }
-.ui-icon-person { background-position: -144px -96px; }
-.ui-icon-print { background-position: -160px -96px; }
-.ui-icon-trash { background-position: -176px -96px; }
-.ui-icon-locked { background-position: -192px -96px; }
-.ui-icon-unlocked { background-position: -208px -96px; }
-.ui-icon-bookmark { background-position: -224px -96px; }
-.ui-icon-tag { background-position: -240px -96px; }
-.ui-icon-home { background-position: 0 -112px; }
-.ui-icon-flag { background-position: -16px -112px; }
-.ui-icon-calendar { background-position: -32px -112px; }
-.ui-icon-cart { background-position: -48px -112px; }
-.ui-icon-pencil { background-position: -64px -112px; }
-.ui-icon-clock { background-position: -80px -112px; }
-.ui-icon-disk { background-position: -96px -112px; }
-.ui-icon-calculator { background-position: -112px -112px; }
-.ui-icon-zoomin { background-position: -128px -112px; }
-.ui-icon-zoomout { background-position: -144px -112px; }
-.ui-icon-search { background-position: -160px -112px; }
-.ui-icon-wrench { background-position: -176px -112px; }
-.ui-icon-gear { background-position: -192px -112px; }
-.ui-icon-heart { background-position: -208px -112px; }
-.ui-icon-star { background-position: -224px -112px; }
-.ui-icon-link { background-position: -240px -112px; }
-.ui-icon-cancel { background-position: 0 -128px; }
-.ui-icon-plus { background-position: -16px -128px; }
-.ui-icon-plusthick { background-position: -32px -128px; }
-.ui-icon-minus { background-position: -48px -128px; }
-.ui-icon-minusthick { background-position: -64px -128px; }
-.ui-icon-close { background-position: -80px -128px; }
-.ui-icon-closethick { background-position: -96px -128px; }
-.ui-icon-key { background-position: -112px -128px; }
-.ui-icon-lightbulb { background-position: -128px -128px; }
-.ui-icon-scissors { background-position: -144px -128px; }
-.ui-icon-clipboard { background-position: -160px -128px; }
-.ui-icon-copy { background-position: -176px -128px; }
-.ui-icon-contact { background-position: -192px -128px; }
-.ui-icon-image { background-position: -208px -128px; }
-.ui-icon-video { background-position: -224px -128px; }
-.ui-icon-script { background-position: -240px -128px; }
-.ui-icon-alert { background-position: 0 -144px; }
-.ui-icon-info { background-position: -16px -144px; }
-.ui-icon-notice { background-position: -32px -144px; }
-.ui-icon-help { background-position: -48px -144px; }
-.ui-icon-check { background-position: -64px -144px; }
-.ui-icon-bullet { background-position: -80px -144px; }
-.ui-icon-radio-off { background-position: -96px -144px; }
-.ui-icon-radio-on { background-position: -112px -144px; }
-.ui-icon-pin-w { background-position: -128px -144px; }
-.ui-icon-pin-s { background-position: -144px -144px; }
-.ui-icon-play { background-position: 0 -160px; }
-.ui-icon-pause { background-position: -16px -160px; }
-.ui-icon-seek-next { background-position: -32px -160px; }
-.ui-icon-seek-prev { background-position: -48px -160px; }
-.ui-icon-seek-end { background-position: -64px -160px; }
-.ui-icon-seek-start { background-position: -80px -160px; }
-/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
-.ui-icon-seek-first { background-position: -80px -160px; }
-.ui-icon-stop { background-position: -96px -160px; }
-.ui-icon-eject { background-position: -112px -160px; }
-.ui-icon-volume-off { background-position: -128px -160px; }
-.ui-icon-volume-on { background-position: -144px -160px; }
-.ui-icon-power { background-position: 0 -176px; }
-.ui-icon-signal-diag { background-position: -16px -176px; }
-.ui-icon-signal { background-position: -32px -176px; }
-.ui-icon-battery-0 { background-position: -48px -176px; }
-.ui-icon-battery-1 { background-position: -64px -176px; }
-.ui-icon-battery-2 { background-position: -80px -176px; }
-.ui-icon-battery-3 { background-position: -96px -176px; }
-.ui-icon-circle-plus { background-position: 0 -192px; }
-.ui-icon-circle-minus { background-position: -16px -192px; }
-.ui-icon-circle-close { background-position: -32px -192px; }
-.ui-icon-circle-triangle-e { background-position: -48px -192px; }
-.ui-icon-circle-triangle-s { background-position: -64px -192px; }
-.ui-icon-circle-triangle-w { background-position: -80px -192px; }
-.ui-icon-circle-triangle-n { background-position: -96px -192px; }
-.ui-icon-circle-arrow-e { background-position: -112px -192px; }
-.ui-icon-circle-arrow-s { background-position: -128px -192px; }
-.ui-icon-circle-arrow-w { background-position: -144px -192px; }
-.ui-icon-circle-arrow-n { background-position: -160px -192px; }
-.ui-icon-circle-zoomin { background-position: -176px -192px; }
-.ui-icon-circle-zoomout { background-position: -192px -192px; }
-.ui-icon-circle-check { background-position: -208px -192px; }
-.ui-icon-circlesmall-plus { background-position: 0 -208px; }
-.ui-icon-circlesmall-minus { background-position: -16px -208px; }
-.ui-icon-circlesmall-close { background-position: -32px -208px; }
-.ui-icon-squaresmall-plus { background-position: -48px -208px; }
-.ui-icon-squaresmall-minus { background-position: -64px -208px; }
-.ui-icon-squaresmall-close { background-position: -80px -208px; }
-.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
-.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
-.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
-.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
-.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
-.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
+/* Spe buttons broswer img */
+a.button.browser {height:28px;}
+a.button img {vertical-align:middle;margin:0.3em 0.3em 0 0;}
+.row_action a.button {margin:0;}
-/* Misc visuals
-----------------------------------*/
-/* Corner radius */
-.ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; }
-.ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; }
-.ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
-.ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
-.ui-corner-top { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; }
-.ui-corner-bottom { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
-.ui-corner-right { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
-.ui-corner-left { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
-.ui-corner-all { -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; }
-/* Overlays */
-.ui-widget-overlay { background: #aaaaaa url(img/1/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); }
-.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(img/1/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }/*
- * jQuery UI Resizable 1.8.12
- *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Resizable#theming
- */
-.ui-resizable { position: relative;}
-.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;
- /* http://bugs.jqueryui.com/ticket/7233
- - Resizable: resizable handles fail to work in IE if transparent and content overlaps
- */
- background-image:url(data:);
-}
-.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
-.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; }
-.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; }
-.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; }
-.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; }
-.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
-.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
-.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
-.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/*
- * jQuery UI Selectable 1.8.12
- *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Selectable#theming
- */
-.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; }
-/*
- * jQuery UI Accordion 1.8.12
- *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Accordion#theming
- */
-/* IE/Win - Fix animation bug - #4615 */
-.ui-accordion { width: 100%; }
-.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; }
-.ui-accordion .ui-accordion-li-fix { display: inline; }
-.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; }
-.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; }
-.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; }
-.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
-.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; }
-.ui-accordion .ui-accordion-content-active { display: block; }
-/*
- * jQuery UI Autocomplete 1.8.12
- *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Autocomplete#theming
- */
-.ui-autocomplete { position: absolute; cursor: default; }
+.text {margin:6px 0 ; padding: 6px}
-/* workarounds */
-* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
-/*
- * jQuery UI Menu 1.8.12
- *
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Menu#theming
- */
-.ui-menu {
- list-style:none;
- padding: 2px;
- margin: 0;
- display:block;
- float: left;
-}
-.ui-menu .ui-menu {
- margin-top: -3px;
-}
-.ui-menu .ui-menu-item {
- margin:0;
- padding: 0;
- zoom: 1;
- float: left;
- clear: left;
- width: 100%;
-}
-.ui-menu .ui-menu-item a {
- text-decoration:none;
- display:block;
- padding:.2em .4em;
- line-height:1.5;
- zoom:1;
-}
-.ui-menu .ui-menu-item a.ui-state-hover,
-.ui-menu .ui-menu-item a.ui-state-active {
- font-weight: normal;
- margin: -1px;
-}
-/*
- * jQuery UI Button 1.8.12
- *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Button#theming
- */
-.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */
-.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
-button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */
-.ui-button-icons-only { width: 3.4em; }
-button.ui-button-icons-only { width: 3.7em; }
+/* --- message box --- */
+.messageBox { font-family: Verdana, Arial, sans-serif; font-size: 10px; padding:0;}
+.messageStack{ font-family: Verdana, Arial, sans-serif;}
+.messageStack li{padding:2px 0;}
+.messageStackError,
+.messageStackWarning { background:#fbe3e1;}
+.messageStackSuccess { background:transparent url(img/1/menu_bg_success.jpg) left top repeat-x; }
+.messageStackNotice { background:transparent url(img/1/menu_bg_success.jpg) left top repeat-x;}
-/*button text element */
-.ui-button .ui-button-text { display: block; line-height: 1.4; }
-.ui-button-text-only .ui-button-text { padding: .4em 1em; }
-.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; }
-.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; }
-.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; }
-.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; }
-/* no icon support for input elements, provide padding by default */
-input.ui-button { padding: .4em 1em; }
-/*button icon element(s) */
-.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; }
-.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; }
-.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; }
-.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
-.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
-/*button sets*/
-.ui-buttonset { margin-right: 7px; }
-.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; }
+/* Onglet */
+.tabPage { position: relative; top: 0; z-index: 0; }
+/* Class apercu ligne au survol */
+.dataTableRow{background-color: #F0F1F1;height:3em;}
+.dataTableRow:hover,
+.dataTableBase tr:hover,
+.dataTable tr:hover{ background-color: #E6FF99; cursor: pointer; }
+.dataTableRow.Selected,
+.dataTableBase tr.Selected ,
+.dataTable tr.Selected { background-color: #fff;border-bottom:1px solid #ccc;}
+.dataTableRow td.hierac_enfant {padding-left:0.7em;}
+/* class qui rend element enfant visible au survol de l'element parent*/
+.view.fils {display:none}
+.dataTableBase tr:hover .view.fils,
+.dataTable tr:hover .view.fils,
+.dataTableRow.Selected .view.fils,
+.view.parent:hover .view.fils{display:block;height:18px}
-/* workarounds */
-button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */
-/*
- * jQuery UI Dialog 1.8.12
- *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Dialog#theming
- */
-.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; }
-.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; }
-.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; }
-.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
-.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
-.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
-.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
-.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
-.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; }
-.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; }
-.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
-.ui-draggable .ui-dialog-titlebar { cursor: move; }
-/*
- * jQuery UI Slider 1.8.12
- *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Slider#theming
- */
-.ui-slider { position: relative; text-align: left; }
-.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
-.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
+.dataTable a.button,
+.dataTable input[type=submit].button,
+.dataTable input[type=image].button,
+.dataTable button.button {margin:0;}
-.ui-slider-horizontal { height: .8em; }
-.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
-.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
-.ui-slider-horizontal .ui-slider-range-min { left: 0; }
-.ui-slider-horizontal .ui-slider-range-max { right: 0; }
+/* sort by*/
+.sort_by { clear:both;display:block; text-align:center; width:100%}
+.sort_by .Selected { border-bottom:2px solid red;}
+/* Bouton bas page*/
+.button_nav{clear:both;}
+.button_nav form{float:right; width:100px;}
+.button_nav form p {margin:0;padding:0;}
+/* */
+#row_by_page_select option {display:block;}
-.ui-slider-vertical { width: .8em; height: 100px; }
-.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
-.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
-.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
-.ui-slider-vertical .ui-slider-range-max { top: 0; }/*
- * jQuery UI Tabs 1.8.12
- *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Tabs#theming
- */
-.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
-.ui-tabs .ui-tabs-nav { margin: 0; padding: 0 .2em 0; }
-.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
-.ui-tabs .ui-tabs-nav li a { float: left; padding: .3em 0.5em; text-decoration: none; }
-.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; }
-.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
-.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
-.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; }
-.ui-tabs .ui-tabs-hide { display: none !important; }
-/*
- * jQuery UI Datepicker 1.8.12
- *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Datepicker#theming
- */
-.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; }
-.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
-.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
-.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
-.ui-datepicker .ui-datepicker-prev { left:2px; }
-.ui-datepicker .ui-datepicker-next { right:2px; }
-.ui-datepicker .ui-datepicker-prev-hover { left:1px; }
-.ui-datepicker .ui-datepicker-next-hover { right:1px; }
-.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; }
-.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
-.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
-.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
-.ui-datepicker select.ui-datepicker-month,
-.ui-datepicker select.ui-datepicker-year { width: 49%;}
-.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
-.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
-.ui-datepicker td { border: 0; padding: 1px; }
-.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
-.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
-.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
-.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
+/* Structure */
+#glob {background:transparent url(img/1/black.jpg) repeat-x ; width:100%; background-attachment:fixed; z-index:10; height:100%;}
+#center { margin: 0 auto; position: relative; min-width:900px;width:90%;max-width:1200px; }
+#header {background:black; min-width:900px;width:90%;max-width:1200px; margin:0 0; position:fixed; z-index:10;}
-/* with multiple calendars */
-.ui-datepicker.ui-datepicker-multi { width:auto; }
-.ui-datepicker-multi .ui-datepicker-group { float:left; }
-.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
-.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
-.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
-.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
-.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
-.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
-.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
-.ui-datepicker-row-break { clear:both; width:100%; }
+#central { position:relative; padding:10px 5px; top:73px;border-left: 1px solid black;
+border-right: 1px solid black;border-bottom: 1px solid black;background:white; }
+#central div.box_uniq { width:99%; float:left; }
+#central div.box_left { width:60%; float:left; }
-/* RTL support */
-.ui-datepicker-rtl { direction: rtl; }
-.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
-.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
-.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
-.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
-.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
-.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
-.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
-.ui-datepicker-rtl .ui-datepicker-group { float:right; }
-.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
-.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
+#central div.box_right {border:1px solid #ACAAAC; width:39%; float:right; background:#f1f1f1; background-color: #ffffff;-moz-border-radius:6px; -webkit-border-radius: 6px;}
+.configuration #central div.box_right { right:0; width:39%; }
+.configuration #central div.box_right ul{ list-style:none; }
+#bas { margin-top:8em; clear:both; height:25px; background:black;color:white;}
+div#footer { background:#303030; clear:both;width:100%; text-align:center;color:white;}
-/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
-.ui-datepicker-cover {
- display: none; /*sorry for IE5*/
- display/**/: block; /*sorry for IE5*/
- position: absolute; /*must have*/
- z-index: -1; /*must have*/
- filter: mask(); /*must have*/
- top: -4px; /*must have*/
- left: -4px; /*must have*/
- width: 200px; /*must have*/
- height: 200px; /*must have*/
-}/*
- * jQuery UI Progressbar 1.8.12
- *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Progressbar#theming
- */
-.ui-progressbar { height:2em; text-align: left; }
-.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }
\ No newline at end of file
+
+/* menu Fonctionnement tiroir */
+#menutitre, #menutitre ul { padding:0; margin:0; list-style:none;}
+#menutitre li { position:relative; float:left; padding: 0 5px; background:transparent url(img/1/bg-nav.jpg) repeat-x ; height:25px;}
+#menutitre li ul { list-style:none; position:absolute; top:25px; left:0; display:none; z-index:10; }
+#menutitre ul li { float:none; width:200px; background:#303030 ;}
+#menutitre ul.ssmenu li a{color:#9C9A9B;text-shadow: none;}
+#menutitre li:hover ul { display:block; }
+#menutitre a { display:block; padding-top:4px;padding-left: 20px; color:white; text-decoration:none; height:18px; text-align:center; font:normal 11px Verdana, Arial, sans-serif; }
+#menutitre .disabled, #menutitre .disabled:hover { display:none;}
+#menutitre .disabled ul li a,
+#menutitre .disabled ul li a:hover { display:none; }
+#menutitre a:hover { color:#000; text-decoration:none; }
+#menutitre a.active { text-decoration:none; }
+#menutitre .ssmenu { margin:0 1px 1px 0; background:#ccc; text-decoration:none; white-space:nowrap; border-left:1px solid #747474;}
+#menutitre li ul.ssmenu li ul.ssmenu,
+#menutitre li ul.ssmenu li ul.ssmenu li ul.ssmenu{list-style:none; position:absolute; top:-1px; left:180px; display:none; z-index:15; }
+#menutitre li ul.ssmenu li:hover ul.ssmenu,
+#menutitre li ul.ssmenu li ul.ssmenu li:hover ul.ssmenu{ display:block }
+#menutitre .ssmenu a { color:#000; padding:2px 0px 2px 26px; text-decoration:none; line-height:20px; border:none; width:154px; text-align:left; }
+#menutitre .ssmenu a:hover { background-color:#999; color:#fff;text-shadow: 0 1px 0 #000; text-decoration:none; }
+div.menuSeparator { padding:2px 10px; display:block; background:#888; border-bottom:1px solid #ccc; font-size:12px; color:#FFF; line-height:14px; clear:both; }
+#ssmenu a { float:left; padding:5px 10px; margin:0;font-size:10px;background:#797979;color:white;text-shadow: 0 1px 0 #000;border-right:1px solid #444;}
+#ssmenu a:hover { float:left; padding:5px 10px ; margin:0;font-size:10px;background:#eee;color:#000;text-shadow: 0 1px 0 #fff;-moz-box-shadow: 0 1px 3px rgba(0,0,0,0.5);-webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.5);}
+#menu_theme * {display:block;}
+
+/* sous menu en widget */
+#central #SsMenuConfig #ssmenu {background:none;}
+#SsMenuConfig #ssmenu a { background: none repeat scroll 0 0 #797979; border-right: 1px solid #444444; clear: both; color: white; font-size: 10px; margin: 0 0 1px 25px; padding: 5px 10px; text-shadow: 0 1px 0 #000000; width: 40%;}
+#SsMenuConfig #ssmenu a:hover { float:left; padding:5px 10px ; margin:0;font-size:10px;background:#eee;color:#000;text-shadow: 0 1px 0 #fff;-moz-box-shadow: 0 1px 3px rgba(0,0,0,0.5);-webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.5);}
+
+
+/* Habillage */
+
+/* header */
+#headInfos {display:inline-block; height:25px; margin:0; padding:0;width:100%; color:white;}
+#headInfos h1 {display:inline; margin:0 2px; padding:0; line-height:25px;}
+#headInfos h2 {display:inline; line-height:25px; color:white; vertical-align:top;}
+#headInfos a,
+#headInfos span{padding-right:1em; color:white; text-decoration:none; line-height:25px; vertical-align:top;float:right;}
+#headInfos a:hover{text-decoration:underline;}
+#menubar{ background:transparent ; height:25px; border-top: 1px solid #fff;}
+#menubar li.account {padding-right:8px;}
+/* user bar */
+#user { background:transparent ;border-top: 1px solid #fff; padding-right:10px; height:25px;}
+#user ul#MenuExts li { background:transparent url(img/1/bg_header.jpg) repeat-x ;padding:0 8px;}
+#user ul#MenuExts li a {color:white;}
+#user ul#MenuExts li a:hover{color:gray;}
+#user li { position:relative; float:left;}
+#user a { display:block; padding-top:4px; color:#000; text-decoration:none; text-shadow:none; height:18px; text-align:center; font:normal 11px Verdana, Arial, sans-serif; }
+/* Switcher */
+p.themeSwitcher { float:right; margin:0; padding:2px 1em 0 0; text-align:right; width:250px; }
+p.themeSwitcher select { vertical-align:middle; font-size:0.9em; width:100px; }
+/* Bookmark */
+#menubookmark p.themeSwitcher select option,
+#menurecently p.themeSwitcher select#recently_viewed option {display:block;}
+
+/* content */
+#central h3{ font-size:15px; font-weight:bold; margin:0 0 10px; padding:0 5px 10px 3px; clear:both; }
+#central h4{font-weight:bold; padding:15px 5px 8px; clear:both; }
+/* Block formulaire central */
+#central .block_form { -moz-border-radius:6px; -webkit-border-radius:6px; width:99%; margin:0;padding:5px 0.2em 10px 0.2em; display:inline-block; text-align: left; background:#C9C9C9;}
+#central .block_form .tabs_lang{width:98%; float:left;}
+#central .block_form div.tabPage {padding-left:0; padding-right:0;}
+#central .block_form .block_input,
+#central form .block_input { text-shadow:0 1px 0 #fff;-moz-border-radius:6px; -webkit-border-radius:6px; width:98%; margin:2px 1px; display:inline-block; text-align: left; padding: 0 5px; background:#DEDADE;float:left;line-height:30px;}
+/* input[type="radio"] */
+
+
+
+#central .block_input span.value_edit {display:block; width:100%; clear:both;}
+
+#central .block_form .block_input span.value_edit {display:inline-block; width:100%;}
+#central .block_form .block_input br,
+#central .block_form .block_input span.value_edit br{display:none;}
+#central .block_form .block_input span.edit-input,
+#central .block_form .block_input span.value_edit span.edit-input{float:left; display:inline-block; padding:0 12px;}
+#central .block_form .block_input span.edit-input .edit-input-value-alternate {float:left; display:inline-block; padding:0 12px;width:25px; height: 25px;}
+
+/* DEB Non intrusif */
+/* remplacement true /false par icone */
+#central .block_form .block_input span.edit-input .edit-input-value .Val-true ,
+#central .block_form .block_input span.edit-input .edit-input-value .Val-false {font-size:0;}
+#central .block_form .block_input span.edit-input .edit-input-value-alternate.Val-true {background:transparent url(img/1/check.png) left top no-repeat; }
+#central .block_form .block_input span.edit-input .edit-input-value-alternate.Val-false {background:transparent url(img/1/busy.png) left top no-repeat;}
+
+/** Col status in tables - Replace status number by img */
+.dataTable tr td .edit-input-value .Val.img,
+.dataTableBase tr td .edit-input-value .Val.img { display: block; height: 16px; margin: auto; width: 16px;}
+
+.dataTable tr td .edit-input-value .Flag-0.txt,
+.dataTableBase tr td .edit-input-value .Flag-0.txt,
+.dataTable tr td .edit-input-value .Val-0.txt,
+.dataTableBase tr td .edit-input-value .Val-0.txt { display:none}
+
+.dataTable tr td .edit-input-value .Flag-0.img,
+.dataTableBase tr td .edit-input-value .Flag-0.img{background:transparent url("../../../images/icons/icon_status_red.gif") left top no-repeat}
+.dataTable tr td .edit-input-value .Val-0.img,
+.dataTableBase tr td .edit-input-value .Val-0.img { width: 10px; background:transparent url("../../../images/icons/icon_view_red.gif") left top no-repeat}
+
+.dataTable tr td .edit-input-value .Flag-1.txt,
+.dataTableBase tr td .edit-input-value .Flag-1.txt,
+.dataTable tr td .edit-input-value .Val-1.txt,
+.dataTableBase tr td .edit-input-value .Val-1.txt { display:none}
+
+.dataTable tr td .edit-input-value .Flag-1.img,
+.dataTableBase tr td .edit-input-value .Flag-1.img{background:transparent url("../../../images/icons/icon_status_green.gif") left top no-repeat}
+.dataTable tr td .edit-input-value .Val-1.img,
+.dataTableBase tr td .edit-input-value .Val-1.img {width: 10px; background:transparent url("../../../images/icons/icon_view_green.gif") left top no-repeat}
+
+.dataTable tr td.details table tr td ul li span.label {display:inline-block; font-size: 11px;}
+.dataTable tr td.details table tr td ul li span.label.text { height: 10px; padding: 0; width: 150px;}
+/* FIN Non intrusif */
+
+/* Ajsutement Page Orders*/
+#central .box_uniq.block_form.main-orders fieldset{margin:10px 0 0 0;padding:0 5px;}
+
+#central div.main-orders.block {background:#c9c9c9; -moz-border-radius: 6px 6px 6px 6px;}
+
+#central .block_form.main-orders .block_input br,
+#central .block_form.main-orders .block_input span.value_edit br{display:block;height:0;}
+
+#central table.main-orders {width:100%;}
+#central table.main-orders thead tr th{background:#303030; color:white;}
+#central table.main-orders tr th{background:#eee; height:20px;line-height: 20px; }
+#central table.main-orders tr th a{margin:0;}
+
+/* Ajsutement customer page */
+#central .box_uniq.block_form.main-customers .block_input label{width:35%;}
+
+
+
+/* central form .block_input */
+#central form .block_input .hasDatepicker{ margin:0; display:inline-block; text-align: left; padding: 0 5px; background:#DEDADE;float:left;line-height:30px; min-width:0;}
+#central form .block_field { text-shadow:0 1px 0 #fff;-moz-border-radius:6px; -webkit-border-radius:6px; min-width:96%; width:96.5%; max-width:97%; margin:2px ; display:inline-block; text-align: left; padding: 5px; float:left;background:#eee;}
+#central form .block_field.tabs_lang{width:96.9%}
+#central form .block_field.tabs_lang ul.ui-tabs-nav{padding:0; margin:0 -5px;}
+#central form .block_field.tabs_lang ul.ui-tabs-panel{padding:0; margin:0 -5px;}
+#central form .edit.col_right .block_input{width:95%;}
+#central form .edit.col_right .block_input label{width:20%;text-align:left;font-weight:bold}
+#central form p.new_product_img { float:left; padding:5px; margin : 0 auto;text-align:center; width:98%;}
+#central form p.new_product_img img{ -moz-border-radius:6px; -webkit-border-radius: 6px; border:1px solid #ACAAAC; margin:1px}
+#central form fieldset legend { color:#666666; font-size:1.2em; font-style:italic; font-weight:bold; padding:0 5px 0 20px;}
+#central form p select,
+#central form p input[type="text"] { margin:5px 15px; min-width:200px; }
+#central form p input[type="radio"],
+#central form p input[type="checkbox"] { float:right; margin:5px 15px; width:20px; }
+
+#central form .input-multi input[type="radio"]{float:none;}
+
+#central form#configuration p input[type="text"] { margin:5px 15px;width:60%; }
+
+#central form label { display: inline-block; font-weight: bold; line-height: 18px; margin: 5px 5px 5px 0; padding: 0 0 2px; text-align: left; min-width: 20%;}
+#central form .block_input label.inline { white-space:nowrap; width: 20%;}
+#central form textarea{ vertical-align:baseline;}
+
+#central .label.text {font-weight:bold;margin:0 5px;}
+#central #ssmenu {background:#797979; height: 2.2em;-moz-border-radius:6px; -webkit-border-radius: 6px;padding-left:0.5em;margin:1em;}
+
+
+
+/* Select Categorie */
+#CurrentPathSelect *,
+#CurrentPathSelect form {margin:0; padding:0; width:100%;}
+#CurrentPathSelect form #cPath { margin:0; font-size:18px; color:black; font-weight:bold; border:none; border-width:6px; border:1px solid #CCCCCC; border-bottom:none; padding:0.2em 0.6em; background-color:#f5f5f5; }
+
+/* data table */
+.dataTableBase,
+.dataTableSearch,
+.dataTable{ width:100%; border-width:0; -moz-border-radius:6px; -webkit-border-radius: 6px; border:1px solid #ACAAAC;}
+.dataTableBase tbody,
+.dataTableSearch tbody,
+.dataTable tbody {background-color: #f1f1f1;}
+.dataTableBase thead tr,
+.dataTableSearch thead tr,
+.dataTable thead tr{border-top-color: #FFFFFF; border-bottom-color: #525552; border-left-color: #FFFFFF; border-right-color: #525552; border-style: solid; border-width: 1px;}
+.dataTableBase tr,
+.dataTableSearch tr,
+.dataTable tr{border:1px solid transparent;cursor:default}
+.dataTableBase th,
+.dataTableSearch th,
+.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{ color: #000000;padding: 2px; font-size: 10px;cursor:default;text-shadow:0 1px 0 #fff;}
+.dataTableBase td.row_action,
+.dataTableSearch td.row_action,
+.dataTable td.row_action { width:150px; text-align:right;}
+.dataTableBase td.row_action_large,
+.dataTableSearch td.row_action_large,
+.dataTable td.row_action_large { width:250px; text-align:right;}
+.dataTableBase td.row_customers,
+.dataTableSearch td.row_customers,
+.dataTable td.row_customers { width:250px; text-align:left;}
+/* Block formulaire central block right */
+#central .box_right form .block_input { -moz-border-radius:6px; -webkit-border-radius:6px; width:97%; margin:2px 1px; display:inline-block; text-align: left; padding: 0 5px; background:#DEDADE;float:left;}
+#central .box_right form label {width:20%;text-align:left;font-weight:bold}
+#central .box_right form fieldset .button_nav input[type="text"].block_input {min-width:200; }
+
+/* footer */
+#bas a {padding: 4px 25px;color:white;}
+#bas a.oscommerce { background: transparent url(img/1/oscss.png) 0px 2px no-repeat; text-decoration:none; }
+#bas a.oscss { background: transparent url(img/1/oscss.png) 0px 2px no-repeat; text-decoration:none; }
+#bas a.oscim { background: transparent url(img/1/ico_oscim_20.png) 0px 2px no-repeat; text-decoration:none; }
+#footer a {color:white;}
+
+
+
+
+/* Specifique page diverse */
+
+/* account */
+.formArea { background-color: #f1f9fe; border-color: #7b9ebd; border-style: solid; border-width: 1px; }
+.formAreaTitle { font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 12px; font-weight: bold; }
+
+/* attributes */
+.attributes-odd { background-color: #f4f7fd; }
+.attributes-even { background-color: #ffffff; }
+
+/* info box block droit */
+.infoBoxHeading { background-color: #ffffff; border-width:0; -moz-border-radius:6px; -webkit-border-radius: 6px;}
+.infoBoxContent{ -moz-border-radius:0 0 4px 4px; -webkit-border-radius: 0 0 4px 4px;border-width: 0px 1px 0px 1px; border-color: #E6E6E6; border-style: solid; padding: 2px 2px 5px 10px; font-size: 10px; color: #000; background-color: #f1f1f1; list-style:none;line-height:1.7em;}
+.infoBoxContent li{clear:both; }
+.infoBoxContent li.ui-state-default {clear:none; }
+
+/* PAge sPECIFIQUE*/
+/* widjet homePage */
+#homestats { background:transparent url(../../../images/stats.gif) bottom right no-repeat; }
+#homestats dd {margin-left: 14em; padding: 3px; margin-bottom: 5px; line-height: 1.5em}
+#homestats dt {float:left; width: 13em; padding: 3px; line-height: 1.5em; text-align:right; font-weight:bold;}
+#homestats dl {padding: 5px 0 10px 5px;}
+#homeNews { background:transparent url(img/1/header_feed.png) bottom right no-repeat; }
+#homeNews dl {padding: 5px 0 10px 5px;}
+#homeNews dt {padding: 3px; font-size:12px; font-weight:bold;}
+#homeNews dt span.date {font-size:9px; color:gray;}
+#homeNews dd {padding: 3px; margin-bottom: 5px;}
+#homeNews dt a {text-decoration:none; color:#545683;}
+#homeNews dt a:hover {color:#9D9FBF;}
+
+/* statistqiue et rapport*/
+table.dataTable.stat.stock tr {margin:2px; position:relative }
+#central.stats tr.OutofStock{background:#d95017;}
+#central.stats td.OutofStockAttrib {background:#d95017;}
+#central.stats tr.attribute.stock td table{margin-left:10px; width:96%;}
+#central.stats tr.dataTableRow.attribute.stock { border-left:1px solid black; }
+#central.stats table tr table { margin:0; padding:0; border:0; }
+
+/* Module CMS/DESC */
+#central form .cms_desc .block_input { margin : 10px; }
+#central form .cms_desc .block_input p{ line-height : 16px; margin : auto; padding : auto; }
+#central form .cms_desc .block_input h3{ line-height : 20px; border:none; font-size:15px; margin:auto; padding : auto; }
+
+/* Cat list lors edition article ou cms */
+#central #cat_list_in_edit {overflow: auto; max-height: 160px; background-color: #fff; padding: 5px; line-height: 15px; border: 1px solid #666; -moz-border-radius:6px;}
+
+/*--sales stats box --*/
+#salesStats .BarGraph { background: url(img/1/horizontal_line.png) bottom left; border-bottom: 1px solid #333; font: 9px Helvetica, Geneva, sans-serif; height: 50px; width:230px; margin: 1em 1em 2em 1em; padding: 0; position: relative;color:#000;font-weight:bold; }
+#salesStats .BarGraph li { width: 11px; }
+#salesStats .BarGraph li.p0{margin:0 0 -3px 16px;color:#FFF;}
+
+
+/* Adress */
+.ViewAddress {padding:5px; }
+
+
+/* Widget */
+#customerStats ul{min-height:70px; background:transparent url(img/1/header_stats.png) no-repeat bottom right;}
+#orderStats ul{min-height:70px;background:transparent url(img/1/header_orders.png) no-repeat bottom right;}
+#customerInfos p{min-height:70px;background:transparent url(img/1/header_infos.png) no-repeat bottom right;}
+#salesStats p{float:left;min-height:50px;margin:0 auto;background:transparent url(img/1/header_sales.png) no-repeat bottom right;}
+/* #orderStats,
+ # customerSta...
[truncated message content] |