AvisVerifies - Version 2.5.9.6

Version Notes

La version 2.5.9.6 est stable.

Download this release

Release Info

Developer Magento Core Team
Extension AvisVerifies
Version 2.5.9.6
Comparing to
See all releases


Version 2.5.9.6

Files changed (80) hide show
  1. app/code/local/Netreviews/Avisverifies/Block/Adminhtml/Form/Edit.php +13 -0
  2. app/code/local/Netreviews/Avisverifies/Block/Adminhtml/Form/Edit/Form.php +18 -0
  3. app/code/local/Netreviews/Avisverifies/Block/Adminhtml/Form/Edit/Tab/Export.php +155 -0
  4. app/code/local/Netreviews/Avisverifies/Block/Adminhtml/Form/Edit/Tabs.php +22 -0
  5. app/code/local/Netreviews/Avisverifies/Block/Catalog/Product/List.php +42 -0
  6. app/code/local/Netreviews/Avisverifies/Block/Catalog/Product/View.php +42 -0
  7. app/code/local/Netreviews/Avisverifies/Block/Entity/Detailed.php +44 -0
  8. app/code/local/Netreviews/Avisverifies/Block/Observers/Checkout.php +11 -0
  9. app/code/local/Netreviews/Avisverifies/Block/Review/Helper.php +16 -0
  10. app/code/local/Netreviews/Avisverifies/Block/Review/Product/View.php +30 -0
  11. app/code/local/Netreviews/Avisverifies/Helper/API.php +116 -0
  12. app/code/local/Netreviews/Avisverifies/Helper/Data.php +46 -0
  13. app/code/local/Netreviews/Avisverifies/Helper/Export.php +413 -0
  14. app/code/local/Netreviews/Avisverifies/Model/Average.php +10 -0
  15. app/code/local/Netreviews/Avisverifies/Model/Avisverifies.php +8 -0
  16. app/code/local/Netreviews/Avisverifies/Model/Mysql4/Average.php +9 -0
  17. app/code/local/Netreviews/Avisverifies/Model/Mysql4/Average/Collection.php +20 -0
  18. app/code/local/Netreviews/Avisverifies/Model/Mysql4/Reviews.php +9 -0
  19. app/code/local/Netreviews/Avisverifies/Model/Mysql4/Reviews/Collection.php +28 -0
  20. app/code/local/Netreviews/Avisverifies/Model/Observers/Checkout/Track.php +16 -0
  21. app/code/local/Netreviews/Avisverifies/Model/Product.php +21 -0
  22. app/code/local/Netreviews/Avisverifies/Model/Reviews.php +136 -0
  23. app/code/local/Netreviews/Avisverifies/controllers/Adminhtml/AvisverifiesController.php +145 -0
  24. app/code/local/Netreviews/Avisverifies/controllers/DialogController.php +376 -0
  25. app/code/local/Netreviews/Avisverifies/controllers/IndexController.php +46 -0
  26. app/code/local/Netreviews/Avisverifies/etc/config.xml +239 -0
  27. app/code/local/Netreviews/Avisverifies/etc/system.xml +65 -0
  28. app/code/local/Netreviews/Avisverifies/sql/avisverifies_setup/mysql4-install-2.0.0.php +58 -0
  29. app/code/local/Netreviews/Avisverifies/sql/avisverifies_setup/mysql4-upgrade-2.0.0-2.5.8.php +8 -0
  30. app/design/frontend/default/default/layout/avisverifies.xml +68 -0
  31. app/design/frontend/default/default/template/avisverifies/admin/checkinstallation.phtml +77 -0
  32. app/design/frontend/default/default/template/avisverifies/admin/checkinstallation_tab.phtml +13 -0
  33. app/design/frontend/default/default/template/avisverifies/css.phtml +214 -0
  34. app/design/frontend/default/default/template/avisverifies/float.phtml +7 -0
  35. app/design/frontend/default/default/template/avisverifies/js.phtml +88 -0
  36. app/design/frontend/default/default/template/avisverifies/left.phtml +10 -0
  37. app/design/frontend/default/default/template/avisverifies/list.phtml +133 -0
  38. app/design/frontend/default/default/template/avisverifies/observers/checkout.phtml +12 -0
  39. app/design/frontend/default/default/template/avisverifies/pagination.phtml +72 -0
  40. app/design/frontend/default/default/template/avisverifies/review/helper/counter.phtml +9 -0
  41. app/design/frontend/default/default/template/avisverifies/review/helper/summary.phtml +48 -0
  42. app/design/frontend/default/default/template/avisverifies/review/helper/summary_short.phtml +49 -0
  43. app/design/frontend/default/default/template/avisverifies/right.phtml +10 -0
  44. app/design/frontend/default/default/template/avisverifies/wrapper.phtml +7 -0
  45. app/etc/modules/Netreviews_Avisverifies.xml +12 -0
  46. app/locale/de_DE/avisverifies.csv +56 -0
  47. app/locale/en_GB/avisverifies.csv +59 -0
  48. app/locale/en_US/avisverifies.csv +56 -0
  49. app/locale/es_ES/avisverifies.csv +56 -0
  50. app/locale/fr_FR/avisverifies.csv +59 -0
  51. app/locale/it_IT/avisverifies.csv +58 -0
  52. app/locale/nl_NL/avisverifies.csv +59 -0
  53. app/locale/pt_PT/avisverifies.csv +55 -0
  54. package.xml +18 -0
  55. skin/frontend/default/default/images/avisverifies/Sceau_100de_DE.png +0 -0
  56. skin/frontend/default/default/images/avisverifies/Sceau_100en_GB.png +0 -0
  57. skin/frontend/default/default/images/avisverifies/Sceau_100en_US.png +0 -0
  58. skin/frontend/default/default/images/avisverifies/Sceau_100es_ES.png +0 -0
  59. skin/frontend/default/default/images/avisverifies/Sceau_100fr_FR.png +0 -0
  60. skin/frontend/default/default/images/avisverifies/Sceau_100it_IT.png +0 -0
  61. skin/frontend/default/default/images/avisverifies/Sceau_100nl_NL.png +0 -0
  62. skin/frontend/default/default/images/avisverifies/Sceau_100pt_PT.png +0 -0
  63. skin/frontend/default/default/images/avisverifies/Sceau_45de_DE.png +0 -0
  64. skin/frontend/default/default/images/avisverifies/Sceau_45en_GB.png +0 -0
  65. skin/frontend/default/default/images/avisverifies/Sceau_45en_US.png +0 -0
  66. skin/frontend/default/default/images/avisverifies/Sceau_45es_ES.png +0 -0
  67. skin/frontend/default/default/images/avisverifies/Sceau_45fr_FR.png +0 -0
  68. skin/frontend/default/default/images/avisverifies/Sceau_45it_IT.png +0 -0
  69. skin/frontend/default/default/images/avisverifies/Sceau_45nl_NL.png +0 -0
  70. skin/frontend/default/default/images/avisverifies/Sceau_45pt_PT.png +0 -0
  71. skin/frontend/default/default/images/avisverifies/avisverifies.png +0 -0
  72. skin/frontend/default/default/images/avisverifies/etoile0.png +0 -0
  73. skin/frontend/default/default/images/avisverifies/etoile1.png +0 -0
  74. skin/frontend/default/default/images/avisverifies/etoile2.png +0 -0
  75. skin/frontend/default/default/images/avisverifies/etoile3.png +0 -0
  76. skin/frontend/default/default/images/avisverifies/etoile4.png +0 -0
  77. skin/frontend/default/default/images/avisverifies/etoile5.png +0 -0
  78. skin/frontend/default/default/images/avisverifies/mini_etoile_empty.png +0 -0
  79. skin/frontend/default/default/images/avisverifies/mini_etoile_full.png +0 -0
  80. skin/frontend/default/default/images/avisverifies/pagination-loader.gif +0 -0
app/code/local/Netreviews/Avisverifies/Block/Adminhtml/Form/Edit.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Netreviews_Avisverifies_Block_Adminhtml_Form_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
3
+ {
4
+ public function __construct()
5
+ {
6
+ parent::__construct();
7
+ $this->_blockGroup = 'avisverifies';
8
+ $this->_controller = 'adminhtml_form';
9
+ $version = Mage::getConfig()->getNode()->modules->Netreviews_Avisverifies->version;
10
+ $this->_headerText = Mage::helper('avisverifies')->__('Verified Reviews Form').
11
+ '<br> <small style="font-size:9px;">'.Mage::helper('avisverifies')->__('version').': '.$version.'</small>';
12
+ }
13
+ }
app/code/local/Netreviews/Avisverifies/Block/Adminhtml/Form/Edit/Form.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Netreviews_Avisverifies_Block_Adminhtml_Form_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
3
+ {
4
+ protected function _prepareForm()
5
+ {
6
+ $form = new Varien_Data_Form(
7
+ array(
8
+ 'id' => 'edit_form',
9
+ 'action' => $this->getUrl('*/*/save'),
10
+ 'method' => 'post',
11
+ )
12
+ );
13
+
14
+ $form->setUseContainer(true);
15
+ $this->setForm($form);
16
+ return parent::_prepareForm();
17
+ }
18
+ }
app/code/local/Netreviews/Avisverifies/Block/Adminhtml/Form/Edit/Tab/Export.php ADDED
@@ -0,0 +1,155 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Netreviews_Avisverifies_Block_Adminhtml_Form_Edit_Tab_Export extends Mage_Adminhtml_Block_Widget_Form
3
+ {
4
+ protected function _prepareForm()
5
+ {
6
+ $helper = Mage::helper('avisverifies');
7
+ $form = new Varien_Data_Form();
8
+ $form->setHtmlIdPrefix('export_');
9
+ $form->setFieldNameSuffix('export');
10
+ $websites = Mage::app()->getWebsites();
11
+
12
+ foreach ($websites as $website) {
13
+ $arra_websites[] = array('value' => $website->getId(), 'label' => $website->getName());
14
+ }
15
+
16
+ $fieldset = $form->addFieldset('export', array(
17
+ 'legend' => $helper->__('Export Settings'),
18
+ 'class' => 'fieldset-wide',
19
+ ));
20
+
21
+ $fieldset->addField('websitetoexport', 'select', array(
22
+ 'label' => Mage::helper('avisverifies')->__('Choose the website to export these orders'),
23
+ 'name' => 'websitetoexport',
24
+ 'values' => $arra_websites
25
+ ));
26
+
27
+ $fieldset->addField('csv', 'select', array(
28
+ 'label' => Mage::helper('avisverifies')->__('Run Export CSV'),
29
+ 'name' => 'csv',
30
+ 'values' => array(
31
+ array(
32
+ 'value' => 1,
33
+ 'label' => Mage::helper('avisverifies')->__('Yes'),
34
+ ),
35
+ array(
36
+ 'value' => 0,
37
+ 'label' => Mage::helper('avisverifies')->__('No'),
38
+ ),
39
+ ),
40
+ ));
41
+
42
+ $fieldset->addField('until', 'select', array(
43
+ 'label' => Mage::helper('avisverifies')->__('Until'),
44
+ 'name' => 'until',
45
+ 'values' => array(
46
+ array(
47
+ 'value' => '1w',
48
+ 'label' => Mage::helper('avisverifies')->__('1 week'),
49
+ ),
50
+ array(
51
+ 'value' => '2w',
52
+ 'label' => Mage::helper('avisverifies')->__('2 weeks'),
53
+ ),
54
+ array(
55
+ 'value' => '1m',
56
+ 'label' => Mage::helper('avisverifies')->__('1 month'),
57
+ ),
58
+ array(
59
+ 'value' => '2m',
60
+ 'label' => Mage::helper('avisverifies')->__('2 months'),
61
+ ),
62
+ array(
63
+ 'value' => '3m',
64
+ 'label' => Mage::helper('avisverifies')->__('3 months'),
65
+ ),
66
+ array(
67
+ 'value' => '4m',
68
+ 'label' => Mage::helper('avisverifies')->__('4 months'),
69
+ ),
70
+ array(
71
+ 'value' => '5m',
72
+ 'label' => Mage::helper('avisverifies')->__('5 months'),
73
+ ),
74
+ array(
75
+ 'value' => '6m',
76
+ 'label' => Mage::helper('avisverifies')->__('6 months'),
77
+ ),
78
+ array(
79
+ 'value' => '7m',
80
+ 'label' => Mage::helper('avisverifies')->__('7 months'),
81
+ ),
82
+ array(
83
+ 'value' => '8m',
84
+ 'label' => Mage::helper('avisverifies')->__('8 months'),
85
+ ),
86
+ array(
87
+ 'value' => '9m',
88
+ 'label' => Mage::helper('avisverifies')->__('9 months'),
89
+ ),
90
+ array(
91
+ 'value' => '10m',
92
+ 'label' => Mage::helper('avisverifies')->__('10 months'),
93
+ ),
94
+ array(
95
+ 'value' => '11m',
96
+ 'label' => Mage::helper('avisverifies')->__('11 months'),
97
+ ),
98
+ array(
99
+ 'value' => '12m',
100
+ 'label' => Mage::helper('avisverifies')->__('12 months'),
101
+ )
102
+ ),
103
+ ));
104
+
105
+ $fieldset->addField('product', 'select', array(
106
+ 'label' => Mage::helper('avisverifies')->__('Request product\'s review?'),
107
+ 'name' => 'product',
108
+ 'values' => array(
109
+ array(
110
+ 'value' => 1,
111
+ 'label' => Mage::helper('avisverifies')->__('Yes'),
112
+ ),
113
+ array(
114
+ 'value' => 0,
115
+ 'label' => Mage::helper('avisverifies')->__('No'),
116
+ ),
117
+ ),
118
+ ));
119
+ /*
120
+ $all_status = Mage::getModel('sales/order_status')->getResourceCollection()->getData();
121
+ foreach($all_status as $value){
122
+ $status[] = array('value'=>$value['status'],'label'=>$value['label']);
123
+ }
124
+
125
+ $fieldset->addField('order_status', 'multiselect', array(
126
+ 'label' => Mage::helper('avisverifies')->__('Choose your order status ?'),
127
+ 'name' => 'order_status[]',
128
+ 'values' => $status
129
+ ));
130
+
131
+ $fieldset->addField('csv_semicolon', 'select', array(
132
+ 'label' => Mage::helper('avisverifies')->__('Use a semicolon CSV seperator ?'),
133
+ 'name' => 'csv_semicolon',
134
+ 'values' => array(
135
+ array(
136
+ 'value' => ',',
137
+ 'label' => Mage::helper('avisverifies')->__('No'),
138
+ ),
139
+ array(
140
+ 'value' => ';',
141
+ 'label' => Mage::helper('avisverifies')->__('Yes'),
142
+ ),
143
+ ),
144
+ ));
145
+ */
146
+
147
+ if (Mage::registry('avisverifies')) {
148
+ $form->setValues(Mage::registry('avisverifies')->getData());
149
+ }
150
+
151
+ $this->setForm($form);
152
+ return parent::_prepareForm();
153
+ }
154
+
155
+ }
app/code/local/Netreviews/Avisverifies/Block/Adminhtml/Form/Edit/Tabs.php ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Netreviews_Avisverifies_Block_Adminhtml_Form_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
3
+ {
4
+ public function __construct()
5
+ {
6
+ parent::__construct();
7
+ $this->setId('edit_home_tabs');
8
+ $this->setDestElementId('edit_form');
9
+ $this->setTitle(Mage::helper('avisverifies')->__('Verified Reviews Tabs'));
10
+ }
11
+
12
+ protected function _beforeToHtml()
13
+ {
14
+ $this->addTab('export', array(
15
+ 'label' => Mage::helper('avisverifies')->__('Export'),
16
+ 'title' => Mage::helper('avisverifies')->__('Export'),
17
+ 'content' => $this->getLayout()->createBlock('avisverifies/adminhtml_form_edit_tab_export')->toHtml(),
18
+ ));
19
+
20
+ return parent::_beforeToHtml();
21
+ }
22
+ }
app/code/local/Netreviews/Avisverifies/Block/Catalog/Product/List.php ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Netreviews_Avisverifies_Block_Catalog_Product_List extends Mage_Catalog_Block_Product_List
3
+ {
4
+ // function override changing $templateType = false to $templateType = 'short'.
5
+ public function getReviewsSummaryHtml(Mage_Catalog_Model_Product $product, $templateType = 'short',$displayIfNoReviews = false)
6
+ {
7
+ // load avis verifiee product
8
+ $id = $product->getId();
9
+ $_newProduct = Mage::getModel('avisverifies/product')->load($id);
10
+ // the $templateType fix is handled in block - review - helper code.
11
+ if ($this->_initReviewsHelperBlock()) {
12
+ return $this->_reviewsHelperBlock->getSummaryHtml($_newProduct, $templateType, $displayIfNoReviews);
13
+ }
14
+ return '';
15
+ }
16
+
17
+ // copy of the code for 1.3 older version compatibility
18
+ protected function _initReviewsHelperBlock()
19
+ {
20
+ if (!$this->_reviewsHelperBlock) {
21
+ if (!$this->isModuleEnabled('Mage_Review')) {
22
+ return false;
23
+ } else {
24
+ $this->_reviewsHelperBlock = $this->getLayout()->createBlock('review/helper');
25
+ }
26
+ }
27
+ return true;
28
+ }
29
+
30
+ protected function isModuleEnabled($moduleName)
31
+ {
32
+ if (!Mage::getConfig()->getNode('modules/' . $moduleName)) {
33
+ return false;
34
+ }
35
+ $isActive = Mage::getConfig()->getNode('modules/' . $moduleName . '/active');
36
+ if (!$isActive || !in_array((string)$isActive, array('true', '1'))) {
37
+ return false;
38
+ }
39
+ return true;
40
+ }
41
+ // copy of the code for 1.3 older version compatibility
42
+ }
app/code/local/Netreviews/Avisverifies/Block/Catalog/Product/View.php ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Netreviews_Avisverifies_Block_Catalog_Product_View extends Mage_Catalog_Block_Product_View
3
+ {
4
+ // function override changing $templateType = false to $templateType = 'short'.
5
+ public function getReviewsSummaryHtml(Mage_Catalog_Model_Product $product, $templateType = 'short',$displayIfNoReviews = false)
6
+ {
7
+ // load avis verifiee product
8
+ $id = $product->getId();
9
+ $_newProduct = Mage::getModel('avisverifies/product')->load($id);
10
+ // the $templateType fix is handled in block - review - helper code.
11
+ if ($this->_initReviewsHelperBlock()) {
12
+ return $this->_reviewsHelperBlock->getSummaryHtml($_newProduct, $templateType, $displayIfNoReviews);
13
+ }
14
+ return '';
15
+ }
16
+
17
+ // copy of the code for 1.3 older version compatibility
18
+ protected function _initReviewsHelperBlock()
19
+ {
20
+ if (!$this->_reviewsHelperBlock) {
21
+ if (!$this->isModuleEnabled('Mage_Review')) {
22
+ return false;
23
+ } else {
24
+ $this->_reviewsHelperBlock = $this->getLayout()->createBlock('review/helper');
25
+ }
26
+ }
27
+ return true;
28
+ }
29
+
30
+ protected function isModuleEnabled($moduleName)
31
+ {
32
+ if (!Mage::getConfig()->getNode('modules/' . $moduleName)) {
33
+ return false;
34
+ }
35
+ $isActive = Mage::getConfig()->getNode('modules/' . $moduleName . '/active');
36
+ if (!$isActive || !in_array((string)$isActive, array('true', '1'))) {
37
+ return false;
38
+ }
39
+ return true;
40
+ }
41
+ // copy of the code for 1.3 older version compatibility
42
+ }
app/code/local/Netreviews/Avisverifies/Block/Entity/Detailed.php ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Netreviews_Avisverifies_Block_Entity_Detailed extends Mage_Rating_Block_Entity_Detailed
3
+ {
4
+ public function __construct()
5
+ {
6
+ Mage_Core_Block_Template::__construct();
7
+ $this->setTemplate('rating/detailed.phtml');
8
+ $entityId = Mage::app()->getRequest()->getParam('id');
9
+ $this->NbAvis = Mage::getModel('avisverifies/reviews')->getNbAvis($entityId);
10
+ $this->Note = Mage::getModel('avisverifies/reviews')->getNote($entityId);
11
+ }
12
+
13
+ function _toHtml()
14
+ {
15
+ $entityId = Mage::app()->getRequest()->getParam('id');
16
+ if (intval($entityId) <= 0) {
17
+ return '';
18
+ }
19
+
20
+ $NbAvis = Mage::getModel('avisverifies/reviews')->getNbAvis($entityId);
21
+ $reviewsCount = Mage::getModel('avisverifies/reviews')
22
+ ->getTotalReviews($entityId, true);
23
+
24
+ if (Mage::getStoreConfig('avisverifies/system/product') == 1) {
25
+ $this->setTemplate('avisverifies/review/helper/counter.phtml');
26
+ return Mage_Core_Block_Template::_toHtml();
27
+ }
28
+
29
+ $ratingCollection = Mage::getModel('rating/rating')
30
+ ->getResourceCollection()
31
+ ->addEntityFilter('product') # TOFIX
32
+ ->setPositionOrder()
33
+ ->setStoreFilter(Mage::app()->getStore()->getId())
34
+ ->addRatingPerStoreName(Mage::app()->getStore()->getId())
35
+ ->load();
36
+
37
+ if ($entityId) {
38
+ $ratingCollection->addEntitySummaryToItem($entityId, Mage::app()->getStore()->getId());
39
+ }
40
+
41
+ $this->assign('collection', $ratingCollection);
42
+ return Mage_Core_Block_Template::_toHtml();
43
+ }
44
+ }
app/code/local/Netreviews/Avisverifies/Block/Observers/Checkout.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Netreviews_Avisverifies_Block_Observers_Checkout extends Mage_Core_Block_Template
3
+ {
4
+ protected $order;
5
+ public function getOrder() {
6
+
7
+ $this->order = Mage::getModel('sales/order')->load(Mage::registry('AV_OrderIds'));
8
+ return $this->order;
9
+ }
10
+ }
11
+
app/code/local/Netreviews/Avisverifies/Block/Review/Helper.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Netreviews_Avisverifies_Block_Review_Helper extends Mage_Review_Block_Helper
3
+ {
4
+ // override default template
5
+ protected $_availableTemplates = array(
6
+ 'default' => 'avisverifies/review/helper/summary.phtml',
7
+ 'short' => 'avisverifies/review/helper/summary_short.phtml'
8
+ );
9
+
10
+ // add shorcut function for product id.
11
+ public function getProductId()
12
+ {
13
+ return $this->getProduct()->getId();
14
+ }
15
+
16
+ }
app/code/local/Netreviews/Avisverifies/Block/Review/Product/View.php ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Netreviews_Avisverifies_Block_Review_Product_View extends Mage_Review_Block_Product_View
3
+ {
4
+ // function override changing $templateType = false to $templateType = 'short'.
5
+ public function getReviewsSummaryHtml(Mage_Catalog_Model_Product $product, $templateType = 'short',$displayIfNoReviews = false)
6
+ {
7
+ // load avis verifiee product
8
+ $id = $product->getId();
9
+ $_newProduct = Mage::getModel('avisverifies/product')->load($id);
10
+ // the $templateType fix is handled in block - review - helper code.
11
+ if ($this->_initReviewsHelperBlock()) {
12
+ return $this->_reviewsHelperBlock->getSummaryHtml($_newProduct, $templateType, $displayIfNoReviews);
13
+ }
14
+ return '';
15
+ }
16
+
17
+ // copy of the code for older version compatibility
18
+ protected function _initReviewsHelperBlock()
19
+ {
20
+ if (!$this->_reviewsHelperBlock) {
21
+ if (!Mage::helper('catalog')->isModuleEnabled('Mage_Review')) {
22
+ return false;
23
+ } else {
24
+ $this->_reviewsHelperBlock = $this->getLayout()->createBlock('review/helper');
25
+ }
26
+ }
27
+
28
+ return true;
29
+ }
30
+ }
app/code/local/Netreviews/Avisverifies/Helper/API.php ADDED
@@ -0,0 +1,116 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php // Our API CLASS.
2
+ class Netreviews_Avisverifies_Helper_API{
3
+
4
+ protected $request;
5
+ protected $msg = array();
6
+
7
+ public $checksum = array(
8
+ 'errorQuery' => 0,
9
+ 'errorDiscussion' => 0,
10
+ 'insert' => 0,
11
+ 'update' => 0,
12
+ 'delete' => 0
13
+ );
14
+ public $debug = array();
15
+
16
+ public function construct(Mage_Core_Controller_Request_Http $request) {
17
+ $this->request = $request;
18
+ if ($request->getPost('message'))
19
+ $this->msg = unserialize($this->AC_decode_base64($request->getPost('message')));
20
+ }
21
+
22
+ public function msg($index){
23
+ // check for isset is essential, bcz we could have empty $msg.
24
+ return (isset($this->msg[$index])) ? $this->msg[$index] : null ;
25
+ }
26
+ // convert product reviews format
27
+ public function productReviews($websiteId){
28
+ // if null;
29
+ if (!isset($this->msg['data']))
30
+ return array();
31
+ // else
32
+ $reviews = explode("\n",trim($this->msg['data']));// "Array des lignes (séparateur \n)"
33
+ $tmp = array();
34
+ foreach ($reviews as $line) {
35
+ $column = explode("\t",$line); // "Récupération des colonnes pour chaque ligne, dans un array (séparateur \t = tabulation)"
36
+ $data = array();
37
+ switch ($column[0]) {
38
+ case 'NEW': case 'UPDATE':
39
+ $data = $this->column($column);
40
+ $data = array_merge($data, $this->discussion($column));
41
+ break;
42
+ case 'DELETE':
43
+ $data = array('error' =>false,'query' => $column[0],'id_product_av' => $column[2],'ref_product'=>$column[4]);
44
+ $this->checksum['delete']++;
45
+ break;
46
+ case 'AVG':
47
+ $data = array('query' => $column[0], 'id_product_av' => $column[1],
48
+ 'ref_product' => $column[2],'rate' => $column[3],'error' =>false,
49
+ 'nb_reviews' => urlencode($column[4]),'horodate_update' => time());
50
+ $this->checksum['update']++;
51
+ break;
52
+ default:
53
+ $data = array('id_product_av' => 0,'error' => true);
54
+ $this->debug[0] = 'Aucune action (NEW, UPDATE, DELETE) envoyée : ['.$column[0].']';
55
+ $this->checksum['errorQuery']++;
56
+ break;
57
+ }
58
+ $data = array_merge($data,array('website_id' => $websiteId));
59
+ $tmp[] = $data;
60
+ }
61
+ if (array_sum($this->checksum) != count($reviews)) {
62
+ $this->debug[] = "Une erreur s'est produite. Le nombre de lignes "
63
+ . " reçues ne correspond pas au nombre de lignes traitées par l'API."
64
+ . " Des données ont quand même pu être enregistré";
65
+ }
66
+ return $tmp;
67
+ }
68
+ // Diffirent column structure according to diffirent query.
69
+ protected function column($column){
70
+ return array(
71
+ 'query' => $column[0],
72
+ 'id_product_av' => $column[2],
73
+ 'ref_product' => $column[4],
74
+ 'rate' => $column[7],
75
+ 'review' => urlencode(($column[6])),
76
+ 'horodate' => $column[5],
77
+ 'customer_name' => urlencode((ucfirst($column[8][0]).". " .ucfirst($column[9]))),
78
+ );
79
+ }
80
+
81
+ protected function discussion($column){
82
+ // "Vérification de la présence d'échanges (nombre d'échange stocké dans 11) et chaque échange est de 3."
83
+ // count($column) equal {$column[0]...$column[11]}-> 12 + 3*($column[11]).
84
+ // NB: all this info is councatunated in a string with (séparateur \t = tabulation).
85
+ // empty return true for: '',0,'0',NULL. and that what we are checking for.
86
+ $echange = (!empty($column[11]))? $column[11] : 0;
87
+ // "Teste si le nombre de paramètres est correct : 12 paramètres sont passés puis 3 par échange"
88
+ if (($echange*3 + 12) == count($column)) {
89
+ $discussion = array();
90
+ for ($i = 0 ; $i < $echange ; $i++) {
91
+ $discussion[] = array(
92
+ 'horodate' => $column[11+($i*3)+1],
93
+ 'origine' => $column[11+($i*3)+2],
94
+ 'commentaire' => $column[11+($i*3)+3],
95
+ );
96
+ }
97
+ $this->checksum['insert']++;
98
+ return array('error' =>false,'discussion' => $this->AC_encode_base64(serialize($discussion)));
99
+ }
100
+ else {
101
+ $this->debug[$column[2]] = 'Nombre de paramètres passés par la ligne incohérents (Nb échanges : '.($echange*3).') : '.(count($column)-12);
102
+ $this->checksum['errorDiscussion']++;
103
+ return array('discussion' => '','error' => true);
104
+ }
105
+ }
106
+ // encode message
107
+ public function AC_encode_base64($sData){
108
+ $sBase64 = base64_encode($sData);
109
+ return strtr($sBase64, '+/', '-_');
110
+ }
111
+ // decode message
112
+ public function AC_decode_base64($sData){
113
+ $sBase64 = strtr($sData, '-_', '+/');
114
+ return base64_decode($sBase64);
115
+ }
116
+ }
app/code/local/Netreviews/Avisverifies/Helper/Data.php ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * This Helper serve as the data container for the api
4
+ * AND for translation purpose also.
5
+ */
6
+ class Netreviews_Avisverifies_Helper_Data extends Mage_Core_Helper_Abstract{
7
+
8
+ public $shopId = 1;
9
+ public $idwebsite;
10
+ public $secretkey;
11
+ public $statusChoosen;
12
+ public $processChoosen;
13
+ public $allowedProducts;
14
+ public $enabledwebsite;
15
+ public $forbiddenMailExtensions;
16
+ public $delay;
17
+ public $SHA1;
18
+
19
+ protected $config;
20
+
21
+ public function setup(array $config){
22
+ $this->config = $config;
23
+ // Magento Shop Info
24
+ $this->shopId = (isset($config['idShop']))? $config['idShop'] : $this->shopId;
25
+ // shop configuration
26
+ $magesel = Mage::getModel("core/website")->load($this->shopId);
27
+ $this->idwebsite = $magesel->getConfig('avisverifies/system/idwebsite');
28
+ $this->secretkey = $magesel->getConfig('avisverifies/system/secretkey');
29
+ $this->enabledwebsite = $magesel->getConfig('avisverifies/system/enabledwebsite');//reglage par defaut
30
+ // order config.
31
+ $this->allowedProducts = $magesel->getConfig(strtolower('AVISVERIFIES/system/GETPRODREVIEWS')); //récupérer les avis produits ou non
32
+ $this->processChoosen = $magesel->getConfig(strtolower('AVISVERIFIES/system/PROCESSINIT')); //onorder or onorderstatuschange
33
+ $this->statusChoosen = explode(';', $magesel->getConfig(strtolower('AVISVERIFIES/system/ORDERSTATESCHOOSEN'))); //status choisis
34
+ $this->forbiddenMailExtensions = explode(';', $magesel->getConfig(strtolower('AVISVERIFIES/system/FORBIDDEN_EMAIL'))); //emails interdit
35
+ $this->delay = $magesel->getConfig(strtolower('AVISVERIFIES/system/DELAY'));
36
+ // SHA1, secret Hashing.
37
+ if (isset($config['query']))
38
+ $this->SHA1 = SHA1($config['query'].$this->idwebsite.$this->secretkey);
39
+ }
40
+
41
+ // Check if the module is active
42
+ public static function isActive(){
43
+ return (Mage::getStoreConfig('avisverifies/system/enabledwebsite') == 1 &&
44
+ Mage::getStoreConfig(strtolower('avisverifies/system/DISPLAYPRODREVIEWS'))=='yes');
45
+ }
46
+ }
app/code/local/Netreviews/Avisverifies/Helper/Export.php ADDED
@@ -0,0 +1,413 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php // Our EXPORT CLASS.
2
+ class Netreviews_Avisverifies_Helper_Export{
3
+ protected $collection;
4
+ protected $isVersion13;
5
+ protected $API = false;
6
+
7
+ protected $items;
8
+ protected $count = 0;
9
+ protected $delay;
10
+ protected $idShop;
11
+ protected $resource;
12
+ protected $dataExport;
13
+ protected $arrStoresIds;
14
+ protected $isProductExport = null;
15
+
16
+ protected $forceParentId;
17
+ protected $mapProductId;
18
+
19
+ protected $configuredWebsiteId = false;
20
+
21
+
22
+ protected $customer = array(
23
+ 'order_id'=>0,
24
+ 'email'=>'',
25
+ 'nom'=>'',
26
+ 'prenom'=>'',
27
+ 'date'=>'',
28
+ 'delay'=>'',
29
+ 'product_id'=>0,
30
+ 'category'=>'',
31
+ 'product_name'=>'',
32
+ 'url'=>'',
33
+ 'id_shop'=>'',
34
+ 'status_order'=>'');
35
+
36
+ public $csvHeader = array(
37
+ 'refcommande',
38
+ 'email',
39
+ 'nom',
40
+ 'prenom',
41
+ 'datecommande',
42
+ 'delaiavis',
43
+ 'refproduit',
44
+ 'categorie',
45
+ 'description',
46
+ 'urlficheproduit',
47
+ 'id_shop',
48
+ 'order_status');
49
+
50
+
51
+ public function convertVersion($version){
52
+ $arr = explode('.', $version);
53
+ $count = count($arr);
54
+ $sum = 0;
55
+ foreach ($arr as $val){
56
+ $val = (int)$val;
57
+ $sum+= $val*pow(1000,$count);
58
+ $count--;
59
+ }
60
+ return $sum;
61
+ }
62
+
63
+
64
+ public function __construct(){
65
+ $this->resource = Mage::getSingleton('core/resource');
66
+ $this->collection = Mage::getResourceModel('sales/order_collection');
67
+ // check for sale order module version
68
+ $version = Mage::getConfig()->getModuleConfig("Mage_Sales")->version;
69
+ $version = $this->convertVersion($version);
70
+ // stable version (known): 1.4.0.15, but going with 1.4.0.0
71
+ $stableVersion = $this->convertVersion('1.4.0.0');
72
+ if ($version < $stableVersion)
73
+ $this->isVersion13 = true;
74
+ else
75
+ $this->isVersion13 = false;
76
+ $this->mainTable = ($this->isVersion13)? "e" : "main_table";
77
+
78
+ }
79
+
80
+ public function exportStruct($isProductExport){
81
+ $this->isProductExport = ($isProductExport == 1 || $isProductExport == 'yes');
82
+ }
83
+
84
+ public function createStoresIds($websitetoexport){
85
+ $magesel = Mage::getModel('core/website')->load($websitetoexport);
86
+ $delay = $magesel->getConfig(strtolower('AVISVERIFIES/system/DELAY'));
87
+ $this->delay = (isset($delay))? $delay : 0;
88
+
89
+ $website = $magesel;
90
+ $this->idShop = trim($website->getCode());
91
+
92
+ $arrStores = array();
93
+ foreach ($website->getStores() as $key => $store) {
94
+ $arrStores[] = $store->getData('store_id');
95
+ }
96
+ $this->arrStoresIds = $arrStores;
97
+
98
+ // Force Parent Id
99
+ $this->forceParentId = ($magesel->getConfig(strtolower('avisverifies/system/FORCE_PRODUCT_PARENT_ID')) == 'true');
100
+ $this->configuredWebsiteId = true ;
101
+
102
+ }
103
+
104
+ public function getDataExport(){
105
+ return ($this->dataExport)? $this->dataExport : array();
106
+ }
107
+
108
+ public function getCSVFile() {
109
+
110
+ $data = $this->dataExport;
111
+ $io = new Varien_Io_File();
112
+ $path = Mage::getBaseDir('var') . DS . 'export' . DS;
113
+ $name = md5(microtime());
114
+ $file = $path . DS . $name . '.csv';
115
+ $io->setAllowCreateFolders(true);
116
+ $io->open(array('path' => $path));
117
+ $io->streamOpen($file, 'w+');
118
+ $io->streamLock(true);
119
+ // $this->dataExport[0] == csvHeader
120
+ $io->streamWriteCsv($data[0]);
121
+ unset($data[0]);
122
+ //$delimiter = Mage::getSingleton('core/session')->getExportSeperator();
123
+ foreach ($data as $val) {
124
+ $io->streamWriteCsv($val);
125
+ }
126
+ return array(
127
+ 'type' => 'filename',
128
+ 'value' => $file,
129
+ 'rm' => false // can delete file after use
130
+ );
131
+ }
132
+
133
+
134
+ public function count(){
135
+ $this->count;
136
+ }
137
+
138
+ protected function queryJoinFixVersion13($resource){
139
+ $resource = Mage::getSingleton('core/resource');
140
+ $readConnection = $resource->getConnection('core_read');
141
+ // get the customer email eav field.
142
+ $query = "SELECT attribute_id FROM {$resource->getTableName('eav_attribute')}
143
+ WHERE attribute_code = '%s'";
144
+ $emailID = $readConnection->fetchAll(sprintf($query,'customer_email'));
145
+ $emailID = $emailID[0]['attribute_id'];
146
+ // add join form customer email field.
147
+ $collection = &$this->collection;
148
+ $collection->joinAttribute('billing_firstname', 'order_address/firstname', 'billing_address_id', null, 'left')
149
+ ->joinAttribute('billing_lastname', 'order_address/lastname', 'billing_address_id', null, 'left');
150
+ $collection->getSelect()->joinLeft(
151
+ array('email'=>$resource->getTableName('sales_order_varchar')),
152
+ $this->mainTable.'.entity_id = email.entity_id AND email.attribute_id ='.$emailID,
153
+ array('email.*'));
154
+ }
155
+
156
+ protected function queryJoin($resource){
157
+ if ($this->isVersion13)
158
+ $this->queryJoinFixVersion13($resource);
159
+
160
+ $collection = &$this->collection;
161
+ // join to get the parent id, and not child product id.
162
+ // we use IS NULL to check for parent only id.
163
+ $collection->getSelect()->joinLeft(
164
+ array('product'=>$resource->getTableName('sales/order_item')),
165
+ $this->mainTable.'.entity_id = product.order_id AND product.parent_item_id IS NULL ',
166
+ array('product.*'));
167
+ $collection->getSelect()->joinLeft(
168
+ array('url'=>"(SELECT * FROM {$resource->getTableName('core/url_rewrite')} GROUP BY product_id)"),
169
+ 'product.product_id = url.product_id',
170
+ array('product.*'));
171
+ }
172
+
173
+ protected function querySelectFixVersion13(){
174
+ $collection = &$this->collection;
175
+ $collection->getSelect()
176
+ ->columns('email.value as email')
177
+ ->columns('_table_billing_firstname.value AS firstname')
178
+ ->columns('_table_billing_lastname.value AS lastname');
179
+ }
180
+
181
+ protected function querySelectNormal(){
182
+ $collection = &$this->collection;
183
+ $collection->getSelect()
184
+ ->columns($this->mainTable.'.customer_email as email')
185
+ ->columns($this->mainTable.'.customer_firstname AS firstname')
186
+ ->columns($this->mainTable.'.customer_lastname AS lastname')
187
+ ->columns('product.product_type AS product_type');
188
+ }
189
+
190
+ protected function querySelect(){
191
+ $collection = &$this->collection;
192
+ $collection->getSelect()->reset(Zend_Db_Select::COLUMNS)->columns($this->mainTable.'.entity_id')
193
+ ->columns($this->mainTable.'.increment_id')
194
+ ->columns("DATE_FORMAT({$this->mainTable}.created_at,'%d/%m/%Y %H:%i') as created_at")
195
+ ->columns('product.product_id')->columns('product.name')
196
+ ->columns('url.request_path as url')->columns($this->mainTable.'.status');
197
+ if ($this->API) {
198
+ $collection->getSelect()
199
+ ->columns($this->mainTable.'.av_flag')
200
+ ->columns("UNIX_TIMESTAMP({$this->mainTable}.created_at) as timestamp")
201
+ ->columns($this->mainTable.'.av_horodate_get');
202
+ // fields added after installation
203
+ }
204
+ if ($this->isVersion13)
205
+ $this->querySelectFixVersion13();
206
+ else
207
+ $this->querySelectNormal();
208
+ }
209
+
210
+ protected function _where(){
211
+ $arrStores = implode(',', $this->arrStoresIds);
212
+ $collection = &$this->collection;
213
+ $collection->getSelect()->where("{$this->mainTable}.store_id IN ({$arrStores})");
214
+ }
215
+
216
+ protected function _whereStatus($status){
217
+ $collection = &$this->collection;
218
+ $collection->addAttributeToFilter('status',array("in"=>$status));
219
+ }
220
+
221
+ protected function _whereState($status){
222
+ $collection = &$this->collection;
223
+ $collection->addAttributeToFilter('state',array("in"=>$status));
224
+ }
225
+
226
+ protected function _whereTime($from,$to){
227
+ // using time
228
+ $collection = &$this->collection;
229
+ $collection->addAttributeToFilter($this->mainTable.'.created_at', array(
230
+ 'from' => $from,
231
+ 'to' => $to,
232
+ 'date' => true, // specifies conversion of comparison values
233
+ ));
234
+ }
235
+
236
+ protected function _whereDate($from,$to){
237
+ // using date
238
+ $collection = &$this->collection;
239
+ $collection->getSelect()
240
+ ->where("({$this->mainTable}.created_at BETWEEN {$from} AND {$to}) ");
241
+ }
242
+
243
+ protected function _whereFlag($flag){
244
+ $collection = &$this->collection;
245
+ $collection->addAttributeToFilter($this->mainTable.'.av_flag',$flag);
246
+ }
247
+
248
+ protected function queryGroupBy(){
249
+ $collection = &$this->collection;
250
+ $collection->getSelect()->group("{$this->mainTable}.increment_id");
251
+ }
252
+
253
+ protected function query($resource){
254
+ $this->queryJoin($resource);
255
+ $this->querySelect();
256
+ if ($this->isProductExport === false)
257
+ $this->queryGroupBy();
258
+ }
259
+
260
+ protected function itemsCSV($from,$to,array $status = array()){
261
+ // GET TABLE NAME
262
+ $resource = $this->resource;
263
+ $readConnection = $resource->getConnection('core_read');
264
+ // Configurable products are saved as parent item and child products
265
+ // with child product having parent_item_id refrence key to their parent id.
266
+ // bcz we are intrested in parent only with and parent_item_id IS NULL.
267
+ $this->query($resource);
268
+ $this->_where();
269
+ if(!empty($status)){
270
+ $this->_whereStatus($status);
271
+ }
272
+ $this->_whereDate($from,$to);
273
+
274
+ $query = $this->queryFix();
275
+ $collection = $readConnection->fetchAll($query);
276
+
277
+ $this->items = $collection;
278
+ }
279
+
280
+ protected function queryFix(){
281
+ $count = 10;
282
+ $collection = &$this->collection;
283
+ $query = $collection->getSelect().""; // object to string.
284
+ $query = str_replace("`(", "(", $query,$count); // JOIN HACK
285
+ $query = str_replace(")`", ")", $query,$count); // JOIN HACK
286
+ return $query;
287
+ }
288
+
289
+
290
+ protected function itemsAPI(array $config){
291
+ $this->API = true;
292
+ // GET TABLE NAME
293
+ $resource = $this->resource;
294
+ $readConnection = $resource->getConnection('core_read');
295
+ // Configurable products are saved as parent item and child products
296
+ // with child product having parent_item_id refrence key to their parent id.
297
+ // bcz we are intrested in parent only with and parent_item_id IS NULL.
298
+ $query = $this->query($resource);
299
+ $this->_where();
300
+ if (isset($config['from']) && isset($config['to']))
301
+ $this->_whereTime($from,$to);
302
+ if (isset($config['flag']))
303
+ $this->_whereFlag(0);
304
+ if (isset($config['status']))
305
+ $this->_whereStatus($config['status']);
306
+
307
+ $query = $this->queryFix();
308
+ $collection = $readConnection->fetchAll($query);
309
+ $this->items = $collection;
310
+ }
311
+
312
+ protected function createExport() {
313
+ foreach ($this->items as $item) {
314
+ $this->customer['order_id'] = $item['increment_id'];
315
+ $this->customer['email'] = $item['email'];
316
+ $this->customer['nom'] = utf8_decode($item['lastname']);
317
+ $this->customer['prenom'] = utf8_decode($item['firstname']);
318
+ $this->customer['date'] = $item['created_at'];
319
+ $this->customer['delay'] = $this->delay;
320
+ $this->customer["id_shop"] = $this->idShop;
321
+ $this->customer['product_id'] = ($this->isProductExport)? $item['product_id'] : "";
322
+ $this->customer['product_name'] = ($this->isProductExport)? utf8_decode($item['name']) : "";
323
+ $this->customer["url"] = ($this->isProductExport)? $item['url'] : "";
324
+ $this->customer['status_order'] = $item['status'];
325
+ // $this->customer["product_type"] = (isset($item['product_type']))? $item['product_type'] : ""; # debug for configurable products
326
+ if($this->API){
327
+ $this->customer['date_av_getted_order'] = $item['av_horodate_get'];
328
+ $this->customer['is_flag'] = $item['av_flag'];
329
+ $this->customer['timestamp'] = $item['timestamp'];
330
+
331
+ $this->customer['entity_id'] = $item['entity_id'];
332
+ // fields added after installation
333
+ }
334
+ // Force Product Parent id.
335
+ if ($this->customer['product_id'] != "" && $this->forceParentId)
336
+ $this->mapProductId[$this->customer['product_id']] = 0; // for now 0;
337
+
338
+ $this->dataExport[] = $this->customer;
339
+ $this->count++;
340
+ }
341
+ if ($this->forceParentId)
342
+ $this->forceParentProductId();
343
+ }
344
+
345
+ protected function forceParentProductId() {
346
+ // Get product parent id
347
+ $resource = $this->resource;
348
+ $readConnection = $resource->getConnection('core_read');
349
+ $table = $resource->getTableName('catalog/product_super_link');
350
+ $query = "SELECT * FROM $table";
351
+ $collection = $readConnection->fetchAll($query);
352
+ foreach ($collection as $val) {
353
+ if (isset($this->mapProductId[$val['product_id']]))
354
+ $this->mapProductId[$val['product_id']] = (int) $val['parent_id'];
355
+ }
356
+ $tmp = $this->dataExport;
357
+ unset($tmp[0]); // 0 contain header info
358
+ // now loop over the array and change id to parent id.
359
+ if (is_array($tmp)) {
360
+ foreach ($tmp as $index=>$val) {
361
+ $id = $val['product_id'];
362
+ if($id == '') continue;
363
+ // else we change the id.
364
+ if (!empty($this->mapProductId[$val['product_id']])) {
365
+ $this->dataExport[$index]['product_id'] = $this->mapProductId[$val['product_id']];
366
+ }
367
+ }
368
+ }
369
+ }
370
+
371
+ protected function throwExecption(){
372
+ if ($this->isProductExport === null)
373
+ Mage::throwException('Please specify "exportStruct()" before creating items. ');
374
+
375
+ if ($this->configuredWebsiteId !== true)
376
+ Mage::throwException('Please specify "createStoresIds()" before creating items. ');
377
+
378
+ }
379
+
380
+
381
+ public function createExportCSV($from,$to){
382
+ // test if object is correctly configured.
383
+ $this->throwExecption();
384
+ // continue
385
+ $this->itemsCSV($from, $to);
386
+ $this->dataExport[0] = $this->csvHeader;
387
+ $this->createExport();
388
+ }
389
+
390
+ public function createExportAPI(array $config){
391
+ // test if object is correctly configured.
392
+ $this->throwExecption();
393
+ // continue
394
+ $this->itemsAPI($config);
395
+ $this->createExport();
396
+ }
397
+
398
+ public function updateFlag(array $ids){
399
+ if (empty($ids))
400
+ return "";
401
+ $connection = Mage::getSingleton('core/resource')->getConnection('core_write');
402
+ $connection->beginTransaction();
403
+ $fields = array(
404
+ 'av_flag' => 1,
405
+ 'av_horodate_get' => time(),
406
+ );
407
+ foreach($ids as $val)
408
+ $tmp[] = '?';
409
+ $where = $connection->quoteInto("entity_id IN (".implode(',', $tmp).")",$ids);
410
+ $connection->update($this->resource->getTableName('sales/order'), $fields, $where);
411
+ $connection->commit();
412
+ }
413
+ }
app/code/local/Netreviews/Avisverifies/Model/Average.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Netreviews_Avisverifies_Model_Average extends Mage_Core_Model_Abstract
3
+ {
4
+ public function _construct()
5
+ {
6
+ $this->_init('avisverifies/average');
7
+ }
8
+ }
9
+
10
+
app/code/local/Netreviews/Avisverifies/Model/Avisverifies.php ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Netreviews_Avisverifies_Model_Avisverifies extends Mage_Core_Model_Abstract
3
+ {
4
+ public function _construct()
5
+ {
6
+ $this->_init('avisverifies/avisverifies');
7
+ }
8
+ }
app/code/local/Netreviews/Avisverifies/Model/Mysql4/Average.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Netreviews_Avisverifies_Model_Mysql4_Average extends Mage_Core_Model_Mysql4_Abstract
3
+ {
4
+ public function _construct()
5
+ {
6
+ $this->_init('avisverifies/average', 'ref_product');
7
+ $this->_isPkAutoIncrement = false;
8
+ }
9
+ }
app/code/local/Netreviews/Avisverifies/Model/Mysql4/Average/Collection.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Netreviews_Avisverifies_Model_Mysql4_Average_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
3
+ {
4
+ public function _construct()
5
+ {
6
+ parent::_construct();
7
+ $this->_init('avisverifies/average');
8
+ }
9
+
10
+ public function addAttributeToSort($attribute, $dir='asc')
11
+ {
12
+ if (!is_string($attribute)) {
13
+ return $this;
14
+ }
15
+ $this->setOrder($attribute, $dir);
16
+ return $this;
17
+ }
18
+ }
19
+
20
+
app/code/local/Netreviews/Avisverifies/Model/Mysql4/Reviews.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Netreviews_Avisverifies_Model_Mysql4_Reviews extends Mage_Core_Model_Mysql4_Abstract
3
+ {
4
+ public function _construct()
5
+ {
6
+ $this->_init('avisverifies/reviews', 'id_product_av');
7
+ $this->_isPkAutoIncrement = false;
8
+ }
9
+ }
app/code/local/Netreviews/Avisverifies/Model/Mysql4/Reviews/Collection.php ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Netreviews_Avisverifies_Model_Mysql4_Reviews_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
3
+ {
4
+ public function _construct()
5
+ {
6
+ parent::_construct();
7
+ $this->_init('avisverifies/reviews');
8
+ }
9
+
10
+ public function addAttributeToFilter($nameField, $value)
11
+ {
12
+ $this->getSelect()
13
+ ->where($nameField.' = ?', $value);
14
+ return $this;
15
+ }
16
+
17
+ public function addAttributeToSort($attribute, $dir='asc')
18
+ {
19
+ if (!is_string($attribute)) {
20
+ return $this;
21
+ }
22
+ $this->setOrder($attribute, $dir);
23
+ return $this;
24
+ }
25
+
26
+ }
27
+
28
+
app/code/local/Netreviews/Avisverifies/Model/Observers/Checkout/Track.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // xml: catalog_controller_product_view
3
+ class Netreviews_Avisverifies_Model_Observers_Checkout_Track {
4
+
5
+ public function trackCheckout(Varien_Event_Observer $observer) {
6
+
7
+ $ids = $observer->getEvent()->getOrderIds();
8
+ Mage::register('AV_OrderIds',$ids);
9
+
10
+ $layout = Mage::app()->getLayout();
11
+ $block = $layout->createBlock('avisverifies/observers_checkout')
12
+ ->setTemplate('avisverifies/observers/checkout.phtml');
13
+ $layout->getBlock('content')->append($block);
14
+
15
+ }
16
+ }
app/code/local/Netreviews/Avisverifies/Model/Product.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Netreviews_Avisverifies_Model_Product extends Mage_Catalog_Model_Product
3
+ {
4
+ // Overriding Magento getRatingSummary() : to our custom need.
5
+ public function getRatingSummary()
6
+ {
7
+ $magesel = Mage::app()->getStore()->getWebsite();
8
+
9
+ if (Netreviews_Avisverifies_Helper_Data::isActive()) {
10
+ $object = Mage::getModel('avisverifies/reviews');
11
+ $object->idProduct = $this->getData('entity_id'); // IMPORTANT add idProduct to to reviews object.
12
+ return $object;
13
+ }
14
+ else {
15
+ if(is_object($this->_getData('rating_summary')))
16
+ return $this->_getData('rating_summary');
17
+ }
18
+
19
+ }
20
+ }
21
+
app/code/local/Netreviews/Avisverifies/Model/Reviews.php ADDED
@@ -0,0 +1,136 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php // Our Custome Class . different then Magento Review class.
2
+ class Netreviews_Avisverifies_Model_Reviews extends Mage_Core_Model_Abstract{
3
+
4
+ public $idProduct = null;
5
+ public $page;
6
+
7
+ protected $idWebsite;
8
+ protected $limit;
9
+
10
+ public function _construct() {
11
+ $this->_init('avisverifies/reviews');
12
+ $this->idWebsite = Mage::app()->getWebsite()->getId();
13
+ $this->limit = 5;
14
+ $this->page = 1;
15
+ }
16
+
17
+ protected function throwException() {
18
+ if ($this->idProduct === null)
19
+ Mage::throwException('Please specify: "idProduct" -> ($your_object->idProduct = $idProduct).');
20
+ }
21
+
22
+ public function getReviewsCount() {
23
+ $this->throwException();
24
+ $magesel = Mage::getModel("core/website")->load($this->idWebsite);
25
+ $active = $magesel->getConfig(strtolower('AVISVERIFIES/system/GETPRODREVIEWS')); //récupérer les avis produits ou non
26
+
27
+ $stats = $this->getStatsProduct();
28
+ if (($stats !== NULL) && ($stats->getData('nb_reviews') > 1 && $active == 'yes')) {
29
+ return $stats->getData('nb_reviews');
30
+ }
31
+ else {
32
+ return '';
33
+ }
34
+ }
35
+
36
+ public function getStatsProduct() {
37
+ $this->throwException();
38
+ $collection = Mage::getModel('avisverifies/average')->getCollection()
39
+ ->addFieldToFilter('website_id',$this->idWebsite)
40
+ ->addFieldToFilter('ref_product',$this->idProduct);
41
+ return ($collection)? $collection->getFirstItem() : Null;
42
+ }
43
+
44
+ public function getProductReviews() {
45
+ $this->throwException();
46
+ $collection = Mage::getModel('avisverifies/reviews')->getCollection()
47
+ ->addFieldToFilter('website_id',$this->idWebsite)
48
+ ->addFieldToFilter('ref_product',$this->idProduct)
49
+ ->addAttributeToSort('horodate','desc')
50
+ ->setPageSize($this->limit)
51
+ ->setCurPage($this->page);
52
+ $maxPages = $collection->getLastPageNumber();
53
+ if($this->page > $maxPages)
54
+ return array();
55
+ else
56
+ return $collection;
57
+ }
58
+
59
+ public function getNbAvis() {
60
+ $this->throwException();
61
+ $collection = Mage::getModel('avisverifies/average')->getCollection()
62
+ ->addFieldToFilter('website_id',$this->idWebsite)
63
+ ->addFieldToFilter('ref_product',$this->idProduct);
64
+ if ($collection) {
65
+ $first = $collection->getFirstItem();
66
+ return $first->getData('nb_reviews');
67
+ }
68
+ else {
69
+ return NULL;
70
+ }
71
+ }
72
+
73
+ // for Backward compatibility.
74
+ public function getNote() {
75
+ return $this->getReviewNote();
76
+ }
77
+
78
+ public function getReviewNote() {
79
+ $this->throwException();
80
+ $collection = Mage::getModel('avisverifies/reviews')->getCollection()
81
+ ->addFieldToFilter('website_id',$this->idWebsite)
82
+ ->addFieldToFilter('ref_product',$this->idProduct)
83
+ ->addAttributeToSort('horodate','desc')
84
+ ;
85
+ //get the first item of the collection (load will be called automatically)
86
+ $first = $collection->getFirstItem();
87
+ //look at the data in the first item
88
+ return $first->getData('rate');
89
+ }
90
+
91
+ public function discussion($discussion,$review){
92
+ $my_review['discussion'] = array();
93
+ $unserialized_discussion = array();
94
+ try {
95
+ $unserialized_discussion = unserialize($this->AV_decode_base64($discussion));
96
+ } catch (Exception $exc) {
97
+ // Handle unserialize error normal string .
98
+ }
99
+ // Handle unserialize false .
100
+ if ($unserialized_discussion === false)
101
+ return array();
102
+
103
+ foreach ($unserialized_discussion as $k_discussion => $each_discussion) {
104
+ $my_review['discussion'][$k_discussion]['commentaire'] = $each_discussion['commentaire'];
105
+ $my_review['discussion'][$k_discussion]['horodate'] = strtotime($each_discussion['horodate']);
106
+ if ($each_discussion['origine'] == 'ecommercant') {
107
+ $my_review['discussion'][$k_discussion]['origine'] = 'Webmaster';
108
+ }
109
+ elseif ($each_discussion['origine'] == 'internaute') {
110
+ $my_review['discussion'][$k_discussion]['origine'] = urldecode($review->getData('customer_name'));
111
+ }
112
+ else {
113
+ $my_review['discussion'][$k_discussion]['origine'] = 'Moderator';
114
+ }
115
+ }
116
+ return $my_review['discussion'];
117
+ }
118
+
119
+ public function formatNote($note){
120
+ return is_numeric($note)? round($note*1,1): (!empty($note)?$note:"");
121
+ }
122
+
123
+ public function AV_encode_base64($sData){
124
+ $sBase64 = base64_encode($sData);
125
+ return strtr($sBase64, '+/', '-_');
126
+ }
127
+
128
+ public function AV_decode_base64($sData){
129
+ $sBase64 = strtr($sData, '-_', '+/');
130
+ return base64_decode($sBase64);
131
+ }
132
+
133
+ public function AV_sgbd_decode($value) {
134
+ return stripslashes(urldecode($value));
135
+ }
136
+ }
app/code/local/Netreviews/Avisverifies/controllers/Adminhtml/AvisverifiesController.php ADDED
@@ -0,0 +1,145 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Netreviews_Avisverifies_Adminhtml_AvisverifiesController extends Mage_Adminhtml_Controller_Action
3
+ {
4
+ protected $fileName = "lastOrders_AC_";
5
+
6
+ public function indexAction() {
7
+ $this->loadLayout();
8
+
9
+ $this->_setActiveMenu('catalog/avisverifies');
10
+ $this->_addBreadcrumb(Mage::helper('avisverifies')->__('Form'), Mage::helper('avisverifies')->__('Form'));
11
+
12
+ // add block to layout
13
+ $block = $this->getLayout()->createBlock('avisverifies/adminhtml_form_edit','avisverifies_index');
14
+ $this->getLayout()->getBlock('content')->append($block);
15
+
16
+ $block = $this->getLayout()->createBlock('avisverifies/adminhtml_form_edit_tabs','avisverifies_index_tabs');
17
+ $this->getLayout()->getBlock('left')->append($block);
18
+
19
+ $this->renderLayout();
20
+ }
21
+
22
+ public function saveAction() {
23
+ $result = $this->getRequest()->getParams();
24
+ $isExport = (isset($result['export']) && isset($result['export']['csv']) && $result['export']['csv'] == 1);
25
+
26
+ if ($isExport) {
27
+ $type = substr($result['export']['until'], -1);
28
+ // casting to int, for sql injection.
29
+ $period = (int)str_replace($type, "", $result['export']['until']);
30
+ $type = ($type == "m")? 'MONTH' : 'WEEK';
31
+ $from = "DATE_SUB(CURDATE(), INTERVAL $period $type)";
32
+ $to = "DATE_ADD(curdate(),INTERVAL 1 DAY)";
33
+ //Liste des stores appartenant au website choisi par le user
34
+
35
+ $websitetoexport = $result['export']['websitetoexport'];
36
+ $helperData = Mage::helper('avisverifies/Export');
37
+
38
+ $helperData->createStoresIds($websitetoexport);
39
+ $helperData->exportStruct($result['export']['product']);
40
+
41
+ // Mage::getSingleton('core/session')->setExportSeperator($result['export']['csv_semicolon']);
42
+ // $status = ($result['export']['order_status'] == 'all')? array() : $result['export']['order_status'];
43
+ //construction du CSV
44
+ $helperData->createExportCSV($from,$to);
45
+ $content = $helperData->getCSVFile();
46
+ $this->_prepareDownloadResponse($this->fileName.date("Y-m-d").'.csv', $content, 'text/csv');
47
+
48
+ }
49
+ else {
50
+ $url = Mage::helper("adminhtml")->getUrl("avisverifies/adminhtml_avisverifies/index");
51
+ $this->_redirectUrl($url);
52
+ }
53
+ }
54
+
55
+ public function checkInstallationAction() {
56
+
57
+ $resource = Mage::getSingleton('core/resource');
58
+ $read = $resource->getConnection('core_read');
59
+ $table = $resource->getTableName('avisverifies_products_reviews');
60
+ $table2 = $resource->getTableName('avisverifies_products_average');
61
+ $table3 = $resource->getTableName('sales/order');
62
+
63
+ $q = "SHOW TABLES";
64
+ $results = $read->query($q)->fetchAll();
65
+ $tables = array('Reviews'=>false,'Average'=>false);
66
+ foreach ($results as $val) {
67
+ foreach($val as $i=>$v) {
68
+ if ($v == $table)
69
+ $tables['Reviews'] = true;
70
+ elseif ($v == $table2)
71
+ $tables['Average'] = true;
72
+ }
73
+ }
74
+
75
+ $orders = array('AV_Flag'=>false,'AV_Horodate_Get'=>false);
76
+ $results = $read->query("DESCRIBE $table3")->fetchAll();
77
+ foreach ($results as $val) {
78
+ foreach($val as $i=>$v) {
79
+ if ($v == 'av_flag')
80
+ $orders['AV_Flag'] = true;
81
+ elseif ($v == 'av_horodate_get')
82
+ $orders['AV_Horodate_Get'] = true;
83
+ }
84
+ }
85
+
86
+ $res = $read->query("SELECT COUNT(*) FROM $table")->fetch();
87
+ $count['Reviews'] = $res['COUNT(*)'];
88
+ $res = $read->query("SELECT COUNT(*) FROM $table2")->fetch();
89
+ $count['Average'] = $res['COUNT(*)'];
90
+
91
+ ## added orders missing field. code is commented to be used in case of need. ##
92
+ // $write = $resource->getConnection('core_write');
93
+ // $write->query("ALTER TABLE `{$table3}` add av_horodate_get varchar(32);");
94
+ // $write->query("ALTER TABLE `{$table3}` add av_flag tinyint default 0;");
95
+ // $write->query("UPDATE `{$table3}` SET `av_flag` = 1;");
96
+ ## added orders missing field. code is commented to be used in case of need. ##
97
+
98
+ if ($orders['AV_Flag']) {
99
+ $res = $read->query("SELECT COUNT(*) FROM $table3 WHERE av_flag = 1")->fetch();
100
+ $count['Order_Set_Flag_1'] = $res['COUNT(*)'];
101
+ $res = $read->query("SELECT COUNT(*) FROM $table3 WHERE av_flag = 0")->fetch();
102
+ $count['Order_Set_Flag_0'] = $res['COUNT(*)'];
103
+ }
104
+
105
+ ## check sales_flat_order_item. code is commented to be used in case of need. ##
106
+ $orderId = (isset($_GET['checkOrders']))? (int) $_GET['checkOrders'] : NULL;
107
+ $orderId = (is_null($orderId))? NULL : (int) stripcslashes(urlencode($orderId));
108
+ $checkOrders = array();
109
+ if ($orderId) {
110
+ $table4 = $resource->getTableName('sales/order_item');
111
+ $query = " SELECT "
112
+ . "`t3`.`increment_id`,`t4`.`item_id`, `t4`.`order_id`, `t4`.`parent_item_id`,"
113
+ . " `t4`.`quote_item_id`, `t4`.`store_id`, `t4`.`created_at`, `t4`.`updated_at`, `t4`.`product_id`,"
114
+ . " `t4`.`product_type`, `t4`.`is_virtual`, `t4`.`sku`, `t4`.`name` "
115
+ . " FROM $table4 t4 LEFT JOIN $table3 t3 ON t3.entity_id = t4.order_id "
116
+ . " WHERE t3.increment_id = :orderId ";
117
+ $bind = array('orderId' => $orderId);
118
+ $checkOrders = $read->query($query, $bind)->fetchAll();
119
+ }
120
+
121
+ ## check sales_flat_order_item. code is commented to be used in case of need. ##
122
+
123
+ $this->loadLayout();
124
+ $layout = $this->getLayout();
125
+
126
+ // add block to layout
127
+ $block = $layout->createBlock('core/template');
128
+ $block->setData('area','frontend');
129
+ $block->setTemplate('avisverifies/admin/checkinstallation.phtml');
130
+ // $block = $layout->createBlock('avisverifies/adminhtml_checkInstallation_index','avisverifies_checkinstallation');
131
+ $block->setData('tables',$tables);
132
+ $block->setData('orders',$orders);
133
+ $block->setData('checkOrders',$checkOrders);
134
+ $block->setData('count',$count);
135
+ $layout->getBlock('content')->append($block);
136
+
137
+ $block = $layout->createBlock('core/template');
138
+ $block->setData('area','frontend');
139
+ $block->setTemplate('avisverifies/admin/checkinstallation_tab.phtml');
140
+ // $block = $layout->createBlock('avisverifies/adminhtml_checkInstallation_tab','avisverifies_checkinstallation_tab');
141
+ $layout->getBlock('left')->append($block);
142
+
143
+ $this->renderLayout();
144
+ }
145
+ }
app/code/local/Netreviews/Avisverifies/controllers/DialogController.php ADDED
@@ -0,0 +1,376 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Netreviews_Avisverifies_DialogController extends Mage_Core_Controller_Front_Action
3
+ {
4
+
5
+ public function indexAction() {
6
+
7
+ /**************************************
8
+ * GET PARENT IDS FROM CHILD ID: *
9
+ * Table: catalog_product_super_link *
10
+ * Where IN childs Id equal ect... *
11
+ **************************************/
12
+
13
+ $request = $this->getRequest();
14
+ // decode API Message
15
+ $API = Mage::helper('avisverifies/API');
16
+ $API->construct($request);
17
+ // load Magento config
18
+ $DATA = Mage::helper('avisverifies/Data');
19
+ // check for post
20
+ if ($request->getPost()) {
21
+ // load magento configuration
22
+ $DATA->setup(array('idShop'=>$API->msg('id_shop'),'query'=>$API->msg('query')));
23
+ // check if active
24
+ $IsActiveVar = $this->isActiveModule($DATA,$API->msg('query'));
25
+ // if not active return error.
26
+ if ($IsActiveVar['return'] != 1) {
27
+ // error is serialized and enocdeed
28
+ echo $API->AC_encode_base64(serialize($IsActiveVar));
29
+ exit;
30
+ }
31
+ // now check if the SecurityData.
32
+ $checkSecurityVar = $this->checkSecurityData($DATA,$API);
33
+ // if not valid return error.
34
+ if ($checkSecurityVar['return'] != 1 ) {
35
+ // error is serialized and enocdeed
36
+ echo $API->AC_encode_base64(serialize($checkSecurityVar));
37
+ exit;
38
+ }
39
+ /* ############ DEBUT DU TRAITEMENT ############*/
40
+ // switch case on query type.
41
+ switch ($request->getPost('query')) {
42
+ case 'isActiveModule':
43
+ $toReply = $IsActiveVar;
44
+ break;
45
+ case 'setModuleConfiguration' :
46
+ $toReply = $this->setModuleConfiguration($DATA,$API);
47
+ break;
48
+ case 'getModuleAndSiteConfiguration' :
49
+ $toReply = $this->getModuleAndSiteConfiguration($DATA,$API);
50
+ break;
51
+ case 'getOrders' :
52
+ $toReply = $this->getOrders($DATA,$API);
53
+ break;
54
+ case 'setProductsReviews' :
55
+ $toReply = $this->setProductsReviews($DATA,$API);
56
+ break;
57
+ case 'truncateTables' :
58
+ $toReply = $this->truncateTables($DATA,$API);
59
+ break;
60
+ default:
61
+ $reponse['debug'] = "Aucun variable ACTION reçues";
62
+ $reponse['return'] = 2; //A definir
63
+ $reponse['query'] = $request->getPost('query');
64
+ // error is serialized and enocdeed
65
+ echo $API->AC_encode_base64(serialize($reponse));
66
+ exit;
67
+ }
68
+ // Affichage du retour des fonctions pour récupération du résultat par AvisVerifies
69
+ echo $API->AC_encode_base64(serialize($toReply));
70
+ exit;
71
+ }
72
+ else
73
+ {
74
+ $reponse['debug'] = "Aucun variable POST reçues";
75
+ $reponse['return'] = 2; //A definir
76
+ $reponse['query'] = "";
77
+ // error is serialized and enocdeed
78
+ echo $API->AC_encode_base64(serialize($reponse));
79
+ exit;
80
+ }
81
+ }
82
+
83
+ protected function checkSecurityData($DATA,$API) {
84
+ // Vérification si identifiants non vide
85
+ if (!$DATA->idwebsite OR !$DATA->secretkey) {
86
+ $reponse['debug'] = "Identifiants clients non renseignés sur le module";
87
+ $reponse['message'] = "Identifiants clients non renseignés sur le module";
88
+ $reponse['return'] = 3; //A definir
89
+ $reponse['query'] = 'checkSecurityData';
90
+ return $reponse;
91
+ }
92
+ //Vérification si idWebsite OK
93
+ elseif ($API->msg('idWebsite') !== $DATA->idwebsite) {
94
+ $reponse['message'] = "Clé Website incorrecte";
95
+ $reponse['debug'] = "Clé Website incorrecte";
96
+ $reponse['return'] = 4; //A definir
97
+ $reponse['query'] = 'checkSecurityData';
98
+ return $reponse;
99
+ }
100
+ //Vérification si Signature OK
101
+ elseif ($DATA->SHA1 !== $API->msg('sign')) {
102
+ $reponse['message'] = "La signature est incorrecte";
103
+ $reponse['debug'] = "La signature est incorrecte";
104
+ $reponse['return'] = 5; //A definir
105
+ $reponse['query'] = 'checkSecurityData';
106
+ return $reponse;
107
+ }
108
+ $reponse['message'] = "Identifiants Client Ok";
109
+ $reponse['debug'] = "Identifiants Client Ok";
110
+ $reponse['return'] = 1; //A definir
111
+ $reponse['query'] = 'checkSecurityData';
112
+ return $reponse;
113
+
114
+ }
115
+
116
+ protected function setModuleConfiguration($DATA,$API) {
117
+ $mageselc = new Mage_Core_Model_Config();
118
+ $mageselc->cleanCache(); // remove cache
119
+ $idShop = $DATA->shopId;
120
+ $mageselc->saveConfig(strtolower('avisverifies/system/PROCESSINIT'),$API->msg('init_reviews_process'),'websites',$idShop);
121
+ //Implode si plusieurs éléments donc is_array
122
+ $ORDERSTATESCHOOSEN = (is_array($API->msg('id_order_status_choosen'))) ? implode(';',$API->msg('id_order_status_choosen')) : $API->msg('id_order_status_choosen');
123
+ $mageselc->saveConfig(strtolower('avisverifies/system/ORDERSTATESCHOOSEN'), $ORDERSTATESCHOOSEN,'websites',$idShop);
124
+ $mageselc->saveConfig(strtolower('avisverifies/system/DELAY'), $API->msg('delay'),'websites',$idShop);
125
+ $mageselc->saveConfig(strtolower('avisverifies/system/GETPRODREVIEWS'),$API->msg('get_product_reviews'),'websites',$idShop);
126
+ $mageselc->saveConfig(strtolower('avisverifies/system/DISPLAYPRODREVIEWS'),$API->msg('display_product_reviews'),'websites',$idShop);
127
+ $mageselc->saveConfig(strtolower('avisverifies/system/SCRIPTFIXE_ALLOWED'),$API->msg('display_fixe_widget'),'websites',$idShop);
128
+ $mageselc->saveConfig(strtolower('avisverifies/system/SCRIPTFIXE_POSITION'),$API->msg('position_fixe_widget'),'websites',$idShop);
129
+ $mageselc->saveConfig(strtolower('avisverifies/system/SCRIPTFLOAT_ALLOWED'),$API->msg('display_float_widget'),'websites',$idShop);
130
+ $mageselc->saveConfig(strtolower('avisverifies/system/URLCERTIFICAT'),$API->msg('url_certificat'),'websites',$idShop);
131
+ //Implode si plusieurs éléments donc is_array
132
+ $FORBIDDENEMAIL = (is_array($API->msg('forbidden_mail_extension'))) ? implode(';',$API->msg('forbidden_mail_extension')) : $API->msg('forbidden_mail_extension');
133
+ $mageselc->saveConfig(strtolower('avisverifies/system/FORBIDDEN_EMAIL'), $FORBIDDENEMAIL,'websites',$idShop);
134
+ $mageselc->saveConfig(strtolower('avisverifies/system/SCRIPTFIXE'),str_replace(array("\r\n", "\n"), '', stripslashes(str_replace('\"','"',$API->msg('script_fixe_widget')))),'websites',$idShop);
135
+ $mageselc->saveConfig(strtolower('avisverifies/system/SCRIPTFLOAT'),str_replace(array("\r\n", "\n"), '', stripslashes(str_replace('\"','"',$API->msg('script_float_widget')))),'websites',$idShop);
136
+ // Force Product Parent ID.
137
+ $mageselc->saveConfig(strtolower('avisverifies/system/FORCE_PRODUCT_PARENT_ID'),$API->msg('force_product_parent_id'),'websites',$idShop);
138
+ Mage::app()->cleanCache(); // remove cache
139
+ $mageselc->cleanCache(); // remove cache
140
+
141
+ $reponse['message'] = $this->_getModuleAndSiteInfos($DATA);
142
+ $reponse['debug'] = "La configuration du site a été mise à jour";
143
+ $reponse['return'] = 1; //A definir
144
+ $reponse['query'] = $API->msg('query');
145
+
146
+ return $reponse;
147
+
148
+ }
149
+
150
+ protected function truncateTables($DATA,$API){
151
+ $reponse['return'] = 1;
152
+ $reponse['debug'] = "Tables vidées";
153
+ $reponse['message'] = "Tables vidées";
154
+
155
+ $resource = Mage::getSingleton('core/resource');
156
+ $write = $resource->getConnection('core_write');
157
+ $write->delete($resource->getTableName('avisverifies/reviews'));
158
+ $write->delete($resource->getTableName('avisverifies/average'));
159
+
160
+ $reponse['query'] = $this->getRequest()->getPost('query'); // get request post
161
+ Mage::app()->cleanCache();
162
+ return $reponse;
163
+ }
164
+
165
+
166
+ protected function isActiveModule($DATA,$query){
167
+ if ($DATA->enabledwebsite) {
168
+ if ($DATA->enabledwebsite != 1) {
169
+ $reponse['debug'] = "Modulé Désactivé";
170
+ $reponse['return'] = 2; //Module désactivé
171
+ $reponse['query'] = $query;
172
+ return $reponse;
173
+ }
174
+ }
175
+ else {
176
+ $reponse['debug'] = "Modulé Introuvable";
177
+ $reponse['return'] = 3; //Module non installé
178
+ $reponse['query'] = $query;
179
+ return $reponse;
180
+ }
181
+ $reponse['debug']="Modulé Installé et activé";
182
+ $reponse['return'] = 1; //Module OK
183
+ $reponse['query'] = $query;
184
+ return $reponse;
185
+ }
186
+
187
+ protected function getModuleAndSiteConfiguration($DATA,$API) {
188
+ $reponse['message'] = $this->_getModuleAndSiteInfos($DATA);
189
+ $reponse['query'] = $API->msg('query');
190
+ $reponse['return'] = (empty($reponse['message']))? 2 : 1; // 2:error, 1:success.
191
+ return $reponse;
192
+ }
193
+
194
+ protected function getOrders($DATA,$API){
195
+ $helperData = Mage::helper('avisverifies/Export');
196
+ $helperData->createStoresIds($DATA->shopId);
197
+ $helperData->exportStruct($DATA->allowedProducts);
198
+
199
+ if ($API->msg('force') == 1) {
200
+ if ($API->msg('date_deb') && $API->msg('date_fin')) {
201
+ $from = date("Y-m-d H:i:s",strtotime($API->msg('date_deb')));
202
+ $to = date("Y-m-d H:i:s",strtotime($API->msg('date_fin')));
203
+ $helperData->createExportAPI(array('flag'=>true,'from'=>$from,'to'=>$to));
204
+ $reponse['debug']['mode'] = "[forcé] ".$helperData->count()." commandes récupérées en force du ".$from." au ".$to;
205
+ }
206
+ else { // en cas d'erreur
207
+ $reponse['debug'][] = "Aucune période renseignée pour la récupération des commandes en mode forcé";
208
+ return $reponse;
209
+ }
210
+ }
211
+ elseif ($DATA->processChoosen == 'onorder') {
212
+ $helperData->createExportAPI(array('flag'=>true));
213
+ $reponse['debug']['mode'] = "[onorder] ".$helperData->count()." commandes récupérées";
214
+ }
215
+ elseif ($DATA->processChoosen == 'onorderstatuschange') {
216
+ if (count($DATA->statusChoosen) >= 1) {
217
+ $helperData->createExportAPI(array('flag'=>true,'status'=>$DATA->statusChoosen));
218
+ $reponse['debug']['mode'] = "[onorderstatuschange] ".$helperData->count()." commandes récupérées avec statut ".implode(";", $DATA->statusChoosen);
219
+ }
220
+ else { // en cas d'erreur
221
+ $reponse['debug'][] = "Aucun statut n'a été renseigné pour la récupération des commandes en fonction de leur statut";
222
+ $reponse['return'] = 2;
223
+ return $reponse;
224
+ }
225
+ }
226
+ else { // en cas d'erreur
227
+ $reponse['debug'][] = "Aucun évènement onorder ou onorderstatuschange n'a été renseigné pour la récupération des commandes";
228
+ $reponse['return'] = 3;
229
+ return $reponse;
230
+ }
231
+
232
+ $ordersIdsMarketPlace = $ordersIds = $tmp = array();
233
+ foreach ($helperData->getDataExport() as $order) {
234
+ $customerEmailExtension = explode('@', $order['email']);
235
+ if (!in_array($customerEmailExtension[1],$DATA->forbiddenMailExtensions)) {
236
+ // save same order info once.
237
+ $id = (int)$order['entity_id'];
238
+ $tmp[$id] = array(
239
+ 'id_order' => $order['order_id'],
240
+ 'date_order' => $order['timestamp'], //date timestamp de la table orders
241
+ 'date_order_formatted' => $order['date'], //date de la table orders formatté
242
+ 'date_av_getted_order' => $order['date_av_getted_order'], //date de la table order_history de récup par AV
243
+ 'is_flag' => $order['is_flag'], //si la commande est déjà flaggué
244
+ 'state_order' => $order['status_order'], // we use the status and not the state.
245
+ 'firstname_customer' => $order['prenom'],
246
+ 'lastname_customer' => $order['nom'],
247
+ 'email_customer' => $order['email'],
248
+ );// add order products as array.
249
+ $tmp[$id]['products'][] = array(
250
+ 'id_product' => $order['product_id'],
251
+ 'name_product' => $order['product_name'],
252
+ 'url' => $order['url']
253
+ );
254
+ $ordersIds[] = $id;
255
+ }
256
+ else {
257
+ $reponse['message']['Emails_Interdits'][] = 'Commande n°'.$order['increment_id'].' Email:'.$order['email'];
258
+ $id = (int)$order['entity_id'];
259
+ $ordersIdsMarketPlace[] = $id;
260
+ }
261
+ }
262
+ // always change marketplace orders to 1
263
+ $helperData->updateFlag($ordersIdsMarketPlace);
264
+ // update Flag db;
265
+ $noFlag = $API->msg('no_flag');
266
+ if(isset($noFlag) && $noFlag == 0)
267
+ $helperData->updateFlag($ordersIds);
268
+ // return value
269
+
270
+ $reponse['return'] = 1;
271
+ $reponse['query'] = $this->getRequest()->getPost('query'); // get request post
272
+ $reponse['message']['nb_orders'] = count($tmp);
273
+ $reponse['message']['delay'] = $DATA->delay;
274
+ $reponse['message']['nb_orders_bloques'] = 0;
275
+ $reponse['message']['list_orders'] = $tmp;
276
+ $reponse['debug']['force'] = $API->msg('force');
277
+ $reponse['debug']['produit'] = $DATA->allowedProducts;
278
+ $reponse['debug']['no_flag'] = $API->msg('no_flag');
279
+ return $reponse;
280
+ }
281
+
282
+ protected function setProductsReviews($DATA,$API) {
283
+ $microtime_deb = microtime();
284
+ $reviews = $API->productReviews($DATA->shopId);
285
+ foreach ($reviews as $data) {
286
+ if ($data['error']) continue;
287
+ if ($data['query'] == "DELETE") {
288
+ $coll = Mage::getModel('avisverifies/reviews')->getCollection()
289
+ ->addFieldToFilter('id_product_av',$data['id_product_av'])
290
+ ->addFieldToFilter('ref_product',$data['ref_product']);
291
+ foreach($coll as $val)
292
+ $val->delete();
293
+ }
294
+ else {
295
+ $resource = Mage::getSingleton('core/resource');
296
+ $write = $resource->getConnection('core_write');
297
+ $read = $resource->getConnection('core_read');
298
+ $table = ($data['query'] == "AVG")? $resource->getTableName('avisverifies/average') : $resource->getTableName('avisverifies/reviews');
299
+ $where = ($data['query'] == "AVG")? " ref_product " : ' id_product_av ';
300
+ $id = ($data['query'] == "AVG")? $data['ref_product'] : $data['id_product_av'];
301
+ $idwebsite = $data['website_id'];
302
+ $select = $read->select()->from($table)
303
+ ->where($where.' = ?', $id)
304
+ ->where('website_id = ?',$idwebsite);
305
+ $res = $read->fetchOne($select);
306
+ unset($data['query'],$data['error']); // remove extra fields.
307
+ if ($res == false) {
308
+ $write->insert($table,$data);
309
+ }
310
+ else {
311
+ unset($data[$where],$data['website_id']); // remove primary key field.
312
+ $where = $write->quoteInto($where.' = ? ', $id);
313
+ $andWhere = $write->quoteInto(' and website_id = ? ', $idwebsite);
314
+ $write->update($table, $data, $where.$andWhere);
315
+ }
316
+ }
317
+ }
318
+ $microtime_fin = microtime();
319
+ $reponse['return'] = 1;
320
+ $reponse['query'] = $this->getRequest()->getPost('query'); // get request post
321
+ $reponse['message']['lignes_recues'] = $reviews;
322
+ $reponse['message']['count_line_reviews']= count($reviews);
323
+ $reponse['message']['nb_update_new'] = $API->checksum['insert'] + $API->checksum['update'];
324
+ $reponse['message']['nb_delete'] = $API->checksum['delete'];
325
+ $reponse['message']['nb_errors'] = $API->checksum['errorQuery'] + $API->checksum['errorDiscussion'];
326
+
327
+ $reponse['message']['microtime'] = $microtime_fin - $microtime_deb;
328
+ $reponse['debug'] = $API->debug;
329
+ Mage::app()->cleanCache();
330
+ return $reponse;
331
+
332
+ }
333
+
334
+ protected function _getModuleAndSiteInfos($DATA){
335
+ $Magento = Mage::getVersion();
336
+ $module = "".Mage::getConfig()->getModuleConfig("Netreviews_Avisverifies")->version; // object to string
337
+ $salesModule = "".Mage::getConfig()->getModuleConfig("Mage_Sales")->version; // object to string
338
+ $orderStatutList = Mage::getSingleton('sales/order_config')->getStatuses();
339
+
340
+ $explode_secret_key = explode('-',$DATA->secretkey);
341
+ $temp = array(
342
+ 'Version_PS' => $Magento,
343
+ 'Version_Sales' => $salesModule,
344
+ 'Version_Module' => $module,
345
+ 'idWebsite' => $DATA->idwebsite,
346
+ 'Nb_Multiboutique' => '',
347
+ 'Websites' => '',
348
+ 'Id_Website_encours' => '',
349
+ );
350
+ // our configuration
351
+ $champ = array('Delay'=>'DELAY',
352
+ 'Statut_choisi'=>'ORDERSTATESCHOOSEN',
353
+ 'Initialisation_du_Processus'=>'PROCESSINIT',
354
+ 'Recuperation_Avis_Produits'=>'GETPRODREVIEWS',
355
+ 'Affiche_Avis_Produits'=>'DISPLAYPRODREVIEWS',
356
+ 'Affichage_Widget_Flottant'=>'SCRIPTFLOAT_ALLOWED',
357
+ 'Script_Widget_Flottant'=>'SCRIPTFLOAT',
358
+ 'Affichage_Widget_Fixe'=>'SCRIPTFIXE_ALLOWED',
359
+ 'Position_Widget_Fixe'=>'SCRIPTFIXE_POSITION',
360
+ 'Script_Widget_Fixe'=>'SCRIPTFIXE',
361
+ 'Emails_Interdits'=>'FORBIDDEN_EMAIL',
362
+ 'Enabled_Website'=>'ENABLEDWEBSITE',
363
+ 'Force_Parent_id'=>'FORCE_PRODUCT_PARENT_ID');
364
+ // load our configuration
365
+ $magesel = Mage::getModel("core/website")->load($DATA->shopId);
366
+
367
+ foreach($champ as $key=>$champsname) {
368
+ $temp[$key]=$magesel->getConfig('avisverifies/system/'.strtolower($champsname));
369
+ }
370
+ $temp['Liste_des_statuts']= $orderStatutList;
371
+ $temp['Dossier_CSV'] = 'media\avisverifies';
372
+ $temp['Date_Recuperation_Config']= date('Y-m-d H:i:s');
373
+
374
+ return $temp;
375
+ }
376
+ }
app/code/local/Netreviews/Avisverifies/controllers/IndexController.php ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Netreviews_Avisverifies_IndexController extends Mage_Core_Controller_Front_Action
3
+ {
4
+ public function indexAction()
5
+ {
6
+ $this->_redirectUrl(Mage::getBaseUrl(), 301);
7
+ }
8
+
9
+ public function ajaxloadAction()
10
+ {
11
+ $id = Mage::app()->getRequest()->getParam('id_product');
12
+ if(empty($id)) {
13
+ $this->_redirectUrl(Mage::getBaseUrl(), 301);
14
+ }
15
+ else {
16
+ $html = $this->getLayout()
17
+ ->createBlock('core/template')
18
+ ->setTemplate('avisverifies/pagination.phtml')
19
+ ->toHtml();
20
+ echo $html;
21
+ }
22
+ }
23
+
24
+ public function cleanCacheAction()
25
+ {
26
+ $id = isset($_GET['id'])? $_GET['id'] : -1;
27
+ $idWeb = Mage::getStoreConfig('avisverifies/system/idwebsite');
28
+ if ($id == $idWeb) {
29
+ // url: index.php/AvisVerifies/index/cleanCache
30
+ $mageselc = new Mage_Core_Model_Config();
31
+ $mageselc->cleanCache(); // remove cache
32
+ Mage::app()->cleanCache(); // remove cache
33
+ try { // remove cache
34
+ $allTypes = Mage::app()->useCache();
35
+ foreach ($allTypes as $type => $blah) {
36
+ Mage::app()->getCacheInstance()->cleanType($type);
37
+ }
38
+ }
39
+ catch (Exception $e) {
40
+ // do something
41
+ error_log($e->getMessage());
42
+ }
43
+ }
44
+ $this->_redirectUrl(Mage::getBaseUrl(), 301);
45
+ }
46
+ }
app/code/local/Netreviews/Avisverifies/etc/config.xml ADDED
@@ -0,0 +1,239 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <!-- General Config -->
4
+ <modules>
5
+ <Netreviews_Avisverifies>
6
+ <version>2.5.9.6</version>
7
+ </Netreviews_Avisverifies>
8
+ </modules>
9
+ <!-- General Config -->
10
+ <!-- Default -->
11
+ <default>
12
+ <avisverifies>
13
+ <system>
14
+ <request>0</request>
15
+ <connect>interne.avis-verifies.local</connect>
16
+ </system>
17
+ </avisverifies>
18
+ </default>
19
+ <!-- Default -->
20
+ <!-- Global -->
21
+ <global>
22
+ <blocks>
23
+ <avisverifies>
24
+ <class>Netreviews_Avisverifies_Block</class>
25
+ </avisverifies>
26
+ <review>
27
+ <rewrite>
28
+ <helper>Netreviews_Avisverifies_Block_Review_Helper</helper>
29
+ <!-- product_view is causing white page Error on EE1.12 AND CE 1.5.1.0 -->
30
+ <product_view>Netreviews_Avisverifies_Block_Review_Product_View</product_view>
31
+ </rewrite>
32
+ </review>
33
+ <catalog>
34
+ <rewrite>
35
+ <!-- product_view is causing white page Error on EE1.12 AND CE 1.5.1.0 -->
36
+ <product_view>Netreviews_Avisverifies_Block_Catalog_Product_View</product_view>
37
+ <product_list>Netreviews_Avisverifies_Block_Catalog_Product_List</product_list>
38
+ </rewrite>
39
+ </catalog>
40
+ </blocks>
41
+ <models>
42
+ <avisverifies>
43
+ <class>Netreviews_Avisverifies_Model</class>
44
+ <resourceModel>avisverifies_mysql4</resourceModel>
45
+ </avisverifies>
46
+ <avisverifies_mysql4>
47
+ <class>Netreviews_Avisverifies_Model_Mysql4</class>
48
+ <entities>
49
+ <reviews>
50
+ <table>avisverifies_products_reviews</table>
51
+ </reviews>
52
+ <average>
53
+ <table>avisverifies_products_average</table>
54
+ </average>
55
+ </entities>
56
+ </avisverifies_mysql4>
57
+ <catalog>
58
+ <rewrite>
59
+ <product>Netreviews_Avisverifies_Model_Product</product>
60
+ </rewrite>
61
+ </catalog>
62
+ </models>
63
+ <resources>
64
+ <avisverifies_setup>
65
+ <setup>
66
+ <module>Netreviews_Avisverifies</module>
67
+ </setup>
68
+ <connection>
69
+ <use>core_setup</use>
70
+ </connection>
71
+ </avisverifies_setup>
72
+ <avisverifies_write>
73
+ <connection>
74
+ <use>core_write</use>
75
+ </connection>
76
+ </avisverifies_write>
77
+ <avisverifies_read>
78
+ <connection>
79
+ <use>core_read</use>
80
+ </connection>
81
+ </avisverifies_read>
82
+ </resources>
83
+ <!-- Data Helper -->
84
+ <helpers>
85
+ <avisverifies>
86
+ <class>Netreviews_Avisverifies_Helper</class>
87
+ </avisverifies>
88
+ </helpers>
89
+ <!-- Observers -->
90
+ <events>
91
+ <!-- Event: Checkout\controllers\OnepageController.php:273 -->
92
+ <checkout_onepage_controller_success_action>
93
+ <observers>
94
+ <avisverifies_checkout_observer>
95
+ <type>singleton</type>
96
+ <class>Netreviews_Avisverifies_Model_Observers_Checkout_Track</class>
97
+ <method>trackCheckout</method>
98
+ </avisverifies_checkout_observer>
99
+ </observers>
100
+ </checkout_onepage_controller_success_action>
101
+ <!-- Event: Checkout\controllers\MultishippingController.php:545 -->
102
+ <checkout_multishipping_controller_success_action>
103
+ <observers>
104
+ <avisverifies_checkout_observer>
105
+ <type>singleton</type>
106
+ <class>Netreviews_Avisverifies_Model_Observers_Checkout_Track</class>
107
+ <method>trackCheckout</method>
108
+ </avisverifies_checkout_observer>
109
+ </observers>
110
+ </checkout_multishipping_controller_success_action>
111
+ </events>
112
+ </global>
113
+ <!-- Global -->
114
+ <!-- Frontend -->
115
+ <frontend>
116
+ <routers>
117
+ <avisverifies>
118
+ <use>standard</use>
119
+ <args>
120
+ <module>Netreviews_Avisverifies</module>
121
+ <frontName>AvisVerifies</frontName>
122
+ </args>
123
+ </avisverifies>
124
+ </routers>
125
+ <layout>
126
+ <updates>
127
+ <avisverifies>
128
+ <file>avisverifies.xml</file>
129
+ </avisverifies>
130
+ </updates>
131
+ </layout>
132
+ <translate>
133
+ <modules>
134
+ <avisverifies>
135
+ <files>
136
+ <default>avisverifies.csv</default>
137
+ </files>
138
+ </avisverifies>
139
+ </modules>
140
+ </translate>
141
+ </frontend>
142
+ <!-- Frontend -->
143
+ <!-- Admin -->
144
+ <admin>
145
+ <routers>
146
+ <avisverifies>
147
+ <use>admin</use>
148
+ <args>
149
+ <module>Netreviews_Avisverifies</module>
150
+ <frontName>AvisVerifies</frontName>
151
+ </args>
152
+ </avisverifies>
153
+ </routers>
154
+ </admin>
155
+ <!-- Admin -->
156
+ <!-- AdminHtml -->
157
+ <adminhtml>
158
+ <menu>
159
+ <catalog>
160
+ <children>
161
+ <avisverifies module="avisverifies" translate="title">
162
+ <title>VerifiedReviews</title>
163
+ <sort_order>100</sort_order>
164
+ <children>
165
+ <form module="avisverifies" translate="title">
166
+ <title>Management</title>
167
+ <sort_order>0</sort_order>
168
+ <action>avisverifies/adminhtml_avisverifies</action>
169
+ </form>
170
+ <config module="avisverifies" translate="title">
171
+ <title>Configuration</title>
172
+ <sort_order>10</sort_order>
173
+ <action>adminhtml/system_config/edit/section/avisverifies/</action>
174
+ </config>
175
+ <check module="avisverifies" translate="title">
176
+ <title>Check Installation</title>
177
+ <sort_order>20</sort_order>
178
+ <action>avisverifies/adminhtml_avisverifies/checkInstallation</action>
179
+ </check>
180
+ </children>
181
+ </avisverifies>
182
+ </children>
183
+ </catalog>
184
+ </menu>
185
+ <translate>
186
+ <modules>
187
+ <avisverifies>
188
+ <files>
189
+ <default>avisverifies.csv</default>
190
+ </files>
191
+ </avisverifies>
192
+ </modules>
193
+ </translate>
194
+ <acl>
195
+ <resources>
196
+ <all>
197
+ <title>Allow Everything</title>
198
+ </all>
199
+ <admin>
200
+ <children>
201
+ <system>
202
+ <children>
203
+ <config>
204
+ <children>
205
+ <avisverifies module="avisverifies" translate="title">
206
+ <title>VerifiedReviews</title>
207
+ </avisverifies>
208
+ </children>
209
+ </config>
210
+ </children>
211
+ </system>
212
+ <catalog>
213
+ <children>
214
+ <avisverifies module="avisverifies" translate="title">
215
+ <title>VerifiedReviews</title>
216
+ <sort_order>100</sort_order>
217
+ <children>
218
+ <message module="avisverifies" translate="title">
219
+ <title>Management</title>
220
+ <sort_order>0</sort_order>
221
+ </message>
222
+ </children>
223
+ </avisverifies>
224
+ </children>
225
+ </catalog>
226
+ </children>
227
+ </admin>
228
+ </resources>
229
+ </acl>
230
+ <layout>
231
+ <updates>
232
+ <avisverifies>
233
+ <file>avisverifies.xml</file>
234
+ </avisverifies>
235
+ </updates>
236
+ </layout>
237
+ </adminhtml>
238
+ <!-- AdminHtml -->
239
+ </config>
app/code/local/Netreviews/Avisverifies/etc/system.xml ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" ?>
2
+ <config>
3
+ <tabs>
4
+ <avisverifies module="avisverifies" translate="label">
5
+ <label>VerifiedReviews</label>
6
+ <sort_order>100</sort_order>
7
+ </avisverifies>
8
+ </tabs>
9
+ <sections>
10
+ <avisverifies module="avisverifies" translate="label tab">
11
+ <label>Configuration</label>
12
+ <tab>VerifiedReviews</tab>
13
+ <frontend_type>text</frontend_type>
14
+ <sort_order>200</sort_order>
15
+ <show_in_default>1</show_in_default>
16
+ <show_in_website>1</show_in_website>
17
+ <show_in_store>0</show_in_store>
18
+ <groups>
19
+ <introtext translate="label">
20
+ <label>You must set the configuration VerifiedReviews according to a website module. Select from the list on the left, the website that you want to set</label>
21
+ <show_in_default>1</show_in_default>
22
+ <show_in_website>0</show_in_website>
23
+ <show_in_store>1</show_in_store>
24
+ <sort_order>1</sort_order>
25
+ <expanded>1</expanded>
26
+ </introtext>
27
+ <system translate="label">
28
+ <label>System integration</label>
29
+ <show_in_default>0</show_in_default>
30
+ <show_in_website>1</show_in_website>
31
+ <show_in_store>0</show_in_store>
32
+ <sort_order>10</sort_order>
33
+ <fields>
34
+ <enabledwebsite translate="label comment">
35
+ <label>Enable Module on this Website</label>
36
+ <frontend_type>select</frontend_type>
37
+ <source_model>adminhtml/system_config_source_yesno</source_model>
38
+ <sort_order>8</sort_order>
39
+ <show_in_default>0</show_in_default>
40
+ <show_in_website>1</show_in_website>
41
+ <show_in_store>0</show_in_store>
42
+ <comment>By activating the module, you will reap your reviews sites. To harvest the products reviews, go to the last part of the configuration</comment>
43
+ </enabledwebsite>
44
+ <idwebsite translate="label">
45
+ <label>IdWebsite</label>
46
+ <frontend_type>text</frontend_type>
47
+ <sort_order>40</sort_order>
48
+ <show_in_default>0</show_in_default>
49
+ <show_in_website>1</show_in_website>
50
+ <show_in_store>0</show_in_store>
51
+ </idwebsite>
52
+ <secretkey translate="label">
53
+ <label>Secret Key</label>
54
+ <frontend_type>text</frontend_type>
55
+ <sort_order>30</sort_order>
56
+ <show_in_default>0</show_in_default>
57
+ <show_in_website>1</show_in_website>
58
+ <show_in_store>0</show_in_store>
59
+ </secretkey>
60
+ </fields>
61
+ </system>
62
+ </groups>
63
+ </avisverifies>
64
+ </sections>
65
+ </config>
app/code/local/Netreviews/Avisverifies/sql/avisverifies_setup/mysql4-install-2.0.0.php ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php // updagrade script Name : upgrade-2.0.0-2.5.0.php ---> upgrade-{old version}-{newest version}.php
2
+ $installer = $this;
3
+ $installer->startSetup();
4
+ $order = $installer->getTable('sales/order');
5
+
6
+ $read = $installer->getConnection('core_read');
7
+ $write = $installer->getConnection('core_write');
8
+ // Flag
9
+ $avFlag = $read->query('SELECT COUNT(*) as flag
10
+ FROM INFORMATION_SCHEMA.COLUMNS
11
+ WHERE table_name = "'.$order.'"
12
+ AND table_schema = DATABASE()
13
+ AND column_name = "av_flag"')->fetchAll();
14
+ $avFlag = $avFlag[0]['flag'];
15
+ if ($avFlag == 0) {
16
+ $write->query("ALTER TABLE `{$order}` add av_flag tinyint default 0;");
17
+ $write->query("UPDATE `{$order}` SET `av_flag` = 1;");
18
+ }
19
+ else {
20
+ $write->query("UPDATE `{$order}` SET `av_flag` = 1;");
21
+ }
22
+ // horodate
23
+ $horodate = $read->query('SELECT COUNT(*) as horodate
24
+ FROM INFORMATION_SCHEMA.COLUMNS
25
+ WHERE table_name = "'.$order.'"
26
+ AND table_schema = DATABASE()
27
+ AND column_name = "av_horodate_get"')->fetchAll();
28
+ $horodate = $horodate[0]['horodate'];
29
+ if ($horodate == 0) {
30
+ $write->query("ALTER TABLE `{$order}` add av_horodate_get varchar(32);");
31
+ }
32
+ // Install Tables, RUN Query.
33
+ $installer->run("
34
+ CREATE TABLE IF NOT EXISTS `{$this->getTable('avisverifies_products_reviews')}` (
35
+ `id_product_av` varchar(36) NOT NULL,
36
+ `ref_product` varchar(20) NOT NULL,
37
+ `rate` varchar(5) NOT NULL,
38
+ `review` text NOT NULL,
39
+ `customer_name` varchar(30) NOT NULL,
40
+ `horodate` varchar(32) NOT NULL,
41
+ `discussion` text,
42
+ `lang` varchar(5),
43
+ `website_id` smallint(5) not null default 0,
44
+ PRIMARY KEY (`id_product_av`)
45
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
46
+
47
+ CREATE TABLE IF NOT EXISTS `{$this->getTable('avisverifies_products_average')}` (
48
+ `id_product_av` varchar(36) NOT NULL,
49
+ `ref_product` varchar(20) NOT NULL,
50
+ `rate` varchar(5) NOT NULL,
51
+ `nb_reviews` int(10) NOT NULL,
52
+ `horodate_update` varchar(32) NOT NULL,
53
+ `id_lang` varchar(5) DEFAULT NULL,
54
+ `website_id` smallint(5) not null default 0,
55
+ PRIMARY KEY (`ref_product`)
56
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
57
+ ");
58
+ $installer->endSetup();
app/code/local/Netreviews/Avisverifies/sql/avisverifies_setup/mysql4-upgrade-2.0.0-2.5.8.php ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $installer = $this;
4
+ $installer->startSetup();
5
+ $installer->run("ALTER TABLE `{$this->getTable('avisverifies_products_average')}` DROP PRIMARY KEY,ADD PRIMARY KEY (`ref_product`, `website_id`);");
6
+ $installer->endSetup();
7
+
8
+
app/design/frontend/default/default/layout/avisverifies.xml ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="1.0.0">
3
+ <!-- All Stores -->
4
+ <default>
5
+ <!-- Loaded in the head block -->
6
+ <reference name="head">
7
+ <block name="avisverifies.float" template="avisverifies/float.phtml" type="core/template"/>
8
+ </reference>
9
+ <!-- Loaded in the left block -->
10
+ <reference name="left">
11
+ <block after="-" name="avisverifies.left" template="avisverifies/left.phtml" type="core/template"/>
12
+ </reference>
13
+ <!-- Loaded in the right block -->
14
+ <reference name="right">
15
+ <block after="-" name="avisverifies.right" template="avisverifies/right.phtml" type="core/template"/>
16
+ </reference>
17
+ </default>
18
+
19
+ <!-- !!!! -->
20
+ <review_product_list>
21
+ <reference name="head">
22
+ <block name="avisverifies_js" type="core/template" template="avisverifies/js.phtml"/>
23
+ <block name="avisverifies_css" type="core/template" template="avisverifies/css.phtml"/>
24
+ </reference>
25
+ <reference name="content">
26
+ <remove name="product.info.product_additional_data"/>
27
+ <block name="reviews_wrapper" type="core/template" template="avisverifies/wrapper.phtml">
28
+ <block name="product.info.product_additional_data2" template="avisverifies/list.phtml" type="review/product_view_list" >
29
+ <block name="avisverifies.pagination" template="avisverifies/pagination.phtml" type="core/template"/>
30
+ </block>
31
+ </block>
32
+ <!-- removed these (2) lines for furthere investigation -->
33
+ <!--<remove name="catalog.product.related"/>-->
34
+ <!--<remove name="product.info.upsell"/>-->
35
+ </reference>
36
+ </review_product_list>
37
+
38
+ <!-- !!!! -->
39
+ <catalog_product_view>
40
+ <reference name="head">
41
+ <block name="avisverifies_js" type="core/template" template="avisverifies/js.phtml"/>
42
+ <block name="avisverifies_css" type="core/template" template="avisverifies/css.phtml"/>
43
+ </reference>
44
+ <!-- removed these (3)lines for furthere investigation -->
45
+ <!-- <reference name="content">
46
+ <remove name="product.info.upsell"/>
47
+ </reference> -->
48
+ </catalog_product_view>
49
+
50
+ <!-- !!!! -->
51
+ <catalog_category_view>
52
+ <reference name="product_list">
53
+ <action method="addReviewSummaryTemplate">
54
+ <type>short</type>
55
+ <template>avisverifies/review/helper/summary_short.phtml</template>
56
+ </action>
57
+ </reference>
58
+ </catalog_category_view>
59
+
60
+ <!-- Checkout process -->
61
+ <checkout_track>
62
+ <reference name="content">
63
+ <block type="avisverifies/observers_checkout" name="avisverifies.observers.checkout" template="avisverifies/observers/checkout.phtml"/>
64
+ </reference>
65
+ </checkout_track>
66
+ <!-- Checkout process -->
67
+
68
+ </layout>
app/design/frontend/default/default/template/avisverifies/admin/checkinstallation.phtml ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="check-installation">
2
+ <table style="width: 250px;float: left;">
3
+ <thead>
4
+ <th width="190"><?php echo $this->__('Table Name') ?>:</th>
5
+ <th><?php echo $this->__('Status') ?></th>
6
+ </thead>
7
+ <tbody>
8
+ <?php $table = $this->getTables(); ?>
9
+ <?php $table = (is_array($table))? $table : array(); ?>
10
+ <?php foreach($table as $nom=>$val): ?>
11
+ <tr>
12
+ <td><?php echo $nom ?></td>
13
+ <td align="center">
14
+ <img alt="<?php echo ($val)? "enabled" : "error" ?>" src="<?php echo ($val)? $this->getSkinUrl('images/icon-enabled.png') : $this->getSkinUrl('images/cancel_btn_icon.gif') ?>" />
15
+ </td>
16
+ </tr>
17
+ <?php endforeach ?>
18
+ </tbody>
19
+ </table>
20
+ <div style="float: left; width: 1px;height: 65px; margin: 1px 15px ; border-left: 1px solid #ccc"></div>
21
+ <table style="width: 250px;float: left;">
22
+ <thead>
23
+ <th width="190"><?php echo $this->__('Table Orders Fields') ?>:</th>
24
+ <th><?php echo $this->__('Status') ?></th>
25
+ </thead>
26
+ <tbody>
27
+ <?php $table = $this->getOrders(); ?>
28
+ <?php $table = (is_array($table))? $table : array(); ?>
29
+ <?php foreach($table as $nom=>$val): ?>
30
+ <tr>
31
+ <td><?php echo $nom ?></td>
32
+ <td align="center">
33
+ <img alt="<?php echo ($val)? "enabled" : "error" ?>" src="<?php echo ($val)? $this->getSkinUrl('images/icon-enabled.png') : $this->getSkinUrl('images/cancel_btn_icon.gif') ?>" />
34
+ </td>
35
+ </tr>
36
+ <?php endforeach ?>
37
+ </tbody>
38
+ </table>
39
+ <div style="float: left; width: 100%;height: 1px;"></div>
40
+ <table style="width: 250px;float: left;">
41
+ <thead>
42
+ <th width="190"><?php echo $this->__('Table Fields Count') ?>:</th>
43
+ <th><?php echo $this->__('Status') ?></th>
44
+ </thead>
45
+ <tbody>
46
+ <?php $table = $this->getCount(); ?>
47
+ <?php $table = (is_array($table))? $table : array(); ?>
48
+ <?php foreach($table as $nom=>$val): ?>
49
+ <tr>
50
+ <td><?php echo $nom ?></td>
51
+ <td><?php echo $val ?></td>
52
+ </tr>
53
+ <?php endforeach ?>
54
+ </tbody>
55
+ </table>
56
+ <?php $checkOrders = $this->getData('checkOrders') ?>
57
+ <?php if(!empty($checkOrders)): ?>
58
+ <?php $header = (isset($checkOrders[0]))? array_keys($checkOrders[0]): array(); ?>
59
+ <h2 style="float: left; width: 100%;"><?php echo $this->__('Check orders Table') ?>:</h2>
60
+ <table style="width: 1250px;float: left;" border="1">
61
+ <thead>
62
+ <?php foreach($header as $val): ?>
63
+ <th style="text-align: center;" ><?php echo $val; ?></th>
64
+ <?php endforeach; ?>
65
+ </thead>
66
+ <tbody>
67
+ <?php foreach($checkOrders as $data): ?>
68
+ <tr>
69
+ <?php foreach($data as $val): ?>
70
+ <td align="center" ><?php echo ($val === NULL)? 'NULL' :$val ?></td>
71
+ <?php endforeach ?>
72
+ </tr>
73
+ <?php endforeach ?>
74
+ </tbody>
75
+ </table>
76
+ <?php endif; ?>
77
+ </div>
app/design/frontend/default/default/template/avisverifies/admin/checkinstallation_tab.phtml ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ <h3>
3
+ <?php echo $this->__('Verified Reviews Tabs') ?>
4
+ </h3>
5
+ <ul id="edit_home_tabs" class="tabs">
6
+ <li>
7
+ <a style="cursor: default;" id="edit_home_tabs_export" name="export" title="Exporter" class="tab-item-link active">
8
+ <span style="cursor: default;">
9
+ <?php echo $this->__('Check Installation') ?>
10
+ </span>
11
+ </a>
12
+ </li>
13
+ </ul>
app/design/frontend/default/default/template/avisverifies/css.phtml ADDED
@@ -0,0 +1,214 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if(Netreviews_Avisverifies_Helper_Data::isActive()): // Our Display. ?>
2
+ <style type="text/css">
3
+ #idTabavisverifies{
4
+ margin-top: 15px;
5
+ color:#5d717e;
6
+ }
7
+ #idTabavisverifies a{
8
+ color:#5d717e;
9
+ text-decoration: none;
10
+ }
11
+ #idTabavisverifies p{
12
+ margin:0;
13
+ padding:0;
14
+ }
15
+ #idTabavisverifies div.ratingWrapper{
16
+ background:url('<?php echo $this->getSkinUrl('images/avisverifies/mini_etoile_empty.png')?>') no-repeat left bottom;
17
+ /*display:inline-block;*/
18
+ height: 12px;
19
+ width: 70px;
20
+ }
21
+ #idTabavisverifies div.ratingInner{
22
+ background:url('<?php echo $this->getSkinUrl('images/avisverifies/mini_etoile_full.png')?>') no-repeat left bottom transparent;
23
+ /*display:inline-block;*/
24
+ height: 12px;
25
+ }
26
+ #idTabavisverifies .triangle-border {
27
+ position: relative;
28
+ padding: 12px;
29
+ margin: 14px 0 3px 0;
30
+ border: 2px solid #DDD;
31
+ color: #000;
32
+ background: #fff;
33
+ -webkit-border-radius: 10px;
34
+ -moz-border-radius: 10px;
35
+ border-radius: 10px;
36
+ }
37
+ #idTabavisverifies .triangle-border.answer{
38
+ margin-left: 20px;
39
+ color:#808080;
40
+ }
41
+ #idTabavisverifies .triangle-border.top::before {
42
+ top: -16px;
43
+ bottom: auto;
44
+ right: auto;
45
+ left: 46px;
46
+ border-width: 0 14px 14px;
47
+ }
48
+ #idTabavisverifies .triangle-border::before {
49
+ content: "";
50
+ position: absolute;
51
+ bottom: -20px;
52
+ right: 40px;
53
+ border-width: 20px 20px 0;
54
+ border-style: solid;
55
+ border-color: #DDD transparent;
56
+ display: block;
57
+ width: 0;
58
+ }
59
+ #idTabavisverifies .triangle-border.top::after {
60
+ top: -13px;
61
+ bottom: auto;
62
+ right: auto;
63
+ left: 47px;
64
+ border-width: 0 13px 13px;
65
+ }
66
+ #idTabavisverifies .triangle-border::after {
67
+ content: "";
68
+ position: absolute;
69
+ bottom: -13px;
70
+ left: 47px;
71
+ border-width: 13px 13px 0;
72
+ border-style: solid;
73
+ border-color: #fff transparent;
74
+ display: block;
75
+ width: 0;
76
+ }
77
+
78
+ #idTabavisverifies .triangle-border.answer {
79
+ padding-left: 20px;
80
+ }
81
+ .clear{
82
+ clear: both;
83
+ }
84
+ #idTabavisverifies #headerAV{
85
+ display: block;
86
+ background-color: #474747;
87
+ height:30px;
88
+ -webkit-border-top-left-radius: 10px;
89
+ -webkit-border-top-right-radius: 10px;
90
+ -moz-border-radius-topleft: 10px;
91
+ -moz-border-radius-topright: 10px;
92
+ border-top-left-radius: 10px;
93
+ border-top-right-radius: 10px;
94
+ text-align: center;
95
+ line-height: 30px;
96
+ color:white;
97
+ text-transform: uppercase;
98
+ font-size: 14px;
99
+ }
100
+ #idTabavisverifies #under-headerAV{
101
+ display: block;
102
+ height: 50px;
103
+ }
104
+ #idTabavisverifies #under-headerAV{
105
+ }
106
+ #idTabavisverifies div#aggregateRatingAV {
107
+ list-style: none;
108
+ margin-left: 50px;
109
+ padding-top: 10px;
110
+ float: left;
111
+ }
112
+ #idTabavisverifies div#certificatAV{
113
+ float: right;
114
+ list-style: none;
115
+ padding-top: 10px;
116
+ padding-right: 10px;
117
+ }
118
+ #idTabavisverifies .reviewAV {
119
+ padding-bottom: 20px;
120
+ border-top: 3px solid white;
121
+ }
122
+ #idTabavisverifies .reviewAV div.reviewInfosAV{
123
+ list-style: none;
124
+ margin-top: 15px;
125
+ margin-left: 0;
126
+ margin-right: 0;
127
+ margin-bottom: 0;
128
+ }
129
+ #idTabavisverifies .reviewAV div.reviewInfosAV > div{
130
+ display: inline-block;
131
+ height: 25px;
132
+ }
133
+ #idTabavisverifies .reviewAV div.reviewInfosAV div.rateAV{
134
+ font-weight: bold;
135
+ font-size: 14px;
136
+ }
137
+ #idTabavisverifies .reviewAV div.reviewInfosAV div.rateAV img{
138
+ margin-top:1px;
139
+ }
140
+ #idTabavisverifies .triangle-border.answer p.answer-bodyAV{
141
+ margin: 10px 0 0 0 ;
142
+ }
143
+
144
+ #idTabavisverifies #ajax_comment_content{
145
+ background-color:#f1f1f1;
146
+ padding: 10px;
147
+ }
148
+ /* ExtraRight */
149
+ #av_product_award{
150
+ height:70px;
151
+ background-color: #e6e6e6;
152
+ border: solid 1px #b6b6b6;
153
+ border-radius: 15px;
154
+ position: relative;
155
+ padding: 2px;
156
+ margin-top: 20px;
157
+ max-width: 260px;
158
+ }
159
+ #av_product_award img#sceau{
160
+ position: absolute;
161
+ right:-15px;
162
+ top:-12px;
163
+ width: 90px;
164
+ }
165
+ #av_product_award #bottom{
166
+ background: #f7ad26; /* Old browsers */
167
+ background: -moz-linear-gradient(top, #f7ad26 1%, #f49112 100%); /* FF3.6+ */
168
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(1%,#f7ad26), color-stop(100%,#f49112)); /* Chrome,Safari4+ */
169
+ background: -webkit-linear-gradient(top, #f7ad26 1%,#f49112 100%); /* Chrome10+,Safari5.1+ */
170
+ background: -o-linear-gradient(top, #f7ad26 1%,#f49112 100%); /* Opera 11.10+ */
171
+ background: -ms-linear-gradient(top, #f7ad26 1%,#f49112 100%); /* IE10+ */
172
+ background: linear-gradient(to bottom, #f7ad26 1%,#f49112 100%); /* W3C */
173
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f7ad26', endColorstr='#f49112',GradientType=0 ); /* IE6-9 */
174
+ height: 20px;
175
+ border-bottom-right-radius: inherit;
176
+ border-bottom-left-radius: inherit;
177
+ position: absolute;
178
+ bottom: 2px;
179
+ width:90%;
180
+ }
181
+ #av_product_award #bottom a{
182
+ color:black;
183
+ margin-left: 56px;
184
+ margin-top: 3px;
185
+ font-weight: normal;
186
+ display: block;
187
+ }
188
+ #av_product_award #top {
189
+ width: 68%;
190
+ text-align: center;
191
+ padding-top:6px;
192
+ }
193
+ #av_product_award #top b{
194
+ display: block;
195
+ }
196
+ /* ratingWrapper et ratingInner utilis� dans ExtraRight et product_list.tpl*/
197
+ div.ratingWrapper{
198
+ background:url('<?php echo $this->getSkinUrl('images/avisverifies/etoile0.png')?>') no-repeat left bottom;
199
+ display:inline-block;
200
+ height: 21px;
201
+ width: 120px;
202
+ text-align: left;
203
+ }
204
+ div.ratingInner{
205
+ background:url('<?php echo $this->getSkinUrl('images/avisverifies/etoile5.png')?>') no-repeat left bottom transparent;
206
+ display:inline-block;
207
+ height: 21px;
208
+ text-align: left;
209
+ }
210
+ /* FIN ratingWrapper et ratingInner utilis� dans ExtraRight et product_list.tpl*/
211
+ #av_load_next_page{color:#5d717e;text-decoration:none;display:inline-block;padding:4px 14px;margin-bottom:0;font-size:12px;line-height:20px;color:#272822;text-align:center;text-shadow:0 1px 1px rgba(255,255,255,.75);vertical-align:middle;cursor:pointer;background-color:#f5f5f5;background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));background-image:-webkit-linear-gradient(top,#fff,#e6e6e6);background-image:-o-linear-gradient(top,#fff,#e6e6e6);background-image:linear-gradient(to bottom,#fff,#e6e6e6);background-image:-moz-linear-gradient(top,#fff,#e6e6e6);background-repeat:repeat-x;border:1px solid #bbb;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-bottom-color:#a2a2a2;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);margin-top:10px;}
212
+ /* FIN ExtraRight */
213
+ </style>
214
+ <?php endif;?>
app/design/frontend/default/default/template/avisverifies/float.phtml ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <?php // Important: this block is called on the head block area. ?>
2
+ <?php $SCRIPTFIXE_ALLOWED = (Mage::getStoreConfig(strtolower('avisverifies/system/SCRIPTFLOAT_ALLOWED'))=='yes') ?>
3
+ <?php if($SCRIPTFIXE_ALLOWED): ?>
4
+ <?php echo Mage::getStoreConfig(strtolower('avisverifies/system/SCRIPTFLOAT')) ?>
5
+ <?php endif;?>
6
+
7
+ <!-- Widget Flottant 1 en position 1 -->
app/design/frontend/default/default/template/avisverifies/js.phtml ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if(Netreviews_Avisverifies_Helper_Data::isActive()): // Our Display. ?>
2
+ <?php $nojQuery = true; ?>
3
+ <script type="text/javascript">
4
+ <?php if($nojQuery): ?>
5
+ /*! jQuery v1.11.0 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
6
+ !function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k="".trim,l={},m="1.11.0",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(n.isPlainObject(c)||(b=n.isArray(c)))?(b?(b=!1,f=a&&n.isArray(a)?a:[]):f=a&&n.isPlainObject(a)?a:{},g[d]=n.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray||function(a){return"array"===n.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==n.type(a)||a.nodeType||n.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(l.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&n.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:k&&!k.call("\ufeff\xa0")?function(a){return null==a?"":k.call(a)}:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),n.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||n.guid++,e):void 0},now:function(){return+new Date},support:l}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s="sizzle"+-new Date,t=a.document,u=0,v=0,w=eb(),x=eb(),y=eb(),z=function(a,b){return a===b&&(j=!0),0},A="undefined",B=1<<31,C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=D.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},J="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",K="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",M=L.replace("w","w#"),N="\\["+K+"*("+L+")"+K+"*(?:([*^$|!~]?=)"+K+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+M+")|)|)"+K+"*\\]",O=":("+L+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+N.replace(3,8)+")*)|.*)\\)|)",P=new RegExp("^"+K+"+|((?:^|[^\\\\])(?:\\\\.)*)"+K+"+$","g"),Q=new RegExp("^"+K+"*,"+K+"*"),R=new RegExp("^"+K+"*([>+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(O),U=new RegExp("^"+M+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L.replace("w","w*")+")"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=/'|\\/g,ab=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),bb=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{G.apply(D=H.call(t.childNodes),t.childNodes),D[t.childNodes.length].nodeType}catch(cb){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function db(a,b,d,e){var f,g,h,i,j,m,p,q,u,v;if((b?b.ownerDocument||b:t)!==l&&k(b),b=b||l,d=d||[],!a||"string"!=typeof a)return d;if(1!==(i=b.nodeType)&&9!==i)return[];if(n&&!e){if(f=Z.exec(a))if(h=f[1]){if(9===i){if(g=b.getElementById(h),!g||!g.parentNode)return d;if(g.id===h)return d.push(g),d}else if(b.ownerDocument&&(g=b.ownerDocument.getElementById(h))&&r(b,g)&&g.id===h)return d.push(g),d}else{if(f[2])return G.apply(d,b.getElementsByTagName(a)),d;if((h=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(h)),d}if(c.qsa&&(!o||!o.test(a))){if(q=p=s,u=b,v=9===i&&a,1===i&&"object"!==b.nodeName.toLowerCase()){m=ob(a),(p=b.getAttribute("id"))?q=p.replace(_,"\\$&"):b.setAttribute("id",q),q="[id='"+q+"'] ",j=m.length;while(j--)m[j]=q+pb(m[j]);u=$.test(a)&&mb(b.parentNode)||b,v=m.join(",")}if(v)try{return G.apply(d,u.querySelectorAll(v)),d}catch(w){}finally{p||b.removeAttribute("id")}}}return xb(a.replace(P,"$1"),b,d,e)}function eb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function fb(a){return a[s]=!0,a}function gb(a){var b=l.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function hb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function ib(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||B)-(~a.sourceIndex||B);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function jb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function kb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function lb(a){return fb(function(b){return b=+b,fb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function mb(a){return a&&typeof a.getElementsByTagName!==A&&a}c=db.support={},f=db.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},k=db.setDocument=function(a){var b,e=a?a.ownerDocument||a:t,g=e.defaultView;return e!==l&&9===e.nodeType&&e.documentElement?(l=e,m=e.documentElement,n=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){k()},!1):g.attachEvent&&g.attachEvent("onunload",function(){k()})),c.attributes=gb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=gb(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(e.getElementsByClassName)&&gb(function(a){return a.innerHTML="<div class='a'></div><div class='a i'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=gb(function(a){return m.appendChild(a).id=s,!e.getElementsByName||!e.getElementsByName(s).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==A&&n){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){var c=typeof a.getAttributeNode!==A&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==A?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==A&&n?b.getElementsByClassName(a):void 0},p=[],o=[],(c.qsa=Y.test(e.querySelectorAll))&&(gb(function(a){a.innerHTML="<select t=''><option selected=''></option></select>",a.querySelectorAll("[t^='']").length&&o.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||o.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll(":checked").length||o.push(":checked")}),gb(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&o.push("name"+K+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||o.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),o.push(",.*:")})),(c.matchesSelector=Y.test(q=m.webkitMatchesSelector||m.mozMatchesSelector||m.oMatchesSelector||m.msMatchesSelector))&&gb(function(a){c.disconnectedMatch=q.call(a,"div"),q.call(a,"[s!='']:x"),p.push("!=",O)}),o=o.length&&new RegExp(o.join("|")),p=p.length&&new RegExp(p.join("|")),b=Y.test(m.compareDocumentPosition),r=b||Y.test(m.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},z=b?function(a,b){if(a===b)return j=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===t&&r(t,a)?-1:b===e||b.ownerDocument===t&&r(t,b)?1:i?I.call(i,a)-I.call(i,b):0:4&d?-1:1)}:function(a,b){if(a===b)return j=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],k=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:i?I.call(i,a)-I.call(i,b):0;if(f===g)return ib(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)k.unshift(c);while(h[d]===k[d])d++;return d?ib(h[d],k[d]):h[d]===t?-1:k[d]===t?1:0},e):l},db.matches=function(a,b){return db(a,null,null,b)},db.matchesSelector=function(a,b){if((a.ownerDocument||a)!==l&&k(a),b=b.replace(S,"='$1']"),!(!c.matchesSelector||!n||p&&p.test(b)||o&&o.test(b)))try{var d=q.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return db(b,l,null,[a]).length>0},db.contains=function(a,b){return(a.ownerDocument||a)!==l&&k(a),r(a,b)},db.attr=function(a,b){(a.ownerDocument||a)!==l&&k(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!n):void 0;return void 0!==f?f:c.attributes||!n?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},db.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},db.uniqueSort=function(a){var b,d=[],e=0,f=0;if(j=!c.detectDuplicates,i=!c.sortStable&&a.slice(0),a.sort(z),j){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return i=null,a},e=db.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=db.selectors={cacheLength:50,createPseudo:fb,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ab,bb),a[3]=(a[4]||a[5]||"").replace(ab,bb),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||db.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&db.error(a[0]),a},PSEUDO:function(a){var b,c=!a[5]&&a[2];return V.CHILD.test(a[0])?null:(a[3]&&void 0!==a[4]?a[2]=a[4]:c&&T.test(c)&&(b=ob(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ab,bb).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=w[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&w(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==A&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=db.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),t=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&t){k=q[s]||(q[s]={}),j=k[a]||[],n=j[0]===u&&j[1],m=j[0]===u&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[u,n,m];break}}else if(t&&(j=(b[s]||(b[s]={}))[a])&&j[0]===u)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(t&&((l[s]||(l[s]={}))[a]=[u,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||db.error("unsupported pseudo: "+a);return e[s]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?fb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:fb(function(a){var b=[],c=[],d=g(a.replace(P,"$1"));return d[s]?fb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:fb(function(a){return function(b){return db(a,b).length>0}}),contains:fb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:fb(function(a){return U.test(a||"")||db.error("unsupported lang: "+a),a=a.replace(ab,bb).toLowerCase(),function(b){var c;do if(c=n?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===m},focus:function(a){return a===l.activeElement&&(!l.hasFocus||l.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:lb(function(){return[0]}),last:lb(function(a,b){return[b-1]}),eq:lb(function(a,b,c){return[0>c?c+b:c]}),even:lb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:lb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:lb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:lb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=jb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=kb(b);function nb(){}nb.prototype=d.filters=d.pseudos,d.setFilters=new nb;function ob(a,b){var c,e,f,g,h,i,j,k=x[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=Q.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=R.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(P," ")}),h=h.slice(c.length));for(g in d.filter)!(e=V[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?db.error(a):x(a,i).slice(0)}function pb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function qb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=v++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[u,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[s]||(b[s]={}),(h=i[d])&&h[0]===u&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function rb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function sb(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function tb(a,b,c,d,e,f){return d&&!d[s]&&(d=tb(d)),e&&!e[s]&&(e=tb(e,f)),fb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||wb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:sb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=sb(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?I.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=sb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ub(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],i=g||d.relative[" "],j=g?1:0,k=qb(function(a){return a===b},i,!0),l=qb(function(a){return I.call(b,a)>-1},i,!0),m=[function(a,c,d){return!g&&(d||c!==h)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>j;j++)if(c=d.relative[a[j].type])m=[qb(rb(m),c)];else{if(c=d.filter[a[j].type].apply(null,a[j].matches),c[s]){for(e=++j;f>e;e++)if(d.relative[a[e].type])break;return tb(j>1&&rb(m),j>1&&pb(a.slice(0,j-1).concat({value:" "===a[j-2].type?"*":""})).replace(P,"$1"),c,e>j&&ub(a.slice(j,e)),f>e&&ub(a=a.slice(e)),f>e&&pb(a))}m.push(c)}return rb(m)}function vb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,i,j,k){var m,n,o,p=0,q="0",r=f&&[],s=[],t=h,v=f||e&&d.find.TAG("*",k),w=u+=null==t?1:Math.random()||.1,x=v.length;for(k&&(h=g!==l&&g);q!==x&&null!=(m=v[q]);q++){if(e&&m){n=0;while(o=a[n++])if(o(m,g,i)){j.push(m);break}k&&(u=w)}c&&((m=!o&&m)&&p--,f&&r.push(m))}if(p+=q,c&&q!==p){n=0;while(o=b[n++])o(r,s,g,i);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=E.call(j));s=sb(s)}G.apply(j,s),k&&!f&&s.length>0&&p+b.length>1&&db.uniqueSort(j)}return k&&(u=w,h=t),r};return c?fb(f):f}g=db.compile=function(a,b){var c,d=[],e=[],f=y[a+" "];if(!f){b||(b=ob(a)),c=b.length;while(c--)f=ub(b[c]),f[s]?d.push(f):e.push(f);f=y(a,vb(e,d))}return f};function wb(a,b,c){for(var d=0,e=b.length;e>d;d++)db(a,b[d],c);return c}function xb(a,b,e,f){var h,i,j,k,l,m=ob(a);if(!f&&1===m.length){if(i=m[0]=m[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&c.getById&&9===b.nodeType&&n&&d.relative[i[1].type]){if(b=(d.find.ID(j.matches[0].replace(ab,bb),b)||[])[0],!b)return e;a=a.slice(i.shift().value.length)}h=V.needsContext.test(a)?0:i.length;while(h--){if(j=i[h],d.relative[k=j.type])break;if((l=d.find[k])&&(f=l(j.matches[0].replace(ab,bb),$.test(i[0].type)&&mb(b.parentNode)||b))){if(i.splice(h,1),a=f.length&&pb(i),!a)return G.apply(e,f),e;break}}}return g(a,m)(f,b,!n,e,$.test(a)&&mb(b.parentNode)||b),e}return c.sortStable=s.split("").sort(z).join("")===s,c.detectDuplicates=!!j,k(),c.sortDetached=gb(function(a){return 1&a.compareDocumentPosition(l.createElement("div"))}),gb(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||hb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&gb(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||hb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),gb(function(a){return null==a.getAttribute("disabled")})||hb(J,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),db}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return n.inArray(a,b)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;e>b;b++)if(n.contains(d[b],this))return!0}));for(b=0;e>b;b++)n.find(a,d[b],c);return c=this.pushStack(e>1?n.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=a.document,A=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,B=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:A.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:z,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=z.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return y.find(a);this.length=1,this[0]=d}return this.context=z,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};B.prototype=n.fn,y=n(z);var C=/^(?:parents|prev(?:Until|All))/,D={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!n(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b,c=n(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(n.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?n.inArray(this[0],n(a)):n.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function E(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return E(a,"nextSibling")},prev:function(a){return E(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return n.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(D[a]||(e=n.unique(e)),C.test(a)&&(e=e.reverse())),this.pushStack(e)}});var F=/\S+/g,G={};function H(a){var b=G[a]={};return n.each(a.match(F)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?G[a]||H(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&n.each(arguments,function(a,c){var d;while((d=n.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){if(a===!0?!--n.readyWait:!n.isReady){if(!z.body)return setTimeout(n.ready);n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(z,[n]),n.fn.trigger&&n(z).trigger("ready").off("ready"))}}});function J(){z.addEventListener?(z.removeEventListener("DOMContentLoaded",K,!1),a.removeEventListener("load",K,!1)):(z.detachEvent("onreadystatechange",K),a.detachEvent("onload",K))}function K(){(z.addEventListener||"load"===event.type||"complete"===z.readyState)&&(J(),n.ready())}n.ready.promise=function(b){if(!I)if(I=n.Deferred(),"complete"===z.readyState)setTimeout(n.ready);else if(z.addEventListener)z.addEventListener("DOMContentLoaded",K,!1),a.addEventListener("load",K,!1);else{z.attachEvent("onreadystatechange",K),a.attachEvent("onload",K);var c=!1;try{c=null==a.frameElement&&z.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!n.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}J(),n.ready()}}()}return I.promise(b)};var L="undefined",M;for(M in n(l))break;l.ownLast="0"!==M,l.inlineBlockNeedsLayout=!1,n(function(){var a,b,c=z.getElementsByTagName("body")[0];c&&(a=z.createElement("div"),a.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",b=z.createElement("div"),c.appendChild(a).appendChild(b),typeof b.style.zoom!==L&&(b.style.cssText="border:0;margin:0;width:1px;padding:1px;display:inline;zoom:1",(l.inlineBlockNeedsLayout=3===b.offsetWidth)&&(c.style.zoom=1)),c.removeChild(a),a=b=null)}),function(){var a=z.createElement("div");if(null==l.deleteExpando){l.deleteExpando=!0;try{delete a.test}catch(b){l.deleteExpando=!1}}a=null}(),n.acceptData=function(a){var b=n.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(O,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}n.data(a,b,c)}else c=void 0}return c}function Q(a){var b;for(b in a)if(("data"!==b||!n.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function R(a,b,d,e){if(n.acceptData(a)){var f,g,h=n.expando,i=a.nodeType,j=i?n.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||n.guid++:h),j[k]||(j[k]=i?{}:{toJSON:n.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=n.extend(j[k],b):j[k].data=n.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[n.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[n.camelCase(b)])):f=g,f
7
+ }}function S(a,b,c){if(n.acceptData(a)){var d,e,f=a.nodeType,g=f?n.cache:a,h=f?a[n.expando]:n.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){n.isArray(b)?b=b.concat(n.map(b,n.camelCase)):b in d?b=[b]:(b=n.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!Q(d):!n.isEmptyObject(d))return}(c||(delete g[h].data,Q(g[h])))&&(f?n.cleanData([a],!0):l.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}n.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?n.cache[a[n.expando]]:a[n.expando],!!a&&!Q(a)},data:function(a,b,c){return R(a,b,c)},removeData:function(a,b){return S(a,b)},_data:function(a,b,c){return R(a,b,c,!0)},_removeData:function(a,b){return S(a,b,!0)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=n.data(f),1===f.nodeType&&!n._data(f,"parsedAttrs"))){c=g.length;while(c--)d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d]));n._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){n.data(this,a)}):arguments.length>1?this.each(function(){n.data(this,a,b)}):f?P(f,a,n.data(f,a)):void 0},removeData:function(a){return this.each(function(){n.removeData(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=n._data(a,b),c&&(!d||n.isArray(c)?d=n._data(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return n._data(a,c)||n._data(a,c,{empty:n.Callbacks("once memory").add(function(){n._removeData(a,b+"queue"),n._removeData(a,c)})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=n._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var T=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,U=["Top","Right","Bottom","Left"],V=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)},W=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},X=/^(?:checkbox|radio)$/i;!function(){var a=z.createDocumentFragment(),b=z.createElement("div"),c=z.createElement("input");if(b.setAttribute("className","t"),b.innerHTML=" <link/><table></table><a href='/a'>a</a>",l.leadingWhitespace=3===b.firstChild.nodeType,l.tbody=!b.getElementsByTagName("tbody").length,l.htmlSerialize=!!b.getElementsByTagName("link").length,l.html5Clone="<:nav></:nav>"!==z.createElement("nav").cloneNode(!0).outerHTML,c.type="checkbox",c.checked=!0,a.appendChild(c),l.appendChecked=c.checked,b.innerHTML="<textarea>x</textarea>",l.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,a.appendChild(b),b.innerHTML="<input type='radio' checked='checked' name='t'/>",l.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,l.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){l.noCloneEvent=!1}),b.cloneNode(!0).click()),null==l.deleteExpando){l.deleteExpando=!0;try{delete b.test}catch(d){l.deleteExpando=!1}}a=b=c=null}(),function(){var b,c,d=z.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(l[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),l[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var Y=/^(?:input|select|textarea)$/i,Z=/^key/,$=/^(?:mouse|contextmenu)|click/,_=/^(?:focusinfocus|focusoutblur)$/,ab=/^([^.]*)(?:\.(.+)|)$/;function bb(){return!0}function cb(){return!1}function db(){try{return z.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=n.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof n===L||a&&n.event.triggered===a.type?void 0:n.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(F)||[""],h=b.length;while(h--)f=ab.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=n.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=n.event.special[o]||{},l=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},i),(m=g[o])||(m=g[o]=[],m.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,l):m.push(l),n.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n.hasData(a)&&n._data(a);if(r&&(k=r.events)){b=(b||"").match(F)||[""],j=b.length;while(j--)if(h=ab.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;while(f--)g=m[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g));i&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(k)&&(delete r.handle,n._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,m,o=[d||z],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||z,3!==d.nodeType&&8!==d.nodeType&&!_.test(p+n.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[n.expando]?b:new n.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),k=n.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!n.isWindow(d)){for(i=k.delegateType||p,_.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||z)&&o.push(l.defaultView||l.parentWindow||a)}m=0;while((h=o[m++])&&!b.isPropagationStopped())b.type=m>1?i:k.bindType||p,f=(n._data(h,"events")||{})[b.type]&&n._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&n.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&n.acceptData(d)&&g&&d[p]&&!n.isWindow(d)){l=d[g],l&&(d[g]=null),n.event.triggered=p;try{d[p]()}catch(r){}n.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(n._data(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((n.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?n(c,this).index(i)>=0:n.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[n.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=$.test(e)?this.mouseHooks:Z.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new n.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=f.srcElement||z),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,g.filter?g.filter(a,f):a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button,g=b.fromElement;return null==a.pageX&&null!=b.clientX&&(d=a.target.ownerDocument||z,e=d.documentElement,c=d.body,a.pageX=b.clientX+(e&&e.scrollLeft||c&&c.scrollLeft||0)-(e&&e.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||c&&c.scrollTop||0)-(e&&e.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&g&&(a.relatedTarget=g===a.target?b.toElement:g),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==db()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===db()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return n.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=n.extend(new n.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?n.event.trigger(e,null,b):n.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=z.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]===L&&(a[d]=null),a.detachEvent(d,c))},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&(a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault())?bb:cb):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={isDefaultPrevented:cb,isPropagationStopped:cb,isImmediatePropagationStopped:cb,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=bb,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=bb,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=bb,this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!n.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),l.submitBubbles||(n.event.special.submit={setup:function(){return n.nodeName(this,"form")?!1:void n.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=n.nodeName(b,"input")||n.nodeName(b,"button")?b.form:void 0;c&&!n._data(c,"submitBubbles")&&(n.event.add(c,"submit._submit",function(a){a._submit_bubble=!0}),n._data(c,"submitBubbles",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&n.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return n.nodeName(this,"form")?!1:void n.event.remove(this,"._submit")}}),l.changeBubbles||(n.event.special.change={setup:function(){return Y.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(n.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),n.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),n.event.simulate("change",this,a,!0)})),!1):void n.event.add(this,"beforeactivate._change",function(a){var b=a.target;Y.test(b.nodeName)&&!n._data(b,"changeBubbles")&&(n.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||n.event.simulate("change",this.parentNode,a,!0)}),n._data(b,"changeBubbles",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return n.event.remove(this,"._change"),!Y.test(this.nodeName)}}),l.focusinBubbles||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a),!0)};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=n._data(d,b);e||d.addEventListener(a,c,!0),n._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=n._data(d,b)-1;e?n._data(d,b,e):(d.removeEventListener(a,c,!0),n._removeData(d,b))}}}),n.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(f in a)this.on(f,b,c,a[f],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=cb;else if(!d)return this;return 1===e&&(g=d,d=function(a){return n().off(a),g.apply(this,arguments)},d.guid=g.guid||(g.guid=n.guid++)),this.each(function(){n.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=cb),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});function eb(a){var b=fb.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}var fb="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gb=/ jQuery\d+="(?:null|\d+)"/g,hb=new RegExp("<(?:"+fb+")[\\s/>]","i"),ib=/^\s+/,jb=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,kb=/<([\w:]+)/,lb=/<tbody/i,mb=/<|&#?\w+;/,nb=/<(?:script|style|link)/i,ob=/checked\s*(?:[^=]|=\s*.checked.)/i,pb=/^$|\/(?:java|ecma)script/i,qb=/^true\/(.*)/,rb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,sb={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:l.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},tb=eb(z),ub=tb.appendChild(z.createElement("div"));sb.optgroup=sb.option,sb.tbody=sb.tfoot=sb.colgroup=sb.caption=sb.thead,sb.th=sb.td;function vb(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==L?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==L?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||n.nodeName(d,b)?f.push(d):n.merge(f,vb(d,b));return void 0===b||b&&n.nodeName(a,b)?n.merge([a],f):f}function wb(a){X.test(a.type)&&(a.defaultChecked=a.checked)}function xb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function yb(a){return a.type=(null!==n.find.attr(a,"type"))+"/"+a.type,a}function zb(a){var b=qb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Ab(a,b){for(var c,d=0;null!=(c=a[d]);d++)n._data(c,"globalEval",!b||n._data(b[d],"globalEval"))}function Bb(a,b){if(1===b.nodeType&&n.hasData(a)){var c,d,e,f=n._data(a),g=n._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)n.event.add(b,c,h[c][d])}g.data&&(g.data=n.extend({},g.data))}}function Cb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!l.noCloneEvent&&b[n.expando]){e=n._data(b);for(d in e.events)n.removeEvent(b,d,e.handle);b.removeAttribute(n.expando)}"script"===c&&b.text!==a.text?(yb(b).text=a.text,zb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),l.html5Clone&&a.innerHTML&&!n.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&X.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}n.extend({clone:function(a,b,c){var d,e,f,g,h,i=n.contains(a.ownerDocument,a);if(l.html5Clone||n.isXMLDoc(a)||!hb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ub.innerHTML=a.outerHTML,ub.removeChild(f=ub.firstChild)),!(l.noCloneEvent&&l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(d=vb(f),h=vb(a),g=0;null!=(e=h[g]);++g)d[g]&&Cb(e,d[g]);if(b)if(c)for(h=h||vb(a),d=d||vb(f),g=0;null!=(e=h[g]);g++)Bb(e,d[g]);else Bb(a,f);return d=vb(f,"script"),d.length>0&&Ab(d,!i&&vb(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k,m=a.length,o=eb(b),p=[],q=0;m>q;q++)if(f=a[q],f||0===f)if("object"===n.type(f))n.merge(p,f.nodeType?[f]:f);else if(mb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(kb.exec(f)||["",""])[1].toLowerCase(),k=sb[i]||sb._default,h.innerHTML=k[1]+f.replace(jb,"<$1></$2>")+k[2],e=k[0];while(e--)h=h.lastChild;if(!l.leadingWhitespace&&ib.test(f)&&p.push(b.createTextNode(ib.exec(f)[0])),!l.tbody){f="table"!==i||lb.test(f)?"<table>"!==k[1]||lb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)n.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}n.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),l.appendChecked||n.grep(vb(p,"input"),wb),q=0;while(f=p[q++])if((!d||-1===n.inArray(f,d))&&(g=n.contains(f.ownerDocument,f),h=vb(o.appendChild(f),"script"),g&&Ab(h),c)){e=0;while(f=h[e++])pb.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=n.expando,j=n.cache,k=l.deleteExpando,m=n.event.special;null!=(d=a[h]);h++)if((b||n.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)m[e]?n.event.remove(d,e):n.removeEvent(d,e,g.handle);j[f]&&(delete j[f],k?delete d[i]:typeof d.removeAttribute!==L?d.removeAttribute(i):d[i]=null,c.push(f))}}}),n.fn.extend({text:function(a){return W(this,function(a){return void 0===a?n.text(this):this.empty().append((this[0]&&this[0].ownerDocument||z).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=xb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=xb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(vb(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&Ab(vb(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&n.cleanData(vb(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&n.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return W(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(gb,""):void 0;if(!("string"!=typeof a||nb.test(a)||!l.htmlSerialize&&hb.test(a)||!l.leadingWhitespace&&ib.test(a)||sb[(kb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(jb,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(vb(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(vb(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,k=this.length,m=this,o=k-1,p=a[0],q=n.isFunction(p);if(q||k>1&&"string"==typeof p&&!l.checkClone&&ob.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(k&&(i=n.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=n.map(vb(i,"script"),yb),f=g.length;k>j;j++)d=i,j!==o&&(d=n.clone(d,!0,!0),f&&n.merge(g,vb(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,n.map(g,zb),j=0;f>j;j++)d=g[j],pb.test(d.type||"")&&!n._data(d,"globalEval")&&n.contains(h,d)&&(d.src?n._evalUrl&&n._evalUrl(d.src):n.globalEval((d.text||d.textContent||d.innerHTML||"").replace(rb,"")));i=c=null}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=0,e=[],g=n(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),n(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Db,Eb={};function Fb(b,c){var d=n(c.createElement(b)).appendTo(c.body),e=a.getDefaultComputedStyle?a.getDefaultComputedStyle(d[0]).display:n.css(d[0],"display");return d.detach(),e}function Gb(a){var b=z,c=Eb[a];return c||(c=Fb(a,b),"none"!==c&&c||(Db=(Db||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Db[0].contentWindow||Db[0].contentDocument).document,b.write(),b.close(),c=Fb(a,b),Db.detach()),Eb[a]=c),c}!function(){var a,b,c=z.createElement("div"),d="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";c.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=c.getElementsByTagName("a")[0],a.style.cssText="float:left;opacity:.5",l.opacity=/^0.5/.test(a.style.opacity),l.cssFloat=!!a.style.cssFloat,c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===c.style.backgroundClip,a=c=null,l.shrinkWrapBlocks=function(){var a,c,e,f;if(null==b){if(a=z.getElementsByTagName("body")[0],!a)return;f="border:0;width:0;height:0;position:absolute;top:0;left:-9999px",c=z.createElement("div"),e=z.createElement("div"),a.appendChild(c).appendChild(e),b=!1,typeof e.style.zoom!==L&&(e.style.cssText=d+";width:1px;padding:1px;zoom:1",e.innerHTML="<div></div>",e.firstChild.style.width="5px",b=3!==e.offsetWidth),a.removeChild(c),a=c=e=null}return b}}();var Hb=/^margin/,Ib=new RegExp("^("+T+")(?!px)[a-z%]+$","i"),Jb,Kb,Lb=/^(top|right|bottom|left)$/;a.getComputedStyle?(Jb=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)},Kb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Jb(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),Ib.test(g)&&Hb.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0===g?g:g+""}):z.documentElement.currentStyle&&(Jb=function(a){return a.currentStyle},Kb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Jb(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Ib.test(g)&&!Lb.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function Mb(a,b){return{get:function(){var c=a();if(null!=c)return c?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d,e,f,g,h=z.createElement("div"),i="border:0;width:0;height:0;position:absolute;top:0;left:-9999px",j="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";h.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",b=h.getElementsByTagName("a")[0],b.style.cssText="float:left;opacity:.5",l.opacity=/^0.5/.test(b.style.opacity),l.cssFloat=!!b.style.cssFloat,h.style.backgroundClip="content-box",h.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===h.style.backgroundClip,b=h=null,n.extend(l,{reliableHiddenOffsets:function(){if(null!=c)return c;var a,b,d,e=z.createElement("div"),f=z.getElementsByTagName("body")[0];if(f)return e.setAttribute("className","t"),e.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=z.createElement("div"),a.style.cssText=i,f.appendChild(a).appendChild(e),e.innerHTML="<table><tr><td></td><td>t</td></tr></table>",b=e.getElementsByTagName("td"),b[0].style.cssText="padding:0;margin:0;border:0;display:none",d=0===b[0].offsetHeight,b[0].style.display="",b[1].style.display="none",c=d&&0===b[0].offsetHeight,f.removeChild(a),e=f=null,c},boxSizing:function(){return null==d&&k(),d},boxSizingReliable:function(){return null==e&&k(),e},pixelPosition:function(){return null==f&&k(),f},reliableMarginRight:function(){var b,c,d,e;if(null==g&&a.getComputedStyle){if(b=z.getElementsByTagName("body")[0],!b)return;c=z.createElement("div"),d=z.createElement("div"),c.style.cssText=i,b.appendChild(c).appendChild(d),e=d.appendChild(z.createElement("div")),e.style.cssText=d.style.cssText=j,e.style.marginRight=e.style.width="0",d.style.width="1px",g=!parseFloat((a.getComputedStyle(e,null)||{}).marginRight),b.removeChild(c)}return g}});function k(){var b,c,h=z.getElementsByTagName("body")[0];h&&(b=z.createElement("div"),c=z.createElement("div"),b.style.cssText=i,h.appendChild(b).appendChild(c),c.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;display:block;padding:1px;border:1px;width:4px;margin-top:1%;top:1%",n.swap(h,null!=h.style.zoom?{zoom:1}:{},function(){d=4===c.offsetWidth}),e=!0,f=!1,g=!0,a.getComputedStyle&&(f="1%"!==(a.getComputedStyle(c,null)||{}).top,e="4px"===(a.getComputedStyle(c,null)||{width:"4px"}).width),h.removeChild(b),c=h=null)}}(),n.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var Nb=/alpha\([^)]*\)/i,Ob=/opacity\s*=\s*([^)]*)/,Pb=/^(none|table(?!-c[ea]).+)/,Qb=new RegExp("^("+T+")(.*)$","i"),Rb=new RegExp("^([+-])=("+T+")","i"),Sb={position:"absolute",visibility:"hidden",display:"block"},Tb={letterSpacing:0,fontWeight:400},Ub=["Webkit","O","Moz","ms"];function Vb(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Ub.length;while(e--)if(b=Ub[e]+c,b in a)return b;return d}function Wb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=n._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&V(d)&&(f[g]=n._data(d,"olddisplay",Gb(d.nodeName)))):f[g]||(e=V(d),(c&&"none"!==c||!e)&&n._data(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function Xb(a,b,c){var d=Qb.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Yb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+U[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+U[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+U[f]+"Width",!0,e))):(g+=n.css(a,"padding"+U[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+U[f]+"Width",!0,e)));return g}function Zb(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Jb(a),g=l.boxSizing()&&"border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Kb(a,b,f),(0>e||null==e)&&(e=a.style[b]),Ib.test(e))return e;d=g&&(l.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Yb(a,b,c||(g?"border":"content"),d,f)+"px"}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Kb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":l.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;if(b=n.cssProps[h]||(n.cssProps[h]=Vb(i,h)),g=n.cssHooks[b]||n.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=Rb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(n.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||n.cssNumber[h]||(c+="px"),l.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]="",i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Vb(a.style,h)),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Kb(a,b,d)),"normal"===f&&b in Tb&&(f=Tb[b]),""===c||c?(e=parseFloat(f),c===!0||n.isNumeric(e)?e||0:f):f}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?0===a.offsetWidth&&Pb.test(n.css(a,"display"))?n.swap(a,Sb,function(){return Zb(a,b,d)}):Zb(a,b,d):void 0},set:function(a,c,d){var e=d&&Jb(a);return Xb(a,c,d?Yb(a,b,d,l.boxSizing()&&"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),l.opacity||(n.cssHooks.opacity={get:function(a,b){return Ob.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=n.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===n.trim(f.replace(Nb,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Nb.test(f)?f.replace(Nb,e):f+" "+e)}}),n.cssHooks.marginRight=Mb(l.reliableMarginRight,function(a,b){return b?n.swap(a,{display:"inline-block"},Kb,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+U[d]+b]=f[d]||f[d-2]||f[0];return e}},Hb.test(a)||(n.cssHooks[a+b].set=Xb)}),n.fn.extend({css:function(a,b){return W(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=Jb(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b)
8
+ },a,b,arguments.length>1)},show:function(){return Wb(this,!0)},hide:function(){return Wb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){V(this)?n(this).show():n(this).hide()})}});function $b(a,b,c,d,e){return new $b.prototype.init(a,b,c,d,e)}n.Tween=$b,$b.prototype={constructor:$b,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=$b.propHooks[this.prop];return a&&a.get?a.get(this):$b.propHooks._default.get(this)},run:function(a){var b,c=$b.propHooks[this.prop];return this.pos=b=this.options.duration?n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):$b.propHooks._default.set(this),this}},$b.prototype.init.prototype=$b.prototype,$b.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[n.cssProps[a.prop]]||n.cssHooks[a.prop])?n.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},$b.propHooks.scrollTop=$b.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},n.fx=$b.prototype.init,n.fx.step={};var _b,ac,bc=/^(?:toggle|show|hide)$/,cc=new RegExp("^(?:([+-])=|)("+T+")([a-z%]*)$","i"),dc=/queueHooks$/,ec=[jc],fc={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=cc.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||"px"!==f&&+d)&&cc.exec(n.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,n.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function gc(){return setTimeout(function(){_b=void 0}),_b=n.now()}function hc(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=U[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function ic(a,b,c){for(var d,e=(fc[b]||[]).concat(fc["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function jc(a,b,c){var d,e,f,g,h,i,j,k,m=this,o={},p=a.style,q=a.nodeType&&V(a),r=n._data(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,m.always(function(){m.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=n.css(a,"display"),k=Gb(a.nodeName),"none"===j&&(j=k),"inline"===j&&"none"===n.css(a,"float")&&(l.inlineBlockNeedsLayout&&"inline"!==k?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",l.shrinkWrapBlocks()||m.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],bc.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||n.style(a,d)}if(!n.isEmptyObject(o)){r?"hidden"in r&&(q=r.hidden):r=n._data(a,"fxshow",{}),f&&(r.hidden=!q),q?n(a).show():m.done(function(){n(a).hide()}),m.done(function(){var b;n._removeData(a,"fxshow");for(b in o)n.style(a,b,o[b])});for(d in o)g=ic(q?r[d]:0,d,m),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function kc(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function lc(a,b,c){var d,e,f=0,g=ec.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=_b||gc(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:_b||gc(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(kc(k,j.opts.specialEasing);g>f;f++)if(d=ec[f].call(j,a,k,j.opts))return d;return n.map(k,ic,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(lc,{tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],fc[c]=fc[c]||[],fc[c].unshift(b)},prefilter:function(a,b){b?ec.unshift(a):ec.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(V).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=lc(this,n.extend({},a),f);(e||n._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=n._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&dc.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=n._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(hc(b,!0),a,d,e)}}),n.each({slideDown:hc("show"),slideUp:hc("hide"),slideToggle:hc("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=n.timers,c=0;for(_b=n.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||n.fx.stop(),_b=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){ac||(ac=setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){clearInterval(ac),ac=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(a,b){return a=n.fx?n.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a,b,c,d,e=z.createElement("div");e.setAttribute("className","t"),e.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=e.getElementsByTagName("a")[0],c=z.createElement("select"),d=c.appendChild(z.createElement("option")),b=e.getElementsByTagName("input")[0],a.style.cssText="top:1px",l.getSetAttribute="t"!==e.className,l.style=/top/.test(a.getAttribute("style")),l.hrefNormalized="/a"===a.getAttribute("href"),l.checkOn=!!b.value,l.optSelected=d.selected,l.enctype=!!z.createElement("form").enctype,c.disabled=!0,l.optDisabled=!d.disabled,b=z.createElement("input"),b.setAttribute("value",""),l.input=""===b.getAttribute("value"),b.value="t",b.setAttribute("type","radio"),l.radioValue="t"===b.value,a=b=c=d=e=null}();var mc=/\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(mc,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.text(a)}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(l.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)if(d=e[g],n.inArray(n.valHooks.option.get(d),f)>=0)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>=0:void 0}},l.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var nc,oc,pc=n.expr.attrHandle,qc=/^(?:checked|selected)$/i,rc=l.getSetAttribute,sc=l.input;n.fn.extend({attr:function(a,b){return W(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===L?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),d=n.attrHooks[b]||(n.expr.match.bool.test(b)?oc:nc)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void n.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(F);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)?sc&&rc||!qc.test(c)?a[d]=!1:a[n.camelCase("default-"+c)]=a[d]=!1:n.attr(a,c,""),a.removeAttribute(rc?c:d)},attrHooks:{type:{set:function(a,b){if(!l.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),oc={set:function(a,b,c){return b===!1?n.removeAttr(a,c):sc&&rc||!qc.test(c)?a.setAttribute(!rc&&n.propFix[c]||c,c):a[n.camelCase("default-"+c)]=a[c]=!0,c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=pc[b]||n.find.attr;pc[b]=sc&&rc||!qc.test(b)?function(a,b,d){var e,f;return d||(f=pc[b],pc[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,pc[b]=f),e}:function(a,b,c){return c?void 0:a[n.camelCase("default-"+b)]?b.toLowerCase():null}}),sc&&rc||(n.attrHooks.value={set:function(a,b,c){return n.nodeName(a,"input")?void(a.defaultValue=b):nc&&nc.set(a,b,c)}}),rc||(nc={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},pc.id=pc.name=pc.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},n.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:nc.set},n.attrHooks.contenteditable={set:function(a,b,c){nc.set(a,""===b?!1:b,c)}},n.each(["width","height"],function(a,b){n.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),l.style||(n.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var tc=/^(?:input|select|textarea|button|object)$/i,uc=/^(?:a|area)$/i;n.fn.extend({prop:function(a,b){return W(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return a=n.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),n.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!n.isXMLDoc(a),f&&(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=n.find.attr(a,"tabindex");return b?parseInt(b,10):tc.test(a.nodeName)||uc.test(a.nodeName)&&a.href?0:-1}}}}),l.hrefNormalized||n.each(["href","src"],function(a,b){n.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),l.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this}),l.enctype||(n.propFix.enctype="encoding");var vc=/[\t\r\n\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j="string"==typeof a&&a;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(F)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(vc," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=n.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=0===arguments.length||"string"==typeof a&&a;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(F)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(vc," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?n.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(n.isFunction(a)?function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=n(this),f=a.match(F)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===L||"boolean"===c)&&(this.className&&n._data(this,"__className__",this.className),this.className=this.className||a===!1?"":n._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(vc," ").indexOf(b)>=0)return!0;return!1}}),n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var wc=n.now(),xc=/\?/,yc=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;n.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=n.trim(b+"");return e&&!n.trim(e.replace(yc,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():n.error("Invalid JSON: "+b)},n.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||n.error("Invalid XML: "+b),c};var zc,Ac,Bc=/#.*$/,Cc=/([?&])_=[^&]*/,Dc=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Ec=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Fc=/^(?:GET|HEAD)$/,Gc=/^\/\//,Hc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Ic={},Jc={},Kc="*/".concat("*");try{Ac=location.href}catch(Lc){Ac=z.createElement("a"),Ac.href="",Ac=Ac.href}zc=Hc.exec(Ac.toLowerCase())||[];function Mc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(F)||[];if(n.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Nc(a,b,c,d){var e={},f=a===Jc;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Oc(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&n.extend(!0,a,c),a}function Pc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Qc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ac,type:"GET",isLocal:Ec.test(zc[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Kc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Oc(Oc(a,n.ajaxSettings),b):Oc(n.ajaxSettings,a)},ajaxPrefilter:Mc(Ic),ajaxTransport:Mc(Jc),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=n.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?n(l):n.event,o=n.Deferred(),p=n.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!j){j={};while(b=Dc.exec(f))j[b[1].toLowerCase()]=b[2]}b=j[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return i&&i.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||Ac)+"").replace(Bc,"").replace(Gc,zc[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(F)||[""],null==k.crossDomain&&(c=Hc.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===zc[1]&&c[2]===zc[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(zc[3]||("http:"===zc[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=n.param(k.data,k.traditional)),Nc(Ic,k,b,v),2===t)return v;h=k.global,h&&0===n.active++&&n.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Fc.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(xc.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Cc.test(e)?e.replace(Cc,"$1_="+wc++):e+(xc.test(e)?"&":"?")+"_="+wc++)),k.ifModified&&(n.lastModified[e]&&v.setRequestHeader("If-Modified-Since",n.lastModified[e]),n.etag[e]&&v.setRequestHeader("If-None-Match",n.etag[e])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+Kc+"; q=0.01":""):k.accepts["*"]);for(d in k.headers)v.setRequestHeader(d,k.headers[d]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(d in{success:1,error:1,complete:1})v[d](k[d]);if(i=Nc(Jc,k,b,v)){v.readyState=1,h&&m.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,i.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,c,d){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),i=void 0,f=d||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,c&&(u=Pc(k,v,c)),u=Qc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(n.lastModified[e]=w),w=v.getResponseHeader("etag"),w&&(n.etag[e]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,h&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),h&&(m.trigger("ajaxComplete",[v,k]),--n.active||n.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){if(n.isFunction(a))return this.each(function(b){n(this).wrapAll(a.call(this,b))});if(this[0]){var b=n(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return this.each(n.isFunction(a)?function(b){n(this).wrapInner(a.call(this,b))}:function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!l.reliableHiddenOffsets()&&"none"===(a.style&&a.style.display||n.css(a,"display"))},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var Rc=/%20/g,Sc=/\[\]$/,Tc=/\r?\n/g,Uc=/^(?:submit|button|image|reset|file)$/i,Vc=/^(?:input|select|textarea|keygen)/i;function Wc(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||Sc.test(a)?d(a,e):Wc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Wc(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Wc(c,a[c],b,e);return d.join("&").replace(Rc,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&Vc.test(this.nodeName)&&!Uc.test(a)&&(this.checked||!X.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(Tc,"\r\n")}}):{name:b.name,value:c.replace(Tc,"\r\n")}}).get()}}),n.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&$c()||_c()}:$c;var Xc=0,Yc={},Zc=n.ajaxSettings.xhr();a.ActiveXObject&&n(a).on("unload",function(){for(var a in Yc)Yc[a](void 0,!0)}),l.cors=!!Zc&&"withCredentials"in Zc,Zc=l.ajax=!!Zc,Zc&&n.ajaxTransport(function(a){if(!a.crossDomain||l.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Xc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)void 0!==c[e]&&f.setRequestHeader(e,c[e]+"");f.send(a.hasContent&&a.data||null),b=function(c,e){var h,i,j;if(b&&(e||4===f.readyState))if(delete Yc[g],b=void 0,f.onreadystatechange=n.noop,e)4!==f.readyState&&f.abort();else{j={},h=f.status,"string"==typeof f.responseText&&(j.text=f.responseText);try{i=f.statusText}catch(k){i=""}h||!a.isLocal||a.crossDomain?1223===h&&(h=204):h=j.text?200:404}j&&d(h,i,j,f.getAllResponseHeaders())},a.async?4===f.readyState?setTimeout(b):f.onreadystatechange=Yc[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function $c(){try{return new a.XMLHttpRequest}catch(b){}}function _c(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=z.head||n("head")[0]||z.documentElement;return{send:function(d,e){b=z.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||e(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var ad=[],bd=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=ad.pop()||n.expando+"_"+wc++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(bd.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&bd.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(bd,"$1"+e):b.jsonp!==!1&&(b.url+=(xc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,ad.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||z;var d=v.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=n.buildFragment([a],b,e),e&&e.length&&n(e).remove(),n.merge([],d.childNodes))};var cd=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&cd)return cd.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=a.slice(h,a.length),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),g.length>0&&n.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};var dd=a.document.documentElement;function ed(a){return n.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&n.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,n.contains(b,e)?(typeof e.getBoundingClientRect!==L&&(d=e.getBoundingClientRect()),c=ed(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===n.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(c=a.offset()),c.top+=n.css(a[0],"borderTopWidth",!0),c.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-n.css(d,"marginTop",!0),left:b.left-c.left-n.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||dd;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||dd})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);n.fn[a]=function(d){return W(this,function(a,d,e){var f=ed(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?n(f).scrollLeft():e,c?e:n(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=Mb(l.pixelPosition,function(a,c){return c?(c=Kb(a,b),Ib.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return W(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var fd=a.jQuery,gd=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=gd),b&&a.jQuery===n&&(a.jQuery=fd),n},typeof b===L&&(a.jQuery=a.$=n),n});
9
+ <?php endif; ?>
10
+
11
+ if (typeof window.avisVerifies === 'undefined') {
12
+ window.avisVerifies = {};
13
+ }
14
+
15
+ <?php if($nojQuery): ?>
16
+ //HANDLE MULTIPLE JQUERY VERSIONS
17
+ window.avisVerifies.jQuery = jQuery.noConflict(true);
18
+ <?php else: ?>
19
+ window.avisVerifies.jQuery = window.$;
20
+ <?php endif; ?>
21
+
22
+ avisVerifies.jQuery(document).ready(function(){
23
+ window.avisVerifies.jQuery("#customer-reviews").removeAttr('style');
24
+ });
25
+
26
+ avisVerifies.fireClick = function (node){
27
+ if ( document.createEvent ) {
28
+ var evt = document.createEvent('MouseEvents');
29
+ evt.initEvent('click', true, false);
30
+ node.dispatchEvent(evt);
31
+ } else if( document.createEventObject ) {
32
+ node.fireEvent('onclick') ;
33
+ } else if (typeof node.onclick == 'function' ) {
34
+ node.onclick();
35
+ }
36
+ }
37
+
38
+ window.avisVerifies.clickTab = function(id_dom){
39
+ var theNode = document.getElementById(id_dom);
40
+ avisVerifies.fireClick(theNode);
41
+ window.avisVerifies.scrollTo();
42
+ }
43
+
44
+ window.avisVerifies.scrollTo = function(){
45
+ var $avjq = window.avisVerifies.jQuery;
46
+ $avjq('html,body').animate({scrollTop: $avjq("#idTabavisverifies").offset().top}, 'slow');
47
+ };
48
+
49
+ window.avisVerifies.Ajax = function(){
50
+ var $avjq = window.avisVerifies.jQuery;
51
+ var urlAjax = $avjq("#avisVarifiesAjaxUrl").val();
52
+ var $imgAjax = $avjq("#avisVarifiesAjaxImage");
53
+ var $click = $avjq('#av_load_next_page');
54
+ var $content = $avjq("#ajax_comment_content");
55
+ var page = parseInt($click.attr('data-page'));
56
+ var maxPage = parseInt($click.attr('data-page-last'));
57
+ page++;
58
+ $avjq.ajax({
59
+ url: urlAjax,
60
+ type: "POST",
61
+ data: {p : page},
62
+ beforeSend: function() {
63
+ $imgAjax.show();
64
+ },
65
+ success: function(html){
66
+ $content.append(html);
67
+ $click.attr('data-page',page);
68
+ $imgAjax.hide();
69
+ if(maxPage <= page)
70
+ $click.hide();
71
+ },
72
+ error: function ( jqXHR, textStatus, errorThrown ){
73
+ alert('something went wrong...');
74
+ }
75
+ });
76
+ }
77
+
78
+
79
+ window.avisVerifies.switchCommentsVisibility = function (review_number){
80
+ var $avjq = window.avisVerifies.jQuery;
81
+ var comment = $avjq('div[review_number='+review_number+']');
82
+ comment.toggle();
83
+ //Swich entre "afficher les échanges" et "masquer les échanges"
84
+ $avjq('a#display'+review_number+'[review_number='+review_number+']').toggle();
85
+ $avjq('a#hide'+review_number+'[review_number='+review_number+']').toggle();
86
+ }
87
+ </script>
88
+ <?php endif;?>
app/design/frontend/default/default/template/avisverifies/left.phtml ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php // Important: this block is called on the left block area. ?>
2
+ <?php $SCRIPTFIXE_ALLOWED = (Mage::getStoreConfig(strtolower('avisverifies/system/SCRIPTFIXE_ALLOWED'))=='yes') ?>
3
+ <?php $SCRIPTFIXE_POSITION = (Mage::getStoreConfig(strtolower('avisverifies/system/SCRIPTFIXE_POSITION')) == "left") ?>
4
+ <?php if($SCRIPTFIXE_ALLOWED && $SCRIPTFIXE_POSITION): ?>
5
+ <div style="margin: auto;">
6
+ <?php echo Mage::getStoreConfig(strtolower('avisverifies/system/SCRIPTFIXE')) ?>
7
+ </div>
8
+ <?php endif;?>
9
+
10
+ <?php //echo "<script> console.log('AV: left -> block: left');</script>"; ?>
app/design/frontend/default/default/template/avisverifies/list.phtml ADDED
@@ -0,0 +1,133 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if(Netreviews_Avisverifies_Helper_Data::isActive()): // Our Display. ?>
2
+ <?php $p = ($this->getRequest()->getParam('p'))? (int) $this->getRequest()->getParam('p') : 1; ?>
3
+ <?php $o_av = Mage::getModel('avisverifies/reviews'); // our custom reviews model ?>
4
+ <?php $ProductId = $this->getProductId(); ?>
5
+ <?php // to use same code. we are going to call first page from our code. ?>
6
+ <?php $ProductId =($ProductId != 0)? $ProductId : $this->getData('productId'); ?>
7
+ <?php // to use same code. we are going to call first page from our code. ?>
8
+ <?php $o_av->idProduct = $ProductId; ?>
9
+ <?php $o_av->page = $p; ?>
10
+ <?php $statsProduct = $o_av->getStatsProduct(); ?>
11
+ <?php $countReviews = $statsProduct->getData('nb_reviews'); ?>
12
+ <?php $getNote = $o_av->formatNote($statsProduct->getData('rate')); ?>
13
+ <?php $maxPages = $o_av->getProductReviews(); ?>
14
+ <?php $maxPages = $maxPages->getLastPageNumber();?>
15
+
16
+ <?php $richSnipet = array('','',''); ?>
17
+ <?php // $richSnipet[0] = ' itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating" '?>
18
+ <?php // $richSnipet[1] = ' itemprop="ratingValue" '?>
19
+ <?php // $richSnipet[2] = ' itemprop="reviewCount" '?>
20
+
21
+ <?php // $_product_AV = Mage::getModel('avisverifies/product')->load($ProductId); ?>
22
+
23
+ <?php if($countReviews): ?>
24
+ <div class="box-collateral box-reviews" id="customer-reviews">
25
+ <?php // info pour le js ajax ?>
26
+ <?php $tmp = Mage::getUrl('AvisVerifies/index/ajaxload', array('id_product' => $ProductId)) ?>
27
+ <input id="avisVarifiesAjaxUrl" type="hidden" value="<?php echo $tmp ?>" />
28
+ <?php // info pour le js ajax ?>
29
+ <div id="av_more_info_tabs"></div>
30
+ <div class="clear"></div>
31
+ <div id="idTabavisverifies">
32
+ <div id="headerAV">
33
+ <a name="hautavreview"></a>
34
+ <?php echo $this->__('Product Reviews')?>
35
+ </div>
36
+ <?php $skinUrl = $this->getSkinUrl('images/avisverifies/Sceau_45'.Mage::app()->getLocale()->getLocaleCode().'.png') ?>
37
+ <div id="under-headerAV" style="background: url('<?php echo $skinUrl ?>') no-repeat #f1f1f1;">
38
+ <div id="aggregateRatingAV" <?php echo $richSnipet[0] ?>>
39
+ <div>
40
+ <b><?php echo $this->__('Number of reviews')?></b>
41
+ : <span <?php echo $richSnipet[2] ?>><?php echo $countReviews?></span>
42
+ </div>
43
+ <div>
44
+ <b><?php echo $this->__('Average rating')?></b>
45
+ : <span <?php echo $richSnipet[1] ?>><?php echo $getNote?></span> /5
46
+ <div class="ratingWrapper" style="display:inline-block;">
47
+ <div class="ratingInner" style="width:<?php echo ($getNote*20)."%"?>;"></div>
48
+ </div>
49
+ </div>
50
+ </div>
51
+ <div id="certificatAV">
52
+ <div>
53
+ <?php $href = Mage::getStoreConfig('avisverifies/system/urlcertificat'); ?>
54
+ <a href="<?php echo $href ?>" target="_blank" class="display_certificat_review" >
55
+ <?php echo $this->__('View the trust certificate')?>
56
+ </a>
57
+ </div>
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+ <div id="ajax_comment_content">
62
+ <?php echo Mage::app()->getLayout()->createBlock('core/template')
63
+ ->setData('productId',$ProductId)->setTemplate('avisverifies/pagination.phtml')
64
+ ->toHtml(); ?>
65
+ </div>
66
+ <?php if($maxPages > 1): ?>
67
+ <button onclick="window.avisVerifies.Ajax()" id="av_load_next_page" data-page="1" data-page-last="<?php echo $maxPages ?>">
68
+ <?php echo $this->__('More Reviews...')?>
69
+ </button>
70
+ <img id="avisVarifiesAjaxImage" src="<?php echo $this->getSkinUrl('images/avisverifies/pagination-loader.gif')?>" style="display:none;margin: 10px 0px 0px 10px;" />
71
+ <?php endif; ?>
72
+ </div>
73
+ <div class="clear"></div>
74
+ </div>
75
+ <?php else: ?>
76
+ <div class="box-collateral box-reviews" id="customer-reviews">
77
+ <div id="idTabavisverifies">
78
+ <div id="headerAV">
79
+ <a name="hautavreview"></a>
80
+ <?php echo $this->__('Product Reviews')?>
81
+ </div>
82
+ <?php $skinUrl = $this->getSkinUrl('images/avisverifies/Sceau_45'.Mage::app()->getLocale()->getLocaleCode().'.png') ?>
83
+ <div id="under-headerAV" style="background: url('<?php echo $skinUrl ?>') no-repeat #f1f1f1;">
84
+ <p style="padding: 17px 40px 40px 56px;"><?php echo $this->__("No reviews for this product.")?></p>
85
+ </div>
86
+ </div>
87
+ </div>
88
+ <?php endif; ?>
89
+ <?php else: // Magento Display ?>
90
+ <?php $_items = array(); ?>
91
+ <?php $obj = $this->getReviewsCollection(); ?>
92
+ <?php if(is_object($obj) && method_exists($obj,'getItems')):?>
93
+ <?php $_items = $this->getReviewsCollection()->getItems();?>
94
+ <?php endif;?>
95
+ <div class="box-collateral box-reviews" id="customer-reviews">
96
+ <?php if (count($_items)):?>
97
+ <h2><?php echo $this->__('Customer Reviews') ?></h2>
98
+ <?php echo $this->getChildHtml('toolbar') ?>
99
+ <dl>
100
+ <?php foreach ($_items as $_review):?>
101
+ <dt>
102
+ <a href="<?php echo $this->getReviewUrl($_review->getId()) ?>"><?php echo $this->htmlEscape($_review->getTitle()) ?></a> <?php echo $this->__('Review by <span>%s</span>', $this->htmlEscape($_review->getNickname())) ?>
103
+ </dt>
104
+ <dd>
105
+ <?php $_votes = $_review->getRatingVotes(); ?>
106
+ <?php if (count($_votes)): ?>
107
+ <table class="ratings-table">
108
+ <col width="1" />
109
+ <col />
110
+ <tbody>
111
+ <?php foreach ($_votes as $_vote): ?>
112
+ <tr>
113
+ <th><?php echo $this->escapeHtml($_vote->getRatingCode()) ?></th>
114
+ <td>
115
+ <div class="rating-box">
116
+ <div class="rating" style="width:<?php echo $_vote->getPercent()."%" ?>;"></div>
117
+ </div>
118
+ </td>
119
+ </tr>
120
+ <?php endforeach; ?>
121
+ </tbody>
122
+ </table>
123
+ <?php endif; ?>
124
+ <?php echo nl2br($this->htmlEscape($_review->getDetail())) ?>
125
+ <small class="date"><?php echo $this->__('(Posted on %s)', $this->formatDate($_review->getCreatedAt()), 'long') ?></small>
126
+ </dd>
127
+ <?php endforeach; ?>
128
+ </dl>
129
+ <?php echo $this->getChildHtml('toolbar') ?>
130
+ <?php endif;?>
131
+ <?php echo $this->getChildHtml('review_form') ?>
132
+ </div>
133
+ <?php endif; ?>
app/design/frontend/default/default/template/avisverifies/observers/checkout.phtml ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ <?php $order = $this->getOrder() ?>
3
+ <?php $url = '//www.netreviews.eu/index.php?action=act_order&idWebsite=' ?>
4
+ <?php $orderId = $order->getData('entity_id') ?>
5
+ <?php $orderTotal = $order->getData('base_grand_total') * 100; ?>
6
+ <?php $idWebsite = Mage::getStoreConfig('avisverifies/system/idwebsite'); ?>
7
+ <?php $langue = 'undef'; ?>
8
+ <?php $url .= $idWebsite.'&langue='.$langue.'&refCommande='.$orderId.'&montant='.$orderTotal ?>
9
+
10
+ <?php if(Netreviews_Avisverifies_Helper_Data::isActive()): // Our Display. ?>
11
+ <img height='1' hspace='0' style="position: absolute; bottom: 0; right: 0;" src='<?php echo $url ?>' />
12
+ <?php endif;?>
app/design/frontend/default/default/template/avisverifies/pagination.phtml ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php // This Block is called to paginate reviews. ?>
2
+ <?php if(Netreviews_Avisverifies_Helper_Data::isActive()): ?>
3
+ <?php $p = ($this->getRequest()->getParam('p'))? (int) $this->getRequest()->getParam('p') : 1; ?>
4
+ <?php $o_av = Mage::getModel('avisverifies/reviews'); ?>
5
+ <?php $ProductId = (int) $this->getRequest()->getParam('id_product'); ?>
6
+ <?php // to use same code. we are going to call first page from our code. ?>
7
+ <?php $ProductId =($ProductId != 0)? $ProductId : $this->getData('productId'); ?>
8
+ <?php // to use same code. we are going to call first page from our code. ?>
9
+ <?php $o_av->idProduct = $ProductId; ?>
10
+ <?php $o_av->page = $p; ?>
11
+ <?php $reviews = $o_av->getProductReviews(); ?>
12
+ <?php $richSnipet = array('','','','','','',''); ?>
13
+ <?php // $richSnipet[0] = ' itemprop="review" itemscope itemtype="http://schema.org/Review" '?>
14
+ <?php // $richSnipet[1] = ' itemprop="ratingValue" '?>
15
+ <?php // $richSnipet[2] = ' itemprop="author" '?>
16
+ <?php // $richSnipet[3] = ' <meta itemprop="datePublished" content="%s"> '?>
17
+ <?php // $richSnipet[4] = ' itemprop="reviewRating" itemscope itemtype="http://schema.org/Rating" '?>
18
+ <?php // $richSnipet[5] = ' itemprop="bestRating" '?>
19
+ <?php // $richSnipet[6] = ' itemprop="description" '?>
20
+
21
+ <?php foreach($reviews as $k_review=>$review): ?>
22
+ <div class="reviewAV" <?php echo $richSnipet[0] ?>>
23
+ <div class="reviewInfosAV">
24
+ <div style="text-transform:capitalize" <?php echo $richSnipet[2] ?>>
25
+ <?php echo $o_av->AV_sgbd_decode($review->getData('customer_name')) ?>
26
+ </div>
27
+ <div> &nbsp;
28
+ <?php echo $this->__('the')?>
29
+ <?php $date = date($this->__('d/m/Y'),($review->getData('horodate')))?>
30
+ <?php echo sprintf($richSnipet[3], date("Y-m-d",$review->getData('horodate'))) ?>
31
+ <?php echo $date?>
32
+ </div>
33
+ <div class="rateAV" <?php echo $richSnipet[4] ?>>
34
+ <img src="<?php echo $this->getSkinUrl('images/avisverifies/etoile'.$review->getData('rate').'.png')?>" width="80" height="15" />
35
+ <span <?php echo $richSnipet[1] ?>><?php echo $review->getData('rate')?></span>/ <span <?php echo $richSnipet[5] ?>>5</span>
36
+ </div>
37
+ </div>
38
+ <div class="triangle-border top" <?php echo $richSnipet[6] ?>>
39
+ <?php echo $o_av->AV_sgbd_decode($review->getData('review')) ?>
40
+ </div>
41
+ <?php $discussions = $o_av->discussion($review->getData('discussion'),$review);?>
42
+ <?php $k_discussion = 0; ?>
43
+ <?php if($discussions): ?>
44
+ <?php foreach($discussions as $k_discussion=>$discussion): ?>
45
+ <?php $reviewNumber = ($k_discussion > 0)? ' review_number="'.$review->getData('id_product_av').'" ':'' ?>
46
+ <?php $styleNumber = ($k_discussion > 0)? ' style="display:none;" ':'' ?>
47
+ <div class="triangle-border top answer" <?php echo $reviewNumber.$styleNumber ?> >
48
+ <span> &rsaquo;
49
+ <?php echo $this->__('Comments of')?>
50
+ <b style="text-transform:capitalize; font-weight:normal">
51
+ <?php echo $this->__($discussion['origine'])?>
52
+ </b>
53
+ <?php echo $this->__('on')?>
54
+ <?php echo date($this->__('d/m/Y'),$discussion['horodate'])?>
55
+ </span>
56
+ <p class="answer-bodyAV">
57
+ <?php echo $o_av->AV_sgbd_decode($discussion['commentaire']) ?>
58
+ </p>
59
+ </div>
60
+ <?php endforeach; ?>
61
+ <?php if($k_discussion > 0):?>
62
+ <a href="javascript:window.avisVerifies.switchCommentsVisibility('<?php echo $review->getData('id_product_av')?>')" style="padding-left: 6px;margin-left: 30px; display: block; font-style:italic" id="display<?php echo $review->getData('id_product_av')?>" class="display-all-comments" review_number="<?php echo $review->getData('id_product_av')?>">
63
+ <?php echo $this->__('Show conversation')?>
64
+ </a>
65
+ <a href="javascript:window.avisVerifies.switchCommentsVisibility('<?php echo $review->getData('id_product_av')?>')" style="padding-left: 6px;margin-left: 30px; display: none; font-style:italic" id="hide<?php echo $review->getData('id_product_av')?>" class="display-all-comments" review_number="<?php echo $review->getData('id_product_av')?>">
66
+ <?php echo $this->__('Hide conversation')?>
67
+ </a>
68
+ <?php endif; ?>
69
+ <?php endif; ?>
70
+ </div>
71
+ <?php endforeach; ?>
72
+ <?php endif; ?>
app/design/frontend/default/default/template/avisverifies/review/helper/counter.phtml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php /* changement de mécanique si extension activée au niveau des produits on masque les avis natif Magento */ ?>
2
+ <?php if( Mage::getStoreConfig('avisverifies/gettingreviews/displayreviews') == 1): ?>
3
+ <div class="ratings">
4
+ <div class="rating-box">
5
+ <div class="rating" style="width:<?php echo ceil($this->Note*20)."%" ?>"></div>
6
+ </div>
7
+ <p class="rating-links"><?php echo $this->__('%d Review(s)', $this->NbAvis); ?></p>
8
+ </div>
9
+ <?php endif;?>
app/design/frontend/default/default/template/avisverifies/review/helper/summary.phtml ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php /* changement de mécanique si extension activée au niveau des produits on masque les avis natif Magento */ ?>
2
+ <?php if(Netreviews_Avisverifies_Helper_Data::isActive()): // Our Display.?>
3
+ <?php $o_av = Mage::getModel('avisverifies/reviews'); ?>
4
+ <?php $o_av->idProduct = $this->getProductId(); ?>
5
+ <?php $statsProduct = $o_av->getStatsProduct(); ?>
6
+ <?php $countReviews = $statsProduct->getData('nb_reviews'); ?>
7
+ <?php $getNote = $o_av->formatNote($statsProduct->getData('rate')); ?>
8
+
9
+ <?php if($countReviews): ?>
10
+ <div id="av_product_award">
11
+ <div id="top">
12
+ <div class="ratingWrapper">
13
+ <div class="ratingInner" style="width:<?php echo ($getNote*20)."%" ?>;"></div>
14
+ </div>
15
+ <?php if($countReviews == 1): ?>
16
+ <b><?php echo $this->__('%d Review', $countReviews) ?></b>
17
+ <?php else: ?>
18
+ <b><?php echo $this->__('%d Reviews', $countReviews) ?></b>
19
+ <?php endif; ?>
20
+ </div>
21
+ <div id="bottom">
22
+ <a href="<?php echo $this->getReviewsUrl() ?>" id="AV_button"><?php echo $this->__('See the review(s)')?></a>
23
+ </div>
24
+ <img id="sceau" src="<?php echo $this->getSkinUrl('images/avisverifies/Sceau_100'.Mage::app()->getLocale()->getLocaleCode().'.png') ?>" />
25
+ </div>
26
+ <?php endif; ?>
27
+ <?php else: // Magento Display ?>
28
+ <?php if ($this->getReviewsCount()): ?>
29
+ <div class="ratings">
30
+ <?php if ($this->getRatingSummary()):?>
31
+ <div class="rating-box">
32
+ <div class="rating" style="width:<?php echo $this->getRatingSummary()."%" ?>;"></div>
33
+ </div>
34
+ <?php endif;?>
35
+ <span class="amount">
36
+ <a href="#" onclick="var t = opener ? opener.window : window; t.location.href='<?php echo $this->getReviewsUrl() ?>'; return false;">
37
+ <?php echo $this->__('%d Review(s)', $this->getReviewsCount()) ?>
38
+ </a>
39
+ </span>
40
+ </div>
41
+ <?php elseif ($this->getDisplayIfEmpty()): ?>
42
+ <p class="no-rating">
43
+ <a href="<?php echo $this->getReviewsUrl() ?>#review-form">
44
+ <?php echo $this->__('Be the first to review this product') ?>
45
+ </a>
46
+ </p>
47
+ <?php endif; ?>
48
+ <?php endif; ?>
app/design/frontend/default/default/template/avisverifies/review/helper/summary_short.phtml ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php /* changement de mécanique si extension activée au niveau des produits on masque les avis natif Magento */ ?>
2
+ <?php if(Netreviews_Avisverifies_Helper_Data::isActive()): // Our Display. ?>
3
+ <?php $o_av = Mage::getModel('avisverifies/reviews'); ?>
4
+ <?php $o_av->idProduct = $this->getProductId(); ?>
5
+ <?php $statsProduct = $o_av->getStatsProduct(); ?>
6
+ <?php $countReviews = $statsProduct->getData('nb_reviews'); ?>
7
+ <?php $getNote = $o_av->formatNote($statsProduct->getData('rate')); ?>
8
+ <?php if($countReviews>0): ?>
9
+ <div class="ratings">
10
+ <div class="rating-box">
11
+ <div class="rating" style="width:<?php echo ($getNote*20)."%" ?>"></div>
12
+ </div>
13
+ <p class="rating-link">
14
+ <a id="AV_button" href="<?php echo $this->getReviewsUrl() ?>">
15
+ <?php if($countReviews == 1): ?>
16
+ <?php echo $this->__('%d Review', $countReviews) ?>
17
+ <?php else: ?>
18
+ <?php echo $this->__('%d Reviews', $countReviews) ?>
19
+ <?php endif; ?>
20
+ </a>
21
+ </p>
22
+ </div>
23
+ <?php endif; ?>
24
+ <?php else: // Magento Display ?>
25
+ <?php if($this->getReviewsCount()): ?>
26
+ <div class="ratings">
27
+ <?php if ($this->getRatingSummary()):?>
28
+ <div class="rating-box">
29
+ <div class="rating" style="width:<?php echo $this->getRatingSummary()."%" ?>"></div>
30
+ </div>
31
+ <?php endif;?>
32
+ <p class="rating-links">
33
+ <a href="<?php echo $this->getReviewsUrl() ?>">
34
+ <?php echo $this->__('%d Review(s)', $this->getReviewsCount()) ?>
35
+ </a>
36
+ <span class="separator">|</span>
37
+ <a href="<?php echo $this->getReviewsUrl() ?>#review-form"
38
+ ><?php echo $this->__('Add Your Review') ?>
39
+ </a>
40
+ </p>
41
+ </div>
42
+ <?php elseif($this->getDisplayIfEmpty()): ?>
43
+ <p class="no-rating">
44
+ <a href="<?php echo $this->getReviewsUrl() ?>#review-form">
45
+ <?php echo $this->__('Be the first to review this product') ?>
46
+ </a>
47
+ </p>
48
+ <?php endif; ?>
49
+ <?php endif; ?>
app/design/frontend/default/default/template/avisverifies/right.phtml ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php // Important: this block is called on the right block area. ?>
2
+ <?php $SCRIPTFIXE_ALLOWED = (Mage::getStoreConfig(strtolower('avisverifies/system/SCRIPTFIXE_ALLOWED'))=='yes') ?>
3
+ <?php $SCRIPTFIXE_POSITION = (Mage::getStoreConfig(strtolower('avisverifies/system/SCRIPTFIXE_POSITION')) == "right") ?>
4
+ <?php if($SCRIPTFIXE_ALLOWED && $SCRIPTFIXE_POSITION): ?>
5
+ <div style="margin: auto;">
6
+ <?php echo Mage::getStoreConfig(strtolower('avisverifies/system/SCRIPTFIXE')) ?>
7
+ </div>
8
+ <?php endif;?>
9
+
10
+ <?php //echo "<script> console.log('AV: right -> block: right');</script>"; ?>
app/design/frontend/default/default/template/avisverifies/wrapper.phtml ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <?php // Important: this block call the rest of blocks. ?>
2
+
3
+ <div class="reviews-wrapper">
4
+ <div class="reviews-container">
5
+ <?php echo $this->getChildHtml(); // get all children ?>
6
+ </div>
7
+ </div>
app/etc/modules/Netreviews_Avisverifies.xml ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Netreviews_Avisverifies>
5
+ <active>true</active>
6
+ <codePool>local</codePool>
7
+ <depends>
8
+ <Mage_Catalog />
9
+ </depends>
10
+ </Netreviews_Avisverifies>
11
+ </modules>
12
+ </config>
app/locale/de_DE/avisverifies.csv ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "Export Settings","Export Settings"
2
+ "Choose the website to export these orders","Wählen Sie die Website aus, von der Sie die Bestellungen exportieren wollen"
3
+ "Run Export CSV","CSV Export starten"
4
+ "Yes","Ja"
5
+ "No","Nein"
6
+ "Until","Bestellungen seit"
7
+ "1 week","1 Woche"
8
+ "2 weeks","2 Wochen"
9
+ "1 month","1 Monat"
10
+ "2 months","2 Monate"
11
+ "3 months","3 Monate"
12
+ "4 months","4 Monate"
13
+ "5 months","5 Monate"
14
+ "6 months","6 Monate"
15
+ "7 months","7 Monate"
16
+ "8 months","8 Monate"
17
+ "9 months","9 Monate"
18
+ "10 months","10 Monate"
19
+ "11 months","11 Monate"
20
+ "12 months","12 Monate"
21
+ "Request product\'s review?","Produktbewertungen abfragen ?"
22
+ "Verified Reviews Tabs","Echte Bewertungen Tabs"
23
+ "Export","Export"
24
+ "Verified Reviews Form","Echte Bewertungen Formular"
25
+ "version","Version"
26
+ "Form","Form"
27
+ "VerifiedReviews","Echte Bewertungen"
28
+ "Management","Management"
29
+ "Configuration","Konfiguration"
30
+ "Check Installation","Check Installation"
31
+ "You must set the configuration VerifiedReviews according to a website module. Select from the list on the left, the website that you want to set","Sie müssen die Konfiguration des Moduls Echte Bewertungen gemäß der Website vornehmen. Wählen Sie aus der Liste links die Website aus, welche Sie konfigurieren möchten"
32
+ "System integration","Systemintegration"
33
+ "Enable Module on this Website","Das Modul für diese Website aktivieren"
34
+ "By activating the module, you will reap your reviews sites. To harvest the products reviews, go to the last part of the configuration","Mit der Aktivierung können Sie bereits Shopbewertungen einholen. Um auch Produktbewertungen zu sammeln, gehen Sie bitte ans Ende der Konfiguration"
35
+ "IdWebsite","IdWebsite"
36
+ "Secret Key","Secret Key"
37
+ "Table Name","Table Name"
38
+ "Status","Status"
39
+ "Product Reviews","Produktbewertungen"
40
+ "Number of reviews","Anzahl der Bewertungen"
41
+ "Average rating","Durchschnittsnote"
42
+ "View the trust certificate","Vertrauenszertifikat anzeigen"
43
+ "More Reviews...","Weitere Kommentare..."
44
+ "No reviews for this product.","Keine Bewertungen für dieses Produkt"
45
+ "the","am"
46
+ "d/m/Y","d/m/Y"
47
+ "Comments of","Kommentar von"
48
+ "Webmaster","Webmaster"
49
+ "Moderator","Moderator"
50
+ "on","zu"
51
+ "Show conversation","Austausch mit dem Kunden anzeigen"
52
+ "Hide conversation","Austausch mit dem Kunden verbergen"
53
+ "%d Review(s)","%d Bewertungen"
54
+ "%d Review","%d Bewertung"
55
+ "%d Reviews","%d Bewertung(en)"
56
+ "See the review(s)","Bewertungen ansehen"
app/locale/en_GB/avisverifies.csv ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "Export Settings","Export Settings"
2
+ "Choose the website to export these orders","Choose the website to export these orders"
3
+ "Run Export CSV","Run Export CSV"
4
+ "Yes","Yes"
5
+ "No","No"
6
+ "Until","Until"
7
+ "1 week","1 week"
8
+ "2 weeks","2 weeks"
9
+ "1 month","1 month"
10
+ "2 months","2 months"
11
+ "3 months","3 months"
12
+ "4 months","4 months"
13
+ "5 months","5 months"
14
+ "6 months","6 months"
15
+ "7 months","7 months"
16
+ "8 months","8 months"
17
+ "9 months","9 months"
18
+ "10 months","10 months"
19
+ "11 months","11 months"
20
+ "12 months","12 months"
21
+ "Request product\'s review?","Request product\'s review?"
22
+ "Yes","Yes"
23
+ "No","No"
24
+ "Verified Reviews Tabs","Verified Reviews Tabs"
25
+ "Export","Export"
26
+ "Export","Export"
27
+ "Verified Reviews Form","Verified Reviews Form"
28
+ "version","version"
29
+ "Form","Form"
30
+ "VerifiedReviews","VerifiedReviews"
31
+ "Management","Management"
32
+ "Configuration","Configuration"
33
+ "Check Installation","Check Installation"
34
+ "You must set the configuration VerifiedReviews according to a website module. Select from the list on the left, the website that you want to set","You must set the configuration VerifiedReviews according to a website module. Select from the list on the left, the website that you want to set"
35
+ "System integration","System integration"
36
+ "Enable Module on this Website","Enable Module on this Website"
37
+ "By activating the module, you will reap your reviews sites. To harvest the products reviews, go to the last part of the configuration","By activating the module, you will reap your reviews sites. To harvest the products reviews, go to the last part of the configuration"
38
+ "IdWebsite","IdWebsite"
39
+ "Secret Key","Secret Key"
40
+ "Table Name","Table Name"
41
+ "Status","Status"
42
+ "Product Reviews","Product Reviews"
43
+ "Number of reviews","Number of reviews"
44
+ "Average rating","Average rating"
45
+ "View the trust certificate","View the trust certificate"
46
+ "More Reviews...","More Reviews..."
47
+ "No reviews for this product.","No reviews for this product."
48
+ "the","the"
49
+ "d/m/Y","d/m/Y"
50
+ "Comments of","Comments of"
51
+ "Webmaster","Webmaster"
52
+ "Moderator","Moderator"
53
+ "on","on"
54
+ "Show conversation","Show conversation"
55
+ "Hide conversation","Hide conversation"
56
+ "%d Review(s)","%d Review(s)"
57
+ "%d Review","%d Review"
58
+ "%d Reviews","%d Reviews"
59
+ "See the review(s)","See the review(s)"
app/locale/en_US/avisverifies.csv ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "Export Settings","Export Settings"
2
+ "Choose the website to export these orders","Choose the website to export these orders"
3
+ "Run Export CSV","Run Export CSV"
4
+ "Yes","Yes"
5
+ "No","No"
6
+ "Until","Until"
7
+ "1 week","1 week"
8
+ "2 weeks","2 weeks"
9
+ "1 month","1 month"
10
+ "2 months","2 months"
11
+ "3 months","3 months"
12
+ "4 months","4 months"
13
+ "5 months","5 months"
14
+ "6 months","6 months"
15
+ "7 months","7 months"
16
+ "8 months","8 months"
17
+ "9 months","9 months"
18
+ "10 months","10 months"
19
+ "11 months","11 months"
20
+ "12 months","12 months"
21
+ "Request product\'s review?","Request product\'s review?"
22
+ "Verified Reviews Tabs","Verified Reviews Tabs"
23
+ "Export","Export"
24
+ "Verified Reviews Form","Verified Reviews Form"
25
+ "version","version"
26
+ "Form","Form"
27
+ "VerifiedReviews","VerifiedReviews"
28
+ "Management","Management"
29
+ "Configuration","Configuration"
30
+ "Check Installation","Check Installation"
31
+ "You must set the configuration VerifiedReviews according to a website module. Select from the list on the left, the website that you want to set","You must set the configuration VerifiedReviews according to a website module. Select from the list on the left, the website that you want to set"
32
+ "System integration","System integration"
33
+ "Enable Module on this Website","Enable Module on this Website"
34
+ "By activating the module, you will reap your reviews sites. To harvest the products reviews, go to the last part of the configuration","By activating the module, you will reap your reviews sites. To harvest the products reviews, go to the last part of the configuration"
35
+ "IdWebsite","IdWebsite"
36
+ "Secret Key","Secret Key"
37
+ "Table Name","Table Name"
38
+ "Status","Status"
39
+ "Number of reviews","Number of reviews"
40
+ "Average rating","Average rating"
41
+ "View the trust certificate","View the trust certificate"
42
+ "More Reviews...","More Reviews..."
43
+ "Product Reviews","Product Reviews"
44
+ "No reviews for this product.","No reviews for this product."
45
+ "the","the"
46
+ "d/m/Y","d/m/Y"
47
+ "Comments of","Comments of"
48
+ "Webmaster","Webmaster"
49
+ "Moderator","Moderator"
50
+ "on","on"
51
+ "Show conversation","Show conversation"
52
+ "Hide conversation","Hide conversation"
53
+ "%d Review(s)","%d Review(s)"
54
+ "%d Review","%d Review"
55
+ "%d Reviews","%d Reviews"
56
+ "See the review(s)","See the review(s)"
app/locale/es_ES/avisverifies.csv ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "Export Settings","Configuración de exportación"
2
+ "Choose the website to export these orders","Elige el sitio web para exportar los pedidos"
3
+ "Run Export CSV","Exportar CSV"
4
+ "Yes", "Sí"
5
+ "No", "No"
6
+ "Until","Pedidos desde"
7
+ "1 week", "1 semana"
8
+ "2 weeks", "2 semanas"
9
+ "1 month", "1 mes"
10
+ "2 months", "2 meses"
11
+ "3 months", "3 meses"
12
+ "4 months", "4 meses"
13
+ "5 months", "5 meses"
14
+ "6 months", "6 meses"
15
+ "7 months", "7 meses"
16
+ "8 months", "8 meses"
17
+ "9 months", "9 meses"
18
+ "10 months", "10 meses"
19
+ "11 months", "11 meses"
20
+ "12 months", "12 meses"
21
+ "Request product\'s review?","¿Quieres solicitar la opinion de los productos?"
22
+ "Verified Reviews Tabs","Pestaña Opiniones Verificadas"
23
+ "Export","Exportar"
24
+ "Verified Reviews Form","Formulario Opiniones Verificadas"
25
+ "version","version"
26
+ "Form","Formulario"
27
+ "VerifiedReviews","Opiniones-Verificadas"
28
+ "Management","Gestión"
29
+ "Configuration","Configuración"
30
+ "Check Installation","Verificar instalación"
31
+ "You must set the configuration VerifiedReviews according to a website module. Select from the list on the left, the website that you want to set","Al activar el módulo, comenzarás a recuperar las opiniones para este sitio. Para recuperar las opiniones de los productos continua con la configuración"
32
+ "System integration","Integración del sistema"
33
+ "Enable Module on this Website","Habilitar el módulo en el sitio web."
34
+ "By activating the module, you will reap your reviews sites. To harvest the products reviews, go to the last part of the configuration","Al activar el módulo, comenzarás a recuperar las opiniones para este sitio. Para recuperar las opiniones de los productos continua con la configuración"
35
+ "IdWebsite","Id de la web"
36
+ "Secret Key","Clave secreta"
37
+ "Table Name","Nombre de la tabla"
38
+ "Status","Estatuto"
39
+ "Number of reviews","Núm. de opiniones"
40
+ "Average rating","Valor medio"
41
+ "View the trust certificate","Ver el certificado"
42
+ "More Reviews...","Más comentarios..."
43
+ "Product Reviews","Valoración de los productos"
44
+ "No reviews for this product.","No hay ninguna opinión para este producto."
45
+ "the","el"
46
+ "d/m/Y","d/m/A"
47
+ "Comments of","Opinión de"
48
+ "Webmaster","Webmaster"
49
+ "Moderator","Moderador"
50
+ "on","en"
51
+ "Show conversation","Ver las conversaciones"
52
+ "Hide conversation","Ocultar las conversaciones"
53
+ "%d Review(s)","%d Opiniones"
54
+ "%d Review","%d Opiniones"
55
+ "%d Reviews","%d Opiniones"
56
+ "See the review(s)","Ver las Opiniones"
app/locale/fr_FR/avisverifies.csv ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "Export Settings","Export"
2
+ "Choose the website to export these orders","Choisissez le website dont vous voulez exporter les commandes"
3
+ "Run Export CSV","Lancer l'export"
4
+ "Yes", "Oui"
5
+ "No", "Non"
6
+ "Until","Commandes depuis"
7
+ "1 week", "1 semaine"
8
+ "2 weeks", "2 semaines"
9
+ "1 month", "1 mois"
10
+ "2 months", "2 mois"
11
+ "3 months", "3 mois"
12
+ "4 months", "4 mois"
13
+ "5 months", "5 mois"
14
+ "6 months", "6 mois"
15
+ "7 months", "7 mois"
16
+ "8 months", "8 mois"
17
+ "9 months", "9 mois"
18
+ "10 months", "10 mois"
19
+ "11 months", "11 mois"
20
+ "12 months", "12 mois"
21
+ "Request product\'s review?","Récolter des avis sur les produit ?"
22
+ "Verified Reviews Tabs","Avis Vérifiés"
23
+ "Export","Export"
24
+ "Verified Reviews Form","Configuration Avis Vérifiés"
25
+ "version","version"
26
+ "Form","Form"
27
+ "VerifiedReviews","AvisVérifiés"
28
+ "Management","Management"
29
+ "Configuration","Configuration"
30
+ "Check Installation","Vérifier Installation"
31
+ "You must set the configuration VerifiedReviews according to a website module. Select from the list on the left, the website that you want to set","Vous devez régler la configuration du module AvisVérifiés en fonction d'un website. Sélectionnez dans la liste déroulante à gauche, le website que vous souhaitez paramétrer"
32
+ "System integration","Intégration système"
33
+ "Enable Module on this Website", "Activer le module pour ce website"
34
+ "By activating the module, you will reap your reviews sites. To harvest the products reviews, go to the last part of the configuration","En activant le module, vous récolterez vos Avis Sites. Pour récolter les Avis Produits, rendez-vous dans la dernière partie de la configuration"
35
+ "IdWebsite","IdWebsite"
36
+ "Secret Key","Clé secrète"
37
+ "Table Name","Table Name"
38
+ "Status","Status"
39
+ "Table Orders Fields","Table Orders Fields"
40
+ "Table Fields Count","Table Fields Count"
41
+ "Check orders Table","Check orders Table"
42
+ "Number of reviews","Nombre d'avis"
43
+ "Average rating","Note moyenne"
44
+ "View the trust certificate","Afficher le certificat de confiance"
45
+ "More Reviews...","Plus de commentaires..."
46
+ "Product Reviews","Evaluations produits"
47
+ "No reviews for this product.","Aucun avis n'a encore été laissé sur ce produit."
48
+ "the","le"
49
+ "d/m/Y","d/m/Y"
50
+ "Comments of","Commentaire de"
51
+ "Webmaster","Webmaster"
52
+ "Moderator","Modérateurr"
53
+ "on","le"
54
+ "Show conversation","Afficher les échanges"
55
+ "Hide conversation","Masquer les échanges"
56
+ "%d Review(s)","%d Avis"
57
+ "%d Review","%d Avis"
58
+ "%d Reviews","%d Avis"
59
+ "See the review(s)","Voir les avis"
app/locale/it_IT/avisverifies.csv ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "Choose the website to export these orders,","Scegli il sito dal quale vuoi esportare gli ordini"
2
+ "Run Export CSV","Lanciare l'esportazione"
3
+ "Yes","Si"
4
+ "No","No"
5
+ "Until","Ordini da"
6
+ "1 week","1 settimana"
7
+ "2 weeks","2 settimane"
8
+ "1 month","1 mese"
9
+ "2 months","2 mesi"
10
+ "3 months","3 mesi"
11
+ "4 months","4 mesi"
12
+ "5 months","5 mesi"
13
+ "6 months","6 mesi"
14
+ "7 months","7 mesi"
15
+ "8 months","8 mesi"
16
+ "9 months","9 mesi"
17
+ "10 months","10 mesi"
18
+ "11 months","11 mesi"
19
+ "12 months","12 mesi"
20
+ "Request product\'s review?"," Raccogliere le recensioni sui prodotti?"
21
+ "Verified Reviews Tabs","Recensioni Verificate Tabs"
22
+ "Export","Esportazione"
23
+ "Verified Reviews Form","Form Recensioni Verificate"
24
+ "version","versione"
25
+ "Form","Form"
26
+ "VerifiedReviews","Recensioni Verificate"
27
+ "Management","Management"
28
+ "Configuration","Configurazione"
29
+ "Check Installation","Verificare Installazione"
30
+ "You must set the configuration VerifiedReviews according to a website module. Select from the list on the left, the website that you want to set","Bisogna parametrare la configurazione del modulo RecensioniVerificate in funzione del sito. Seleziona dal menu a tendina a sinistra, il sito che desideri parametrare"
31
+ "System integration","Sistema di integrazione"
32
+ "Enable Module on this Website","Attiva il modulo per questo sito"
33
+ "By activating the module, you will reap your reviews sites. To harvest the products reviews, go to the last part of the configuration","Attivando il modulo raccoglierai le tue Recensioni Sito. Per raccogliere le Recensioni Prodotti, vai sull'ultima parte della configurazione"
34
+ "IdWebsite","IdWebsite"
35
+ "Secret Key","Codice segreto"
36
+ "Table Name","Table Name"
37
+ "Status","Status"
38
+ "Table Orders Fields","Table Orders Fields"
39
+ "Table Fields Count","Table Fields Count"
40
+ "Check orders Table","Check orders Table"
41
+ "Number of reviews","Numero di recensioni"
42
+ "Average rating","Voto medio"
43
+ "View the trust certificate","Visualizza il certificato di fiducia"
44
+ "More Reviews...","Più commenti..."
45
+ "Product Reviews","Valutazione prodotti"
46
+ "No reviews for this product.","Su questo prodotto non è ancora stata lasciata alcuna recensione."
47
+ "the","il"
48
+ "d/m/Y","d/m/Y"
49
+ "Comments of",,"Commento di "
50
+ "Webmaster","Webmaster"
51
+ "Moderator","Moderatore"
52
+ "on","il"
53
+ "Show conversation","Visualizza conversazione"
54
+ "Hide conversation","Nascondi conversazione"
55
+ "%d Review(s)","%d Recensioni"
56
+ "%d Review","%d Recensione"
57
+ "%d Reviews","%d Recensioni"
58
+ "See the review(s)","Vedi le recensioni"
app/locale/nl_NL/avisverifies.csv ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "Export Settings","Export"
2
+ "Choose the website to export these orders","Choisissez le website dont vous voulez exporter les commandes"
3
+ "Run Export CSV","Lancer l'export"
4
+ "Yes", "Oui"
5
+ "No", "Non"
6
+ "Until","Commandes depuis"
7
+ "1 week", "1 semaine"
8
+ "2 weeks", "2 semaines"
9
+ "1 month", "1 mois"
10
+ "2 months", "2 mois"
11
+ "3 months", "3 mois"
12
+ "4 months", "4 mois"
13
+ "5 months", "5 mois"
14
+ "6 months", "6 mois"
15
+ "7 months", "7 mois"
16
+ "8 months", "8 mois"
17
+ "9 months", "9 mois"
18
+ "10 months", "10 mois"
19
+ "11 months", "11 mois"
20
+ "12 months", "12 mois"
21
+ "Request product\'s review?","Récolter des avis sur les produit ?"
22
+ "Verified Reviews Tabs","Avis Vérifiés"
23
+ "Export","Export"
24
+ "Verified Reviews Form","Configuration Avis Vérifiés"
25
+ "version","version"
26
+ "Form","Form"
27
+ "VerifiedReviews","AvisVérifiés"
28
+ "Management","Management"
29
+ "Configuration","Configuration"
30
+ "Check Installation","Vérifier Installation"
31
+ "You must set the configuration VerifiedReviews according to a website module. Select from the list on the left, the website that you want to set","Vous devez régler la configuration du module AvisVérifiés en fonction d'un website. Sélectionnez dans la liste déroulante à gauche, le website que vous souhaitez paramétrer"
32
+ "System integration","Intégration système"
33
+ "Enable Module on this Website", "Activer le module pour ce website"
34
+ "By activating the module, you will reap your reviews sites. To harvest the products reviews, go to the last part of the configuration","En activant le module, vous récolterez vos Avis Sites. Pour récolter les Avis Produits, rendez-vous dans la dernière partie de la configuration"
35
+ "IdWebsite","IdWebsite"
36
+ "Secret Key","Clé secrète"
37
+ "Table Name","Table Name"
38
+ "Status","Status"
39
+ "Table Orders Fields","Table Orders Fields"
40
+ "Table Fields Count","Table Fields Count"
41
+ "Check orders Table","Check orders Table"
42
+ "Number of reviews","Nombre d'avis"
43
+ "Average rating","Note moyenne"
44
+ "View the trust certificate","Afficher le certificat de confiance"
45
+ "More Reviews...","Plus de commentaires..."
46
+ "Product Reviews","Evaluations produits"
47
+ "No reviews for this product.","Aucun avis n'a encore été laissé sur ce produit."
48
+ "the","le"
49
+ "d/m/Y","d/m/Y"
50
+ "Comments of","Commentaire de"
51
+ "Webmaster","Webmaster"
52
+ "Moderator","Modérateurr"
53
+ "on","le"
54
+ "Show conversation","Afficher les échanges"
55
+ "Hide conversation","Masquer les échanges"
56
+ "%d Review(s)","%d Avis"
57
+ "%d Review","%d Avis"
58
+ "%d Reviews","%d Avis"
59
+ "See the review(s)","Voir les avis"
app/locale/pt_PT/avisverifies.csv ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "Export Settings,"Export Settings"
2
+ "Choose the website to export these orders,"Selecione o website a serem exportados os pedidos "
3
+ "Run Export CSV,"lançar exportação em CSV"
4
+ "Yes,"Sim"
5
+ "No,"Não"
6
+ "Until,"até"
7
+ "1 week,"1 semana"
8
+ "2 weeks,"2 semanas"
9
+ "1 month,"1 mês"
10
+ "2 months,"2 meses"
11
+ "3 months,"3 meses"
12
+ "4 months,"4 meses"
13
+ "5 months,"5 meses"
14
+ "6 months,"6 meses"
15
+ "7 months,"7 meses"
16
+ "8 months,"8 meses"
17
+ "9 months,"9 meses"
18
+ "10 months,"10 meses"
19
+ "11 months,"11 meses"
20
+ "12 months,"12 meses"
21
+ "Request product\'s review?,"Pedido opinião produto\'s ?"
22
+ "Verified Reviews Tabs,"Opiniões Verificadas Tabela"
23
+ "Export,"Export"
24
+ "Verified Reviews Form,"Opiniões Verificadas Forma"
25
+ "version,"versão"
26
+ "Form,"Forma"
27
+ "VerifiedReviews,"OpiniõesVerificadas"
28
+ "Management,"Management"
29
+ "Configuration,"Configuração"
30
+ "Check Installation,"Verifique Instalação"
31
+ "You must set the configuration VerifiedReviews according to a website module. Select from the list on the left, the website that you want to set,"Você deve definir a configuração Opiniões Verificadas de acordo com módulo do website. Selecione na lista à esquerda o site que deseja configurar"
32
+ "System integration,"Sistema de integração"
33
+ "Enable Module on this Website,"Ativa módulo nesse Website"
34
+ "By activating the module, you will reap your reviews sites. To harvest the products reviews, go to the last part of the configuration,"Ao ativar o módulo , você ira coletar as opiniões referentes ao site. Para obter as opiniões dos produtos, va¡ até a última parte da configuração"
35
+ "IdWebsite,"IdWebsite"
36
+ "Secret Key,"Chave Secreta"
37
+ "Status,"Status"
38
+ "Number of reviews,"Número de opiniões"
39
+ "Average rating,"Média das notas"
40
+ "View the trust certificate,"Exibir o selo de confiança"
41
+ "More Reviews...,"Mais opiniões..."
42
+ "Product Reviews,"Opiniões dos produtos"
43
+ "No reviews for this product.,"Não há opiniões para este produto."
44
+ "the,"O"
45
+ "d/m/Y,"d/m/a"
46
+ "Comments of,"Comentários de"
47
+ "Webmaster,"Webmaster"
48
+ "Moderator,"Mediador"
49
+ "on,"em"
50
+ "Show conversation,"Exibir a conversa"
51
+ "Hide conversation,"Não exibir a conversa"
52
+ "%d Review(s),"%d Opinião(ões)"
53
+ "%d Review,"%d Opinião"
54
+ "%d Reviews,"%d Opiniões"
55
+ "See the review(s),"Vere a(s) opinião(ões)"
package.xml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>AvisVerifies</name>
4
+ <version>2.5.9.6</version>
5
+ <stability>stable</stability>
6
+ <license uri="http://www.opensource.org/licenses/osl-3.0.php">OSLv3.0</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>Avis Verifies vous permet de recolter l'avis des clients sur votre site ecommerce.</summary>
10
+ <description>Avis Verifies vous permet de recolter l'avis de vos clients suite &#xE0; leur achat sur votre boutique ecommerce. Essayez gratuitement notre solution sur www.avis-verifies.com et commencez maintenant &#xE0; r&#xE9;colter les avis de vos clients.</description>
11
+ <notes>La version 2.5.9.6 est stable.</notes>
12
+ <authors><author><name>Johnny</name><user>auto-converted</user><email>johnny@verified-reviews.com</email></author><author><name>R&#xE9;mi</name><user>auto-converted</user><email>remi@avis-verifies.com</email></author></authors>
13
+ <date>2014-07-28</date>
14
+ <time>08:23:16</time>
15
+ <contents><target name="magelocal"><dir name="Netreviews"><dir name="Avisverifies"><dir name="Block"><dir name="Adminhtml"><dir name="Form"><dir name="Edit"><dir name="Tab"><file name="Export.php" hash="32c9a862693dce96517321846b6189e4"/></dir><file name="Form.php" hash="2cfe44d42d906fe75d647176134d6080"/><file name="Tabs.php" hash="d7a91a2f7d89bc14e7dd9e71cb79edf0"/></dir><file name="Edit.php" hash="b7289e38f9abb03ee33f9e0f1dac4e37"/></dir></dir><dir name="Catalog"><dir name="Product"><file name="List.php" hash="ebf292466aab2800a81f1513214d9894"/><file name="View.php" hash="e4003164dce7a59b0998d7895c7f9263"/></dir></dir><dir name="Entity"><file name="Detailed.php" hash="9f685854b309482d402ce571683728fc"/></dir><dir name="Observers"><file name="Checkout.php" hash="b870528cc6680350c8b972fd52ec02c9"/></dir><dir name="Review"><dir name="Product"><file name="View.php" hash="cff5107547374a7f5fee1fda044a9891"/></dir><file name="Helper.php" hash="80d3283fd9a19c675628bcc8117d31e2"/></dir></dir><dir name="Helper"><file name="API.php" hash="e3d5ba79ef7a4f613d51c486e5fcf70d"/><file name="Data.php" hash="7ebdce52eb71da19630a5c79feaaf902"/><file name="Export.php" hash="aff469ac545f7fd4bf701b4132d236df"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Average"><file name="Collection.php" hash="4255bd6ef8fdd2b7c6ee0632962286ed"/></dir><dir name="Reviews"><file name="Collection.php" hash="4187377e5fca20a959bfeceec88713ff"/></dir><file name="Average.php" hash="008a4558e9991d5ea04601c98a836480"/><file name="Reviews.php" hash="e6fccb35502c0acf635aab593d2a0beb"/></dir><dir name="Observers"><dir name="Checkout"><file name="Track.php" hash="9ef1537ad83507e55c8e47611d22c1d2"/></dir></dir><file name="Average.php" hash="9ae1d65bb0fb3515da0d903bec66abb2"/><file name="Avisverifies.php" hash="8c9fc21252411493eb6afdfb41aec0fc"/><file name="Product.php" hash="39e7d522d7aa08be30a668d9e94f3313"/><file name="Reviews.php" hash="6d26b50d6f43329b048cd57ad0c2613f"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="AvisverifiesController.php" hash="b456b2485be10a4072a649afe152ffba"/></dir><file name="DialogController.php" hash="7d875361cbf16dc6e6c601319158f216"/><file name="IndexController.php" hash="5ee24eedfbb7aea97e96311ce7f7db99"/></dir><dir name="etc"><file name="config.xml" hash="2c8427862aa97d6aa7a6c4b6ac50b5c2"/><file name="system.xml" hash="19ad756e24052d03f7b35de13d5a38a8"/></dir><dir name="sql"><dir name="avisverifies_setup"><file name="mysql4-install-2.0.0.php" hash="7afc502c5823aea334031265abd71f1e"/><file name="mysql4-upgrade-2.0.0-2.5.8.php" hash="68e255eead47f891e864850fc4d93075"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Netreviews_Avisverifies.xml" hash="2369bd341056eb0304a546e27ad07306"/></dir></target><target name="magelocale"><dir name="de_DE"><file name="avisverifies.csv" hash="37402797f28e69c5f25000ce09074f55"/></dir><dir name="en_US"><file name="avisverifies.csv" hash="4f941b21dec2282c6caed9c59e8c8a12"/></dir><dir name="es_ES"><file name="avisverifies.csv" hash="4efff3ee9d885ed7eb4e9144015e1217"/></dir><dir name="fr_FR"><file name="avisverifies.csv" hash="53b96dda5d24de710e091406be481be4"/></dir><dir name="nl_NL"><file name="avisverifies.csv" hash="53b96dda5d24de710e091406be481be4"/></dir><dir name="pt_PT"><file name="avisverifies.csv" hash="9163ca25902ec36ffa458cd7fd616063"/></dir><dir name="en_GB"><file name="avisverifies.csv" hash="c624e356f31a47e6fae3551d3741ad09"/></dir><dir name="it_IT"><file name="avisverifies.csv" hash="895920aabb6a63638bc8fb4d2bf1c506"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="avisverifies.xml" hash="82e76d622828a1afa18129d289f29a13"/></dir><dir name="template"><dir name="avisverifies"><dir name="admin"><file name="checkinstallation.phtml" hash="8499fee910b828b8be20af2e71706848"/><file name="checkinstallation_tab.phtml" hash="c1c345d3b16dda650c8bd4b5102c98ce"/></dir><dir name="observers"><file name="checkout.phtml" hash="8828981443a80c6103589d3a5e70e3fa"/></dir><dir name="review"><dir name="helper"><file name="counter.phtml" hash="6d6fe512eb5dff81831d23683007a272"/><file name="summary.phtml" hash="a726bfbdb16ee5a21bfbc19f4374d33e"/><file name="summary_short.phtml" hash="3653e6c2cd9bfb13b8cf52df24d02c0a"/></dir></dir><file name="css.phtml" hash="d884ce5a880505cd8fee6e2466a0d13f"/><file name="float.phtml" hash="cb89835ae11a33e133cfbbed9f457f84"/><file name="js.phtml" hash="b7dfecacf0b4482cf287eb2533a71642"/><file name="left.phtml" hash="7fc73d43af41d23da96ee95c41276c08"/><file name="list.phtml" hash="44c6bd5a9d9172e41a4c725d173209e8"/><file name="pagination.phtml" hash="fb2922fd8e017ae087555ed322bcc339"/><file name="right.phtml" hash="04a02dc8d1a7d396893569079807811e"/><file name="wrapper.phtml" hash="b16a826c6049efdd5987d38919befba1"/></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="images"><dir name="avisverifies"><file name="Sceau_100de_DE.png" hash="3a5c40b284b71ff2b1cb45ee0f62c63c"/><file name="Sceau_100en_GB.png" hash="e5a18734067e9d34bd976a2644b3984b"/><file name="Sceau_100en_US.png" hash="e5a18734067e9d34bd976a2644b3984b"/><file name="Sceau_100es_ES.png" hash="d5a967c4601e5f40ef28749a6f7f9ec3"/><file name="Sceau_100fr_FR.png" hash="f2fc0adb70d9a1b3da6bb65d5b58fa30"/><file name="Sceau_100it_IT.png" hash="dd1e908d4d41e0438710b5138380eb37"/><file name="Sceau_100nl_NL.png" hash="502819066210a104b47aef3043424ce9"/><file name="Sceau_100pt_PT.png" hash="9befd03d5907892f981d256ea80d0b76"/><file name="Sceau_45de_DE.png" hash="5fc9fcfd445c20f50f48d549128c0134"/><file name="Sceau_45en_GB.png" hash="0f794c583717101c8706c6bfaeb00f12"/><file name="Sceau_45en_US.png" hash="0f794c583717101c8706c6bfaeb00f12"/><file name="Sceau_45es_ES.png" hash="eaf02ecb106202ec5213c7156e12b319"/><file name="Sceau_45fr_FR.png" hash="75301d9ecb9551bf805d3dbb8d60fc74"/><file name="Sceau_45it_IT.png" hash="606c02ded69315ce5dd6e5d65daf474f"/><file name="Sceau_45nl_NL.png" hash="eaf02ecb106202ec5213c7156e12b319"/><file name="Sceau_45pt_PT.png" hash="eaf02ecb106202ec5213c7156e12b319"/><file name="avisverifies.png" hash="1216d2675304fc40693d9645fcdf4d12"/><file name="etoile0.png" hash="bce56f50906713d9cc7602dc34cb73a5"/><file name="etoile1.png" hash="7446927468b81a1cae698578fa0dd566"/><file name="etoile2.png" hash="0a2e0bb274430ffd544a1112eb33eb0a"/><file name="etoile3.png" hash="65b18268445a8dfacb9848571916274d"/><file name="etoile4.png" hash="fffcb5ab211e6fc73e3f50731c683977"/><file name="etoile5.png" hash="0d22136a4ee0e714da50e8bc8daf1bed"/><file name="mini_etoile_empty.png" hash="4f3de020c07b2eb613517e26eedc4a32"/><file name="mini_etoile_full.png" hash="a9ed947e0e0b6de1b4522077443356f5"/><file name="pagination-loader.gif" hash="be1cede97289c13920048f238fd37b85"/></dir></dir></dir></dir></dir></target></contents>
16
+ <compatible/>
17
+ <dependencies/>
18
+ </package>
skin/frontend/default/default/images/avisverifies/Sceau_100de_DE.png ADDED
Binary file
skin/frontend/default/default/images/avisverifies/Sceau_100en_GB.png ADDED
Binary file
skin/frontend/default/default/images/avisverifies/Sceau_100en_US.png ADDED
Binary file
skin/frontend/default/default/images/avisverifies/Sceau_100es_ES.png ADDED
Binary file
skin/frontend/default/default/images/avisverifies/Sceau_100fr_FR.png ADDED
Binary file
skin/frontend/default/default/images/avisverifies/Sceau_100it_IT.png ADDED
Binary file
skin/frontend/default/default/images/avisverifies/Sceau_100nl_NL.png ADDED
Binary file
skin/frontend/default/default/images/avisverifies/Sceau_100pt_PT.png ADDED
Binary file
skin/frontend/default/default/images/avisverifies/Sceau_45de_DE.png ADDED
Binary file
skin/frontend/default/default/images/avisverifies/Sceau_45en_GB.png ADDED
Binary file
skin/frontend/default/default/images/avisverifies/Sceau_45en_US.png ADDED
Binary file
skin/frontend/default/default/images/avisverifies/Sceau_45es_ES.png ADDED
Binary file
skin/frontend/default/default/images/avisverifies/Sceau_45fr_FR.png ADDED
Binary file
skin/frontend/default/default/images/avisverifies/Sceau_45it_IT.png ADDED
Binary file
skin/frontend/default/default/images/avisverifies/Sceau_45nl_NL.png ADDED
Binary file
skin/frontend/default/default/images/avisverifies/Sceau_45pt_PT.png ADDED
Binary file
skin/frontend/default/default/images/avisverifies/avisverifies.png ADDED
Binary file
skin/frontend/default/default/images/avisverifies/etoile0.png ADDED
Binary file
skin/frontend/default/default/images/avisverifies/etoile1.png ADDED
Binary file
skin/frontend/default/default/images/avisverifies/etoile2.png ADDED
Binary file
skin/frontend/default/default/images/avisverifies/etoile3.png ADDED
Binary file
skin/frontend/default/default/images/avisverifies/etoile4.png ADDED
Binary file
skin/frontend/default/default/images/avisverifies/etoile5.png ADDED
Binary file
skin/frontend/default/default/images/avisverifies/mini_etoile_empty.png ADDED
Binary file
skin/frontend/default/default/images/avisverifies/mini_etoile_full.png ADDED
Binary file
skin/frontend/default/default/images/avisverifies/pagination-loader.gif ADDED
Binary file