You can subscribe to this list here.
| 2011 |
Jan
|
Feb
|
Mar
(4) |
Apr
(57) |
May
(31) |
Jun
(21) |
Jul
(11) |
Aug
(23) |
Sep
(22) |
Oct
(36) |
Nov
(62) |
Dec
(85) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2012 |
Jan
(24) |
Feb
(24) |
Mar
(65) |
Apr
(232) |
May
(118) |
Jun
(22) |
Jul
(54) |
Aug
(57) |
Sep
(14) |
Oct
(27) |
Nov
(16) |
Dec
(19) |
| 2013 |
Jan
(16) |
Feb
(12) |
Mar
(3) |
Apr
(17) |
May
(2) |
Jun
(30) |
Jul
(33) |
Aug
(19) |
Sep
(35) |
Oct
(58) |
Nov
(27) |
Dec
(64) |
| 2014 |
Jan
(102) |
Feb
(80) |
Mar
(15) |
Apr
(4) |
May
(3) |
Jun
(3) |
Jul
(5) |
Aug
(11) |
Sep
(15) |
Oct
|
Nov
(3) |
Dec
(5) |
| 2015 |
Jan
(5) |
Feb
(4) |
Mar
(2) |
Apr
(11) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(9) |
Nov
(10) |
Dec
|
| 2016 |
Jan
(3) |
Feb
(2) |
Mar
(18) |
Apr
(13) |
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
(4) |
Oct
|
Nov
|
Dec
|
|
From: <os...@us...> - 2012-04-06 17:11:37
|
Revision: 4170
http://oscss.svn.sourceforge.net/oscss/?rev=4170&view=rev
Author: oscim
Date: 2012-04-06 17:11:30 +0000 (Fri, 06 Apr 2012)
Log Message:
-----------
Suite dev et amelioration gestion et constructeur
Modified Paths:
--------------
trunk/dev/GenerCode/datatype/index.php
trunk/dev/GenerCode/index.php
Added Paths:
-----------
trunk/dev/GenerCode/ModuleType/
trunk/dev/GenerCode/ModuleType/index.php
trunk/dev/GenerCode/class.GenerCode.php
Removed Paths:
-------------
trunk/dev/GenerCode/class.CreateDataType.php
trunk/dev/GenerCode/datatype/generat.php
Added: trunk/dev/GenerCode/ModuleType/index.php
===================================================================
--- trunk/dev/GenerCode/ModuleType/index.php (rev 0)
+++ trunk/dev/GenerCode/ModuleType/index.php 2012-04-06 17:11:30 UTC (rev 4170)
@@ -0,0 +1,158 @@
+<?php
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 05/04/2012, 09:40
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+ @note if yoru copie this file replace all ModuleType by new name folder
+*/
+global $current;
+
+
+
+$arrReturn = array();
+// Scan directory
+$folder = 'ModuleType/Modele/catalog/includes/modules/';
+foreach (scandir($current . $folder) as $strFile) {
+ if ( in_array($strFile , array( '.' , '..' , '.svn') ) || !is_dir($current . $folder . $strFile) ) continue;
+ $arrReturn[] = array('id'=>$strFile, 'text'=>$strFile);
+}
+
+
+/**
+ @brief Adjust Class for this page
+*/
+class GenerCodeModuleType
+ extends GenerCode{
+
+ function __construct($conf ){
+
+
+ /*$curent = */ $conf->curent;
+ $conf->name = tep_db_prepare_input($_GET['name']);
+ $conf->match = tep_db_prepare_input($_GET['module']);
+// $conf->head_tag = false;
+ $conf->level = 'stable';
+// exit;
+ $this->modele_path = $conf->modele_path;
+
+
+ $this->allsearch=array(
+ '_MODTYPENAME_MAJ_',
+ '_MODTYPENAME_',
+ );
+
+ $this->allreplace=array(
+ strtoupper($conf->name),
+ $conf->name
+ );
+
+
+ $this->folder = $conf->curent .'/'. strtoupper($conf->name).'_'.$conf->level.'/';
+
+ if(!file_exists($this->folder) || !is_dir($this->folder)) {
+ mkdir($this->folder);
+ }
+
+ $this->process();
+// }
+
+
+ echo 'le dossier creer ce situe :' . $this->folder;
+
+ }
+
+
+ function process($current=''){
+
+ if (!empty($current) && substr($current, -1, 1) != '/') $current .= '/';
+
+ $path_mod = $this->modele_path . $current;
+
+ foreach($this->browse($path_mod) as $row){
+var_dump('#.*(modules/'.$conf->match.').*#i', $path_mod.$row);
+
+ if(is_dir($path_mod.$row)) {
+
+ mkdir( $this->stringreplace($this->folder . $current. $row) );
+ $this->process($current.$row);
+ }
+ elseif(
+ ( preg_match('#.*(modules/'.$conf->match.').*#i', $path_mod.$row ) ) //
+ ) {
+
+
+ $res=file_get_contents($path_mod.$row);
+
+ $file_contents = $this->stringreplace($res);
+
+ $fp = fopen( $this->stringreplace($this->folder . $current. $row) , 'w');
+ fputs($fp, $file_contents);
+ fclose($fp);
+ }
+ }
+ }
+
+}
+
+
+
+
+/**
+ Action
+*/
+if(isset($_GET['name']) && !empty($_GET['name'])){
+
+ $conf = new stdClass();
+ $conf->curent = $current . 'ModuleType/';
+ $conf->name = tep_db_prepare_input($_GET['name']);
+ $conf->seotag = tep_db_prepare_input($_GET['seotag']);
+ $conf->head_tag = false;
+ $conf->level = 'stable';
+ $conf->modele_path = $conf->curent . 'Modele/';
+
+ $object = new GenerCodeModuleType($conf);
+
+ exit;
+}
+
+?>
+
+
+<h2>Creat new typed module</h2>
+
+This module create is base structure module and current methode ,interface or extends classe;
+
+
+Next generate, adjust methode and display.
+
+<form>
+</p>
+<table>
+ <tr>
+ <td>Master name for datatype (this is string type for manipulate datatype)</td>
+ <td><?php echo tep_draw_input_field('name', 'name') ?>(string) full name (no special caratere)</td>
+ </tr>
+
+<!-- <tr>
+ <td>quick tag for rewrite</label>
+ <td><?php //echo tep_draw_input_field('seotag', 'seotag') ?>(string) quik key </td>
+ </tr>-->
+ <tr>
+ <td>other rows in master table, respect classique sql commande ; just subline in create </label>
+ <td><?php echo tep_draw_pull_down_menu('module','', $arrReturn) ?></td>
+ </tr>
+</table>
+<!-- <p>
+ <label>add head_tag</label>
+ <?php echo tep_draw_checkbox_field('head_tag', 'head_tag', 'active') ?>
+ </p>-->
+
+
+ <p>
+ <input type="hidden" name="goto" value="ModuleType" />
+ <input type="submit" value="Translate" />
+ </p>
+</form>
Deleted: trunk/dev/GenerCode/class.CreateDataType.php
===================================================================
--- trunk/dev/GenerCode/class.CreateDataType.php 2012-04-06 13:02:17 UTC (rev 4169)
+++ trunk/dev/GenerCode/class.CreateDataType.php 2012-04-06 17:11:30 UTC (rev 4170)
@@ -1,125 +0,0 @@
-<?php
-/**
- @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
- @package osCSS-2 <www http://www.oscss.org>
- @version 2.1.1
- @date 05/04/2012, 09:40
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-8
-*/
-
-
-
-
-
-Class CreateDataType{
-
-
- protected $head_tag = false;
-
- function __construct($conf /*$curent, $name, $seotag, $head_tag=false*/){
-
-
- /*$curent = */ $conf->curent;
- $conf->name = tep_db_prepare_input($_GET['name']);
- $conf->seotag = tep_db_prepare_input($_GET['seotag']);
- $conf->head_tag = false;
- $conf->level = 'stable';
-
- $this->modele_path = $conf->modele_path;
-
-
- $this->allsearch=array(
-'_DATATYPE_REPLACE_SEOTAG_',
-'_DATATYPE_REPLACE_MAJ_',
-'_DATATYPE_REPLACE_UCWORDS_',
-'_DATATYPE_REPLACE_'
-);
-
- $this->allreplace=array(
-$conf->seotag,
-strtoupper($conf->name),
-ucwords($conf->name),
-$conf->name
-);
-
-
- $this->folder = $conf->curent .'/'. strtoupper($conf->name).'_'.$conf->level.'/';
-
- if(!file_exists($this->folder) || !is_dir($this->folder)) {
- mkdir($this->folder);
- }
-
- $this->process();
-// }
-
-
- echo 'le dossier creer ce situe :' . $this->folder;
-
- }
-
-
-
- function process($current=''){
-
- if (!empty($current) && substr($current, -1, 1) != '/') $current .= '/';
-
- $path_mod = $this->modele_path . $current;
-
- foreach($this->browse($path_mod) as $row){
-// if(
-// ( !$this->head_tag || ( $this->head_tag && substr($row,0,11) =='header_tags' ) ) //
-// )
- if(is_dir($path_mod.$row)) {
-
- mkdir( $this->stringreplace($this->folder . $current. $row) );
- $this->process($current.$row);
- }
- else {
-
-
- $res=file_get_contents($path_mod.$row);
-
- $file_contents = $this->stringreplace($res);
-
- $fp = fopen( $this->stringreplace($this->folder . $current. $row) , 'w');
- fputs($fp, $file_contents);
- fclose($fp);
- }
- }
- }
-
-
- function stringreplace($string){
-// var_dump($string);
- return str_replace(
- $this->allsearch ,
- $this->allreplace,
- $string);
- }
-
-
- function browse($strFolder){
- // Add trailing slash
- if (substr($strFolder, -1, 1) != '/') $strFolder .= '/';
-
- // Load from cache
-// if (isset($arrScanCache[$strFolder])) return $arrScanCache[$strFolder];
-
- $arrReturn = array();
- // Scan directory
- foreach (scandir($strFolder) as $strFile) {
- if ($strFile == '.' || $strFile == '..' || $strFile == '.svn' /*|| substr($strFile,-1) != '~'*/) continue;
- $arrReturn[] = $strFile;
- }
-
-// $arrScanCache[$strFolder] = $arrReturn;
- return $arrReturn;
- }
-
-
-
-}
-
-
-?>
\ No newline at end of file
Copied: trunk/dev/GenerCode/class.GenerCode.php (from rev 4157, trunk/dev/GenerCode/class.CreateDataType.php)
===================================================================
--- trunk/dev/GenerCode/class.GenerCode.php (rev 0)
+++ trunk/dev/GenerCode/class.GenerCode.php 2012-04-06 17:11:30 UTC (rev 4170)
@@ -0,0 +1,125 @@
+<?php
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 05/04/2012, 09:40
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+
+
+
+
+
+Class GenerCode{
+
+
+ protected $head_tag = false;
+
+// function __construct($conf /*$curent, $name, $seotag, $head_tag=false*/){
+//
+//
+// /*$curent = */ $conf->curent;
+// $conf->name = tep_db_prepare_input($_GET['name']);
+// $conf->seotag = tep_db_prepare_input($_GET['seotag']);
+// $conf->head_tag = false;
+// $conf->level = 'stable';
+//
+// $this->modele_path = $conf->modele_path;
+//
+//
+// $this->allsearch=array(
+// '_DATATYPE_REPLACE_SEOTAG_',
+// '_DATATYPE_REPLACE_MAJ_',
+// '_DATATYPE_REPLACE_UCWORDS_',
+// '_DATATYPE_REPLACE_'
+// );
+//
+// $this->allreplace=array(
+// $conf->seotag,
+// strtoupper($conf->name),
+// ucwords($conf->name),
+// $conf->name
+// );
+//
+//
+// $this->folder = $conf->curent .'/'. strtoupper($conf->name).'_'.$conf->level.'/';
+//
+// if(!file_exists($this->folder) || !is_dir($this->folder)) {
+// mkdir($this->folder);
+// }
+//
+// $this->process();
+// // }
+//
+//
+// echo 'le dossier creer ce situe :' . $this->folder;
+//
+// }
+
+
+
+ function process($current=''){
+
+ if (!empty($current) && substr($current, -1, 1) != '/') $current .= '/';
+
+ $path_mod = $this->modele_path . $current;
+
+ foreach($this->browse($path_mod) as $row){
+// if(
+// ( !$this->head_tag || ( $this->head_tag && substr($row,0,11) =='header_tags' ) ) //
+// )
+ if(is_dir($path_mod.$row)) {
+
+ mkdir( $this->stringreplace($this->folder . $current. $row) );
+ $this->process($current.$row);
+ }
+ else {
+
+
+ $res=file_get_contents($path_mod.$row);
+
+ $file_contents = $this->stringreplace($res);
+
+ $fp = fopen( $this->stringreplace($this->folder . $current. $row) , 'w');
+ fputs($fp, $file_contents);
+ fclose($fp);
+ }
+ }
+ }
+
+
+ function stringreplace($string){
+// var_dump($string);
+ return str_replace(
+ $this->allsearch ,
+ $this->allreplace,
+ $string);
+ }
+
+
+ function browse($strFolder){
+ // Add trailing slash
+ if (substr($strFolder, -1, 1) != '/') $strFolder .= '/';
+
+ // Load from cache
+// if (isset($arrScanCache[$strFolder])) return $arrScanCache[$strFolder];
+
+ $arrReturn = array();
+ // Scan directory
+ foreach (scandir($strFolder) as $strFile) {
+ if ($strFile == '.' || $strFile == '..' || $strFile == '.svn' /*|| substr($strFile,-1) != '~'*/) continue;
+ $arrReturn[] = $strFile;
+ }
+
+// $arrScanCache[$strFolder] = $arrReturn;
+ return $arrReturn;
+ }
+
+
+
+}
+
+
+?>
\ No newline at end of file
Deleted: trunk/dev/GenerCode/datatype/generat.php
===================================================================
--- trunk/dev/GenerCode/datatype/generat.php 2012-04-06 13:02:17 UTC (rev 4169)
+++ trunk/dev/GenerCode/datatype/generat.php 2012-04-06 17:11:30 UTC (rev 4170)
@@ -1,93 +0,0 @@
-<?php
-/**
- @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
- @package osCSS-2 <www http://www.oscss.org>
- @version 2.1.1
- @date 05/04/2012, 09:40
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-8
-*/
-
-// base dir catalog
-$curent = dirname(__FILE__);
-$base_path=substr( $curent, 0, -strlen('dev/datatype/') ).'/catalog/';
-
-// add path in incldue_path
-set_include_path($base_path. PATH_SEPARATOR .$base_path.'includes/classes/'. PATH_SEPARATOR . get_include_path() );
-//update base script
-chdir($base_path);
-
-// init file core oscss
-if(!@include('includes/appli_top_Test.php')) die ('no found appli_top_Test.php');
-
-// include()
-
-error_reporting(E_ALL);
-
-
-include('class.CreateDataType.php');
-
-
-
-/**
-
-*/
-
-
-
-
-
-
-
-if(isset($_GET['name']) && !empty($_GET['name'])){
-
- $conf = new stdClass();
- $conf->curent = $curent;
- $conf->name = tep_db_prepare_input($_GET['name']);
- $conf->seotag = tep_db_prepare_input($_GET['seotag']);
- $conf->head_tag = false;
- $conf->level = 'stable';
- $conf->modele_path = $curent . '/Modele/';
-
- $object = new CreateDataType($conf);
-
-}
-
-?>
-
-
-<h2>Creation of a new datatype extension coupled with the categories</h2>
-
-<form>
-<p>
-<?php
-// $arrReturn = array();
-// // Scan directory
-// foreach (scandir($strFolder) as $strFile) {
-// if ($strFile == '.' || $strFile == '..' && is_dir() ) continue;
-// $arrReturn[] = $strFile;
-// }
-?>
-
-</p>
-<table>
- <tr>
- <td>Master name for datatype (this is string type for manipulate datatype)</td>
- <td><?php echo tep_draw_input_field('name', 'name') ?>(string) full name (no special caratere)</td>
- </tr>
-
- <tr>
- <td>quick tag for rewrite</label>
- <td><?php echo tep_draw_input_field('seotag', 'seotag') ?>(string) quik key </td>
- </tr>
-</table>
-<!-- <p>
- <label>add head_tag</label>
- <?php echo tep_draw_checkbox_field('head_tag', 'head_tag', 'active') ?>
- </p>-->
-
-
- <p>
- <input type="submit" value="Translate" />
- </p>
-</form>
Modified: trunk/dev/GenerCode/datatype/index.php
===================================================================
--- trunk/dev/GenerCode/datatype/index.php 2012-04-06 13:02:17 UTC (rev 4169)
+++ trunk/dev/GenerCode/datatype/index.php 2012-04-06 17:11:30 UTC (rev 4170)
@@ -9,8 +9,70 @@
*/
global $current;
+
+
if(isset($_GET['name']) && !empty($_GET['name'])){
+
+class GenerCodeDataType
+ extends GenerCode{
+
+ function __construct($conf /*$curent, $name, $seotag, $head_tag=false*/){
+
+
+ /*$curent = */ $conf->curent;
+ $conf->name = tep_db_prepare_input($_GET['name']);
+ $conf->seotag = tep_db_prepare_input($_GET['seotag']);
+ $conf->head_tag = false;
+ $conf->level = 'stable';
+
+ $this->modele_path = $conf->modele_path;
+
+
+ $this->allsearch=array(
+ '_DATATYPE_REPLACE_SEOTAG_',
+ '_DATATYPE_REPLACE_MAJ_',
+ '_DATATYPE_REPLACE_UCWORDS_',
+ '_DATATYPE_REPLACE_'
+ );
+
+ $this->allreplace=array(
+ $conf->seotag,
+ strtoupper($conf->name),
+ ucwords($conf->name),
+ $conf->name
+ );
+
+
+ $this->folder = $conf->curent .'/'. strtoupper($conf->name).'_'.$conf->level.'/';
+
+ if(!file_exists($this->folder) || !is_dir($this->folder)) {
+ mkdir($this->folder);
+ }
+
+ $this->process();
+// }
+
+
+ echo 'le dossier creer ce situe :' . $this->folder;
+
+ }
+
+
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
$conf = new stdClass();
$conf->curent = $current . 'datatype/';
$conf->name = tep_db_prepare_input($_GET['name']);
@@ -19,7 +81,7 @@
$conf->level = 'stable';
$conf->modele_path = $conf->curent . 'Modele/';
- $object = new CreateDataType($conf);
+ $object = new GenerCodeDataType($conf);
exit;
}
Modified: trunk/dev/GenerCode/index.php
===================================================================
--- trunk/dev/GenerCode/index.php 2012-04-06 13:02:17 UTC (rev 4169)
+++ trunk/dev/GenerCode/index.php 2012-04-06 17:11:30 UTC (rev 4170)
@@ -26,7 +26,7 @@
error_reporting(E_ALL);
-include('class.CreateDataType.php');
+include('class.GenerCode.php');
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-04-06 13:02:28
|
Revision: 4169
http://oscss.svn.sourceforge.net/oscss/?rev=4169&view=rev
Author: oscim
Date: 2012-04-06 13:02:17 +0000 (Fri, 06 Apr 2012)
Log Message:
-----------
correction module
Ajustement et ajout usage notification
Modified Paths:
--------------
trunk/catalog/admin/includes/classes/drivers/sqladmingroups.php
trunk/catalog/admin/includes/gabarit/adminGroup/display_view.delete.gab
trunk/catalog/admin/includes/gabarit/adminGroup/display_view.edit.gab
trunk/catalog/admin/includes/modules/pages/adminGroup.php
trunk/extensions/CUSTOMERS_GROUPS_stable/install.xml
Removed Paths:
-------------
trunk/extensions/CUSTOMERS_GROUPS_stable/catalog/admin/includes/gabarit/customers_groups.edit.gab
trunk/extensions/CUSTOMERS_GROUPS_stable/catalog/admin/includes/gabarit/customers_groups.listing.gab
Modified: trunk/catalog/admin/includes/classes/drivers/sqladmingroups.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqladmingroups.php 2012-04-06 13:01:24 UTC (rev 4168)
+++ trunk/catalog/admin/includes/classes/drivers/sqladmingroups.php 2012-04-06 13:02:17 UTC (rev 4169)
@@ -107,6 +107,9 @@
if(isset($option['name'])) $sql .="AND admin_groups_name = '".(int)(string)tep_db_input($option['name'])."' ";
+ if($sql =='')
+ return false;
+
$sql="SELECT * FROM " . TABLE_ADMIN . " a ".
" LEFT JOIN " . TABLE_ADMIN_GROUPS . " g ON (a.admin_groups_id=g.admin_groups_id) ".
" WHERE ".substr($sql,3);
@@ -143,21 +146,16 @@
else
return false;
+ // index des notification pour ce groupe
+ $DB->query("delete from " . TABLE_NOTIFICATION . " where chknotif_user = '" . (int)$_id . "' AND chknotif_uniq = '0' ");
+ // reliquat message de ce groupe
+ $DB->query("delete from " . TABLE_ADMIN_NOTIFICATION . " where user_id = '" . (int)$_id . "' AND notif_type = '0' ");
+ // utilisateur de ce groupe
+ $res = sqladminuser::fetch(array('group_id'=>(int)$_id));
+ // groupe
+ $DB->query("delete from " . TABLE_ADMIN . " where admin_id = '" . (int)$_id . "'");
- // ACA START DELETE CATEGORY
-// self::$modules->delete($categories[$i]['id']);
-
-// $DB->query("delete from " . TABLE_ADMIN_NOTIFICATION . " where user_id = '" . (int)$_id . "' AND notif_type = '1' ");
- $res = sqladminuser::fetch(array('group_id'=>(int)$_id));
-
- print_r($res);
-
-exit;
-
-// $DB->query("delete from " . TABLE_ADMIN_GROUPS . " where admin_id = '" . (int)$_id . "'");
-
-
return true;
}
Modified: trunk/catalog/admin/includes/gabarit/adminGroup/display_view.delete.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/adminGroup/display_view.delete.gab 2012-04-06 13:01:24 UTC (rev 4168)
+++ trunk/catalog/admin/includes/gabarit/adminGroup/display_view.delete.gab 2012-04-06 13:02:17 UTC (rev 4169)
@@ -24,7 +24,6 @@
<?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; ?>
Modified: trunk/catalog/admin/includes/gabarit/adminGroup/display_view.edit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/adminGroup/display_view.edit.gab 2012-04-06 13:01:24 UTC (rev 4168)
+++ trunk/catalog/admin/includes/gabarit/adminGroup/display_view.edit.gab 2012-04-06 13:02:17 UTC (rev 4169)
@@ -12,7 +12,7 @@
?>
<h3><?php echo __('text info heading edit group') ?></h3>
-<?php echo tep_draw_form('newsletter', adminGroup::FILENAME, 'action=group_edit' , 'post' ); ?>
+<?php echo tep_draw_form('newsletter', adminGroup::FILENAME, 'action='. ((adminGroup::$action == 'edit')? 'group_edit' : 'new_confirm') , '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">
Modified: trunk/catalog/admin/includes/modules/pages/adminGroup.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/adminGroup.php 2012-04-06 13:01:24 UTC (rev 4168)
+++ trunk/catalog/admin/includes/modules/pages/adminGroup.php 2012-04-06 13:02:17 UTC (rev 4169)
@@ -157,17 +157,44 @@
tep_redirect(tep_href_link(self::FILENAME, 'gID=' . $_POST['admin_groups_id']));
break;
+
+
+
case 'delete_confirm':
$set_groups_id = tep_db_prepare_input( $_GET['gID']);
+error_reporting(E_ALL);
+// tep_db_query("delete from " . TABLE_ADMIN_GROUPS . " where admin_groups_id = '" . (int)$set_groups_id . "'");
+// tep_db_query("delete from " . TABLE_ADMIN . " where admin_groups_id = '" . (int) $set_groups_id . "'");
- 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 . "'");
+ if(! sqladmingroups::fetch(array('id'=>$set_groups_id)) ){
+ $messageStack->add_session(__('adminGroup fetch no found'), 'error');
+ tep_redirect(tep_href_link(self::FILENAME, 'gID=groups'));
+ }
- tep_redirect(tep_href_link(self::FILENAME, 'gID=groups'));
+ if( ! sqladmingroups::delete(array('id'=>$set_groups_id)) )
+ $messageStack->add_session(__('adminGroup delete process error'), 'error');
+
+ $myarray = array(
+ 'email_use_html'=>_cst_bool('EMAIL_USE_HTML'),
+ 'from'=>STORE_OWNER,
+ 'message'=>sprintf(
+ __('message alert for inform , delete group : %s '."\n".'in shop %s action by %s : %s ') ,
+ $set_groups_id ,
+ STORE_NAME ,
+ $_SESSION['login_firstname'] ,
+ $_SESSION['login_email_address']
+ )
+ );
+
+ if( ! notification::notif('admin_group_delete',__('subject copy delete group in admin') ,$myarray, 'admin_groups_id='.$admin_groups_id) )
+ $messageStack->add_session(sprintf(__('error in process notification for %s'), STORE_OWNER .' '. STORE_OWNER_EMAIL_ADDRESS ), 'error');
+
+ tep_redirect(tep_href_link(self::FILENAME, 'gID=groups'));
break;
+
+
case 'group_edit':
$admin_groups_name = ucwords(strtolower(tep_db_prepare_input($_POST['admin_groups_name'])));
@@ -187,32 +214,42 @@
}
}
- break;
+ break;
case 'new_confirm':
$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(self::FILENAME, 'gID=' . $_GET[gID] . '&gName=false&action=new_confirm'));
-// } 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(self::FILENAME, 'gID=' . $_GET['gID'] . '&gName=used&action=new_confirm'));
- } else {
+ tep_redirect(tep_href_link(self::FILENAME, 'gID=' . $_GET['gID'] . '&gName=used&action=new'));
+ }
+ else {
$sql_data_array = array('admin_groups_name' => $admin_groups_name);
$res=tep_db_perform(TABLE_ADMIN_GROUPS, $sql_data_array);
$admin_groups_id = tep_db_insert_id($res);
-/*
- $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' ");*/
+ $myarray = array(
+ 'email_use_html'=>_cst_bool('EMAIL_USE_HTML'),
+ 'from'=>STORE_OWNER,
+ 'message'=>sprintf(
+ __('message alert for inform , new group created : %s '."\n".'in shop %s action by %s : %s ') ,
+ $admin_groups_name ,
+ STORE_NAME ,
+ $_SESSION['login_firstname'] ,
+ $_SESSION['login_email_address']
+ )
+ );
+
+ if( ! notification::notif('admin_group_new',__('subject copy creat new group in admin') ,$myarray, 'admin_groups_id='.$admin_groups_id) )
+ $messageStack->add_session(sprintf(__('error in process notification for %s'), STORE_OWNER .' '. STORE_OWNER_EMAIL_ADDRESS ), 'error');
+
tep_redirect(tep_href_link(self::FILENAME, 'gID=' . $admin_groups_id));
}
-// }
+
break;
}
Deleted: trunk/extensions/CUSTOMERS_GROUPS_stable/catalog/admin/includes/gabarit/customers_groups.edit.gab
===================================================================
--- trunk/extensions/CUSTOMERS_GROUPS_stable/catalog/admin/includes/gabarit/customers_groups.edit.gab 2012-04-06 13:01:24 UTC (rev 4168)
+++ trunk/extensions/CUSTOMERS_GROUPS_stable/catalog/admin/includes/gabarit/customers_groups.edit.gab 2012-04-06 13:02:17 UTC (rev 4169)
@@ -1,86 +0,0 @@
-<?php
-/**
- @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
- @package osCSS-2 <www http://www.oscss.org>
- @version 2.0.9
- @date 17/07/10, 16:35
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-8
-*/
-?>
-<h3><?php echo __('heading title'); ?></h3>
-
-
- <div class="button_nav">
- <?php echo '<a class="button" href="' . tep_href_link(customers_groups::FILENAME, 'action=new') . '">' . tep_image(DIR_WS_ICONS.'icon_add_new.png' , IMAGE_NEW_PRODUCT) . IMAGE_INSERT . '</a>'; ?>
- </div>
-
-<div class="box_uniq block_form">
-
- <?php echo tep_draw_form('customers', customers_groups::FILENAME, tep_get_all_get_params(array('action')) . 'action='.((customers_groups::$action == 'edit')?'update':'new') , 'post', 'onSubmit="return check_form();"'); ?>
-
-
- <p class="block_input">
- <label for="customers_group_name"><?php echo __('entry groups name'); ?></label>
- <?php echo tep_draw_input_field('customers_group_name','', customers_groups::$cInfo->customers_group_name, 'maxlength="32"', false) . __('entry group name max length'); ?>
- </p>
-
- <div class="fright block_input">
- <label for="customers_firstname"><?php echo __('entry group tax exempt'); ?></label>
- <?php echo tep_draw_pull_down_menu('customers_group_tax_exempt', customers_groups::$cg_tax_exempt_array, (customers_groups::$cInfo->customers_group_tax_exempt==1) ? '1' : '0'); ?>
-
- <label for="customers_group_show_tax"><?php echo __('entry group show tax'); ?></label>
- <?php echo tep_draw_pull_down_menu('customers_group_show_tax', customers_groups::$cg_show_tax_array, (customers_groups::$cInfo->customers_group_show_tax==1 ) ? '1' : '0') ; ?>
- <p><?php echo __('entry group show tax explain 1'); ?></p>
- <p><?php echo __('entry group show tax explain 2'); ?></p>
- </div>
-
- <div class="block_input">
- <label for="group_shipment_settings"><?php echo __('heading title modules payment'); ?></label>
- <br />
- <?php echo tep_draw_radio_field('group_payment_settings','', '1', (tep_not_null(customers_groups::$cInfo->group_payment_allowed)? '1' : '0' )) . ' ' . __('entry group payment set') . ' ' . tep_draw_radio_field('group_payment_settings','', '0', (tep_not_null(customers_groups::$cInfo->group_payment_allowed)? '0' : '1' )) . ' ' . __('entry group payment default') ; ?>
- <ul>
- <?php foreach(customers_groups::get_array_mod('payment') as $item) echo '<li>'.$item['input'].' '.$item['name'].'</li>'; ?>
- </ul>
- <p><?php echo __('entry payment set explain') ?></p>
- </div>
-
-
- <div class="block_input">
- <label for="group_shipment_settings"><?php echo __('heading title modules shipping'); ?></label>
- <br />
- <?php echo tep_draw_radio_field('group_shipment_settings','', '1', (tep_not_null(customers_groups::$cInfo->group_shipment_allowed)? '1' : '0' )) . ' ' . __('entry group shipping set') . ' ' . tep_draw_radio_field('group_shipment_settings','', '0', (tep_not_null(customers_groups::$cInfo->group_shipment_allowed)? '0' : '1' )) . ' ' . __('entry group shipping default') ; ?>
- <ul>
- <?php foreach(customers_groups::get_array_mod('shipping') as $item) echo '<li>'.$item['input'].' '.$item['name'].'</li>'; ?>
- </ul>
- <p><?php echo __('entry shipping set explain') ?></p>
- </div>
-
-
- <div class="block_input">
- <label for="group_shipment_settings"><?php echo __('heading title modules order total'); ?></label>
- <br />
- <?php echo tep_draw_radio_field('group_order_total_settings','', '1', (tep_not_null(customers_groups::$cInfo->group_order_total_allowed)? '1' : '0' )) . ' ' . __('entry group order total set') . ' ' . tep_draw_radio_field('group_order_total_settings', '','0', (tep_not_null(customers_groups::$cInfo->group_order_total_allowed)? '0' : '1' )) . ' ' . __('entry group order total default') ; ?>
- <ul>
- <?php foreach(customers_groups::get_array_mod('order_total') as $item) echo '<li>'.$item['input'].' '.$item['name'].'</li>'; ?>
- </ul>
- <p><?php echo __('entry order total set explain') ?></p>
- </div>
-
- <div class="block_input">
- <h4><?php echo __('heading title group tax rates exempt'); ?></h4>
- <?php echo tep_draw_radio_field('group_tax_rate_exempt_settings','', '1', (tep_not_null(customers_groups::$cInfo->group_specific_taxes_exempt)? '1' : '0' )) . ' ' . __('entry group tax rates exempt') . ' ' . tep_draw_radio_field('group_tax_rate_exempt_settings', '','0', ((tep_not_null(customers_groups::$cInfo->group_specific_taxes_exempt)) ? '0' : '1' )) . ' ' . __('entry group tax rates default') ; ?>
- <ul>
- <?php $tax_query = tep_db_query("select tax_rates_id, tax_rate, tax_description from " . TABLE_TAX_RATES . " order by tax_rates_id");
- while ($tax_rate = tep_db_fetch_array($tax_query)) { ?>
- <li><?php echo tep_draw_checkbox_field('group_tax_rate_exempt_id[' . $tax_rate['tax_rates_id'] . ']','', $tax_rate['tax_rates_id'] , (in_array($tax_rate['tax_rates_id'], $group_tax_ids_exempt)) ? 1 : 0); ?> <?php echo $tax_rate['tax_description']; ?></li>
- <?php } ?>
- </ul>
- <p><?php echo __('entry tax rates exempt explain') ?></p>
- </div>
-
- <div class="button_nav">
- <?php echo tep_image_submit('button_update.gif', IMAGE_UPDATE) . ' <a class="button" href="' . tep_href_link(customers_groups::FILENAME, tep_get_all_get_params(array('action','cID'))) .'">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'; ?>
- </div>
-
-</form>
Deleted: trunk/extensions/CUSTOMERS_GROUPS_stable/catalog/admin/includes/gabarit/customers_groups.listing.gab
===================================================================
--- trunk/extensions/CUSTOMERS_GROUPS_stable/catalog/admin/includes/gabarit/customers_groups.listing.gab 2012-04-06 13:01:24 UTC (rev 4168)
+++ trunk/extensions/CUSTOMERS_GROUPS_stable/catalog/admin/includes/gabarit/customers_groups.listing.gab 2012-04-06 13:02:17 UTC (rev 4169)
@@ -1,35 +0,0 @@
-<?php
-/**
- @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
- @package osCSS-2 <www http://www.oscss.org>
- @version 2.0.9
- @date 17/07/10, 16:35
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-8
-*/
-?>
-<h3><?php echo __('heading title'); ?></h3>
-
-
- <div class="button_nav">
- <?php echo '<a class="button" href="' . tep_href_link(customers_groups::FILENAME, 'action=new') . '">' . tep_image(DIR_WS_ICONS.'icon_add_new.png' , IMAGE_NEW_PRODUCT) . IMAGE_INSERT . '</a>'; ?>
- </div>
-
- <div class="box_uniq">
- <div class="box_left">
- <table class="dataTable">
- <thead>
- <tr>
- <th style="width:20px;"><?php echo __('table heading name'); ?></th>
- <th class="tright"><?php echo __('table heading action'); ?></th>
- </tr>
- </thead>
- <tbody>
- <!-- BLOCK AJAX -->
- </tbody>
- </table>
- </div>
- <div class="box_right ">
- <?php echo customers_groups::get_right_bar() ?>
- </div>
-</div>
\ No newline at end of file
Modified: trunk/extensions/CUSTOMERS_GROUPS_stable/install.xml
===================================================================
--- trunk/extensions/CUSTOMERS_GROUPS_stable/install.xml 2012-04-06 13:01:24 UTC (rev 4168)
+++ trunk/extensions/CUSTOMERS_GROUPS_stable/install.xml 2012-04-06 13:02:17 UTC (rev 4169)
@@ -1,41 +1,49 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<contrib>
- <description><!-- Description of the contribution -->
- <details contrib_ref="" forum_ref="" contrib_type="aca" status="0" last_update="2011-11-09" />
- <author_pkg>www.oscim.fr</author_pkg>
- <comments><![CDATA[ ]]></comments>
+<description>
+ <!-- Description of the contribution -->
+ <details contrib_ref="" forum_ref="" contrib_type="aca" status="0" last_update="2011-11-09" />
+ <author_pkg>www.oscim.fr</author_pkg>
+ <comments>
+ <![CDATA[ ]]>
+ </comments>
<credits>oscim</credits>
<version>2.4</version>
- <post_install_notes><![CDATA[ ]]></post_install_notes>
- </description>
+ <post_install_notes>
+ <![CDATA[ ]]>
+ </post_install_notes>
+ </description>
- <!-- Install new files -->
- <addfile>
- <file name="admin/includes/modules/pages/customers_groups.php" />
+ <!-- Install new files -->
+ <addfile>
+ <file name="admin/includes/modules/pages/customers_groups.php" />
- <file name="admin/includes/gabarit/customers_groups/display_view.listing.gab" />
- <file name="admin/includes/gabarit/customers_groups/display_view.edit.gab" />
- <file name="admin/includes/gabarit/customers_groups/display_view.delete.gab" />
+ <file name="admin/includes/gabarit/customers_groups/display_view.listing.gab" />
+ <file name="admin/includes/gabarit/customers_groups/display_view.edit.gab" />
+ <file name="admin/includes/gabarit/customers_groups/display_view.delete.gab" />
- <file name="admin/includes/modules/account/sppc_cust_force.php" />
- <file name="admin/includes/gabarit/customers.customers_groups.edit.gab" />
- </addfile>
+ <file name="admin/includes/modules/account/sppc_cust_force.php" />
+ </addfile>
-<!-- LAng -->
- <addfilelg>
- <file name="admin/includes/languages/%LANGUAGE%/modules/pages/customers_groups.txt" lgref="fr_FR"/>
- <file name="admin/includes/languages/%LANGUAGE%/modules/account/sppc_cust_force.txt" lgref="fr_FR" />
- </addfilelg>
+ <!-- lang -->
+ <addfilelg>
+ <file name="admin/includes/languages/%LANGUAGE%/modules/pages/customers_groups.txt" lgref="fr_FR"/>
+ <file name="admin/includes/languages/%LANGUAGE%/modules/account/sppc_cust_force.txt" lgref="fr_FR" />
+ </addfilelg>
- <add2end>
- <file name="admin/includes/boxes/07_catalog.php" />
- <add type="php"><![CDATA[ $tabl_link[]= array(FILENAME_CUSTOMERS_GROUPS, 'BOX_CUSTOMERS_CUSTOMERS_GROUP', 'customers',@$img['customers']);]]></add>
- </add2end>
+ <add2end>
+ <file name="admin/includes/boxes/07_catalog.php" />
+ <add type="php">
+ <![CDATA[ $tabl_link[]= array(FILENAME_CUSTOMERS_GROUPS, 'BOX_CUSTOMERS_CUSTOMERS_GROUP', 'customers',@$img['customers']);]]>
+ </add>
+ </add2end>
- <add2end>
- <file name="admin/includes/tables_files_modules.php" />
- <add type="php"><![CDATA[define('FILENAME_CUSTOMERS_GROUPS', 'customers_groups.php');]]></add>
- </add2end>
+ <add2end>
+ <file name="admin/includes/tables_files_modules.php" />
+ <add type="php">
+ <![CDATA[define('FILENAME_CUSTOMERS_GROUPS', 'customers_groups.php');]]>
+ </add>
+ </add2end>
<config>
<group_key>CG_OPTION_MODULES</group_key>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-04-06 13:01:33
|
Revision: 4168
http://oscss.svn.sourceforge.net/oscss/?rev=4168&view=rev
Author: oscim
Date: 2012-04-06 13:01:24 +0000 (Fri, 06 Apr 2012)
Log Message:
-----------
ajout d'un retrun en fin de methode
Modified Paths:
--------------
trunk/catalog/common/classes/notification.php
Modified: trunk/catalog/common/classes/notification.php
===================================================================
--- trunk/catalog/common/classes/notification.php 2012-04-06 09:00:55 UTC (rev 4167)
+++ trunk/catalog/common/classes/notification.php 2012-04-06 13:01:24 UTC (rev 4168)
@@ -66,8 +66,6 @@
if(empty($message_final)) $message_final=tep_post_prepare_email(self::$key.'.tpl',$language,$myarray);
-// print_r($message_final);
-// exit;
foreach(self::$conf as $item){
switch($item['chknotif_method']) {
case 'sql' :
@@ -98,6 +96,8 @@
tep_mail($admin['firstname'].' '.$admin['lastname'], $admin['email'], $subjet, $message_final, STORE_OWNER, EMAIL_FROM);
}
}
+
+
}
/**
@@ -117,6 +117,8 @@
if(function_exists('tep_get_ip_address'))$data .='&ip='.tep_get_ip_address();
self::methode($subjet,$myarray,$data);
+
+ return true;
}
/**
@@ -135,6 +137,8 @@
if(function_exists('tep_get_ip_address'))$data .='&ip='.tep_get_ip_address();
self::methode($subjet,'',$data, array('html'=>(is_array($message_final) ? $message_final['html']: $message_final)));
+
+ return true;
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-04-06 09:01:01
|
Revision: 4167
http://oscss.svn.sourceforge.net/oscss/?rev=4167&view=rev
Author: oscim
Date: 2012-04-06 09:00:55 +0000 (Fri, 06 Apr 2012)
Log Message:
-----------
erreur
Modified Paths:
--------------
trunk/catalog/admin/includes/boxes/04_tools.php
Modified: trunk/catalog/admin/includes/boxes/04_tools.php
===================================================================
--- trunk/catalog/admin/includes/boxes/04_tools.php 2012-04-06 08:31:33 UTC (rev 4166)
+++ trunk/catalog/admin/includes/boxes/04_tools.php 2012-04-06 09:00:55 UTC (rev 4167)
@@ -1,38 +1,33 @@
-<?php
-/**
- @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
- @portion code Copyright (c) 2002 osCommerce
- @package osCSS-2 <www http://www.oscss.org>
- @version 2.1.1
- @date 03/04/2012, 22:06
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-8
-*/
- /* stats et rapport*/
- $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')
- 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']);
- $tabl_link[]= array(FILENAME_FULL_TAG, 'BOX_TOOLS_HEADER_TAG', 'headertag',@$img['headertag']);
-
-// if(_cst_bool('USE_LOCAL_GENERAT_PDF'))
-// $tabl_link[]= array(FILENAME_BATCH_PRINT, 'BOX_TOOLS_BATCH_CENTER', 'batch_print',@$img['batch_print']);
-
- $tabl_link[608]= array('ss_menu', 'BOX_TOOLS_SYSTEM', 'system',@$img['system']);
- $tabl_link[608][4][]= array(FILENAME_BACKUP, 'BOX_TOOLS_BACKUP', 'database',@$img['database']);
- $tabl_link[608][4][]= array(FILENAME_CONFIGURATION.'?gmod=modcorecache', 'BOX_TOOLS_CACHE', 'cache');
- $tabl_link[608][4][]= array(FILENAME_CONFIGURATION.'?gmod=modsysinfo', 'BOX_TOOLS_SERVER_INFO', 'server_info');
- $tabl_link[608][4][]= array(FILENAME_CURRENCIES, 'BOX_LOCALIZATION_CURRENCIES', 'currencies');
- $tabl_link[608][4][]= array(FILENAME_CRONJOB, 'BOX_TOOLS_CRONJOB', 'database',@$img['database']);
-
+<?php
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 03/04/2012, 22:06
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+ /* stats et rapport*/
+ $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')
+ 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]);
+ }
-/* Begin MANAGELOG_stable - installed by CIP */
-$tabl_link[608][4][]= array(FILENAME_MANAGELOG, 'BOX_TOOLS_MANAGELOG', 'database',@$img['database']);
-/* End MANAGELOG_stable - installed by CIP */
+ $tabl_link[]= array(FILENAME_GOOGLE_SITEMAP, 'BOX_TOOLS_GOOGLE_SITEMAP', 'ggmap',@$img['ggmap']);
+ $tabl_link[]= array(FILENAME_FULL_TAG, 'BOX_TOOLS_HEADER_TAG', 'headertag',@$img['headertag']);
+
+// if(_cst_bool('USE_LOCAL_GENERAT_PDF'))
+// $tabl_link[]= array(FILENAME_BATCH_PRINT, 'BOX_TOOLS_BATCH_CENTER', 'batch_print',@$img['batch_print']);
+
+ $tabl_link[608]= array('ss_menu', 'BOX_TOOLS_SYSTEM', 'system',@$img['system']);
+ $tabl_link[608][4][]= array(FILENAME_BACKUP, 'BOX_TOOLS_BACKUP', 'database',@$img['database']);
+ $tabl_link[608][4][]= array(FILENAME_CONFIGURATION.'?gmod=modcorecache', 'BOX_TOOLS_CACHE', 'cache');
+ $tabl_link[608][4][]= array(FILENAME_CONFIGURATION.'?gmod=modsysinfo', 'BOX_TOOLS_SERVER_INFO', 'server_info');
+ $tabl_link[608][4][]= array(FILENAME_CURRENCIES, 'BOX_LOCALIZATION_CURRENCIES', 'currencies');
+ $tabl_link[608][4][]= array(FILENAME_CRONJOB, 'BOX_TOOLS_CRONJOB', 'database',@$img['database']);
?>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-04-06 08:31:43
|
Revision: 4166
http://oscss.svn.sourceforge.net/oscss/?rev=4166&view=rev
Author: oscim
Date: 2012-04-06 08:31:33 +0000 (Fri, 06 Apr 2012)
Log Message:
-----------
Correction coquille
report usage des notification dans la page admin user
Ajutesment base notification (xml)
Modified Paths:
--------------
trunk/catalog/Documents/admin/data/notification_src.xml
trunk/catalog/admin/includes/modules/pages/adminUsers.php
trunk/catalog/common/classes/notification.php
trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/data/91_osc_configuration.sql
Modified: trunk/catalog/Documents/admin/data/notification_src.xml
===================================================================
--- trunk/catalog/Documents/admin/data/notification_src.xml 2012-04-06 07:30:53 UTC (rev 4165)
+++ trunk/catalog/Documents/admin/data/notification_src.xml 2012-04-06 08:31:33 UTC (rev 4166)
@@ -9,6 +9,8 @@
<action>checkout_process</action>
<action>contact_us</action>
<action>cronjob</action>
+ <action>internal</action>
+ <action>admin</action>
<action>returns</action>
<action>services</action>
<action>shipping</action>
Modified: trunk/catalog/admin/includes/modules/pages/adminUsers.php
===================================================================
--- trunk/catalog/admin/includes/modules/pages/adminUsers.php 2012-04-06 07:30:53 UTC (rev 4165)
+++ trunk/catalog/admin/includes/modules/pages/adminUsers.php 2012-04-06 08:31:33 UTC (rev 4166)
@@ -110,10 +110,16 @@
$messageStack->add_session(sprintf(__('send mail for %s ok'), tep_db_prepare_input($_POST['admin_firstname']) .' '. tep_db_prepare_input($_POST['admin_email_address']) ), 'success');
//! copy owner shop
- if(! tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS,__('subject copy creat new compte for admin'), $message_final))
- $messageStack->add_session(sprintf(__('error in process send mail for %s'), STORE_OWNER .' '. STORE_OWNER_EMAIL_ADDRESS ), 'error');
- else
- $messageStack->add_session(sprintf(__('send mail for %s ok'), STORE_OWNER .' '. STORE_OWNER_EMAIL_ADDRESS ), 'success');
+// if(! tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS,__('subject copy creat new compte for admin'), $message_final))
+// $messageStack->add_session(sprintf(__('error in process send mail for %s'), STORE_OWNER .' '. STORE_OWNER_EMAIL_ADDRESS ), 'error');
+// else
+// $messageStack->add_session(sprintf(__('send mail for %s ok'), STORE_OWNER .' '. STORE_OWNER_EMAIL_ADDRESS ), 'success');
+
+ $myarray['from']=STORE_OWNER;
+ $myarray['email_use_html']=_cst_bool('EMAIL_USE_HTML');
+
+ if( ! notification::notif('admin_members_new',__('subject copy creat new compte for admin') ,$myarray, 'user_id='.$_id) )
+ $messageStack->add_session(sprintf(__('error in process notification for %s'), STORE_OWNER .' '. STORE_OWNER_EMAIL_ADDRESS ), 'error');
}
tep_redirect(tep_href_link(self::FILENAME));
@@ -159,6 +165,13 @@
$message_final=tep_post_prepare_email('admin_members.tpl',$language,$myarray);
tep_mail($_POST['admin_firstname'] . ' ' . $_POST['admin_lastname'], $_POST['admin_email_address'],__('subject email text subject update account'), $message_final, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
+
+
+ $myarray['from']=STORE_OWNER;
+ $myarray['email_use_html']=_cst_bool('EMAIL_USE_HTML');
+
+ if( ! notification::notif('admin_members',__('subject copy creat new compte for admin') ,$myarray, 'user_id='.$admin_id) )
+ $messageStack->add_session(sprintf(__('error in process notification for %s'), STORE_OWNER .' '. STORE_OWNER_EMAIL_ADDRESS ), 'error');
}
tep_redirect(tep_href_link(self::$url_redirect, 'mID=' . $admin_id));
@@ -185,11 +198,14 @@
$message_final=tep_post_prepare_email('admin_internal_member_delete.tpl',$language,$myarray);
- //! copy owner shop
- if(! tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS,__('delete compte for admin'), $message_final))
- $messageStack->add_session(sprintf(__('error in process send mail for %s'), STORE_OWNER .' '. STORE_OWNER_EMAIL_ADDRESS ), 'error');
- else
- $messageStack->add_session(sprintf(__('send mail for %s ok'), STORE_OWNER .' '. STORE_OWNER_EMAIL_ADDRESS ), 'success');
+
+
+ $myarray['from']=STORE_OWNER;
+ $myarray['email_use_html']=_cst_bool('EMAIL_USE_HTML');
+
+ if( ! notification::notif('admin_internal_member_delete',__('subject copy creat new compte for admin') ,$myarray, 'user_id='.$admin_id) )
+ $messageStack->add_session(sprintf(__('error in process notification for %s'), STORE_OWNER .' '. STORE_OWNER_EMAIL_ADDRESS ), 'error');
+
}
Modified: trunk/catalog/common/classes/notification.php
===================================================================
--- trunk/catalog/common/classes/notification.php 2012-04-06 07:30:53 UTC (rev 4165)
+++ trunk/catalog/common/classes/notification.php 2012-04-06 08:31:33 UTC (rev 4166)
@@ -1,10 +1,10 @@
<?php if (!defined('HTTP_SERVER')) die('You can not access this file directly!');
/**
- @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 15/12/11, 13:07
+ @date 06/04/2012, 17:28
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class notification
@@ -12,7 +12,6 @@
UTilise les class des admins
*/
-error_reporting(E_ALL);
class notification {
@@ -67,6 +66,8 @@
if(empty($message_final)) $message_final=tep_post_prepare_email(self::$key.'.tpl',$language,$myarray);
+// print_r($message_final);
+// exit;
foreach(self::$conf as $item){
switch($item['chknotif_method']) {
case 'sql' :
Modified: trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/data/91_osc_configuration.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/data/91_osc_configuration.sql 2012-04-06 07:30:53 UTC (rev 4165)
+++ trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/data/91_osc_configuration.sql 2012-04-06 08:31:33 UTC (rev 4166)
@@ -37,5 +37,12 @@
insert IGNORE into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function , set_function,configuration_type) values ('DATATYPES_S', 'DATATYPES', 'error, product,content, diver, categorie, manufacturer,home,', 'DATATYPES_L', '130', '0', NOW(), NOW(),NULL, NULL, 2);
+insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('SMTP_MAIL_SERVER_S', 'SMTP_MAIL_SERVER', 'localhost', 'SMTP_MAIL_SERVER_L', '12', '1', NOW(), NOW(), NULL, NULL);
+insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('SMTP_PORT_NUMBER_S', 'SMTP_PORT_NUMBER', '25', 'SMTP_PORT_NUMBER_L', '12', '1', NOW(), NOW(), NULL, NULL);
+insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('SMTP_SENDMAIL_FROM_S', 'SMTP_SENDMAIL_FROM', 'root@localhost', 'SMTP_SENDMAIL_FROM_L', '12', '1', NOW(), NOW(), NULL, NULL);
+insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) values ('SMTP_FROMEMAIL_NAME_S', 'SMTP_FROMEMAIL_NAME', 'Store owner name', 'SMTP_FROMEMAIL_NAME_L', '12', '1', NOW(), NOW(), NULL, NULL);
+insert into osc_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function, configuration_type) values ('USE_MODELE_EMAIL_S', 'USE_MODELE_EMAIL', 'mouton', 'USE_MODELE_EMAIL_L', '12', '5', NOW(), NOW(), NULL, 'tep_cfg_select_pull_down($this->GetModeleEmails(),', 2);
+
+
delete from osc_configuration where configuration_key='PRODINFO_ATTRIBUTE_PLUGIN' limit 1;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-04-06 07:31:04
|
Revision: 4165
http://oscss.svn.sourceforge.net/oscss/?rev=4165&view=rev
Author: oscim
Date: 2012-04-06 07:30:53 +0000 (Fri, 06 Apr 2012)
Log Message:
-----------
Upgrade, fichier manquant
Added Paths:
-----------
trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/tables/osc_orders_products.sql
Added: trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/tables/osc_orders_products.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/tables/osc_orders_products.sql (rev 0)
+++ trunk/catalog/install/includes/sql/mysql/upgrade/2.1.0_2.1.1/tables/osc_orders_products.sql 2012-04-06 07:30:53 UTC (rev 4165)
@@ -0,0 +1,16 @@
+--+######################################################################--+
+--| osCSS Open Source E-commerce |
+--+######################################################################--+
+--| Copyright (c) 2005-2012 The osCSS developers |
+--| |
+--| http://www.oscss.org |
+--| Portions Copyright (c) 2003 osCommerce |
+--+######################################################################--+
+--| This source file is subject to version 2.0 of the GPL license, |
+--| available at the following url: |
+--| http://www.oscss.org/ |
+--+######################################################################--+
+
+
+
+ALTER TABLE osc_orders_products ADD products_type int(1) NOT NULL DEFAULT '1' AFTER products_id;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-04-06 06:49:19
|
Revision: 4164
http://oscss.svn.sourceforge.net/oscss/?rev=4164&view=rev
Author: oscim
Date: 2012-04-06 06:49:13 +0000 (Fri, 06 Apr 2012)
Log Message:
-----------
Mise a niveau du module de tri des enfants des categories
Modified Paths:
--------------
trunk/extensions/LISTING_ORDER_stable/catalog/admin/includes/languages/fr_FR/modules/categories/listing_order.txt
trunk/extensions/LISTING_ORDER_stable/catalog/admin/includes/modules/categories/listing_order.php
trunk/extensions/LISTING_ORDER_stable/install.xml
Added Paths:
-----------
trunk/extensions/LISTING_ORDER_stable/catalog/admin/includes/gabarit/categories/
trunk/extensions/LISTING_ORDER_stable/catalog/admin/includes/gabarit/categories/listing_order/
trunk/extensions/LISTING_ORDER_stable/catalog/admin/includes/gabarit/categories/listing_order/display_edit.edit.gab
Removed Paths:
-------------
trunk/extensions/LISTING_ORDER_stable/catalog/admin/includes/gabarit/categories.listing_order.display_edit.gab
Copied: trunk/extensions/LISTING_ORDER_stable/catalog/admin/includes/gabarit/categories/listing_order/display_edit.edit.gab (from rev 4151, trunk/extensions/LISTING_ORDER_stable/catalog/admin/includes/gabarit/categories.listing_order.display_edit.gab)
===================================================================
--- trunk/extensions/LISTING_ORDER_stable/catalog/admin/includes/gabarit/categories/listing_order/display_edit.edit.gab (rev 0)
+++ trunk/extensions/LISTING_ORDER_stable/catalog/admin/includes/gabarit/categories/listing_order/display_edit.edit.gab 2012-04-06 06:49:13 UTC (rev 4164)
@@ -0,0 +1,52 @@
+<?php
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 04/04/2012, 09:48
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+?>
+
+
+<div class="box_uniq block_form">
+
+
+ <h3><?php echo __('text info heading sortChilds sub-category'); ?></h3>
+ <ul >
+ <?php foreach(listing_order::$Csort as $sorts ): ?>
+ <li class="block_input">
+ <span class="sort fleft">
+ <?php echo tep_draw_checkbox_field('listing_order[c][sort]['.$sorts['id'].']','listing_order_sort_'.$sorts['id'] ,'on',(isset(listing_order::$CsortSelected[$sorts['name']])? true: false) ) .' '.$sorts['text'] ?>
+ </span>
+ <span class="sortby fright">
+ <?php echo tep_draw_input_field('listing_order[c][sortorder]['.$sorts['id'].']','listing_order_sortorder_'.$sorts['id'], (isset(listing_order::$CsortSelected[$sorts['name']]['sortorder'])? listing_order::$CsortSelected[$sorts['name']]['sortorder']: '0'),' size="3"') ?>
+ <?php echo tep_draw_radio_field('listing_order[c][sortby]['.$sorts['id'].']','listing_order_sortby_'.$sorts['id'], 'asc', ((isset(listing_order::$CsortSelected[$sorts['name']]) && listing_order::$CsortSelected[$sorts['name']]['sortby']=='asc')? true: false) ).__('text asc').tep_draw_radio_field('listing_order[c][sortby]['.$sorts['id'].']','listing_order_sortby_'.$sorts['id'], 'desc', ((isset(listing_order::$CsortSelected[$sorts['name']]) && listing_order::$CsortSelected[$sorts['name']]['sortby']=='desc')? true: false)).__('text desc') ?>
+ </span>
+ </li>
+ <?php endforeach; ?>
+ </ul>
+
+
+
+ <h3><?php echo __('text info heading sortChilds datatype in category'); ?></h3>
+ <ul >
+ <?php foreach(listing_order::$Psort as $sorts ): ?>
+ <li class="block_input">
+ <span class="sort fleft">
+ <?php echo tep_draw_checkbox_field('listing_order[p][sort]['.$sorts['id'].']','listing_order_sort_'.$sorts['id'] ,'on',(isset(listing_order::$PsortSelected[$sorts['name']])? true: false) ) .' '.$sorts['text'] ?>
+ </span>
+ <span class="sortby fright">
+ <?php echo tep_draw_input_field('listing_order[p][sortorder]['.$sorts['id'].']','listing_order_sortorder_'.$sorts['id'], (isset(listing_order::$PsortSelected[$sorts['name']]['sortorder'])? listing_order::$PsortSelected[$sorts['name']]['sortorder']: '0'),' size="3"') ?>
+ <?php echo tep_draw_radio_field('listing_order[p][sortby]['.$sorts['id'].']','listing_order_sortby_'.$sorts['id'], 'asc', ((isset(listing_order::$PsortSelected[$sorts['name']]) && listing_order::$PsortSelected[$sorts['name']]['sortby']=='asc')? true: false) ).__('text asc').tep_draw_radio_field('listing_order[p][sortby]['.$sorts['id'].']','listing_order_sortby_'.$sorts['id'], 'desc', ((isset(listing_order::$PsortSelected[$sorts['name']]) && listing_order::$PsortSelected[$sorts['name']]['sortby']=='desc')? true: false)).__('text desc') ?>
+ </span>
+ </li>
+ <?php endforeach; ?>
+ </ul>
+
+ <?php if(isset(listing_order::$Csort) && is_array(listing_order::$Csort)): ?>
+
+ <?php endif; ?>
+</div>
\ No newline at end of file
Deleted: trunk/extensions/LISTING_ORDER_stable/catalog/admin/includes/gabarit/categories.listing_order.display_edit.gab
===================================================================
--- trunk/extensions/LISTING_ORDER_stable/catalog/admin/includes/gabarit/categories.listing_order.display_edit.gab 2012-04-06 06:42:24 UTC (rev 4163)
+++ trunk/extensions/LISTING_ORDER_stable/catalog/admin/includes/gabarit/categories.listing_order.display_edit.gab 2012-04-06 06:49:13 UTC (rev 4164)
@@ -1,52 +0,0 @@
-<?php
-/**
- @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
- @portion code Copyright (c) 2002 osCommerce
- @package osCSS-2 <www http://www.oscss.org>
- @version 2.1.0
- @date 19/12/10, 19:57
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-8
-*/
-?>
-
-
-<div class="box_uniq block_form">
-
-
- <h3><?php echo __('text info heading sortChilds sub-category'); ?></h3>
- <ul >
- <?php foreach(listing_order::$Csort as $sorts ): ?>
- <li class="block_input">
- <span class="sort fleft">
- <?php echo tep_draw_checkbox_field('listing_order[c][sort]['.$sorts['id'].']','listing_order_sort_'.$sorts['id'] ,'on',(isset(listing_order::$CsortSelected[$sorts['name']])? true: false) ) .' '.$sorts['text'] ?>
- </span>
- <span class="sortby fright">
- <?php echo tep_draw_input_field('listing_order[c][sortorder]['.$sorts['id'].']','listing_order_sortorder_'.$sorts['id'], (isset(listing_order::$CsortSelected[$sorts['name']]['sortorder'])? listing_order::$CsortSelected[$sorts['name']]['sortorder']: '0'),' size="3"') ?>
- <?php echo tep_draw_radio_field('listing_order[c][sortby]['.$sorts['id'].']','listing_order_sortby_'.$sorts['id'], 'asc', ((isset(listing_order::$CsortSelected[$sorts['name']]) && listing_order::$CsortSelected[$sorts['name']]['sortby']=='asc')? true: false) ).__('text asc').tep_draw_radio_field('listing_order[c][sortby]['.$sorts['id'].']','listing_order_sortby_'.$sorts['id'], 'desc', ((isset(listing_order::$CsortSelected[$sorts['name']]) && listing_order::$CsortSelected[$sorts['name']]['sortby']=='desc')? true: false)).__('text desc') ?>
- </span>
- </li>
- <?php endforeach; ?>
- </ul>
-
-
-
- <h3><?php echo __('text info heading sortChilds datatype in category'); ?></h3>
- <ul >
- <?php foreach(listing_order::$Psort as $sorts ): ?>
- <li class="block_input">
- <span class="sort fleft">
- <?php echo tep_draw_checkbox_field('listing_order[p][sort]['.$sorts['id'].']','listing_order_sort_'.$sorts['id'] ,'on',(isset(listing_order::$PsortSelected[$sorts['name']])? true: false) ) .' '.$sorts['text'] ?>
- </span>
- <span class="sortby fright">
- <?php echo tep_draw_input_field('listing_order[p][sortorder]['.$sorts['id'].']','listing_order_sortorder_'.$sorts['id'], (isset(listing_order::$PsortSelected[$sorts['name']]['sortorder'])? listing_order::$PsortSelected[$sorts['name']]['sortorder']: '0'),' size="3"') ?>
- <?php echo tep_draw_radio_field('listing_order[p][sortby]['.$sorts['id'].']','listing_order_sortby_'.$sorts['id'], 'asc', ((isset(listing_order::$PsortSelected[$sorts['name']]) && listing_order::$PsortSelected[$sorts['name']]['sortby']=='asc')? true: false) ).__('text asc').tep_draw_radio_field('listing_order[p][sortby]['.$sorts['id'].']','listing_order_sortby_'.$sorts['id'], 'desc', ((isset(listing_order::$PsortSelected[$sorts['name']]) && listing_order::$PsortSelected[$sorts['name']]['sortby']=='desc')? true: false)).__('text desc') ?>
- </span>
- </li>
- <?php endforeach; ?>
- </ul>
-
- <?php if(isset(listing_order::$Csort) && is_array(listing_order::$Csort)): ?>
-
- <?php endif; ?>
-</div>
\ No newline at end of file
Modified: trunk/extensions/LISTING_ORDER_stable/catalog/admin/includes/languages/fr_FR/modules/categories/listing_order.txt
===================================================================
--- trunk/extensions/LISTING_ORDER_stable/catalog/admin/includes/languages/fr_FR/modules/categories/listing_order.txt 2012-04-06 06:42:24 UTC (rev 4163)
+++ trunk/extensions/LISTING_ORDER_stable/catalog/admin/includes/languages/fr_FR/modules/categories/listing_order.txt 2012-04-06 06:49:13 UTC (rev 4164)
@@ -26,17 +26,20 @@
$lang['txt sortChilds categories_status']= 'Statut';
// $lang['txt sortChilds sortchilds']= 'Ordre de tri des pages';
// $lang['txt sortChilds sort_order']= 'Ordre de tri des pages';
+
+ $lang['txt sortChilds id']= 'numéro';
+ $lang['txt sortChilds type']= 'Le type ';
$lang['txt sortChilds date_added']= 'Date d\'ajout';
$lang['txt sortChilds last_modified']= 'Date dernière modification';
+ $lang['txt sortChilds sort_order']= 'numéro de position';
+ $lang['txt sortChilds title']= 'Titre / nom ';
/* text for products data */
$lang['tab cat sortchilds']= 'Options Tri';
- $lang['txt sortChilds products_type']= 'Le type de produits';
+ $lang['txt sortChilds type']= 'Le type ';
$lang['txt sortChilds products_quantity']= 'Quantité';
$lang['txt sortChilds products_model']= 'Modele';
$lang['txt sortChilds products_price']= 'Prix';
- $lang['txt sortChilds products_date_added']= 'Date d\'ajout';
- $lang['txt sortChilds products_last_modified']= 'Date dernière modification';
$lang['txt sortChilds products_date_available']= 'Date disponibilité';
$lang['txt sortChilds products_ordered']= 'Ordre de tri des produits';
$lang['txt sortChilds products_weight']= 'Poids';
@@ -48,9 +51,6 @@
$lang['txt sortChilds content_id']= 'Ordre de tri des pages';
$lang['txt sortChilds content_type']= 'Le type de contenu';
$lang['txt sortChilds content_name']= 'Clef';
-// $lang['txt sortChilds date_added']= 'Date d\'ajout';
-// $lang['txt sortChilds last_modified']= 'Date dernière modification';
-// $lang['txt sortChilds sort_order']= 'Ordre de tri des pages';
/* text tri */
Modified: trunk/extensions/LISTING_ORDER_stable/catalog/admin/includes/modules/categories/listing_order.php
===================================================================
--- trunk/extensions/LISTING_ORDER_stable/catalog/admin/includes/modules/categories/listing_order.php 2012-04-06 06:42:24 UTC (rev 4163)
+++ trunk/extensions/LISTING_ORDER_stable/catalog/admin/includes/modules/categories/listing_order.php 2012-04-06 06:49:13 UTC (rev 4164)
@@ -46,23 +46,23 @@
*/
public static $CsortSelected=array();
/**
- @var
+ @var
*/
public $code;
/**
- @var
+ @var
*/
public $title;
/**
- @var
+ @var
*/
public $description;
/**
- @var
+ @var
*/
public $sort_order;
/**
- @var
+ @var
*/
public $enabled;
@@ -143,7 +143,7 @@
$datatype = $cat->datatype;
$cat_id = $cat->id;
}
- elseif(isset(categories::$cInfo)){
+ elseif(class_exists('categories') && isset(categories::$cInfo)){
$cat_id = categories::$cInfo->categories_id;
$datatype = categories::$cInfo->categories_datatype;
}
@@ -158,47 +158,32 @@
}
}
-
+
switch($datatype){
- case 'product':
+ default:
+
+ if($datatype =='product')
+ $datatype .='s';
+
$i=0;
- foreach($DB->listFields(TABLE_PRODUCTS) as $k=>$v){
- if(!in_array($v['name'],self::$Psort_exclude)) {
- self::$Psort[$i]=array('id'=>$i,'name'=>$v['name'], 'sql'=>'p.'.$v['name'], 'text'=> __('txt sortChilds '.$v['name']));
+ foreach($DB->listFields(constant('TABLE_'.strtoupper($datatype))) as $k=>$v){
+ $short = ( (strpos($v['name'], $datatype) ===0) ? substr($v['name'], strlen($datatype)+1) : $v['name'] );
+ if(!in_array($short,array('image','tax_class_id','track_stock','status','id','manufacturers_id', 'head_title_tag', 'products_head_desc_tag','status','hidden') )) {
+ self::$Psort[$i]=array('id'=>$i,'name'=>$v['name'], 'sql'=>'c.'.$v['name'], 'text'=> __('txt sortChilds '.$short));
$i++;
}
}
- $i=0;
- foreach($DB->listFields(TABLE_PRODUCTS_DESCRIPTION) as $k=>$v){
- if(!in_array($v['name'],self::$Psort_exclude)) {
- self::$Psort[$i]=array('id'=>$i,'name'=>$v['name'], 'sql'=>'pd.'.$v['name'], 'text'=> __('txt sortChilds '.$v['name']));
+ foreach($DB->listFields(constant('TABLE_'.strtoupper($datatype).'_DESCRIPTION')) as $k=>$v){
+ $short = ( (strpos($v['name'], $datatype) ===0) ? substr($v['name'], strlen($datatype)+1) : $v['name'] );
+ if(!in_array($short,array('language_id', 'description', 'chapo', 'status','hidden') )) {
+ self::$Psort[$i]=array('id'=>$i,'name'=>$v['name'], 'sql'=>'cd.'.$v['name'], 'text'=> __('txt sortChilds '.$short));
$i++;
}
}
- break;
-
- case 'content':
- $i=0;
- foreach($DB->listFields(TABLE_CONTENT) as $k=>$v){
- if(!in_array($v['name'],self::$Psort_exclude)) {
- self::$Psort[$i]=array('id'=>$i,'name'=>$v['name'], 'sql'=>'c.'.$v['name'], 'text'=> __('txt sortChilds '.$v['name']));
- $i++;
- }
- }
- foreach($DB->listFields(TABLE_CONTENT_DESCRIPTION) as $k=>$v){
- if(!in_array($v['name'],self::$Psort_exclude)) {
- self::$Psort[$i]=array('id'=>$i,'name'=>$v['name'], 'sql'=>'cd.'.$v['name'], 'text'=> __('txt sortChilds '.$v['name']));
- $i++;
- }
- }
- break;
-
- case 'home':
- break;
}
-
+
/// actuel
if($cat_id>0){
$res=$DB->query("SELECT sortchids, sortchids_datatype FROM ".TABLE_CATEGORIES." WHERE categories_id='".$cat_id."';");
@@ -227,7 +212,7 @@
}
}
break;
-
+
case 'content':
$tab=explode(',',$r['sortchids_datatype']);
$i=0;
@@ -241,7 +226,16 @@
break;
case 'home':
- break;
+ default:
+ $tab=explode(',',$r['sortchids_datatype']);
+ $i=0;
+ foreach($tab as $item){
+ $iret=explode(' ',ltrim(rtrim($item)));
+ if(!empty($iret[0])){
+ $name=str_replace('c.','',$iret[0]);
+ self::$PsortSelected[$name]=array('sql'=>$iret[0],'value'=>$name,'sortorder'=>(string)$i++ , 'sortby'=>trim($iret[1]) );
+ }
+ }
}
}
}
@@ -269,7 +263,9 @@
public function display_edit(&$contents) {
$this->load_db_values(0);
- $contents []=array('title'=> __('tab cat sortchilds'),'text'=>tep_get_include_contents($this->type.'.'.__CLASS__.'.'.__FUNCTION__));
+ $contents []=array(
+'title'=> __('tab cat sortchilds'),
+'text'=>tep_get_include_contents($this->type.'/'.__CLASS__.'/'.__FUNCTION__.'.edit'));
}
Modified: trunk/extensions/LISTING_ORDER_stable/install.xml
===================================================================
--- trunk/extensions/LISTING_ORDER_stable/install.xml 2012-04-06 06:42:24 UTC (rev 4163)
+++ trunk/extensions/LISTING_ORDER_stable/install.xml 2012-04-06 06:49:13 UTC (rev 4164)
@@ -11,7 +11,7 @@
<addfile>
<file name="admin/includes/modules/categories/listing_order.php" />
- <file name="admin/includes/gabarit/categories.listing_order.display_edit.gab" />
+ <file name="admin/includes/gabarit/categories/listing_order/display_edit.edit.gab" />
</addfile>
<addfilelg>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-04-06 06:42:30
|
Revision: 4163
http://oscss.svn.sourceforge.net/oscss/?rev=4163&view=rev
Author: oscim
Date: 2012-04-06 06:42:24 +0000 (Fri, 06 Apr 2012)
Log Message:
-----------
Removed Paths:
-------------
trunk/extensions/RESTRICTACCES_stable/catalog/admin/includes/gabarit/categories.RestrictAcces.display_edit.gab
Deleted: trunk/extensions/RESTRICTACCES_stable/catalog/admin/includes/gabarit/categories.RestrictAcces.display_edit.gab
===================================================================
--- trunk/extensions/RESTRICTACCES_stable/catalog/admin/includes/gabarit/categories.RestrictAcces.display_edit.gab 2012-04-06 06:42:02 UTC (rev 4162)
+++ trunk/extensions/RESTRICTACCES_stable/catalog/admin/includes/gabarit/categories.RestrictAcces.display_edit.gab 2012-04-06 06:42:24 UTC (rev 4163)
@@ -1,21 +0,0 @@
-<?php
-/**
- @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
- @portion code Copyright (c) 2002 osCommerce
- @package osCSS-2 <www http://www.oscss.org>
- @version 2.1.1
- @date 06/04/2012, 21:47
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-8
-*/
-?>
-
-
-<div class="box_uniq block_form">
- <h3><?php echo __('text info heading restrict access'); ?></h3>
-
- <p class="block_input">
- <label for="condition" title="<?php echo __('entry condition desc') ; ?>"><?php echo __('entry condition') . tep_image(DIR_WS_ICONS . 'icon_help.gif') ; ?></label>
- <?php echo tep_draw_pull_down_menu('RestrictAcces[RESTRICT_ACCESS_BASE]', RestrictAcces::$_condition, RestrictAcces::$cInfo->RESTRICT_ACCESS_BASE, 'id="condition"') ;?>
- </p>
-</div>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-04-06 06:42:09
|
Revision: 4162
http://oscss.svn.sourceforge.net/oscss/?rev=4162&view=rev
Author: oscim
Date: 2012-04-06 06:42:02 +0000 (Fri, 06 Apr 2012)
Log Message:
-----------
correction du module et mise a niveau du code
Modified Paths:
--------------
trunk/extensions/RESTRICTACCES_stable/catalog/admin/includes/gabarit/categories.RestrictAcces.display_edit.gab
trunk/extensions/RESTRICTACCES_stable/catalog/admin/includes/modules/categories/RestrictAcces.php
trunk/extensions/RESTRICTACCES_stable/install.xml
Added Paths:
-----------
trunk/extensions/RESTRICTACCES_stable/catalog/admin/includes/gabarit/categories/
trunk/extensions/RESTRICTACCES_stable/catalog/admin/includes/gabarit/categories/RestrictAcces/
trunk/extensions/RESTRICTACCES_stable/catalog/admin/includes/gabarit/categories/RestrictAcces/display_edit.edit.gab
Added: trunk/extensions/RESTRICTACCES_stable/catalog/admin/includes/gabarit/categories/RestrictAcces/display_edit.edit.gab
===================================================================
--- trunk/extensions/RESTRICTACCES_stable/catalog/admin/includes/gabarit/categories/RestrictAcces/display_edit.edit.gab (rev 0)
+++ trunk/extensions/RESTRICTACCES_stable/catalog/admin/includes/gabarit/categories/RestrictAcces/display_edit.edit.gab 2012-04-06 06:42:02 UTC (rev 4162)
@@ -0,0 +1,21 @@
+<?php
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 06/04/2012, 21:47
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+?>
+
+
+<div class="box_uniq block_form">
+ <h3><?php echo __('text info heading restrict access'); ?></h3>
+
+ <p class="block_input">
+ <label for="condition" title="<?php echo __('entry condition desc') ; ?>"><?php echo __('entry condition') . tep_image(DIR_WS_ICONS . 'icon_help.gif') ; ?></label>
+ <?php echo tep_draw_pull_down_menu('RestrictAcces[RESTRICT_ACCESS_BASE]', RestrictAcces::$_condition, RestrictAcces::$cInfo->RESTRICT_ACCESS_BASE, 'id="condition"') ;?>
+ </p>
+</div>
\ No newline at end of file
Modified: trunk/extensions/RESTRICTACCES_stable/catalog/admin/includes/gabarit/categories.RestrictAcces.display_edit.gab
===================================================================
--- trunk/extensions/RESTRICTACCES_stable/catalog/admin/includes/gabarit/categories.RestrictAcces.display_edit.gab 2012-04-05 21:10:25 UTC (rev 4161)
+++ trunk/extensions/RESTRICTACCES_stable/catalog/admin/includes/gabarit/categories.RestrictAcces.display_edit.gab 2012-04-06 06:42:02 UTC (rev 4162)
@@ -1,10 +1,10 @@
<?php
/**
- @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.1.0
- @date 19/12/10, 19:57
+ @version 2.1.1
+ @date 06/04/2012, 21:47
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
Modified: trunk/extensions/RESTRICTACCES_stable/catalog/admin/includes/modules/categories/RestrictAcces.php
===================================================================
--- trunk/extensions/RESTRICTACCES_stable/catalog/admin/includes/modules/categories/RestrictAcces.php 2012-04-05 21:10:25 UTC (rev 4161)
+++ trunk/extensions/RESTRICTACCES_stable/catalog/admin/includes/modules/categories/RestrictAcces.php 2012-04-06 06:42:02 UTC (rev 4162)
@@ -1,10 +1,10 @@
<?php
/**
- @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
- @version 2.0.9
- @date 29/08/10, 21:47
+ @version 2.1.1
+ @date 06/04/2012, 21:47
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
@class RestrictAcces
@@ -92,9 +92,11 @@
$DB=Database::getInstance();
$r=$DB->query("SELECT * FROM ".TABLE_CATEGORIES_EXTRA." WHERE categories_id='".(int)$cat_id."' ;");
- foreach ($r->fetchAllAssoc() as $item)
- self::$cInfo->$item['cat_key']=$item['cat_value'];
-
+ if($r->__get('numRows'))
+ foreach ($r->fetchAllAssoc() as $item)
+ self::$cInfo->$item['cat_key']=$item['cat_value'];
+ else
+ self::$cInfo->RESTRICT_ACCESS_BASE = false;
}
public function load_post_values($post){
@@ -105,7 +107,10 @@
Draw
*/
public function display_edit(&$contents) {
- $contents []=array('title'=> __('tab cat restrictaccess'),'text'=>tep_get_include_contents($this->type.'.'.__CLASS__.'.'.__FUNCTION__));
+ $contents []=array(
+ 'title'=> __('tab cat restrictaccess'),
+ 'text'=>tep_get_include_contents($this->type.'/'.__CLASS__.'/'.__FUNCTION__.'.edit')
+ );
}
Modified: trunk/extensions/RESTRICTACCES_stable/install.xml
===================================================================
--- trunk/extensions/RESTRICTACCES_stable/install.xml 2012-04-05 21:10:25 UTC (rev 4161)
+++ trunk/extensions/RESTRICTACCES_stable/install.xml 2012-04-06 06:42:02 UTC (rev 4162)
@@ -11,7 +11,7 @@
<addfile>
<file name="admin/includes/modules/categories/RestrictAcces.php" />
- <file name="admin/includes/gabarit/categories.RestrictAcces.display_edit.gab" />
+ <file name="admin/includes/gabarit/categories/RestrictAcces/display_edit.edit.gab" />
<file name="includes/modules/categories/RestrictAcces.php" />
</addfile>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-04-05 21:10:31
|
Revision: 4161
http://oscss.svn.sourceforge.net/oscss/?rev=4161&view=rev
Author: oscim
Date: 2012-04-05 21:10:25 +0000 (Thu, 05 Apr 2012)
Log Message:
-----------
fichier de suppression des table manquant
Added Paths:
-----------
trunk/dev/GenerCode/datatype/Modele/sql/mysql/remove/tables/osc__DATATYPE_REPLACE__extra_fields.sql
trunk/dev/GenerCode/datatype/Modele/sql/mysql/remove/tables/osc__DATATYPE_REPLACE__extra_fields_labels.sql
trunk/dev/GenerCode/datatype/Modele/sql/mysql/remove/tables/osc__DATATYPE_REPLACE__extra_fields_values.sql
trunk/dev/GenerCode/datatype/Modele/sql/mysql/remove/tables/osc__DATATYPE_REPLACE__to__DATATYPE_REPLACE__extra_fields.sql
Added: trunk/dev/GenerCode/datatype/Modele/sql/mysql/remove/tables/osc__DATATYPE_REPLACE__extra_fields.sql
===================================================================
--- trunk/dev/GenerCode/datatype/Modele/sql/mysql/remove/tables/osc__DATATYPE_REPLACE__extra_fields.sql (rev 0)
+++ trunk/dev/GenerCode/datatype/Modele/sql/mysql/remove/tables/osc__DATATYPE_REPLACE__extra_fields.sql 2012-04-05 21:10:25 UTC (rev 4161)
@@ -0,0 +1,4 @@
+--
+-- Structure de la table osc__DATATYPE_REPLACE__extra_fields
+--
+DROP TABLE IF EXISTS osc__DATATYPE_REPLACE__extra_fields ;
Added: trunk/dev/GenerCode/datatype/Modele/sql/mysql/remove/tables/osc__DATATYPE_REPLACE__extra_fields_labels.sql
===================================================================
--- trunk/dev/GenerCode/datatype/Modele/sql/mysql/remove/tables/osc__DATATYPE_REPLACE__extra_fields_labels.sql (rev 0)
+++ trunk/dev/GenerCode/datatype/Modele/sql/mysql/remove/tables/osc__DATATYPE_REPLACE__extra_fields_labels.sql 2012-04-05 21:10:25 UTC (rev 4161)
@@ -0,0 +1,7 @@
+--
+-- Structure de la table osc__DATATYPE_REPLACE__extra_fields_labels
+--
+
+DROP TABLE IF EXISTS osc__DATATYPE_REPLACE__extra_fields_labels ;
+
+
Added: trunk/dev/GenerCode/datatype/Modele/sql/mysql/remove/tables/osc__DATATYPE_REPLACE__extra_fields_values.sql
===================================================================
--- trunk/dev/GenerCode/datatype/Modele/sql/mysql/remove/tables/osc__DATATYPE_REPLACE__extra_fields_values.sql (rev 0)
+++ trunk/dev/GenerCode/datatype/Modele/sql/mysql/remove/tables/osc__DATATYPE_REPLACE__extra_fields_values.sql 2012-04-05 21:10:25 UTC (rev 4161)
@@ -0,0 +1,6 @@
+--
+-- Structure de la table osc__DATATYPE_REPLACE__extra_fields_values
+--
+
+DROP TABLE IF EXISTS osc__DATATYPE_REPLACE__extra_fields_values ;
+
Added: trunk/dev/GenerCode/datatype/Modele/sql/mysql/remove/tables/osc__DATATYPE_REPLACE__to__DATATYPE_REPLACE__extra_fields.sql
===================================================================
--- trunk/dev/GenerCode/datatype/Modele/sql/mysql/remove/tables/osc__DATATYPE_REPLACE__to__DATATYPE_REPLACE__extra_fields.sql (rev 0)
+++ trunk/dev/GenerCode/datatype/Modele/sql/mysql/remove/tables/osc__DATATYPE_REPLACE__to__DATATYPE_REPLACE__extra_fields.sql 2012-04-05 21:10:25 UTC (rev 4161)
@@ -0,0 +1,6 @@
+--
+-- Structure de la table osc__DATATYPE_REPLACE__to__DATATYPE_REPLACE__extra_fields
+--
+
+DROP TABLE IF EXISTS osc__DATATYPE_REPLACE__to__DATATYPE_REPLACE__extra_fields ;
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-04-05 20:05:17
|
Revision: 4160
http://oscss.svn.sourceforge.net/oscss/?rev=4160&view=rev
Author: oscim
Date: 2012-04-05 20:05:10 +0000 (Thu, 05 Apr 2012)
Log Message:
-----------
Base html gabarit for extra fields modules for DataType
Added Paths:
-----------
trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/gabarit/configuration/mod_DATATYPE_REPLACE_extra/
trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/gabarit/configuration/mod_DATATYPE_REPLACE_extra/.directory
trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/gabarit/configuration/mod_DATATYPE_REPLACE_extra/draw.delete.gab
trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/gabarit/configuration/mod_DATATYPE_REPLACE_extra/draw.label.edit.gab
trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/gabarit/configuration/mod_DATATYPE_REPLACE_extra/draw.label.listing.gab
trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/gabarit/configuration/mod_DATATYPE_REPLACE_extra/draw.label.new.gab
trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/gabarit/configuration/mod_DATATYPE_REPLACE_extra/draw.value.delete.gab
trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/gabarit/configuration/mod_DATATYPE_REPLACE_extra/draw.value.edit.gab
trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/gabarit/configuration/mod_DATATYPE_REPLACE_extra/draw.value.listing.gab
trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/gabarit/configuration/mod_DATATYPE_REPLACE_extra/draw.value.new.gab
Added: trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/gabarit/configuration/mod_DATATYPE_REPLACE_extra/.directory
===================================================================
--- trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/gabarit/configuration/mod_DATATYPE_REPLACE_extra/.directory (rev 0)
+++ trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/gabarit/configuration/mod_DATATYPE_REPLACE_extra/.directory 2012-04-05 20:05:10 UTC (rev 4160)
@@ -0,0 +1,6 @@
+[Dolphin]
+Timestamp=2012,4,5,21,56,6
+Version=2
+
+[Settings]
+ShowDotFiles=true
Added: trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/gabarit/configuration/mod_DATATYPE_REPLACE_extra/draw.delete.gab
===================================================================
--- trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/gabarit/configuration/mod_DATATYPE_REPLACE_extra/draw.delete.gab (rev 0)
+++ trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/gabarit/configuration/mod_DATATYPE_REPLACE_extra/draw.delete.gab 2012-04-05 20:05:10 UTC (rev 4160)
@@ -0,0 +1,27 @@
+<?php
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 04/03/2012, 21:54
+ @author genrated by dev/datatype/generat
+ @encode UTF-8
+ @brief gabarit for listing extra fields _DATATYPE_REPLACE_
+*/
+?>
+
+<h3><?php echo HEADING_TITLE ?></h3>
+
+<h4><?php echo HEADING_DELETE . mod_DATATYPE_REPLACE_extra::$eid ?></h4>
+
+<?php if (mod_DATATYPE_REPLACE_extra::$double_check == 'no') {
+ echo '<p>' . TEXT_ARE_SURE . (mod_DATATYPE_REPLACE_extra::$pInfo->uses_list ? TEXT_VALUES_GONE : '') . "</p>\n";
+ echo '<p>' . tep_draw_form('yes',mod_DATATYPE_REPLACE_extra::FILENAME, tep_get_all_get_params(array('action','eid','confirm')). 'confirm=yes&action=delete&eid=' . mod_DATATYPE_REPLACE_extra::$eid . '&used=' . mod_DATATYPE_REPLACE_extra::$pInfo->used) . tep_draw_input_field('yes','', TEXT_YES, 'alt="' . TEXT_YES . '"', false, 'submit') . '</form> ';
+ echo tep_draw_form('no', mod_DATATYPE_REPLACE_extra::FILENAME, tep_get_all_get_params(array('action','eid','confirm')) .'eid=' . mod_DATATYPE_REPLACE_extra::$eid) . tep_draw_input_field('no','', TEXT_NO, 'alt="' . TEXT_NO . '"', false, 'submit') . "</form></p>\n";
+ } else {
+ echo '<p><b>' . TEXT_CONFIRM_DELETE . (mod_DATATYPE_REPLACE_extra::$pInfo->uses_list ? TEXT_VALUES_GONE : '') . "</b></p>\n";
+ echo '<p>' . tep_draw_form('yes', mod_DATATYPE_REPLACE_extra::FILENAME, tep_get_all_get_params(array('action','eid','confirm')). 'confirm=yes&action=delete&eid=' . mod_DATATYPE_REPLACE_extra::$eid) . tep_draw_input_field('yes','', TEXT_YES, 'alt="' . TEXT_YES . '"', false, 'submit') . '</form> ';
+ echo tep_draw_form('no', mod_DATATYPE_REPLACE_extra::FILENAME, tep_get_all_get_params(array('action','eid','confirm')).'eid=' . mod_DATATYPE_REPLACE_extra::$eid) . tep_draw_input_field('no','', TEXT_NO, 'alt="' . TEXT_NO . '"', false, 'submit') . "</form></p>\n";
+ }
+?>
\ No newline at end of file
Added: trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/gabarit/configuration/mod_DATATYPE_REPLACE_extra/draw.label.edit.gab
===================================================================
--- trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/gabarit/configuration/mod_DATATYPE_REPLACE_extra/draw.label.edit.gab (rev 0)
+++ trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/gabarit/configuration/mod_DATATYPE_REPLACE_extra/draw.label.edit.gab 2012-04-05 20:05:10 UTC (rev 4160)
@@ -0,0 +1,120 @@
+<?php
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 04/03/2012, 21:54
+ @author genrated by dev/datatype/generat
+ @encode UTF-8
+ @brief gabarit for listing extra fields _DATATYPE_REPLACE_
+
+*/
+global $action, $languages;
+?>
+ <div class="box_unique">
+ <h4><?php echo __('heading edit') ?></h4>
+ <?php echo tep_draw_form('field_entry',FILENAME_CONFIGURATION, tep_get_all_get_params(array('action','eid','confirm')). 'action=update' . '&confirm=yes&eid=' . mod_DATATYPE_REPLACE_extra::$eid , 'post'); ?>
+
+
+ <p>
+ <?php echo tep_draw_hidden_field('value_list','value_list', (((int)mod_DATATYPE_REPLACE_extra::$cInfo->epf_uses_value_list==1)? '1' : '0')) ?>
+ <?php echo tep_draw_hidden_field('epf_active_value_language','epf_active_value_language', (((int)mod_DATATYPE_REPLACE_extra::$cInfo->epf_active_value_language==1)? '1' : '0')) ?>
+ </p>
+
+
+ <fieldset class="tabs_lang block_field">
+ <ul>
+ <?php for ($i=0, $n=sizeof($languages); $i<$n; $i++) { ?>
+ <li><?php echo '<a href="#_DATATYPE_REPLACE__name-' . ($i+1).'" >' . tep_language_image ( $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . $languages[$i]['name'] . '</a>' ?></li>
+ <?php } ?>
+ </ul>
+
+ <?php reset($languages); for ($i=0, $n=sizeof($languages); $i<$n; $i++) { ?>
+ <ul id="<?php echo '_DATATYPE_REPLACE__name-'.($i+1) ?>">
+ <li>
+ <p class="block_input">
+ <label for="<?php echo 'label_' . $languages[$i]['id'] ?>" title="<?php echo __('entry label help') ?>"><?php echo __('entry label') ; ?></label>
+ <?php echo tep_draw_input_field('label_' . $languages[$i]['id'],'label_' . $languages[$i]['id'], mod_DATATYPE_REPLACE_extra::$cInfo->lg[$languages[$i]['id']]->epf_label, "size=64 maxlength=64") ?>
+ </p>
+ </li>
+ <li>
+ <p class="block_input">
+ <label for="<?php echo 'format_' . $languages[$i]['id'] ?>" title="<?php echo __('entry label help') ?>"><?php echo __('entry label format') ; ?></label>
+ <?php echo tep_draw_input_field('format_' . $languages[$i]['id'],'format_' . $languages[$i]['id'], mod_DATATYPE_REPLACE_extra::$cInfo->lg[$languages[$i]['id']]->epf_format, "size=64 maxlength=64") ?>
+ </p>
+ </li>
+ </ul>
+ <?php } ?>
+
+ </fieldset>
+
+ <fieldset class="block_field">
+ <p class="block_input">
+ <label for="search" title="<?php echo __('entry search help') ?>"><?php echo __('entry search'); ?></label>
+ <?php echo tep_draw_radio_field('search','search', '1', (((int)mod_DATATYPE_REPLACE_extra::$cInfo->epf_advanced_search==1)? true : false) ). ' ' .__('text yes'). ' ' . tep_draw_radio_field('search','search', '0', (((int)mod_DATATYPE_REPLACE_extra::$cInfo->epf_advanced_search==0)? true : false) ) . ' ' .__('text no'); ?>
+ </p>
+ <p class="block_input">
+ <label><?php echo __('ENTRY_LISTING') ?></label>
+ <?php echo tep_draw_radio_field('listing','listing', '1', (((int)mod_DATATYPE_REPLACE_extra::$cInfo->epf_show_in_listing==1)? true : false) ) . ' ' .__('text yes'). ' ' . tep_draw_radio_field('listing','listing', '0', (((int)mod_DATATYPE_REPLACE_extra::$cInfo->epf_show_in_listing==0)? true : false) ) . ' ' .__('text no'); ?>
+ </p>
+ <p class="block_input">
+ <label><?php echo __('ENTRY_META') ?></label>
+ <?php echo tep_draw_radio_field('meta','meta', '1',(((int)mod_DATATYPE_REPLACE_extra::$cInfo->epf_use_as_meta_keyword==1)? true : false) ) . ' ' .__('text yes'). ' ' . tep_draw_radio_field('meta','meta', '0', (((int)mod_DATATYPE_REPLACE_extra::$cInfo->epf_use_as_meta_keyword==0)? true : false) ) . ' ' .__('text no'); ?>
+ </p>
+ </fieldset>
+
+
+ <fieldset class="block_field">
+ <p class="block_input">
+ <label><?php echo __('ENTRY_ORDER') ?></label>
+ <?php echo tep_draw_input_field('sort_order','sort_order', (!empty(mod_DATATYPE_REPLACE_extra::$cInfo->epf_order)? mod_DATATYPE_REPLACE_extra::$cInfo->epf_order : '0' ) ); ?>
+ </p>
+
+
+ <p class="block_input">
+ <label for="epf_key" title="<?php echo __('ENTRY_UNIQ_KEY_HELP') ?>"><?php echo __('ENTRY_UNIQ_KEY'). tep_image(DIR_WS_ICONS . 'icon_help.gif'); ?></label>
+ <?php echo tep_draw_input_field('epf_key','epf_key', mod_DATATYPE_REPLACE_extra::$cInfo->epf_key); ?>
+ </p>
+
+ <p class="block_input">
+ <label><?php echo __('ENTRY_USE_ADMIN') ?></label>
+ <?php echo tep_draw_radio_field('epf_admin','epf_admin', '1', (((int)mod_DATATYPE_REPLACE_extra::$cInfo->epf_admin==1)? true : false) ) . ' ' .__('text yes'). ' ' . tep_draw_radio_field('epf_admin','epf_admin', '0', (((int)mod_DATATYPE_REPLACE_extra::$cInfo->epf_admin==0)? true : false) ) . ' ' .__('text no'); ?>
+ </p>
+ <p class="block_input">
+ <label for="epf_special_mod" title="<?php echo __('ENTRY_SPECIFIQUE_MODULE_HELP') ?>"><?php echo __('ENTRY_SPECIFIQUE_MODULE'). tep_image(DIR_WS_ICONS . 'icon_help.gif'); ?></label>
+ <?php echo tep_draw_input_field('epf_special_mod','epf_special_mod', mod_DATATYPE_REPLACE_extra::$cInfo->epf_special_mod); ?>
+ </p>
+ <p class="block_input">
+ <label><?php echo __('ENTRY_CHAIN') ?></label>
+ <?php echo tep_draw_radio_field('chain','chain', '1', (((int)mod_DATATYPE_REPLACE_extra::$cInfo->epf_show_parent_chain==1)? true : false) ) . ' ' .__('text yes'). ' ' . tep_draw_radio_field('chain','chain', '0', (((int)mod_DATATYPE_REPLACE_extra::$cInfo->epf_show_parent_chain==0)? true : false)) . ' ' .__('text no'); ?>
+ </p>
+
+ </fieldset>
+
+
+ <?php if ($action == 'new' || (!mod_DATATYPE_REPLACE_extra::$cInfo->epf_uses_value_list) ) : ?>
+ <fieldset class="block_field">
+ <p class="block_input">
+ <label for="restrict" title="<?php echo __('ENTRY_RESTRICT_HELP') ?>"><?php echo __('ENTRY_RESTRICT'). tep_image(DIR_WS_ICONS . 'icon_help.gif'); ?></label>
+ <?php echo tep_draw_radio_field('restrict','restrict', '1',(((int)mod_DATATYPE_REPLACE_extra::$cInfo->epf_use_to_restrict_listings==1)? true : false)) . ' ' .__('text yes'). ' ' . tep_draw_radio_field('restrict','restrict', '0',(((int)mod_DATATYPE_REPLACE_extra::$cInfo->epf_use_to_restrict_listings==0)? true : false) ) . ' ' .__('text no'); ?>
+ </p>
+
+ <p class="block_input">
+ <label for="size" title="<?php echo __('ENTRY_SIZE_HELP') ?>"><?php echo __('ENTRY_SIZE'). tep_image(DIR_WS_ICONS . 'icon_help.gif') ?></label>
+ <?php echo tep_draw_input_field('size','size', mod_DATATYPE_REPLACE_extra::$cInfo->epf_size,'',true); ?>
+ </p>
+ </fieldset>
+ <?php else: ?>
+ <p><?php echo tep_draw_hidden_field('size','size', mod_DATATYPE_REPLACE_extra::$cInfo->epf_size ) .tep_draw_hidden_field('restrict','restrict', mod_DATATYPE_REPLACE_extra::$cInfo->restrict,(((int)mod_DATATYPE_REPLACE_extra::$cInfo->restrict==1)? '1' : '0')) ?></p>
+ <?php endif; ?>
+
+
+
+
+ <div class="button_nav">
+ <?php echo tep_image_submit('button_save.gif', IMAGE_SAVE) . ' <a class="button" href="' . tep_href_link(FILENAME_CONFIGURATION, tep_get_all_get_params(array('action','flag','eid')) . 'eid=' . mod_DATATYPE_REPLACE_extra::$eid) . '">' . IMAGE_CANCEL . "</a>\n" ?>
+ </div>
+ </form>
+
+ </div>
Added: trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/gabarit/configuration/mod_DATATYPE_REPLACE_extra/draw.label.listing.gab
===================================================================
--- trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/gabarit/configuration/mod_DATATYPE_REPLACE_extra/draw.label.listing.gab (rev 0)
+++ trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/gabarit/configuration/mod_DATATYPE_REPLACE_extra/draw.label.listing.gab 2012-04-05 20:05:10 UTC (rev 4160)
@@ -0,0 +1,71 @@
+<?php
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 04/03/2012, 21:54
+ @author genrated by dev/datatype/generat
+ @encode UTF-8
+ @brief gabarit for listing extra fields _DATATYPE_REPLACE_
+*/
+?>
+
+<div id="ssmenu">
+ <?php echo tep_ssmenu_configuration($_GET['gparentID']) ?>
+</div>
+
+
+<h3><?php echo __('HEADING_TITLE') ?></h3>
+
+ <div class="button_nav">
+ <?php printf(CsrtAction::getLink('button_nav', __('BUTTON_NEW') ), '', tep_href_link(mod_DATATYPE_REPLACE_extra::FILENAME, FILENAME_CFG__DATATYPE_REPLACE_SEOTAG_. '&list_id=&vid=&action=new') ,'' );?>
+ </div>
+<div class="box_uniq">
+
+ <table class="dataTable">
+ <thead>
+ <tr>
+ <th><?php echo __('TABLE_HEADING_ID'); ?></th>
+ <th><?php echo __('TABLE_HEADING_LABEL'); ?></th>
+ <th class="tright"><?php echo __('TABLE_HEADING_ORDER'); ?></th>
+ <th class="tcenter"><?php echo __('TABLE_HEADING_STATUS'); ?></th>
+ <th class="tcenter"><?php echo __('table heading visibility'); ?></th>
+ <th class="tcenter"><?php echo __('table heading type'); ?></th>
+ <th class="tcenter"><?php echo __('TABLE_HEADING_SPE_MODULE'); ?></th>
+ <th class="row_action"><?php echo __('table heading action'); ?></th>
+ </tr>
+ </thead>
+ <tbody>
+ <?php foreach(mod_DATATYPE_REPLACE_extra::$list as $epf) {?>
+ <tr class="dataTableRow">
+ <td class="dataTableContent"><?php echo $epf->epf_id; ?></td>
+ <td class="dataTableContent">
+ <?php $label_query = tep_db_query("select languages_id, epf_label from " . TABLE_PRODUCTS_EXTRA_FIELDS_LABELS . " where (epf_id = " . (int)$epf->epf_id . ") ");
+ while ($label = tep_db_fetch_array($label_query)) {
+ echo tep_image(DIR_WS_CATALOG_LANGUAGES . mod_DATATYPE_REPLACE_extra::$lang[$label['languages_id']]['directory'] . '/images/' . mod_DATATYPE_REPLACE_extra::$lang[$label['languages_id']]['image'], mod_DATATYPE_REPLACE_extra::$lang[$label['languages_id']]['name']) . ' ' . $label['epf_label'] . '<br>';
+ }
+ ?>
+ </td>
+ <td class="tcenter"><?php echo $epf->epf_order; ?></td>
+ <td class="tcenter">
+ <?php echo mod_DATATYPE_REPLACE_extra::get_item_status($epf); ?>
+ </td>
+ <td class="tcenter">
+ <?php echo ExtraUtility::GetInputVisibility($epf->epf_admin, true); ?>
+ </td>
+ <td class="tcenter">
+ <?php echo ExtraUtility::GetInputType ($epf->epf_input_type, true ); ?>
+ </td>
+
+ <td class="tcenter">
+ <?php echo $epf->epf_special_mod ?>
+ </td>
+ <td class="row_action">
+ <?php echo mod_DATATYPE_REPLACE_extra::get_item_action($epf); ?>
+ </td>
+ </tr>
+ <?php } ?>
+ </tbody>
+ </table>
+</div>
Added: trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/gabarit/configuration/mod_DATATYPE_REPLACE_extra/draw.label.new.gab
===================================================================
--- trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/gabarit/configuration/mod_DATATYPE_REPLACE_extra/draw.label.new.gab (rev 0)
+++ trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/gabarit/configuration/mod_DATATYPE_REPLACE_extra/draw.label.new.gab 2012-04-05 20:05:10 UTC (rev 4160)
@@ -0,0 +1,62 @@
+<?php
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 04/03/2012, 21:54
+ @author genrated by dev/datatype/generat
+ @encode UTF-8
+ @brief gabarit for listing extra fields _DATATYPE_REPLACE_, create new entry
+*/
+
+global $action, $languages;
+?>
+ <div class="box_unique">
+ <h4><?php echo (($action != 'edit')? __('heading extra fields list add value') : __('heading extra fields list edit value') . mod_DATATYPE_REPLACE_extra::$eid ) ?></h4>
+
+ <?php echo tep_draw_form('field_entry',FILENAME_CONFIGURATION, tep_get_all_get_params(array('action','eid','confirm')). 'action=insert', 'post'); ?>
+
+
+
+
+
+ <fieldset class="block_field">
+ <label><?php echo __('entry type input') ?></label>
+ <?php //echo tep_draw_radio_field('value_list','value_list', '1',(((int)mod_DATATYPE_REPLACE_extra::$cInfo->epf_uses_value_list==1)? true : false)) . ' ' .__('TEXT_YES'). ' ' . tep_draw_radio_field('value_list','value_list', '0',(((int)mod_DATATYPE_REPLACE_extra::$cInfo->epf_uses_value_list==0)? true : false)) . ' ' .__('TEXT_NO'); ?>
+
+ <ul class="block_input">
+ <li><?php echo tep_draw_radio_field('epf_input_type','epf_input_type', 0, (mod_DATATYPE_REPLACE_extra::$cInfo->epf_input_type==0) ? true : false) . __('entry list type input') ?></li>
+ <li><?php echo tep_draw_radio_field('epf_input_type','epf_input_type', 1, (mod_DATATYPE_REPLACE_extra::$cInfo->epf_input_type==1) ? true : false) . __('entry list type textarea') ?></li>
+ <li><?php echo tep_draw_radio_field('epf_input_type','epf_input_type', 2, (mod_DATATYPE_REPLACE_extra::$cInfo->epf_input_type==2) ? true : false) . __('entry list type radio') ?></li>
+ <li><?php echo tep_draw_radio_field('epf_input_type','epf_input_type', 5, (mod_DATATYPE_REPLACE_extra::$cInfo->epf_input_type==5) ? true : false) . __('entry list type hidden') ?></li>
+ </ul>
+
+ <ul class="block_input">
+ <li><?php echo tep_draw_radio_field('epf_input_type','epf_input_type', 3, (mod_DATATYPE_REPLACE_extra::$cInfo->epf_input_type==3) ? true : false) . __('entry list type checkbox') ?></li>
+ <li><?php echo tep_draw_radio_field('epf_input_type','epf_input_type', 7, (mod_DATATYPE_REPLACE_extra::$cInfo->epf_input_type==7) ? true : false) . __('entry list type checkbox multi') ?></li>
+ <li><?php echo tep_draw_radio_field('epf_input_type','epf_input_type', 4, (mod_DATATYPE_REPLACE_extra::$cInfo->epf_input_type==4) ? true : false) . __('entry list type select') ?></li>
+ <li><?php echo tep_draw_radio_field('epf_input_type','epf_input_type', 6, (mod_DATATYPE_REPLACE_extra::$cInfo->epf_input_type==6) ? true : false) . __('entry list type select multi') ?></li>
+ </ul>
+ </fieldset>
+
+
+ <p class="block_input">
+ <label for="epf_active_value_language" title="<?php echo __('ENTRY_ACTIVE_HELP') ?>"><?php echo __('ENTRY_ACTIVE') ?></label>
+ <?php echo tep_draw_radio_field('epf_active_value_language' ,'epf_active_value_language' , '1', (((int)mod_DATATYPE_REPLACE_extra::$cInfo->epf_active_value_language==1)? true : false) ) . ' ' . __('text yes') .
+ ' ' . tep_draw_radio_field('epf_active_value_language' ,'epf_active_value_language', '0', (((int)mod_DATATYPE_REPLACE_extra::$cInfo->epf_active_value_language==0)? true : false) ) . ' ' . __('text no'); ?>
+ </p>
+
+
+
+
+
+ <div class="button_nav">
+ <?php echo tep_image_submit('button_save.gif', __('mod_DATATYPE_REPLACE_extra extra label add')) .
+ tep_js_back(tep_href_link(mod_DATATYPE_REPLACE_extra::FILENAME, tep_get_all_get_params(array('action','flag','eid')) ), IMAGE_CANCEL) ;
+
+// ' <a class="button" href="' . tep_href_link(FILENAME_CONFIGURATION, tep_get_all_get_params(array('action','flag','eid')) . 'eid=' . mod_DATATYPE_REPLACE_extra::$eid) . '">' . IMAGE_CANCEL . "</a>\n" ?>
+ </div>
+ </form>
+
+ </div>
Added: trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/gabarit/configuration/mod_DATATYPE_REPLACE_extra/draw.value.delete.gab
===================================================================
--- trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/gabarit/configuration/mod_DATATYPE_REPLACE_extra/draw.value.delete.gab (rev 0)
+++ trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/gabarit/configuration/mod_DATATYPE_REPLACE_extra/draw.value.delete.gab 2012-04-05 20:05:10 UTC (rev 4160)
@@ -0,0 +1,24 @@
+<?php
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 04/03/2012, 21:54
+ @author genrated by dev/datatype/generat
+ @encode UTF-8
+ @brief gabarit for listing extra fields _DATATYPE_REPLACE_
+*/
+?>
+
+<h3><?php echo __('heading delete value') ?></h3>
+
+
+<?php echo tep_draw_form('yes', mod_DATATYPE_REPLACE_extra::FILENAME, tep_get_all_get_params(array('action','eid','confirm')). 'action=delete_value_confirm&eid=' . mod_DATATYPE_REPLACE_extra::$eid.'&vid='.$_GET['vid']) ?>
+
+<p><?php echo __('text delete value') ?>
+ <fieldset class="block_input button_nav">
+ <?php print tep_image_submit('button_delete.gif', IMAGE_DELETE) . tep_js_back(tep_href_link(mod_DATATYPE_REPLACE_extra::FILENAME, 'eid=' . mod_DATATYPE_REPLACE_extra::$eid ), IMAGE_CANCEL) ; ?>
+ </fieldset>
+
+</form>
\ No newline at end of file
Added: trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/gabarit/configuration/mod_DATATYPE_REPLACE_extra/draw.value.edit.gab
===================================================================
--- trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/gabarit/configuration/mod_DATATYPE_REPLACE_extra/draw.value.edit.gab (rev 0)
+++ trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/gabarit/configuration/mod_DATATYPE_REPLACE_extra/draw.value.edit.gab 2012-04-05 20:05:10 UTC (rev 4160)
@@ -0,0 +1,54 @@
+<?php
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 04/03/2012, 21:54
+ @author genrated by dev/datatype/generat
+ @encode UTF-8
+ @brief gabarit for listing extra fields _DATATYPE_REPLACE_
+
+*/
+global $action, $languages;
+?>
+<h4><?php echo __('heading extra fields list add value') ?></h4>
+
+
+
+<?php echo tep_draw_form('value_entry', FILENAME_CONFIGURATION,FILENAME_CFG__DATATYPE_REPLACE_SEOTAG_.'action=' . (($action == 'value_new') ? 'value_insert' : 'value_update') . '&eid=' . mod_DATATYPE_REPLACE_extra::$eid . '&vid=' . $_GET['vid'], 'post'); ?>
+
+ <div class="tabs_lang">
+ <ul>
+ <?php for ($i=0, $n=sizeof($languages); $i<$n; $i++) { ?>
+ <li><?php echo '<a href="#lang-' . ($i+1).'" >' . tep_language_image( $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . $languages[$i]['name'] . '</a>' ?></li>
+ <?php } ?>
+ </ul>
+
+ <?php for ($i=0, $n=sizeof($languages); $i<$n; $i++): ?>
+
+ <fieldset id="<?php echo 'lang-'.($i+1) ?>">
+ <p class="block_input">
+ <label for="<?php echo 'sort_order[' . $languages[$i]['id'].']' ?>" title="<?php echo __('entry value sort help') ?>"><?php echo __('entry value sort'); ?></label>
+ <?php echo tep_draw_input_field('sort_order['.$languages[$i]['id'].']','sort_order_'.$languages[$i]['id'],mod_DATATYPE_REPLACE_extra::$cInfo[$languages[$i]['id']]['sort_order']) ; ?>
+ </p>
+ <p class="block_input">
+ <label for="<?php echo 'value[' . $languages[$i]['id'].']' ?>" title="<?php echo __('entry value value help') ?>"><?php echo __('entry value value') ; ?></label>
+ <?php echo tep_draw_input_field('value['.$languages[$i]['id'].']','value_'.$languages[$i]['id'], mod_DATATYPE_REPLACE_extra::$cInfo[$languages[$i]['id']]['epf_value'], 'size=64 maxlength=64'); ?>
+ </p>
+ </fieldset>
+
+ <?php endfor; ?>
+
+ </div>
+
+ <div class="button_nav">
+
+ <?php echo tep_js_back(tep_href_link(mod_DATATYPE_REPLACE_extra::FILENAME,FILENAME_CFG__DATATYPE_REPLACE_SEOTAG_), __('listing fields') ); ?>
+ <?php echo tep_js_back(tep_href_link(mod_DATATYPE_REPLACE_extra::FILENAME,FILENAME_CFG__DATATYPE_REPLACE_SEOTAG_.'eid='.mod_DATATYPE_REPLACE_extra::$eid.'&action=value_listing'), __('listing value fields') ); ?>
+
+ <?php echo tep_image_submit('button_save.gif', IMAGE_SAVE) ?>
+
+ </div>
+
+</form>
\ No newline at end of file
Added: trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/gabarit/configuration/mod_DATATYPE_REPLACE_extra/draw.value.listing.gab
===================================================================
--- trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/gabarit/configuration/mod_DATATYPE_REPLACE_extra/draw.value.listing.gab (rev 0)
+++ trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/gabarit/configuration/mod_DATATYPE_REPLACE_extra/draw.value.listing.gab 2012-04-05 20:05:10 UTC (rev 4160)
@@ -0,0 +1,44 @@
+<?php
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 04/03/2012, 21:54
+ @author genrated by dev/datatype/generat
+ @encode UTF-8
+ @brief gabarit for listing extra fields _DATATYPE_REPLACE_
+
+*/
+
+global $action, $languages;
+?>
+ <div class="button_nav">
+ <?php printf(CsrtAction::getLink('button_nav', __('listing fields') ), '', tep_href_link(mod_DATATYPE_REPLACE_extra::FILENAME, FILENAME_CFG__DATATYPE_REPLACE_SEOTAG_. 'eid='.mod_DATATYPE_REPLACE_extra::$eid.'&list_id=&vid=&parent=') ,'' );?>
+ <?php printf(CsrtAction::getLink('button_nav', __('BUTTON_VALUE_ADD_LIST') ), '', tep_href_link(mod_DATATYPE_REPLACE_extra::FILENAME, FILENAME_CFG__DATATYPE_REPLACE_SEOTAG_. 'eid='.mod_DATATYPE_REPLACE_extra::$eid.'&list_id=&vid=&parent=&action=value_new') ,'' );?>
+ </div>
+
+<table class="dataTable" >
+ <thead>
+ <tr>
+ <th class="tcenter"><?php echo __('TABLE_HEADING_ID'); ?></th>
+ <th><?php echo __('TABLE_HEADING_VALUE'); ?></th>
+ <th class="tcenter"><?php echo __('TABLE_HEADING_PARENT'); ?></th>
+ <th class="tcenter"><?php echo __('TABLE_HEADING_ORDER'); ?></th>
+ <th class="row_action"><?php echo __('table heading action'); ?></th>
+ </tr>
+ </thead>
+ <tbody>
+ <?php foreach (mod_DATATYPE_REPLACE_extra::$list[0] as $k=>$value): ?>
+ <tr class="dataTableRow">
+ <td class="tcenter"><?php echo $value['value_id']; ?></td>
+ <td><?php echo $value['epf_value']; ?></td>
+ <td class="tcenter"><?php echo $value['parent_id']; ?></td>
+ <td class="tcenter"><?php echo $value['sort_order']; ?></td>
+ <td class="row_action">
+ <?php echo mod_DATATYPE_REPLACE_extra::get_item_value_action($value); ?>
+ </tr>
+ <?php endforeach; ?>
+
+ </tbody>
+ </table>
Added: trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/gabarit/configuration/mod_DATATYPE_REPLACE_extra/draw.value.new.gab
===================================================================
--- trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/gabarit/configuration/mod_DATATYPE_REPLACE_extra/draw.value.new.gab (rev 0)
+++ trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/gabarit/configuration/mod_DATATYPE_REPLACE_extra/draw.value.new.gab 2012-04-05 20:05:10 UTC (rev 4160)
@@ -0,0 +1,48 @@
+<?php
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 04/03/2012, 21:54
+ @author genrated by dev/datatype/generat
+ @encode UTF-8
+ @brief gabarit for listing extra fields _DATATYPE_REPLACE_, create new entry
+*/
+
+global $action, $languages;
+?>
+ <div class="box_unique">
+ <h4><?php echo (($action == 'edit')? __('HEADING_NEW') : __('HEADING_EDIT') . mod_DATATYPE_REPLACE_extra::$eid ) ?></h4>
+
+ <?php echo tep_draw_form('field_entry',FILENAME_CONFIGURATION, tep_get_all_get_params(array('action','eid','confirm')). 'action=insert', 'post'); ?>
+
+
+
+
+
+ <p class="block_input">
+ <label><?php echo __('ENTRY_VALUE_LIST') ?></label>
+ <?php echo tep_draw_radio_field('value_list','value_list', '1',(((int)mod_DATATYPE_REPLACE_extra::$cInfo['epf_uses_value_list']==1)? true : false)) . ' ' .__('TEXT_YES'). ' ' . tep_draw_radio_field('value_list','value_list', '0',(((int)mod_DATATYPE_REPLACE_extra::$cInfo['epf_uses_value_list']==0)? true : false)) . ' ' .__('TEXT_NO'); ?>
+ </p>
+
+
+ <p class="block_input">
+ <label for="epf_active_for_language" title="<?php echo __('ENTRY_ACTIVE_HELP') ?>"><?php echo __('ENTRY_ACTIVE'). tep_image(DIR_WS_ICONS . 'icon_help.gif'); ?></label>
+ <?php echo tep_draw_radio_field('epf_active_for_language' ,'epf_active_for_language' , '1', (((int)mod_DATATYPE_REPLACE_extra::$cInfo['epf_active_for_language']==1)? true : false) ) . ' ' . __('TEXT_YES') .
+ ' ' . tep_draw_radio_field('epf_active_for_language' ,'epf_active_for_language', '0', (((int)mod_DATATYPE_REPLACE_extra::$cInfo['epf_active_for_language']==0)? true : false) ) . ' ' . __('TEXT_NO'); ?>
+ </p>
+
+
+
+
+
+ <div class="button_nav">
+ <?php echo tep_image_submit('button_save.gif', __('mod_DATATYPE_REPLACE_extra extra label add')) .
+ tep_js_back(tep_href_link(mod_DATATYPE_REPLACE_extra::FILENAME, tep_get_all_get_params(array('action','flag','eid')) ), IMAGE_CANCEL) ;
+
+// ' <a class="button" href="' . tep_href_link(FILENAME_CONFIGURATION, tep_get_all_get_params(array('action','flag','eid')) . 'eid=' . mod_DATATYPE_REPLACE_extra::$eid) . '">' . IMAGE_CANCEL . "</a>\n" ?>
+ </div>
+ </form>
+
+ </div>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-04-05 20:03:02
|
Revision: 4159
http://oscss.svn.sourceforge.net/oscss/?rev=4159&view=rev
Author: oscim
Date: 2012-04-05 20:02:56 +0000 (Thu, 05 Apr 2012)
Log Message:
-----------
Correction coquille diverse
nettoayge code
centralisation d'un module notype de listing generic
Modified Paths:
--------------
trunk/catalog/admin/includes/modules/configuration/modprodextra.php
trunk/catalog/common/classes/datatype_drivers/Data_categorie.php
trunk/catalog/includes/inc_base_lib.php
trunk/catalog/index.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/2cShopHtml5Oscim/includes/content/index_listing.php
Added Paths:
-----------
trunk/catalog/includes/modules/listing.php
Modified: trunk/catalog/admin/includes/modules/configuration/modprodextra.php
===================================================================
--- trunk/catalog/admin/includes/modules/configuration/modprodextra.php 2012-04-05 19:46:38 UTC (rev 4158)
+++ trunk/catalog/admin/includes/modules/configuration/modprodextra.php 2012-04-05 20:02:56 UTC (rev 4159)
@@ -11,7 +11,7 @@
@brief Gestion Des configuration product extra fields
*/
-define('FILENAME_CFG_34',"gparentID=120&gID=34&");
+define('FILENAME_CFG_34',"gparentID=".@$_GET['gparentID']."&gID=&".@$_GET['gID']);
Class modprodextra{
Modified: trunk/catalog/common/classes/datatype_drivers/Data_categorie.php
===================================================================
--- trunk/catalog/common/classes/datatype_drivers/Data_categorie.php 2012-04-05 19:46:38 UTC (rev 4158)
+++ trunk/catalog/common/classes/datatype_drivers/Data_categorie.php 2012-04-05 20:02:56 UTC (rev 4159)
@@ -49,7 +49,7 @@
@var DataType root listing
Use for generate listing based on current data type precised in array
*/
- public $RootListing = array('annonces', 'product', 'content', 'nested');
+ public $RootListing = array( 'product', 'content', 'nested');
/**
@@ -102,7 +102,6 @@
else {
foreach($this->RootListing as $row){
-
if(!empty($categories->datatype) && in_array($row, explode(',', $categories->datatype) ) && class_exists($row) ){
$count_c=$row::get_count_in_category((int)$current_category_id);
@@ -131,8 +130,6 @@
}
}
-
-
$page->add_var_page('category_depth',$category_depth);
}
Modified: trunk/catalog/includes/inc_base_lib.php
===================================================================
--- trunk/catalog/includes/inc_base_lib.php 2012-04-05 19:46:38 UTC (rev 4158)
+++ trunk/catalog/includes/inc_base_lib.php 2012-04-05 20:02:56 UTC (rev 4159)
@@ -33,9 +33,9 @@
/**
TODO Adjust load driver based on PUBLIC_TYPE_PAGE
*/
- if( ($path=autoload::getPath('driver.categorie')) && $path != false) $file[]=$path;
- if( ($path=autoload::getPath('driver.product')) && $path != false) $file[]=$path;
- if( ($path=autoload::getPath('driver.content')) && $path != false) $file[]=$path;
+// if( ($path=autoload::getPath('driver.categorie')) && $path != false) $file[]=$path;
+// if( ($path=autoload::getPath('driver.product')) && $path != false) $file[]=$path;
+// if( ($path=autoload::getPath('driver.content')) && $path != false) $file[]=$path;
if( ($path=autoload::getPath('page')) && $path != false) $file[]=$path;
// if( ($path=autoload::getPath('drivers/page/'.PUBLIC_DRIVERS_PAGE)) && $path != false) $file[]=$path;
Added: trunk/catalog/includes/modules/listing.php
===================================================================
--- trunk/catalog/includes/modules/listing.php (rev 0)
+++ trunk/catalog/includes/modules/listing.php 2012-04-05 20:02:56 UTC (rev 4159)
@@ -0,0 +1,62 @@
+<?php
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 05/03/2012, 17:29
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+ @brief this generic module for call all datatype listing
+ This query sql calculate other class/pages
+ This loop format result for display generic call
+*/
+function in_obj_listing($type){
+ global $page;
+ $mod=$page->oscss_modules->_return('listing');
+
+ // type data for process , extract in DataTypes class
+ $subtype = DataTypes::GetTypePage('sub');
+
+ // result page.listing query sql
+ $listing_split=$mod['listing_split'];
+ $listing_query=$mod['listing_query'];
+
+ // required by products
+ $languages_id=$page->the_var('languages_id');
+ $currencies=$page->return_object('currencies');
+
+ $p=array();
+ // init aca module
+ $aca_listing=$page->new_class('listing');
+ if(is_string($listing_query))$listing_query=tep_db_query($listing_query);
+
+ // loop for extract
+ while ($listing = tep_db_fetch_array($listing_query)){
+
+ // retro-compatibilite
+ if(in_array($subtype, array('product') ))
+ $key = $subtype.'s_id';
+ else
+ $key = $subtype. '_id';
+
+ // result
+ $pd=$subtype::get_item($listing[$key]);
+ // call loop for Aca modules
+ $pd->aca=$aca_listing->return_db_min($listing[$key]);
+ // add type data in current item
+ $pd->type = $subtype;
+ $p[]=$pd;
+ }
+
+
+ return new objectInfo(array(
+ 'title'=>'',
+ 'content'=>$p, // all array result
+ 'split'=> $listing_split , // object for link split page
+ 'type'=>$subtype // type result
+ ));
+
+}
+
+?>
\ No newline at end of file
Modified: trunk/catalog/index.php
===================================================================
--- trunk/catalog/index.php 2012-04-05 19:46:38 UTC (rev 4158)
+++ trunk/catalog/index.php 2012-04-05 20:02:56 UTC (rev 4159)
@@ -84,8 +84,8 @@
$breadcrumb=$page->return_object('breadcrumb');
// call master DataTypes listing and next childs modules
DataTypes::transversal('transversal');
+// exit;
-
$listing=listing::getInstance();
$listing_split = $listing->listing($dyntype);
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 2012-04-05 19:46:38 UTC (rev 4158)
+++ trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/Childs_tpl/module.php 2012-04-05 20:02:56 UTC (rev 4159)
@@ -107,6 +107,13 @@
</div>
</section>
</li>
+
+ <?php else : /** Other */ ?>
+ <dl class="listing contents <?php echo $page->page_content_clean() ?>">
+ <dt class="listing_s">
+ <a id="<?php echo $ele->id; ?>" href="<?php echo $ele->href ; ?>" ><?php echo $ele->title ?></a>
+ </dt>
+ </dl>
<?php endif; ?>
<?php endforeach; ?>
Modified: trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/cfg/init.php
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/cfg/init.php 2012-04-05 19:46:38 UTC (rev 4158)
+++ trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/cfg/init.php 2012-04-05 20:02:56 UTC (rev 4159)
@@ -141,6 +141,9 @@
$this->oscss_boxes->_add('categories', 'sidebar');
$this->oscss_boxes->_add('manufacturer_info', 'sidebar');
$this->oscss_boxes->_add('specials', 'sidebar', array('cache'=>false));
+
+ $this->oscss_modules->_add(FILENAME_ALSO_PURCHASED_PRODUCTS,'center',array('sort'=>60));
+ $this->oscss_modules->_add(FILENAME_UPCOMING_PRODUCTS,'center',array('sort'=>61));
break;
case 'listing':
@@ -211,40 +214,4 @@
$page->add_var_page('MAX_DISPLAY_PRODUCTS_NEW','25');
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-/**
- Configuration des modules.
-*/
-// if($page->is_page_type('product') ){
-// $this->oscss_modules->_add(FILENAME_ALSO_PURCHASED_PRODUCTS,'center',array('sort'=>60));
-// $this->oscss_modules->_add(FILENAME_UPCOMING_PRODUCTS,'center',array('sort'=>60));
-// }
-// elseif(!$page->is_page_type('account') && !$page->is_page_type('cart') && !$page->is_page_type('checkout')&& !$page->is_page_type('none'))
-// $this->oscss_modules->_add(FILENAME_NEW_PRODUCTS,'center',array('sort'=>60));
-
-/**
-Les element a placé dans les gabarits de page
-
-Il sont nécessairement appelé par $page, ou le code raccourcis de l'object
-*/
?>
\ No newline at end of file
Modified: trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/content/index_listing.php
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/content/index_listing.php 2012-04-05 19:46:38 UTC (rev 4158)
+++ trunk/catalog/install/data/templates/appareil_photo/2cShopHtml5Oscim/includes/content/index_listing.php 2012-04-05 20:02:56 UTC (rev 4159)
@@ -6,17 +6,37 @@
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@date 16/09/10, 21:54
@encode UTF-8
+ @brief draw for all listing generated by Datatypes Rootlisting
+*/
- Prend en charge les appels vers les listes, type listing: produits, articles, rubriques
+/**
+ @remarks local load var
*/
$cPath=$page->the_var('cPath');
$category_depth=$page->the_var('category_depth');
$categories=$page->the_var('categories');
+
/**
@remarks Generic RootListing is detail current master , header listing
*/
$RootListing=$page->the_var('RootListing');
+
+/**
+ @remarks Pre-load module no-type
+*/
+
+ // context nested = childs cats
+ if ($category_depth == 'nested')
+ $page->oscss_modules->_add('listing_cat.php','center');
+
+
+ // listing datatype query exists
+ if (isset($listing_split) && (isset($listing_query) && tep_db_num_rows($listing_query)>0) )
+ $page->oscss_modules->_add('listing.php','center', array('listing_split'=>$listing_split,'listing_query'=>@$listing_query) );
+ // load other module if not result current listing
+ else
+ $page->oscss_modules->_add(FILENAME_NEW_PRODUCTS,'center');
?>
@@ -40,15 +60,3 @@
<?php /** liste des categories */ if(!isset($_GET['manufacturers_id']) && $category_depth=='products') echo tep_manufacturers_list($page->the_var('current_category_id')); ?>
</div>
-
-<?php /** L'appel du module sera prise en charge par le template */
-
- /** init module liste image des categories enfant. */
- if ($category_depth == 'nested') $page->oscss_modules->_add('listing_cat.php','center');
- /** init module liste des produit ou page de la categories concerné */
- if (isset($listing_split) && (isset($listing_query) && tep_db_num_rows($listing_query)>0) ) {
- if($category_depth=='products'||$category_depth == 'nested') $page->oscss_modules->_add(FILENAME_PRODUCT_LISTING,'center', array('listing_split'=>$listing_split,'listing_query'=>@$listing_query) );
- elseif($category_depth=='pages') $page->oscss_modules->_add('listing_pages.php','center', array('title'=>TEXT_HEADING_CHILD_PRODUCT, 'listing_split'=>$listing_split, 'listing_query'=>@$listing_query) );
- /** init d'un module de remplacement ...; */
- } else $page->oscss_modules->_add(FILENAME_NEW_PRODUCTS,'center');
-?>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-04-05 19:46:45
|
Revision: 4158
http://oscss.svn.sourceforge.net/oscss/?rev=4158&view=rev
Author: oscim
Date: 2012-04-05 19:46:38 +0000 (Thu, 05 Apr 2012)
Log Message:
-----------
Ajout gabarit html du module de configuration des extra
Modified Paths:
--------------
trunk/catalog/admin/includes/gabarit/configuration/modprodextra/draw.delete.gab
trunk/catalog/admin/includes/gabarit/configuration/modprodextra/draw.label.edit.gab
trunk/catalog/admin/includes/gabarit/configuration/modprodextra/draw.label.listing.gab
trunk/catalog/admin/includes/gabarit/configuration/modprodextra/draw.label.new.gab
trunk/catalog/admin/includes/gabarit/configuration/modprodextra/draw.value.delete.gab
trunk/catalog/admin/includes/gabarit/configuration/modprodextra/draw.value.edit.gab
trunk/catalog/admin/includes/gabarit/configuration/modprodextra/draw.value.listing.gab
trunk/catalog/admin/includes/gabarit/configuration/modprodextra/draw.value.new.gab
Modified: trunk/catalog/admin/includes/gabarit/configuration/modprodextra/draw.delete.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/configuration/modprodextra/draw.delete.gab 2012-04-05 19:42:32 UTC (rev 4157)
+++ trunk/catalog/admin/includes/gabarit/configuration/modprodextra/draw.delete.gab 2012-04-05 19:46:38 UTC (rev 4158)
@@ -4,24 +4,24 @@
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 08/02/2012, 15:38
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @date 04/03/2012, 21:54
+ @author genrated by dev/datatype/generat
@encode UTF-8
- @brief gabarit for listing extra fields products
+ @brief gabarit for listing extra fields _DATATYPE_REPLACE_
*/
?>
<h3><?php echo HEADING_TITLE ?></h3>
-<h4><?php echo HEADING_DELETE . modprodextra::$eid ?></h4>
+<h4><?php echo HEADING_DELETE . mod_DATATYPE_REPLACE_extra::$eid ?></h4>
-<?php if (modprodextra::$double_check == 'no') {
- echo '<p>' . TEXT_ARE_SURE . (modprodextra::$pInfo->uses_list ? TEXT_VALUES_GONE : '') . "</p>\n";
- echo '<p>' . tep_draw_form('yes',modprodextra::FILENAME, tep_get_all_get_params(array('action','eid','confirm')). 'confirm=yes&action=delete&eid=' . modprodextra::$eid . '&used=' . modprodextra::$pInfo->used) . tep_draw_input_field('yes','', TEXT_YES, 'alt="' . TEXT_YES . '"', false, 'submit') . '</form> ';
- echo tep_draw_form('no', modprodextra::FILENAME, tep_get_all_get_params(array('action','eid','confirm')) .'eid=' . modprodextra::$eid) . tep_draw_input_field('no','', TEXT_NO, 'alt="' . TEXT_NO . '"', false, 'submit') . "</form></p>\n";
+<?php if (mod_DATATYPE_REPLACE_extra::$double_check == 'no') {
+ echo '<p>' . TEXT_ARE_SURE . (mod_DATATYPE_REPLACE_extra::$pInfo->uses_list ? TEXT_VALUES_GONE : '') . "</p>\n";
+ echo '<p>' . tep_draw_form('yes',mod_DATATYPE_REPLACE_extra::FILENAME, tep_get_all_get_params(array('action','eid','confirm')). 'confirm=yes&action=delete&eid=' . mod_DATATYPE_REPLACE_extra::$eid . '&used=' . mod_DATATYPE_REPLACE_extra::$pInfo->used) . tep_draw_input_field('yes','', TEXT_YES, 'alt="' . TEXT_YES . '"', false, 'submit') . '</form> ';
+ echo tep_draw_form('no', mod_DATATYPE_REPLACE_extra::FILENAME, tep_get_all_get_params(array('action','eid','confirm')) .'eid=' . mod_DATATYPE_REPLACE_extra::$eid) . tep_draw_input_field('no','', TEXT_NO, 'alt="' . TEXT_NO . '"', false, 'submit') . "</form></p>\n";
} else {
- echo '<p><b>' . TEXT_CONFIRM_DELETE . (modprodextra::$pInfo->uses_list ? TEXT_VALUES_GONE : '') . "</b></p>\n";
- echo '<p>' . tep_draw_form('yes', modprodextra::FILENAME, tep_get_all_get_params(array('action','eid','confirm')). 'confirm=yes&action=delete&eid=' . modprodextra::$eid) . tep_draw_input_field('yes','', TEXT_YES, 'alt="' . TEXT_YES . '"', false, 'submit') . '</form> ';
- echo tep_draw_form('no', modprodextra::FILENAME, tep_get_all_get_params(array('action','eid','confirm')).'eid=' . modprodextra::$eid) . tep_draw_input_field('no','', TEXT_NO, 'alt="' . TEXT_NO . '"', false, 'submit') . "</form></p>\n";
+ echo '<p><b>' . TEXT_CONFIRM_DELETE . (mod_DATATYPE_REPLACE_extra::$pInfo->uses_list ? TEXT_VALUES_GONE : '') . "</b></p>\n";
+ echo '<p>' . tep_draw_form('yes', mod_DATATYPE_REPLACE_extra::FILENAME, tep_get_all_get_params(array('action','eid','confirm')). 'confirm=yes&action=delete&eid=' . mod_DATATYPE_REPLACE_extra::$eid) . tep_draw_input_field('yes','', TEXT_YES, 'alt="' . TEXT_YES . '"', false, 'submit') . '</form> ';
+ echo tep_draw_form('no', mod_DATATYPE_REPLACE_extra::FILENAME, tep_get_all_get_params(array('action','eid','confirm')).'eid=' . mod_DATATYPE_REPLACE_extra::$eid) . tep_draw_input_field('no','', TEXT_NO, 'alt="' . TEXT_NO . '"', false, 'submit') . "</form></p>\n";
}
?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/gabarit/configuration/modprodextra/draw.label.edit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/configuration/modprodextra/draw.label.edit.gab 2012-04-05 19:42:32 UTC (rev 4157)
+++ trunk/catalog/admin/includes/gabarit/configuration/modprodextra/draw.label.edit.gab 2012-04-05 19:46:38 UTC (rev 4158)
@@ -4,44 +4,44 @@
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 08/02/2012, 15:38
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @date 04/03/2012, 21:54
+ @author genrated by dev/datatype/generat
@encode UTF-8
- @brief gabarit for listing extra fields products
+ @brief gabarit for listing extra fields _DATATYPE_REPLACE_
*/
global $action, $languages;
?>
<div class="box_unique">
<h4><?php echo __('heading edit') ?></h4>
- <?php echo tep_draw_form('field_entry',FILENAME_CONFIGURATION, tep_get_all_get_params(array('action','eid','confirm')). 'action=update' . '&confirm=yes&eid=' . modprodextra::$eid , 'post'); ?>
+ <?php echo tep_draw_form('field_entry',FILENAME_CONFIGURATION, tep_get_all_get_params(array('action','eid','confirm')). 'action=update' . '&confirm=yes&eid=' . mod_DATATYPE_REPLACE_extra::$eid , 'post'); ?>
<p>
- <?php echo tep_draw_hidden_field('value_list','value_list', (((int)modprodextra::$cInfo->epf_uses_value_list==1)? '1' : '0')) ?>
- <?php echo tep_draw_hidden_field('epf_active_value_language','epf_active_value_language', (((int)modprodextra::$cInfo->epf_active_value_language==1)? '1' : '0')) ?>
+ <?php echo tep_draw_hidden_field('value_list','value_list', (((int)mod_DATATYPE_REPLACE_extra::$cInfo->epf_uses_value_list==1)? '1' : '0')) ?>
+ <?php echo tep_draw_hidden_field('epf_active_value_language','epf_active_value_language', (((int)mod_DATATYPE_REPLACE_extra::$cInfo->epf_active_value_language==1)? '1' : '0')) ?>
</p>
<fieldset class="tabs_lang block_field">
<ul>
<?php for ($i=0, $n=sizeof($languages); $i<$n; $i++) { ?>
- <li><?php echo '<a href="#products_name-' . ($i+1).'" >' . tep_language_image ( $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . $languages[$i]['name'] . '</a>' ?></li>
+ <li><?php echo '<a href="#_DATATYPE_REPLACE__name-' . ($i+1).'" >' . tep_language_image ( $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . $languages[$i]['name'] . '</a>' ?></li>
<?php } ?>
</ul>
<?php reset($languages); for ($i=0, $n=sizeof($languages); $i<$n; $i++) { ?>
- <ul id="<?php echo 'products_name-'.($i+1) ?>">
+ <ul id="<?php echo '_DATATYPE_REPLACE__name-'.($i+1) ?>">
<li>
<p class="block_input">
<label for="<?php echo 'label_' . $languages[$i]['id'] ?>" title="<?php echo __('entry label help') ?>"><?php echo __('entry label') ; ?></label>
- <?php echo tep_draw_input_field('label_' . $languages[$i]['id'],'label_' . $languages[$i]['id'], modprodextra::$cInfo->lg[$languages[$i]['id']]->epf_label, "size=64 maxlength=64") ?>
+ <?php echo tep_draw_input_field('label_' . $languages[$i]['id'],'label_' . $languages[$i]['id'], mod_DATATYPE_REPLACE_extra::$cInfo->lg[$languages[$i]['id']]->epf_label, "size=64 maxlength=64") ?>
</p>
</li>
<li>
<p class="block_input">
<label for="<?php echo 'format_' . $languages[$i]['id'] ?>" title="<?php echo __('entry label help') ?>"><?php echo __('entry label format') ; ?></label>
- <?php echo tep_draw_input_field('format_' . $languages[$i]['id'],'format_' . $languages[$i]['id'], modprodextra::$cInfo->lg[$languages[$i]['id']]->epf_format, "size=64 maxlength=64") ?>
+ <?php echo tep_draw_input_field('format_' . $languages[$i]['id'],'format_' . $languages[$i]['id'], mod_DATATYPE_REPLACE_extra::$cInfo->lg[$languages[$i]['id']]->epf_format, "size=64 maxlength=64") ?>
</p>
</li>
</ul>
@@ -52,15 +52,15 @@
<fieldset class="block_field">
<p class="block_input">
<label for="search" title="<?php echo __('entry search help') ?>"><?php echo __('entry search'); ?></label>
- <?php echo tep_draw_radio_field('search','search', '1', (((int)modprodextra::$cInfo->epf_advanced_search==1)? true : false) ). ' ' .__('text yes'). ' ' . tep_draw_radio_field('search','search', '0', (((int)modprodextra::$cInfo->epf_advanced_search==0)? true : false) ) . ' ' .__('text no'); ?>
+ <?php echo tep_draw_radio_field('search','search', '1', (((int)mod_DATATYPE_REPLACE_extra::$cInfo->epf_advanced_search==1)? true : false) ). ' ' .__('text yes'). ' ' . tep_draw_radio_field('search','search', '0', (((int)mod_DATATYPE_REPLACE_extra::$cInfo->epf_advanced_search==0)? true : false) ) . ' ' .__('text no'); ?>
</p>
<p class="block_input">
<label><?php echo __('ENTRY_LISTING') ?></label>
- <?php echo tep_draw_radio_field('listing','listing', '1', (((int)modprodextra::$cInfo->epf_show_in_listing==1)? true : false) ) . ' ' .__('text yes'). ' ' . tep_draw_radio_field('listing','listing', '0', (((int)modprodextra::$cInfo->epf_show_in_listing==0)? true : false) ) . ' ' .__('text no'); ?>
+ <?php echo tep_draw_radio_field('listing','listing', '1', (((int)mod_DATATYPE_REPLACE_extra::$cInfo->epf_show_in_listing==1)? true : false) ) . ' ' .__('text yes'). ' ' . tep_draw_radio_field('listing','listing', '0', (((int)mod_DATATYPE_REPLACE_extra::$cInfo->epf_show_in_listing==0)? true : false) ) . ' ' .__('text no'); ?>
</p>
<p class="block_input">
<label><?php echo __('ENTRY_META') ?></label>
- <?php echo tep_draw_radio_field('meta','meta', '1',(((int)modprodextra::$cInfo->epf_use_as_meta_keyword==1)? true : false) ) . ' ' .__('text yes'). ' ' . tep_draw_radio_field('meta','meta', '0', (((int)modprodextra::$cInfo->epf_use_as_meta_keyword==0)? true : false) ) . ' ' .__('text no'); ?>
+ <?php echo tep_draw_radio_field('meta','meta', '1',(((int)mod_DATATYPE_REPLACE_extra::$cInfo->epf_use_as_meta_keyword==1)? true : false) ) . ' ' .__('text yes'). ' ' . tep_draw_radio_field('meta','meta', '0', (((int)mod_DATATYPE_REPLACE_extra::$cInfo->epf_use_as_meta_keyword==0)? true : false) ) . ' ' .__('text no'); ?>
</p>
</fieldset>
@@ -68,52 +68,52 @@
<fieldset class="block_field">
<p class="block_input">
<label><?php echo __('ENTRY_ORDER') ?></label>
- <?php echo tep_draw_input_field('sort_order','sort_order', (!empty(modprodextra::$cInfo->epf_order)? modprodextra::$cInfo->epf_order : '0' ) ); ?>
+ <?php echo tep_draw_input_field('sort_order','sort_order', (!empty(mod_DATATYPE_REPLACE_extra::$cInfo->epf_order)? mod_DATATYPE_REPLACE_extra::$cInfo->epf_order : '0' ) ); ?>
</p>
<p class="block_input">
<label for="epf_key" title="<?php echo __('ENTRY_UNIQ_KEY_HELP') ?>"><?php echo __('ENTRY_UNIQ_KEY'). tep_image(DIR_WS_ICONS . 'icon_help.gif'); ?></label>
- <?php echo tep_draw_input_field('epf_key','epf_key', modprodextra::$cInfo->epf_key); ?>
+ <?php echo tep_draw_input_field('epf_key','epf_key', mod_DATATYPE_REPLACE_extra::$cInfo->epf_key); ?>
</p>
<p class="block_input">
<label><?php echo __('ENTRY_USE_ADMIN') ?></label>
- <?php echo tep_draw_radio_field('epf_admin','epf_admin', '1', (((int)modprodextra::$cInfo->epf_admin==1)? true : false) ) . ' ' .__('text yes'). ' ' . tep_draw_radio_field('epf_admin','epf_admin', '0', (((int)modprodextra::$cInfo->epf_admin==0)? true : false) ) . ' ' .__('text no'); ?>
+ <?php echo tep_draw_radio_field('epf_admin','epf_admin', '1', (((int)mod_DATATYPE_REPLACE_extra::$cInfo->epf_admin==1)? true : false) ) . ' ' .__('text yes'). ' ' . tep_draw_radio_field('epf_admin','epf_admin', '0', (((int)mod_DATATYPE_REPLACE_extra::$cInfo->epf_admin==0)? true : false) ) . ' ' .__('text no'); ?>
</p>
<p class="block_input">
<label for="epf_special_mod" title="<?php echo __('ENTRY_SPECIFIQUE_MODULE_HELP') ?>"><?php echo __('ENTRY_SPECIFIQUE_MODULE'). tep_image(DIR_WS_ICONS . 'icon_help.gif'); ?></label>
- <?php echo tep_draw_input_field('epf_special_mod','epf_special_mod', modprodextra::$cInfo->epf_special_mod); ?>
+ <?php echo tep_draw_input_field('epf_special_mod','epf_special_mod', mod_DATATYPE_REPLACE_extra::$cInfo->epf_special_mod); ?>
</p>
<p class="block_input">
<label><?php echo __('ENTRY_CHAIN') ?></label>
- <?php echo tep_draw_radio_field('chain','chain', '1', (((int)modprodextra::$cInfo->epf_show_parent_chain==1)? true : false) ) . ' ' .__('text yes'). ' ' . tep_draw_radio_field('chain','chain', '0', (((int)modprodextra::$cInfo->epf_show_parent_chain==0)? true : false)) . ' ' .__('text no'); ?>
+ <?php echo tep_draw_radio_field('chain','chain', '1', (((int)mod_DATATYPE_REPLACE_extra::$cInfo->epf_show_parent_chain==1)? true : false) ) . ' ' .__('text yes'). ' ' . tep_draw_radio_field('chain','chain', '0', (((int)mod_DATATYPE_REPLACE_extra::$cInfo->epf_show_parent_chain==0)? true : false)) . ' ' .__('text no'); ?>
</p>
</fieldset>
- <?php if ($action == 'new' || (!modprodextra::$cInfo->epf_uses_value_list) ) : ?>
+ <?php if ($action == 'new' || (!mod_DATATYPE_REPLACE_extra::$cInfo->epf_uses_value_list) ) : ?>
<fieldset class="block_field">
<p class="block_input">
<label for="restrict" title="<?php echo __('ENTRY_RESTRICT_HELP') ?>"><?php echo __('ENTRY_RESTRICT'). tep_image(DIR_WS_ICONS . 'icon_help.gif'); ?></label>
- <?php echo tep_draw_radio_field('restrict','restrict', '1',(((int)modprodextra::$cInfo->epf_use_to_restrict_listings==1)? true : false)) . ' ' .__('text yes'). ' ' . tep_draw_radio_field('restrict','restrict', '0',(((int)modprodextra::$cInfo->epf_use_to_restrict_listings==0)? true : false) ) . ' ' .__('text no'); ?>
+ <?php echo tep_draw_radio_field('restrict','restrict', '1',(((int)mod_DATATYPE_REPLACE_extra::$cInfo->epf_use_to_restrict_listings==1)? true : false)) . ' ' .__('text yes'). ' ' . tep_draw_radio_field('restrict','restrict', '0',(((int)mod_DATATYPE_REPLACE_extra::$cInfo->epf_use_to_restrict_listings==0)? true : false) ) . ' ' .__('text no'); ?>
</p>
<p class="block_input">
<label for="size" title="<?php echo __('ENTRY_SIZE_HELP') ?>"><?php echo __('ENTRY_SIZE'). tep_image(DIR_WS_ICONS . 'icon_help.gif') ?></label>
- <?php echo tep_draw_input_field('size','size', modprodextra::$cInfo->epf_size,'',true); ?>
+ <?php echo tep_draw_input_field('size','size', mod_DATATYPE_REPLACE_extra::$cInfo->epf_size,'',true); ?>
</p>
</fieldset>
<?php else: ?>
- <p><?php echo tep_draw_hidden_field('size','size', modprodextra::$cInfo->epf_size ) .tep_draw_hidden_field('restrict','restrict', modprodextra::$cInfo->restrict,(((int)modprodextra::$cInfo->restrict==1)? '1' : '0')) ?></p>
+ <p><?php echo tep_draw_hidden_field('size','size', mod_DATATYPE_REPLACE_extra::$cInfo->epf_size ) .tep_draw_hidden_field('restrict','restrict', mod_DATATYPE_REPLACE_extra::$cInfo->restrict,(((int)mod_DATATYPE_REPLACE_extra::$cInfo->restrict==1)? '1' : '0')) ?></p>
<?php endif; ?>
<div class="button_nav">
- <?php echo tep_image_submit('button_save.gif', IMAGE_SAVE) . ' <a class="button" href="' . tep_href_link(FILENAME_CONFIGURATION, tep_get_all_get_params(array('action','flag','eid')) . 'eid=' . modprodextra::$eid) . '">' . IMAGE_CANCEL . "</a>\n" ?>
+ <?php echo tep_image_submit('button_save.gif', IMAGE_SAVE) . ' <a class="button" href="' . tep_href_link(FILENAME_CONFIGURATION, tep_get_all_get_params(array('action','flag','eid')) . 'eid=' . mod_DATATYPE_REPLACE_extra::$eid) . '">' . IMAGE_CANCEL . "</a>\n" ?>
</div>
</form>
Modified: trunk/catalog/admin/includes/gabarit/configuration/modprodextra/draw.label.listing.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/configuration/modprodextra/draw.label.listing.gab 2012-04-05 19:42:32 UTC (rev 4157)
+++ trunk/catalog/admin/includes/gabarit/configuration/modprodextra/draw.label.listing.gab 2012-04-05 19:46:38 UTC (rev 4158)
@@ -1,13 +1,13 @@
<?php
/**
- @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 24/10/11, 15:38
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @date 04/03/2012, 21:54
+ @author genrated by dev/datatype/generat
@encode UTF-8
- @brief gabarit for listing extra fields products
+ @brief gabarit for listing extra fields _DATATYPE_REPLACE_
*/
?>
@@ -19,7 +19,7 @@
<h3><?php echo __('HEADING_TITLE') ?></h3>
<div class="button_nav">
- <?php printf(CsrtAction::getLink('button_nav', __('BUTTON_NEW') ), '', tep_href_link(modprodextra::FILENAME, FILENAME_CFG_34. '&list_id=&vid=&action=new') ,'' );?>
+ <?php printf(CsrtAction::getLink('button_nav', __('BUTTON_NEW') ), '', tep_href_link(mod_DATATYPE_REPLACE_extra::FILENAME, FILENAME_CFG__DATATYPE_REPLACE_SEOTAG_. '&list_id=&vid=&action=new') ,'' );?>
</div>
<div class="box_uniq">
@@ -37,19 +37,19 @@
</tr>
</thead>
<tbody>
- <?php foreach(modprodextra::$list as $epf) {?>
+ <?php foreach(mod_DATATYPE_REPLACE_extra::$list as $epf) {?>
<tr class="dataTableRow">
<td class="dataTableContent"><?php echo $epf->epf_id; ?></td>
<td class="dataTableContent">
<?php $label_query = tep_db_query("select languages_id, epf_label from " . TABLE_PRODUCTS_EXTRA_FIELDS_LABELS . " where (epf_id = " . (int)$epf->epf_id . ") ");
while ($label = tep_db_fetch_array($label_query)) {
- echo tep_image(DIR_WS_CATALOG_LANGUAGES . modprodextra::$lang[$label['languages_id']]['directory'] . '/images/' . modprodextra::$lang[$label['languages_id']]['image'], modprodextra::$lang[$label['languages_id']]['name']) . ' ' . $label['epf_label'] . '<br>';
+ echo tep_image(DIR_WS_CATALOG_LANGUAGES . mod_DATATYPE_REPLACE_extra::$lang[$label['languages_id']]['directory'] . '/images/' . mod_DATATYPE_REPLACE_extra::$lang[$label['languages_id']]['image'], mod_DATATYPE_REPLACE_extra::$lang[$label['languages_id']]['name']) . ' ' . $label['epf_label'] . '<br>';
}
?>
</td>
<td class="tcenter"><?php echo $epf->epf_order; ?></td>
<td class="tcenter">
- <?php echo modprodextra::get_item_status($epf); ?>
+ <?php echo mod_DATATYPE_REPLACE_extra::get_item_status($epf); ?>
</td>
<td class="tcenter">
<?php echo ExtraUtility::GetInputVisibility($epf->epf_admin, true); ?>
@@ -62,7 +62,7 @@
<?php echo $epf->epf_special_mod ?>
</td>
<td class="row_action">
- <?php echo modprodextra::get_item_action($epf); ?>
+ <?php echo mod_DATATYPE_REPLACE_extra::get_item_action($epf); ?>
</td>
</tr>
<?php } ?>
Modified: trunk/catalog/admin/includes/gabarit/configuration/modprodextra/draw.label.new.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/configuration/modprodextra/draw.label.new.gab 2012-04-05 19:42:32 UTC (rev 4157)
+++ trunk/catalog/admin/includes/gabarit/configuration/modprodextra/draw.label.new.gab 2012-04-05 19:46:38 UTC (rev 4158)
@@ -4,16 +4,16 @@
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 08/02/2012, 15:38
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @date 04/03/2012, 21:54
+ @author genrated by dev/datatype/generat
@encode UTF-8
- @brief gabarit for listing extra fields products, create new entry
+ @brief gabarit for listing extra fields _DATATYPE_REPLACE_, create new entry
*/
global $action, $languages;
?>
<div class="box_unique">
- <h4><?php echo (($action != 'edit')? __('heading extra fields list add value') : __('heading extra fields list edit value') . modprodextra::$eid ) ?></h4>
+ <h4><?php echo (($action != 'edit')? __('heading extra fields list add value') : __('heading extra fields list edit value') . mod_DATATYPE_REPLACE_extra::$eid ) ?></h4>
<?php echo tep_draw_form('field_entry',FILENAME_CONFIGURATION, tep_get_all_get_params(array('action','eid','confirm')). 'action=insert', 'post'); ?>
@@ -23,28 +23,28 @@
<fieldset class="block_field">
<label><?php echo __('entry type input') ?></label>
- <?php //echo tep_draw_radio_field('value_list','value_list', '1',(((int)modprodextra::$cInfo->epf_uses_value_list==1)? true : false)) . ' ' .__('TEXT_YES'). ' ' . tep_draw_radio_field('value_list','value_list', '0',(((int)modprodextra::$cInfo->epf_uses_value_list==0)? true : false)) . ' ' .__('TEXT_NO'); ?>
+ <?php //echo tep_draw_radio_field('value_list','value_list', '1',(((int)mod_DATATYPE_REPLACE_extra::$cInfo->epf_uses_value_list==1)? true : false)) . ' ' .__('TEXT_YES'). ' ' . tep_draw_radio_field('value_list','value_list', '0',(((int)mod_DATATYPE_REPLACE_extra::$cInfo->epf_uses_value_list==0)? true : false)) . ' ' .__('TEXT_NO'); ?>
<ul class="block_input">
- <li><?php echo tep_draw_radio_field('epf_input_type','epf_input_type', 0, (modprodextra::$cInfo->epf_input_type==0) ? true : false) . __('entry list type input') ?></li>
- <li><?php echo tep_draw_radio_field('epf_input_type','epf_input_type', 1, (modprodextra::$cInfo->epf_input_type==1) ? true : false) . __('entry list type textarea') ?></li>
- <li><?php echo tep_draw_radio_field('epf_input_type','epf_input_type', 2, (modprodextra::$cInfo->epf_input_type==2) ? true : false) . __('entry list type radio') ?></li>
- <li><?php echo tep_draw_radio_field('epf_input_type','epf_input_type', 5, (modprodextra::$cInfo->epf_input_type==5) ? true : false) . __('entry list type hidden') ?></li>
+ <li><?php echo tep_draw_radio_field('epf_input_type','epf_input_type', 0, (mod_DATATYPE_REPLACE_extra::$cInfo->epf_input_type==0) ? true : false) . __('entry list type input') ?></li>
+ <li><?php echo tep_draw_radio_field('epf_input_type','epf_input_type', 1, (mod_DATATYPE_REPLACE_extra::$cInfo->epf_input_type==1) ? true : false) . __('entry list type textarea') ?></li>
+ <li><?php echo tep_draw_radio_field('epf_input_type','epf_input_type', 2, (mod_DATATYPE_REPLACE_extra::$cInfo->epf_input_type==2) ? true : false) . __('entry list type radio') ?></li>
+ <li><?php echo tep_draw_radio_field('epf_input_type','epf_input_type', 5, (mod_DATATYPE_REPLACE_extra::$cInfo->epf_input_type==5) ? true : false) . __('entry list type hidden') ?></li>
</ul>
<ul class="block_input">
- <li><?php echo tep_draw_radio_field('epf_input_type','epf_input_type', 3, (modprodextra::$cInfo->epf_input_type==3) ? true : false) . __('entry list type checkbox') ?></li>
- <li><?php echo tep_draw_radio_field('epf_input_type','epf_input_type', 7, (modprodextra::$cInfo->epf_input_type==7) ? true : false) . __('entry list type checkbox multi') ?></li>
- <li><?php echo tep_draw_radio_field('epf_input_type','epf_input_type', 4, (modprodextra::$cInfo->epf_input_type==4) ? true : false) . __('entry list type select') ?></li>
- <li><?php echo tep_draw_radio_field('epf_input_type','epf_input_type', 6, (modprodextra::$cInfo->epf_input_type==6) ? true : false) . __('entry list type select multi') ?></li>
+ <li><?php echo tep_draw_radio_field('epf_input_type','epf_input_type', 3, (mod_DATATYPE_REPLACE_extra::$cInfo->epf_input_type==3) ? true : false) . __('entry list type checkbox') ?></li>
+ <li><?php echo tep_draw_radio_field('epf_input_type','epf_input_type', 7, (mod_DATATYPE_REPLACE_extra::$cInfo->epf_input_type==7) ? true : false) . __('entry list type checkbox multi') ?></li>
+ <li><?php echo tep_draw_radio_field('epf_input_type','epf_input_type', 4, (mod_DATATYPE_REPLACE_extra::$cInfo->epf_input_type==4) ? true : false) . __('entry list type select') ?></li>
+ <li><?php echo tep_draw_radio_field('epf_input_type','epf_input_type', 6, (mod_DATATYPE_REPLACE_extra::$cInfo->epf_input_type==6) ? true : false) . __('entry list type select multi') ?></li>
</ul>
</fieldset>
<p class="block_input">
<label for="epf_active_value_language" title="<?php echo __('ENTRY_ACTIVE_HELP') ?>"><?php echo __('ENTRY_ACTIVE') ?></label>
- <?php echo tep_draw_radio_field('epf_active_value_language' ,'epf_active_value_language' , '1', (((int)modprodextra::$cInfo->epf_active_value_language==1)? true : false) ) . ' ' . __('text yes') .
- ' ' . tep_draw_radio_field('epf_active_value_language' ,'epf_active_value_language', '0', (((int)modprodextra::$cInfo->epf_active_value_language==0)? true : false) ) . ' ' . __('text no'); ?>
+ <?php echo tep_draw_radio_field('epf_active_value_language' ,'epf_active_value_language' , '1', (((int)mod_DATATYPE_REPLACE_extra::$cInfo->epf_active_value_language==1)? true : false) ) . ' ' . __('text yes') .
+ ' ' . tep_draw_radio_field('epf_active_value_language' ,'epf_active_value_language', '0', (((int)mod_DATATYPE_REPLACE_extra::$cInfo->epf_active_value_language==0)? true : false) ) . ' ' . __('text no'); ?>
</p>
@@ -52,10 +52,10 @@
<div class="button_nav">
- <?php echo tep_image_submit('button_save.gif', __('modprodextra extra label add')) .
- tep_js_back(tep_href_link(modprodextra::FILENAME, tep_get_all_get_params(array('action','flag','eid')) ), IMAGE_CANCEL) ;
+ <?php echo tep_image_submit('button_save.gif', __('mod_DATATYPE_REPLACE_extra extra label add')) .
+ tep_js_back(tep_href_link(mod_DATATYPE_REPLACE_extra::FILENAME, tep_get_all_get_params(array('action','flag','eid')) ), IMAGE_CANCEL) ;
-// ' <a class="button" href="' . tep_href_link(FILENAME_CONFIGURATION, tep_get_all_get_params(array('action','flag','eid')) . 'eid=' . modprodextra::$eid) . '">' . IMAGE_CANCEL . "</a>\n" ?>
+// ' <a class="button" href="' . tep_href_link(FILENAME_CONFIGURATION, tep_get_all_get_params(array('action','flag','eid')) . 'eid=' . mod_DATATYPE_REPLACE_extra::$eid) . '">' . IMAGE_CANCEL . "</a>\n" ?>
</div>
</form>
Modified: trunk/catalog/admin/includes/gabarit/configuration/modprodextra/draw.value.delete.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/configuration/modprodextra/draw.value.delete.gab 2012-04-05 19:42:32 UTC (rev 4157)
+++ trunk/catalog/admin/includes/gabarit/configuration/modprodextra/draw.value.delete.gab 2012-04-05 19:46:38 UTC (rev 4158)
@@ -4,21 +4,21 @@
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 08/02/2012, 15:38
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @date 04/03/2012, 21:54
+ @author genrated by dev/datatype/generat
@encode UTF-8
- @brief gabarit for listing extra fields products
+ @brief gabarit for listing extra fields _DATATYPE_REPLACE_
*/
?>
<h3><?php echo __('heading delete value') ?></h3>
-<?php echo tep_draw_form('yes', modprodextra::FILENAME, tep_get_all_get_params(array('action','eid','confirm')). 'action=delete_value_confirm&eid=' . modprodextra::$eid.'&vid='.$_GET['vid']) ?>
+<?php echo tep_draw_form('yes', mod_DATATYPE_REPLACE_extra::FILENAME, tep_get_all_get_params(array('action','eid','confirm')). 'action=delete_value_confirm&eid=' . mod_DATATYPE_REPLACE_extra::$eid.'&vid='.$_GET['vid']) ?>
<p><?php echo __('text delete value') ?>
<fieldset class="block_input button_nav">
- <?php print tep_image_submit('button_delete.gif', IMAGE_DELETE) . tep_js_back(tep_href_link(modprodextra::FILENAME, 'eid=' . modprodextra::$eid ), IMAGE_CANCEL) ; ?>
+ <?php print tep_image_submit('button_delete.gif', IMAGE_DELETE) . tep_js_back(tep_href_link(mod_DATATYPE_REPLACE_extra::FILENAME, 'eid=' . mod_DATATYPE_REPLACE_extra::$eid ), IMAGE_CANCEL) ; ?>
</fieldset>
</form>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/gabarit/configuration/modprodextra/draw.value.edit.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/configuration/modprodextra/draw.value.edit.gab 2012-04-05 19:42:32 UTC (rev 4157)
+++ trunk/catalog/admin/includes/gabarit/configuration/modprodextra/draw.value.edit.gab 2012-04-05 19:46:38 UTC (rev 4158)
@@ -4,10 +4,10 @@
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 08/02/2012, 15:38
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @date 04/03/2012, 21:54
+ @author genrated by dev/datatype/generat
@encode UTF-8
- @brief gabarit for listing extra fields products
+ @brief gabarit for listing extra fields _DATATYPE_REPLACE_
*/
global $action, $languages;
@@ -16,7 +16,7 @@
-<?php echo tep_draw_form('value_entry', FILENAME_CONFIGURATION,FILENAME_CFG_34.'action=' . (($action == 'value_new') ? 'value_insert' : 'value_update') . '&eid=' . modprodextra::$eid . '&vid=' . $_GET['vid'], 'post'); ?>
+<?php echo tep_draw_form('value_entry', FILENAME_CONFIGURATION,FILENAME_CFG__DATATYPE_REPLACE_SEOTAG_.'action=' . (($action == 'value_new') ? 'value_insert' : 'value_update') . '&eid=' . mod_DATATYPE_REPLACE_extra::$eid . '&vid=' . $_GET['vid'], 'post'); ?>
<div class="tabs_lang">
<ul>
@@ -30,11 +30,11 @@
<fieldset id="<?php echo 'lang-'.($i+1) ?>">
<p class="block_input">
<label for="<?php echo 'sort_order[' . $languages[$i]['id'].']' ?>" title="<?php echo __('entry value sort help') ?>"><?php echo __('entry value sort'); ?></label>
- <?php echo tep_draw_input_field('sort_order['.$languages[$i]['id'].']','sort_order_'.$languages[$i]['id'],modprodextra::$cInfo[$languages[$i]['id']]['sort_order']) ; ?>
+ <?php echo tep_draw_input_field('sort_order['.$languages[$i]['id'].']','sort_order_'.$languages[$i]['id'],mod_DATATYPE_REPLACE_extra::$cInfo[$languages[$i]['id']]['sort_order']) ; ?>
</p>
<p class="block_input">
<label for="<?php echo 'value[' . $languages[$i]['id'].']' ?>" title="<?php echo __('entry value value help') ?>"><?php echo __('entry value value') ; ?></label>
- <?php echo tep_draw_input_field('value['.$languages[$i]['id'].']','value_'.$languages[$i]['id'], modprodextra::$cInfo[$languages[$i]['id']]['epf_value'], 'size=64 maxlength=64'); ?>
+ <?php echo tep_draw_input_field('value['.$languages[$i]['id'].']','value_'.$languages[$i]['id'], mod_DATATYPE_REPLACE_extra::$cInfo[$languages[$i]['id']]['epf_value'], 'size=64 maxlength=64'); ?>
</p>
</fieldset>
@@ -44,8 +44,8 @@
<div class="button_nav">
- <?php echo tep_js_back(tep_href_link(modprodextra::FILENAME,FILENAME_CFG_34), __('listing fields') ); ?>
- <?php echo tep_js_back(tep_href_link(modprodextra::FILENAME,FILENAME_CFG_34.'eid='.modprodextra::$eid.'&action=value_listing'), __('listing value fields') ); ?>
+ <?php echo tep_js_back(tep_href_link(mod_DATATYPE_REPLACE_extra::FILENAME,FILENAME_CFG__DATATYPE_REPLACE_SEOTAG_), __('listing fields') ); ?>
+ <?php echo tep_js_back(tep_href_link(mod_DATATYPE_REPLACE_extra::FILENAME,FILENAME_CFG__DATATYPE_REPLACE_SEOTAG_.'eid='.mod_DATATYPE_REPLACE_extra::$eid.'&action=value_listing'), __('listing value fields') ); ?>
<?php echo tep_image_submit('button_save.gif', IMAGE_SAVE) ?>
Modified: trunk/catalog/admin/includes/gabarit/configuration/modprodextra/draw.value.listing.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/configuration/modprodextra/draw.value.listing.gab 2012-04-05 19:42:32 UTC (rev 4157)
+++ trunk/catalog/admin/includes/gabarit/configuration/modprodextra/draw.value.listing.gab 2012-04-05 19:46:38 UTC (rev 4158)
@@ -1,21 +1,21 @@
<?php
/**
- @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 24/10/11, 15:38
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @date 04/03/2012, 21:54
+ @author genrated by dev/datatype/generat
@encode UTF-8
- @brief gabarit for listing extra fields products
+ @brief gabarit for listing extra fields _DATATYPE_REPLACE_
*/
global $action, $languages;
?>
<div class="button_nav">
- <?php printf(CsrtAction::getLink('button_nav', __('listing fields') ), '', tep_href_link(modprodextra::FILENAME, FILENAME_CFG_34. 'eid='.modprodextra::$eid.'&list_id=&vid=&parent=') ,'' );?>
- <?php printf(CsrtAction::getLink('button_nav', __('BUTTON_VALUE_ADD_LIST') ), '', tep_href_link(modprodextra::FILENAME, FILENAME_CFG_34. 'eid='.modprodextra::$eid.'&list_id=&vid=&parent=&action=value_new') ,'' );?>
+ <?php printf(CsrtAction::getLink('button_nav', __('listing fields') ), '', tep_href_link(mod_DATATYPE_REPLACE_extra::FILENAME, FILENAME_CFG__DATATYPE_REPLACE_SEOTAG_. 'eid='.mod_DATATYPE_REPLACE_extra::$eid.'&list_id=&vid=&parent=') ,'' );?>
+ <?php printf(CsrtAction::getLink('button_nav', __('BUTTON_VALUE_ADD_LIST') ), '', tep_href_link(mod_DATATYPE_REPLACE_extra::FILENAME, FILENAME_CFG__DATATYPE_REPLACE_SEOTAG_. 'eid='.mod_DATATYPE_REPLACE_extra::$eid.'&list_id=&vid=&parent=&action=value_new') ,'' );?>
</div>
<table class="dataTable" >
@@ -29,14 +29,14 @@
</tr>
</thead>
<tbody>
- <?php foreach (modprodextra::$list[0] as $k=>$value): ?>
+ <?php foreach (mod_DATATYPE_REPLACE_extra::$list[0] as $k=>$value): ?>
<tr class="dataTableRow">
<td class="tcenter"><?php echo $value['value_id']; ?></td>
<td><?php echo $value['epf_value']; ?></td>
<td class="tcenter"><?php echo $value['parent_id']; ?></td>
<td class="tcenter"><?php echo $value['sort_order']; ?></td>
<td class="row_action">
- <?php echo modprodextra::get_item_value_action($value); ?>
+ <?php echo mod_DATATYPE_REPLACE_extra::get_item_value_action($value); ?>
</tr>
<?php endforeach; ?>
Modified: trunk/catalog/admin/includes/gabarit/configuration/modprodextra/draw.value.new.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/configuration/modprodextra/draw.value.new.gab 2012-04-05 19:42:32 UTC (rev 4157)
+++ trunk/catalog/admin/includes/gabarit/configuration/modprodextra/draw.value.new.gab 2012-04-05 19:46:38 UTC (rev 4158)
@@ -4,16 +4,16 @@
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 08/02/2012, 15:38
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @date 04/03/2012, 21:54
+ @author genrated by dev/datatype/generat
@encode UTF-8
- @brief gabarit for listing extra fields products, create new entry
+ @brief gabarit for listing extra fields _DATATYPE_REPLACE_, create new entry
*/
global $action, $languages;
?>
<div class="box_unique">
- <h4><?php echo (($action == 'edit')? __('HEADING_NEW') : __('HEADING_EDIT') . modprodextra::$eid ) ?></h4>
+ <h4><?php echo (($action == 'edit')? __('HEADING_NEW') : __('HEADING_EDIT') . mod_DATATYPE_REPLACE_extra::$eid ) ?></h4>
<?php echo tep_draw_form('field_entry',FILENAME_CONFIGURATION, tep_get_all_get_params(array('action','eid','confirm')). 'action=insert', 'post'); ?>
@@ -23,14 +23,14 @@
<p class="block_input">
<label><?php echo __('ENTRY_VALUE_LIST') ?></label>
- <?php echo tep_draw_radio_field('value_list','value_list', '1',(((int)modprodextra::$cInfo['epf_uses_value_list']==1)? true : false)) . ' ' .__('TEXT_YES'). ' ' . tep_draw_radio_field('value_list','value_list', '0',(((int)modprodextra::$cInfo['epf_uses_value_list']==0)? true : false)) . ' ' .__('TEXT_NO'); ?>
+ <?php echo tep_draw_radio_field('value_list','value_list', '1',(((int)mod_DATATYPE_REPLACE_extra::$cInfo['epf_uses_value_list']==1)? true : false)) . ' ' .__('TEXT_YES'). ' ' . tep_draw_radio_field('value_list','value_list', '0',(((int)mod_DATATYPE_REPLACE_extra::$cInfo['epf_uses_value_list']==0)? true : false)) . ' ' .__('TEXT_NO'); ?>
</p>
<p class="block_input">
<label for="epf_active_for_language" title="<?php echo __('ENTRY_ACTIVE_HELP') ?>"><?php echo __('ENTRY_ACTIVE'). tep_image(DIR_WS_ICONS . 'icon_help.gif'); ?></label>
- <?php echo tep_draw_radio_field('epf_active_for_language' ,'epf_active_for_language' , '1', (((int)modprodextra::$cInfo['epf_active_for_language']==1)? true : false) ) . ' ' . __('TEXT_YES') .
- ' ' . tep_draw_radio_field('epf_active_for_language' ,'epf_active_for_language', '0', (((int)modprodextra::$cInfo['epf_active_for_language']==0)? true : false) ) . ' ' . __('TEXT_NO'); ?>
+ <?php echo tep_draw_radio_field('epf_active_for_language' ,'epf_active_for_language' , '1', (((int)mod_DATATYPE_REPLACE_extra::$cInfo['epf_active_for_language']==1)? true : false) ) . ' ' . __('TEXT_YES') .
+ ' ' . tep_draw_radio_field('epf_active_for_language' ,'epf_active_for_language', '0', (((int)mod_DATATYPE_REPLACE_extra::$cInfo['epf_active_for_language']==0)? true : false) ) . ' ' . __('TEXT_NO'); ?>
</p>
@@ -38,10 +38,10 @@
<div class="button_nav">
- <?php echo tep_image_submit('button_save.gif', __('modprodextra extra label add')) .
- tep_js_back(tep_href_link(modprodextra::FILENAME, tep_get_all_get_params(array('action','flag','eid')) ), IMAGE_CANCEL) ;
+ <?php echo tep_image_submit('button_save.gif', __('mod_DATATYPE_REPLACE_extra extra label add')) .
+ tep_js_back(tep_href_link(mod_DATATYPE_REPLACE_extra::FILENAME, tep_get_all_get_params(array('action','flag','eid')) ), IMAGE_CANCEL) ;
-// ' <a class="button" href="' . tep_href_link(FILENAME_CONFIGURATION, tep_get_all_get_params(array('action','flag','eid')) . 'eid=' . modprodextra::$eid) . '">' . IMAGE_CANCEL . "</a>\n" ?>
+// ' <a class="button" href="' . tep_href_link(FILENAME_CONFIGURATION, tep_get_all_get_params(array('action','flag','eid')) . 'eid=' . mod_DATATYPE_REPLACE_extra::$eid) . '">' . IMAGE_CANCEL . "</a>\n" ?>
</div>
</form>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-04-05 19:42:40
|
Revision: 4157
http://oscss.svn.sourceforge.net/oscss/?rev=4157&view=rev
Author: oscim
Date: 2012-04-05 19:42:32 +0000 (Thu, 05 Apr 2012)
Log Message:
-----------
Suite developpement
Modified Paths:
--------------
trunk/dev/GenerCode/class.CreateDataType.php
trunk/dev/GenerCode/datatype/Modele/catalog/includes/classes/drivers/data/_DATATYPE_REPLACE_.php
trunk/dev/GenerCode/datatype/Modele/catalog/includes/content/_DATATYPE_REPLACE_.php
trunk/dev/GenerCode/datatype/Modele/install.xml
trunk/dev/GenerCode/datatype/Modele/readme
Added Paths:
-----------
trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/classes/drivers/sql_DATATYPE_REPLACE_extrafields.php
trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/gabarit/configuration/
trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/modules/_DATATYPE_REPLACE_/header_tags.php
trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/modules/configuration/
trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/modules/configuration/mod_DATATYPE_REPLACE_extra.php
trunk/dev/GenerCode/datatype/Modele/sql/mysql/install/tables/osc__DATATYPE_REPLACE__extra_fields.sql
trunk/dev/GenerCode/datatype/Modele/sql/mysql/install/tables/osc__DATATYPE_REPLACE__extra_fields_labels.sql
trunk/dev/GenerCode/datatype/Modele/sql/mysql/install/tables/osc__DATATYPE_REPLACE__extra_fields_values.sql
trunk/dev/GenerCode/datatype/Modele/sql/mysql/install/tables/osc__DATATYPE_REPLACE__to__DATATYPE_REPLACE__extra_fields.sql
trunk/dev/GenerCode/datatype/index.php
trunk/dev/GenerCode/index.php
Modified: trunk/dev/GenerCode/class.CreateDataType.php
===================================================================
--- trunk/dev/GenerCode/class.CreateDataType.php 2012-04-05 14:40:19 UTC (rev 4156)
+++ trunk/dev/GenerCode/class.CreateDataType.php 2012-04-05 19:42:32 UTC (rev 4157)
@@ -44,7 +44,7 @@
);
-echo $this->folder = $conf->curent .'/'. strtoupper($conf->name).'_'.$conf->level.'/';
+ $this->folder = $conf->curent .'/'. strtoupper($conf->name).'_'.$conf->level.'/';
if(!file_exists($this->folder) || !is_dir($this->folder)) {
mkdir($this->folder);
@@ -53,6 +53,9 @@
$this->process();
// }
+
+ echo 'le dossier creer ce situe :' . $this->folder;
+
}
@@ -74,6 +77,7 @@
}
else {
+
$res=file_get_contents($path_mod.$row);
$file_contents = $this->stringreplace($res);
Added: trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/classes/drivers/sql_DATATYPE_REPLACE_extrafields.php
===================================================================
--- trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/classes/drivers/sql_DATATYPE_REPLACE_extrafields.php (rev 0)
+++ trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/classes/drivers/sql_DATATYPE_REPLACE_extrafields.php 2012-04-05 19:42:32 UTC (rev 4157)
@@ -0,0 +1,617 @@
+<?php if (!defined('HTTP_SERVER')) die('You can not access this file directly!');
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 22/02/12, 08:07
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+ @class sql_DATATYPE_REPLACE_extrafields
+ @file sql_DATATYPE_REPLACE_extrafields.php
+
+*/
+
+class sql_DATATYPE_REPLACE_extrafields
+ 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();
+
+
+ $sql_data_array['epf_order'] =(isset($option['order']))? tep_db_prepare_input($option['order']) : 0 ;
+ $sql_data_array['epf_status'] =(isset($option['status']))? tep_db_prepare_input($option['status']) : 0;
+ $sql_data_array['epf_input_type'] =(isset($option['input_type'])) ? tep_db_prepare_input($option['input_type']) : 0;
+ $sql_data_array['epf_advanced_search'] =(isset($option['advanced_search']))? tep_db_prepare_input($option['advanced_search']): 0;
+ $sql_data_array['epf_show_in_listing'] = (isset($option['show_in_listing'])) ? tep_db_prepare_input($option['show_in_listing']): 0;
+ $sql_data_array['epf_use_as_meta_keyword'] =(isset($option['use_as_meta_keyword']))? tep_db_prepare_input($option['use_as_meta_keyword']): 0;
+ $sql_data_array['epf_use_to_restrict_listings'] = (isset($option['use_to_restrict_listings'])) ? tep_db_prepare_input($option['use_to_restrict_listings']): 0;
+ $sql_data_array['epf_admin'] =(isset($option['admin']))? tep_db_prepare_input($option['admin']) : 0;
+
+ if(isset($option['size'])) $sql_data_array['epf_size'] = tep_db_prepare_input($option['size']);
+ if(isset($option['show_parent_chain'])) $sql_data_array['epf_show_parent_chain'] = tep_db_prepare_input($option['show_parent_chain']);
+ if(isset($option['key'])) $sql_data_array['epf_key'] = tep_db_prepare_input($option['key']);
+ if(isset($option['special_mod'])) $sql_data_array['epf_special_mod'] = tep_db_prepare_input($option['special_mod']);
+ if(isset($option['active_value_language'])) $sql_data_array['epf_active_value_language'] = tep_db_prepare_input($option['active_value_language']);
+
+
+ $res=tep_db_perform(TABLE__DATATYPE_REPLACE_MAJ__EXTRA_FIELDS, $sql_data_array);
+
+ if(!$res)
+ return $res;
+ else
+ return $res->__get('insertId');
+ }
+
+ /**
+ @brief update ligne in table configuration
+ @note for update key, use new_key in key array $option
+ this key is use in where clause
+ */
+ public static function update($option){
+ self::getInstance();
+
+ if(!isset($option['id']))
+ return false;
+
+ $where ='';
+ if(isset($option['id'])) $where .="AND epf_id = '".(int)$option['id']."' ";
+ if(isset($option['key'])) $where .="AND epf_key = '".(int)$option['key']."' ";
+
+ if($where=='')
+ return false;
+
+ if(isset($option['order']))$sql_data_array['epf_order'] = tep_db_prepare_input($option['order']);
+ if(isset($option['status'])) $sql_data_array['epf_status'] = tep_db_prepare_input($option['status']);
+// if(isset($option['uses_value_list'])) $sql_data_array['epf_input_type'] = tep_db_prepare_input($option['uses_value_list']);
+ if(isset($option['advanced_search'])) $sql_data_array['epf_advanced_search'] = tep_db_prepare_input($option['advanced_search']);
+ if(isset($option['show_in_listing']))$sql_data_array['epf_show_in_listing'] = tep_db_prepare_input($option['show_in_listing']);
+ if(isset($option['size'])) $sql_data_array['epf_size'] = tep_db_prepare_input($option['size']);
+ if(isset($option['use_as_meta_keyword'])) $sql_data_array['epf_use_as_meta_keyword'] = tep_db_prepare_input($option['use_as_meta_keyword']);
+ if(isset($option['use_to_restrict_listings'])) $sql_data_array['epf_use_to_restrict_listings'] = tep_db_prepare_input($option['use_to_restrict_listings']);
+ if(isset($option['show_parent_chain'])) $sql_data_array['epf_show_parent_chain'] = tep_db_prepare_input($option['show_parent_chain']);
+ if(isset($option['new_key'])) $sql_data_array['epf_key'] = tep_db_prepare_input($option['new_key']);
+ if(isset($option['admin'])) $sql_data_array['epf_admin'] = (string)tep_db_prepare_input($option['admin']);
+ if(isset($option['special_mod'])) $sql_data_array['epf_special_mod'] = tep_db_prepare_input($option['special_mod']);
+ if(isset($option['active_value_language'])) $sql_data_array['epf_active_value_language'] = tep_db_prepare_input($option['active_value_language']);
+// print_r($option);
+ $res=tep_db_perform(TABLE__DATATYPE_REPLACE_MAJ__EXTRA_FIELDS, $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 epf_id = '".(int)$option['id']."' ";
+ if(isset($option['key'])) $sql .="AND epf_key = '".(int)$option['key']."' ";
+
+
+ if($sql=='')
+ return false;
+
+
+ $sql="SELECT * FROM " . TABLE__DATATYPE_REPLACE_MAJ__EXTRA_FIELDS . " a ".
+// " 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');
+
+ if($num == 1){
+ $result=$res->fetchAssoc();
+ return ((!$shortkey)? $result : self::CleanKey($result));
+ }
+ elseif($num > 1){
+ $array=array();
+
+ foreach($res->fetchAllAssoc() as $result)
+ $array[]= ((!$shortkey)? $result : self::CleanKey($result));
+
+ return $array;
+ }
+
+ return false;
+ }
+
+ /**
+ @brief delete row
+ */
+ public static function delete($option){
+ self::getInstance();
+ $DB=Database::getInstance();
+
+ $sql ="";
+
+ if(isset($option['id'])) $sql .="AND epf_id = '".(int)$option['id']."' ";
+ if(isset($option['key'])) $sql .="AND epf_key = '".(int)$option['key']."' ";
+
+
+ if(strlen($sql) < 5)
+ return false;
+
+ $res = $DB->query($s="SELECT epf_id FROM " . TABLE__DATATYPE_REPLACE_MAJ__EXTRA_FIELDS ." WHERE ". substr($sql,3) );
+
+ $row=$res->fetchAssoc();
+
+ // depend tables
+ sql_DATATYPE_REPLACE_extrafieldslabels::delete(array('id'=>$row['epf_id']));
+
+ sql_DATATYPE_REPLACE_extrafieldsvalues::delete(array('id'=>$row['epf_id']));
+
+
+ $DB->query($s="DELETE FROM " . TABLE__DATATYPE_REPLACE_MAJ__EXTRA_FIELDS ." WHERE ". substr($sql,3) );
+
+ return true;
+ }
+
+ /**
+ @brief
+ @return array product empty
+ */
+ public static function Specimen($shortkey=false){
+ $par = array(
+ 'epf_id' => 0,
+ 'epf_order' => 5,
+ 'epf_status' => 0,
+ 'epf_input_type' => 0,
+ 'epf_advanced_search' => '',
+ 'epf_show_in_listing' => '',
+ 'epf_size' => 0,
+ 'epf_use_as_meta_keyword' => '',
+ 'epf_use_to_restrict_listings' => '',
+ 'epf_show_parent_chain' => '',
+ 'epf_active_value_language' => 0,
+ 'epf_key' => '',
+ 'epf_admin' => 0,
+ 'epf_special_mod' => '',
+ );
+
+ return ((!$shortkey)? $par : self::CleanKey($par));
+ }
+
+
+
+ /**
+ @fn CleanKey()
+ @brief Clean string name key
+ */
+ private static function CleanKey($array){
+ self::getInstance();
+ $object= new stdclass();
+
+ foreach($array as $key=>$value){
+ if( strpos($key,'epf_') ===0)
+ $key=substr($key,4);
+
+ $object->$key = $value;
+ }
+
+ return $object;
+ }
+
+}
+
+
+class sql_DATATYPE_REPLACE_extrafieldslabels
+ 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['id']))
+ return 'id';
+
+ $sql_data_array['epf_id'] = tep_db_prepare_input($option['id']);
+ $sql_data_array['languages_id'] =(isset($option['languages_id']))? tep_db_prepare_input($option['languages_id']) : 0;
+// $sql_data_array['epf_active_for_language'] =(isset($option['active_for_language']))? tep_db_prepare_input($option['active_for_language']): 0;
+
+ $sql_data_array['epf_label'] =(isset($option['label'])) ? tep_db_prepare_input($option['label']) : '';
+ $sql_data_array['epf_format'] =(isset($option['format']))? tep_db_prepare_input($option['format']): '%label% %input%';
+
+
+ if(isset($option['label_help'])) $sql_data_array['epf_label_help'] = tep_db_prepare_input($option['label_help']);
+
+
+ $res=tep_db_perform(TABLE__DATATYPE_REPLACE_MAJ__EXTRA_FIELDS_LABELS, $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 false;
+
+ $where ='';
+ if(isset($option['id'])) $where .="AND epf_id = '".(int)$option['id']."' ";
+ if(isset($option['languages_id'])) $where .="AND languages_id = '".(int)$option['languages_id']."' ";
+
+ if($where=='')
+ return false;
+
+// if(isset($option['active_for_language'])) $sql_data_array['epf_active_for_language'] = tep_db_prepare_input($option['active_for_language']);
+ if(isset($option['label'])) $sql_data_array['epf_label'] = tep_db_prepare_input($option['label']);
+ if(isset($option['format'])) $sql_data_array['epf_format'] = tep_db_prepare_input($option['format']);
+ if(isset($option['label_help'])) $sql_data_array['epf_label_help'] = tep_db_prepare_input($option['label_help']);
+
+ $res=tep_db_perform(TABLE__DATATYPE_REPLACE_MAJ__EXTRA_FIELDS_LABELS, $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 epf_id = '".(int)$option['id']."' ";
+ if(isset($option['languages_id'])) $sql .="AND languages_id = '".(int)$option['languages_id']."' ";
+
+
+ if($sql=='')
+ return false;
+
+
+ $sql="SELECT * FROM " . TABLE__DATATYPE_REPLACE_MAJ__EXTRA_FIELDS_LABELS . " a ".
+// " LEFT JOIN " . TABLE_IMAGES_USED . " g ON (a.rowid=g.rowid) ".
+ " WHERE ".substr($sql,3);
+
+ $res=$DB->query($sql);
+
+ $num = $res->__get('numRows');
+
+ if($num == 1){
+ $result=$res->fetchAssoc();
+ return ((!$shortkey)? $result : self::CleanKey($result));
+ }
+ elseif($num > 1){
+ $array=array();
+
+ foreach($res->fetchAllAssoc() as $result)
+ $array[]= ((!$shortkey)? $result : self::CleanKey($result));
+
+ return $array;
+ }
+
+ return false;
+ }
+
+ /**
+ @brief delete row
+ */
+ public static function delete($option){
+ self::getInstance();
+ $DB=Database::getInstance();
+
+ $sql ="";
+
+ if(isset($option['id'])) $sql .="AND epf_id = '".(int)$option['id']."' ";
+ if(isset($option['languages_id'])) $sql .="AND languages_id = '".(int)$option['languages_id']."' ";
+
+
+ if(strlen($sql) < 5)
+ return false;
+
+ $DB->query($s="DELETE FROM " . TABLE__DATATYPE_REPLACE_MAJ__EXTRA_FIELDS_LABELS ." WHERE ". substr($sql,3) );
+
+ return true;
+ }
+
+ /**
+ @brief
+ @return array product empty
+ */
+ public static function Specimen($shortkey=false){
+ $par = array(
+ 'epf_id' => 0,
+ 'languages_id' => 0,
+ 'epf_label' => '',
+// 'epf_active_for_language' => false,
+ 'epf_label_help' => '',
+ 'epf_format' => '%label% %input% %unit%',
+ );
+
+ return ((!$shortkey)? $par : self::CleanKey($par));
+ }
+
+
+
+ /**
+ @fn CleanKey()
+ @brief Clean string name key
+ */
+ private static function CleanKey($array){
+ self::getInstance();
+ $object= new stdclass();
+
+ foreach($array as $key=>$value){
+ if( strpos($key,'epf_') ===0)
+ $key=substr($key,4);
+
+ $object->$key = $value;
+ }
+
+ return $object;
+ }
+
+}
+
+
+
+
+class sql_DATATYPE_REPLACE_extrafieldsvalues
+ 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['epf_id']))
+ return 'epf_id';
+
+ $sql_data_array['epf_id'] = tep_db_prepare_input($option['id']);
+ $sql_data_array['languages_id'] =(isset($option['languages_id']))? tep_db_prepare_input($option['languages_id']) : 0;
+
+
+ $sql_data_array['epf_value'] =(isset($option['value'])) ? tep_db_prepare_input($option['value']) : '';
+ $sql_data_array['parent_id'] =(isset($option['parent_id']))? tep_db_prepare_input($option['parent_id']): 0;
+ $sql_data_array['sort_order'] =(isset($option['sort_order'])) ? tep_db_prepare_input($option['sort_order']) :0;
+
+
+ $res=tep_db_perform(TABLE__DATATYPE_REPLACE_MAJ__EXTRA_FIELDS_VALUES, $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['epf_id']))
+ return false;
+
+ $sql ='';
+ if(isset($option['id'])) $sql .="AND value_id = '".(int)$option['id']."' ";
+ if(isset($option['epf_id'])) $sql .="AND epf_id = '".(int)$option['epf_id']."' ";
+ if(isset($option['languages_id'])) $sql .="AND languages_id = '".(int)$option['languages_id']."' ";
+ if(isset($option['parent_id'])) $sql .="AND parent_id = '".(int)$option['parent_id']."' ";
+
+ if($sql=='')
+ return false;
+
+
+ if(isset($option['value'])) $sql_data_array['epf_value'] = tep_db_prepare_input($option['value']);
+ if(isset($option['sort_order'])) $sql_data_array['sort_order'] = tep_db_prepare_input($option['sort_order']);
+
+
+ $res=tep_db_perform(TABLE__DATATYPE_REPLACE_MAJ__EXTRA_FIELDS_VALUES, $sql_data_array, 'update' , substr($sql,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 value_id = '".(int)$option['id']."' ";
+ if(isset($option['epf_id'])) $sql .="AND epf_id = '".(int)$option['epf_id']."' ";
+ if(isset($option['languages_id'])) $sql .="AND languages_id = '".(int)$option['languages_id']."' ";
+ if(isset($option['parent_id'])) $sql .="AND parent_id = '".(int)$option['parent_id']."' ";
+
+
+ if($sql=='')
+ return false;
+
+
+ $sql="SELECT * FROM " . TABLE__DATATYPE_REPLACE_MAJ__EXTRA_FIELDS_VALUES . " a ".
+ " WHERE ".substr($sql,3)." ORDER BY sort_order ASC";
+
+ $res=$DB->query($sql);
+
+ $num = $res->__get('numRows');
+
+ if($num == 1){
+ $result=$res->fetchAssoc();
+ return ((!$shortkey)? $result : self::CleanKey($result));
+ }
+ elseif($num > 1){
+ $array=array();
+
+ foreach($res->fetchAllAssoc() as $result)
+ $array[]= ((!$shortkey)? $result : self::CleanKey($result));
+
+ return $array;
+ }
+
+ return false;
+ }
+
+ /**
+ @brief delete row
+ */
+ public static function delete($option){
+ self::getInstance();
+ $DB=Database::getInstance();
+
+ $sql ="";
+
+ if(isset($option['id'])) $sql .="AND value_id = '".(int)$option['id']."' ";
+ if(isset($option['epf_id'])) $sql .="AND epf_id = '".(int)$option['epf_id']."' ";
+ if(isset($option['languages_id'])) $sql .="AND languages_id = '".(int)$option['languages_id']."' ";
+ if(isset($option['parent_id'])) $sql .="AND parent_id = '".(int)$option['parent_id']."' ";
+
+ if(strlen($sql) < 5)
+ return false;
+
+ $DB->query($s="DELETE FROM " . TABLE__DATATYPE_REPLACE_MAJ__EXTRA_FIELDS_VALUES ." WHERE ". substr($sql,3) );
+
+ return true;
+ }
+
+ /**
+ @brief
+ @return array product empty
+ */
+ public static function Specimen($shortkey=false){
+ $par = array(
+ 'value_id' => 0 ,
+ 'epf_id' => 0,
+ 'languages_id' => 0,
+ 'parent_id' => 0,
+ 'sort_order' => 0,
+ 'epf_value' => '',
+ );
+
+ return ((!$shortkey)? $par : self::CleanKey($par));
+ }
+
+
+
+ /**
+ @fn CleanKey()
+ @brief Clean string name key
+ */
+ private static function CleanKey($array){
+ self::getInstance();
+ $object= new stdclass();
+
+ foreach($array as $key=>$value){
+ $object->$key = $value;
+ }
+
+ return $object;
+ }
+
+}
+?>
\ No newline at end of file
Added: trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/modules/_DATATYPE_REPLACE_/header_tags.php
===================================================================
--- trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/modules/_DATATYPE_REPLACE_/header_tags.php (rev 0)
+++ trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/modules/_DATATYPE_REPLACE_/header_tags.php 2012-04-05 19:42:32 UTC (rev 4157)
@@ -0,0 +1,124 @@
+<?php
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 04/03/2012, 21:54
+ @author genrated by dev/datatype/generat
+ @encode UTF-8
+ @class header_tags
+*/
+
+class header_tags
+ extends AbstractHeader_tags
+ implements InterfaceModule{
+
+ /**
+ @var array
+ */
+ public static $languages = array();
+ /**
+ @var object
+ */
+ public static $pInfo;
+ /**
+ @var
+ */
+ public $code;
+ /**
+ @var
+ */
+ public $title;
+ /**
+ @var
+ */
+ public $description;
+ /**
+ @var
+ */
+ public $sort_order;
+ /**
+ @var
+ */
+ public $enabled;
+
+
+ /**
+ @brief class constructor
+ */
+ public function __construct() {
+ global $language,$languages_id;
+ parent::load_lang();
+
+ $this->code = __CLASS__ ;
+ $this->title = __('module acapro headertags text title');
+ $this->description = __('module acapro headertags text description');
+ $this->sort_order = (defined('MODULE__DATATYPE_REPLACE__HEADERTAGS_SORT_ORDER'))?MODULE__DATATYPE_REPLACE__HEADERTAGS_SORT_ORDER : 0;
+ $this->enabled = true;
+
+ self::$pInfo= new objectInfo (array());
+
+ self::$languages= tep_get_languages();
+ }
+
+
+ /**
+ @brief UP db
+ */
+ public function after_update ($content_id) {
+ self::$pInfo=parent::load_db_base($content_id, 'content');
+ $myarray=array('page_type' => '_DATATYPE_REPLACE_',
+ 'page_id' => $content_id);
+
+ if(isset(self::$pInfo->tag_id))tep_db_perform(TABLE_FULL_TAG, $myarray, 'update', " tag_id='".self::$pInfo->tag_id."'" );
+ else{
+ tep_db_perform(TABLE_FULL_TAG, $myarray);
+ $content_query = tep_db_query("SELECT tag_id FROM " . TABLE_FULL_TAG . " ft WHERE ft.page_type='_DATATYPE_REPLACE_' and ft.page_id = '" . (int)$content_id . "' ");
+ $content = tep_db_fetch_array($content_query);
+ self::$pInfo->tag_id=$content['tag_id'];
+ }
+ }
+
+ /**
+ @brief Update table langue
+ */
+ public function after_update_lang ($language_id,$content_id) {
+ $this->load_db_values($content_id);
+
+ if(parent::load_db_descr_check(self::$pInfo->tag_id,$language_id)) $action='update';
+ else $action='insert';
+
+ $pInfo=parent::load_post_values($_POST);
+ $pInfo->header_tags['head_title_tag'][$language_id]=(tep_not_null($pInfo->header_tags['head_title_tag'][$language_id]) ? $pInfo->header_tags['head_title_tag'][$language_id] : $pInfo->content_title[$language_id]) ;
+ parent::insert_db_values(self::$pInfo->tag_id,$action,$pInfo,$language_id);
+ }
+
+
+
+ /**
+ */
+ public static function load_db_values ($content_id) {
+ $arr ['content_id'] = $content_id;
+ $arr=array_merge(array('content_id'=>$content_id) ,parent::load_db_values ($content_id, 'content') );
+ self::$pInfo->objectInfo($arr);
+ }
+
+
+ /**
+ @brief Draw
+ */
+ public function display_edit(&$contents) {
+ $contents []=array('title'=> __('tab _DATATYPE_REPLACE_ meta'),'text'=>tep_get_include_contents(__CLASS__.'.form'));
+ }
+
+/** Force implements InterfaceModule class to define this method */
+ public function check() { return true; }
+ public function install() { return false; }
+ public function remove() { return false; }
+ public function keys() {
+ return array( 'MODULE__DATATYPE_REPLACE__HEADERTAGS_SORT_ORDER');
+ }
+
+}
+?>
\ No newline at end of file
Added: trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/modules/configuration/mod_DATATYPE_REPLACE_extra.php
===================================================================
--- trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/modules/configuration/mod_DATATYPE_REPLACE_extra.php (rev 0)
+++ trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/modules/configuration/mod_DATATYPE_REPLACE_extra.php 2012-04-05 19:42:32 UTC (rev 4157)
@@ -0,0 +1,643 @@
+<?php
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 04/03/2012, 21:54
+ @author genrated by dev/datatype/generat
+ @encode UTF-8
+ @class mod_DATATYPE_REPLACE_extra
+ @brief Gestion Des configuration product extra fields
+*/
+
+define('FILENAME_CFG__DATATYPE_REPLACE_SEOTAG_',"gparentID=".@$_GET['gparentID']."&gID=&".@$_GET['gID']);
+
+
+Class mod_DATATYPE_REPLACE_extra{
+
+ const FILENAME = FILENAME_CONFIGURATION;
+ /**
+ @var array
+ */
+ public static $selected_labels;
+ /**
+ @var array
+ */
+ public static $list;
+ /**
+ @var array
+ */
+ public static $lang;
+ /**
+ @var int value id selected
+ */
+ public static $eid;
+ /**
+ @var integer
+ */
+ public static $double_check;
+ /**
+ @var object
+ */
+ public static $pInfo;
+ /**
+ @var object
+ */
+ public static $cInfo;
+
+ /**
+ */
+ function __construct(){
+
+ $this->code=__CLASS__;
+
+ global $messageStack, $language,$oscss;
+
+ $oscss->pile_file_lang(DIR_FS_ADMIN.DIR_WS_LANGUAGES.$language.'/modules/configuration/'.$this->code.'.txt');
+
+ //! detail item in ajax
+ if(!defined('AJAXSTATMENTDETAIL')) define('AJAXSTATMENTDETAIL', 'mod=page');
+
+ self::$eid=(isset($_GET['eid']) ? $_GET['eid'] : '');
+ }
+
+
+ /**
+ Action en remplacement des action par defaut
+ */
+ public function draw_action(){
+ global $action,$messageStack,$language_id;
+
+ $confirm = (isset($_GET['confirm']) ? $_GET['confirm'] : '');
+ $languages = tep_get_languages();
+ $confirmation_needed = false;
+
+ $messages = array();
+ $error = false;
+ switch ($action) {
+
+
+ case 'insert':
+
+ try{
+// if (!isset($_POST['epf_input_type']))
+// throw new Exception(__('error entry required') . __('input type required'));
+
+ $value_list =(int)$_POST['epf_input_type'];
+
+ $lactive = (!isset($_POST['epf_active_value_language']) || (int)$_POST['epf_active_value_language'] ==0) ? 0 : 1;
+ }
+ catch(Exception $e){
+ $messageStack->add($e->getMessage(), 'error');
+ $error=true;
+ }
+
+
+ self::$eid = sql_DATATYPE_REPLACE_extrafields::create(array('input_type' => $value_list, 'status'=>0, 'active_value_language'=>$lactive ));
+
+
+ tep_redirect(tep_href_link(self::FILENAME,FILENAME_CFG__DATATYPE_REPLACE_SEOTAG_.'&action=edit&eid=' . self::$eid));
+
+ break;
+
+
+
+
+ case 'update': // validate form
+// $query = tep_db_query("select epf_size, epf_input_type from " . TABLE__DATATYPE_REPLACE_MAJ__EXTRA_FIELDS . " where epf_id = " . (int)self::$eid);
+// $field_info = tep_db_fetch_array($query); // retrieve original field information
+ $field_info = sql_DATATYPE_REPLACE_extrafields::fetch(array('id'=>(int)self::$eid));
+
+ try{
+
+ $order = (isset($_POST['sort_order'])) ? tep_db_prepare_input($_POST['sort_order']) : 0;
+ $epf_admin = (isset($_POST['epf_admin'])) ? tep_db_prepare_input($_POST['epf_admin']) : 0;
+ $epf_special_mod = (isset($_POST['epf_special_mod'])) ? tep_db_prepare_input($_POST['epf_special_mod']) : '';
+
+ if (!isset($_POST['search'])) throw new Exception(ERROR_ENTRY_REQUIRED . ENTRY_SEARCH);
+ $search = ($_POST['search'] == '0') ? 0 : 1;
+
+ if (!isset($_POST['listing'])) throw new Exception(ERROR_ENTRY_REQUIRED . ENTRY_LISTING);
+ $listing = ($_POST['listing'] == '0') ? 0 : 1;
+
+ if (!isset($_POST['meta'])) throw new Exception(ERROR_ENTRY_REQUIRED . ENTRY_META);
+ $meta = ($_POST['meta'] == '0') ? 0 : 1;
+
+ if (!isset($_POST['size'])) throw new Exception(ERROR_ENTRY_REQUIRED . TEXT_SIZE);
+ $size = ($_POST['size'] == '0') ? 0 : (int)$_POST['size'];
+
+ $uses_list = $field_info['epf_input_type'];
+ if ($uses_list === 0) { // size required only if not using value list
+ if (!isset($_POST['size'])) throw new Exception(ERROR_ENTRY_REQUIRED . TEXT_SIZE);
+ $size = tep_db_prepare_input($_POST['size']);
+ if (!is_numeric($size) || ($size < 1) || ($size > 255)) throw new Exception(ERROR_ENTRY_REQUIRED . ERROR_OUTOFRANGE);
+ }
+ if ($uses_list == 1) {
+ $size = 64;
+ if (!isset($_POST['chain']))throw new Exception(ERROR_ENTRY_REQUIRED . TEXT_SHOW_PARENTS);
+ $chain = ($_POST['chain'] == '0') ? 0 : 1;
+ if (!isset($_POST['restrict'])) throw new Exception(ERROR_ENTRY_REQUIRED . TEXT_RESTRICTS);
+ $restrict = ($_POST['restrict'] == '0') ? 0 : 1;
+ } else { // parent chain and restrict listing are never active if not using value list
+ $chain = 0;
+ $restrict = 0;
+ }
+
+// if (!isset($_POST['epf_active_for_language'])) throw new Exception(ERROR_ENTRY_REQUIRED . ENTRY_ACTIVE );
+ $lactive = (!isset($_POST['epf_active_value_language']) || (int)$_POST['epf_active_value_language'] ==0) ? 0 : 1;
+
+ sql_DATATYPE_REPLACE_extrafields::Specimen();
+ $specimen = sql_DATATYPE_REPLACE_extrafieldslabels::Specimen();
+
+
+ $labels = array();
+ $active = false;
+ for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
+
+ $labels[$languages[$i]['id']] = array(
+ 'label' => ((isset($_POST['label_' . $languages[$i]['id']])) ? tep_db_prepare_input($_POST['label_' . $languages[$i]['id']]) : $specimen['epf_label'] ),
+ 'format'=>((isset($_POST['format_' . $languages[$i]['id']])) ? tep_db_prepare_input($_POST['format_' . $languages[$i]['id']]) : $specimen['epf_format'] )
+ );
+ }
+
+ // if no active languages
+ $epf_key= (isset($_POST['epf_key'])) ? tep_db_prepare_input($_POST['epf_key']) : md5($_POST['label_'.$language_id]);
+ }
+ catch(Exception $e){
+ $messageStack->add_session($e->getMessage(), 'error');
+ $error=true;
+ }
+
+ if ($error)
+ tep_redirect(tep_href_link(self::FILENAME,FILENAME_CFG__DATATYPE_REPLACE_SEOTAG_.'&error=&action=edit&eid=' . self::$eid));
+
+
+ $label_query = tep_db_query("select * from " . TABLE__DATATYPE_REPLACE_MAJ__EXTRA_FIELDS_LABELS . " where epf_id=" . (int)self::$eid);
+
+
+ $data_array = array(
+ 'id'=>(int)self::$eid,
+ 'order' => (int)$order,
+ 'advanced_search' => $search,
+ 'show_in_listing' => $listing,
+ 'size' => $size,
+ 'use_as_meta_keyword' => $meta,
+ 'use_to_restrict_listings' => $restrict,
+ 'show_parent_chain' => $chain,
+ 'new_key' => $epf_key,
+ 'admin' => (int)$epf_admin,
+ 'special_mod' => $epf_special_mod,
+ 'active_value_language'=>$lactive,
+ );
+
+ sql_DATATYPE_REPLACE_extrafields::update($data_array);
+
+
+ $DB = Database::getInstance();
+
+ foreach ($labels as $lid => $value) {
+ $label_array = array(
+ 'id' => (int)self::$eid,
+ 'languages_id' =>(int)$lid,
+ 'label' => $value['label'],
+ 'format' => $value['format'],
+ 'active_for_language' => $value['active']
+ );
+
+ if(! sql_DATATYPE_REPLACE_extrafieldslabels::fetch(array('id'=>(int)self::$eid , 'languages_id'=> (int)$lid)) ){
+
+ if( ! sql_DATATYPE_REPLACE_extrafieldslabels::create($label_array) )
+ $messageStack->add_session(
+ __('error for create extra fileds label'),
+ 'error'
+ );
+ }
+ else{
+ if(! sql_DATATYPE_REPLACE_extrafieldslabels::update($label_array) )
+ $messageStack->add_session(
+ __('error for update extra fileds label'),
+ 'error'
+ );
+ }
+
+ }
+
+ tep_redirect(tep_href_link(self::FILENAME,FILENAME_CFG__DATATYPE_REPLACE_SEOTAG_.'&action=edit&eid=' . self::$eid));
+
+ break;
+
+
+
+ case 'delete':
+ if ($confirm == 'yes') {
+ if (isset($_GET['used']) && ($_GET['used'] > 0)) {
+ self::$double_check = 'yes';
+ } else {
+
+ tep_db_query('delete from ' . TABLE__DATATYPE_REPLACE_MAJ__EXTRA_FIELDS_VALUES . ' where epf_id = ' . (int)self::$eid);
+ tep_db_query('delete from ' . TABLE__DATATYPE_REPLACE_MAJ__TO__DATATYPE_REPLACE_MAJ__EXTRA_FIELDS . ' where _DATATYPE_REPLACE__extra_fields_id = ' . (int)self::$eid);
+
+ sql_DATATYPE_REPLACE_extrafields::delete(array('id'=> (int)self::$eid));
+
+ tep_redirect(tep_href_link(FILENAME_CONFIGURATION, tep_get_all_get_params(array('action','confirm','eid'),false)));
+ }
+ } else {
+ self::$double_check = 'no';
+ }
+ break;
+
+
+ /**
+ @remarks quickaction
+ */
+ case 'setflag':
+ if(isset($_GET['flag']) ){
+ if (($_GET['flag'] != 0) && ($_GET['flag'] != 1)) break; // skip if flag not properly set
+
+ if( sql_DATATYPE_REPLACE_extrafields::update(array('id'=> (int)self::$eid , 'status'=>(int)$_GET['flag'] )) )
+ $messageStack->add_session(
+ sprintf(
+ __('success for update extra fileds; this fileds is %s'),
+ ( ($_GET['flag']==1)
+ ? 'active'
+ : 'inactive'
+ )
+ )
+ , 'success');
+ else
+ $messageStack->add_session(__('error for update extra fileds'), 'error');
+ }
+
+ if(!isset($_GET['forceajax']))
+ tep_redirect(tep_href_link(FILENAME_CONFIGURATION, tep_get_all_get_params(array('action','flag_spe','flag_admin','flag'),false)));
+ break;
+
+
+
+
+ case 'value_update':
+ $languages = tep_get_languages();
+ for ($i=0, $n=sizeof($languages); $i<$n; $i++){
+ $data_array = array('sort_order' => (int)(isset($_POST['sort_order'][$languages[$i]['id']]) ? tep_db_prepare_input($_POST['sort_order'][$languages[$i]['id']]) : 0),
+ 'epf_value' => (isset($_POST['value'][$languages[$i]['id']]) ? tep_db_prepare_input($_POST['value'][$languages[$i]['id']]) : 0),
+ 'languages_id'=> $languages[$i]['id']);
+ }
+
+ tep_db_perform(TABLE__DATATYPE_REPLACE_MAJ__EXTRA_FIELDS_VALUES, $data_array, 'update',"value_id = '" . (int)$_GET['vid']."' and epf_id='".self::$eid."' ");
+ tep_redirect(tep_href_link(FILENAME_CONFIGURATION, FILENAME_CFG__DATATYPE_REPLACE_SEOTAG_ . 'eid=' . self::$eid.'&action=value_listing'));
+ break;
+
+
+ /**
+ @brief insertion d'une valeur dans la liste des valeur disponible (champs fermé)
+ */
+ case 'value_insert':
+
+ $languages = tep_get_languages();
+ for ($i=0, $n=sizeof($languages); $i<$n; $i++){
+ $data_array = array(
+ 'sort_order' => (int)(isset($_POST['sort_order'][$languages[$i]['id']]) ? tep_db_prepare_input($_POST['sort_order'][$languages[$i]['id']]) : 0),
+ 'epf_value' => (isset($_POST['value'][$languages[$i]['id']]) ? tep_db_prepare_input($_POST['value'][$languages[$i]['id']]) : 0),
+ 'languages_id'=> $languages[$i]['id'],
+ 'epf_id' => (int)self::$eid,
+ 'parent_id' => (int)0,
+ );
+ $r=tep_db_perform(TABLE__DATATYPE_REPLACE_MAJ__EXTRA_FIELDS_VALUES, $data_array);
+ }
+
+ tep_redirect(tep_href_link(FILENAME_CONFIGURATION, FILENAME_CFG__DATATYPE_REPLACE_SEOTAG_ . 'eid=' . self::$eid.'&action=value_listing'));
+ break;
+
+
+ case 'value_delete_confirm':
+ if ($confirm == 'yes') {
+ if (isset($_GET['used']) && ($_GET['used'] > 0)) {
+ $double_check = 'yes';
+ } else {
+ $children = tep_list_epf_children($vid);
+ $field = 'extra_value_id' . (int)$eid;
+ $query = tep_db_query("update " . TABLE__DATATYPE_REPLACE_MAJ__DESCRIPTION . " set " . $field . " = 0 where language_id = " . (int)$lid . " and " . $field . " in (" . (int)$vid . $children . ")");
+ tep_db_query('delete from ' . TABLE__DATATYPE_REPLACE_MAJ__EXTRA_FIELDS_VALUES . ' where value_id in (' . (int)$vid . $children . ")");
+ tep_redirect(tep_href_link(FILENAME_CONFIGURATION, tep_get_all_get_params(array('action','vid','list_id','parent'),false). 'list_id=' . $list_id));
+ }
+ } else {
+ $double_check = 'no';
+ }
+ break;
+
+ case 'value_delete':
+ case 'value_edit':
+
+ $list_id = (isset($_GET['list_id']) ? $_GET['list_id'] : '_');
+ list($eid, $lid) = explode('_', $list_id);
+ $vid = (isset($_GET['vid']) ? $_GET['vid'] : '');
+ $confirm = (isset($_GET['confirm']) ? $_GET['confirm'] : '');
+ break;
+ default:
+
+ }
+ }
+
+ /**
+ @brief load db value
+ */
+ public function load_db_values(){
+ global $action,$languages_id,$messageStack;
+
+
+ switch($action){
+
+ /**
+ @remarks value listing
+ */
+ case 'value_listing':
+ global $list, $languages,$action ;
+
+ $eid=self::$eid;
+ $lid=$languages;
+
+ $query = tep_db_fetch_array(tep_db_query($sql="select epf_label from " . TABLE__DATATYPE_REPLACE_MAJ__EXTRA_FIELDS_LABELS . " where epf_id = " . (int)$eid . " and languages_id = " . (int)$lid));
+
+ $current_label = $query['epf_label'];
+ if ($current_label == '') { // if invalid label get first matching label and use that information
+ $query = tep_db_fetch_array(tep_db_query("select l.epf_label, l.epf_format, l.languages_id, l.epf_id from " . TABLE__DATATYPE_REPLACE_MAJ__EXTRA_FIELDS_LABELS . " l join " . TABLE__DATATYPE_REPLACE_MAJ__EXTRA_FIELDS . " e where e.epf_id = l.epf_id and l.epf_active_for_language and e.epf_input_type order by e.epf_order"));
+ $current_label = $query['epf_label'];
+ $eid = $query['epf_id'];
+ $lid = $query['languages_id'];
+ $list_id = $eid . '_' . $lid;
+ $_GET['list_id'] = $list_id; // set so dropdown list of fields will match value list chosen
+ }
+
+ $list[] = $this->build_value_list($eid, $lid);
+ $selected = array();
+
+ return $list;
+ break;
+
+ /**
+ @remarks value new
+ */
+ case 'value_new':
+ $list_id = (isset($_GET['list_id']) ? $_GET['list_id'] : '_');
+ list($eid, $lid) = explode('_', $list_id);
+ $vid = (isset($_GET['vid']) ? $_GET['vid'] : '');
+ $confirm = (isset($_GET['confirm']) ? $_GET['confirm'] : '');
+ $parent_id = (isset($_GET['parent']) ? $_GET['parent'] : 0);
+ break;
+
+ /**
+ @remarks value edit
+ */
+ case 'value_delete':
+ case 'value_edit':
+ $sql = tep_db_query($sql_="select * from " . TABLE__DATATYPE_REPLACE_MAJ__EXTRA_FIELDS_VALUES . " where epf_id = " . self::$eid. " and value_id = " . (int)$_GET['vid'] . " order by sort_order, epf_value");
+ while ($v = tep_db_fetch_array($sql)) {
+ $res[$v['languages_id']] =$v;
+ }
+
+ $languages = tep_get_languages();
+ for ($i=0, $n=sizeof($languages); $i<$n; $i++){
+ $list[$languages[$i]['id']] = $res[$languages[$i]['id']] ;
+ }
+
+ return $list;
+ break;
+
+ /**
+ @remarks label edit
+ */
+ case 'edit':
+ $fields=sql_DATATYPE_REPLACE_extrafields::fetch(array('id'=>(int)self::$eid ));
+
+ $r = sql_DATATYPE_REPLACE_extrafieldslabels::fetch(array('id'=>(int)self::$eid));
+
+ if(!isset($r[0]))
+ $result[] = $r ;
+ else
+ $result = $r ;
+
+ foreach($result as $row)
+ if(isset($row['languages_id']))$fields['lg'][$row['languages_id']] = new objectInfo($row);
+
+ return new objectInfo($fields);
+ break;
+
+ /**
+ @remarks label new
+ */
+ case 'new':
+ $fields=sql_DATATYPE_REPLACE_extrafields::Specimen();
+
+ foreach( tep_get_languages() as $rows){
+ $language_id = $rows['id'];
+ $fields['lg'][$language_id] = new objectInfo(sql_DATATYPE_REPLACE_extrafieldslabels::Specimen());
+ }
+
+
+ return new objectInfo($fields);
+ break;
+
+ /**
+ @remarks default listing all extra
+ */
+ case 'listing':
+ default:
+ $languages = tep_get_languages();
+ self::$lang = array();
+ for ($i=0, $n=sizeof($languages); $i<$n; $i++) { // build array accessed directly by language id
+ self::$lang[$languages[$i]['id']] = array ('name' => $languages[$i]['name'],
+ 'code' => $languages[$i]['code'],
+ 'image' => $languages[$i]['image'],
+ 'directory' => $languages[$i]['directory']);
+ }
+
+ $field_query = tep_db_query("select * from " . TABLE__DATATYPE_REPLACE_MAJ__EXTRA_FIELDS . " order by epf_order,epf_admin, epf_special_mod ");
+ $selected_labels = array();
+ $list=array();
+ while ($epf = tep_db_fetch_array($field_query)) {
+ $class= ($epf['epf_id'] == self::$eid)? "Selected" : '';
+ if ($epf['epf_id'] == self::$eid)$selected=$epf;
+ $list[]=new objectInfo($epf);
+ }
+ return $list;
+ }
+
+ }
+
+ /**
+ @fn load_for_delete()
+ @brief call value for form confim delete
+ */
+ private static function load_for_delete(){
+ global $languages,$action;
+ $query = tep_db_query("select epf_input_type as uses_list from " . TABLE__DATATYPE_REPLACE_MAJ__EXTRA_FIELDS . " where epf_id = " . (int)self::$eid);
+ $field_info = tep_db_fetch_array($query);
+
+ self::$pInfo=new objectInfo($field_info);
+
+ $field = 'extra_value' . ($field_info['uses_list'] ? '_id' : '') . (int)self::$eid;
+ $used = 0;
+ for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
+ $label_query = tep_db_query("select * from " . TABLE__DATATYPE_REPLACE_MAJ__EXTRA_FIELDS_LABELS . " where epf_id = " . (int)self::$eid . " and languages_id = " . (int)$languages[$i]['id']. " and epf_active_for_language='1' ");
+ if(tep_db_num_rows($label_query) >0){
+ $label = tep_db_fetch_array($label_query);
+ $check_query = tep_db_query("select count(_DATATYPE_REPLACE__id) as total from " . TABLE__DATATYPE_REPLACE_MAJ__DESCRIPTION . " where language_id = " . (int)$languages[$i]['id'] . " and " . ($field_info['uses_list'] ? $field . " > 0" : "length(" . $field . ") > 0"));
+ $check = tep_db_fetch_array($check_query);
+ $used += $check['total']; // total how many descriptions use this field
+ echo '<p>' . sprintf(TEXT_FIELD_DATA, $languages[$i]['name'], $label['epf_label'], $check['total']) . "</p>\n";
+ }
+ }
+ self::$pInfo->used=$used;
+ }
+
+ /**
+ Appelé dans le header de page
+ */
+ public static function draw_header(){
+ echo '<script type="text/javascript"><!--'."\n".
+ '$(function() {'."\n".
+ " $('#tabs').tabs().find('.ui-tabs-nav').sortable({axis:'x'});"."\n".
+ " $('.tabs_lang').tabs().find('.ui-tabs-nav').sortable({axis:'x'});"."\n".
+ '});'."\n".
+ '// --></script>'."\n";
+ }
+
+ /**
+ Contenu central
+ */
+ public function draw(){
+ global $action,$gparentID,$current_theme, $languages_id;
+
+ switch($action){
+
+ /**
+ @remarks Ajax View result
+ */
+ case 'setflag':
+ if(isset($_GET['flag']) )
+ echo self::get_item_status(new objectInfo(array('epf_status'=>(int)$_GET['flag'], 'epf_id'=>(int)$_GET['eID'])) );
+ break;
+
+
+ /**
+ @remarks Normal View Page
+ */
+
+
+ case 'value_listing':
+ self::$list= $this->load_db_values();
+ $gab = 'value.listing';
+ break;
+
+ case 'value_new':
+ case 'value_edit':
+ self::$cInfo=$this->load_db_values();
+ $gab = 'value.edit';
+ break;
+
+ case 'value_delete':
+ self::$cInfo=$this->load_db_values();
+ $gab = 'value.delete';
+ break;
+
+ case 'new':
+ case 'edit':
+ global $list, $languages,$action;
+ self::$cInfo = $this->load_db_values();
+
+ $gab = 'label.'.$action;
+ break;
+
+ case 'delete':
+ self::load_for_delete();
+ $gab = 'delete';
+ break;
+
+ default:
+ self::$list=$this->load_db_values();
+ self::$selected_labels=array();
+ $languages = tep_get_languages();
+ $gab ='label.'.'listing';
+ }
+
+ /// use master gabarit
+ if(isset($gab)) return MGabCont::CallGab($gab,__FUNCTION__,'configuration/'.__CLASS__);
+ else return false;
+ }
+ /* Private function class */
+
+
+
+ /**
+ @brief get_item_action($item)
+ @brief content col action
+ @param $item arrau , detail ligne
+ */
+ public static function get_item_action($item){
+ global $action;
+ return sprintf(
+ CsrtAction::getFormat('row_action'),
+ '' ,
+ (($item->epf_input_type)? sprintf(CsrtAction::getLink('row_action_right', IMAGE_EDIT, 'edit'), '', tep_href_link(self::FILENAME,FILENAME_CFG__DATATYPE_REPLACE_SEOTAG_.'&eid=' . $item->epf_id . '&action=' . 'value_listing' ) ,'' ) :'').
+ sprintf(CsrtAction::getLink('row_action_right', IMAGE_EDIT, 'edit'), '', tep_href_link(self::FILENAME,FILENAME_CFG__DATATYPE_REPLACE_SEOTAG_.'&eid=' . $item->epf_id . '&action=edit') ,'' ).
+ sprintf(CsrtAction::getLink('row_action_right', IMAGE_DELETE, 'delete'), 'fancy', tep_href_link(self::FILENAME, FILENAME_CFG__DATATYPE_REPLACE_SEOTAG_.'&eid=' . $item->epf_id . '&action=delete') ,'' )
+ );
+ }
+
+ /**
+ @brief get_item_action($item)
+ @brief content col action
+ @param $item arrau , detail ligne
+ */
+ public static function get_item_value_action($item){
+ global $action;
+ return sprintf(
+ CsrtAction::getFormat('row_action'),
+ '' ,
+ sprintf(CsrtAction::getLink('row_action_right', IMAGE_EDIT, 'edit'), '', tep_href_link(self::FILENAME,FILENAME_CFG__DATATYPE_REPLACE_SEOTAG_.'&eid=' . $item['epf_id'] . '&vid=' . $item['value_id'] . '&action=value_edit') ,'' ).
+ sprintf(CsrtAction::getLink('row_action_right', IMAGE_DELETE, 'delete'), 'fancy', tep_href_link(self::FILENAME, FILENAME_CFG__DATATYPE_REPLACE_SEOTAG_.'&eid=' . $item['epf_id'] . '&vid=' . $item['value_id'] . '&action=value_delete') ,'' )
+ );
+ }
+
+ /**
+ @brief get_item_action($item)
+ @brief content col action
+ @param $item arrau , detail ligne
+ */
+ public static function get_item_status($item){
+ $exclude=array('action','eid','forceajax','type','class','function','funct', 'mod','flag');
+ $query_s='action=setflag&eid=' . $item->epf_id.'&flag=';
+
+ return '<a class="ajaxinline" href="' . tep_href_link(self::FILENAME, tep_get_all_get_params($exclude).$query_s.(($item->epf_status == '1')? '0' : '1') ) . '">'.
+ sprintf(
+ CsrtAction::getFormat('row_flag'),
+ (int)$item->epf_status,
+ ( ($item->epf_status == '1')? IMAGE_ICON_STATUS_GREEN : IMAGE_ICON_STATUS_RED)
+ ).
+ '</a>';
+ }
+
+
+
+
+ /** SPECIFIQUE */
+
+ /**
+ @author oscim <mail os...@os...> <www http://www.oscim.fr>
+ */
+ private function build_value_list($epf_id, $lang_id, $value_array = '', $parent_id = 0) {
+ if (!is_array($value_array)) $value_array = array();
+ $sql = tep_db_query($sql_="select * from " . TABLE__DATATYPE_REPLACE_MAJ__EXTRA_FIELDS_VALUES . " where epf_id = " . (int)$epf_id . " and languages_id = " . (int)$lang_id . " and parent_id = " . (int)$parent_id . " order by sort_order, epf_value");
+// echo $sql_;
+ while ($v = tep_db_fetch_array($sql)) {
+ $value_array[] = $v;
+ $value_array = $this->build_value_list($epf_id, $lang_id, $value_array, $v['value_id']);
+ }
+ return $value_array;
+ }
+
+}
+
+
+?>
Modified: trunk/dev/GenerCode/datatype/Modele/catalog/includes/classes/drivers/data/_DATATYPE_REPLACE_.php
===================================================================
--- trunk/dev/GenerCode/datatype/Modele/catalog/includes/classes/drivers/data/_DATATYPE_REPLACE_.php 2012-04-05 14:40:19 UTC (rev 4156)
+++ trunk/dev/GenerCode/datatype/Modele/catalog/includes/classes/drivers/data/_DATATYPE_REPLACE_.php 2012-04-05 19:42:32 UTC (rev 4157)
@@ -46,16 +46,35 @@
Data function
*/
+ /**
+ * \fn get_query($id='',$search='',$exclude='',$option='')
+ * \brief generation automatique de requetes pour exraire les données .
+ * Cet appel est mis en cache afin d'optimiser les requetes, de maniére incremental pour chaque item, et par item.
+ * @param $id integer id
+ * @param $search string champs qui sera recherché dans tous les champs de la db
+ * @param $exclude tableau d'ecxlusion de item par id
+ * @param $option array option passé par couple key/values
+ * @return object
+ */
public static function get_query($id='',$search='',$exclude='',$option=array()){ global $languages_id; return _DATATYPE_REPLACE_Data::get_query($id,$search,$exclude,$option); }
+ /**
+ * \fn get_item($id)
+ * \brief appel d'un produit par son id, il sera recupere dans la pile du cache, ou via une requet sql
+ * @param $id
+ * @return object
+ */
public static function get_item($id,$option=array()){ return _DATATYPE_REPLACE_Data::get_item($id,$option); }
public static function get__DATATYPE_REPLACE__cat($id){ return _DATATYPE_REPLACE_Data::get__DATATYPE_REPLACE__cat($id); }
public static function get__DATATYPE_REPLACE__path($id){ return _DATATYPE_REPLACE_Data::get__DATATYPE_REPLACE__path($id); }
public static function get__DATATYPE_REPLACE__in_cat($current_category_id=0, $exclude=''){ return _DATATYPE_REPLACE_Data::get__DATATYPE_REPLACE__in_cat($current_category_id=0, $exclude=''); }
- public static function get_cms_liste_byDate($max, $exclude){ return _DATATYPE_REPLACE_Data::get_cms_liste_byDate($max, $exclude); }
+ public static function get_byDate($max, $exclude){ return _DATATYPE_REPLACE_Data::get_byDate($max, $exclude); }
public static function get_img($id, $img_num=0){ return _DATATYPE_REPLACE_Data::get_img($id, $img_num); }
-
/**
+ * \fn get_extra_product($products_id, $key='')
+ */
+ public static function get_extra__DATATYPE_REPLACE_($products_id, $key='') {return _DATATYPE_REPLACE_Data::GetExtraFields($products_id, $key); }
+ /**
* \fn get_count__DATATYPE_REPLACE_s_in_category($category_id, $include_inactive = false)
*/
public static function get_count_in_category($category_id, $include_inactive = false) {return _DATATYPE_REPLACE_Data::count_in_category($category_id, $include_inactive); }
@@ -110,6 +129,8 @@
$res['original']=$_DATATYPE_REPLACE_['text'];
$res['images']=array();
+ $product['extra']=self::GetExtraFields($content['products_id']);
+
self::$array_data[$_DATATYPE_REPLACE_['id']]=$tabl[$_DATATYPE_REPLACE_['id']]=new objectInfo($res);
self::$array_data[$_DATATYPE_REPLACE_['id']]->text=self::parse__DATATYPE_REPLACE_($res['text'],$_DATATYPE_REPLACE_['id']);
self::add_cache($_DATATYPE_REPLACE_['id']);
@@ -317,7 +338,7 @@
@a array tableau d'exclusion des id
@return array
*/
- public static function get_cms_liste_byDate($max=10, $exclude='') {
+ public static function get_byDate($max=10, $exclude='') {
global $languages_id;
self::start();
@@ -366,6 +387,110 @@
return $products_count;
}
+
+
+ /**
+ @brief Champs extra product Recupere la totalite des element supplementaire generic.
+ Les chamsp appartenant à des modules ne sont pas chargée
+ [extra] => Array
+ (
+ [key or id ] => objectInfo Object
+ (
+ [label] => le montant d'une part
+ [value] => 5
+ [epf_key] => MONTANT_PART
+ [epf_id] => id epf
+ )
+ )
+ */
+ public static function GetExtraFields($product_id, $key=''){
+ $array= array();
+
+ if(isset(self::$object_data[(int)$product_id]) && isset(self::$object_data[(int)$product_id]->extra) && empty($key) )$array= self::$object_data[(int)$product_id]->extra;
+ else {
+ $DB=Database::getInstance();
+ $array=array();
+ $sql = "SELECT e.epf_id, e.epf_input_type,e.epf_key, epf_show_in_listing, epf_advanced_search, e.epf_active_value_language , l.epf_label, l.epf_format as input_format, p2epf._DATATYPE_REPLACE__extra_fields_value as value FROM " . TABLE__DATATYPE_REPLACE_MAJ__TO__DATATYPE_REPLACE_MAJ__EXTRA_FIELDS . " p2epf , " . TABLE__DATATYPE_REPLACE_MAJ__EXTRA_FIELDS . " e JOIN " . TABLE__DATATYPE_REPLACE_MAJ__EXTRA_FIELDS_LABELS . " l ON e.epf_id = l.epf_id WHERE p2epf._DATATYPE_REPLACE__extra_fields_id=e.epf_id AND _DATATYPE_REPLACE__id = '" . (int)$product_id . "' AND l.languages_id='".self::$lg_id."' AND epf_special_mod='".$key."' " ;
+ $epf_query = $DB->query($sql);
+
+ while( $e = $epf_query->fetchAssoc() ) {
+
+
+ $val = $DB->query( $sql ="SELECT p2epf._DATATYPE_REPLACE__extra_fields_value as value FROM " . TABLE__DATATYPE_REPLACE_MAJ__TO__DATATYPE_REPLACE_MAJ__EXTRA_FIELDS . " p2epf WHERE p2epf._DATATYPE_REPLACE__extra_fields_id=".$e['epf_id']." AND _DATATYPE_REPLACE__id = '" . (int)$product_id . "' AND languages_id='". (($e['epf_active_value_language']==1)? self::$lg_id : 0)."' ");
+ $result = $val->fetchAssoc();
+
+ switch((int)$e['epf_input_type'] ) {
+
+ case 6: // select mutli
+ case 7: // checkbox mutli
+ case 3: // checkbox
+ $val = self::GetEFValue($e['epf_id'] ,$result['value'] , (($e['epf_active_value_language']==1)? self::$lg_id : 0) );
+ break;
+
+ case 0: // classic
+ case 1: // textarea
+ case 2: // radio
+ case 4: // select
+ case 5: // hidden
+ default:
+ $val = $result['value'];
+ }
+
+
+ $array[ (!empty($e['epf_key'])?$e['epf_key'] :$e['epf_id']) ]=new objectInfo( array(
+ 'label'=>(string)$e['epf_label'],
+ 'name'=>(string)$e['epf_label'], // obsolete
+ 'value' => $val, // obsolete
+ 'input_value' => $val,
+ 'epf_key'=>(string)$e['epf_key'],
+ 'epf_id'=>(int)$e['epf_id'], // obsolete
+ 'id'=>(int)$e['epf_id'],
+ 'epf_show_in_listing'=>(int)$e['epf_show_in_listing'],
+ 'input_type'=>(int)$e['epf_input_type'],
+ 'input_format'=>$e['input_format'],
+ 'required_status'=>0,
+ // 'epf_advanced_search'=>(int)$e['epf_advanced_search']
+ ) );
+
+
+ }
+
+ if(!isset(self::$object_data[(int)$product_id]))self::$object_data[(int)$product_id]=new objectInfo(array());
+ self::$object_data[(int)$product_id]->extra = $array;
+ }
+
+ return $array;
+ }
+
+ /**
+ @fn GetEFValue($epfid,$values, $languages_id, $separator = ', ')
+ @brief get in db for extract all value for EF stocked in id value and not string
+ @param $epfid int
+ @param $values string (id, id,...)
+ @param $languages_id int or 0 for value not multi language
+ @param $separator seperator result
+ */
+ public static function GetEFValue($epfid,$values, $languages_id, $separator = ', '){
+ $DB=Database::getInstance();
+ $val = '';
+ $s='';
+
+ $a = explode(',',$values);
+ foreach($a as $r)
+ if(!empty($r))$val .=(int)$r.",";
+
+ if(strlen($val) <= 0)
+ return '';
+
+ $val = $DB->query( $sql ="SELECT epf_value as value FROM " . TABLE__DATATYPE_REPLACE_MAJ__EXTRA_FIELDS_VALUES . " p2epf WHERE value_id IN (".substr($val, 0, -1).") AND epf_id = '" . (int)$epfid . "' AND languages_id='".(int) $languages_id."' ORDER BY sort_order ");
+ $result = $val->fetchAllAssoc();
+
+ foreach($result as $r)
+ $s .=$r['value'] .$separator;
+
+ return substr($s, 0, -1);
+ }
+
}
Modified: trunk/dev/GenerCode/datatype/Modele/catalog/includes/content/_DATATYPE_REPLACE_.php
===================================================================
--- trunk/dev/GenerCode/datatype/Modele/catalog/includes/content/_DATATYPE_REPLACE_.php 2012-04-05 14:40:19 UTC (rev 4156)
+++ trunk/dev/GenerCode/datatype/Modele/catalog/includes/content/_DATATYPE_REPLACE_.php 2012-04-05 19:42:32 UTC (rev 4157)
@@ -8,8 +8,29 @@
@author genrated by dev/datatype/generat
@encode UTF-8
*/
+
+/**
+ @remarks local load var
+*/
+$cPath=$page->the_var('cPath');
+$category_depth=$page->the_var('category_depth');
+$annuaire=$page->the_var('annuaire');
+
?>
+<header>
+ <h1 class="content title <?php echo $language ;?>"><?php echo ( ($_DATATYPE_REPLACE_->title!=false)? $_DATATYPE_REPLACE_->title : '' ); ?></h1>
+</header>
+
<div id="_DATATYPE_REPLACE_" class="unqi">
- <?php ?>
+ <?php if($_DATATYPE_REPLACE_->text !=false) : ?>
+ <div id="headingCatTxt">
+ <?php echo $_DATATYPE_REPLACE_->text; ?>
+ </div>
+ <?php endif; ?>
+
+ <div id="productInfoBack" class="navBt">
+ <?php echo '<a class="navBt" href="javascript: history.go(-1)">' . IMAGE_BUTTON_BACK . '</a>'; ?>
+ </div>
+
</div>
\ No newline at end of file
Modified: trunk/dev/GenerCode/datatype/Modele/install.xml
===================================================================
--- trunk/dev/GenerCode/datatype/Modele/install.xml 2012-04-05 14:40:19 UTC (rev 4156)
+++ trunk/dev/GenerCode/datatype/Modele/install.xml 2012-04-05 19:42:32 UTC (rev 4157)
@@ -12,24 +12,35 @@
<addfile>
<file name="admin/includes/classes/drivers/sql_DATATYPE_REPLACE_.php" />
+ <file name="admin/includes/classes/drivers/sql_DATATYPE_REPLACE_extrafields.php" />
<file name="admin/includes/modules/pages/_DATATYPE_REPLACE_s.php" />
+ <file name="admin/includes/modules/_DATATYPE_REPLACE_/_DATATYPE_REPLACE_SEOTAG__description.php" />
+ <file name="admin/includes/modules/_DATATYPE_REPLACE_/header_tags.php" />
+ <file name="admin/includes/modules/configuration/mod_DATATYPE_REPLACE_extra.php" />
<file name="admin/includes/gabarit/_DATATYPE_REPLACE_s/display_view.delete.gab" />
<file name="admin/includes/gabarit/_DATATYPE_REPLACE_s/display_view.edit.gab" />
<file name="admin/includes/gabarit/_DATATYPE_REPLACE_s/display_view.inline.gab" />
<file name="admin/includes/gabarit/_DATATYPE_REPLACE_s/display_view.listing.gab" />
<file name="admin/includes/gabarit/_DATATYPE_REPLACE_s/display_view.new.gab" />
+ <file name="admin/includes/gabarit/_DATATYPE_REPLACE_s/_DATATYPE_REPLACE_SEOTAG__description/display_edit.edit.gab" />
<file name="common/classes/datatype_drivers/Data__DATATYPE_REPLACE_.php" />
<file name="includes/classes/drivers/data/_DATATYPE_REPLACE_.php" />
<file name="includes/content/_DATATYPE_REPLACE_.php" />
+
+ <file name="includes/modules/_DATATYPE_REPLACE_/_DATATYPE_REPLACE_SEOTAG__description.php" />
</addfile>
<addfilelg>
<file name="admin/includes/languages/%LANGUAGE%/modules/pages/_DATATYPE_REPLACE_s.txt" lgref="fr_FR"/>
+
+ <file name="admin/includes/languages/%LANGUAGE%/modules/_DATATYPE_REPLACE_/_DATATYPE_REPLACE_SEOTAG__description.txt" lgref="fr...
[truncated message content] |
|
From: <os...@us...> - 2012-04-05 14:40:30
|
Revision: 4156
http://oscss.svn.sourceforge.net/oscss/?rev=4156&view=rev
Author: oscim
Date: 2012-04-05 14:40:19 +0000 (Thu, 05 Apr 2012)
Log Message:
-----------
Modification de l'arboresance de dev
Added Paths:
-----------
trunk/dev/GenerCode/
trunk/dev/GenerCode/class.CreateDataType.php
trunk/dev/GenerCode/datatype/
Removed Paths:
-------------
trunk/dev/GenerCode/datatype/class.CreateDataType.php
trunk/dev/datatype/
Copied: trunk/dev/GenerCode/class.CreateDataType.php (from rev 4155, trunk/dev/datatype/class.CreateDataType.php)
===================================================================
--- trunk/dev/GenerCode/class.CreateDataType.php (rev 0)
+++ trunk/dev/GenerCode/class.CreateDataType.php 2012-04-05 14:40:19 UTC (rev 4156)
@@ -0,0 +1,121 @@
+<?php
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 05/04/2012, 09:40
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+
+
+
+
+
+Class CreateDataType{
+
+
+ protected $head_tag = false;
+
+ function __construct($conf /*$curent, $name, $seotag, $head_tag=false*/){
+
+
+ /*$curent = */ $conf->curent;
+ $conf->name = tep_db_prepare_input($_GET['name']);
+ $conf->seotag = tep_db_prepare_input($_GET['seotag']);
+ $conf->head_tag = false;
+ $conf->level = 'stable';
+
+ $this->modele_path = $conf->modele_path;
+
+
+ $this->allsearch=array(
+'_DATATYPE_REPLACE_SEOTAG_',
+'_DATATYPE_REPLACE_MAJ_',
+'_DATATYPE_REPLACE_UCWORDS_',
+'_DATATYPE_REPLACE_'
+);
+
+ $this->allreplace=array(
+$conf->seotag,
+strtoupper($conf->name),
+ucwords($conf->name),
+$conf->name
+);
+
+
+echo $this->folder = $conf->curent .'/'. strtoupper($conf->name).'_'.$conf->level.'/';
+
+ if(!file_exists($this->folder) || !is_dir($this->folder)) {
+ mkdir($this->folder);
+ }
+
+ $this->process();
+// }
+
+ }
+
+
+
+ function process($current=''){
+
+ if (!empty($current) && substr($current, -1, 1) != '/') $current .= '/';
+
+ $path_mod = $this->modele_path . $current;
+
+ foreach($this->browse($path_mod) as $row){
+// if(
+// ( !$this->head_tag || ( $this->head_tag && substr($row,0,11) =='header_tags' ) ) //
+// )
+ if(is_dir($path_mod.$row)) {
+
+ mkdir( $this->stringreplace($this->folder . $current. $row) );
+ $this->process($current.$row);
+ }
+ else {
+
+ $res=file_get_contents($path_mod.$row);
+
+ $file_contents = $this->stringreplace($res);
+
+ $fp = fopen( $this->stringreplace($this->folder . $current. $row) , 'w');
+ fputs($fp, $file_contents);
+ fclose($fp);
+ }
+ }
+ }
+
+
+ function stringreplace($string){
+// var_dump($string);
+ return str_replace(
+ $this->allsearch ,
+ $this->allreplace,
+ $string);
+ }
+
+
+ function browse($strFolder){
+ // Add trailing slash
+ if (substr($strFolder, -1, 1) != '/') $strFolder .= '/';
+
+ // Load from cache
+// if (isset($arrScanCache[$strFolder])) return $arrScanCache[$strFolder];
+
+ $arrReturn = array();
+ // Scan directory
+ foreach (scandir($strFolder) as $strFile) {
+ if ($strFile == '.' || $strFile == '..' || $strFile == '.svn' /*|| substr($strFile,-1) != '~'*/) continue;
+ $arrReturn[] = $strFile;
+ }
+
+// $arrScanCache[$strFolder] = $arrReturn;
+ return $arrReturn;
+ }
+
+
+
+}
+
+
+?>
\ No newline at end of file
Deleted: trunk/dev/GenerCode/datatype/class.CreateDataType.php
===================================================================
--- trunk/dev/datatype/class.CreateDataType.php 2012-04-05 14:34:43 UTC (rev 4155)
+++ trunk/dev/GenerCode/datatype/class.CreateDataType.php 2012-04-05 14:40:19 UTC (rev 4156)
@@ -1,121 +0,0 @@
-<?php
-/**
- @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
- @package osCSS-2 <www http://www.oscss.org>
- @version 2.1.1
- @date 05/04/2012, 09:40
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-8
-*/
-
-
-
-
-
-Class CreateDataType{
-
-
- protected $head_tag = false;
-
- function __construct($conf /*$curent, $name, $seotag, $head_tag=false*/){
-
-
- /*$curent = */ $conf->curent;
- $conf->name = tep_db_prepare_input($_GET['name']);
- $conf->seotag = tep_db_prepare_input($_GET['seotag']);
- $conf->head_tag = false;
- $conf->level = 'stable';
-
- $this->modele_path = $conf->modele_path;
-
-
- $this->allsearch=array(
-'_DATATYPE_REPLACE_SEOTAG_',
-'_DATATYPE_REPLACE_MAJ_',
-'_DATATYPE_REPLACE_UCWORDS_',
-'_DATATYPE_REPLACE_'
-);
-
- $this->allreplace=array(
-$conf->seotag,
-strtoupper($conf->name),
-ucwords($conf->name),
-$conf->name
-);
-
-
-echo $this->folder = $conf->curent .'/'. strtoupper($conf->name).'_'.$conf->level.'/';
-
- if(!file_exists($this->folder) || !is_dir($this->folder)) {
- mkdir($this->folder);
- }
-
- $this->process();
-// }
-
- }
-
-
-
- function process($current=''){
-
- if (!empty($current) && substr($current, -1, 1) != '/') $current .= '/';
-
- $path_mod = $this->modele_path . $current;
-
- foreach($this->browse($path_mod) as $row){
-// if(
-// ( !$this->head_tag || ( $this->head_tag && substr($row,0,11) =='header_tags' ) ) //
-// )
- if(is_dir($path_mod.$row)) {
-
- mkdir( $this->stringreplace($this->folder . $current. $row) );
- $this->process($current.$row);
- }
- else {
-
- $res=file_get_contents($path_mod.$row);
-
- $file_contents = $this->stringreplace($res);
-
- $fp = fopen( $this->stringreplace($this->folder . $current. $row) , 'w');
- fputs($fp, $file_contents);
- fclose($fp);
- }
- }
- }
-
-
- function stringreplace($string){
-// var_dump($string);
- return str_replace(
- $this->allsearch ,
- $this->allreplace,
- $string);
- }
-
-
- function browse($strFolder){
- // Add trailing slash
- if (substr($strFolder, -1, 1) != '/') $strFolder .= '/';
-
- // Load from cache
-// if (isset($arrScanCache[$strFolder])) return $arrScanCache[$strFolder];
-
- $arrReturn = array();
- // Scan directory
- foreach (scandir($strFolder) as $strFile) {
- if ($strFile == '.' || $strFile == '..' || $strFile == '.svn' /*|| substr($strFile,-1) != '~'*/) continue;
- $arrReturn[] = $strFile;
- }
-
-// $arrScanCache[$strFolder] = $arrReturn;
- return $arrReturn;
- }
-
-
-
-}
-
-
-?>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-04-05 14:34:54
|
Revision: 4155
http://oscss.svn.sourceforge.net/oscss/?rev=4155&view=rev
Author: oscim
Date: 2012-04-05 14:34:43 +0000 (Thu, 05 Apr 2012)
Log Message:
-----------
suite travail generecateur de code
correction diverse et ajsutement
Modified Paths:
--------------
trunk/dev/datatype/Modele/catalog/common/classes/datatype_drivers/Data__DATATYPE_REPLACE_.php
trunk/dev/datatype/Modele/catalog/includes/classes/drivers/data/_DATATYPE_REPLACE_.php
trunk/dev/datatype/Modele/install.xml
trunk/dev/datatype/Modele/readme
trunk/dev/datatype/class.CreateDataType.php
trunk/dev/datatype/generat.php
Modified: trunk/dev/datatype/Modele/catalog/common/classes/datatype_drivers/Data__DATATYPE_REPLACE_.php
===================================================================
--- trunk/dev/datatype/Modele/catalog/common/classes/datatype_drivers/Data__DATATYPE_REPLACE_.php 2012-04-05 10:02:10 UTC (rev 4154)
+++ trunk/dev/datatype/Modele/catalog/common/classes/datatype_drivers/Data__DATATYPE_REPLACE_.php 2012-04-05 14:34:43 UTC (rev 4155)
@@ -181,9 +181,27 @@
// call transversal load in other modules
DataTypes::transversal('transversal');
- $page__DATATYPE_REPLACE_ = $page->force_content('_DATATYPE_REPLACE_.php');
+ /** init aca module */
+ $aca=$page->new_class('_DATATYPE_REPLACE_',true);
- return $page__DATATYPE_REPLACE_;
+ if (isset($_GET['action'])) {
+ $action=(string)tep_db_prepare_input($_GET['action']);
+ if ($aca->check_action('',$action) ) {
+ $aca->after_check_action('',$action);
+ tep_redirect(tep_href_link('_DATATYPE_REPLACE_.php', tep_get_all_get_params(array('action'))));
+ }
+ }
+
+ $_DATATYPE_REPLACE_=_DATATYPE_REPLACE_::get_item( (int)$_GET['_DATATYPE_REPLACE_'] );
+
+ $page->add_var_page('_DATATYPE_REPLACE_',$_DATATYPE_REPLACE_);
+
+ $page->title=$_DATATYPE_REPLACE_->title;
+ $breadcrumb->add($_DATATYPE_REPLACE_->title, $_DATATYPE_REPLACE_->href );
+
+ $page_content = $page->force_content('_DATATYPE_REPLACE_.php');
+
+ return $page_content;
}
Modified: trunk/dev/datatype/Modele/catalog/includes/classes/drivers/data/_DATATYPE_REPLACE_.php
===================================================================
--- trunk/dev/datatype/Modele/catalog/includes/classes/drivers/data/_DATATYPE_REPLACE_.php 2012-04-05 10:02:10 UTC (rev 4154)
+++ trunk/dev/datatype/Modele/catalog/includes/classes/drivers/data/_DATATYPE_REPLACE_.php 2012-04-05 14:34:43 UTC (rev 4155)
@@ -138,12 +138,12 @@
Requeteur
*/
protected static function cstr_query($orderby='', $limit='', $option=''){
- $query="SELECT _DATATYPE_REPLACE__title AS title, c._DATATYPE_REPLACE__id AS id, c._DATATYPE_REPLACE__name AS name, _DATATYPE_REPLACE__text AS text, c.date_added as date_added
+ $query="SELECT _DATATYPE_REPLACE__title AS title, c._DATATYPE_REPLACE__id AS id, cd._DATATYPE_REPLACE__title AS name, _DATATYPE_REPLACE__description AS text, c.date_added as date_added
FROM " . TABLE__DATATYPE_REPLACE_MAJ__DESCRIPTION . " cd, " . TABLE__DATATYPE_REPLACE_MAJ_ . " c, " . TABLE__DATATYPE_REPLACE_MAJ__TO_CATEGORIES . " ctc, " . TABLE_CATEGORIES . " cat
WHERE cat.categories_id=ctc.categories_id " . DataForceStatus(" AND cat.categories_status='1' ") . " " . DataForceStatus(" AND c._DATATYPE_REPLACE__status = '1' ") . " AND c._DATATYPE_REPLACE__id = ctc._DATATYPE_REPLACE__id AND cd._DATATYPE_REPLACE__id = ctc._DATATYPE_REPLACE__id AND cd.language_id = '" . self::$lg_id . "' " ;
$query .=self::$where_query;
- $query .=' ORDER BY ' .(!tep_not_null($orderby)? ' c.sort_order, c._DATATYPE_REPLACE__name ASC ' : $orderby) ;
+ $query .=' ORDER BY ' .(!tep_not_null($orderby)? ' c.sort_order, cd._DATATYPE_REPLACE__title ASC ' : $orderby) ;
$query .=' LIMIT '.(!tep_not_null($limit)? '1' : $limit) ;
return $query;
Modified: trunk/dev/datatype/Modele/install.xml
===================================================================
--- trunk/dev/datatype/Modele/install.xml 2012-04-05 10:02:10 UTC (rev 4154)
+++ trunk/dev/datatype/Modele/install.xml 2012-04-05 14:34:43 UTC (rev 4155)
@@ -60,7 +60,7 @@
define('TABLE__DATATYPE_REPLACE_MAJ__DESCRIPTION', DB_TABLE_PREFIX . '_DATATYPE_REPLACE__description');
define('TABLE__DATATYPE_REPLACE_MAJ__EXTRA', DB_TABLE_PREFIX . '_DATATYPE_REPLACE__extra');
define('TABLE__DATATYPE_REPLACE_MAJ__TO_CATEGORIES', DB_TABLE_PREFIX . '_DATATYPE_REPLACE__to_categories');
- define('FILENAME__DATATYPE_REPLACE_MAJ_', '_DATATYPE_REPLACE.php');]]></add>
+ define('FILENAME__DATATYPE_REPLACE_MAJ_', '_DATATYPE_REPLACE_.php');]]></add>
</add2end>
<filesql> </filesql>
Modified: trunk/dev/datatype/Modele/readme
===================================================================
--- trunk/dev/datatype/Modele/readme 2012-04-05 10:02:10 UTC (rev 4154)
+++ trunk/dev/datatype/Modele/readme 2012-04-05 14:34:43 UTC (rev 4155)
@@ -42,4 +42,5 @@
- placer ce dossier dans le dossier contribution de votre shop, et mettez a jour vos sources afin de voir ce nouveau paquet.
- apres installation
- - il est necessaire d'activer ce datatype en ajoutant sont nom dans PUBLIC_PAGE_TYPE
\ No newline at end of file
+ - il est necessaire d'activer ce datatype en ajoutant sont nom dans PUBLIC_PAGE_TYPE, contenu dan sla tabel configuration
+ - d'ajouter '_DATATYPE_REPLACE_' dans le tableau "$RootListing" de common/classes/datatype_drivers/Data_categorie.php
\ No newline at end of file
Modified: trunk/dev/datatype/class.CreateDataType.php
===================================================================
--- trunk/dev/datatype/class.CreateDataType.php 2012-04-05 10:02:10 UTC (rev 4154)
+++ trunk/dev/datatype/class.CreateDataType.php 2012-04-05 14:34:43 UTC (rev 4155)
@@ -1,44 +1,55 @@
<?php
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 05/04/2012, 09:40
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
-
Class CreateDataType{
protected $head_tag = false;
- function __construct($curent, $name, $seotag, $head_tag=false){
+ function __construct($conf /*$curent, $name, $seotag, $head_tag=false*/){
-// if($head_tag)
-// $this->head_tag = true;
- $this->modele_path = $curent . '/Modele/';
+ /*$curent = */ $conf->curent;
+ $conf->name = tep_db_prepare_input($_GET['name']);
+ $conf->seotag = tep_db_prepare_input($_GET['seotag']);
+ $conf->head_tag = false;
+ $conf->level = 'stable';
- $this->search_seotag = '_DATATYPE_REPLACE_SEOTAG_';
- $this->search = '_DATATYPE_REPLACE_';
- $this->SEARCH = '_DATATYPE_REPLACE_MAJ_';
- $this->Search = '_DATATYPE_REPLACE_UCWORDS_';
+ $this->modele_path = $conf->modele_path;
- $this->replace_seotag = $seotag;
- $this->replace = $name;
- $this->REPLACE = strtoupper($name);
- $this->Replace = ucwords($name);
- $level = 'stable';
+ $this->allsearch=array(
+'_DATATYPE_REPLACE_SEOTAG_',
+'_DATATYPE_REPLACE_MAJ_',
+'_DATATYPE_REPLACE_UCWORDS_',
+'_DATATYPE_REPLACE_'
+);
+ $this->allreplace=array(
+$conf->seotag,
+strtoupper($conf->name),
+ucwords($conf->name),
+$conf->name
+);
- $this->folder = $curent .'/'. $this->REPLACE.'_'.$level.'/';
+
+echo $this->folder = $conf->curent .'/'. strtoupper($conf->name).'_'.$conf->level.'/';
+
if(!file_exists($this->folder) || !is_dir($this->folder)) {
mkdir($this->folder);
}
-
-
- echo $row;
-
$this->process();
// }
@@ -58,16 +69,16 @@
// )
if(is_dir($path_mod.$row)) {
- mkdir( $this->replace($this->folder . $current. $row) );
+ mkdir( $this->stringreplace($this->folder . $current. $row) );
$this->process($current.$row);
}
else {
$res=file_get_contents($path_mod.$row);
- $file_contents = $this->replace($res);
+ $file_contents = $this->stringreplace($res);
- $fp = fopen( $this->replace($this->folder . $current. $row) , 'w');
+ $fp = fopen( $this->stringreplace($this->folder . $current. $row) , 'w');
fputs($fp, $file_contents);
fclose($fp);
}
@@ -75,11 +86,11 @@
}
- function replace($string){
+ function stringreplace($string){
// var_dump($string);
return str_replace(
- array( $this->search_seotag, $this->SEARCH,$this->Search, $this->search ),
- array( $this->replace_seotag , $this->REPLACE,$this->Replace, $this->replace),
+ $this->allsearch ,
+ $this->allreplace,
$string);
}
Modified: trunk/dev/datatype/generat.php
===================================================================
--- trunk/dev/datatype/generat.php 2012-04-05 10:02:10 UTC (rev 4154)
+++ trunk/dev/datatype/generat.php 2012-04-05 14:34:43 UTC (rev 4155)
@@ -1,9 +1,9 @@
<?php
/**
- @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 21/08/11, 09:40
+ @date 05/04/2012, 09:40
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -29,6 +29,9 @@
+/**
+
+*/
@@ -36,14 +39,18 @@
-
if(isset($_GET['name']) && !empty($_GET['name'])){
- $name = tep_db_prepare_input($_GET['name']);
- $seotag = tep_db_prepare_input($_GET['seotag']);
- $head_tag = tep_db_prepare_input($_GET['head_tag']);
+ $conf = new stdClass();
+ $conf->curent = $curent;
+ $conf->name = tep_db_prepare_input($_GET['name']);
+ $conf->seotag = tep_db_prepare_input($_GET['seotag']);
+ $conf->head_tag = false;
+ $conf->level = 'stable';
+ $conf->modele_path = $curent . '/Modele/';
- $object = new CreateDataType($curent, $name, $seotag, $head_tag);
+ $object = new CreateDataType($conf);
+
}
?>
@@ -52,21 +59,32 @@
<h2>Creation of a new datatype extension coupled with the categories</h2>
<form>
+<p>
+<?php
+// $arrReturn = array();
+// // Scan directory
+// foreach (scandir($strFolder) as $strFile) {
+// if ($strFile == '.' || $strFile == '..' && is_dir() ) continue;
+// $arrReturn[] = $strFile;
+// }
+?>
- <p>
- <label>Master name for datatype (this is string type for manipulate datatype)</label>
- <?php echo tep_draw_input_field('name', 'name') ?>
- </p>
+</p>
+<table>
+ <tr>
+ <td>Master name for datatype (this is string type for manipulate datatype)</td>
+ <td><?php echo tep_draw_input_field('name', 'name') ?>(string) full name (no special caratere)</td>
+ </tr>
- <p>
- <label>quick tag for rewrite</label>
- <?php echo tep_draw_input_field('seotag', 'seotag') ?>
- </p>
-
- <p>
+ <tr>
+ <td>quick tag for rewrite</label>
+ <td><?php echo tep_draw_input_field('seotag', 'seotag') ?>(string) quik key </td>
+ </tr>
+</table>
+<!-- <p>
<label>add head_tag</label>
<?php echo tep_draw_checkbox_field('head_tag', 'head_tag', 'active') ?>
- </p>
+ </p>-->
<p>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-04-05 10:02:21
|
Revision: 4154
http://oscss.svn.sourceforge.net/oscss/?rev=4154&view=rev
Author: oscim
Date: 2012-04-05 10:02:10 +0000 (Thu, 05 Apr 2012)
Log Message:
-----------
Suite dev generateur de datatype
Added Paths:
-----------
trunk/dev/datatype/Modele/catalog/admin/includes/gabarit/_DATATYPE_REPLACE_s/_DATATYPE_REPLACE_SEOTAG__description/
trunk/dev/datatype/Modele/catalog/admin/includes/gabarit/_DATATYPE_REPLACE_s/_DATATYPE_REPLACE_SEOTAG__description/display_edit.edit.gab
trunk/dev/datatype/Modele/catalog/admin/includes/languages/fr_FR/modules/_DATATYPE_REPLACE_/_DATATYPE_REPLACE_SEOTAG__description.txt
trunk/dev/datatype/Modele/catalog/admin/includes/modules/_DATATYPE_REPLACE_/_DATATYPE_REPLACE_SEOTAG__description.php
trunk/dev/datatype/Modele/catalog/includes/languages/fr_FR/modules/_DATATYPE_REPLACE_/_DATATYPE_REPLACE_SEOTAG__description.txt
trunk/dev/datatype/Modele/catalog/includes/modules/_DATATYPE_REPLACE_/_DATATYPE_REPLACE_SEOTAG__description.php
Added: trunk/dev/datatype/Modele/catalog/admin/includes/gabarit/_DATATYPE_REPLACE_s/_DATATYPE_REPLACE_SEOTAG__description/display_edit.edit.gab
===================================================================
--- trunk/dev/datatype/Modele/catalog/admin/includes/gabarit/_DATATYPE_REPLACE_s/_DATATYPE_REPLACE_SEOTAG__description/display_edit.edit.gab (rev 0)
+++ trunk/dev/datatype/Modele/catalog/admin/includes/gabarit/_DATATYPE_REPLACE_s/_DATATYPE_REPLACE_SEOTAG__description/display_edit.edit.gab 2012-04-05 10:02:10 UTC (rev 4154)
@@ -0,0 +1,48 @@
+<?php
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 04/03/2012, 21:54
+ @author genrated by dev/datatype/generat
+ @encode UTF-8
+ @class _DATATYPE_REPLACE_SEOTAG__description
+ @brief manage description _DATATYPE_REPLACE_
+*/
+global $oscss, $languages;
+?>
+<div class="tabs_lang">
+ <ul>
+ <?php for ($i=0, $n=sizeof($languages); $i<$n; $i++): ?>
+ <li>
+ <a href="#_DATATYPE_REPLACE__desc-<?php echo ($i+1) ?>" ><?php echo tep_language_image( $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . $languages[$i]['name'] ?></a>
+ </li>
+ <?php endfor; ?>
+ </ul>
+
+ <?php for ($i=0, $n=sizeof($languages); $i<$n; $i++): ?>
+ <div id="_DATATYPE_REPLACE__desc-<?php echo ($i+1) ?>">
+ <fieldset>
+ <legend><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . $languages[$i]['name'] ?></legend>
+
+
+ <p class="block_input large">
+ <label for="<?php echo '_DATATYPE_REPLACE_SEOTAG__description'.'__DATATYPE_REPLACE__chapo_' . $languages[$i]['id'] ?>">
+ <?php echo __('_DATATYPE_REPLACE_SEOTAG__description chapeaux').tep_image(DIR_WS_ICONS.'icon_help.gif', __('_DATATYPE_REPLACE_SEOTAG__description description rapide, utilisé dans les listing') ) ?>
+ </label>
+ <br />
+ <?php echo $oscss->_call(BO_WISIWYG_SELECTED,'_draw','_DATATYPE_REPLACE_SEOTAG__description' .'[_DATATYPE_REPLACE__chapo][' . $languages[$i]['id'] . ']','400','100',(isset(_DATATYPE_REPLACE_SEOTAG__description::$pInfo->_DATATYPE_REPLACE__chapo[$languages[$i]['id']]) ? unhtmlentities(_DATATYPE_REPLACE_SEOTAG__description::$pInfo->_DATATYPE_REPLACE__chapo[$languages[$i]['id']]) : '') ) ?>
+ </p>
+ <p class="block_input large">
+ <label for="<?php echo '_DATATYPE_REPLACE_SEOTAG__description' .'__DATATYPE_REPLACE__description_' . $languages[$i]['id'] ?>">
+ <?php echo __('_DATATYPE_REPLACE_SEOTAG__description description principale').tep_image(DIR_WS_ICONS.'icon_help.gif', __('_DATATYPE_REPLACE_SEOTAG__description description longue affiche uniquement sur la page')) ?>
+ </label>
+ <br />
+ <?php echo $oscss->_call(BO_WISIWYG_SELECTED,'_draw','_DATATYPE_REPLACE_SEOTAG__description' .'[_DATATYPE_REPLACE__description][' . $languages[$i]['id'] . ']','400','100',(isset(_DATATYPE_REPLACE_SEOTAG__description::$pInfo->_DATATYPE_REPLACE__description[$languages[$i]['id']]) ? unhtmlentities(_DATATYPE_REPLACE_SEOTAG__description::$pInfo->_DATATYPE_REPLACE__description[$languages[$i]['id']]) : '') ) ?>
+ </p>
+
+ </fieldset>
+ </div>
+ <?php endfor; ?>
+</div>
Added: trunk/dev/datatype/Modele/catalog/admin/includes/languages/fr_FR/modules/_DATATYPE_REPLACE_/_DATATYPE_REPLACE_SEOTAG__description.txt
===================================================================
--- trunk/dev/datatype/Modele/catalog/admin/includes/languages/fr_FR/modules/_DATATYPE_REPLACE_/_DATATYPE_REPLACE_SEOTAG__description.txt (rev 0)
+++ trunk/dev/datatype/Modele/catalog/admin/includes/languages/fr_FR/modules/_DATATYPE_REPLACE_/_DATATYPE_REPLACE_SEOTAG__description.txt 2012-04-05 10:02:10 UTC (rev 4154)
@@ -0,0 +1,22 @@
+<?php
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 04/03/2012, 21:54
+ @author genrated by dev/datatype/generat
+ @encode UTF-8
+ @class _DATATYPE_REPLACE_SEOTAG__description
+ @brief manage description _DATATYPE_REPLACE_
+*/
+$lang['_DATATYPE_REPLACE_SEOTAG__description heading title']="title _DATATYPE_REPLACE_" ;
+$lang['_DATATYPE_REPLACE_SEOTAG__description heading description']="Description _DATATYPE_REPLACE_" ;
+$lang['_DATATYPE_REPLACE_SEOTAG__description description simple des _DATATYPE_REPLACE_s avec chapeau']="Description simple des _DATATYPE_REPLACE_s avec chapeau" ;
+$lang['_DATATYPE_REPLACE_SEOTAG__description description']="Description" ;
+$lang['_DATATYPE_REPLACE_SEOTAG__description chapeaux']="Chapeaux" ;
+$lang['_DATATYPE_REPLACE_SEOTAG__description description rapide, utilise dans les listing']="description rapide, utilisée dans les listing" ;
+$lang['_DATATYPE_REPLACE_SEOTAG__description description longue affiche uniquement sur la page _DATATYPE_REPLACE_']="Description longue affichée uniquement sur la page _DATATYPE_REPLACE_" ;
+$lang['_DATATYPE_REPLACE_SEOTAG__description enregistrer votre _DATATYPE_REPLACE_ pour acceder à ces options ']="enregistrer votre _DATATYPE_REPLACE_ pour accéder à ces options " ;
+$lang['_DATATYPE_REPLACE_SEOTAG__description description principale']="Description principale " ;
+// ?>
\ No newline at end of file
Added: trunk/dev/datatype/Modele/catalog/admin/includes/modules/_DATATYPE_REPLACE_/_DATATYPE_REPLACE_SEOTAG__description.php
===================================================================
--- trunk/dev/datatype/Modele/catalog/admin/includes/modules/_DATATYPE_REPLACE_/_DATATYPE_REPLACE_SEOTAG__description.php (rev 0)
+++ trunk/dev/datatype/Modele/catalog/admin/includes/modules/_DATATYPE_REPLACE_/_DATATYPE_REPLACE_SEOTAG__description.php 2012-04-05 10:02:10 UTC (rev 4154)
@@ -0,0 +1,160 @@
+<?php
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 04/03/2012, 21:54
+ @author genrated by dev/datatype/generat
+ @encode UTF-8
+ @class _DATATYPE_REPLACE_SEOTAG__description
+ @brief manage description _DATATYPE_REPLACE_
+*/
+
+class _DATATYPE_REPLACE_SEOTAG__description
+ implements InterfaceModule{
+ /**
+ @var current string name
+ */
+ public $code;
+ /**
+ @var Datatype master
+ */
+ public $type;
+ /**
+ @var object info current data
+ */
+ public $title;
+ /**
+ @var object info current data
+ */
+ public $description;
+ /**
+ @var object info current data
+ */
+ public $sort_order;
+ /**
+ @var object info current data
+ */
+ public static $pInfo;
+ /**
+ @var array info post data
+ */
+ public static $pArray;
+ /**
+ @var boolean true/false
+ */
+ public $enabled;
+
+ /**
+ @brief class constructor
+ */
+ function _DATATYPE_REPLACE_SEOTAG__description() {
+ $this->code = '_DATATYPE_REPLACE_SEOTAG__description';
+ $this->type ='_DATATYPE_REPLACE_';
+ $this->title = __('_DATATYPE_REPLACE_SEOTAG__description heading title');
+ $this->description = __('_DATATYPE_REPLACE_SEOTAG__description heading description');
+ $this->sort_order = (defined('MODULE__DATATYPE_REPLACE_MAJ_DESCRIPTION_SORT_ORDER'))?MODULE__DATATYPE_REPLACE_MAJ_DESCRIPTION_SORT_ORDER : 0;
+ $this->enabled = true;
+
+ self::$pInfo= new objectInfo (array());
+
+ global $languages_id;
+ $this->language_id = $languages_id;
+ }
+
+ /**
+ */
+ public function check_action($actions){
+ global $oscss;
+ $languages = tep_get_languages();
+ $oscss->_add_ext(BO_WISIWYG_SELECTED,'editeur/');
+ $nam='';
+ for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
+ $nam .= $this->code .'[_DATATYPE_REPLACE__chapo][' . $languages[$i]['id'] . '],'.$this->code .'[_DATATYPE_REPLACE__description][' . $languages[$i]['id'] . '],';
+ }
+
+ echo $oscss->_call(BO_WISIWYG_SELECTED,'_top',substr($nam,0, strlen($nam)-1),'400','100');
+
+ return $actions;
+ }
+
+ /**
+ @brief Edition produit
+ UP db
+ */
+ function insert_table__DATATYPE_REPLACE__description ($language_id) {
+ $myarray=array(
+ '_DATATYPE_REPLACE__description' => self::$pArray['_DATATYPE_REPLACE__description'][$language_id],
+ '_DATATYPE_REPLACE__chapo' => self::$pArray['_DATATYPE_REPLACE__chapo'][$language_id],
+// '_DATATYPE_REPLACE__url' => self::$pArray['_DATATYPE_REPLACE__url'][$language_id]
+ );
+ return $myarray;
+ }
+
+ /**
+ @brief Edition produit
+ UP db
+ */
+ function update_table__DATATYPE_REPLACE__description ($language_id) {
+ $myarray= $this->insert_table__DATATYPE_REPLACE__description ($language_id);
+ return $myarray;
+ }
+
+ /**
+ @brief Edition/affichage produit
+ UP db
+ */
+ function load_db_values ($_DATATYPE_REPLACE__id) {
+ $languages = tep_get_languages();
+ $DB=Database::getInstance();
+ $arr ['_DATATYPE_REPLACE__id'] = $_DATATYPE_REPLACE__id;
+ for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
+ $languages_id = $languages[$i]['id'];
+ $product_query = $DB->query("SELECT pd._DATATYPE_REPLACE__description,pd._DATATYPE_REPLACE__chapo FROM " . TABLE__DATATYPE_REPLACE_MAJ__DESCRIPTION . " pd WHERE pd._DATATYPE_REPLACE__id = '" . (int)$_DATATYPE_REPLACE__id . "' and pd.language_id = '" . (int)$languages_id . "'");
+ $product = $product_query->fetchAssoc();
+ $arr ['_DATATYPE_REPLACE__description'][$languages_id]=tep_output_string_protected($product['_DATATYPE_REPLACE__description'], false, true);
+ $arr ['_DATATYPE_REPLACE__chapo'][$languages_id]=tep_output_string_protected($product['_DATATYPE_REPLACE__chapo'], false, true);
+// $arr ['_DATATYPE_REPLACE__url'][$languages_id]=tep_output_string_protected($product['_DATATYPE_REPLACE__url'], false, true);
+ }
+
+ self::$pInfo->objectInfo($arr);
+ }
+
+ /**
+ @brief The $post contains only post values for this module pInfo is an array: [field name][language id]=value
+ */
+ function load_post_values ($post) {
+ self::$pArray=$post;
+ }
+
+
+ /**
+ */
+ function display_edit(&$contents, $product_id) {
+ global $oscss;
+ $languages = tep_get_languages();
+
+ if(empty($product_id)) $m=__('enregistrer votre produit pour acceder à ces options ');
+ else {
+ /// use master gabarit
+ $m= MGabCont::CallGab('edit',__FUNCTION__,'_DATATYPE_REPLACE_/'.__CLASS__);
+ }
+ $contents []=array('title'=> __('Description') ,'text'=> $m);
+ }
+
+/** Fonction complementaire utilisé dans la page produits */
+
+
+
+/** Force implements InterfaceModule class to define this method */
+
+ function check() { return false; }
+ function install() { return false; }
+ function remove() { return false; }
+ function keys() {
+ return array('MODULE__DATATYPE_REPLACE_MAJ_DESCRIPTION_SORT_ORDER');
+ }
+
+}
+?>
\ No newline at end of file
Added: trunk/dev/datatype/Modele/catalog/includes/languages/fr_FR/modules/_DATATYPE_REPLACE_/_DATATYPE_REPLACE_SEOTAG__description.txt
===================================================================
--- trunk/dev/datatype/Modele/catalog/includes/languages/fr_FR/modules/_DATATYPE_REPLACE_/_DATATYPE_REPLACE_SEOTAG__description.txt (rev 0)
+++ trunk/dev/datatype/Modele/catalog/includes/languages/fr_FR/modules/_DATATYPE_REPLACE_/_DATATYPE_REPLACE_SEOTAG__description.txt 2012-04-05 10:02:10 UTC (rev 4154)
@@ -0,0 +1,17 @@
+<?php
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 04/03/2012, 21:54
+ @author genrated by dev/datatype/generat
+ @encode UTF-8
+ @class _DATATYPE_REPLACE_SEOTAG__description
+ @brief manage description _DATATYPE_REPLACE_
+*/
+$lang['_DATATYPE_REPLACE_SEOTAG__description heading title'] ="Lien Description " ;
+$lang['_DATATYPE_REPLACE_SEOTAG__description heading decsription'] ="Description d'un produit " ;
+$lang['tab _DATATYPE_REPLACE_ desc base'] ="Description" ;
+
+?>
\ No newline at end of file
Added: trunk/dev/datatype/Modele/catalog/includes/modules/_DATATYPE_REPLACE_/_DATATYPE_REPLACE_SEOTAG__description.php
===================================================================
--- trunk/dev/datatype/Modele/catalog/includes/modules/_DATATYPE_REPLACE_/_DATATYPE_REPLACE_SEOTAG__description.php (rev 0)
+++ trunk/dev/datatype/Modele/catalog/includes/modules/_DATATYPE_REPLACE_/_DATATYPE_REPLACE_SEOTAG__description.php 2012-04-05 10:02:10 UTC (rev 4154)
@@ -0,0 +1,99 @@
+<?php
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 04/03/2012, 21:54
+ @author genrated by dev/datatype/generat
+ @encode UTF-8
+ @class _DATATYPE_REPLACE_SEOTAG__description
+ @brief manage description _DATATYPE_REPLACE_
+*/
+
+
+class _DATATYPE_REPLACE_SEOTAG__description
+ extends AbstractProduct
+ implements InterfaceModule {
+
+ /**
+ @var access in .gab
+ */
+ public static $_DATATYPE_REPLACE__description;
+ /**
+ @var access in .gab
+ */
+ public static $_DATATYPE_REPLACE__chapo;
+
+ /**
+ * \fn __construct($page='')
+ * @param $page
+ */
+ function __construct($page=''){
+ global $page;
+ $this->code = __CLASS__;
+ $this->type ='_DATATYPE_REPLACE_';
+ $this->title = __('_DATATYPE_REPLACE_SEOTAG__description heading title');
+ $this->description = __('_DATATYPE_REPLACE_SEOTAG__description heading description');
+ $this->sort_order = (defined('MODULE__DATATYPE_REPLACE_MAJ_DESCRIPTION_SORT_ORDER'))?MODULE__DATATYPE_REPLACE_MAJ_DESCRIPTION_SORT_ORDER : 0;
+ $this->enabled = true;
+
+ if(!is_object($page)) return null;
+ $this->language_id=$page->the_var('languages_id');
+ }
+
+ /**
+ * \fn get_header($action='')
+ * @param $action
+ */
+ function get_header($action=''){
+ global $page;
+ $this->pID=(int)$_GET['_DATATYPE_REPLACE__id'];
+ $this->load_db_values((int)$this->pID);
+ //! calcu des images présente et ajout dans la pile des produits
+ $c=explode('<img',$this->content['_DATATYPE_REPLACE__description']);
+ foreach($c as $l){
+ if( (preg_match_all('/src=.([a-zA-Z0-9.:\/_-]*)/i', strip_tags($l) , $match)) !=false){
+ $lg=strlen(HTTP_SERVER.DIR_WS_CATALOG.DIR_WS_IMAGES);
+ $img=substr($match[1][0], ( (substr($match[1][0],0, $lg)==HTTP_SERVER.DIR_WS_CATALOG.DIR_WS_IMAGES) ? $lg :strlen(DIR_WS_IMAGES) ) );
+ if(!in_array( $img,$page->_DATATYPE_REPLACE_->pile_img)) $page->_DATATYPE_REPLACE_->pile_img[]=$img;
+ }
+ }
+ }
+
+ /**
+ * \fn load_db_values($ID)
+ * \brief load db for id
+ * @param unknown_type $ID
+ */
+ public function load_db_values($ID){
+ $DB=Database::getInstance();
+ $_DATATYPE_REPLACE__query = $DB->query("select pd._DATATYPE_REPLACE__id, pd.language_id, pd._DATATYPE_REPLACE__name , pd._DATATYPE_REPLACE__description, _DATATYPE_REPLACE__chapo from " . TABLE_PRODUCTS_DESCRIPTION . " pd where pd._DATATYPE_REPLACE__id= '" . $ID . "' and language_id='".$this->language_id."' ");
+ $this->content=$_DATATYPE_REPLACE__query->fetchAssoc();
+
+ self::$_DATATYPE_REPLACE__description= $this->content['_DATATYPE_REPLACE__description'];
+ self::$_DATATYPE_REPLACE__chapo= $this->content['_DATATYPE_REPLACE__chapo'];
+ }
+
+ /**
+ * \brief display
+ * @param $ID int _DATATYPE_REPLACE_ id
+ * @param $class null
+ */
+ public function display_view($ID,$class=''){
+ $this->load_db_values((int)$ID);
+
+ $v=$this->content;
+ $v['title']=__('tab _DATATYPE_REPLACE_ desc base');
+ $v['content']=tep_output_string_protected(tep_get_include_contents(__CLASS__.'.'.__FUNCTION__), false, true);
+
+ return array(new objectInfo($v));
+ }
+
+/** implements InterfaceModule depend */
+ public function check() {}
+ public function install() {}
+ public function remove() {}
+ public function keys() {}
+}
+?>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-04-05 09:59:42
|
Revision: 4153
http://oscss.svn.sourceforge.net/oscss/?rev=4153&view=rev
Author: oscim
Date: 2012-04-05 09:59:32 +0000 (Thu, 05 Apr 2012)
Log Message:
-----------
Suite correction gestion unifi?\195?\169 des Datatype
Suite normalisation des nom de function dans les classes de datatype
Ajout elements suite dans le generateur de datatype (dev)
correction coquille diverse
Modified Paths:
--------------
trunk/catalog/common/classes/DataTypes.php
trunk/catalog/common/classes/datatype_drivers/Data_categorie.php
trunk/catalog/common/classes/datatype_drivers/Data_product.php
trunk/catalog/includes/classes/category_tree.php
trunk/catalog/includes/classes/drivers/data/categorie.php
trunk/catalog/includes/classes/drivers/data/product.php
trunk/catalog/index.php
trunk/catalog/install/includes/sql/mysql/data/40_osc_categories.sql
trunk/dev/datatype/Modele/catalog/common/classes/datatype_drivers/Data__DATATYPE_REPLACE_.php
trunk/dev/datatype/Modele/catalog/includes/classes/drivers/data/_DATATYPE_REPLACE_.php
trunk/dev/datatype/Modele/readme
trunk/dev/datatype/class.CreateDataType.php
trunk/dev/datatype/generat.php
Modified: trunk/catalog/common/classes/DataTypes.php
===================================================================
--- trunk/catalog/common/classes/DataTypes.php 2012-04-05 07:22:23 UTC (rev 4152)
+++ trunk/catalog/common/classes/DataTypes.php 2012-04-05 09:59:32 UTC (rev 4153)
@@ -193,10 +193,10 @@
/**
@brief Get regle anchors in childs module for seo class
@note fontoffice use
- @param $anchor
- @param $substype
- @param $id
- @param $language_id
+ @param $anchor string
+ @param $substype string
+ @param $id int
+ @param $language_id int
*/
public static function Getseoquery($anchor, $substype='', $id, $language_id){
self::getInstance();
@@ -334,7 +334,8 @@
// && ( $module->DataType == $type )
){
- $module->FO_load_listing($type, self::$env->modlist['Data_'.$type]);
+ /*if( ! */$module->FO_load_listing($type, self::$env->modlist['Data_'.$type]);/* )*/
+// return false;
$module->FO_load_page($mode);
}
Modified: trunk/catalog/common/classes/datatype_drivers/Data_categorie.php
===================================================================
--- trunk/catalog/common/classes/datatype_drivers/Data_categorie.php 2012-04-05 07:22:23 UTC (rev 4152)
+++ trunk/catalog/common/classes/datatype_drivers/Data_categorie.php 2012-04-05 09:59:32 UTC (rev 4153)
@@ -49,7 +49,7 @@
@var DataType root listing
Use for generate listing based on current data type precised in array
*/
- public $RootListing = array('annuaire', 'product', 'content', 'nested');
+ public $RootListing = array('annonces', 'product', 'content', 'nested');
/**
@@ -103,7 +103,7 @@
foreach($this->RootListing as $row){
- if(in_array($row, explode(',', $categories->datatype) ) && class_exists($row) ){
+ if(!empty($categories->datatype) && in_array($row, explode(',', $categories->datatype) ) && class_exists($row) ){
$count_c=$row::get_count_in_category((int)$current_category_id);
if ($count_c > 0 ){
@@ -112,25 +112,22 @@
DataTypes::ForceChilds($this->DataType, $childs_type);
break;
}
- else
- continue;
-// $category_depth = 'empty';
+ else
+ $category_depth = 'empty';
+
}
elseif( empty($categories->datatype) ){
$count_p=product::get_count_in_category((int)$current_category_id);
if ($count_p > 0 ){
- $category_depth = 'products';
+ $category_depth = 'product';
$childs_type = 'product';
DataTypes::ForceChilds($this->DataType, $childs_type);
}
else
continue;
-// $category_depth = 'empty';
}
else
- $category_depth = 'empty';
-// else
-// $category_depth = 'nofound';
+ $category_depth = 'error';
}
}
@@ -247,7 +244,6 @@
$category_depth = $page->GetVar('category_depth');
$this->ChildsType = $type;
-
/**
@remarks define all var for exec listing + split_page
sql Select , but no order
@@ -258,22 +254,21 @@
$this->listing_col_count
*/
- $sql_tmp = $subtype->listing_sql;
+ $sql_tmp = $subtype->listing_sql;
- $this->listing_sql =
- "SELECT DISTINCT ". $sql_tmp['col_count'] ." ".
- $sql_tmp['tables'] .
- " LEFT JOIN " . constant(strtoupper('TABLE_'.$type.'_TO_CATEGORIES')) . " ".$subtype->p."2c ON(".$subtype->p.".". $sql_tmp['base_key'] ." = ".$subtype->p."2c.". $sql_tmp['base_key'] ." ) ".
- " LEFT JOIN " . TABLE_CATEGORIES . " cat ON(cat.categories_id=".$subtype->p."2c.categories_id AND cat.categories_status='1') ".
- $sql_tmp['where'] .
- "";
- $this->listing_sort = $sql_tmp['sort'] ;
- $this->listing_col_count = $sql_tmp['col_count'] ;
+ if(!is_array($sql_tmp))
+ return 'empty';
+ $this->listing_sql =
+ "SELECT DISTINCT ". $sql_tmp['col_count'] ." ".
+ $sql_tmp['tables'] .
+ " LEFT JOIN " . constant(strtoupper('TABLE_'.$type.'_TO_CATEGORIES')) . " ".$subtype->p."2c ON(".$subtype->p.".". $sql_tmp['base_key'] ." = ".$subtype->p."2c.". $sql_tmp['base_key'] ." ) ".
+ " LEFT JOIN " . TABLE_CATEGORIES . " cat ON(cat.categories_id=".$subtype->p."2c.categories_id AND cat.categories_status='1') ".
+ $sql_tmp['where'] .
+ "";
+ $this->listing_sort = $sql_tmp['sort'] ;
+ $this->listing_col_count = $sql_tmp['col_count'] ;
-
-
-
if($category_depth == 'nested'){
$this->listing_sql .= (tep_not_null($list)? " AND ".$subtype->p."2c.categories_id IN (" . $list . ")" : '');
$this->listing_sort = " cat.sort_order, ". $this->listing_sort ;
@@ -284,14 +279,14 @@
}
/**
- @brief calcul du cpath specifique a ce tyep de donnée
+ @brief calcul du cpath specifique a ce type de donnée
*/
public function FO_load_page($mode='unique'){
global $page_content, $language, $cPath;
$page = page::getInstance();
$DB=Database::getInstance();
-
+// var_dump($current_category_id);
switch(strtolower($mode)){
case 'transversal':
case 'listing':
@@ -299,6 +294,7 @@
$category_depth = $page->GetVar('category_depth');
$current_category_id = $page->GetVar('current_category_id');
+// var_dump($current_category_id);
//! Recup des element cat en cours
categorie::resetCacheId((int)$current_category_id);
Modified: trunk/catalog/common/classes/datatype_drivers/Data_product.php
===================================================================
--- trunk/catalog/common/classes/datatype_drivers/Data_product.php 2012-04-05 07:22:23 UTC (rev 4152)
+++ trunk/catalog/common/classes/datatype_drivers/Data_product.php 2012-04-05 09:59:32 UTC (rev 4153)
@@ -168,7 +168,7 @@
$list = explode('_',$result['categories_cpath']);
foreach($list as $row )
- $path .= DataTypes::Getseoquery('c', '', $languages_id).'-';
+ $path .= DataTypes::Getseoquery('c', '',$row, $languages_id).'-';
}
$result['path']= $path . ((isset($result['url']) && !empty($result['url']) )? $result['url'] : $result['tName']) ;
Modified: trunk/catalog/includes/classes/category_tree.php
===================================================================
--- trunk/catalog/includes/classes/category_tree.php 2012-04-05 07:22:23 UTC (rev 4152)
+++ trunk/catalog/includes/classes/category_tree.php 2012-04-05 09:59:32 UTC (rev 4153)
@@ -53,19 +53,21 @@
function __construct() {
global $languages_id, $osCSS_Cache , $language;
- if (_cst_bool('SHOW_COUNTS')) $this->show_category_product_count = true;
+// if (_cst_bool('SHOW_COUNTS')) $this->show_category_product_count = true;
if ($osCSS_Cache->read('category_tree-' . $language.'-type', 720)) {
$this->data = $osCSS_Cache->getCache();
- } else {
+ }
+ else {
$this->data = array();
- categorie::add_where_query(" and c.categories_hidden='1' ");
- $list = categorie::get_query('','','',array('limit'=>0));
- foreach($list as $categories)
+ categorie::add_where_query(" and c.categories_hidden='1' ");
+ $list = categorie::get_query('','','',array('limit'=>0));
+
+ foreach($list as $categories)
if( (bool)$categories->status) $this->data[$categories->parent_id][$categories->categories_id] = array('href' => $categories->href, 'name' => $categories->categories_name, 'count' => 0);
- if ($this->show_category_product_count === true) $this->calculateCategoryProductCount();
+// if ($this->show_category_product_count === true) $this->calculateCategoryProductCount();
$osCSS_Cache->writeBuffer($this->data);
}
@@ -113,8 +115,8 @@
} else
$result .= (!_cst_bool('NOT_RECUP_CASSE_IN_TXT_CATEGORIES'))? strtolower($category['name']) : $category['name'];
- if ($this->show_category_product_count === true)
- $result .= $this->category_product_count_start_string . $category['count'] . $this->category_product_count_end_string;
+// if ($this->show_category_product_count === true)
+// $result .= $this->category_product_count_start_string . $category['count'] . $this->category_product_count_end_string;
$result .= '</a>';
@@ -219,31 +221,31 @@
return $this->buildBranchArray((empty($parent_id) ? $this->root_category_id : $parent_id));
}
- function calculateCategoryProductCount() {
- foreach ($this->data as $parent => $categories) {
- foreach ($categories as $id => $info) {
- $this->data[$parent][$id]['count'] = categorie::get_count_products_in_category($id);
- $cp=0;
- $parent_category = $parent;
- while ($parent_category != $this->root_category_id) {
- foreach ($this->data as $parent_parent => $parent_categories) {
- foreach ($parent_categories as $parent_category_id => $parent_category_info) {
- if ($parent_category_id == $parent_category) {
- $this->data[$parent_parent][$parent_category_id]['count'] += $this->data[$parent][$id]['count'];
+// function calculateCategoryProductCount() {
+// foreach ($this->data as $parent => $categories) {
+// foreach ($categories as $id => $info) {
+// $this->data[$parent][$id]['count'] = 1; // categorie::get_count_products_in_category($id);
+// $cp=0;
+// $parent_category = $parent;
+// while ($parent_category != $this->root_category_id) {
+// foreach ($this->data as $parent_parent => $parent_categories) {
+// foreach ($parent_categories as $parent_category_id => $parent_category_info) {
+// if ($parent_category_id == $parent_category) {
+// $this->data[$parent_parent][$parent_category_id]['count'] += $this->data[$parent][$id]['count'];
+//
+// $parent_category = $parent_parent;
+// break 2;
+// }
+// if($cp>100)break;
+// $cp++;
+// }
+// }
+// }
+// }
+// }
+// }
- $parent_category = $parent_parent;
- break 2;
- }
- if($cp>100)break;
- $cp++;
- }
- }
- }
- }
- }
- }
-
/**
* \fn setRootCategoryID($root_category_id)
* @param $root_category_id int
Modified: trunk/catalog/includes/classes/drivers/data/categorie.php
===================================================================
--- trunk/catalog/includes/classes/drivers/data/categorie.php 2012-04-05 07:22:23 UTC (rev 4152)
+++ trunk/catalog/includes/classes/drivers/data/categorie.php 2012-04-05 09:59:32 UTC (rev 4153)
@@ -51,8 +51,8 @@
Data function
*/
public static function get_path($current_category_id = '',$value=false){ return categorieData::get_path($current_category_id,$value); }
- 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_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_subcategories(&$subcategories_array, $parent_id = 0){ return categorieData::get_subcategories($subcategories_array, $parent_id); }
@@ -116,6 +116,7 @@
while ($content = $content_query->fetchAssoc()) {
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)) {
+// print_r($content);
$res=$content;
$res['href']=tep_href_link(FILENAME_DEFAULT,'cPath=' . $content['categories_id'] );
$res['key']=$content['categories_id'];
@@ -123,7 +124,7 @@
$res['id']=$content['categories_id'];
$res['title']=$content['categories_name'];
$res['name']=$content['categories_name'];
- $res['status']=self::countChidlsAll($content['categories_id']);
+ $res['status']=self::countChidlsAll($content['categories_id'], $content['categories_datatype'], $content['categories_status']);
$res=categorie::get_option_data($res);
self::$object_data[$content['categories_id']]=$tabl[$content['categories_id']]=new objectInfo($res);
@@ -154,7 +155,7 @@
* @param $option
*/
protected static function cstr_query($orderby='', $limit='', $option=''){
- $query="SELECT c.categories_id, parent_id, cd.categories_description, c.categories_image, cd.categories_name,c.categories_datatype, sortchids , sortchids_datatype FROM
+ $query="SELECT c.categories_id, parent_id, cd.categories_description, c.categories_image, cd.categories_name,c.categories_datatype, sortchids , sortchids_datatype, categories_status, categories_hidden FROM
" . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd WHERE " . DataForceStatus(" c.categories_status='1' AND ") . " c.categories_id = cd.categories_id AND cd.language_id = '" .
self::$lg_id . "' ";
@@ -239,97 +240,25 @@
/**
@brief Adjust status active by childs item
+ @param $category_id int current id
+ @param $datatype string name childs class datatype
+ @param $status int value status current categorie
*/
- 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 ".
- // " 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);
+ private static function countChidlsAll($category_id, $datatype, $status=1){
+ $count_c = 0;
+ if($status ==0)
+ return 0;
- if($products_query->__get('numRows')>0 ) {
- $products = $products_query->fetchAssoc();
- return $products['total'];
- }
- else return 0;
- }
+ if(class_exists($datatype))
+ $count_c=$datatype::get_count_in_category((int)$category_id);
- /**
- * \brief Return the number of products and category child in a category
- // TABLES: products, products_to_categories, categories
- */
-// public static function get_count_products_in_category($category_id, $include_inactive = false) {
-//
-// // if(isset(self::$object_data[$category_id]->count_products)) return self::$object_data[$category_id]->count_products;
-//
-// $products_count = 0;
-// $DB=Database::getInstance();
-// if ($include_inactive == true) {
-// $products_query = $DB->query("select count(p.products_id) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = p2c.products_id and p2c.categories_id = '" . (int)$category_id . "'");
-// } else {
-// $products_query = $DB->query("select count(p.products_id) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = p2c.products_id and p.products_status = '1' and p2c.categories_id = '" .(int) $category_id . "' ");
-// }
-// if($products_query->__get('numRows')>0 ) $products = $products_query->fetchAssoc();
-// else $products['total']= 0;
-// $products_count += $products['total'];
-//
-// if(!isset(self::$object_data[$category_id]) && !self::get_item($category_id)) return false;
-// self::$object_data[$category_id]->count_products=(int)$products_count;
-//
-// self::add_where_query(" AND parent_id = '" . (int)$category_id . "' ");
-// $db_list=self::get_query('','','',array('limit'=>'30'));
-//
-// foreach($db_list as $cat)
-// if($cat->key !=(int)$category_id && (int)$category_id ==$cat->parent_id) {
-// $products_count +=(isset($cat->count_products) ? $cat->count_products : self::get_count_products_in_category($cat->categories_id) );
-// }
-//
-// return $products_count;
-// }
+ return (($count_c >0 )? 1 : 0);
+ }
/**
- * \brief Return the number of products and category child in a category
- // TABLES: products, products_to_categories, categories
- */
-// public static function get_count_content_in_category($category_id) {
-// $products_count = 0;
-// $DB=Database::getInstance();
-//
-// $products_query = $DB->query("select count(c.content_id) as total from " . TABLE_CONTENT . " c , " . TABLE_CONTENT_TO_CATEGORIES . " c2c where c.content_id = c2c.content_id and c2c.categories_id = '" . (int)$category_id . "' and c.content_status='1' ");
-//
-// if($products_query->__get('numRows')>0 ) $products = $products_query->fetchAssoc();
-// else $products['total']= 0;
-// $products_count += $products['total'];
-//
-// if(!isset(self::$object_data[$category_id]) && !self::get_item($category_id)) return false;
-// self::$object_data[$category_id]->count_products=(int)$products_count;
-//
-// self::add_where_query(" AND parent_id = '" . (int)$category_id . "' ");
-// $db_list=self::get_query('','','',array('limit'=>'30'));
-//
-// foreach($db_list as $cat)
-// if($cat->key !=(int)$category_id && (int)$category_id ==$cat->parent_id) {
-// $products_count +=(isset($cat->count_products) ? $cat->count_products : self::get_count_products_in_category($cat->categories_id) );
-// }
-//
-// return $products_count;
-// }
-
- /**
* \brief Return false if not the category has subcategories or nbr category
*/
public static function get_has_category_subcategories($category_id) {
@@ -339,7 +268,6 @@
if (($count=count($db_list)) && $count > 0) return $count;
else return 0;
-
}
/**
@@ -358,22 +286,11 @@
$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)) {
-// if ($parent_categories['parent_id'] == 0) return true;
-// $categories[sizeof($categories)] = $parent_categories['parent_id'];
-// if ($parent_categories['parent_id'] != $categories_id) {
-// self::tep_get_parent_categories($categories, $parent_categories['parent_id']);
-// }
-// }
-
}
/**
Modified: trunk/catalog/includes/classes/drivers/data/product.php
===================================================================
--- trunk/catalog/includes/classes/drivers/data/product.php 2012-04-05 07:22:23 UTC (rev 4152)
+++ trunk/catalog/includes/classes/drivers/data/product.php 2012-04-05 09:59:32 UTC (rev 4153)
@@ -613,32 +613,31 @@
return self::$array_data[$products_id]->products_attribute_stock[$uprid] = 0;
}
-
+ /**
+ @brief Calculate childs this type in categorie
+ @param $category_id int current id
+ @param $include_inactive boolean not include data status off
+ */
public static function count_in_category($category_id, $include_inactive = false) {
$products_count = 0;
$DB=Database::getInstance();
- if ($include_inactive == true) {
- $products_query = $DB->query("select count(p.products_id) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = p2c.products_id and
- p2c.categories_id = '" . (int)$category_id . "'");
- } else {
- $products_query = $DB->query("select count(p.products_id) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = p2c.products_id and
- p.products_status = '1' and p2c.categories_id = '" .(int) $category_id . "' ");
- }
- if($products_query->__get('numRows')>0 ) $products = $products_query->fetchAssoc();
- else $products['total']= 0;
- $products_count += $products['total'];
-// if(!isset(self::$object_data[$category_id]) && !self::get_item($category_id)) return false;
-// self::$object_data[$category_id]->count_products=(int)$products_count;
-//
-// self::add_where_query(" AND parent_id = '" . (int)$category_id . "' ");
-// $db_list=self::get_query('','','',array('limit'=>'30'));
-//
-// foreach($db_list as $cat)
-// if($cat->key !=(int)$category_id && (int)$category_id ==$cat->parent_id) {
-// $products_count +=(isset($cat->count_products) ? $cat->count_products : self::count_products_in_category($cat->categories_id) );
-// }
+ $sql =" SELECT COUNT(p.products_id) as TOTAL ".
+ " FROM " . TABLE_PRODUCTS . " p , " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c ".
+ " LEFT JOIN ".TABLE_CATEGORIES." cat ON(cat.categories_id=p2c.categories_id AND categories_status > 0) ".
+ " WHERE p.products_id = p2c.products_id and ( cat.categories_id = '" . (int)$category_id . "' OR cat.parent_id= '" . (int)$category_id . "' OR cat.categories_cpath LIKE '%" . (int)$category_id . "%' ) ";
+ if (!$include_inactive)
+ $sql .=" AND p.products_status = '1' ";
+
+ $_query = $DB->query($sql);
+
+
+ if($_query->__get('numRows') >0 ) $result = $_query->fetchAssoc();
+ else $result['TOTAL']= 0;
+
+ $products_count += $result['TOTAL'];
+
return $products_count;
}
Modified: trunk/catalog/index.php
===================================================================
--- trunk/catalog/index.php 2012-04-05 07:22:23 UTC (rev 4152)
+++ trunk/catalog/index.php 2012-04-05 09:59:32 UTC (rev 4153)
@@ -63,9 +63,18 @@
elseif ( $page->GetVar('category_depth') == 'nofound') {
header("Status: 404 Not Found");
header("HTTP/1.0 301 Moved Permanently");
- tep_redirect(tep_href_link('','?ServerError=404'));
+ tep_redirect(tep_href_link('','ServerError=404'));
}
-
+ elseif ( $page->GetVar('category_depth') == 'empty') {
+ header("Status: 404 Not Found");
+ header("HTTP/1.0 301 Moved Permanently");
+ tep_redirect(tep_href_link('','ServerError=404'));
+ }
+ elseif ( $page->GetVar('category_depth') == 'error') {
+ header("Status: 500 technical error ");
+ header("HTTP/1.0 301 Moved Permanently");
+ tep_redirect(tep_href_link('','ServerError=500'));
+ }
/**
@brief Listing Page / Mutli prodycts / cms
use /content/index_listing.php
@@ -76,13 +85,13 @@
// call master DataTypes listing and next childs modules
DataTypes::transversal('transversal');
+
$listing=listing::getInstance();
$listing_split = $listing->listing($dyntype);
$listing_query = $DB->query($listing_split->sql_query);
$page_content = $page->force_content('index_listing.php');
-// var_dump($page_content);
}
// else{
// $page->init(basename(__FILE__),$language);
@@ -91,7 +100,7 @@
else{
header("Status: 404 Not Found");
header("HTTP/1.0 301 Moved Permanently");
- tep_redirect(tep_href_link('','?ServerError=404'));
+ tep_redirect(tep_href_link('','ServerError=404'));
}
}
Modified: trunk/catalog/install/includes/sql/mysql/data/40_osc_categories.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/data/40_osc_categories.sql 2012-04-05 07:22:23 UTC (rev 4152)
+++ trunk/catalog/install/includes/sql/mysql/data/40_osc_categories.sql 2012-04-05 09:59:32 UTC (rev 4153)
@@ -14,8 +14,8 @@
-insert into osc_categories ( categories_id , categories_datatype, categories_image , parent_id , sort_order , date_added , categories_status ) values ( '1', NULL ,NULL , '0', NULL , NOW(), '1' );
+insert into osc_categories ( categories_id , categories_datatype, categories_image , parent_id , sort_order , date_added , categories_status ) values ( '1', '' ,NULL , '0', NULL , NOW(), '1' );
insert into osc_categories ( categories_id , categories_datatype, categories_image , parent_id , sort_order , date_added , categories_status ) values ( '2', 'content,' ,NULL , '0', NULL , NOW(), '1' );
-insert into osc_categories ( categories_id , categories_datatype, categories_image , parent_id , sort_order , date_added , categories_status ) values ( '3', NULL ,NULL , '0', NULL , NOW(), '0' );
+insert into osc_categories ( categories_id , categories_datatype, categories_image , parent_id , sort_order , date_added , categories_status ) values ( '3', '' ,NULL , '0', NULL , NOW(), '0' );
Modified: trunk/dev/datatype/Modele/catalog/common/classes/datatype_drivers/Data__DATATYPE_REPLACE_.php
===================================================================
--- trunk/dev/datatype/Modele/catalog/common/classes/datatype_drivers/Data__DATATYPE_REPLACE_.php 2012-04-05 07:22:23 UTC (rev 4152)
+++ trunk/dev/datatype/Modele/catalog/common/classes/datatype_drivers/Data__DATATYPE_REPLACE_.php 2012-04-05 09:59:32 UTC (rev 4153)
@@ -181,7 +181,7 @@
// call transversal load in other modules
DataTypes::transversal('transversal');
- $page__DATATYPE_REPLACE_ = $page->force__DATATYPE_REPLACE_('_DATATYPE_REPLACE_.php');
+ $page__DATATYPE_REPLACE_ = $page->force_content('_DATATYPE_REPLACE_.php');
return $page__DATATYPE_REPLACE_;
}
Modified: trunk/dev/datatype/Modele/catalog/includes/classes/drivers/data/_DATATYPE_REPLACE_.php
===================================================================
--- trunk/dev/datatype/Modele/catalog/includes/classes/drivers/data/_DATATYPE_REPLACE_.php 2012-04-05 07:22:23 UTC (rev 4152)
+++ trunk/dev/datatype/Modele/catalog/includes/classes/drivers/data/_DATATYPE_REPLACE_.php 2012-04-05 09:59:32 UTC (rev 4153)
@@ -347,15 +347,23 @@
public static function count_in_category($category_id, $include_inactive = false) {
$products_count = 0;
$DB=Database::getInstance();
- if ($include_inactive == true) {
- $products_query = $DB->query("select count(p._DATATYPE_REPLACE__id) as total from " . TABLE__DATATYPE_REPLACE_MAJ_ . " p, " . TABLE__DATATYPE_REPLACE_MAJ__TO_CATEGORIES. " p2c where p._DATATYPE_REPLACE__id = p2c._DATATYPE_REPLACE__id and p2c.categories_id = '" . (int)$category_id . "'");
- } else {
- $products_query = $DB->query("select count(p._DATATYPE_REPLACE__id) as total from " . TABLE__DATATYPE_REPLACE_MAJ_ . " p, " . TABLE__DATATYPE_REPLACE_MAJ__TO_CATEGORIES . " p2c where p._DATATYPE_REPLACE__id = p2c._DATATYPE_REPLACE__id and p._DATATYPE_REPLACE__status = '1' and p2c.categories_id = '" .(int) $category_id . "' ");
- }
- if($products_query->__get('numRows')>0 ) $products = $products_query->fetchAssoc();
- else $products['total']= 0;
- $products_count += $products['total'];
+
+ $sql =" SELECT COUNT(p._DATATYPE_REPLACE__id) as TOTAL ".
+ " FROM " . TABLE__DATATYPE_REPLACE_MAJ_ . " p , " . TABLE__DATATYPE_REPLACE_MAJ__TO_CATEGORIES . " p2c ".
+ " LEFT JOIN ".TABLE_CATEGORIES." cat ON(cat.categories_id=p2c.categories_id AND categories_status > 0) ".
+ " WHERE p._DATATYPE_REPLACE__id = p2c._DATATYPE_REPLACE__id and ( cat.categories_id = '" . (int)$category_id . "' OR cat.parent_id= '" . (int)$category_id . "' OR cat.categories_cpath LIKE '%" . (int)$category_id . "%' ) ";
+ if (!$include_inactive)
+ $sql .=" AND p._DATATYPE_REPLACE__status = '1' ";
+
+ $_query = $DB->query($sql);
+
+
+ if($_query->__get('numRows') >0 ) $result = $_query->fetchAssoc();
+ else $result['TOTAL']= 0;
+
+ $products_count += $result['TOTAL'];
+
return $products_count;
}
}
Modified: trunk/dev/datatype/Modele/readme
===================================================================
--- trunk/dev/datatype/Modele/readme 2012-04-05 07:22:23 UTC (rev 4152)
+++ trunk/dev/datatype/Modele/readme 2012-04-05 09:59:32 UTC (rev 4153)
@@ -7,7 +7,7 @@
@encode UTF-8
-Cette extension apporte un datatype supplementaire, ces carateristque sont les suivantes:
+Cette extension apporte un datatype supplementaire, ces carateristques sont les suivantes:
Nom/clef: _DATATYPE_REPLACE_
Clef Seo : _DATATYPE_REPLACE_SEOTAG_
Modified: trunk/dev/datatype/class.CreateDataType.php
===================================================================
--- trunk/dev/datatype/class.CreateDataType.php 2012-04-05 07:22:23 UTC (rev 4152)
+++ trunk/dev/datatype/class.CreateDataType.php 2012-04-05 09:59:32 UTC (rev 4153)
@@ -12,8 +12,8 @@
function __construct($curent, $name, $seotag, $head_tag=false){
- if($head_tag)
- $this->head_tag = true;
+// if($head_tag)
+// $this->head_tag = true;
$this->modele_path = $curent . '/Modele/';
@@ -53,9 +53,9 @@
$path_mod = $this->modele_path . $current;
foreach($this->browse($path_mod) as $row){
- if(
- ( !$this->head_tag || ( $this->head_tag && substr($row,0,11) =='header_tags' ) ) //
- )
+// if(
+// ( !$this->head_tag || ( $this->head_tag && substr($row,0,11) =='header_tags' ) ) //
+// )
if(is_dir($path_mod.$row)) {
mkdir( $this->replace($this->folder . $current. $row) );
Modified: trunk/dev/datatype/generat.php
===================================================================
--- trunk/dev/datatype/generat.php 2012-04-05 07:22:23 UTC (rev 4152)
+++ trunk/dev/datatype/generat.php 2012-04-05 09:59:32 UTC (rev 4153)
@@ -42,20 +42,6 @@
$name = tep_db_prepare_input($_GET['name']);
$seotag = tep_db_prepare_input($_GET['seotag']);
$head_tag = tep_db_prepare_input($_GET['head_tag']);
-// $level = 'stable';
-//
-//
-// $folder = $curent.$folder .'/'. strtoupper($name).'_'.$level;
-// if(!file_exists($folder) || !is_dir($folder)) {
-// mkdir($folder);
-// }
-// var_dump(scan($curent . $modele_path));
-// foreach(scan($curent . $modele_path) as $row){
-// if(in_array($row, array('..', '.'))){
-// echo $row;
-// }
-// }
-//
$object = new CreateDataType($curent, $name, $seotag, $head_tag);
}
@@ -63,7 +49,7 @@
?>
-<h2>Create new datatype extension</h2>
+<h2>Creation of a new datatype extension coupled with the categories</h2>
<form>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-04-05 07:22:30
|
Revision: 4152
http://oscss.svn.sourceforge.net/oscss/?rev=4152&view=rev
Author: oscim
Date: 2012-04-05 07:22:23 +0000 (Thu, 05 Apr 2012)
Log Message:
-----------
coquille
Removed Paths:
-------------
trunk/dev/datatype/Modele/catalog/includes/modules/_DATATYPE_REPLACE_/ct_qpbpp.php
Deleted: trunk/dev/datatype/Modele/catalog/includes/modules/_DATATYPE_REPLACE_/ct_qpbpp.php
===================================================================
--- trunk/dev/datatype/Modele/catalog/includes/modules/_DATATYPE_REPLACE_/ct_qpbpp.php 2012-04-04 22:09:27 UTC (rev 4151)
+++ trunk/dev/datatype/Modele/catalog/includes/modules/_DATATYPE_REPLACE_/ct_qpbpp.php 2012-04-05 07:22:23 UTC (rev 4152)
@@ -1,145 +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 22/01/11, 20:24
- @author oscim <mail aur...@os...> <www http://www.oscim.fr>
- @encode UTF-8
- *\dir includes/modules/account/
- *\file
- *\class ct_qpbpp
- *\group modules
- *\brief Address book for customers
-*/
-// error_reporting(E_ALL);
-class ct_qpbpp
- extends AbstractAccount
- implements InterfaceModule{
-
- /**
- @var array
- */
- public static $account;
- /**
- @var array
- */
- public static $adress_book;
- /**
- @var numeric
- */
- public static $count;
- /**
- @var string
- */
- public static $display_view_form_title;
-
- /**
- */
- function __construct(){
- $this->code =__CLASS__;
- $this->type ='account';
- $this->title = __('module aca address book text title');
- $this->description = __('module aca address book text description') ;
- $this->sort_order = (defined('MODULE_ACA_ADDRESS_BOOK_SORT_ORDER')) ? MODULE_ACA_ADDRESS_BOOK_SORT_ORDER : 0;
- $this->enabled =_cst_bool('MODULE_ACAPRO_QPBPP_UNIQ_PRICE_CUSTOMER');
-
-
- $this->sql_data_array=array();
- $this->cInfo = new objectInfo(array());
-// var_dump($this);
-// $page=page::getInstance();
-// $page->new_class('javascript');
-
- /// script validate js
-// $page->javascript->add_framework("ext/jquery/jquery.min.js");
-// $page->javascript->add_script("ext/jquery/jquery.validate.min.js", array('sort'=>30));
-
- /// call js view last time
-// $file=DIR_WS_INCLUDES.'js/'.__CLASS__.'.js.php';
-// if( ($file=page::fix_file($file)) && $file !=false ) $page->javascript->add_script($file, array('sort'=>30));
-
- define('TABLE_PRODUCTS_PRICE_BREAK_CUSTOMER', DB_TABLE_PREFIX.'products_price_break_customers');
- }
-
- public function get_header($action=''){}
-
- /**
- * \fn check_action($action)
- * \brief Action exe
- * @param $action string la var d'action
- * @p $cID int recupere le Session[]
- */
- public function check_action($action) {
- }
-
- /**
- */
-// public function after_check_action ($action) {
-// if($action=='new') tep_redirect(tep_href_link(FILENAME_ACCOUNT, 'aca_mod='.$this->code.'&aca_type='.$this->type.'&aca_action=display_view', 'SSL'));
-// }
-
- /**
- */
-// public function update_table_account () {
-//
-// //! This function returns an array with variables to update into TABLE_ADDRESS_BOOK
-// $sql_data_array=$this->sql_data_array;
-// tep_db_perform(TABLE_ADDRESS_BOOK, $this->cInfo->sql_data_array, 'update', "customers_id = '" . (int)$_GET['cID'] . "' and ct_qpbpp_id = '" . (int)$this->cInfo->customers_default_address_id . "'");
-//
-// return array();
-// }
-
- /**
- */
- public function load_db_values($cID) {
- $DB = Database::getInstance();
-
- $price_breaks_query = $DB->query("select products_id as pid, products_price as price , products_qty as qty from " . TABLE_PRODUCTS_PRICE_BREAK_CUSTOMER . " where customers_id = '".(int)$cID."' AND status = 1 ORDER BY products_qty ASC");
- foreach($price_breaks_query->fetchAllAssoc() as $item)
- self::$account[]=$item;
-
- }
-
-
-
-
- /**
- List des element du block my account
- */
- public function display_view_min_listMyAccount($cID){
- global $page;
-
- $v['title']=__("ct_qpbpp view opened demand price");
- $v['href_link']= tep_href_link(FILENAME_ACCOUNT, 'aca_mod='.$this->code.'&aca_type='.$this->type.'&aca_action=display_view', 'SSL');
- return array(new objectInfo($v));
- }
-
- /**
- * \fn display_view($pID='')
- * \brief Affiche Block edit/modif reviews
- * @param $pID int id products
- * @p $customer_id int current
- */
- public function display_view($pID=''){
- global $page;
- $customer_id=$page->the_var('customer_id');
- $this->load_db_values($customer_id);
-
- return new objectInfo(array('title'=>__("ct_qpbpp demand price"),'content'=> tep_output_string_protected(tep_get_include_contents(__CLASS__.'.'.__FUNCTION__),false,true) ) );
- }
-
-
-
-
-
-
-/** implements InterfaceModule depend */
- public function check() {}
- public function install() {}
- public function remove() {}
- public function keys() {}
-}
-
-?>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-04-04 22:09:36
|
Revision: 4151
http://oscss.svn.sourceforge.net/oscss/?rev=4151&view=rev
Author: oscim
Date: 2012-04-04 22:09:27 +0000 (Wed, 04 Apr 2012)
Log Message:
-----------
Ajout d'un outil de developpement rapide, pour la creation d'une extension de nouveau datatype complet.
Ajout de l'ensemble de la structure front/backoffice pour la prise en charge complete edition/gestion/vue/listing accompgane des element necessaire ?\195?\160 l'installation , creation de table , ajustement
Added Paths:
-----------
trunk/dev/datatype/
trunk/dev/datatype/Modele/
trunk/dev/datatype/Modele/catalog/
trunk/dev/datatype/Modele/catalog/admin/
trunk/dev/datatype/Modele/catalog/admin/includes/
trunk/dev/datatype/Modele/catalog/admin/includes/classes/
trunk/dev/datatype/Modele/catalog/admin/includes/classes/drivers/
trunk/dev/datatype/Modele/catalog/admin/includes/classes/drivers/sql_DATATYPE_REPLACE_.php
trunk/dev/datatype/Modele/catalog/admin/includes/gabarit/
trunk/dev/datatype/Modele/catalog/admin/includes/gabarit/_DATATYPE_REPLACE_s/
trunk/dev/datatype/Modele/catalog/admin/includes/gabarit/_DATATYPE_REPLACE_s/display_view.delete.gab
trunk/dev/datatype/Modele/catalog/admin/includes/gabarit/_DATATYPE_REPLACE_s/display_view.edit.gab
trunk/dev/datatype/Modele/catalog/admin/includes/gabarit/_DATATYPE_REPLACE_s/display_view.inline.gab
trunk/dev/datatype/Modele/catalog/admin/includes/gabarit/_DATATYPE_REPLACE_s/display_view.listing.gab
trunk/dev/datatype/Modele/catalog/admin/includes/gabarit/_DATATYPE_REPLACE_s/display_view.new.gab
trunk/dev/datatype/Modele/catalog/admin/includes/languages/
trunk/dev/datatype/Modele/catalog/admin/includes/languages/fr_FR/
trunk/dev/datatype/Modele/catalog/admin/includes/languages/fr_FR/modules/
trunk/dev/datatype/Modele/catalog/admin/includes/languages/fr_FR/modules/_DATATYPE_REPLACE_/
trunk/dev/datatype/Modele/catalog/admin/includes/languages/fr_FR/modules/pages/
trunk/dev/datatype/Modele/catalog/admin/includes/languages/fr_FR/modules/pages/_DATATYPE_REPLACE_s.txt
trunk/dev/datatype/Modele/catalog/admin/includes/modules/
trunk/dev/datatype/Modele/catalog/admin/includes/modules/_DATATYPE_REPLACE_/
trunk/dev/datatype/Modele/catalog/admin/includes/modules/pages/
trunk/dev/datatype/Modele/catalog/admin/includes/modules/pages/_DATATYPE_REPLACE_s.php
trunk/dev/datatype/Modele/catalog/common/
trunk/dev/datatype/Modele/catalog/common/classes/
trunk/dev/datatype/Modele/catalog/common/classes/datatype_drivers/
trunk/dev/datatype/Modele/catalog/common/classes/datatype_drivers/Data__DATATYPE_REPLACE_.php
trunk/dev/datatype/Modele/catalog/includes/
trunk/dev/datatype/Modele/catalog/includes/classes/
trunk/dev/datatype/Modele/catalog/includes/classes/drivers/
trunk/dev/datatype/Modele/catalog/includes/classes/drivers/data/
trunk/dev/datatype/Modele/catalog/includes/classes/drivers/data/_DATATYPE_REPLACE_.php
trunk/dev/datatype/Modele/catalog/includes/content/
trunk/dev/datatype/Modele/catalog/includes/content/_DATATYPE_REPLACE_.php
trunk/dev/datatype/Modele/catalog/includes/gabarit/
trunk/dev/datatype/Modele/catalog/includes/languages/
trunk/dev/datatype/Modele/catalog/includes/languages/fr_FR/
trunk/dev/datatype/Modele/catalog/includes/languages/fr_FR/modules/
trunk/dev/datatype/Modele/catalog/includes/languages/fr_FR/modules/_DATATYPE_REPLACE_/
trunk/dev/datatype/Modele/catalog/includes/languages/fr_FR/modules/_DATATYPE_REPLACE_/ct_qpbpp.txt
trunk/dev/datatype/Modele/catalog/includes/modules/
trunk/dev/datatype/Modele/catalog/includes/modules/_DATATYPE_REPLACE_/
trunk/dev/datatype/Modele/catalog/includes/modules/_DATATYPE_REPLACE_/ct_qpbpp.php
trunk/dev/datatype/Modele/install.xml
trunk/dev/datatype/Modele/readme
trunk/dev/datatype/Modele/sql/
trunk/dev/datatype/Modele/sql/mysql/
trunk/dev/datatype/Modele/sql/mysql/install/
trunk/dev/datatype/Modele/sql/mysql/install/data/
trunk/dev/datatype/Modele/sql/mysql/install/data/20_osc_status.sql
trunk/dev/datatype/Modele/sql/mysql/install/tables/
trunk/dev/datatype/Modele/sql/mysql/install/tables/osc__DATATYPE_REPLACE_.sql
trunk/dev/datatype/Modele/sql/mysql/install/tables/osc__DATATYPE_REPLACE__description.sql
trunk/dev/datatype/Modele/sql/mysql/install/tables/osc__DATATYPE_REPLACE__extra.sql
trunk/dev/datatype/Modele/sql/mysql/install/tables/osc__DATATYPE_REPLACE__to_categories.sql
trunk/dev/datatype/Modele/sql/mysql/remove/
trunk/dev/datatype/Modele/sql/mysql/remove/data/
trunk/dev/datatype/Modele/sql/mysql/remove/tables/
trunk/dev/datatype/Modele/sql/mysql/remove/tables/osc__DATATYPE_REPLACE_.sql
trunk/dev/datatype/Modele/sql/mysql/remove/tables/osc__DATATYPE_REPLACE__description.sql
trunk/dev/datatype/Modele/sql/mysql/remove/tables/osc__DATATYPE_REPLACE__extra.sql
trunk/dev/datatype/Modele/sql/mysql/remove/tables/osc__DATATYPE_REPLACE__to_categories.sql
trunk/dev/datatype/class.CreateDataType.php
trunk/dev/datatype/generat.php
trunk/dev/datatype/readme
Added: trunk/dev/datatype/Modele/catalog/admin/includes/classes/drivers/sql_DATATYPE_REPLACE_.php
===================================================================
--- trunk/dev/datatype/Modele/catalog/admin/includes/classes/drivers/sql_DATATYPE_REPLACE_.php (rev 0)
+++ trunk/dev/datatype/Modele/catalog/admin/includes/classes/drivers/sql_DATATYPE_REPLACE_.php 2012-04-04 22:09:27 UTC (rev 4151)
@@ -0,0 +1,437 @@
+<?php if (!defined('HTTP_SERVER')) die('You can not access this file directly!');
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 04/03/2012, 21:54
+ @author genrated by dev/datatype/generat
+ @encode UTF-8
+ @class sql_DATATYPE_REPLACE_
+*/
+
+
+class sql_DATATYPE_REPLACE_
+ implements ModSqlDataDriver{
+
+ public static $modules;
+
+ protected static $_instance;
+
+ protected function __construct(){
+ self::$modules=new AcaFactory('_DATATYPE_REPLACE_'/*,'MODULE__DATATYPE_REPLACE_MAJ__INSTALLED_BO'*/);
+ self::$modules->set_image_handler();
+ }
+
+ public static function getInstance() {
+ if(self::$_instance == null) self::$_instance = new self();
+ return self::$_instance;
+ }
+
+
+ /**
+ @brief create new ligne in table configuration
+ @param $option array
+ language_id = > int $languages_id
+ */
+ public static function create($option){
+
+ self::getInstance();
+ $DB=Database::getInstance();
+
+ $list_languages=tep_get_languages();
+
+ // Put post value
+ if(isset($option['post'])){
+ $post=$option['post'];
+ self::$modules->load_post_values($post);
+ }
+
+ $sql_data_array = $option['sqlarray'];
+
+ $insert_sql_data = array('date_added' => 'now()');
+
+ $sql_data_array = array_merge($sql_data_array, $insert_sql_data);
+
+ $resobj=tep_db_perform(TABLE__DATATYPE_REPLACE_MAJ_, $sql_data_array);
+
+ $_DATATYPE_REPLACE__id =$resobj->__get('insertId');
+
+
+ for ($i=0, $n=sizeof($list_languages); $i<$n; $i++) {
+
+ $language_id = $list_languages[$i]['id'];
+
+ $sql_data_array = array(
+ '_DATATYPE_REPLACE__chapo' => '',
+ '_DATATYPE_REPLACE__description' => '',
+ '_DATATYPE_REPLACE__title' => '',
+ '_DATATYPE_REPLACE__id' => $_DATATYPE_REPLACE__id,
+ 'language_id' => $language_id
+ );
+
+ tep_db_perform(TABLE__DATATYPE_REPLACE_MAJ__DESCRIPTION, $sql_data_array);
+
+ }
+
+ self::$modules->create($_DATATYPE_REPLACE__id);
+
+ return $_DATATYPE_REPLACE__id;
+ }
+
+ /**
+ @brief update ligne in table configuration
+ */
+ public static function update($option){
+
+ self::getInstance();
+ $DB=Database::getInstance();
+
+// if( !isset($option['id'])) return 'id';
+
+ $list_languages=tep_get_languages();
+ $where ='';
+// $languages_id = $option['language_id'];
+
+ if(isset($option['id'])){
+ $_DATATYPE_REPLACE__id = (int)$option['id'];
+ $post['_DATATYPE_REPLACE__id'] = $_DATATYPE_REPLACE__id;
+ }
+
+// if(isset($option['action'])) $action=$option['action'];
+
+// if(!self::fetch($option))
+// $action = 'insert';
+// else
+// $action = 'update';
+
+ // Put post value
+ if(isset($option['post'])){
+ $post=$option['post'];
+ self::$modules->load_post_values($post);
+ }
+
+ $sql_data_array = $option['sqlarray'];
+
+
+
+ $update_sql_data = array('last_modified' => 'now()');
+ $sql_data_array = array_merge($sql_data_array, $update_sql_data);
+
+ self::$modules->load_post_values($post);
+
+ $sql_data_array = array_merge($sql_data_array, self::$modules->get_update_table__DATATYPE_REPLACE_());
+
+
+ tep_db_perform(TABLE__DATATYPE_REPLACE_MAJ_, $sql_data_array, 'update', "_DATATYPE_REPLACE__id = '" . (int)$_DATATYPE_REPLACE__id . "'");
+
+
+ /// Clean link posts to categorie and save new link
+ if(isset($option['cPath']) && count($post['categories']) == 0)
+ $post['categories'][] = $option['cPath'];
+
+ sqlcategorie::DataInCat('_DATATYPE_REPLACE_', $_DATATYPE_REPLACE__id, $post['categories']);
+
+
+ for ($i=0, $n=sizeof($list_languages); $i<$n; $i++) {
+
+ $language_id = $list_languages[$i]['id'];
+
+ $sql_data_array = array(
+ '_DATATYPE_REPLACE__chapo' => tep_db_prepare_input($post['_DATATYPE_REPLACE__chapo'][$language_id]) ,
+ '_DATATYPE_REPLACE__description' => tep_db_prepare_input($post['_DATATYPE_REPLACE__description'][$language_id]) ,
+ '_DATATYPE_REPLACE__title' => tep_db_prepare_input($post['_DATATYPE_REPLACE__title'][$language_id]) );
+
+
+ $sql_data_array = array_merge($sql_data_array, self::$modules->get_update_table__DATATYPE_REPLACE__description ($language_id));
+
+ tep_db_perform(TABLE__DATATYPE_REPLACE_MAJ__DESCRIPTION, $sql_data_array, 'update', "_DATATYPE_REPLACE__id = '" . (int)$_DATATYPE_REPLACE__id . "' and language_id = '" . (int)$language_id . "'");
+ }
+
+ self::$modules->after_update ($_DATATYPE_REPLACE__id);
+
+ return $_DATATYPE_REPLACE__id;
+ }
+
+
+ /**
+ @brief load ligne in table configuration
+ @param option array
+ id => row id int (configuration_id)
+ key => string key (configuration_key)
+ group_id => group_id int (configuration_group_id)
+
+ @return
+
+ object(stdClass)[13]
+ public 'id' => string '1' (length=1)
+ OR
+ array(
+ object(stdClass)[13]
+ ...
+ object(stdClass)[13]
+ ..
+ )
+
+ */
+ public static function fetch($option,$shortkey=false){
+
+ self::getInstance();
+ $DB=Database::getInstance();
+
+ $result=array();
+
+// $languages_id = $option['language_id'];
+ $cat_list =array();
+ $list_languages=tep_get_languages();
+
+ $sql ="";
+ if(isset($option['id']) && $option['id'] > 0){
+ $ID = (int) $option['id'];
+ $sql .="AND c._DATATYPE_REPLACE__id = '".(int)tep_db_input($option['id'])."' ";
+ }
+
+// if(isset($option['language_id'])){
+// $languages_id = (int)$option['language_id'];
+// $sql .="AND pd.language_id = '".(int)tep_db_input($option['language_id'])."' ";
+// }
+
+ if(isset($option['catid'])){
+ $languages_id = (int)$option['catid'];
+ $sql .="AND c2c.categories_id = '".(int)tep_db_input($option['catid'])."' ";
+ }
+
+ $sql =substr($sql,3);
+
+ if(strlen($sql)<4)
+ return false;
+
+ $res = $DB->query($sql="select c._DATATYPE_REPLACE__id, date_added, last_modified, _DATATYPE_REPLACE__status from " . TABLE__DATATYPE_REPLACE_MAJ_ . " c LEFT JOIN " . TABLE__DATATYPE_REPLACE_MAJ__TO_CATEGORIES . " c2c on(c._DATATYPE_REPLACE__id=c2c._DATATYPE_REPLACE__id) WHERE ".$sql);
+
+// var_dump($sql);
+
+ $num = $res->__get('numRows');
+
+ if($num == 1)
+ $cInfo_array[] = $res->fetchAssoc();
+ else
+ foreach($res->fetchAllAssoc() as $row)
+ $cInfo_array[] = $row;
+
+ tep_db_free_result($res);
+
+
+
+ foreach($cInfo_array as $row) {
+
+ // call all langue for this post
+ for ($i=0, $n=sizeof($list_languages); $i<$n; $i++) {
+ $language_id = $list_languages[$i]['id'];
+ $_DATATYPE_REPLACE__query = $DB->query("select cd._DATATYPE_REPLACE__chapo,cd._DATATYPE_REPLACE__description, cd._DATATYPE_REPLACE__title from " . TABLE__DATATYPE_REPLACE_MAJ__DESCRIPTION . " cd where cd._DATATYPE_REPLACE__id = '" . (int)$row['_DATATYPE_REPLACE__id'] . "' AND language_id='" . $language_id . "'");
+ $_DATATYPE_REPLACE_ = tep_db_fetch_array($_DATATYPE_REPLACE__query);
+
+ $row['chapo'][$language_id] = $_DATATYPE_REPLACE_['_DATATYPE_REPLACE__chapo'];
+ $row['description'][$language_id] = $_DATATYPE_REPLACE_['_DATATYPE_REPLACE__description'];
+ $row['title'][$language_id] = $_DATATYPE_REPLACE_['_DATATYPE_REPLACE__title'];
+
+ tep_db_free_result($_DATATYPE_REPLACE__query);
+ }
+
+ $cat_query = $DB->query("select categories_id from " . TABLE__DATATYPE_REPLACE_MAJ__TO_CATEGORIES . " where _DATATYPE_REPLACE__id='" . (int)$row['_DATATYPE_REPLACE__id'] . "' ");
+
+
+ while($cat_l = tep_db_fetch_array($cat_query)){ $cat_list[$cat_l['categories_id']]=$cat_l; }
+ $row['categories']=$cat_list;
+
+
+ tep_db_free_result($cat_query);
+
+
+ self::$modules->load_db_values((int)$row['_DATATYPE_REPLACE__id']);
+
+
+ $result[] = $row;
+ }
+
+
+
+// return ((!$shortkey)? $cInfo_array : self::CleanKey($cInfo_array)) ;
+
+ if($num == 1){
+ return ((!$shortkey)? $result[0] : self::CleanKey($result[0])) ;
+ }
+ elseif($num > 1){
+ $array=array();
+
+ foreach($result as $lg)
+ $array[]= ((!$shortkey)? $lg : self::CleanKey($lg));
+
+ return $array;
+ }
+
+ return false;
+ }
+
+ /**
+ @brief delete row
+ @param option array
+ */
+ public static function delete($option){
+
+ self::getInstance();
+ $DB=Database::getInstance();
+
+ $res = false;
+ $product_categories = array();
+
+ if(isset($option['id']))
+ $cms_id = (int)tep_db_input($option['id']) ;
+ else
+ return false;
+
+ if(isset($option['catarray'])){
+ foreach($option['catarray'] as $k=>$v)
+ $_categories[$k]=(int)tep_db_input($v) ;
+
+ for ($i=0, $n=sizeof($_categories); $i<$n; $i++) {
+ $DB->query("DELETE FROM " . TABLE__DATATYPE_REPLACE_MAJ__TO_CATEGORIES . " WHERE _DATATYPE_REPLACE__id = '" . (int)$cms_id . "' AND categories_id = '" . (int)$product_categories[$i] . "'");
+ }
+ }
+ else
+ $DB->query("delete from " . TABLE__DATATYPE_REPLACE_MAJ__TO_CATEGORIES . " where _DATATYPE_REPLACE__id = '" . (int)$cms_id . "'");
+
+
+ $product_categories_query = $DB->query("SELECT COUNT(*) AS total FROM " . TABLE__DATATYPE_REPLACE_MAJ__TO_CATEGORIES . " WHERE _DATATYPE_REPLACE__id = '" . (int)$cms_id . "'");
+ $product_categories = tep_db_fetch_array($product_categories_query);
+
+ if ($product_categories['total'] == '0') {
+
+ self::$modules->delete($cms_id);
+
+ // childs tables
+ $DB->query("delete from " . TABLE__DATATYPE_REPLACE_MAJ__DESCRIPTION . " where _DATATYPE_REPLACE__id = '" . (int)$cms_id . "'");
+
+ // master table
+ $DB->query("delete from " . TABLE__DATATYPE_REPLACE_MAJ_ . " where _DATATYPE_REPLACE__id = '" . (int)$cms_id . "'");
+
+ return true;
+ }
+ else
+ return false;
+
+ return false;
+ }
+
+
+ /**
+ @brief
+ @return array product empty
+ */
+ public static function Specimen(){
+
+ $list_languages=tep_get_languages();
+
+ $par = array(
+ '_DATATYPE_REPLACE__id' => '',
+ 'date_added' => '',
+ 'last_modified' => '',
+ '_DATATYPE_REPLACE__status' => '',
+ 'categories' => array(),
+ );
+
+ for ($i=0, $n=sizeof($list_languages); $i<$n; $i++) {
+ $par['title'][$list_languages[$i]['id']] = '';
+ $par['chapo'][$list_languages[$i]['id']] = '';
+ $par['description'][$list_languages[$i]['id']] = '';
+ }
+
+ return self::CleanKey($par);
+ }
+
+
+ /**
+ @brief copy in duplicate or link
+ @param $option array
+ type => string duplicate/link
+ @return
+ */
+ public static function copyto($option){
+
+
+ if(isset($option['id']))
+ $pid = (int) $option['id'];
+ else
+ return false;
+
+ if(isset($option['catid']))
+ $catid = (int) $option['catid'];
+ else
+ return false;
+
+
+ $type=(isset($option['type']))? $option['type'] : 'duplicate' ; // type duplicate | link
+// $pid = (isset($option['id'])) ? : ;
+
+ self::getInstance();
+ $DB=Database::getInstance();
+
+
+
+ switch($type){
+ case 'duplicate':
+ default:
+ }
+
+
+ return $products_id;
+
+ }
+
+
+
+ /**
+ @fn MaintenanceTables()
+ @brief clean and maintient link table and data
+ */
+ public static function Maintenance(){
+ self::UpdateOrphelin();
+ }
+
+
+
+
+ /**
+ @fn UpdateOrphelin()
+ @brief call method for update in cat , the _DATATYPE_REPLACE_ in not category
+ */
+ private static function UpdateOrphelin(){
+ $DB=Database::getInstance();
+ $_DATATYPE_REPLACE__query = $DB->query("SELECT p._DATATYPE_REPLACE__id FROM " . TABLE__DATATYPE_REPLACE_MAJ_ . " p LEFT OUTER JOIN " . TABLE__DATATYPE_REPLACE_MAJ__TO_CATEGORIES . " p2c ON p._DATATYPE_REPLACE__id =p2c._DATATYPE_REPLACE__id WHERE p2c._DATATYPE_REPLACE__id is null");
+ while ($_DATATYPE_REPLACE_ = tep_db_fetch_array($_DATATYPE_REPLACE__query))
+ $DB->query("insert into " . TABLE__DATATYPE_REPLACE_MAJ__TO_CATEGORIES . " (_DATATYPE_REPLACE__id, categories_id) values ('" . (int)$_DATATYPE_REPLACE_['_DATATYPE_REPLACE__id'] . "', '".ORPHELIN_COLLECTOR."')");
+ }
+
+
+
+ /**
+ @fn CleanKey()
+ @brief Clean string name key
+ */
+ private static function CleanKey($array){
+
+ $object= new stdclass();
+
+ foreach($array as $key=>$value){
+ if( strpos($key,'_DATATYPE_REPLACE__') ===0)
+ $key=substr($key,8);
+
+ $object->$key = $value;
+ }
+
+ return $object;
+ }
+
+}
+
+
+?>
\ No newline at end of file
Added: trunk/dev/datatype/Modele/catalog/admin/includes/gabarit/_DATATYPE_REPLACE_s/display_view.delete.gab
===================================================================
--- trunk/dev/datatype/Modele/catalog/admin/includes/gabarit/_DATATYPE_REPLACE_s/display_view.delete.gab (rev 0)
+++ trunk/dev/datatype/Modele/catalog/admin/includes/gabarit/_DATATYPE_REPLACE_s/display_view.delete.gab 2012-04-04 22:09:27 UTC (rev 4151)
@@ -0,0 +1,22 @@
+<?php
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 04/03/2012, 21:54
+ @author genrated by dev/datatype/generat
+ @encode UTF-8
+*/
+?>
+<div class="box_uniq">
+ <h3><?php echo __('text info heading delete _DATATYPE_REPLACE_'); ?></h3>
+
+ <?php echo tep_draw_form('_DATATYPE_REPLACE_', _DATATYPE_REPLACE_s::FILENAME, 'cID=' . _DATATYPE_REPLACE_s::$cInfo->_DATATYPE_REPLACE__id . '&action=deleteconfirm') ?>
+ <p><?php echo __('text info delete _DATATYPE_REPLACE_ intro') ?></p>
+ <p><?php echo _DATATYPE_REPLACE_s::$cInfo->_DATATYPE_REPLACE__name ; ?></p>
+ <div class="button_nav">
+ <?php echo tep_image_submit('button_delete.gif', IMAGE_DELETE) .tep_js_back(tep_href_link(_DATATYPE_REPLACE_s::FILENAME, 'cID=' . _DATATYPE_REPLACE_s::$cInfo->_DATATYPE_REPLACE__id), IMAGE_CANCEL); ?>
+ </div>
+ </form>
+</div>
\ No newline at end of file
Added: trunk/dev/datatype/Modele/catalog/admin/includes/gabarit/_DATATYPE_REPLACE_s/display_view.edit.gab
===================================================================
--- trunk/dev/datatype/Modele/catalog/admin/includes/gabarit/_DATATYPE_REPLACE_s/display_view.edit.gab (rev 0)
+++ trunk/dev/datatype/Modele/catalog/admin/includes/gabarit/_DATATYPE_REPLACE_s/display_view.edit.gab 2012-04-04 22:09:27 UTC (rev 4151)
@@ -0,0 +1,104 @@
+<?php
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 04/03/2012, 21:54
+ @author genrated by dev/datatype/generat
+ @encode UTF-8
+*/
+global $oscss;
+$_DATATYPE_REPLACE_s=array();
+?>
+ <h3><?php echo __('heading title edit'); ?></h3>
+ <div class="box_uniq block_form">
+
+ <?php echo tep_draw_form('review', _DATATYPE_REPLACE_s::FILENAME, 'cID=' . (int)@$_GET['cID'] . '&action='.((_DATATYPE_REPLACE_s::$action=='new')?'insert': 'update'),'post'); ?>
+ <div id="tabs">
+ <ul>
+ <li><a href="#tabs-1"><?php echo __('tab _DATATYPE_REPLACE_ data'); ?></a></li>
+ <?php
+ $g=6;
+ _DATATYPE_REPLACE_s::$modules->display_edit($_DATATYPE_REPLACE_s,@$cID);
+ if(is_array($_DATATYPE_REPLACE_s))
+ foreach ($_DATATYPE_REPLACE_s as $value) {
+ if(!empty($value['title']))echo '<li><a href="#tabs-'.$g.'">'.$value['title'].'</a></li>'."\n";
+ $g++;
+ } ?>
+ </ul>
+
+ <div id="tabs-1" class="tabPage">
+ <div class="edit box_left w_70" >
+ <div class="tabs_lang">
+ <ul>
+ <?php for ($i=0, $n=sizeof(_DATATYPE_REPLACE_s::$languages); $i<$n; $i++) { ?>
+ <li><a href="#fieldset_<?php echo $i ?>"><?php echo tep_language_image(_DATATYPE_REPLACE_s::$languages[$i]['directory'] . '/images/' . _DATATYPE_REPLACE_s::$languages[$i]['image'], _DATATYPE_REPLACE_s::$languages[$i]['name']); ?></a></li>
+
+ <?php } ?>
+ </ul>
+ <?php for ($i=0, $n=sizeof(_DATATYPE_REPLACE_s::$languages); $i<$n; $i++) { ?>
+ <fieldset id="fieldset_<?php echo $i ?>" class="block_field">
+ <p class="block_input">
+ <label for="<?php echo '_DATATYPE_REPLACE__title' . _DATATYPE_REPLACE_s::$languages[$i]['id']; ?>"><?php echo __('entry title'); ?></label>
+ <?php echo tep_draw_input_field('_DATATYPE_REPLACE__title[' . _DATATYPE_REPLACE_s::$languages[$i]['id'] . ']', '_DATATYPE_REPLACE__title' . $i, _DATATYPE_REPLACE_s::$cInfo->title[ _DATATYPE_REPLACE_s::$languages[$i]['id']], 'size="70"', true) ; ?>
+ </p>
+ <p class="block_input" >
+ <?php echo __('txt info permalink').tep_catalog_href_link('_DATATYPE_REPLACE_.php','_DATATYPE_REPLACE_=' . _DATATYPE_REPLACE_s::$cInfo->_DATATYPE_REPLACE__id.'&language='._DATATYPE_REPLACE_s::$languages[$i]['code'] , 'NONSSL', false); ?>
+ </p>
+ <br style="clear:both" />
+ <?php echo $oscss->_call(BO_WISIWYG_SELECTED,'_draw','_DATATYPE_REPLACE__description[' . _DATATYPE_REPLACE_s::$languages[$i]['id'] . ']','1000','800',_DATATYPE_REPLACE_s::$cInfo->description[_DATATYPE_REPLACE_s::$languages[$i]['id']]); ?>
+ </fieldset>
+ <?php } ?>
+ </div>
+ </div>
+
+ <div class="edit box_right w_30">
+ <dl>
+
+ <dt class="block_input w_90">
+ <label><?php echo __('text _DATATYPE_REPLACE_ status'); ?></label>
+ <?php echo tep_draw_radio_field('_DATATYPE_REPLACE__status', '_DATATYPE_REPLACE__status_1', '1', _DATATYPE_REPLACE_s::$enabled_status) . __('text _DATATYPE_REPLACE_ enabled') . tep_draw_radio_field('_DATATYPE_REPLACE__status', '_DATATYPE_REPLACE__status_0', '0', _DATATYPE_REPLACE_s::$disabled_status) . __('text _DATATYPE_REPLACE_ disabled'); ?>
+ </dt>
+ <dt class="block_input w_90 CategoryView">
+ <label>
+ <span class="text"><?php echo __('txt categories'); ?></span>
+ <span class="button_nav"><?php echo '<a class="buttonimg fancy" href="' . tep_href_link(FILENAME_CATEGORIES, '&datatype=_DATATYPE_REPLACE_&action=new_light&origin='. urlencode(_DATATYPE_REPLACE_s::FILENAME.'?action=edit&cID='. (int)@$_GET['cID']) ) . '" title="'. __('add category datatype _DATATYPE_REPLACE_').'">' .tep_image(DIR_WS_ICONS.'icon_add_new.png' ). '</a>'; ?> </span>
+ </label>
+ <ul id="cat_list_in_edit">
+ <?php foreach(_DATATYPE_REPLACE_s::$cInfo->categories as $v){ $k=$v['categories_id'];
+ echo '<li class="selected">'. tep_draw_checkbox_field('categories['.$k.']','cat_'.$k, tep_get_generated_category_path_ids($k), true ).' '.tep_get_category_name($k).'</li>';
+ }
+ foreach(categorieUtility::get_cat_list(array('root'=>0,'incre'=>false, 'datatype'=>'_DATATYPE_REPLACE_'))/*get_cat_list(0)*/ as $v)
+ if(!isset(_DATATYPE_REPLACE_s::$cInfo->categories[$v['categories_id']])){
+ echo '<li class="'.(isset(_DATATYPE_REPLACE_s::$cInfo->categories[$v['categories_id']])? 'selected' : 'noselected').'">'.tep_decal($v['niveau']).' '. tep_draw_checkbox_field('categories['.$v['categories_id'].']','cat_'.$v['categories_id'], tep_get_generated_category_path_ids($v['categories_id']), (isset(_DATATYPE_REPLACE_s::$cInfo->categories[$v['categories_id']])?true : false) ).' '.$v['categories_name'].'</li>';
+ }
+ else
+ echo '<li class="'.(isset(_DATATYPE_REPLACE_s::$cInfo->categories[$v['categories_id']])? 'selected' : 'noselected').'">'.tep_decal($v['niveau']).' '. ' '.$v['categories_name'].'</li>';
+ ?>
+ </ul>
+ </dt>
+ <dt class="block_input button_nav w_90" >
+ <?php echo tep_image_submit('', IMAGE_UPDATE) . tep_image_submit('', IMAGE_UPDATE_AND_CLOSE,' name="up_and_close"' );?>
+ <?php echo tep_js_back(tep_href_link(_DATATYPE_REPLACE_s::FILENAME, 'cID=' . _DATATYPE_REPLACE_s::$cInfo->_DATATYPE_REPLACE__id), IMAGE_CANCEL); ?>
+ </dt>
+ </dl>
+ </div>
+ </div>
+ <?php
+ $g=6;
+ if(is_array($_DATATYPE_REPLACE_s)){
+ reset($_DATATYPE_REPLACE_s);
+ foreach ($_DATATYPE_REPLACE_s as $value) {
+ echo '<div id="tabs-'.$g.'" class="tabPage">'."\n";
+ if (!empty($value['text'])) echo $value['text']."\n";
+ else echo '<br />';
+ echo '<div class="separator"></div></div>'."\n";
+ $g++;
+ }
+ } ?>
+
+ <div class="separator"></div>
+ </div>
+ </form>
+ </div>
Added: trunk/dev/datatype/Modele/catalog/admin/includes/gabarit/_DATATYPE_REPLACE_s/display_view.inline.gab
===================================================================
--- trunk/dev/datatype/Modele/catalog/admin/includes/gabarit/_DATATYPE_REPLACE_s/display_view.inline.gab (rev 0)
+++ trunk/dev/datatype/Modele/catalog/admin/includes/gabarit/_DATATYPE_REPLACE_s/display_view.inline.gab 2012-04-04 22:09:27 UTC (rev 4151)
@@ -0,0 +1,33 @@
+<?php
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 04/03/2012, 21:54
+ @author genrated by dev/datatype/generat
+ @encode UTF-8
+*/
+$_DATATYPE_REPLACE_s=array();
+?>
+<tr>
+ <td>
+ <div>
+ <ul>
+ <li><strong><?php echo __('txt info permalink'); ?> </strong><?php echo tep_catalog_href_link('_DATATYPE_REPLACE_.php','_DATATYPE_REPLACE_=' . _DATATYPE_REPLACE_s::$cInfo->_DATATYPE_REPLACE__id, 'NONSSL' , false) ?></li>
+ <li><strong><?php echo __('text info date added'); ?> </strong><?php echo tep_date_short( _DATATYPE_REPLACE_s::$cInfo->date_added) ?></li>
+ <li><strong><?php echo __('text info last modified'); ?> </strong><?php echo tep_date_short( _DATATYPE_REPLACE_s::$cInfo->last_modified) ?></li>
+ <?php foreach(_DATATYPE_REPLACE_s::$languages as $lg ): ?>
+ <li><?php echo tep_language_image( $lg['directory'] . '/images/' . $lg['image'], $lg['name']) .' '. __('text info _DATATYPE_REPLACE_ size') . ' ' . (isset( _DATATYPE_REPLACE_s::$cInfo->_DATATYPE_REPLACE__text_size[$lg['id']])? _DATATYPE_REPLACE_s::$cInfo->_DATATYPE_REPLACE__text_size[$i]:0) . ' '.__('bytes') ?></li>
+ <?php endforeach; ?>
+ </ul>
+ </div>
+ <div>
+ <ul>
+ <?php foreach( _DATATYPE_REPLACE_s::$modules->display_right_column($_DATATYPE_REPLACE_s, _DATATYPE_REPLACE_s::$cInfo->_DATATYPE_REPLACE__id) as $item): ?>
+ <li><?php echo $item['text'] ?></li>
+ <?php endforeach; ?>
+ </ul>
+ </div>
+ </td>
+</tr>
Added: trunk/dev/datatype/Modele/catalog/admin/includes/gabarit/_DATATYPE_REPLACE_s/display_view.listing.gab
===================================================================
--- trunk/dev/datatype/Modele/catalog/admin/includes/gabarit/_DATATYPE_REPLACE_s/display_view.listing.gab (rev 0)
+++ trunk/dev/datatype/Modele/catalog/admin/includes/gabarit/_DATATYPE_REPLACE_s/display_view.listing.gab 2012-04-04 22:09:27 UTC (rev 4151)
@@ -0,0 +1,58 @@
+<?php
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 04/03/2012, 21:54
+ @author genrated by dev/datatype/generat
+ @encode UTF-8
+*/
+global $languages_id;
+?>
+ <h3 class="pageHeading"><?php echo __('heading title'); ?></h3>
+
+ <div class="button_nav ">
+ <?php echo '<a class="button" href="' . tep_href_link(_DATATYPE_REPLACE_s::FILENAME, 'action=new') . '">' .tep_image(DIR_WS_ICONS.'icon_add_new.png' ). __('image create new _DATATYPE_REPLACE_') . '</a>'; ?>
+ <?php echo '<a class="button fancy" href="' . tep_href_link(FILENAME_CATEGORIES, '&datatype=_DATATYPE_REPLACE_&action=new_light&origin='. _DATATYPE_REPLACE_s::FILENAME) . '">' .tep_image(DIR_WS_ICONS.'icon_add_new.png' ). __('add category datatype _DATATYPE_REPLACE_') . '</a>'; ?>
+ </div>
+ <br style="clear:both"/>
+
+ <div class="box_uniq">
+
+ <div id="CurrentPathSelect" >
+ <?php echo tep_draw_form('goto', _DATATYPE_REPLACE_s::FILENAME, '', 'get').'<p>'. tep_draw_pull_down_menu('cPath', categorieUtility::get_category_tree(array('datatype'=>'_DATATYPE_REPLACE_', 'language_id'=>$languages_id )), (isset($_GET['cPath'])?(int)$_GET['cPath']: 0) , 'onchange="this.form.submit();" title="'.__('heading title goto').'" ').'</p></form>'; ?>
+ </div>
+
+ <table class="dataTable">
+ <thead>
+ <tr>
+ <th style="width:1%"> </th>
+ <th style="width:2%"><?php print __('table heading id'); ?></th>
+<!-- <th><?php print __('table heading listings'); ?></th> -->
+ <th><?php print __('table heading c title'); ?></th>
+ <th><?php print __('table heading categories'); ?></th>
+ <th><?php print __('table heading date added'); ?></th>
+ <th class="tcenter row_status"><?php print __('table heading status'); ?></th>
+ <th class="tcenter row_status"><?php print __('table heading view status'); ?></th>
+ <th class="tcenter row_action"><?php print __('table heading action'); ?></th>
+ </tr>
+ </thead>
+ <tfoot>
+ <tr>
+ <td style="width:1%"> </td>
+<!-- <td style="width:2%"><?php //echo tep_draw_input_field('_DATATYPE_REPLACE__id','_DATATYPE_REPLACE__id',__('table heading id'),'style="width:100%" class="search_init"'); ?></td> -->
+ <td style="width:10%"><?php echo tep_draw_input_field('_DATATYPE_REPLACE__name','_DATATYPE_REPLACE__name',__('table heading listings'),'style="width:100%" class="search_init"'); ?></td>
+ <td style="width:25%" class="tcenter"><?php echo tep_draw_input_field('_DATATYPE_REPLACE__title','_DATATYPE_REPLACE__title',__('table heading c title'),'style="width:100%" class="search_init"'); ?></td>
+ <td style="width:12%" class="tcenter w_50"><?php echo tep_draw_input_field('categories_name','categories_name',__('table heading categories'),'style="width:100%" class="search_init"'); ?></td>
+ <td style="width:3%" class="tleft"><?php echo tep_draw_input_field('date_added','date_added',__('table heading date added'),'style="width:100%" class="search_init"'); ?></td>
+ <td class="tcenter row_status" style="width:2%"><?php echo tep_draw_input_field('_DATATYPE_REPLACE__status','_DATATYPE_REPLACE__status',__('table heading status'),'style="width:100%" class="search_init"'); ?></td>
+ <td class="tcenter row_status" style="width:2%"><?php echo tep_draw_input_field('_DATATYPE_REPLACE__hidden','_DATATYPE_REPLACE__hidden',__('table heading view status'),'style="width:100%" class="search_init"'); ?></td>
+ <td class="tcenter row_action"> </td>
+ </tr>
+ </tfoot>
+ <tbody>
+ <!-- AJAX LOAD -->
+ </tbody>
+ </table>
+ </div>
\ No newline at end of file
Added: trunk/dev/datatype/Modele/catalog/admin/includes/gabarit/_DATATYPE_REPLACE_s/display_view.new.gab
===================================================================
--- trunk/dev/datatype/Modele/catalog/admin/includes/gabarit/_DATATYPE_REPLACE_s/display_view.new.gab (rev 0)
+++ trunk/dev/datatype/Modele/catalog/admin/includes/gabarit/_DATATYPE_REPLACE_s/display_view.new.gab 2012-04-04 22:09:27 UTC (rev 4151)
@@ -0,0 +1,36 @@
+<?php
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 04/03/2012, 21:54
+ @author genrated by dev/datatype/generat
+ @encode UTF-8
+*/
+?>
+<h3><?php print __('text new _DATATYPE_REPLACE_'); ?></h3>
+<?php echo tep_draw_form('new__DATATYPE_REPLACE_', _DATATYPE_REPLACE_s::FILENAME, 'action=insert', 'post'); ?>
+ <div class="block_form">
+ <div class="box_left">
+ <dl>
+ <dt class="block_input">
+ <label for="_DATATYPE_REPLACE__type"><?php echo __('text _DATATYPE_REPLACE_ type'); ?></label>
+ <?php echo tep_draw_pull_down_menu('_DATATYPE_REPLACE__type', tep_get_status_array('_DATATYPE_REPLACE_',0,'status_name'),'' /*_DATATYPE_REPLACE_s::$DiversInfo['_DATATYPE_REPLACE_s_virtual_typeID']*/); ?>
+ </dt>
+ </dl>
+ </div>
+ <div class="box_right">
+ <?php echo __('text info intro choose _DATATYPE_REPLACE_ type') ?>
+ </div>
+
+ <div class="button_nav">
+ <?php
+ echo tep_image_submit('button_preview.gif', IMAGE_ADD) .
+ tep_js_back(tep_href_link(_DATATYPE_REPLACE_s::FILENAME), IMAGE_CANCEL)
+ ?>
+ </div>
+
+ </div>
+
+</form>
\ No newline at end of file
Added: trunk/dev/datatype/Modele/catalog/admin/includes/languages/fr_FR/modules/pages/_DATATYPE_REPLACE_s.txt
===================================================================
--- trunk/dev/datatype/Modele/catalog/admin/includes/languages/fr_FR/modules/pages/_DATATYPE_REPLACE_s.txt (rev 0)
+++ trunk/dev/datatype/Modele/catalog/admin/includes/languages/fr_FR/modules/pages/_DATATYPE_REPLACE_s.txt 2012-04-04 22:09:27 UTC (rev 4151)
@@ -0,0 +1,53 @@
+<?php
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 04/03/2012, 21:54
+ @author genrated by dev/datatype/generat
+ @encode UTF-8
+*/
+$lang['heading title']="Gestion du datatype _DATATYPE_REPLACE_" ;
+$lang['heading title edit']="Édition de _DATATYPE_REPLACE_" ;
+
+/* listing */
+ $lang['table heading id']="ID" ;
+ $lang['table heading listings']="Clef" ;
+ $lang['table heading date added']="Crée(s)" ;
+ $lang['table heading categories']="Catégorie" ;
+ $lang['table heading c title']="Titre" ;
+ $lang['table heading last modified']="Dernière modification" ;
+ $lang['table heading action']="Action" ;
+
+ $lang['add category datatype _DATATYPE_REPLACE_']="Ajouter une catégorie" ;
+ $lang['image create new _DATATYPE_REPLACE_']="Créer une page" ;
+/* Edit */
+
+/* other */
+
+
+// $lang['entry _DATATYPE_REPLACE_']="Clef : " ;
+// $lang['entry _DATATYPE_REPLACE_ help']="La clef permet l'appel de cette page, elle ce doit d'être unique. Pour appeler plusieurs page, il est possible d'utiliser une racine de clef commune " ;
+$lang['text info delete _DATATYPE_REPLACE_ intro']="Êtes-vous sûr de vouloir supprimer ces données ?" ;
+$lang['text info date added']="Date d'ajout :" ;
+$lang['text info last modified']="Dernière modification :" ;
+$lang['text info image nonexistent']="L'IMAGE N'EXISTE PAS" ;
+$lang['text info _DATATYPE_REPLACE_ size']="Taille :" ;
+$lang['text info heading delete _DATATYPE_REPLACE_']="Supprimer ces données" ;
+$lang['table heading status']="État" ;
+$lang['entry title']="Titre " ;
+$lang['text _DATATYPE_REPLACE_ status']="Statut :" ;
+$lang['table heading view status']="Menu" ;
+$lang['text _DATATYPE_REPLACE_ enabled']="Actif" ;
+$lang['text _DATATYPE_REPLACE_ disabled']="Inactif" ;
+$lang['txt info permalink']="Lien vers cette page: " ;
+$lang['txt cat all']="Toutes" ;
+$lang['heading title goto']="Lister les datatype de la catégorie" ;
+$lang['heading title search']="Chercher" ;
+$lang['txt categories']="Catégories" ;
+$lang['tab _DATATYPE_REPLACE_ data']="Données" ;
+
+
+
+?>
\ No newline at end of file
Added: trunk/dev/datatype/Modele/catalog/admin/includes/modules/pages/_DATATYPE_REPLACE_s.php
===================================================================
--- trunk/dev/datatype/Modele/catalog/admin/includes/modules/pages/_DATATYPE_REPLACE_s.php (rev 0)
+++ trunk/dev/datatype/Modele/catalog/admin/includes/modules/pages/_DATATYPE_REPLACE_s.php 2012-04-04 22:09:27 UTC (rev 4151)
@@ -0,0 +1,513 @@
+<?php if (!defined('HTTP_SERVER')) die('You can not access this file directly!');
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 04/03/2012, 21:54
+ @author genrated by dev/datatype/generat
+ @encode UTF-8
+ @brief multiple class for _DATATYPE_REPLACE_
+*/
+
+
+/**
+ @class _DATATYPE_REPLACE_s
+*/
+class _DATATYPE_REPLACE_s
+ implements
+ /// Use module BO V2
+ ExtModPage,
+ /// Bacic module
+ InterfaceModule,
+ /// Use Listing page Ajax mecanism
+ InterfacedTJsonS,
+ /// Detail inline
+ InterfacedInnerHtml
+ {
+
+ const FILENAME = FILENAME__DATATYPE_REPLACE_MAJ_;
+
+ public static $code;
+
+ public static $action;
+
+ public static $list=array();
+ /**
+ @param object
+ */
+ public static $modules;
+ /**
+ @param object
+ */
+ public static $cInfo;
+ /**
+ @param array
+ */
+ public static $languages;
+ /**
+ @param bool
+ */
+ public static $enabled_status;
+ /**
+ @param bool
+ */
+ public static $disabled_status;
+
+ /**
+ class constructor
+ */
+ public function __construct() {
+ self::GetConf();
+ }
+
+ /**
+ @brief Load , adjust and define var environement exe for module
+ Is use in module and class abstract for init value config this module
+ */
+ public static function GetConf(){
+ global $languages_id;
+
+ self::$code=__CLASS__;
+
+ self::$action=(isset($_REQUEST['action'])? $_REQUEST['action'] : 'listing' );
+
+ /**
+ @remarks not load if not first init
+ */
+ if(defined('JSONSTATMENT')) return;
+
+ //! active datatable in ajax, precise les GET necessaire
+ if(!defined('JSONSTATMENT'))define('JSONSTATMENT', 'mod=page&type='.self::$code .(isset($_GET['cPath'])?'&cPath='.(int)$_GET['cPath']:'') );
+ //! detail item in ajax
+ if(!defined('AJAXSTATMENTDETAIL'))define('AJAXSTATMENTDETAIL', 'mod=page&type='.self::$code);
+
+// self::$modules=new ACA_DATATYPE_REPLACE_;
+ // Use factory class aca
+ //self::$modules=new ACA_DATATYPE_REPLACE_();
+ self::$modules=new AcaFactory('_DATATYPE_REPLACE_'/*,'MODULE__DATATYPE_REPLACE_MAJ__INSTALLED_BO'*/);
+ self::$modules->set_image_handler();
+
+ self::$languages = tep_get_languages();
+ }
+
+
+ public function check_action($actions){
+ global $messageStack,$oscss;
+
+ $DB=Database::getInstance();
+ self::$action=$actions;
+
+
+ $cID=(isset($_GET['cID'])? $_GET['cID'] :'' );
+
+ self::$modules-> set_image_handler();
+ self::$languages = tep_get_languages();
+
+ $actions['action'] = self::$action;
+ $actions['display_file']='';
+ $actions['action_class']=(isset($_GET['action_class']))? $_GET['action_class'] : '';
+ $actions['action_method']=(isset($_GET['action_method']))? $_GET['action_method'] : '';
+
+ // Ask categories modules if want to change the action
+ $actions = self::$modules->check_action($actions);
+ $action = $actions['action'];
+
+ // if(((self::$action == 'update')||(self::$action == 'insert'))) self::$action = 'edit';
+
+ switch (self::$action) {
+ /**
+ OPERATION SQL
+ */
+ case 'setflag':
+ if ( ($_GET['flag'] == '0') || ($_GET['flag'] == '1') ) {
+ if (isset($_GET['cID'])) {
+ if ($_GET['flag'] == '0') $DB->query($sql="update " . TABLE__DATATYPE_REPLACE_MAJ_ . " set _DATATYPE_REPLACE__status = '0' where _DATATYPE_REPLACE__id = '" . (int)$_GET['cID'] . "'");
+ elseif($_GET['flag'] == '1') $DB->query($sql="update " . TABLE__DATATYPE_REPLACE_MAJ_ . " set _DATATYPE_REPLACE__status= '1' where _DATATYPE_REPLACE__id = '" . (int)$_GET['cID'] . "'");
+ }
+ }
+
+ if(!isset($_GET['forceajax']))
+ tep_redirect(tep_href_link(self::FILENAME) );
+ break;
+ case 'viewflag':
+ if (isset($_GET['cID'])) {
+ if ($_GET['flag'] == '0') $DB->query($sql="update " . TABLE__DATATYPE_REPLACE_MAJ_ . " set _DATATYPE_REPLACE__hidden = '0' where _DATATYPE_REPLACE__id = '" . (int)$_GET['cID'] . "'");
+ elseif($_GET['flag'] == '1') $DB->query($sql="update " . TABLE__DATATYPE_REPLACE_MAJ_ . " set _DATATYPE_REPLACE__hidden = '1' where _DATATYPE_REPLACE__id = '" . (int)$_GET['cID'] . "'");
+ }
+
+ if(!isset($_GET['forceajax']))
+ tep_redirect(tep_href_link(self::FILENAME, tep_get_all_get_params(array( 'cID','flag','action'),false)) );
+ break;
+
+ case 'insert':
+ $type = ( isset($_POST['_DATATYPE_REPLACE__name']) ? tep_db_prepare_input($_POST['_DATATYPE_REPLACE__name']) : 1 );
+
+ $params['sqlarray'] = array(
+ '_DATATYPE_REPLACE__type' => $type,
+// '_DATATYPE_REPLACE__name' => '',
+ '_DATATYPE_REPLACE__status' => '',
+ );
+
+ $_DATATYPE_REPLACE__id=sql_DATATYPE_REPLACE_::create($params);
+
+ tep_redirect(tep_href_link(self::FILENAME, 'page=' . $_GET['page'] . '&cID=' . $_DATATYPE_REPLACE__id.'&action=edit'));
+
+ break;
+
+ case 'update':
+
+ if (isset($_GET['cID']) && (int)$_GET['cID']>0)
+ $_DATATYPE_REPLACE__id = tep_db_prepare_input($_GET['cID']);
+
+ $params['sqlarray'] = array(
+// '_DATATYPE_REPLACE__name' => tep_db_prepare_input($_POST['_DATATYPE_REPLACE__name']),
+ '_DATATYPE_REPLACE__status' => tep_db_prepare_input($_POST['_DATATYPE_REPLACE__status']),
+ );
+
+ if (isset($_DATATYPE_REPLACE__id))
+ $params['id']=$_DATATYPE_REPLACE__id;
+
+ $params['action']=self::$action;
+ $params['post']=$_POST;
+ $params['language_id']= $languages_id;
+ $params['cPath']=(isset($_POST['cPath'])) ? tep_db_prepare_input($_POST['cPath']) : 0;
+
+ sql_DATATYPE_REPLACE_::update($params);
+
+ if(isset($_POST['up_and_close']) ) tep_redirect(tep_href_link(self::FILENAME, tep_get_all_get_params(array( 'cID','flag','action'),false)) );
+ else tep_redirect(tep_href_link(self::FILENAME, 'page=' . $_GET['page'] . '&cID=' . $_DATATYPE_REPLACE__id.'&action=edit'));
+ break;
+
+
+ /**
+ @remarks Delete post
+ */
+ case 'deleteconfirm':
+ $_DATATYPE_REPLACE__id = tep_db_prepare_input((int)$_GET['cID']);
+
+
+ if( !sql_DATATYPE_REPLACE_::delete(array('id'=>$_DATATYPE_REPLACE__id)) )
+ $messageStack->add_session(sprintf(__('error delet for post id %s'), $_DATATYPE_REPLACE__id ), 'error');
+ else
+ $messageStack->add_session(sprintf(__('delete post id %s success'), $_DATATYPE_REPLACE__id ), 'success');
+
+ tep_redirect(tep_href_link(self::FILENAME, tep_get_all_get_params(array( 'cID','flag','action'),false)));
+ break;
+
+
+
+ /**
+ POST AFFICHAGE
+ */
+ /**
+ @remarks Check count status type. If one status , get next etape
+ */
+ case 'new':
+ $res = tep_get_status_array('_DATATYPE_REPLACE_',0,'status_name');
+
+ if(count($res)==1)
+ tep_redirect(tep_href_link(self::FILENAME, 'action=insert&cID='));
+ break;
+ case 'edit':
+
+ /// Load wysiwyg
+ $oscss->_add_ext(BO_WISIWYG_SELECTED,'editeur/');
+ for ($i=0, $n=sizeof(self::$languages); $i<$n; $i++)
+ echo $oscss->_call(BO_WISIWYG_SELECTED,'_top','_DATATYPE_REPLACE__description[' . self::$languages[$i]['id'] . ']','600','400');
+
+ break;
+
+ default:
+ //! Entretient liens avec categorie
+ sql_DATATYPE_REPLACE_::Maintenance();
+ }
+
+ return self::$action;
+ }
+
+ /**
+ */
+ public function get_header(){
+ self::$modules->get_header_js(self::$action);
+ }
+
+
+ /**
+ @fn load_db_values($ID)
+ @brief this load db value function
+ This method construct static var $cInfo
+ @param $ID integer id _DATATYPE_REPLACE_ | 0
+ @return $cInfo
+ */
+ public static function load_db_values($ID){
+ global $language_id;
+ $DB=Database::getInstance();
+
+ $cID = tep_db_prepare_input((int)$ID);
+
+// if(in_array(self::$action ,array('edit' ,'delete', 'detail') ) )
+// $cInfo_array=sql_DATATYPE_REPLACE_::fetch(array('id'=>$cID,'language_id'=>$language_id));
+// elseif(self::$action == 'new')
+// $cInfo_array = sql_DATATYPE_REPLACE_::Specimen();
+//
+
+
+
+
+
+ $action=self::$action;
+
+ switch ($action) {
+
+ /**
+ @remarks Ajax View result
+ */
+ case 'setflag':
+ break;
+ case 'viewflag':
+ break;
+
+ /**
+ @remarks Normal View Page
+ */
+ case 'delete':
+ break;
+ case 'new':
+ $cInfo_array = sql_DATATYPE_REPLACE_::Specimen();
+ break;
+ case 'detail':
+ case 'edit':
+ $cInfo_array=sql_DATATYPE_REPLACE_::fetch(array('id'=>$cID,'language_id'=>$language_id));
+ break;
+ default:
+ }
+
+
+ self::$cInfo = new objectInfo($cInfo_array);
+
+ if (!isset(self::$cInfo->_DATATYPE_REPLACE__status)) self::$cInfo->_DATATYPE_REPLACE__status = '1';
+ switch (self::$cInfo->_DATATYPE_REPLACE__status) {
+ case '0': self::$enabled_status = false; self::$disabled_status = true; break;
+ case '1':
+ default: self::$enabled_status = true; self::$disabled_status = false;
+ }
+
+ return self::$cInfo;
+ }
+
+ /**
+ @fn display_view()
+ @brief this methode is switch for call gabarit action
+ */
+ public function display_view(){
+ $action=self::$action;
+
+ switch ($action) {
+
+ /**
+ @remarks Ajax View result
+ */
+ case 'setflag':
+ return self::get_item_status(array('_DATATYPE_REPLACE__status'=>(int)$_GET['flag'], '_DATATYPE_REPLACE__id'=>(int)$_GET['cID']));
+ break;
+ case 'viewflag':
+ return self::get_item__DATATYPE_REPLACE__hidden(array('_DATATYPE_REPLACE__hidden'=>(int)$_GET['flag'], '_DATATYPE_REPLACE__id'=>(int)$_GET['cID']));
+ break;
+
+ /**
+ @remarks Normal View Page
+ */
+
+ case 'delete':
+ self::load_db_values($_GET['cID']);
+ break;
+ case 'edit':
+ self::load_db_values($_GET['cID']);
+ break;
+ case 'new':
+ self::load_db_values(-1);
+// $action='edit';
+ break;
+ default:
+ self::tep_get_list();
+ $action='listing';
+ }
+ /// use master gabarit
+ return MGabCont::CallGab($action,__FUNCTION__,__CLASS__);
+ }
+
+
+
+
+ /** public static InterfacedTJsonS */
+
+ /**
+ @fn get_item_action($_DATATYPE_REPLACE_)
+ @brief private model for row action
+ @param $_DATATYPE_REPLACE_ array
+ */
+ private static function get_item_action($_DATATYPE_REPLACE_){
+ return sprintf(
+ CsrtAction::getFormat('row_action'),
+ self::$modules->display_ColumnRowAction($_DATATYPE_REPLACE_['_DATATYPE_REPLACE__id']) ,
+ sprintf(CsrtAction::getLink('row_action_right', IMAGE_EDIT, 'edit'), '', tep_href_link(self::FILENAME, 'cID=' . $_DATATYPE_REPLACE_['_DATATYPE_REPLACE__id'] . '&action=edit') ,'' ).
+ sprintf(CsrtAction::getLink('row_action_right', IMAGE_DELETE, 'delete'), 'fancy', tep_href_link(self::FILENAME, 'cID=' . $_DATATYPE_REPLACE_['_DATATYPE_REPLACE__id'] . '&action=delete') ,'' )
+ );
+ }
+
+ /**
+ @fn get_item_status($_DATATYPE_REPLACE_)
+ @brief private model for row status
+ @param $_DATATYPE_REPLACE_ array
+ */
+ private static function get_item_status($_DATATYPE_REPLACE_){
+ $exclude=array('action','cID','forceajax','type','class','function','funct', 'mod');
+ $query_s='action=setflag&cID=' . $_DATATYPE_REPLACE_['_DATATYPE_REPLACE__id'].'&flag=';
+
+ return '<a class="ajaxinline" href="' . tep_href_link(self::FILENAME, tep_get_all_get_params($exclude).$query_s.(($_DATATYPE_REPLACE_['_DATATYPE_REPLACE__status'] == '1')? '0' : '1') ) . '">'.
+ sprintf(
+ CsrtAction::getFormat('row_flag'),
+ (int)$_DATATYPE_REPLACE_['_DATATYPE_REPLACE__status'],
+ ( ($_DATATYPE_REPLACE_['_DATATYPE_REPLACE__status'] == '1')? IMAGE_ICON_STATUS_GREEN : IMAGE_ICON_STATUS_RED)
+ ).
+ '</a>';
+ }
+
+ /**
+ @fn get_item__DATATYPE_REPLACE__hidden($_DATATYPE_REPLACE_)
+ @brief private model for row hidden
+ @param $_DATATYPE_REPLACE_ array
+ */
+ private static function get_item__DATATYPE_REPLACE__hidden($_DATATYPE_REPLACE_){
+
+ $exclude=array('action','cID','forceajax','type','class','function','funct', 'mod');
+ $query_s='action=viewflag&cID=' . $_DATATYPE_REPLACE_['_DATATYPE_REPLACE__id'].'&flag=';
+
+ return '<a class="ajaxinline" href="' . tep_href_link(self::FILENAME, tep_get_all_get_params($exclude).$query_s.(($_DATATYPE_REPLACE_['_DATATYPE_REPLACE__hidden'] == '1')? '0' : '1') ) . '">'.
+ sprintf(
+ CsrtAction::getFormat('row_flag'),
+ (int)$_DATATYPE_REPLACE_['_DATATYPE_REPLACE__hidden'],
+ ( ($_DATATYPE_REPLACE_['_DATATYPE_REPLACE__hidden'] == '1')? IMAGE_ICON_STATUS_GREEN : IMAGE_ICON_STATUS_RED)
+ ).
+ '</a>';
+ }
+
+ /**
+ @fn emptyResult()
+ @brief private methode for construct empty result retrun by tep_get_list
+ @return array
+ */
+ private static function emptyResult(){
+ return array( 'null',
+ '_DATATYPE_REPLACE__id',
+// '_DATATYPE_REPLACE__name',
+ '_DATATYPE_REPLACE__title',
+ 'categories_name',
+ 'date_added',
+ '_DATATYPE_REPLACE__status',
+ '_DATATYPE_REPLACE__hidden',
+ 'action'
+ );
+ }
+
+ /**
+ @fn tep_get_modele()
+ @brief this array is rows in listing, the value boolean is sort active/inactive
+ @return array
+ */
+ public static function tep_get_modele(){
+ return array( 0=>false,
+ '_DATATYPE_REPLACE__id'=>true,
+// '_DATATYPE_REPLACE__name'=>true,
+ '_DATATYPE_REPLACE__title'=>true,
+ 'categories_name'=>false,
+ 'date_added'=>true,
+ '_DATATYPE_REPLACE__status'=>true,
+ '_DATATYPE_REPLACE__hidden'=>true,
+ 'action'=>false
+ );
+ }
+
+ /**
+ @fn tep_get_list($page=1,$rowbyp=10,$sOrder='',$sWhere='',$options='')
+ @brief Constructeur listing element cms _DATATYPE_REPLACE_
+ @param $page integer default(1) split page
+ @param $rowbyp integer default(10) nbr line in page
+ @param $sOrder string | null
+ @param $sWhere string | null
+ @param $options array
+ @return Array
+ */
+ public static function tep_get_list($page=1,$rowbyp=10,$sOrder='',$sWhere='',$options=''){
+ global $query_numrows,$languages_id;
+
+ new self;
+
+ $DB=Database::getInstance();
+
+ $sWhere=str_replace('_DATATYPE_REPLACE__id','c._DATATYPE_REPLACE__id',$sWhere);
+ if(isset($_GET['cPath']) && (int)$_GET['cPath'] > 0) $sWhere .=" AND categories_id='". (int)tep_db_prepare_input($_GET['cPath'])."' ";
+
+ $query_raw = "SELECT DISTINCT c._DATATYPE_REPLACE__id, _DATATYPE_REPLACE__title, date_added, _DATATYPE_REPLACE__title, last_modified, _DATATYPE_REPLACE__status, _DATATYPE_REPLACE__hidden FROM " . TABLE__DATATYPE_REPLACE_MAJ_ . " c ," . TABLE__DATATYPE_REPLACE_MAJ__DESCRIPTION . " cd, " . TABLE__DATATYPE_REPLACE_MAJ__TO_CATEGORIES . " p2c WHERE c._DATATYPE_REPLACE__id =cd._DATATYPE_REPLACE__id AND cd.language_id='".(int)$languages_id."' AND c._DATATYPE_REPLACE__id=p2c._DATATYPE_REPLACE__id ".$sWhere." ORDER BY ".((!empty($sOrder)) ? $sOrder :'date_added DESC') ;
+
+ $split = new splitPageResults($page, $rowbyp, $query_raw, $query_numrows);
+
+ $_query = $DB->query($query_raw);
+
+ while ($ressql = $_query->fetchAssoc() ) {
+ $ressql['date_added']=tep_date_short($ressql['date_added']);
+ $ressql['categories_name']='';
+ $objres=$DB->query("SELECT categories_name FROM " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd , " . TABLE__DATATYPE_REPLACE_MAJ__TO_CATEGORIES . " p2c WHERE c.categories_id=cd.categories_id AND cd.language_id = '" . (int)$languages_id . "' AND c.categories_id=p2c.categories_id and _DATATYPE_REPLACE__id='".$ressql['_DATATYPE_REPLACE__id']."' ");
+ $res=$objres->fetchAllAssoc();
+
+ foreach($res as $cat)
+ $ressql['categories_name'] .=','.$cat['categories_name'];
+
+ if(strlen($ressql['categories_name'])>25)$ressql['categories_name']= substr($ressql['categories_name'],0 ,20).'...';
+
+
+ $ressql[0]=$ressql['_DATATYPE_REPLACE__id'];
+ $ressql['_DATATYPE_REPLACE__status']=self::get_item_status($ressql);
+ $ressql['_DATATYPE_REPLACE__hidden']=self::get_item__DATATYPE_REPLACE__hidden($ressql);
+ $ressql['action']=self::get_item_action($ressql);
+ self::$list[]=$ressql;
+ }
+
+ $li=$res=array();
+ foreach(self::$list as $item){
+ foreach(self::tep_get_modele() as $k=>$v) $li[$k]=(tep_not_null($item[$k]))?$item[$k]:' ';
+ $res[]=$li;
+ }
+
+ if(count($res)==0) $res[]= self::emptyResult();
+ return $res;
+ }
+
+
+ /** static InterfacedInnerHtml */
+
+ /**
+ @fn detail_row_page($id)
+ @brief call Ajax , detail of line in listing
+ @param $id int _DATATYPE_REPLACE__id
+ */
+ public static function detail_row_page($id){
+ self::$action ='detail';
+ self::GetConf();
+ self::load_db_values((int)$id);
+ return MGabCont::CallGab('inline','display_view',__CLASS__);
+ }
+
+
+
+/** Interface module */
+
+ function check() { return false; }
+ function install() { return false; }
+ function remove() { return false; }
+ function keys() { return false; }
+}
+
+
+?>
\ No newline at end of file
Added: trunk/dev/datatype/Modele/catalog/common/classes/datatype_drivers/Data__DATATYPE_REPLACE_.php
===================================================================
--- trunk/dev/datatype/Modele/catalog/common/classes/datatype_drivers/Data__DATATYPE_REPLACE_.php (rev 0)
+++ trunk/dev/datatype/Modele/catalog/common/classes/datatype_drivers/Data__DATATYPE_REPLACE_.php 2012-04-04 22:09:27 UTC (rev 4151)
@@ -0,0 +1,191 @@
+<?php if (!defined('HTTP_SERVER')) die('You can not access this file directly!');
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 04/03/2012, 21:54
+ @author genrated by dev/datatype/generat
+ @encode UTF-8
+ @class Data__DATATYPE_REPLACE_
+ @brief This class is base datatype for _DATATYPE_REPLACE_
+*/
+
+class Data__DATATYPE_REPLACE_ {
+
+
+ /**
+ @var DataType string
+ */
+ public $DataType = '_DATATYPE_REPLACE_';
+
+ /**
+ @var DataType array reg for seo class
+ */
+ public $reg_anchors = array(
+ '_DATATYPE_REPLACE_' => '_DATATYPE_REPLACE_SEOTAG_'
+ );
+
+ /**
+ @var DataType files for folder /_DATATYPE_REPLACE_
+ */
+ public $reg_filenames = array(
+ 'FILENAME__DATATYPE_REPLACE_' => FILENAME_DEFAULT // unique page
+ );
+
+ /**
+ @var DataType array reg check for control get params , please respect order $reg_anchors
+ */
+ public $reg_check = array(
+ '([0-9]*)' // unique page
+ );
+ /**
+ @var DataType dynamic
+ */
+ public $DataTypeDynamic = true;
+ /**
+ @var prefix alias a utilise systematiquement dans les requete sql
+ */
+ public $p = '_DATATYPE_REPLACE_SEOTAG_xx';
+ /**
+ @var base listing sql
+ */
+ public $listing_sql;
+
+ /**
+ @brief constructor
+ */
+ function __construct(){
+ global $languages_id;
+
+ $this->listing_sql['tables'] = " FROM " . TABLE__DATATYPE_REPLACE_MAJ_ . " ".$this->p." ".
+ " LEFT JOIN " . TABLE__DATATYPE_REPLACE_MAJ__DESCRIPTION . " ".$this->p."d ON( ".$this->p."d._DATATYPE_REPLACE__id = ".$this->p."._DATATYPE_REPLACE__id AND ".$this->p."d.language_id = '" . (int)$languages_id . "' ) ".
+ "";
+
+ $this->listing_sql['where'] = " WHERE ".$this->p."._DATATYPE_REPLACE__status = '1' ";
+ $this->listing_sql['sort'] = " ".$this->p."d._DATATYPE_REPLACE__title ";
+ $this->listing_sql['base_key'] = "_DATATYPE_REPLACE__id ";
+ $this->listing_sql['col_count'] = " ".$this->p."._DATATYPE_REPLACE__id ";
+ foreach($this->reg_filenames as $key=>$row)
+ if(!defined($key))define($key, $row);
+ }
+
+ /**
+ @brief test si al page est du type produits
+ @param $mode le type de control (page/cpath/seo)
+ */
+ function is_type($mode='unique'){
+ switch(strtolower($mode)){
+ case 'cpath':
+ if( isset($_GET['_DATATYPE_REPLACE_']) && is_numeric($_GET['_DATATYPE_REPLACE_']) )
+ return true;
+ break;
+ case 'unique':
+// default:
+ if(isset($_GET['_DATATYPE_REPLACE_']) && ( is_int($_GET['_DATATYPE_REPLACE_']) || is_numeric($_GET['_DATATYPE_REPLACE_'])) )
+ return true;
+ break;
+ }
+ return false;
+ }
+
+
+ /**
+ @brief calcul du cpath specifique a ce tyep de donnée
+ */
+ function GetcPath(){
+ return _DATATYPE_REPLACE_::get__DATATYPE_REPLACE__path($_GET['_DATATYPE_REPLACE_']);
+ }
+
+ /**
+ @brief Prepare an retrun result Seo request
+ @param $mode string anchor key used
+ @param $subtype Not used
+ @param $id integer current id
+ @param $language_id integer current language id
+ @return array (
+ ID => '',
+ tName => '',
+ head_desc_tag => '',
+ head_keywords_tag =>''
+ )
+ */
+ public function SeoGetQuery($mode, $subtype, $id, $language_id){
+ $DB=Database::getInstance();
+
+ switch($mode){
+ case 't':
+ default:
+ $sql = "select ft.page_id as ID, head_title_tag as tName, head_desc_tag, head_keywords_tag from " . TABLE_FULL_TAG . " ft, " . TABLE_FULL_TAG_DESCRIPTION . " ftd where ft.tag_id=ftd.tag_id and ft.page_type='".$this->DataType."' and ftd.language_id = '" . (int)$language_id. "' Limit 1";
+ $rsql = $DB->query($sql);
+ if(!$rsql->__get('numRows')) {
+ $sql = "select c._DATATYPE_REPLACE__id as ID, _DATATYPE_REPLACE__title as tName from " . TABLE__DATATYPE_REPLACE_MAJ_ . " c LEFT JOIN " . TABLE__DATATYPE_REPLACE_MAJ__DESCRIPTION . " cd ON(c._DATATYPE_REPLACE__id=cd._DATATYPE_REPLACE__id) where c._DATATYPE_REPLACE__status = '1' and c._DATATYPE_REPLACE__id='".(int)$id."' and cd.language_id='".(int)$language_id."' Limit 1" ;
+ $rsql = $DB->query($sql);
+ }
+ $result = $rsql->fetchAssoc();
+ $result['head_desc_tag']=(isset($result['head_desc_tag'])?$result['head_desc_tag']:'');
+ $result['head_keywords_tag']=(isset($result['head_keywords_tag'])?$result['head_keywords_tag']:'');
+
+ $result['sql']=$sql;
+ }
+
+ return $result;
+ }
+
+ /**
+ @brief Prepare an dgenere all cache for divers
+ */
+ public function SeoCacheQuery(/*$language_id*/){
+ global $languages_id;
+ $DB=Database::getInstance();
+ $return_array = array();
+
+ if( _test_bool('SEO_ADD_CAT_PARENT') )
+ $res=$DB->query( "select ft.page_id as ID, head_title_tag as tName, head_desc_tag, head_keywords_tag from " . TABLE_FULL_TAG . " ft, " . TABLE_FULL_TAG_DESCRIPTION . " ftd where ft.tag_id=ftd.tag_id and ft.page_type='_DATATYPE_REPLACE_' and ftd.language_id = '" . (int)$languages_id. "'" );
+ else
+ $res=$DB->query( $sql="SELECT DISTINCT ft.page_id as ID , head_title_tag as tName, head_desc_tag, head_keywords_tag, cd.categories_cpath from " . TABLE_FULL_TAG . " ft LEFT JOIN ".TABLE__DATATYPE_REPLACE_MAJ__TO_CATEGORIES." cd2 ON page_id=cd2._DATATYPE_REPLACE__id JOIN ".TABLE_CATEGORIES." cd ON cd.categories_id = cd2.categories_id , " . TABLE_FULL_TAG_DESCRIPTION . " ftd where ft.tag_id=ftd.tag_id and ft.page_type='_DATATYPE_REPLACE_' and ftd.language_id = '" . (int)$languages_id. "' GROUP BY ID" );
+
+ while ($result =$res->fetchAssoc()){
+ $path = '';
+
+ if(isset($result['cat...
[truncated message content] |
|
From: <os...@us...> - 2012-04-04 21:06:28
|
Revision: 4150
http://oscss.svn.sourceforge.net/oscss/?rev=4150&view=rev
Author: oscim
Date: 2012-04-04 21:06:20 +0000 (Wed, 04 Apr 2012)
Log Message:
-----------
Amelioration des drivers de DataTypes, et suppression des en dur dans la prise en charge des liaison entre les datatypeRootlisting et leur enfants
Prise en charge du calcul du cpath de maniere dynamique
normalisation des drivers.xxx public , et des appels crois?\195?\169s
correction coquille
Modified Paths:
--------------
trunk/catalog/admin/includes/classes/drivers/sqlcontent.php
trunk/catalog/admin/includes/gabarit/cms_content/display_view.inline.gab
trunk/catalog/admin/includes/languages/fr_FR/boxes/04_tools.php
trunk/catalog/common/classes/DataTypes.php
trunk/catalog/common/classes/datatype_drivers/Data_categorie.php
trunk/catalog/common/classes/datatype_drivers/Data_content.php
trunk/catalog/common/classes/datatype_drivers/Data_manufacturer.php
trunk/catalog/common/classes/datatype_drivers/Data_product.php
trunk/catalog/includes/application_top.php
trunk/catalog/includes/classes/core_page/listing.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/page.php
trunk/catalog/index.php
Modified: trunk/catalog/admin/includes/classes/drivers/sqlcontent.php
===================================================================
--- trunk/catalog/admin/includes/classes/drivers/sqlcontent.php 2012-04-04 13:32:39 UTC (rev 4149)
+++ trunk/catalog/admin/includes/classes/drivers/sqlcontent.php 2012-04-04 21:06:20 UTC (rev 4150)
@@ -412,51 +412,41 @@
switch($type){
- case 'link':
- $check_query = $DB->query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . $pid . "' and categories_id = '" . $catid . "'");
- $check = $check_query->fetchAssoc();
- if ($check['total'] < '1') {
- $DB->query("insert into " . TABLE_PRODUCTS_TO_CATEGORIES . " (products_id, categories_id) values ('" . $pid . "', '" . $catid . "')");
- }
-
- $products_id = $pid;
- break;
-
case 'duplicate':
default:
- $product_query = $DB->query("select products_type, products_quantity, products_model, products_image, products_price, products_date_available, products_weight, products_tax_class_id, manufacturers_id from " . TABLE_PRODUCTS . " where products_id = '" . $pid . "'");
- $product = $product_query->fetchAssoc();
+// $product_query = $DB->query("select products_type, products_quantity, products_model, products_image, products_price, products_date_available, products_weight, products_tax_class_id, manufacturers_id from " . TABLE_PRODUCTS . " where products_id = '" . $pid . "'");
+// $product = $product_query->fetchAssoc();
+//
+// $resobj=$DB->query("insert into " . TABLE_PRODUCTS . " (products_type, products_quantity, products_model,products_image, products_price, products_date_added, products_date_available, products_weight, products_status, products_tax_class_id, manufacturers_id) values ('" . tep_db_input($product['products_type']) . "','" . tep_db_input($product['products_quantity']) . "', '" . tep_db_input($product['products_model']) . "', '" . tep_db_input($product['products_image']) . "', '" . tep_db_input($product['products_price']) . "', now(), " . (empty($product['products_date_available']) ? "null" : "'" . tep_db_input($product['products_date_available']) . "'") . ", '" . tep_db_input($product['products_weight']) . "', '0', '" . (int)$product['products_tax_class_id'] . "', '" . (int)$product['manufacturers_id'] . "')");
+//
+// $dup_products_id = tep_db_insert_id($resobj);
+//
+//
+// $description_query = $DB->query("select language_id, products_name, products_description, products_url from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . $pid . "'");
+// while ($description =$description_query->fetchAssoc()) {
+// $DB->query("insert into " . TABLE_PRODUCTS_DESCRIPTION . " (products_id, language_id, products_name, products_description, products_url, products_viewed) values ('" . (int)$dup_products_id . "', '" . (int)$description['language_id'] . "', '" . tep_db_input($description['products_name']) . "', '" . tep_db_input($description['products_description']) . "', '" . tep_db_input($description['products_url']) . "', '0')");
+// }
+//
+// $DB->query("insert into " . TABLE_PRODUCTS_TO_CATEGORIES . " (products_id, categories_id) values ('" . (int)$dup_products_id . "', '" . $catid . "')");
+//
+// // BOF Separate Pricing Per Customer
+// $cg_price_query = $DB->query("select customers_group_id, customers_group_price from " . TABLE_PRODUCTS_GROUPS . " where products_id = '" . $pid . "' order by customers_group_id");
+//
+// // insert customer group prices in table products_groups when there are any for the copied product
+// if ($cg_price_query->__get('numRows') > 0) {
+// while ( $cg_prices = $cg_price_query->fetchAssoc()) {
+// $DB->query("insert into " . TABLE_PRODUCTS_GROUPS . " (customers_group_id, customers_group_price, products_id) values ('" . (int)$cg_prices['customers_group_id'] . "', '" . tep_db_input($cg_prices['customers_group_price']) . "', '" . (int)$dup_products_id . "')");
+// }
+// }
+//
+// // ACA START DUPLICATE PRODUCT
+// self::$modules->duplicate_product($products_id,$dup_products_id);
+//
+//
+// $products_id = $dup_products_id;
- $resobj=$DB->query("insert into " . TABLE_PRODUCTS . " (products_type, products_quantity, products_model,products_image, products_price, products_date_added, products_date_available, products_weight, products_status, products_tax_class_id, manufacturers_id) values ('" . tep_db_input($product['products_type']) . "','" . tep_db_input($product['products_quantity']) . "', '" . tep_db_input($product['products_model']) . "', '" . tep_db_input($product['products_image']) . "', '" . tep_db_input($product['products_price']) . "', now(), " . (empty($product['products_date_available']) ? "null" : "'" . tep_db_input($product['products_date_available']) . "'") . ", '" . tep_db_input($product['products_weight']) . "', '0', '" . (int)$product['products_tax_class_id'] . "', '" . (int)$product['manufacturers_id'] . "')");
- $dup_products_id = tep_db_insert_id($resobj);
-
-
- $description_query = $DB->query("select language_id, products_name, products_description, products_url from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . $pid . "'");
- while ($description =$description_query->fetchAssoc()) {
- $DB->query("insert into " . TABLE_PRODUCTS_DESCRIPTION . " (products_id, language_id, products_name, products_description, products_url, products_viewed) values ('" . (int)$dup_products_id . "', '" . (int)$description['language_id'] . "', '" . tep_db_input($description['products_name']) . "', '" . tep_db_input($description['products_description']) . "', '" . tep_db_input($description['products_url']) . "', '0')");
- }
-
- $DB->query("insert into " . TABLE_PRODUCTS_TO_CATEGORIES . " (products_id, categories_id) values ('" . (int)$dup_products_id . "', '" . $catid . "')");
-
- // BOF Separate Pricing Per Customer
- $cg_price_query = $DB->query("select customers_group_id, customers_group_price from " . TABLE_PRODUCTS_GROUPS . " where products_id = '" . $pid . "' order by customers_group_id");
-
- // insert customer group prices in table products_groups when there are any for the copied product
- if ($cg_price_query->__get('numRows') > 0) {
- while ( $cg_prices = $cg_price_query->fetchAssoc()) {
- $DB->query("insert into " . TABLE_PRODUCTS_GROUPS . " (customers_group_id, customers_group_price, products_id) values ('" . (int)$cg_prices['customers_group_id'] . "', '" . tep_db_input($cg_prices['customers_group_price']) . "', '" . (int)$dup_products_id . "')");
- }
- }
-
- // ACA START DUPLICATE PRODUCT
- self::$modules->duplicate_product($products_id,$dup_products_id);
-
-
- $products_id = $dup_products_id;
-
-
}
Modified: trunk/catalog/admin/includes/gabarit/cms_content/display_view.inline.gab
===================================================================
--- trunk/catalog/admin/includes/gabarit/cms_content/display_view.inline.gab 2012-04-04 13:32:39 UTC (rev 4149)
+++ trunk/catalog/admin/includes/gabarit/cms_content/display_view.inline.gab 2012-04-04 21:06:20 UTC (rev 4150)
@@ -1,10 +1,10 @@
<?php
/**
- @licence GPL 2005-2011 The osCSS developers - osCSS Open Source E-commerce
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
@portion code Copyright (c) 2002 osCommerce
@package osCSS-2 <www http://www.oscss.org>
@version 2.1.1
- @date 01/10/11, 11:31
+ @date 04/04/2012, 11:31
@author oscim <mail aur...@os...> <www http://www.oscim.fr>
@encode UTF-8
*/
@@ -18,7 +18,8 @@
<li><strong><?php echo __('text info date added'); ?> </strong><?php echo tep_date_short( cms_content::$cInfo->date_added) ?></li>
<li><strong><?php echo __('text info last modified'); ?> </strong><?php echo tep_date_short( cms_content::$cInfo->last_modified) ?></li>
<?php foreach(cms_content::$languages as $lg ): ?>
- <li><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $lg['directory'] . '/images/' . $lg['image'], $lg['name']) .' '. __('text info content size') . ' ' . (isset( cms_content::$cInfo->content_text_size[$lg['id']])? cms_content::$cInfo->content_text_size[$i]:0) . ' '.__('bytes') ?></li>
+ <li><?php echo tep_language_image( $lg['directory'] . '/images/' . $lg['image'], $lg['name']) .' '. __('text info content size') . ' ' . (isset(
+cms_content::$cInfo->content_text_size[$lg['id']])? cms_content::$cInfo->content_text_size[$i]:0) . ' '.__('bytes') ?></li>
<?php endforeach; ?>
</ul>
</div>
Modified: trunk/catalog/admin/includes/languages/fr_FR/boxes/04_tools.php
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/boxes/04_tools.php 2012-04-04 13:32:39 UTC (rev 4149)
+++ trunk/catalog/admin/includes/languages/fr_FR/boxes/04_tools.php 2012-04-04 21:06:20 UTC (rev 4150)
@@ -37,4 +37,8 @@
/* Begin MANAGELOG_stable - installed by CIP */
define('BOX_TOOLS_MANAGELOG', 'Fichier de Logs');
/* End MANAGELOG_stable - installed by CIP */
+
+/* Begin ANNUAIRE_stable - installed by CIP */
+define('BOX_TOOLS_ANNUAIRE', 'Datatype ANNUAIRE');
+/* End ANNUAIRE_stable - installed by CIP */
?>
\ No newline at end of file
Modified: trunk/catalog/common/classes/DataTypes.php
===================================================================
--- trunk/catalog/common/classes/DataTypes.php 2012-04-04 13:32:39 UTC (rev 4149)
+++ trunk/catalog/common/classes/DataTypes.php 2012-04-04 21:06:20 UTC (rev 4150)
@@ -322,15 +322,19 @@
if(empty($type))
$type = self::$subDataType;
+ foreach(self::$env->modlist as $class=>$module){
- foreach(self::$env->modlist as $class=>$module){
+
+ if(isset(self::$env->RootListing[$class]) && is_array(self::$env->RootListing[$class]))
+
if(
( isset(self::$env->RootListing[$class]) && is_array(self::$env->RootListing[$class]) && count(self::$env->RootListing[$class])>0 )// this module is RootListing (manufacturer, categories)
&& in_array($type, $module->RootListing) // RootListing array require content current type
&& $module->is_type($mode) // is_type actif
+// && ( $module->DataType == $type )
){
- $module->FO_load_listing($type);
+ $module->FO_load_listing($type, self::$env->modlist['Data_'.$type]);
$module->FO_load_page($mode);
}
Modified: trunk/catalog/common/classes/datatype_drivers/Data_categorie.php
===================================================================
--- trunk/catalog/common/classes/datatype_drivers/Data_categorie.php 2012-04-04 13:32:39 UTC (rev 4149)
+++ trunk/catalog/common/classes/datatype_drivers/Data_categorie.php 2012-04-04 21:06:20 UTC (rev 4150)
@@ -49,9 +49,16 @@
@var DataType root listing
Use for generate listing based on current data type precised in array
*/
- public $RootListing = array('product', 'content', 'nested');
+ public $RootListing = array('annuaire', 'product', 'content', 'nested');
+
/**
+ @var type subchilds result calculate
+ */
+// public $ChildsType;
+
+
+ /**
@brief constructor
*/
public function __construct(){
@@ -94,26 +101,37 @@
// elseif($current_category_id==0)$category_depth = 'top';
else {
- if(in_array('product', explode(',', $categories->datatype) ) || empty($categories->datatype) ){
- $count_p=categorie::get_count_products_in_category((int)$current_category_id);
- if ($count_p > 0 ){
- $category_depth = 'products';
- $childs_type = 'product';
- DataTypes::ForceChilds($this->DataType, $childs_type);
+ foreach($this->RootListing as $row){
+
+ if(in_array($row, explode(',', $categories->datatype) ) && class_exists($row) ){
+
+ $count_c=$row::get_count_in_category((int)$current_category_id);
+ if ($count_c > 0 ){
+ $category_depth = $row;
+ $childs_type = $row;
+ DataTypes::ForceChilds($this->DataType, $childs_type);
+ break;
+ }
+ else
+ continue;
+// $category_depth = 'empty';
}
- else $category_depth = 'empty';
- }
- elseif(in_array('content', explode(',', $categories->datatype) ) ){
- $count_c=categorie::get_count_content_in_category((int)$current_category_id);
- if ($count_c > 0 ){
- $category_depth = 'pages';
- $childs_type = 'content';
- DataTypes::ForceChilds($this->DataType, $childs_type);
+ elseif( empty($categories->datatype) ){
+ $count_p=product::get_count_in_category((int)$current_category_id);
+ if ($count_p > 0 ){
+ $category_depth = 'products';
+ $childs_type = 'product';
+ DataTypes::ForceChilds($this->DataType, $childs_type);
+ }
+ else
+ continue;
+// $category_depth = 'empty';
}
- else $category_depth = 'empty';
+ else
+ $category_depth = 'empty';
+// else
+// $category_depth = 'nofound';
}
- else
- $category_depth = 'nofound';
}
@@ -220,15 +238,16 @@
/**
@brief chargement des données transversal
+ @param $type string name childs type for listing
+ @param subtype object childs DataType
*/
- public function FO_load_listing($type){
+ public function FO_load_listing($type, $subtype){
global $current_category_id, $languages_id, $list;
$page = page::getInstance();
$category_depth = $page->GetVar('category_depth');
$this->ChildsType = $type;
-
/**
@remarks define all var for exec listing + split_page
sql Select , but no order
@@ -238,40 +257,30 @@
for split_page colum count
$this->listing_col_count
*/
- switch(strtolower($type)){
- case 'product':
- if($category_depth == 'nested'){
- $this->listing_sql = "select DISTINCT p.products_id from ".TABLE_PRODUCTS." p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " cat WHERE p.products_status > 0 AND cat.categories_id=p2c.categories_id and cat.categories_status='1' AND pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id ".(tep_not_null($list)? " AND p2c.categories_id IN (" . $list . ")" : '');
- $this->listing_sort = " cat.sort_order, pd.products_name ";
- }
- else{
- $this->listing_sql = "select DISTINCT p.products_id from ".TABLE_PRODUCTS." p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " cat WHERE p.products_status > 0 AND cat.categories_id=p2c.categories_id and cat.categories_status='1' AND pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id and c.categories_id = '" . (int)$current_category_id . "' ";
- $this->listing_sort = " pd.products_name ";
- }
-
- $this->listing_col_count = " p.products_id ";
- break;
- case 'content':
- if($category_depth == 'nested'){
- $this->listing_sql = "select DISTINCT c.content_id from " . TABLE_CONTENT_DESCRIPTION . " cd, " . TABLE_CONTENT . " c, " . TABLE_CONTENT_TO_CATEGORIES . " ctc, " . TABLE_CATEGORIES . " cat where cat.categories_id=ctc.categories_id and cat.categories_status='1' and c.content_status = '1' and c.content_id = ctc.content_id and cd.content_id = ctc.content_id and cd.language_id = '" . (int)$languages_id . "' ".(tep_not_null($list)? " AND p2c.categories_id IN (" . $list . ")" : '');
- $this->listing_sort = " cat.sort_order, cd.content_title ";
- }
- else{
- $this->listing_sql = "SELECT DISTINCT c.content_id from " . TABLE_CONTENT . " c ".
- " LEFT JOIN " . TABLE_CONTENT_DESCRIPTION . " cd ON( cd.content_id = c.content_id AND cd.language_id = '" . (int)$languages_id . "' ) ".
- " LEFT JOIN " . TABLE_CONTENT_TO_CATEGORIES . " ctc ON(c.content_id = ctc.content_id ) ".
- " LEFT JOIN " . TABLE_CATEGORIES . " cat ON(cat.categories_id=ctc.categories_id AND cat.categories_status='1') ".
- " WHERE c.content_status = '1' AND cat.categories_id = '" . (int)$current_category_id . "' ".
-// " GROUP BY c.content_id ".
- "";
- $this->listing_sort = " cd.content_title ";
- }
- // for split_page colum count
- $this->listing_col_count = " c.content_id ";
+ $sql_tmp = $subtype->listing_sql;
- break;
+ $this->listing_sql =
+ "SELECT DISTINCT ". $sql_tmp['col_count'] ." ".
+ $sql_tmp['tables'] .
+ " LEFT JOIN " . constant(strtoupper('TABLE_'.$type.'_TO_CATEGORIES')) . " ".$subtype->p."2c ON(".$subtype->p.".". $sql_tmp['base_key'] ." = ".$subtype->p."2c.". $sql_tmp['base_key'] ." ) ".
+ " LEFT JOIN " . TABLE_CATEGORIES . " cat ON(cat.categories_id=".$subtype->p."2c.categories_id AND cat.categories_status='1') ".
+ $sql_tmp['where'] .
+ "";
+ $this->listing_sort = $sql_tmp['sort'] ;
+ $this->listing_col_count = $sql_tmp['col_count'] ;
+
+
+
+
+
+ if($category_depth == 'nested'){
+ $this->listing_sql .= (tep_not_null($list)? " AND ".$subtype->p."2c.categories_id IN (" . $list . ")" : '');
+ $this->listing_sort = " cat.sort_order, ". $this->listing_sort ;
}
+ else{
+ $this->listing_sql .= " AND cat.categories_id = '" . (int)$current_category_id . "' ";
+ }
}
/**
@@ -287,7 +296,6 @@
case 'transversal':
case 'listing':
-
$category_depth = $page->GetVar('category_depth');
$current_category_id = $page->GetVar('current_category_id');
@@ -323,6 +331,7 @@
$obj->image = $categories->categories_image;
$obj->name = $categories->categories_name;
$obj->description = $categories->categories_description;
+
$page->add_var_page('RootListing',$obj);
break;
Modified: trunk/catalog/common/classes/datatype_drivers/Data_content.php
===================================================================
--- trunk/catalog/common/classes/datatype_drivers/Data_content.php 2012-04-04 13:32:39 UTC (rev 4149)
+++ trunk/catalog/common/classes/datatype_drivers/Data_content.php 2012-04-04 21:06:20 UTC (rev 4150)
@@ -18,39 +18,53 @@
@var DataType string
*/
public $DataType = 'content';
-
/**
@var DataType array reg for seo class
*/
public $reg_anchors = array(
'content' => 't'
);
-
/**
@var DataType files for folder /content
*/
public $reg_filenames = array(
'FILENAME_CONTENT' => FILENAME_DEFAULT // unique page
);
-
/**
@var DataType array reg check for control get params , please respect order $reg_anchors
*/
public $reg_check = array(
'([0-9]*)' // unique page
);
-
-
/**
@var DataType dynamic
*/
public $DataTypeDynamic = true;
+ /**
+ @var prefix alias a utilise systematiquement dans les requete sql
+ */
+ public $p = 'c';
+ /**
+ @var base listing sql
+ */
+ public $listing_sql;
-
/**
@brief constructor
*/
function __construct(){
+ global $languages_id;
+
+ $this->listing_sql['tables'] = " FROM " . TABLE_CONTENT . " ".$this->p." ".
+ " LEFT JOIN " . TABLE_CONTENT_DESCRIPTION . " ".$this->p."d ON( ".$this->p."d.content_id = ".$this->p.".content_id AND ".$this->p."d.language_id = '" . (int)$languages_id . "' ) ".
+ "";
+
+ $this->listing_sql['where'] = " WHERE ".$this->p.".content_status = '1' ";
+ $this->listing_sql['sort'] = " ".$this->p."d.content_title ";
+ $this->listing_sql['base_key'] = "content_id ";
+ $this->listing_sql['col_count'] = " ".$this->p.".content_id ";
+
+
foreach($this->reg_filenames as $key=>$row)
if(!defined($key))define($key, $row);
}
@@ -61,17 +75,11 @@
*/
function is_type($mode='unique'){
switch(strtolower($mode)){
- case 'listing':
- $page = page::getInstance();
- if( $page->GetVar('category_depth') == $this->DataType )
- return true;
- break;
case 'cpath':
if( isset($_GET['content']) && is_numeric($_GET['content']) )
return true;
break;
case 'unique':
-// default:
if(isset($_GET['content']) && ( is_int($_GET['content']) || is_numeric($_GET['content'])) )
return true;
break;
Modified: trunk/catalog/common/classes/datatype_drivers/Data_manufacturer.php
===================================================================
--- trunk/catalog/common/classes/datatype_drivers/Data_manufacturer.php 2012-04-04 13:32:39 UTC (rev 4149)
+++ trunk/catalog/common/classes/datatype_drivers/Data_manufacturer.php 2012-04-04 21:06:20 UTC (rev 4150)
@@ -72,7 +72,7 @@
$category_depth = $page->GetVar('category_depth');
if($category_depth == 'top'){
- $category_depth = 'products';
+ $category_depth = 'product';
$page->add_var_page('category_depth',$category_depth);
}
break;
@@ -131,23 +131,27 @@
/**
@brief chargement des données transversal
+ @param $type string name childs type for listing
+ @param subtype object childs DataType
*/
- function FO_load_listing($type){
+ function FO_load_listing($type,$subtype){
global $current_category_id, $languages_id;
$page = page::getInstance();
$category_depth = $page->GetVar('category_depth');
$this->ChildsType = $type;
- switch(strtolower($type)){
- case 'product':
- $this->listing_sql = "select DISTINCT p.products_id from ".TABLE_PRODUCTS." p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c
-WHERE p.products_status > 0 AND c.categories_id=p2c.categories_id and c.categories_status='1' AND pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id =
-p2c.products_id and manufacturers_id = '" . (int)$_GET['manufacturers_id'] . "' ";
- $this->listing_sort = " p.products_id DESC ";
- $this->listing_col_count = " p.products_id ";
- break;
- }
+
+ $sql_tmp = $subtype->listing_sql;
+
+ $this->listing_sql =
+ "SELECT DISTINCT ". $sql_tmp['col_count'] ." ".
+ $sql_tmp['tables'] .
+ $sql_tmp['where'] .
+ " AND manufacturers_id = '" . (int)$_GET['manufacturers_id'] . "' ";
+ $this->listing_sort = $sql_tmp['sort'] ;
+ $this->listing_col_count = $sql_tmp['col_count'] ;
+
}
@@ -183,6 +187,7 @@
$obj->image = $manuf['manufacturers_image'];
$obj->name = $manuf['manufacturers_name'];
$obj->description = false;
+
$page->add_var_page('RootListing',$obj);
}
break;
Modified: trunk/catalog/common/classes/datatype_drivers/Data_product.php
===================================================================
--- trunk/catalog/common/classes/datatype_drivers/Data_product.php 2012-04-04 13:32:39 UTC (rev 4149)
+++ trunk/catalog/common/classes/datatype_drivers/Data_product.php 2012-04-04 21:06:20 UTC (rev 4150)
@@ -15,7 +15,6 @@
@var DataType string
*/
public $DataType = 'product';
-
/**
@var DataType array reg for seo class
*/
@@ -23,7 +22,6 @@
'pID' => 'pi', // popup image product
'products_id' => 'p' // unique page prodcuts
);
-
/**
@var DataType array reg check for control get params , please respect order $reg_anchors
*/
@@ -31,8 +29,6 @@
'([0-9]*)', // popup image product
'([0-9]*)' // unique page prodcuts
);
-
-
/**
@var DataType files for folder /content , please respect order $reg_anchors
*/
@@ -40,17 +36,39 @@
'FILENAME_POPUP_IMAGE' => 'popup_image.php', // popup image product
'FILENAME_PRODUCT_INFO' => FILENAME_DEFAULT // unique page prodcuts
);
-
/**
@var DataType dynamic
*/
public $DataTypeDynamic = true;
+ /**
+ @var prefix alias a utilise systematiquement dans les requete sql
+ */
+ public $p = 'p';
+ /**
+ @var base listing sql
+ */
+ public $listing_sql = array();
/**
@brief constructor
*/
function __construct(){
+ global $languages_id;
+ /// Utiliser dans les appels dynamique
+//! TODO Normalisation des nom de tables produits , sans "s"
+ if(!defined('TABLE_PRODUCT_TO_CATEGORIES'))
+ define('TABLE_PRODUCT_TO_CATEGORIES', TABLE_PRODUCTS_TO_CATEGORIES);
+
+ $this->listing_sql['tables'] = " FROM " . TABLE_PRODUCTS . " ".$this->p." ".
+ " LEFT JOIN " . TABLE_PRODUCTS_DESCRIPTION . " ".$this->p."d ON( ".$this->p."d.products_id = ".$this->p.".products_id AND ".$this->p."d.language_id = '" . (int)$languages_id . "' ) ".
+ "";
+
+ $this->listing_sql['where'] = " WHERE ".$this->p.".products_status = '1' ";
+ $this->listing_sql['sort'] = " ".$this->p."d.products_name ";
+ $this->listing_sql['base_key'] = "products_id ";
+ $this->listing_sql['col_count'] = " ".$this->p.".products_id ";
+
// define filename
foreach($this->reg_filenames as $key=>$row)
if(!defined($key))define($key, $row);
@@ -65,11 +83,6 @@
*/
function is_type($mode='unique'){
switch($mode){
-// case 'listing':
-// $page = page::getInstance();
-// if( $page->GetVar('category_depth') == $this->DataType.'s' )
-// return true;
-// break;
case 'cpath':
if(isset($_GET['products_id']) && !isset($_GET['manufacturers_id']) )
return true;
Modified: trunk/catalog/includes/application_top.php
===================================================================
--- trunk/catalog/includes/application_top.php 2012-04-04 13:32:39 UTC (rev 4149)
+++ trunk/catalog/includes/application_top.php 2012-04-04 21:06:20 UTC (rev 4150)
@@ -382,9 +382,9 @@
/// calculate category path
if (isset($_GET['cPath'])) $cPath = $_GET['cPath'];
- elseif (isset($_GET['products_id']) && !isset($_GET['manufacturers_id'])) $cPath = product::get_product_path($_GET['products_id']);
- elseif (isset($_GET['content']) && is_numeric($_GET['content'])) $cPath = content::get_content_path($_GET['content']);
- else $cPath = '';
+ elseif ( ($dyntype = DataTypes::is_type('cpath')) && $dyntype != false )
+ $cPath = $dyntype->GetcPath('cpath');
+ else $cPath = '';
if (tep_not_null($cPath)) {
$cPath_array = tep_parse_category_path($cPath);
Modified: trunk/catalog/includes/classes/core_page/listing.php
===================================================================
--- trunk/catalog/includes/classes/core_page/listing.php 2012-04-04 13:32:39 UTC (rev 4149)
+++ trunk/catalog/includes/classes/core_page/listing.php 2012-04-04 21:06:20 UTC (rev 4150)
@@ -82,7 +82,7 @@
*/
class listingData{
- public static $type_object='products';
+ public static $type_object='product';
/**
@p string requet sql
Modified: trunk/catalog/includes/classes/drivers/data/categorie.php
===================================================================
--- trunk/catalog/includes/classes/drivers/data/categorie.php 2012-04-04 13:32:39 UTC (rev 4149)
+++ trunk/catalog/includes/classes/drivers/data/categorie.php 2012-04-04 21:06:20 UTC (rev 4150)
@@ -270,65 +270,65 @@
* \brief Return the number of products and category child in a category
// TABLES: products, products_to_categories, categories
*/
- public static function get_count_products_in_category($category_id, $include_inactive = false) {
+// public static function get_count_products_in_category($category_id, $include_inactive = false) {
+//
+// // if(isset(self::$object_data[$category_id]->count_products)) return self::$object_data[$category_id]->count_products;
+//
+// $products_count = 0;
+// $DB=Database::getInstance();
+// if ($include_inactive == true) {
+// $products_query = $DB->query("select count(p.products_id) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = p2c.products_id and p2c.categories_id = '" . (int)$category_id . "'");
+// } else {
+// $products_query = $DB->query("select count(p.products_id) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = p2c.products_id and p.products_status = '1' and p2c.categories_id = '" .(int) $category_id . "' ");
+// }
+// if($products_query->__get('numRows')>0 ) $products = $products_query->fetchAssoc();
+// else $products['total']= 0;
+// $products_count += $products['total'];
+//
+// if(!isset(self::$object_data[$category_id]) && !self::get_item($category_id)) return false;
+// self::$object_data[$category_id]->count_products=(int)$products_count;
+//
+// self::add_where_query(" AND parent_id = '" . (int)$category_id . "' ");
+// $db_list=self::get_query('','','',array('limit'=>'30'));
+//
+// foreach($db_list as $cat)
+// if($cat->key !=(int)$category_id && (int)$category_id ==$cat->parent_id) {
+// $products_count +=(isset($cat->count_products) ? $cat->count_products : self::get_count_products_in_category($cat->categories_id) );
+// }
+//
+// return $products_count;
+// }
-// if(isset(self::$object_data[$category_id]->count_products)) return self::$object_data[$category_id]->count_products;
- $products_count = 0;
- $DB=Database::getInstance();
- if ($include_inactive == true) {
- $products_query = $DB->query("select count(p.products_id) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = p2c.products_id and p2c.categories_id = '" . (int)$category_id . "'");
- } else {
- $products_query = $DB->query("select count(p.products_id) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = p2c.products_id and p.products_status = '1' and p2c.categories_id = '" .(int) $category_id . "' ");
- }
- if($products_query->__get('numRows')>0 ) $products = $products_query->fetchAssoc();
- else $products['total']= 0;
- $products_count += $products['total'];
- if(!isset(self::$object_data[$category_id]) && !self::get_item($category_id)) return false;
- self::$object_data[$category_id]->count_products=(int)$products_count;
-
- self::add_where_query(" AND parent_id = '" . (int)$category_id . "' ");
- $db_list=self::get_query('','','',array('limit'=>'30'));
-
- foreach($db_list as $cat)
- if($cat->key !=(int)$category_id && (int)$category_id ==$cat->parent_id) {
- $products_count +=(isset($cat->count_products) ? $cat->count_products : self::get_count_products_in_category($cat->categories_id) );
- }
-
- return $products_count;
- }
-
-
-
/**
* \brief Return the number of products and category child in a category
// TABLES: products, products_to_categories, categories
*/
- public static function get_count_content_in_category($category_id) {
- $products_count = 0;
- $DB=Database::getInstance();
+// public static function get_count_content_in_category($category_id) {
+// $products_count = 0;
+// $DB=Database::getInstance();
+//
+// $products_query = $DB->query("select count(c.content_id) as total from " . TABLE_CONTENT . " c , " . TABLE_CONTENT_TO_CATEGORIES . " c2c where c.content_id = c2c.content_id and c2c.categories_id = '" . (int)$category_id . "' and c.content_status='1' ");
+//
+// if($products_query->__get('numRows')>0 ) $products = $products_query->fetchAssoc();
+// else $products['total']= 0;
+// $products_count += $products['total'];
+//
+// if(!isset(self::$object_data[$category_id]) && !self::get_item($category_id)) return false;
+// self::$object_data[$category_id]->count_products=(int)$products_count;
+//
+// self::add_where_query(" AND parent_id = '" . (int)$category_id . "' ");
+// $db_list=self::get_query('','','',array('limit'=>'30'));
+//
+// foreach($db_list as $cat)
+// if($cat->key !=(int)$category_id && (int)$category_id ==$cat->parent_id) {
+// $products_count +=(isset($cat->count_products) ? $cat->count_products : self::get_count_products_in_category($cat->categories_id) );
+// }
+//
+// return $products_count;
+// }
- $products_query = $DB->query("select count(c.content_id) as total from " . TABLE_CONTENT . " c , " . TABLE_CONTENT_TO_CATEGORIES . " c2c where c.content_id = c2c.content_id and c2c.categories_id = '" . (int)$category_id . "' and c.content_status='1' ");
-
- if($products_query->__get('numRows')>0 ) $products = $products_query->fetchAssoc();
- else $products['total']= 0;
- $products_count += $products['total'];
-
- if(!isset(self::$object_data[$category_id]) && !self::get_item($category_id)) return false;
- self::$object_data[$category_id]->count_products=(int)$products_count;
-
- self::add_where_query(" AND parent_id = '" . (int)$category_id . "' ");
- $db_list=self::get_query('','','',array('limit'=>'30'));
-
- foreach($db_list as $cat)
- if($cat->key !=(int)$category_id && (int)$category_id ==$cat->parent_id) {
- $products_count +=(isset($cat->count_products) ? $cat->count_products : self::get_count_products_in_category($cat->categories_id) );
- }
-
- return $products_count;
- }
-
/**
* \brief Return false if not the category has subcategories or nbr category
*/
@@ -376,39 +376,40 @@
}
-/**
- * \brief
- Return all subcategory IDs. Recursivite
- TABLES: categories
-*/
-public static function get_subcategories(&$subcategories_array, $parent_id = 0) {
- $subcategories_query = tep_db_query("select categories_id from " . TABLE_CATEGORIES . " where parent_id = '" . (int)$parent_id . "' and categories_status='1' ");
- while ($subcategories = tep_db_fetch_array($subcategories_query)) {
- $subcategories_array[sizeof($subcategories_array)] = $subcategories['categories_id'];
- if ($subcategories['categories_id'] != $parent_id)
- tep_get_subcategories($subcategories_array, $subcategories['categories_id']);
- }
-}
+ /**
+ * \brief
+ Return all subcategory IDs. Recursivite
+ TABLES: categories
+ */
+ public static function get_subcategories(&$subcategories_array, $parent_id = 0) {
+ $subcategories_query = tep_db_query("select categories_id from " . TABLE_CATEGORIES . " where parent_id = '" . (int)$parent_id . "' and categories_status='1' ");
+ while ($subcategories = tep_db_fetch_array($subcategories_query)) {
+ $subcategories_array[sizeof($subcategories_array)] = $subcategories['categories_id'];
+ if ($subcategories['categories_id'] != $parent_id)
+ tep_get_subcategories($subcategories_array, $subcategories['categories_id']);
+ }
+ }
-/**
- * \brief Construction d'un select sur les catégories actives et not hidden
- * \param $categories_array
- * \param $parent_id
- * \param $indent
- * \return array result
-*/
-public static function get_categories($categories_array = '', $parent_id = '0', $indent = '') {
- global $languages_id;
- if (!is_array($categories_array)) $categories_array = array();
- $categories_query = tep_db_query("select c.categories_id, cd.categories_name from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where parent_id = '" . (int)$parent_id . "' and c.categories_status='1' and c.categories_hidden='1' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name");
- while ($categories = tep_db_fetch_array($categories_query)) {
- $categories_array[] = array('id' => $categories['categories_id'], 'text' => $indent . $categories['categories_name']);
+ /**
+ * \brief Construction d'un select sur les catégories actives et not hidden
+ * \param $categories_array
+ * \param $parent_id
+ * \param $indent
+ * \return array result
+ */
+ public static function get_categories($categories_array = '', $parent_id = '0', $indent = '') {
+ global $languages_id;
+ if (!is_array($categories_array)) $categories_array = array();
+ $categories_query = tep_db_query("select c.categories_id, cd.categories_name from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where parent_id = '" . (int)$parent_id . "'
+and c.categories_status='1' and c.categories_hidden='1' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name");
+ while ($categories = tep_db_fetch_array($categories_query)) {
+ $categories_array[] = array('id' => $categories['categories_id'], 'text' => $indent . $categories['categories_name']);
- if ($categories['categories_id'] != $parent_id) $categories_array = tep_get_categories($categories_array, $categories['categories_id'], $indent . ' ');
- }
+ if ($categories['categories_id'] != $parent_id) $categories_array = tep_get_categories($categories_array, $categories['categories_id'], $indent . ' ');
+ }
- return $categories_array;
-}
+ return $categories_array;
+ }
}
Modified: trunk/catalog/includes/classes/drivers/data/content.php
===================================================================
--- trunk/catalog/includes/classes/drivers/data/content.php 2012-04-04 13:32:39 UTC (rev 4149)
+++ trunk/catalog/includes/classes/drivers/data/content.php 2012-04-04 21:06:20 UTC (rev 4150)
@@ -54,6 +54,11 @@
public static function get_cms_liste_byDate($max, $exclude){ return contentData::get_cms_liste_byDate($max, $exclude); }
public static function get_img($id, $img_num=0){ return contentData::get_img($id, $img_num); }
+
+ /**
+ * \fn get_count_contents_in_category($category_id, $include_inactive = false)
+ */
+ public static function get_count_in_category($category_id, $include_inactive = false) {return contentData::count_in_category($category_id, $include_inactive); }
}
@@ -334,6 +339,35 @@
return (string)self::$array_data[$id]->images[$img_num][0];
}
+
+ public static function count_in_category($category_id, $include_inactive = false) {
+ $products_count = 0;
+ $DB=Database::getInstance();
+ if ($include_inactive == true) {
+ $products_query = $DB->query("select count(c.content_id) as total from " . TABLE_CONTENT . " c , " . TABLE_CONTENT_TO_CATEGORIES . " c2c where c.content_id = c2c.content_id and
+ c2c.categories_id = '" . (int)$category_id . "'");
+ } else {
+ $products_query = $DB->query("select count(c.content_id) as total from " . TABLE_CONTENT . " c , " . TABLE_CONTENT_TO_CATEGORIES . " c2c where c.content_id = c2c.content_id and
+ c.content_status = '1' and c2c.categories_id = '" .(int) $category_id . "' ");
+ }
+ if($products_query->__get('numRows')>0 ) $products = $products_query->fetchAssoc();
+ else $products['total']= 0;
+ $products_count += $products['total'];
+
+// if(!isset(self::$object_data[$category_id]) && !self::get_item($category_id)) return false;
+// self::$object_data[$category_id]->count_products=(int)$products_count;
+//
+// self::add_where_query(" AND parent_id = '" . (int)$category_id . "' ");
+// $db_list=self::get_query('','','',array('limit'=>'30'));
+//
+// foreach($db_list as $cat)
+// if($cat->key !=(int)$category_id && (int)$category_id ==$cat->parent_id) {
+// $products_count +=(isset($cat->count_products) ? $cat->count_products : self::count_products_in_category($cat->categories_id) );
+// }
+
+ return $products_count;
+ }
+
}
Modified: trunk/catalog/includes/classes/drivers/data/product.php
===================================================================
--- trunk/catalog/includes/classes/drivers/data/product.php 2012-04-04 13:32:39 UTC (rev 4149)
+++ trunk/catalog/includes/classes/drivers/data/product.php 2012-04-04 21:06:20 UTC (rev 4150)
@@ -163,8 +163,14 @@
*/
public static function get_attributes_weight($products_id, $attributes=array()) {return productData::get_attributes_weight($products_id, $attributes); }
// public static function get_product_path($id){ return productData::get_product_path($id); }
-
+ /**
+ * \fn get_extra_product($products_id, $key='')
+ */
public static function get_extra_product($products_id, $key='') {return productData::get_extra_product($products_id, $key); }
+ /**
+ * \fn get_count_products_in_category($category_id, $include_inactive = false)
+ */
+ public static function get_count_in_category($category_id, $include_inactive = false) {return productData::count_in_category($category_id, $include_inactive); }
}
@@ -608,7 +614,35 @@
}
+ public static function count_in_category($category_id, $include_inactive = false) {
+ $products_count = 0;
+ $DB=Database::getInstance();
+ if ($include_inactive == true) {
+ $products_query = $DB->query("select count(p.products_id) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = p2c.products_id and
+ p2c.categories_id = '" . (int)$category_id . "'");
+ } else {
+ $products_query = $DB->query("select count(p.products_id) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = p2c.products_id and
+ p.products_status = '1' and p2c.categories_id = '" .(int) $category_id . "' ");
+ }
+ if($products_query->__get('numRows')>0 ) $products = $products_query->fetchAssoc();
+ else $products['total']= 0;
+ $products_count += $products['total'];
+// if(!isset(self::$object_data[$category_id]) && !self::get_item($category_id)) return false;
+// self::$object_data[$category_id]->count_products=(int)$products_count;
+//
+// self::add_where_query(" AND parent_id = '" . (int)$category_id . "' ");
+// $db_list=self::get_query('','','',array('limit'=>'30'));
+//
+// foreach($db_list as $cat)
+// if($cat->key !=(int)$category_id && (int)$category_id ==$cat->parent_id) {
+// $products_count +=(isset($cat->count_products) ? $cat->count_products : self::count_products_in_category($cat->categories_id) );
+// }
+
+ return $products_count;
+ }
+
+
}
Modified: trunk/catalog/includes/classes/page.php
===================================================================
--- trunk/catalog/includes/classes/page.php 2012-04-04 13:32:39 UTC (rev 4149)
+++ trunk/catalog/includes/classes/page.php 2012-04-04 21:06:20 UTC (rev 4150)
@@ -529,7 +529,7 @@
$this->new_class('oscss_plugins');
$this->new_class('categorie');
//! Class specifique type de page
-
+// var_dump(PUBLIC_PAGE_TYPE);
if (in_array($this->the_type(),explode(',',str_replace(' ','',PUBLIC_PAGE_TYPE)))){
global $ACA;
if($this->new_class($this->the_type(),true) !=false) {
Modified: trunk/catalog/index.php
===================================================================
--- trunk/catalog/index.php 2012-04-04 13:32:39 UTC (rev 4149)
+++ trunk/catalog/index.php 2012-04-04 21:06:20 UTC (rev 4150)
@@ -73,18 +73,16 @@
elseif ( ($dyntype = DataTypes::is_type('listing')) && $dyntype != false ){
$page->init(basename(__FILE__),$language);
$breadcrumb=$page->return_object('breadcrumb');
-
// call master DataTypes listing and next childs modules
DataTypes::transversal('transversal');
$listing=listing::getInstance();
$listing_split = $listing->listing($dyntype);
-
$listing_query = $DB->query($listing_split->sql_query);
$page_content = $page->force_content('index_listing.php');
-
+// var_dump($page_content);
}
// else{
// $page->init(basename(__FILE__),$language);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-04-04 13:32:45
|
Revision: 4149
http://oscss.svn.sourceforge.net/oscss/?rev=4149&view=rev
Author: oscim
Date: 2012-04-04 13:32:39 +0000 (Wed, 04 Apr 2012)
Log Message:
-----------
correction coquille
correction utilisation tag filesql et drivers mysqli
Modified Paths:
--------------
trunk/catalog/admin/includes/boxes/04_tools.php
trunk/catalog/admin/includes/exts/package/packageInstaller.php
trunk/catalog/admin/includes/exts/package/tags/filesql.php
trunk/catalog/admin/includes/languages/fr_FR/boxes/04_tools.php
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/package.txt
Modified: trunk/catalog/admin/includes/boxes/04_tools.php
===================================================================
--- trunk/catalog/admin/includes/boxes/04_tools.php 2012-04-04 12:28:18 UTC (rev 4148)
+++ trunk/catalog/admin/includes/boxes/04_tools.php 2012-04-04 13:32:39 UTC (rev 4149)
@@ -31,4 +31,8 @@
$tabl_link[608][4][]= array(FILENAME_CURRENCIES, 'BOX_LOCALIZATION_CURRENCIES', 'currencies');
$tabl_link[608][4][]= array(FILENAME_CRONJOB, 'BOX_TOOLS_CRONJOB', 'database',@$img['database']);
+
+/* Begin MANAGELOG_stable - installed by CIP */
+$tabl_link[608][4][]= array(FILENAME_MANAGELOG, 'BOX_TOOLS_MANAGELOG', 'database',@$img['database']);
+/* End MANAGELOG_stable - installed by CIP */
?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/exts/package/packageInstaller.php
===================================================================
--- trunk/catalog/admin/includes/exts/package/packageInstaller.php 2012-04-04 12:28:18 UTC (rev 4148)
+++ trunk/catalog/admin/includes/exts/package/packageInstaller.php 2012-04-04 13:32:39 UTC (rev 4149)
@@ -228,7 +228,11 @@
foreach ($data as $key=>$value) {
$value=htmlspecialchars($value);//convert to entries...
if (!in_array($key,array('post_install_notes','author_pkg','contrib_ref','forum_ref','oscss_forum_ref'))) {
- $contents[]='<strong class="label text">'.__('contribs '.$key).'</strong>: '.nl2br($value);
+
+ if ($key =='last_update')
+ $contents[]='<strong class="label text">'.__('contribs '.$key).'</strong>: '.tep_date_short($value);
+ else
+ $contents[]='<strong class="label text">'.__('contribs '.$key).'</strong>: '.nl2br($value);
}
}
return $contents;
Modified: trunk/catalog/admin/includes/exts/package/tags/filesql.php
===================================================================
--- trunk/catalog/admin/includes/exts/package/tags/filesql.php 2012-04-04 12:28:18 UTC (rev 4148)
+++ trunk/catalog/admin/includes/exts/package/tags/filesql.php 2012-04-04 13:32:39 UTC (rev 4149)
@@ -66,6 +66,9 @@
// var_dump(__FUNCTION__);
$dbtype = DB_MOTOR_TYPE;
$dbmotor = strtolower(DB_CONNECTOR);
+ if($dbmotor = 'mysqli')
+ $dbmotor = 'mysql';
+
$action='install';
$path=DIR_FS_CIP.$this->contrib.'/'.'sql/'.$dbmotor.'/'.$action.'/';
@@ -106,6 +109,8 @@
$dbtype = DB_MOTOR_TYPE;
$dbmotor = strtolower(DB_CONNECTOR);
+ if($dbmotor = 'mysqli')
+ $dbmotor = 'mysql';
$action='install';
$path=DIR_FS_CIP.$this->contrib.'/'.'sql/'.$dbmotor.'/'.$action.'/';
@@ -130,6 +135,8 @@
$dbtype = DB_MOTOR_TYPE;
$dbmotor = strtolower(DB_CONNECTOR);
+ if($dbmotor = 'mysqli')
+ $dbmotor = 'mysql';
$action='remove';
$path=DIR_FS_CIP.$this->contrib.'/'.'sql/'.$dbmotor.'/'.$action.'/';
Modified: trunk/catalog/admin/includes/languages/fr_FR/boxes/04_tools.php
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/boxes/04_tools.php 2012-04-04 12:28:18 UTC (rev 4148)
+++ trunk/catalog/admin/includes/languages/fr_FR/boxes/04_tools.php 2012-04-04 13:32:39 UTC (rev 4149)
@@ -33,4 +33,8 @@
define('BOX_HEADING_CONF_BOX_TOOLS_BATCH_CENTER',"Batch Print Center" );
define('BOX_TOOLS_CRONJOB',"Tache(s) programmée(s)" );
+
+/* Begin MANAGELOG_stable - installed by CIP */
+define('BOX_TOOLS_MANAGELOG', 'Fichier de Logs');
+/* End MANAGELOG_stable - installed by CIP */
?>
\ No newline at end of file
Modified: trunk/catalog/admin/includes/languages/fr_FR/modules/pages/package.txt
===================================================================
--- trunk/catalog/admin/includes/languages/fr_FR/modules/pages/package.txt 2012-04-04 12:28:18 UTC (rev 4148)
+++ trunk/catalog/admin/includes/languages/fr_FR/modules/pages/package.txt 2012-04-04 13:32:39 UTC (rev 4149)
@@ -84,6 +84,7 @@
/** install */
/* bouton */
$lang['config extension']="Configurer cette extension " ;
+ $lang['text post install notes']="Note de fin d'installation" ;
/* text */
$lang['package heading title install']="installation du paquet" ;
$lang['package heading title install logs']="Detail des logs et nodes de l'installation" ;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-04-04 12:28:29
|
Revision: 4148
http://oscss.svn.sourceforge.net/oscss/?rev=4148&view=rev
Author: oscim
Date: 2012-04-04 12:28:18 +0000 (Wed, 04 Apr 2012)
Log Message:
-----------
coquille
Modified Paths:
--------------
trunk/catalog/Documents/admin/data/repository_sources.xml
Modified: trunk/catalog/Documents/admin/data/repository_sources.xml
===================================================================
--- trunk/catalog/Documents/admin/data/repository_sources.xml 2012-04-04 12:14:58 UTC (rev 4147)
+++ trunk/catalog/Documents/admin/data/repository_sources.xml 2012-04-04 12:28:18 UTC (rev 4148)
@@ -7,8 +7,8 @@
<description>official repository</description>
<repository>http://pluginsv2.oscss.org/services.php</repository>
<ident>
- <user>3</user>
- <token>535bb3a85ff52c66ef19f6a6ca29bfb78665d5c2</token>
+ <user></user>
+ <token></token>
</ident>
<service>
<listing>listing_package</listing>
@@ -18,22 +18,6 @@
</channel>
<channel>
- <title>Oscim</title>
- <key>oscim</key>
- <description>Oscim repository</description>
- <repository>http://exts.oscim.org/services.php</repository>
- <ident>
- <user>3</user>
- <token>535bb3a85ff52c66ef19f6a6ca29bfb78665d5c2</token>
- </ident>
- <service>
- <listing>listing_package</listing>
- <view>detail_package</view>
- <download>download_package</download>
- </service>
- </channel>
-
- <channel>
<title>Local</title>
<key>local</key>
<description>local folder</description>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-04-04 12:15:10
|
Revision: 4147
http://oscss.svn.sourceforge.net/oscss/?rev=4147&view=rev
Author: oscim
Date: 2012-04-04 12:14:58 +0000 (Wed, 04 Apr 2012)
Log Message:
-----------
Ajout d'enstension specifique a la 2.1.1
Added Paths:
-----------
trunk/extensions/LISTING_ORDER_stable/
trunk/extensions/LISTING_ORDER_stable/catalog/
trunk/extensions/LISTING_ORDER_stable/catalog/admin/
trunk/extensions/LISTING_ORDER_stable/catalog/admin/includes/
trunk/extensions/LISTING_ORDER_stable/catalog/admin/includes/gabarit/
trunk/extensions/LISTING_ORDER_stable/catalog/admin/includes/gabarit/categories.listing_order.display_edit.gab
trunk/extensions/LISTING_ORDER_stable/catalog/admin/includes/languages/
trunk/extensions/LISTING_ORDER_stable/catalog/admin/includes/languages/fr_FR/
trunk/extensions/LISTING_ORDER_stable/catalog/admin/includes/languages/fr_FR/modules/
trunk/extensions/LISTING_ORDER_stable/catalog/admin/includes/languages/fr_FR/modules/categories/
trunk/extensions/LISTING_ORDER_stable/catalog/admin/includes/languages/fr_FR/modules/categories/listing_order.txt
trunk/extensions/LISTING_ORDER_stable/catalog/admin/includes/modules/
trunk/extensions/LISTING_ORDER_stable/catalog/admin/includes/modules/categories/
trunk/extensions/LISTING_ORDER_stable/catalog/admin/includes/modules/categories/listing_order.php
trunk/extensions/LISTING_ORDER_stable/install.xml
trunk/extensions/RESTRICTACCES_stable/
trunk/extensions/RESTRICTACCES_stable/catalog/
trunk/extensions/RESTRICTACCES_stable/catalog/admin/
trunk/extensions/RESTRICTACCES_stable/catalog/admin/includes/
trunk/extensions/RESTRICTACCES_stable/catalog/admin/includes/gabarit/
trunk/extensions/RESTRICTACCES_stable/catalog/admin/includes/gabarit/categories.RestrictAcces.display_edit.gab
trunk/extensions/RESTRICTACCES_stable/catalog/admin/includes/languages/
trunk/extensions/RESTRICTACCES_stable/catalog/admin/includes/languages/fr_FR/
trunk/extensions/RESTRICTACCES_stable/catalog/admin/includes/languages/fr_FR/modules/
trunk/extensions/RESTRICTACCES_stable/catalog/admin/includes/languages/fr_FR/modules/categories/
trunk/extensions/RESTRICTACCES_stable/catalog/admin/includes/languages/fr_FR/modules/categories/RestrictAcces.txt
trunk/extensions/RESTRICTACCES_stable/catalog/admin/includes/modules/
trunk/extensions/RESTRICTACCES_stable/catalog/admin/includes/modules/categories/
trunk/extensions/RESTRICTACCES_stable/catalog/admin/includes/modules/categories/RestrictAcces.php
trunk/extensions/RESTRICTACCES_stable/catalog/includes/
trunk/extensions/RESTRICTACCES_stable/catalog/includes/modules/
trunk/extensions/RESTRICTACCES_stable/catalog/includes/modules/categories/
trunk/extensions/RESTRICTACCES_stable/catalog/includes/modules/categories/RestrictAcces.php
trunk/extensions/RESTRICTACCES_stable/install.xml
trunk/extensions/RESTRICTACCES_stable/readme
Added: trunk/extensions/LISTING_ORDER_stable/catalog/admin/includes/gabarit/categories.listing_order.display_edit.gab
===================================================================
--- trunk/extensions/LISTING_ORDER_stable/catalog/admin/includes/gabarit/categories.listing_order.display_edit.gab (rev 0)
+++ trunk/extensions/LISTING_ORDER_stable/catalog/admin/includes/gabarit/categories.listing_order.display_edit.gab 2012-04-04 12:14:58 UTC (rev 4147)
@@ -0,0 +1,52 @@
+<?php
+/**
+ @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.0
+ @date 19/12/10, 19:57
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+?>
+
+
+<div class="box_uniq block_form">
+
+
+ <h3><?php echo __('text info heading sortChilds sub-category'); ?></h3>
+ <ul >
+ <?php foreach(listing_order::$Csort as $sorts ): ?>
+ <li class="block_input">
+ <span class="sort fleft">
+ <?php echo tep_draw_checkbox_field('listing_order[c][sort]['.$sorts['id'].']','listing_order_sort_'.$sorts['id'] ,'on',(isset(listing_order::$CsortSelected[$sorts['name']])? true: false) ) .' '.$sorts['text'] ?>
+ </span>
+ <span class="sortby fright">
+ <?php echo tep_draw_input_field('listing_order[c][sortorder]['.$sorts['id'].']','listing_order_sortorder_'.$sorts['id'], (isset(listing_order::$CsortSelected[$sorts['name']]['sortorder'])? listing_order::$CsortSelected[$sorts['name']]['sortorder']: '0'),' size="3"') ?>
+ <?php echo tep_draw_radio_field('listing_order[c][sortby]['.$sorts['id'].']','listing_order_sortby_'.$sorts['id'], 'asc', ((isset(listing_order::$CsortSelected[$sorts['name']]) && listing_order::$CsortSelected[$sorts['name']]['sortby']=='asc')? true: false) ).__('text asc').tep_draw_radio_field('listing_order[c][sortby]['.$sorts['id'].']','listing_order_sortby_'.$sorts['id'], 'desc', ((isset(listing_order::$CsortSelected[$sorts['name']]) && listing_order::$CsortSelected[$sorts['name']]['sortby']=='desc')? true: false)).__('text desc') ?>
+ </span>
+ </li>
+ <?php endforeach; ?>
+ </ul>
+
+
+
+ <h3><?php echo __('text info heading sortChilds datatype in category'); ?></h3>
+ <ul >
+ <?php foreach(listing_order::$Psort as $sorts ): ?>
+ <li class="block_input">
+ <span class="sort fleft">
+ <?php echo tep_draw_checkbox_field('listing_order[p][sort]['.$sorts['id'].']','listing_order_sort_'.$sorts['id'] ,'on',(isset(listing_order::$PsortSelected[$sorts['name']])? true: false) ) .' '.$sorts['text'] ?>
+ </span>
+ <span class="sortby fright">
+ <?php echo tep_draw_input_field('listing_order[p][sortorder]['.$sorts['id'].']','listing_order_sortorder_'.$sorts['id'], (isset(listing_order::$PsortSelected[$sorts['name']]['sortorder'])? listing_order::$PsortSelected[$sorts['name']]['sortorder']: '0'),' size="3"') ?>
+ <?php echo tep_draw_radio_field('listing_order[p][sortby]['.$sorts['id'].']','listing_order_sortby_'.$sorts['id'], 'asc', ((isset(listing_order::$PsortSelected[$sorts['name']]) && listing_order::$PsortSelected[$sorts['name']]['sortby']=='asc')? true: false) ).__('text asc').tep_draw_radio_field('listing_order[p][sortby]['.$sorts['id'].']','listing_order_sortby_'.$sorts['id'], 'desc', ((isset(listing_order::$PsortSelected[$sorts['name']]) && listing_order::$PsortSelected[$sorts['name']]['sortby']=='desc')? true: false)).__('text desc') ?>
+ </span>
+ </li>
+ <?php endforeach; ?>
+ </ul>
+
+ <?php if(isset(listing_order::$Csort) && is_array(listing_order::$Csort)): ?>
+
+ <?php endif; ?>
+</div>
\ No newline at end of file
Property changes on: trunk/extensions/LISTING_ORDER_stable/catalog/admin/includes/gabarit/categories.listing_order.display_edit.gab
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/extensions/LISTING_ORDER_stable/catalog/admin/includes/languages/fr_FR/modules/categories/listing_order.txt
===================================================================
--- trunk/extensions/LISTING_ORDER_stable/catalog/admin/includes/languages/fr_FR/modules/categories/listing_order.txt (rev 0)
+++ trunk/extensions/LISTING_ORDER_stable/catalog/admin/includes/languages/fr_FR/modules/categories/listing_order.txt 2012-04-04 12:14:58 UTC (rev 4147)
@@ -0,0 +1,61 @@
+<?php
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 04/04/2012, 09:48
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+$lang['module acapro listing_order text title']= 'Tri dans les listing';
+$lang['module acapro listing_order text description']= 'Option de tri pour les listing';
+
+$lang['text info heading sortChilds sub-category']= 'Ordre de tri des sous-categories';
+$lang['text info heading sortChilds datatype in category']= 'Ordre de tri des datatypes dans cette categorie';
+
+
+/* text for categorie data */
+ $lang['txt sortChilds categories_id']= 'numero';
+ $lang['txt sortChilds categories_datatype']= 'datatype';
+ $lang['txt sortChilds categories_image']= 'image';
+ $lang['txt sortChilds parent_id']= 'Parent';
+ $lang['txt sortChilds categories_cpath']= 'Chemin';
+ $lang['txt sortChilds sort_order']= 'numero de position';
+ $lang['txt sortChilds categories_hidden']= 'Visible';
+ $lang['txt sortChilds categories_status']= 'Statut';
+// $lang['txt sortChilds sortchilds']= 'Ordre de tri des pages';
+// $lang['txt sortChilds sort_order']= 'Ordre de tri des pages';
+ $lang['txt sortChilds date_added']= 'Date d\'ajout';
+ $lang['txt sortChilds last_modified']= 'Date dernière modification';
+
+/* text for products data */
+ $lang['tab cat sortchilds']= 'Options Tri';
+ $lang['txt sortChilds products_type']= 'Le type de produits';
+ $lang['txt sortChilds products_quantity']= 'Quantité';
+ $lang['txt sortChilds products_model']= 'Modele';
+ $lang['txt sortChilds products_price']= 'Prix';
+ $lang['txt sortChilds products_date_added']= 'Date d\'ajout';
+ $lang['txt sortChilds products_last_modified']= 'Date dernière modification';
+ $lang['txt sortChilds products_date_available']= 'Date disponibilité';
+ $lang['txt sortChilds products_ordered']= 'Ordre de tri des produits';
+ $lang['txt sortChilds products_weight']= 'Poids';
+ $lang['txt sortChilds products_name']= 'Nom';
+ $lang['txt sortChilds products_url']= 'Url';
+ $lang['txt sortChilds products_viewed']= 'Nombres de vues';
+
+/* text for content data */
+ $lang['txt sortChilds content_id']= 'Ordre de tri des pages';
+ $lang['txt sortChilds content_type']= 'Le type de contenu';
+ $lang['txt sortChilds content_name']= 'Clef';
+// $lang['txt sortChilds date_added']= 'Date d\'ajout';
+// $lang['txt sortChilds last_modified']= 'Date dernière modification';
+// $lang['txt sortChilds sort_order']= 'Ordre de tri des pages';
+
+
+/* text tri */
+$lang['text asc']= 'Tri Croissant';
+$lang['text desc']= 'Tri decroissant';
+
+
+?>
\ No newline at end of file
Property changes on: trunk/extensions/LISTING_ORDER_stable/catalog/admin/includes/languages/fr_FR/modules/categories/listing_order.txt
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/extensions/LISTING_ORDER_stable/catalog/admin/includes/modules/categories/listing_order.php
===================================================================
--- trunk/extensions/LISTING_ORDER_stable/catalog/admin/includes/modules/categories/listing_order.php (rev 0)
+++ trunk/extensions/LISTING_ORDER_stable/catalog/admin/includes/modules/categories/listing_order.php 2012-04-04 12:14:58 UTC (rev 4147)
@@ -0,0 +1,285 @@
+<?php
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 04/04/2012, 09:48
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+ @class listing_order
+*/
+
+class listing_order
+ implements InterfaceModule{
+ /**
+ @param array
+ */
+ public static $languages = array();
+ /**
+ @param object
+ */
+ public static $pInfo;
+
+ /**
+ @var array, list des tri possible pour les produits
+ */
+ public static $Psort;
+ /**
+ @var array, exclude champs
+ */
+ private static $Psort_exclude = array('products_image','products_tax_class_id','track_stock','products_status','products_id','manufacturers_id','language_id', 'language_id', 'products_head_title_tag', 'products_head_desc_tag', 'products_description', 'products_chapo', 'products_head_keywords_tag');
+ /**
+ @var array, recup db , selected
+ */
+ public static $PsortSelected=array();
+ /**
+ @var array, list des tri possible pour les content
+ */
+ public static $Csort;
+ /**
+ @var array, exclude champs content
+ */
+ private static $Csort_exclude = array('content_status','content_hidden');
+ /**
+ @var array, recup db , selected content
+ */
+ public static $CsortSelected=array();
+ /**
+ @var
+ */
+ public $code;
+ /**
+ @var
+ */
+ public $title;
+ /**
+ @var
+ */
+ public $description;
+ /**
+ @var
+ */
+ public $sort_order;
+ /**
+ @var
+ */
+ public $enabled;
+
+ /**
+ class constructor
+ */
+ function __construct() {
+ global $language,$languages_id;
+ $this->code = __CLASS__ ;
+ $this->type = 'categories' ;
+ $this->title = __('module acapro listing_order text title');
+ $this->description = __('module acapro listing_order text description');
+ $this->sort_order = (defined('MODULE_ACACAT_SORTCHILDS_ORDER'))?MODULE_ACACAT_SORTCHILDS_ORDER : 0;
+ $this->enabled = true;
+
+ self::$pInfo= new objectInfo (array());
+
+ self::$languages= tep_get_languages();
+ }
+
+
+ /**
+ Edition produit
+ UP db
+ */
+ public function get_update_table_categories ($id, $sql_data_array) {
+
+ $res = sqlcategorie::fetch(array('id'=>$id), true);
+
+ $this->load_db_values ($res);
+ $sort ='';
+ $tsort = array(array());
+
+ foreach($_POST[__CLASS__]['p']['sort'] as $k=>$item){
+ if(isset(self::$Psort[$k]) && $_POST[__CLASS__]['p']['sort'][$k] =='on')
+ $tsort[(int)$_POST[__CLASS__]['p']['sortorder'][$k]][] =' '.self::$Psort[$k]['sql'].' '. (isset($_POST[__CLASS__]['p']['sortby'][$k]) ? $_POST[__CLASS__]['p']['sortby'][$k] : 'asc').' ,' ;
+ }
+ ksort($tsort);
+
+ foreach($tsort as $item)
+ for($ii=0,$m=count($item); $ii<$m; $ii++){
+ $sort .=$item[$ii];
+ }
+
+ $sql_data_array['sortchids_datatype'] =substr($sort,0,-1);
+
+
+ $sort ='';
+ $tsort = array(array());
+ foreach($_POST[__CLASS__]['c']['sort'] as $k=>$item){
+ if(isset(self::$Csort[$k]) && $_POST[__CLASS__]['c']['sort'][$k] =='on')
+ $tsort[(int)$_POST[__CLASS__]['c']['sortorder'][$k]][] =' '.self::$Csort[$k]['sql'].' '. (isset($_POST[__CLASS__]['c']['sortby'][$k]) ? $_POST[__CLASS__]['c']['sortby'][$k] : 'asc').' ,' ;
+ }
+ ksort($tsort);
+
+ foreach($tsort as $item)
+ for($ii=0,$m=count($item); $ii<$m; $ii++){
+ $sort .=$item[$ii];
+ }
+
+ $sql_data_array['sortchids'] =substr($sort,0,-1);
+
+ return $sql_data_array;
+ }
+
+
+
+ /**
+ Edition/affichage produit
+ UP db
+ */
+ public static function load_db_values($cat) {
+
+ $DB=Database::getInstance();
+
+
+ if(is_object($cat)){
+ $datatype = $cat->datatype;
+ $cat_id = $cat->id;
+ }
+ elseif(isset(categories::$cInfo)){
+ $cat_id = categories::$cInfo->categories_id;
+ $datatype = categories::$cInfo->categories_datatype;
+ }
+ else
+ return ;
+
+ $i=0;
+ foreach($DB->listFields(TABLE_CATEGORIES) as $k=>$v){
+ if(!in_array($v['name'],array('sortchids', 'sortchids_datatype'))) {
+ self::$Csort[$i]=array('id'=>$i,'name'=>$v['name'], 'sql'=>'cat.'.$v['name'], 'text'=> __('txt sortChilds '.$v['name']));
+ $i++;
+ }
+ }
+
+
+ switch($datatype){
+ case 'product':
+ $i=0;
+ foreach($DB->listFields(TABLE_PRODUCTS) as $k=>$v){
+ if(!in_array($v['name'],self::$Psort_exclude)) {
+ self::$Psort[$i]=array('id'=>$i,'name'=>$v['name'], 'sql'=>'p.'.$v['name'], 'text'=> __('txt sortChilds '.$v['name']));
+ $i++;
+ }
+ }
+ $i=0;
+ foreach($DB->listFields(TABLE_PRODUCTS_DESCRIPTION) as $k=>$v){
+ if(!in_array($v['name'],self::$Psort_exclude)) {
+ self::$Psort[$i]=array('id'=>$i,'name'=>$v['name'], 'sql'=>'pd.'.$v['name'], 'text'=> __('txt sortChilds '.$v['name']));
+ $i++;
+ }
+ }
+ break;
+
+ case 'content':
+ $i=0;
+ foreach($DB->listFields(TABLE_CONTENT) as $k=>$v){
+ if(!in_array($v['name'],self::$Psort_exclude)) {
+ self::$Psort[$i]=array('id'=>$i,'name'=>$v['name'], 'sql'=>'c.'.$v['name'], 'text'=> __('txt sortChilds '.$v['name']));
+ $i++;
+ }
+ }
+ foreach($DB->listFields(TABLE_CONTENT_DESCRIPTION) as $k=>$v){
+ if(!in_array($v['name'],self::$Psort_exclude)) {
+ self::$Psort[$i]=array('id'=>$i,'name'=>$v['name'], 'sql'=>'cd.'.$v['name'], 'text'=> __('txt sortChilds '.$v['name']));
+ $i++;
+ }
+ }
+ break;
+
+ case 'home':
+ break;
+ }
+
+
+
+ /// actuel
+ if($cat_id>0){
+ $res=$DB->query("SELECT sortchids, sortchids_datatype FROM ".TABLE_CATEGORIES." WHERE categories_id='".$cat_id."';");
+ $r=$res->fetchAssoc();
+
+ $tab=explode(',',$r['sortchids']);
+ $i=0;
+ foreach($tab as $item){
+ $iret=explode(' ',ltrim(rtrim($item)));
+ if(!empty($iret[0])){
+ $name=str_replace('c.','',$iret[0]);
+ self::$CsortSelected[$name]=array('sql'=>$iret[0],'value'=>$name,'sortorder'=>(string)$i++ , 'sortby'=>trim($iret[1]) );
+ }
+ }
+
+
+ switch(categories::$cInfo->categories_datatype){
+ case 'product':
+ $tab=explode(',',$r['sortchids_datatype']);
+ $i=0;
+ foreach($tab as $item){
+ $iret=explode(' ',ltrim(rtrim($item)));
+ if(!empty($iret[0])){
+ $name=str_replace('p.','',$iret[0]);
+ self::$PsortSelected[$name]=array('sql'=>$iret[0],'value'=>$name,'sortorder'=>(string)$i++ , 'sortby'=>trim($iret[1]) );
+ }
+ }
+ break;
+
+ case 'content':
+ $tab=explode(',',$r['sortchids_datatype']);
+ $i=0;
+ foreach($tab as $item){
+ $iret=explode(' ',ltrim(rtrim($item)));
+ if(!empty($iret[0])){
+ $name=str_replace('c.','',$iret[0]);
+ self::$PsortSelected[$name]=array('sql'=>$iret[0],'value'=>$name,'sortorder'=>(string)$i++ , 'sortby'=>trim($iret[1]) );
+ }
+ }
+ break;
+
+ case 'home':
+ break;
+ }
+ }
+ }
+
+
+ /**
+ Test présence et etat valeur forunis
+ @param $tableau string products|content
+ @param $champs string nom colonne in db
+ @param $col string nom colonne tableau
+ */
+// public static function checkValue($tableau='products',$champs, $col='value'){
+//
+// foreach()
+// }
+
+
+ public function load_post_values($post){
+ return $post;
+ }
+
+ /**
+ Draw
+ */
+ public function display_edit(&$contents) {
+ $this->load_db_values(0);
+
+ $contents []=array('title'=> __('tab cat sortchilds'),'text'=>tep_get_include_contents($this->type.'.'.__CLASS__.'.'.__FUNCTION__));
+ }
+
+
+/** Force implements InterfaceModule class to define this method */
+ function check() { return true; }
+ function install() { return false; }
+ function remove() { return false; }
+ function keys() {
+ return array( 'MODULE_ACACAT_SORTCHILDS_SORT_ORDER');
+ }
+
+}
+?>
\ No newline at end of file
Property changes on: trunk/extensions/LISTING_ORDER_stable/catalog/admin/includes/modules/categories/listing_order.php
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/extensions/LISTING_ORDER_stable/install.xml
===================================================================
--- trunk/extensions/LISTING_ORDER_stable/install.xml (rev 0)
+++ trunk/extensions/LISTING_ORDER_stable/install.xml 2012-04-04 12:14:58 UTC (rev 4147)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<contrib>
+ <description>
+ <details contrib_ref="" forum_ref="" contrib_type="products, content, catgeories" status="0" last_update="2011-03-15" />
+ <author_pkg>www.oscim.com</author_pkg>
+ <comments><![CDATA[]]> </comments>
+ <credits>oscim</credits>
+ <version>1.0</version>
+ <post_install><![CDATA[]]> </post_install>
+ </description>
+
+ <addfile>
+ <file name="admin/includes/modules/categories/listing_order.php" />
+ <file name="admin/includes/gabarit/categories.listing_order.display_edit.gab" />
+ </addfile>
+
+ <addfilelg>
+ <file name="admin/includes/languages/%LANGUAGE%/modules/categories/listing_order.txt" lgref="fr_FR"/>
+ </addfilelg>
+
+</contrib>
\ No newline at end of file
Added: trunk/extensions/RESTRICTACCES_stable/catalog/admin/includes/gabarit/categories.RestrictAcces.display_edit.gab
===================================================================
--- trunk/extensions/RESTRICTACCES_stable/catalog/admin/includes/gabarit/categories.RestrictAcces.display_edit.gab (rev 0)
+++ trunk/extensions/RESTRICTACCES_stable/catalog/admin/includes/gabarit/categories.RestrictAcces.display_edit.gab 2012-04-04 12:14:58 UTC (rev 4147)
@@ -0,0 +1,21 @@
+<?php
+/**
+ @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.0
+ @date 19/12/10, 19:57
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+?>
+
+
+<div class="box_uniq block_form">
+ <h3><?php echo __('text info heading restrict access'); ?></h3>
+
+ <p class="block_input">
+ <label for="condition" title="<?php echo __('entry condition desc') ; ?>"><?php echo __('entry condition') . tep_image(DIR_WS_ICONS . 'icon_help.gif') ; ?></label>
+ <?php echo tep_draw_pull_down_menu('RestrictAcces[RESTRICT_ACCESS_BASE]', RestrictAcces::$_condition, RestrictAcces::$cInfo->RESTRICT_ACCESS_BASE, 'id="condition"') ;?>
+ </p>
+</div>
\ No newline at end of file
Added: trunk/extensions/RESTRICTACCES_stable/catalog/admin/includes/languages/fr_FR/modules/categories/RestrictAcces.txt
===================================================================
--- trunk/extensions/RESTRICTACCES_stable/catalog/admin/includes/languages/fr_FR/modules/categories/RestrictAcces.txt (rev 0)
+++ trunk/extensions/RESTRICTACCES_stable/catalog/admin/includes/languages/fr_FR/modules/categories/RestrictAcces.txt 2012-04-04 12:14:58 UTC (rev 4147)
@@ -0,0 +1,25 @@
+<?php
+/**
+ @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.1.1
+ @date 04/04/2012, 09:48
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+*/
+$lang['module acapro listing_order text title']= "Tri dans les listing";
+$lang['module acapro listing_order text description']= "Option de tri pour les listing";
+$lang['tab cat restrictaccess']= "Accès";
+
+$lang['text info heading restrict access']= "Condition d'acces a cette actégories";
+$lang['entry condition desc']= "Regler le mode de vue pour les utilisateurs";
+$lang['entry condition']= "Utlisateur: ";
+$lang['tab cat restrictaccess']= "Accès";
+
+
+$lang['conditions none']= "aucune condition ";
+$lang['conditions log off']= "L'utilisateur doit ne pas être loggué ";
+$lang['conditions log on']= "L'utilisateur doit être loggé ";
+
+?>
\ No newline at end of file
Property changes on: trunk/extensions/RESTRICTACCES_stable/catalog/admin/includes/languages/fr_FR/modules/categories/RestrictAcces.txt
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/extensions/RESTRICTACCES_stable/catalog/admin/includes/modules/categories/RestrictAcces.php
===================================================================
--- trunk/extensions/RESTRICTACCES_stable/catalog/admin/includes/modules/categories/RestrictAcces.php (rev 0)
+++ trunk/extensions/RESTRICTACCES_stable/catalog/admin/includes/modules/categories/RestrictAcces.php 2012-04-04 12:14:58 UTC (rev 4147)
@@ -0,0 +1,121 @@
+<?php
+/**
+ @licence GPL 2005-2010 The osCSS developers - osCSS Open Source E-commerce
+ @portion code Copyright (c) 2002 osCommerce
+ @package osCSS-2 <www http://www.oscss.org>
+ @version 2.0.9
+ @date 29/08/10, 21:47
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+ @class RestrictAcces
+
+CREATE TABLE IF NOT EXISTS `osc_categories_extra` (
+ `categories_id` int(11) NOT NULL,
+ `cat_key` varchar(150) NOT NULL,
+ `cat_value` varchar(250) NOT NULL,
+ UNIQUE KEY `categories_id` (`categories_id`,`cat_key`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+def
+*/
+class RestrictAcces
+ implements InterfaceModule{
+ /**
+ @param array
+ */
+ public static $languages = array();
+ /**
+ @param object
+ */
+ public static $cInfo;
+
+ /**
+ @var array, list des tri possible pour les produits
+ */
+ public static $_condition;
+
+
+ public $code;
+ public $title;
+ public $description;
+ public $sort_order;
+ public $enabled;
+
+ /**
+ class constructor
+ */
+ function __construct() {
+ global $language,$languages_id;
+ $this->code = __CLASS__ ;
+ $this->type = 'categories' ;
+ $this->title = __('module acapro RestrictAcces text title');
+ $this->description = __('module acapro RestrictAcces text description');
+ $this->sort_order = (defined('MODULE_ACACAT_RESTRICTACCES_ORDER'))?MODULE_ACACAT_RESTRICTACCES_ORDER : 0;
+ $this->enabled = true;
+
+ self::$cInfo= new objectInfo (array());
+
+ self::$languages= tep_get_languages();
+
+
+ self::$_condition = array( array('id' => '0','text' => __('conditions none') ),
+ array('id' => '1', 'text' => __('conditions log off') ),
+ array('id' => '2', 'text' => __('conditions log on') )
+ );
+ }
+
+
+ /**
+ Edition produit
+ UP db
+ */
+ public function after_update ($cid) {
+ $DB=Database::getInstance();
+ $DB->query("DELETE FROM ".TABLE_CATEGORIES_EXTRA." WHERE categories_id='".(int)$cid."' ;");
+
+ if(isset($_POST[__CLASS__]['RESTRICT_ACCESS_BASE']) && $_POST[__CLASS__]['RESTRICT_ACCESS_BASE'] >0){
+ $sql_data_array['categories_id']= $cid;
+ $sql_data_array['cat_key']= 'RESTRICT_ACCESS_BASE';
+ $sql_data_array['cat_value']= $_POST[__CLASS__]['RESTRICT_ACCESS_BASE'];
+ }
+
+ if(count($sql_data_array) >0)
+ tep_db_perform(TABLE_CATEGORIES_EXTRA,$sql_data_array);
+ }
+
+
+ /**
+ Edition/affichage produit
+ UP db
+ */
+ public static function load_db_values ($cat_id) {
+ $DB=Database::getInstance();
+ $r=$DB->query("SELECT * FROM ".TABLE_CATEGORIES_EXTRA." WHERE categories_id='".(int)$cat_id."' ;");
+
+ foreach ($r->fetchAllAssoc() as $item)
+ self::$cInfo->$item['cat_key']=$item['cat_value'];
+
+ }
+
+ public function load_post_values($post){
+ return $post;
+ }
+
+ /**
+ Draw
+ */
+ public function display_edit(&$contents) {
+ $contents []=array('title'=> __('tab cat restrictaccess'),'text'=>tep_get_include_contents($this->type.'.'.__CLASS__.'.'.__FUNCTION__));
+ }
+
+
+/** Force implements InterfaceModule class to define this method */
+ function check() { return true; }
+ function install() { return false; }
+ function remove() { return false; }
+ function keys() {
+ return array( 'MODULE_ACACAT_RESTRICTACCES_SORT_ORDER');
+ }
+
+}
+?>
\ No newline at end of file
Property changes on: trunk/extensions/RESTRICTACCES_stable/catalog/admin/includes/modules/categories/RestrictAcces.php
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/extensions/RESTRICTACCES_stable/catalog/includes/modules/categories/RestrictAcces.php
===================================================================
--- trunk/extensions/RESTRICTACCES_stable/catalog/includes/modules/categories/RestrictAcces.php (rev 0)
+++ trunk/extensions/RESTRICTACCES_stable/catalog/includes/modules/categories/RestrictAcces.php 2012-04-04 12:14:58 UTC (rev 4147)
@@ -0,0 +1,87 @@
+<?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 07/06/10, 14:43
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+ @class desc_base
+*/
+class RestrictAcces
+ implements InterfaceModule {
+
+ private $content = false;
+
+ function __construct(){
+ global $page;
+ $this->code = __CLASS__;
+ $this->title = __('description base listing');
+ $this->description = __('description (chapeaux) produits dans les listing');
+ $this->sort_order = (defined('MODULE_ACAPRO_DESC_BASE_SORT_ORDER')) ? MODULE_ACAPRO_DESC_BASE_SORT_ORDER : 0 ;
+ $this->enabled = true;
+
+ if(!is_object($page)) return null;
+ $this->languages_id=$page->the_var('languages_id');
+
+ }
+
+ private function start(){
+
+ $page=page::getInstance();
+
+ $ccategory_id=$page->the_var('current_category_id');
+ if(!empty($ccategory_id)) $this->load_db_values($ccategory_id);
+ }
+
+
+ /**
+ */
+ public function get_option_data($array){
+ $this->start();
+ if(!$this->enabled) tep_redirect(tep_href_link(FILENAME_DEFAULT));
+
+ if(isset($this->content['RESTRICT_ACCESS_BASE'])) {
+ if(!tep_session_is_registered('customer_id') && $this->content['RESTRICT_ACCESS_BASE']==2) {
+ $navigation=navigation_history::getInstance();
+ $navigation->set_snapshot();
+ tep_redirect(FILENAME_LOGIN);
+ }
+ }
+
+ return $array;
+ }
+ /**
+ Chargement des db
+ */
+ public function load_db_values($cID){
+
+ if(empty($cID))return $this->content= false;
+
+ $product_query = tep_db_query($sql="select * from " . TABLE_CATEGORIES_EXTRA . " where categories_id='".$cID."' ");
+// var_dump($sql);
+ foreach($product_query->fetchAllAssoc() as $item)
+ $this->content[$item['cat_key']]= $item['cat_value'];
+
+ tep_db_free_result($product_query);
+ }
+
+
+ /**
+ Return min
+ */
+
+ public function display_view_min($pID){
+ global $page;
+ $m=array();
+ $this->load_db_values((int)$pID);
+ echo $this->content['products_chapo'];
+ }
+
+/** implements InterfaceModule depend */
+ public function check() {}
+ public function install() {}
+ public function remove() {}
+ public function keys() {}
+}
+?>
\ No newline at end of file
Added: trunk/extensions/RESTRICTACCES_stable/install.xml
===================================================================
--- trunk/extensions/RESTRICTACCES_stable/install.xml (rev 0)
+++ trunk/extensions/RESTRICTACCES_stable/install.xml 2012-04-04 12:14:58 UTC (rev 4147)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<contrib>
+ <description>
+ <details contrib_ref="" forum_ref="" contrib_type="products, content, catgeories" status="0" last_update="2011-03-15" />
+ <author_pkg>www.oscim.com</author_pkg>
+ <comments><![CDATA[]]> </comments>
+ <credits>oscim</credits>
+ <version>1.0</version>
+ <post_install><![CDATA[]]> </post_install>
+ </description>
+
+ <addfile>
+ <file name="admin/includes/modules/categories/RestrictAcces.php" />
+ <file name="admin/includes/gabarit/categories.RestrictAcces.display_edit.gab" />
+ <file name="includes/modules/categories/RestrictAcces.php" />
+ </addfile>
+
+ <addfilelg>
+ <file name="admin/includes/languages/%LANGUAGE%/modules/categories/RestrictAcces.txt" lgref="fr_FR"/>
+ </addfilelg>
+
+</contrib>
\ No newline at end of file
Property changes on: trunk/extensions/RESTRICTACCES_stable/install.xml
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/extensions/RESTRICTACCES_stable/readme
===================================================================
--- trunk/extensions/RESTRICTACCES_stable/readme (rev 0)
+++ trunk/extensions/RESTRICTACCES_stable/readme 2012-04-04 12:14:58 UTC (rev 4147)
@@ -0,0 +1,47 @@
+
+Ce module apport une table de liaison afin d'ajouter des image suppelementaire aux produits, cette extensionne modifie par le core d'osCSS, mais ajoute une table.
+
+
+Récuperation des anciennes installation, avec le UltimateImage qui ajouter des colonne à la table des produits. il est donc necessaire de convertir le format de ces données.
+Pour ce faire utiliser la commande suivante,
+
+ INSERT INTO osc_products_images (products_id, products_image_sm, products_image_xl, status)
+ SELECT products_id, products_image_sm_1 as products_image_sm, products_image_xl_1 as products_image_xl , 1 FROM osc_products WHERE products_image_sm_1 IS NOT NULL OR products_image_xl_1 IS NOT NULL;
+
+
+ INSERT INTO osc_products_images (products_id, products_image_sm, products_image_xl, status)
+ SELECT products_id, products_image_sm_1 as products_image_xl, products_image_xl_1 as products_image_sm , 1 FROM osc_products WHERE products_image_sm_1 IS NOT NULL OR products_image_xl_1 IS NOT NULL;
+
+ INSERT INTO osc_products_images (products_id, products_image_sm, products_image_xl, status)
+ SELECT products_id, products_image_sm_2 as products_image_xl, products_image_xl_2 as products_image_sm , 1 FROM osc_products WHERE products_image_sm_2 IS NOT NULL OR products_image_xl_2 IS NOT NULL;
+
+ INSERT INTO osc_products_images (products_id, products_image_sm, products_image_xl, status)
+ SELECT products_id, products_image_sm_3 as products_image_xl, products_image_xl_3 as products_image_sm , 1 FROM osc_products WHERE products_image_sm_3 IS NOT NULL OR products_image_xl_3 IS NOT NULL;
+
+ INSERT INTO osc_products_images (products_id, products_image_sm, products_image_xl, status)
+ SELECT products_id, products_image_sm_4 as products_image_xl, products_image_xl_4 as products_image_sm , 1 FROM osc_products WHERE products_image_sm_4 IS NOT NULL OR products_image_xl_4 IS NOT NULL;
+
+ INSERT INTO osc_products_images (products_id, products_image_sm, products_image_xl, status)
+ SELECT products_id, products_image_sm_5 as products_image_xl, products_image_xl_5 as products_image_sm , 1 FROM osc_products WHERE products_image_sm_5 IS NOT NULL OR products_image_xl_5 IS NOT NULL;
+
+ INSERT INTO osc_products_images (products_id, products_image_sm, products_image_xl, status)
+ SELECT products_id, products_image_sm_6 as products_image_xl, products_image_xl_6 as products_image_sm , 1 FROM osc_products WHERE products_image_sm_6 IS NOT NULL OR products_image_xl_6 IS NOT NULL;
+
+ DELETE FROM `osc_products_images` WHERE `products_image_sm` =''
+
+
+ ALTER TABLE `osc_products`
+ DROP `products_image_med`,
+ DROP `products_image_lrg`,
+ DROP `products_image_sm_1`,
+ DROP `products_image_xl_1`,
+ DROP `products_image_sm_2`,
+ DROP `products_image_xl_2`,
+ DROP `products_image_sm_3`,
+ DROP `products_image_xl_3`,
+ DROP `products_image_sm_4`,
+ DROP `products_image_xl_4`,
+ DROP `products_image_sm_5`,
+ DROP `products_image_xl_5`,
+ DROP `products_image_sm_6`,
+ DROP `products_image_xl_6`;
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <os...@us...> - 2012-04-04 12:06:36
|
Revision: 4146
http://oscss.svn.sourceforge.net/oscss/?rev=4146&view=rev
Author: oscim
Date: 2012-04-04 12:06:29 +0000 (Wed, 04 Apr 2012)
Log Message:
-----------
upgrade element manquant
Added Paths:
-----------
trunk/catalog/install/includes/sql/mysql/upgrade/2.0.9_2.1.0/tables/osc_categories.sql
Added: trunk/catalog/install/includes/sql/mysql/upgrade/2.0.9_2.1.0/tables/osc_categories.sql
===================================================================
--- trunk/catalog/install/includes/sql/mysql/upgrade/2.0.9_2.1.0/tables/osc_categories.sql (rev 0)
+++ trunk/catalog/install/includes/sql/mysql/upgrade/2.0.9_2.1.0/tables/osc_categories.sql 2012-04-04 12:06:29 UTC (rev 4146)
@@ -0,0 +1,16 @@
+--+######################################################################--+
+--| osCSS Open Source E-commerce |
+--+######################################################################--+
+--| Copyright (c) 2005-2012 The osCSS developers |
+--| |
+--| http://www.oscss.org |
+--| Portions Copyright (c) 2003 osCommerce |
+--+######################################################################--+
+--| This source file is subject to version 2.0 of the GPL license, |
+--| available at the following url: |
+--| http://www.oscss.org/ |
+--+######################################################################--+
+
+
+ALTER TABLE osc_categories ADD COLUMN sortchids_products varchar(150) NULL ;
+ALTER TABLE osc_categories ADD COLUMN sortchids_content varchar(150) NULL ;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|