|
From: <os...@us...> - 2012-04-10 16:43:03
|
Revision: 4193
http://oscss.svn.sourceforge.net/oscss/?rev=4193&view=rev
Author: oscim
Date: 2012-04-10 16:42:56 +0000 (Tue, 10 Apr 2012)
Log Message:
-----------
Ajsutement dev - modele datatype
Modified Paths:
--------------
trunk/dev/GenerCode/datatype/Modele/sql/mysql/install/tables/osc__DATATYPE_REPLACE__description.sql
Added Paths:
-----------
trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/modules/rapport/
trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/modules/rapport/rp__DATATYPE_REPLACE_.php
Added: trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/modules/rapport/rp__DATATYPE_REPLACE_.php
===================================================================
--- trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/modules/rapport/rp__DATATYPE_REPLACE_.php (rev 0)
+++ trunk/dev/GenerCode/datatype/Modele/catalog/admin/includes/modules/rapport/rp__DATATYPE_REPLACE_.php 2012-04-10 16:42:56 UTC (rev 4193)
@@ -0,0 +1,179 @@
+<?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 10/04/2012 , 15:00:00
+ @author oscim <mail aur...@os...> <www http://www.oscim.fr>
+ @encode UTF-8
+ @class rp__DATATYPE_REPLACE_
+ @brief manage description rp__DATATYPE_REPLACE_
+*/
+
+class rp__DATATYPE_REPLACE_
+ implements InterfaceModule{
+ /**
+ @var current string name
+ */
+ public $code;
+ /**
+ @var Datatype master
+ */
+ public $type;
+ /**
+ @var string title current module
+ */
+ public $title;
+ /**
+ @var string description current module
+ */
+ public $description;
+
+ /**
+ @var array info post data
+ */
+ public $listing = array();
+ /**
+ @var array info post data
+ */
+ public $query = array();
+ /**
+ @var boolean true/false
+ */
+ public $enabled;
+
+ /**
+ @brief class constructor
+ */
+ function __construct() {
+ $this->code = 'rp__DATATYPE_REPLACE_';
+ $this->type ='rapport';
+ $this->title = __('rp__DATATYPE_REPLACE_ heading title');
+ $this->description = __('rp__DATATYPE_REPLACE_ heading description');
+ $this->enabled = true;
+
+
+ global $languages_id;
+ $this->language_id = $languages_id;
+
+
+ }
+
+ /**
+ */
+ public function check_action($actions){
+ }
+
+ /**
+ @brief Edition/affichage produit
+ */
+ function load_db_values ($id) {
+
+ /**
+ @remarks this define col theader title, and ajust html code
+ Just for Edit listing
+ */
+ $this->listing['theader']=array(
+ array('width'=>'5%','class'=>'tcenter', 'txt'=>__('rp__DATATYPE_REPLACE_ table heading number') ) ,
+ array('width'=>'70%','class'=>'tcenter', 'txt'=>__('rp__DATATYPE_REPLACE_ table heading data') ) ,
+ array('width'=>'10%','class'=>'tcenter', 'txt'=>__('rp__DATATYPE_REPLACE_ table heading viewed') ),
+ array('width'=>'5%','class'=>'tcenter', 'txt'=>__('rp__DATATYPE_REPLACE_ table heading language') ),
+ );
+
+ /**
+ @remarks this define col in table, and if is possible sort
+ Just for Edit listing
+ */
+ $this->listing['modele']=array(
+ '_DATATYPE_REPLACE__id'=>true,
+ '_DATATYPE_REPLACE__name' =>true,
+ '_DATATYPE_REPLACE__viewed'=>true,
+ 'name'=>false,
+ );
+
+
+ $this->query['select'] = " p._DATATYPE_REPLACE__id, pd._DATATYPE_REPLACE__name, pd._DATATYPE_REPLACE__viewed , l.name";
+ $this->query['tables'] = " " . TABLE__DATATYPE_REPLACE_MAJ_. " p, " . TABLE__DATATYPE_REPLACE_MAJ__DESCRIPTION . " pd , " . TABLE_LANGUAGES . " l ";
+ $this->query['where'] = " p._DATATYPE_REPLACE__id = pd._DATATYPE_REPLACE__id and l.languages_id = pd.language_id ";
+ $this->query['orderby'] = " pd._DATATYPE_REPLACE__viewed DESC";
+
+ }
+
+ /**
+ @fn FormatDBValue($row)
+ @brief Format row values for put in listing
+ @param $item arrary/object
+ @return array;
+ */
+ function FormatDBValue($item) {
+ $ord = array();
+ foreach($this->listing['modele'] as $k=>$r){
+ if($k == '_DATATYPE_REPLACE__id')
+ $ord[$k]= '<a href="'.tep_href_link(FILENAME__DATATYPE_REPLACE_, 'action=view&cID='.$item[$k]).'" >'.$item[$k].'</a>';
+ else
+ $ord[$k]=$item[$k];
+
+ }
+
+ return $ord;
+ }
+
+
+ /**
+ */
+ function display_view($id) {
+ }
+
+
+
+
+ /**
+ @remarks implements InterfaceModule depend
+ if module twin in backoffice, report all content install in the other module
+ public function check() {return true;}
+ public function install() {return true;}
+ public function remove() {return true;}
+ public function keys() {return array(); }
+ */
+
+ /**
+ @fn check()
+ @brief test if count all var , and keys is equal
+ @return boolean true/false
+ */
+ function check() { return false; }
+
+
+ /**
+ @fn keys()
+ @return array all key configuration define by this module
+ */
+ function keys() {
+ return array('MODULE_PRODUCTS_VIEWEDDESCRIPTION_SORT_ORDER');
+ }
+
+ /**
+ @fn install()
+ @brief add all configuration
+ @note
+ - Modules can emarquer sql installation instructions, however, in the case of transverse information, or dependent of an extension, preferring the implementation of an extension, file with sql independent
+ - please, pefix all var configuration by 'MODULE_OT__MODTYPENAME_MAJ_'
+ - if module twin in backoffice, report all content install in the other module
+ - Not use language in DB , but function :__()
+ for MODULE_TOTO_ST
+ var title MODULE_TOTO_ST_S (small description)
+ var description MODULE_TOTO_ST_L (long description)
+ */
+ function install() { return false; }
+
+ /**
+ @fn remove()
+ @brief delete all configuration
+ @note
+ - please, pefix all var configuration by 'MODULE_PAYMENT__MODTYPENAME_MAJ_'
+ - if module twin in backoffice, report all content remove in the other module
+ */
+ function remove() { return false; }
+}
+?>
\ No newline at end of file
Modified: trunk/dev/GenerCode/datatype/Modele/sql/mysql/install/tables/osc__DATATYPE_REPLACE__description.sql
===================================================================
--- trunk/dev/GenerCode/datatype/Modele/sql/mysql/install/tables/osc__DATATYPE_REPLACE__description.sql 2012-04-10 16:23:03 UTC (rev 4192)
+++ trunk/dev/GenerCode/datatype/Modele/sql/mysql/install/tables/osc__DATATYPE_REPLACE__description.sql 2012-04-10 16:42:56 UTC (rev 4193)
@@ -7,5 +7,6 @@
language_id int(3) NOT NULL DEFAULT '1',
_DATATYPE_REPLACE__title varchar(128) NOT NULL,
_DATATYPE_REPLACE__chapo text NOT NULL,
- _DATATYPE_REPLACE__description text NOT NULL
+ _DATATYPE_REPLACE__description text NOT NULL,
+ _DATATYPE_REPLACE__viewed int(11) NOT NULL DEFAULT '1'
) CHARSET=utf8 ;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|