You can subscribe to this list here.
| 2011 |
Jan
|
Feb
|
Mar
(4) |
Apr
(57) |
May
(31) |
Jun
(21) |
Jul
(11) |
Aug
(23) |
Sep
(22) |
Oct
(36) |
Nov
(62) |
Dec
(85) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2012 |
Jan
(24) |
Feb
(24) |
Mar
(65) |
Apr
(232) |
May
(118) |
Jun
(22) |
Jul
(54) |
Aug
(57) |
Sep
(14) |
Oct
(27) |
Nov
(16) |
Dec
(19) |
| 2013 |
Jan
(16) |
Feb
(12) |
Mar
(3) |
Apr
(17) |
May
(2) |
Jun
(30) |
Jul
(33) |
Aug
(19) |
Sep
(35) |
Oct
(58) |
Nov
(27) |
Dec
(64) |
| 2014 |
Jan
(102) |
Feb
(80) |
Mar
(15) |
Apr
(4) |
May
(3) |
Jun
(3) |
Jul
(5) |
Aug
(11) |
Sep
(15) |
Oct
|
Nov
(3) |
Dec
(5) |
| 2015 |
Jan
(5) |
Feb
(4) |
Mar
(2) |
Apr
(11) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(9) |
Nov
(10) |
Dec
|
| 2016 |
Jan
(3) |
Feb
(2) |
Mar
(18) |
Apr
(13) |
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
(4) |
Oct
|
Nov
|
Dec
|
|
From: <os...@us...> - 2011-12-28 23:41:30
|
Revision: 3994
http://oscss.svn.sourceforge.net/oscss/?rev=3994&view=rev
Author: oscim
Date: 2011-12-28 23:41:24 +0000 (Wed, 28 Dec 2011)
Log Message:
-----------
correction visuel des pages d'installateur d'extension et ajout element fr manquant
Modified Paths:
--------------
trunk/catalog/admin/includes/gabarit/package/display_view.package.listing.gab
trunk/catalog/admin/includes/gabarit/package/display_view.package.upload.gab
trunk/catalog/admin/includes/gabarit/package/display_view.source.listing.gab
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/package.txt
Modified: trunk/catalog/admin/includes/gabarit/package/display_view.package.listing.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/package/display_view.package.listing.gab 2011-12-28 22:39:08 UTC (rev 3993)
+++ trunk/catalog/admin/includes/gabarit/package/display_view.package.listing.gab 2011-12-28 23:41:24 UTC (rev 3994)
@@ -3,20 +3,23 @@
@licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.1.0
- @date 10/04/11, 10:05
+ @version 2.1.1
+ @date 28/12/11, 10:05
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@brief gabarit for package list
*/
?>
+<style type="text/css">
+#master-nav {float:left;}
+</style>
<h3><?php echo __('heading title package') ?></h3>
<div class="button_nav">
<a class="button" href="<?php echo tep_href_link(package::FILENAME,'mode=installed') ?>"><?php echo __('image package already install') ?></a>
<a class="button" href="<?php echo tep_href_link(package::FILENAME,'mode=notinstall') ?>"><?php echo __('image package not install') ?></a>
<!-- <a class="button" href="<?php echo tep_href_link(package::FILENAME,'mode=update') ?>"><?php echo __('image package updatable') ?></a> -->
- <a class="button" href="<?php echo tep_href_link(package::FILENAME,'type_data=source') ?>"><?php echo __('image source catalog') ?></a>
+ <a id="master-nav" class="button" href="<?php echo tep_href_link(package::FILENAME,'type_data=source') ?>"><?php echo __('image source catalog') ?></a>
<a class="button" href="<?php echo tep_href_link(package::FILENAME,'action=upload') ?>"><?php echo __('image upload package') ?></a>
</div>
<table class="dataTable">
@@ -38,7 +41,7 @@
<td style="width:60%;"><?php echo tep_draw_input_field('description','description',__('table heading description'),'style="width:100%" class="search_init"'); ?></td>
<td style="width:5%;"><?php echo tep_draw_input_field('level','level',__('table heading level'),'style="width:100%" class="search_init"'); ?></td>
<td style="width:5%;"><?php echo tep_draw_input_field('sourceTitle','sourceTitle',__('table heading repository'),'style="width:100%" class="search_init"'); ?></td>
- <td style="width:5%;"> </td>
+ <td style="width:10%;"> </td>
<td class="row_action"> </td>
</tr>
</tfoot>
Modified: trunk/catalog/admin/includes/gabarit/package/display_view.package.upload.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/package/display_view.package.upload.gab 2011-12-28 22:39:08 UTC (rev 3993)
+++ trunk/catalog/admin/includes/gabarit/package/display_view.package.upload.gab 2011-12-28 23:41:24 UTC (rev 3994)
@@ -1,12 +1,13 @@
<?php
/**
- @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.1.0
- @date 26/09/10, 10:32
+ @version 2.1.1
+ @date 28/12/11, 10:05
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
+ @brief gabarit for package list
*/
?>
<h3><?php echo __('title heading upload package') ?></h3>
@@ -14,6 +15,7 @@
<a class="button" href="<?php echo tep_href_link(package::FILENAME) ?>"><?php echo IMAGE_BACK ?></a>
</div>
<div id="upload" class="fleft">
+ <p><?php echo __('text heading upload package') ?></p>
<?php echo tep_draw_form('pck_upload', package::FILENAME, 'action=upload_confirm', 'post', 'enctype="multipart/form-data"') ?>
<?php echo tep_draw_file_field('new_package') ?>
<?php echo tep_image_submit('', __('image upload manuel')) ?>
Modified: trunk/catalog/admin/includes/gabarit/package/display_view.source.listing.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/package/display_view.source.listing.gab 2011-12-28 22:39:08 UTC (rev 3993)
+++ trunk/catalog/admin/includes/gabarit/package/display_view.source.listing.gab 2011-12-28 23:41:24 UTC (rev 3994)
@@ -1,17 +1,22 @@
<?php
/**
- @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.0.9
- @date 22/06/10, 18:12
+ @version 2.1.1
+ @date 28/12/11, 10:05
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
+ @brief gabarit for package list
*/
?>
+<style type="text/css">
+#master-nav {float:left;}
+</style>
<h3><?php echo __('heading title source repository') ?></h3>
<div class="button_nav">
- <a class="button" href="<?php echo tep_href_link(package::FILENAME,'type_data=package') ?>"><?php echo __('image package catalog') ?></a>
+ <a id="master-nav" class="button" href="<?php echo tep_href_link(package::FILENAME,'type_data=package') ?>"><?php echo __('image package catalog') ?></a>
<a class="button" href="<?php echo tep_href_link(package::FILENAME,'type_data=source&action=source_update') ?>"><?php echo __('image source update') ?></a>
</div>
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/pages/package.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/pages/package.txt 2011-12-28 22:39:08 UTC (rev 3993)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/package.txt 2011-12-28 23:41:24 UTC (rev 3994)
@@ -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/03/11, 15:53
+ @version 2.1.1
+ @date 28/12/11, 10:05
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@brief file for module class package, item language french
@@ -16,29 +16,43 @@
/* Menu */
-$lang['image upload package']="Ajouter un paquet" ;
-$lang['image source update']="Mise à jour des dépôts" ;
-$lang['image package updatable']="Paquets à mettre à jour" ;
-$lang['image package already install']="Paquets déjà installés" ;
-$lang['image package not install']="Paquets non installés" ;
-$lang['image package catalog']="Liste des paquets" ;
-$lang['image source catalog']="Liste des sources" ;
+ /* paquet */
+ $lang['image upload package']="Ajouter un paquet" ;
+ $lang['image package updatable']="Paquets à mettre à jour" ;
+ $lang['image package already install']="Paquets déjà installés" ;
+ $lang['image package not install']="Paquets non installés" ;
+ $lang['image package catalog']="Liste des paquets" ;
+ /* source */
+ $lang['image source catalog']="Liste des sources" ;
+ $lang['image source update']="Mise à jour des dépôts" ;
+/* listing*/
+ /* paquet */
+ $lang['table heading nom']="Nom" ;
+ $lang['table heading description']="Description" ;
+ $lang['table heading size']="Taille" ;
+ $lang['table heading status']="Status" ;
+ $lang['heading action']="Action" ;
+ $lang['table heading action']="Action" ;
+ $lang['table heading level']="Develop" ;
+ $lang['table heading repository']="Dépot" ;
+ /* source */
+ $lang['heading source title']="Titre" ;
+ $lang['heading source key']="Clef" ;
+ $lang['heading source last update']="Dernière mise a jour" ;
-$lang['table heading nom']="Nom" ;
-$lang['table heading description']="Description" ;
-$lang['table heading size']="Taille" ;
-$lang['table heading status']="Status" ;
-$lang['heading action']="Action" ;
-$lang['table heading action']="Action" ;
-$lang['table heading level']="Develop" ;
-$lang['table heading repository']="Dépot" ;
-$lang['heading source title']="Titre" ;
+/* 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" ;
+ $lang['image upload manuel']="Télécharger un paquet" ;
+ /* source */
+
$lang['text info heading upload']="Charger" ;
$lang['text file name']="Nom du fichier :" ;
$lang['text file size']="Taille :" ;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2011-12-28 22:39:17
|
Revision: 3993
http://oscss.svn.sourceforge.net/oscss/?rev=3993&view=rev
Author: oscim
Date: 2011-12-28 22:39:08 +0000 (Wed, 28 Dec 2011)
Log Message:
-----------
Ajout d'une class ajaxinline et d'une routine js dans le header pour la prise en charge des changement de status ou op?\195?\169ration ajax compos?\195?\169 de GET et ne n?\195?\169cessitant qu'un remplacement de la balise html courante
petite amelioration avec la prise en charge de l'ajax sur les changement de status dans les listing
Mise a niveau d'une partie des modules de page comportant des listings
grosse mise a niveau sur la page adminGroup et int?\195?\169gration de l'ajax dans les actions de permission
suppression des fichiers content/admin_menbers devenus obsol?\195?\168te et de tous les fichier li?\195?\169e
Deport des section js des modules ds des sous dossier de includes/javascript/modules en respectant la nomeclature des type de modules classique
deport des js des class customers, adminuser, admingroup et products
Modified Paths:
--------------
trunk/catalog/admin/includes/boxes/002_admin.php
trunk/catalog/admin/includes/header.php
trunk/catalog/admin/includes/languages/fr_FR/boxes/002_admin.php
trunk/catalog/admin/includes/modules/pages/adminGroup.php
trunk/catalog/admin/includes/modules/pages/adminUsers.php
trunk/catalog/admin/includes/modules/pages/categories.php
trunk/catalog/admin/includes/modules/pages/cms_content.php
trunk/catalog/admin/includes/modules/pages/customers.php
trunk/catalog/admin/includes/modules/pages/products.php
Added Paths:
-----------
trunk/catalog/admin/includes/gabarit/adminGroup/
trunk/catalog/admin/includes/gabarit/adminGroup/display_view.define_group.gab
trunk/catalog/admin/includes/gabarit/adminGroup/display_view.delete.gab
trunk/catalog/admin/includes/gabarit/adminGroup/display_view.edit.gab
trunk/catalog/admin/includes/gabarit/adminGroup/display_view.listing.gab
trunk/catalog/admin/includes/javascript/modules/
trunk/catalog/admin/includes/javascript/modules/pages/
trunk/catalog/admin/includes/javascript/modules/pages/adminGroup.js.php
trunk/catalog/admin/includes/javascript/modules/pages/adminUsers.js.php
trunk/catalog/admin/includes/javascript/modules/pages/customers.js.php
trunk/catalog/admin/includes/javascript/modules/pages/products.js.php
Removed Paths:
-------------
trunk/catalog/admin/includes/content/admin_members.central.inc
trunk/catalog/admin/includes/content/admin_members.header.inc
trunk/catalog/admin/includes/content/admin_members.top.inc
trunk/catalog/admin/includes/gabarit/adminGroup.listing.gab
trunk/catalog/admin/includes/languages/fr_FR/admin_members.php
Modified: trunk/catalog/admin/includes/boxes/002_admin.php
===================================================================
--- trunk/catalog/admin/includes/boxes/002_admin.php 2011-12-28 18:47:34 UTC (rev 3992)
+++ trunk/catalog/admin/includes/boxes/002_admin.php 2011-12-28 22:39:08 UTC (rev 3993)
@@ -4,13 +4,12 @@
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 23/10/11, 17:06
+ @date 28/12/11, 17:06
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
$tabl_link[]= array(FILENAME_ADMINUSERS, 'BOX_ADMINISTRATOR_MEMBERS', 'members');
$tabl_link[]= array(FILENAME_ADMINGROUP, 'BOX_ADMINISTRATOR_GROUPS', 'groups');
- $tabl_link[]= array(FILENAME_ADMIN_MEMBERS.'?gID=groups', 'BOX_ADMINISTRATOR_GROUPS_PERMISSION', 'groups');
$tabl_link[]= array(FILENAME_ADMINNOTIF, 'BOX_ADMIN_NOTIFICATIONS', 'groups');
?>
\ No newline at end of file
Deleted: trunk/catalog/admin/includes/content/admin_members.central.inc
===================================================================
--- trunk/catalog/admin/includes/content/admin_members.central.inc 2011-12-28 18:47:34 UTC (rev 3992)
+++ trunk/catalog/admin/includes/content/admin_members.central.inc 2011-12-28 22:39:08 UTC (rev 3993)
@@ -1,365 +0,0 @@
-<?php
-/**
- @licence GPL 2005-2009 The osCSS developers - osCSS Open Source E-commerce
- @package oscss-2 <www http://www.oscss.org>
- @version Rc-3
- @date 03/04/10, 09:55
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-8
-*/
- ?>
-<!-- body //-->
-<!-- body_text //-->
-<h3><?php echo $titre_h3; ?></h3>
-<!-- box_left_eof -->
-
-<?php
-/**
- GESTION DES PERMISSION DES GROUPES
-*/
-
- if (isset($_GET['gPath'])) {
- $group_name_query = tep_db_query("SELECT admin_groups_name FROM " . TABLE_ADMIN_GROUPS . " WHERE FIND_IN_SET( '" . $_GET['gPath']. "', admin_groups_id) ");
- $group_name = tep_db_fetch_array($group_name_query);
-
- if ($_GET['gPath'] == 1) {
- echo tep_draw_form('defineForm', FILENAME_ADMIN_MEMBERS, 'gID=' . $_GET['gPath']);
- } elseif ($_GET['gPath'] != 1) {
- echo tep_draw_form('defineForm', FILENAME_ADMIN_MEMBERS, 'gID=' . $_GET['gPath'] . '&action=group_define', 'post', 'enctype="multipart/form-data"');
- echo tep_draw_hidden_field('admin_groups_id', '', $_GET['gPath']);
-} ?>
- <div class="button_nav">
- <?php if ($_GET['gPath'] != 1) { echo '<a class="button" href="' . tep_href_link(FILENAME_ADMIN_MEMBERS, 'gID=' . $_GET['gPath']) . '">' . IMAGE_CANCEL . '</a> ' . tep_image_submit('button_save.gif', IMAGE_RESET); } else { echo tep_image_submit('button_back.gif', IMAGE_BACK); } ?>
- </div>
-<div class="box_left">
- <table style="width:100%">
- <thead>
- <tr>
- <th colspan=2 ><?php echo TABLE_HEADING_GROUPS_DEFINE; ?></th>
- </tr>
- </thead>
- <tbody>
- <?php
- $menu=menu::getInstance();
- $hierac_menu=$menu->cstr_return(array('for_user'=>$_GET['gPath']));
- $menu=$hierac_menu;
- $file_count = 0;
- while ($fils = each($menu)) {
- $file_count++;
- $group_boxes=$fils['value'];
- $group_boxes['admin_boxes_id']=$fils['value']['admin_files_id'];
- $group_boxes['admin_boxes_name']=$fils['value']['admin_files_name'];
-
- $groupsArray=array();
-
- if (_test_bool($group_boxes['etat'])) {
- $del_boxes = array($_GET['gPath']);
- $groupsArray[]=$_GET['gPath'];
- $result = array_diff ($groupsArray, $del_boxes);
- sort($result);
- $checkedBox = $group_boxes['admin_boxes_id'];
- $uncheckedBox = implode (",", $result);
- $checked = true;
- } else {
- $add_boxes = array($_GET['gPath']);
- $result = array_merge ($add_boxes, $groupsArray);
- sort($result);
- $checkedBox = implode (",", $result);
- $uncheckedBox = $group_boxes['admin_boxes_id'];
- $checked = false;
- }
- ?>
- <tr class="dataTableRowBoxes" id="afi_<?php echo $group_boxes['admin_boxes_id'] ?>">
- <td width="40"><?php echo status_flag($checked,'action=setflag&gPath='.$_GET['gPath'].'&admin_boxes_id='.$group_boxes['file']); ?></td>
- <td><b><?php echo ucwords($group_boxes['admin_boxes_name']) . ' ' . tep_draw_hidden_field('checked_' . $group_boxes['admin_boxes_id'], '', $checkedBox) . tep_draw_hidden_field('unchecked_' . $group_boxes['admin_boxes_id'], '', $uncheckedBox); ?></b></td>
- </tr>
- <tr class="dataTableRow">
- <td> </td>
- <td>
- <?php
- if (!function_exists('list_hierac')){
- function list_hierac($menu,$class_fils=''){
- global $group_boxes;
-
- while ($fils = each($menu)) {
- $group_boxes_files=$fils['value'];
- $group_boxes_files['admin_boxes_id']=$group_boxes_files['admin_files_id'];
- $group_boxes_files['admin_boxes_name']=$group_boxes_files['admin_files_name'];
- $groupsArray =array();
-
- if ($group_boxes_files['etat'] ==true) {
- $del_boxes = array($_GET['gPath']);
- $groupsArray[]=$_GET['gPath'];
- $result = array_diff ($groupsArray, $del_boxes);
- sort($result);
- $checkedBox = $group_boxes_files['admin_boxes_id'];;
- $uncheckedBox = implode (",", $result);
- $checked = true;
- } else {
- $add_boxes = array($_GET['gPath']);
- $result = array_merge ($add_boxes, $groupsArray);
- sort($result);
- $checkedBox = implode (",", $result);
- $uncheckedBox = '';
- $checked = false;
- }
- preg_match("#(.*)[?](.*)#i",$group_boxes_files['admin_files_name'],$regi);
- $page_box=(empty($regi[1])) ? $group_boxes_files['admin_files_name'] : $regi[1] ;
- ?>
- <p style="clear:both; padding:0 1em;" class="view parent dataTableRow" >
- <span style="width:40px" class="fleft"><?php echo status_flag($checked,'action=setflag&gPath='.$_GET['gPath'].'&admin_files_id='.$group_boxes_files['admin_files_id'],'#afi_'.$group_boxes['admin_boxes_id']); //tep_draw_checkbox_field('groups_to_boxes[]', 'ubgroups_' . $group_boxes['admin_boxes_id'], $group_boxes_files['admin_files_id'], $checked, '', 'onclick="checkSub(this)"') ?></span>
- <span class="fleft"><?php echo $group_boxes_files['admin_files_name'] ?></span>
- <?php echo tep_draw_hidden_field('menu_id_' . $group_boxes_files['admin_files_id'], '', $group_boxes_files['admin_files_id']) . tep_draw_hidden_field('unchecked_' . $group_boxes_files['admin_files_id'], '', $uncheckedBox);?>
- <span class="view fils fright">
- </span>
- </p>
- <?php /*} */
-
- if (isset($group_boxes_files['fils']) && is_array($group_boxes_files['fils'])) list_hierac($group_boxes_files['fils'],'hierac_enfant');
- } /* Fin de while*/
- }
- }/* Fin de function */
-
- list_hierac($group_boxes['fils']);
- ?>
- </td>
- </tr>
- <?php } ?>
- </tbody>
- </table>
-
-</form>
-
-<?php } elseif (isset($_GET['gID'])) { /** GESTION DES GROUPS */ ?>
-<div class="box_left">
- <table style="width:100%" class="dataTable">
- <thead>
- <tr>
- <th><?php echo TABLE_HEADING_GROUPS_NAME; ?></th>
- <th class="tright"><?php echo TABLE_HEADING_ACTION; ?></th>
- </tr>
- </thead>
- <tfoot>
- <tr>
- <td colspan="2"><?php echo TEXT_COUNT_GROUPS . $count_groups; ?></td>
- </tr>
- </tfoot>
- <tbody>
- <?php foreach($list_g as $groups){ ?>
- <tr class="view parent dataTableRow <?php if(isset($_GET['gID']) && $_GET['gID'] == $groups['admin_groups_id']) echo "Selected"; ?>" >
- <td><strong><?php echo $groups['admin_groups_name']; ?></strong></td>
- <td class="tright">
- <span class="view fils fleft">
- <?php echo ' <a class="buttonimg" href="' . tep_href_link(FILENAME_ADMIN_MEMBERS, 'gID=' . $groups['admin_groups_id'] . '&action=edit_group') . '">' . tep_image(DIR_WS_ICONS . 'icon_edit.png',IMAGE_EDIT ). '</a> <a class="buttonimg" href="' . tep_href_link(FILENAME_ADMIN_MEMBERS, 'gID=' . $groups['admin_groups_id'] . '&action=del_group') . '">' . tep_image(DIR_WS_ICONS . 'icon_delete.png',IMAGE_DELETE).'</a> '; ?>
- </span>
- <span class="fright">
- <?php if ( isset($gInfo) && (is_object($gInfo)) && ($groups['admin_groups_id'] == $gInfo->admin_groups_id) ) { echo tep_image(DIR_WS_ICONS . 'icon_arrow_right.gif'); }
- else { echo '<a href="' . tep_href_link(FILENAME_ADMIN_MEMBERS, 'gID=' . $groups['admin_groups_id']) . '">' . tep_image(DIR_WS_ICONS . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?>
- </span>
- </td>
- </tr>
- <?php } ?>
- </tbody>
- </table>
-
-<?php
- } else {
-
-/**
- GESTION DES USERS
-*/
-?>
-
-<div class="box_left">
- <div class="button_nav">
- <?php echo '<a class="button" href="' . tep_href_link(FILENAME_ADMIN_MEMBERS, 'gID=groups') . '">' . IMAGE_GROUPS . '</a>'; echo ' <a class="button" href="' . tep_href_link(FILENAME_ADMIN_MEMBERS, 'page=' . $page . '&mID=' . $mInfo->admin_id . '&action=new_member') . '">' .tep_image(DIR_WS_ICONS . 'icon_add_new.png',IMAGE_NEW_MEMBER). IMAGE_NEW_MEMBER . '</a>'; ?>
- </div>
- <table width="100%" class="dataTable">
- <thead>
- <tr>
- <th><?php echo TABLE_HEADING_NAME.tep_link_sort_by(FILENAME_COUNTRIES,'admin_firstname'); ?></th>
- <th><?php echo TABLE_HEADING_EMAIL.tep_link_sort_by(FILENAME_COUNTRIES,'admin_email_address'); ?></th>
- <th class="tcenter"><?php echo TABLE_HEADING_GROUPS.tep_link_sort_by(FILENAME_COUNTRIES,'admin_groups_name'); ?></th>
- <th class="tcenter"><?php echo TABLE_HEADING_LOGNUM.tep_link_sort_by(FILENAME_COUNTRIES,'admin_lognum'); ?></th>
- <th class="row_action"><?php echo TABLE_HEADING_ACTION; ?></th>
- </tr>
- </thead>
- <tfoot>
- <tr>
- <td colspan="2"><?php echo $db_admin_split->display_count($db_admin_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $page, TEXT_DISPLAY_NUMBER_OF_MEMBERS); ?></td>
- <td colspan="2"><?php echo $db_admin_split->display_links($db_admin_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $page); ?></td>
- </tr>
- </tfoot>
- <tbody>
- <?php foreach($list_m as $admin){ ?>
- <tr class="view parent dataTableRow <?php if ((!isset($_GET['mID'])) || ($_GET['mID'] == $admin['admin_id']) ) echo "Selected"; ?>" >
- <td><?php echo $admin['admin_firstname'].' '.$admin['admin_lastname']; ?></td>
- <td><?php echo $admin['admin_email_address']; ?></td>
- <td class="tcenter"><?php echo $admin['admin_groups_name']; ?></td>
- <td class="tcenter"><?php echo $admin['admin_lognum']; ?></td>
- <td class="row_action">
- <span class="view fils fleft">
- <?php
- echo ' <a class="buttonimg" href="' . tep_href_link(FILENAME_ADMIN_MEMBERS, 'page=' . $page . '&mID=' . $admin['admin_id'] . '&action=edit_member') . '">' . tep_image(DIR_WS_ICONS . 'icon_edit.png',IMAGE_EDIT ). '</a> <a class="buttonimg" href="' . tep_href_link(FILENAME_ADMIN_MEMBERS, 'page=' . $page . '&mID=' . $admin['admin_id'] . '&action=del_member') . '">' . tep_image(DIR_WS_ICONS . 'icon_delete.png',IMAGE_DELETE).'</a> '; ?>
- </span>
- <span class="fright">
- <?php if ( isset($mInfo) && (is_object($mInfo)) && ($admin['admin_id'] == $mInfo->admin_id) ) { echo tep_image(DIR_WS_ICONS . 'icon_arrow_right.gif'); }
- else { echo '<a href="' . tep_href_link(FILENAME_ADMIN_MEMBERS, 'page=' . $page . '&mID=' . $admin['admin_id']) . '">' . tep_image(DIR_WS_ICONS . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?>
- </span>
- </td>
- </tr>
- <?php } ?>
- </tbody>
- </table>
-
-<?php } ?>
-</div>
-<!-- box_left_eof -->
-
-<!-- box_right -->
-<div class="box_right">
-
-<?php
- $heading = array();
- $contents = array();
- switch ($action) {
- case 'new_member':
- $groups_array = array(array('id' => '0', 'text' => TEXT_NONE));
- $groups_query = tep_db_query("select admin_groups_id, admin_groups_name from " . TABLE_ADMIN_GROUPS);
- while ($groups = tep_db_fetch_array($groups_query)) {
- $groups_array[] = array('id' => $groups['admin_groups_id'],
- 'text' => $groups['admin_groups_name']);
- }
-
- $heading[] = array('text' => TEXT_INFO_HEADING_NEW );
-
- $contents = array('form' => tep_draw_form('newmember', FILENAME_ADMIN_MEMBERS, 'action=member_new&page=' . $page . 'mID=' . $_GET['mID'], 'post', 'enctype="multipart/form-data"', ' name="newmember"'));
- if (isset($_GET['error'])) { $contents[] = array('text' => TEXT_INFO_ERROR); }
-
- $contents[] = array('class' => 'block_input','text' => '<label for="admin_firstname">' . TEXT_INFO_FIRSTNAME . '</label>' . tep_draw_input_field('admin_firstname','','','',true));
- $contents[] = array('class' => 'block_input','text' => '<label for="admin_lastname">' . TEXT_INFO_LASTNAME . '</label>' . tep_draw_input_field('admin_lastname','','','',true));
- $contents[] = array('class' => 'block_input','text' => '<label for="admin_email_address">' . TEXT_INFO_EMAIL . '</label>' . tep_draw_input_field('admin_email_address','','','',true));
-
- $contents[] = array('class' => 'block_input','text' => '<label for="admin_groups_id">' . TEXT_INFO_GROUP . '</label>' . tep_draw_pull_down_menu('admin_groups_id', $groups_array, '0'));
- $contents[] = array('class' => 'button_nav','text' => tep_image_submit('button_insert.gif', IMAGE_INSERT) . ' <a class="button" href="' . tep_href_link(FILENAME_ADMIN_MEMBERS, 'page=' . $page . '&mID=' . $_GET['mID']) . '">' . IMAGE_CANCEL . '</a>');
- break;
- case 'edit_member':
- $heading[] = array('text' => TEXT_INFO_HEADING_NEW );
-
- $contents = array('form' => tep_draw_form('newmember', FILENAME_ADMIN_MEMBERS, 'action=member_edit&page=' . $page . '&mID=' . $_GET['mID'], 'post', 'enctype="multipart/form-data"', ' name="newmember"'));
- if (isset($_GET['error'])) {
- $contents[] = array('text' => TEXT_INFO_ERROR);
- }
- $contents[] = array('class' => 'block_input','text' => '<label for="admin_firstname">' . TEXT_INFO_FIRSTNAME . '</label>' . tep_draw_input_field('admin_firstname','', $mInfo->admin_firstname) . tep_draw_hidden_field('admin_id', '', $mInfo->admin_id));
- $contents[] = array('class' => 'block_input','text' => '<label for="admin_lastname">' . TEXT_INFO_LASTNAME . '</label>' . tep_draw_input_field('admin_lastname','', $mInfo->admin_lastname));
- $contents[] = array('class' => 'block_input','text' => '<label for="admin_email_address">' . TEXT_INFO_EMAIL . '</label>' . tep_draw_input_field('admin_email_address','', $mInfo->admin_email_address));
- if ($mInfo->admin_id == 1) {
- $contents[] = array('class' => 'block_input','text' => tep_draw_hidden_field('admin_groups_id', '', $mInfo->admin_groups_id));
- } else {
- $groups_array = array(array('id' => '0','class' => 'block_input', 'text' => TEXT_NONE));
- $groups_query = tep_db_query("select admin_groups_id, admin_groups_name from " . TABLE_ADMIN_GROUPS);
- while ($groups = tep_db_fetch_array($groups_query)) {
- $groups_array[] = array('id' => $groups['admin_groups_id'],'class' => 'block_input','text' => $groups['admin_groups_name']);
- }
- $contents[] = array('class' => 'block_input','text' => '<label for="admin_groups_id">' . TEXT_INFO_GROUP . '</label>' . tep_draw_pull_down_menu('admin_groups_id', $groups_array, $mInfo->admin_groups_id));
- }
- $contents[] = array('class' => 'button_nav','text' => tep_image_submit('button_insert.gif', IMAGE_INSERT, 'onclick="validateForm();return document.returnValue"') . ' <a class="button" href="' . tep_href_link(FILENAME_ADMIN_MEMBERS, 'page=' . $page . '&mID=' . $_GET['mID']) . '">' . IMAGE_CANCEL . '</a>');
- break;
- case 'del_member':
- $heading[] = array('text' => TEXT_INFO_HEADING_DELETE );
- if ($mInfo->admin_id == 1 || $mInfo->admin_email_address == STORE_OWNER_EMAIL_ADDRESS) {
- $contents[] = array('class' => 'button_nav','text' => '<a class="button" href="' . tep_href_link(FILENAME_ADMIN_MEMBERS, 'page=' . $page . '&mID=' . $mInfo->admin_id) . '">' . IMAGE_BACK . '</a>');
- } else {
- $contents = array('form' => tep_draw_form('edit', FILENAME_ADMIN_MEMBERS, 'action=member_delete&page=' . $page . '&mID=' . $admin['admin_id'], 'post', 'enctype="multipart/form-data"'));
- $contents[] = array('text' => sprintf(TEXT_INFO_DELETE_INTRO, $mInfo->admin_firstname . ' ' . $mInfo->admin_lastname) . tep_draw_hidden_field('admin_id', '', $mInfo->admin_id));
- $contents[] = array('class' => 'button_nav', 'text' => tep_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a class="button" href="' . tep_href_link(FILENAME_ADMIN_MEMBERS, 'page=' . $page . '&mID=' . $_GET['mID']) . '">' . IMAGE_CANCEL . '</a>');
- }
- break;
- case 'new_group':
- $heading[] = array('text' => TEXT_INFO_HEADING_GROUPS );
-
- $contents = array('form' => tep_draw_form('new_group', FILENAME_ADMIN_MEMBERS, 'action=group_new', 'post', 'enctype="multipart/form-data"'));
- /* Retour erreur */
- if (isset($_GET['gName']) && $_GET['gName'] == 'false') $contents[] = array('text' => TEXT_INFO_GROUPS_NAME_FALSE);
- elseif (isset($_GET['gName']) && $_GET['gName'] == 'used') $contents[] = array('text' => TEXT_INFO_GROUPS_NAME_USED);
-
- $contents[] = array('class' => 'block_input','text' => '<label for="admin_groups_name">' . TEXT_INFO_GROUPS_NAME . '</label>' . tep_draw_input_field('admin_groups_name') . tep_draw_hidden_field('set_groups_id', '', ''/*substr($add_groups_prepare, 4)*/));
- $contents[] = array('class' => 'button_nav','text' => '<a class="button" href="' . tep_href_link(FILENAME_ADMIN_MEMBERS) . '">' . IMAGE_CANCEL . '</a> ' . tep_image_submit('button_next.gif', IMAGE_NEXT) );
- break;
- case 'edit_group':
- $heading[] = array('text' => TEXT_INFO_HEADING_EDIT_GROUP );
-
- $contents = array('form' => tep_draw_form('edit_group', FILENAME_ADMIN_MEMBERS, 'action=group_edit&gID=' . $_GET['gID'], 'post', 'enctype="multipart/form-data"'));
- $contents[] = array('class' => 'block_input','text' => '<label for="admin_groups_name">' . TEXT_INFO_EDIT_GROUP_INTRO . '</label>' . tep_draw_input_field('admin_groups_name','', $gInfo->admin_groups_name));
- $contents[] = array('class' => 'button_nav','text' => tep_image_submit('button_save.gif', IMAGE_SAVE) . ' <a class="button" href="' . tep_href_link(FILENAME_ADMIN_MEMBERS, 'gID=' . $gInfo->admin_groups_id) . '">' . IMAGE_CANCEL . '</a>');
- break;
- case 'del_group':
- $heading[] = array('text' => TEXT_INFO_HEADING_DELETE_GROUPS );
-
- $contents = array('form' => tep_draw_form('delete_group', FILENAME_ADMIN_MEMBERS, 'action=group_delete&gID=' . $gInfo->admin_groups_id, 'post', 'enctype="multipart/form-data"'));
- if ($gInfo->admin_groups_id == 1) {
- $contents[] = array('text' => sprintf(TEXT_INFO_DELETE_GROUPS_INTRO_NOT, $gInfo->admin_groups_name));
- $contents[] = array('class' => 'button_nav','text' => '<a class="button" href="' . tep_href_link(FILENAME_ADMIN_MEMBERS, 'gID=' . $_GET['gID']) . '">' . IMAGE_BACK . '</a>');
- } else {
- $contents[] = array('text' => sprintf(TEXT_INFO_DELETE_GROUPS_INTRO, $gInfo->admin_groups_name) . tep_draw_hidden_field('set_groups_id', '', substr($del_groups_prepare, 4)));
- $contents[] = array('class' => 'button_nav','text' => tep_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a class="button" href="' . tep_href_link(FILENAME_ADMIN_MEMBERS, 'gID=' . $_GET['gID']) . '">' . IMAGE_CANCEL. '</a>');
- }
- break;
- case 'define_group':
- $heading[] = array('text' => TEXT_INFO_HEADING_DEFINE );
-
- if ($_GET['gPath'] == 1) {
- $contents[] = array('text' => '<span class="alert">'.sprintf(TEXT_INFO_DEFINE_INTRO_BLOCK, $group_name['admin_groups_name']).'</span>');
- $contents[] = array('text' => TEXT_NOTE_DEFINE_GRP);
- $contents[] = array('class' => 'button_nav','text' => '<a class="button" href="' . tep_href_link(FILENAME_ADMIN_MEMBERS, 'gID=' . $_GET['gPath']) . '">' . IMAGE_CANCEL . '</a>');
- } else {
- $contents[] = array('text' => sprintf(TEXT_INFO_DEFINE_INTRO, $group_name['admin_groups_name']));
- }
- break;
- case 'show_group':
- $heading[] = array('text' => TEXT_INFO_HEADING_EDIT_GROUP );
- $check_email_query = tep_db_query("select admin_email_address from " . TABLE_ADMIN . "");
- //$stored_email[];
- while ($check_email = tep_db_fetch_array($check_email_query)) {
- $stored_email[] = $check_email['admin_email_address'];
- }
-
- if (in_array($_POST['admin_email_address'], $stored_email)) {
- $checkEmail = "true";
- } else {
- $checkEmail = "false";
- }
- $contents = array('form' => tep_draw_form('show_group', FILENAME_ADMIN_MEMBERS, 'action=show_group&gID=groups', 'post', 'enctype="multipart/form-data"'));
- $contents[] = array('class' => 'block_input','text' => $define_files['admin_files_name'] . tep_draw_input_field('level_edit','', $checkEmail));
- $contents[] = array('class' => 'button_nav','text' => tep_image_submit('button_insert.gif', IMAGE_INSERT) . ' <a href="' . tep_href_link(FILENAME_ADMIN_MEMBERS, 'gID=' . $gInfo->admin_groups_id) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
- break;
- default:
- if (isset($mInfo) && is_object($mInfo)) {
- $heading[] = array('text' => TEXT_INFO_HEADING_DEFAULT );
- $contents[] = array('text' => '<strong>' . TEXT_INFO_FULLNAME . '</strong>' . $mInfo->admin_firstname . ' ' . $mInfo->admin_lastname);
- $contents[] = array('text' => '<strong>' . TEXT_INFO_EMAIL . '</strong>' . $mInfo->admin_email_address);
- $contents[] = array('text' => '<strong>' . TEXT_INFO_GROUP . '</strong>' . $mInfo->admin_groups_name);
- $contents[] = array('text' => '<strong>' . TEXT_INFO_CREATED . '</strong>' . $mInfo->admin_created);
- $contents[] = array('text' => '<strong>' . TEXT_INFO_MODIFIED . '</strong>' . $mInfo->admin_modified);
- $contents[] = array('text' => '<strong>' . TEXT_INFO_LOGDATE . '</strong>' . $mInfo->admin_logdate);
- $contents[] = array('text' => '<strong>' . TEXT_INFO_LOGNUM . '</strong>' . $mInfo->admin_lognum);
- } elseif (is_object($gInfo)) {
- $heading[] = array('text' => TEXT_INFO_HEADING_DEFAULT_GROUPS );
-
- $contents[] = array('class' => 'button_nav','text' => '<a class="button" href="' . tep_href_link(FILENAME_ADMIN_MEMBERS, 'gPath=' . $gInfo->admin_groups_id . '&action=define_group') . '">' . IMAGE_FILE_PERMISSION . '</a>'
- );
-// $contents[] = array('text' => TEXT_INFO_DEFAULT_GROUPS_INTRO);
- }
- }
-?>
-
-<?php
- if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) {
- $box = new box;
- echo $box->infoBox($heading, $contents);
- }
-?>
-</div>
-<!-- box_right_eof -->
-<!-- body_text_eof //-->
-<!-- body_eof //-->
\ No newline at end of file
Deleted: trunk/catalog/admin/includes/content/admin_members.header.inc
===================================================================
--- trunk/catalog/admin/includes/content/admin_members.header.inc 2011-12-28 18:47:34 UTC (rev 3992)
+++ trunk/catalog/admin/includes/content/admin_members.header.inc 2011-12-28 22:39:08 UTC (rev 3993)
@@ -1,84 +0,0 @@
-<?php
-/**
-@licence GPL 2005-2009 The osCSS developers - osCSS Open Source E-commerce
- @package oscss-2 <www http://www.oscss.org>
- @version Rc-3
- @date 03/04/10, 09:55
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-8
-*/
-
-if($action=='new_member' || $action=='edit_member') :
- tep_include_file (DIR_WS_TEMPLATE."jquery.validate.css",true);
- tep_include_file ("includes/javascript/jquery.validate.min.js",true);
-?>
-<script type="text/javascript">
-$(function(){
- // validate signup form on keyup and submit
- $("#newmember").validate({
- invalidHandler: function(e, validator) {
- var errors = validator.numberOfInvalids();
- if (errors) {
- var message = errors == 1
- ? 'You missed 1 field. It has been highlighted below'
- : 'You missed ' + errors + ' fields. They have been highlighted below';
- $("div.error span").html(message);
- $("div.error").show();
- }
- else {$("div.error").hide();}
- },
- onkeyup: false,
- rules: {
- admin_firstname: {required: true, minlength: 3},
- admin_lastname: {required: true, minlength: 3},
- admin_email_address: {required: true, email: true},
- admin_groups_id:{required: true, minlength: 1}
- },
- messages: {
- admin_firstname: {
- required: "<?php echo JS_ALERT_FIRSTNAME ?>",
- minlength: "Your username must consist of at least 3 characters"
- },
- admin_lastname: {
- required: "<?php echo JS_ALERT_LASTNAME ?>",
- minlength: "Your username must consist of at least 3 characters"
- },
- admin_email_address: "<?php echo JS_ALERT_EMAIL ?>",
- admin_groups_id: "Please enter groupe id"
- }
- });
-});
-</script>
-<?php elseif($action=='new_group' || $action=='edit_group') :
- tep_include_file (DIR_WS_TEMPLATE."jquery.validate.css",true);
- tep_include_file ("includes/javascript/jquery.validate.min.js",true);
-?>
-<script type="text/javascript">
-$(function(){
- // validate signup form on keyup and submit
- $("#new_group").validate({
- invalidHandler: function(e, validator) {
- var errors = validator.numberOfInvalids();
- if (errors) {
- var message = errors == 1
- ? 'You missed 1 field. It has been highlighted below'
- : 'You missed ' + errors + ' fields. They have been highlighted below';
- $("div.error span").html(message);
- $("div.error").show();
- }
- else {$("div.error").hide();}
- },
- onkeyup: false,
- rules: {
- admin_groups_name: {required: true, minlength: 6},
- },
- messages: {
- admin_groups_name: {
- required: "Please enter a group name",
- minlength: "Your username must consist of at least 5 characters"
- }
- }
- });
-});
-</script>
-<?php endif; ?>
\ No newline at end of file
Deleted: trunk/catalog/admin/includes/content/admin_members.top.inc
===================================================================
--- trunk/catalog/admin/includes/content/admin_members.top.inc 2011-12-28 18:47:34 UTC (rev 3992)
+++ trunk/catalog/admin/includes/content/admin_members.top.inc 2011-12-28 22:39:08 UTC (rev 3993)
@@ -1,286 +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.1
- @date 10/12/11, 17:28
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-8
-*/
-
-function status_flag($cond,$get,$ancre=''){
- if($cond) {
- return tep_image(DIR_WS_ICONS . 'icon_status_green.gif', IMAGE_ICON_STATUS_GREEN) . ' <a href="' . tep_href_link(FILENAME_ADMIN_MEMBERS, $get.'&flag=0' ) .$ancre. '">' . tep_image(DIR_WS_ICONS . 'icon_status_red_light.gif', IMAGE_ICON_STATUS_RED_LIGHT) . '</a>';
- } else {
- return '<a href="' . tep_href_link(FILENAME_ADMIN_MEMBERS, $get.'&flag=1') .$ancre. '">' . 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);
- }
- }
-
-
-
-
- switch ($action) {
- case 'member_new':
- $check_email_query = tep_db_query("select admin_email_address from " . TABLE_ADMIN . "");
- while ($check_email = tep_db_fetch_array($check_email_query)) {
- $stored_email[] = $check_email['admin_email_address'];
- }
-
- if (in_array($_POST['admin_email_address'], $stored_email)) {
- tep_redirect(tep_href_link(FILENAME_ADMIN_MEMBERS, 'page=' . $page . '&error=email&action=new_member'));
- } else {
- function randomize() {
- $salt = "abchefghjkmnpqrstuvwxyz0123456789";
- srand((double)microtime()*1000000);
- $i = 0;
- while ($i <= 7) {
- $num = rand() % 33;
- $tmp = substr($salt, $num, 1);
- $pass = $pass . $tmp;
- $i++;
- }
- return $pass;
- }
- $makePassword = randomize();
-
- $sql_data_array = array('admin_groups_id' => tep_db_prepare_input($_POST['admin_groups_id']),
- 'admin_firstname' => tep_db_prepare_input($_POST['admin_firstname']),
- 'admin_lastname' => tep_db_prepare_input($_POST['admin_lastname']),
- 'admin_email_address' => tep_db_prepare_input($_POST['admin_email_address']),
- 'admin_password' => PasswordUtility::encrypt_password($makePassword),
- 'admin_created' => 'now()');
-
- tep_db_perform(TABLE_ADMIN, $sql_data_array);
-
- $myarray = array(
- 'email_use_html'=>_cst_bool('EMAIL_USE_HTML'),
- 'links'=>HTTP_SERVER . DIR_WS_ADMIN,
- 'admin_firstname'=>$_POST['admin_firstname'],
- 'admin_email_address'=>$_POST['admin_email_address'],
- 'hiddenPassword'=>$makePassword,
- 'message'=>''
- );
- $message_final=tep_post_prepare_email('admin_members_new.tpl',$language,$myarray);
-
- tep_mail($_POST['admin_firstname'] , $_POST['admin_email_address'],EMAIL_TEXT_SUBJECT, $message_final, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
- // copy au porp mag
- tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS,'Creat new compte for admin', $message_final);
-
- tep_redirect(tep_href_link(FILENAME_ADMIN_MEMBERS, 'page=' . $page ));
- }
- break;
- case 'member_edit':
- $admin_id = tep_db_prepare_input($_POST['admin_id']);
- $hiddenPassword = '-hidden-';
- $stored_email[] = 'NONE';
-
- $check_email_query = tep_db_query("select admin_email_address from " . TABLE_ADMIN . " where admin_id <> " . $admin_id . "");
- while ($check_email = tep_db_fetch_array($check_email_query)) {
- $stored_email[] = $check_email['admin_email_address'];
- }
-
- if (in_array($_POST['admin_email_address'], $stored_email)) {
- tep_redirect(tep_href_link(FILENAME_ADMIN_MEMBERS, 'page=' . $page . 'mID=' . $_GET['mID'] . '&error=email&action=edit_member'));
- } else {
- $sql_data_array = array('admin_groups_id' => tep_db_prepare_input($_POST['admin_groups_id']),
- 'admin_firstname' => tep_db_prepare_input($_POST['admin_firstname']),
- 'admin_lastname' => tep_db_prepare_input($_POST['admin_lastname']),
- 'admin_email_address' => tep_db_prepare_input($_POST['admin_email_address']),
- 'admin_modified' => 'now()');
-
- tep_db_perform(TABLE_ADMIN, $sql_data_array, 'update', 'admin_id = \'' . $admin_id . '\'');
-
- $myarray = array(
-// 'email_use_html'=>_cst_bool('EMAIL_USE_HTML'),
- 'links'=>HTTP_SERVER . DIR_WS_ADMIN,
- 'admin_firstname'=>$_POST['admin_firstname'],
- 'admin_email_address'=>$_POST['admin_email_address'],
- 'hiddenPassword'=>$hiddenPassword,
- 'message'=>''
- );
- $message_final=tep_post_prepare_email('admin_members.tpl',$language,$myarray);
- tep_mail($_POST['admin_firstname'] . ' ' . $_POST['admin_lastname'], $_POST['admin_email_address'],EMAIL_TEXT_SUBJECT, $message_final);
- tep_redirect(tep_href_link(FILENAME_ADMIN_MEMBERS, 'page=' . $page . '&mID=' . $admin_id));
- }
- break;
- case 'member_delete':
- $admin_id = tep_db_prepare_input($_POST['admin_id']);
- tep_db_query("delete from " . TABLE_ADMIN . " where admin_id = '" . $admin_id . "'");
-
- tep_redirect(tep_href_link(FILENAME_ADMIN_MEMBERS, 'page=' . $page));
- break;
- case 'group_define':
- $selected_checkbox = $_POST['groups_to_boxes'];
- $for_grp=$_GET['gID'];
- $define_files_query = tep_db_query("select admin_files_id, admin_groups_id from " . TABLE_ADMIN_FILES . " order by admin_files_id");
-
- while ($define_files = tep_db_fetch_array($define_files_query)) {
- $admin_files_id= $define_files['admin_files_id'];
- $admin_groups_id = $define_files['admin_groups_id'];
- $gps_id=explode(',',$admin_groups_id);
-
- if (in_array ($admin_files_id, $selected_checkbox)){
- $chek=true;
-// echo "on pour:".$admin_files_id.' '.$_POST['checked_' . $admin_files_id]."<br />";
- } else $chek=false;
-
- if ($chek)
- if (!in_array ($for_grp, $gps_id)) $final=preg_replace('/(^,)|(,,)/i',',',implode(',',$gps_id).','.$for_grp.',');
- else $final=preg_replace('/(^,)|(,,)/i',',',implode(',',$gps_id).',');
-
- if (!$chek)
- if (in_array ($for_grp, $gps_id)) {
-// echo 'effacement:<br >';
- $id_gps=array_flip($gps_id);
-
- unset($id_gps[$for_grp]);
- $final=preg_replace('/(^,)|(,,)/i',',',implode(',',array_flip($id_gps)));
- }
- else $final=preg_replace('/(^,)|(,,)/i',',',implode(',',$gps_id).',');
-
-// echo $final.'<br >';
- $sql_data_array = array('admin_groups_id' => $final);
-
-
- tep_db_perform(TABLE_ADMIN_FILES, $sql_data_array, 'update', 'admin_files_id = \'' . tep_db_prepare_input($_POST['menu_id_' . $admin_files_id]) . '\'');
- }
-
- tep_redirect(tep_href_link(FILENAME_ADMIN_MEMBERS, 'gID=' . $_POST['admin_groups_id']));
- break;
- case 'group_delete':
- $set_groups_id = tep_db_prepare_input( $_GET['gID']);
-
- tep_db_query("delete from " . TABLE_ADMIN_GROUPS . " where admin_groups_id = '" . (int)$set_groups_id . "'");
-// tep_db_query("update table " . TABLE_ADMIN_FILES . " change admin_groups_id set( " . (int)$set_groups_id . " ) NOT NULL DEFAULT '1' ");
- tep_db_query("delete from " . TABLE_ADMIN . " where admin_groups_id = '" . (int) $set_groups_id . "'");
-
- tep_redirect(tep_href_link(FILENAME_ADMIN_MEMBERS, 'gID=groups'));
- break;
- case 'group_edit':
- $admin_groups_name = ucwords(strtolower(tep_db_prepare_input($_POST['admin_groups_name'])));
- $name_replace = preg_replace ("/\40/", "%", $admin_groups_name);
-
- if (($admin_groups_name == '' || NULL) || (strlen($admin_groups_name) <= 5) ) {
- tep_redirect(tep_href_link(FILENAME_ADMIN_MEMBERS, 'gID=' . $_GET[gID] . '&gName=false&action=action=edit_group'));
- } else {
- $check_groups_name_query = tep_db_query("select admin_groups_name as group_name_edit from " . TABLE_ADMIN_GROUPS . " where admin_groups_id <> " . $_GET['gID'] . " and admin_groups_name like '%" . $name_replace . "%'");
- $check_duplicate = tep_db_num_rows($check_groups_name_query);
- if ($check_duplicate > 0){
- tep_redirect(tep_href_link(FILENAME_ADMIN_MEMBERS, 'gID=' . $_GET['gID'] . '&gName=used&action=edit_group'));
- } else {
- $admin_groups_id = $_GET['gID'];
- tep_db_query("update " . TABLE_ADMIN_GROUPS . " set admin_groups_name = '" . $admin_groups_name . "' where admin_groups_id = '" . $admin_groups_id . "'");
- tep_redirect(tep_href_link(FILENAME_ADMIN_MEMBERS, 'gID=' . $admin_groups_id));
- }
- }
- break;
- case 'group_new':
- $admin_groups_name = ucwords(strtolower(tep_db_prepare_input($_POST['admin_groups_name'])));
- $name_replace = preg_replace ("/\40/", "%", $admin_groups_name);
-
- if (($admin_groups_name == '' || NULL) || (strlen($admin_groups_name) <= 5) ) {
- tep_redirect(tep_href_link(FILENAME_ADMIN_MEMBERS, 'gID=' . $_GET[gID] . '&gName=false&action=new_group'));
- } else {
- $check_groups_name_query = tep_db_query("select admin_groups_name as group_name_new from " . TABLE_ADMIN_GROUPS . " where admin_groups_name like '%" . $name_replace . "%'");
- $check_duplicate = tep_db_num_rows($check_groups_name_query);
- if ($check_duplicate > 0){
- tep_redirect(tep_href_link(FILENAME_ADMIN_MEMBERS, 'gID=' . $_GET['gID'] . '&gName=used&action=new_group'));
- } else {
- $sql_data_array = array('admin_groups_name' => $admin_groups_name);
- tep_db_perform(TABLE_ADMIN_GROUPS, $sql_data_array);
- $admin_groups_id = tep_db_insert_id();
-/*
- $set_groups_id = tep_db_prepare_input($_POST['set_groups_id']);
- $add_group_id = $set_groups_id . ',\'' . $admin_groups_id . '\'';
- tep_db_query("alter table " . TABLE_ADMIN_FILES . " change admin_groups_id admin_groups_id set( " . $add_group_id . ") NOT NULL DEFAULT '1' ");*/
-
- tep_redirect(tep_href_link(FILENAME_ADMIN_MEMBERS, 'gID=' . $admin_groups_id));
- }
- }
- break;
-
- case 'setflag':
-
- if($_GET['gPath']==1) tep_redirect(tep_href_link(FILENAME_ADMIN_MEMBERS, 'gPath=' . $_GET['gPath'] .'&action=define_group'));
- if(isset($_GET['admin_boxes_id'])) {
- $ID=$_GET['admin_boxes_id'].'.php';
- $key='admin_files_name';
- $where= " and admin_files_is_boxes='1' ";
- } else {
- $ID=$_GET['admin_files_id'];
- $key='admin_files_id';
- $where=" and admin_files_is_boxes='0' ";
- }
-
- $define_files_query = tep_db_query($sql="select * from " . TABLE_ADMIN_FILES . " where ".$key."='".$ID."' ".$where." LIMIT 1");
- $define_files = tep_db_fetch_array($define_files_query);
-
-
- $t=explode(',',$define_files['admin_groups_id']);
-
- if($_GET['flag'] ==0) {
- foreach($t as $v){
- if($_GET['gPath'] != $v && !empty($v) )$ts[]=$v;
- }
- }
- elseif(!in_array($_GET['gPath'] ,$t)) {
- $ts=$t;
- $ts[]=$_GET['gPath'];
- }else $ts=$t;
-
- $define_files_query = tep_db_query($sql="update " . TABLE_ADMIN_FILES . " set admin_groups_id = '".implode(',',$ts)."' where admin_files_id='".$define_files['admin_files_id']."'");
-
- tep_redirect(tep_href_link(FILENAME_ADMIN_MEMBERS, 'gPath=' . $_GET['gPath'] .'&action=define_group'));
- break;
- default:
- if (isset($_GET['gPath'])) $titre_h3=HEADING_TITLE;
- elseif (isset($_GET['gID'])){
- $titre_h3=HEADING_TITLE_GRP;
-
- $db_groups_query = tep_db_query("select * from " . TABLE_ADMIN_GROUPS . " order by admin_groups_id");
- $list_g=array();
- $add_groups_prepare = '\'0\'' ;
- $del_groups_prepare = '\'0\'' ;
- $count_groups = 0;
- while ($groups = tep_db_fetch_array($db_groups_query)) {
- $add_groups_prepare .= ',\'' . $groups['admin_groups_id'] . '\'' ;
- $count_groups++;
- $class_s="";
- if (((!$_GET['gID']) || ($_GET['gID'] == $groups['admin_groups_id']) || ($_GET['gID'] == 'groups')) && (!isset($gInfo)) ) {
- $gInfo = new objectInfo($groups);
-
-// if ((is_object($gInfo)) && ($groups['admin_groups_id'] == $gInfo->admin_groups_id) ) $class_s=" Selected";
- }
- $list_g[]=$groups;
- }
-
-
- }else {
- $titre_h3=HEADING_TITLE_MEMBERS;
-
- $db_admin_query_raw = "select * from " . TABLE_ADMIN . " order by ".((isset($_GET['sort_by'])) ? $_GET['sort_by'] : 'admin_firstname ');
- $db_admin_split = new splitPageResults($page, MAX_DISPLAY_SEARCH_RESULTS, $db_admin_query_raw, $db_admin_query_numrows);
- $db_admin_query = tep_db_query($db_admin_query_raw);
- $list_m=array();
- while ($admin = tep_db_fetch_array($db_admin_query)) {
- if ($admin['admin_groups_id']==0) $admin['admin_groups_id']=1;
- $admin_group_query = tep_db_query("select admin_groups_name from " . TABLE_ADMIN_GROUPS . " where admin_groups_id = '" . $admin['admin_groups_id'] . "' " );
- $class_s="";
- $admin_group = tep_db_fetch_array ($admin_group_query);
-
- $admin=array_merge($admin, $admin_group);
- if (((!isset($_GET['mID'])) || ($_GET['mID'] == $admin['admin_id'])) && (!isset($mInfo)) ) {
- $mInfo = new objectInfo($admin);
- }
-// if ( (is_object($mInfo)) && ($admin['admin_id'] == $mInfo->admin_id) ) $class_s=" Selected";
-
- $list_m[]=$admin;
-
- }
-
- }
-
- }
-
-?>
\ No newline at end of file
Added: trunk/catalog/admin/includes/gabarit/adminGroup/display_view.define_group.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/adminGroup/display_view.define_group.gab (rev 0)
+++ trunk/catalog/admin/includes/gabarit/adminGroup/display_view.define_group.gab 2011-12-28 22:39:08 UTC (rev 3993)
@@ -0,0 +1,116 @@
+<?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 17/12/11, 09:32
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+?>
+<h3><?php echo __('heading title'); ?></h3>
+
+
+ <div class="button_nav">
+ <?php /*if ($_GET['gID'] != 1) { echo '<a class="button" href="' . tep_href_link(FILENAME_ADMIN_MEMBERS, 'gID=' . $_GET['gID']) . '">' . IMAGE_CANCEL . '</a> ' . tep_image_submit('button_save.gif', IMAGE_RESET); } else { echo tep_image_submit('button_back.gif', IMAGE_BACK); }*/
+echo '<a class="button" href="' . tep_href_link(adminGroup::FILENAME) . '">' . IMAGE_CANCEL . '</a>';?>
+ </div>
+<div class="box_uniq">
+ <table style="width:100%">
+ <thead>
+ <tr>
+ <th colspan=2 ><?php echo __('table heading groups define'); ?></th>
+ </tr>
+ </thead>
+ <tbody>
+ <?php
+ $menu=menu::getInstance();
+ $hierac_menu=$menu->cstr_return(array('for_user'=>$_GET['gID']));
+ $menu=$hierac_menu;
+ $file_count = 0;
+ while ($fils = each($menu)) {
+ $file_count++;
+ $group_boxes=$fils['value'];
+ $group_boxes['admin_boxes_id']=$fils['value']['admin_files_id'];
+ $group_boxes['admin_boxes_name']=$fils['value']['admin_files_name'];
+
+ $groupsArray=array();
+
+ if (_test_bool($group_boxes['etat'])) {
+ $del_boxes = array($_GET['gID']);
+ $groupsArray[]=$_GET['gID'];
+ $result = array_diff ($groupsArray, $del_boxes);
+ sort($result);
+ $checkedBox = $group_boxes['admin_boxes_id'];
+ $uncheckedBox = implode (",", $result);
+ $checked = true;
+ } else {
+ $add_boxes = array($_GET['gID']);
+ $result = array_merge ($add_boxes, $groupsArray);
+ sort($result);
+ $checkedBox = implode (",", $result);
+ $uncheckedBox = $group_boxes['admin_boxes_id'];
+ $checked = false;
+ }
+ ?>
+ <tr class="dataTableRowBoxes" id="afi_<?php echo $group_boxes['admin_boxes_id'] ?>">
+ <td width="40"><?php echo adminGroup::status_flag($checked,'action=setflag&gID='.$_GET['gID'].'&admin_boxes_id='.$group_boxes['file']); ?></td>
+ <td><b><?php echo ucwords($group_boxes['admin_boxes_name']) . ' ' . tep_draw_hidden_field('checked_' . $group_boxes['admin_boxes_id'], '', $checkedBox) . tep_draw_hidden_field('unchecked_' . $group_boxes['admin_boxes_id'], '', $uncheckedBox); ?></b></td>
+ </tr>
+ <tr class="dataTableRow">
+ <td> </td>
+ <td>
+ <?php
+ if (!function_exists('list_hierac')){
+ function list_hierac($menu,$class_fils=''){
+ global $group_boxes;
+
+ while ($fils = each($menu)) {
+ $group_boxes_files=$fils['value'];
+ $group_boxes_files['admin_boxes_id']=$group_boxes_files['admin_files_id'];
+ $group_boxes_files['admin_boxes_name']=$group_boxes_files['admin_files_name'];
+ $groupsArray =array();
+
+ if ($group_boxes_files['etat'] ==true) {
+ $del_boxes = array($_GET['gID']);
+ $groupsArray[]=$_GET['gID'];
+ $result = array_diff ($groupsArray, $del_boxes);
+ sort($result);
+ $checkedBox = $group_boxes_files['admin_boxes_id'];;
+ $uncheckedBox = implode (",", $result);
+ $checked = true;
+ } else {
+ $add_boxes = array($_GET['gID']);
+ $result = array_merge ($add_boxes, $groupsArray);
+ sort($result);
+ $checkedBox = implode (",", $result);
+ $uncheckedBox = '';
+ $checked = false;
+ }
+ preg_match("#(.*)[?](.*)#i",$group_boxes_files['admin_files_name'],$regi);
+ $page_box=(empty($regi[1])) ? $group_boxes_files['admin_files_name'] : $regi[1] ;
+ ?>
+ <p style="clear:both; padding:0 1em;" class="view parent dataTableRow" >
+ <span style="width:40px" class="fleft"><?php echo adminGroup::status_flag($checked,'action=setflag&gID='.$_GET['gID'].'&admin_files_id='.$group_boxes_files['admin_files_id'],'#afi_'.$group_boxes['admin_boxes_id']); //tep_draw_checkbox_field('groups_to_boxes[]', 'ubgroups_' . $group_boxes['admin_boxes_id'], $group_boxes_files['admin_files_id'], $checked, '', 'onclick="checkSub(this)"') ?></span>
+ <span class="fleft"><?php echo $group_boxes_files['admin_files_name'] ?></span>
+ <?php echo tep_draw_hidden_field('menu_id_' . $group_boxes_files['admin_files_id'], '', $group_boxes_files['admin_files_id']) . tep_draw_hidden_field('unchecked_' . $group_boxes_files['admin_files_id'], '', $uncheckedBox);?>
+ <span class="view fils fright">
+ </span>
+ </p>
+ <?php /*} */
+
+ if (isset($group_boxes_files['fils']) && is_array($group_boxes_files['fils'])) list_hierac($group_boxes_files['fils'],'hierac_enfant');
+ } /* Fin de while*/
+ }
+ }/* Fin de function */
+
+ list_hierac($group_boxes['fils']);
+ ?>
+ </td>
+ </tr>
+ <?php } ?>
+ </tbody>
+ </table>
+
+</form>
\ No newline at end of file
Added: trunk/catalog/admin/includes/gabarit/adminGroup/display_view.delete.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/adminGroup/display_view.delete.gab (rev 0)
+++ trunk/catalog/admin/includes/gabarit/adminGroup/display_view.delete.gab 2011-12-28 22:39:08 UTC (rev 3993)
@@ -0,0 +1,42 @@
+<?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 17/12/11, 09:32
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+
+?>
+<h3><?php echo __('text info heading delete groups') ?></h3>
+
+<?php echo tep_draw_form('newsletter', adminGroup::FILENAME, 'action=delete_confirm' , 'post' ); ?>
+ <div class="box_uniq">
+ <p><?php echo tep_draw_hidden_field('gID', '', (int)adminGroup::$gInfo->admin_groups_id ); ?></p>
+ <fieldset class="block_field">
+
+ <?php if (adminGroup::$gInfo->admin_groups_id == 1) : ?>
+ <p class="block_input">
+ <?php echo sprintf(__('text info delete groups intro not'), adminGroup::$gInfo->admin_groups_name) ; ?>
+ </p>
+ <?php else : ?>
+ <p class="block_input">
+ <label for="set_groups_id" > <?php echo sprintf(__('text info delete groups intro'), adminGroup::$gInfo->admin_groups_name); ?></label>
+ <?php echo tep_draw_hidden_field('set_groups_id', '', substr($del_groups_prepare, 4)); ?>
+ </p>
+ <?php endif; ?>
+
+ </fieldset>
+
+
+ <div class="button_nav">
+ <?php if (adminGroup::$gInfo->admin_groups_id != 1) echo tep_image_submit('button_delete.gif', IMAGE_DELETE) ;
+ echo tep_js_back(tep_href_link(adminGroup::FILENAME), IMAGE_CANCEL); ?>
+
+ </div>
+
+ </div>
+
+</form>
\ No newline at end of file
Added: trunk/catalog/admin/includes/gabarit/adminGroup/display_view.edit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/adminGroup/display_view.edit.gab (rev 0)
+++ trunk/catalog/admin/includes/gabarit/adminGroup/display_view.edit.gab 2011-12-28 22:39:08 UTC (rev 3993)
@@ -0,0 +1,36 @@
+<?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 17/12/11, 09:32
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+
+?>
+<h3><?php echo __('text info heading edit group') ?></h3>
+
+<?php echo tep_draw_form('newsletter', adminGroup::FILENAME, 'action=group_edit' , 'post' ); ?>
+ <div class="box_uniq">
+ <p><?php if (adminGroup::$action == 'edit') echo tep_draw_hidden_field('newsletter_id', '', (int)$_GET['gID'] ); ?></p>
+ <fieldset class="block_field">
+
+ <p class="block_input">
+ <label for="title" title="<?php echo __('text info edit group intro') ; ?>"> <?php echo __('text newsletter title') . tep_image(DIR_WS_ICONS.'icon_help.gif'); ?></label>
+ <?php echo tep_draw_input_field('admin_groups_name','', adminGroup::$gInfo->admin_groups_name); ?>
+ </p>
+
+
+ </fieldset>
+
+
+ <div class="button_nav">
+ <?php echo ((adminGroup::$action == 'new') ? tep_image_submit('button_save.gif', IMAGE_SAVE) : tep_image_submit('button_update.gif', IMAGE_UPDATE));
+ echo '<a class="button" href="' . tep_href_link(adminGroup::FILENAME) . '">' . IMAGE_CANCEL . '</a>'; ?>
+ </div>
+
+ </div>
+
+</form>
\ No newline at end of file
Copied: trunk/catalog/admin/includes/gabarit/adminGroup/display_view.listing.gab (from rev 3984, trunk/catalog/admin/includes/gabarit/adminGroup.listing.gab)
===================================================================
--- trunk/catalog/admin/includes/gabarit/adminGroup/display_view.listing.gab (rev 0)
+++ trunk/catalog/admin/includes/gabarit/adminGroup/display_view.listing.gab 2011-12-28 22:39:08 UTC (rev 3993)
@@ -0,0 +1,53 @@
+<?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 17/12/11, 09:32
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+?>
+<h3><?php echo __('heading title'); ?></h3>
+
+
+<div class="button_nav">
+ <?php echo ' <a class="button" href="' . tep_href_link(adminGroup::FILENAME, 'action=new') . '">' .tep_image(DIR_WS_ICONS . 'icon_add_new.png',IMAGE_NEW_GROUP). IMAGE_NEW_GROUP . '</a>'; ?>
+</div>
+
+<div class="box_uniq">
+
+ <table class="dataTable">
+ <thead>
+ <tr>
+ <th><?php echo __('table heading groups name'); ?></th>
+ <th class="tright"><?php echo __('table heading action'); ?></th>
+ </tr>
+ </thead>
+ <tfoot>
+ <tr>
+ <td colspan="2"><?php echo __('text count groups') . adminGroup::$count_groups; ?></td>
+ </tr>
+ </tfoot>
+ <tbody>
+ <?php foreach(adminGroup::$list as $groups){ ?>
+ <tr class="view parent dataTableRow <?php if(isset($_GET['gID']) && $_GET['gID'] == $groups['admin_groups_id']) echo "Selected"; ?>" >
+ <td><strong><?php echo $groups['admin_groups_name']; ?></strong></td>
+ <td class="tright">
+ <span class="view fils fright">
+ <?php
+// if (adminGroup::$gInfo->admin_groups_id != 1)
+ echo ' <a class="buttonimg" href="' . tep_href_link(adminGroup::FILENAME, 'gID=' . $groups['admin_groups_id'] . '&action=define_group') . '">' . tep_image(DIR_WS_ICONS . 'locked.gif',__('define groups') ). '</a> ';
+
+ echo ' <a class="buttonimg" href="' . tep_href_link(FILENAME_ADMINUSERS, 'group_id=' . $groups['admin_groups_id'] . '&action=new_member') . '">' . tep_image(DIR_WS_ICONS . 'icon_add_new.png', __('new membre') ). '</a> ';
+ echo ' <a class="buttonimg" href="' . tep_href_link(adminGroup::FILENAME, 'gID=' . $groups['admin_groups_id'] . '&action=edit') . '">' . tep_image(DIR_WS_ICONS . 'icon_edit.png',IMAGE_EDIT ). '</a> ';
+
+ if($groups['admin_groups_id'] !=1) echo '<a class="buttonimg fancy" href="' . tep_href_link(adminGroup::FILENAME, 'gID=' . $groups['admin_groups_id'] . '&action=delete') . '">' . tep_image(DIR_WS_ICONS . 'icon_delete.png',IMAGE_DELETE).'</a>'; ?>
+ </span>
+ </td>
+ </tr>
+ <?php } ?>
+ </tbody>
+ </table>
+</div>
\ No newline at end of file
Deleted: trunk/catalog/admin/includes/gabarit/adminGroup.listing.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/adminGroup.listing.gab 2011-12-28 18:47:34 UTC (rev 3992)
+++ trunk/catalog/admin/includes/gabarit/adminGroup.listing.gab 2011-12-28 22:39:08 UTC (rev 3993)
@@ -1,54 +0,0 @@
-<?php
-/**
- @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
- @package osCSS-2 <www http://www.oscss.org>
- @version 2.0.9
- @date 17/07/10, 16:35
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-8
-*/
-?>
-<h3><?php echo __('heading title'); ?></h3>
-
-
-<div class="button_nav">
- <?php echo ' <a class="button" href="' . tep_href_link(adminGroup::FILENAME, 'action=new') . '">' .tep_image(DIR_WS_ICONS . 'icon_add_new.png',IMAGE_NEW_GROUP). IMAGE_NEW_GROUP . '</a>'; ?>
-</div>
-
-<div class="box_uniq">
- <div class="box_left">
- <table class="dataTable">
- <thead>
- <tr>
- <th><?php echo __('table heading groups name'); ?></th>
- <th class="tright"><?php echo __('table heading action'); ?></th>
- </tr>
- </thead>
- <tfoot>
- <tr>
- <td colspan="2"><?php echo __('text count groups') . adminGroup::$count_groups; ?></td>
- </tr>
- </tfoot>
- <tbody>
- <?php foreach(adminGroup::$list as $groups){ ?>
- <tr class="view parent dataTableRow <?php if(isset($_GET['gID']) && $_GET['gID'] == $groups['admin_groups_id']) echo "Selected"; ?>" >
- <td><strong><?php echo $groups['admin_groups_name']; ?></strong></td>
- <td class="tright">
- <span class="view fils fleft">
- <?php echo ' <a class="buttonimg" href="' . tep_href_link(adminGroup::FILENAME, 'gID=' . $groups['admin_groups_id'] . '&action=edit') . '">' . tep_image(DIR_WS_ICONS . 'icon_edit.png',IMAGE_EDIT ). '</a> <a class="buttonimg" href="' . tep_href_link(adminGroup::FILENAME, 'gID=' . $groups['admin_groups_id'] . '&action=delete') . '">' . tep_image(DIR_WS_ICONS . 'icon_delete.png',IMAGE_DELETE).'</a>'; ?>
- </span>
- <span class="fright">
- <?php if (isset($_GET['gID']) && $groups['admin_groups_id'] == $_GET['gID']) { echo tep_image(DIR_WS_ICONS . 'icon_arrow_right.gif'); }
- else { echo '<a href="' . tep_href_link(adminGroup::FILENAME, 'gID=' . $groups['admin_groups_id']) . '">' . tep_image(DIR_WS_ICONS . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?>
- </span>
- </td>
- </tr>
- <?php } ?>
- </tbody>
- </table>
- </div>
-
- <div class="box_right">
- <?php echo adminGroup::get_right_bar(); ?>
- </div>
-</div>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/header.php
===================================================================
--- trunk/catalog/admin/includes/header.php 2011-12-28 18:47:34 UTC (rev 3992)
+++ trunk/catalog/admin/includes/header.php 2011-12-28 22:39:08 UTC (rev 3993)
@@ -67,6 +67,19 @@
$('#tabs, .tabs').tabs({cookie: {expires:30}}).find('.ui-tabs-nav').sortable({axis:'x'});
$('.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;
+ });
+ });
+
}
Added: trunk/catalog/admin/includes/javascript/modules/pages/adminGroup.js.php
===================================================================
-...
[truncated message content] |
|
From: <os...@us...> - 2011-12-28 18:47:40
|
Revision: 3992
http://oscss.svn.sourceforge.net/oscss/?rev=3992&view=rev
Author: oscim
Date: 2011-12-28 18:47:34 +0000 (Wed, 28 Dec 2011)
Log Message:
-----------
FS#955
Modified Paths:
--------------
trunk/catalog/admin/includes/boxes/04_tools.php
trunk/catalog/admin/includes/gabarit/adminAccount.page.gab
Modified: trunk/catalog/admin/includes/boxes/04_tools.php
===================================================================
--- trunk/catalog/admin/includes/boxes/04_tools.php 2011-12-27 23:18:21 UTC (rev 3991)
+++ trunk/catalog/admin/includes/boxes/04_tools.php 2011-12-28 18:47:34 UTC (rev 3992)
@@ -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, 22:06
+ @date 28/12/11, 22:06
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -12,9 +12,10 @@
$tabl_link[600]= array(FILENAME_STATS, 'BOX_REPORTS', 'stats',@$img['whos_online']);
/* Calcul des module de stats et rapport*/
foreach(scan(DIR_FS_ADMIN .DIR_WS_MODULES.'stats/') as $file)
- if (substr("$file", -4) == '.php') {
- $name=substr("$file",0,strlen($file)-4);
- $tabl_link[600][4][]=array(FILENAME_STATS.'?module='.$name, ''.$name, 'stats '.$name,@$img[$name]);
+ if (substr("$file", -4) == '.php')
+ if( (_cst_bool('STOCK_CHECK') && preg_match("#(stock)#i", $file)) || !preg_match("#(stock)#i", $file) ){
+ $name=substr("$file",0,strlen($file)-4);
+ $tabl_link[600][4][]=array(FILENAME_STATS.'?module='.$name, ''.$name, 'stats '.$name,@$img[$name]);
}
$tabl_link[]= array(FILENAME_GOOGLE_SITEMAP, 'BOX_TOOLS_GOOGLE_SITEMAP', 'ggmap',@$img['ggmap']);
Modified: trunk/catalog/admin/includes/gabarit/adminAccount.page.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/adminAccount.page.gab 2011-12-27 23:18:21 UTC (rev 3991)
+++ trunk/catalog/admin/includes/gabarit/adminAccount.page.gab 2011-12-28 18:47:34 UTC (rev 3992)
@@ -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 13/06/11, 18:20
+ @version 2.1.1
+ @date 28/12/11, 18:20
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@brief content admin account detail
@@ -68,8 +68,11 @@
<p class="block_input"><?php echo __('rss tools links user'); ?></p>
<ul class="block_input">
- <?php foreach(scan(DIR_WS_INCLUDES.'rss/') as $item): if(substr($item, -3) =='php') : ?>
- <li><a href="<?php echo tep_href_link('rss.php','box='.substr($item,0, -4)) ; ?>"> <?php echo tep_href_link('rss.php','box='.substr($item,0, -4)) ?></a></li>
+ <?php foreach(scan(DIR_WS_INCLUDES.'rss/') as $item):
+ if(substr($item, -3) =='php') :
+ if( (_cst_bool('STOCK_CHECK') && preg_match("#(stock)#i", $item)) || !preg_match("#(stock)#i", $item) ): ?>
+ <li><a href="<?php echo tep_href_link('rss.php','box='.substr($item,0, -4)) ; ?>"> <?php echo tep_href_link('rss.php','box='.substr($item,0, -4)) ?></a></li>
+ <?php endif; ?>
<?php endif; endforeach; ?>
</ul>
<div class="separator"></div>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2011-12-27 23:18:27
|
Revision: 3991
http://oscss.svn.sourceforge.net/oscss/?rev=3991&view=rev
Author: oscim
Date: 2011-12-27 23:18:21 +0000 (Tue, 27 Dec 2011)
Log Message:
-----------
correction coquille sur le liens vers le folio de oscss.org
Modified Paths:
--------------
trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/languages/en_EN/template.php
trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/languages/fr_FR/template.php
trunk/catalog/install/data/templates/appareil_photo/electronix/includes/languages/en_EN/template.php
trunk/catalog/install/data/templates/appareil_photo/electronix/includes/languages/fr_FR/template.php
Modified: trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/languages/en_EN/template.php
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/languages/en_EN/template.php 2011-12-27 23:15:28 UTC (rev 3990)
+++ trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/languages/en_EN/template.php 2011-12-27 23:18:21 UTC (rev 3991)
@@ -20,7 +20,7 @@
<li>* Go to the <a href=\"http://wiki.oscss.org\">documentation</a></li>
<li>* Add <a href=\"http://plugins.oscss.org\">extensions</a></li>
<li>* Report your <a href=\"http://dev.oscss.org\">bugs</a></li>
- <li>* Submit your <a href=\"http://folio.oscss.org\">sites</a></li>
+ <li>* Submit your <a href=\"http://dir.oscss.org\">sites</a></li>
<li>* Download the latest version of <a href=\"http://download.oscss.org\">osCSS</a></li>
<li>* Stay informed <a href=\"http://twitter.com/osCSS\">twitter</a></li>
</ul>
Modified: trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/languages/fr_FR/template.php
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/languages/fr_FR/template.php 2011-12-27 23:15:28 UTC (rev 3990)
+++ trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/languages/fr_FR/template.php 2011-12-27 23:18:21 UTC (rev 3991)
@@ -19,7 +19,7 @@
<li>Accedez à la <a href=\"http://wiki.oscss.org\">documentation</a></li>
<li>Ajoutez des <a href=\"http://plugins.oscss.org\">extensions</a></li>
<li>Reportez vos <a href=\"http://dev.oscss.org\">bugs</a></li>
-<li>Publiez vos <a href=\"http://folio.oscss.org\">sites</a></li>
+<li>Publiez vos <a href=\"http://dir.oscss.org\">sites</a></li>
<li>Télécharger la nouvelle version d'<a href=\"http://download.oscss.org\">osCSS</a></li>
<li>Tenez vous informé <a href=\"http://twitter.com/osCSS\">twitter</a></li>
</ul>
@@ -40,7 +40,7 @@
<ul>
<li>- Les templates gratuit d'osCSS sont fournis en vertu de cet accord, qui tient compte de l'usage de nos travaux mais ne transfèrent pas la propriété. Les templates demeurent la propriété de leurs auteurs respectifs</li>
<li>- Vous pouvez employer les templates d'osCSS dans tout projet commercial autant de fois que souhaitée selon le respect des termes et conditions générales</li>
- <li>-. Toutes les utilisations autres que celles mentionnées ci-dessus doivent être approuvées par osCSS par écrit.</li>
+ <li>- Toutes les utilisations autres que celles mentionnées ci-dessus doivent être approuvées par osCSS par écrit.</li>
<li>- L'utilisation non autorisée aura comme conséquence l'arrêt immédiat de ces conditions d'utilisation, et avec elle, vos droits d'employer les travaux d'osCSS.</li>
<li>- Vous pouvez modifier et créer des travaux dérivés de templates osCSS en précisant bien que le template est une version dérivé d'un template osCSS.</li>
<li>- Vous devez mettre un lien retour avec les crédits à osCSS <i>(exemple en pied de page : <a href=\"http://www.oscss.org\">Template gratuit par osCSS</a>)</i>.</li>
Modified: trunk/catalog/install/data/templates/appareil_photo/electronix/includes/languages/en_EN/template.php
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/electronix/includes/languages/en_EN/template.php 2011-12-27 23:15:28 UTC (rev 3990)
+++ trunk/catalog/install/data/templates/appareil_photo/electronix/includes/languages/en_EN/template.php 2011-12-27 23:18:21 UTC (rev 3991)
@@ -20,7 +20,7 @@
<li>* Go to the <a href=\"http://wiki.oscss.org\">documentation</a></li>
<li>* Add <a href=\"http://plugins.oscss.org\">extensions</a></li>
<li>* Report your <a href=\"http://dev.oscss.org\">bugs</a></li>
- <li>* Submit your <a href=\"http://folio.oscss.org\">sites</a></li>
+ <li>* Submit your <a href=\"http://dir.oscss.org\">sites</a></li>
<li>* Download the latest version of <a href=\"http://download.oscss.org\">osCSS</a></li>
<li>* Stay informed <a href=\"http://twitter.com/osCSS\">twitter</a></li>
</ul>
Modified: trunk/catalog/install/data/templates/appareil_photo/electronix/includes/languages/fr_FR/template.php
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/electronix/includes/languages/fr_FR/template.php 2011-12-27 23:15:28 UTC (rev 3990)
+++ trunk/catalog/install/data/templates/appareil_photo/electronix/includes/languages/fr_FR/template.php 2011-12-27 23:18:21 UTC (rev 3991)
@@ -19,7 +19,7 @@
<li>Accedez à la <a href=\"http://wiki.oscss.org\">documentation</a></li>
<li>Ajoutez des <a href=\"http://plugins.oscss.org\">extensions</a></li>
<li>Reportez vos <a href=\"http://dev.oscss.org\">bugs</a></li>
-<li>Publiez vos <a href=\"http://folio.oscss.org\">sites</a></li>
+<li>Publiez vos <a href=\"http://dir.oscss.org\">sites</a></li>
<li>Télécharger la nouvelle version d'<a href=\"http://download.oscss.org\">osCSS</a></li>
<li>Tenez vous informé <a href=\"http://twitter.com/osCSS\">twitter</a></li>
</ul>
@@ -40,7 +40,7 @@
<ul>
<li>- Les templates gratuit d'osCSS sont fournis en vertu de cet accord, qui tient compte de l'usage de nos travaux mais ne transfèrent pas la propriété. Les templates demeurent la propriété de leurs auteurs respectifs</li>
<li>- Vous pouvez employer les templates d'osCSS dans tout projet commercial autant de fois que souhaitée selon le respect des termes et conditions générales</li>
- <li>-. Toutes les utilisations autres que celles mentionnées ci-dessus doivent être approuvées par osCSS par écrit.</li>
+ <li>- Toutes les utilisations autres que celles mentionnées ci-dessus doivent être approuvées par osCSS par écrit.</li>
<li>- L'utilisation non autorisée aura comme conséquence l'arrêt immédiat de ces conditions d'utilisation, et avec elle, vos droits d'employer les travaux d'osCSS.</li>
<li>- Vous pouvez modifier et créer des travaux dérivés de templates osCSS en précisant bien que le template est une version dérivé d'un template osCSS.</li>
<li>- Vous devez mettre un lien retour avec les crédits à osCSS <i>(exemple en pied de page : <a href=\"http://www.oscss.org\">Template gratuit par osCSS</a>)</i>.</li>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2011-12-27 23:15:35
|
Revision: 3990
http://oscss.svn.sourceforge.net/oscss/?rev=3990&view=rev
Author: oscim
Date: 2011-12-27 23:15:28 +0000 (Tue, 27 Dec 2011)
Log Message:
-----------
Correction et mise a jour de la localisation des fichiers de gabarit et correction langue fr
Modified Paths:
--------------
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/cronjob.txt
trunk/catalog/admin/includes/modules/pages/cronjob.php
Added Paths:
-----------
trunk/catalog/admin/includes/gabarit/cronjob/
trunk/catalog/admin/includes/gabarit/cronjob/display_view.delete.gab
trunk/catalog/admin/includes/gabarit/cronjob/display_view.edit.gab
trunk/catalog/admin/includes/gabarit/cronjob/display_view.listing.gab
Removed Paths:
-------------
trunk/catalog/admin/includes/gabarit/cronjob.delete.gab
trunk/catalog/admin/includes/gabarit/cronjob.edit.gab
trunk/catalog/admin/includes/gabarit/cronjob.listing.gab
Copied: trunk/catalog/admin/includes/gabarit/cronjob/display_view.delete.gab (from rev 3984, trunk/catalog/admin/includes/gabarit/cronjob.delete.gab)
===================================================================
--- trunk/catalog/admin/includes/gabarit/cronjob/display_view.delete.gab (rev 0)
+++ trunk/catalog/admin/includes/gabarit/cronjob/display_view.delete.gab 2011-12-27 23:15:28 UTC (rev 3990)
@@ -0,0 +1,18 @@
+<?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, 21:45
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+?>
+<h3><?php echo __('heading title delete') ?></h3>
+
+<?php echo tep_draw_form('delete', cronjob::FILENAME, '&cID='.$_GET['cID'].'&action=deleteconfirm', 'post') ?>
+
+<?php echo tep_image_submit('', IMAGE_DELETE). tep_js_back(tep_href_link(cronjob::FILENAME), IMAGE_CANCEL) ; ?>
+
+</form>
\ No newline at end of file
Copied: trunk/catalog/admin/includes/gabarit/cronjob/display_view.edit.gab (from rev 3984, trunk/catalog/admin/includes/gabarit/cronjob.edit.gab)
===================================================================
--- trunk/catalog/admin/includes/gabarit/cronjob/display_view.edit.gab (rev 0)
+++ trunk/catalog/admin/includes/gabarit/cronjob/display_view.edit.gab 2011-12-27 23:15:28 UTC (rev 3990)
@@ -0,0 +1,73 @@
+<?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, 21:45
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+
+?>
+<h3><?php echo __('heading title edit'); ?></h3>
+
+ <div class="button_nav">
+ <?php echo '<a class="button" href="' . tep_href_link(cronjob::FILENAME,'action=new') . '">' .tep_image(DIR_WS_ICONS.'icon_add_new.png',IMAGE_INSERT ) . __('image insert job') . '</a>'; ?>
+ </div>
+
+<div class="box_uniq block_form">
+ <?php echo tep_draw_form('categories', cronjob::FILENAME, 'action='.((cronjob::$action == 'new')?'insert' : 'update&cID='.$_GET['cID']), 'post', 'enctype="multipart/form-data"') ?>
+
+
+ <p class="block_input">
+ <Label><?php echo __('definir le module utilise') ?></label>
+ <?php echo tep_draw_pull_down_menu('name', cronjob::list_of_module(),cronjob::$cInfo->name.'.php', '', true) ?>
+ </p>
+
+ <p class="block_input">
+ <Label for="time_interval"><?php echo __('definir le delai de repetition') ?></label>
+ <?php echo tep_draw_pull_down_menu('time_interval', cronjob::$interval,cronjob::$cInfo->time_interval, '', true) //tep_draw_input_field('time_interval', '', cronjob::$cInfo->time_interval, 'size="2"').__('valeur en minute') ?>
+ </p>
+
+ <p class="block_input">
+ <Label><?php echo __("definir la date de premiere execution") ?></label>
+ <?php echo tep_draw_input_field('fire_time', '', tep_not_null(cronjob::$cInfo->fire_time) ? tep_date_short(cronjob::$cInfo->fire_time) : '', ' maxlength="10" size="10"') .tep_draw_input_field('fire_time_begin_hour','',isset( cronjob::$cInfo->begin_hour) ? substr(cronjob::$cInfo->begin_hour, 10) : '','maxlength="5" size="5"'). tep_draw_hidden_field('bt_fire_time') ?>
+ </p>
+
+ <p class="block_input">
+ <Label><?php echo __("definir si l'execution est unique") ?></label>
+ <?php echo tep_draw_pull_down_menu('run_only_once',array(array('id'=>0,'text'=>__('txt repetition')), array('id'=>1,'text'=>__('txt unique'))),cronjob::$cInfo->run_only_once, '', true) ?>
+ </p>
+
+
+
+
+ <div id="CronModedit" >
+
+ <?php if (cronjob::$action != 'new' && cronjob::$ConfigCount>0) : ?>
+ <fieldset class="tabs block_field">
+ <ul>
+ <?php foreach(cronjob::$mInfo as $k=>$v): ?>
+ <li><a href="#tabs-<?php echo $k ?>"><?php echo $v['text']; ?></a></li>
+ <?php endforeach; ?>
+ </ul>
+
+ <?php foreach(cronjob::$mInfo as $k=>$v): ?>
+ <div id="tabs-<?php echo $k ?>" class="tabPage">
+ <?php echo cronjob::EditCronMod($k); ?>
+ </div>
+ <?php endforeach; ?>
+
+ </fieldset>
+
+ <?php endif; ?>
+ </div>
+
+ <p class="block_input button_nav">
+ <?php echo (cronjob::$action == 'new')? tep_image_submit('', IMAGE_INSERT) : tep_image_submit('', IMAGE_UPDATE_AND_CLOSE,' name="up_and_close"' ); ?>
+ <?php echo tep_js_back(tep_href_link(cronjob::FILENAME), IMAGE_CANCEL) ?>
+ </p>
+
+ </form>
+</div>
Copied: trunk/catalog/admin/includes/gabarit/cronjob/display_view.listing.gab (from rev 3984, trunk/catalog/admin/includes/gabarit/cronjob.listing.gab)
===================================================================
--- trunk/catalog/admin/includes/gabarit/cronjob/display_view.listing.gab (rev 0)
+++ trunk/catalog/admin/includes/gabarit/cronjob/display_view.listing.gab 2011-12-27 23:15:28 UTC (rev 3990)
@@ -0,0 +1,56 @@
+<?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, 21:45
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+?>
+<h3><?php echo __('heading title'); ?></h3>
+
+ <div class="button_nav">
+ <?php echo '<a class="button" href="' . tep_href_link(cronjob::FILENAME,'action=new') . '">' .tep_image(DIR_WS_ICONS.'icon_add_new.png',IMAGE_INSERT ) . __('image insert job') . '</a>'; ?>
+ </div>
+
+<div class="box_uniq">
+
+ <table width="100%" class="dataTable">
+ <thead>
+ <tr>
+ <th class="tcenter"><?php echo __('table heading id'); ?></th>
+ <th><?php echo __('table heading name'); ?></th>
+ <th class="tcenter"><?php echo __('table heading time_interval'); ?></th>
+ <th class="tcenter"><?php echo __('table heading fire_time'); ?></th>
+ <th class="tcenter"><?php echo __('table heading time_last_fired'); ?></th>
+ <th class="row_status"><?php echo __('table heading run_only_once'); ?></th>
+ <th class="row_status"><?php echo __('table heading status'); ?></th>
+ <th class="row_action"><?php echo __('table heading action'); ?></th>
+ </tr>
+ </thead>
+ <tfoot>
+ <tr>
+ <td class="tcenter" style="width:10px"> </td>
+ <td class="tleft" width="30%"> </td>
+ <td class="tcenter"> </td>
+ <td class="tcenter"> </td>
+ <td class="tcenter"> </td>
+ <td class="tcenter row_status"> </td>
+ <td class="tcenter row_status"> </td>
+ <td class="row_action"> </td>
+ </tr>
+ </tfoot>
+ <tbody>
+ <!-- BLOCK AJAX -->
+ </tbody>
+ </table>
+ <div class="text"><?php echo __('txt detail usage'); ?>
+ <h4><?php echo __('txt detail usage http'); ?></h4>
+ <pre><?php echo tep_get_http().DIR_WS_ADMIN ?>cronfile.php</pre>
+ <h4><?php echo __('txt detail usage phpcli'); ?></h4>
+ <pre>php <?php echo DIR_WS_ADMIN ?>cronfile.php</pre>
+ </div>
+</div>
+
Deleted: trunk/catalog/admin/includes/gabarit/cronjob.delete.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/cronjob.delete.gab 2011-12-27 10:47:11 UTC (rev 3989)
+++ trunk/catalog/admin/includes/gabarit/cronjob.delete.gab 2011-12-27 23:15:28 UTC (rev 3990)
@@ -1,18 +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 08/10/10, 22:17
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-8
-*/
-?>
-<h3><?php echo __('heading title delete') ?></h3>
-
-<?php echo tep_draw_form('delete', cronjob::FILENAME, '&cID='.$_GET['cID'].'&action=deleteconfirm', 'post') ?>
-
-<?php echo tep_image_submit('', IMAGE_DELETE). tep_js_back(tep_href_link(cronjob::FILENAME), IMAGE_CANCEL) ; ?>
-
-</form>
\ No newline at end of file
Deleted: trunk/catalog/admin/includes/gabarit/cronjob.edit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/cronjob.edit.gab 2011-12-27 10:47:11 UTC (rev 3989)
+++ trunk/catalog/admin/includes/gabarit/cronjob.edit.gab 2011-12-27 23:15:28 UTC (rev 3990)
@@ -1,73 +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.0
- @date 10/04/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="button_nav">
- <?php echo '<a class="button" href="' . tep_href_link(cronjob::FILENAME,'action=new') . '">' .tep_image(DIR_WS_ICONS.'icon_add_new.png',IMAGE_INSERT ) . __('image insert job') . '</a>'; ?>
- </div>
-
-<div class="box_uniq block_form">
- <?php echo tep_draw_form('categories', cronjob::FILENAME, 'action='.((cronjob::$action == 'new')?'insert' : 'update&cID='.$_GET['cID']), 'post', 'enctype="multipart/form-data"') ?>
-
-
- <p class="block_input">
- <Label><?php echo __('definir le module utilise') ?></label>
- <?php echo tep_draw_pull_down_menu('name', cronjob::list_of_module(),cronjob::$cInfo->name.'.php', '', true) ?>
- </p>
-
- <p class="block_input">
- <Label for="time_interval"><?php echo __('definir le delai de repetition') ?></label>
- <?php echo tep_draw_pull_down_menu('time_interval', cronjob::$interval,cronjob::$cInfo->time_interval, '', true) //tep_draw_input_field('time_interval', '', cronjob::$cInfo->time_interval, 'size="2"').__('valeur en minute') ?>
- </p>
-
- <p class="block_input">
- <Label><?php echo __("definir la date de premiere execution") ?></label>
- <?php echo tep_draw_input_field('fire_time', '', tep_not_null(cronjob::$cInfo->fire_time) ? tep_date_short(cronjob::$cInfo->fire_time) : '', ' maxlength="10" size="10"') .tep_draw_input_field('fire_time_begin_hour','',isset( cronjob::$cInfo->begin_hour) ? substr(cronjob::$cInfo->begin_hour, 10) : '','maxlength="5" size="5"'). tep_draw_hidden_field('bt_fire_time') ?>
- </p>
-
- <p class="block_input">
- <Label><?php echo __("definir si l'execution est unique") ?></label>
- <?php echo tep_draw_pull_down_menu('run_only_once',array(array('id'=>0,'text'=>__('txt repetition')), array('id'=>1,'text'=>__('txt unique'))),cronjob::$cInfo->run_only_once, '', true) ?>
- </p>
-
-
-
-
- <div id="CronModedit" >
-
- <?php if (cronjob::$action != 'new' && cronjob::$ConfigCount>0) : ?>
- <fieldset class="tabs block_field">
- <ul>
- <?php foreach(cronjob::$mInfo as $k=>$v): ?>
- <li><a href="#tabs-<?php echo $k ?>"><?php echo $v['text']; ?></a></li>
- <?php endforeach; ?>
- </ul>
-
- <?php foreach(cronjob::$mInfo as $k=>$v): ?>
- <div id="tabs-<?php echo $k ?>" class="tabPage">
- <?php echo cronjob::EditCronMod($k); ?>
- </div>
- <?php endforeach; ?>
-
- </fieldset>
-
- <?php endif; ?>
- </div>
-
- <p class="block_input button_nav">
- <?php echo (cronjob::$action == 'new')? tep_image_submit('', IMAGE_INSERT) : tep_image_submit('', IMAGE_UPDATE_AND_CLOSE,' name="up_and_close"' ); ?>
- <?php echo tep_js_back(tep_href_link(cronjob::FILENAME), IMAGE_CANCEL) ?>
- </p>
-
- </form>
-</div>
Deleted: trunk/catalog/admin/includes/gabarit/cronjob.listing.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/cronjob.listing.gab 2011-12-27 10:47:11 UTC (rev 3989)
+++ trunk/catalog/admin/includes/gabarit/cronjob.listing.gab 2011-12-27 23:15:28 UTC (rev 3990)
@@ -1,51 +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.0
- @date 29/03/11, 15:44
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-8
-*/
-?>
-<h3><?php echo __('heading title'); ?></h3>
-
- <div class="button_nav">
- <?php echo '<a class="button" href="' . tep_href_link(cronjob::FILENAME,'action=new') . '">' .tep_image(DIR_WS_ICONS.'icon_add_new.png',IMAGE_INSERT ) . __('image insert job') . '</a>'; ?>
- </div>
-
-<div class="box_uniq">
-
- <table width="100%" class="dataTable">
- <thead>
- <tr>
- <th class="tcenter"><?php echo __('table heading id'); ?></th>
- <th><?php echo __('table heading name'); ?></th>
- <th class="tcenter"><?php echo __('table heading time_interval'); ?></th>
- <th class="tcenter"><?php echo __('table heading fire_time'); ?></th>
- <th class="tcenter"><?php echo __('table heading time_last_fired'); ?></th>
- <th class="row_status"><?php echo __('table heading run_only_once'); ?></th>
- <th class="row_status"><?php echo __('table heading status'); ?></th>
- <th class="row_action"><?php echo __('table heading action'); ?></th>
- </tr>
- </thead>
- <tfoot>
- <tr>
- <td class="tcenter" style="width:10px"> </td>
- <td class="tleft" width="30%"> </td>
- <td class="tcenter"> </td>
- <td class="tcenter"> </td>
- <td class="tcenter"> </td>
- <td class="tcenter row_status"> </td>
- <td class="tcenter row_status"> </td>
- <td class="row_action"> </td>
- </tr>
- </tfoot>
- <tbody>
- <!-- BLOCK AJAX -->
- </tbody>
- </table>
- <div class="text"><?php echo __('txt detail usage'); ?></div>
-</div>
-
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-27 10:47:11 UTC (rev 3989)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/cronjob.txt 2011-12-27 23:15:28 UTC (rev 3990)
@@ -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:43
+ @date 28/12/11, 21:45
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -19,7 +19,7 @@
$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émarage" ;
+$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" ;
@@ -55,12 +55,14 @@
-$lang['txt detail usage']="Les taches programmées vous permette d'automatiser certaines actions . Celle ci sont complement centralisé dans cette gestion.<br /><br />
-<pre>".tep_get_http().DIR_WS_ADMIN."cronfile.php</pre>" ;
+$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)";
+
/* Module Name */
$lang['module txt name clean_cache_dir']="Nettoyage fichiers de caches" ;
-$lang['module txt name customers_birthday']="Envoye de mail à la date d\'anniversaire des clients " ;
+$lang['module txt name customers_birthday']="Envoie de mail à la date d\'anniversaire des clients " ;
$lang['module txt name ggsitemap_refresh']="Mise à jour des sitemap pour google" ;
$lang['module txt name relance_order']="Traitement commandes automatisées" ;
Modified: trunk/catalog/admin/includes/modules/pages/cronjob.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/cronjob.php 2011-12-27 10:47:11 UTC (rev 3989)
+++ trunk/catalog/admin/includes/modules/pages/cronjob.php 2011-12-27 23:15:28 UTC (rev 3990)
@@ -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:45
+ @date 28/12/11, 21:45
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class cronjob
@@ -245,30 +245,33 @@
}
public function display_view(){
+ $action=self::$action;
+
switch (self::$action) {
case 'delete':
- self::$cInfo=self::load_db_values(@$_GET['cID']);
- return tep_get_include_contents(__CLASS__.'.delete');
+ self::$cInfo=self::load_db_values(@$_GET['cID']);
+ $action = 'delete';
break;
case 'new':
- return tep_get_include_contents(__CLASS__.'.edit');
+ $action = 'edit';
break;
case 'edit':
- self::$cInfo=self::load_db_values(@$_GET['cID']);
+ self::$cInfo=self::load_db_values(@$_GET['cID']);
- self::loadCronMod(self::$cInfo->name);
+ self::loadCronMod(self::$cInfo->name);
- if(self::$CronMod->config) {
- self::loadCronModConfig();
- }
+ if(self::$CronMod->config) {
+ self::loadCronModConfig();
+ }
- return tep_get_include_contents(__CLASS__.'.edit');
+ $action = 'edit';
break;
default:
- self::tep_get_list();
- return tep_get_include_contents(__CLASS__.'.listing');
+ self::tep_get_list();
+ $action = 'listing';
}
-
+ /// use master gabarit
+ return MGabCont::CallGab($action,__FUNCTION__,__CLASS__);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2011-12-27 10:47:19
|
Revision: 3989
http://oscss.svn.sourceforge.net/oscss/?rev=3989&view=rev
Author: oscim
Date: 2011-12-27 10:47:11 +0000 (Tue, 27 Dec 2011)
Log Message:
-----------
Correction coquille template suite evolution function tep_image
refonte de la page de gestion des zones, structuration des class sqlxxx et exploitation de zone reverse ou zone modele
refonte des mise en page , deport des gabarit en un dossier independant.
Modified Paths:
--------------
trunk/catalog/admin/includes/classes/drivers/sqlcountries.php
trunk/catalog/admin/includes/classes/drivers/sqlgeozone.php
trunk/catalog/admin/includes/classes/drivers/sqlzonetogeozone.php
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/geo_zones.txt
trunk/catalog/admin/includes/modules/pages/geo_zones.php
trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/gabarit/box.languages.gab
trunk/catalog/install/data/templates/appareil_photo/electronix/includes/gabarit/box.languages.gab
Added Paths:
-----------
trunk/catalog/Documents/admin/data/geozones-modeles.xml
trunk/catalog/admin/includes/gabarit/geo_zones/
trunk/catalog/admin/includes/gabarit/geo_zones/display_view.delete.gab
trunk/catalog/admin/includes/gabarit/geo_zones/display_view.deletesub.gab
trunk/catalog/admin/includes/gabarit/geo_zones/display_view.edit.gab
trunk/catalog/admin/includes/gabarit/geo_zones/display_view.new.gab
Removed Paths:
-------------
trunk/catalog/admin/includes/gabarit/geo_zones.list.gab
trunk/catalog/admin/includes/gabarit/geo_zones.listing.gab
Added: trunk/catalog/Documents/admin/data/geozones-modeles.xml
===================================================================
--- trunk/catalog/Documents/admin/data/geozones-modeles.xml (rev 0)
+++ trunk/catalog/Documents/admin/data/geozones-modeles.xml 2011-12-27 10:47:11 UTC (rev 3989)
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<root>
+ <!--
+ SAMPLE
+ <zone>
+ <id>(int) uniq id</id>
+ <name>(string) name</name>
+
+ <subzone>
+ FOR COUNTRY NO STATE
+ <item>
+ <isocode>string ISO CODE 2</isocode>
+ </item>
+ FOR STATE
+ <item>
+ <isocode>string ISO CODE 2 coutry ref </isocode>
+ <subsub>
+ <zone_code>(string) Zone code </zone_code>
+ </subsub>
+ <isocode>
+ </item>
+ </subzone>
+ </zone>
+ -->
+ <zone>
+ <id>1</id>
+ <name>UE Continental</name>
+ <subzone>
+ <item>
+ <isocode>AT</isocode>
+ </item>
+ <item>
+ <isocode>BG</isocode>
+ </item>
+ <item>
+ <isocode>BE</isocode>
+ </item>
+ <item>
+ <isocode>CZ</isocode>
+ </item>
+ <item>
+ <isocode>DK</isocode>
+ </item>
+ <item>
+ <isocode>DE</isocode>
+ </item>
+ <item>
+ <isocode>ES</isocode>
+ </item>
+ <item>
+ <isocode>BG</isocode>
+ </item>
+ <item>
+ <isocode>BE</isocode>
+ </item>
+ <item>
+ <isocode>EE</isocode>
+ </item>
+ <item>
+ <isocode>FI</isocode>
+ </item>
+ <item>
+ <isocode>FR</isocode>
+ </item>
+ <item>
+ <isocode>GR</isocode>
+ </item>
+ <item>
+ <isocode>HU</isocode>
+ </item>
+ <item>
+ <isocode>IE</isocode>
+ </item>
+ <item>
+ <isocode>IT</isocode>
+ </item>
+ <item>
+ <isocode>LV</isocode>
+ </item>
+ <item>
+ <isocode>LT</isocode>
+ </item>
+ <item>
+ <isocode>LU</isocode>
+ </item>
+ <item>
+ <isocode>NL</isocode>
+ </item>
+ <item>
+ <isocode>PL</isocode>
+ </item>
+ <item>
+ <isocode>PT</isocode>
+ </item>
+ <item>
+ <isocode>RO</isocode>
+ </item>
+ <item>
+ <isocode>SK</isocode>
+ </item>
+ <item>
+ <isocode>SI</isocode>
+ </item>
+ <item>
+ <isocode>SE</isocode>
+ </item>
+ <item>
+ <isocode>UK</isocode>
+ </item>
+ <item>
+ <isocode>GB</isocode>
+ </item>
+ </subzone>
+ </zone>
+
+ <zone>
+ <id>2</id>
+ <name>UE All</name>
+ <subzone>
+ <item>
+ <isocode>AT</isocode>
+ </item>
+ <item>
+ <isocode>BG</isocode>
+ </item>
+ <item>
+ <isocode>BE</isocode>
+ </item>
+ <item>
+ <isocode>CZ</isocode>
+ </item>
+ <item>
+ <isocode>CY</isocode>
+ </item>
+ <item>
+ <isocode>DK</isocode>
+ </item>
+ <item>
+ <isocode>DE</isocode>
+ </item>
+ <item>
+ <isocode>ES</isocode>
+ </item>
+ <item>
+ <isocode>BG</isocode>
+ </item>
+ <item>
+ <isocode>BE</isocode>
+ </item>
+ <item>
+ <isocode>EE</isocode>
+ </item>
+ <item>
+ <isocode>FI</isocode>
+ </item>
+ <item>
+ <isocode>FR</isocode>
+ </item>
+ <item>
+ <isocode>GR</isocode>
+ </item>
+ <item>
+ <isocode>HU</isocode>
+ </item>
+ <item>
+ <isocode>IE</isocode>
+ </item>
+ <item>
+ <isocode>IT</isocode>
+ </item>
+ <item>
+ <isocode>LV</isocode>
+ </item>
+ <item>
+ <isocode>LT</isocode>
+ </item>
+ <item>
+ <isocode>LU</isocode>
+ </item>
+ <item>
+ <isocode>MT</isocode>
+ </item>
+ <item>
+ <isocode>NL</isocode>
+ </item>
+ <item>
+ <isocode>PL</isocode>
+ </item>
+ <item>
+ <isocode>PT</isocode>
+ </item>
+ <item>
+ <isocode>RO</isocode>
+ </item>
+ <item>
+ <isocode>SK</isocode>
+ </item>
+ <item>
+ <isocode>SI</isocode>
+ </item>
+ <item>
+ <isocode>SE</isocode>
+ </item>
+ <item>
+ <isocode>UK</isocode>
+ </item>
+ <item>
+ <isocode>GB</isocode>
+ </item>
+ </subzone>
+ </zone>
+ </root>
\ 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-26 23:15:54 UTC (rev 3988)
+++ trunk/catalog/admin/includes/classes/drivers/sqlcountries.php 2011-12-27 10:47:11 UTC (rev 3989)
@@ -108,11 +108,11 @@
$sql ="";
if(isset($option['id'])) $sql .="AND countries_id = '".(int)$option['id']."' ";
- if(isset($option['name'])) $sql .="AND countries_name = '".(int)tep_db_input($option['name'])."' ";
- if(isset($option['localname'])) $sql .="AND countries_localname = '".(int)tep_db_input($option['localname'])."' ";
- if(isset($option['iso_code_2'])) $sql .="AND countries_iso_code_2 = '".(int)tep_db_input($option['iso_code_2'])."' ";
- if(isset($option['list_iso_code_2'])) $sql .="AND countries_iso_code_2 IN( '".(int)tep_db_input($option['list_iso_code_2'])."' ) ";
- if(isset($option['iso_code_3'])) $sql .="AND countries_iso_code_3 = '".(int)tep_db_input($option['iso_code_3'])."' ";
+ 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_3'])) $sql .="AND countries_iso_code_3 = '".(string)tep_db_input($option['iso_code_3'])."' ";
if($sql=='')
return false;
@@ -150,10 +150,10 @@
$DB=Database::getInstance();
if(isset($option['id'])) $where .="AND countries_id = '".(int)$option['id']."' ";
- elseif(isset($option['name'])) $where .="AND countries_name = '".(int)tep_db_input($option['name'])."' ";
- elseif(isset($option['localname'])) $where .="AND countries_localname = '".(int)tep_db_input($option['localname'])."' ";
- elseif(isset($option['iso_code_2'])) $where .="AND countries_iso_code_2 = '".(int)tep_db_input($option['iso_code_2'])."' ";
- elseif(isset($option['iso_code_3'])) $where .="AND countries_iso_code_3 = '".(int)tep_db_input($option['iso_code_3'])."' ";
+ 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'])."' ";
else
return false;
@@ -202,7 +202,9 @@
$object= new stdclass();
foreach($array as $key=>$value){
- if( strpos($key,'country_') ===8)
+ if( strpos($key,'countries_') ===0)
+ $key=substr($key,10);
+ elseif( strpos($key,'country_') ===0)
$key=substr($key,8);
$object->$key = $value;
Modified: trunk/catalog/admin/includes/classes/drivers/sqlgeozone.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlgeozone.php 2011-12-26 23:15:54 UTC (rev 3988)
+++ trunk/catalog/admin/includes/classes/drivers/sqlgeozone.php 2011-12-27 10:47:11 UTC (rev 3989)
@@ -56,7 +56,8 @@
else
return $res->__get('insertId');
}
-// UPDATE `osc_geo_zones` SET `geo_zone_type`='2', ` geo_zone_grp`='no_name', `geo_zone_name`='Shp: France', `geo_zone_description`='', `last_modified`=now() WHERE geo_zone_id = '5' ;
+
+
/**
@brief update ligne in table configuration
*/
@@ -69,15 +70,11 @@
$where ='';
if(isset($option['id'])) $where .="AND geo_zone_id = '".(int)$option['id']."' ";
-// var_dump($option);
-// exit;
-
$sql_data_array['geo_zone_type'] = (isset($option['type'])) ? tep_db_prepare_input($option['type']) :'1';
$sql_data_array['geo_zone_grp'] = str_replace(' ','_',(isset($option['grp'])) ? tep_db_prepare_input($option['grp']) :'NULL');
$sql_data_array['geo_zone_name'] = (isset($option['name'])) ? tep_db_prepare_input($option['name']) :'NULL';
$sql_data_array['geo_zone_description'] = (isset($option['description'])) ? tep_db_prepare_input($option['description']) :'NULL';
-// $sql_data_array['zone_id'] = (isset($option['zone_id'])) ? tep_db_prepare_input($option['zone_id']) :'NULL';
$sql_data_array['last_modified'] = 'now()';
@@ -136,7 +133,7 @@
$array=array();
foreach($res->fetchAllAssoc() as $result)
- $array[]= ((!$shortkey)? $result : self::CleanKey($result));
+ $array[]= ((!$shortkey)? $result : self::CleanKey($result));
return $array;
}
Modified: trunk/catalog/admin/includes/classes/drivers/sqlzonetogeozone.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlzonetogeozone.php 2011-12-26 23:15:54 UTC (rev 3988)
+++ trunk/catalog/admin/includes/classes/drivers/sqlzonetogeozone.php 2011-12-27 10:47:11 UTC (rev 3989)
@@ -17,13 +17,6 @@
class sqlzonetogeozone
implements ModSqlDataDriver{
- /**
- @var array pre configured section by iso code.
- */
- private static $type = array(
- 'EU'=>'AT, BG, BE , CY, CZ, DK, ES, EE, FI, FR, GR, HU, IE, IT, LV, LT, LU, MT, NL, PL, PT, RO, DE, SK, SI, SE, UK,GB, '
- 'EU_continentale'=>'AT, BG, BE , CZ, DK, DE, ES, EE, FI, FR, GR, HU,IE, IT, LV, LT, LU, NL, PL, PT, RO, SK, SI, SE, UK,GB, '
- );
public static $modules;
@@ -195,7 +188,7 @@
$object= new stdclass();
foreach($array as $key=>$value){
- $object->$key = $value;
+ $object->$key = $value;
}
return $object;
Added: trunk/catalog/admin/includes/gabarit/geo_zones/display_view.delete.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/geo_zones/display_view.delete.gab (rev 0)
+++ trunk/catalog/admin/includes/gabarit/geo_zones/display_view.delete.gab 2011-12-27 10:47:11 UTC (rev 3989)
@@ -0,0 +1,22 @@
+<?php
+/**
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 28/12/11, 16:51
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+?>
+ <h3><?php printf(__('geo_zones heading delete zone'),''); ?></h3>
+ <?php print tep_draw_form('geo_zones', geo_zones::FILENAME, 'action=deleteconfirm') ; ?>
+
+ <fieldset class="block_input">
+ <p><?php print __('geo_zones text delete intro'). tep_draw_hidden_field('id', '', geo_zones::$getzID) ; ?></p>
+ </fieldset>
+
+ <fieldset class="block_input button_nav">
+ <?php print tep_image_submit('button_delete.gif', IMAGE_DELETE) . tep_js_back(tep_href_link(geo_zones::FILENAME), IMAGE_CANCEL) ; ?>
+ </fieldset>
+ </form>
\ No newline at end of file
Added: trunk/catalog/admin/includes/gabarit/geo_zones/display_view.deletesub.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/geo_zones/display_view.deletesub.gab (rev 0)
+++ trunk/catalog/admin/includes/gabarit/geo_zones/display_view.deletesub.gab 2011-12-27 10:47:11 UTC (rev 3989)
@@ -0,0 +1,22 @@
+<?php
+/**
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 28/12/11, 16:51
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+?>
+ <h3><?php printf(__('geo_zones heading delete sub zone'),''); ?></h3>
+ <?php print tep_draw_form('geo_zones', geo_zones::FILENAME, 'action=deletesubconfirm') ; ?>
+
+ <fieldset class="block_input">
+ <p><?php print __('geo_zones text intro'). tep_draw_hidden_field('id', '', geo_zones::$getsID). tep_draw_hidden_field('zid', '', geo_zones::$getzID) ; ?></p>
+ </fieldset>
+
+ <fieldset class="block_input button_nav">
+ <?php print tep_image_submit('button_delete.gif', IMAGE_DELETE) . tep_js_back(tep_href_link(geo_zones::FILENAME, 'zID='.geo_zones::$getzID.'&action=edit'), IMAGE_CANCEL) ; ?>
+ </fieldset>
+ </form>
\ No newline at end of file
Added: trunk/catalog/admin/includes/gabarit/geo_zones/display_view.edit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/geo_zones/display_view.edit.gab (rev 0)
+++ trunk/catalog/admin/includes/gabarit/geo_zones/display_view.edit.gab 2011-12-27 10:47:11 UTC (rev 3989)
@@ -0,0 +1,154 @@
+<?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, 16:51
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+?>
+<h3><?php echo __('text info heading edit zone'); ?></h3>
+
+
+
+<div id="tabs">
+
+
+ <ul>
+ <li><a href="#tabs-1"><?php echo __('geo_zones specification') ?></a></li>
+ <li><a href="#tabs-2"><?php echo __('geo_zones content') ?></a></li>
+ <li><a href="#tabs-3"><?php echo __('geo_zones group adjust') ?></a></li>
+ </ul>
+
+
+ <div id="tabs-1" class="tabPage">
+ <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=save_zone') ?>
+ <!--
+ <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>-->
+
+ <div class="box_form">
+ <!-- <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','', geo_zones::$zInfo->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','', geo_zones::$zInfo->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, geo_zones::$zInfo->geo_zone_type) ?>
+ </p>
+
+ <p class="block_input">
+ <label for="geo_zone_name" ><?php echo __('text info zone grp'); ?></label>
+ <?php echo tep_draw_pull_down_menu('geo_zone_grp',geo_zones::$geoGrpDispo, geo_zones::$zInfo->geo_zone_grp) ?>
+ <?php echo tep_draw_input_field('geo_zone_grp_add','','') ?>
+ </p>
+
+ <fieldset class="block_input">
+ <div class="block_input button_nav" style="width:95%;">
+ <?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(geo_zones::FILENAME, '&zID=' . geo_zones::$zInfo->geo_zone_id ), IMAGE_CANCEL) ;
+ ?>
+ </div>
+ </fieldset>
+
+
+ </div>
+ </form>
+ </div>
+
+ <div id="tabs-2" class="tabPage">
+
+ <div class="box_left">
+ <table class="dataTable">
+ <thead>
+ <tr>
+ <th><?php echo __('table heading country'); ?></th>
+ <th><?php echo __('table heading country region'); ?></th>
+ <th class="tright"><?php echo __('table heading action'); ?></th>
+ </tr>
+ </thead>
+ <tbody>
+ </tbody>
+ </table>
+ </div>
+ <div class="box_right ">
+ <div class="button_nav">
+ <?php echo '<a class="button" href="' . tep_href_link(geo_zones::FILENAME, 'zID=' . geo_zones::$getzID . '&saction=new&action=edit' ) . '">'.tep_image(DIR_WS_ICONS . 'icon_add_new.png', IMAGE_ICON_INFO).' '. __('image insert new geo zone') . '</a>'; ?>
+ </div>
+
+ <?php echo geo_zones::get_right_bar() ?>
+ </div>
+ </div>
+
+
+ <div id="tabs-3" class="tabPage">
+ <p><?php echo __('geo_zones tabs group intro'); ?></p>
+
+ <fieldset class="block_field">
+ <h5><?php echo __('geo_zones group info other');?></h5>
+
+ <ul>
+ <?php foreach(geo_zones::$zInfo->grp_other as $row): ?>
+ <li><a href="<?php echo tep_href_link(geo_zones::FILENAME, 'zID='.$row['id'].'&action=edit') ;?>" ><?php echo $row['title'] ;?></a></li>
+ <?php endforeach; ?>
+ </ul>
+
+ </fieldset>
+
+ <?php if(count(geo_zones::$zInfo->grp_notin) > 0): ?>
+ <fieldset class="block_field">
+
+ <?php echo tep_draw_form('zones', geo_zones::FILENAME, 'zID=' . geo_zones::$zInfo->geo_zone_id . '&action=reverse_zone') ?>
+ <div class="block_input">
+ <h4><?php echo __('geo_zones reverse intro');?></h4>
+
+ <ul>
+ <?php foreach(geo_zones::$zInfo->grp_other as $row): ?>
+ <li><?php echo tep_draw_checkbox_field('geo_zone_reverse[]','',$row['id']) ?> <?php echo $row['title'] ;?></li>
+ <?php endforeach; ?>
+ </ul>
+
+ <div class="button_nav">
+ <p>
+ <?php echo tep_draw_hidden_field('current_grp', '',geo_zones::$zInfo->geo_zone_grp) . tep_draw_hidden_field('current_type','', geo_zones::$zInfo->geo_zone_type) ?>
+ <?php echo tep_image_submit('', __('image reverse zone create') ); ?>
+ </p>
+ </div>
+
+ <h4><?php echo __('geo_zones group country not in');?></h4>
+
+ <?php if(count(geo_zones::$zInfo->grp_notin) > 10): ?>
+ <p><?php printf (__('geo_zones group country not in is importante %s'), count(geo_zones::$zInfo->grp_notin) );?></p>
+ <?php else: ?>
+ <ul>
+ <?php foreach(geo_zones::$zInfo->grp_notin as $row): ?>
+ <li><?php echo $row['countries_id'] ;?> <?php echo $row['countries_name'] ;?> <?php echo $row['countries_localname'] ;?></li>
+ <?php endforeach; ?>
+ </ul>
+ <?php endif; ?>
+ </div>
+ </form>
+
+ </fieldset>
+ <?php endif; ?>
+ </div>
+
+ <br class="clear" />
+
+
+</div>
\ No newline at end of file
Added: trunk/catalog/admin/includes/gabarit/geo_zones/display_view.new.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/geo_zones/display_view.new.gab (rev 0)
+++ trunk/catalog/admin/includes/gabarit/geo_zones/display_view.new.gab 2011-12-27 10:47:11 UTC (rev 3989)
@@ -0,0 +1,73 @@
+<?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, 16:51
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+?>
+<h3><?php echo __('text info heading edit zone'); ?></h3>
+
+
+
+ <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>
+
Deleted: trunk/catalog/admin/includes/gabarit/geo_zones.list.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/geo_zones.list.gab 2011-12-26 23:15:54 UTC (rev 3988)
+++ trunk/catalog/admin/includes/gabarit/geo_zones.list.gab 2011-12-27 10:47:11 UTC (rev 3989)
@@ -1,67 +0,0 @@
-<?php
-/**
- @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
- @package osCSS-2 <www http://www.oscss.org>
- @version 2.0.9
- @date 17/07/10, 16:35
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-8
-*/
-?>
-<h3><?php echo __('heading title'); ?></h3>
-
-
- <div class="button_nav">
- <?php echo '<a class="button" href="' . tep_href_link(FILENAME_GEO_ZONES,'zID=' . geo_zones::$getzID) . '">' . IMAGE_BACK . '</a> <a class="button" href="' . tep_href_link(FILENAME_GEO_ZONES, 'zID=' . geo_zones::$getzID . '&saction=list&action=new&' . (isset(geo_zones::$sInfo) ? 'sID=' . geo_zones::$sInfo->association_id : '') ) . '">'.tep_image(DIR_WS_ICONS . 'icon_add_new.png', IMAGE_ICON_INFO).' '. __('image insert new geo zone') . '</a>'; ?>
- </div>
-
- <h4><?php echo @$thezone['geo_zone_name']; ?></h4>
- <p><?php echo @$thezone['geo_zone_description']; ?></p>
-
-<div class="box_uniq">
- <div class="box_left">
-
- <table class="dataTable">
- <thead>
- <tr>
- <th><?php echo __('table heading country'); ?></th>
- <th><?php echo __('table heading country region'); ?></th>
- <th class="tright"><?php echo __('table heading action'); ?></th>
- </tr>
- </thead>
-<?php /*
- <tfoot>
- <tr>
- <td><?php echo $zones_split->display_count($zones_query_numrows, MAX_DISPLAY_ROW_BY_PAGE, $spage, TEXT_DISPLAY_NUMBER_OF_COUNTRIES); ?></td>
- <td colspan="2" ><span class="tcenter"><?php echo row_by_page(FILENAME_GEO_ZONES,$row_bypage_array, $row_by_page, "fleft") ?></span>
- <span class="fright"><?php echo $zones_split->display_links($zones_query_numrows, MAX_DISPLAY_ROW_BY_PAGE, MAX_DISPLAY_PAGE_LINKS, $spage, tep_get_all_get_params(array('action','spage','sID')).'action=list', 'spage'); ?> </span>
- </td>
- </tr>
- </tfoot>
-*/ ?>
- <tbody>
- <?php /*foreach($list_g2z as $zones){ ?>
- <tr class="view parent dataTableRow <?php if(isset($_GET['sID']) && ($_GET['sID'] == $zones['association_id']))echo "Selected" ?>" >
- <td class="tcenter"><?php echo (($zones['countries_name']) ? $zones['countries_name'] : TEXT_ALL_COUNTRIES); ?></td>
- <td class="tcenter"><?php echo (($zones['zone_id']) ? $zones['zone_name'] : PLEASE_SELECT); ?></td>
- <td style="width:100px">
- <span class="view fils fleft">
- <?php
- echo '<a class="buttonimg" href="' . tep_href_link(FILENAME_GEO_ZONES, tep_get_all_get_params(array('saction','sID')).'sID=' . $zones['association_id'] . '&saction=edit') . '">' . tep_image(DIR_WS_ICONS . 'icon_edit.png',IMAGE_EDIT ). '</a>'
- .'<a class="buttonimg" href="' . tep_href_link(FILENAME_GEO_ZONES,tep_get_all_get_params(array('saction','sID','geo_zone_name')).'sID=' . $zones['association_id'] . '&saction=delete') . '">' . tep_image(DIR_WS_ICONS . 'icon_delete.png',IMAGE_DELETE).'</a>';
- ?>
- </span>
- <span class="fright">
- <?php if (isset($sInfo) && is_object($sInfo) && ($zones['association_id'] == $sInfo->association_id)) { echo tep_image(DIR_WS_ICONS . 'icon_arrow_right.gif', ''); }
- else { echo '<a href="' . tep_href_link(FILENAME_GEO_ZONES, tep_get_all_get_params(array('action','sID')).'action=list&sID=' . $zones['association_id']) . '">' . tep_image(DIR_WS_ICONS . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?>
- </span>
- </td>
- </tr>
- <?php } */?>
- </tbody>
- </table>
- </div>
- <div class="box_right ">
- <?php echo geo_zones::get_right_bar() ?>
- </div>
-</div>
\ No newline at end of file
Deleted: trunk/catalog/admin/includes/gabarit/geo_zones.listing.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/geo_zones.listing.gab 2011-12-26 23:15:54 UTC (rev 3988)
+++ trunk/catalog/admin/includes/gabarit/geo_zones.listing.gab 2011-12-27 10:47:11 UTC (rev 3989)
@@ -1,38 +0,0 @@
-<?php
-/**
- @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
- @package osCSS-2 <www http://www.oscss.org>
- @version 2.0.9
- @date 17/07/10, 16:35
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-8
-*/
-?>
-<h3><?php echo __('heading title'); ?></h3>
-
-
- <div class="button_nav">
- <?php 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>
-
- <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><?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>
- <div class="box_right ">
- <?php echo geo_zones::get_right_bar() ?>
- </div>
-</div>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/pages/geo_zones.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/pages/geo_zones.txt 2011-12-26 23:15:54 UTC (rev 3988)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/geo_zones.txt 2011-12-27 10:47:11 UTC (rev 3989)
@@ -8,14 +8,69 @@
@encode UTF-8
*/
$lang['heading title']="Zones fiscales et livraisons" ;
-$lang['table heading country']="Pays" ;
-$lang['table heading country zone']="Zone" ;
-$lang['table heading country region']="État/Région" ;
-$lang['table heading tax zones']="Nom" ;
-$lang['table heading tax zones desc']="Description " ;
-$lang['table heading tax zones type']="Types" ;
-$lang['table heading nbr sub']="Nbr " ;
-$lang['table heading action']="Action" ;
+
+/** Listing */
+ $lang['table heading country zone']="Zone" ;
+ $lang['table heading tax zones']="Nom" ;
+ $lang['table heading tax zones desc']="Description " ;
+ $lang['table heading tax zones type']="Types" ;
+ $lang['table heading tax zones grp']="Groupes" ;
+ $lang['table heading nbr sub']="Nbr " ;
+ $lang['table heading action']="Action" ;
+
+/** Edit */
+ /* tabs */
+ $lang['geo_zones specification']="Caratéristiques" ;
+ $lang['geo_zones content']="Zones enfants" ;
+ $lang['geo_zones group adjust']="Groupes" ;
+
+ /* tabs 1 */
+ $lang['text info zone name']="Nom de la zone :" ;
+ $lang['text info zone description']="Description :" ;
+ $lang['text info zone type']="Type :" ;
+ $lang['text info zone grp']="Appartenance au groupe :" ;
+
+ /* tabs 2 */
+ $lang['table heading country']="Pays" ;
+ $lang['table heading country region']="État/Région" ;
+
+ /* tabs 3 */
+ $lang['geo_zones tabs group intro']="L'utilisation des groupe, vous permet de creer des zone inverse, et donc de simplifier la creation des zones, sans omettre de pays" ;
+ $lang['geo_zones group info other']="Listes des zones de même groupe" ;
+ $lang['geo_zones reverse intro']="Selecteur de zones de pays inverse" ;
+ $lang['geo_zones group country not in']="Pays non présent dans ce groupe" ;
+ $lang['geo_zones group country not in is importante %s']="La listes des pays non présent dans ce groupe est trop importante pour être affiché. Elle ce compose de %s pays " ;
+
+ $lang['image reverse zone create']="Creer la zone inverse" ;
+
+ /* new/create */
+ $lang['geo_zone text info zone pre-programmed']="Utiliser une zone pre-programmé, vous permet d'utiliser les zone (region/continent) sans autre precision" ;
+
+
+ /* error/ message alert */
+ /* reverse zone */
+ $lang['geo_zones error reverse : please select zone for reverse']="Erreur : pour creer une zone reverse, selectionné les zones à inversé" ;
+
+ /* update zone */
+ $lang['geo_zones error for update zone %s']="Erreur : lors de l'enregsitrement des données de la zone" ;
+ $lang['geo_zones success for update %s']="Succès : lors de l'enregsitrement des données de la zone" ;
+ $lang['geo_zones error for insert zone %s']="Erreur : lors de l'enregsitrement des données de la zone" ;
+ $lang['geo_zones success for insert %s']="Succès : lors de l'enregsitrement des données de la zone" ;
+
+
+/** Delete */
+ /* zone */
+ $lang['geo_zones heading delete zone']="Vous êtes sur de vouloir supprimer cette zone ?" ;
+ $lang['geo_zones text delete intro']="La suppression de cette zone est irreversible." ;
+ $lang['geo_zones error for delete zone %s']="Erreur : lors de la suppresion des données de la zone" ;
+ $lang['geo_zones success for delete %s']="Succès : lors de la suppresion des données de la zone" ;
+
+ /* sub-zone */
+ $lang['geo_zones error delete subzone']="Erreur : lors de la suppresion des données de la zone" ;
+ $lang['geo_zones success delete subzone']="Succès : lors de la suppresion des données de la zone" ;
+
+
+
$lang['text info heading new zone']="Nouvelle zone" ;
$lang['text info new zone intro']="Merci de compléter les informations sur la zone: <br /> Si vous souhaitez créer une zone de livraison, nommer la zone comme suit : 'Shp: nom de la zone' " ;
$lang['text info heading edit zone']="Éditer zone" ;
@@ -30,15 +85,22 @@
$lang['text info delete sub zone intro']="Êtes-vous sûr de vouloir supprimer cette sous-zone ?" ;
$lang['text info date added']="Date d'ajout :" ;
$lang['text info last modified']="Dernière modification :" ;
-$lang['text info zone name']="Nom de la zone :" ;
-$lang['text info number zones']="Nombre de zones :" ;
-$lang['text info zone description']="Description :" ;
+
+ $lang['text info number zones']="Nombre de zones :" ;
+
+
$lang['text info country']="Pays :" ;
$lang['text info country zone']="Zone :" ;
+
$lang['type below']="Toutes les zones" ;
$lang['please select']="Toutes les zones" ;
$lang['text all countries']="Tous les pays" ;
$lang['image insert new zone']="Créer une zone fiscale/livraison" ;
$lang['image insert new geo zone']="Ajouter un pays à la zone" ;
$lang['text display number of countries']="Affiche <strong>%d</strong> à <strong>%d</strong> (sur <strong>%d</strong> pays)" ;
+
+
+$lang['geo_zone zone taxe']="Taxes" ;
+$lang['geo_zone zone shipping']="Livraison" ;
+$lang['geo_zone zone payment']="Paiement" ;
?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/modules/pages/geo_zones.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/geo_zones.php 2011-12-26 23:15:54 UTC (rev 3988)
+++ trunk/catalog/admin/includes/modules/pages/geo_zones.php 2011-12-27 10:47:11 UTC (rev 3989)
@@ -1,15 +1,16 @@
<?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-2011 The osCSS developers - osCSS Open Source E-commerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.1.0
- @date 16/12/10, 15:25
+ @version 2.1.1
+ @date 28/12/11, 15:25
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class geo_zones
@brief base manage zone shipping and taxe
*/
+
class geo_zones
implements ExtModPage, InterfacedTJsonS, InterfaceModule {
@@ -40,7 +41,24 @@
@param bool true list zone, false list pays
*/
public static $is_zone;
+ /**
+ @param object current
+ */
+ public static $zInfo;
+ /**
+ @param object current
+ */
+ public static $zSubInfo;
+ /**
+ @param array type zone for Select menu
+ */
+ public static $geoTypes;
+ /**
+ @param array grp exist for select menu
+ */
+ public static $geoGrpDispo;
+
/**
class constructor
*/
@@ -50,6 +68,40 @@
self::init();
}
+ /**
+ @brief initialise class
+ */
+ private static function init(){
+ self::$action = (isset($_GET['action']) ? $_GET['action'] : '');
+ self::$saction = (isset($_GET['saction']) ? $_GET['saction'] : '');
+ self::$getzID = (isset($_GET['zID']) ? $_GET['zID'] : '1');
+ self::$getsID = (isset($_GET['sID']) ? $_GET['sID'] : '');
+
+
+ self::$is_zone= (self::$saction == 'list') ? false : true ;
+// if(!self::$is_zone && self::$action =='edit')
+
+// var_dump(self::$is_zone);
+ //! active datatable in ajax, precise les GET necessaire
+ if(!defined('JSONSTATMENT'))
+ if(self::$is_zone && self::$action =='edit')
+ define('JSONSTATMENT', 'mod=page&type='.self::$code.(isset($_GET['zID']) ? '&zID='.$_GET['zID'] : '').'&saction=list');
+ else
+ define('JSONSTATMENT', 'mod=page&type='.self::$code.(isset($_GET['zID']) ? '&zID='.$_GET['zID'] : '').(isset($_GET['saction']) ? '&saction='.$_GET['saction'] : ''));
+// var_dump(JSONSTATMENT);
+
+ self::$geoTypes = array(
+ array('id'=>'1', 'text'=> __('geo_zone zone taxe')),
+ array('id'=>'2', 'text'=> __('geo_zone zone shipping')),
+ array('id'=>'3', 'text'=> __('geo_zone zone payment')),
+ );
+ }
+
+ /**
+ @brief Action process
+ @param $actions array
+ @return array action
+ */
public function check_action($actions){
global $messageStack;
self::$action=$actions;
@@ -61,88 +113,271 @@
$thezone=tep_db_fetch_array($zones_query);
}
- if (!self::$is_zone)
- switch (self::$action) {
- case 'insert_sub':
- $zID = tep_db_prepare_input( self::$getzID);
- if(isset($_POST['zone_country_ids']) && is_array($_POST['zone_country_ids']) /*&& $_POST['zone_country_id'] ==''*/){
- foreach($_POST['zone_country_ids'] as $zone_country_id )
- tep_db_query("insert into " . TABLE_ZONES_TO_GEO_ZONES . " (zone_country_id, zone_id, geo_zone_id, date_added) values ('" . (int)$zone_country_id . "', NULL, '" . (int)$zID . "', now())");
+ switch (self::$action) {
- }
- else{
- $zone_country_id = tep_db_prepare_input($_POST['zone_country_id']);
- if(isset($_POST['zone_ids']) && is_array($_POST['zone_ids'])){
- foreach($_POST['zone_ids'] as $zone_id )
- tep_db_query("insert into " . TABLE_ZONES_TO_GEO_ZONES . " (zone_country_id, zone_id, geo_zone_id, date_added) values ('" . (int)$zone_country_id . "', '" . (int)$zone_id . "', '" . (int)$zID . "', now())");
- }
- else{
- $zone_id = tep_db_prepare_input($_POST['zone_ids']);
- tep_db_query("insert into " . TABLE_ZONES_TO_GEO_ZONES . " (zone_country_id, zone_id, geo_zone_id, date_added) values ('" . (int)$zone_country_id . "', '" . (int)$zone_id . "', '" . (int)$zID . "', now())");
- }
- }
+ /**
+ @remarks Create zone
+ */
+ case 'insert_zone':
- tep_redirect(tep_href_link(self::FILENAME, tep_get_all_get_params(array( 'sID', 'zID', 'action'), false) . 'zID=' . self::$getzID));
- break;
- case 'save_sub':
- $sID = tep_db_prepare_input($_GET['sID']);
- $zID = tep_db_prepare_input( self::$getzID);
- $zone_country_id = tep_db_prepare_input($_POST['zone_country_id']);
- $zone_id = tep_db_prepare_input($_POST['zone_id']);
+ $myarray['name'] =tep_db_prepare_input($_POST['geo_zone_name']) ;
+ $myarray['description'] =tep_db_prepare_input($_POST['geo_zone_description']) ;
+ $myarray['type'] =tep_db_prepare_input($_POST['geo_zone_type']) ;
- tep_db_query("update " . TABLE_ZONES_TO_GEO_ZONES . " set geo_zone_id = '" . (int)$zID . "', zone_country_id = '" . (int)$zone_country_id . "', zone_id = " . (tep_not_null($zone_id) ? "'" . (int)$zone_id . "'" : 'null') . ", last_modified = now() where association_id = '" . (int)$sID . "'");
+ if(isset($_POST['geo_zone_grp_add']) && !empty($_POST['geo_zone_grp_add']))
+ $myarray['grp'] =tep_db_prepare_input($_POST['geo_zone_grp_add']) ;
+ else
+ $myarray['grp'] =tep_db_prepare_input($_POST['geo_zone_grp']) ;
- tep_redirect(tep_href_link(self::FILENAME, tep_get_all_get_params(array('saction'), false)));
- break;
- case 'deleteconfirm_sub':
- $sID = tep_db_prepare_input($_GET['sID']);
+ if( ! $new_zone_id =sqlgeozones::create($myarray) )
+ $messageStack->add_session(__(sprintf('geo_zones error for insert zone %s'), $myarray['name'] ), 'error');
+ else
+ $messageStack->add_session(__(sprintf('geo_zones success for insert %s'), ' '.$myarray['name'] ), 'success');
- tep_db_query("delete from " . TABLE_ZONES_TO_GEO_ZONES . " where association_id = '" . (int)$sID . "'");
- tep_redirect(tep_href_link(self::FILENAME, tep_get_all_get_params(array('action', 'sID'), false)));
- break;
+ if(isset($_POST['geo_zone_model'])) {
+ $model_id = tep_db_prepare_input($_POST['geo_zone_model']);
- }
+ $model = self::GetZoneModele($model_id) ;
+ // loop for populate db based on model in file xml
+ foreach($model->subzone->item as $row){
+ $countrie = sqlcountries::fetch(array('iso_code_2'=> (string)$row->isocode), true);
- if (self::$is_zone)
- switch (self::$action) {
- case 'insert_zone':
- $geo_zone_name = tep_db_prepare_input($_POST['geo_zone_name']);
- $geo_zone_description = tep_db_prepare_input($_POST['geo_zone_description']);
+ if(isset($countrie->id) && $countrie->id > 0) {
+ if(!isset($row->subsub)) {
- $r=tep_db_query("insert into " . TABLE_GEO_ZONES . " (geo_zone_name, geo_zone_description, date_added) values ('" . tep_db_input($geo_zone_name) . "', '" . tep_db_input($geo_zone_description) . "', now())");
- $new_zone_id = tep_db_insert_id($r);
+ /// create geo to zone based on countrie
+ $myarray=array(
+ 'geo_zone_id'=> $new_zone_id,
+ 'zone_country_id'=>$countrie->id,
+ // 'zone_id'=>,
+ );
- tep_redirect(tep_href_link(self::FILENAME, tep_get_all_get_params(array('action', 'zID'), false). 'zID=' . $new_zone_id));
- break;
- case 'save_zone':
- $zID = tep_db_prepare_input( self::$getzID);
- $geo_zone_name = tep_db_prepare_input($_POST['geo_zone_name']);
- $geo_zone_description = tep_db_prepare_input($_POST['geo_zone_description']);
+ sqlzonetogeozone::create($myarray);
+ }
+ else {
+ /// loop for sub zone
- tep_db_query("update " . TABLE_GEO_ZONES . " set geo_zone_name = '" . tep_db_input($geo_zone_name) . "', geo_zone_description = '" . tep_db_input($geo_zone_description) . "', last_modified = now() where geo_zone_id = '" . (int)$zID . "'");
- tep_redirect(tep_href_link(self::FILENAME, tep_get_all_get_params(array('action'), false)));
- break;
- case 'deleteconfirm_zone':
- $zID = tep_db_prepare_input( self::$getzID);
+ }
- tep_db_query("delete from " . TABLE_GEO_ZONES . " where geo_zone_id = '" . (int)$zID . "'");
- tep_db_query("delete from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . (int)$zID . "'");
- tep_redirect(tep_href_link(self::FILENAME, tep_get_all_get_params(array('action', 'zID'), false)));
- break;
+ }
+ }
+
+ }
+
+ tep_redirect(tep_href_link(self::FILENAME, 'zID=' . $new_zone_id.'&action=edit'));
+ break;
+
+
+ /**
+ @remarks Update zone
+ */
+ case 'save_zone':
+
+ $zID = tep_db_prepare_input( self::$getzID);
+
+ $myarray['id'] = $zID;
+
+ $myarray['name'] =tep_db_prepare_input($_POST['geo_zone_name']) ;
+ $myarray['description'] =tep_db_prepare_input($_POST['geo_zone_description']) ;
+ $myarray['type'] =tep_db_prepare_input($_POST['geo_zone_type']) ;
+
+ if(isset($_POST['geo_zone_grp_add']) && !empty($_POST['geo_zone_grp_add']))
+ $myarray['grp'] =tep_db_prepare_input($_POST['geo_zone_grp_add']) ;
+ else
+ $myarray['grp'] =tep_db_prepare_input($_POST['geo_zone_grp']) ;
+
+ if( ! sqlgeozones::update($myarray) )
+ $messageStack->add_session(__(sprintf('geo_zones error for update zone %s'), $zID ), 'error');
+ else
+ $messageStack->add_session(__(sprintf('geo_zones success for update %s'), $zID ), 'success');
+
+
+ if(isset($_POST['up_and_close']) )
+ tep_redirect(tep_href_link(self::FILENAME, tep_get_all_get_params(array('action'), false)));
+ else
+ tep_redirect(tep_href_link(self::FILENAME, 'zID='.$zID.'&action=edit'));
+
+
+ break;
+
+ /**
+ @remarks Delete zone
+ */
+ case 'deleteconfirm':
+ $zID = tep_db_prepare_input($_POST['id']);
+
+ if( ! sqlgeozones::delete(array('id'=>$zID)) )
+ $messageStack->add_session(__(sprintf('geo_zones error for delete zone %s'), $zID ), 'error');
+ else
+ $messageStack->add_session(__(sprintf('geo_zones success for delete %s'), $zID ), 'success');
+
+ tep_redirect(tep_href_link(self::FILENAME, tep_get_all_get_params(array('action', 'zID'), false)));
+ break;
+
+
+ /**
+ @remarks Reverse zone create zone by inverse zone existe; Use group zone
+ */
+ case 'reverse_zone':
+
+ if(isset($_POST['geo_zone_reverse']) && is_array($_POST['geo_zone_reverse']) ){
+
+ $notin ="gz.geo_zone_id IN (".implode(',',$_POST['geo_zone_reverse']).") AND "; ;
+
+
+ $zones_query_raw = "SELECT * FROM " . TABLE_COUNTRIES . " c
+ WHERE not exists
+ (
+ SELECT g2z.zone_country_id as countries_id
+ FROM ".TABLE_ZONES_TO_GEO_ZONES." g2z LEFT JOIN " . TABLE_GEO_ZONES . " gz ON( ".$notin." geo_zone_grp = '".tep_db_prepare_input($_POST['current_grp'])."' AND geo_zone_type='".tep_db_prepare_input($_POST['current_type'])."' ) WHERE g2z.zone_country_id = c.countries_id AND gz.geo_zone_id = g2z.geo_zone_id
+ )
+ ";
+
+
+ $zones_query = tep_db_query($zones_query_raw);
+
+ $result=$zones_query->fetchAllAssoc();
+ $nbr_result = count($result);
+
+ if($nbr_result > 0){
+
+ /// create zone
+ $myarray=array(
+ 'name' => 'reverse zone',
+ 'grp'=>tep_db_prepare_input($_POST['current_grp']),
+ 'type'=>tep_db_prepare_input($_POST['current_type']),
+ );
+
+ $id = sqlgeozones::create($myarray);
+
+ foreach($result as $row){
+ /// create geo to zone
+ $myarray=array(
+ 'geo_zone_id'=> $id,
+ 'zone_country_id'=>$row['countries_id'],
+ // 'zone_id'=>,
+
+ );
+ sqlzonetogeozone::create($myarray);
+ }
+
+ }
+ $messageStack->add_session(sprintf(__('success for insert %s countries'), $nbr_result ), 'success');
+
+ }
+ else
+ $messageStack->add_session(__('geo_zones error reverse : please select zone for reverse'), 'error');
+
+ tep_redirect(tep_href_link(self::FILENAME, 'zID='.$id.'&action=edit'));
+ break;
+
+
+ /**
+ @remarks Insert Sub zone in current zone
+ */
+ case 'insert_sub':
+ $zID = tep_db_prepare_input( self::$getzID);
+
+ if(isset($_POST['zone_country_ids']) && is_array($_POST['zone_country_ids']) /*&& $_POST['zone_country_id'] ==''*/){
+
+ foreach($_POST['zone_country_ids'] as $zone_country_id ){
+ $myarray=array(
+ 'geo_zone_id'=> (int)$zID,
+ 'zone_country_id'=>(int)$zone_country_id ,
+ 'zone_id'=>'NULL',
+
+ );
+ sqlzonetogeozone::create($myarray);
+ }
+
+// tep_db_query("insert into " . TABLE_ZONES_TO_GEO_ZONES . " (zone_country_id, zone_id, geo_zone_id, date_added) values ('" . (int)$zone_country_id . "', NULL, '" . (int)$zID . "', now())");
+
+ }
+ else{
+ $zone_country_id = tep_db_prepare_input($_POST['zone_country_id']);
+ if(isset($_POST['zone_ids']) && is_array($_POST['zone_ids'])){
+ foreach($_POST['zone_ids'] as $zone_id ){
+ $myarray=array(
+ 'geo_zone_id'=> (int)$zID,
+ 'zone_country_id'=>(int)$zone_country_id ,
+ 'zone_id'=> (int)$zone_id,
+
+ );
+ sqlzonetogeozone::create($myarray);
+ }
+// tep_db_query("insert into " . TABLE_ZONES_TO_GEO_ZONES . " (zone_country_id, zone_id, geo_zone_id, date_added) values ('" . (int)$zone_country_id . "', '" . (int)$zone_id . "', '" . (int)$zID . "', now())");
+ }
+ else{
+ $zone_id = tep_db_prepare_input($_POST['zone_ids']);
+
+ $myarray=array(
+ 'geo_zone_id'=> (int)$zID,
+ 'zone_country_id'=>(int)$zone_country_id ,
+ 'zone_id'=> (int)$zone_id,
+ );
+ sqlzonetogeozone::create($myarray);
+
+// tep_db_query("insert into " . TABLE_ZONES_TO_GEO_ZONES . " (zone_country_id, zone_id, geo_zone_id, date_added) values ('" . (int)$zone_country_id . "', '" . (int)$zone_id . "', '" . (int)$zID . "', now())");
+ }
+ }
+
+ tep_redirect(tep_href_link(self::FILENAME, 'zID='.$zID.'&action=edit'));
+ break;
+
+ /**
+ @remarks Update Sub zone in current zone
+ */
+ case 'save_sub':
+ $sID = tep_db_prepare_input($_GET['sID']);
+ $zID = tep_db_prepare_input( self::$getzID);
+ $zone_country_id = tep_db_prepare_input($_POST['zone_country_id']);
+ $zone_id = tep_db_prepare_input($_POST['zone_id']);
+
+ tep_db_query("update " . TABLE_ZONES_TO_GEO_ZONES . " set geo_zone_id = '" . (int)$zID . "', zone_country_id = '" . (int)$zone_country_id . "', zone_id = " . (tep_not_null($zone_id) ? "'" . (int)$zone_id . "'" : 'null') . ", last_modified = now() where association_id = '" . (int)$sID . "'");
+
+ tep_redirect(tep_href_link(self::FILENAME, 'zID='.$zID.'&action=edit'));
+
+ break;
+
+ /**
+ @remarks Delete Sub zone in current zone
+ */
+ case 'deletesubconfirm':
+ $sID = tep_db_prepare_input($_POST['id']);
+ $zID = tep_db_prepare_input($_POST['zid']);
+
+ $myarray=array(
+ 'id'=> (int)$sID,
+ );
+
+ if( ! sqlzonetogeozone::delete($myarray) )
+ $messageStack->add_session(__('geo_zones error delete subzone'), 'error');
+ else
+ $messageStack->add_session(__('geo_zones success delete subzone'), 'success');
+
+
+ tep_redirect(tep_href_link(self::FILENAME, 'zID='.$zID.'&action=edit'));
+ break;
+
+
+
}
return self::$action;
}
+
+ /**
+ */
public function get_header(){
?>
<script language="javascript"><!--
@@ -174,40 +409,93 @@
}
+ /**
+ */
public static function load_db_values($ID){
$DB=Database::getInstance();
+ $query_raw = "SELECT geo_zone_grp as text , geo_zone_grp as id FROM " . TABLE_GEO_ZONES . " GROUP BY id";
+ $currency_query = $DB->query($query_raw);
+// $zones=
+ self::$geoGrpDispo = $currency_query->fetchAllAssoc();
+
if (self::$is_zone) {
- $query_raw = "select geo_zone_id, geo_zone_name, geo_zone_description, last_modified, date_added from " . TABLE_GEO_ZONES . " WHERE geo_zone_id='".$ID."' ";
+ $query_raw = "select geo_zone_id, geo_zone_name, geo_zone_type, geo_zone_grp, geo_zone_description, last_modified, date_added from " . TABLE_GEO_ZONES . " WHERE geo_zone_id='".$ID."' ";
$currency_query = $DB->query($query_raw);
$zones=$currency_query->fetchAssoc();
+
+
+/**
+ TODO desactived State
+*/
$num_zones_query = $DB->query("select count(*) as num_zones from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . (int)$zones['geo_zone_id'] . "' group by geo_zone_id");
$num_zones =$num_zones_query->fetchAssoc();
$zones['num_zones'] = ($num_zones['num_zones'] > 0) ? $num_zones['num_zones'] : 0;
- } else {
- $query_raw = "select a.association_id, a.zone_country_id, a.zone_id, a.geo_zone_id, a.last_modified, a.date_added,c.countries_name, z.zone_name from " . TABLE_ZONES_TO_GEO_ZONES . " a left join " . TABLE_COUNTRIES . " c on a.zone_country_id = c.countries_id left join " . TABLE_ZONES . " z on a.zone_id = z.zone_id where a.association_id = '".$ID."' ";
+
+ /// get All grp other and respect type current
+ $query_raw = "SELECT geo_zone_name as title , geo_zone_id as id FROM " . TABLE_GEO_ZONES . " WHERE geo_zone_grp = '".$zones['geo_zone_grp']."' AND geo_zone_type='".$zones['geo_zone_type']."' "; //AND geo_zone_id <> '".$zones['geo_zone_id']."' ";
+ $currency_query = $DB->query($query_raw);
+ $zones['grp_other'] = $currency_query->fetchAllAssoc();
+
+ /// get country not in group all
+ $zones_query_raw = "select * from " . TABLE_COUNTRIES . " c
+ where not exists
+ (
+ select 1
+ from ".TABLE_ZONES_TO_GEO_ZONES." g2z, " . TABLE_GEO_ZONES . " gz WHERE ( g2z.zone_country_id = c.countries_id OR g2z.zone_country_id = 0 ) AND gz.geo_zone_id = g2z.geo_zone_id AND geo_zone_grp = '".$zones['geo_zone_grp']."' AND geo_zone_type='".$zones['geo_zone_type']."'
+ )
+ ";
+ $currency_query = $DB->query($zones_query_raw);
+ $zones['grp_notin'] = $currency_query->fetchAllAssoc();
+
+ }
+
+
+ if(!empty(self:: $getsID)){
+ $query_raw = "select a.association_id, a.zone_country_id, a.zone_id, a.geo_zone_id, a.last_modified, a.date_added,c.countries_name, z.zone_name from " . TABLE_ZONES_TO_GEO_ZONES . " a left join " . TABLE_COUNTRIES . " c on a.zone_country_id = c.countries_id left join " . TABLE_ZONES . " z on a.zone_id = z.zone_id where a.association_id = '".self:: $getsID."' ";
$currency_query = $DB->query($query_raw);
- $zones=$currency_query->fetchAssoc();
+ $zon=$currency_query->fetchAssoc();
+
+ self::$zSubInfo = new objectInfo($zon );
+
}
+
+
+
return new objectInfo($zones );
}
public function display_view(){
- if (self::$is_zone)
switch (self::$action) {
- default:
- self::tep_get_list();
- return tep_get_include_contents(self::$code.'.listing');
+ case 'deletesub':
+ self:: $zInfo=self::load_db_values(self::$getzID);
+ $action ='deletesub';
+ break;
+ case 'delete':
+ self:: $zInfo=self::load_db_values(self::$getzID);
+ $action ='delete';
+ break;
+ case 'new_zone':
+ self:: $zInfo=self::load_db_values(self::$getzID);
+ self:: $zInfo->modeleszones=self::GetZoneModele();
+
+ $action ='new';
+ break;
+
+ case 'edit':
+ self:: $zInfo=self::load_db_values(self::$getzID);
+ $action ='edit';
+ break;
+ default:
+ self::tep_get_list();
+ $action ='listing';
}
- else
- switch (self::$action) {
- default:
- self::tep_get_list();
- return tep_get_include_contents(self::$code.'.list');
- }
+
+ /// use master gabarit
+ return MGabCont::CallGab($action,__FUNCTION__,__CLASS__);
}
@@ -219,36 +507,43 @@
self::init();
$s = '<span class="view fils fleft">';
if (self::$is_zone) {
- $s .=
- '<a class="buttonimg" href="' . tep_href_link(self::FILENAME, 'zID=' . $zones['geo_zone_id']. '&action=edit') . '">' . tep_image(DIR_WS_ICONS . 'icon_edit.png',IMAGE_EDIT) . '</a> '.
- '<a class="buttonimg" href="' . tep_href_link(self::FILENAME, 'zID=' . $zones['geo_zone_id'] . '&action=delete') . '">' . tep_image(DIR_WS_ICONS . 'icon_delete.png',IMAGE_DELETE ). '</a>'.
- '</span>'.
- '<span class="fright">'.
+
+ $s = sprintf(
+ CsrtAction::getFormat('row_action'),
+ '' ,
+ sprintf(CsrtAction::getLink('row_action_right', IMAGE_EDIT, 'edit'), '', tep_href_link(self::FILENAME, 'zID=' . $zones['geo_zone_id'] . '&action=edit') ,'' ).
+ sprintf(CsrtAction::getLink('row_action_right', IMAGE_DELETE, 'delete'), 'fancy', tep_href_link(self::FILENAME, 'zID=' . $zones['geo_zone_id'] . '&action=delete') ,'' )
+ );
+
// '<a href="' . tep_href_link(FILENAME_GEO_ZONES, 'zpage=' . $zpage . '&zID=' . $zones['geo_zone_id'] . '&action=list&spage=1&sID=' . $zones['geo_zone_id'] .'&saction=new') . '">' . tep_image(DIR_WS_ICONS . 'icon_add_new.png', IMAGE_INSERT) . '</a> '
- '<a href="' . tep_href_link(self::FILENAME,'&zID=' . $zones['geo_zone_id']. '&geo_zone_name=' . $zones['geo_zone_name'] . '&saction=list') . '">' . tep_image(DIR_WS_ICONS . 'icon_plus.gif', ICON_FOLDER) . '</a> ';
- if (self:: $getzID == $zones['geo_zone_id'] ) { $s .= tep_image(DIR_WS_ICONS . 'icon_arrow_right.gif'); }
- else { $s .= '<a href="' . tep_href_link(self::FILENAME, 'zID=' . $zones['geo_zone_id']) . '">' . tep_image(DIR_WS_ICONS . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; }
+// '<a href="' . tep_href_link(self::FILENAME,'&zID=' . $zones['geo_zone_id']. '&geo_zone_name=' . $zones['geo_zone_name'] . '&saction=list') . '">' . tep_image(DIR_WS_ICONS . 'icon_plus.gif', ICON_FOLDER) . '</a> ';
+// if (self:: $getzID == $zones['geo_zone_id'] ) { $s .= tep_image(DIR_WS_ICONS . 'icon_arrow_right.gif'); }
+// else { $s .= '<a href="' . tep_href_link(self::FILENAME, 'zID=' . $zones['geo_zone_id']) . '">' . tep_image(DIR_WS_ICONS . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; }
}
else {
- $s .=
- '<a class="buttonimg" href="' . tep_href_link(self::FILENAME, 'sID=' . $zones['association_id'] . '&zID='.self:: $getzID.'&saction=list&action=edit') . '">' . tep_image(DIR_WS_ICONS . 'icon_edit.png',IMAGE_EDIT ). '</a>'.
- '<a class="buttonimg" href="' . tep_href_link(self::FILENAME,'sID=' . $zones['association_id'] . '&zID='.self:: $getzID.'&saction=list&action=delete') . '">' . tep_image(DIR_WS_ICONS . 'icon_delete.png',IMAGE_DELETE).'</a>'.
- '</span>'.
- '<span class="fright">';
-
- if (self:: $getsID == $zones['association_id'] ) { $s .= tep_image(DIR_WS_ICONS . 'icon_arrow_right.gif'); }
- else { $s .= '<a href="' . tep_href_link(self::FILENAME, 'sID=' . $zones['association_id'] . '&zID='.self:: $getzID.'&saction=list') . '">' . tep_image(DIR_WS_ICONS . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; }
+ $s = sprintf(
+ CsrtAction::getFormat('row_action'),
+ '' ,
+ sprintf(CsrtAction::getLink('row_action_right', IMAGE_EDIT, 'edit'), '', tep_href_link(self::FILENAME, 'sID=' . $zones['association_id'] . '&zID='.self:: $getzID.'&action=edit&saction=edit') ,'' ).
+ sprintf(CsrtAction::getLink('row_action_right', IMAGE_DELETE, 'delete'), 'fancy', tep_href_link(self::FILENAME, 'sID=' . $zones['association_id'] . '&zID='.self:: $getzID.'&saction=list&action=deletesub') ,'' )
+ );
+// $s .=
+//
+// if (self:: $getsID == $zones['association_id'] ) { $s .= tep_image(DIR_WS_ICONS . 'icon_arrow_right.gif'); }
+// else { $s .= '<a href="' . tep_href_link(self::FILENAME, 'sID=' . $zones['association_id'] . '&zID='.self:: $getzID.'&saction=list') . '">' . tep_image(DIR_WS_ICONS . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; }
}
- $s .='</span>';
+// $s .='</span>';
return $s;
}
public static function tep_get_modele(){
self::init();
- if (self::$is_zone)
+// if (self::$is_zone)
+ if(self::$is_zone && self::$action !='edit')
return array( 'type'=>false,
+ 'grp'=>true,
'geo_zone_name'=>true,
'geo_zone_description'=>true,
'num_zones' =>false,
@@ -267,64 +562,57 @@
$DB=Database::getInstance();
if (self::$is_zone) {
- $query_raw = "select geo_zone_id, geo_zone_name, geo_zone_description, last_modified, date_added from " . TABLE_GEO_ZONES . " ".$sWhere." ORDER BY ".((!empty($sOrder)) ? $sOrder : 'geo_zone_name ASC');
+ $query_raw = "select * from " . TABLE_GEO_ZONES . " ".$sWhere." ORDER BY ".((!empty($sOrder)) ? $sOrder : 'geo_zone_name ASC');
- $currency_split = new splitPageResults($page, $rowbyp, $query_raw, $query_numrows);
- $currency_query = $DB->query($query_raw);
+ $currency_split = new splitPageResults($page, $rowbyp, $query_raw, $query_numrows);
+ $currency_query = $DB->query($query_raw);
- while ($zones = $currency_query->fetchAssoc() ) {
- $num_zones_query = $DB->query("select count(*) as num_zones from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . (int)$zones['geo_zone_id'] . "' group by geo_zone_id");
- $num_zones = $num_zones_query->fetchAssoc();
- $zones['num_zones'] = ($num_zones['num_zones'] > 0) ? $num_zones['num_zones'] : 0;
- self::$list[]=$zones;
- }
+ while ($zones = $currency_query...
[truncated message content] |
|
From: <os...@us...> - 2011-12-26 23:16:00
|
Revision: 3988
http://oscss.svn.sourceforge.net/oscss/?rev=3988&view=rev
Author: oscim
Date: 2011-12-26 23:15:54 +0000 (Mon, 26 Dec 2011)
Log Message:
-----------
Ajout lors de l'install des insetion de la table images
Modified Paths:
--------------
trunk/catalog/install/data/sample/appareil_photo/oscss_sample_data.sql
Added Paths:
-----------
trunk/catalog/install/includes/sql/mysql/data/91_osc_images.sql
Modified: trunk/catalog/install/data/sample/appareil_photo/oscss_sample_data.sql
===================================================================
--- trunk/catalog/install/data/sample/appareil_photo/oscss_sample_data.sql 2011-12-26 22:25:33 UTC (rev 3987)
+++ trunk/catalog/install/data/sample/appareil_photo/oscss_sample_data.sql 2011-12-26 23:15:54 UTC (rev 3988)
@@ -217,4 +217,42 @@
+
+INSERT INTO osc_images ( pathkey, path, file, date_added, last_modified, width, height, ext) VALUES
+( '692b75fc6312e428109e1f9312cfa007', 'images/sony.png', 'sony.png', '2011-12-26 23:40:29', '0000-00-00 00:00:00', 300, 191, 'png'),
+( 'cba0825cec275d062a22572011c55c48', 'images/D40x.jpg', 'D40x.jpg', '2011-12-26 23:40:29', '0000-00-00 00:00:00', 841, 650, 'jpeg'),
+( '1428461c2fbbda057c8cf141de435d45', 'images/DSCH9B.jpg', 'DSCH9B.jpg', '2011-12-26 23:40:29', '0000-00-00 00:00:00', 822, 650, 'jpeg'),
+( 'ad9b13002826c62e10ce88bb3325e1fa', 'images/button_css.png', 'button_css.png', '2011-12-26 23:40:29', '0000-00-00 00:00:00', 80, 15, 'png'),
+( 'fd195081dcd1aa7e55d3409e4c8c2b44', 'images/DMC-TZ3.gif', 'DMC-TZ3.gif', '2011-12-26 23:40:29', '0000-00-00 00:00:00', 737, 451, 'gif'),
+( 'e5667b755cc7ca2cfb446319efb92878', 'images/468x300.jpg', '468x300.jpg', '2011-12-26 23:40:29', '0000-00-00 00:00:00', 468, 300, 'jpeg'),
+( '8a84ddf6b907236b8c87f6d50111a397', 'images/photo.png', 'photo.png', '2011-12-26 23:40:29', '0000-00-00 00:00:00', 300, 300, 'png'),
+( 'd43807d8efdc590ded970cf6b2df5658', 'images/bridges.png', 'bridges.png', '2011-12-26 23:40:29', '0000-00-00 00:00:00', 300, 300, 'png'),
+( '2c35f34d0373c4747c0f14171da4d944', 'images/sigma30.jpg', 'sigma30.jpg', '2011-12-26 23:40:29', '0000-00-00 00:00:00', 841, 650, 'jpeg'),
+( '478ca7c72b5a8e8e9dca0ebeca570059', 'images/panasonic.png', 'panasonic.png', '2011-12-26 23:40:29', '0000-00-00 00:00:00', 300, 191, 'png'),
+( 'b0bdb156e36066a634457448cb2301cb', 'images/olympus-E-520.jpg', 'olympus-E-520.jpg', '2011-12-26 23:40:29', '0000-00-00 00:00:00', 1024, 795, 'jpeg'),
+( '345c0cec9e3b0ea285da9dbbca5ae093', 'images/nikon.png', 'nikon.png', '2011-12-26 23:40:29', '0000-00-00 00:00:00', 300, 191, 'png'),
+( '017a443b6093e3b4d138f30179c80354', 'images/DSCH7B.jpg', 'DSCH7B.jpg', '2011-12-26 23:40:29', '0000-00-00 00:00:00', 778, 650, 'jpeg'),
+('5a4fce8c868d28990e9d6cf57326a958', 'images/accessoires.png', 'accessoires.png', '2011-12-26 23:40:29', '0000-00-00 00:00:00', 300, 300, 'png'),
+( 'b2cd4337bf8d2d0861e478bf7e833d90', 'images/30mm.jpg', '30mm.jpg', '2011-12-26 23:40:29', '0000-00-00 00:00:00', 350, 350, 'jpeg'),
+('d55a7ce89f641bd5e39e46f39e2ad559', 'images/sigma.png', 'sigma.png', '2011-12-26 23:40:29', '0000-00-00 00:00:00', 300, 191, 'png'),
+( 'acd4ad69d227f17902332bfc3b1ca1e6', 'images/app-photo.png', 'app-photo.png', '2011-12-26 23:40:29', '0000-00-00 00:00:00', 300, 300, 'png'),
+( '7d7bd4981e1ab23f18067e40495ecddb', 'images/COOLPIXL15.jpg', 'COOLPIXL15.jpg', '2011-12-26 23:40:29', '0000-00-00 00:00:00', 400, 292, 'jpeg'),
+( 'e653824668488c73890a77350cc9c450', 'images/compact.png', 'compact.png', '2011-12-26 23:40:29', '0000-00-00 00:00:00', 300, 300, 'png'),
+('d8cf1c5c40870adcddb3f5a5afee2da1', 'images/bridges_et_plus23.png', 'bridges_et_plus23.png', '2011-12-26 23:40:29', '0000-00-00 00:00:00', 300, 300, 'png'),
+( '649cbde995d4e82d6f6ef1c686ef7561', 'images/p_12/iphone-aluminium.jpg', 'iphone-aluminium.jpg', '2011-12-26 23:40:35', '0000-00-00 00:00:00', 143, 121, 'jpeg'),
+( '81c68028687b103b44c03a7b21f42cf2', 'images/p_12/iphone-vert.jpg', 'iphone-vert.jpg', '2011-12-26 23:40:35', '0000-00-00 00:00:00', 143, 121, 'jpeg'),
+( '3153e3a8447b580a8272905d10152713', 'images/p_12/iphone-rose.jpg', 'iphone-rose.jpg', '2011-12-26 23:40:35', '0000-00-00 00:00:00', 143, 121, 'jpeg'),
+( '47abc5d5b15bc8ce6e84e342f4b8a9f4', 'images/p_12/iphone-bleu.jpg', 'iphone-bleu.jpg', '2011-12-26 23:40:35', '0000-00-00 00:00:00', 143, 121, 'jpeg'),
+( '34b7a7fb61bb4b25f1b410c8a6ac0a87', 'images/p_13/coque-arriere-bordeau-unie-pour-iphone-3g.jpg', 'coque-arriere-bordeau-unie-pour-iphone-3g.jpg', '2011-12-26 23:40:37', '0000-00-00 00:00:00', 300, 300, 'jpeg'),
+( 'ee28019cfd588ef6bc02f04d3d002bc7', 'images/p_13/coque-arriere-blanche-unie-pour-iphone-3g.jpg', 'coque-arriere-blanche-unie-pour-iphone-3g.jpg', '2011-12-26 23:40:37', '0000-00-00 00:00:00', 300, 300, 'jpeg'),
+( 'dea108b9194d7ac9c70ce3b840adbf46', 'images/p_13/coque-arriere-bleue-electrique-unie-pour-iphone-3g.jpg', 'coque-arriere-bleue-electrique-unie-pour-iphone-3g.jpg', '2011-12-26 23:40:37', '0000-00-00 00:00:00', 129, 129, 'jpeg'),
+( 'c1a4e711570f3e589f56f2a5a5a4362a', 'images/p_13/coque-arriere-bordeau-unie-pour-iphone-3g_2.jpg', 'coque-arriere-bordeau-unie-pour-iphone-3g_2.jpg', '2011-12-26 23:40:37', '0000-00-00 00:00:00', 300, 300, 'jpeg'),
+( '8de43d827b591ae265f3c6c71e7e3c40', 'images/p_13/coque-arriere-noire-unie-pour-iphone-3g.jpg', 'coque-arriere-noire-unie-pour-iphone-3g.jpg', '2011-12-26 23:40:37', '0000-00-00 00:00:00', 300, 300, 'jpeg'),
+( '001522209aebcddc5ef95598e26722b2', 'images/p_13/coque-arriere-grise-unie-pour-iphone-3g.jpg', 'coque-arriere-grise-unie-pour-iphone-3g.jpg', '2011-12-26 23:40:37', '0000-00-00 00:00:00', 300, 300, 'jpeg'),
+( 'c49ae313c0684502ee35541c1d88af6e', 'images/p_13/coque-arriere-fushia-unie-pour-iphone-3g.jpg', 'coque-arriere-fushia-unie-pour-iphone-3g.jpg', '2011-12-26 23:40:37', '0000-00-00 00:00:00', 300, 300, 'jpeg'),
+( '18d02e616e395feda6123b598b360806', 'images/p_13/coque-arriere-noire-unie-pour-iphone-3g_2.jpg', 'coque-arriere-noire-unie-pour-iphone-3g_2.jpg', '2011-12-26 23:40:37', '0000-00-00 00:00:00', 300, 300, 'jpeg'),
+( 'e05ff8069cc2f06ede64c5dc3180c813', 'images/p_13/coque-arriere-grise-unie-pour-iphone-3g_2.jpg', 'coque-arriere-grise-unie-pour-iphone-3g_2.jpg', '2011-12-26 23:40:37', '0000-00-00 00:00:00', 300, 300, 'jpeg');
+
+
+
COMMIT;
\ No newline at end of file
Added: trunk/catalog/install/includes/sql/mysql/data/91_osc_images.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/data/91_osc_images.sql (rev 0)
+++ trunk/catalog/install/includes/sql/mysql/data/91_osc_images.sql 2011-12-26 23:15:54 UTC (rev 3988)
@@ -0,0 +1,24 @@
+--+######################################################################--+
+--| osCSS Open Source E-commerce |
+--+######################################################################--+
+--| Copyright (c) 2005-2011 The osCSS developers |
+--| |
+--| http://www.oscss.org |
+--| Portions Copyright (c) 2003 osCommerce |
+--+######################################################################--+
+--| This source file is subject to version 2.0 of the GPL license, |
+--| available at the following url: |
+--| http://www.oscss.org/ |
+--+######################################################################--+
+
+
+
+--
+-- Contenu de la table osc_images
+--
+
+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'),
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2011-12-26 22:25:39
|
Revision: 3987
http://oscss.svn.sourceforge.net/oscss/?rev=3987&view=rev
Author: oscim
Date: 2011-12-26 22:25:33 +0000 (Mon, 26 Dec 2011)
Log Message:
-----------
suite correction evolution des images
Modified Paths:
--------------
trunk/catalog/admin/includes/functions/html_output.php
trunk/catalog/common/classes/image_ratio.php
Modified: trunk/catalog/admin/includes/functions/html_output.php
===================================================================
--- trunk/catalog/admin/includes/functions/html_output.php 2011-12-26 14:27:42 UTC (rev 3986)
+++ trunk/catalog/admin/includes/functions/html_output.php 2011-12-26 22:25:33 UTC (rev 3987)
@@ -228,10 +228,10 @@
// public images
function tep_info_image($image, $alt, $width = '', $height = '', $parameters = '',$mode=false) {
- if(preg_match('#([0-9\.]*)#', $image))
+ if(preg_match('#^([0-9\.]*)$#i', $image))
return '<img src="'.tep_href_link('document.php', 'mod=img&typ=db&id='.$image.'&w='.$width.'&h='.$height).'" alt="'.$alt.'" title="'.$alt.'" '.$parameters.'/>';
else
- return '<img src="'.tep_href_link('document.php', 'mod=img&typ=db&key='.md5('images/'.$image).'&w='.$width.'&h='.$height).'" alt="'.$alt.'" title="'.$alt.'" '.$parameters.'/>';
+ 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.'/>';
}
/**
Modified: trunk/catalog/common/classes/image_ratio.php
===================================================================
--- trunk/catalog/common/classes/image_ratio.php 2011-12-26 14:27:42 UTC (rev 3986)
+++ trunk/catalog/common/classes/image_ratio.php 2011-12-26 22:25:33 UTC (rev 3987)
@@ -159,7 +159,7 @@
return self::$CacheImage[self::$key][self::$keydim]['img'];
}
else {
- $image = '<img src="' . (!self::$env->inadmin ? tep_output_string(tep_get_httpdir().$theImg['src_origin']."?w=" . $width . "&h=" . $height ) : tep_output_string($src)) . '" alt="' . tep_output_string($alt) . '" ';
+ $image = '<img src="' . (!self::$env->inadmin ? tep_output_string(tep_get_httpdir().$theImg['src_origin']."?w=" . $width . "&h=" . $height ) : tep_output_string(DIR_WS_ADMIN.$src)) . '" alt="' . tep_output_string($alt) . '" ';
if($mode !='simple') $image .= 'width="' . $theImg['width'] . '" height="' . $theImg['height'] . '"';
if (tep_not_null($theImg['alt'])) $image .= ' title="' . tep_output_string($theImg['alt']) . '"';
if (tep_not_null($parameters)) $image .= ' ' . $parameters;
@@ -287,7 +287,6 @@
Any commercial selling of this script is forbidden.
*/
protected static function thumbgd ($image, $width, $height, $width_src, $height_scr, $format, $thumbfile){
-echo $thumbfile;
// error_reporting(E_ALL);
$image = call_user_func("imagecreatefrom".$format, $image);
@@ -344,13 +343,10 @@
if(isset(self::$CacheImage[self::$key]['conf']['original'])) return ;
$sortie=true;
-// var_dump($src);
if(strpos($src, DIR_FS_ROOT_DOCS) === false ) $src;
else $src= substr ($src, strlen(DIR_FS_ROOT_DOCS));
-// var_dump($src);
-
if(strpos($src, DIR_WS_LANGUAGES) >0 ) self::$CacheImage[self::$key]['conf']['dest']='lang';
else self::$CacheImage[self::$key]['conf']['dest']='image';
@@ -367,8 +363,6 @@
}
-
-// var_dump($src_dir);
if (!@is_file($src_dir) || empty($src_dir)){
if (self::$env->img_required) $sortie= '<span class="errorText">'.__('Le fichier n\'a pas pu être trouvé sur le serveur !').'</span>';
$sortie = false;
@@ -389,7 +383,7 @@
private static function initCurrent($src,$width,$height){
-// var_dump(());
+
self::$key = md5($src.get_class(self::$Modele));
self::$keydim=md5($width . $height.get_class(self::$Modele));
@@ -463,13 +457,13 @@
/**
@remarks Sub Folder in Cache
*/
- $subpath = $width.'x'.$height.'/';
-// var_dump($image);
-// exit;
+ $subpath = $width.'x'.$height.( (self::$env->inadmin) ? '_' : '/' );
+
$thumb = $subpath.$getclass.basename($image).'_'.md5($image).'.'.((self::$types[$format]=="jpeg") ? "jpg" : self::$types[$format]);
- if(!file_exists( DIR_FS_ROOT_DOCS.self::$env->cachedir.$subpath) || !is_dir(DIR_FS_ROOT_DOCS.self::$env->cachedir.$subpath))
- @mkdir(DIR_FS_ROOT_DOCS.self::$env->cachedir.$subpath);
+ if (!self::$env->inadmin)
+ if(!file_exists( DIR_FS_ROOT_DOCS.self::$env->cachedir.$subpath) || !is_dir(DIR_FS_ROOT_DOCS.self::$env->cachedir.$subpath))
+ @mkdir(DIR_FS_ROOT_DOCS.self::$env->cachedir.$subpath);
$thumbfile = substr($image,0, strpos($image, DIR_WS_IMAGES) ) . self::$env->cachedir . $thumb;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2011-12-26 14:27:50
|
Revision: 3986
http://oscss.svn.sourceforge.net/oscss/?rev=3986&view=rev
Author: oscim
Date: 2011-12-26 14:27:42 +0000 (Mon, 26 Dec 2011)
Log Message:
-----------
Suite amelioration et evolution de la prise en charge des images de data (dir images) deport?\195?\169 dans le dossier Documents et trait?\195?\169 par les fichier document.
Deplacement du dossier images ds Documents
Suite evolution du tinybroswer pour la gestion du suivi et mise a jour de la db lors des actions sur les image (resize, rotate, move, rename) des fichiers
Ajout d'une class imageUtility de centralisation des operations sur les images
Ajout class sqlsrivers pour les coutries, et amelioration des geozone et geo2zone.
Ajustement des functions tep_images (FO) et tep_inof_image (BO)
Modified Paths:
--------------
trunk/catalog/admin/document.php
trunk/catalog/admin/editeur/tiny_mce/plugins/tinybrowser/config_tinybrowser.php
trunk/catalog/admin/editeur/tiny_mce/plugins/tinybrowser/edit.php
trunk/catalog/admin/editeur/tiny_mce/plugins/tinybrowser/fns_tinybrowser.php
trunk/catalog/admin/editeur/tiny_mce/plugins/tinybrowser/tinybrowser.php
trunk/catalog/admin/includes/classes/drivers/sqlgeozone.php
trunk/catalog/admin/includes/classes/drivers/sqlzonetogeozone.php
trunk/catalog/admin/includes/classes/fileUtility.php
trunk/catalog/admin/includes/functions/html_output.php
trunk/catalog/common/classes/image_ratio.php
trunk/catalog/document.php
trunk/catalog/includes/database_tables.php
trunk/catalog/includes/functions/html_output.php
Added Paths:
-----------
trunk/catalog/Documents/images/
trunk/catalog/admin/includes/classes/drivers/sqlcountries.php
trunk/catalog/admin/includes/classes/imageUtility.php
Removed Paths:
-------------
trunk/catalog/images/
Modified: trunk/catalog/admin/document.php
===================================================================
--- trunk/catalog/admin/document.php 2011-12-23 09:28:12 UTC (rev 3985)
+++ trunk/catalog/admin/document.php 2011-12-26 14:27:42 UTC (rev 3986)
@@ -34,26 +34,25 @@
$img = $res->image;
break;
case 'db':
- if(isset($_REQUEST['id']))
- $myar = array('id'=>(int)$_REQUEST['id']);
- elseif(isset($_REQUEST['key']))
- $myar = array('pathkey'=>$_REQUEST['key']);
+ if(isset($_REQUEST['id']) && !empty($_REQUEST['id']) )
+ $myar = array('id'=>(int)$_REQUEST['id']);
+ elseif(isset($_REQUEST['key']))
+ $myar = array('pathkey'=>$_REQUEST['key']);
+ else
+ $myar = array('pathkey'=>md5(str_replace(array('//',DIR_WS_CATALOG_IMAGES),array('/',DIR_WS_IMAGES),IMAGE_NONEXISTENT)) );
+ $res=sqlimage::fetch($myar, true);
- $res=sqlimage::fetch($myar, true);
-// print_r($res);
-// exit;
- $img = preg_replace('#^('.DIR_WS_IMAGES.')#' , '', $res->path);
+ $img = preg_replace('#^('.DIR_WS_IMAGES.')#' , '', $res->path);
break;
}
-
$get=image_ratio::get_image(DIR_WS_CATALOG_IMAGES.$img,'',$width,$height);
+
$img=preg_replace('#^('.DIR_WS_CATALOG_IMAGES.')#' , '', $get['src']);
$ext = str_replace('.','',substr($img,-4));
if($ext='jpg')$ext='jpeg';
-// var_dump($ext);
-// exit;
+
header('Content-type: image/'.$ext);
readfile(DIR_FS_CATALOG_IMAGES.$img);
Modified: trunk/catalog/admin/editeur/tiny_mce/plugins/tinybrowser/config_tinybrowser.php
===================================================================
--- trunk/catalog/admin/editeur/tiny_mce/plugins/tinybrowser/config_tinybrowser.php 2011-12-23 09:28:12 UTC (rev 3985)
+++ trunk/catalog/admin/editeur/tiny_mce/plugins/tinybrowser/config_tinybrowser.php 2011-12-26 14:27:42 UTC (rev 3986)
@@ -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 24/03/11, 20:39
+ @version 2.1.1
+ @date 28/12/11, 20:39
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -57,7 +57,7 @@
$tinybrowser['integration'] = 'tinymce'; // Possible values: 'tinymce', 'fckeditor'
// Default is rtrim($_SERV/*ER['DOCUMENT_ROOT'],'/') (suitable when using absolute paths, but can be set to '' if using relative paths)
-$tinybrowser['docroot'] =DIR_FS_DOCUMENT_ROOT; //$_SERVER['DOCUMENT_ROOT'];
+$tinybrowser['docroot'] =DIR_FS_ROOT_DOCS; //$_SERVER['DOCUMENT_ROOT'];
// Folder permissions for Unix servers only
$tinybrowser['unixpermissions'] = 0777;
@@ -133,6 +133,9 @@
$tinybrowser['window']['height'] = 480;
// Assign Permissions for Upload, Edit, Delete & Folders
+/**
+ TODO REVOIR les ACL , utilisé ceux d'osCSS
+*/
$tinybrowser['allowupload'] = true;
$tinybrowser['allowedit'] = true;
$tinybrowser['allowdelete'] = true;
Modified: trunk/catalog/admin/editeur/tiny_mce/plugins/tinybrowser/edit.php
===================================================================
--- trunk/catalog/admin/editeur/tiny_mce/plugins/tinybrowser/edit.php 2011-12-23 09:28:12 UTC (rev 3985)
+++ trunk/catalog/admin/editeur/tiny_mce/plugins/tinybrowser/edit.php 2011-12-26 14:27:42 UTC (rev 3986)
@@ -89,31 +89,17 @@
// Delete any checked files
if(isset($_POST['deletefile']))
{
- foreach($_POST['deletefile'] as $delthis => $val)
- {
- $delthisfile = $tinybrowser['docroot'].$editpath.$_POST['actionfile'][$delthis];
- if (file_exists($delthisfile) && unlink($delthisfile)) $deleteqty++;
- else $errorqty++;
+ foreach($_POST['deletefile'] as $delthis => $val){
/**
- @remarks Check And add if not exists in db table
+ @remarks delete all files (thumb + src + db)
*/
- $res= sqlimage::fetch(array('path'=>.$editpath.$_POST['actionfile'][$delthis]), true);
- if($res){
+ if( ! imageUtility::delete($editpath.$_POST['actionfile'][$delthis]) )
+ $errorqty++;
+ else
+ $deleteqty++;
- $sql = array(
- 'id'=>$res->rowid,
- );
- $res= sqlimage::delete($sql);
}
-
-
- if($typenow=='image')
- {
- $delthisthumb = $tinybrowser['docroot'].$editpath.$tinybrowser['thumbfolder'].'/_'.$_POST['actionfile'][$delthis];
- if (file_exists($delthisthumb)) unlink($delthisthumb);
- }
- }
}
// Rename any files with changed name
@@ -123,32 +109,16 @@
{
if($_POST['actionfile'][$namethis] != $newname.$_POST['renameext'][$namethis])
{
- $namethisfilefrom = $tinybrowser['docroot'].$editpath.$_POST['actionfile'][$namethis];
- $namethisfileto = $tinybrowser['docroot'].$editpath.clean_filename($newname.$_POST['renameext'][$namethis]);
- if (file_exists($namethisfilefrom) && rename($namethisfilefrom,$namethisfileto)) $renameqty++;
- else $errorqty++;
+
/**
- @remarks Check And add if not exists in db table
+ @remarks delete all files (thumb + src + db)
*/
- $res= sqlimage::fetch(array('path'=>$editpath.$_POST['actionfile'][$namethis]), true);
- if($res){
+ if( ! imageUtility::rename($editpath.$_POST['actionfile'][$namethis], $editpath.clean_filename($newname.$_POST['renameext'][$namethis])) )
+ $errorqty++;
+ else
+ $renameqty++;
- $sql = array(
- 'id'=>$res->rowid,
- 'path'=>$editpath.clean_filename($newname.$_POST['renameext'][$namethis]),
- 'pathkey'=>$editpath.clean_filename($newname.$_POST['renameext'][$namethis]),
- 'file'=>basename($editpath.clean_filename($newname.$_POST['renameext'][$namethis])),
- );
- $res= sqlimage::update($sql);
- }
-
- if($typenow=='image')
- {
- $namethisthumbfrom = $tinybrowser['docroot'].$editpath.$tinybrowser['thumbfolder'].'/_'.$_POST['actionfile'][$namethis];
- $namethisthumbto = $tinybrowser['docroot'].$editpath.$tinybrowser['thumbfolder'].'/_'.clean_filename($newname.$_POST['renameext'][$namethis]);
- if (file_exists($namethisthumbfrom)) rename($namethisthumbfrom,$namethisthumbto);
- }
}
}
}
@@ -158,39 +128,15 @@
{
foreach($_POST['movefile'] as $movethis => $val)
{
- $movethisfile = $tinybrowser['docroot'].$editpath.$_POST['actionfile'][$movethis];
- $movefiledest = $tinybrowser['docroot'].$destfolder.$_POST['actionfile'][$movethis];
-
-
/**
- @remarks Check And add if not exists in db table
+ @remarks delete all files (thumb + src + db)
*/
- $res= sqlimage::fetch(array('path'=>$editpath.$_POST['actionfile'][$movethis]), true);
- if($res){
+ if( ! imageUtility::move($editpath.$_POST['actionfile'][$movethis], $destfolder.$_POST['actionfile'][$movethis]) )
+ $errorqty++;
+ else
+ $renameqty++;
- $sql = array(
- 'id'=>$res->rowid,
- 'path'=>$destfolder.$_POST['actionfile'][$movethis],
- 'pathkey'=>$destfolder.$_POST['actionfile'][$movethis],
- 'file'=>basename($destfolder.$_POST['actionfile'][$movethis]),
- );
- $res= sqlimage::update($sql);
}
-
-
- if (!file_exists($movefiledest) && file_exists($movethisfile) && copy($movethisfile,$movefiledest))
- {
- $moveqty++;
- unlink($movethisfile);
- if($typenow=='image')
- {
- $movethisthumb = $tinybrowser['docroot'].$editpath.$tinybrowser['thumbfolder'].'/_'.$_POST['actionfile'][$movethis];
- $movethumbdest = $tinybrowser['docroot'].$destfolder.$tinybrowser['thumbfolder'].'/_'.$_POST['actionfile'][$movethis];
- if (file_exists($movethisthumb) && copy($movethisthumb,$movethumbdest)) unlink($movethisthumb);
- }
- }
- else $errorqty++;
- }
}
// Resize any files with new size
@@ -204,27 +150,16 @@
// detect silly sizes
if($newsize > $tinybrowser['thumbsize'])
{
- // do image resize
- $targetimg = $tinybrowser['docroot'].$editpath.$_POST['actionfile'][$sizethis];
- if (file_exists($targetimg))
- {
- $mime = getimagesize($targetimg);
- if($_POST['resizetype'][$sizethis]=='width')
- {
- $rw = $newsize;
- $rh = $mime[1];
- }
- else
- {
- $rw = $mime[0];
- $rh = $newsize;
- }
- $im = convert_image($targetimg,$mime['mime']);
- resizeimage($im,$rw,$rh,$targetimg,$tinybrowser['imagequality'],$mime['mime']);
- imagedestroy($im);
- $resizeqty++;
- }
- else $errorqty++;
+
+
+ /**
+ @remarks delete all files (thumb + src + db)
+ */
+ if( ! imageUtility::resize($editpath.$_POST['actionfile'][$sizethis], $_POST['resizetype'][$sizethis]) )
+ $resizeqty++;
+ else
+ $rotateqty++;
+
}
else $errorqty++;
}
@@ -234,104 +169,30 @@
// Rotate any selected files
if(isset($_POST['rotatefile']))
{
- $imagerefresh = '?refresh='.uniqid('');
- foreach($_POST['rotatefile'] as $rotatethis => $direction)
- {
- if($direction != 'none')
- {
+// $imagerefresh = '?refresh='.uniqid('');
+ foreach($_POST['rotatefile'] as $rotatethis => $direction){
+
+ if($direction != 'none'){
+
$targetimg = $tinybrowser['docroot'].$editpath.$_POST['actionfile'][$rotatethis];
- if (file_exists($targetimg))
- {
- // rotate image
- if($direction == 'clock') $degree=270; else $degree=90;
- $mime = getimagesize($targetimg);
- $im = convert_image($targetimg,$mime['mime']);
- // additional processing for png / gif transparencies (credit to Dirk Bohl)
- if($mime['mime'] == 'image/x-png' || $mime['mime'] == 'image/png')
- {
- imagealphablending($newim, false);
- imagesavealpha($newim, true);
- }
- elseif($mime['mime'] == 'image/gif')
- {
- $originaltransparentcolor = imagecolortransparent( $im );
- if($originaltransparentcolor >= 0 && $originaltransparentcolor < imagecolorstotal( $im ))
- {
- $transparentcolor = imagecolorsforindex( $im, $originaltransparentcolor );
- $newtransparentcolor = imagecolorallocate($newim,$transparentcolor['red'],$transparentcolor['green'],$transparentcolor['blue']);
- imagefill( $newim, 0, 0, $newtransparentcolor );
- imagecolortransparent( $newim, $newtransparentcolor );
- }
- }
- $newim = imagerotate($im, $degree, 0);
- imagedestroy($im);
+ /**
+ @remarks delete all files (thumb + src + db)
+ */
+ if( ! imageUtility::rotate($editpath.$_POST['actionfile'][$rotatethis], $direction) )
+ $errorqty++;
+ else
+ $rotateqty++;
- if($mime['mime'] == 'image/pjpeg' || $mime['mime'] == 'image/jpeg')
- imagejpeg ($newim,$targetimg,$tinybrowser['imagequality']);
- elseif($mime['mime'] == 'image/x-png' || $mime['mime'] == 'image/png')
- imagepng ($newim,$targetimg,substr($tinybrowser['imagequality'],0,1));
- elseif($mime['mime'] == 'image/gif')
- imagegif ($newim,$targetimg);
- imagedestroy($newim);
- $rotateqty++;
- // delete and recreate thumbnail image
- $targetthumb = $tinybrowser['docroot'].$editpath.$tinybrowser['thumbfolder'].'/_'.$_POST['actionfile'][$rotatethis];
- if (file_exists($targetthumb)) unlink($targetthumb);
- $mime = getimagesize($targetimg);
- $im = convert_image($targetimg,$mime['mime']);
- resizeimage($im,$tinybrowser['thumbsize'],$tinybrowser['thumbsize'],$targetthumb,$tinybrowser['thumbquality'],$mime['mime']);
- imagedestroy($im);
- }
- else $errorqty++;
}
}
}
// Read directory contents and populate $file array
-$dh = opendir($tinybrowser['docroot'].$editpath);
-$file = array();
-while (($filename = readdir($dh)) !== false)
- {
- // get file extension
- $nameparts = explode('.',$filename);
- $ext = end($nameparts);
- // filter directories and prohibited file types
- if($filename != '.' && $filename != '..' && !is_dir($tinybrowser['docroot'].$editpath.$filename) && !in_array($ext, $tinybrowser['prohibited']) && ($typenow == 'file' || strpos(strtolower($tinybrowser['filetype'][$typenow]),strtolower($ext))))
- {
- // search file name if search term entered
- if($findnow) $exists = strpos(strtolower($filename),strtolower($findnow));
+ $file = TinyBrowser::BrowseFiles($editpath);
- // assign file details to array, for all files or those that match search
- if(!$findnow || ($findnow && $exists !== false))
- {
- $file['name'][] = $filename;
- $file['sortname'][] = strtolower($filename);
- $file['modified'][] = filemtime($tinybrowser['docroot'].$editpath.$filename);
- $file['size'][] = filesize($tinybrowser['docroot'].$editpath.$filename);
-
- // image specific info or general
- if($typenow=='image' && $imginfo = getimagesize($tinybrowser['docroot'].$editpath.$filename))
- {
- $file['width'][] = $imginfo[0];
- $file['height'][] = $imginfo[1];
- $file['dimensions'][] = $imginfo[0] + $imginfo[1];
- $file['type'][] = $imginfo['mime'];
- }
- else
- {
- $file['width'][] = 'N/A';
- $file['height'][] = 'N/A';
- $file['dimensions'][] = 'N/A';
- $file['type'][] = returnMIMEType($filename);
- }
- }
- }
- }
-closedir($dh);
-
// Assign directory structure to array
$editdirs=array();
dirtree($editdirs,$tinybrowser['filetype'][$typenow],$tinybrowser['docroot'],$tinybrowser['path'][$typenow]);
@@ -539,7 +400,10 @@
{
$alt = (IsOdd($i) ? 'r1' : 'r0');
echo '<tr class="'.$alt.'">';
- if($typenow=='image') echo '<td><a class="imghover" href="#" onclick="return false;" title="'.$file['name'][$i].' '.TB_DIMENSIONS.': '.$file['width'][$i].' x '.$file['height'][$i].' '.TB_DATE.': '.date($tinybrowser['dateformat'],$file['modified'][$i]).'"><img src="'.$thumbpath.$tinybrowser['thumbfolder'].'/_'.$file['name'][$i].$imagerefresh.'" alt="" />' .truncate_text($file['name'][$i],30).'</a></td>';
+ if($typenow=='image') echo '<td><a class="imghover" href="#" onclick="return false;" title="'.$file['name'][$i].' '.TB_DIMENSIONS.': '.$file['width'][$i].' x '.$file['height'][$i].' '.TB_DATE.': '.date($tinybrowser['dateformat'],$file['modified'][$i]).'">'
+// <img src="'.$thumbpath.$tinybrowser['thumbfolder'].'/_'.$file['name'][$i].$imagerefresh.'" alt="" />
+ .'<img src="'.tep_get_http().DIR_WS_ADMIN.'document.php?mod=img&typ=db&id='.$file['id'][$i].'&w='.$tinybrowser['thumbsize'].'&h='.$tinybrowser['thumbsize'] /*$file['src'][$i]*/ .'" />'
+ .truncate_text($file['name'][$i],30).'</a></td>';
else echo '<td title="'.$file['name'][$i].' '.TB_DATE.': '.date($tinybrowser['dateformat'],$file['modified'][$i]).'">'.truncate_text($file['name'][$i],30).'</td>';
echo '<td>'.bytestostring($file['size'][$i],1).'</td><td>'.$file['type'][$i].'</td>'
.'<td>';
Modified: trunk/catalog/admin/editeur/tiny_mce/plugins/tinybrowser/fns_tinybrowser.php
===================================================================
--- trunk/catalog/admin/editeur/tiny_mce/plugins/tinybrowser/fns_tinybrowser.php 2011-12-23 09:28:12 UTC (rev 3985)
+++ trunk/catalog/admin/editeur/tiny_mce/plugins/tinybrowser/fns_tinybrowser.php 2011-12-26 14:27:42 UTC (rev 3986)
@@ -1,5 +1,114 @@
<?php
error_reporting(E_ALL);
+
+
+
+Class TinyBrowser{
+
+
+
+ /**
+ @fn
+ @brief construct Browse Path and adjust sql links
+ @param $browsepath dirpath relative dir path ofr config tinybrowser
+ @param $findnow string keywords search
+ */
+ static public function BrowseFiles($browsepath, $findnow=''){
+ global $tinybrowser, $typenow;
+
+// print_r($tinybrowser);
+
+ // Read directory contents and populate $file array
+ $dh = opendir($tinybrowser['docroot'].$browsepath);
+ $file = array();
+ $u=0;
+ while (($filename = readdir($dh)) !== false)
+ {
+
+ // get file extension
+ $nameparts = explode('.',$filename);
+ $ext = end($nameparts);
+ unset($imginfo);
+ // filter directories and prohibited file types
+ if($filename != '.' && $filename != '..' && !is_dir($tinybrowser['docroot'].$browsepath.$filename) && !in_array($ext, $tinybrowser['prohibited']) && ($typenow == 'file' || strpos(strtolower($tinybrowser['filetype'][$typenow]),strtolower($ext)))
+ ) {
+ // search file name if search term entered
+ if($findnow)
+ $exists = strpos(strtolower($filename),strtolower($findnow));
+
+ // assign file details to array, for all files or those that match search
+ if(!$findnow || ($findnow && $exists !== false))
+ {
+ $file['name'][$u] = $filename;
+ $file['title'][$u] = $filename;
+ $file['sortname'][$u] = strtolower($filename);
+ $file['modified'][$u] = filemtime($tinybrowser['docroot'].$browsepath.$filename);
+ $file['size'][$u] = filesize($tinybrowser['docroot'].$browsepath.$filename);
+
+ // image specific info or general
+ if($typenow=='image' ) /*getimagesize($tinybrowser['docroot'].$browsepath.$filename)*//*)*/
+ {
+
+ /**
+ @remarks Check And add if not exists in db table
+ */
+ $res= sqlimage::fetch(array('path'=>$browsepath.$filename), true);
+
+ if(!$res){
+ $imginfo = image_ratio::get_image($tinybrowser['docroot'].$browsepath.$filename,'');
+
+ $sql = array(
+ 'path'=>$browsepath.$filename,
+ 'file'=>$filename,
+ 'width'=>$imginfo['width'],
+ 'height'=>$imginfo['height'],
+ 'ext'=>substr($imginfo['mime'], strpos($imginfo['mime'],'/')+1 ) ,
+ );
+
+ $id = $res= sqlimage::create($sql);
+ $width = $imginfo['width'] ;
+ $height = $imginfo['height'] ;
+ $ext = $sql['ext'] ;
+ $src =$imginfo['src'];
+ }
+ else{
+ $id = $res->rowid;
+ $width = $res->width ;
+ $height = $res->height ;
+ $ext = $res->ext ;
+ $src = $res->path ;
+ }
+
+ $file['width'][$u] = $width;
+ $file['height'][$u] = $height;
+ $file['dimensions'][$u] =$width+$height ;// $imginfo[0] + $imginfo[1];
+ $file['type'][$u] = $ext; //$imginfo['mime'];
+ $file['src'][$u] =$src;
+ $file['id'][$u] =$id;
+
+
+ }
+ else
+ {
+ $file['width'][$u] = 'N/A';
+ $file['height'][$u] = 'N/A';
+ $file['dimensions'][$u] = 'N/A';
+ $file['type'][$u] = returnMIMEType($filename);
+ }
+ }
+ $u++;
+ }
+ }
+ closedir($dh);
+
+ return $file;
+ }
+
+
+}
+
+
+
// *************************CREATE FOLDER**********************************
function createfolder($dir,$perm) {
is_dir(dirname($dir)) || createfolder(dirname($dir), $perm);
@@ -26,19 +135,19 @@
switch($sortbynow)
{
case 'name':
- array_multisort($file['sortname'], $sortorder, $file['name'], $sortorder, $file['type'], $sortorder, $file['modified'], $sortorder, $file['size'], $sortorder, $file['dimensions'], $sortorder, $file['width'], $sortorder, $file['height'], $sortorder,$file['src'], $sortorder);
+ array_multisort($file['sortname'], $sortorder, $file['name'], $sortorder, $file['type'], $sortorder, $file['modified'], $sortorder, $file['size'], $sortorder, $file['dimensions'], $sortorder, $file['width'], $sortorder, $file['height'], $sortorder,$file['src'], $sortorder, $file['id'], $sortorder, $file['title'], $sortorder);
break;
case 'size':
- array_multisort($file['size'], $sortorder, $file['sortname'], SORT_ASC, $file['name'], SORT_ASC, $file['type'], $sortorder, $file['modified'], $sortorder, $file['dimensions'], $sortorder, $file['width'], $sortorder, $file['height'], $sortorder,$file['src'], $sortorder);
+ array_multisort($file['size'], $sortorder, $file['sortname'], $sortorder, $file['name'], $sortorder, $file['type'], $sortorder, $file['modified'], $sortorder, $file['dimensions'], $sortorder, $file['width'], $sortorder, $file['height'], $sortorder,$file['src'], $sortorder, $file['id'], $sortorder, $file['title'], $sortorder);
break;
case 'type':
- array_multisort($file['type'], $sortorder, $file['sortname'], SORT_ASC, $file['name'], SORT_ASC, $file['size'], $sortorder, $file['modified'], $sortorder, $file['dimensions'], $sortorder, $file['width'], $sortorder, $file['height'], $sortorder,$file['src'], $sortorder);
+ array_multisort($file['type'], $sortorder, $file['sortname'], $sortorder, $file['name'], $sortorder, $file['size'], $sortorder, $file['modified'], $sortorder, $file['dimensions'], $sortorder, $file['width'], $sortorder, $file['height'], $sortorder,$file['src'], $sortorder, $file['id'], $sortorder, $file['title'], $sortorder);
break;
case 'modified':
- array_multisort($file['modified'], $sortorder, $file['name'], $sortorder, $file['name'], $sortorder, $file['type'], $sortorder, $file['size'], $sortorder, $file['dimensions'], $sortorder, $file['width'], $sortorder, $file['height'], $sortorder,$file['src'], $sortorder);
+ array_multisort($file['modified'], $sortorder, $file['name'], $sortorder, $file['name'], $sortorder, $file['type'], $sortorder, $file['size'], $sortorder, $file['dimensions'], $sortorder, $file['width'], $sortorder, $file['height'], $sortorder,$file['src'], $sortorder, $file['id'], $sortorder, $file['title'], $sortorder);
break;
case 'dimensions':
- array_multisort($file['dimensions'], $sortorder, $file['width'], $sortorder, $file['sortname'], SORT_ASC, $file['name'], SORT_ASC, $file['modified'], $sortorder, $file['type'], $sortorder, $file['size'], $sortorder, $file['height'], $sortorder,$file['src'], $sortorder);
+ array_multisort($file['dimensions'], $sortorder, $file['width'], $sortorder, $file['sortname'], $sortorder, $file['name'], $sortorder, $file['modified'], $sortorder, $file['type'], $sortorder, $file['size'], $sortorder, $file['height'], $sortorder,$file['src'], $sortorder, $file['id'], $sortorder, $file['title'], $sortorder);
break;
default:
// do nothing
Modified: trunk/catalog/admin/editeur/tiny_mce/plugins/tinybrowser/tinybrowser.php
===================================================================
--- trunk/catalog/admin/editeur/tiny_mce/plugins/tinybrowser/tinybrowser.php 2011-12-23 09:28:12 UTC (rev 3985)
+++ trunk/catalog/admin/editeur/tiny_mce/plugins/tinybrowser/tinybrowser.php 2011-12-26 14:27:42 UTC (rev 3986)
@@ -83,89 +83,10 @@
$newthumbqty = 0;
// read folder contents if folder exists
-if(file_exists($tinybrowser['docroot'].$browsepath))
- {
- // Read directory contents and populate $file array
- $dh = opendir($tinybrowser['docroot'].$browsepath);
- $file = array();
- $u=0;
- while (($filename = readdir($dh)) !== false)
- {
+if(file_exists($tinybrowser['docroot'].$browsepath)){
- // get file extension
- $nameparts = explode('.',$filename);
- $ext = end($nameparts);
- unset($imginfo);
- // filter directories and prohibited file types
- if($filename != '.' && $filename != '..' && !is_dir($tinybrowser['docroot'].$browsepath.$filename) && !in_array($ext, $tinybrowser['prohibited']) && ($typenow == 'file' || strpos(strtolower($tinybrowser['filetype'][$typenow]),strtolower($ext)))
- ) {
- // search file name if search term entered
- if($findnow) $exists = strpos(strtolower($filename),strtolower($findnow));
+ $file = TinyBrowser::BrowseFiles($browsepath);
- // assign file details to array, for all files or those that match search
- if(!$findnow || ($findnow && $exists !== false))
- {
- $file['name'][$u] = $filename;
- $file['title'][$u] = $filename;
- $file['sortname'][$u] = strtolower($filename);
- $file['modified'][$u] = filemtime($tinybrowser['docroot'].$browsepath.$filename);
- $file['size'][$u] = filesize($tinybrowser['docroot'].$browsepath.$filename);
-
- // image specific info or general
- if($typenow=='image' ) /*getimagesize($tinybrowser['docroot'].$browsepath.$filename)*//*)*/
- {
-
- /**
- @remarks Check And add if not exists in db table
- */
- $res= sqlimage::fetch(array('path'=>$browsepath.$filename), true);
-
- if(!$res){
- $imginfo = image_ratio::get_image($tinybrowser['docroot'].$browsepath.$filename,'');
-
- $sql = array(
- 'path'=>$browsepath.$filename,
- 'file'=>$filename,
- 'width'=>$imginfo['width'],
- 'height'=>$imginfo['height'],
- 'ext'=>$imginfo['mime'],
- );
-
- $id = $res= sqlimage::create($sql);
- $width = $imginfo['width'] ;
- $height = $imginfo['height'] ;
- $ext = $imginfo['mime'] ;
- $src =$imginfo['src'];
- }
- else{
- $id = $res->rowid;
- $width = $res->width ;
- $height = $res->height ;
- $ext = $res->ext ;
- $src = $res->path ;
- }
-
- $file['width'][$u] = $width;
- $file['height'][$u] = $height;
- $file['dimensions'][$u] =$width+$height ;// $imginfo[0] + $imginfo[1];
- $file['type'][$u] = $ext; //$imginfo['mime'];
- $file['src'][$u] =$src;
- $file['id'][$u] =$id;
-
-
- }
- else
- {
- $file['width'][$u] = 'N/A';
- $file['height'][$u] = 'N/A';
- $file['dimensions'][$u] = 'N/A';
- $file['type'][$u] = returnMIMEType($filename);
- }
- }
- $u++;
- }
- }
- closedir($dh);
}
// create file upload folder
else
@@ -206,7 +127,8 @@
// sort files by selected order
sortfileorder($sortbynow,$sortorder,$file);
}
-
+// print_r($file);
+// // exit;
// determine pagination
if($tinybrowser['pagination']>0)
{
@@ -339,10 +261,11 @@
.' '.TB_DATE.': '.date($tinybrowser['dateformat'],$file['modified'][$i])
.' '.TB_TYPE.': '.$file['type'][$i]
.' '.TB_SIZE.': '.bytestostring($file['size'][$i],1)
+
.'">'
.'<img src="'.tep_get_http().DIR_WS_ADMIN.'document.php?mod=img&typ=db&id='.$file['id'][$i].'&w='.$tinybrowser['thumbsize'].'&h='.$tinybrowser['thumbsize'] /*$file['src'][$i]*/ .'" />'
// .'<img src="'.$thumbpath.$tinybrowser['thumbfolder'].'/_'.$file['name'][$i] . .'" />'
-// .tep_image()
+// .
.'<div class="filename">'.$file['title'][$i].'</div></a></div>';
}
}
Added: trunk/catalog/admin/includes/classes/drivers/sqlcountries.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlcountries.php (rev 0)
+++ trunk/catalog/admin/includes/classes/drivers/sqlcountries.php 2011-12-26 14:27:42 UTC (rev 3986)
@@ -0,0 +1,217 @@
+<?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 sqlcountries
+ @file sqlcountries.php
+ @brief manage insert/update/delete in zone tables
+*/
+
+
+
+
+class sqlcountries
+ 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['name']))
+ return 'name';
+
+ $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';
+
+ $res=tep_db_perform(TABLE_COUNTRIES, $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 countries_id = '".(int)$option['id']."' ";
+
+
+ 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']);
+
+ $res=tep_db_perform(TABLE_COUNTRIES, $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 countries_id = '".(int)$option['id']."' ";
+ if(isset($option['name'])) $sql .="AND countries_name = '".(int)tep_db_input($option['name'])."' ";
+ if(isset($option['localname'])) $sql .="AND countries_localname = '".(int)tep_db_input($option['localname'])."' ";
+ if(isset($option['iso_code_2'])) $sql .="AND countries_iso_code_2 = '".(int)tep_db_input($option['iso_code_2'])."' ";
+ if(isset($option['list_iso_code_2'])) $sql .="AND countries_iso_code_2 IN( '".(int)tep_db_input($option['list_iso_code_2'])."' ) ";
+ if(isset($option['iso_code_3'])) $sql .="AND countries_iso_code_3 = '".(int)tep_db_input($option['iso_code_3'])."' ";
+
+ if($sql=='')
+ return false;
+
+
+ $sql="SELECT * FROM " . TABLE_COUNTRIES . " a ".
+// " LEFT JOIN " . TABLE_IMAGES_USED . " g ON (a.rowid=g.rowid) ".
+ " WHERE ".substr($sql,3);
+
+ $res=$DB->query($sql);
+
+ $num = $res->__get('numRows');
+
+ if($num == 1){
+ $result=$res->fetchAssoc();
+ return ((!$shortkey)? $result : self::CleanKey($result));
+ }
+ elseif($num > 1){
+ $array=array();
+
+ foreach($res->fetchAllAssoc() as $result)
+ $array[]= ((!$shortkey)? $result : self::CleanKey($result));
+
+ return $array;
+ }
+
+ return false;
+ }
+
+ /**
+ @brief delete row
+ */
+ public static function delete($option){
+ self::getInstance();
+ $DB=Database::getInstance();
+
+ if(isset($option['id'])) $where .="AND countries_id = '".(int)$option['id']."' ";
+ elseif(isset($option['name'])) $where .="AND countries_name = '".(int)tep_db_input($option['name'])."' ";
+ elseif(isset($option['localname'])) $where .="AND countries_localname = '".(int)tep_db_input($option['localname'])."' ";
+ elseif(isset($option['iso_code_2'])) $where .="AND countries_iso_code_2 = '".(int)tep_db_input($option['iso_code_2'])."' ";
+ elseif(isset($option['iso_code_3'])) $where .="AND countries_iso_code_3 = '".(int)tep_db_input($option['iso_code_3'])."' ";
+ else
+ return false;
+
+
+/// TODO integrer select pour suppression autre ref que id
+
+ /**
+ @remarks delete ref countrie in zone to geo table
+ */
+ sqlzonetogeozone::delete(array('geo_zone_id'=>$option['id']));
+
+
+
+ $DB->query("delete from " . TABLE_COUNTRIES . $where );
+
+
+ return true;
+ }
+
+
+ /**
+ @brief
+ @return array product empty
+ */
+ public static function Specimen(){
+ $par = array('countries_id' => '',
+ 'countries_name' => '',
+ 'countries_localname' => '',
+ 'countries_iso_code_2' => '',
+ 'countries_iso_code_3' => '',
+ 'address_format_id' => '',
+ 'country_visible' => '',
+ );
+
+ 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,'country_') ===8)
+ $key=substr($key,8);
+
+ $object->$key = $value;
+ }
+
+ return $object;
+ }
+
+}
+
+
+?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/classes/drivers/sqlgeozone.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlgeozone.php 2011-12-23 09:28:12 UTC (rev 3985)
+++ trunk/catalog/admin/includes/classes/drivers/sqlgeozone.php 2011-12-26 14:27:42 UTC (rev 3986)
@@ -4,23 +4,17 @@
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 23/10/11, 16:51
+ @date 01/11/11, 09:50
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
- @class sqlgeozone
- @file sqlgeozone.php
- @brief manage insert/update/delete in zone tables
-
- @note
- @depend sqlzonetogeozone.php
+ @class geozones
*/
+Class sqlgeozones
+ implements ModSqlDataDriver{
-class sqlgeozone
- implements ModSqlDataDriver{
-
public static $modules;
protected static $_instance;
@@ -41,13 +35,18 @@
public static function create($option){
self::getInstance();
- if(!isset($option['name']))
- return 'name';
+ if(!isset($option['type']))
+ return 'type';
+ if(!isset($option['type']))
+ return 'type';
+// $sql_data_array['geo_zone_id'] = tep_db_prepare_input($option['geo_zone_id']);
- $sql_data_array['geo_zone_name'] = tep_db_prepare_input($option['name']);
- if(isset($option['type'])) $sql_data_array['geo_zone_type'] = tep_db_prepare_input($option['type']);
- if(isset($option['description'])) $sql_data_array['geo_zone_description'] = tep_db_prepare_input($option['description']);
+ $sql_data_array['geo_zone_type'] = (isset($option['type'])) ? tep_db_prepare_input($option['type']) :'1';
+ $sql_data_array['geo_zone_grp'] = str_replace(' ','_',(isset($option['grp'])) ? tep_db_prepare_input($option['grp']) :'NULL');
+ $sql_data_array['geo_zone_name'] = (isset($option['name'])) ? tep_db_prepare_input($option['name']) :'NULL';
+ $sql_data_array['geo_zone_description'] = (isset($option['description'])) ? tep_db_prepare_input($option['description']) :'NULL';
+// $sql_data_array['zone_id'] = (isset($option['zone_id'])) ? tep_db_prepare_input($option['zone_id']) :'NULL';
$sql_data_array['date_added'] = 'now()';
$res=tep_db_perform(TABLE_GEO_ZONES, $sql_data_array);
@@ -57,7 +56,7 @@
else
return $res->__get('insertId');
}
-
+// UPDATE `osc_geo_zones` SET `geo_zone_type`='2', ` geo_zone_grp`='no_name', `geo_zone_name`='Shp: France', `geo_zone_description`='', `last_modified`=now() WHERE geo_zone_id = '5' ;
/**
@brief update ligne in table configuration
*/
@@ -70,11 +69,18 @@
$where ='';
if(isset($option['id'])) $where .="AND geo_zone_id = '".(int)$option['id']."' ";
- if(isset($option['name']))$sql_data_array['geo_zone_name'] = tep_db_prepare_input($option['name']);
- if(isset($option['type'])) $sql_data_array['geo_zone_type'] = tep_db_prepare_input($option['type']);
- if(isset($option['description'])) $sql_data_array['geo_zone_description'] = tep_db_prepare_input($option['description']);
+// var_dump($option);
+// exit;
+ $sql_data_array['geo_zone_type'] = (isset($option['type'])) ? tep_db_prepare_input($option['type']) :'1';
+ $sql_data_array['geo_zone_grp'] = str_replace(' ','_',(isset($option['grp'])) ? tep_db_prepare_input($option['grp']) :'NULL');
+
+ $sql_data_array['geo_zone_name'] = (isset($option['name'])) ? tep_db_prepare_input($option['name']) :'NULL';
+ $sql_data_array['geo_zone_description'] = (isset($option['description'])) ? tep_db_prepare_input($option['description']) :'NULL';
+// $sql_data_array['zone_id'] = (isset($option['zone_id'])) ? tep_db_prepare_input($option['zone_id']) :'NULL';
+
$sql_data_array['last_modified'] = 'now()';
+
$res=tep_db_perform(TABLE_GEO_ZONES, $sql_data_array, 'update' , substr($where,3) );
return $res;
@@ -108,6 +114,7 @@
$sql ="";
if(isset($option['id'])) $sql .="AND geo_zone_id = '".(int)tep_db_input($option['id'])."' ";
if(isset($option['type'])) $sql .="AND geo_zone_type = '".(int)tep_db_input($option['type'])."' ";
+ if(isset($option['grp'])) $sql .="AND geo_zone_grp = '".(int)tep_db_input($option['grp'])."' ";
if($sql=='')
return false;
@@ -145,16 +152,23 @@
$DB=Database::getInstance();
if(isset($option['id']))
- $_id = (int)tep_db_input($option['id']) ;
+ $where = " where geo_zone_id = '" .(int)tep_db_input($option['id']) . "'";
+// elseif(isset($option['type']))
+// $where = " where geo_zone_type = '" .(int)tep_db_input($option['type']) . "'";
+// elseif(isset($option['grp']))
+// $where = " where geo_zone_grp = '" .(int)tep_db_input($option['grp']) . "'";
else
return false;
-// $DB->query("delete from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . (int)$_id . "' ");
- sqlzonetogeozone::delete();
- $DB->query("delete from " . TABLE_GEO_ZONES . " where geo_zone_id = '" . (int)$_id . "'");
+/// TODO Interger boucle suppression si selection autre methode que id
+ sqlzonetogeozone::delete(array('geo_zone_id'=>$option['id']));
+
+ $DB->query("delete from " . TABLE_GEO_ZONES . $where );
+
+
return true;
}
@@ -166,10 +180,11 @@
public static function Specimen(){
$par = array('geo_zone_id' => '',
'geo_zone_type' => '',
+ 'geo_zone_grp' => '',
'geo_zone_name' => '',
'geo_zone_description' => '',
- 'last_modified' => '',
'date_added' => '',
+ 'last_modified'=>'',
);
return self::CleanKey($par);
@@ -186,16 +201,16 @@
$object= new stdclass();
foreach($array as $key=>$value){
- if( strpos($key,'geo_zone_') ===0)
- $key=substr($key,9);
+ if( strpos($key,'geo_zone_') ===9)
+ $key=substr($key,9);
-
- $object->$key = $value;
+ $object->$key = $value;
}
return $object;
}
+
}
Modified: trunk/catalog/admin/includes/classes/drivers/sqlzonetogeozone.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlzonetogeozone.php 2011-12-23 09:28:12 UTC (rev 3985)
+++ trunk/catalog/admin/includes/classes/drivers/sqlzonetogeozone.php 2011-12-26 14:27:42 UTC (rev 3986)
@@ -17,6 +17,13 @@
class sqlzonetogeozone
implements ModSqlDataDriver{
+ /**
+ @var array pre configured section by iso code.
+ */
+ private static $type = array(
+ 'EU'=>'AT, BG, BE , CY, CZ, DK, ES, EE, FI, FR, GR, HU, IE, IT, LV, LT, LU, MT, NL, PL, PT, RO, DE, SK, SI, SE, UK,GB, '
+ 'EU_continentale'=>'AT, BG, BE , CZ, DK, DE, ES, EE, FI, FR, GR, HU,IE, IT, LV, LT, LU, NL, PL, PT, RO, SK, SI, SE, UK,GB, '
+ );
public static $modules;
@@ -149,6 +156,8 @@
$where = " where association_id = '" .(int)tep_db_input($option['id']) . "'";
elseif(isset($option['geo_zone_id']))
$where = " where geo_zone_id = '" .(int)tep_db_input($option['geo_zone_id']) . "'";
+ elseif(isset($option['zone_country_id']))
+ $where = " where zone_country_id = '" .(int)tep_db_input($option['zone_country_id']) . "'";
else
return false;
@@ -192,6 +201,33 @@
return $object;
}
+
+ /**
+ @fn Modele()
+ @brief Clean string name key
+ */
+ public static function Modele($type = ''){
+
+ if(isset(self::$type[$type]) ) {
+ return sqlcountries::fetch(array('list_iso_code_2'=>self::$type[$type]));
+ }
+
+ return false;
+ }
+
+ /**
+ @fn GetModele()
+ @brief Clean string name key
+ */
+ public static function GetModele($type = 'EU'){
+
+ if(isset(self::$type[$type]) ) {
+ return sqlcountries::fetch(array('list_iso_code_2'=>self::$type[$type]));
+ }
+
+ return false;
+ }
+
}
Modified: trunk/catalog/admin/includes/classes/fileUtility.php
===================================================================
--- trunk/catalog/admin/includes/classes/fileUtility.php 2011-12-23 09:28:12 UTC (rev 3985)
+++ trunk/catalog/admin/includes/classes/fileUtility.php 2011-12-26 14:27:42 UTC (rev 3986)
@@ -118,16 +118,16 @@
if (!file_exists($path)) {
if (is_dir($path))self::_chmod($path);
else {
- self::_mkdir(dirname($path));
- if (!is_writeable(dirname($path))) {
- self::ComportForError(__CLASS__.'->'.__FUNCTION__.'::'.__LINE__.__('error file not removeable'). $source, 'error');
- return false;
- }
- if(!@mkdir($path, $mod)) {
- self::ComportForError(__CLASS__.'->'.__FUNCTION__.'::'.__LINE__.__("cant create dir text"), 'error');
- return false;
- }
- self::_chmod($path);
+ self::_mkdir(dirname($path));
+ if (!is_writeable(dirname($path))) {
+ self::ComportForError(__CLASS__.'->'.__FUNCTION__.'::'.__LINE__.__('error file not removeable'). $source, 'error');
+ return false;
+ }
+ if(!@mkdir($path, $mod)) {
+ self::ComportForError(__CLASS__.'->'.__FUNCTION__.'::'.__LINE__.__("cant create dir text"), 'error');
+ return false;
+ }
+ self::_chmod($path);
}
}
return true;
@@ -242,7 +242,7 @@
fclose($fin_file);
gzclose($fout_file);
if ($delete_file == true) {
- unlink($in_file);
+ self::_unlink($in_file);
}
break;
}
Added: trunk/catalog/admin/includes/classes/imageUtility.php
===================================================================
--- trunk/catalog/admin/includes/classes/imageUtility.php (rev 0)
+++ trunk/catalog/admin/includes/classes/imageUtility.php 2011-12-26 14:27:42 UTC (rev 3986)
@@ -0,0 +1,229 @@
+<?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/12/11, 19:11
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+ @class imageUtility
+*/
+class imageUtility {
+
+
+ /**
+ @brief resize process image
+ @param $img pathfile relative WS_CATALOG
+ @param $value string (width|height)
+ */
+ static public function resize($img, $value){
+ global $tinybrowser;
+ /**
+ @remarks Childs image in cache Clean all file cache
+ */
+ self::CleanFileCacheImg($img);
+
+
+ $targetimg = DIR_FS_ROOT_DOCS.$img;
+
+ $mime = getimagesize($targetimg);
+ if($value=='width')
+ {
+ $rw = $newsize;
+ $rh = $mime[1];
+ }
+ else
+ {
+ $rw = $mime[0];
+ $rh = $newsize;
+ }
+ $im = convert_image($targetimg,$mime['mime']);
+ resizeimage($im,$rw,$rh,$targetimg,$tinybrowser['imagequality'],$mime['mime']);
+ imagedestroy($im);
+
+
+
+ /**
+ @remarks Check And add if not exists in db table
+ */
+ $res= sqlimage::fetch(array('path'=>$img), true);
+ if($res){
+
+ $sql = array(
+ 'id'=>$res->rowid,
+ 'width'=>$rw,
+ 'height'=>$rh,
+
+ );
+ $res= sqlimage::update($sql);
+ }
+
+ /**
+ @remarks delete master src file
+ */
+
+ fileUtility::_copy(DIR_FS_ROOT_DOCS.$img, DIR_FS_ROOT_DOCS.$newnname);
+ fileUtility::_unlink(DIR_FS_ROOT_DOCS.$img);
+
+
+ return true;
+ }
+
+ /**
+ @brief rotate process image
+ @param $img pathfile relative WS_CATALOG
+ @param $direction
+ */
+ static public function rotate($img, $direction){
+ global $tinybrowser;
+ /**
+ @remarks Childs image in cache Clean all file cache
+ */
+ self::CleanFileCacheImg($img);
+
+
+ $targetimg = DIR_FS_ROOT_DOCS.$img;
+
+ // rotate image
+ if($direction == 'clock') $degree=270;
+ else $degree=90;
+
+ $mime = getimagesize($targetimg);
+ $im = convert_image($targetimg,$mime['mime']);
+
+ // additional processing for png / gif transparencies (credit to Dirk Bohl)
+ if($mime['mime'] == 'image/x-png' || $mime['mime'] == 'image/png')
+ {
+ imagealphablending($newim, false);
+ imagesavealpha($newim, true);
+ }
+ elseif($mime['mime'] == 'image/gif')
+ {
+ $originaltransparentcolor = imagecolortransparent( $im );
+ if($originaltransparentcolor >= 0 && $originaltransparentcolor < imagecolorstotal( $im ))
+ {
+ $transparentcolor = imagecolorsforindex( $im, $originaltransparentcolor );
+ $newtransparentcolor = imagecolorallocate($newim,$transparentcolor['red'],$transparentcolor['green'],$transparentcolor['blue']);
+ imagefill( $newim, 0, 0, $newtransparentcolor );
+ imagecolortransparent( $newim, $newtransparentcolor );
+ }
+ }
+ $newim = imagerotate($im, $degree, 0);
+ imagedestroy($im);
+
+ if($mime['mime'] == 'image/pjpeg' || $mime['mime'] == 'image/jpeg')
+ imagejpeg ($newim,$targetimg,$tinybrowser['imagequality']);
+ elseif($mime['mime'] == 'image/x-png' || $mime['mime'] == 'image/png')
+ imagepng ($newim,$targetimg,substr($tinybrowser['imagequality'],0,1));
+ elseif($mime['mime'] == 'image/gif')
+ imagegif ($newim,$targetimg);
+
+ imagedestroy($newim);
+
+ return true;
+ }
+
+
+ /**
+ @brief delete process image
+ @param $img pathfile relative WS_CATALOG
+ */
+ static public function delete($img){
+ /**
+ @remarks Childs image in cache Clean all file cache
+ */
+ self::CleanFileCacheImg($img);
+
+ /**
+ @remarks delete in db table
+ */
+ $res= sqlimage::fetch(array('path'=>$img), true);
+ if($res){
+
+ $sql = array(
+ 'id'=>$res->rowid,
+ );
+ $res= sqlimage::delete($sql);
+ }
+
+ /**
+ @remarks delete master src file
+ */
+ fileUtility::_unlink(DIR_FS_ROOT_DOCS.$img);
+
+
+ return true;
+ }
+
+
+ /**
+ @brief Rename process image
+ @param $img pathfile relative WS_CATALOG
+ */
+ static public function rename($img, $newnname){
+ /**
+ @remarks Childs image in cache Clean all file cache
+ */
+ self::CleanFileCacheImg($img);
+// exit;
+ /**
+ @remarks Check And add if not exists in db table
+ */
+ $res= sqlimage::fetch(array('path'=>$img), true);
+ if($res){
+
+ $sql = array(
+ 'id'=>$res->rowid,
+ 'path'=>$newnname,
+// 'pathkey'=>$newnname,
+ 'file'=>basename($newnname),
+ );
+ $res= sqlimage::update($sql);
+ }
+
+ /**
+ @remarks delete master src file
+ */
+
+ fileUtility::_copy(DIR_FS_ROOT_DOCS.$img, DIR_FS_ROOT_DOCS.$newnname);
+ fileUtility::_unlink(DIR_FS_ROOT_DOCS.$img);
+
+
+ return true;
+ }
+
+
+ /**
+ @brief Rename process image
+ @param $img pathfile relative WS_CATALOG
+ */
+ static public function move($img, $newnname){
+ return self::rename($img, $newnname);
+ }
+
+
+
+ /**
+ @brief delete in all folders cache for one image
+ @param $img pathfile relative WS_CATALOG
+ */
+ static protected function CleanFileCacheImg($img){
+
+ $pathCache = DIR_FS_ROOT_DOCS.DIR_WS_IMAGES.'imagecache/';
+
+ $files = fileUtility::_scandir($pathCache);
+
+ foreach($files as $row){
+ if(is_dir($pathCache.$row)) {
+
+ $result_files = glob($pathCache.$row.'/*'.md5(DIR_FS_ROOT_DOCS.$img).'*',GLOB_NOSORT);
+
+ foreach($result_files as $r)
+ fileUtility::_unlink($r);
+ }
+
+ }
+ }
+}
+?>
Modified: trunk/catalog/admin/includes/functions/html_output.php
===================================================================
--- trunk/catalog/admin/includes/functions/html_output.php 2011-12-23 09:28:12 UTC (rev 3985)
+++ trunk/catalog/admin/includes/functions/html_output.php 2011-12-26 14:27:42 UTC (rev 3986)
@@ -227,7 +227,12 @@
}
// public images
-function tep_info_image($image, $alt, $width = '', $height = '', $parameters = '',$mode=false) { return '<img src="'.tep_href_link('document.php', 'mod=img&typ=db&key='.md5('images/'.$image).'&w='.$width.'&h='.$height).'" alt="'.$alt.'" title="'.$image.'" '.$parameters.'/>'; }
+function tep_info_image($image, $alt, $width = '', $height = '', $parameters = '',$mode=false) {
+ if(preg_match('#([0-9\.]*)#', $image))
+ return '<img src="'.tep_href_link('document.php', 'mod=img&typ=db&id='.$image.'&w='.$width.'&h='.$height).'" alt="'.$alt.'" title="'.$alt.'" '.$parameters.'/>';
+ else
+ return '<img src="'.tep_href_link('document.php', 'mod=img&typ=db&key='.md5('images/'.$image).'&w='.$width.'&h='.$height).'" alt="'.$alt.'" title="'.$alt.'" '.$parameters.'/>';
+ }
/**
Fonctions remplacé par des class
Modified: trunk/catalog/common/classes/image_ratio.php
===================================================================
--- trunk/catalog/common/classes/image_ratio.php 2011-12-23 09:28:12 UTC (rev 3985)
+++ trunk/catalog/common/classes/image_ratio.php 2011-12-26 14:27:42 UTC (rev 3986)
@@ -66,7 +66,7 @@
else{
self::$env->inadmin=false;
}
- !is_dir (DIR_FS_CATALOG.self::$env->cachedir) ? mkdir (DIR_FS_CATALOG.self::$env->cachedir, 0777) : @chmod (DIR_FS_CATALOG.self::$env->cachedir, 0777);
+ !is_dir (DIR_FS_ROOT_DOCS.self::$env->cachedir) ? mkdir (DIR_FS_ROOT_DOCS.self::$env->cachedir, 0777) : @chmod (DIR_FS_ROOT_DOCS.self::$env->cachedir, 0777);
self::$env->jpegquality = (defined('JPEG_QUALITY') ? JPEG_QUALITY : 95);
@@ -79,7 +79,7 @@
self::$env->img_create=(bool)function_exists('imagecreatetruecolor');
- putenv('GDFONTPATH=' . DIR_FS_CATALOG.DIR_WS_COMMON.'fonts/');
+ putenv('GDFONTPATH=' . DIR_FS_ROOT_DOCS.DIR_WS_COMMON.'fonts/');
}
@@ -287,6 +287,8 @@
Any commercial selling of this script is forbidden.
*/
protected static function thumbgd ($image, $width, $height, $width_src, $height_scr, $format, $thumbfile){
+echo $thumbfile;
+
// error_reporting(E_ALL);
$image = call_user_func("imagecreatefrom".$format, $image);
$thumb = imagecreatetruecolor ($width, $height);
@@ -342,10 +344,13 @@
if(isset(self::$CacheImage[self::$key]['conf']['original'])) return ;
$sortie=true;
+// var_dump($src);
- if(strpos($src, DIR_FS_CATALOG) === false ) $src;
- else $src= substr ($src, strlen(DIR_FS_CATALOG));
+ if(strpos($src, DIR_FS_ROOT_DOCS) === false ) $src;
+ else $src= substr ($src, strlen(DIR_FS_ROOT_DOCS));
+// var_dump($src);
+
if(strpos($src, DIR_WS_LANGUAGES) >0 ) self::$CacheImage[self::$key]['conf']['dest']='lang';
else self::$CacheImage[self::$key]['conf']['dest']='image';
@@ -353,14 +358,17 @@
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_CATALOG)===false ) $src_dir = DIR_FS_CATALOG . $src;
- else $src_dir = DIR_FS_CATALOG . substr ($src, (strrpos (DIR_WS_CATALOG , '/'))+1);
+ 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);
}
else {
self::$CacheImage[self::$key]['conf']['mode']='FO';
- $src_dir=$src;
+ $src_dir=DIR_FS_ROOT_DOCS . $src;
}
+
+
+// var_dump($src_dir);
if (!@is_file($src_dir) || empty($src_dir)){
if (self::$env->img_required) $sortie= '<span class="errorText">'.__('Le fichier n\'a pas pu être trouvé sur le serveur !').'</span>';
$sortie = false;
@@ -437,12 +445,31 @@
}
/**
+ @brief construct thumb
+ @param $image string file path image
+ @param $width int width image thumb
+ @param $height int height image thumb
+ @param $width_src int width image src
+ @param $height_scr int height image src
+ @param $format string ext image src
+ @return string filepath image or thumb image
*/
private static function thumbfile ($image, $width, $height, $width_src, $height_scr, $format){
+ /**
+ @remarks adjust name for child class loaded
+ */
$getclass=(self::$Modele !=null)?get_class(self::$Modele).'_': '';
+ /**
+ @remarks Sub Folder in Cache
+ */
+ $subpath = $width.'x'.$height.'/';
+// var_dump($image);
+// exit;
+ $thumb = $subpath.$getclass.basename($image).'_'.md5($image).'.'.((self::$types[$format]=="jpeg") ? "jpg" : self::$types[$format]);
- $thumb = $width.'x'.$height.'_'.$getclass.basename($image).'_'.md5($image).'.'.((self::$types[$format]=="jpeg") ? "jpg" : self::$types[$format]);
+ if(!file_exists( DIR_FS_ROOT_DOCS.self::$env->cachedir.$subpath) || !is_dir(DIR_FS_ROOT_DOCS.self::$env->cachedir.$subpath))
+ @mkdir(DIR_FS_ROOT_DOCS.self::$env->cachedir.$subpath);
$thumbfile = substr($image,0, strpos($image, DIR_WS_IMAGES) ) . self::$env->cachedir . $thumb;
@@ -466,8 +493,9 @@
if ($makethumb){
if(self::$Modele !=null && method_exists(self::$Modele,'thumbgd' ))
- $image=call_user_func(array(get_class(self::$Modele), 'thumbgd'), $image, $width, $height, $width_src, $height_scr, self::$types[$format], $thumbfile );
- else $image=self::thumbgd($image, $width, $height, $width_src, $height_scr, self::$types[$format], $thumbfile);
+ $image=call_user_func(array(get_class(self::$Modele), 'thumbgd'), $image, $width, $height, $width_src, $height_scr, self::$types[$format], $thumbfile );
+ else
+ $image=self::thumbgd($image, $width, $height, $width_src, $height_scr, self::$types[$format], $thumbfile);
}
else{
$img=($iscached) ? $thumbfile : $image;
Modified: trunk/catalog/document.php
===================================================================
--- trunk/catalog/document.php 2011-12-23 09:28:12 UTC (rev 3985)
+++ trunk/catalog/document.php 2011-12-26 14:27:42 UTC (rev 3986)
@@ -11,7 +11,6 @@
$page->init(basename(__FILE__),$language);
-
switch($_REQUEST['mod']){
@@ -25,20 +24,44 @@
$width=((isset($_REQUEST['w']) && (int)$_REQUEST['w'] > 0)? (int)$_REQUEST['w'] : '');
$height=((isset($_REQUEST['h']) && (int)$_REQUEST['h'] > 0)? (int)$_REQUEST['h'] : '');
- $img=((isset($_REQUEST['i']) && strlen((string)$_REQUEST['i']) > 0) ? tep_sanitize_request($_REQUEST['i']) : '' );
+ /**
+ @remarks Adjust type requete
+ */
+ switch((string)$_REQUEST['typ']){
+ case 'product':
+ break;
+ case 'db':
+ if(isset($_REQUEST['id']) && !empty($_REQUEST['id']) )
+ $ig = " rowid = '".(int)$_REQUEST['id']."' ";
+ elseif(isset($_REQUEST['key']))
+ $ig = " pathkey = '".$_REQUEST['key']."' ";
+ else
+ $ig = " pathkey = '".md5(str_replace(array('//',DIR_WS_CATALOG.DIR_WS_IMAGES),array('/',DIR_WS_IMAGES),IMAGE_NONEXISTENT))."' ";
+
+ $DB = Database::getInstance();
+ $r = $DB->query($sql="SELECT path FROM ".TABLE_IMAGES." WHERE ".$ig." ");
+
+ $res = $r->fetchAssoc();
+
+ if(strpos($res['path'], DIR_WS_IMAGES) ===0)
+ $img = substr($res['path'], strlen(DIR_WS_IMAGES));
+ else
+ $img = $res['path'];
+ break;
+ default:
+ $img=((isset($_REQUEST['i']) && strlen((string)$_REQUEST['i']) > 0) ? tep_sanitize_request($_REQUEST['i']) : '' );
+ }
+
$get=image_ratio::get_image(DIR_WS_IMAGES.$img,'',$width,$height);
if($ext='jpg')$ext='jpeg';
-
$img=$get['src'];
header('Content-type: image/'.$ext);
-
- readfile(DIR_FS_CATALOG.$img);
+ readfile(DIR_FS_ROOT_DOCS.$img);
exit;
-
break;
Modified: trunk/catalog/includes/database_tables.php
===================================================================
--- trunk/catalog/includes/database_tables.php 2011-12-23 09:28:12 UTC (rev 3985)
+++ trunk/catalog/includes/database_tables.php 2011-12-26 14:27:42 UTC (rev 3986)
@@ -112,6 +112,11 @@
define('TABLE_ZONES', DB_TABLE_PREFIX . 'zones');
+/// TOP Not Used for dev
+ define('TABLE_IMAGES', DB_TABLE_PREFIX . 'images');
+ define('TABLE_IMAGES_USED', DB_TABLE_PREFIX . 'images_used');
+
+
//! Table View Specifique FO
define('TABLE_V_PRODUCTS', 'view_products');
define('TABLE_V_ORDERS_STATUS', 'view_orders_status');
Modified: trunk/catalog/includes/functions/html_output.php
===================================================================
--- trunk/catalog/includes/functions/html_output.php 2011-12-23 09:28:12 UTC (rev 3985)
+++ trunk/catalog/includes/functions/html_output.php 2011-12-26 14:27:42 UTC (rev 3986)
@@ -230,17 +230,38 @@
return $price->print_products_price($product_info['products_id'],$style);
}
+/**
+ @brief Draw or retrun link public data images
+ @return display images or return link path image
+*/
+function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '',$mode=false) {
+// $img=image_ratio::getInstance(); return $img->tep_image($src, $alt, $width, $height, $parameters,$mode);
+ if(strpos($src, DIR_WS_IMAGES) ===0)
+ $src = substr($src, strlen(DIR_WS_IMAGES));
+ if(preg_match('#^([0-9]*){1,11}$#', $src))
+ $psrc = 'id='.$src;
+ elseif(preg_match('#^([0-9a-z]*){32}$#', $src))
+ $psrc = 'key='.$src;
+ else
+ $psrc = 'key='.md5('images/'.$src);
+
+ $s = tep_href_link('document.php', 'mod=img&typ=db&'.$psrc.'&w='.$width.'&h='.$height);
+
+
+
+ if(!$mode) return '<img src="'.$s.'" alt="'.$alt.'" title="'.$alt.'" '.$parameters.'/>';
+ else return $s;
+}
+
/**
Fonctions remplacé par des class
=> Retrocompatibilité
*/
function CanonicalUrl() { global $page; return $page->GetHtmlMeta('canonical'); }
-function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '',$mode=false) { $img=image_ratio::getInstance(); return $img->tep_image($src, $alt, $width, $height, $parameters,$mode); }
-
function tep_image_submit($image, $alt = '', $parameters = '') { return formUtility::image_submit($image, $alt, $parameters ); }
function tep_image_button($image, $alt = '', $params = ''){ return formUtility::image_button($image, $alt, $parameters ); }
function tep_draw_form($name, $action, $method = 'post', $params = ''){ return formUtility::draw_form($name, $action, ''/*$parameters*/, $method, $params ); }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2011-12-23 09:28:22
|
Revision: 3985
http://oscss.svn.sourceforge.net/oscss/?rev=3985&view=rev
Author: oscim
Date: 2011-12-23 09:28:12 +0000 (Fri, 23 Dec 2011)
Log Message:
-----------
coquille
Removed Paths:
-------------
trunk/catalog/admin/contributions/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2011-12-20 22:18:35
|
Revision: 3984
http://oscss.svn.sourceforge.net/oscss/?rev=3984&view=rev
Author: oscim
Date: 2011-12-20 22:18:28 +0000 (Tue, 20 Dec 2011)
Log Message:
-----------
int?\195?\169gration de la gestion et du suivi des images en db
Int?\195?\169gration des update/create/delete via tinybroswer
Add class de gestion sqlimages dans le bo
Amelioration page documents
refonte tep_info_image pour traiter l'appel des image via le fichier documents
Modified Paths:
--------------
trunk/catalog/admin/document.php
trunk/catalog/admin/editeur/tiny_mce/plugins/tinybrowser/edit.php
trunk/catalog/admin/editeur/tiny_mce/plugins/tinybrowser/fns_tinybrowser.php
trunk/catalog/admin/editeur/tiny_mce/plugins/tinybrowser/tinybrowser.php
trunk/catalog/admin/includes/classes/drivers/sqlimage.php
trunk/catalog/admin/includes/functions/html_output.php
trunk/catalog/admin/includes/gabarit/configuration/modmembres.listing.gab
Added Paths:
-----------
trunk/catalog/install/includes/sql/mysql/tables/osc_images.sql
Modified: trunk/catalog/admin/document.php
===================================================================
--- trunk/catalog/admin/document.php 2011-12-19 21:14:41 UTC (rev 3983)
+++ trunk/catalog/admin/document.php 2011-12-20 22:18:28 UTC (rev 3984)
@@ -28,24 +28,35 @@
@remarks Adjust type requete
*/
switch((string)$_REQUEST['typ']){
- case 'product':
- $res=sqlproduct::fetch(array('id'=>(int)$_REQUEST['id'],'language_id'=>$languages_id), true);
+ case 'product':
+ $res=sqlproduct::fetch(array('id'=>(int)$_REQUEST['id'],'language_id'=>$languages_id), true);
- $img = $res->image;
- $ext1 = $ext = str_replace('.','',substr($img,-4));
- break;
+ $img = $res->image;
+ break;
+ case 'db':
+ if(isset($_REQUEST['id']))
+ $myar = array('id'=>(int)$_REQUEST['id']);
+ elseif(isset($_REQUEST['key']))
+ $myar = array('pathkey'=>$_REQUEST['key']);
+
+ $res=sqlimage::fetch($myar, true);
+// print_r($res);
+// exit;
+ $img = preg_replace('#^('.DIR_WS_IMAGES.')#' , '', $res->path);
+ break;
}
$get=image_ratio::get_image(DIR_WS_CATALOG_IMAGES.$img,'',$width,$height);
+ $img=preg_replace('#^('.DIR_WS_CATALOG_IMAGES.')#' , '', $get['src']);
+ $ext = str_replace('.','',substr($img,-4));
if($ext='jpg')$ext='jpeg';
+// var_dump($ext);
+// exit;
+ header('Content-type: image/'.$ext);
- $img=$get['src'];
-
- header('Content-type: image/'.$ext1);
-
- readfile(HTTP_SERVER.$img);
+ readfile(DIR_FS_CATALOG_IMAGES.$img);
exit;
break;
Modified: trunk/catalog/admin/editeur/tiny_mce/plugins/tinybrowser/edit.php
===================================================================
--- trunk/catalog/admin/editeur/tiny_mce/plugins/tinybrowser/edit.php 2011-12-19 21:14:41 UTC (rev 3983)
+++ trunk/catalog/admin/editeur/tiny_mce/plugins/tinybrowser/edit.php 2011-12-20 22:18:28 UTC (rev 3984)
@@ -92,7 +92,22 @@
foreach($_POST['deletefile'] as $delthis => $val)
{
$delthisfile = $tinybrowser['docroot'].$editpath.$_POST['actionfile'][$delthis];
- if (file_exists($delthisfile) && unlink($delthisfile)) $deleteqty++; else $errorqty++;
+ if (file_exists($delthisfile) && unlink($delthisfile)) $deleteqty++;
+ else $errorqty++;
+
+ /**
+ @remarks Check And add if not exists in db table
+ */
+ $res= sqlimage::fetch(array('path'=>.$editpath.$_POST['actionfile'][$delthis]), true);
+ if($res){
+
+ $sql = array(
+ 'id'=>$res->rowid,
+ );
+ $res= sqlimage::delete($sql);
+ }
+
+
if($typenow=='image')
{
$delthisthumb = $tinybrowser['docroot'].$editpath.$tinybrowser['thumbfolder'].'/_'.$_POST['actionfile'][$delthis];
@@ -110,7 +125,24 @@
{
$namethisfilefrom = $tinybrowser['docroot'].$editpath.$_POST['actionfile'][$namethis];
$namethisfileto = $tinybrowser['docroot'].$editpath.clean_filename($newname.$_POST['renameext'][$namethis]);
- if (file_exists($namethisfilefrom) && rename($namethisfilefrom,$namethisfileto)) $renameqty++; else $errorqty++;
+ if (file_exists($namethisfilefrom) && rename($namethisfilefrom,$namethisfileto)) $renameqty++;
+ else $errorqty++;
+
+ /**
+ @remarks Check And add if not exists in db table
+ */
+ $res= sqlimage::fetch(array('path'=>$editpath.$_POST['actionfile'][$namethis]), true);
+ if($res){
+
+ $sql = array(
+ 'id'=>$res->rowid,
+ 'path'=>$editpath.clean_filename($newname.$_POST['renameext'][$namethis]),
+ 'pathkey'=>$editpath.clean_filename($newname.$_POST['renameext'][$namethis]),
+ 'file'=>basename($editpath.clean_filename($newname.$_POST['renameext'][$namethis])),
+ );
+ $res= sqlimage::update($sql);
+ }
+
if($typenow=='image')
{
$namethisthumbfrom = $tinybrowser['docroot'].$editpath.$tinybrowser['thumbfolder'].'/_'.$_POST['actionfile'][$namethis];
@@ -128,6 +160,24 @@
{
$movethisfile = $tinybrowser['docroot'].$editpath.$_POST['actionfile'][$movethis];
$movefiledest = $tinybrowser['docroot'].$destfolder.$_POST['actionfile'][$movethis];
+
+
+ /**
+ @remarks Check And add if not exists in db table
+ */
+ $res= sqlimage::fetch(array('path'=>$editpath.$_POST['actionfile'][$movethis]), true);
+ if($res){
+
+ $sql = array(
+ 'id'=>$res->rowid,
+ 'path'=>$destfolder.$_POST['actionfile'][$movethis],
+ 'pathkey'=>$destfolder.$_POST['actionfile'][$movethis],
+ 'file'=>basename($destfolder.$_POST['actionfile'][$movethis]),
+ );
+ $res= sqlimage::update($sql);
+ }
+
+
if (!file_exists($movefiledest) && file_exists($movethisfile) && copy($movethisfile,$movefiledest))
{
$moveqty++;
Modified: trunk/catalog/admin/editeur/tiny_mce/plugins/tinybrowser/fns_tinybrowser.php
===================================================================
--- trunk/catalog/admin/editeur/tiny_mce/plugins/tinybrowser/fns_tinybrowser.php 2011-12-19 21:14:41 UTC (rev 3983)
+++ trunk/catalog/admin/editeur/tiny_mce/plugins/tinybrowser/fns_tinybrowser.php 2011-12-20 22:18:28 UTC (rev 3984)
@@ -353,7 +353,7 @@
$filenum=0;
foreach($filetypes as $filetype)
{
- $filenum = $filenum + count(glob($root.$tree.$branch.tn_sql_regcase($filetype),GLOB_NOSORT));
+ $filenum = $filenum + count(glob($root.$tree.$branch.'/'.$filetype,GLOB_NOSORT));
}
$treeparts = explode('/',rtrim($tree,'/'));
$topname = end($treeparts);
@@ -369,7 +369,7 @@
$filenum=0;
foreach($filetypes as $filetype)
{
- $filenum = $filenum + count(glob($root.$tree.$branch.$dirname.'/'.tn_sql_regcase($filetype),GLOB_NOSORT));
+ $filenum = $filenum + count(glob($root.$tree.$branch.$dirname.'/'.$filetype,GLOB_NOSORT));
}
$indent = '';
for($i=0;$i<$level;$i++) { $indent .= ' '; }
Modified: trunk/catalog/admin/editeur/tiny_mce/plugins/tinybrowser/tinybrowser.php
===================================================================
--- trunk/catalog/admin/editeur/tiny_mce/plugins/tinybrowser/tinybrowser.php 2011-12-19 21:14:41 UTC (rev 3983)
+++ trunk/catalog/admin/editeur/tiny_mce/plugins/tinybrowser/tinybrowser.php 2011-12-20 22:18:28 UTC (rev 3984)
@@ -91,13 +91,14 @@
$u=0;
while (($filename = readdir($dh)) !== false)
{
+
// get file extension
$nameparts = explode('.',$filename);
$ext = end($nameparts);
unset($imginfo);
// filter directories and prohibited file types
- if($filename != '.' && $filename != '..' && !is_dir($tinybrowser['docroot'].$browsepath.$filename) && !in_array($ext, $tinybrowser['prohibited']) && ($typenow == 'file' || strpos(strtolower($tinybrowser['filetype'][$typenow]),strtolower($ext))))
- {
+ if($filename != '.' && $filename != '..' && !is_dir($tinybrowser['docroot'].$browsepath.$filename) && !in_array($ext, $tinybrowser['prohibited']) && ($typenow == 'file' || strpos(strtolower($tinybrowser['filetype'][$typenow]),strtolower($ext)))
+ ) {
// search file name if search term entered
if($findnow) $exists = strpos(strtolower($filename),strtolower($findnow));
@@ -105,6 +106,7 @@
if(!$findnow || ($findnow && $exists !== false))
{
$file['name'][$u] = $filename;
+ $file['title'][$u] = $filename;
$file['sortname'][$u] = strtolower($filename);
$file['modified'][$u] = filemtime($tinybrowser['docroot'].$browsepath.$filename);
$file['size'][$u] = filesize($tinybrowser['docroot'].$browsepath.$filename);
@@ -112,14 +114,46 @@
// image specific info or general
if($typenow=='image' ) /*getimagesize($tinybrowser['docroot'].$browsepath.$filename)*//*)*/
{
- $imginfo = image_ratio::get_image($tinybrowser['docroot'].$browsepath.$filename,'',$tinybrowser['thumbsize'],$tinybrowser['thumbsize']);
- $file['width'][$u] = $imginfo['width'] ;//$imginfo[0];
- $file['height'][$u] = $imginfo['height'] ;//$imginfo[1];
- $file['dimensions'][$u] = $imginfo['width']+$imginfo['height'] ;// $imginfo[0] + $imginfo[1];
- $file['type'][$u] = $imginfo['mime'];
- $file['src'][$u] = $imginfo['src'];
+ /**
+ @remarks Check And add if not exists in db table
+ */
+ $res= sqlimage::fetch(array('path'=>$browsepath.$filename), true);
+
+ if(!$res){
+ $imginfo = image_ratio::get_image($tinybrowser['docroot'].$browsepath.$filename,'');
+
+ $sql = array(
+ 'path'=>$browsepath.$filename,
+ 'file'=>$filename,
+ 'width'=>$imginfo['width'],
+ 'height'=>$imginfo['height'],
+ 'ext'=>$imginfo['mime'],
+ );
+
+ $id = $res= sqlimage::create($sql);
+ $width = $imginfo['width'] ;
+ $height = $imginfo['height'] ;
+ $ext = $imginfo['mime'] ;
+ $src =$imginfo['src'];
}
+ else{
+ $id = $res->rowid;
+ $width = $res->width ;
+ $height = $res->height ;
+ $ext = $res->ext ;
+ $src = $res->path ;
+ }
+
+ $file['width'][$u] = $width;
+ $file['height'][$u] = $height;
+ $file['dimensions'][$u] =$width+$height ;// $imginfo[0] + $imginfo[1];
+ $file['type'][$u] = $ext; //$imginfo['mime'];
+ $file['src'][$u] =$src;
+ $file['id'][$u] =$id;
+
+
+ }
else
{
$file['width'][$u] = 'N/A';
@@ -128,8 +162,8 @@
$file['type'][$u] = returnMIMEType($filename);
}
}
+ $u++;
}
- $u++;
}
closedir($dh);
}
@@ -150,6 +184,7 @@
}
}
+
// Assign directory structure to array
$browsedirs=array();
dirtree($browsedirs,$tinybrowser['filetype'][$typenow],$tinybrowser['docroot'],$tinybrowser['path'][$typenow]);
@@ -299,16 +334,16 @@
for($i=$showpage_start;$i<$showpage_end;$i++)
{
- echo '<div class="img-browser"><a href="#" onclick="selectURL(\''.$linkpath.$file['name'][$i].'\');" title="'.TB_FILENAME.': '.$file['name'][$i]
+ echo '<div class="img-browser"><a href="#" onclick="selectURL(\''.$linkpath.$file['name'][$i].'\');" title="'.TB_FILENAME.': '.$file['title'][$i]
.' '.TB_DIMENSIONS.': '.$file['width'][$i].' x '.$file['height'][$i]
.' '.TB_DATE.': '.date($tinybrowser['dateformat'],$file['modified'][$i])
.' '.TB_TYPE.': '.$file['type'][$i]
.' '.TB_SIZE.': '.bytestostring($file['size'][$i],1)
.'">'
- .'<img src="'.tep_get_http().$file['src'][$i] .'" />'
+ .'<img src="'.tep_get_http().DIR_WS_ADMIN.'document.php?mod=img&typ=db&id='.$file['id'][$i].'&w='.$tinybrowser['thumbsize'].'&h='.$tinybrowser['thumbsize'] /*$file['src'][$i]*/ .'" />'
// .'<img src="'.$thumbpath.$tinybrowser['thumbfolder'].'/_'.$file['name'][$i] . .'" />'
// .tep_image()
- .'<div class="filename">'.$file['name'][$i].'</div></a></div>';
+ .'<div class="filename">'.$file['title'][$i].'</div></a></div>';
}
}
else
@@ -317,8 +352,8 @@
{
$alt = (IsOdd($i) ? 'r1' : 'r0');
echo '<tr class="'.$alt.'">';
- if($typenow=='image') echo '<td><a class="imghover" href="#" onclick="selectURL(\''.$linkpath.$file['name'][$i].'\');" title="'.$file['name'][$i].'"><img src="'.$thumbpath.$tinybrowser['thumbfolder'].'/_'.$file['name'][$i].'" alt="" />'.truncate_text($file['name'][$i],30).'</a></td>';
- else echo '<td><a href="#" onclick="selectURL(\''.$linkpath.$file['name'][$i].'\');" title="'.$file['name'][$i].'">'.truncate_text($file['name'][$i],30).'</a></td>';
+ if($typenow=='image') echo '<td><a class="imghover" href="#" onclick="selectURL(\''.$linkpath.$file['name'][$i].'\');" title="'.$file['title'][$i].'"><img src="'.tep_get_http().DIR_WS_ADMIN.'document.php?mod=img&typ=db&id='.$file['id'][$i].'&w='.$tinybrowser['thumbsize'].'&h='.$tinybrowser['thumbsize']/*$thumbpath.$tinybrowser['thumbfolder'].'/_'.$file['name'][$i]*/.'" alt="" />'.truncate_text($file['name'][$i],30).'</a></td>';
+ else echo '<td><a href="#" onclick="selectURL(\''.$linkpath.$file['name'][$i].'\');" title="'.$file['name'][$i].'">'.truncate_text($file['title'][$i],30).'</a></td>';
echo '<td>'.bytestostring($file['size'][$i],1).'</td>';
if($typenow=='image') echo '<td>'.$file['width'][$i].' x '.$file['height'][$i].'</td>';
echo '<td>'.$file['type'][$i].'</td>'
Modified: trunk/catalog/admin/includes/classes/drivers/sqlimage.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlimage.php 2011-12-19 21:14:41 UTC (rev 3983)
+++ trunk/catalog/admin/includes/classes/drivers/sqlimage.php 2011-12-20 22:18:28 UTC (rev 3984)
@@ -16,22 +16,27 @@
EN cours de dev
-CREATE TABLE IF NOT EXISTS `osc_images` (
- `rowid` int(11) NOT NULL,
- `path` varchar(250) NOT NULL,
- `file` varchar(100) NOT NULL,
- `date_added` datetime NOT NULL,
- `last_modified` datetime NOT NULL,
- PRIMARY KEY (`rowid`)
-) ENGINE=InnoDB DEFAULT ;
+CREATE TABLE IF NOT EXISTS osc_images (
+ rowid int(11) NOT NULL AUTO_INCREMENT,
+ pathkey varchar(32) NOT NULL,
+ path varchar(250) NOT NULL,
+ file varchar(100) NOT NULL,
+ date_added datetime NOT NULL,
+ last_modified datetime NOT NULL,
+ width int(5) NOT NULL,
+ height int(5) NOT NULL,
+ ext char(4) NOT NULL,
+ PRIMARY KEY (rowid)
+)
-CREATE TABLE IF NOT EXISTS `osc_images_used` (
- `rowid` int(11) NOT NULL,
- `width` float NOT NULL,
- `height` float NOT NULL,
- `watermark` varchar(100) NOT NULL
+
+CREATE TABLE IF NOT EXISTS osc_images_used (
+ rowid int(11) NOT NULL,
+ width float NOT NULL,
+ height float NOT NULL,
+ watermark varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT ;
*/
@@ -64,15 +69,21 @@
public static function create($option){
self::getInstance();
+
if(!isset($option['path']))
return 'path';
if(!isset($option['file']))
return 'file';
- $sql_data_array['path'] = 'now()';
- $sql_data_array['file'] = 'now()';
+ $sql_data_array['pathkey']= md5($option['path']);
+ $sql_data_array['path'] =$option['path'];
+ $sql_data_array['file'] = basename($option['file']);
$sql_data_array['date_added'] = 'now()';
+ if(isset($option['width'])) $sql_data_array['width'] =$option['width'];
+ if(isset($option['height'])) $sql_data_array['height'] =$option['height'];
+ if(isset($option['ext'])) $sql_data_array['ext'] =$option['ext'];
+
$res=tep_db_perform(TABLE_IMAGES, $sql_data_array);
if(!$res)
@@ -92,13 +103,22 @@
if(!isset($option['file']))
return 'file';
$where ='';
+
if(isset($option['id'])) $where .="AND rowid = '".(int)$option['id']."' ";
+ if(isset($option['path'])) $sql .="AND path = '".tep_db_input($option['path'])."' ";
+ if(isset($option['pathkey']))
+ $sql .="AND pathkey = '".tep_db_input($option['pathkey'])."' ";
+ elseif(isset($option['path']))
+ $sql_data_array['pathkey']= md5($option['path']);
+ $sql_data_array['path'] =$option['path'];
+ $sql_data_array['file'] = basename($option['file']);
+ $sql_data_array['last_modified'] = 'now()';
+ if(isset($option['width'])) $sql_data_array['width'] =$option['width'];
+ if(isset($option['height'])) $sql_data_array['height'] =$option['height'];
+ if(isset($option['ext'])) $sql_data_array['ext'] =$option['ext'];
- $sql_data_array['path'] = 'now()';
- $sql_data_array['file'] = 'now()';
- $sql_data_array['last_modified'] = 'now()';
$res=tep_db_perform(TABLE_IMAGES, $sql_data_array, 'update' , substr($where,3) );
return $res;
@@ -131,13 +151,18 @@
$sql ="";
if(isset($option['id'])) $sql .="AND rowid = '".(int)tep_db_input($option['id'])."' ";
+ if(isset($option['path'])) $sql .="AND path = '".tep_db_input($option['path'])."' ";
+ if(isset($option['pathkey']))
+ $sql .="AND pathkey = '".tep_db_input($option['pathkey'])."' ";
+ elseif(isset($option['path']))
+ $sql .="AND pathkey = '".md5(tep_db_input($option['path']))."' ";
$sql="SELECT * FROM " . TABLE_IMAGES . " a ".
- " LEFT JOIN " . TABLE_IMAGES_USED . " g ON (a.rowid=g.rowid) ".
+// " LEFT JOIN " . TABLE_IMAGES_USED . " g ON (a.rowid=g.rowid) ".
" WHERE ".substr($sql,3);
-
+// echo $sql;
$res=$DB->query($sql);
$num = $res->__get('numRows');
@@ -175,7 +200,7 @@
// self::$modules->delete($categories[$i]['id']);
- $DB->query("delete from " . TABLE_IMAGES_USED . " where rowid = '" . (int)$_id . "' ");
+// $DB->query("delete from " . TABLE_IMAGES_USED . " where rowid = '" . (int)$_id . "' ");
$DB->query("delete from " . TABLE_IMAGES . " where rowid = '" . (int)$_id . "'");
@@ -196,7 +221,8 @@
'last_modified' => '',
'width' => '',
'height' => '',
- 'watermark' => '',
+ 'ext' => '',
+// 'watermark' => '',
);
return self::CleanKey($par);
Modified: trunk/catalog/admin/includes/functions/html_output.php
===================================================================
--- trunk/catalog/admin/includes/functions/html_output.php 2011-12-19 21:14:41 UTC (rev 3983)
+++ trunk/catalog/admin/includes/functions/html_output.php 2011-12-20 22:18:28 UTC (rev 3984)
@@ -226,15 +226,18 @@
return '<a class="button ActionBack" href="' . $href . '" '.$js.'>'.$text.'</a>';
}
+// public images
+function tep_info_image($image, $alt, $width = '', $height = '', $parameters = '',$mode=false) { return '<img src="'.tep_href_link('document.php', 'mod=img&typ=db&key='.md5('images/'.$image).'&w='.$width.'&h='.$height).'" alt="'.$alt.'" title="'.$image.'" '.$parameters.'/>'; }
+
/**
Fonctions remplacé par des class
=> Retrocompatibilité
*/
function tep_customers_row_action($customers_id,$opt='') { return customerUtility::DisplayRowAction($customers_id,$opt); }
function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '',$mode=false) { $img=image_ratio::getInstance(); return $img->tep_image($src, $alt, $width, $height, $parameters,$mode); }
-function tep_info_image($image, $alt, $width = '', $height = '') { return tep_image(DIR_WS_CATALOG_IMAGES . $image, $alt, $width, $height); }
+
function tep_image_submit($image, $alt = '', $parameters = '',$classCss='') { return formUtility::image_submit($image, $alt, $parameters ,$classCss); }
function tep_image_button($image, $alt = '', $params = ''){ return formUtility::image_button($image, $alt, $parameters ); }
function tep_draw_form($name, $action, $parameters = '', $method = 'post', $params = ''){ return formUtility::draw_form($name, $action, $parameters, $method, $params ); }
Modified: trunk/catalog/admin/includes/gabarit/configuration/modmembres.listing.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/configuration/modmembres.listing.gab 2011-12-19 21:14:41 UTC (rev 3983)
+++ trunk/catalog/admin/includes/gabarit/configuration/modmembres.listing.gab 2011-12-20 22:18:28 UTC (rev 3984)
@@ -144,28 +144,7 @@
- <fieldset class="block_field">
- <legend><?php echo __('modmembres legend state') ?></legend>
- <div class="block_input">
- <?php /** */ $row = modmembres::$list['ACCOUNT_STATE']; ?>
- <div class="fleft w_50">
- <label title="<?php echo '('.$row->key.' - ' . $row->set . ')'; ?>"><?php echo __($row->description). tep_image(DIR_WS_ICONS . 'icon_help.gif'); ?></label>
- <p>
- <?php echo $row->value_field ; ?>
- </p>
- </div>
- <?php if(_test_bool(modmembres::$list['ACCOUNT_STATE']->value)): ?>
- <?php /** */ $row = modmembres::$list['ENTRY_STATE_MIN_LENGTH']; ?>
- <div class="fleft w_50">
- <label title="<?php echo '('.$row->key.' - ' . $row->set . ')'; ?>"><?php echo __($row->description). tep_image(DIR_WS_ICONS . 'icon_help.gif'); ?></label>
- <p>
- <?php echo $row->value_field ; ?>
- </p>
- </div>
- <?php endif; ?>
- </div>
- </fieldset>
<fieldset class="block_field">
@@ -254,7 +233,31 @@
<fieldset class="block_field">
+ <legend><?php echo __('modmembres legend state') ?></legend>
+ <div class="block_input">
+ <?php /** */ $row = modmembres::$list['ACCOUNT_STATE']; ?>
+ <div class="fleft w_50">
+ <label title="<?php echo '('.$row->key.' - ' . $row->set . ')'; ?>"><?php echo __($row->description). tep_image(DIR_WS_ICONS . 'icon_help.gif'); ?></label>
+ <p>
+ <?php echo $row->value_field ; ?>
+ </p>
+ </div>
+ <?php if(_test_bool(modmembres::$list['ACCOUNT_STATE']->value)): ?>
+ <?php /** */ $row = modmembres::$list['ENTRY_STATE_MIN_LENGTH']; ?>
+ <div class="fleft w_50">
+ <label title="<?php echo '('.$row->key.' - ' . $row->set . ')'; ?>"><?php echo __($row->description). tep_image(DIR_WS_ICONS . 'icon_help.gif'); ?></label>
+ <p>
+ <?php echo $row->value_field ; ?>
+ </p>
+ </div>
+ <?php endif; ?>
+ </div>
+ </fieldset>
+
+
+ <fieldset class="block_field">
+
<legend><?php echo __('modmembres legend general'); ?></legend>
<ul class="block_input">
@@ -350,7 +353,7 @@
<ul class="block_input">
<?php foreach(modmembres::$list as $row)
- if(!in_array($row->key,array('ACCOUNT_DOB','ENTRY_DOB_MIN','MAX_DISPLAY_PRODUCTS_IN_ORDER_HISTORY_BOX','MAX_DISPLAY_ORDER_HISTORY','CC_NUMBER_MIN_LENGTH', 'CC_OWNER_MIN_LENGTH', 'ACCOUNT_DOB', 'ENTRY_DOB_MIN_LENGTH', 'ENTRY_LAST_NAME_MIN_LENGTH', 'ENTRY_FIRST_NAME_MIN_LENGTH','ACCOUNT_GENDER' ,'ENTRY_EMAIL_ADDRESS_MIN_LENGTH', 'ENTRY_STREET_ADDRESS_MIN_LENGTH', 'ENTRY_POSTCODE_MIN_LENGTH', 'ENTRY_CITY_MIN_LENGTH', 'ACCOUNT_COMPANY', 'ENTRY_COMPANY_MIN_LENGTH','CUSTOMER_FORCE_UCWORDS','CUSTOMER_FORCE_STRTOUPPER','ENTRY_STATE_MIN_LENGTH', 'ACCOUNT_STATE', 'ENTRY_PASSWORD_MIN_LENGTH', 'ENTRY_TELEPHONE_MIN_LENGTH', 'ACCOUNT_FAXNUM', 'ACCOUNT_COUNTRY')) ) { ?>
+ if(!in_array($row->key,array('ACCOUNT_DOB','ENTRY_DOB_MIN','MAX_DISPLAY_PRODUCTS_IN_ORDER_HISTORY_BOX','MAX_DISPLAY_ORDER_HISTORY','CC_NUMBER_MIN_LENGTH', 'CC_OWNER_MIN_LENGTH', 'ACCOUNT_DOB', 'ENTRY_DOB_MIN_LENGTH', 'ENTRY_LAST_NAME_MIN_LENGTH', 'ENTRY_FIRST_NAME_MIN_LENGTH','ACCOUNT_GENDER' ,'ENTRY_EMAIL_ADDRESS_MIN_LENGTH', 'ENTRY_STREET_ADDRESS_MIN_LENGTH', 'ENTRY_POSTCODE_MIN_LENGTH', 'ENTRY_CITY_MIN_LENGTH', 'ACCOUNT_COMPANY', 'ENTRY_COMPANY_MIN_LENGTH','CUSTOMER_FORCE_UCWORDS','CUSTOMER_FORCE_STRTOUPPER','ENTRY_STATE_MIN_LENGTH', 'ACCOUNT_STATE', 'ENTRY_PASSWORD_MIN_LENGTH', 'ENTRY_TELEPHONE_MIN_LENGTH', 'ACCOUNT_FAXNUM', 'ACCOUNT_COUNTRY', 'CUSTOMER_CITY_FORCE_STRTOUPPER')) ) { ?>
<li id="nav_<?php echo $row->key ?>"><h5 title="<?php echo '('.$row->key.' - ' . $row->set . ')'; ?>"><?php echo __($row->title). tep_image(DIR_WS_ICONS . 'icon_help.gif'); ?></h5>
<div class="block_input tirroir">
Added: trunk/catalog/install/includes/sql/mysql/tables/osc_images.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/tables/osc_images.sql (rev 0)
+++ trunk/catalog/install/includes/sql/mysql/tables/osc_images.sql 2011-12-20 22:18:28 UTC (rev 3984)
@@ -0,0 +1,27 @@
+--+######################################################################--+
+--| osCSS Open Source E-commerce |
+--+######################################################################--+
+--| Copyright (c) 2005-2011 The osCSS developers |
+--| |
+--| http://www.oscss.org |
+--| Portions Copyright (c) 2003 osCommerce |
+--+######################################################################--+
+--| This source file is subject to version 2.0 of the GPL license, |
+--| available at the following url: |
+--| http://www.oscss.org/ |
+--+######################################################################--+
+
+
+CREATE TABLE IF NOT EXISTS osc_images (
+ rowid int(11) NOT NULL AUTO_INCREMENT,
+ pathkey varchar(32) NOT NULL,
+ path varchar(250) NOT NULL,
+ file varchar(100) NOT NULL,
+ date_added datetime NOT NULL,
+ last_modified datetime NOT NULL,
+ width int(5) NOT NULL,
+ height int(5) NOT NULL,
+ ext char(4) NOT NULL,
+ PRIMARY KEY (rowid)
+) DEFAULT CHARSET=utf8 ;
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2011-12-19 21:14:48
|
Revision: 3983
http://oscss.svn.sourceforge.net/oscss/?rev=3983&view=rev
Author: oscim
Date: 2011-12-19 21:14:41 +0000 (Mon, 19 Dec 2011)
Log Message:
-----------
correction recuperation et relance sur les panier client et report des gabarit dans un sous dossier specifique
Modified Paths:
--------------
trunk/catalog/admin/includes/modules/pages/recover_cart_sales.php
Added Paths:
-----------
trunk/catalog/admin/includes/gabarit/recover_cart_sales/
trunk/catalog/admin/includes/gabarit/recover_cart_sales/display_view.delete.gab
trunk/catalog/admin/includes/gabarit/recover_cart_sales/display_view.listing.gab
trunk/catalog/admin/includes/gabarit/recover_cart_sales/display_view.porcessconfirm.gab
Removed Paths:
-------------
trunk/catalog/admin/includes/gabarit/recover_cart_sales.delete.gab
trunk/catalog/admin/includes/gabarit/recover_cart_sales.execute.gab
trunk/catalog/admin/includes/gabarit/recover_cart_sales.listing.gab
Copied: trunk/catalog/admin/includes/gabarit/recover_cart_sales/display_view.delete.gab (from rev 3973, trunk/catalog/admin/includes/gabarit/recover_cart_sales.delete.gab)
===================================================================
--- trunk/catalog/admin/includes/gabarit/recover_cart_sales/display_view.delete.gab (rev 0)
+++ trunk/catalog/admin/includes/gabarit/recover_cart_sales/display_view.delete.gab 2011-12-19 21:14:41 UTC (rev 3983)
@@ -0,0 +1,23 @@
+<?php
+/**
+ @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 18/12/11, 09:40
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+?>
+<h3><?php echo __('table heading recover cart sales delete'); ?></h3>
+
+<div class="box_uniq">
+ <?php echo tep_draw_form('post_pov', recover_cart_sales::FILENAME, 'cID='.recover_cart_sales::$cID.'&'.recover_cart_sales::RepostDate().'&action=delete_confirm', 'post'); ?>
+
+ <p><?php echo __('text info delete') ?></p>
+
+ <div class="block_input button_nav">
+ <?php print tep_image_submit('button_delete.gif', IMAGE_DELETE) . tep_js_back(tep_href_link(recover_cart_sales::FILENAME,recover_cart_sales::RepostDate()), IMAGE_CANCEL) ; ?>
+ </div>
+
+ </form>
+</div>
\ No newline at end of file
Copied: trunk/catalog/admin/includes/gabarit/recover_cart_sales/display_view.listing.gab (from rev 3973, trunk/catalog/admin/includes/gabarit/recover_cart_sales.listing.gab)
===================================================================
--- trunk/catalog/admin/includes/gabarit/recover_cart_sales/display_view.listing.gab (rev 0)
+++ trunk/catalog/admin/includes/gabarit/recover_cart_sales/display_view.listing.gab 2011-12-19 21:14:41 UTC (rev 3983)
@@ -0,0 +1,52 @@
+<?php
+/**
+ @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 18/12/11, 09:40
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+?>
+<h3><?php echo __('heading title'); ?></h3>
+
+<?php echo tep_draw_form('status', recover_cart_sales::FILENAME ); ?>
+ <fieldset>
+ <p>
+ <label><?php echo __('days field prefix'); ?></label>
+ <p class="inline">
+ <input class="inline" type="text" value="<?php echo recover_cart_sales::$basedays; ?>" name="tdate"/>
+ <input class="inline" type="text" value="<?php echo recover_cart_sales::$skipdays;; ?>" name="sdate"/>
+ <?php echo tep_image_submit('button_search.gif', __('days field button')) ?>
+ </p>
+ </p>
+ </fieldset>
+</form>
+<div class="box_uniq">
+ <?php echo tep_draw_form('status', recover_cart_sales::FILENAME, 'action=processconfirm'); ?>
+ <table class="dataTable">
+ <thead>
+ <tr>
+ <th> </th>
+ <th><?php echo __('table heading date') ?></th>
+ <th><?php echo __('table heading customer') ?></th>
+ <th><?php echo __('table heading email') ?></th>
+ <th><?php echo __('table heading total') ?></th>
+ <th><?php echo __('table heading status') ?></th>
+ <th><?php echo __('table heading action') ?></th>
+ </tr>
+ </thead>
+ <tfoot>
+ <tr>
+ <td colspan="2"> </td>
+ <td><?php echo __('table heading date') ?></td>
+ <td><?php echo tep_image_submit('button_send_mail.gif', IMAGE_SEND_EMAIL) ?></td>
+ <td colspan="2"> </td>
+ </tr>
+ </tfoot>
+ <tbody>
+ <!-- AJAX BLOCK -->
+ </tbody>
+ </table>
+ </form>
+</div>
\ No newline at end of file
Copied: trunk/catalog/admin/includes/gabarit/recover_cart_sales/display_view.porcessconfirm.gab (from rev 3973, trunk/catalog/admin/includes/gabarit/recover_cart_sales.execute.gab)
===================================================================
--- trunk/catalog/admin/includes/gabarit/recover_cart_sales/display_view.porcessconfirm.gab (rev 0)
+++ trunk/catalog/admin/includes/gabarit/recover_cart_sales/display_view.porcessconfirm.gab 2011-12-19 21:14:41 UTC (rev 3983)
@@ -0,0 +1,23 @@
+<?php
+/**
+ @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 18/12/11, 09:40
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+?>
+<h3><?php echo __('table heading customer'); ?></h3>
+
+
+<div class="box_left">
+ <?php foreach(recover_cart_sales::$list as $item): ?>
+ <p><?php echo $item['text'] ?></p>
+ <?php endforeach; ?>
+</div>
+
+
+ <div class="block_input button_nav">
+ <?php print tep_image_submit('button_delete.gif', IMAGE_DELETE) . tep_js_back(tep_href_link(recover_cart_sales::FILENAME,recover_cart_sales::RepostDate()), IMAGE_CANCEL) ; ?>
+ </div>
\ No newline at end of file
Deleted: trunk/catalog/admin/includes/gabarit/recover_cart_sales.delete.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/recover_cart_sales.delete.gab 2011-12-19 20:05:17 UTC (rev 3982)
+++ trunk/catalog/admin/includes/gabarit/recover_cart_sales.delete.gab 2011-12-19 21:14:41 UTC (rev 3983)
@@ -1,23 +0,0 @@
-<?php
-/**
- @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
- @package osCSS-2 <www http://www.oscss.org>
- @version 2.0.9
- @date 22/06/10, 18:12
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-8
-*/
-?>
-<h3><?php echo __('table heading recover cart sales delete'); ?></h3>
-
-<div class="box_uniq">
- <?php echo tep_draw_form('post_pov', recover_cart_sales::FILENAME, 'cID='.recover_cart_sales::$cID.'&'.recover_cart_sales::RepostDate().'&action=delete_confirm', 'post'); ?>
-
- <p><?php echo __('text info delete') ?></p>
-
- <div class="button_nav">
- <?php echo tep_image_submit('', IMAGE_DELETE).'<a class="button" href="' . tep_href_link(recover_cart_sales::FILENAME,recover_cart_sales::RepostDate()) . '">'.IMAGE_BACK.'</a>'; ?>
- </div>
-
- </form>
-</div>
\ No newline at end of file
Deleted: trunk/catalog/admin/includes/gabarit/recover_cart_sales.execute.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/recover_cart_sales.execute.gab 2011-12-19 20:05:17 UTC (rev 3982)
+++ trunk/catalog/admin/includes/gabarit/recover_cart_sales.execute.gab 2011-12-19 21:14:41 UTC (rev 3983)
@@ -1,23 +0,0 @@
-<?php
-/**
- @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
- @package osCSS-2 <www http://www.oscss.org>
- @version 2.0.9
- @date 22/06/10, 18:12
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-8
-*/
-?>
-<h3><?php echo __('table heading customer'); ?></h3>
-
-
-<div class="box_left">
- <?php foreach(recover_cart_sales::$list as $item): ?>
- <p><?php echo $item ?></p>
- <?php endforeach; ?>
-</div>
-
-<div class="button_nav">
- <a class="button" href="<?php echo tep_href_link(recover_cart_sales::FILENAME, "action=delete&customer_id=" . $cid . "&tdate=" . $this->basedays . "&sdate=" . $this->skipdays) ?>"><?php echo tep_image_button('button_delete.gif', IMAGE_DELETE) ?></a>
- <a class="button" href="<?php echo tep_href_link(recover_cart_sales::FILENAME) ?>"><?php echo TEXT_RETURN ?></a>
-</div>
\ No newline at end of file
Deleted: trunk/catalog/admin/includes/gabarit/recover_cart_sales.listing.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/recover_cart_sales.listing.gab 2011-12-19 20:05:17 UTC (rev 3982)
+++ trunk/catalog/admin/includes/gabarit/recover_cart_sales.listing.gab 2011-12-19 21:14:41 UTC (rev 3983)
@@ -1,50 +0,0 @@
-<?php
-/**
- @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
- @package osCSS-2 <www http://www.oscss.org>
- @version 2.0.9
- @date 22/06/10, 18:12
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-8
-*/
-?>
-<h3><?php echo __('heading title'); ?></h3>
-
-<?php echo tep_draw_form('status', recover_cart_sales::FILENAME ); ?>
- <fieldset>
- <p>
- <label><?php echo __('days field prefix'); ?></label>
- <input type="text" value="<?php echo recover_cart_sales::$basedays; ?>" name="tdate"/>
- <input type="text" value="<?php echo recover_cart_sales::$skipdays;; ?>" name="sdate"/>
- <?php echo tep_image_submit('button_search.gif', __('days field button')) ?>
- </p>
- </fieldset>
-</form>
-<div class="box_uniq">
- <?php echo tep_draw_form('status', recover_cart_sales::FILENAME, 'action=form'); ?>
- <table class="dataTable">
- <thead>
- <tr>
- <th> </th>
- <th><?php echo __('table heading date') ?></th>
- <th><?php echo __('table heading customer') ?></th>
- <th><?php echo __('table heading email') ?></th>
- <th><?php echo __('table heading total') ?></th>
- <th><?php echo __('table heading status') ?></th>
- <th><?php echo __('table heading action') ?></th>
- </tr>
- </thead>
- <tfoot>
- <tr>
- <td colspan="2"> </td>
- <td><?php echo __('table heading date') ?></td>
- <td><?php echo tep_image_submit('button_send_mail.gif', IMAGE_SEND_EMAIL) ?></td>
- <td colspan="2"> </td>
- </tr>
- </tfoot>
- <tbody>
- <!-- AJAX BLOCK -->
- </tbody>
- </table>
- </form>
-</div>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/modules/pages/recover_cart_sales.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/recover_cart_sales.php 2011-12-19 20:05:17 UTC (rev 3982)
+++ trunk/catalog/admin/includes/modules/pages/recover_cart_sales.php 2011-12-19 21:14:41 UTC (rev 3983)
@@ -3,13 +3,14 @@
@licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.1.0
- @date 15/12/10, 15:32
+ @version 2.1.1
+ @date 18/12/11, 15:32
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class recover_cart_sales
*/
+
class recover_cart_sales
implements ExtModPage, InterfacedTJsonS , InterfaceModule{
@@ -33,6 +34,8 @@
public function __construct() {
self::$code=__CLASS__;
+
+
self::init();
}
@@ -41,17 +44,23 @@
self::$action=$actions;
$DB=Database::getInstance();
+
switch (self::$action) {
case 'delete_confirm':
- if(isset($_GET['cID'])){
- $reset_query_raw = "delete from " . TABLE_CUSTOMERS_BASKET . " where customers_id=" . (int)$_GET['cID'];
- $DB->query($reset_query_raw);
+ if(isset($_GET['cID'])){
+ $reset_query_raw = "delete from " . TABLE_CUSTOMERS_BASKET . " where customers_id=" . (int)$_GET['cID'];
+ $DB->query($reset_query_raw);
- $reset_query_raw2 = "delete from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where customers_id=" . (int)$_GET['cID'];
- $DB->query($reset_query_raw2);
- }
- tep_redirect(tep_href_link(self::FILENAME, 'tdate=' . (int)$_GET['tdate']));
+ $reset_query_raw2 = "delete from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where customers_id=" . (int)$_GET['cID'];
+ $DB->query($reset_query_raw2);
+ }
+ tep_redirect(tep_href_link(self::FILENAME, 'tdate=' . (int)$_GET['tdate']));
break;
+
+ case 'processconfirm':
+ $custids = (isset($_POST['custid'])) ? $_POST['custid'] : '';
+ $this->processEmail($custids);
+ break;
}
return self::$action;
@@ -74,18 +83,19 @@
public function display_view(){
switch(self::$action){
case 'delete':
- self::$cID = (isset($_GET['cID'])) ? $_GET['cID'] : '';
- return tep_get_include_contents(self::$code.'.delete');
+ self::$cID = (isset($_GET['cID'])) ? $_GET['cID'] : '';
+ $action ='delete';
break;
- case 'execute':
- $custid = (isset($_POST['custid'])) ? $_POST['custid'] : '';
- $this->processEmail($custids);
- return tep_get_include_contents(self::$code.'.execute');
+ case 'processconfirm':
+ $action ='processconfirm';
break;
default:
- self::tep_get_list();
- return tep_get_include_contents(self::$code.'.listing');
+ self::tep_get_list();
+ $action ='listing';
}
+
+ /// use master gabarit
+ return MGabCont::CallGab($action,__FUNCTION__,__CLASS__);
}
@@ -96,6 +106,8 @@
//! active datatable in ajax, precise les GET necessaire
if(!defined('JSONSTATMENT'))define('JSONSTATMENT', 'mod=page&type='.self::$code.'&tdate='.self::$basedays.'&sdate='.self::$skipdays.'');
+
+ if(!defined('TABLE_SCART'))define('TABLE_SCART', DB_TABLE_PREFIX . 'scart');
}
private static function seadate($day) {
@@ -155,97 +167,111 @@
private function processEmail($custids) {
global $currencies, $languages_id;
+
$DB=Database::getInstance();
- if (is_array($custids))
- foreach ($custids as $cid) {
- unset($email);
- $customer = '';
+ if (is_array($custids))
+ foreach ($custids as $cid) {
+ unset($email);
+ $customer = '';
- $query1 = $DB->query("select cb.products_id pid, cb.customers_basket_quantity qty, cb.customers_basket_date_added bdate, cus.customers_firstname fname, cus.customers_lastname lname, cus.customers_email_address email
- from " . TABLE_CUSTOMERS_BASKET . " cb, " . TABLE_CUSTOMERS . " cus
- where cb.customers_id = cus.customers_id and cus.customers_id = '".$cid."'
- order by cb.customers_basket_date_added desc ");
+ $query1 = $DB->query("select cb.products_id pid, cb.customers_basket_quantity qty, cb.customers_basket_date_added bdate, cus.customers_firstname fname, cus.customers_lastname lname, cus.customers_email_address email
+ from " . TABLE_CUSTOMERS_BASKET . " cb, " . TABLE_CUSTOMERS . " cus
+ where cb.customers_id = cus.customers_id and cus.customers_id = '".$cid."'
+ order by cb.customers_basket_date_added desc ");
- $knt = $query1->__get('numRows');
- $lastcid = '';
- $mline = '';
- for ($i = 0; $i < $knt; $i++) {
- $inrec = $query1->fetchAssoc();
+ $knt = $query1->__get('numRows');
+ $lastcid = '';
+ $mline = '';
- // set new cline and curcus
- if ($lastcid != $cid) {
- if ($lastcid != "") {
- $this->infoBoxContents[] = array('text' => '<strong>' . TABLE_CART_TOTAL . '</strong>' . $currencies->format($tprice));
- $this->infoBoxContents[] = array('text' => '<a class="button" href="' . tep_href_link(FILENAME_RECOVER_CART_SALES, "action=delete&customer_id=" . $cid . "&tdate=" . $this->basedays . "&sdate=" . $this->skipdays) . '">' . tep_image_button('button_delete.gif', IMAGE_DELETE) . '</a>');
- }
- $this->infoBoxContents[] = array('text' => '<a class="button" href="' . tep_href_link(FILENAME_CUSTOMERS, 'search=' . $inrec['lname'], 'NONSSL') . '">' . $inrec['fname'] . ' ' . $inrec['lname'] . '</a>' . $customer);
- $tprice = 0;
- }
- $lastcid = $cid;
+ for ($i = 0; $i < $knt; $i++) {
+ $inrec = $query1->fetchAssoc();
- // get the shopping cart
- $query2 = $DB->query("select p.products_price price, p.products_tax_class_id taxclass, p.products_model model, pd.products_name name
- from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_LANGUAGES . " l
- where p.products_id = '" . $inrec['pid'] . "' and pd.products_id = p.products_id and pd.language_id = " . (int)$languages_id );
+ // set new cline and curcus
+ if ($lastcid != $cid) {
+ if ($lastcid != "") {
+ self::$list[] = array('text' => '<strong>' . TABLE_CART_TOTAL . '</strong>' . $currencies->format($tprice));
+ self::$list[] = array('text' => '<a class="button" href="' . tep_href_link(FILENAME_RECOVER_CART_SALES, "action=delete&customer_id=" . $cid . "&tdate=" . $this->basedays . "&sdate=" . $this->skipdays) . '">' . tep_image_button('button_delete.gif', IMAGE_DELETE) . '</a>');
+ }
+ self::$list[] = array('text' => '<a class="button" href="' . tep_href_link(FILENAME_CUSTOMERS, 'search=' . $inrec['lname'], 'NONSSL') . '">' . $inrec['fname'] . ' ' . $inrec['lname'] . '</a>' . $customer);
+ $tprice = 0;
+ }
+ $lastcid = $cid;
- $inrec2 = $query2->fetchAssoc();
- $sprice = tep_get_products_special_price( $inrec['pid'] );
- if( $sprice < 1 ) $sprice = $inrec2['price'];
+ // get the shopping cart
+ $query2 = $DB->query("select p.products_price price, p.products_tax_class_id taxclass, p.products_model model, pd.products_name name
+ from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_LANGUAGES . " l
+ where p.products_id = '" . $inrec['pid'] . "' and pd.products_id = p.products_id and pd.language_id = " . (int)$languages_id );
- // Some users may want to include taxes in the pricing, allow that. NOTE HOWEVER that we don't have a good way to get individual tax rates based on customer location yet!
- if(_cst_bool('RCS_INCLUDE_TAX_IN_PRICES '))$sprice += ($sprice * tep_get_tax_rate( $inrec2['taxclass'] ) / 100);
- elseif( _cst_bool('RCS_USE_FIXED_TAX_IN_PRICES') && RCS_FIXED_TAX_RATE > 0 ) $sprice += ($sprice * RCS_FIXED_TAX_RATE / 100);
+ $inrec2 = $query2->fetchAssoc();
+ $sprice = tep_get_products_special_price( $inrec['pid'] );
+ if( $sprice < 1 ) $sprice = $inrec2['price'];
- $tprice = $tprice + ($inrec['qty'] * $sprice);
- $pprice_formated = $currencies->format($sprice);
- $tpprice_formated = $currencies->format(($inrec['qty'] * $sprice));
+ // Some users may want to include taxes in the pricing, allow that. NOTE HOWEVER that we don't have a good way to get individual tax rates based on customer location yet!
+ if(_cst_bool('RCS_INCLUDE_TAX_IN_PRICES '))$sprice += ($sprice * tep_get_tax_rate( $inrec2['taxclass'] ) / 100);
+ elseif( _cst_bool('RCS_USE_FIXED_TAX_IN_PRICES') && RCS_FIXED_TAX_RATE > 0 ) $sprice += ($sprice * RCS_FIXED_TAX_RATE / 100);
- $this->infoBoxContents[] = array('text' => TABLE_HEADING_MODEL . $inrec2['model']);
- $this->infoBoxContents[] = array('text' => TABLE_HEADING_DESCRIPTION . '<a class="button" href="' . tep_href_link(FILENAME_CATEGORIES, 'action=new_product_preview&read=only&pID=' . $inrec['pid'] . '&origin=' . FILENAME_RECOVER_CART_SALES) . '">' . $inrec2['name'] . '</a>');
- $this->infoBoxContents[] = array('text' => TABLE_HEADING_QUANTY . $inrec['qty']);
- $this->infoBoxContents[] = array('text' => TABLE_HEADING_PRICE . $pprice_formated);
- $this->infoBoxContents[] = array('text' => TABLE_HEADING_TOTAL . $tpprice_formated);
+ $tprice = $tprice + ($inrec['qty'] * $sprice);
+ $pprice_formated = $currencies->format($sprice);
+ $tpprice_formated = $currencies->format(($inrec['qty'] * $sprice));
- if( _cst_bool('EMAIL_USE_HTML')) $mline .= $inrec['qty'] . ' x <a class="button" href="' . tep_catalog_href_link(FILENAME_CATALOG_PRODUCT_INFO, 'products_id='. $inrec['pid']) . '">' . $inrec2['name'] . '</a>' . "\n";
- else $mline .= $inrec['qty'] . ' x ' . $inrec2['name'] . "\n";
+ self::$list[] = array('text' => TABLE_HEADING_MODEL . $inrec2['model']);
+ self::$list[] = array('text' => TABLE_HEADING_DESCRIPTION . '<a class="button" href="' . tep_href_link(FILENAME_CATEGORIES, 'action=new_product_preview&read=only&pID=' . $inrec['pid'] . '&origin=' . FILENAME_RECOVER_CART_SALES) . '">' . $inrec2['name'] . '</a>');
+ self::$list[] = array('text' => TABLE_HEADING_QUANTY . $inrec['qty']);
+ self::$list[] = array('text' => TABLE_HEADING_PRICE . $pprice_formated);
+ self::$list[] = array('text' => TABLE_HEADING_TOTAL . $tpprice_formated);
- }
+ if( _cst_bool('EMAIL_USE_HTML')) $mline .= $inrec['qty'] . ' x <a class="button" href="' . tep_catalog_href_link(FILENAME_CATALOG_PRODUCT_INFO, 'products_id='. $inrec['pid']) . '">' . $inrec2['name'] . '</a>' . "\n";
+ else $mline .= $inrec['qty'] . ' x ' . $inrec2['name'] . "\n";
- $cquery = $DB->query("select * from " . TABLE_ORDERS . " where customers_id = '".$cid."'" );
+ }
- $custname = $inrec['fname']." ".$inrec['lname'];
- $outEmailAddr = '"' . $custname . '" <' . $inrec['email'] . '>';
+// $cquery = $DB->query("select * from " . TABLE_ORDERS . " where customers_id = '".(int)$cid."'" );
+// $ArrayCust=$cquery->fetchAssoc();
+// var_dump($ArrayCust);
+ $custname = $inrec['fname']." ".$inrec['lname'];
+ $outEmailAddr = '"' . $custname . '" <' . $inrec['email'] . '>';
- $email_ovner=( tep_not_null(EMAIL_FEEDBACK) )? EMAIL_FEEDBACK : EMAIL_FROM ;
- $myarray = array(
- 'mail_sent_to'=>$mail_sent_to,
- 'from'=>$from,
- 'subject'=>$subject,
- 'links_account'=>tep_catalog_href_link(FILENAME_LOGIN, '', 'SSL'),
- 'mline'=>$mline,
- 'message'=>$content
- );
+ $email_ovner=( tep_not_null(EMAIL_FEEDBACK) )? EMAIL_FEEDBACK : EMAIL_FROM ;
+ $myarray = array(
+ 'mail_sent_to'=>$mail_sent_to,
+ 'from'=>$from,
+ 'subject'=>$subject,
+ 'links_account'=>tep_catalog_href_link(FILENAME_LOGIN, '', 'SSL'),
+ 'mline'=>$mline,
+ 'message'=>$content
+ );
- $message_final=tep_post_prepare_email('recover_cart_sales.tpl',$language,$myarray);
- tep_mail('',$outEmailAddr, EMAIL_TEXT_SUBJECT, $message_final, STORE_OWNER, $email_ovner);
+ $message_final=tep_post_prepare_email('recover_cart_sales.tpl',$language,$myarray);
- //Copy
- if( tep_not_null(RCS_EMAIL_COPIES_TO) )
- tep_mail(STORE_OWNER, RCS_EMAIL_COPIES_TO, EMAIL_TEXT_SUBJECT, $message_final, STORE_OWNER, $email_ovner);
- $mline = "";
- // See if a record for this customer already exists; if not create one and if so update it
- $donequery = $DB->query("select * from ". TABLE_SCART ." where customers_id = '".$cid."'");
- if (tep_db_num_rows($donequery) == 0) $DB->query("insert into " . TABLE_SCART . " (customers_id, dateadded, datemodified ) values ('" . $cid . "', '" . $this->seadate('0') . "', '" . $this->seadate('0') . "')");
- else $DB->query("update " . TABLE_SCART . " set datemodified = '" . $this->seadate('0') . "' where customers_id = " . $cid );
+ $res=tep_mail($custname,$inrec['email'] , EMAIL_TEXT_SUBJECT, $message_final, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
+
+// self::$list[] = ''.$outEmailAddr. ' '.EMAIL_TEXT_SUBJECT;
+
+ //Copy
+// if( tep_not_null(RCS_EMAIL_COPIES_TO) )
+// tep_mail(STORE_OWNER, RCS_EMAIL_COPIES_TO, EMAIL_TEXT_SUBJECT, $message_final, STORE_OWNER, $email_ovner);
+
+ $mline = "";
+
+ // See if a record for this customer already exists; if not create one and if so update it
+ $donequery = $DB->query("select * from ". TABLE_SCART ." where customers_id = '".$cid."'");
+ if (tep_db_num_rows($donequery) == 0)
+ $res=$DB->query("insert into " . TABLE_SCART . " (customers_id, dateadded, datemodified ) values ('" . $cid . "', '" . $this->seadate('0') . "', '" . $this->seadate('0') . "')");
+ else
+ $res=$DB->query("update " . TABLE_SCART . " set datemodified = '" . $this->seadate('0') . "' where customers_id = " . $cid );
+
+
+
}
+// var_dump('toto');
+// exit;
-
}
/** public static InterfacedTJsonS */
@@ -456,7 +482,7 @@
$res[]=$li;
}
// print_r($res);
- if(count($res)==0) return array(array('base'=>' ','date'=>' ','customer'=>' ','email'=>' ','total'=>' ','status'=>' ','action'=>' '));
+// if(count($res)==0) return array(array('base'=>' ','date'=>' ','customer'=>' ','email'=>' ','total'=>' ','status'=>' ','action'=>' '));
return $res;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2011-12-19 20:05:23
|
Revision: 3982
http://oscss.svn.sourceforge.net/oscss/?rev=3982&view=rev
Author: oscim
Date: 2011-12-19 20:05:17 +0000 (Mon, 19 Dec 2011)
Log Message:
-----------
FS#941
Modified Paths:
--------------
trunk/catalog/admin/includes/classes/drivers/sqlcustomer.php
Modified: trunk/catalog/admin/includes/classes/drivers/sqlcustomer.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlcustomer.php 2011-12-19 19:56:44 UTC (rev 3981)
+++ trunk/catalog/admin/includes/classes/drivers/sqlcustomer.php 2011-12-19 20:05:17 UTC (rev 3982)
@@ -49,7 +49,7 @@
$sql_data_array = array();
$sql_data_array['customers_firstname'] = $sqlarray['customers_firstname'];
$sql_data_array['customers_lastname'] = $sqlarray['customers_lastname'];
- $sql_data_array['customers_email_address'] = $sqlarray['email'];
+ $sql_data_array['customers_email_address'] = $sqlarray['customers_email_address'];
$sql_data_array['customers_telephone'] = $sqlarray['customers_telephone'];
$sql_data_array['customers_fax'] = $sqlarray['customers_fax'];
if(isset($sqlarray['password']))$sql_data_array['customers_password'] = $sqlarray['password'];
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2011-12-19 19:56:51
|
Revision: 3981
http://oscss.svn.sourceforge.net/oscss/?rev=3981&view=rev
Author: oscim
Date: 2011-12-19 19:56:44 +0000 (Mon, 19 Dec 2011)
Log Message:
-----------
FS#939
Modified Paths:
--------------
trunk/catalog/admin/includes/gabarit/cfg_37.listing.gab
Modified: trunk/catalog/admin/includes/gabarit/cfg_37.listing.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/cfg_37.listing.gab 2011-12-19 19:49:17 UTC (rev 3980)
+++ trunk/catalog/admin/includes/gabarit/cfg_37.listing.gab 2011-12-19 19:56:44 UTC (rev 3981)
@@ -3,8 +3,8 @@
@licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.1.0
- @date 20/09/10, 21:30
+ @version 2.1.1
+ @date 18/12/11, 21:30
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -15,9 +15,9 @@
<a class="button" href="<?php echo tep_href_link(FILENAME_CONFIGURATION, 'gID='.$_GET['gID'].'&cache=All&action=reset') ?>"><?php echo __('text cache delete all') ?></a>
</div>
<div class="box_uniq">
- <div id="ssmenu">
+<!-- <div id="ssmenu"> -->
<!-- // tep_ssmenu_configuration($gparentID). -->
- </div>
+<!-- </div> -->
<table width="100%" class="dataTable">
<thead>
<tr>
@@ -36,9 +36,9 @@
<?php foreach(cfg_37::$liste as $cache => $stats): ?>
<tr>
<td><?php echo $cache ?></td>
- <td><?php echo $stats['total'] ?></td>
+ <td class="tcenter"><?php echo $stats['total'] ?></td>
<td><?php echo strftime(DATE_TIME_FORMAT, $stats['last_modified']) ?></td>
- <td><?php echo '<a href="' . tep_href_link(FILENAME_CONFIGURATION, tep_get_all_get_params(array('action')).'cache=' . $cache .'&pos='.$stats['pos']. '&action=reset') . '">' . tep_image(DIR_WS_ICONS.'icon_trash.gif', IMAGE_DELETE ) . '</a>' ?></td>
+ <td class="tright"><?php echo '<a href="' . tep_href_link(FILENAME_CONFIGURATION, tep_get_all_get_params(array('action')).'cache=' . $cache .'&pos='.@$stats['pos']. '&action=reset') . '">' . tep_image(DIR_WS_ICONS.'icon_trash.gif', IMAGE_DELETE ) . '</a>' ?></td>
</tr>
<?php endforeach; ?>
</tbody>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2011-12-19 19:49:23
|
Revision: 3980
http://oscss.svn.sourceforge.net/oscss/?rev=3980&view=rev
Author: oscim
Date: 2011-12-19 19:49:17 +0000 (Mon, 19 Dec 2011)
Log Message:
-----------
correction coquille
Ajout prise en charge de la suppression d'une ligne dans le panier via ajax et recalcul total
Modified Paths:
--------------
trunk/catalog/includes/application_bottom.php
trunk/catalog/includes/js/shopping_cart.js.php
trunk/catalog/includes/triggers/cart_totaux.inc
trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/content/shopping_cart.php
trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/triggers/cart_totaux.inc
Added Paths:
-----------
trunk/catalog/includes/triggers/cart_line_delete.inc
Modified: trunk/catalog/includes/application_bottom.php
===================================================================
--- trunk/catalog/includes/application_bottom.php 2011-12-19 18:07:00 UTC (rev 3979)
+++ trunk/catalog/includes/application_bottom.php 2011-12-19 19:49:17 UTC (rev 3980)
@@ -9,7 +9,6 @@
@encode UTF-8
@brief this file for close core pages
*/
-print_r($_SESSION['navigation']);
//! close session
$page->tep_session_close();
Modified: trunk/catalog/includes/js/shopping_cart.js.php
===================================================================
--- trunk/catalog/includes/js/shopping_cart.js.php 2011-12-19 18:07:00 UTC (rev 3979)
+++ trunk/catalog/includes/js/shopping_cart.js.php 2011-12-19 19:49:17 UTC (rev 3980)
@@ -16,85 +16,116 @@
$(function() {
- $('.CartQty').each(function() {
- var field = $(this);
+ /**
+ @brief delete row
+ */
+ $('.CartQty').each(function() {
+ var field = $(this);
- $(this).prev().click(function() {
- var cartQty = updateQuantity(field, 1);
- var cart_id = field.attr("id");
- var data = cart_id;
- if(texte = file('<?php echo tep_href_link('ajax_exe.php', 'action=cart_line').'&'; ?>cart_id='+escape(data.substring(8))+'&'+'product_qty='+cartQty)){
- update = texte.split('|');
-// var data = cart_id;
- writebox();
- writeqty(update, data.substring(8) );
- }
+ $(this).prev().click(function() {
- });
+ var cartQty = updateQuantity(field, 1);
+ var cart_id = field.attr("id");
+ var data = cart_id;
+ if(texte = file('<?php echo tep_href_link('ajax_exe.php', 'action=cart_line').'&'; ?>cart_id='+escape(data.substring(8))+'&'+'product_qty='+cartQty)){
+ update = texte.split('|');
+ writebox();
+ writeqty(update, data.substring(8) );
+ }
+ });
- $(this).next().click(function() {
- var cartQty = updateQuantity(field, -1);
- var cart_id = field.attr("id");
- var data = cart_id;
- if(texte = file('<?php echo tep_href_link('ajax_exe.php', 'action=cart_line').'&'; ?>cart_id='+escape(data.substring(8))+'&'+'product_qty='+cartQty)){
- update = texte.split('|');
+ $(this).next().click(function() {
- writebox();
- writeqty(update, data.substring(8) );
- }
+ var cartQty = updateQuantity(field, -1);
+ var cart_id = field.attr("id");
+ var data = cart_id;
- });
+ if(texte = file('<?php echo tep_href_link('ajax_exe.php', 'action=cart_line').'&'; ?>cart_id='+escape(data.substring(8))+'&'+'product_qty='+cartQty)){
+ update = texte.split('|');
- });
+ writebox();
+ writeqty(update, data.substring(8) );
+ }
+ });
+
+ });
+
+
+ /**
+ @brief delete row
+ */
+ $('.CartDel').each(function() {
+
+ $(this).change(function() {
+ var field = $(this);
+ var cart_id = field.attr("id");
+ var data = escape(cart_id.substring(8));
+ if(texte = file('<?php echo tep_href_link('ajax_exe.php', 'action=cart_line_delete').'&'; ?>cart_id='+data)){
+ update = texte.split('|');
+ writebox();
+ $('#cart-line-'+data).remove();
+ }
+
+ });
+
+ });
+
+
+
});
+ /*
+ Lib functions
+ */
- function updateQuantity(field, qty) {
- var val = parseFloat(field.val()) + qty;
+function updateQuantity(field, qty) {
- if (val < 0) val = 0;
+ var val = parseFloat(field.val()) + qty;
- field.val(val);
+ if (val < 0) val = 0;
- return val;
- }
+ field.val(val);
+ return val;
+}
- function writebox() {
- if(texte = file('<?php echo tep_href_link('ajax_exe.php', 'action=cart_totaux'); ?>')){
- document.getElementById('TotCart').innerHTML = texte;
- }
- }
+function writebox() {
+ if(texte = file('<?php echo tep_href_link('ajax_exe.php', 'action=cart_totaux'); ?>')){
+ document.getElementById('TotCart').innerHTML = texte;
+ }
- function writeqty(update, cart_id) {
+}
- cartPriceId = 'ajaxcarttext'+cart_id;
- document.getElementById(cartPriceId).innerHTML = update[0];
- cartPriceId = 'ajaxcarttaxe'+cart_id;
- document.getElementById(cartPriceId).innerHTML = update[1];
+function writeqty(update, cart_id) {
- cartPriceId = 'ajaxcartPrice'+cart_id;
- document.getElementById(cartPriceId).innerHTML = update[3];
+ cartPriceId = 'ajaxcarttext'+cart_id;
+ document.getElementById(cartPriceId).innerHTML = update[0];
- }
+ cartPriceId = 'ajaxcarttaxe'+cart_id;
+ document.getElementById(cartPriceId).innerHTML = update[1];
+ cartPriceId = 'ajaxcartPrice'+cart_id;
+ document.getElementById(cartPriceId).innerHTML = update[3];
+}
+
+
</script>
<?php } ?>
\ No newline at end of file
Added: trunk/catalog/includes/triggers/cart_line_delete.inc
===================================================================
--- trunk/catalog/includes/triggers/cart_line_delete.inc (rev 0)
+++ trunk/catalog/includes/triggers/cart_line_delete.inc 2011-12-19 19:49:17 UTC (rev 3980)
@@ -0,0 +1,43 @@
+<?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 20/10/11, 11:13
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+ @brief code is part of execution shopping cart by ajax control
+*/
+
+ $cart_id_get = (int)tep_output_string_protected($_GET['cart_id']);
+ $total_nb_products_with_qty = 0;
+ $products = $cart->get_products();
+
+
+ $line =array();
+ $line['stock'] = '';
+
+
+ $products_box = $cart->get_products();
+ foreach($cart->get_products() as $i=>$products_box)
+ if($cart_id_get == $i)
+ $current = $products_box;
+
+ if(!isset($current) || !is_array($current) )
+ return false;
+
+ $cart->remove($current['id']);
+
+ $products_sum = $currencies->format(tep_round(tep_add_tax($current['final_price'], tep_get_tax_rate($current['tax_class_id'])),$currencies->currencies[DEFAULT_CURRENCY]['decimal_places']) *$product_qty_get );
+
+ $line['stock'] = 0;
+
+ $line['tot_ht'] = $currencies->format($proud_ht);
+ $line['tot_ttc'] = $currencies->format($products_sum);
+
+ $line['tot_taxe'] = $currencies->format( $products_sum - $proud_ht );
+
+
+ echo implode('|',$line);
+?>
\ No newline at end of file
Modified: trunk/catalog/includes/triggers/cart_totaux.inc
===================================================================
--- trunk/catalog/includes/triggers/cart_totaux.inc 2011-12-19 18:07:00 UTC (rev 3979)
+++ trunk/catalog/includes/triggers/cart_totaux.inc 2011-12-19 19:49:17 UTC (rev 3980)
@@ -10,16 +10,15 @@
@brief code is part of execution shopping cart by ajax control
*/
-
global $cart;
if (is_object($cart) && $cart->count_contents() > 0) {
foreach($cart->show_list_total() as $i=>$tot) {
- $det .= '<li>'. sprintf('<span>%s </span> %s' ,$tot->text, $currencies->format($tot->value)) .'</li>' ;
+ $det .= '<li>'. sprintf('<span class="text">%s </span> <span class="value">%s</span>' ,$tot->text, $currencies->format($tot->value)) .'</li>' ;
}
- $det .= '<li><span>'.__('box shopping cart weight').'</span> '.$cart->show_weight().' '.UNIT_WEIGHT_NAME.'</a></li>'."\n";
+ $det .= '<li><span class="text">'.__('box shopping cart weight').'</span> <span class="value">'.$cart->show_weight().' '.UNIT_WEIGHT_NAME.'</span></li>'."\n";
}
Modified: trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/content/shopping_cart.php
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/content/shopping_cart.php 2011-12-19 18:07:00 UTC (rev 3979)
+++ trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/content/shopping_cart.php 2011-12-19 19:49:17 UTC (rev 3980)
@@ -26,14 +26,15 @@
<?php if ($cart->count_contents() > 0): ?>
<table class="invoice invoiceDetails" cellspacing="0" >
- <tr>
- <th class="cart-header desc tleft"><?php echo TABLE_HEADING_PRODUCTS; ?></th>
- <th class="cart-header puht tcenter"><?php echo HEADING_PRODUCTS_PRICE_U; ?></th>
- <th class="cart-header qty tcenter"><?php echo HEADING_PRODUCTS_QTY; ?></th>
- <th class="cart-header taxe tcenter"><?php echo HEADING_PRODUCTS_TAXE; ?></th>
- <th class="cart-header tottaxe tright"><?php echo HEADING_PRODUCTS_TOT_TAXE ?></th>
- <th class="cart-header totttc tright"><?php echo HEADING_PRODUCTS_TOT_TTC; ?></th>
- </tr>
+ <tr>
+ <th class="cart-header desc tleft"><?php echo TABLE_HEADING_PRODUCTS; ?></th>
+ <th class="cart-header puht tcenter"><?php echo HEADING_PRODUCTS_PRICE_U; ?></th>
+ <th class="cart-header qty tcenter"><?php echo HEADING_PRODUCTS_QTY; ?></th>
+ <th class="cart-header taxe tcenter"><?php echo HEADING_PRODUCTS_TAXE; ?></th>
+ <th class="cart-header tottaxe tright"><?php echo HEADING_PRODUCTS_TOT_TAXE ?></th>
+ <th class="cart-header totttc tright"><?php echo HEADING_PRODUCTS_TOT_TTC; ?></th>
+ <th class="cart-header tright"> </th>
+ </tr>
@@ -41,29 +42,31 @@
<?php foreach($DCart->products as $i=>$product): ?>
- <tr class="cart-line <?php echo ($i%2)?'pair':'impair'; ?>">
- <td class="cart-line desc">
- <?php echo $product['name'] ;?><span id="ajaxcarttext<?php echo $i; ?>"><?php echo $product['alert_stock'] ;?></span>
- </td>
- <td class="cart-line puht tcenter">
- <?php echo $currencies->format($product['price']) ;?>
- </td>
- <td class="cart-line qty tcenter">
- <input class="Bt button cart-line" type="button" value="+" >
- <?php echo tep_draw_input_field('cart_quantity[]','cartQty_'.$i, $product['quantity'], 'class="CartQty" ');?>
- <input class="Bt button cart-line" type="button" value="-" >
-
- <?php echo tep_draw_hidden_field('products_id[]', $product['id']) ; ?>
- </td>
- <td class="cart-line taxe tcenter">
- <?php echo tep_get_tax_rate($product['tax_class_id']) ;?> </span>
- </td>
- <td class="cart-line tottaxe tright">
- <span id="ajaxcarttaxe<?php echo $i; ?>" class="cartPrice"> <?php echo$currencies->format( ($product['final_price_ttc'] - $product['final_price']) ) ;?> </span>
- </td>
- <td class="cart-line totttc tright">
- <span id="ajaxcartPrice<?php echo $i; ?>" class="cartPrice"> <?php echo $currencies->format(tep_add_tax($product['final_price'], tep_get_tax_rate($product['tax_class_id'])) *$product['quantity'] ) ;?> </span>
- </td>
+ <tr id="cart-line-<?php echo $i; ?>" class="cart-line <?php echo ($i%2)?'pair':'impair'; ?>">
+ <td class="cart-line desc">
+ <?php echo $product['name'] ;?><span id="ajaxcarttext<?php echo $i; ?>"><?php echo $product['alert_stock'] ;?></span>
+ </td>
+ <td class="cart-line puht tcenter">
+ <?php echo $currencies->format($product['price']) ;?>
+ </td>
+ <td class="cart-line qty tcenter">
+ <input class="Bt button cart-line" type="button" value="+" >
+ <?php echo tep_draw_input_field('cart_quantity[]','cartQty_'.$i, $product['quantity'], 'class="CartQty" ');?>
+ <input class="Bt button cart-line" type="button" value="-" >
+ <?php echo tep_draw_hidden_field('products_id[]', $product['id']) ; ?>
+ </td>
+ <td class="cart-line taxe tcenter">
+ <?php echo tep_get_tax_rate($product['tax_class_id']) ;?> </span>
+ </td>
+ <td class="cart-line tottaxe tright">
+ <span id="ajaxcarttaxe<?php echo $i; ?>" class="cartPrice"> <?php echo$currencies->format( ($product['final_price_ttc'] - $product['final_price']) ) ;?> </span>
+ </td>
+ <td class="cart-line totttc tright">
+ <span id="ajaxcartPrice<?php echo $i; ?>" class="cartPrice"> <?php echo $currencies->format(tep_add_tax($product['final_price'], tep_get_tax_rate($product['tax_class_id'])) *$product['quantity'] ) ;?> </span>
+ </td>
+ <td class="cart-line tcenter">
+ <span id="ajaxcartdel<?php echo $i; ?>"> <?php echo tep_draw_checkbox_field('cart_delete['.$i.']','CartDel_'.$i, $i, false, 'class="CartDel" ');?> </span>
+ </td>
</tr>
@@ -79,7 +82,7 @@
<div class="SubTotal">
<ul id="TotCart">
<?php foreach($cart->show_list_total() as $i=>$tot): ?>
- <li><?php printf('<span>%s </span><span class="value"> %s </span>' ,$tot->text, $currencies->format($tot->value)); ?></li>
+ <li><?php printf('<span class="text">%s </span><span class="value"> %s </span>' ,$tot->text, $currencies->format($tot->value)); ?></li>
<?php endforeach; ?>
<?php if($cart->get_content_type() !='virtual'): ?>
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-19 18:07:00 UTC (rev 3979)
+++ trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/triggers/cart_totaux.inc 2011-12-19 19:49:17 UTC (rev 3980)
@@ -14,7 +14,7 @@
if (is_object($cart) && $cart->count_contents() > 0) {
foreach($cart->show_list_total() as $i=>$tot) {
- $det .= '<li>'. sprintf('<span>%s </span> <span class="value">%s</span>' ,$tot->text, $currencies->format($tot->value)) .'</li>' ;
+ $det .= '<li>'. sprintf('<span class="text">%s </span> <span class="value">%s</span>' ,$tot->text, $currencies->format($tot->value)) .'</li>' ;
}
$det .= '<li><span class="text">'.__('box shopping cart weight').'</span> <span class="value">'.$cart->show_weight().' '.UNIT_WEIGHT_NAME.'</span></li>'."\n";
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2011-12-19 18:07:11
|
Revision: 3979
http://oscss.svn.sourceforge.net/oscss/?rev=3979&view=rev
Author: oscim
Date: 2011-12-19 18:07:00 +0000 (Mon, 19 Dec 2011)
Log Message:
-----------
coquille php
Modified Paths:
--------------
trunk/catalog/includes/classes/navigation_history.php
Modified: trunk/catalog/includes/classes/navigation_history.php
===================================================================
--- trunk/catalog/includes/classes/navigation_history.php 2011-12-19 18:03:30 UTC (rev 3978)
+++ trunk/catalog/includes/classes/navigation_history.php 2011-12-19 18:07:00 UTC (rev 3979)
@@ -142,7 +142,7 @@
@return value path link or false
*/
public function GetBack($pos = 2) {
- if(count($navigation->snapshot) > 0)
+ if(count($this->snapshot) > 0)
return $this->get_snapshot();
else {
$back = (int) sizeof($this->path)-$pos;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2011-12-19 18:03:37
|
Revision: 3978
http://oscss.svn.sourceforge.net/oscss/?rev=3978&view=rev
Author: oscim
Date: 2011-12-19 18:03:30 +0000 (Mon, 19 Dec 2011)
Log Message:
-----------
Refonte partielle de la class de gestion de l'historique de navigation et debug erreur lors du renvoi vers la page login
Simplification via l'utilisation des pre-calcul de class SEO
mise a niveau des fichier associ?\195?\169
Modified Paths:
--------------
trunk/catalog/checkout_shipping.php
trunk/catalog/common/classes/seo_url.php
trunk/catalog/create_account.php
trunk/catalog/document.php
trunk/catalog/iframe.php
trunk/catalog/includes/application_bottom.php
trunk/catalog/includes/application_top.php
trunk/catalog/includes/classes/navigation_history.php
trunk/catalog/includes/classes/page.php
trunk/catalog/includes/content/shopping_cart.php
trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/content/shopping_cart.php
trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/gabarit/address_book.form_edit.gab
trunk/catalog/login.php
trunk/catalog/popup_image.php
Modified: trunk/catalog/checkout_shipping.php
===================================================================
--- trunk/catalog/checkout_shipping.php 2011-12-19 12:45:41 UTC (rev 3977)
+++ trunk/catalog/checkout_shipping.php 2011-12-19 18:03:30 UTC (rev 3978)
@@ -1,18 +1,17 @@
<?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 31/10/10, 22:59
- *\author oscim <mail aur...@os...> <www http://www.oscim.fr>
- *\encode UTF-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.1
+ @date 18/12/11, 21:44
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
*\file
*\brief page display choose shipping method
*/
require('includes/application_top.php');
-// require('includes/classes/http_client.php');
$page->init(basename(__FILE__),$language);
$page->is_registered();
Modified: trunk/catalog/common/classes/seo_url.php
===================================================================
--- trunk/catalog/common/classes/seo_url.php 2011-12-19 12:45:41 UTC (rev 3977)
+++ trunk/catalog/common/classes/seo_url.php 2011-12-19 18:03:30 UTC (rev 3978)
@@ -361,15 +361,18 @@
$separator = '?';
self::$htexe = true;
- $this->parse_parameters($page, $parameters ,$connection , $separator);
+ $url = $this->parse_parameters($page, $parameters ,$connection , $separator);
- if ($connection == 'NONSSL') $link = HTTP_SERVER . DIR_WS_HTTP_CATALOG;
+ if ($connection == 'NONSSL') $link = DIR_WS_HTTP_CATALOG;
elseif ($connection == 'SSL') {
- if (_cst_bool('ENABLE_SSL')) $link = HTTPS_SERVER . DIR_WS_HTTPS_CATALOG;
- else $link = HTTP_SERVER . DIR_WS_HTTP_CATALOG;
+ if (_cst_bool('ENABLE_SSL')) $link = DIR_WS_HTTPS_CATALOG;
+ else $link = DIR_WS_HTTP_CATALOG;
}
else die('</td></tr></table></td></tr></table><br /><br /><font color="#ff0000"><strong>Error!</strong></font><br /><br /><strong>Unable to determine connection method on a link!<br /><br />Known methods: NONSSL SSL</strong><br /><br />');
+
$this->header_tag['canonical'] = $link . $page .(empty($this->header_tag['canonical'])? '' : '?'. $this->header_tag['canonical'] );
+ $this->header_tag['url'] = $link .$url;
+
self::$htexe = false;
}
Modified: trunk/catalog/create_account.php
===================================================================
--- trunk/catalog/create_account.php 2011-12-19 12:45:41 UTC (rev 3977)
+++ trunk/catalog/create_account.php 2011-12-19 18:03:30 UTC (rev 3978)
@@ -1,12 +1,12 @@
<?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 09/09/11, 22:33
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-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.1
+ @date 18/12/11, 21:44
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
*\file
*\brief display form creat account and manage confirmed account by email
* depend class customer
@@ -73,12 +73,11 @@
tep_redirect(tep_href_link(FILENAME_CREATE_ACCOUNT, 'action=success', 'SSL'));
}
elseif(isset($_GET['action']) && $_GET['action']=='success') {
- $navigation=navigation_history::getInstance();
- if (sizeof($navigation->snapshot) > 0) {
- $origin_href = tep_href_link($navigation->snapshot['page'], tep_array_to_string($navigation->snapshot['get'], array(tep_session_name())), $navigation->snapshot['mode']);
- $navigation->clear_snapshot();
- }
- else $origin_href = tep_href_link(FILENAME_DEFAULT);
+ $navigation=navigation_history::getInstance();
+ if ( ($snap = $navigation->get_snapshot()) && $snap !=false )
+ $origin_href = $snap;
+ else
+ $origin_href = tep_href_link(FILENAME_DEFAULT);
$page->init('create_account_success.php',$language);
Modified: trunk/catalog/document.php
===================================================================
--- trunk/catalog/document.php 2011-12-19 12:45:41 UTC (rev 3977)
+++ trunk/catalog/document.php 2011-12-19 18:03:30 UTC (rev 3978)
@@ -12,8 +12,6 @@
$page->init(basename(__FILE__),$language);
-// die('toto');
-
switch($_REQUEST['mod']){
Modified: trunk/catalog/iframe.php
===================================================================
--- trunk/catalog/iframe.php 2011-12-19 12:45:41 UTC (rev 3977)
+++ trunk/catalog/iframe.php 2011-12-19 18:03:30 UTC (rev 3978)
@@ -1,47 +1,27 @@
<?php
-/*
- $Id: popup_image.php,v 1.5 02.09.2009 21:47:46 oscim Exp $
-// kate: replace-trailing-space-save true; space-indent on; indent-width 2; mixedindent off; indent-mode cstyle; word-wrap-marker-color #41C2A4
-+-----------------------------------------------------------------------+
-| osCSS Open Source E-commerce |
-+-----------------------------------------------------------------------+
-| Copyright (c) 2005-2009 The osCSS developers |
-| |
-| http://www.oscss.org |
-| |
-| Portions Copyright (c) 2003-2009 osCommerce |
-+-----------------------------------------------------------------------+
-| This source file is subject to version 2.0 of the GPL license, |
-| available at the following url: |
-| http://www.oscss.org/license/2_0.txt. |
-+-----------------------------------------------------------------------+
-
- ENCODE UTF-8
-*/
/**
-* @package oscss-Rv
-* @date 02.09.2009 ACCEPT RV_COMPATIBILITY a ON
- modifie pour RV_COMPATIBILITY
-*/
- require('includes/application_top.php');
- $page->init(basename(__FILE__),$language);
- $navigation->remove_current_page();
+ @ licence GPL *2005-2011 The osCSS developers - os*CSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 24/09/11, 21:44
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+ */
+require('includes/application_top.php');
+$page->init(basename(__FILE__),$language);
+$navigation->remove_current_page();
- if (isset($_GET['products_id'])) {
- //! PRODUCT
- $type='product';
+if (isset($_GET['products_id'])) {
+ //! PRODUCT
+ $type='product';
- $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id, pd.products_viewed from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$_GET['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
+ $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id, pd.products_viewed from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$_GET['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
- /** Control ok products */
- $product_info = tep_db_fetch_array($product_info_query);
+ /** Control ok products */
+ $product_info = tep_db_fetch_array($product_info_query);
- $page->new_class($type,$product_info);
-// $page->new_class('product_portfolio');
-// $page->new_class('customer_is',$customer_id);
-// $module=$page->_call('product','ret_modules');
-
-
+ $page->new_class($type,$product_info);
} else {
//! HOME
$type='home';
@@ -50,30 +30,30 @@
}
$module=$page->_call($type,'ret_modules');
-?>
-<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html <?php echo HTML_PARAMS; ?>>
-<head>
-<title><?php echo STORE_NAME ?></title>
-<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
-<!-- <title><?php echo $products['products_name']; ?></title> -->
-<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
-<script language="javascript" type="text/javascript"><!--
-var i=0;
-var s=0;
-function resize() {
- if (navigator.appName == 'Netscape') i=40;
- if (window.navigator.userAgent.indexOf("rv") != -1) i=-40; //For Firefox
+ ?>
+ <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
+ <html <?php echo HTML_PARAMS; ?>>
+ <head>
+ <title><?php echo STORE_NAME ?></title>
+ <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
+ <!-- <title><?php echo $products['products_name']; ?></title> -->
+ <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
+ <script language="javascript" type="text/javascript"><!--
+ var i=0;
+ var s=0;
+ function resize() {
+ if (navigator.appName == 'Netscape') i=40;
+ if (window.navigator.userAgent.indexOf("rv") != -1) i=-40; //For Firefox
if (window.navigator.userAgent.indexOf("SV1") != -1) s=50; //This browser is Internet Explorer in SP2.
if (document.images[0]) window.resizeTo(document.images[0].width +30+s/2, document.images[0].height+60-i+s);
- self.focus();
-}
-//-->
-</script>
-<?php echo $page->_call($type,'get_header_js',@$_GET['action']); //$module->get_header_js(); ?>
-</head>
-<body onload="resize();">
- <?php $module['portfolio']->$_GET['method'](); //draw_list('son'); ?>
-</body>
-</html>
-<?php require('includes/application_bottom.php'); ?>
\ No newline at end of file
+ self.focus();
+ }
+ //-->
+ </script>
+ <?php echo $page->_call($type,'get_header_js',@$_GET['action']); //$module->get_header_js(); ?>
+ </head>
+ <body onload="resize();">
+ <?php $module['portfolio']->$_GET['method'](); //draw_list('son'); ?>
+ </body>
+ </html>
+ <?php require('includes/application_bottom.php'); ?>
\ No newline at end of file
Modified: trunk/catalog/includes/application_bottom.php
===================================================================
--- trunk/catalog/includes/application_bottom.php 2011-12-19 12:45:41 UTC (rev 3977)
+++ trunk/catalog/includes/application_bottom.php 2011-12-19 18:03:30 UTC (rev 3978)
@@ -1,14 +1,15 @@
<?php
/**
- @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
- @portion code Copyright (c) 2002 osCommerce
- @package osCSS-2 <www http://www.oscss.org>
- @version 2.1.0
- @date 12/02/11, 15:02
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-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.1
+ @date 18/12/11, 21:44
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
@brief this file for close core pages
*/
+print_r($_SESSION['navigation']);
//! close session
$page->tep_session_close();
Modified: trunk/catalog/includes/application_top.php
===================================================================
--- trunk/catalog/includes/application_top.php 2011-12-19 12:45:41 UTC (rev 3977)
+++ trunk/catalog/includes/application_top.php 2011-12-19 18:03:30 UTC (rev 3978)
@@ -1,12 +1,12 @@
<?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 12/10/11, 13:43
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-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.1
+ @date 18/12/11, 21:44
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
*\file application_top.php
*
*/
@@ -352,8 +352,8 @@
tep_session_register('navigation');
$navigation = $page->return_object('navigation_history');
}
- $page->navigation_history->add_current_page();
+
/// Shopping cart actions
if (isset($_GET['action'])) {
/// redirect the customer to a friendly cookie-must-be-enabled page if cookies are disabled
Modified: trunk/catalog/includes/classes/navigation_history.php
===================================================================
--- trunk/catalog/includes/classes/navigation_history.php 2011-12-19 12:45:41 UTC (rev 3977)
+++ trunk/catalog/includes/classes/navigation_history.php 2011-12-19 18:03:30 UTC (rev 3978)
@@ -1,12 +1,12 @@
<?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 29/03/11, 10:10
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-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.1
+ @date 18/12/11, 21:44
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
\class navigation_history
\dir includes/classes/
@@ -15,12 +15,20 @@
class navigation_history {
/**
+ @var Max stock page
+ */
+ const MAX_NAVSESSION = 5;
+ /**
@var array
*/
- public $path;
+ private $path = array();
/**
@var array
*/
+ private $NoDbl = array();
+ /**
+ @var array
+ */
public $snapshot;
/**
@var object current instance
@@ -30,28 +38,48 @@
@var string current page by REQUEST_URI
*/
private static $_Page;
+ /**
+ @var current pos
+ */
+ private static $_id;
+ /**
+ @fn __construct()
+ @brief constructor
+ */
protected function __construct() {
if (tep_session_is_registered('navigation')){
$this->path = $_SESSION['navigation']->path;
$this->snapshot = $_SESSION['navigation']->snapshot;
+
+ if(sizeof($this->path) > self::MAX_NAVSESSION ){
+ $this->path = array_slice($this->path , (sizeof($this->path) - self::MAX_NAVSESSION ), self::MAX_NAVSESSION );
+ self::$_id = self::MAX_NAVSESSION ;
+ }
+
+ if(is_array($this->path))
+ foreach($this->path as $k=>$row)
+ $this->NoDbl[$k] =$row['link'] ;
}
- else $this->reset();
+ else
+ $this->reset();
+
+ self::$_id = sizeof($this->path);
}
+ /**
+ @fn getInstance()
+ @brief public call instance
+ @return instance
+ */
public static function getInstance() {
- if(self::$_instance == null) {
+ if(self::$_instance == null)
self::$_instance = new self();
- }
+
return self::$_instance;
}
- public static function resetInstance() {
- self::$_instance = null;
- return self::getInstance();
- }
-
/**
@fn $object->set_close();
@brief call by close session page. save snapshot
@@ -63,54 +91,44 @@
}
}
+ /**
+ @fn reset()
+ */
public function reset() {
$this->path = array();
$this->snapshot = array();
}
- public function add_current_page() {
+ /**
+ @brief Add current page
+ Check if page is not action page and not reload
+ */
+ public function add_current_page($page, $array) {
global $_GET, $_POST, $request_type, $cPath;
- $set = true;
- for ($i=0, $n=sizeof($this->path); $i<$n; $i++) {
- if ( ($this->path[$i]['page'] == self::cleanPage() ) ) {
- if (isset($cPath)) {
- if (!isset($this->path[$i]['get']['cPath'])) {
- continue;
- } else {
- if ($this->path[$i]['get']['cPath'] == $cPath) {
- array_splice($this->path, ($i+1));
- $set = false;
- break;
- } else {
- $old_cPath = explode('_', $this->path[$i]['get']['cPath']);
- $new_cPath = explode('_', $cPath);
+ if(
+ ( $array['url'] == $this->NoDbl[(self::$_id-1)] )
+ || in_array(trim($page), array('document.php', 'ajax_exe.php', '404.php'))
+ || isset($_REQUEST['action'])
+ || isset($_REQUEST['cache'])
+ )
+ return;
- for ($j=0, $n2=sizeof($old_cPath); $j<$n2; $j++) {
- if ($old_cPath[$j] != $new_cPath[$j]) {
- array_splice($this->path, ($i));
- $set = true;
- break 2;
- }
- }
- }
- }
- } else {
- array_splice($this->path, ($i));
- $set = true;
- break;
- }
- }
- }
+ $current = array('title' => $array['title'],
+ 'page' => $page,
+ 'mode' => $request_type,
+ 'link' => $array['url'],
+ 'get' => $_GET,
+ 'post' => $_POST
+ );
- if ((bool)$set) {
- $this->path[] = array('page' => self::cleanPage(),
- 'mode' => $request_type,
- 'get' => $_GET,
- 'post' => $_POST);
- }
+ $this->path[self::$_id] = $current;
+ $this->NoDbl[self::$_id] = $array['url'];
}
+ /**
+ @brief Remove current page
+ */
public function remove_current_page() {
$last_entry_position = sizeof($this->path) - 1;
if ($this->path[$last_entry_position]['page'] == self::cleanPage() ) {
@@ -118,31 +136,47 @@
}
}
- public function set_snapshot($page = '') {
- global $_GET, $_POST, $request_type;
+ /**
+ @brief Remove current page
+ @param $pos integer pos return value
+ @return value path link or false
+ */
+ public function GetBack($pos = 2) {
+ if(count($navigation->snapshot) > 0)
+ return $this->get_snapshot();
+ else {
+ $back = (int) sizeof($this->path)-$pos;
- if (is_array($page)) {
- $this->snapshot = array('page' => $page['page'],
- 'mode' => $page['mode'],
- 'get' => $page['get'],
- 'post' => $page['post']);
- } else {
- $this->snapshot = array('page' => self::cleanPage(),
- 'mode' => $request_type,
- 'get' => $_GET,
- 'post' => $_POST);
- }
- }
+ if (isset($this->path[$back]))
+ return $this->path[$back]['link'];
+ else
+ return tep_href_link();
+ }
- public function clear_snapshot() {
- $this->snapshot = array();
+ return false;
+ }
+
+ /**
+ @fn set_snapshot()
+ @brief Capture current snapshot
+ */
+ public function set_snapshot() {
+ $this->snapshot = $this->path[sizeof($this->path)-1];
}
/**
+ @fn get_snapshot()
@brief call content snapshot
+ @return value path link or false
*/
public function get_snapshot(){
- return $this->snapshot;
+ if(isset($this->snapshot['link']) ){
+ $url = $this->snapshot['link'];
+ $this->snapshot = array();
+ return $url;
+ }
+
+ return false;
}
public function set_path_as_snapshot($history = 0) {
@@ -161,36 +195,5 @@
}
- function unserialize($broken) {
- for(reset($broken);$kv=each($broken);) {
- $key=$kv['key'];
- if (gettype($this->$key)!="user function")
- $this->$key=$kv['value'];
- }
- }
-
-// public function debug() {
-// for ($i=0, $n=sizeof($this->path); $i<$n; $i++) {
-// echo $this->path[$i]['page'] . '?';
-// while (list($key, $value) = each($this->path[$i]['get'])) {
-// echo $key . '=' . $value . '&';
-// }
-// if (sizeof($this->path[$i]['post']) > 0) {
-// echo '<br />';
-// while (list($key, $value) = each($this->path[$i]['post'])) {
-// echo ' <strong>' . $key . '=' . $value . '</strong><br />';
-// }
-// }
-// echo '<br />';
-// }
-//
-// if (sizeof($this->snapshot) > 0) {
-// echo '<br /><br />';
-//
-// echo $this->snapshot['mode'] . ' ' . $this->snapshot['page'] . '?' . tep_array_to_string($this->snapshot['get'], array(tep_session_name())) . '<br />';
-// }
-// }
-
-
}
?>
Modified: trunk/catalog/includes/classes/page.php
===================================================================
--- trunk/catalog/includes/classes/page.php 2011-12-19 12:45:41 UTC (rev 3977)
+++ trunk/catalog/includes/classes/page.php 2011-12-19 18:03:30 UTC (rev 3978)
@@ -1,12 +1,12 @@
<?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 06/12/11, 10:44
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-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.1
+ @date 18/12/11, 21:44
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
\class page
\file
\dir includes/classes/
@@ -422,6 +422,7 @@
$meta['description']=HEAD_DESC_TAG_ALL;
$meta['keywords']=HEAD_KEY_TAG_ALL;
$meta['canonical']=$here;
+ $meta['path']=$here;
}
if(count($meta)<=3)
@@ -432,6 +433,8 @@
$this->page['seo_url']['result'] = $this->page['meta'];
$this->page['seo_url']['path'] = $here;
$this->page['seo_url']['query_string'] = $_SERVER['QUERY_STRING'];
+
+ $this->navigation_history->add_current_page( $here, $meta );
}
@@ -847,7 +850,7 @@
*/
public function is_registered(){
if (!tep_session_is_registered('customer_id')) {
-// $this->navigation_history->set_snapshot();
+ $this->navigation_history->set_snapshot();
tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
}
}
Modified: trunk/catalog/includes/content/shopping_cart.php
===================================================================
--- trunk/catalog/includes/content/shopping_cart.php 2011-12-19 12:45:41 UTC (rev 3977)
+++ trunk/catalog/includes/content/shopping_cart.php 2011-12-19 18:03:30 UTC (rev 3978)
@@ -1,12 +1,12 @@
<?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 20/10/11, 11:14
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-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.1
+ @date 18/12/11, 21:44
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
*/
$page->add_var_page('SMALL_IMAGE_WIDTH_CART', '30');
$page->add_var_page('SMALL_IMAGE_HEIGHT_CART', '30');
@@ -106,10 +106,7 @@
<?php echo '<a class="Bt navBt link" href="' . tep_href_link(FILENAME_SHOPPING_CART, 'action=resetCart') . '">' . IMAGE_BUTTON_RESET_CART . '</a>'; ?>
<input class="Bt navBt submit" type="submit" value="<?php echo IMAGE_BUTTON_UPDATE_CART; ?>" />
- <?php
- $back = sizeof($navigation->path)-2;
- if (isset($navigation->path[$back])) echo '<a class="Bt navBt link" href="' . tep_href_link($navigation->path[$back]['page'], tep_array_to_string($navigation->path[$back]['get'], array('action')), $navigation->path[$back]['mode']) . '">' . IMAGE_BUTTON_CONTINUE_SHOPPING . '</a>';
- else echo '<a class="Bt navBt link" href="javascript:history.go(-1)">' . IMAGE_BUTTON_BACK . '</a>'; ?>
+ <?php echo '<a class="Bt navBt link" href="' . $navigation->GetBack() . '">' . IMAGE_BUTTON_CONTINUE_SHOPPING . '</a>'; ?>
<?php echo '<a class="Bt navBt link" href="' . tep_href_link('checkout.php'/*FILENAME_CHECKOUT_SHIPPING*/, 'step=init', 'SSL') . '">' . IMAGE_BUTTON_CHECKOUT . '</a>'; ?>
</div>
Modified: trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/content/shopping_cart.php
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/content/shopping_cart.php 2011-12-19 12:45:41 UTC (rev 3977)
+++ trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/content/shopping_cart.php 2011-12-19 18:03:30 UTC (rev 3978)
@@ -1,22 +1,24 @@
<?php
/**
- @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
- @subpackage 2cShopHtml5Oscim
- @package osCSS-2 <www http://www.oscss.org>
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @date 16/09/10, 21:54
- @encode UTF-8
+ @ 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 18/12/11, 21:44
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
*/
$page->add_var_page('SMALL_IMAGE_WIDTH_CART', '30');
$page->add_var_page('SMALL_IMAGE_HEIGHT_CART', '30');
//! chargement cart fonction d'affichage
$DCart=$cart->init_draw();
+
?>
<div id="shoppingCart">
<?php $boxe =$page->oscss_boxes->_return('checkout_progressbar'); ?>
- <?php if($boxe)echo unhtmlentities($boxe->content) ?>
+ <?php if($boxe)echo unhtmlentities($boxe->content) ?>
<?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_SHOPPING_CART, 'action=update_product')); ?>
@@ -105,10 +107,7 @@
<?php echo '<a class="Bt navBt link" href="' . tep_href_link(FILENAME_SHOPPING_CART, 'action=resetCart') . '">' . IMAGE_BUTTON_RESET_CART . '</a>'; ?>
<input class="Bt navBt submit" type="submit" value="<?php echo IMAGE_BUTTON_UPDATE_CART; ?>" />
- <?php
- $back = sizeof($navigation->path)-2;
- if (isset($navigation->path[$back])) echo '<a class="Bt navBt link" href="' . tep_href_link($navigation->path[$back]['page'], tep_array_to_string($navigation->path[$back]['get'], array('action')), $navigation->path[$back]['mode']) . '">' . IMAGE_BUTTON_CONTINUE_SHOPPING . '</a>';
- else echo '<a class="Bt navBt link" href="javascript:history.go(-1)">' . IMAGE_BUTTON_BACK . '</a>'; ?>
+ <?php echo '<a class="Bt navBt link" href="' . $navigation->GetBack() . '">' . IMAGE_BUTTON_CONTINUE_SHOPPING . '</a>'; ?>
<?php echo '<a class="Bt navBt link" href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . IMAGE_BUTTON_CHECKOUT . '</a>'; ?>
</div>
Modified: trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/gabarit/address_book.form_edit.gab
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/gabarit/address_book.form_edit.gab 2011-12-19 12:45:41 UTC (rev 3977)
+++ trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/gabarit/address_book.form_edit.gab 2011-12-19 18:03:30 UTC (rev 3978)
@@ -30,17 +30,11 @@
<input class="submitBt" id="send" type="submit" value="<?php echo IMAGE_BUTTON_UPDATE; ?>" />
</div>
- <?php } else {
- if (sizeof($navigation->snapshot) > 0) {
- $back_link = tep_href_link($navigation->snapshot['page'], tep_array_to_string($navigation->snapshot['get'], array(tep_session_name())), $navigation->snapshot['mode']);
- } else {
- $back_link = tep_href_link(FILENAME_ACCOUNT, 'aca_mod=address_book&aca_type=account&aca_action=display_view', 'SSL');
- }
- ?>
+ <?php } else { ?>
<div class="navBt">
<?php echo tep_draw_hidden_field('action', 'process') ;?>
<input type="submit" class="submitBt" value="<?php echo IMAGE_BUTTON_CONTINUE; ?>" />
- <?php echo '<a class="navBt" href="' . $back_link . '">' .IMAGE_BUTTON_BACK . '</a>'; ?>
+ <?php echo '<a class="navBt" href="' . tep_href_link(FILENAME_ACCOUNT, 'aca_mod=address_book&aca_type=account&aca_action=display_view', 'SSL') . '">' .IMAGE_BUTTON_BACK . '</a>'; ?>
</div>
<?php } ?>
Modified: trunk/catalog/login.php
===================================================================
--- trunk/catalog/login.php 2011-12-19 12:45:41 UTC (rev 3977)
+++ trunk/catalog/login.php 2011-12-19 18:03:30 UTC (rev 3978)
@@ -1,12 +1,12 @@
<?php
/**
- @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
- @portion code Copyright (c) 2002 osCommerce
- @package osCSS-2 <www http://www.oscss.org>
- @version 2.1.1
- @date 24/09/11, 21:44
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-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.1
+ @date 18/12/11, 21:44
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
*\brief Page de login
*/
require('includes/application_top.php');
@@ -42,33 +42,27 @@
if(!isset($_POST['email_address'])) throw new Exception(TEXT_LOGIN_ERROR );
if(!isset($_POST['password'])) throw new Exception(TEXT_LOGIN_ERROR );
- $cust=customer::getInstance();
+ $cust=customer::getInstance();
- if (!$cust->userTestNotExist($email_address)) throw new Exception(TEXT_LOGIN_ERROR_USER_NOT_EXITS );
- $customers_id=$cust->CheckMailAndPass($password, $email_address);
+ if (!$cust->userTestNotExist($email_address)) throw new Exception(TEXT_LOGIN_ERROR_USER_NOT_EXITS );
+ $customers_id=$cust->CheckMailAndPass($password, $email_address);
- if( $customers_id ===false) throw new Exception(TEXT_LOGIN_ERROR );
+ if( $customers_id ===false) throw new Exception(TEXT_LOGIN_ERROR );
- $user=$cust->the_customer($customers_id);
+ $user=$cust->the_customer($customers_id);
- if($user['customers_status'] ==2) throw new Exception( sprintf(TEXT_LOGIN_ERROR_ACCOUNT_NOT_CONFIRMED, '<br /><a href="'.tep_href_link(FILENAME_CREATE_ACCOUNT,'action=newconfirm').'">'.TEXT_NEW_SENT_CONFIRM.'</a>') );
-// $page->messageStack->add('login', sprintf(TEXT_LOGIN_ERROR_ACCOUNT_NOT_CONFIRMED, '<br /><a href="'.tep_href_link(FILENAME_CREATE_ACCOUNT,'action=newconfirm').'">'.TEXT_NEW_SENT_CONFIRM.'</a>') );
- else {
+ if($user['customers_status'] ==2)
+ throw new Exception( sprintf(TEXT_LOGIN_ERROR_ACCOUNT_NOT_CONFIRMED, '<br /><a href="'.tep_href_link(FILENAME_CREATE_ACCOUNT,'action=newconfirm').'">'.TEXT_NEW_SENT_CONFIRM.'</a>') );
+ else
+ customer::initSession($user);
- customer::initSession($user);
- }
- $navigation=navigation_history::getInstance();
+ $navigation=navigation_history::getInstance();
+ if ( ($snap = $navigation->get_snapshot()) && $snap !=false )
+ tep_redirect($snap);
+ else
+ tep_redirect(tep_href_link(FILENAME_ACCOUNT, '', 'SSL'));
- if (sizeof($navigation->snapshot) > 0) {
- $origin_href = tep_href_link($navigation->snapshot['page'], tep_array_to_string($navigation->snapshot['get'], array(tep_session_name())), $navigation->snapshot['mode']);
- $navigation->clear_snapshot();
- tep_redirect($origin_href);
- }
- else
- tep_redirect(tep_href_link(FILENAME_ACCOUNT, '', 'SSL'));
-
-
}
catch(Exception $e){
$page->messageStack->add('login', $e->getMessage() );
@@ -81,14 +75,12 @@
$page->post_init();
/**
- * @remark
- * Control js validate forms for creat customers
+ @remarks Control js validate forms for creat customers
*/
$page->javascript->add_framework("ext/jquery/jquery.min.js");
$page->javascript->add_script("ext/jquery/jquery.validate.min.js", array('sort'=>30));
/**
- * \remarck
- * Control js check form login
+ @remarks Control js check form login
*/
$page->javascript->add_script(DIR_WS_INCLUDES . 'js/login.js.php');
$page->javascript->add_script(DIR_WS_INCLUDES . 'js/create_account.js.php');
Modified: trunk/catalog/popup_image.php
===================================================================
--- trunk/catalog/popup_image.php 2011-12-19 12:45:41 UTC (rev 3977)
+++ trunk/catalog/popup_image.php 2011-12-19 18:03:30 UTC (rev 3978)
@@ -1,10 +1,10 @@
<?php
/**
- @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
+ @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.0.9
- @date 16/06/10, 08:12
+ @version 2.1.1
+ @date 24/09/11, 21:44
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2011-12-19 12:45:55
|
Revision: 3977
http://oscss.svn.sourceforge.net/oscss/?rev=3977&view=rev
Author: oscim
Date: 2011-12-19 12:45:41 +0000 (Mon, 19 Dec 2011)
Log Message:
-----------
Report meta canonical pre calcul?\195?\169 via seo
Correction htaccess for accept path canonical
Correction php notice
Modified Paths:
--------------
trunk/catalog/common/classes/seo_url.php
trunk/catalog/includes/application_top.php
trunk/catalog/includes/classes/page.php
trunk/catalog/includes/functions/html_output.php
trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Childs_tpl/header.php
trunk/catalog/install/data/templates/appareil_photo/electronix/header.php
trunk/catalog/install/includes/modele/htaccess.txt
Modified: trunk/catalog/common/classes/seo_url.php
===================================================================
--- trunk/catalog/common/classes/seo_url.php 2011-12-19 09:15:27 UTC (rev 3976)
+++ trunk/catalog/common/classes/seo_url.php 2011-12-19 12:45:41 UTC (rev 3977)
@@ -360,9 +360,16 @@
$link = $connection == 'NONSSL' ? self::$base_url : self::$base_url_ssl;
$separator = '?';
self::$htexe = true;
-// var_dump($page, $parameters);
+
$this->parse_parameters($page, $parameters ,$connection , $separator);
-// var_dump($this->header_tag);
+
+ if ($connection == 'NONSSL') $link = HTTP_SERVER . DIR_WS_HTTP_CATALOG;
+ elseif ($connection == 'SSL') {
+ if (_cst_bool('ENABLE_SSL')) $link = HTTPS_SERVER . DIR_WS_HTTPS_CATALOG;
+ else $link = HTTP_SERVER . DIR_WS_HTTP_CATALOG;
+ }
+ else die('</td></tr></table></td></tr></table><br /><br /><font color="#ff0000"><strong>Error!</strong></font><br /><br /><strong>Unable to determine connection method on a link!<br /><br />Known methods: NONSSL SSL</strong><br /><br />');
+ $this->header_tag['canonical'] = $link . $page .(empty($this->header_tag['canonical'])? '' : '?'. $this->header_tag['canonical'] );
self::$htexe = false;
}
@@ -575,7 +582,15 @@
else
$cpath = '';
-// var_dump($anchor_type);
+ if(self::$htexe)
+ $this->header_tag['canonical']= sprintf(
+ $this->reg_mask['no-rewrite'],
+ $anchor_type,
+ $id,
+ $cpath.$string,
+ self::$extention
+ );
+
return sprintf(
$this->reg_mask[self::$SEO_REWRITE_TYPE],
$key,
Modified: trunk/catalog/includes/application_top.php
===================================================================
--- trunk/catalog/includes/application_top.php 2011-12-19 09:15:27 UTC (rev 3976)
+++ trunk/catalog/includes/application_top.php 2011-12-19 12:45:41 UTC (rev 3977)
@@ -238,7 +238,14 @@
if(isset($_GET['admin']) )header("Location: /");
}
}
+ elseif( isset($_GET['admin']) && $_GET['admin'] !=md5($SecuKey)) {
+ tep_session_register('aauth');
+ $aauth = 'yes';
+ // force redirect by not GET
+ if(isset($_GET['admin']) )header("Location: /");
+ }
+
/// include navigation history class
$navigation=navigation_history::getInstance();
$page->add_object('navigation_history',$navigation);
Modified: trunk/catalog/includes/classes/page.php
===================================================================
--- trunk/catalog/includes/classes/page.php 2011-12-19 09:15:27 UTC (rev 3976)
+++ trunk/catalog/includes/classes/page.php 2011-12-19 12:45:41 UTC (rev 3977)
@@ -413,23 +413,15 @@
if (_cst_bool('SEO_ENABLED')){
$seo_urls=seo_url::getInstance($languages_id);
$seo_urls->header_tags($here, $_SERVER['QUERY_STRING']);
-
-
-
- /// meta tags content for html balise
- $meta['title']=(tep_not_null($seo_urls->header_tag['title'])? $seo_urls->header_tag['title'] : (tep_not_null($this->title)? $this->title: STORE_NAME));
- if(tep_not_null($seo_urls->header_tag['desc']))
- $meta['description']=$seo_urls->header_tag['desc'];
-
- if(tep_not_null($seo_urls->header_tag['keywords']))
- $meta['keywords']=$seo_urls->header_tag['keywords'];
-
+ /// meta tags content for html balise
+ $meta=$seo_urls->header_tag;
}
else {
/// meta tags content for html balise
$meta['title']=/*(defined('HEADING_TITLE')? HEADING_TITLE : */ (tep_not_null($this->title)? $this->title: STORE_NAME) /*)*/;
$meta['description']=HEAD_DESC_TAG_ALL;
$meta['keywords']=HEAD_KEY_TAG_ALL;
+ $meta['canonical']=$here;
}
if(count($meta)<=3)
Modified: trunk/catalog/includes/functions/html_output.php
===================================================================
--- trunk/catalog/includes/functions/html_output.php 2011-12-19 09:15:27 UTC (rev 3976)
+++ trunk/catalog/includes/functions/html_output.php 2011-12-19 12:45:41 UTC (rev 3977)
@@ -230,25 +230,14 @@
return $price->print_products_price($product_info['products_id'],$style);
}
-/**
- \fn CanonicalUrl
- \brief canonical tag function -
- \return url
-*/
-function CanonicalUrl() {
- global $request_type;
- $domain = ($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER;
- $string = $_SERVER['REQUEST_URI'];
- $search = '/\&osCsid.*|\?osCsid.*/';
- $replace = '';
- return $domain . preg_replace( $search, $replace, $string );
-}
/**
Fonctions remplacé par des class
=> Retrocompatibilité
*/
+function CanonicalUrl() { global $page; return $page->GetHtmlMeta('canonical'); }
+
function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '',$mode=false) { $img=image_ratio::getInstance(); return $img->tep_image($src, $alt, $width, $height, $parameters,$mode); }
Modified: trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Childs_tpl/header.php
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Childs_tpl/header.php 2011-12-19 09:15:27 UTC (rev 3976)
+++ trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Childs_tpl/header.php 2011-12-19 12:45:41 UTC (rev 3977)
@@ -67,7 +67,7 @@
<link rel="shortcut icon" type="images/x-icon" href="favicon.ico"/>
<link rel="alternate" type="application/rss+xml" title="global" href="<?php echo tep_get_httpdir().'rss.php' ?>" />
- <link rel="canonical" href="<?php echo CanonicalUrl(); ?>" />
+ <link rel="canonical" href="<?php echo $page->GetHtmlMeta('canonical'); ?>" />
</head>
<body id="<?php echo page::oscss_body_id() ; ?>" class="<?php echo 'Type_'.$page->the_type(); ?> <?php echo 'Class_'.$page->the_typeClass('class'); ?>">
Modified: trunk/catalog/install/data/templates/appareil_photo/electronix/header.php
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/electronix/header.php 2011-12-19 09:15:27 UTC (rev 3976)
+++ trunk/catalog/install/data/templates/appareil_photo/electronix/header.php 2011-12-19 12:45:41 UTC (rev 3977)
@@ -49,7 +49,7 @@
$this->draw_file_header(); ?>
<link rel="shortcut icon" type="images/x-icon" href="favicon.ico"/>
<link rel="alternate" type="application/rss+xml" title="global" href="<?php echo tep_get_httpdir().'rss.php' ?>" />
- <link rel="canonical" href="<?php echo CanonicalUrl(); ?>" />
+ <link rel="canonical" href="<?php echo $page->GetHtmlMeta('canonical'); ?>" />
</head>
<body id="<?php echo page::oscss_body_id() ; ?>" class="<?php echo 'Type_'.$page->the_type(); ?> <?php echo 'Class_'.$page->the_typeClass('class'); ?>">
Modified: trunk/catalog/install/includes/modele/htaccess.txt
===================================================================
--- trunk/catalog/install/includes/modele/htaccess.txt 2011-12-19 09:15:27 UTC (rev 3976)
+++ trunk/catalog/install/includes/modele/htaccess.txt 2011-12-19 12:45:41 UTC (rev 3977)
@@ -57,10 +57,14 @@
RewriteBase %WS_DOCUMENT_ROOT%
+ ## Accept Canonical Url or no-rewrite mode
+ RewriteCond %{REQUEST_FILENAME} ^/.*/content.* [OR]
+ RewriteCond %{REQUEST_FILENAME} ^/.*/index_listing.* [OR]
+ RewriteCond %{REQUEST_FILENAME} ^/.*/product_info.* [NC]
+ RewriteRule ^([a-zA-Z_]*)\.(php)$ index.php?%{QUERY_STRING} [L]
-
## Error Document
## Authorization htaccess & htpassword
ErrorDocument 401 %WS_DOCUMENT_ROOT%error/401.html
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2011-12-19 09:15:38
|
Revision: 3976
http://oscss.svn.sourceforge.net/oscss/?rev=3976&view=rev
Author: oscim
Date: 2011-12-19 09:15:27 +0000 (Mon, 19 Dec 2011)
Log Message:
-----------
Correction coquille css theme
Site et fin modification block menu develop , suppression de la var develop , et activation du module uniquement pour l'admin, cf link visiter la boutique , et activation cookieadmin
Ce block ne sera donc actif que pour les administrateurs qui ont activ?\195?\169 la liaison cookie.
Ajout recalcul cache page au blokc develop
Modified Paths:
--------------
trunk/catalog/includes/classes/core_page/develop.php
trunk/catalog/includes/classes/page.php
trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Css/BottomTop.css
trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/cfg/init.php
trunk/catalog/install/data/templates/appareil_photo/electronix/cfg/init.php
Modified: trunk/catalog/includes/classes/core_page/develop.php
===================================================================
--- trunk/catalog/includes/classes/core_page/develop.php 2011-12-19 00:56:52 UTC (rev 3975)
+++ trunk/catalog/includes/classes/core_page/develop.php 2011-12-19 09:15:27 UTC (rev 3976)
@@ -42,7 +42,6 @@
}
$li.='</ul>';
-// print_r($page->oscss_plugins);
/// list all plugins
$p_li='This list load plugins in current page'.
@@ -152,9 +151,12 @@
.'';
+
+
/// PRINT block menu One
print '<div id="develop" class="develop">'.
'<h4>Frontend Develop Menu - <a href="#" onclick="ViewData(\'Help\');return false; " title="view detail">(help)</a></h4>'.
+ ((OSCSS_DEBUG==false)? '<p>Page In cache : <a href="'.tep_href_link(substr($_SERVER['SCRIPT_NAME'],strlen(DIR_WS_CATALOG) ), tep_get_all_get_params(array('cache')).'cache=calcul').'">Recalculer</a></p> ' : '').
'<p> <a href="#" onclick="ViewData(\'NormalInfo\');return false; " title="view detail"> Popup Dev Info </a> '.
'</p>'.
@@ -163,7 +165,7 @@
'<p><span style="font-weight:bold;">Content: <a href="#" title="le contenu principal de la page ne cours">(i)</a></span> <a href="#" title="'.@$page->page['path_content'].'">(i)</a>'.@$page->page['content'].'</p>'.
'<p><span style="font-weight:bold;">Gabarit:</span> '. $page->page['gabarit'].'</p>'.
'<ul>'.
-( ( ($val = $mock->is_count()) >0 )? '<li><a style="color:red" href="#" onclick="ViewData(\'Errors\');return false; " title="View Php Error">php('.$val.')</a></li>' : '' ).
+( ( ( OSCSS_DEBUG==true && $val = $mock->is_count()) >0 )? '<li><a style="color:red" href="#" onclick="ViewData(\'Errors\');return false; " title="View Php Error">php('.$val.')</a></li>' : '' ).
( ( ($val2 = $page->messageStack->size()) >0 )? '<li><a style="color:red" href="#" onclick="ViewData(\'CoreAlert\');return false; " title="View Core Alert">Core('.$val2.')</a></li>' : '' ).
( ( ( count($page->page['seo_url']['result']) )<3 )? '<li><a style="color:red" href="#" onclick="ViewData(\'SEO\');return false; " title="View Core Alert">SEO ('.(3 - count($page->page['seo_url']['result']) ) .')</a></li>' : '' ).
'</ul>'.
@@ -216,7 +218,7 @@
padding:1em;
position:fixed;
right:0;
- top:0;
+ top:0;
font-size:14px;
padding:3px; margin:0;
}
Modified: trunk/catalog/includes/classes/page.php
===================================================================
--- trunk/catalog/includes/classes/page.php 2011-12-19 00:56:52 UTC (rev 3975)
+++ trunk/catalog/includes/classes/page.php 2011-12-19 09:15:27 UTC (rev 3976)
@@ -87,7 +87,6 @@
private function __construct($FileRegistered=array()){
$this->ext='.php';
- $this->page['var']['develop'] ='false';
$this->page['header']['file']=array();
$this->page['footer']['file']=array();
$this->page['modules']=array();
@@ -97,11 +96,17 @@
$this->page['content']=FILENAME_DEFAULT;
$this->page['class']='none';
$this->page['script']='';
+ /**
+ @var log error process for help
+ */
+ $this->page['seo_url']=array();
+
$this->PileFileLang=array();
self::$CacheCalcul=(isset($_GET['cache']) && $_GET['cache']=='calcul')? true :false;
+
/**
base page en cours
*/
@@ -446,11 +451,14 @@
* \note fonction qui doit être appelé dans le application_top
*/
public function pre_init(){
-
-
// set the template
$this->page['template'] = page::oscss_get_template();
+ // force redirect clean url after empty page cache
+ if(self::$CacheCalcul){
+ $quey_string=tep_get_all_get_params(array('cache','page'));
+ tep_redirect( tep_href_link(basename($_SERVER['SCRIPT_NAME']) , ( ( $quey_string !='')? $quey_string : '') ) );
+ }
}
/**
@@ -467,8 +475,7 @@
$this->page['language']=$language;
$this->type_content();
$page=$this;
-// var_dump($p_content);
-// exit;
+
$this->CurrentPageInit($p_content);
/// include start the breadcrumb trail
@@ -992,14 +999,7 @@
$load->lists_file[__FUNCTION__][] = $bar;
self::$load_theme = $load;
- /**
- @remarks specific menu admin for front loggued admin
- */
- if(self::$CookieAdmin)
- echo '<div class="osCSS_Admin" style="position:absolute; right:20px; top:0;">'.
-// '<a href="'.tep_href_link(substr($_SERVER['SCRIPT_NAME'],strlen(DIR_WS_CATALOG) ), tep_get_all_get_params(array('cache')).'cache=calcul').'">Recalculer page</a> '.
- '<a href="'.tep_href_link(substr($_SERVER['SCRIPT_NAME'],strlen(DIR_WS_CATALOG) ), tep_get_all_get_params(array('cache')).'cache=calcul').'">Recalculer page</a> '.
- '</div>';
+
}
@@ -1041,8 +1041,6 @@
$load = self::$load_theme;
- if ($this->page['var']['develop']=='true') $this->develop();
-
$plugins=$this->the_var('plugins');
while($r=each($plugins)){
/**
@@ -1063,6 +1061,12 @@
if(self::TestFile($file)) require_once($file);
self::$load_theme = $load;
+
+ /**
+ @remarks specific menu admin for front loggued admin
+ */
+ if(self::$CookieAdmin && tep_session_is_registered('aauth') )
+ $this->develop();
}
Modified: trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Css/BottomTop.css
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Css/BottomTop.css 2011-12-19 00:56:52 UTC (rev 3975)
+++ trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Css/BottomTop.css 2011-12-19 09:15:27 UTC (rev 3976)
@@ -94,9 +94,9 @@
}
nav ul li a {
- display: block;
- margin-right: 20px;
- width: 100px;
+ display: inline-block;
+ margin-right: 20px;
+ padding: 0 10px;
line-height: 44px;
}
Modified: trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/cfg/init.php
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/cfg/init.php 2011-12-19 00:56:52 UTC (rev 3975)
+++ trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/cfg/init.php 2011-12-19 09:15:27 UTC (rev 3976)
@@ -28,14 +28,6 @@
/**
- @var develop
- commenté par defaut
- affiche le panneau des définitions de pages
-*/
-$this->add_var_page('develop','true');
-
-
-/**
@var PathChildGab Path
Childs html tpl files
*/
Modified: trunk/catalog/install/data/templates/appareil_photo/electronix/cfg/init.php
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/electronix/cfg/init.php 2011-12-19 00:56:52 UTC (rev 3975)
+++ trunk/catalog/install/data/templates/appareil_photo/electronix/cfg/init.php 2011-12-19 09:15:27 UTC (rev 3976)
@@ -15,11 +15,6 @@
Les variable local, de la page application top par exemple, eux ne le sont pas. Tout les appel ici, doit utiliser l'object constructeur
*/
-/**
- commenté par defaut
- affiche le panneau des définitions de pages
-*/
-$this->add_var_page('develop','true');
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2011-12-19 00:57:00
|
Revision: 3975
http://oscss.svn.sourceforge.net/oscss/?rev=3975&view=rev
Author: oscim
Date: 2011-12-19 00:56:52 +0000 (Mon, 19 Dec 2011)
Log Message:
-----------
Dernier ajustement suite nombreuse modification des ces derniers jours
correction coquille notice php
Debug et stabilisation seo
Modified Paths:
--------------
trunk/catalog/common/classes/seo_url.php
trunk/catalog/includes/classes/core_page/overlay/oscss_boxes.php
trunk/catalog/includes/classes/core_page/overlay/oscss_modules.php
trunk/catalog/includes/classes/drivers/data/categorie.php
trunk/catalog/includes/classes/page.php
trunk/catalog/includes/filenames.php
trunk/catalog/index.php
trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/content/shopping_cart.php
Modified: trunk/catalog/common/classes/seo_url.php
===================================================================
--- trunk/catalog/common/classes/seo_url.php 2011-12-18 22:31:37 UTC (rev 3974)
+++ trunk/catalog/common/classes/seo_url.php 2011-12-19 00:56:52 UTC (rev 3975)
@@ -5,7 +5,7 @@
@link http://www.oscommerce-freelancers.com/ osCommerce-Freelancers
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 22/08/2011, 18:17
+ @date 18/12/2011, 18:17
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class seo_url
@@ -338,7 +338,7 @@
$this->performance['TOTAL_TIME'] += $time;
switch($this->attributes['SEO_URLS_USE_W3C_VALID']){
case ('true'):
- if (!isset($_SESSION['customer_id']) && _cst_bool('ENABLE_PAGE_CACHE') && class_exists('page_cache')) return $link;
+ if (!isset($_SESSION['customer_id']) && _cst_bool('ENABLE_PAGE_CACHE')) return $link;
else {
return htmlentities($link);
}
@@ -360,9 +360,9 @@
$link = $connection == 'NONSSL' ? self::$base_url : self::$base_url_ssl;
$separator = '?';
self::$htexe = true;
-
+// var_dump($page, $parameters);
$this->parse_parameters($page, $parameters ,$connection , $separator);
-
+// var_dump($this->header_tag);
self::$htexe = false;
}
@@ -466,16 +466,21 @@
krsort($p);
$container = array();
- // preparation array key/value
- foreach ($p as $index => $valuepair)
+ // preparation array key/value
+ foreach ($p as $index => $valuepair)
if(!empty($valuepair) || $index !=0) {
- $p2 = @explode('=', $valuepair);
+ $p2 = @explode('=', $valuepair);
- $p3[$p2[0]]=$p2[1];
+ if($p2[0] =='d' && substr($p2[1],-3) =='php')
+ $p2[1] = substr($p2[1],0,-4);
+ $p3[$p2[0]]=$p2[1];
+
}
- $check=array_keys($this->reg_anchors);
+ $check=array_values($this->reg_anchors);
+ $check0=array_keys($this->reg_anchors);
+ $arflip = array_flip($this->reg_anchors);
if(count($p3)==0)
if($page ==FILENAME_HOME)
@@ -486,15 +491,23 @@
$url='';
switch ($key){
+
+ case (in_array($key, $check0)):
+ $key = $this->reg_anchors[$key];
case (in_array($key, $check)):
+ $function = 'GetName_'.$key;
- $Rkey=$this->reg_anchors[$key];
- $function = 'GetName_'.$Rkey;
-
if(method_exists($this,$function)) {
- $url = $this->make_url($page, $this->$function($value), $key, $value, $separator);
- $this->ValidateName($url, $Rkey, $value, $connection, $separator);
+ $resultarray = $this->$function($value);
+
+ if(self::$htexe)
+ $this->transph_header_tag($resultarray);
+
+
+ $url = $this->make_url($page, $resultarray['tName'], $arflip[$key], $value, $separator);
+
+ $this->ValidateName($url, $arflip[$key], $value, $connection, $separator);
}
break;
@@ -532,7 +545,7 @@
$separator = '&';
}
}
-
+// var_dump($url);s
return $url;
}
@@ -562,6 +575,7 @@
else
$cpath = '';
+// var_dump($anchor_type);
return sprintf(
$this->reg_mask[self::$SEO_REWRITE_TYPE],
$key,
@@ -619,36 +633,30 @@
* @return string Stripped anchor text
*/
protected function GetName_d($pID){
-// private function get_divers_name($pID){
-
-// var_dump(self::$htexe);
-// exit;
-// var_dump($pID);
-// var_dump(self::$htexe);
switch(true){
case (_test_bool(self::$USE_SEO_CACHE_GLOBAL) && isset($this->cache['DIVERS'][$pID])):
- $this->performance['CACHE_QUERY_SAVINGS']++;
- $result = $this->get_cache_id($pID,'','DIVERS');
-// var_dump(self::$htexe,$result);
- $return = (isset($result['tName'])? $this->strip($result['tName']): $this->strip($pID));
- if(self::$htexe)
- $this->transph_header_tag($result);
+ $this->performance['CACHE_QUERY_SAVINGS']++;
+ $result = $this->get_cache_id($pID,'','DIVERS');
+
+ $result['tName'] = (isset($result['tName'])? $this->strip($result['tName']): $this->strip($pID));
break;
+
default:
- $this->performance['NUMBER_QUERIES']++;
- $sql = "select head_title_tag as tName, head_desc_tag, head_keywords_tag from " . TABLE_FULL_TAG . " ft, " . TABLE_FULL_TAG_DESCRIPTION . " ftd where ft.tag_id=ftd.tag_id and ft.page_type='page' and ft.page_id = '" . basename($pID). "' and ftd.language_id = '" . (int)$this->languages_id. "' Limit 1";
- $query=$this->DB->query( $sql );
- if ($query->__get('numRows')>0) $result =$query->fetchAssoc();
- else $result['tName'] = $this->strip($pID);
- $this->get_cache_id($pID,'','DIVERS');
- $this->performance['QUERIES']['DIVERS'][] = $sql;
+ $this->performance['NUMBER_QUERIES']++;
+ $sql = "select head_title_tag as tName, head_desc_tag, head_keywords_tag from " . TABLE_FULL_TAG . " ft, " . TABLE_FULL_TAG_DESCRIPTION . " ftd where ft.tag_id=ftd.tag_id and ft.page_type='page' and ft.page_id = '" . basename($pID). "' and ftd.language_id = '" . (int)$this->languages_id. "' Limit 1";
+ $query=$this->DB->query( $sql );
- if(self::$htexe)
- $this->transph_header_tag($result);
- $return = $result['tName'];
- break;
+ if ($query->__get('numRows')>0) $result =$query->fetchAssoc();
+ else $result['tName'] = $this->strip($pID);
+
+ $this->get_cache_id($pID,'','DIVERS');
+ $this->performance['QUERIES']['DIVERS'][] = $sql;
+
+ break;
}
- return $return;
+
+
+ return $result;
}
/**
@@ -670,26 +678,25 @@
* @return string Stripped anchor text
*/
private function GetName_l($pID){
-// private function get_links_name($pID){
switch(true){
case (_test_bool(self::$USE_SEO_CACHE_GLOBAL) && isset($this->cache['LINKS'][$pID]) ):
- $this->performance['CACHE_QUERY_SAVINGS']++;
- $result = $this->get_cache_id($pID,'','LINKS');
- $return = (isset($result['tName'])? $this->strip($result['tName']): $this->strip($pID));
- if(self::$htexe) $this->transph_header_tag($result);
+ $this->performance['CACHE_QUERY_SAVINGS']++;
+ $result = $this->get_cache_id($pID,'','LINKS');
+ $result['tName'] = (isset($result['tName'])? $this->strip($result['tName']): $this->strip($pID));
break;
default:
- $this->performance['NUMBER_QUERIES']++;
- $query=$this->DB->query( "select nav_name as tName, l.nav_link_id as ID from " . TABLE_NAVIGATION_LINKS . " l, " . TABLE_NAVIGATION_LINKS_DESCRIPTION . " ld where l.nav_link_id=ld.nav_link_id l.nav_link_id = '" . $pID. "' and ld.language_id = '" . (int)$this->languages_id. "' Limit 1" );
- if ($query->__get('numRows')>0) $result =$query->fetchAssoc();
- else $result['tName'] = $this->strip($pID);
- $this->get_cache_id($pID,'','LINKS');
- $this->performance['QUERIES']['LINKS'][] = $query;
- if(self::$htexe) $this->transph_header_tag($result);
- $return = $result['tName'];
- break;
+ $this->performance['NUMBER_QUERIES']++;
+ $query=$this->DB->query( "select nav_name as tName, l.nav_link_id as ID from " . TABLE_NAVIGATION_LINKS . " l, " . TABLE_NAVIGATION_LINKS_DESCRIPTION . " ld where l.nav_link_id=ld.nav_link_id l.nav_link_id = '" . $pID. "' and ld.language_id = '" . (int)$this->languages_id. "' Limit 1" );
+ if ($query->__get('numRows')>0) $result =$query->fetchAssoc();
+ else $result['tName'] = $this->strip($pID);
+ $this->get_cache_id($pID,'','LINKS');
+ $this->performance['QUERIES']['LINKS'][] = $query;
+
+ break;
}
- return $return;
+
+
+ return $result;
}
@@ -720,7 +727,6 @@
* @return string Stripped anchor text
*/
private function GetName_p($pID){
-// private function get_product_name($pID){
switch(true){
// case (_test_bool(self::$USE_SEO_CACHE_GLOBAL) && isset($this->cache['PRODUCTS'][$pID]) ):
// $this->performance['CACHE_QUERY_SAVINGS']++;
@@ -729,33 +735,34 @@
// if(self::$htexe) $this->transph_header_tag($result);
// break;
default:
- $this->performance['NUMBER_QUERIES']++;
- switch(true){
- case (_test_bool($this->attributes['SEO_ADD_CAT_PARENT'])):
+ $this->performance['NUMBER_QUERIES']++;
+ switch(true){
+ case (_test_bool($this->attributes['SEO_ADD_CAT_PARENT'])):
- $rsql = $this->DB->query("SELECT products_name as tName, categories_name as cName FROM ".TABLE_PRODUCTS_DESCRIPTION." p LEFT JOIN ".TABLE_PRODUCTS_TO_CATEGORIES." cd2 ON p.products_id=cd2.products_id JOIN ".TABLE_CATEGORIES_DESCRIPTION." cd ON cd.categories_id = cd2.categories_id AND cd.language_id='".(int)$this->languages_id."' WHERE p.products_id='".(int)$pID."' AND p.language_id='".(int)$this->languages_id."' LIMIT 1");
- $result = $rsql->fetchAssoc();
- $cName = $result['cName'];
+ $rsql = $this->DB->query("SELECT products_name as tName, categories_name as cName FROM ".TABLE_PRODUCTS_DESCRIPTION." p LEFT JOIN ".TABLE_PRODUCTS_TO_CATEGORIES." cd2 ON p.products_id=cd2.products_id JOIN ".TABLE_CATEGORIES_DESCRIPTION." cd ON cd.categories_id = cd2.categories_id AND cd.language_id='".(int)$this->languages_id."' WHERE p.products_id='".(int)$pID."' AND p.language_id='".(int)$this->languages_id."' LIMIT 1");
+ $result = $rsql->fetchAssoc();
+ $cName = $result['cName'];
- $result['tName']=$result['cName'].'-'.$result['tName'];
- break;
- default:
- $rsql = $this->DB->query("SELECT products_name as tName FROM ".TABLE_PRODUCTS_DESCRIPTION." WHERE products_id='".(int)$pID."' AND language_id='".(int)$this->languages_id."' LIMIT 1");
- $result = $rsql->fetchAssoc();
- $cName = $result['tName'];
- break;
- }
- /*if(!defined('TABLE_FULL_TAG'))*/
- // else $sql = "select head_title_tag as tName, head_desc_tag, head_keywords_tag from " . TABLE_FULL_TAG . " ft, " . TABLE_FULL_TAG_DESCRIPTION . " ftd where ft.tag_id=ftd.tag_id and ft.page_type='product' and ft.page_id = '" . (int)$pID. "' and ftd.language_id = '" . (int)$this->languages_id. "' Limit 1";
-// $result = $this->DB->FetchArray( $this->DB->Query( $sql ) );
- $this->get_cache_id($pID,$result,'PRODUCTS');
- $this->performance['QUERIES']['PRODUCTS'][] = $rsql;
- if(self::$htexe) $this->transph_header_tag($result);
- $return = $this->strip( $result['tName'] );
- break;
+ $result['tName']=$result['cName'].'-'.$result['tName'];
+ break;
+ default:
+ $rsql = $this->DB->query("SELECT products_name as tName FROM ".TABLE_PRODUCTS_DESCRIPTION." WHERE products_id='".(int)$pID."' AND language_id='".(int)$this->languages_id."' LIMIT 1");
+ $result = $rsql->fetchAssoc();
+ $cName = $result['tName'];
+ break;
+ }
+ $this->get_cache_id($pID,$result,'PRODUCTS');
+ $this->performance['QUERIES']['PRODUCTS'][] = $rsql;
+
+ $result['tName'] = $this->strip( $result['tName'] );
+ break;
}
- return $return;
+
+ if(self::$htexe)
+ $this->transph_header_tag($result);
+
+ return $result;
}
/**
@@ -793,7 +800,7 @@
$path .= $this->GetName_c($row).'-';
}
- $result['path']= $path . ((isset($result['url']) && !empty($result['url']) )? $result['url'] : $result['tName']) ;
+ $result['path']= $path . ((isset($result['url']) && !empty($result['url']) )? $result['url'] : $result['tName']) ;
$this->get_cache_id($result['ID'],$result,'PRODUCTS');
@@ -814,40 +821,41 @@
$ID=(is_numeric($ID) ?$ID : $this->get_full_cPath($cID, $single_cID));
switch(true){
case (_test_bool(self::$USE_SEO_CACHE_GLOBAL) && isset($this->cache['CATEGORIES'][$ID]) ):
- $this->performance['CACHE_QUERY_SAVINGS']++;
- $result = $this->get_cache_id($ID,'','CATEGORIES');;
- $return = (isset($result['tName'])? $this->strip($result['tName']): '');
- if(self::$htexe) $this->transph_header_tag($result);
+ $this->performance['CACHE_QUERY_SAVINGS']++;
+ $result = $this->get_cache_id($ID,'','CATEGORIES');;
+ $result['tName']= (isset($result['tName'])? $this->strip($result['tName']): '');
+
break;
default:
- $this->performance['NUMBER_QUERIES']++;
- switch(true){
- case (_test_bool($this->attributes['SEO_ADD_CAT_PARENT'])):
- $rsql = $this->DB->query("SELECT c.categories_id as ID, c.parent_id, cd.categories_name as tName, cd2.categories_name as pName
- FROM ".TABLE_CATEGORIES." c
- JOIN ".TABLE_CATEGORIES_DESCRIPTION." cd
- ON c.categories_id = cd.categories_id AND cd.language_id='".(int)$this->languages_id."'
- LEFT JOIN ".TABLE_CATEGORIES_DESCRIPTION." cd2
- ON c.parent_id=cd2.categories_id AND cd2.language_id='".(int)$this->languages_id."'
- WHERE c.categories_id='".(int)$ID."'
- LIMIT 1");
- $result = $rsql->fetchAssoc();
- $result['tName']=$cName = $this->not_null($result['pName']) ? $this->strip($result['pName'] . ' ' . $result['tName']) : $this->strip($result['tName']);
- break;
- default:
- $rsql = $this->DB->query("SELECT categories_id as ID, categories_name as tName FROM ".TABLE_CATEGORIES_DESCRIPTION." WHERE categories_id='".(int)$ID."' AND language_id='".(int)$this->languages_id."' LIMIT 1");
- $result = $rsql->fetchAssoc();
- $cName = $result['tName'];
- break;
- $this->performance['QUERIES']['CATEGORIES'][] = $rsql;
- }
- $cName = $this->strip($cName);
- $this->get_cache_id($ID,$result,'CATEGORIES');
- if(self::$htexe) $this->transph_header_tag($result);
- $return = $cName;
+ $this->performance['NUMBER_QUERIES']++;
+ switch(true){
+ case (_test_bool($this->attributes['SEO_ADD_CAT_PARENT'])):
+ $rsql = $this->DB->query("SELECT c.categories_id as ID, c.parent_id, cd.categories_name as tName, cd2.categories_name as pName
+ FROM ".TABLE_CATEGORIES." c
+ JOIN ".TABLE_CATEGORIES_DESCRIPTION." cd
+ ON c.categories_id = cd.categories_id AND cd.language_id='".(int)$this->languages_id."'
+ LEFT JOIN ".TABLE_CATEGORIES_DESCRIPTION." cd2
+ ON c.parent_id=cd2.categories_id AND cd2.language_id='".(int)$this->languages_id."'
+ WHERE c.categories_id='".(int)$ID."'
+ LIMIT 1");
+ $result = $rsql->fetchAssoc();
+ $result['tName']=$cName = $this->not_null($result['pName']) ? $this->strip($result['pName'] . ' ' . $result['tName']) : $this->strip($result['tName']);
+ break;
+ default:
+ $rsql = $this->DB->query("SELECT categories_id as ID, categories_name as tName FROM ".TABLE_CATEGORIES_DESCRIPTION." WHERE categories_id='".(int)$ID."' AND language_id='".(int)$this->languages_id."' LIMIT 1");
+ $result = $rsql->fetchAssoc();
+ $cName = $result['tName'];
+ break;
+ $this->performance['QUERIES']['CATEGORIES'][] = $rsql;
+ }
+ $cName = $this->strip($cName);
+ $this->get_cache_id($ID,$result,'CATEGORIES');
+
+ $result['tName']=$cName;
break;
}
- return $return;
+
+ return $result;
}
/**
@@ -870,27 +878,27 @@
* @param $mID integer
* @return string
*/
-// private function get_manufacturer_name($mID){
private function GetName_m($mID){
switch(true){
case (_test_bool(self::$USE_SEO_CACHE_GLOBAL) && isset($this->cache['MANUFACTURERS'][$mID])):
- $this->performance['CACHE_QUERY_SAVINGS']++;
- $result = $this->cache['MANUFACTURERS'][$mID];
- $return = (isset($result['tName'])? $result['tName']: '');
- if(self::$htexe) $this->transph_header_tag($result);
+ $this->performance['CACHE_QUERY_SAVINGS']++;
+ $result = $this->cache['MANUFACTURERS'][$mID];
+ $result['tName'] = (isset($result['tName'])? $result['tName']: '');
break;
default:
- $this->performance['NUMBER_QUERIES']++;
- $rsql = $this->DB->query("SELECT manufacturers_name as tName FROM ".TABLE_MANUFACTURERS." WHERE manufacturers_id='".(int)$mID."' LIMIT 1");
- $result = $rsql->fetchAssoc(); // $this->DB->FetchArray( $this->DB->Query( $sql ) );
- $mName = $this->strip( $result['tName'] );
- $this->cache['MANUFACTURERS'][$mID] = $result;
- $this->performance['QUERIES']['MANUFACTURERS'][] = $rsql;
- if(self::$htexe) $this->transph_header_tag($result);
- $return = $mName;
+ $this->performance['NUMBER_QUERIES']++;
+ $rsql = $this->DB->query("SELECT manufacturers_name as tName FROM ".TABLE_MANUFACTURERS." WHERE manufacturers_id='".(int)$mID."' LIMIT 1");
+ $result = $rsql->fetchAssoc(); // $this->DB->FetchArray( $this->DB->Query( $sql ) );
+ $mName = $this->strip( $result['tName'] );
+ $this->cache['MANUFACTURERS'][$mID] = $result;
+ $this->performance['QUERIES']['MANUFACTURERS'][] = $rsql;
+
+ $result['tName']= $mName;
break;
}
- return $return;
+
+
+ return $result;
}
@@ -902,28 +910,25 @@
* @return string
*/
private function GetName_t($tID){
-// private function get_topic_name($tID){
switch(true){
case (_test_bool(self::$USE_SEO_CACHE_GLOBAL) && isset($this->cache['TOPICS'][$tID]) ):
- $this->performance['CACHE_QUERY_SAVINGS']++;
- $result = $this->cache['TOPICS'][$tID];
- $return = (isset($result['tName'])? $this->strip($result['tName']): '');
- if(self::$htexe) $this->transph_header_tag($result);
- break;
+ $this->performance['CACHE_QUERY_SAVINGS']++;
+ $result = $this->cache['TOPICS'][$tID];
+ $result['tName'] = (isset($result['tName'])? $this->strip($result['tName']): '');
+ break;
default:
- $this->performance['NUMBER_QUERIES']++;
- $sql = "select content_title as tName from " . TABLE_CONTENT . " c, " . TABLE_CONTENT_DESCRIPTION . " cd where c.content_status = '1' and c.content_id=cd.content_id and c.content_id='".(int)$tID."' and cd.language_id='".(int)$this->languages_id."' Limit 1";
- $rsql=$this->DB->query($sql);
-// else $sql = "select head_title_tag as tName, head_desc_tag, head_keywords_tag from " . TABLE_FULL_TAG . " ft, " . TABLE_FULL_TAG_DESCRIPTION . " ftd where ft.tag_id=ftd.tag_id and ft.page_type='content' and ft.page_id = '" . (int)$tID. "' and ftd.language_id = '" . (int)$this->languages_id. "' Limit 1";
- $result = $rsql->fetchAssoc(); //$this->DB->FetchArray( $this->DB->query( $sql ) );
- $tName = $this->strip( $result['tName'] );
- $this->cache['ARTICLES'][$tID] = $result;
- $this->performance['QUERIES']['TOPICS'][] = $sql;
- if(self::$htexe) $this->transph_header_tag($result);
- $return = $tName;
- break;
+ $this->performance['NUMBER_QUERIES']++;
+ $sql = "select content_title as tName from " . TABLE_CONTENT . " c, " . TABLE_CONTENT_DESCRIPTION . " cd where c.content_status = '1' and c.content_id=cd.content_id and c.content_id='".(int)$tID."' and cd.language_id='".(int)$this->languages_id."' Limit 1";
+ $rsql=$this->DB->query($sql);
+ $result = $rsql->fetchAssoc();
+ $tName = $this->strip( $result['tName'] );
+ $this->cache['ARTICLES'][$tID] = $result;
+ $this->performance['QUERIES']['TOPICS'][] = $sql;
+ $result['tName'] = $tName;
+ break;
}
- return $return;
+
+ return $result;
}
@@ -935,8 +940,6 @@
*/
private function generate_topics_cache(){
-
-
if(! _test_bool($this->attributes['SEO_ADD_CAT_PARENT']) )
// $res=$this->DB->query( "select ft.page_id as ID , head_title_tag as tName, head_desc_tag, head_keywords_tag, head_url as url from " . TABLE_FULL_TAG . " ft, " . TABLE_FULL_TAG_DESCRIPTION . " ftd where ft.tag_id=ftd.tag_id and ft.page_type='product' and ftd.language_id = '" . (int)$this->languages_id. "'" );
$res=$this->DB->query( "select ft.page_id as ID, head_title_tag as tName, head_desc_tag, head_keywords_tag from " . TABLE_FULL_TAG . " ft, " . TABLE_FULL_TAG_DESCRIPTION . " ftd where ft.tag_id=ftd.tag_id and ft.page_type='content' and ftd.language_id = '" . (int)$this->languages_id. "'" );
@@ -946,7 +949,6 @@
while ($result =$res->fetchAssoc()){
-
$path = '';
if(isset($result['categories_cpath']) && !empty($result['categories_cpath'])) {
@@ -956,7 +958,7 @@
$path .= $this->GetName_c($row).'-';
}
- $result['path']= $path . ((isset($result['url']) && !empty($result['url']) )? $result['url'] : $result['tName']) ;
+ $result['path']= $path . ((isset($result['url']) && !empty($result['url']) )? $result['url'] : $result['tName']) ;
$this->get_cache_id($result['ID'],$result,'TOPICS');
}
Modified: trunk/catalog/includes/classes/core_page/overlay/oscss_boxes.php
===================================================================
--- trunk/catalog/includes/classes/core_page/overlay/oscss_boxes.php 2011-12-18 22:31:37 UTC (rev 3974)
+++ trunk/catalog/includes/classes/core_page/overlay/oscss_boxes.php 2011-12-19 00:56:52 UTC (rev 3975)
@@ -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 12/02/11, 15:06
+ @version 2.1.1
+ @date 18/12/11, 15:06
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
\class oscss_boxes
@@ -192,7 +192,14 @@
*/
private function ret_boxes($key){
global $page;
- if(!empty($key) && isset($page->page['boxes']['list'][$key]))return $page->page['boxes']['list'][$key];
+ if(empty($key))
+ return false;
+
+ if(isset($page->page['boxes']['list'][$key]))
+ return $page->page['boxes']['list'][$key];
+
+ trigger_error(sprintf(__FILE__.'::'.__LINE__.' Error Call boxes :( %s) no found ', $key ) , E_USER_ERROR);
+
return false;
}
Modified: trunk/catalog/includes/classes/core_page/overlay/oscss_modules.php
===================================================================
--- trunk/catalog/includes/classes/core_page/overlay/oscss_modules.php 2011-12-18 22:31:37 UTC (rev 3974)
+++ trunk/catalog/includes/classes/core_page/overlay/oscss_modules.php 2011-12-19 00:56:52 UTC (rev 3975)
@@ -144,7 +144,9 @@
$page->page['modules']['list'][$key]=array_merge( $page->page['modules']['list'][$key],$this->temp['list'][$key]);
/** Verif etat et exe */
- if($page->page['modules'][$type][$key] !='false'){
+ if(
+ ( @$page->page['modules'][$type][$key] !='false' )
+ ) {
$mod=$this->ret_modules($key);
// $file=$mod['dir_lang'] . $mod['name'] ;
$function='sql_'.$mod['name_clean'];
@@ -160,7 +162,7 @@
if(($path_lg=$page->fix_file($mod['dir_lang'] . $mod['name'],true)) !=false) $page->pile_file_lang($path_lg);
// if (page::TestFile($file)) require_once($file);
- $this->modules_chargee[$key]=$page->page['modules'][$type][$key];
+ $this->modules_chargee[$key]=@$page->page['modules'][$type][$key];
$page->page['modules']['list'][$key]['result_sql']=$res;
}
else{
Modified: trunk/catalog/includes/classes/drivers/data/categorie.php
===================================================================
--- trunk/catalog/includes/classes/drivers/data/categorie.php 2011-12-18 22:31:37 UTC (rev 3974)
+++ trunk/catalog/includes/classes/drivers/data/categorie.php 2011-12-19 00:56:52 UTC (rev 3975)
@@ -268,7 +268,6 @@
if (tep_not_null($current_category_id)) {
-// $cPath_array = array();
$cPath_array = self::get_parent_categories(array(), $current_category_id) ;
$cPath_array[] = $current_category_id;
$cPath_new = implode('_', $cPath_array);
@@ -285,7 +284,7 @@
/**
@brief Adjust status active by childs item
*/
- private function countChidlsAll($category_id){
+ private static function countChidlsAll($category_id){
$DB=Database::getInstance();
$sql =
" SELECT c.categories_id, count(c.categories_id) as total, count(c2c.categories_id) , count(p2c.categories_id) FROM " . TABLE_CATEGORIES . " c ".
Modified: trunk/catalog/includes/classes/page.php
===================================================================
--- trunk/catalog/includes/classes/page.php 2011-12-18 22:31:37 UTC (rev 3974)
+++ trunk/catalog/includes/classes/page.php 2011-12-19 00:56:52 UTC (rev 3975)
@@ -409,27 +409,32 @@
$seo_urls=seo_url::getInstance($languages_id);
$seo_urls->header_tags($here, $_SERVER['QUERY_STRING']);
- if(count($seo_urls->header_tag)<=3)
- $this->page['seo_url']['error'] = true;
- $this->page['seo_url']['result'] = $seo_urls->header_tag;
- $this->page['seo_url']['path'] = $here;
- $this->page['seo_url']['query_string'] = $_SERVER['QUERY_STRING'];
- $the_title= $seo_urls->header_tag['title'];
- $the_desc= $seo_urls->header_tag['desc'];
- $the_key_words= $seo_urls->header_tag['keywords'];
+ /// meta tags content for html balise
+ $meta['title']=(tep_not_null($seo_urls->header_tag['title'])? $seo_urls->header_tag['title'] : (tep_not_null($this->title)? $this->title: STORE_NAME));
+ if(tep_not_null($seo_urls->header_tag['desc']))
+ $meta['description']=$seo_urls->header_tag['desc'];
+
+ if(tep_not_null($seo_urls->header_tag['keywords']))
+ $meta['keywords']=$seo_urls->header_tag['keywords'];
+
}
else {
- $the_desc= HEAD_DESC_TAG_ALL;
- $the_key_words= HEAD_KEY_TAG_ALL;
- $the_title='';
+ /// meta tags content for html balise
+ $meta['title']=/*(defined('HEADING_TITLE')? HEADING_TITLE : */ (tep_not_null($this->title)? $this->title: STORE_NAME) /*)*/;
+ $meta['description']=HEAD_DESC_TAG_ALL;
+ $meta['keywords']=HEAD_KEY_TAG_ALL;
}
- /// meta tags content for html balise
- $this->page['meta']['title']=(tep_not_null($the_title)? $the_title : (tep_not_null($this->title)? $this->title: STORE_NAME));
- $this->page['meta']['description']=$the_desc;
- $this->page['meta']['keywords']=$the_key_words;
+ if(count($meta)<=3)
+ $this->page['seo_url']['error'] = true;
+
+ $this->page['meta'] = $meta;
+ // log
+ $this->page['seo_url']['result'] = $this->page['meta'];
+ $this->page['seo_url']['path'] = $here;
+ $this->page['seo_url']['query_string'] = $_SERVER['QUERY_STRING'];
}
@@ -774,7 +779,7 @@
\brief Call meta tags
*/
public function GetHtmlMeta($type = 'title'){
- return (in_array($type, $this->page['meta'])) ? $this->page['meta'][$type] : false ;;
+ return ((isset($this->page['meta'][$type])) ? (string)$this->page['meta'][$type] : false );
}
/**
Modified: trunk/catalog/includes/filenames.php
===================================================================
--- trunk/catalog/includes/filenames.php 2011-12-18 22:31:37 UTC (rev 3974)
+++ trunk/catalog/includes/filenames.php 2011-12-19 00:56:52 UTC (rev 3975)
@@ -56,7 +56,7 @@
define('FILENAME_SEARCH_HELP', 'search_help.php');
define('FILENAME_SHIPPING', 'shipping.php');
-
+ define('FILENAME_SHOPPING_CART', 'shopping_cart.php');
define('FILENAME_SPECIALS', 'listing_specials.php');
define('FILENAME_SSL_CHECK', 'ssl_check.php');
define('FILENAME_TELL_A_FRIEND', 'tell_a_friend.php');
@@ -77,7 +77,6 @@
/* Retrocompatibilite */
define('FILENAME_CONTENT', FILENAME_DEFAULT);
define('FILENAME_PRODUCT_INFO', FILENAME_DEFAULT);
- define('FILENAME_SHOPPING_CART', FILENAME_DEFAULT);
/**
Modified: trunk/catalog/index.php
===================================================================
--- trunk/catalog/index.php 2011-12-18 22:31:37 UTC (rev 3974)
+++ trunk/catalog/index.php 2011-12-19 00:56:52 UTC (rev 3975)
@@ -154,18 +154,19 @@
}
/** HOME */
- elseif( ! isset($cPath) ) {
+ else {
+// elseif( ! isset($cPath) ) {
$page->init('home.php',$language);
$breadcrumb=$page->return_object('breadcrumb');
// $page->force_content('home.php');
}
- else {
- header("Status: 404 Not Found");
- header("HTTP/1.0 301 Moved Permanently");
- tep_redirect(tep_href_link('error/404.html'));
- }
+// else {
+// header("Status: 404 Not Found");
+// header("HTTP/1.0 301 Moved Permanently");
+// tep_redirect(tep_href_link('error/404.html'));
+// }
unset($category_cfils,$category_pfils,$category_parent);
Modified: trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/content/shopping_cart.php
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/content/shopping_cart.php 2011-12-18 22:31:37 UTC (rev 3974)
+++ trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/content/shopping_cart.php 2011-12-19 00:56:52 UTC (rev 3975)
@@ -16,7 +16,7 @@
<div id="shoppingCart">
<?php $boxe =$page->oscss_boxes->_return('checkout_progressbar'); ?>
- <?php echo unhtmlentities($boxe->content) ?>
+ <?php if($boxe)echo unhtmlentities($boxe->content) ?>
<?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_SHOPPING_CART, 'action=update_product')); ?>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2011-12-18 22:31:43
|
Revision: 3974
http://oscss.svn.sourceforge.net/oscss/?rev=3974&view=rev
Author: oscim
Date: 2011-12-18 22:31:37 +0000 (Sun, 18 Dec 2011)
Log Message:
-----------
ajout fonction de calcul au driversData de categorie pour detreminer status categories. Si aucun enfants (cat, cms, produ) status off.
Report d'une 404 lors incoherance dans le switch de l'index
Modified Paths:
--------------
trunk/catalog/includes/classes/category_tree.php
trunk/catalog/includes/classes/drivers/data/categorie.php
trunk/catalog/index.php
Modified: trunk/catalog/includes/classes/category_tree.php
===================================================================
--- trunk/catalog/includes/classes/category_tree.php 2011-12-18 21:41:08 UTC (rev 3973)
+++ trunk/catalog/includes/classes/category_tree.php 2011-12-18 22:31:37 UTC (rev 3974)
@@ -62,7 +62,7 @@
categorie::add_where_query(" and c.categories_hidden='1' ");
$list = categorie::get_query('','','',array('limit'=>0));
foreach($list as $categories)
- $this->data[$categories->parent_id][$categories->categories_id] = array('href' => $categories->href, 'name' => $categories->categories_name, 'count' => 0);
+ if( (bool)$categories->status) $this->data[$categories->parent_id][$categories->categories_id] = array('href' => $categories->href, 'name' => $categories->categories_name, 'count' => 0);
if ($this->show_category_product_count === true) $this->calculateCategoryProductCount();
Modified: trunk/catalog/includes/classes/drivers/data/categorie.php
===================================================================
--- trunk/catalog/includes/classes/drivers/data/categorie.php 2011-12-18 21:41:08 UTC (rev 3973)
+++ trunk/catalog/includes/classes/drivers/data/categorie.php 2011-12-18 22:31:37 UTC (rev 3974)
@@ -169,7 +169,7 @@
$res['id']=$content['categories_id'];
$res['title']=$content['categories_name'];
$res['name']=$content['categories_name'];
-
+ $res['status']=self::countChidlsAll($content['categories_id']);
$res=categorie::get_option_data($res);
self::$object_data[$content['categories_id']]=$tabl[$content['categories_id']]=new objectInfo($res);
@@ -282,7 +282,35 @@
else return $cPath_new;
}
+ /**
+ @brief Adjust status active by childs item
+ */
+ private function countChidlsAll($category_id){
+ $DB=Database::getInstance();
+ $sql =
+ " SELECT c.categories_id, count(c.categories_id) as total, count(c2c.categories_id) , count(p2c.categories_id) FROM " . TABLE_CATEGORIES . " c ".
+ // " LEFT JOIN " . TABLE_CATEGORIES . " c1 ON (c1.parent_id = c.categories_id) ".
+ " LEFT JOIN " . TABLE_CONTENT_TO_CATEGORIES . " c2c ON (c.categories_id = c2c.categories_id) ".
+ " LEFT JOIN " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c ON (c.categories_id = p2c.categories_id) ".
+ " , " . TABLE_PRODUCTS . " p ".
+ " , " . TABLE_CONTENT . " ct ".
+ " , " . TABLE_CATEGORIES . " c1 ".
+ " WHERE c.categories_id = '" . (int)$category_id . "' ".
+ " AND( ( ct.content_id = c2c.content_id AND ct.content_status='1' )".
+ " OR ( p.products_id = p2c.products_id AND p.products_status = '1' ) ".
+ " OR (c1.parent_id = c.categories_id) ) ".
+ " GROUP BY ct.content_id, p2c.categories_id,c.categories_id ".
+ "";
+ $products_query = $DB->query($sql);
+
+ if($products_query->__get('numRows')>0 ) {
+ $products = $products_query->fetchAssoc();
+ return $products['total'];
+ }
+ else return 0;
+ }
+
/**
* \brief Return the number of products and category child in a category
// TABLES: products, products_to_categories, categories
@@ -316,6 +344,8 @@
return $products_count;
}
+
+
/**
* \brief Return the number of products and category child in a category
// TABLES: products, products_to_categories, categories
Modified: trunk/catalog/index.php
===================================================================
--- trunk/catalog/index.php 2011-12-18 21:41:08 UTC (rev 3973)
+++ trunk/catalog/index.php 2011-12-18 22:31:37 UTC (rev 3974)
@@ -154,13 +154,18 @@
}
/** HOME */
- else {
+ elseif( ! isset($cPath) ) {
$page->init('home.php',$language);
$breadcrumb=$page->return_object('breadcrumb');
// $page->force_content('home.php');
}
+ else {
+ header("Status: 404 Not Found");
+ header("HTTP/1.0 301 Moved Permanently");
+ tep_redirect(tep_href_link('error/404.html'));
+ }
unset($category_cfils,$category_pfils,$category_parent);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2011-12-18 21:41:16
|
Revision: 3973
http://oscss.svn.sourceforge.net/oscss/?rev=3973&view=rev
Author: oscim
Date: 2011-12-18 21:41:08 +0000 (Sun, 18 Dec 2011)
Log Message:
-----------
Suite correction et report utilisation valeur pre calcul?\195?\169 dans les class et module
Suite am?\195?\169lioration gestion du block de develop
Mise a niveau de tous les module non typ?\195?\169 pour une utilisation syst?\195?\169matique des drivers de data
Ajout d'une information sur le type de donn?\195?\169es que retourne le module
Correction ds drivers de data
Force activation du block develop lors de l'installation d'un template pre-installl?\195?\169
Modified Paths:
--------------
trunk/catalog/includes/classes/category_tree.php
trunk/catalog/includes/classes/core_page/develop.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/messageStack.php
trunk/catalog/includes/classes/page.php
trunk/catalog/includes/modules/also_purchased_products.php
trunk/catalog/includes/modules/listing_cat.php
trunk/catalog/includes/modules/listing_manufacturer_products.php
trunk/catalog/includes/modules/listing_pages.php
trunk/catalog/includes/modules/new_products.php
trunk/catalog/includes/modules/product_listing.php
trunk/catalog/includes/modules/upcoming_products.php
trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Childs_tpl/module.php
trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/cfg/init.php
trunk/catalog/install/data/templates/appareil_photo/electronix/cfg/init.php
Modified: trunk/catalog/includes/classes/category_tree.php
===================================================================
--- trunk/catalog/includes/classes/category_tree.php 2011-12-18 18:03:39 UTC (rev 3972)
+++ trunk/catalog/includes/classes/category_tree.php 2011-12-18 21:41:08 UTC (rev 3973)
@@ -3,8 +3,8 @@
*\licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
*\portion code Copyright (c) 2002 osCommerce
*\package osCSS-2 <www http://www.oscss.org>
- *\version 2.1.0
- *\date 28/11/10, 08:18
+ *\version 2.1.1
+ *\date 18/12/11, 08:18
*\author oscim <mail aur...@os...> <www http://www.oscim.fr>
*\encode UTF-8
*\group boxes
@@ -14,7 +14,7 @@
Menu des catégories
- add NOT_RECUP_CASSE_IN_TXT_CATEGORIES Actif par defaut @a Hors-constructeur
-
+
TODO: End comment code / oscim 30//11/2010
*/
@@ -62,7 +62,7 @@
categorie::add_where_query(" and c.categories_hidden='1' ");
$list = categorie::get_query('','','',array('limit'=>0));
foreach($list as $categories)
- $this->data[$categories->parent_id][$categories->categories_id] = array('name' => $categories->categories_name, 'count' => 0);
+ $this->data[$categories->parent_id][$categories->categories_id] = array('href' => $categories->href, 'name' => $categories->categories_name, 'count' => 0);
if ($this->show_category_product_count === true) $this->calculateCategoryProductCount();
@@ -105,7 +105,7 @@
if ($level == 0 ||(isset($this->data[$category_id]) ) ) $result .= sprintf($this->root_start_string,' class="cat'.$parent_id.'_'.$category_id.'" ') ;
else $result .= $this->child_start_string ;
- $result .= str_repeat($this->spacer_string, $this->spacer_multiplier * $level) . '<a title="'. $category['name'] .'" href="' . tep_href_link(FILENAME_DEFAULT, 'cPath=' . $category_link ) . '">';
+ $result .= str_repeat($this->spacer_string, $this->spacer_multiplier * $level) . '<a title="'. $category['name'] .'" href="' . $category['href'] . '">';
if ($this->follow_cpath === true) {
if (in_array($category_id, $this->cpath_array)) $result .= $this->cpath_start_string . $category['name'] . $this->cpath_end_string;
@@ -177,7 +177,7 @@
/**
* \fn buildBreadcrumb($category_id, $level = 0)
- * @param $category_id int
+ * @param $category_id int
* @param $level int
*/
private function buildBreadcrumb($category_id, $level = 0) {
@@ -277,8 +277,8 @@
/**
* \brief Encapsulation item Root
- * @param $parent_start_string string
- * @param $parent_end_string string
+ * @param $parent_start_string string
+ * @param $parent_end_string string
*/
public function setParentString($parent_start_string, $parent_end_string) {
$this->parent_start_string = $parent_start_string;
@@ -288,7 +288,7 @@
/**
* \brief Encapsulation Parent
* @param $parent_group_start_string string
- * @param $parent_group_end_string string
+ * @param $parent_group_end_string string
*/
public function setParentGroupString($parent_group_start_string, $parent_group_end_string) {
$this->parent_group_start_string = $parent_group_start_string;
@@ -296,12 +296,12 @@
}
/**
-
+
*/
/**
* \brief Encapsulation item parent
* @param $child_start_string string
- * @param $child_end_string string
+ * @param $child_end_string string
*/
public function setChildString($child_start_string, $child_end_string) {
$this->child_start_string = $child_start_string;
@@ -309,7 +309,7 @@
}
/**
- * \fn setBreadcrumbSeparator($breadcrumb_separator)
+ * \fn setBreadcrumbSeparator($breadcrumb_separator)
* @param $breadcrumb_separator string
*/
public function setBreadcrumbSeparator($breadcrumb_separator) {
@@ -317,7 +317,7 @@
}
/**
- * \fn setBreadcrumbUsage($breadcrumb_usage)
+ * \fn setBreadcrumbUsage($breadcrumb_usage)
* @param $breadcrumb_usage
*/
public function setBreadcrumbUsage($breadcrumb_usage) {
Modified: trunk/catalog/includes/classes/core_page/develop.php
===================================================================
--- trunk/catalog/includes/classes/core_page/develop.php 2011-12-18 18:03:39 UTC (rev 3972)
+++ trunk/catalog/includes/classes/core_page/develop.php 2011-12-18 21:41:08 UTC (rev 3973)
@@ -42,27 +42,69 @@
}
$li.='</ul>';
+// print_r($page->oscss_plugins);
/// list all plugins
$p_li='This list load plugins in current page'.
- '<ul>';
+ '<ul><li><h4> type generic </h4>';
reset($page->page['plugins']);
- if(isset($page->page['plugins']['actif']) && is_array($page->page['plugins']['actif']))
- while($r=each($page->page['plugins']['actif'])){
- $p_li .='<li><h5>'.$r['value'].'</h5>'
- .'</li>';
- }
- $p_li.='';
+ if(isset($page->page['plugins']['present']) && is_array($page->page['plugins']['present'])) {
+ // for type generic plugins auto load
+ $p_li.='<ul>';
+ foreach($page->page['plugins']['present'] as $row) {
+ if($row)
+ $p_li .='<li><h5>'.$row.'</h5>'
+ .(in_array($row,$page->page['plugins']['actif'])? 'actived' : 'not actived')
+ .'</li>';
+ }
+ $p_li.='</ul>';
+ }
+ $p_li.='</li>';
+ // for type page plugins auto load
+ $p_li.='<li><h4> type '.$page->page['type'].'</h4>';
+ if(isset($page->page['plugins']['type']) && is_array($page->page['plugins']['type'])){
+ $p_li.='<ul>';
+ foreach($page->page['plugins']['type'] as $row) {
+ if($row)
+ $p_li .='<li><h5>'.$row.'</h5>'
+ .(in_array($row,$page->page['plugins']['actif'])? 'actived' : 'not actived')
+ .'</li>';
+ }
+ $p_li.='</ul>';
+ }
+ $p_li.='</li>';
+ $p_li.='</ul>';
+
+
+ /// SEO alert
+ $seo = 'This list load current page detect meta'.
+ '<ul>';
+ $seo.='<li><h5> script content </h5> '.$page->page['seo_url']['path'].'</li>';
+ $seo.='<li><h5> script query_string </h5> '.$page->page['seo_url']['query_string'].'</li>';
+
+ if(count($page->page['seo_url']['result']) > 0 )
+ foreach($page->page['seo_url']['result'] as $key=>$row){
+ $seo .='<li><h5>'.$key.'</h5> '.$row.'</li>';
+ }
+ $seo.='<li><h5> meta and title no found </h5></li>';
+ $seo.='</ul>';
+
+
+// print_r($page->page['seo_url']);
+
/// list all boxes
reset($page->page['boxes']);
$c_li='This list load boxes in current page'.
'<ul>';
- while($r=each($page->page['boxes'])){
- $b=each($r['value']);
- $c_li .='<li><h5>'.$b['key'].'</h5>'
+// while($r=each($page->page['boxes']['list'])){
+foreach($page->page['boxes']['list'] as $key=>$row){
+// $b=each($row['value']);
+ $c_li .='<li><h5>'.$key.'</h5>'
.'<ul>'
- .'<li>-- class de boite:'.$r['key'].'</li>'
+// .'<li>-- class box : '.$row['key'].'</li>'
+ .'<li>-- name :'.$row->name.'</li>'
+ .'<li>-- path file:'.$row->path.'</li>'
.'</ul></li>';
}
$c_li.='</ul>';
@@ -73,11 +115,12 @@
reset($page->page['file_gabarits']);
if(isset($page->page['file_gabarits']))
foreach($page->page['file_gabarits'] as $value){
- $gabartis_li .='<li><h5>'.$value.'</h5>'
+ $gabartis_li .='<li><h5>'.str_replace(DIR_FS_CATALOG,'',$value).'</h5>'
.'</li>';
}
$gabartis_li.='</ul>';
+ /// garbage collector
$phperrors ='This list php errors in current page. this errors is not visible and is for debugg solution'.
'<table>';
if(OSCSS_GARBAGE_ERROR == true)
@@ -88,64 +131,74 @@
}
$phperrors.='</table>';
+ /// Master menu popup
+ $MenuBox ='<ul>'.
+ '<li><a href="#" onclick="ViewData(\'NormalInfo\');return false; " > Normal Info </a></li>'.
+// '<li><a href="#" onclick="ViewData(\'SEO\');return false; " > Seo </a></li>'.
+ '<li><a href="#" onclick="ViewData(\'ModNoType\');return false; " > Module No type </a></li>'.
+ '<li><a href="#" onclick="ViewData(\'BoxAll\');return false; " > Boxes </a></li>'.
+ '<li><a href="#" onclick="ViewData(\'Gabartis\');return false; " > Files (.gab) </a></li>'.
+ '<li><a href="#" onclick="ViewData(\'Plugins\');return false; " > Plugins </a></li>'.
+// '<li><a href="#" onclick="ViewData(\'Errors\');return false; " > Errors </a></li>'.
+ '<li><a href="#" onclick="ViewData(\'CoreAlert\');return false; " > Core Alerts </a></li>'.
- $MenuBox ='<ul>'.
-'<li><a href="#" onclick="ViewData(\'NormalInfo\');return false; " > Normal Info </a></li>'.
-'<li><a href="#" onclick="ViewData(\'ModNoType\');return false; " > Module No type </a></li>'.
-'<li><a href="#" onclick="ViewData(\'BoxAll\');return false; " > Boxes </a></li>'.
-'<li><a href="#" onclick="ViewData(\'Gabartis\');return false; " > Files (.gab) </a></li>'.
-'<li><a href="#" onclick="ViewData(\'Plugins\');return false; " > Plugins </a></li>'.
-'<li><a href="#" onclick="ViewData(\'Errors\');return false; " > Errors </a></li>'.
-'<li><a href="#" onclick="ViewData(\'CoreAlert\');return false; " > Core Alerts </a></li>'.
-'</ul>';
+ '</ul>';
-$InfoBox .=''
- . '<p><span style="font-weight:bold;">Current language :</span> '.$page->page['language'].'</p>'
- .'<p><span style="font-weight:bold;">Current type page :</span> '.$page->page['type'].'</p>'
- .'<p><span style="font-weight:bold;">Current type classes page :</span> '.$page->page['class'].'</p>'
-.'';
+ /// Normal Info
+ $InfoBox .=''
+ . '<p><span style="font-weight:bold;">Current language :</span> '.$page->page['language'].'</p>'
+ .'<p><span style="font-weight:bold;">Current type page :</span> '.$page->page['type'].'</p>'
+ .'<p><span style="font-weight:bold;">Current type classes page :</span> '.$page->page['class'].'</p>'
+ .'';
+ /// PRINT block menu One
print '<div id="develop" class="develop">'.
'<h4>Frontend Develop Menu - <a href="#" onclick="ViewData(\'Help\');return false; " title="view detail">(help)</a></h4>'.
- '<p> <a href="#" onclick="ViewData(\'NormalInfo\');return false; " title="view detail"> Box Dev Info </a> '.
- ( ( ($val = $mock->is_count()) >0 )? '<a style="color:red" href="#" onclick="ViewData(\'Errors\');return false; " title="View Error"> php ('.$val.') </a>' : '' ).
+ '<p> <a href="#" onclick="ViewData(\'NormalInfo\');return false; " title="view detail"> Popup Dev Info </a> '.
+
'</p>'.
'<p><span style="font-weight:bold;">Theme: </span>'.$page->page['template'].'</p>'.
'<p><span style="font-weight:bold;">Script : <a href="#" title="page racine">(i)</a></span> '.$page->page['script'].'</p>'.
'<p><span style="font-weight:bold;">Content: <a href="#" title="le contenu principal de la page ne cours">(i)</a></span> <a href="#" title="'.@$page->page['path_content'].'">(i)</a>'.@$page->page['content'].'</p>'.
'<p><span style="font-weight:bold;">Gabarit:</span> '. $page->page['gabarit'].'</p>'.
-
+'<ul>'.
+( ( ($val = $mock->is_count()) >0 )? '<li><a style="color:red" href="#" onclick="ViewData(\'Errors\');return false; " title="View Php Error">php('.$val.')</a></li>' : '' ).
+( ( ($val2 = $page->messageStack->size()) >0 )? '<li><a style="color:red" href="#" onclick="ViewData(\'CoreAlert\');return false; " title="View Core Alert">Core('.$val2.')</a></li>' : '' ).
+( ( ( count($page->page['seo_url']['result']) )<3 )? '<li><a style="color:red" href="#" onclick="ViewData(\'SEO\');return false; " title="View Core Alert">SEO ('.(3 - count($page->page['seo_url']['result']) ) .')</a></li>' : '' ).
+'</ul>'.
''
;
print '</div>';
-
/// box block use js for draw
print '<div id="view-box" class="develop">'.
' <div id="DevTopbar" class="DevBar">Develop Box infos <a href="#" onclick="CloseBoxDev(); return false;">X</a></div>'.
' <div id="DevBottombar" class="DevBar">'.$MenuBox .'</div>'.
- ' <div id="NormalInfo" class="TextDevelop">'.$InfoBox.'</div>'.
- ' <div id="ModNoType" class="TextDevelop">'.$li .'</div>'.
- ' <div id="BoxAll" class="TextDevelop">'.$c_li .'</div>'.
- ' <div id="Plugins" class="TextDevelop">'.$p_li .'</div>'.
- ' <div id="Gabartis" class="TextDevelop">'.$gabartis_li .'</div>'.
+ ' <div id="DevContent" >'.
+ ' <div id="NormalInfo" class="TextDevelop">'.$InfoBox.'</div>'.
+ ' <div id="ModNoType" class="TextDevelop">'.$li .'</div>'.
+ ' <div id="BoxAll" class="TextDevelop">'.$c_li .'</div>'.
+ ' <div id="Plugins" class="TextDevelop">'.$p_li .'</div>'.
+ ' <div id="Gabartis" class="TextDevelop">'.$gabartis_li .'</div>'.
+ ' <div id="SEO" class="TextDevelop">'.$seo.'</div>'.
- ' <div id="CoreAlert" class="TextDevelop"> This list message not called and generated by core '.$page->messageStack->_draw() .'</div>'.
- ' <div id="Errors" class="TextDevelop">'.$phperrors .'</div>'.
+ ' <div id="CoreAlert" class="TextDevelop"> This list message not called and generated by core '.$page->messageStack->_draw() .'</div>'.
+ ' <div id="Errors" class="TextDevelop">'.$phperrors .'</div>'.
- ' <div id="Help" class="TextDevelop">
-<h5>Help this block develop</h5>
-<p> If you\'r closed this block (and block menu in left window),
-go in file and edit cfg/init.php <br />
+ ' <div id="Help" class="TextDevelop">
+ <h5>Help this block develop</h5>
+ <p> If you\'r closed this block (and block menu in left window),
+ go in file and edit cfg/init.php <br />
-search and replace "true" by "false"
-<pre>$this->add_var_page(\'develop\',\'false\');</pre>
-<br />
+ search and replace "true" by "false"
+ <pre>$this->add_var_page(\'develop\',\'false\');</pre>
+ <br />
-</p>
- </div>'.
+ </p>
+ </div>'.
+ '</div>'.
'</div>';
@@ -154,18 +207,25 @@
/* DEB Block debugg public template */
#develop{
- opacity:0.4;
- filter:alpha(opacity=40); /* For IE8 and earlier */
+ opacity:0.5;
+ filter:alpha(opacity=50); /* For IE8 and earlier */
color:black;
line-height:17px;
- background:white none repeat scroll 0 0
- ; border:1px solid black;
+ background:white none repeat scroll 0 0;
+ border:1px solid black;
padding:1em;
position:fixed;
right:0;
top:0;
+ font-size:14px;
+ padding:3px; margin:0;
}
#develop p {padding:0; margin:0;}
+ #develop a {font-size:13px}
+ #develop a:hover{
+ opacity:0.8;
+ filter:alpha(opacity=80); /* For IE8 and earlier */
+ }
#view-box {
position:absolute;
@@ -176,6 +236,7 @@
background:white;
border:2px solid black;
}
+ #DevContent{clear:both;display:block;position:relative;width:100%;min-height:250px;height:100%;overflow:auto;}
#view-box .DevBar {width:100%; height:25px; text-align:center; background:black; color:white;}
#view-box .DevBar ul *{display:inline-block;}
#view-box #DevTopbar a{text-align:right; font-size:20px; color:white; float: right;padding:2px 5px;}
@@ -183,9 +244,12 @@
#view-box #DevBottombar {position:relative; bottom:0; }
#view-box #DevBottombar ul li {padding:2px 5px; border-left: 1px solid white}
- #view-box #DevBottombar a {color:white;}
+ #view-box #DevBottombar a {color:white; font-size:13px;}
#view-box #DevBottombar a:hover {color:gray;}
- #view-box .TextDevelop {padding:1em;overflow:auto;}
+ #view-box .TextDevelop {min-height: 300px;height: 300px;
+ overflow: auto;
+ padding: 1em;
+ position: relative;}
/* END Block debugg public template */
</style>
Modified: trunk/catalog/includes/classes/drivers/data/categorie.php
===================================================================
--- trunk/catalog/includes/classes/drivers/data/categorie.php 2011-12-18 18:03:39 UTC (rev 3972)
+++ trunk/catalog/includes/classes/drivers/data/categorie.php 2011-12-18 21:41:08 UTC (rev 3973)
@@ -4,7 +4,7 @@
\portion code Copyright (c) 2002 osCommerce
\package osCSS-2 <www http://www.oscss.org>
\version 2.1.1
- \date 29/11/11, 11:33
+ \date 18/12/11, 11:33
\author oscim <mail aur...@os...> <www http://www.oscim.fr>
\encode UTF-8
@@ -59,7 +59,7 @@
public static function get_count_products_in_category($category_id, $include_inactive = false){ return categorieData::get_count_products_in_category($category_id,$include_inactive); }
public static function get_count_content_in_category($category_id){ return categorieData::get_count_content_in_category($category_id); }
public static function get_has_category_subcategories($category_id){ return categorieData::get_has_category_subcategories($category_id); }
- public static function get_parent_categories(&$categories, $categories_id) { return categorieData::get_parent_categories($categories, $categories_id); }
+ public static function get_parent_categories($categories, $categories_id) { return categorieData::get_parent_categories($categories, $categories_id); }
public static function get_subcategories(&$subcategories_array, $parent_id = 0){ return categorieData::get_subcategories($subcategories_array, $parent_id); }
public static function get_categories($categories_array = '', $parent_id = '0', $indent = '') { return categorieData::get_categories($categories_array , $parent_id, $indent); }
@@ -164,7 +164,7 @@
if(count(self::$cache)>0 && in_array($content['categories_id'],self::$cache) ) $tabl[$content['categories_id']]=self::$object_data[$content['categories_id']];
elseif (!in_array($content['categories_name'],$exclude)) {
$res=$content;
- $res['href']=tep_href_link(FILENAME_PRODUCT_INFO,'categories_id=' . $content['categories_id'] );
+ $res['href']=tep_href_link(FILENAME_DEFAULT,'cPath=' . $content['categories_id'] );
$res['key']=$content['categories_id'];
$res['id']=$content['categories_id'];
$res['title']=$content['categories_name'];
@@ -269,7 +269,7 @@
if (tep_not_null($current_category_id)) {
// $cPath_array = array();
- $cPath_array = self::get_parent_categories($cPath_array, $current_category_id) ;
+ $cPath_array = self::get_parent_categories(array(), $current_category_id) ;
$cPath_array[] = $current_category_id;
$cPath_new = implode('_', $cPath_array);
}
@@ -366,7 +366,8 @@
if(!isset(self::$object_data[$categories_id]->parent_array)) {
$db_list=self::get_query((int)$categories_id);
foreach($db_list as $cats) {
- if ($cats->parent_id == 0) return true;
+ if ($cats->parent_id == 0)
+ return array();
$categories[sizeof($categories)] = $cats->parent_id;
if ($cats->parent_id != $categories_id) {
$categories = self::get_parent_categories($categories, $cats->parent_id);
Modified: trunk/catalog/includes/classes/drivers/data/content.php
===================================================================
--- trunk/catalog/includes/classes/drivers/data/content.php 2011-12-18 18:03:39 UTC (rev 3972)
+++ trunk/catalog/includes/classes/drivers/data/content.php 2011-12-18 21:41:08 UTC (rev 3973)
@@ -177,6 +177,7 @@
while ($content = $content_query->fetchAssoc()) {
if (!in_array($content['name'],$exclude)) {
$res=$content;
+
$res['href']=tep_href_link(FILENAME_CONTENT,'content=' . $content['id']);
$res['key']=$content['name'];
$res['original']=$content['text'];
@@ -368,11 +369,8 @@
if (tep_db_num_rows($category_query)) {
$category = tep_db_fetch_array($category_query);
-// $categories = array();
- $categories = tep_get_parent_categories($categories, $category['categories_id']);
-
+ $categories = tep_get_parent_categories(array(), $category['categories_id']);
$categories = array_reverse($categories);
-
$cPath = implode('_', $categories);
if (tep_not_null($cPath)) $cPath .= '_';
Modified: trunk/catalog/includes/classes/drivers/data/product.php
===================================================================
--- trunk/catalog/includes/classes/drivers/data/product.php 2011-12-18 18:03:39 UTC (rev 3972)
+++ trunk/catalog/includes/classes/drivers/data/product.php 2011-12-18 21:41:08 UTC (rev 3973)
@@ -428,8 +428,8 @@
$cPath = '';
if((int)$products_id ==0 )return false;
if( ($category=self::get_item($products_id)) == false) return false;
-// $categories = array();
- $categories =tep_get_parent_categories($categories, $category->categories_id);
+
+ $categories =tep_get_parent_categories(array(), $category->categories_id);
$categories = array_reverse($categories);
$cPath = implode('_', $categories);
Modified: trunk/catalog/includes/classes/messageStack.php
===================================================================
--- trunk/catalog/includes/classes/messageStack.php 2011-12-18 18:03:39 UTC (rev 3972)
+++ trunk/catalog/includes/classes/messageStack.php 2011-12-18 21:41:08 UTC (rev 3973)
@@ -96,17 +96,18 @@
}
/**
- Calcul présence des erreurs
+ @brief Calcul présence des erreurs
*/
- /*private*/ function size($class) {
+ /*private*/ function size($class='') {
$count = 0;
+ if($class=='') return count($this->messages);
+ else
+ for ($i=0, $n=sizeof($this->messages); $i<$n; $i++) {
+ if ($this->messages[$i]['class'] == $class) {
+ $count++;
+ }
+ }
- for ($i=0, $n=sizeof($this->messages); $i<$n; $i++) {
- if ($this->messages[$i]['class'] == $class) {
- $count++;
- }
- }
-
return $count;
}
@@ -120,9 +121,11 @@
/**
@brief Draw erreur
*/
- public function _draw($type){
- if ($this->size($type) > 0)
+ public function _draw($type=''){
+ if ($type!='' && $this->size($type) > 0)
echo '<div id="retour_erreur" class="messageStack">'. $this->output($type) . '</div>';
+ elseif($type=='')
+ return $this->output() ;
}
/**
Modified: trunk/catalog/includes/classes/page.php
===================================================================
--- trunk/catalog/includes/classes/page.php 2011-12-18 18:03:39 UTC (rev 3972)
+++ trunk/catalog/includes/classes/page.php 2011-12-18 21:41:08 UTC (rev 3973)
@@ -409,7 +409,14 @@
$seo_urls=seo_url::getInstance($languages_id);
$seo_urls->header_tags($here, $_SERVER['QUERY_STRING']);
- $the_title= $seo_urls->header_tag['title'];
+ if(count($seo_urls->header_tag)<=3)
+ $this->page['seo_url']['error'] = true;
+
+ $this->page['seo_url']['result'] = $seo_urls->header_tag;
+ $this->page['seo_url']['path'] = $here;
+ $this->page['seo_url']['query_string'] = $_SERVER['QUERY_STRING'];
+
+ $the_title= $seo_urls->header_tag['title'];
$the_desc= $seo_urls->header_tag['desc'];
$the_key_words= $seo_urls->header_tag['keywords'];
}
Modified: trunk/catalog/includes/modules/also_purchased_products.php
===================================================================
--- trunk/catalog/includes/modules/also_purchased_products.php 2011-12-18 18:03:39 UTC (rev 3972)
+++ trunk/catalog/includes/modules/also_purchased_products.php 2011-12-18 21:41:08 UTC (rev 3973)
@@ -3,8 +3,8 @@
@licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.0.9
- @date 16/06/10, 10:48
+ @version 2.1.1
+ @date 17/12/11, 10:48
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -15,7 +15,7 @@
$languages_id=$page->the_var('languages_id');
if (isset($_GET['products_id'])) {
- $orders_query = $DB->query($sql="SELECT op2.products_id, p2.products_image, d.products_name, p2.products_quantity, p2.products_price, p2.products_tax_class_id ".
+ $orders_query = $DB->query($sql="SELECT op2.products_id ".
"FROM " . TABLE_ORDERS_PRODUCTS . " op1 ".
"INNER JOIN " . TABLE_ORDERS_PRODUCTS . " op2
ON op2.orders_id = op1.orders_id ".
@@ -49,10 +49,11 @@
while ($new_products = $res->fetchAssoc() ){
$pd=product::get_item($new_products['products_id']);
$pd->aca=$aca_listing->return_db_min($new_products['products_id']);
+ $pd->type = 'product';
$p[]=$pd;
}
- return new objectInfo(array('title'=>TEXT_ALSO_PURCHASED_PRODUCTS_LIST, 'content'=>$p ));
+ return new objectInfo(array('title'=>TEXT_ALSO_PURCHASED_PRODUCTS_LIST, 'content'=>$p , 'type'=>'product' ));
}
Modified: trunk/catalog/includes/modules/listing_cat.php
===================================================================
--- trunk/catalog/includes/modules/listing_cat.php 2011-12-18 18:03:39 UTC (rev 3972)
+++ trunk/catalog/includes/modules/listing_cat.php 2011-12-18 21:41:08 UTC (rev 3973)
@@ -3,8 +3,8 @@
@licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.1.0
- @date 16/09/10, 22:19
+ @version 2.1.1
+ @date 17/12/11, 10:48
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -55,10 +55,13 @@
$p=array();
if( ($res=$page->oscss_modules->_resultsql('listing_cat')) ==false ) return null;
while ($ele_db = tep_db_fetch_array($res)){
- $p[]=new objectInfo(array_merge($ele_db,array('cPath'=>tep_get_path($ele_db['categories_id'])) ) );
+ $pd=categorie::get_item($ele_db['categories_id']);
+ $pd->type = 'categorie';
+// print_r($pd);
+ $p[]= $pd; //new objectInfo(array_merge($ele_db,array('cPath'=>tep_get_path($ele_db['categories_id'])) ) );
}
- return new objectInfo(array('title'=>HEADING_CHILD_CAT, 'content'=>$p ));
+ return new objectInfo(array('title'=>HEADING_CHILD_CAT, 'content'=>$p, 'type'=>'categorie' ));
}
Modified: trunk/catalog/includes/modules/listing_manufacturer_products.php
===================================================================
--- trunk/catalog/includes/modules/listing_manufacturer_products.php 2011-12-18 18:03:39 UTC (rev 3972)
+++ trunk/catalog/includes/modules/listing_manufacturer_products.php 2011-12-18 21:41:08 UTC (rev 3973)
@@ -4,7 +4,7 @@
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 12/09/11, 10:00
+ @date 17/12/11, 10:48
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@brief module base new products
@@ -62,10 +62,11 @@
while ($listing_manufacturer_products = $res->fetchAssoc()){
$pd=product::get_item($listing_manufacturer_products['products_id']);
$pd->aca=$aca_listing->return_db_min($listing_manufacturer_products['products_id']);
+ $pd->type = 'product';
$p[]=$pd;
}
- return new objectInfo(array('title'=>__('table heading manufacturers products') , 'content'=>$p ));
+ return new objectInfo(array('title'=>__('table heading manufacturers products') , 'content'=>$p, 'type'=>'product' ));
}
Modified: trunk/catalog/includes/modules/listing_pages.php
===================================================================
--- trunk/catalog/includes/modules/listing_pages.php 2011-12-18 18:03:39 UTC (rev 3972)
+++ trunk/catalog/includes/modules/listing_pages.php 2011-12-18 21:41:08 UTC (rev 3973)
@@ -2,8 +2,8 @@
/**
@licence GPL 2005-2009 The osCSS developers - osCSS Open Source E-commerce
@package oscss-2 <www http://www.oscss.org>
- @version Rc-3
- @date 14/03/10, 21:15
+ @version 2.1.1
+ @date 17/12/11, 10:48
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@@ -22,11 +22,16 @@
if(is_string($listing_query))$listing_query=tep_db_query($listing_query);
while ($listing = tep_db_fetch_array($listing_query)){
- $p[]=new objectInfo(array_merge($listing,array('aca'=>$aca_listing->return_db_min($listing['content_id'])) ) );
+
+ $pd=content::get_item($listing['content_id']);
+// print_r(new objectInfo(array_merge($listing,array('aca'=>$aca_listing->return_db_min($listing['content_id'])) ) ));
+// print_r($pd);
+ $pd->type = 'content';
+ $p[]=$pd; //new objectInfo(array_merge($listing,array('aca'=>$aca_listing->return_db_min($listing['content_id'])) ) );
}
- return new objectInfo(array('title'=>'', 'content'=>$p, 'split'=> $listing_split ));
+ return new objectInfo(array('title'=>'', 'content'=>$p, 'split'=> $listing_split , 'type'=>'content' ));
}
Modified: trunk/catalog/includes/modules/new_products.php
===================================================================
--- trunk/catalog/includes/modules/new_products.php 2011-12-18 18:03:39 UTC (rev 3972)
+++ trunk/catalog/includes/modules/new_products.php 2011-12-18 21:41:08 UTC (rev 3973)
@@ -55,10 +55,11 @@
while ($new_products = $res->fetchAssoc()){
$pd=product::get_item($new_products['products_id']);
$pd->aca=$aca_listing->return_db_min($new_products['products_id']);
+ $pd->type = 'product';
$p[]=$pd;
}
- return new objectInfo(array('title'=>sprintf(__('table heading new products'),constant('NameOf_MONTH_'.date('m')) ), 'content'=>$p ));
+ return new objectInfo(array('title'=>sprintf(__('table heading new products'),constant('NameOf_MONTH_'.date('m')) ), 'content'=>$p , 'type'=>'product' ));
}
Modified: trunk/catalog/includes/modules/product_listing.php
===================================================================
--- trunk/catalog/includes/modules/product_listing.php 2011-12-18 18:03:39 UTC (rev 3972)
+++ trunk/catalog/includes/modules/product_listing.php 2011-12-18 21:41:08 UTC (rev 3973)
@@ -3,8 +3,8 @@
@licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.1.0
- @date 16/09/10, 21:27
+ @version 2.1.1
+ @date 17/12/11, 10:48
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -23,11 +23,12 @@
while ($listing = tep_db_fetch_array($listing_query)){
$pd=product::get_item($listing['products_id']);
$pd->aca=$aca_listing->return_db_min($listing['products_id']);
+ $pd->type = 'product';
$p[]=$pd;
}
- return new objectInfo(array('title'=>((isset($mod['title']))? $mod['title']:''), 'content'=>$p, 'split'=> $listing_split ));
+ return new objectInfo(array('title'=>((isset($mod['title']))? $mod['title']:''), 'content'=>$p, 'split'=> $listing_split , 'type'=>'product' ));
}
Modified: trunk/catalog/includes/modules/upcoming_products.php
===================================================================
--- trunk/catalog/includes/modules/upcoming_products.php 2011-12-18 18:03:39 UTC (rev 3972)
+++ trunk/catalog/includes/modules/upcoming_products.php 2011-12-18 21:41:08 UTC (rev 3973)
@@ -3,8 +3,8 @@
@licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.0.9
- @date 16/06/10, 10:52
+ @version 2.1.1
+ @date 17/12/11, 10:48
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -44,10 +44,11 @@
while ($new_products = $res->fetchAssoc() ){
$pd=product::get_item($new_products['products_id']);
$pd->aca=$aca_listing->return_db_min($new_products['products_id']);
+ $pd->type = 'product';
$p[]=$pd;
}
- return new objectInfo(array('title'=>__('table heading upcoming products'), 'content'=>$p ));
+ return new objectInfo(array('title'=>__('table heading upcoming products'), 'content'=>$p , 'type'=>'product' ));
}
Modified: trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Childs_tpl/module.php
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Childs_tpl/module.php 2011-12-18 18:03:39 UTC (rev 3972)
+++ trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Childs_tpl/module.php 2011-12-18 21:41:08 UTC (rev 3973)
@@ -43,7 +43,7 @@
<?php foreach($themodule->module_db->content as $ele): ?>
- <?php if(isset($ele->products_id)): /** PRODUCTS */ ?>
+ <?php if($ele->type =='product'): /** PRODUCTS */ ?>
<li class="one product">
<section class="outerblock">
<div class="innerblock">
@@ -87,14 +87,14 @@
</div>
</section>
</li>
- <?php elseif(isset($ele->content_id)) : /** POSTS */ ?>
+ <?php elseif($ele->type =='content') : /** POSTS */ ?>
<dl class="listing contents <?php echo $page->page_content_clean() ?>">
<dt class="listing_s">
- <a id="<?php echo $ele->content_id; ?>" href="<?php echo $ele->href ; ?>" ><?php echo $ele->content_title ?></a>
+ <a id="<?php echo $ele->id; ?>" href="<?php echo $ele->href ; ?>" ><?php echo $ele->title ?></a>
</dt>
</dl>
- <?php elseif(isset($ele->categories_id)): /** CATEGORIES */ ?>
+ <?php elseif($ele->type =='categorie'): /** CATEGORIES */ ?>
<li class="one categorie">
<section class="outerblock">
<div class="innerblock">
Modified: trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/cfg/init.php
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/cfg/init.php 2011-12-18 18:03:39 UTC (rev 3972)
+++ trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/cfg/init.php 2011-12-18 21:41:08 UTC (rev 3973)
@@ -32,7 +32,7 @@
commenté par defaut
affiche le panneau des définitions de pages
*/
-$this->add_var_page('develop','false');
+$this->add_var_page('develop','true');
/**
Modified: trunk/catalog/install/data/templates/appareil_photo/electronix/cfg/init.php
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/electronix/cfg/init.php 2011-12-18 18:03:39 UTC (rev 3972)
+++ trunk/catalog/install/data/templates/appareil_photo/electronix/cfg/init.php 2011-12-18 21:41:08 UTC (rev 3973)
@@ -19,7 +19,7 @@
commenté par defaut
affiche le panneau des définitions de pages
*/
-$this->add_var_page('develop','false');
+$this->add_var_page('develop','true');
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2011-12-18 18:03:46
|
Revision: 3972
http://oscss.svn.sourceforge.net/oscss/?rev=3972&view=rev
Author: oscim
Date: 2011-12-18 18:03:39 +0000 (Sun, 18 Dec 2011)
Log Message:
-----------
Nombreuse correction d'erreur de notice php
Optimisation du code php du template 2cShopHtml5, et diminution du nombre d'appel au fonction tep_href_link, precalcul?\195?\169 par les driver de data
correction coquille logique sur index
modification de la recuperation des elements de meta keywords, title , description
developpement et amelioration du block frontend de dev
Report de l'ensemble jaavscript / css du block develop dans la class du m?\195?\170me nom, et suppression de leur reference dans les theme public
Ajustement de class pour recuperation des elements dans la class de develop
Modified Paths:
--------------
trunk/catalog/common/classes/seo_url.php
trunk/catalog/includes/application_bottom.php
trunk/catalog/includes/classes/core_page/develop.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/messageStack.php
trunk/catalog/includes/classes/osC_ErrorHandler.php
trunk/catalog/includes/classes/page.php
trunk/catalog/includes/functions/general.php
trunk/catalog/index.php
trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Childs_tpl/header.php
trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Childs_tpl/module.php
trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/content/product_info.php
trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/sample.css
trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/template.php
trunk/catalog/install/data/templates/appareil_photo/electronix/sample.css
Modified: trunk/catalog/common/classes/seo_url.php
===================================================================
--- trunk/catalog/common/classes/seo_url.php 2011-12-18 11:35:15 UTC (rev 3971)
+++ trunk/catalog/common/classes/seo_url.php 2011-12-18 18:03:39 UTC (rev 3972)
@@ -559,6 +559,8 @@
if( _test_bool($this->attributes['SEO_ADD_CPATH_TO_URLS']) && !in_array($anchor_type, array('cPath' , 'divers')) )
$cpath = (isset($_GET['cPath'])? $this->reg_anchors['cPath'].'-'. tep_sanitize_request($_GET['cPath']) .'-': '');
+ else
+ $cpath = '';
return sprintf(
$this->reg_mask[self::$SEO_REWRITE_TYPE],
Modified: trunk/catalog/includes/application_bottom.php
===================================================================
--- trunk/catalog/includes/application_bottom.php 2011-12-18 11:35:15 UTC (rev 3971)
+++ trunk/catalog/includes/application_bottom.php 2011-12-18 18:03:39 UTC (rev 3972)
@@ -42,7 +42,7 @@
}
if(OSCSS_GARBAGE_ERROR == true) {
- if(OSCSS_DEBUG==true && $mock->is_count()) echo $mock->show();
+// if(OSCSS_DEBUG==true && $mock->is_count()) echo $mock->show();
//! close Handler
osC_ErrorHandler::stop();
Modified: trunk/catalog/includes/classes/core_page/develop.php
===================================================================
--- trunk/catalog/includes/classes/core_page/develop.php 2011-12-18 11:35:15 UTC (rev 3971)
+++ trunk/catalog/includes/classes/core_page/develop.php 2011-12-18 18:03:39 UTC (rev 3972)
@@ -18,7 +18,7 @@
public function draw_block(){
error_reporting(0);
- global $page;
+ global $page,$mock;
/// list All mod no type
@@ -76,37 +76,121 @@
$gabartis_li .='<li><h5>'.$value.'</h5>'
.'</li>';
}
- $gabartis_li.='';
+ $gabartis_li.='</ul>';
+ $phperrors ='This list php errors in current page. this errors is not visible and is for debugg solution'.
+ '<table>';
+ if(OSCSS_GARBAGE_ERROR == true)
+ if(OSCSS_DEBUG==true && $mock->is_count()){
+ foreach($mock->Get() as $k=>$value){
+ $phperrors .='<tr><td>'.$k.'</td><td>'.$value.''.'</td></tr>';
+ }
+ }
+ $phperrors.='</table>';
+
+ $MenuBox ='<ul>'.
+'<li><a href="#" onclick="ViewData(\'NormalInfo\');return false; " > Normal Info </a></li>'.
+'<li><a href="#" onclick="ViewData(\'ModNoType\');return false; " > Module No type </a></li>'.
+'<li><a href="#" onclick="ViewData(\'BoxAll\');return false; " > Boxes </a></li>'.
+'<li><a href="#" onclick="ViewData(\'Gabartis\');return false; " > Files (.gab) </a></li>'.
+'<li><a href="#" onclick="ViewData(\'Plugins\');return false; " > Plugins </a></li>'.
+'<li><a href="#" onclick="ViewData(\'Errors\');return false; " > Errors </a></li>'.
+'<li><a href="#" onclick="ViewData(\'CoreAlert\');return false; " > Core Alerts </a></li>'.
+'</ul>';
+
+$InfoBox .=''
+ . '<p><span style="font-weight:bold;">Current language :</span> '.$page->page['language'].'</p>'
+ .'<p><span style="font-weight:bold;">Current type page :</span> '.$page->page['type'].'</p>'
+ .'<p><span style="font-weight:bold;">Current type classes page :</span> '.$page->page['class'].'</p>'
+.'';
+
+
print '<div id="develop" class="develop">'.
- '<h4>obj page <a href="#" title="For close this info edit cfg/init.php and comment this line :: $this->add_var_page(\'develop\',\'true\'); ">(i)</a></h4>'.
+ '<h4>Frontend Develop Menu - <a href="#" onclick="ViewData(\'Help\');return false; " title="view detail">(help)</a></h4>'.
+ '<p> <a href="#" onclick="ViewData(\'NormalInfo\');return false; " title="view detail"> Box Dev Info </a> '.
+ ( ( ($val = $mock->is_count()) >0 )? '<a style="color:red" href="#" onclick="ViewData(\'Errors\');return false; " title="View Error"> php ('.$val.') </a>' : '' ).
+ '</p>'.
'<p><span style="font-weight:bold;">Theme: </span>'.$page->page['template'].'</p>'.
- '<p><span style="font-weight:bold;">Language:</span> '.$page->page['language'].'</p>'.
- '<p><span style="font-weight:bold;">Type:</span> '.$page->page['type'].'</p>'.
'<p><span style="font-weight:bold;">Script : <a href="#" title="page racine">(i)</a></span> '.$page->page['script'].'</p>'.
'<p><span style="font-weight:bold;">Content: <a href="#" title="le contenu principal de la page ne cours">(i)</a></span> <a href="#" title="'.@$page->page['path_content'].'">(i)</a>'.@$page->page['content'].'</p>'.
'<p><span style="font-weight:bold;">Gabarit:</span> '. $page->page['gabarit'].'</p>'.
- '<p><span style="font-weight:bold;">Module No type:</span> <a href="#" onclick="ViewData(\'ModNoType\');return false; " > View </a> </p>'.
- '<p><span style="font-weight:bold;">Boxes <a href="#" title="'._('boite(s) chargée(s)').'">(i)</a>:</span><a href="#" onclick="ViewData(\'BoxAll\'); return false;" > View </a></p>'.
- '<p><span style="font-weight:bold;">Plugin (std):</span><a href="#" onclick="ViewData(\'Plugins\');return false; " > View </a></p>'.
- '<p><span style="font-weight:bold;">Gabarit file .gab :</span><a href="#" onclick="ViewData(\'Gabartis\');return false; " > View </a></p>'.
- ''
+''
;
-// print '<p><span>Erreur(s): </span><a href="#retour_erreur">'.$page->page->messageStack->size('error').'</a></p>';
print '</div>';
+
+ /// box block use js for draw
print '<div id="view-box" class="develop">'.
- ' <div id="DevTopbar">Develop Box infos <a href="#" onclick="CloseBoxDev(); return false;">X</a></div>'.
+ ' <div id="DevTopbar" class="DevBar">Develop Box infos <a href="#" onclick="CloseBoxDev(); return false;">X</a></div>'.
+ ' <div id="DevBottombar" class="DevBar">'.$MenuBox .'</div>'.
+
+ ' <div id="NormalInfo" class="TextDevelop">'.$InfoBox.'</div>'.
' <div id="ModNoType" class="TextDevelop">'.$li .'</div>'.
' <div id="BoxAll" class="TextDevelop">'.$c_li .'</div>'.
' <div id="Plugins" class="TextDevelop">'.$p_li .'</div>'.
' <div id="Gabartis" class="TextDevelop">'.$gabartis_li .'</div>'.
+
+ ' <div id="CoreAlert" class="TextDevelop"> This list message not called and generated by core '.$page->messageStack->_draw() .'</div>'.
+ ' <div id="Errors" class="TextDevelop">'.$phperrors .'</div>'.
+
+ ' <div id="Help" class="TextDevelop">
+<h5>Help this block develop</h5>
+<p> If you\'r closed this block (and block menu in left window),
+go in file and edit cfg/init.php <br />
+
+search and replace "true" by "false"
+<pre>$this->add_var_page(\'develop\',\'false\');</pre>
+<br />
+
+</p>
+ </div>'.
'</div>';
?>
+<style type="text/css">
+
+/* DEB Block debugg public template */
+ #develop{
+ opacity:0.4;
+ filter:alpha(opacity=40); /* For IE8 and earlier */
+ color:black;
+ line-height:17px;
+ background:white none repeat scroll 0 0
+ ; border:1px solid black;
+ padding:1em;
+ position:fixed;
+ right:0;
+ top:0;
+ }
+ #develop p {padding:0; margin:0;}
+
+ #view-box {
+ position:absolute;
+ top:25%;
+ left:25%;
+ width:50%;
+ height:50%;
+ background:white;
+ border:2px solid black;
+ }
+ #view-box .DevBar {width:100%; height:25px; text-align:center; background:black; color:white;}
+ #view-box .DevBar ul *{display:inline-block;}
+ #view-box #DevTopbar a{text-align:right; font-size:20px; color:white; float: right;padding:2px 5px;}
+ #view-box #DevTopbar a:hover {color:gray;}
+
+ #view-box #DevBottombar {position:relative; bottom:0; }
+ #view-box #DevBottombar ul li {padding:2px 5px; border-left: 1px solid white}
+ #view-box #DevBottombar a {color:white;}
+ #view-box #DevBottombar a:hover {color:gray;}
+ #view-box .TextDevelop {padding:1em;overflow:auto;}
+/* END Block debugg public template */
+
+</style>
+
+
<script type="text/javascript">
$().ready(function() {
$("#view-box, div.TextDevelop").hide();
@@ -115,6 +199,7 @@
function ViewData(type) {
var newtype ="#"+type;
+ $("div#develop").css('opacity', 1); // = 1;
$("div.TextDevelop").hide();
$("#view-box").show();
$(newtype).show();
@@ -124,6 +209,7 @@
function CloseBoxDev(){
$("#view-box").hide();
+ $("div#develop").css('opacity', '0.4');
}
</script>
Modified: trunk/catalog/includes/classes/drivers/data/categorie.php
===================================================================
--- trunk/catalog/includes/classes/drivers/data/categorie.php 2011-12-18 11:35:15 UTC (rev 3971)
+++ trunk/catalog/includes/classes/drivers/data/categorie.php 2011-12-18 18:03:39 UTC (rev 3972)
@@ -164,7 +164,7 @@
if(count(self::$cache)>0 && in_array($content['categories_id'],self::$cache) ) $tabl[$content['categories_id']]=self::$object_data[$content['categories_id']];
elseif (!in_array($content['categories_name'],$exclude)) {
$res=$content;
- $res['href']=tep_href_link(FILENAME_PRODUCT_INFO,'categories_id=' . $content['categories_id'] . '&language=' . $display_lang['code']);
+ $res['href']=tep_href_link(FILENAME_PRODUCT_INFO,'categories_id=' . $content['categories_id'] );
$res['key']=$content['categories_id'];
$res['id']=$content['categories_id'];
$res['title']=$content['categories_name'];
@@ -268,8 +268,8 @@
if (tep_not_null($current_category_id)) {
- $cPath_array = array();
- self::get_parent_categories(&$cPath_array, $current_category_id) ;
+// $cPath_array = array();
+ $cPath_array = self::get_parent_categories($cPath_array, $current_category_id) ;
$cPath_array[] = $current_category_id;
$cPath_new = implode('_', $cPath_array);
}
@@ -361,20 +361,23 @@
* \brief Recursively go through the categories and retreive all parent categories IDs
// TABLES: categories
*/
- public static function get_parent_categories(&$categories, $categories_id) {
+ public static function get_parent_categories($categories, $categories_id) {
- if(!isset(self::$object_data[$categories_id]->parent_array)) {
- $db_list=self::get_query((int)$categories_id);
- foreach($db_list as $cats) {
- if ($cats->parent_id == 0) return true;
- $categories[sizeof($categories)] = $cats->parent_id;
- if ($cats->parent_id != $categories_id) {
- self::get_parent_categories($categories, $cats->parent_id);
- }
- }
-// self::$object_data[$categories_id]->parent_array=$categories;
- } else $categories=self::$object_data[$categories_id]->parent_array;
+ if(!isset(self::$object_data[$categories_id]->parent_array)) {
+ $db_list=self::get_query((int)$categories_id);
+ foreach($db_list as $cats) {
+ if ($cats->parent_id == 0) return true;
+ $categories[sizeof($categories)] = $cats->parent_id;
+ if ($cats->parent_id != $categories_id) {
+ $categories = self::get_parent_categories($categories, $cats->parent_id);
+ }
+ }
+ // self::$object_data[$categories_id]->parent_array=$categories;
+ }
+ else
+ $categories=self::$object_data[$categories_id]->parent_array;
+ return $categories;
// $parent_categories_query = tep_db_query("select parent_id from " . TABLE_CATEGORIES . " where categories_id = '" . (int)$categories_id . "' ");
// while ($parent_categories = tep_db_fetch_array($parent_categories_query)) {
Modified: trunk/catalog/includes/classes/drivers/data/content.php
===================================================================
--- trunk/catalog/includes/classes/drivers/data/content.php 2011-12-18 11:35:15 UTC (rev 3971)
+++ trunk/catalog/includes/classes/drivers/data/content.php 2011-12-18 18:03:39 UTC (rev 3972)
@@ -177,7 +177,7 @@
while ($content = $content_query->fetchAssoc()) {
if (!in_array($content['name'],$exclude)) {
$res=$content;
- $res['href']=tep_href_link(FILENAME_CONTENT,'content=' . $content['id'] );
+ $res['href']=tep_href_link(FILENAME_CONTENT,'content=' . $content['id']);
$res['key']=$content['name'];
$res['original']=$content['text'];
$res['images']=array();
@@ -368,8 +368,8 @@
if (tep_db_num_rows($category_query)) {
$category = tep_db_fetch_array($category_query);
- $categories = array();
- tep_get_parent_categories($categories, $category['categories_id']);
+// $categories = array();
+ $categories = tep_get_parent_categories($categories, $category['categories_id']);
$categories = array_reverse($categories);
Modified: trunk/catalog/includes/classes/drivers/data/product.php
===================================================================
--- trunk/catalog/includes/classes/drivers/data/product.php 2011-12-18 11:35:15 UTC (rev 3971)
+++ trunk/catalog/includes/classes/drivers/data/product.php 2011-12-18 18:03:39 UTC (rev 3972)
@@ -252,7 +252,7 @@
while ($content = $content_query->fetchAssoc()) {
if (!in_array($content['products_name'],$exclude)) {
$product=$content;
- $product['href']=tep_href_link(FILENAME_PRODUCT_INFO,'products_id=' . $content['products_id'] . '&language=' . $display_lang['code']);
+ $product['href']=tep_href_link(FILENAME_PRODUCT_INFO,'products_id=' . $content['products_id'] );
$product['key']=$content['products_id'];
$product['id']=$content['products_id'];
$product['title']=(tep_not_null($content['products_model'])?$content['products_model']:$content['products_name']);
@@ -428,8 +428,8 @@
$cPath = '';
if((int)$products_id ==0 )return false;
if( ($category=self::get_item($products_id)) == false) return false;
- $categories = array();
- tep_get_parent_categories($categories, $category->categories_id);
+// $categories = array();
+ $categories =tep_get_parent_categories($categories, $category->categories_id);
$categories = array_reverse($categories);
$cPath = implode('_', $categories);
Modified: trunk/catalog/includes/classes/drivers/page/GabaritTemplate.php
===================================================================
--- trunk/catalog/includes/classes/drivers/page/GabaritTemplate.php 2011-12-18 11:35:15 UTC (rev 3971)
+++ trunk/catalog/includes/classes/drivers/page/GabaritTemplate.php 2011-12-18 18:03:39 UTC (rev 3972)
@@ -51,11 +51,11 @@
case 'listing_cat':
if (!tep_not_null($page->page['var']['cPath'])) $suffixe='error';
else {
- if(strpos($page->page['var']['cPath'],'_')!=false)
- $suffixe='c_'.substr($page->page['var']['cPath'], 0, strpos($page->page['var']['cPath'],'_')).'.childs';
- else
- $suffixe='c_'.$page->page['var']['cPath'];
- }
+ if(strpos($page->page['var']['cPath'],'_')!=false)
+ $suffixe='c_'.substr($page->page['var']['cPath'], 0, strpos($page->page['var']['cPath'],'_')).'.childs';
+ else
+ $suffixe='c_'.$page->page['var']['cPath'];
+ }
break;
}
$p_red=substr($page->page['content'],0,-4);
@@ -181,11 +181,6 @@
protected static function GetHeader($path='header'){
global $page;
- $the_title = $page->page['the_title'];
- $the_desc = $page->page['the_desc'];
- $the_key_words = $page->page['the_key_words'];
-
-
return $page->getPathTemplate().$path.'.php';
}
Modified: trunk/catalog/includes/classes/messageStack.php
===================================================================
--- trunk/catalog/includes/classes/messageStack.php 2011-12-18 11:35:15 UTC (rev 3971)
+++ trunk/catalog/includes/classes/messageStack.php 2011-12-18 18:03:39 UTC (rev 3972)
@@ -3,8 +3,8 @@
\licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
\portion code Copyright (c) 2002 osCommerce
\package osCSS-2 <www http://www.oscss.org>
- \version 2.1.0
- \date 29/11/10, 11:33
+ \version 2.1.1
+ \date 17/12/10, 11:33
\author oscim <mail aur...@os...> <www http://www.oscim.fr>
\encode UTF-8
\class messageStack
@@ -70,12 +70,12 @@
}
/**
- Sortie des erreur
+ @brief Sortie des erreur
*/
private function output($class) {
$output = '<ul>';
for ($i=0, $n=sizeof($this->messages); $i<$n; $i++) {
- if ($this->messages[$i]['class'] == $class) {
+ if ( (tep_not_null($class) && $this->messages[$i]['class'] == $class) || $class =='' ){
$output .='<li '.$this->messages[$i]['params'].' >'. $this->messages[$i]['text'] .'</li>'."\n";
}
}
@@ -84,7 +84,7 @@
}
/**
- Sortie des erreur inline
+ @brief Sortie des erreur inline
*/
private function output_inline($class, $markup) {
for ($i=0, $n=sizeof($this->messages); $i<$n; $i++) {
@@ -111,22 +111,22 @@
}
/**
- Alias public
+ @brief Alias public
*/
public function _add($class, $message, $type='error'){
return $this->add($class, $message, $type);
}
/**
- Draw erreur
+ @brief Draw erreur
*/
public function _draw($type){
- if ($this->size($type) > 0)
- echo '<div id="retour_erreur" class="messageStack">'. $this->output($type) . '</div>';
+ if ($this->size($type) > 0)
+ echo '<div id="retour_erreur" class="messageStack">'. $this->output($type) . '</div>';
}
/**
- Draw erreur inline
+ @brief Draw erreur inline
*/
public function _draw_inline($type, $markup=''){
if (empty($markup)) {$markup = 'span';}
@@ -135,7 +135,7 @@
}
/**
- Draw number error
+ @brief Draw number error
*/
public function _draw_nbr($type){
print $this->size($type);
Modified: trunk/catalog/includes/classes/osC_ErrorHandler.php
===================================================================
--- trunk/catalog/includes/classes/osC_ErrorHandler.php 2011-12-18 11:35:15 UTC (rev 3971)
+++ trunk/catalog/includes/classes/osC_ErrorHandler.php 2011-12-18 18:03:39 UTC (rev 3972)
@@ -3,8 +3,8 @@
\licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
\portion code Copyright (c) 2002 osCommerce
\package osCSS-2 <www http://www.oscss.org>
- \version 2.1.0
- \date 29/11/10, 11:33
+ \version 2.1.1
+ \date 17/12/11, 11:33
\author oscim <mail aur...@os...> <www http://www.oscim.fr>
\encode UTF-8
\file osC_ErrorHandler.php
@@ -212,6 +212,9 @@
public function is_count() {
return ((count($this->_messages)>0)?true:false);
}
+ public function Get() {
+ return $this->_messages;
+ }
public function show() {
return print_r($this->_messages, true);
}
Modified: trunk/catalog/includes/classes/page.php
===================================================================
--- trunk/catalog/includes/classes/page.php 2011-12-18 11:35:15 UTC (rev 3971)
+++ trunk/catalog/includes/classes/page.php 2011-12-18 18:03:39 UTC (rev 3972)
@@ -419,9 +419,10 @@
$the_title='';
}
- $this->page['the_title']=(tep_not_null($the_title)? $the_title : (tep_not_null($this->title)? $this->title: STORE_NAME));
- $this->page['the_desc']=$the_desc;
- $this->page['the_key_words']=$the_key_words;
+ /// meta tags content for html balise
+ $this->page['meta']['title']=(tep_not_null($the_title)? $the_title : (tep_not_null($this->title)? $this->title: STORE_NAME));
+ $this->page['meta']['description']=$the_desc;
+ $this->page['meta']['keywords']=$the_key_words;
}
@@ -758,8 +759,16 @@
/**
\fn the_title()
\brief Nom de la page
+ \note obsolete / retro-compatibilite utliser GetHtmlMeta()
*/
public function the_title(){ return $this->page['the_title'] ; }
+ /**
+ \fn GetHtmlMeta($type)
+ \brief Call meta tags
+ */
+ public function GetHtmlMeta($type = 'title'){
+ return (in_array($type, $this->page['meta'])) ? $this->page['meta'][$type] : false ;;
+ }
/**
\fn the_script()
Modified: trunk/catalog/includes/functions/general.php
===================================================================
--- trunk/catalog/includes/functions/general.php 2011-12-18 11:35:15 UTC (rev 3971)
+++ trunk/catalog/includes/functions/general.php 2011-12-18 18:03:39 UTC (rev 3972)
@@ -1118,7 +1118,7 @@
function tep_get_path($current_category_id = '',$value=false) {return categorie::get_path($current_category_id,$value); }
function tep_count_products_in_category($category_id, $include_inactive = false){return categorie::get_count_products_in_category($category_id, $include_inactive = false); }
function tep_has_category_subcategories($category_id){return categorie::get_has_category_subcategories($category_id); }
-function tep_get_parent_categories(&$categories, $categories_id) { return categorie::get_parent_categories($categories, $categories_id); }
+function tep_get_parent_categories($categories, $categories_id) { return categorie::get_parent_categories($categories, $categories_id); }
function tep_get_subcategories(&$subcategories_array, $parent_id = 0) { return categorie::get_subcategories($subcategories_array, $parent_id); }
function tep_get_categories($categories_array = '', $parent_id = '0', $indent = '') { return categorie::get_categories($categories_array , $parent_id, $indent); }
Modified: trunk/catalog/index.php
===================================================================
--- trunk/catalog/index.php 2011-12-18 11:35:15 UTC (rev 3971)
+++ trunk/catalog/index.php 2011-12-18 18:03:39 UTC (rev 3972)
@@ -138,7 +138,7 @@
if ($aca_module[$module]->check_action($action) ) {
/** Exe == true */
$aca_module[$module]->after_check_action($action);
- // tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action'))));
+ // tep_redirect(tep_href_link('product_info.php', tep_get_all_get_params(array('action'))));
}
}
@@ -222,7 +222,7 @@
$action=(string)tep_db_prepare_input($_GET['action']);
if ($aca_product->check_action('',$action) ) {
$aca_product->after_check_action('',$action);
- tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action'))));
+ tep_redirect(tep_href_link('product_info.php', tep_get_all_get_params(array('action'))));
}
}
@@ -232,7 +232,7 @@
$page->add_var_page('product_info',$product_info);
$page->title=$product_info['title'];
- $breadcrumb->add($product_info['title'], tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . (int)$_GET['products_id'].'&cPath=' . $cPath . ''));
+ $breadcrumb->add($product_info['title'], tep_href_link('product_info.php', 'products_id=' . (int)$_GET['products_id'].'&cPath=' . $cPath . ''));
/**
Incremente nbr de vus du produits
@@ -253,7 +253,7 @@
$recently_viewed = (int)$_GET['products_id'] . ';' . $recently_viewed ;
}
$page->product->pile_img[]=$product_info['products_image'];
- $page_content = $page->force_content(FILENAME_PRODUCT_INFO);
+ $page_content = $page->force_content('product_info.php');
}
Modified: trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Childs_tpl/header.php
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Childs_tpl/header.php 2011-12-18 11:35:15 UTC (rev 3971)
+++ trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Childs_tpl/header.php 2011-12-18 18:03:39 UTC (rev 3972)
@@ -35,12 +35,13 @@
*/
?>
+<!-- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" <?php echo HTML_PARAMS; ?> >
<head>
- <title><?php echo $page->the_title(); ?></title>
- <meta name="description" content="<?php echo $the_desc ?>" />
- <meta name="keywords" content="<?php echo $the_key_words ?>" />
+ <title><?php echo $page->GetHtmlMeta(); ?></title>
+ <meta name="description" content="<?php echo $page->GetHtmlMeta('description'); ?>" />
+ <meta name="keywords" content="<?php echo $page->GetHtmlMeta('keywords'); ?>" />
<meta http-equiv="content-type" content="text/html; charset=<?php echo CHARSET; ?>" />
<meta name="author" content="oscim"/>
<meta name="reply-to" content="<?php echo HEAD_REPLY_TAG_ALL ?>" />
Modified: trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Childs_tpl/module.php
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Childs_tpl/module.php 2011-12-18 11:35:15 UTC (rev 3971)
+++ trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Childs_tpl/module.php 2011-12-18 18:03:39 UTC (rev 3972)
@@ -48,11 +48,11 @@
<section class="outerblock">
<div class="innerblock">
<?php if ($page->_draw_in_page('PRODUCT_LIST_NAME')) { ?>
- <p class="title product"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $ele->products_id) . '" title="header=['.$ele->products_name.'] body=[ ] fade=[on]">' . $ele->products_name . '</a>' ;?></p>
+ <p class="title product"><?php echo '<a href="' . $ele->href . '" title="header=['.$ele->products_name.'] body=[ ] fade=[on]">' . $ele->products_name . '</a>' ;?></p>
<?php } ?>
<?php if ($page->_draw_in_page('PRODUCT_LIST_IMAGE')) { ?>
- <p class="img product"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $ele->products_id) . '" title="header=['.$ele->products_name.'] body=[ ] fade=[on]" >' . tep_image(DIR_WS_IMAGES . @$ele->products_image, $ele->products_name, $page->_conf_value('SMALL_IMAGE_WIDTH'), $page->_conf_value('SMALL_IMAGE_HEIGHT')) . '</a>' ; ?></p>
+ <p class="img product"><?php echo '<a href="' . $ele->href . '" title="header=['.$ele->products_name.'] body=[ ] fade=[on]" >' . tep_image(DIR_WS_IMAGES . @$ele->products_image, $ele->products_name, $page->_conf_value('SMALL_IMAGE_WIDTH'), $page->_conf_value('SMALL_IMAGE_HEIGHT')) . '</a>' ; ?></p>
<?php } ?>
<?php if (tep_not_null($ele->products_price) && $page->_draw_in_page('PRODUCT_LIST_PRICE')) { ?>
@@ -67,7 +67,7 @@
<?php /** @remarks If buy possible and attribute , force choose attribute */ ?>
<?php if (_test_bool($ele->action['buy'] ) && count(product_attribut_info($ele->products_id)) != 0): ?>
- <p><a class="submitBt" href="<?php echo tep_href_link(FILENAME_PRODUCT_INFO,'products_id='.$ele->products_id)?>" ><img border="0" class="left_bt" title="" alt="" src="<?php echo $page->getPathTemplate() ?>images/carticon.png"></a></p>
+ <p><a class="submitBt" href="<?php echo $ele->href ?>" ><img border="0" class="left_bt" title="" alt="" src="<?php echo $page->getPathTemplate() ?>images/carticon.png"></a></p>
<?php /** @remarks If buy possible and attribute */ ?>
@@ -82,7 +82,7 @@
<?php } ?>
- <a class="details prod" href="<?php echo tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $ele->products_id) ?>" title="header=[<?php echo __('view more') ?>] body=[ ] fade=[on]"><?php echo __('more') ?></a>
+ <a class="details prod" href="<?php echo $ele->href ?>" title="header=[<?php echo __('view more') ?>] body=[ ] fade=[on]"><?php echo __('more') ?></a>
</div>
</div>
</section>
@@ -90,7 +90,7 @@
<?php elseif(isset($ele->content_id)) : /** POSTS */ ?>
<dl class="listing contents <?php echo $page->page_content_clean() ?>">
<dt class="listing_s">
- <a id="<?php echo $ele->content_id; ?>" href="<?php echo tep_href_link(FILENAME_CONTENT,'content='.$ele->content_id) ; ?>" ><?php echo $ele->content_title ?></a>
+ <a id="<?php echo $ele->content_id; ?>" href="<?php echo $ele->href ; ?>" ><?php echo $ele->content_title ?></a>
</dt>
</dl>
@@ -99,10 +99,10 @@
<section class="outerblock">
<div class="innerblock">
<p class="title categorie">
- <a href="<?php echo tep_href_link(FILENAME_DEFAULT, 'cPath='.$ele->cPath) ?>"> <?php echo $ele->categories_name ;?></a>
+ <a href="<?php echo $ele->href ?>"> <?php echo $ele->categories_name ;?></a>
</p>
<p class="img categorie">
- <?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT, 'cPath='.$ele->cPath) . '">' . tep_image(DIR_WS_IMAGES . $ele->categories_image, $ele->categories_name, $page->_conf_value('SUBCATEGORY_IMAGE_WIDTH'), $page->_conf_value('SUBCATEGORY_IMAGE_HEIGHT')) . '<br />' . $ele->categories_name . '</a>' ;?>
+ <?php echo '<a href="' . $ele->href. '">' . tep_image(DIR_WS_IMAGES . $ele->categories_image, $ele->categories_name, $page->_conf_value('SUBCATEGORY_IMAGE_WIDTH'), $page->_conf_value('SUBCATEGORY_IMAGE_HEIGHT')) . '<br />' . $ele->categories_name . '</a>' ;?>
</p>
</div>
</section>
Modified: trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/content/product_info.php
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/content/product_info.php 2011-12-18 11:35:15 UTC (rev 3971)
+++ trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/content/product_info.php 2011-12-18 18:03:39 UTC (rev 3972)
@@ -47,7 +47,7 @@
<figure class="images">
<div id="productImage">
<?php /** Le block principal de l'image du produit. */ ?>
- <?php if ( ($replace=$page->prop_ctrl('products_image', $product_info['products_image'])) !=false) echo $replace($product_info);
+ <?php if ( ($replace=$page->prop_ctrl('products_image', $product_info['products_image'])) !=false) echo $replace($product_info, 'lightbox' , $page->_conf_value('HEADING_IMAGE_WIDTH'), $page->_conf_value('HEADING_IMAGE_HEIGHT'));
else { ?>
<script type="text/javascript"><!--
document.write('<?php echo '<p><a href="' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '" onclick="popupWindow(this.href); return false" >' . 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>'; ?>');
Modified: trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/sample.css
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/sample.css 2011-12-18 11:35:15 UTC (rev 3971)
+++ trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/sample.css 2011-12-18 18:03:39 UTC (rev 3972)
@@ -49,53 +49,11 @@
-/* DEB Block debugg public template */
-#develop{
- opacity:0.4;
- filter:alpha(opacity=40); /* For IE8 and earlier */
- color:black;
- line-height:17px;
- background:white none repeat scroll 0 0
- ; border:1px solid black;
- padding:1em;
- position:fixed;
- right:0;
- top:0;
-}
-#develop p {padding:0; margin:0;}
-#view-box {
- position:absolute;
- top:25%;
- left:25%;
- width:50%;
- height:50%;
- background:white;
- border:2px solid black;
-}
-#view-box #DevTopbar {width:100%; height:25px; background:black; color:white;}
-#view-box #DevTopbar a{text-align:right; font-size:20px; color:white; float: right;}
-/* END Block debugg public template */
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
/* --------------------- Css theme ---------------------*/
@@ -103,7 +61,7 @@
/* reset */
* { margin: 0; padding: 0; }
-b r.clear {height:0; width:0;}** *
+b r.clear {height:0; width:0;}** *
/* render html5 elements as block */
header,
footer,
Modified: trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/template.php
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/template.php 2011-12-18 11:35:15 UTC (rev 3971)
+++ trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/template.php 2011-12-18 18:03:39 UTC (rev 3972)
@@ -19,8 +19,6 @@
*/
$load = $page->GetThemeLoad();
-// var_dump($page->the_var('PathChildGab').'header');
-
?>
<?php /** Section appel header unifié */
@@ -114,10 +112,4 @@
</body>
-</html>
-<?php
-
-// print_r($page->page['modules']);
-exit;
-
-?>
\ No newline at end of file
+</html>
\ No newline at end of file
Modified: trunk/catalog/install/data/templates/appareil_photo/electronix/sample.css
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/electronix/sample.css 2011-12-18 11:35:15 UTC (rev 3971)
+++ trunk/catalog/install/data/templates/appareil_photo/electronix/sample.css 2011-12-18 18:03:39 UTC (rev 3972)
@@ -793,32 +793,3 @@
-
-/* DEB Block debugg public template */
-#develop{
- opacity:0.4;
- filter:alpha(opacity=40); /* For IE8 and earlier */
- color:black;
- line-height:17px;
- background:white none repeat scroll 0 0
- ; border:1px solid black;
- padding:1em;
- position:fixed;
- right:0;
- top:0;
-}
-#develop p {padding:0; margin:0;}
-
-#view-box {
- position:absolute;
- top:25%;
- left:25%;
- width:50%;
- height:50%;
- background:white;
- border:2px solid black;
-}
-#view-box #DevTopbar {width:100%; height:25px; background:black; color:white;}
-#view-box #DevTopbar a{text-align:right; font-size:20px; color:white; float: right;}
-
-/* END Block debugg public template */
\ 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-18 11:35:22
|
Revision: 3971
http://oscss.svn.sourceforge.net/oscss/?rev=3971&view=rev
Author: oscim
Date: 2011-12-18 11:35:15 +0000 (Sun, 18 Dec 2011)
Log Message:
-----------
FS#929
report usage light html for row status in newslettersModeles listing page
Modified Paths:
--------------
trunk/catalog/admin/includes/modules/pages/newslettersModeles.php
trunk/catalog/includes/classes/core_page/develop.php
trunk/catalog/includes/functions/general.php
trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/sample.css
trunk/catalog/install/data/templates/appareil_photo/electronix/sample.css
Modified: trunk/catalog/admin/includes/modules/pages/newslettersModeles.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/newslettersModeles.php 2011-12-17 17:02:33 UTC (rev 3970)
+++ trunk/catalog/admin/includes/modules/pages/newslettersModeles.php 2011-12-18 11:35:15 UTC (rev 3971)
@@ -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 20/03/11, 20:48
+ @version 2.1.1
+ @date 17/12/11, 20:48
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class newslettersModeles
@@ -219,11 +219,16 @@
private static function get_item_status($newslettersModeles){
- if ($newslettersModeles['status'] == '1')
- return tep_image(DIR_WS_ICONS . 'icon_status_green.gif', IMAGE_ICON_STATUS_GREEN) . ' <a href="' . tep_href_link(self::FILENAME, 'action=setflag&flag=0&nID=' .$newslettersModeles['nmodele_id']) . '">' . 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, 'action=setflag&flag=1&nID=' . $newslettersModeles['nmodele_id'] ) . '">' . 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','nID','forceajax','type','class','function','funct', 'mod');
+ $query_s='action=setflag&nID=' . $newslettersModeles['nmodele_id'].'&flag=';
+ return '<a href="' . tep_href_link(self::FILENAME, tep_get_all_get_params($exclude).$query_s.(($newslettersModeles['status'] == '1')? '0' : '1') ) . '">'.
+ sprintf(
+ CsrtAction::getFormat('row_flag'),
+ (int)$newslettersModeles['status'],
+ ( ($newslettersModeles['status'] == '1')? IMAGE_ICON_STATUS_GREEN : IMAGE_ICON_STATUS_RED)
+ ).
+ '</a>';
}
Modified: trunk/catalog/includes/classes/core_page/develop.php
===================================================================
--- trunk/catalog/includes/classes/core_page/develop.php 2011-12-17 17:02:33 UTC (rev 3970)
+++ trunk/catalog/includes/classes/core_page/develop.php 2011-12-18 11:35:15 UTC (rev 3971)
@@ -19,52 +19,115 @@
public function draw_block(){
error_reporting(0);
global $page;
- $li='';
+
+
+ /// list All mod no type
reset($page->page['modules']);
+ $li='This list load module no type in current page'.
+ '<ul>';
while($r=each($page->page['modules'])){
if($r['key'] !='list' && $r['key'] !='sort'){
-// ;
while($b=each($r['value'])){
$tab=$page->oscss_modules->_return($b['key']);
- $li .='<a href="#" title="'
- ."\n".'-- class de boite:'.$r['key']
- ."\n".'-- name: '.$tab['name']
- ."\n".'-- path: '.$tab['path']
- ."\n".'-- dir_lang: '.$tab['dir_lang']
- .'">(i)</a> '.$tab['name_clean'].' '
- ."<br /><span></span>";
+ $li .='<li><h5>'.$tab['name_clean'].' </h5> '
+ .'<ul>'
+ .'<li>-- class de boite:'.$r['key'] . '</li>'
+ .'<li>-- name: '.$tab['name'] . '</li>'
+ .'<li>-- path: '.$tab['path'] . '</li>'
+ .'<li>-- dir_lang: '.$tab['dir_lang'] . '</li>'
+ .'</ul>'
+ ."</li>";
}
}
}
+ $li.='</ul>';
- $p_li='';
+
+ /// list all plugins
+ $p_li='This list load plugins in current page'.
+ '<ul>';
reset($page->page['plugins']);
if(isset($page->page['plugins']['actif']) && is_array($page->page['plugins']['actif']))
while($r=each($page->page['plugins']['actif'])){
- $p_li .=$r['value'].', '."<br /><span></span>";
+ $p_li .='<li><h5>'.$r['value'].'</h5>'
+ .'</li>';
}
- $c_li='';
+ $p_li.='';
+ /// list all boxes
reset($page->page['boxes']);
+ $c_li='This list load boxes in current page'.
+ '<ul>';
while($r=each($page->page['boxes'])){
$b=each($r['value']);
- $c_li .='<a href="#" title="'
- ."\n".'-- class de boite:'.$r['key']
- .'">(i)</a> '.$b['key'].' <a href="#" title="'.'">(i)</a>'."<br /><span></span>";
+ $c_li .='<li><h5>'.$b['key'].'</h5>'
+ .'<ul>'
+ .'<li>-- class de boite:'.$r['key'].'</li>'
+ .'</ul></li>';
}
- print '<div id="develop">'.
- '<h4>obj page <a href="#" title="Pour desactiver ce mode, editer le fichier header.php de votre theme est commenté la ligne :: $this->add_var_page(\'develop\',\'true\'); ">(i)</a></h4>'.
- '<p><span>language:</span> '.$page->page['language'].'</p>'.
- '<p><span>type:</span> '.$page->page['type'].'</p>'.
- '<p><span>Script : <a href="#" title="page racine">(i)</a></span> '.$page->page['script'].'</p>'.
- '<p><span>Content: <a href="#" title="le contenu principal de la page ne cours">(i)</a></span> <a href="#" title="'.@$page->page['path_content'].'">(i)</a>'.@$page->page['content'].'</p>'.
- '<p><span>Module:</span> '.$li.'</p>'.
- '<p><span>Boxes <a href="#" title="'._('boite(s) chargée(s)').'">(i)</a>:</span> '.$c_li.'</p>'.
- '<p><span>Plugin (std):</span> '.$p_li.'</p>'.
- '<p><span>Gabarit:</span> '. $page->page['gabarit'].'</p>'.
- '<p><span>template: </span>'.$page->page['template'].'</p>';
+ $c_li.='</ul>';
+
+ /// list all plugins
+ $gabartis_li='This list load all gabarits files (.gab) in current page'.
+ '<ul>';
+ reset($page->page['file_gabarits']);
+ if(isset($page->page['file_gabarits']))
+ foreach($page->page['file_gabarits'] as $value){
+ $gabartis_li .='<li><h5>'.$value.'</h5>'
+ .'</li>';
+ }
+ $gabartis_li.='';
+
+
+ print '<div id="develop" class="develop">'.
+ '<h4>obj page <a href="#" title="For close this info edit cfg/init.php and comment this line :: $this->add_var_page(\'develop\',\'true\'); ">(i)</a></h4>'.
+ '<p><span style="font-weight:bold;">Theme: </span>'.$page->page['template'].'</p>'.
+ '<p><span style="font-weight:bold;">Language:</span> '.$page->page['language'].'</p>'.
+ '<p><span style="font-weight:bold;">Type:</span> '.$page->page['type'].'</p>'.
+ '<p><span style="font-weight:bold;">Script : <a href="#" title="page racine">(i)</a></span> '.$page->page['script'].'</p>'.
+ '<p><span style="font-weight:bold;">Content: <a href="#" title="le contenu principal de la page ne cours">(i)</a></span> <a href="#" title="'.@$page->page['path_content'].'">(i)</a>'.@$page->page['content'].'</p>'.
+ '<p><span style="font-weight:bold;">Gabarit:</span> '. $page->page['gabarit'].'</p>'.
+
+ '<p><span style="font-weight:bold;">Module No type:</span> <a href="#" onclick="ViewData(\'ModNoType\');return false; " > View </a> </p>'.
+ '<p><span style="font-weight:bold;">Boxes <a href="#" title="'._('boite(s) chargée(s)').'">(i)</a>:</span><a href="#" onclick="ViewData(\'BoxAll\'); return false;" > View </a></p>'.
+ '<p><span style="font-weight:bold;">Plugin (std):</span><a href="#" onclick="ViewData(\'Plugins\');return false; " > View </a></p>'.
+ '<p><span style="font-weight:bold;">Gabarit file .gab :</span><a href="#" onclick="ViewData(\'Gabartis\');return false; " > View </a></p>'.
+ ''
+ ;
// print '<p><span>Erreur(s): </span><a href="#retour_erreur">'.$page->page->messageStack->size('error').'</a></p>';
print '</div>';
+
+ print '<div id="view-box" class="develop">'.
+ ' <div id="DevTopbar">Develop Box infos <a href="#" onclick="CloseBoxDev(); return false;">X</a></div>'.
+ ' <div id="ModNoType" class="TextDevelop">'.$li .'</div>'.
+ ' <div id="BoxAll" class="TextDevelop">'.$c_li .'</div>'.
+ ' <div id="Plugins" class="TextDevelop">'.$p_li .'</div>'.
+ ' <div id="Gabartis" class="TextDevelop">'.$gabartis_li .'</div>'.
+ '</div>';
+
+
+ ?>
+<script type="text/javascript">
+ $().ready(function() {
+ $("#view-box, div.TextDevelop").hide();
+ });
+
+ function ViewData(type) {
+ var newtype ="#"+type;
+
+ $("div.TextDevelop").hide();
+ $("#view-box").show();
+ $(newtype).show();
+
+
+ }
+
+ function CloseBoxDev(){
+ $("#view-box").hide();
+ }
+
+</script>
+ <?php
}
}
?>
\ No newline at end of file
Modified: trunk/catalog/includes/functions/general.php
===================================================================
--- trunk/catalog/includes/functions/general.php 2011-12-17 17:02:33 UTC (rev 3970)
+++ trunk/catalog/includes/functions/general.php 2011-12-18 11:35:15 UTC (rev 3971)
@@ -1047,7 +1047,17 @@
include $file;
$contents = ob_get_contents();
ob_end_clean();
- return $contents;
+
+ if($page->GetVar('develop') == true) {
+
+ $page->page['file_gabarits'][] = $file;
+
+ return '<!-- DEVELOP DEB '.$file.' -->'."\n".
+ $contents.
+ "\n".'<!-- DEVELOP END '.$file.' -->';
+ }
+ else
+ return $contents;
}
return false;
}
Modified: trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/sample.css
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/sample.css 2011-12-17 17:02:33 UTC (rev 3970)
+++ trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/sample.css 2011-12-18 11:35:15 UTC (rev 3971)
@@ -49,7 +49,7 @@
-/* Block debugg public template */
+/* DEB Block debugg public template */
#develop{
opacity:0.4;
filter:alpha(opacity=40); /* For IE8 and earlier */
@@ -64,7 +64,19 @@
}
#develop p {padding:0; margin:0;}
+#view-box {
+ position:absolute;
+ top:25%;
+ left:25%;
+ width:50%;
+ height:50%;
+ background:white;
+ border:2px solid black;
+}
+#view-box #DevTopbar {width:100%; height:25px; background:black; color:white;}
+#view-box #DevTopbar a{text-align:right; font-size:20px; color:white; float: right;}
+/* END Block debugg public template */
@@ -82,6 +94,8 @@
+
+
/* --------------------- Css theme ---------------------*/
Modified: trunk/catalog/install/data/templates/appareil_photo/electronix/sample.css
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/electronix/sample.css 2011-12-17 17:02:33 UTC (rev 3970)
+++ trunk/catalog/install/data/templates/appareil_photo/electronix/sample.css 2011-12-18 11:35:15 UTC (rev 3971)
@@ -794,5 +794,31 @@
-/* Block debugg template */
-#develop{background:white none repeat scroll 0 0; border:1px solid black; padding:1em; position:fixed; right:0; top:0;}
\ No newline at end of file
+/* DEB Block debugg public template */
+#develop{
+ opacity:0.4;
+ filter:alpha(opacity=40); /* For IE8 and earlier */
+ color:black;
+ line-height:17px;
+ background:white none repeat scroll 0 0
+ ; border:1px solid black;
+ padding:1em;
+ position:fixed;
+ right:0;
+ top:0;
+}
+#develop p {padding:0; margin:0;}
+
+#view-box {
+ position:absolute;
+ top:25%;
+ left:25%;
+ width:50%;
+ height:50%;
+ background:white;
+ border:2px solid black;
+}
+#view-box #DevTopbar {width:100%; height:25px; background:black; color:white;}
+#view-box #DevTopbar a{text-align:right; font-size:20px; color:white; float: right;}
+
+/* END Block debugg public template */
\ 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-17 17:02:40
|
Revision: 3970
http://oscss.svn.sourceforge.net/oscss/?rev=3970&view=rev
Author: oscim
Date: 2011-12-17 17:02:33 +0000 (Sat, 17 Dec 2011)
Log Message:
-----------
FS#822
suppression des modele de _htaccess devenu obsolete
Modified Paths:
--------------
trunk/catalog/common/classes/seo_url.php
trunk/catalog/includes/filenames.php
Removed Paths:
-------------
trunk/catalog/_.htaccess
trunk/catalog/admin/_.htaccess
Deleted: trunk/catalog/_.htaccess
===================================================================
--- trunk/catalog/_.htaccess 2011-12-17 16:46:41 UTC (rev 3969)
+++ trunk/catalog/_.htaccess 2011-12-17 17:02:33 UTC (rev 3970)
@@ -1,99 +0,0 @@
-# $Id: .htaccess,v 2.0 10.08.2009 18:50:00 oscim Exp $
-# <Directory "/usr/local/apache/htdocs">
-# AllowOverride Options
-# </Directory>
-# The following makes adjustments to the SSL protocol for Internet
-# Explorer browsers
-# <IfModule mod_setenvif.c>
-# <IfDefine SSL>
-# SetEnvIf User-Agent ".*MSIE.*" \
-# nokeepalive ssl-unclean-shutdown \
-# downgrade-1.0 force-response-1.0
-# </IfDefine>
-# </IfModule>
-# Fix certain PHP values
-
-<ifModule mod_expires.c>
- ExpiresActive On
- ExpiresDefault "access plus 1 seconds"
- ExpiresByType text/html "access plus 1 seconds"
- ExpiresByType image/gif "access plus 2592000 seconds"
- ExpiresByType image/jpeg "access plus 2592000 seconds"
- ExpiresByType image/png "access plus 2592000 seconds"
- ExpiresByType text/css "access plus 604800 seconds"
- ExpiresByType text/javascript "access plus 216000 seconds"
- ExpiresByType application/x-javascript "access plus 216000 seconds"
-</ifModule>
-
-<ifModule mod_headers.c>
- <filesMatch "\\.(ico|pdf|flv|jpg|jpeg|png|gif|swf)$">
- Header set Cache-Control "max-age=2592000, public"
- </filesMatch>
- <filesMatch "\\.(css)$">
- Header set Cache-Control "max-age=604800, public"
- </filesMatch>
- <filesMatch "\\.(js)$">
- Header set Cache-Control "max-age=216000, private"
- </filesMatch>
- <filesMatch "\\.(xml|txt)$">
- Header set Cache-Control "max-age=216000, public, must-revalidate"
- </filesMatch>
- <filesMatch "\\.(html|htm|php)$">
- Header set Cache-Control "max-age=1, private, must-revalidate"
- </filesMatch>
-</ifModule>
-
-<IfModule mod_deflate.c>
- AddOutputFilterByType DEFLATE text/css application/javascript application/x-javascript
-</IfModule>
-
-AddDefaultCharset UTF-8
-# FIX
-<IfModule mod_php5.c>
- php_flag register_long_arrays Off
-</IfModule>
-<IfModule mod_rewrite.c>
- RewriteEngine on
- RewriteBase /b2.0.6/
-
- # DEB Sans rewrite, placer des fichier du même nom a la racine
- RewriteRule ^conditions.php$ content.php?_ID=conditions.php&%{QUERY_STRING}
- RewriteRule ^contact.php$ content.php?_ID=contact.php&%{QUERY_STRING}
- RewriteRule ^cookie_usage.php$ content.php?_ID=cookie_usage.php&%{QUERY_STRING}
- RewriteRule ^info_shopping_cart.php$ content.php?_ID=info_shopping_cart.php&%{QUERY_STRING}
- RewriteRule ^tell_a_friend.php$ content.php?_ID=tell_a_friend.php&%{QUERY_STRING}
- RewriteRule ^featured_products.php$ content.php?_ID=featured_products.php&%{QUERY_STRING}
- RewriteRule ^template.php$ content.php?_ID=template.php&%{QUERY_STRING}
- RewriteRule ^privacy.php$ content.php?_ID=privacy.php&%{QUERY_STRING}
- RewriteRule ^listing_best_sellers.php$ content.php?_ID=listing_best_sellers.php&%{QUERY_STRING}
- RewriteRule ^listing_products_new.php$ content.php?_ID=listing_products_new.php&%{QUERY_STRING}
- RewriteRule ^listing_small_price.php$ content.php?_ID=listing_small_price.php&%{QUERY_STRING}
- RewriteRule ^listing_specials.php$ content.php?_ID=listing_specials.php&%{QUERY_STRING}
- RewriteRule ^search_help.php$ content.php?_ID=search_help.php&%{QUERY_STRING}
- RewriteRule ^ssl_check.php$ content.php?_ID=ssl_check.php&%{QUERY_STRING}
- RewriteRule ^shopping_cart.php(.{0,})$ content.php?_ID=shopping_cart.php&%{QUERY_STRING}
- RewriteRule ^shipping.php(.{0,})$ content.php?_ID=shipping.php&%{QUERY_STRING}
- RewriteRule ^sitemap.php$ content.php?_ID=sitemap.php&%{QUERY_STRING}
- RewriteRule ^remove_cart.php$ content.php?_ID=remove_cart.php&%{QUERY_STRING}
- RewriteRule ^product_reviews.php$ content.php?_ID=listing_reviews.php&%{QUERY_STRING}
- RewriteRule ^product_info.php$ index.php?products_id=$2&%{QUERY_STRING}
- RewriteRule ^home.php?(.*)$ index.php?content=$1&%{QUERY_STRING}
- RewriteRule ^account_([a-z_]*).php$ account.php?action=$1&%{QUERY_STRING}
- RewriteRule ^address_([a-z_]*).php$ account.php?aca_mod=address_book&aca_type=account&aca_action=display_view&%{QUERY_STRING}
- # FIN Sans rewrite, placer des fichier du même nom a la racine
- # Prise en charge des appels vers les video
- # RewriteRule ^playlist:([0-9]*)::type:([a-z]*)::pID:([0-9]*)::ext:.flv$ counter.php?action_type=$2&action_class=portfolio&method=counter_media&ppID=$1&products_id=$3 [L]
- # RewriteRule ^playlist:([0-9]*)::type:([a-z]*)::pID:([0-9]*)::ext:.mp3 counter.php?action_type=$2&action_class=portfolio&method=counter_media&ppID=$1&products_id=$3 [L]
- RewriteRule ^(.*)-p-(.*).html$ index.php?products_id=$2&%{QUERY_STRING}
- RewriteRule ^(.*)-c-(.*).html$ index.php?cPath=$2&%{QUERY_STRING}
- RewriteRule ^(.*)-b-(.*).html$ content.php?content=$2&%{QUERY_STRING}
- RewriteRule ^(.*)-m-(.*).html$ index.php?manufacturers_id=$2&%{QUERY_STRING}
- RewriteRule ^(.*)-pi-(.*).html$ popup_image.php?pID=$2&%{QUERY_STRING}
- RewriteRule ^(.*)-t-(.*).html$ content.php?content=$2&%{QUERY_STRING}
- # RewriteRule ^(.*)-pr-(.*).html$ product_reviews.php?products_id=$2&%{QUERY_STRING}
- RewriteRule ^(.*)-pr-(.*).html$ content.php?_ID=listing_reviews.php&products_id=$2&%{QUERY_STRING}
- # RewriteRule ^(.*)-pri-(.*).html$ product_reviews_info.php?products_id=$2&%{QUERY_STRING}
- RewriteRule ^(.*)-i-(.*).html$ information.php?info_id=$2&%{QUERY_STRING}
-
- RewriteRule ^(.*)-d-(.*).html$ $2.php?divers=$2&%{QUERY_STRING}
-</IfModule>
Deleted: trunk/catalog/admin/_.htaccess
===================================================================
--- trunk/catalog/admin/_.htaccess 2011-12-17 16:46:41 UTC (rev 3969)
+++ trunk/catalog/admin/_.htaccess 2011-12-17 17:02:33 UTC (rev 3970)
@@ -1,86 +0,0 @@
-# $Id: .htaccess,v 2.0 10.08.2009 18:50:00 oscim Exp $
-#
-# This is used with Apache WebServers
-# For this to work, you must include the parameter 'Options' to
-# the AllowOverride configuration
-#
-# 'All' with also work. (This configuration is in the
-# apache/conf/httpd.conf file)
-
-# The following makes adjustments to the SSL protocol for Internet
-# Explorer browsers
-
-# <IfModule mod_setenvif.c>
-# <IfDefine SSL>
-# SetEnvIf User-Agent ".*MSIE.*" \
-# nokeepalive ssl-unclean-shutdown \
-# downgrade-1.0 force-response-1.0
-# </IfDefine>
-# </IfModule>
-
-# Fix certain PHP values
-
-
-AddDefaultCharset UTF-8
-
-<ifModule mod_expires.c>
- ExpiresActive On
- ExpiresDefault "access plus 1 seconds"
- ExpiresByType text/html "access plus 1 seconds"
- ExpiresByType image/gif "access plus 2592000 seconds"
- ExpiresByType image/jpeg "access plus 2592000 seconds"
- ExpiresByType image/png "access plus 2592000 seconds"
- ExpiresByType text/css "access plus 604800 seconds"
- ExpiresByType text/javascript "access plus 216000 seconds"
- ExpiresByType application/x-javascript "access plus 216000 seconds"
-</ifModule>
-
-<ifModule mod_headers.c>
- <filesMatch "\\.(ico|pdf|flv|jpg|jpeg|png|gif|swf)$">
- Header set Cache-Control "max-age=2592000, public"
- </filesMatch>
- <filesMatch "\\.(css)$">
- Header set Cache-Control "max-age=604800, public"
- </filesMatch>
- <filesMatch "\\.(js)$">
- Header set Cache-Control "max-age=216000, private"
- </filesMatch>
- <filesMatch "\\.(xml|txt)$">
- Header set Cache-Control "max-age=216000, public, must-revalidate"
- </filesMatch>
- <filesMatch "\\.(html|htm|php)$">
- Header set Cache-Control "max-age=1, private, must-revalidate"
- </filesMatch>
-</ifModule>
-
-<IfModule mod_deflate.c>
- AddOutputFilterByType DEFLATE text/css application/javascript application/x-javascript
-</IfModule>
-
-# FIX
-<IfModule mod_php5.c>
- php_flag register_long_arrays On
-</IfModule>
-
-<IfModule mod_rewrite.c>
- RewriteEngine on
- RewriteBase /admin
-
- RewriteRule ^$ index.php?page_admin=index [L]
- RewriteRule ^rss.php rss.php?%{QUERY_STRING} [L]
-
- RewriteRule ^attributeManager/attributeManager/(.*)$ attributeManager/$1 [L]
- RewriteRule ^(attributeManager/.*)$ $1 [L]
- RewriteRule (.*plugins/.*)$ $1 [L]
- RewriteRule (.*editeur/.*)$ $1 [L]
- RewriteRule (.*template/.*)$ $1 [L]
- RewriteRule (.*images/.*)$ $1 [L]
- RewriteRule (.*includes/.*)$ $1 [L]
- RewriteRule (.*\.css)$ $1[L]
- RewriteRule (.*logoff\.ph.*)$ $1 [L]
- RewriteRule (.*login\.ph.*)$ $1 [L]
- RewriteRule (.*password_forgotten\.ph.*)$ $1 [L]
- RewriteRule (.*popup_image\.ph.*)$ $1 [L]
- RewriteRule (.*login\.ph.*)$ $1 [L]
- RewriteRule ([0-9A-Za-z_&=-]*)(.php)?(.*)$ index.php?page_admin=$1&%{QUERY_STRING} [L]
-</IfModule>
\ No newline at end of file
Modified: trunk/catalog/common/classes/seo_url.php
===================================================================
--- trunk/catalog/common/classes/seo_url.php 2011-12-17 16:46:41 UTC (rev 3969)
+++ trunk/catalog/common/classes/seo_url.php 2011-12-17 17:02:33 UTC (rev 3970)
@@ -154,7 +154,7 @@
* @param $languages_id integer
*/
private function __construct($languages_id){
- global $session_started, $SID;
+ global $session_started, $SID,$seo_pages;
$this->DB= Database::getInstance();
@@ -166,24 +166,7 @@
/// liaison header_tag
$this->header_tag=array();
-//ojp FILENAME_LINKS
- $seo_pages=array(
- FILENAME_DEFAULT,
- FILENAME_POPUP_IMAGE,
- FILENAME_PRODUCT_INFO,
- FILENAME_CONTENT,
- FILENAME_ADVANCED_SEARCH,
- FILENAME_PRODUCTS_NEW,
- FILENAME_SMALL_PRICE,
- FILENAME_SPECIALS,
- FILENAME_BEST_SELLERS,
- FILENAME_SITEMAP,
-// FILENAME_HOME,
- FILENAME_TEMPLATE,
- FILENAME_CONTACT_US,
- FILENAME_SHOPPING_CART
- );
- if ( defined('FILENAME_LINKS') ) $seo_pages[] = FILENAME_LINKS;
+ $seo_pages[] = FILENAME_DEFAULT;
$this->attributes = array(
Modified: trunk/catalog/includes/filenames.php
===================================================================
--- trunk/catalog/includes/filenames.php 2011-12-17 16:46:41 UTC (rev 3969)
+++ trunk/catalog/includes/filenames.php 2011-12-17 17:02:33 UTC (rev 3970)
@@ -8,6 +8,9 @@
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
+
+ define('FILENAME_DEFAULT', 'index.php');
+
// define the filenames used in the project
define('FILENAME_AJAX', 'ajax_exe.php');
define('FILENAME_ACCOUNT', 'account.php');
@@ -31,11 +34,11 @@
define('FILENAME_CHECKOUT_SUCCESS', 'checkout_success.php');
define('FILENAME_CONTACT_US', 'contact.php');
- define('FILENAME_CONTENT', 'content.php');
+
define('FILENAME_COOKIE_USAGE', 'cookie_usage.php');
define('FILENAME_CREATE_ACCOUNT', 'create_account.php');
define('FILENAME_CREATE_ACCOUNT_SUCCESS', 'create_account_success.php');
- define('FILENAME_DEFAULT', 'index.php');
+
define('FILENAME_DOWNLOAD', 'download.php');
define('FILENAME_INFO_SHOPPING_CART', 'info_shopping_cart.php');
define('FILENAME_HOME', 'home.php');
@@ -45,7 +48,6 @@
define('FILENAME_POPUP_IMAGE', 'popup_image.php');
define('FILENAME_PRINT_CATALOG', 'print_catalog.php');
- define('FILENAME_PRODUCT_INFO', 'product_info.php');
define('FILENAME_PRODUCT_LISTING', 'product_listing.php');
define('FILENAME_NEW_PRODUCTS', 'new_products.php');
@@ -54,11 +56,10 @@
define('FILENAME_SEARCH_HELP', 'search_help.php');
define('FILENAME_SHIPPING', 'shipping.php');
- define('FILENAME_SHOPPING_CART', 'shopping_cart.php');
+
define('FILENAME_SPECIALS', 'listing_specials.php');
define('FILENAME_SSL_CHECK', 'ssl_check.php');
define('FILENAME_TELL_A_FRIEND', 'tell_a_friend.php');
-
define('TEMPLATE_FILE', 'template.php');
define('FILENAME_UPCOMING_PRODUCTS', 'upcoming_products.php');
define('FILENAME_SMALL_PRICE', 'listing_small_price.php');
@@ -72,8 +73,13 @@
/* One Page Checkout - BEGIN */
define('FILENAME_CHECKOUT', 'checkout.php');
-/* One Page Checkout - END */
+ /* Retrocompatibilite */
+ define('FILENAME_CONTENT', FILENAME_DEFAULT);
+ define('FILENAME_PRODUCT_INFO', FILENAME_DEFAULT);
+ define('FILENAME_SHOPPING_CART', FILENAME_DEFAULT);
+
+
/**
@var File for register user
Add name for contraint login in table_file_modules.php
@@ -90,4 +96,26 @@
FILENAME_LOGIN,
FILENAME_PASSWORD_FORGOTTEN
);
+
+ /**
+ @var File for register SEO
+ Add name for seo url in table_file_modules.php
+ */
+
+ $seo_pages=array(
+ FILENAME_DEFAULT,
+ FILENAME_POPUP_IMAGE,
+// FILENAME_PRODUCT_INFO,
+// FILENAME_CONTENT,
+ FILENAME_ADVANCED_SEARCH,
+ FILENAME_PRODUCTS_NEW,
+ FILENAME_SMALL_PRICE,
+ FILENAME_SPECIALS,
+ FILENAME_BEST_SELLERS,
+ FILENAME_SITEMAP,
+// FILENAME_HOME,
+ FILENAME_TEMPLATE,
+ FILENAME_CONTACT_US,
+ FILENAME_SHOPPING_CART
+ );
?>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|