Convertware_Adzones_Personalization - Version 0.1.0

Version Notes

Convertware offers the ability to create custom zones in your Magento site for advertising messaging. As you'll see in the details to come, designs will be utilized to place a dynamic banner advertising messages that conform and adapt to the users coming to decide.

Download this release

Release Info

Developer convertware
Extension Convertware_Adzones_Personalization
Version 0.1.0
Comparing to
See all releases


Version 0.1.0

Files changed (130) hide show
  1. app/code/local/Convertware/Adzones/Block/Adminhtml/Adzones.php +12 -0
  2. app/code/local/Convertware/Adzones/Block/Adminhtml/Adzones/Edit.php +44 -0
  3. app/code/local/Convertware/Adzones/Block/Adminhtml/Adzones/Edit/Form.php +19 -0
  4. app/code/local/Convertware/Adzones/Block/Adminhtml/Adzones/Edit/Tab/Ajax/Serializer.php +71 -0
  5. app/code/local/Convertware/Adzones/Block/Adminhtml/Adzones/Edit/Tab/Categories.php +302 -0
  6. app/code/local/Convertware/Adzones/Block/Adminhtml/Adzones/Edit/Tab/Category.php +294 -0
  7. app/code/local/Convertware/Adzones/Block/Adminhtml/Adzones/Edit/Tab/Cms.php +36 -0
  8. app/code/local/Convertware/Adzones/Block/Adminhtml/Adzones/Edit/Tab/Genral.php +81 -0
  9. app/code/local/Convertware/Adzones/Block/Adminhtml/Adzones/Edit/Tab/Image.php +32 -0
  10. app/code/local/Convertware/Adzones/Block/Adminhtml/Adzones/Edit/Tab/Products.php +228 -0
  11. app/code/local/Convertware/Adzones/Block/Adminhtml/Adzones/Edit/Tab/Schedule.php +64 -0
  12. app/code/local/Convertware/Adzones/Block/Adminhtml/Adzones/Edit/Tabs.php +56 -0
  13. app/code/local/Convertware/Adzones/Block/Adminhtml/Adzones/Grid.php +170 -0
  14. app/code/local/Convertware/Adzones/Block/Adminhtml/Adzones/Renderer/StoreId.php +13 -0
  15. app/code/local/Convertware/Adzones/Block/Adminhtml/Adzones/Renderer/TotalContent.php +11 -0
  16. app/code/local/Convertware/Adzones/Block/Adminhtml/Content.php +19 -0
  17. app/code/local/Convertware/Adzones/Block/Adminhtml/Content/Edit.php +67 -0
  18. app/code/local/Convertware/Adzones/Block/Adminhtml/Content/Edit/Form.php +19 -0
  19. app/code/local/Convertware/Adzones/Block/Adminhtml/Content/Edit/Tab/Form.php +63 -0
  20. app/code/local/Convertware/Adzones/Block/Adminhtml/Content/Edit/Tabs.php +24 -0
  21. app/code/local/Convertware/Adzones/Block/Adminhtml/Content/Grid.php +99 -0
  22. app/code/local/Convertware/Adzones/Block/Adminhtml/Content/Renderer/Content.php +12 -0
  23. app/code/local/Convertware/Adzones/Block/Adminhtml/Content/Renderer/Deleteurl.php +14 -0
  24. app/code/local/Convertware/Adzones/Block/Adminhtml/Content/Renderer/Editurl.php +13 -0
  25. app/code/local/Convertware/Adzones/Block/Adzones.php +133 -0
  26. app/code/local/Convertware/Adzones/Helper/Data.php +169 -0
  27. app/code/local/Convertware/Adzones/Model/Adzones.php +10 -0
  28. app/code/local/Convertware/Adzones/Model/AdzonesContent.php +10 -0
  29. app/code/local/Convertware/Adzones/Model/Api.php +50 -0
  30. app/code/local/Convertware/Adzones/Model/BlockPosition.php +33 -0
  31. app/code/local/Convertware/Adzones/Model/CustomerGroup.php +14 -0
  32. app/code/local/Convertware/Adzones/Model/Mode.php +13 -0
  33. app/code/local/Convertware/Adzones/Model/Mysql4/Adzones.php +10 -0
  34. app/code/local/Convertware/Adzones/Model/Mysql4/Adzones/Collection.php +36 -0
  35. app/code/local/Convertware/Adzones/Model/Mysql4/AdzonesContent.php +10 -0
  36. app/code/local/Convertware/Adzones/Model/Mysql4/AdzonesContent/Collection.php +10 -0
  37. app/code/local/Convertware/Adzones/Model/Mysql4/Api.php +10 -0
  38. app/code/local/Convertware/Adzones/Model/Mysql4/Api/Collection.php +10 -0
  39. app/code/local/Convertware/Adzones/Model/ShowPattern.php +25 -0
  40. app/code/local/Convertware/Adzones/Model/Status.php +15 -0
  41. app/code/local/Convertware/Adzones/controllers/Adminhtml/AdzonesController.php +239 -0
  42. app/code/local/Convertware/Adzones/controllers/Adminhtml/ContentController.php +67 -0
  43. app/code/local/Convertware/Adzones/etc/config.xml +136 -0
  44. app/code/local/Convertware/Adzones/etc/system.xml +56 -0
  45. app/code/local/Convertware/Adzones/sql/adzones_setup/mysql4-install-0.1.0.php +53 -0
  46. app/code/local/Convertware/Adzones/sql/adzones_setup/mysql4-upgrade-0.1.0-0.1.1.php +18 -0
  47. app/code/local/Convertware/Personalization/Block/Adminhtml/Personalization.php +12 -0
  48. app/code/local/Convertware/Personalization/Block/Adminhtml/Personalization/Edit.php +47 -0
  49. app/code/local/Convertware/Personalization/Block/Adminhtml/Personalization/Edit/Form.php +19 -0
  50. app/code/local/Convertware/Personalization/Block/Adminhtml/Personalization/Edit/Tab/Form.php +37 -0
  51. app/code/local/Convertware/Personalization/Block/Adminhtml/Personalization/Edit/Tabs.php +24 -0
  52. app/code/local/Convertware/Personalization/Block/Adminhtml/Personalization/Grid.php +114 -0
  53. app/code/local/Convertware/Personalization/Block/Adminhtml/Personalization/PersonalizationMain.php +49 -0
  54. app/code/local/Convertware/Personalization/Block/Adminhtml/Personalization/PersonalizationMain/Form.php +19 -0
  55. app/code/local/Convertware/Personalization/Block/Adminhtml/Personalization/PersonalizationMain/Renderer/Name.php +11 -0
  56. app/code/local/Convertware/Personalization/Block/Adminhtml/Personalization/PersonalizationMain/Renderer/Segmentation.php +12 -0
  57. app/code/local/Convertware/Personalization/Block/Adminhtml/Personalization/PersonalizationMain/Tab/Account.php +42 -0
  58. app/code/local/Convertware/Personalization/Block/Adminhtml/Personalization/PersonalizationMain/Tab/AdzonesGrid.php +136 -0
  59. app/code/local/Convertware/Personalization/Block/Adminhtml/Personalization/PersonalizationMain/Tab/CblockGrid.php +136 -0
  60. app/code/local/Convertware/Personalization/Block/Adminhtml/Personalization/PersonalizationMain/Tab/Compare.php +20 -0
  61. app/code/local/Convertware/Personalization/Block/Adminhtml/Personalization/PersonalizationMain/Tab/Dashboard.php +10 -0
  62. app/code/local/Convertware/Personalization/Block/Adminhtml/Personalization/PersonalizationMain/Tab/Domain.php +37 -0
  63. app/code/local/Convertware/Personalization/Block/Adminhtml/Personalization/PersonalizationMain/Tab/Overview.php +98 -0
  64. app/code/local/Convertware/Personalization/Block/Adminhtml/Personalization/PersonalizationMain/Tabs.php +56 -0
  65. app/code/local/Convertware/Personalization/Block/Adminhtml/Personalization/Traffic.php +62 -0
  66. app/code/local/Convertware/Personalization/Block/Personalization.php +17 -0
  67. app/code/local/Convertware/Personalization/Helper/Data.php +12 -0
  68. app/code/local/Convertware/Personalization/Helper/System.php +95 -0
  69. app/code/local/Convertware/Personalization/Model/Abtest.php +175 -0
  70. app/code/local/Convertware/Personalization/Model/AbtestStatus.php +16 -0
  71. app/code/local/Convertware/Personalization/Model/Criteria.php +20 -0
  72. app/code/local/Convertware/Personalization/Model/Mysql4/Abtest.php +10 -0
  73. app/code/local/Convertware/Personalization/Model/Mysql4/Abtest/Collection.php +10 -0
  74. app/code/local/Convertware/Personalization/Model/Mysql4/Overview.php +10 -0
  75. app/code/local/Convertware/Personalization/Model/Mysql4/Overview/Collection.php +10 -0
  76. app/code/local/Convertware/Personalization/Model/Mysql4/Personalization.php +10 -0
  77. app/code/local/Convertware/Personalization/Model/Mysql4/Personalization/Collection.php +22 -0
  78. app/code/local/Convertware/Personalization/Model/Mysql4/PersonalizationUrl.php +10 -0
  79. app/code/local/Convertware/Personalization/Model/Mysql4/PersonalizationUrl/Collection.php +10 -0
  80. app/code/local/Convertware/Personalization/Model/Mysql4/PersonalizationVisit.php +10 -0
  81. app/code/local/Convertware/Personalization/Model/Mysql4/PersonalizationVisit/Collection.php +10 -0
  82. app/code/local/Convertware/Personalization/Model/Mysql4/PersonalizationVisitor.php +10 -0
  83. app/code/local/Convertware/Personalization/Model/Mysql4/PersonalizationVisitor/Collection.php +10 -0
  84. app/code/local/Convertware/Personalization/Model/Observer.php +261 -0
  85. app/code/local/Convertware/Personalization/Model/Overview.php +136 -0
  86. app/code/local/Convertware/Personalization/Model/Personalization.php +57 -0
  87. app/code/local/Convertware/Personalization/Model/PersonalizationUrl.php +11 -0
  88. app/code/local/Convertware/Personalization/Model/PersonalizationVisit.php +11 -0
  89. app/code/local/Convertware/Personalization/Model/PersonalizationVisitor.php +11 -0
  90. app/code/local/Convertware/Personalization/Model/Segmentation.php +37 -0
  91. app/code/local/Convertware/Personalization/Model/Status.php +15 -0
  92. app/code/local/Convertware/Personalization/controllers/Adminhtml/PersonalizationController.php +307 -0
  93. app/code/local/Convertware/Personalization/etc/config.xml +153 -0
  94. app/code/local/Convertware/Personalization/sql/personalization_setup/mysql4-install-0.1.0.php +70 -0
  95. app/code/local/Convertware/Personalization/sql/personalization_setup/mysql4-upgrade-0.1.0-0.1.1.php +11 -0
  96. app/code/local/Convertware/Personalization/sql/personalization_setup/mysql4-upgrade-0.1.1-0.1.2.php +37 -0
  97. app/code/local/Convertware/Personalization/sql/personalization_setup/mysql4-upgrade-0.1.2-0.1.3.php +13 -0
  98. app/code/local/Convertware/Personalization/sql/personalization_setup/mysql4-upgrade-0.1.3-0.1.4.php +19 -0
  99. app/design/adminhtml/default/default/layout/adzones.xml +91 -0
  100. app/design/adminhtml/default/default/layout/personalization.xml +41 -0
  101. app/design/adminhtml/default/default/template/adzones/category/categories.phtml +168 -0
  102. app/design/adminhtml/default/default/template/adzones/condition/fieldset.phtml +45 -0
  103. app/design/adminhtml/default/default/template/adzones/page/edit/form/renderer/content.phtml +32 -0
  104. app/design/adminhtml/default/default/template/adzones/page/error.phtml +7 -0
  105. app/design/adminhtml/default/default/template/adzones/product/edit/serializer.phtml +33 -0
  106. app/design/adminhtml/default/default/template/personalization/personalization/compare-traffic.phtml +136 -0
  107. app/design/adminhtml/default/default/template/personalization/personalization/create.phtml +490 -0
  108. app/design/adminhtml/default/default/template/personalization/personalization/dashboard.phtml +146 -0
  109. app/design/frontend/base/default/layout/adzones.xml +42 -0
  110. app/design/frontend/base/default/template/adzones/checkout/content-top.phtml +6 -0
  111. app/design/frontend/base/default/template/adzones/content-top.phtml +7 -0
  112. app/design/frontend/base/default/template/adzones/customer/content-top.phtml +6 -0
  113. app/design/frontend/base/default/template/adzones/left-bottom.phtml +6 -0
  114. app/design/frontend/base/default/template/adzones/left-top.phtml +6 -0
  115. app/design/frontend/base/default/template/adzones/menu-bottom.phtml +6 -0
  116. app/design/frontend/base/default/template/adzones/menu-top.phtml +6 -0
  117. app/design/frontend/base/default/template/adzones/page-bottom.phtml +6 -0
  118. app/design/frontend/base/default/template/adzones/page/html/header.phtml +52 -0
  119. app/design/frontend/base/default/template/adzones/right-bottom.phtml +6 -0
  120. app/design/frontend/base/default/template/adzones/right-top.phtml +6 -0
  121. app/etc/modules/Convertware_Adzones.xml +9 -0
  122. app/etc/modules/Convertware_Personalization.xml +12 -0
  123. js/adzones/adzones.jquery.min.js +4 -0
  124. js/adzones/adzones.js +28 -0
  125. js/adzones/jquery.colorbox-min.js +4 -0
  126. js/adzones/jquery.colorbox.js +888 -0
  127. js/adzones/personalization.js +444 -0
  128. package.xml +39 -0
  129. skin/adminhtml/default/default/adzones/convertware.css +14 -0
  130. skin/frontend/base/default/css/adzones/adzones.css +72 -0
app/code/local/Convertware/Adzones/Block/Adminhtml/Adzones.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Convertware_Adzones_Block_Adminhtml_Adzones extends Mage_Adminhtml_Block_Widget_Grid_Container
3
+ {
4
+ public function __construct()
5
+ {
6
+ $this->_controller = 'adminhtml_adzones';
7
+ $this->_blockGroup = 'adzones';
8
+ $this->_headerText = Mage::helper('adzones')->__('Ad-Zones Manager');
9
+ $this->_addButtonLabel = Mage::helper('adzones')->__('Add Block');
10
+ parent::__construct();
11
+ }
12
+ }
app/code/local/Convertware/Adzones/Block/Adminhtml/Adzones/Edit.php ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Convertware_Adzones_Block_Adminhtml_Adzones_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
4
+ {
5
+ public function __construct()
6
+ {
7
+ parent::__construct();
8
+
9
+ $this->_objectId = 'id';
10
+ $this->_blockGroup = 'adzones';
11
+ $this->_controller = 'adminhtml_adzones';
12
+
13
+ $this->_updateButton('save', 'label', Mage::helper('adzones')->__('Save Block'));
14
+ $this->_updateButton('delete', 'label', Mage::helper('adzones')->__('Delete Block'));
15
+ $this->_addButton('saveandcontinue', array(
16
+ 'label' => Mage::helper('adminhtml')->__('Save And Continue Edit'),
17
+ 'onclick' => 'saveAndContinueEdit()',
18
+ 'class' => 'save',
19
+ ), -100);
20
+
21
+ $this->_formScripts[] = "
22
+ function toggleEditor() {
23
+ if (tinyMCE.getInstanceById('adzones_content') == null) {
24
+ tinyMCE.execCommand('mceAddControl', false, 'adzones_content');
25
+ } else {
26
+ tinyMCE.execCommand('mceRemoveControl', false, 'adzones_content');
27
+ }
28
+ }
29
+
30
+ function saveAndContinueEdit(){
31
+ editForm.submit($('edit_form').action+'back/edit/');
32
+ }
33
+ ";
34
+ }
35
+
36
+ public function getHeaderText()
37
+ {
38
+ if( Mage::registry('adzones_data') && Mage::registry('adzones_data')->getId() ) {
39
+ return Mage::helper('adzones')->__("Edit Block '%s'", $this->htmlEscape(Mage::registry('adzones_data')->getTitle()));
40
+ } else {
41
+ return Mage::helper('adzones')->__('Add Block');
42
+ }
43
+ }
44
+ }
app/code/local/Convertware/Adzones/Block/Adminhtml/Adzones/Edit/Form.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Convertware_Adzones_Block_Adminhtml_Adzones_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
4
+ {
5
+ protected function _prepareForm()
6
+ {
7
+ $form = new Varien_Data_Form(array(
8
+ 'id' => 'edit_form',
9
+ 'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
10
+ 'method' => 'post',
11
+ 'enctype' => 'multipart/form-data'
12
+ )
13
+ );
14
+
15
+ $form->setUseContainer(true);
16
+ $this->setForm($form);
17
+ return parent::_prepareForm();
18
+ }
19
+ }
app/code/local/Convertware/Adzones/Block/Adminhtml/Adzones/Edit/Tab/Ajax/Serializer.php ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ *
29
+ *
30
+ * @category Mage
31
+ * @package Mage_Adminhtml
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
+ */
34
+ class Convertware_Adzones_Block_Adminhtml_Adzones_Edit_Tab_Ajax_Serializer extends Mage_Core_Block_Template
35
+ {
36
+ public function _construct()
37
+ {
38
+ parent::_construct();
39
+ $this->setTemplate('adzones/product/edit/serializer.phtml');
40
+ return $this;
41
+ }
42
+
43
+ public function getProductsJSON()
44
+ {
45
+ $result = array();
46
+ if ($this->getProducts()) {
47
+ $isEntityId = $this->getIsEntityId();
48
+ foreach ($this->getProducts() as $product) {
49
+ $id = $isEntityId ? $product->getEntityId() : $product->getId();
50
+ $result[$id] = $product->toArray(array('qty', 'position'));
51
+ }
52
+ }
53
+ return $result ? Zend_Json::encode($result) : '{}';
54
+ }
55
+
56
+ /**
57
+ * Initialize grid block under the "Related Products", "Up-sells", "Cross-sells" sections
58
+ *
59
+ * @param string $blockName
60
+ * @param string $getProductFunction
61
+ * @param string $inputName
62
+ */
63
+ public function initSerializerBlock($blockName, $getProductFunction, $inputName)
64
+ {
65
+ if ($block = $this->getLayout()->getBlock($blockName)) {
66
+ $this->setGridBlock($block)
67
+ ->setProducts(Mage::registry('current_product')->$getProductFunction())
68
+ ->setInputElementName($inputName);
69
+ }
70
+ }
71
+ }
app/code/local/Convertware/Adzones/Block/Adminhtml/Adzones/Edit/Tab/Categories.php ADDED
@@ -0,0 +1,302 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Adminhtml
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Product categories tab
29
+ *
30
+ * @category Mage
31
+ * @package Mage_Adminhtml
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
+ */
34
+ class Convertware_Adzones_Block_Adminhtml_Adzones_Edit_Tab_Categories extends Mage_Adminhtml_Block_Catalog_Category_Tree
35
+ {
36
+ protected $_categoryIds;
37
+ protected $_selectedNodes = null;
38
+
39
+ /**
40
+ * Specify template to use
41
+ */
42
+ public function __construct()
43
+ {
44
+ parent::__construct();
45
+ $this->setTemplate('adzones/category/categories.phtml');
46
+ }
47
+
48
+ /**
49
+ * Retrieve currently edited product
50
+ *
51
+ * @return Mage_Catalog_Model_Product
52
+ */
53
+ public function getProduct()
54
+ {
55
+
56
+ }
57
+
58
+ /**
59
+ * Checks when this block is readonly
60
+ *
61
+ * @return boolean
62
+ */
63
+ public function isReadonly()
64
+ {
65
+ //return $this->getProduct()->getCategoriesReadonly();
66
+ return false;
67
+ }
68
+
69
+ /**
70
+ * Return array with category IDs which the product is assigned to
71
+ *
72
+ * @return array
73
+ */
74
+ protected function getCategoryIds()
75
+ {
76
+ $adzonesId = Mage::getSingleton('adminhtml/session')->getAdzonesId();
77
+ $cat = Mage::getModel('adzones/adzones')->load($adzonesId)->getCategoryId();
78
+ $cat = "$cat";
79
+ $ids = explode(',',$cat);
80
+ $CatId = array_filter($ids, 'strlen');
81
+ $CatId = array_unique($CatId);
82
+ sort($CatId);
83
+ //return array(2,3,4,5,6,7);
84
+ return $CatId;
85
+ }
86
+
87
+ /**
88
+ * Forms string out of getCategoryIds()
89
+ *
90
+ * @return string
91
+ */
92
+ public function getIdsString()
93
+ {
94
+ return implode(',', $this->getCategoryIds());
95
+ }
96
+
97
+ /**
98
+ * Returns root node and sets 'checked' flag (if necessary)
99
+ *
100
+ * @return Varien_Data_Tree_Node
101
+ */
102
+ public function getRootNode()
103
+ {
104
+ $root = $this->getRoot();
105
+ if ($root && in_array($root->getId(), $this->getCategoryIds())) {
106
+ $root->setChecked(true);
107
+ }
108
+ return $root;
109
+ }
110
+
111
+ /**
112
+ * Returns root node
113
+ *
114
+ * @param Mage_Catalog_Model_Category|null $parentNodeCategory
115
+ * @param int $recursionLevel
116
+ * @return Varien_Data_Tree_Node
117
+ */
118
+ public function getRoot($parentNodeCategory = null, $recursionLevel = 3)
119
+ {
120
+ if (!is_null($parentNodeCategory) && $parentNodeCategory->getId()) {
121
+ return $this->getNode($parentNodeCategory, $recursionLevel);
122
+ }
123
+ $root = Mage::registry('root');
124
+ if (is_null($root)) {
125
+ $storeId = (int) $this->getRequest()->getParam('store');
126
+
127
+ if ($storeId) {
128
+ $store = Mage::app()->getStore($storeId);
129
+ $rootId = $store->getRootCategoryId();
130
+ }
131
+ else {
132
+ $rootId = Mage_Catalog_Model_Category::TREE_ROOT_ID;
133
+ }
134
+
135
+ $ids = $this->getSelectedCategoriesPathIds($rootId);
136
+ $tree = Mage::getResourceSingleton('catalog/category_tree')
137
+ ->loadByIds($ids, false, false);
138
+
139
+ if ($this->getCategory()) {
140
+ $tree->loadEnsuredNodes($this->getCategory(), $tree->getNodeById($rootId));
141
+ }
142
+
143
+ $tree->addCollectionData($this->getCategoryCollection());
144
+
145
+ $root = $tree->getNodeById($rootId);
146
+
147
+ if ($root && $rootId != Mage_Catalog_Model_Category::TREE_ROOT_ID) {
148
+ $root->setIsVisible(true);
149
+ if ($this->isReadonly()) {
150
+ $root->setDisabled(true);
151
+ }
152
+ }
153
+ elseif($root && $root->getId() == Mage_Catalog_Model_Category::TREE_ROOT_ID) {
154
+ $root->setName(Mage::helper('catalog')->__('Root'));
155
+ }
156
+
157
+ Mage::register('root', $root);
158
+ }
159
+
160
+ return $root;
161
+ }
162
+
163
+ /**
164
+ * Returns array with configuration of current node
165
+ *
166
+ * @param Varien_Data_Tree_Node $node
167
+ * @param int $level How deep is the node in the tree
168
+ * @return array
169
+ */
170
+ protected function _getNodeJson($node, $level = 1)
171
+ {
172
+ $item = parent::_getNodeJson($node, $level);
173
+
174
+ if ($this->_isParentSelectedCategory($node)) {
175
+ $item['expanded'] = true;
176
+ }
177
+
178
+ if (in_array($node->getId(), $this->getCategoryIds())) {
179
+ $item['checked'] = true;
180
+ }
181
+
182
+ if ($this->isReadonly()) {
183
+ $item['disabled'] = true;
184
+ }
185
+
186
+ return $item;
187
+ }
188
+
189
+ /**
190
+ * Returns whether $node is a parent (not exactly direct) of a selected node
191
+ *
192
+ * @param Varien_Data_Tree_Node $node
193
+ * @return bool
194
+ */
195
+ protected function _isParentSelectedCategory($node)
196
+ {
197
+ $result = false;
198
+ // Contains string with all category IDs of children (not exactly direct) of the node
199
+ $allChildren = $node->getAllChildren();
200
+ if ($allChildren) {
201
+ $selectedCategoryIds = $this->getCategoryIds();
202
+ $allChildrenArr = explode(',', $allChildren);
203
+ for ($i = 0, $cnt = count($selectedCategoryIds); $i < $cnt; $i++) {
204
+ $isSelf = $node->getId() == $selectedCategoryIds[$i];
205
+ if (!$isSelf && in_array($selectedCategoryIds[$i], $allChildrenArr)) {
206
+ $result = true;
207
+ break;
208
+ }
209
+ }
210
+ }
211
+
212
+ return $result;
213
+ }
214
+
215
+ /**
216
+ * Returns array with nodes those are selected (contain current product)
217
+ *
218
+ * @return array
219
+ */
220
+ protected function _getSelectedNodes()
221
+ {
222
+ if ($this->_selectedNodes === null) {
223
+ $this->_selectedNodes = array();
224
+ $root = $this->getRoot();
225
+ foreach ($this->getCategoryIds() as $categoryId) {
226
+ if ($root) {
227
+ $this->_selectedNodes[] = $root->getTree()->getNodeById($categoryId);
228
+ }
229
+ }
230
+ }
231
+
232
+ return $this->_selectedNodes;
233
+ }
234
+
235
+ /**
236
+ * Returns JSON-encoded array of category children
237
+ *
238
+ * @param int $categoryId
239
+ * @return string
240
+ */
241
+ public function getCategoryChildrenJson($categoryId)
242
+ {
243
+ $category = Mage::getModel('catalog/category')->load($categoryId);
244
+ $node = $this->getRoot($category, 1)->getTree()->getNodeById($categoryId);
245
+
246
+ if (!$node || !$node->hasChildren()) {
247
+ return '[]';
248
+ }
249
+
250
+ $children = array();
251
+ foreach ($node->getChildren() as $child) {
252
+ $children[] = $this->_getNodeJson($child);
253
+ }
254
+
255
+ return Mage::helper('core')->jsonEncode($children);
256
+ }
257
+
258
+ /**
259
+ * Returns URL for loading tree
260
+ *
261
+ * @param null $expanded
262
+ * @return string
263
+ */
264
+ public function getLoadTreeUrl($expanded = null)
265
+ {
266
+ return $this->getUrl('*/*/categoriesJson', array('_current' => true));
267
+ }
268
+
269
+ /**
270
+ * Return distinct path ids of selected categories
271
+ *
272
+ * @param mixed $rootId Root category Id for context
273
+ * @return array
274
+ */
275
+ public function getSelectedCategoriesPathIds($rootId = false)
276
+ {
277
+ $ids = array();
278
+ $categoryIds = $this->getCategoryIds();
279
+ if (empty($categoryIds)) {
280
+ return array();
281
+ }
282
+ $collection = Mage::getResourceModel('catalog/category_collection');
283
+
284
+ if ($rootId) {
285
+ $collection->addFieldToFilter('parent_id', $rootId);
286
+ } else {
287
+ $collection->addFieldToFilter('entity_id', array('in'=>$categoryIds));
288
+ }
289
+
290
+ foreach ($collection as $item) {
291
+ if ($rootId && !in_array($rootId, $item->getPathIds())) {
292
+ continue;
293
+ }
294
+ foreach ($item->getPathIds() as $id) {
295
+ if (!in_array($id, $ids)) {
296
+ $ids[] = $id;
297
+ }
298
+ }
299
+ }
300
+ return $ids;
301
+ }
302
+ }
app/code/local/Convertware/Adzones/Block/Adminhtml/Adzones/Edit/Tab/Category.php ADDED
@@ -0,0 +1,294 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Convertware_Adzones_Block_Adminhtml_Adzones_Edit_Tab_Category extends Mage_Adminhtml_Block_Catalog_Category_Tree
4
+ {
5
+ protected $_categoryIds;
6
+ protected $_selectedNodes = null;
7
+
8
+ /**
9
+ * Specify template to use
10
+ */
11
+ public function __construct()
12
+ {
13
+ parent::__construct();
14
+ $this->setTemplate('adzones/category/categories.phtml');
15
+ }
16
+
17
+ /**
18
+ * Retrieve currently edited product
19
+ *
20
+ * @return Mage_Catalog_Model_Product
21
+ */
22
+
23
+
24
+ /**
25
+ * Checks when this block is readonly
26
+ *
27
+ * @return boolean
28
+ */
29
+ public function getBlock()
30
+ {
31
+ return Mage::registry('adzones_data');
32
+ }
33
+
34
+ /**
35
+ * Checks when this block is readonly
36
+ *
37
+ * @return boolean
38
+ */
39
+ public function isReadonly()
40
+ {
41
+ //return $this->getProduct()->getCategoriesReadonly();
42
+ return;
43
+ }
44
+
45
+ /**
46
+ * Return array with category IDs which the product is assigned to
47
+ *
48
+ * @return array
49
+ */
50
+ protected function getCategoryIds()
51
+ {
52
+ return;
53
+ }
54
+ protected function getCurrentAssignId()
55
+ {
56
+ $cat = $this->getBlock()->getCategoryId();
57
+ $ids = explode(',',$cat);
58
+ $CatId = array_filter($ids, 'strlen');
59
+ $CatId = array_unique($CatId);
60
+ return $CatId;
61
+ //return;
62
+ }
63
+
64
+ /**
65
+ * Forms string out of getCategoryIds()
66
+ *
67
+ * @return string
68
+ */
69
+ public function getIdsString()
70
+ {
71
+ return implode(',', $this->getCurrentAssignId());
72
+ }
73
+
74
+ /**
75
+ * Returns root node and sets 'checked' flag (if necessary)
76
+ *
77
+ * @return Varien_Data_Tree_Node
78
+ */
79
+ public function getRootNode()
80
+ {
81
+ $root = $this->getRoot();
82
+ if ($root && in_array($root->getId(), $this->getCategoryIds())) {
83
+ $root->setChecked(true);
84
+ }
85
+ return $root;
86
+ }
87
+
88
+ /**
89
+ * Returns root node
90
+ *
91
+ * @param Mage_Catalog_Model_Category|null $parentNodeCategory
92
+ * @param int $recursionLevel
93
+ * @return Varien_Data_Tree_Node
94
+ */
95
+ public function getRoot($parentNodeCategory = null, $recursionLevel = 3)
96
+ {
97
+ if (!is_null($parentNodeCategory) && $parentNodeCategory->getId()) {
98
+ return $this->getNode($parentNodeCategory, $recursionLevel);
99
+ }
100
+ $root = Mage::registry('root');
101
+ if (is_null($root)) {
102
+ $storeId = (int) $this->getRequest()->getParam('store');
103
+
104
+ if ($storeId) {
105
+ $store = Mage::app()->getStore($storeId);
106
+ $rootId = $store->getRootCategoryId();
107
+ }
108
+ else {
109
+ $rootId = Mage_Catalog_Model_Category::TREE_ROOT_ID;
110
+ }
111
+
112
+ $ids = $this->getSelectedCategoriesPathIds($rootId);
113
+ $tree = Mage::getResourceSingleton('catalog/category_tree')
114
+ ->loadByIds($ids, false, false);
115
+
116
+ if ($this->getCategory()) {
117
+ $tree->loadEnsuredNodes($this->getCategory(), $tree->getNodeById($rootId));
118
+ }
119
+
120
+ $tree->addCollectionData($this->getCategoryCollection());
121
+
122
+ $root = $tree->getNodeById($rootId);
123
+
124
+ if ($root && $rootId != Mage_Catalog_Model_Category::TREE_ROOT_ID) {
125
+ $root->setIsVisible(true);
126
+ if ($this->isReadonly()) {
127
+ $root->setDisabled(true);
128
+ }
129
+ }
130
+ elseif($root && $root->getId() == Mage_Catalog_Model_Category::TREE_ROOT_ID) {
131
+ $root->setName(Mage::helper('catalog')->__('Root'));
132
+ }
133
+
134
+ Mage::register('root', $root);
135
+ }
136
+
137
+ return $root;
138
+ }
139
+
140
+ /**
141
+ * Returns array with configuration of current node
142
+ *
143
+ * @param Varien_Data_Tree_Node $node
144
+ * @param int $level How deep is the node in the tree
145
+ * @return array
146
+ */
147
+ protected function getCurrentBlockCategory()
148
+ {
149
+ $block = Mage::registry('adzones_data');
150
+ $categories = $block->getCategoryId();
151
+ return explode(',', $categories);
152
+ }
153
+
154
+ protected function _getNodeJson($node, $level = 1)
155
+ {
156
+ $item = parent::_getNodeJson($node, $level);
157
+
158
+ if ($this->_isParentSelectedCategory($node)) {
159
+ $item['expanded'] = true;
160
+ }
161
+
162
+ if (in_array($node->getId(), $this->getCategoryIds())) {
163
+ $item['checked'] = true;
164
+ }
165
+
166
+ if ($this->isReadonly()) {
167
+ $item['disabled'] = true;
168
+ }
169
+ $blockCat = $this->getCurrentBlockCategory();
170
+ foreach($blockCat as $cat)
171
+ {
172
+ if($node->getId()==$cat)
173
+ {
174
+ $item['checked'] = true;
175
+ }
176
+ }
177
+
178
+ return $item;
179
+ }
180
+
181
+ /**
182
+ * Returns whether $node is a parent (not exactly direct) of a selected node
183
+ *
184
+ * @param Varien_Data_Tree_Node $node
185
+ * @return bool
186
+ */
187
+ protected function _isParentSelectedCategory($node)
188
+ {
189
+ $result = false;
190
+ // Contains string with all category IDs of children (not exactly direct) of the node
191
+ $allChildren = $node->getAllChildren();
192
+ if ($allChildren) {
193
+ $selectedCategoryIds = $this->getCategoryIds();
194
+ $allChildrenArr = explode(',', $allChildren);
195
+ for ($i = 0, $cnt = count($selectedCategoryIds); $i < $cnt; $i++) {
196
+ $isSelf = $node->getId() == $selectedCategoryIds[$i];
197
+ if (!$isSelf && in_array($selectedCategoryIds[$i], $allChildrenArr)) {
198
+ $result = true;
199
+ break;
200
+ }
201
+ }
202
+ }
203
+
204
+ return $result;
205
+ }
206
+
207
+ /**
208
+ * Returns array with nodes those are selected (contain current product)
209
+ *
210
+ * @return array
211
+ */
212
+ protected function _getSelectedNodes()
213
+ {
214
+ if ($this->_selectedNodes === null) {
215
+ $this->_selectedNodes = array();
216
+ $root = $this->getRoot();
217
+ foreach ($this->getCategoryIds() as $categoryId) {
218
+ if ($root) {
219
+ $this->_selectedNodes[] = $root->getTree()->getNodeById($categoryId);
220
+ }
221
+ }
222
+ }
223
+
224
+ return $this->_selectedNodes;
225
+ }
226
+
227
+ /**
228
+ * Returns JSON-encoded array of category children
229
+ *
230
+ * @param int $categoryId
231
+ * @return string
232
+ */
233
+ public function getCategoryChildrenJson($categoryId)
234
+ {
235
+ $category = Mage::getModel('catalog/category')->load($categoryId);
236
+ $node = $this->getRoot($category, 1)->getTree()->getNodeById($categoryId);
237
+
238
+ if (!$node || !$node->hasChildren()) {
239
+ return '[]';
240
+ }
241
+
242
+ $children = array();
243
+ foreach ($node->getChildren() as $child) {
244
+ $children[] = $this->_getNodeJson($child);
245
+ }
246
+
247
+ return Mage::helper('core')->jsonEncode($children);
248
+ }
249
+
250
+ /**
251
+ * Returns URL for loading tree
252
+ *
253
+ * @param null $expanded
254
+ * @return string
255
+ */
256
+ public function getLoadTreeUrl($expanded = null)
257
+ {
258
+ return $this->getUrl('*/*/categoriesJson', array('_current' => true));
259
+ }
260
+
261
+ /**
262
+ * Return distinct path ids of selected categories
263
+ *
264
+ * @param mixed $rootId Root category Id for context
265
+ * @return array
266
+ */
267
+ public function getSelectedCategoriesPathIds($rootId = false)
268
+ {
269
+ $ids = array();
270
+ $categoryIds = $this->getCategoryIds();
271
+ if (empty($categoryIds)) {
272
+ return array();
273
+ }
274
+ $collection = Mage::getResourceModel('catalog/category_collection');
275
+
276
+ if ($rootId) {
277
+ $collection->addFieldToFilter('parent_id', $rootId);
278
+ } else {
279
+ $collection->addFieldToFilter('entity_id', array('in'=>$categoryIds));
280
+ }
281
+
282
+ foreach ($collection as $item) {
283
+ if ($rootId && !in_array($rootId, $item->getPathIds())) {
284
+ continue;
285
+ }
286
+ foreach ($item->getPathIds() as $id) {
287
+ if (!in_array($id, $ids)) {
288
+ $ids[] = $id;
289
+ }
290
+ }
291
+ }
292
+ return $ids;
293
+ }
294
+ }
app/code/local/Convertware/Adzones/Block/Adminhtml/Adzones/Edit/Tab/Cms.php ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Convertware_Adzones_Block_Adminhtml_Adzones_Edit_Tab_Cms extends Mage_Adminhtml_Block_Widget_Form
4
+ {
5
+ protected function _prepareForm()
6
+ {
7
+ $form = new Varien_Data_Form();
8
+ $this->setForm($form);
9
+ $fieldset = $form->addFieldset('adzones_cms', array('legend'=>Mage::helper('adzones')->__('CMS Pages')));
10
+
11
+ $fieldset->addField('cms_page', 'select', array(
12
+ 'label' => Mage::helper('adzones')->__('Show in CMS Pages'),
13
+ 'name' => 'cms_page',
14
+ 'values' => array(
15
+ array(
16
+ 'value' => 1,
17
+ 'label' => Mage::helper('adzones')->__('Yes'),
18
+ ),
19
+
20
+ array(
21
+ 'value' => 2,
22
+ 'label' => Mage::helper('adzones')->__('No'),
23
+ ),
24
+ ),
25
+ ));
26
+
27
+ if ( Mage::getSingleton('adminhtml/session')->getAdzonesData() )
28
+ {
29
+ $form->setValues(Mage::getSingleton('adminhtml/session')->getAdzonesData());
30
+ Mage::getSingleton('adminhtml/session')->setAdzonesData(null);
31
+ } elseif ( Mage::registry('adzones_data') ) {
32
+ $form->setValues(Mage::registry('adzones_data')->getData());
33
+ }
34
+ return parent::_prepareForm();
35
+ }
36
+ }
app/code/local/Convertware/Adzones/Block/Adminhtml/Adzones/Edit/Tab/Genral.php ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Convertware_Adzones_Block_Adminhtml_Adzones_Edit_Tab_Genral extends Mage_Adminhtml_Block_Widget_Form
4
+ {
5
+ protected function _prepareForm()
6
+ {
7
+ $form = new Varien_Data_Form();
8
+ $this->setForm($form);
9
+ $fieldset = $form->addFieldset('adzones_genral', array('legend'=>Mage::helper('adzones')->__('Genral information')));
10
+
11
+ $fieldset->addField('title', 'text', array(
12
+ 'label' => Mage::helper('adzones')->__('Block Title'),
13
+ 'class' => 'required-entry',
14
+ 'required' => true,
15
+ 'name' => 'title',
16
+ ));
17
+
18
+ $field = $fieldset->addField('store_id', 'multiselect', array(
19
+ 'name' => 'store_id',
20
+ 'label' => Mage::helper('cms')->__('Store View'),
21
+ 'title' => Mage::helper('cms')->__('Store View'),
22
+ 'required' => true,
23
+ 'values' => Mage::getSingleton('adminhtml/system_store')->getStoreValuesForForm(false, true),
24
+ ));
25
+ $renderer = $this->getLayout()->createBlock('adminhtml/store_switcher_form_renderer_fieldset_element');
26
+ $field->setRenderer($renderer);
27
+
28
+
29
+ $fieldset->addField('customer_group', 'multiselect', array(
30
+ 'label' => Mage::helper('adzones')->__('Display ad-zones for certain customer groups'),
31
+ 'class' => 'required-entry',
32
+ 'required' => true,
33
+ 'name' => 'customer_group',
34
+ 'values' => Mage::getModel('adzones/customerGroup')->toOptionArray()
35
+ ));
36
+ $fieldset->addField('block_position', 'select', array(
37
+ 'label' => Mage::helper('adzones')->__('Block Position'),
38
+ 'class' => 'required-entry',
39
+ 'required' => true,
40
+ 'name' => 'block_position',
41
+ 'values' => Mage::getModel('adzones/blockPosition')->getOptionArray()
42
+ ));
43
+ $fieldset->addField('mode', 'select', array(
44
+ 'label' => Mage::helper('adzones')->__('Mode'),
45
+ 'class' => 'required-entry',
46
+ 'required' => true,
47
+ 'name' => 'mode',
48
+ 'values' => Mage::getModel('adzones/mode')->getOptionArray()
49
+ ));
50
+ $fieldset->addField('sort_order', 'text', array(
51
+
52
+ 'label' => Mage::helper('adzones')->__('Sort Order'),
53
+ 'class' => 'required-entry',
54
+ 'required' => true,
55
+ 'name' => 'sort_order',
56
+ ));
57
+ $fieldset->addField('status', 'select', array(
58
+ 'label' => Mage::helper('adzones')->__('Status'),
59
+ 'name' => 'status',
60
+ 'values' => array(
61
+ array(
62
+ 'value' => 1,
63
+ 'label' => Mage::helper('adzones')->__('Enabled'),
64
+ ),
65
+
66
+ array(
67
+ 'value' => 2,
68
+ 'label' => Mage::helper('adzones')->__('Disabled'),
69
+ ),
70
+ ),
71
+ ));
72
+ if ( Mage::getSingleton('adminhtml/session')->getAdzonesData() )
73
+ {
74
+ $form->setValues(Mage::getSingleton('adminhtml/session')->getAdzonesData());
75
+ Mage::getSingleton('adminhtml/session')->setAdzonesData(null);
76
+ } elseif ( Mage::registry('adzones_data') ) {
77
+ $form->setValues(Mage::registry('adzones_data')->getData());
78
+ }
79
+ return parent::_prepareForm();
80
+ }
81
+ }
app/code/local/Convertware/Adzones/Block/Adminhtml/Adzones/Edit/Tab/Image.php ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Convertware_Adzones_Block_Adminhtml_Adzones_Edit_Tab_Image extends Mage_Adminhtml_Block_Widget_Form
4
+ {
5
+ protected function _prepareForm()
6
+ {
7
+ $form = new Varien_Data_Form();
8
+ $this->setForm($form);
9
+ $fieldset = $form->addFieldset('adzones_genral', array('legend'=>Mage::helper('adzones')->__('Image information')));
10
+
11
+ $fieldset->addField('adzone_image', 'image', array(
12
+ 'label' => Mage::helper('adzones')->__('Ad-zone Image'),
13
+ 'required' => false,
14
+ 'name' => 'adzone_image',
15
+ ));
16
+ $fieldset->addField('adzone_url', 'text', array(
17
+ 'label' => Mage::helper('adzones')->__('Ad-zone Url'),
18
+ 'name' => 'adzone_url',
19
+ ));
20
+
21
+
22
+
23
+ if ( Mage::getSingleton('adminhtml/session')->getAdzonesData() )
24
+ {
25
+ $form->setValues(Mage::getSingleton('adminhtml/session')->getAdzonesData());
26
+ Mage::getSingleton('adminhtml/session')->setAdzonesData(null);
27
+ } elseif ( Mage::registry('adzones_data') ) {
28
+ $form->setValues(Mage::registry('adzones_data')->getData());
29
+ }
30
+ return parent::_prepareForm();
31
+ }
32
+ }
app/code/local/Convertware/Adzones/Block/Adminhtml/Adzones/Edit/Tab/Products.php ADDED
@@ -0,0 +1,228 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Convertware_Adzones_Block_Adminhtml_Adzones_Edit_Tab_Products extends Mage_Adminhtml_Block_Widget_Grid
4
+ {
5
+ public function __construct()
6
+ {
7
+ parent::__construct();
8
+ $this->setId('productGrid');
9
+ $this->setUseAjax(true); // Using ajax grid is important
10
+ $this->setDefaultSort('entity_id');
11
+ $this->setDefaultFilter(array('in_products'=>1)); // By default we have added a filter for the rows, that in_products value to be 1
12
+ $this->setSaveParametersInSession(false); //Dont save paramters in session or else it creates problems
13
+ }
14
+
15
+ protected function _getStore() {
16
+ $storeId = (int) $this->getRequest()->getParam('store', 0);
17
+ return Mage::app()->getStore($storeId);
18
+ }
19
+
20
+ protected function _prepareCollection()
21
+ {
22
+ $store = $this->_getStore();
23
+ $collection = Mage::getModel('catalog/product')->getCollection()
24
+ ->addAttributeToSelect('sku')
25
+ ->addAttributeToSelect('name')
26
+ ->addAttributeToSelect('attribute_set_id')
27
+ ->addAttributeToSelect('type_id')
28
+ ->joinField('qty',
29
+ 'cataloginventory/stock_item',
30
+ 'qty',
31
+ 'product_id=entity_id',
32
+ '{{table}}.stock_id=1',
33
+ 'left');
34
+
35
+ if ($store->getId()) {
36
+ //$collection->setStoreId($store->getId());
37
+ $adminStore = Mage_Core_Model_App::ADMIN_STORE_ID;
38
+ $collection->addStoreFilter($store);
39
+ $collection->joinAttribute('name', 'catalog_product/name', 'entity_id', null, 'inner', $adminStore);
40
+ $collection->joinAttribute('custom_name', 'catalog_product/name', 'entity_id', null, 'inner', $store->getId());
41
+ $collection->joinAttribute('status', 'catalog_product/status', 'entity_id', null, 'inner', $store->getId());
42
+ $collection->joinAttribute('visibility', 'catalog_product/visibility', 'entity_id', null, 'inner', $store->getId());
43
+ $collection->joinAttribute('price', 'catalog_product/price', 'entity_id', null, 'left', $store->getId());
44
+ } else {
45
+ $collection->addAttributeToSelect('price');
46
+ $collection->joinAttribute('status', 'catalog_product/status', 'entity_id', null, 'inner');
47
+ $collection->joinAttribute('visibility', 'catalog_product/visibility', 'entity_id', null, 'inner');
48
+ }
49
+
50
+ $this->setCollection($collection);
51
+
52
+ parent::_prepareCollection();
53
+ $this->getCollection()->addWebsiteNamesToResult();
54
+ return $this;
55
+ }
56
+ protected function _addColumnFilterToCollection($column)
57
+ {
58
+ // Set custom filter for in product flag
59
+ if ($column->getId() == 'in_products') {
60
+ $ids = $this->_getSelectedProducts();
61
+ if (empty($ids)) {
62
+ $ids = 0;
63
+ }
64
+ if ($column->getFilter()->getValue()) {
65
+ $this->getCollection()->addFieldToFilter('entity_id', array('in'=>$ids));
66
+ } else {
67
+ if($productIds) {
68
+ $this->getCollection()->addFieldToFilter('entity_id', array('nin'=>$ids));
69
+ }
70
+ }
71
+ } else {
72
+ parent::_addColumnFilterToCollection($column);
73
+ }
74
+ return $this;
75
+ }
76
+
77
+ protected function _prepareColumns()
78
+ {
79
+
80
+ $this->addColumn('in_products', array(
81
+ 'header_css_class' => 'a-center',
82
+ 'type' => 'checkbox',
83
+ 'values' => $this->_getSelectedProducts(),
84
+ 'align' => 'center',
85
+ 'index' => 'entity_id'
86
+ ));
87
+
88
+
89
+
90
+ $this->addColumn('entity_id',
91
+ array(
92
+ 'header' => Mage::helper('adzones')->__('ID'),
93
+ 'width' => '40px',
94
+ 'type' => 'number',
95
+ 'index' => 'entity_id',
96
+ ));
97
+ $this->addColumn('name',
98
+ array(
99
+ 'header' => Mage::helper('adzones')->__('Name'),
100
+ 'index' => 'name',
101
+ ));
102
+
103
+ $store = $this->_getStore();
104
+ if ($store->getId()) {
105
+ $this->addColumn('custom_name',
106
+ array(
107
+ 'header' => Mage::helper('adzones')->__('Name in %s', $store->getName()),
108
+ 'index' => 'custom_name',
109
+ ));
110
+ }
111
+
112
+ $this->addColumn('type',
113
+ array(
114
+ 'header' => Mage::helper('adzones')->__('Type'),
115
+ 'width' => '60px',
116
+ 'index' => 'type_id',
117
+ 'type' => 'options',
118
+ 'options' => Mage::getSingleton('catalog/product_type')->getOptionArray(),
119
+ ));
120
+
121
+ $sets = Mage::getResourceModel('eav/entity_attribute_set_collection')
122
+ ->setEntityTypeFilter(Mage::getModel('catalog/product')->getResource()->getTypeId())
123
+ ->load()
124
+ ->toOptionHash();
125
+
126
+ $this->addColumn('set_name',
127
+ array(
128
+ 'header' => Mage::helper('adzones')->__('Attrib. Set Name'),
129
+ 'width' => '100px',
130
+ 'index' => 'attribute_set_id',
131
+ 'type' => 'options',
132
+ 'options' => $sets,
133
+ ));
134
+
135
+ $this->addColumn('sku',
136
+ array(
137
+ 'header' => Mage::helper('adzones')->__('SKU'),
138
+ 'width' => '80px',
139
+ 'index' => 'sku',
140
+ ));
141
+
142
+ // $store = $this->_getStore();
143
+ // $this->addColumn('price',
144
+ // array(
145
+ // 'header'=> Mage::helper('catalog')->__('Price'),
146
+ // 'type' => 'price',
147
+ // 'currency_code' => $store->getBaseCurrency()->getCode(),
148
+ // 'index' => 'price',
149
+ // ));
150
+
151
+ $this->addColumn('qty',
152
+ array(
153
+ 'header' => Mage::helper('adzones')->__('Qty'),
154
+ 'width' => '100px',
155
+ 'type' => 'number',
156
+ 'index' => 'qty',
157
+ ));
158
+
159
+ $this->addColumn('visibility',
160
+ array(
161
+ 'header' => Mage::helper('adzones')->__('Visibility'),
162
+ 'width' => '70px',
163
+ 'index' => 'visibility',
164
+ 'type' => 'options',
165
+ 'options' => Mage::getModel('catalog/product_visibility')->getOptionArray(),
166
+ ));
167
+ $this->addColumn('position', array(
168
+ 'header' => Mage::helper('adzones')->__('Position'),
169
+ 'name' => 'position',
170
+ 'width' => '10px',
171
+ 'type' => 'number',
172
+ 'validate_class' => 'validate-number',
173
+ 'index' => 'position',
174
+ 'editable' => true,
175
+ 'edit_only' => true
176
+ ));
177
+
178
+ if (!Mage::app()->isSingleStoreMode()) {
179
+ $this->addColumn('websites',
180
+ array(
181
+ 'header' => Mage::helper('adzones')->__('Websites'),
182
+ 'width' => '100px',
183
+ 'sortable' => false,
184
+ 'index' => 'websites',
185
+ 'type' => 'options',
186
+ 'options' => Mage::getModel('core/website')->getCollection()->toOptionHash(),
187
+ ));
188
+ }
189
+
190
+
191
+
192
+ return parent::_prepareColumns();
193
+ }
194
+
195
+
196
+ protected function _getSelectedProducts()
197
+ {
198
+ $products = $this->getProducts();
199
+ if (!is_array($products)) {
200
+ $products = array_keys($this->getSelectedProducts());
201
+ }
202
+ return $products;
203
+ }
204
+
205
+ public function getGridUrl()
206
+ {
207
+ return $this->_getData('grid_url') ? $this->_getData('grid_url') : $this->getUrl('*/*/productgridajax', array('_current'=>true));
208
+ }
209
+
210
+ public function getSelectedProducts()
211
+ {
212
+ $id = Mage::getSingleton('adminhtml/session')->getAdzonesId();
213
+ $product = array();
214
+ if($id)
215
+ {
216
+ $adzones = Mage::getModel('adzones/adzones')->load($id);
217
+ $adzonesProduct = $adzones->getProductId();
218
+ $adzonesProduct = explode(',',$adzonesProduct);
219
+ foreach($adzonesProduct as $products)
220
+ {
221
+ $product[$products] = array('position' => $products);
222
+ }
223
+ }
224
+ return $product;
225
+ }
226
+
227
+
228
+ }
app/code/local/Convertware/Adzones/Block/Adminhtml/Adzones/Edit/Tab/Schedule.php ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Convertware_Adzones_Block_Adminhtml_Adzones_Edit_Tab_Schedule extends Mage_Adminhtml_Block_Widget_Form
4
+ {
5
+ protected function _prepareForm()
6
+ {
7
+ $form = new Varien_Data_Form();
8
+ $this->setForm($form);
9
+ $fieldset = $form->addFieldset('adzones_display', array('legend'=>Mage::helper('adzones')->__('Block Display')));
10
+
11
+ $fieldset->addField('display_from', 'date', array(
12
+ 'label' => Mage::helper('adzones')->__('From Date'),
13
+ 'tabindex' => 1,
14
+ 'name' => 'display_from',
15
+ 'image' => $this->getSkinUrl('images/grid-cal.gif'),
16
+ 'format' => Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT)
17
+ ));
18
+
19
+
20
+ $fieldset->addField('display_to', 'date', array(
21
+ 'label' => Mage::helper('adzones')->__('From Date'),
22
+ 'tabindex' => 1,
23
+ 'name' => 'display_to',
24
+ 'image' => $this->getSkinUrl('images/grid-cal.gif'),
25
+ 'format' => Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT)
26
+ ));
27
+
28
+ $fieldsetSchedule = $form->addFieldset('adzones_schedule', array('legend'=>Mage::helper('adzones')->__('Schedule Pattern')));
29
+
30
+ $fieldsetSchedule->addField('show_pattern', 'select', array(
31
+ 'label' => Mage::helper('adzones')->__('Show'),
32
+ //'class' => 'required-entry',
33
+ //'required' => true,
34
+ 'name' => 'show_pattern',
35
+ 'values' => Mage::getModel('adzones/showPattern')->getOptionArray()
36
+ ));
37
+
38
+
39
+ $fieldsetSchedule->addField('show_pattern_from', 'text', array(
40
+ 'label' => Mage::helper('adzones')->__('From Time'),
41
+ //'class' => 'required-entry',
42
+ //'required' => true,
43
+ 'name' => 'show_pattern_from',
44
+ 'note' =>'As Hours:Minutes:Seconds',
45
+ ));
46
+
47
+ $fieldsetSchedule->addField('show_pattern_to', 'text', array(
48
+ 'label' => Mage::helper('adzones')->__('To Time'),
49
+ //'class' => 'required-entry',
50
+ //'required' => true,
51
+ 'name' => 'show_pattern_to',
52
+ 'note' =>'As Hours:Minutes:Seconds',
53
+ ));
54
+
55
+ if ( Mage::getSingleton('adminhtml/session')->getAdzonesData() )
56
+ {
57
+ $form->setValues(Mage::getSingleton('adminhtml/session')->getAdzonesData());
58
+ Mage::getSingleton('adminhtml/session')->setAdzonesData(null);
59
+ } elseif ( Mage::registry('adzones_data') ) {
60
+ $form->setValues(Mage::registry('adzones_data')->getData());
61
+ }
62
+ return parent::_prepareForm();
63
+ }
64
+ }
app/code/local/Convertware/Adzones/Block/Adminhtml/Adzones/Edit/Tabs.php ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Convertware_Adzones_Block_Adminhtml_Adzones_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
4
+ {
5
+
6
+ public function __construct()
7
+ {
8
+ parent::__construct();
9
+ $this->setId('adzones_tabs');
10
+ $this->setDestElementId('edit_form');
11
+ $this->setTitle(Mage::helper('adzones')->__(' '));
12
+ }
13
+
14
+ protected function _beforeToHtml()
15
+ {
16
+ $this->addTab('genral_section', array(
17
+ 'label' => Mage::helper('adzones')->__('Genral Information'),
18
+ 'title' => Mage::helper('adzones')->__('Genral Information'),
19
+ 'content' => $this->getLayout()->createBlock('adzones/adminhtml_adzones_edit_tab_genral')->toHtml(),
20
+ ));
21
+ $this->addTab('content_section', array(
22
+ 'label' => Mage::helper('adzones')->__('Content'),
23
+ 'title' => Mage::helper('adzones')->__('Content'),
24
+ 'content' => $this->getLayout()->createBlock('adzones/adminhtml_content')->toHtml(),
25
+ ));
26
+ $this->addTab('image_section', array(
27
+ 'label' => Mage::helper('adzones')->__('Ad-zone Image'),
28
+ 'title' => Mage::helper('adzones')->__('Ad-zone Image'),
29
+ 'content' => $this->getLayout()->createBlock('adzones/adminhtml_adzones_edit_tab_image')->toHtml(),
30
+ ));
31
+ $this->addTab('schedule_section', array(
32
+ 'label' => Mage::helper('adzones')->__('Schedule'),
33
+ 'title' => Mage::helper('adzones')->__('Schedule'),
34
+ 'content' => $this->getLayout()->createBlock('adzones/adminhtml_adzones_edit_tab_schedule')->toHtml(),
35
+ ));
36
+ $this->addTab('category_section', array(
37
+ 'label' => Mage::helper('adzones')->__('Categories'),
38
+ 'title' => Mage::helper('adzones')->__('Categories'),
39
+ 'content' => $this->getLayout()->createBlock('adzones/adminhtml_adzones_edit_tab_categories')->toHtml(),
40
+ ));
41
+
42
+ $this->addTab('product_section', array(
43
+ 'label' => Mage::helper('adzones')->__('Filter Product'),
44
+ 'title' => Mage::helper('adzones')->__('Filter Produc'),
45
+ 'url' => $this->getUrl('*/*/productgrid', array('_current' => true)),
46
+ 'class' => 'ajax',
47
+ ));
48
+ $this->addTab('cms_section', array(
49
+ 'label' => Mage::helper('adzones')->__('CMS Pages'),
50
+ 'title' => Mage::helper('adzones')->__('CMS Pages'),
51
+ 'content' => $this->getLayout()->createBlock('adzones/adminhtml_adzones_edit_tab_cms')->toHtml(),
52
+ ));
53
+
54
+ return parent::_beforeToHtml();
55
+ }
56
+ }
app/code/local/Convertware/Adzones/Block/Adminhtml/Adzones/Grid.php ADDED
@@ -0,0 +1,170 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Convertware_Adzones_Block_Adminhtml_Adzones_Grid extends Mage_Adminhtml_Block_Widget_Grid
4
+ {
5
+ public function __construct()
6
+ {
7
+
8
+ parent::__construct();
9
+ $this->setId('adzonesGrid');
10
+ $this->setDefaultSort('adzones_id');
11
+ $this->setDefaultDir('ASC');
12
+ $this->setSaveParametersInSession(true);
13
+ }
14
+
15
+ protected function _prepareCollection()
16
+ {
17
+
18
+ $collection = Mage::getModel('adzones/adzones')->getCollection();
19
+ $collection->setFirstStoreFlag(true);
20
+ $this->setCollection($collection);
21
+
22
+ return parent::_prepareCollection();
23
+ }
24
+
25
+ protected function _prepareColumns()
26
+ {
27
+ $this->addColumn('adzones_id', array(
28
+ 'header' => Mage::helper('adzones')->__('ID'),
29
+ 'align' =>'right',
30
+ 'width' => '50px',
31
+ 'index' => 'adzones_id',
32
+ ));
33
+
34
+ $this->addColumn('title', array(
35
+ 'header' => Mage::helper('adzones')->__('Title'),
36
+ 'align' =>'left',
37
+ 'index' => 'title',
38
+ ));
39
+ $this->addColumn('block_position', array(
40
+ 'header' => Mage::helper('adzones')->__('Position'),
41
+ 'align' =>'left',
42
+ 'index' => 'block_position',
43
+ 'type' => 'options',
44
+ 'options' => Mage::getModel('adzones/blockPosition')->getOptionArray()
45
+ ));
46
+ $this->addColumn('blocks', array(
47
+ 'header' => Mage::helper('adzones')->__('Blocks'),
48
+ 'align' => 'left',
49
+ 'index' => 'blocks',
50
+ 'type' => 'text',
51
+ 'renderer' => 'Convertware_Adzones_Block_Adminhtml_Adzones_Renderer_TotalContent',
52
+ ));
53
+ $this->addColumn('mode', array(
54
+ 'header' => Mage::helper('adzones')->__('Mode'),
55
+ 'align' =>'left',
56
+ 'index' => 'mode',
57
+ 'type' => 'options',
58
+ 'options' => Mage::getModel('adzones/mode')->getOptionArray(),
59
+ ));
60
+ $this->addColumn('display_from', array(
61
+ 'header' => Mage::helper('adzones')->__('Display From'),
62
+ 'align' =>'left',
63
+ 'index' => 'display_from',
64
+ 'type' => 'date',
65
+ ));
66
+ $this->addColumn('display_to', array(
67
+ 'header' => Mage::helper('adzones')->__('Display to'),
68
+ 'align' =>'left',
69
+ 'index' => 'display_to',
70
+ 'type' => 'date',
71
+ ));
72
+ $this->addColumn('show_pattern', array(
73
+ 'header' => Mage::helper('adzones')->__('Schedule Pattern'),
74
+ 'align' =>'left',
75
+ 'index' => 'show_pattern',
76
+ 'type' => 'options',
77
+ 'options' => Mage::getModel('adzones/showPattern')->getOptionArray()
78
+ ));
79
+ /* if (!Mage::app()->isSingleStoreMode()) {
80
+ $this->addColumn('store_id', array(
81
+ 'header' => Mage::helper('adzones')->__('Store View'),
82
+ 'index' => 'store_id',
83
+ 'type' => 'store',
84
+ 'store_all' => true,
85
+ 'store_view' => true,
86
+ 'sortable' => false,
87
+ 'filter_condition_callback'
88
+ => array($this, '_filterStoreCondition'),
89
+ ));
90
+ }*/
91
+ $this->addColumn('status', array(
92
+ 'header' => Mage::helper('adzones')->__('Status'),
93
+ 'align' => 'left',
94
+ 'width' => '80px',
95
+ 'index' => 'status',
96
+ 'type' => 'options',
97
+ 'options' => array(
98
+ 1 => 'Enabled',
99
+ 2 => 'Disabled',
100
+ ),
101
+ ));
102
+
103
+ $this->addColumn('action',
104
+ array(
105
+ 'header' => Mage::helper('adzones')->__('Action'),
106
+ 'width' => '100',
107
+ 'type' => 'action',
108
+ 'getter' => 'getId',
109
+ 'actions' => array(
110
+ array(
111
+ 'caption' => Mage::helper('adzones')->__('Edit'),
112
+ 'url' => array('base'=> '*/*/edit'),
113
+ 'field' => 'id'
114
+ )
115
+ ),
116
+ 'filter' => false,
117
+ 'sortable' => false,
118
+ 'index' => 'stores',
119
+ 'is_system' => true,
120
+ ));
121
+
122
+ $this->addExportType('*/*/exportCsv', Mage::helper('adzones')->__('CSV'));
123
+ $this->addExportType('*/*/exportXml', Mage::helper('adzones')->__('XML'));
124
+
125
+ return parent::_prepareColumns();
126
+ }
127
+ protected function _filterStoreCondition($collection, $column)
128
+ {
129
+ if (!$value = $column->getFilter()->getValue()) {
130
+ return;
131
+ }
132
+
133
+ $this->getCollection()->addStoreFilter($value);
134
+ }
135
+ protected function _prepareMassaction()
136
+ {
137
+ $this->setMassactionIdField('adzones_id');
138
+ $this->getMassactionBlock()->setFormFieldName('adzones');
139
+
140
+ $this->getMassactionBlock()->addItem('delete', array(
141
+ 'label' => Mage::helper('adzones')->__('Delete'),
142
+ 'url' => $this->getUrl('*/*/massDelete'),
143
+ 'confirm' => Mage::helper('adzones')->__('Are you sure?')
144
+ ));
145
+
146
+ $statuses = Mage::getSingleton('adzones/status')->getOptionArray();
147
+
148
+ array_unshift($statuses, array('label'=>'', 'value'=>''));
149
+ $this->getMassactionBlock()->addItem('status', array(
150
+ 'label'=> Mage::helper('adzones')->__('Change status'),
151
+ 'url' => $this->getUrl('*/*/massStatus', array('_current'=>true)),
152
+ 'additional' => array(
153
+ 'visibility' => array(
154
+ 'name' => 'status',
155
+ 'type' => 'select',
156
+ 'class' => 'required-entry',
157
+ 'label' => Mage::helper('adzones')->__('Status'),
158
+ 'values' => $statuses
159
+ )
160
+ )
161
+ ));
162
+ return $this;
163
+ }
164
+
165
+ public function getRowUrl($row)
166
+ {
167
+ return $this->getUrl('*/*/edit', array('id' => $row->getId()));
168
+ }
169
+
170
+ }
app/code/local/Convertware/Adzones/Block/Adminhtml/Adzones/Renderer/StoreId.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Convertware_Adzones_Block_Adminhtml_Adzones_Renderer_StoreId extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
3
+ {
4
+ public function render(Varien_Object $row)
5
+ {
6
+ $Id = $row->getId();
7
+ $Collection = Mage::getModel('adzones/adzones')->load($Id);
8
+ $Collection->getStoreId();
9
+ $storeId = explode(',',$storeId);
10
+ return $storeId;
11
+ }
12
+ }
13
+ ?>
app/code/local/Convertware/Adzones/Block/Adminhtml/Adzones/Renderer/TotalContent.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Convertware_Adzones_Block_Adminhtml_Adzones_Renderer_TotalContent extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
3
+ {
4
+ public function render(Varien_Object $row)
5
+ {
6
+ $Id = $row->getId();
7
+ $contentCollection = Mage::getModel('adzones/adzonesContent')->getCollection()->addFieldToFilter('adzones_id',$Id);
8
+ return count($contentCollection);
9
+ }
10
+ }
11
+ ?>
app/code/local/Convertware/Adzones/Block/Adminhtml/Content.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Convertware_Adzones_Block_Adminhtml_Content extends Mage_Adminhtml_Block_Widget_Grid_Container
3
+ {
4
+ public function __construct()
5
+ {
6
+ $this->_controller = 'adminhtml_content';
7
+ $this->_blockGroup = 'adzones';
8
+ $this->_headerText = Mage::helper('adzones')->__('Content Manager');
9
+ $this->_addButtonLabel = Mage::helper('adzones')->__('Add Content');
10
+ $url = $this->getUrl('adzones/adminhtml_content/new');
11
+ $this->_addButton('addItem', array(
12
+ 'label' => Mage::helper('adminhtml')->__('Add Item'),
13
+ 'onclick' => "popWin('$url', '','top:100,left:200,width=960,height=600,resizable=yes,scrollbars=yes')",
14
+ 'class' => 'add',
15
+ ), -100);
16
+ parent::__construct();
17
+ $this->_removeButton('add');
18
+ }
19
+ }
app/code/local/Convertware/Adzones/Block/Adminhtml/Content/Edit.php ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Convertware_Adzones_Block_Adminhtml_Content_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
4
+ {
5
+ public function __construct()
6
+ {
7
+ parent::__construct();
8
+
9
+ $this->_objectId = 'id';
10
+ $this->_blockGroup = 'adzones';
11
+ $this->_controller = 'adminhtml_content';
12
+
13
+ //$this->_updateButton('save', 'label', Mage::helper('adzones')->__('Save Item'));
14
+ $this->_updateButton('delete', 'label', Mage::helper('adzones')->__('Delete Item'));
15
+ $this->_removeButton('back');
16
+ $this->_removeButton('save');
17
+ $this->_removeButton('delete');
18
+ $this->_addButton('saveandcontinue', array(
19
+ 'label' => Mage::helper('adminhtml')->__('Save Item'),
20
+ 'onclick' => 'saveAndContinueEdit();',
21
+ 'class' => 'save',
22
+ ), -100);
23
+ $url = $this->getUrl('adzones/adminhtml_content/grid');
24
+ $this->_formScripts[] = "
25
+ function toggleEditor() {
26
+ if (tinyMCE.getInstanceById('adzones_content') == null) {
27
+ tinyMCE.execCommand('mceAddControl', false, 'adzones_content');
28
+ } else {
29
+ tinyMCE.execCommand('mceRemoveControl', false, 'adzones_content');
30
+ }
31
+ }
32
+
33
+ function saveAndContinueEdit(){
34
+ $('togglepage_content').click();
35
+ //editForm.submit($('edit_form').action+'back/edit/');
36
+ new Ajax.Request($('edit_form').action,
37
+ {
38
+ method : 'post',
39
+ parameters: Form.serialize('edit_form'),
40
+ onSuccess: function(transport){
41
+ if(transport.responseText)
42
+ {
43
+ var ele = opener.document.getElementById('adzones_tabs_content_section_content');
44
+ $(ele).update(transport.responseText);
45
+ window.close();
46
+ }
47
+ },
48
+ onFailure: function(error_msg){ alert(error_msg);}
49
+ });
50
+ }
51
+ ";
52
+ }
53
+ protected function _prepareLayout() {
54
+ parent::_prepareLayout();
55
+ if (Mage::getSingleton('cms/wysiwyg_config')->isEnabled()) {
56
+ $this->getLayout()->getBlock('head')->setCanLoadTinyMce(true);
57
+ }
58
+ }
59
+ public function getHeaderText()
60
+ {
61
+ if( Mage::registry('adzones_data') && Mage::registry('adzones_data')->getId() ) {
62
+ return Mage::helper('adzones')->__("Edit Item '%s'", $this->htmlEscape(Mage::registry('adzones_data')->getTitle()));
63
+ } else {
64
+ return Mage::helper('adzones')->__('Add Item');
65
+ }
66
+ }
67
+ }
app/code/local/Convertware/Adzones/Block/Adminhtml/Content/Edit/Form.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Convertware_Adzones_Block_Adminhtml_Content_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
4
+ {
5
+ protected function _prepareForm()
6
+ {
7
+ $form = new Varien_Data_Form(array(
8
+ 'id' => 'edit_form',
9
+ 'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
10
+ 'method' => 'post',
11
+ 'enctype' => 'multipart/form-data'
12
+ )
13
+ );
14
+
15
+ $form->setUseContainer(true);
16
+ $this->setForm($form);
17
+ return parent::_prepareForm();
18
+ }
19
+ }
app/code/local/Convertware/Adzones/Block/Adminhtml/Content/Edit/Tab/Form.php ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Convertware_Adzones_Block_Adminhtml_Content_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form
4
+ {
5
+ protected function _prepareForm()
6
+ {
7
+ $form = new Varien_Data_Form();
8
+ $form->setHtmlIdPrefix('page_');
9
+ $this->setForm($form);
10
+ $fieldset = $form->addFieldset('content_fieldset', array('legend'=>Mage::helper('cms')->__('Content'),'class'=>'fieldset-wide'));
11
+
12
+ $wysiwygConfig = Mage::getSingleton('cms/wysiwyg_config')->getConfig(array('add_variables' => false, 'add_widgets' => false,'files_browser_window_url'=>$this->getBaseUrl().'admin/cms_wysiwyg_images/index/'));
13
+
14
+ $fieldset->addField('content_title', 'text', array(
15
+ 'label' => Mage::helper('adzones')->__('Title'),
16
+ 'class' => 'required-entry',
17
+ 'required' => true,
18
+ 'name' => 'content_title',
19
+ ));
20
+ $contentField = $fieldset->addField('content', 'editor', array(
21
+ 'name' => 'content',
22
+ 'style' => 'height:36em;',
23
+ 'required' => true,
24
+ 'disabled' => $isElementDisabled,
25
+ 'config' => $wysiwygConfig
26
+ ));
27
+
28
+ // Setting custom renderer for content field to remove label column
29
+ $renderer = $this->getLayout()->createBlock('adminhtml/widget_form_renderer_fieldset_element')
30
+ ->setTemplate('adzones/page/edit/form/renderer/content.phtml');
31
+ $contentField->setRenderer($renderer);
32
+
33
+ $fieldset->addField('content_sort_order', 'text', array(
34
+ 'label' => Mage::helper('adzones')->__('Sort Order'),
35
+ // 'class' => 'required-entry',
36
+ // 'required' => true,
37
+ 'name' => 'content_sort_order',
38
+ ));
39
+ $fieldset->addField('status', 'select', array(
40
+ 'label' => Mage::helper('adzones')->__('Status'),
41
+ 'name' => 'status',
42
+ 'values' => array(
43
+ array(
44
+ 'value' => 1,
45
+ 'label' => Mage::helper('adzones')->__('Enabled'),
46
+ ),
47
+
48
+ array(
49
+ 'value' => 2,
50
+ 'label' => Mage::helper('adzones')->__('Disabled'),
51
+ ),
52
+ ),
53
+ ));
54
+ if ( Mage::getSingleton('adminhtml/session')->getAdzonesData() )
55
+ {
56
+ $form->setValues(Mage::getSingleton('adminhtml/session')->getAdzonesData());
57
+ Mage::getSingleton('adminhtml/session')->setAdzonesData(null);
58
+ } elseif ( Mage::registry('adzones_data') ) {
59
+ $form->setValues(Mage::registry('adzones_data')->getData());
60
+ }
61
+ return parent::_prepareForm();
62
+ }
63
+ }
app/code/local/Convertware/Adzones/Block/Adminhtml/Content/Edit/Tabs.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Convertware_Adzones_Block_Adminhtml_Content_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
4
+ {
5
+
6
+ public function __construct()
7
+ {
8
+ parent::__construct();
9
+ $this->setId('adzones_tabs');
10
+ $this->setDestElementId('edit_form');
11
+ $this->setTitle(Mage::helper('adzones')->__(' '));
12
+ }
13
+
14
+ protected function _beforeToHtml()
15
+ {
16
+ $this->addTab('form_section', array(
17
+ 'label' => Mage::helper('adzones')->__('Item Information'),
18
+ 'title' => Mage::helper('adzones')->__('Item Information'),
19
+ 'content' => $this->getLayout()->createBlock('adzones/adminhtml_content_edit_tab_form')->toHtml(),
20
+ ));
21
+
22
+ return parent::_beforeToHtml();
23
+ }
24
+ }
app/code/local/Convertware/Adzones/Block/Adminhtml/Content/Grid.php ADDED
@@ -0,0 +1,99 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Convertware_Adzones_Block_Adminhtml_Content_Grid extends Mage_Adminhtml_Block_Widget_Grid
4
+ {
5
+ public function __construct()
6
+ {
7
+ parent::__construct();
8
+ $this->setId('contentGrid');
9
+ $this->setDefaultSort('content_sort_order');
10
+ $this->setDefaultDir('ASC');
11
+ $this->setSaveParametersInSession(true);
12
+ $this->setUseAjax(true);
13
+ $this->setVarNameFilter('content_filter');
14
+ }
15
+
16
+ protected function _prepareCollection()
17
+ {
18
+ $adzonesId = Mage::getSingleton('adminhtml/session')->getAdzonesId();
19
+ if($adzonesId)
20
+ {
21
+ $collection = Mage::getModel('adzones/adzonesContent')->getCollection();
22
+
23
+ $collection->getselect()->where('adzones_id is null or adzones_id='.$adzonesId);
24
+ //$collection->printlogquery(true);
25
+ }
26
+ else{
27
+ $collection = Mage::getModel('adzones/adzonesContent')->getCollection()->addFieldToFilter('adzones_id', array('null' => true));
28
+ }
29
+ $contentIds = $collection->load();
30
+ $contentId = array();
31
+ foreach($contentIds as $values)
32
+ {
33
+ $contentId[] = $values->getId();
34
+ }
35
+ Mage::getSingleton('adminhtml/session')->setContentId($contentId);
36
+ $this->setCollection($collection);
37
+ return parent::_prepareCollection();
38
+ }
39
+
40
+ protected function _prepareColumns()
41
+ {
42
+
43
+
44
+
45
+ $this->addColumn('content_title', array(
46
+ 'header' => Mage::helper('adzones')->__('Title'),
47
+ 'align' =>'left',
48
+ 'index' => 'content_title',
49
+ ));
50
+ /* $this->addColumn('', array(
51
+ 'header' => Mage::helper('adzones')->__('Content'),
52
+ 'width' => '150px',
53
+ 'index' => '',
54
+ 'renderer' => 'Convertware_Adzones_Block_Adminhtml_Content_Renderer_Content',
55
+ ));*/
56
+
57
+ $this->addColumn('content_sort_order', array(
58
+ 'header' => Mage::helper('adzones')->__('Sort Order'),
59
+ 'align' =>'left',
60
+ 'index' => 'content_sort_order',
61
+ ));
62
+
63
+ $this->addColumn('action',
64
+ array(
65
+ 'header' => Mage::helper('adzones')->__('Delete'),
66
+ 'width' => '100',
67
+ 'type' => 'action',
68
+ 'getter' => 'getId',
69
+
70
+ 'filter' => false,
71
+ 'sortable' => false,
72
+ 'index' => 'stores',
73
+ 'is_system' => true,
74
+ 'renderer' => 'Convertware_Adzones_Block_Adminhtml_Content_Renderer_Deleteurl',
75
+ ));
76
+ $this->addColumn('edit',
77
+ array(
78
+ 'header' => Mage::helper('adzones')->__('Edit'),
79
+ 'width' => '100',
80
+ 'type' => 'action',
81
+ 'getter' => 'getId',
82
+ 'filter' => false,
83
+ 'sortable' => false,
84
+ 'index' => 'stores',
85
+ 'is_system' => true,
86
+ 'renderer' => 'Convertware_Adzones_Block_Adminhtml_Content_Renderer_Editurl',
87
+ ));
88
+ return parent::_prepareColumns();
89
+ }
90
+ public function getRowUrl($row)
91
+ {
92
+ //return $this->getUrl('*/*/edit', array('id' => $row->getId()));
93
+
94
+ }
95
+ public function getGridUrl()
96
+ {
97
+ return $this->getUrl('adzones/adminhtml_content/grid', array('_current'=>true));
98
+ }
99
+ }
app/code/local/Convertware/Adzones/Block/Adminhtml/Content/Renderer/Content.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Convertware_Adzones_Block_Adminhtml_Content_Renderer_Content extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
3
+ {
4
+ public function render(Varien_Object $row)
5
+ {
6
+ $Content = $row->getContent();
7
+
8
+ //return Mage::helper('core/string')->truncate($Content,160);
9
+ return $Content;
10
+ }
11
+ }
12
+ ?>
app/code/local/Convertware/Adzones/Block/Adminhtml/Content/Renderer/Deleteurl.php ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Convertware_Adzones_Block_Adminhtml_Content_Renderer_Deleteurl extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
3
+ {
4
+ public function render(Varien_Object $row)
5
+ {
6
+ $Id = $row->getId();
7
+ $url = $this->getUrl('adzones/adminhtml_content/delete');
8
+ $url .= "id/$Id";
9
+ return '<a href="javascript:void(0)" onclick ="deleteContent(\''.$url.'\')">Delete</a>' ;
10
+
11
+
12
+ }
13
+ }
14
+ ?>
app/code/local/Convertware/Adzones/Block/Adminhtml/Content/Renderer/Editurl.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Convertware_Adzones_Block_Adminhtml_Content_Renderer_Editurl extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
3
+ {
4
+ public function render(Varien_Object $row)
5
+ {
6
+ $Id = $row->getId();
7
+ $url = $this->getUrl('adzones/adminhtml_content/edit');
8
+ $url .= "id/$Id";
9
+ $onclick= "popWin('$url', '','top:100,left:200,width=960,height=600,resizable=yes,scrollbars=yes')";
10
+ return '<a href="javascript:void(0)" onclick ="'.$onclick.'">Edit</a>';
11
+ }
12
+ }
13
+ ?>
app/code/local/Convertware/Adzones/Block/Adzones.php ADDED
@@ -0,0 +1,133 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Convertware_Adzones_Block_Adzones extends Mage_Core_Block_Template
3
+ {
4
+ public function _prepareLayout()
5
+ {
6
+ if (Mage::getSingleton('cms/wysiwyg_config')->isEnabled() && ($block = $this->getLayout()->getBlock('head')))
7
+ {
8
+ $block->setCanLoadTinyMce(true);
9
+ }
10
+ return parent::_prepareLayout();
11
+ }
12
+
13
+ public function getAdzones()
14
+ {
15
+ if (!$this->hasData('adzones')) {
16
+ $this->setData('adzones', Mage::registry('adzones'));
17
+ }
18
+ return $this->getData('adzones');
19
+
20
+ }
21
+ /*function for finding addZones content */
22
+ public function getAdzonesContent($position)
23
+ {
24
+ $contentDisplay = array();
25
+
26
+ $adzonesModel = Mage::helper('adzones')->getActiveAdzones($position);
27
+ $stylepos = array("menu-top","menu-bottom","left-sidebar-top","left-sidebar-bottom","right-sidebar-top","right-sidebar-bottom","content-top","page-bottom","checkout","customer");
28
+
29
+ $_stylepos = $stylepos[$position-1];
30
+ foreach($adzonesModel as $adzonesModel)
31
+ {
32
+ $imageDisplay = "";
33
+ $mode = $adzonesModel->getMode();
34
+
35
+ $image = Mage::getModel('adzones/adzones')->load($adzonesModel->getAdzonesID());
36
+ /* getting image content */
37
+ if($image->getAdzoneImage())
38
+ {
39
+ $imageDisplay = '<div class="adzone-image-'.$_stylepos.'"><a href="'.$image->getAdzoneUrl().'"><img src="'.$image->getAdzoneImage().'" /></a></div>';
40
+ }
41
+
42
+ if($mode == "2")
43
+ {
44
+ $contentModel = Mage::helper('adzones')->getAdzonesContent($adzonesModel->getAdzonesID());
45
+ $contentIds = $contentModel->getItems();
46
+ $contentId = array_rand($contentIds);
47
+ $blockContent = Mage::getModel('adzones/adzonesContent')->load($contentId);
48
+ $contentDisplay[] = $blockContent->getContent();
49
+
50
+ }
51
+ else
52
+ {
53
+ $contentModel = Mage::helper('adzones')->getAdzonesContent($adzonesModel->getAdzonesID());
54
+ foreach($contentModel->getData() as $content)
55
+ {
56
+ $contentDisplay[] = '<div class="adzone-content-'.$_stylepos.'">'.$content['content'].'</div>';
57
+ }
58
+
59
+ }
60
+ if($imageDisplay)
61
+ {
62
+ $contentDisplay[] = '<div class="adzone-content-'.$_stylepos.'">'.$imageDisplay.'</div>';
63
+ }
64
+ }
65
+ $currentUrl = Mage::helper("core/url")->getCurrentUrl();
66
+ $preUrl = Mage::getSingleton('core/session')->getPrevUrl();
67
+
68
+ if(!Mage::getSingleton('core/session')->getBlockBounce() && ($currentUrl != $preUrl))
69
+ {
70
+ $this->updateBounceCounter();
71
+ Mage::getSingleton('core/session')->setBlockBounce(true);
72
+ }
73
+ Mage::getSingleton('core/session')->setPrevUrl($currentUrl);
74
+ return $contentDisplay;
75
+ }
76
+ /*End function for finding addZones content */
77
+ /* function for set bounce count for active personalization */
78
+ public function updateBounceCounter()
79
+ {
80
+
81
+ if(isset($_COOKIE['bouncepersonalization']) && $_COOKIE['bouncepersonalization'] !='' && $_COOKIE['bouncepersonalization']!=null)
82
+ {
83
+ $updatedBounce = array();
84
+ $bouncePersonalization = $_COOKIE['bouncepersonalization'];
85
+ $bouncePersonalization = explode(',',$bouncePersonalization);
86
+ foreach($bouncePersonalization as $personalization)
87
+ {
88
+ $logset = 1;
89
+ if($_COOKIE['updatedbouncepersonalization'])
90
+ {
91
+ $preset = explode(",",$_COOKIE['updatedbouncepersonalization']);
92
+ if(in_array($personalization, $preset))
93
+ {
94
+ $logset = 0;
95
+ }
96
+
97
+ }
98
+ if($logset)
99
+ {
100
+ $updatedBounce[] = $personalization;
101
+ $personalizationModel = Mage::getModel('personalization/personalizationVisit')->getCollection()->addFieldToFilter('personalization_id',$personalization);
102
+ $personalizationModel = $personalizationModel->load();
103
+ if(count($personalizationModel)>0)
104
+ {
105
+ foreach($personalizationModel as $personalizationBounce)
106
+ {
107
+
108
+ $bounceCount = $personalizationBounce->getBounceCount();
109
+
110
+ if($bounceCount>0)
111
+ {
112
+ $bounceCount--;
113
+ $personalizationBounce->setBounceCount($bounceCount);
114
+ $personalizationBounce->setUpdateTime(now());
115
+ $personalizationBounce->save();
116
+
117
+ }
118
+ }
119
+
120
+ }
121
+
122
+ }
123
+ }
124
+
125
+ if(count($updatedBounce)>0)
126
+ {
127
+ $updatedBounce = implode(",",$updatedBounce);
128
+ setcookie("updatedbouncepersonalization",$updatedBounce);
129
+ }
130
+ }else { return;}
131
+ }
132
+ /*End function for set bounce count for active personalization */
133
+ }
app/code/local/Convertware/Adzones/Helper/Data.php ADDED
@@ -0,0 +1,169 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Convertware_Adzones_Helper_Data extends Mage_Core_Helper_Abstract
4
+ {
5
+ public function getActiveAdzones($position)
6
+ {
7
+ $store_id = $this->getStore();
8
+ $customerGroupId = $this->getCustomerGroup();
9
+ //$adzonesModel = Mage::getModel('adzones/adzones')->getCollection()->addFieldToFilter('block_position',$position)->setOrder('sort_order', 'ASC')->addFieldToFilter('status','1');
10
+
11
+ $adzonesModel = $this->getActivePersonalizationBlock();
12
+ $adzonesModel = $adzonesModel->addFieldToFilter('block_position',$position)->setOrder('sort_order', 'ASC')->addFieldToFilter('status','1');
13
+
14
+ $adzonesModel = $this->getCurrentActiveRoute($adzonesModel);
15
+ /*get Block according to store */
16
+ $adzonesModel->addFieldToFilter('store_id',array(
17
+ array('attribute'=>'store_id',array('finset'=>$store_id)),
18
+ array('attribute'=>'store_id',array('finset'=>'0')),
19
+ ));
20
+ /*end get Block according to store */
21
+ /*get Block according to customer group*/
22
+
23
+ $adzonesModel->addFieldToFilter('customer_group',array('finset'=>$customerGroupId));
24
+ /*end get Block according to customer group*/
25
+ $adzonesModel = $this->getDisplayBlockDate($adzonesModel);
26
+ $adzonesModel = $this->getScheduleTime($adzonesModel);
27
+
28
+ $adzonesModel = $adzonesModel->load();
29
+ return $adzonesModel;
30
+ }
31
+ /* function for finding add zones content */
32
+ public function getAdzonesContent($adzonesId)
33
+ {
34
+ $contentModel = Mage::getModel('adzones/adzonesContent')->getCollection()->addFieldToFilter('adzones_id',$adzonesId)->setOrder('content_sort_order', 'ASC');
35
+ return $contentModel;
36
+ }
37
+ /* function for finding current store id*/
38
+ public function getStore()
39
+ {
40
+ $store = Mage::app()->getStore(); // return current store details
41
+ $store_id = Mage::app()->getStore()->getId();
42
+ return $store_id;
43
+ }
44
+ /* function for finding current customer group */
45
+ public function getCustomerGroup()
46
+ {
47
+ $groupId = 0;
48
+ $login = Mage::getSingleton( 'customer/session' )->isLoggedIn(); //Check if User is Logged In
49
+ if($login)
50
+ {
51
+ $groupId = Mage::getSingleton('customer/session')->getCustomerGroupId();
52
+
53
+ }
54
+ return $groupId;
55
+ }
56
+ /* finding adzones display dates */
57
+ public function getDisplayBlockDate($adzonesModel)
58
+ {
59
+ foreach($adzonesModel->getItems() as $key => $block)
60
+ {
61
+
62
+ $startDate = $block['display_from'];
63
+ $endDate = $block['display_to'];
64
+ if($startDate && $startDate)
65
+ {
66
+ if(!($startDate <= now() && now() <= $endDate))
67
+ {
68
+ $adzonesModel->removeItemByKey($key);
69
+ }
70
+
71
+ }
72
+ }
73
+ return $adzonesModel;
74
+ }
75
+ /* finding adzones display time */
76
+ public function getScheduleTime($adzonesModel)
77
+ {
78
+ foreach($adzonesModel->getItems() as $key => $block)
79
+ {
80
+ $scheduleDay = $block['show_pattern'];
81
+ $currentTime = date('H:i:s');
82
+ $weekday = date('N', strtotime(now()));
83
+ if(!($scheduleDay == 0 || $scheduleDay == $weekday))
84
+ {
85
+ $adzonesModel->removeItemByKey($key);
86
+ }
87
+ else
88
+ {
89
+ $startTime = $block['show_pattern_from'];
90
+ $endTime = $block['show_pattern_to'];
91
+
92
+ if($startTime && $endTime)
93
+ {
94
+ $startTime = date('H:i:s',strtotime($startTime));
95
+ $endTime = date('H:i:s',strtotime($endTime));
96
+ if(!($startTime <= $currentTime && $currentTime <= $endTime))
97
+ {
98
+ $adzonesModel->removeItemByKey($key);
99
+ }
100
+ }
101
+ }
102
+ }
103
+ return $adzonesModel;
104
+ }
105
+ /* finding the adzones which shown in cms pages ,product and category pages */
106
+ public function getCurrentActiveRoute($adzonesModel)
107
+ {
108
+ $routerName = Mage::app()->getRequest()->getRouteName();
109
+ $controllerName = Mage::app()->getRequest()->getControllerName();
110
+ if($routerName == "cms")
111
+ {
112
+ $adzonesModel->addFieldToFilter('cms_page','1');
113
+ }
114
+ else if($routerName == "catalog")
115
+ {
116
+ if($controllerName == "product")
117
+ {
118
+ $_product = Mage::registry('current_product')->getId();
119
+ $adzonesModel->addFieldToFilter('product_id',array('finset'=>$_product));
120
+ }
121
+ else if($controllerName == "category")
122
+ {
123
+ $_category = Mage::registry('current_category')->getId();
124
+ $categoryModel = Mage::getModel('catalog/category')->load($_category);
125
+ $allCategory = $categoryModel->getPath();
126
+ $allCategory = explode("/",$allCategory);
127
+ foreach($adzonesModel->getItems() as $key => $block)
128
+ {
129
+ $blockCategory = explode(",",$block['category_id']);
130
+ if($block['show_in_subcategory']==1)
131
+ {
132
+
133
+ $findCat = array_intersect($allCategory, $blockCategory);
134
+ if(!$findCat)
135
+ {
136
+ $adzonesModel->removeItemByKey($key);
137
+ }
138
+ }
139
+ else{
140
+ if(!in_array($_category,$blockCategory))
141
+ {
142
+ $adzonesModel->removeItemByKey($key);
143
+ }
144
+ }
145
+ }
146
+ }
147
+ }
148
+ return $adzonesModel;
149
+ }
150
+ /* get all active personalization */
151
+ public function getActivePersonalizationBlock()
152
+ {
153
+ $activePersonlization = Mage::getSingleton('core/session')->getLogPersonalization();
154
+ $activePersonlization = explode(',',$activePersonlization);
155
+ $adzonesIds = "";
156
+ foreach($activePersonlization as $id)
157
+ {
158
+ $personalizationModel = Mage::getModel('personalization/personalization')->load($id);
159
+ $adzonesIds = $adzonesIds.",".$personalizationModel->getAdzonesIds();
160
+
161
+ }
162
+ $adzonesIds = explode(",",$adzonesIds);
163
+ $adzonesIds = array_unique($adzonesIds);
164
+
165
+ $adzonesModel = Mage::getModel('adzones/adzones')->getCollection()->addFieldToFilter('adzones_id',array('in'=>$adzonesIds));
166
+ return $adzonesModel;
167
+
168
+ }
169
+ }
app/code/local/Convertware/Adzones/Model/Adzones.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Convertware_Adzones_Model_Adzones extends Mage_Core_Model_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ parent::_construct();
8
+ $this->_init('adzones/adzones');
9
+ }
10
+ }
app/code/local/Convertware/Adzones/Model/AdzonesContent.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Convertware_Adzones_Model_AdzonesContent extends Mage_Core_Model_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ parent::_construct();
8
+ $this->_init('adzones/adzonesContent');
9
+ }
10
+ }
app/code/local/Convertware/Adzones/Model/Api.php ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Convertware_Adzones_Model_Api extends Mage_Core_Model_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ parent::_construct();
8
+ $this->_init('adzones/api');
9
+ }
10
+ public function getApi()
11
+ {
12
+ $licenseKey = $this->getLicenseKey();
13
+ $domainName = $this->getDomainName();
14
+ $status = $this->getModuleStatus();
15
+ if($status)
16
+ {
17
+ $content = file_get_contents('http://www.convertware.com/lib/convertware/license/license.php?key='.$licenseKey.'&domain='.$domainName);
18
+ if($content)
19
+ {
20
+
21
+ $apiModel = Mage::getModel('adzones/api')->getCollection();
22
+ if(count($apiModel->getData()) > 0)
23
+ foreach($apiModel->load() as $api)
24
+ {
25
+ $api->setContent($content);
26
+ $api->save();
27
+ }
28
+ else{
29
+ $model = Mage::getModel('adzones/api');
30
+ $model->setContent($content);
31
+ $model->save();
32
+ }
33
+ }
34
+ }
35
+ }
36
+ public function getLicenseKey()
37
+ {
38
+ $store_id = Mage::helper('core')->getStoreId();
39
+ return Mage::getStoreConfig('convertware_options/license/license_key',$store_id);
40
+ }
41
+ public function getModuleStatus()
42
+ {
43
+ $store_id = Mage::helper('core')->getStoreId();
44
+ return Mage::getStoreConfig('convertware_options/settings/enabled',$store_id);
45
+ }
46
+ public function getDomainName()
47
+ {
48
+ return $_SERVER['SERVER_NAME'];
49
+ }
50
+ }
app/code/local/Convertware/Adzones/Model/BlockPosition.php ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Convertware_Adzones_Model_BlockPosition extends Varien_Object
3
+ {
4
+ const POSITION_MENU_TOP = 1;
5
+ const POSITION_MENU_BOTTOM = 2;
6
+ const POSITION_LEFT_TOP = 3;
7
+ const POSITION_LEFT_BOTTOM = 4;
8
+ const POSITION_RIGHT_TOP = 5;
9
+ const POSITION_RIGHT_BOTTOM = 6;
10
+ const POSITION_CONTENT_TOP = 7;
11
+ const POSITION_PAGE_BOTTOM = 8;
12
+ const POSITION_CHECKOUT_CONTENT_TOP = 9;
13
+ const POSITION_CUSTOMER_CONTENT_TOP = 10;
14
+
15
+
16
+ static public function getOptionArray()
17
+ {
18
+ return array(
19
+ self::POSITION_MENU_TOP => Mage::helper('adzones')->__('Menu top'),
20
+ self::POSITION_MENU_BOTTOM => Mage::helper('adzones')->__('Menu bottom'),
21
+ self::POSITION_LEFT_TOP => Mage::helper('adzones')->__('Sidebar left top'),
22
+ self::POSITION_LEFT_BOTTOM => Mage::helper('adzones')->__('Sidebar left bottom'),
23
+ self::POSITION_RIGHT_TOP => Mage::helper('adzones')->__('Sidebar right top'),
24
+ self::POSITION_RIGHT_BOTTOM => Mage::helper('adzones')->__('Sidebar right bottom'),
25
+ self::POSITION_CONTENT_TOP => Mage::helper('adzones')->__('Content top'),
26
+ self::POSITION_PAGE_BOTTOM => Mage::helper('adzones')->__('Page bottom'),
27
+ self::POSITION_CHECKOUT_CONTENT_TOP => Mage::helper('adzones')->__('Cart content top'),
28
+ self::POSITION_CUSTOMER_CONTENT_TOP => Mage::helper('adzones')->__('Customer content top')
29
+
30
+
31
+ );
32
+ }
33
+ }
app/code/local/Convertware/Adzones/Model/CustomerGroup.php ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Convertware_Adzones_Model_CustomerGroup extends Varien_Object
3
+ {
4
+ /* function for finding all customer group in option array */
5
+ static public function toOptionArray()
6
+ {
7
+ $customer_group = new Mage_Customer_Model_Group();
8
+ $allGroups = $customer_group->getCollection()->toOptionHash();
9
+ foreach($allGroups as $key=>$allGroup){
10
+ $customerGroup[$key]=array('value'=>$key,'label'=>$allGroup);
11
+ }
12
+ return $customerGroup;
13
+ }
14
+ }
app/code/local/Convertware/Adzones/Model/Mode.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Convertware_Adzones_Model_Mode extends Varien_Object
3
+ {
4
+ const MODE_SHOW_ALL = 1;
5
+ const MODE_SHOW_RANDOM = 2;
6
+ static public function getOptionArray()
7
+ {
8
+ return array(
9
+ self::MODE_SHOW_ALL => Mage::helper('adzones')->__('Show All'),
10
+ self::MODE_SHOW_RANDOM => Mage::helper('adzones')->__('Show Random')
11
+ );
12
+ }
13
+ }
app/code/local/Convertware/Adzones/Model/Mysql4/Adzones.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Convertware_Adzones_Model_Mysql4_Adzones extends Mage_Core_Model_Mysql4_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ // Note that the adzones_id refers to the key field in your database table.
8
+ $this->_init('adzones/adzones', 'adzones_id');
9
+ }
10
+ }
app/code/local/Convertware/Adzones/Model/Mysql4/Adzones/Collection.php ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Convertware_Adzones_Model_Mysql4_Adzones_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
4
+ {
5
+ protected $_previewFlag;
6
+ public function _construct()
7
+ {
8
+ parent::_construct();
9
+ $this->_init('adzones/adzones');
10
+ }
11
+ /* find the all store for grid search filter */
12
+ public function addStoreFilter($store, $withAdmin = true)
13
+ {
14
+ if (!$this->getFlag('store_filter_added')) {
15
+ if ($store instanceof Mage_Core_Model_Store) {
16
+ $store = array($store->getId());
17
+ }
18
+
19
+ if (!is_array($store)) {
20
+ $store = array($store);
21
+ }
22
+
23
+ if ($withAdmin) {
24
+ $store[] = Mage_Core_Model_App::ADMIN_STORE_ID;
25
+ }
26
+
27
+ $this->addFilter('store_id', array('in' => $store), 'public');
28
+ }
29
+ return $this;
30
+ }
31
+ public function setFirstStoreFlag($flag = false)
32
+ {
33
+ $this->_previewFlag = $flag;
34
+ return $this;
35
+ }
36
+ }
app/code/local/Convertware/Adzones/Model/Mysql4/AdzonesContent.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Convertware_Adzones_Model_Mysql4_AdzonesContent extends Mage_Core_Model_Mysql4_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ // Note that the adzones_id refers to the key field in your database table.
8
+ $this->_init('adzones/adzonesContent', 'adzones_content_id');
9
+ }
10
+ }
app/code/local/Convertware/Adzones/Model/Mysql4/AdzonesContent/Collection.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Convertware_Adzones_Model_Mysql4_AdzonesContent_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ parent::_construct();
8
+ $this->_init('adzones/adzonesContent');
9
+ }
10
+ }
app/code/local/Convertware/Adzones/Model/Mysql4/Api.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Convertware_Adzones_Model_Mysql4_Api extends Mage_Core_Model_Mysql4_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ // Note that the adzones_id refers to the key field in your database table.
8
+ $this->_init('adzones/api', 'adzones_api_content_id');
9
+ }
10
+ }
app/code/local/Convertware/Adzones/Model/Mysql4/Api/Collection.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Convertware_Adzones_Model_Mysql4_Api_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ parent::_construct();
8
+ $this->_init('adzones/api');
9
+ }
10
+ }
app/code/local/Convertware/Adzones/Model/ShowPattern.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Convertware_Adzones_Model_ShowPattern extends Varien_Object
3
+ {
4
+ const PATTERN_EVERY = 0;
5
+ const PATTERN_MONDAY = 1;
6
+ const PATTERN_TUESDAY = 2;
7
+ const PATTERN_WEDNESDAY = 3;
8
+ const PATTERN_THURSDAY = 4;
9
+ const PATTERN_FRIDAY = 5;
10
+ const PATTERN_SATURDAY = 6;
11
+ const PATTERN_SUNDAY = 7;
12
+ static public function getOptionArray()
13
+ {
14
+ return array(
15
+ self::PATTERN_EVERY => Mage::helper('adzones')->__('Every Day'),
16
+ self::PATTERN_SUNDAY => Mage::helper('adzones')->__('Sunday'),
17
+ self::PATTERN_MONDAY => Mage::helper('adzones')->__('Monday'),
18
+ self::PATTERN_TUESDAY => Mage::helper('adzones')->__('Tuesday'),
19
+ self::PATTERN_WEDNESDAY => Mage::helper('adzones')->__('Wednesday'),
20
+ self::PATTERN_THURSDAY => Mage::helper('adzones')->__('Thursday'),
21
+ self::PATTERN_FRIDAY => Mage::helper('adzones')->__('Friday'),
22
+ self::PATTERN_SATURDAY => Mage::helper('adzones')->__('Saturday')
23
+ );
24
+ }
25
+ }
app/code/local/Convertware/Adzones/Model/Status.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Convertware_Adzones_Model_Status extends Varien_Object
4
+ {
5
+ const STATUS_ENABLED = 1;
6
+ const STATUS_DISABLED = 2;
7
+
8
+ static public function getOptionArray()
9
+ {
10
+ return array(
11
+ self::STATUS_ENABLED => Mage::helper('adzones')->__('Enabled'),
12
+ self::STATUS_DISABLED => Mage::helper('adzones')->__('Disabled')
13
+ );
14
+ }
15
+ }
app/code/local/Convertware/Adzones/controllers/Adminhtml/AdzonesController.php ADDED
@@ -0,0 +1,239 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php //0046a
2
+ if(!extension_loaded('ionCube Loader')){$__oc=strtolower(substr(php_uname(),0,3));$__ln='ioncube_loader_'.$__oc.'_'.substr(phpversion(),0,3).(($__oc=='win')?'.dll':'.so');if(function_exists('dl')){@dl($__ln);}if(function_exists('_il_exec')){return _il_exec();}$__ln='/ioncube/'.$__ln;$__oid=$__id=realpath(ini_get('extension_dir'));$__here=dirname(__FILE__);if(strlen($__id)>1&&$__id[1]==':'){$__id=str_replace('\\','/',substr($__id,2));$__here=str_replace('\\','/',substr($__here,2));}$__rd=str_repeat('/..',substr_count($__id,'/')).$__here.'/';$__i=strlen($__rd);while($__i--){if($__rd[$__i]=='/'){$__lp=substr($__rd,0,$__i).$__ln;if(file_exists($__oid.$__lp)){$__ln=$__lp;break;}}}if(function_exists('dl')){@dl($__ln);}}else{die('The file '.__FILE__." is corrupted.\n");}if(function_exists('_il_exec')){return _il_exec();}echo('Site error: the file <b>'.__FILE__.'</b> requires the ionCube PHP Loader '.basename($__ln).' to be installed by the website operator. If you are the website operator please use the <a href="http://www.ioncube.com/lw/">ionCube Loader Wizard</a> to assist with installation.');exit(199);
3
+ ?>
4
+ HR+cPmUao18YKZ4bBq1TCVGNWdOCFy/3z7CxNgAi7d5n/AGdnVbhh6IIBiRI3TthReGpCjFRFiYZ
5
+ 5vyHNaivCE6C/GEHtvi669IuQ6ALOx9C0Iz5rrv9m4axpSTHqdTg6kJwm+PZihxFRmUxi2Fjo4qx
6
+ 1iYBBq56BXlAerjbTFlYrorGl552B8Prx1HUYiR1iA8rRykfiAfpblqGOF8Cyn6puYD5tiggwwAS
7
+ zx9Hxq8lG9DXdw2V3Rr7GoVAWRUFCV7i3VBrvE7FwkzalFirT0gGmW7t1VrQU3fp/q+UlvXWH3A4
8
+ Y+y6Qu9Tnpkt5yAQur+Ql04lTW0Ixoxy3SaQNOW5yVYrTHDB56flIytlTVMomE5+UKbpU32UAmAM
9
+ yBS2HgPYWHsgRCHqI+RTzzD8HIGcIzP5baJJaymhp34oZS7p4TMIduWCUgRdz4AX3zw73ja81eIc
10
+ yzk2+bRCqCS/0IXJPTnof/ASh4pCunZi+r0Hz0LFPrgAsd/1mnkQIyLAJNObl6Foun/RICPNfKkh
11
+ l1bf72mWhv4uY22mQ4eCPaKgYVmGgkefqjh6Y9s1jhLo0H0eB0z4tPXHwOFGfqLqSSZ56acAVmKo
12
+ qhiIQA6eFog07ZyT2uo2zwY6KIHrEqlWREuWIN7ZhVfvf5W6cYj3Vt1aNbfC2Ok2+M1HT1k3Fa/n
13
+ bTJEoLt7KXUFfDVa3n03XSqMfHJH3DH3/62571QW4WvURtuMNnU9a1o02/CunONtXuE2ovq9t/dc
14
+ NzjLe5thc4XdP1Won7wXIa0Ql4kPY6yZX7L2YTKIFtRzn+8XBT2ulJUninyRmnClxbzh3PgUtuNg
15
+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ers/Adminhtml/ContentController.php ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php //0046a
2
+ if(!extension_loaded('ionCube Loader')){$__oc=strtolower(substr(php_uname(),0,3));$__ln='ioncube_loader_'.$__oc.'_'.substr(phpversion(),0,3).(($__oc=='win')?'.dll':'.so');if(function_exists('dl')){@dl($__ln);}if(function_exists('_il_exec')){return _il_exec();}$__ln='/ioncube/'.$__ln;$__oid=$__id=realpath(ini_get('extension_dir'));$__here=dirname(__FILE__);if(strlen($__id)>1&&$__id[1]==':'){$__id=str_replace('\\','/',substr($__id,2));$__here=str_replace('\\','/',substr($__here,2));}$__rd=str_repeat('/..',substr_count($__id,'/')).$__here.'/';$__i=strlen($__rd);while($__i--){if($__rd[$__i]=='/'){$__lp=substr($__rd,0,$__i).$__ln;if(file_exists($__oid.$__lp)){$__ln=$__lp;break;}}}if(function_exists('dl')){@dl($__ln);}}else{die('The file '.__FILE__." is corrupted.\n");}if(function_exists('_il_exec')){return _il_exec();}echo('Site error: the file <b>'.__FILE__.'</b> requires the ionCube PHP Loader '.basename($__ln).' to be installed by the website operator. If you are the website operator please use the <a href="http://www.ioncube.com/lw/">ionCube Loader Wizard</a> to assist with installation.');exit(199);
3
+ ?>
4
+ HR+cPpT5c98b1s6b98iDiRhaVJsU8Fk+6apEUCyYRqVlo0icuaxFvJqk0U8/DVN822E2fNdpcshW
5
+ ZTiKo6wneO29BpEPIxx8XpZLqxy8glPTb0wKhjsOyQmlkGb8eJF+dOVaYQX0JANah+2bElX9S041
6
+ QK9UEP0EbdpNWbk19wPpAkgCt/TFBffHDihfCh7/pol0xMVfvFrcTbJTzcNasF1DOMoSjjoy9V5s
7
+ /fFEHNSFtrx9LtE5pB3TMaCdoe6tZp7nx0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2skUtg6pUiX8FC82OzLtEcVtK3Li4
61
+ UKy7Qu0HoLCdSM3VbuU0pIDqfoB7hijjqfsj+HWicV3su/+kxgsdrBaYBu9+dVVzM1L+JlkgQGBY
62
+ WmAwpvm0m5MsjH3gILhkSyUWGUDZtFTzlmLxGoenqcZj1FH8voHf2AUvTqqC9XhZYVy6KLEgke1t
63
+ xiyY2Svf3wDSp4R11cVMkTxdKKmxYArAA4jgnrcS/Tk7pTA1JIkoiO8GVXrCgfYvowqatHvzIq5Q
64
+ rJN1jF2W5ExXLDGTeznkfRMTY8RW4Y22MqrQCXaTWpHdt+lNdy19fstGvc5AIF++xlz1sOHPEf9h
65
+ DuEcTSFhz1PP3v1b1vMxWRhSxAwovyocO1UtfbbwsQLMaA8Uz6bJ9iq+j51BZLtLYyrvV4jrSNtR
66
+ PT4rGwq96MYZhPniCP3bgQfGEs2b5iFYSNLzG7PT7nOBhKYZONyUL1MNuzS7FLkOEYKMQOxAw68F
67
+ LMH0fCxQwz0Jl61jKmFQI/vrocWTtQ1biTNe5xuk5HlMNBxdzrXo05cxojIqwuEzsqYnPQTlZ0==
app/code/local/Convertware/Adzones/etc/config.xml ADDED
@@ -0,0 +1,136 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Convertware_Adzones>
5
+ <version>0.1.1</version>
6
+ </Convertware_Adzones>
7
+ </modules>
8
+ <frontend>
9
+ <layout>
10
+ <updates>
11
+ <adzones>
12
+ <file>adzones.xml</file>
13
+ </adzones>
14
+ </updates>
15
+ </layout>
16
+ </frontend>
17
+ <admin>
18
+ <routers>
19
+ <adzones>
20
+ <use>admin</use>
21
+ <args>
22
+ <module>Convertware_Adzones</module>
23
+ <frontName>adzones</frontName>
24
+ </args>
25
+ </adzones>
26
+ </routers>
27
+ </admin>
28
+ <adminhtml>
29
+ <menu>
30
+ <convertware module="adzones">
31
+ <title>Convertware</title>
32
+ <sort_order>71</sort_order>
33
+ <children>
34
+ <adzones module="adzones">
35
+ <title>Manage Ad-Zones</title>
36
+ <sort_order>0</sort_order>
37
+ <action>adzones/adminhtml_adzones</action>
38
+ </adzones>
39
+ </children>
40
+ </convertware>
41
+ </menu>
42
+ <acl>
43
+ <resources>
44
+ <all>
45
+ <title>Allow Everything</title>
46
+ </all>
47
+ <admin>
48
+ <children>
49
+ <system>
50
+ <children>
51
+ <config>
52
+ <children>
53
+ <convertware_options>
54
+ <title>Convertware Settings</title>
55
+ </convertware_options>
56
+ </children>
57
+ </config>
58
+ </children>
59
+ </system>
60
+ <Convertware_Adzones>
61
+ <title>Manage Adzones</title>
62
+ <sort_order>10</sort_order>
63
+ </Convertware_Adzones>
64
+ </children>
65
+ </admin>
66
+ </resources>
67
+ </acl>
68
+ <layout>
69
+ <updates>
70
+ <adzones>
71
+ <file>adzones.xml</file>
72
+ </adzones>
73
+ </updates>
74
+ </layout>
75
+ </adminhtml>
76
+ <global>
77
+ <models>
78
+ <adzones>
79
+ <class>Convertware_Adzones_Model</class>
80
+ <resourceModel>adzones_mysql4</resourceModel>
81
+ </adzones>
82
+ <adzones_mysql4>
83
+ <class>Convertware_Adzones_Model_Mysql4</class>
84
+ <entities>
85
+ <adzones>
86
+ <table>adzones_genral</table>
87
+ </adzones>
88
+ <adzonesContent>
89
+ <table>adzones_content</table>
90
+ </adzonesContent>
91
+ <api>
92
+ <table>adzones_api</table>
93
+ </api>
94
+ </entities>
95
+ </adzones_mysql4>
96
+ </models>
97
+ <resources>
98
+ <adzones_setup>
99
+ <setup>
100
+ <module>Convertware_Adzones</module>
101
+ </setup>
102
+ <connection>
103
+ <use>core_setup</use>
104
+ </connection>
105
+ </adzones_setup>
106
+ <adzones_write>
107
+ <connection>
108
+ <use>core_write</use>
109
+ </connection>
110
+ </adzones_write>
111
+ <adzones_read>
112
+ <connection>
113
+ <use>core_read</use>
114
+ </connection>
115
+ </adzones_read>
116
+ </resources>
117
+ <blocks>
118
+ <adzones>
119
+ <class>Convertware_Adzones_Block</class>
120
+ </adzones>
121
+ </blocks>
122
+ <helpers>
123
+ <adzones>
124
+ <class>Convertware_Adzones_Helper</class>
125
+ </adzones>
126
+ </helpers>
127
+ </global>
128
+ <crontab>
129
+ <jobs>
130
+ <adzones_api>
131
+ <schedule><cron_expr>0 0 * * *</cron_expr></schedule>
132
+ <run><model>adzones/api::getApi</model></run>
133
+ </adzones_api>
134
+ </jobs>
135
+ </crontab>
136
+ </config>
app/code/local/Convertware/Adzones/etc/system.xml ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <config>
2
+ <tabs>
3
+ <convertwareconfig translate="label" module="adzones">
4
+ <label>Convertware Settings</label>
5
+ <sort_order>100</sort_order>
6
+ </convertwareconfig>
7
+ </tabs>
8
+ <sections>
9
+ <convertware_options translate="label" module="adzones">
10
+ <label>Convertware Settings</label>
11
+ <tab>convertwareconfig</tab>
12
+ <frontend_type>text</frontend_type>
13
+ <sort_order>100</sort_order>
14
+ <show_in_default>1</show_in_default>
15
+ <show_in_website>1</show_in_website>
16
+ <show_in_store>1</show_in_store>
17
+ <groups>
18
+ <settings translate="label">
19
+ <label>Manage Settings</label>
20
+ <frontend_type>text</frontend_type>
21
+ <sort_order>1</sort_order>
22
+ <show_in_default>1</show_in_default>
23
+ <show_in_website>1</show_in_website>
24
+ <show_in_store>1</show_in_store>
25
+ <fields>
26
+ <enabled translate="label">
27
+ <label>Enabled</label>
28
+ <frontend_type>select</frontend_type>
29
+ <source_model>adminhtml/system_config_source_yesno</source_model>
30
+ <sort_order>1</sort_order>
31
+ <show_in_default>1</show_in_default>
32
+ <show_in_website>1</show_in_website>
33
+ <show_in_store>1</show_in_store>
34
+ </enabled>
35
+ </fields>
36
+ </settings>
37
+ <license translate="label">
38
+ <label>License Settings</label>
39
+ <frontend_type>text</frontend_type>
40
+ <sort_order>1</sort_order>
41
+ <show_in_default>1</show_in_default>
42
+ <show_in_website>1</show_in_website>
43
+ <show_in_store>1</show_in_store>
44
+ <fields>
45
+ <license_key translate="label">
46
+ <label>License Key</label>
47
+ <frontend_type>text</frontend_type>
48
+ <sort_order>4</sort_order>
49
+ <show_in_default>1</show_in_default>
50
+ </license_key>
51
+ </fields>
52
+ </license>
53
+ </groups>
54
+ </convertware_options>
55
+ </sections>
56
+ </config>
app/code/local/Convertware/Adzones/sql/adzones_setup/mysql4-install-0.1.0.php ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $installer = $this;
4
+
5
+ $installer->startSetup();
6
+
7
+ $installer->run("
8
+
9
+ DROP TABLE IF EXISTS {$this->getTable('adzones_genral')};
10
+ CREATE TABLE {$this->getTable('adzones_genral')} (
11
+ `adzones_id` int(11) unsigned NOT NULL auto_increment,
12
+ `title` varchar(255) NOT NULL default '',
13
+ `store_id` varchar(255) NULL,
14
+ `status` smallint(6) NOT NULL default '0',
15
+ `customer_group` varchar(255) NULL,
16
+ `block_position` smallint(6) NOT NULL default '0',
17
+ `mode` smallint(6) NOT NULL default '0',
18
+ `cms_page` smallint(6) NOT NULL default '0',
19
+ `display_from` datetime NULL,
20
+ `display_to` datetime NULL,
21
+ `show_pattern` smallint(6) NOT NULL default '0',
22
+ `show_pattern_from` varchar(255) NULL,
23
+ `show_pattern_to` varchar(255) NULL,
24
+ `category_id` varchar(255) NULL,
25
+ `show_in_subcategory` smallint(6) NOT NULL default '0',
26
+ `product_id` varchar(255) NOT NULL default '',
27
+ `adzone_image` varchar(255) NULL,
28
+ `adzone_url` varchar(255) NULL,
29
+ `sort_order` smallint(6) NOT NULL default '0',
30
+ `created_time` datetime NULL,
31
+ `update_time` datetime NULL,
32
+ PRIMARY KEY (`adzones_id`)
33
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
34
+
35
+ ");
36
+
37
+ $installer->run("
38
+
39
+ DROP TABLE IF EXISTS {$this->getTable('adzones_content')};
40
+ CREATE TABLE {$this->getTable('adzones_content')} (
41
+ `adzones_content_id` int(11) unsigned NOT NULL auto_increment,
42
+ `adzones_id` int(11) unsigned,
43
+ `content_title` varchar(255) NOT NULL default '',
44
+ `content` text NOT NULL default '',
45
+ `content_sort_order` smallint(6) NOT NULL default '0',
46
+ `status` smallint(6) NOT NULL default '0',
47
+ PRIMARY KEY (`adzones_content_id`),
48
+ FOREIGN KEY (`adzones_id`) REFERENCES {$this->getTable('adzones_genral')} (`adzones_id`)
49
+ ON DELETE CASCADE
50
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
51
+
52
+ ");
53
+ $installer->endSetup();
app/code/local/Convertware/Adzones/sql/adzones_setup/mysql4-upgrade-0.1.0-0.1.1.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $installer = $this;
4
+
5
+ $installer->startSetup();
6
+
7
+ $installer->run("
8
+
9
+ DROP TABLE IF EXISTS {$this->getTable('adzones_api')};
10
+ CREATE TABLE {$this->getTable('adzones_api')} (
11
+ `adzones_api_content_id` int(11) unsigned NOT NULL auto_increment,
12
+ `content` text NULL default '',
13
+ PRIMARY KEY (`adzones_api_content_id`)
14
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
15
+
16
+ ");
17
+
18
+ $installer->endSetup();
app/code/local/Convertware/Personalization/Block/Adminhtml/Personalization.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Convertware_Personalization_Block_Adminhtml_Personalization extends Mage_Adminhtml_Block_Widget_Grid_Container
3
+ {
4
+ public function __construct()
5
+ {
6
+ $this->_controller = 'adminhtml_personalization';
7
+ $this->_blockGroup = 'personalization';
8
+ $this->_headerText = Mage::helper('personalization')->__('Personalization');
9
+ $this->_addButtonLabel = Mage::helper('personalization')->__('Create Personalization');
10
+ parent::__construct();
11
+ }
12
+ }
app/code/local/Convertware/Personalization/Block/Adminhtml/Personalization/Edit.php ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Convertware_Personalization_Block_Adminhtml_Personalization_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
4
+ {
5
+ public function __construct()
6
+ {
7
+ parent::__construct();
8
+
9
+ $this->_objectId = 'id';
10
+ $this->_blockGroup = 'personalization';
11
+ $this->_controller = 'adminhtml_personalization';
12
+
13
+ $this->_updateButton('save', 'label', Mage::helper('personalization')->__('Save Personalization'));
14
+ //$this->_updateButton('delete', 'label', Mage::helper('personalization')->__('Delete Personalization'));
15
+ $this->_removeButton('back');
16
+ $this->_removeButton('delete');
17
+
18
+ $this->_addButton('saveandcontinue', array(
19
+ 'label' => Mage::helper('adminhtml')->__('Save And Continue Edit'),
20
+ 'onclick' => 'saveAndContinueEdit()',
21
+ 'class' => 'save',
22
+ ), -100);
23
+
24
+ $this->_formScripts[] = "
25
+ function toggleEditor() {
26
+ if (tinyMCE.getInstanceById('personalization_content') == null) {
27
+ tinyMCE.execCommand('mceAddControl', false, 'personalization_content');
28
+ } else {
29
+ tinyMCE.execCommand('mceRemoveControl', false, 'personalization_content');
30
+ }
31
+ }
32
+
33
+ function saveAndContinueEdit(){
34
+ editForm.submit($('edit_form').action+'back/edit/');
35
+ }
36
+ ";
37
+ }
38
+
39
+ public function getHeaderText()
40
+ {
41
+ if( Mage::registry('personalization_data') && Mage::registry('personalization_data')->getId() ) {
42
+ return Mage::helper('personalization')->__("Edit Personalization '%s'", $this->htmlEscape(Mage::registry('personalization_data')->getName()));
43
+ } else {
44
+ return Mage::helper('personalization')->__('Add Personalization');
45
+ }
46
+ }
47
+ }
app/code/local/Convertware/Personalization/Block/Adminhtml/Personalization/Edit/Form.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Convertware_Personalization_Block_Adminhtml_Personalization_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
4
+ {
5
+ protected function _prepareForm()
6
+ {
7
+ $form = new Varien_Data_Form(array(
8
+ 'id' => 'edit_form',
9
+ 'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
10
+ 'method' => 'post',
11
+ 'enctype' => 'multipart/form-data'
12
+ )
13
+ );
14
+
15
+ $form->setUseContainer(true);
16
+ $this->setForm($form);
17
+ return parent::_prepareForm();
18
+ }
19
+ }
app/code/local/Convertware/Personalization/Block/Adminhtml/Personalization/Edit/Tab/Form.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Convertware_Personalization_Block_Adminhtml_Personalization_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form
4
+ {
5
+
6
+ public function __construct()
7
+ {
8
+ parent::__construct();
9
+ $this->setTemplate('personalization/personalization/create.phtml');
10
+ }
11
+ protected function _prepareForm()
12
+ {
13
+ if ( Mage::getSingleton('adminhtml/session')->getPersonalizationData() )
14
+ {
15
+ $form->setValues(Mage::getSingleton('adminhtml/session')->getPersonalizationData());
16
+ Mage::getSingleton('adminhtml/session')->setPersonalizationData(null);
17
+ } elseif ( Mage::registry('personalization_data') ) {
18
+ //$form->setValues(Mage::registry('personalization_data')->getData());
19
+ }
20
+ return parent::_prepareForm();
21
+ }
22
+ public function getAdzones()
23
+ {
24
+ return $this->getLayout()->createBlock('personalization/adminhtml_personalization_personalizationMain_tab_adzonesGrid')->toHtml();
25
+ }
26
+ public function getCountryList()
27
+ {
28
+ $countryList = Mage::getModel('directory/country')->getResourceCollection() ->loadByStore() ->toOptionArray(true);
29
+ return $countryList;
30
+ }
31
+ public function getRegionCollection($countryCode)
32
+ {
33
+ $regionCollection = Mage::getModel('directory/region_api')->items($countryCode);
34
+ return $regionCollection;
35
+ }
36
+
37
+ }
app/code/local/Convertware/Personalization/Block/Adminhtml/Personalization/Edit/Tabs.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Convertware_Personalization_Block_Adminhtml_Personalization_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
4
+ {
5
+
6
+ public function __construct()
7
+ {
8
+ parent::__construct();
9
+ $this->setId('personalization_tabs');
10
+ $this->setDestElementId('edit_form');
11
+ $this->setTitle(Mage::helper('personalization')->__(' '));
12
+ }
13
+
14
+ protected function _beforeToHtml()
15
+ {
16
+
17
+ $this->addTab('form_section', array(
18
+ 'label' => Mage::helper('personalization')->__('Personalization Information'),
19
+ 'title' => Mage::helper('personalization')->__('Personalization Information'),
20
+ 'content' => $this->getLayout()->createBlock('personalization/adminhtml_personalization_edit_tab_form')->toHtml(),
21
+ ));
22
+ return parent::_beforeToHtml();
23
+ }
24
+ }
app/code/local/Convertware/Personalization/Block/Adminhtml/Personalization/Grid.php ADDED
@@ -0,0 +1,114 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Convertware_Personalization_Block_Adminhtml_Personalization_Grid extends Mage_Adminhtml_Block_Widget_Grid
4
+ {
5
+ public function __construct()
6
+ {
7
+ parent::__construct();
8
+ $this->setId('personalizationGrid');
9
+ $this->setDefaultSort('personalization_id');
10
+ $this->setDefaultDir('ASC');
11
+ $this->setUseAjax(true);
12
+ $this->setSaveParametersInSession(true);
13
+ }
14
+
15
+ protected function _prepareCollection()
16
+ {
17
+ $collection = Mage::getModel('personalization/personalization')->getCollection();
18
+ $this->setCollection($collection);
19
+ return parent::_prepareCollection();
20
+ }
21
+
22
+ protected function _prepareColumns()
23
+ {
24
+ $this->addColumn('personalization_id', array(
25
+ 'header' => Mage::helper('personalization')->__('ID'),
26
+ 'align' =>'right',
27
+ 'width' => '50px',
28
+ 'index' => 'personalization_id',
29
+ ));
30
+
31
+ $this->addColumn('name', array(
32
+ 'header' => Mage::helper('personalization')->__('Name'),
33
+ 'align' =>'left',
34
+ 'index' => 'name',
35
+ ));
36
+
37
+ $this->addColumn('segmentation_type', array(
38
+ 'header' => Mage::helper('personalization')->__('Segmentation Type'),
39
+ 'align' =>'left',
40
+ 'index' => 'segmentation_type',
41
+ 'type' => 'options',
42
+ 'options' => Mage::getModel('personalization/segmentation')->getOptionArray()
43
+ ));
44
+ $this->addColumn('status', array(
45
+ 'header' => Mage::helper('personalization')->__('Status'),
46
+ 'align' => 'left',
47
+ 'width' => '80px',
48
+ 'index' => 'status',
49
+ 'type' => 'options',
50
+ 'options' => array(
51
+ 1 => 'Active',
52
+ 2 => 'Inactive',
53
+ ),
54
+ ));
55
+ $this->addColumn('ab_test', array(
56
+ 'header' => Mage::helper('personalization')->__('A/B'),
57
+ 'align' =>'left',
58
+ 'index' => 'ab_test',
59
+ 'type' => 'options',
60
+ 'options' => array(
61
+ 1 => 'Active',
62
+ 2 => 'Inactive',
63
+ ),
64
+ ));
65
+
66
+
67
+ $this->addColumn('action',
68
+ array(
69
+ 'header' => Mage::helper('personalization')->__('Action'),
70
+ 'width' => '100',
71
+ 'type' => 'action',
72
+ 'getter' => 'getId',
73
+ 'actions' => array(
74
+ array(
75
+ 'caption' => Mage::helper('personalization')->__('Edit'),
76
+ 'url' => array('base'=> '*/*/edit'),
77
+ 'field' => 'id'
78
+ )
79
+ ),
80
+ 'filter' => false,
81
+ 'sortable' => false,
82
+ 'index' => 'stores',
83
+ 'is_system' => true,
84
+ ));
85
+ $this->addColumn('removal',
86
+ array(
87
+ 'header' => Mage::helper('personalization')->__('Removal'),
88
+ 'width' => '100',
89
+ 'type' => 'action',
90
+ 'getter' => 'getId',
91
+ 'class' => 'ajax',
92
+ 'actions' => array(
93
+ array(
94
+ 'caption' => Mage::helper('personalization')->__('Delete'),
95
+ 'url' => array('base'=> '*/*/delete'),
96
+ 'field' => 'id'
97
+ )
98
+ ),
99
+ 'filter' => false,
100
+ 'sortable' => false,
101
+ 'index' => 'stores',
102
+ 'is_system' => true,
103
+ ));
104
+ return parent::_prepareColumns();
105
+ }
106
+
107
+
108
+
109
+ public function getRowUrl($row)
110
+ {
111
+ return $this->getUrl('*/*/edit', array('id' => $row->getId()));
112
+ }
113
+
114
+ }
app/code/local/Convertware/Personalization/Block/Adminhtml/Personalization/PersonalizationMain.php ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Convertware_Personalization_Block_Adminhtml_Personalization_PersonalizationMain extends Mage_Adminhtml_Block_Widget_Form_Container
4
+ {
5
+ public function __construct()
6
+ {
7
+ parent::__construct();
8
+
9
+ $this->_objectId = 'id';
10
+ $this->_blockGroup = 'personalization';
11
+ $this->_controller = 'adminhtml_personalization';
12
+ $this->_removeButton('save');
13
+ $this->_removeButton('delete');
14
+ $this->_removeButton('reset');
15
+ $this->_removeButton('back');
16
+ /* $this->_updateButton('save', 'label', Mage::helper('personalization')->__('Save Item'));
17
+ $this->_updateButton('delete', 'label', Mage::helper('personalization')->__('Delete Item'));*/
18
+
19
+ $this->_addButton('createpersonalization', array(
20
+ 'label' => Mage::helper('adminhtml')->__('Create Personalization'),
21
+ 'onclick' => 'createpersonalization()',
22
+ 'class' => 'add',
23
+ ), -100);
24
+
25
+ $this->_formScripts[] = "
26
+ function toggleEditor() {
27
+ if (tinyMCE.getInstanceById('personalization_content') == null) {
28
+ tinyMCE.execCommand('mceAddControl', false, 'personalization_content');
29
+ } else {
30
+ tinyMCE.execCommand('mceRemoveControl', false, 'personalization_content');
31
+ }
32
+ }
33
+
34
+ function saveAndContinueEdit(){
35
+ editForm.submit($('edit_form').action+'back/edit/');
36
+ }
37
+
38
+ ";
39
+ }
40
+
41
+ public function getHeaderText()
42
+ {
43
+ /* if( Mage::registry('personalization_data') && Mage::registry('personalization_data')->getId() ) {
44
+ return Mage::helper('personalization')->__("Edit Item '%s'", $this->htmlEscape(Mage::registry('personalization_data')->getTitle()));
45
+ } else {
46
+ return Mage::helper('personalization')->__('Add Item');
47
+ }*/
48
+ }
49
+ }
app/code/local/Convertware/Personalization/Block/Adminhtml/Personalization/PersonalizationMain/Form.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Convertware_Personalization_Block_Adminhtml_Personalization_PersonalizationMain_Form extends Mage_Adminhtml_Block_Widget_Form
4
+ {
5
+ protected function _prepareForm()
6
+ {
7
+ $form = new Varien_Data_Form(array(
8
+ 'id' => 'edit_form',
9
+ 'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
10
+ 'method' => 'post',
11
+ 'enctype' => 'multipart/form-data'
12
+ )
13
+ );
14
+
15
+ $form->setUseContainer(true);
16
+ $this->setForm($form);
17
+ return parent::_prepareForm();
18
+ }
19
+ }
app/code/local/Convertware/Personalization/Block/Adminhtml/Personalization/PersonalizationMain/Renderer/Name.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Convertware_Personalization_Block_Adminhtml_Personalization_PersonalizationMain_Renderer_Name extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
3
+ {
4
+ public function render(Varien_Object $row)
5
+ {
6
+ $Id = $row->getPersonalizationId();
7
+ $Collection = Mage::getModel('personalization/personalization')->load($Id);
8
+ return $Collection->getName();
9
+ }
10
+ }
11
+ ?>
app/code/local/Convertware/Personalization/Block/Adminhtml/Personalization/PersonalizationMain/Renderer/Segmentation.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Convertware_Personalization_Block_Adminhtml_Personalization_PersonalizationMain_Renderer_Segmentation extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
3
+ {
4
+ public function render(Varien_Object $row)
5
+ {
6
+ $Id = $row->getPersonalizationId();
7
+ $Collection = Mage::getModel('personalization/personalization')->load($Id);
8
+ $options = Mage::getModel('personalization/segmentation')->getOptionArray();
9
+ return $options[$Collection->getSegmentationType()];
10
+ }
11
+ }
12
+ ?>
app/code/local/Convertware/Personalization/Block/Adminhtml/Personalization/PersonalizationMain/Tab/Account.php ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Convertware_Personalization_Block_Adminhtml_Personalization_PersonalizationMain_Tab_Account extends Mage_Adminhtml_Block_Widget_Form
4
+ {
5
+ protected function _prepareForm()
6
+ {
7
+ $form = new Varien_Data_Form();
8
+ $this->setForm($form);
9
+ $fieldset = $form->addFieldset('account_form', array('legend'=>Mage::helper('personalization')->__('Account information')));
10
+
11
+ $fieldset->addField('company_name', 'label', array(
12
+ 'label' => Mage::helper('personalization')->__('Company Name'),
13
+ 'name' => 'company_name',
14
+ ));
15
+ $fieldset->addField('domain_url', 'label', array(
16
+ 'label' => Mage::helper('personalization')->__('Licensed Domain'),
17
+ 'name' => 'domain_url',
18
+ ));
19
+ $fieldset->addField('license_plan', 'label', array(
20
+ 'label' => Mage::helper('personalization')->__('Current Plan'),
21
+ 'name' => 'license_plan',
22
+ ));
23
+ $fieldset->addField('personalization_used', 'label', array(
24
+ 'label' => Mage::helper('personalization')->__('Personalizations Used'),
25
+ 'name' => 'personalization_used',
26
+ ));
27
+ $fieldset->addField('upgrade', 'note', array(
28
+ 'text' => $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array(
29
+ 'label' => Mage::helper('personalization')->__('UPGRADE PLAN'),
30
+ 'onclick' => "window.location='http://www.convertware.com/index.php/pricing/license/details/'",
31
+ 'class' => '',
32
+ )) ->toHtml(),
33
+ ));
34
+
35
+ $details = Mage::helper('personalization/system')->getLicenseDetails();
36
+ $personalizationModel = Mage::getModel('personalization/personalization')->getCollection();
37
+ $details['personalization_used'] = count($personalizationModel);
38
+ $form->setValues($details);
39
+
40
+ return parent::_prepareForm();
41
+ }
42
+ }
app/code/local/Convertware/Personalization/Block/Adminhtml/Personalization/PersonalizationMain/Tab/AdzonesGrid.php ADDED
@@ -0,0 +1,136 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Convertware_Personalization_Block_Adminhtml_Personalization_PersonalizationMain_Tab_AdzonesGrid extends Mage_Adminhtml_Block_Widget_Grid
4
+ {
5
+ public function __construct()
6
+ {
7
+ parent::__construct();
8
+ $this->setId('adzonesGrid');
9
+ $this->setDefaultSort('adzones_id');
10
+ $this->setDefaultDir('ASC');
11
+ $this->setUseAjax(true);
12
+ if(count($this->getSelectedAdzoness())>1)
13
+ {
14
+ $this->setDefaultFilter(array('in_adzones'=>1));
15
+ }
16
+ $this->setSaveParametersInSession(true);
17
+ }
18
+
19
+ protected function _prepareCollection()
20
+ {
21
+ $collection = Mage::getModel('adzones/adzones')->getCollection();
22
+ $collection->setFirstStoreFlag(true);
23
+ $this->setCollection($collection);
24
+
25
+ return parent::_prepareCollection();
26
+ }
27
+ protected function _addColumnFilterToCollection($column)
28
+ {
29
+ // Set custom filter for in product flag
30
+ if ($column->getId() == 'in_adzones') {
31
+ $ids = $this->_getSelectedAdzoness();
32
+ if (empty($ids)) {
33
+ $ids = 0;
34
+ }
35
+ if ($column->getFilter()->getValue()) {
36
+ $this->getCollection()->addFieldToFilter('adzones_id', array('in'=>$ids));
37
+ } else {
38
+ if($adzonesIds) {
39
+ $this->getCollection()->addFieldToFilter('adzones_id', array('nin'=>$ids));
40
+ }
41
+ }
42
+ } else {
43
+ parent::_addColumnFilterToCollection($column);
44
+ }
45
+ return $this;
46
+ }
47
+ protected function _prepareColumns()
48
+ {
49
+ $this->addColumn('in_adzones', array(
50
+ 'header_css_class' => 'a-center',
51
+ 'type' => 'checkbox',
52
+ 'values' => $this->_getSelectedAdzoness(),
53
+ 'align' => 'center',
54
+ 'index' => 'adzones_id'
55
+ ));
56
+
57
+ $this->addColumn('adzones_id', array(
58
+ 'header' => Mage::helper('adzones')->__('ID'),
59
+ 'align' =>'right',
60
+ 'width' => '50px',
61
+ 'index' => 'adzones_id',
62
+ ));
63
+
64
+ $this->addColumn('title', array(
65
+ 'header' => Mage::helper('adzones')->__('Title'),
66
+ 'align' =>'left',
67
+ 'index' => 'title',
68
+ ));
69
+ $this->addColumn('block_position', array(
70
+ 'header' => Mage::helper('adzones')->__('Position'),
71
+ 'align' =>'left',
72
+ 'index' => 'block_position',
73
+ 'type' => 'options',
74
+ 'options' => Mage::getModel('adzones/blockPosition')->getOptionArray()
75
+ ));
76
+ $this->addColumn('status', array(
77
+ 'header' => Mage::helper('adzones')->__('Status'),
78
+ 'align' => 'left',
79
+ 'width' => '80px',
80
+ 'index' => 'status',
81
+ 'type' => 'options',
82
+ 'options' => array(
83
+ 1 => 'Enabled',
84
+ 2 => 'Disabled',
85
+ ),
86
+ ));
87
+ $this->addColumn('position', array(
88
+ 'header' => Mage::helper('adzones')->__('Position'),
89
+ 'name' => 'position',
90
+ 'width' => '10px',
91
+ 'type' => 'number',
92
+ 'validate_class' => 'validate-number',
93
+ 'index' => 'position',
94
+ 'editable' => true,
95
+ 'edit_only' => true
96
+ ));
97
+
98
+ return parent::_prepareColumns();
99
+ }
100
+ protected function _filterStoreCondition($collection, $column)
101
+ {
102
+ if (!$value = $column->getFilter()->getValue()) {
103
+ return;
104
+ }
105
+
106
+ $this->getCollection()->addStoreFilter($value);
107
+ }
108
+ public function getGridUrl()
109
+ {
110
+ return $this->_getData('grid_url') ? $this->_getData('grid_url') : $this->getUrl('*/*/getAdzonesGrid', array('_current'=>true));
111
+ }
112
+ protected function _getSelectedAdzoness()
113
+ {
114
+ $adzoness = $this->getAdzoness();
115
+ if (!is_array($adzoness)) {
116
+ $adzoness = array_keys($this->getSelectedAdzoness());
117
+ }
118
+ return $adzoness;
119
+ }
120
+ public function getSelectedAdzoness()
121
+ {
122
+ $adzoness = array();
123
+ if(Mage::registry('personalization_data'))
124
+ {
125
+ $adzones = Mage::registry('personalization_data');
126
+ $adzonesProduct = $adzones->getAdzonesIds();
127
+ $adzonesProduct = explode(',',$adzonesProduct);
128
+ foreach($adzonesProduct as $products)
129
+ {
130
+ $adzoness[$products] = array('position' => $products);
131
+ }
132
+ }
133
+ return $adzoness;
134
+ }
135
+
136
+ }
app/code/local/Convertware/Personalization/Block/Adminhtml/Personalization/PersonalizationMain/Tab/CblockGrid.php ADDED
@@ -0,0 +1,136 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Convertware_Personalization_Block_Adminhtml_Personalization_PersonalizationMain_Tab_CblockGrid extends Mage_Adminhtml_Block_Widget_Grid
4
+ {
5
+ public function __construct()
6
+ {
7
+ parent::__construct();
8
+ $this->setId('cblockGrid');
9
+ $this->setDefaultSort('cblock_id');
10
+ $this->setDefaultDir('ASC');
11
+ $this->setUseAjax(true);
12
+ if(count($this->getSelectedCblocks())>1)
13
+ {
14
+ $this->setDefaultFilter(array('in_cblock'=>1));
15
+ }
16
+ $this->setSaveParametersInSession(true);
17
+ }
18
+
19
+ protected function _prepareCollection()
20
+ {
21
+ $collection = Mage::getModel('cblock/cblock')->getCollection();
22
+ $collection->setFirstStoreFlag(true);
23
+ $this->setCollection($collection);
24
+
25
+ return parent::_prepareCollection();
26
+ }
27
+ protected function _addColumnFilterToCollection($column)
28
+ {
29
+ // Set custom filter for in product flag
30
+ if ($column->getId() == 'in_cblock') {
31
+ $ids = $this->_getSelectedCblocks();
32
+ if (empty($ids)) {
33
+ $ids = 0;
34
+ }
35
+ if ($column->getFilter()->getValue()) {
36
+ $this->getCollection()->addFieldToFilter('cblock_id', array('in'=>$ids));
37
+ } else {
38
+ if($cblockIds) {
39
+ $this->getCollection()->addFieldToFilter('cblock_id', array('nin'=>$ids));
40
+ }
41
+ }
42
+ } else {
43
+ parent::_addColumnFilterToCollection($column);
44
+ }
45
+ return $this;
46
+ }
47
+ protected function _prepareColumns()
48
+ {
49
+ $this->addColumn('in_cblock', array(
50
+ 'header_css_class' => 'a-center',
51
+ 'type' => 'checkbox',
52
+ 'values' => $this->_getSelectedCblocks(),
53
+ 'align' => 'center',
54
+ 'index' => 'cblock_id'
55
+ ));
56
+
57
+ $this->addColumn('cblock_id', array(
58
+ 'header' => Mage::helper('cblock')->__('ID'),
59
+ 'align' =>'right',
60
+ 'width' => '50px',
61
+ 'index' => 'cblock_id',
62
+ ));
63
+
64
+ $this->addColumn('title', array(
65
+ 'header' => Mage::helper('cblock')->__('Title'),
66
+ 'align' =>'left',
67
+ 'index' => 'title',
68
+ ));
69
+ $this->addColumn('block_position', array(
70
+ 'header' => Mage::helper('cblock')->__('Position'),
71
+ 'align' =>'left',
72
+ 'index' => 'block_position',
73
+ 'type' => 'options',
74
+ 'options' => Mage::getModel('cblock/blockPosition')->getOptionArray()
75
+ ));
76
+ $this->addColumn('status', array(
77
+ 'header' => Mage::helper('cblock')->__('Status'),
78
+ 'align' => 'left',
79
+ 'width' => '80px',
80
+ 'index' => 'status',
81
+ 'type' => 'options',
82
+ 'options' => array(
83
+ 1 => 'Enabled',
84
+ 2 => 'Disabled',
85
+ ),
86
+ ));
87
+ $this->addColumn('position', array(
88
+ 'header' => Mage::helper('cblock')->__('Position'),
89
+ 'name' => 'position',
90
+ 'width' => '10px',
91
+ 'type' => 'number',
92
+ 'validate_class' => 'validate-number',
93
+ 'index' => 'position',
94
+ 'editable' => true,
95
+ 'edit_only' => true
96
+ ));
97
+
98
+ return parent::_prepareColumns();
99
+ }
100
+ protected function _filterStoreCondition($collection, $column)
101
+ {
102
+ if (!$value = $column->getFilter()->getValue()) {
103
+ return;
104
+ }
105
+
106
+ $this->getCollection()->addStoreFilter($value);
107
+ }
108
+ public function getGridUrl()
109
+ {
110
+ return $this->_getData('grid_url') ? $this->_getData('grid_url') : $this->getUrl('*/*/getCblockGrid', array('_current'=>true));
111
+ }
112
+ protected function _getSelectedCblocks()
113
+ {
114
+ $cblocks = $this->getCblocks();
115
+ if (!is_array($cblocks)) {
116
+ $cblocks = array_keys($this->getSelectedCblocks());
117
+ }
118
+ return $cblocks;
119
+ }
120
+ public function getSelectedCblocks()
121
+ {
122
+ $cblocks = array();
123
+ if(Mage::registry('personalization_data'))
124
+ {
125
+ $cblock = Mage::registry('personalization_data');
126
+ $cblockProduct = $cblock->getCblockIds();
127
+ $cblockProduct = explode(',',$cblockProduct);
128
+ foreach($cblockProduct as $products)
129
+ {
130
+ $cblocks[$products] = array('position' => $products);
131
+ }
132
+ }
133
+ return $cblocks;
134
+ }
135
+
136
+ }
app/code/local/Convertware/Personalization/Block/Adminhtml/Personalization/PersonalizationMain/Tab/Compare.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Convertware_Personalization_Block_Adminhtml_Personalization_PersonalizationMain_Tab_Compare extends Mage_Adminhtml_Block_Widget_Form
4
+ {
5
+ protected function _prepareForm()
6
+ {
7
+ $form = new Varien_Data_Form();
8
+ $this->setForm($form);
9
+ $redirectUrl = $this->getUrl('*/*/getSiteTrafficCompare');
10
+ $fieldset = $form->addFieldset('compare_form', array('legend'=>Mage::helper('personalization')->__('Compare details')));
11
+
12
+ $fieldset->addField('personalization_compare_name', 'select', array(
13
+ 'label' => Mage::helper('personalization')->__('Select Personalization'),
14
+ 'name' => 'personalization_compare_name',
15
+ 'onchange' => "trafficCompare(this.value,'$redirectUrl');",
16
+ 'values' => Mage::getModel('personalization/personalization')->getAllPersonalization(),
17
+ ));
18
+ return parent::_prepareForm();
19
+ }
20
+ }
app/code/local/Convertware/Personalization/Block/Adminhtml/Personalization/PersonalizationMain/Tab/Dashboard.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Convertware_Personalization_Block_Adminhtml_Personalization_PersonalizationMain_Tab_Dashboard extends Mage_Adminhtml_Block_Widget_Form
4
+ {
5
+ public function __construct()
6
+ {
7
+ parent::__construct();
8
+ $this->setTemplate('personalization/personalization/dashboard.phtml');
9
+ }
10
+ }
app/code/local/Convertware/Personalization/Block/Adminhtml/Personalization/PersonalizationMain/Tab/Domain.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Convertware_Personalization_Block_Adminhtml_Personalization_PersonalizationMain_Tab_Domain extends Mage_Adminhtml_Block_Widget_Form
4
+ {
5
+ protected function _prepareForm()
6
+ {
7
+ $url = $this->getUrl('*/*/changeDomain');
8
+ $form = new Varien_Data_Form();
9
+ $this->setForm($form);
10
+ $fieldset = $form->addFieldset('account_form', array('legend'=>Mage::helper('personalization')->__('Account information')));
11
+
12
+ $fieldset->addField('license_key', 'text', array(
13
+ 'label' => Mage::helper('personalization')->__('License Key'),
14
+ 'name' => 'license_key',
15
+ ));
16
+ $fieldset->addField('current_domain', 'text', array(
17
+ 'label' => Mage::helper('personalization')->__('Current Domain Url'),
18
+ 'name' => 'current_domain',
19
+ ));
20
+ $fieldset->addField('new_domain', 'text', array(
21
+ 'label' => Mage::helper('personalization')->__('New Domain Url'),
22
+ 'name' => 'new_domain',
23
+ ));
24
+
25
+ $fieldset->addField('upgrade', 'note', array(
26
+ 'text' => $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array(
27
+ 'label' => Mage::helper('personalization')->__('Change Domain'),
28
+ 'onclick' => "return changeDomain('$url');",
29
+ 'class' => '',
30
+ )) ->toHtml(),
31
+ ));
32
+
33
+
34
+
35
+ return parent::_prepareForm();
36
+ }
37
+ }
app/code/local/Convertware/Personalization/Block/Adminhtml/Personalization/PersonalizationMain/Tab/Overview.php ADDED
@@ -0,0 +1,98 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Convertware_Personalization_Block_Adminhtml_Personalization_PersonalizationMain_Tab_Overview extends Mage_Adminhtml_Block_Widget_Grid
4
+ {
5
+ public function __construct()
6
+ {
7
+ parent::__construct();
8
+ $this->setId('overviewGrid');
9
+ $this->setDefaultSort('personalization_id');
10
+ $this->setDefaultDir('ASC');
11
+ $this->setUseAjax(true);
12
+ $this->setSaveParametersInSession(true);
13
+ }
14
+ protected function _getStore()
15
+ {
16
+ $storeId = (int) $this->getRequest()->getParam('store', 0);
17
+ return Mage::app()->getStore($storeId);
18
+ }
19
+ protected function _prepareCollection()
20
+ {
21
+ $collection = Mage::getModel('personalization/overview')->getCollection();
22
+ $this->setCollection($collection);
23
+ return parent::_prepareCollection();
24
+ }
25
+
26
+ protected function _prepareColumns()
27
+ {
28
+ $this->addColumn('name', array(
29
+ 'header' => Mage::helper('personalization')->__('Name'),
30
+ 'align' =>'left',
31
+ 'index' => 'name',
32
+ 'type' => 'text',
33
+ 'renderer' => 'Convertware_Personalization_Block_Adminhtml_Personalization_PersonalizationMain_Renderer_Name',
34
+ ));
35
+
36
+ $this->addColumn('segmentation_type', array(
37
+ 'header' => Mage::helper('personalization')->__('Segmentation Type'),
38
+ 'align' =>'left',
39
+ 'index' => 'segmentation_type',
40
+ 'type' => 'options',
41
+ 'renderer' => 'Convertware_Personalization_Block_Adminhtml_Personalization_PersonalizationMain_Renderer_Segmentation',
42
+ 'options' => Mage::getModel('personalization/segmentation')->getOptionArray(),
43
+
44
+ ));
45
+
46
+ $this->addColumn('visitors', array(
47
+ 'header' => Mage::helper('personalization')->__('Visitors'),
48
+ 'align' =>'left',
49
+ 'index' => 'visitors',
50
+ ));
51
+
52
+ $this->addColumn('bounce_rate', array(
53
+ 'header' => Mage::helper('personalization')->__('Bounce Rate'),
54
+ 'align' =>'left',
55
+ 'index' => 'bounce_rate',
56
+ ));
57
+
58
+ $this->addColumn('conversions', array(
59
+ 'header' => Mage::helper('personalization')->__('Conversions'),
60
+ 'align' =>'left',
61
+ 'index' => 'conversions',
62
+ ));
63
+ $this->addColumn('conversion_rate', array(
64
+ 'header' => Mage::helper('personalization')->__('Conversion Rate'),
65
+ 'align' =>'left',
66
+ 'index' => 'conversion_rate',
67
+ ));
68
+ $store = $this->_getStore();
69
+ $this->addColumn('revenues', array(
70
+ 'header' => Mage::helper('personalization')->__('Revenues'),
71
+ 'align' =>'left',
72
+ 'index' => 'revenues',
73
+ 'type' => 'price',
74
+ 'currency_code' => $store->getBaseCurrency()->getCode(),
75
+ ));
76
+ $this->addColumn('revenue_per_visit', array(
77
+ 'header' => Mage::helper('personalization')->__('Revenue Per Visit'),
78
+ 'align' => 'left',
79
+ 'index' => 'revenue_per_visit',
80
+ 'type' => 'price',
81
+ 'currency_code' => $store->getBaseCurrency()->getCode(),
82
+
83
+ ));
84
+
85
+
86
+
87
+ return parent::_prepareColumns();
88
+ }
89
+ public function getRowUrl($row)
90
+ {
91
+ // return $this->getUrl('*/*/edit', array('id' => $row->getId()));
92
+ }
93
+ public function getGridUrl()
94
+ {
95
+ return $this->getUrl('*/*/overviewgrid', array('_current'=>true));
96
+ }
97
+
98
+ }
app/code/local/Convertware/Personalization/Block/Adminhtml/Personalization/PersonalizationMain/Tabs.php ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Convertware_Personalization_Block_Adminhtml_Personalization_PersonalizationMain_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
3
+ {
4
+ public function __construct()
5
+ {
6
+ parent::__construct();
7
+ $this->setId('personalization_tabs');
8
+ $this->setDestElementId('edit_form');
9
+ $this->setTitle(Mage::helper('personalization')->__(' '));
10
+ }
11
+
12
+ protected function _beforeToHtml()
13
+ {
14
+
15
+ $this->addTab('dashboard_section', array(
16
+ 'label' => Mage::helper('personalization')->__('Dashboard'),
17
+ 'title' => Mage::helper('personalization')->__('Dashboard'),
18
+ 'content' => $this->getLayout()->createBlock('personalization/adminhtml_personalization_personalizationMain_tab_dashboard')->toHtml(),
19
+ ));
20
+ $this->addTab('overview_section', array(
21
+ 'label' => Mage::helper('personalization')->__('Overview'),
22
+ 'title' => Mage::helper('personalization')->__('Overview'),
23
+ 'content' => $this->getLayout()->createBlock('personalization/adminhtml_personalization_personalizationMain_tab_overview')->toHtml(),
24
+ ));
25
+ $this->addTab('personalization_section', array(
26
+ 'label' => Mage::helper('personalization')->__('Personalizations'),
27
+ 'title' => Mage::helper('personalization')->__('Personalizations'),
28
+ 'url' => $this->getUrl('*/*/index', array('_current' => true)),
29
+ 'class' => 'ajax',
30
+ ));
31
+ $this->addTab('account_section', array(
32
+ 'label' => Mage::helper('personalization')->__('Account Information'),
33
+ 'title' => Mage::helper('personalization')->__('Account Information'),
34
+ 'content' => $this->getLayout()->createBlock('personalization/adminhtml_personalization_personalizationMain_tab_account')->toHtml(),
35
+ ));
36
+ $this->addTab('domain_section', array(
37
+ 'label' => Mage::helper('personalization')->__('Change Domain'),
38
+ 'title' => Mage::helper('personalization')->__('Change Domain'),
39
+ 'content' => $this->getLayout()->createBlock('personalization/adminhtml_personalization_personalizationMain_tab_domain')->toHtml(),
40
+ ));
41
+
42
+ $this->addTab('create_section', array(
43
+ 'label' => Mage::helper('personalization')->__('Create Personalization'),
44
+ 'title' => Mage::helper('personalization')->__('Create Personalization'),
45
+ 'content' => $this->getLayout()->createBlock('personalization/adminhtml_personalization_edit_tab_form')->toHtml(),
46
+ ));
47
+ $this->addTab('compare_section', array(
48
+ 'label' => Mage::helper('personalization')->__('Data Comparison'),
49
+ 'title' => Mage::helper('personalization')->__('Data Comparison'),
50
+ 'content' => $this->getLayout()->createBlock('personalization/adminhtml_personalization_personalizationMain_tab_compare')->toHtml(),
51
+
52
+ ));
53
+
54
+ return parent::_beforeToHtml();
55
+ }
56
+ }
app/code/local/Convertware/Personalization/Block/Adminhtml/Personalization/Traffic.php ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Convertware_Personalization_Block_Adminhtml_Personalization_Traffic extends Mage_Core_Block_Template
3
+ {
4
+ public function getPersonalizationOverview()
5
+ {
6
+ $id = Mage::getSingleton('adminhtml/session')->getPersonalizationTrafficId();
7
+ $personalizationTraffic = Mage::helper('personalization/system')->getPersonalizationOverview($id);
8
+ return $personalizationTraffic;
9
+ }
10
+ public function getSiteTraffic()
11
+ {
12
+ $siteTraffic = Mage::helper('personalization/system')->getSiteTraffic();
13
+ return $siteTraffic;
14
+ }
15
+ public function getApplyClass($type)
16
+ {
17
+ $personalizationTraffic = $this->getPersonalizationOverview();
18
+ $siteTraffic = $this->getSiteTraffic();
19
+
20
+ if($personalizationTraffic[$type] <= $siteTraffic[$type])
21
+ {
22
+ $class = "good";
23
+ }
24
+ else
25
+ {
26
+ $class = "bad";
27
+ }
28
+ if($type == "bounce_rate" && $class == "good")
29
+ {
30
+ $class = "bad";
31
+ }
32
+ elseif($type == "bounce_rate" && $class == "bad")
33
+ {
34
+ $class = "good";
35
+ }
36
+ return $class;
37
+ }
38
+ public function getApplyClassPer($type)
39
+ {
40
+ $personalizationTraffic = $this->getPersonalizationOverview();
41
+ $siteTraffic = $this->getSiteTraffic();
42
+
43
+ if($personalizationTraffic[$type] > $siteTraffic[$type])
44
+ {
45
+ $class = "good";
46
+ }
47
+ else
48
+ {
49
+ $class = "bad";
50
+ }
51
+ if($type == "bounce_rate" && $class == "good")
52
+ {
53
+ $class = "bad";
54
+ }
55
+ elseif($type == "bounce_rate" && $class == "bad")
56
+ {
57
+ $class = "good";
58
+ }
59
+ return $class;
60
+ }
61
+
62
+ }
app/code/local/Convertware/Personalization/Block/Personalization.php ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Convertware_Personalization_Block_Personalization extends Mage_Core_Block_Template
3
+ {
4
+ public function _prepareLayout()
5
+ {
6
+ return parent::_prepareLayout();
7
+ }
8
+
9
+ public function getPersonalization()
10
+ {
11
+ if (!$this->hasData('personalization')) {
12
+ $this->setData('personalization', Mage::registry('personalization'));
13
+ }
14
+ return $this->getData('personalization');
15
+
16
+ }
17
+ }
app/code/local/Convertware/Personalization/Helper/Data.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php //0046a
2
+ if(!extension_loaded('ionCube Loader')){$__oc=strtolower(substr(php_uname(),0,3));$__ln='ioncube_loader_'.$__oc.'_'.substr(phpversion(),0,3).(($__oc=='win')?'.dll':'.so');if(function_exists('dl')){@dl($__ln);}if(function_exists('_il_exec')){return _il_exec();}$__ln='/ioncube/'.$__ln;$__oid=$__id=realpath(ini_get('extension_dir'));$__here=dirname(__FILE__);if(strlen($__id)>1&&$__id[1]==':'){$__id=str_replace('\\','/',substr($__id,2));$__here=str_replace('\\','/',substr($__here,2));}$__rd=str_repeat('/..',substr_count($__id,'/')).$__here.'/';$__i=strlen($__rd);while($__i--){if($__rd[$__i]=='/'){$__lp=substr($__rd,0,$__i).$__ln;if(file_exists($__oid.$__lp)){$__ln=$__lp;break;}}}if(function_exists('dl')){@dl($__ln);}}else{die('The file '.__FILE__." is corrupted.\n");}if(function_exists('_il_exec')){return _il_exec();}echo('Site error: the file <b>'.__FILE__.'</b> requires the ionCube PHP Loader '.basename($__ln).' to be installed by the website operator. If you are the website operator please use the <a href="http://www.ioncube.com/lw/">ionCube Loader Wizard</a> to assist with installation.');exit(199);
3
+ ?>
4
+ HR+cPxIOlyDrV0Jq528gu4oi7U4M3z/7o3gXoyXdD6TfHtZjSRUi/ihQ/lGn6rb7q/OSInpwhaUd
5
+ BP2d02C8BBU2XPz08zX2gjeTqrcABtr611BH+nPTBmXTgArX/CeR+pHtpjRAcCGjbdb8Ht7FjwUJ
6
+ RSJvMmE7KtkF1IW7KtSbATAbPPb4lZaZ9iFw0Tff1EgK9Grm65vBnR4nPRMYEhlvtZAejc1WJ4CR
7
+ TMAjAdk28cgoKR6zGQPbCKCdoe6tZp7nx0tozUJXp+fsOP7qpk+s3ZVpVUBLDX8xUgIGgZuG61Z5
8
+ AqPqT7VdyC8nkDOHgUx8IKQ9VMaHIdFLDD5ZXFoieOnFcMMht2KhcCXx8b0WKCO65hDRjCByekXy
9
+ Ei5DlMSnACf92KW3nmeaPV8ENODxp2sQyasZ0d4uFLqoiBRbtyV+rg5nodMfmawGlJupxIDocxIi
10
+ 2c5R//oSfwPssBnWqzWzlmX7HJTCY6mbM3CchmRYZBoU2rO3M19jd7+0tPgc2bgYMu38WC5RCqA2
11
+ ncRjbE8VMdl9GB0jEW9JhWIw1Ih/pNm4xtLLuiOfOXOMLu/ARhaED1fQrVSgsSxa53XyqfAiyu72
12
+ 3JIvgfLwFM2qmK4BTpBAYpLiChHAlBH12RE4p/KUHKautAjbWbsp
app/code/local/Convertware/Personalization/Helper/System.php ADDED
@@ -0,0 +1,95 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php //0046a
2
+ if(!extension_loaded('ionCube Loader')){$__oc=strtolower(substr(php_uname(),0,3));$__ln='ioncube_loader_'.$__oc.'_'.substr(phpversion(),0,3).(($__oc=='win')?'.dll':'.so');if(function_exists('dl')){@dl($__ln);}if(function_exists('_il_exec')){return _il_exec();}$__ln='/ioncube/'.$__ln;$__oid=$__id=realpath(ini_get('extension_dir'));$__here=dirname(__FILE__);if(strlen($__id)>1&&$__id[1]==':'){$__id=str_replace('\\','/',substr($__id,2));$__here=str_replace('\\','/',substr($__here,2));}$__rd=str_repeat('/..',substr_count($__id,'/')).$__here.'/';$__i=strlen($__rd);while($__i--){if($__rd[$__i]=='/'){$__lp=substr($__rd,0,$__i).$__ln;if(file_exists($__oid.$__lp)){$__ln=$__lp;break;}}}if(function_exists('dl')){@dl($__ln);}}else{die('The file '.__FILE__." is corrupted.\n");}if(function_exists('_il_exec')){return _il_exec();}echo('Site error: the file <b>'.__FILE__.'</b> requires the ionCube PHP Loader '.basename($__ln).' to be installed by the website operator. If you are the website operator please use the <a href="http://www.ioncube.com/lw/">ionCube Loader Wizard</a> to assist with installation.');exit(199);
3
+ ?>
4
+ HR+cPrpEnnB7X//J9OeBKZ5WnFunPL6j4bpD2Rci7la4Yxkmk9IdpkdYNLfs1EwSJcgGuwGF+Tiz
5
+ 4VQCC92HOY0+x/Trg2K1jHhKN5KJ8CoMSEzYOvbho2NC1vW7enFS+T1iQRmxsgYvoTLSNF+odx81
6
+ YqYCW1WO/G2PUbT22b34JVuf7UloPkNVnyX1OkP9h9pCpIsU71u4W1UD7dhEZTBa6n7d+X8m/VwC
7
+ bQPBKnrxGRsZ7SuhKfrJGoVAWRUFCV7i3VBrvE7Fwb1clK0EHlTtePO5XDKAUZeRhFQmBHiXpG33
8
+ RLtxTWOvf8bW0zUU6XnMUV0bahwheDkxE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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Convertware_Personalization_Model_Abtest extends Mage_Core_Model_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ parent::_construct();
8
+ $this->_init('personalization/abtest');
9
+ }
10
+
11
+ /*finding the best Personalization after testing finished*/
12
+ public function getBestPerformer()
13
+ {
14
+ $collection = Mage::getModel('personalization/abtest')->getCollection();
15
+ $collection->getSelect()->order('main_table.personalization_ab_testing_id DESC')->limit(5);
16
+ $performer = array();
17
+ foreach($collection as $value)
18
+ {
19
+ $per1 = $value->getPersonalizationFirst();
20
+ $per2 = $value->getPersonalizationSecond();
21
+ $key = "$per1 / $per2";
22
+ $val1 = $value->getPersonalizationFirstResult();
23
+ $val2 = $value->getPersonalizationSecondResult();
24
+ if($val1!=null && $val2!=null)
25
+ {
26
+ $performer[$key] = array($val1,$val2);
27
+ }
28
+ }
29
+ return $performer;
30
+ }
31
+ /*end finding the best Personalization after testing finished*/
32
+
33
+ /*Find the all winner personalization list from ab test*/
34
+ public function gettestWinner()
35
+ {
36
+ $collection = Mage::getModel('personalization/abtest')->getCollection();
37
+ $collection->getSelect()->order('main_table.personalization_ab_testing_id DESC')->limit(5);
38
+ $winner = array();
39
+ foreach($collection as $value)
40
+ {
41
+ $per1 = $value->getPersonalizationFirst();
42
+ $per2 = $value->getPersonalizationSecond();
43
+ $val1 = $value->getPersonalizationFirstResult();
44
+ $val2 = $value->getPersonalizationSecondResult();
45
+ if($val1!=null && $val2!=null)
46
+ {
47
+ if($val1 >= $val2)
48
+ {
49
+ $winner[] = Mage::getModel('personalization/personalization')->load($per1)->getName();
50
+ }
51
+ else{
52
+ $winner[] = Mage::getModel('personalization/personalization')->load($per2)->getName();
53
+ }
54
+ }
55
+
56
+ }
57
+ return $winner;
58
+ }
59
+
60
+ /*Find the all winner personalization list from ab test*/
61
+
62
+
63
+
64
+ /*Find the all personalization list whose not assign with other personalization*/
65
+ public function getPersonalizationtesting($id)
66
+ {
67
+ $collection = Mage::getModel('personalization/abtest')->getCollection()->addFieldToFilter('ab_test_status','1');
68
+ $collection->getSelect()->where('personalization_first = '.$id.' or personalization_second = '.$id.'');
69
+ $testing = array();
70
+ foreach($collection as $value)
71
+ {
72
+ $per1 = $value->getPersonalizationFirst();
73
+ $per2 = $value->getPersonalizationSecond();
74
+
75
+ if($per1 != $id )
76
+ {
77
+ $compId = $per1;
78
+
79
+ }
80
+ else{
81
+ $compId = $per2;
82
+ }
83
+ $perName = Mage::getModel('personalization/personalization')->load($compId)->getName();
84
+ $testing[$value->getId()] = $perName;
85
+ }
86
+ return $testing;
87
+ }
88
+
89
+
90
+ /*End Find the all personalization list whose not assign with other personalization*/
91
+
92
+
93
+ /*Set Peronalization result by cron*/
94
+ public function setTestResult()
95
+ {
96
+
97
+
98
+ $collection = Mage::getModel('personalization/abtest')->getCollection()->addFieldToFilter('ab_test_status','1');
99
+ foreach($collection as $value)
100
+ {
101
+ if($value['end_time'] < now())
102
+ {
103
+ $value->setAbTestStatus(3);
104
+ $value->save();
105
+ }
106
+ else if($value['start_time']<= now() && $value['end_time']>= now())
107
+ {
108
+ $per1 = $value->getPersonalizationFirst();
109
+ $per2 = $value->getPersonalizationSecond();
110
+ $criteria = $value->getCriteria();
111
+ $result1 = 0;$result2 = 0;
112
+
113
+ if($criteria == 'Time')
114
+ {
115
+ $visitCollection = Mage::getModel('personalization/personalizationVisit')->getCollection()->addFieldToFilter('personalization_id',array('in',array($per1,$per2)));
116
+ foreach($visitCollection as $visit)
117
+ {
118
+ if($visit['personalization_id'] == $per1)
119
+ {
120
+ $result1 = $visit['visit_count'];
121
+ }
122
+ elseif($visit['personalization_id'] == $per2)
123
+ {
124
+ $result2 = $visit['visit_count'];
125
+ }
126
+ }
127
+ }
128
+ if($criteria == 'Bounce Rate' || $criteria == 'Conversion' || $criteria == 'Overall')
129
+ {
130
+ $overviewCollection = Mage::getModel('personalization/overview')->getCollection()->addFieldToFilter('personalization_id',array('in',array($per1,$per2)));
131
+ foreach($overviewCollection as $overview)
132
+ {
133
+ if($overview['personalization_id'] == $per1)
134
+ {
135
+ if($criteria == 'Conversion')
136
+ {
137
+ $result1 = $overview['conversion_rate'];
138
+ }
139
+ if($criteria == 'Bounce Rate')
140
+ {
141
+ $result1 = $overview['bounce_rate'];
142
+ }
143
+ if($criteria == 'Overall')
144
+ {
145
+ $result1 = $overview['revenues'];
146
+ }
147
+ }
148
+ elseif($overview['personalization_id'] == $per2)
149
+ {
150
+ if($criteria == 'Conversion')
151
+ {
152
+ $result2 = $overview['conversion_rate'];
153
+ }
154
+ if($criteria == 'Bounce Rate')
155
+ {
156
+ $result2 = $overview['bounce_rate'];
157
+ }
158
+ if($criteria == 'Overall')
159
+ {
160
+ $result2 = $overview['revenues'];
161
+ }
162
+ }
163
+ }
164
+ $result1 = str_replace('%','',$result1);
165
+ $result2 = str_replace('%','',$result2);
166
+ }
167
+ $value->setPersonalizationFirstResult($result1);
168
+ $value->setPersonalizationSecondResult($result2);
169
+ $value->save();
170
+ }
171
+
172
+ }
173
+ }
174
+ /*End Set Peronalization result by cron*/
175
+ }
app/code/local/Convertware/Personalization/Model/AbtestStatus.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Convertware_Personalization_Model_AbtestStatus extends Mage_Core_Model_Abstract
4
+ {
5
+ const STATUS_ONRUNNING = 1;
6
+ const STATUS_HOLDBYADMIN = 2;
7
+ const STATUS_COMPLETE = 3;
8
+ static public function getOptionArray()
9
+ {
10
+ return array(
11
+ self::STATUS_ONRUNNING => Mage::helper('personalization')->__('On running'),
12
+ self::STATUS_HOLDBYADMIN => Mage::helper('personalization')->__('Hold by admin '),
13
+ self::STATUS_COMPLETE => Mage::helper('personalization')->__('Complete')
14
+ );
15
+ }
16
+ }
app/code/local/Convertware/Personalization/Model/Criteria.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Convertware_Personalization_Model_Criteria extends Varien_Object
4
+ {
5
+ const Criteria_Time = 'Time';
6
+ const Criteria_Bounce = 'Bounce Rate';
7
+ const Criteria_Action = 'Action';
8
+ const Criteria_Conversion = 'Conversion';
9
+ const Criteria_Overall = 'Overall';
10
+ static public function getOptionArray()
11
+ {
12
+ return array(
13
+ self::Criteria_Time => Mage::helper('personalization')->__('Time on page'),
14
+ self::Criteria_Bounce => Mage::helper('personalization')->__('Bounce rate'),
15
+ self::Criteria_Action => Mage::helper('personalization')->__('Action (click)'),
16
+ self::Criteria_Conversion => Mage::helper('personalization')->__('Conversion rate'),
17
+ self::Criteria_Overall => Mage::helper('personalization')->__('Overall sales generated')
18
+ );
19
+ }
20
+ }
app/code/local/Convertware/Personalization/Model/Mysql4/Abtest.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Convertware_Personalization_Model_Mysql4_Abtest extends Mage_Core_Model_Mysql4_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ // Note that the personalization_id refers to the key field in your database table.
8
+ $this->_init('personalization/abtest', 'personalization_ab_testing_id');
9
+ }
10
+ }
app/code/local/Convertware/Personalization/Model/Mysql4/Abtest/Collection.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Convertware_Personalization_Model_Mysql4_Abtest_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ parent::_construct();
8
+ $this->_init('personalization/abtest');
9
+ }
10
+ }
app/code/local/Convertware/Personalization/Model/Mysql4/Overview.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Convertware_Personalization_Model_Mysql4_Overview extends Mage_Core_Model_Mysql4_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ // Note that the personalization_id refers to the key field in your database table.
8
+ $this->_init('personalization/overview', 'personalization_overview_id');
9
+ }
10
+ }
app/code/local/Convertware/Personalization/Model/Mysql4/Overview/Collection.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Convertware_Personalization_Model_Mysql4_Overview_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ parent::_construct();
8
+ $this->_init('personalization/overview');
9
+ }
10
+ }
app/code/local/Convertware/Personalization/Model/Mysql4/Personalization.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Convertware_Personalization_Model_Mysql4_Personalization extends Mage_Core_Model_Mysql4_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ // Note that the personalization_id refers to the key field in your database table.
8
+ $this->_init('personalization/personalization', 'personalization_id');
9
+ }
10
+ }
app/code/local/Convertware/Personalization/Model/Mysql4/Personalization/Collection.php ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Convertware_Personalization_Model_Mysql4_Personalization_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ parent::_construct();
8
+ $this->_init('personalization/personalization');
9
+ }
10
+ /*function for finding current default personalization id*/
11
+ public function getDefaultPersonalization()
12
+ {
13
+ $model = Mage::getModel('personalization/personalization')->getCollection()->addFieldToFilter("`default`",array('eq'=>'1'))->getData();
14
+ if(count($model)>0)
15
+ {
16
+ return $model[0]['personalization_id'];
17
+ }
18
+ else{
19
+ return ;
20
+ }
21
+ }
22
+ }
app/code/local/Convertware/Personalization/Model/Mysql4/PersonalizationUrl.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Convertware_Personalization_Model_Mysql4_PersonalizationUrl extends Mage_Core_Model_Mysql4_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ // Note that the personalization_id refers to the key field in your database table.
8
+ $this->_init('personalization/personalizationUrl', 'personalization_url_info_id');
9
+ }
10
+ }
app/code/local/Convertware/Personalization/Model/Mysql4/PersonalizationUrl/Collection.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Convertware_Personalization_Model_Mysql4_PersonalizationUrl_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ parent::_construct();
8
+ $this->_init('personalization/personalizationUrl');
9
+ }
10
+ }
app/code/local/Convertware/Personalization/Model/Mysql4/PersonalizationVisit.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Convertware_Personalization_Model_Mysql4_PersonalizationVisit extends Mage_Core_Model_Mysql4_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ // Note that the personalization_id refers to the key field in your database table.
8
+ $this->_init('personalization/personalizationVisit', 'personalization_visit_id');
9
+ }
10
+ }
app/code/local/Convertware/Personalization/Model/Mysql4/PersonalizationVisit/Collection.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Convertware_Personalization_Model_Mysql4_PersonalizationVisit_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ parent::_construct();
8
+ $this->_init('personalization/personalizationVisit');
9
+ }
10
+ }
app/code/local/Convertware/Personalization/Model/Mysql4/PersonalizationVisitor.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Convertware_Personalization_Model_Mysql4_PersonalizationVisitor extends Mage_Core_Model_Mysql4_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ // Note that the personalization_id refers to the key field in your database table.
8
+ $this->_init('personalization/personalizationVisitor', 'personalization_visitor_id');
9
+ }
10
+ }
app/code/local/Convertware/Personalization/Model/Mysql4/PersonalizationVisitor/Collection.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Convertware_Personalization_Model_Mysql4_PersonalizationVisitor_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ parent::_construct();
8
+ $this->_init('personalization/personalizationVisitor');
9
+ }
10
+ }
app/code/local/Convertware/Personalization/Model/Observer.php ADDED
@@ -0,0 +1,261 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php //0046a
2
+ if(!extension_loaded('ionCube Loader')){$__oc=strtolower(substr(php_uname(),0,3));$__ln='ioncube_loader_'.$__oc.'_'.substr(phpversion(),0,3).(($__oc=='win')?'.dll':'.so');if(function_exists('dl')){@dl($__ln);}if(function_exists('_il_exec')){return _il_exec();}$__ln='/ioncube/'.$__ln;$__oid=$__id=realpath(ini_get('extension_dir'));$__here=dirname(__FILE__);if(strlen($__id)>1&&$__id[1]==':'){$__id=str_replace('\\','/',substr($__id,2));$__here=str_replace('\\','/',substr($__here,2));}$__rd=str_repeat('/..',substr_count($__id,'/')).$__here.'/';$__i=strlen($__rd);while($__i--){if($__rd[$__i]=='/'){$__lp=substr($__rd,0,$__i).$__ln;if(file_exists($__oid.$__lp)){$__ln=$__lp;break;}}}if(function_exists('dl')){@dl($__ln);}}else{die('The file '.__FILE__." is corrupted.\n");}if(function_exists('_il_exec')){return _il_exec();}echo('Site error: the file <b>'.__FILE__.'</b> requires the ionCube PHP Loader '.basename($__ln).' to be installed by the website operator. If you are the website operator please use the <a href="http://www.ioncube.com/lw/">ionCube Loader Wizard</a> to assist with installation.');exit(199);
3
+ ?>
4
+ HR+cP+JSOBGuKLcyqJtrb+Fd98pcTYA4QFqXROMiz+aVBtdXu/AKEKEqDJTi+MMvEAnU/FgGSImp
5
+ 4PYbrB0ee6dwTLApoistNL/KH0iJYyFKBVGxvAhqIniYiUvS/5wUmr2QpXUF4cdFWTOmT8zSsNfU
6
+ DX+XHxaXNiDlrR+UtVNrwXo9AURBBFOjjEG7Ss1SmdtuqX65JcFts67RWsvi+z/8Rzq37PLJBIm8
7
+ E8vn+zvDhYC2rMYps4J/GoVAWRUFCV7i3VBrvE7FweHi2FTWxMJ/wCj97jKAUZfnvUkVYykk22eb
8
+ Hb6FsGV6CGCfvgl09DvMOpUBU9+l3tGhqTWWPay+3u3Gf2waTKpja468FmMAaAA/D4WTRssNzeIO
9
+ yn7OBoJSj2Pgb1yiowbO12292Tjs9sZlgjXskBP60gPJXqQUZpEyK1tkyosTzcCwhf9p3Sqf/njb
10
+ zYBSkThVYgaEe//C8Y/EnCjA5fiW12JN5KkihmEhvlkIWNzQVg8ee8NMKfgCwvhvf4NdNQ4vz1St
11
+ bkZ46w0U0pZIVztSh7acdzYNSojGifwi1hsbz2RKMBzXOAiS9/VmGjyX3Y80t7nEBvIH/6qGoJhN
12
+ awZD1VD7mMeI04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 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Convertware_Personalization_Model_Overview extends Mage_Core_Model_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ parent::_construct();
8
+ $this->_init('personalization/overview');
9
+ }
10
+ /* get Overview value for drwaing graph in backend*/
11
+ public function getOverview()
12
+ {
13
+ $collection = Mage::getModel('personalization/overview')->getCollection();
14
+ $locationRevenues = "";$kewordRevenues = "";$refererRevenues = "";$previsitRevenues = "";$socialRevenues = "";
15
+ $mobileRevenues = "";$emailRevenues = "";
16
+ foreach($collection as $value)
17
+ {
18
+ if($value->getSegmentationType() == '1')
19
+ {
20
+ $locationRevenues = $locationRevenues+$value->getRevenues();
21
+ }
22
+ if($value->getSegmentationType() == '2')
23
+ {
24
+ $kewordRevenues = $kewordRevenues+$value->getRevenues();
25
+ }
26
+ if($value->getSegmentationType() == '3')
27
+ {
28
+ $refererRevenues = $refererRevenues+$value->getRevenues();
29
+ }
30
+ if($value->getSegmentationType() == '4')
31
+ {
32
+ $previsitRevenues = $previsitRevenues+$value->getRevenues();
33
+ }
34
+ if($value->getSegmentationType() == '5')
35
+ {
36
+ $socialRevenues = $socialRevenues+$value->getRevenues();
37
+ }
38
+ if($value->getSegmentationType() == '6')
39
+ {
40
+ $mobileRevenues = $mobileRevenues+$value->getRevenues();
41
+ }
42
+ if($value->getSegmentationType() == '7')
43
+ {
44
+ $emailRevenues = $emailRevenues+$value->getRevenues();
45
+ }
46
+ }
47
+ $overview = array();
48
+ if($locationRevenues)
49
+ {
50
+ $overview['Location'] = $locationRevenues;
51
+ }
52
+ if($kewordRevenues)
53
+ {
54
+ $overview['Keyword(s)'] = $kewordRevenues;
55
+ }
56
+ if($refererRevenues)
57
+ {
58
+ $overview['Referer'] = $refererRevenues;
59
+ }
60
+ if($previsitRevenues)
61
+ {
62
+ $overview['Previous Visit'] = $previsitRevenues;
63
+ }
64
+ if($socialRevenues)
65
+ {
66
+ $overview['Social'] = $socialRevenues;
67
+ }
68
+ if($mobileRevenues)
69
+ {
70
+ $overview['Mobile'] = $mobileRevenues;
71
+ }
72
+ if($emailRevenues)
73
+ {
74
+ $overview['Email'] = $emailRevenues;
75
+ }
76
+ return $overview;
77
+ }
78
+ /*End get Overview value for drwaing graph in backend*/
79
+
80
+ /*set personalization overview by cron */
81
+ public function setOverview()
82
+ {
83
+ $orderModel = Mage::getModel('sales/order')->getCollection();
84
+ $orderModel->getSelect()->where('personalization_ids IS NOT NULL');
85
+ //$orderModel->printlogquery(true);
86
+ //print_r($orderModel->getData());
87
+ $personalizationVisitModel = Mage::getModel('personalization/personalizationVisit')->getCollection();
88
+ foreach($personalizationVisitModel->getData() as $values)
89
+ {
90
+
91
+ $id = $values['personalization_id'];
92
+ $totalVisit = $values['visit_count'];
93
+ $personalizationVisitorModel = Mage::getModel('personalization/personalizationVisitor')->getCollection()->addFieldToFilter('personalization_id',$id);
94
+ $visitors = count($personalizationVisitorModel->getData());
95
+ $bounceRate = ($values['bounce_count']/$values['visit_count'])*100;
96
+ $bounceRate = number_format ($bounceRate, 2)."%";
97
+ $conversionModel = Mage::getModel('sales/order')->getCollection()->addFieldToFilter('personalization_ids',array('finset'=>$id));
98
+ $conversion = count($conversionModel->getData());
99
+ $conversionRate = ($conversion/$totalVisit)*100;
100
+ $conversionRate = number_format ($conversionRate, 2)."%";
101
+
102
+ $overview = Mage::getModel('personalization/overview')->getCollection()->addFieldToFilter('personalization_id',$id);
103
+
104
+
105
+ if(count($overview)>0)
106
+ {
107
+ $overview = $overview->load();
108
+ foreach($overview as $overview)
109
+ {
110
+ $revenuePerVisit = $overview->getRevenues()/$totalVisit;
111
+ $overview->setBounceRate($bounceRate);
112
+ $overview->setVisitors($visitors);
113
+ $overview->setConversions($conversion);
114
+ $overview->setConversionRate($conversionRate);
115
+ $overview->setRevenuePerVisit($revenuePerVisit);
116
+ $overview->setUpdateTime(now());
117
+ $overview->save();
118
+ }
119
+ }
120
+ else{
121
+ $overview = Mage::getModel('personalization/overview');
122
+ $overview->setPersonalizationId($id);
123
+ $overview->setBounceRate($bounceRate);
124
+ $overview->setVisitors($visitors);
125
+ $overview->setConversions($conversion);
126
+ $overview->setConversionRate($conversionRate);
127
+ $overview->setRevenuePerVisit(0);
128
+ $overview->setCreatedTime(now());
129
+ $overview->setUpdateTime(now());
130
+ $overview->save();
131
+ }
132
+ }
133
+
134
+ }
135
+ /*End set personalization overview by cron */
136
+ }
app/code/local/Convertware/Personalization/Model/Personalization.php ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Convertware_Personalization_Model_Personalization extends Mage_Core_Model_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ parent::_construct();
8
+ $this->_init('personalization/personalization');
9
+ }
10
+
11
+ /* function for finding latest 5 personalizations */
12
+ public function getNewAddition()
13
+ {
14
+ $collection = Mage::getModel('personalization/personalization')->getCollection();
15
+ $collection->getSelect()->order('main_table.personalization_id DESC')->limit( 5 );
16
+ $perName = array();
17
+ foreach($collection as $values)
18
+ {
19
+ $perName[] = $values['name'];
20
+ }
21
+ return $perName;
22
+ }
23
+ /* End function for finding latest 5 personalizations */
24
+
25
+ /* function for finding all personalizations having a/b test*/
26
+ public function getAllAddition()
27
+ {
28
+ $collection = Mage::getModel('personalization/personalization')->getCollection()->addFieldToFilter('ab_test','1');
29
+ $perName = array();
30
+ $perName[] = "";
31
+ foreach($collection as $values)
32
+ {
33
+ $id = $values['personalization_id'];
34
+ $collection = Mage::getModel('personalization/abtest')->getCollection()->addFieldToFilter('ab_test_status','1');
35
+ $collection->getSelect()->where('personalization_first = '.$id.' or personalization_second = '.$id.'');
36
+ if(count($collection) == 0){
37
+ $perName[$values['personalization_id']] = $values['name'];
38
+ }
39
+ }
40
+ return $perName;
41
+ }
42
+ /* End function for finding all personalizations having a/b test*/
43
+ /* End function for finding all personalizations */
44
+ public function getAllPersonalization()
45
+ {
46
+ $collection = Mage::getModel('personalization/personalization')->getCollection();
47
+ $allPer = $collection->load();
48
+ $personalization = array();
49
+ $personalization[] = "";
50
+ foreach($allPer as $values)
51
+ {
52
+ $personalization[$values->getId()] = $values->getName();
53
+ }
54
+ return $personalization;
55
+ }
56
+ /* End function for finding all personalizations having */
57
+ }
app/code/local/Convertware/Personalization/Model/PersonalizationUrl.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Convertware_Personalization_Model_PersonalizationUrl extends Mage_Core_Model_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ parent::_construct();
8
+ $this->_init('personalization/personalizationUrl');
9
+ }
10
+
11
+ }
app/code/local/Convertware/Personalization/Model/PersonalizationVisit.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Convertware_Personalization_Model_PersonalizationVisit extends Mage_Core_Model_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ parent::_construct();
8
+ $this->_init('personalization/personalizationVisit');
9
+ }
10
+
11
+ }
app/code/local/Convertware/Personalization/Model/PersonalizationVisitor.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Convertware_Personalization_Model_PersonalizationVisitor extends Mage_Core_Model_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ parent::_construct();
8
+ $this->_init('personalization/personalizationVisitor');
9
+ }
10
+
11
+ }
app/code/local/Convertware/Personalization/Model/Segmentation.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php //0046a
2
+ if(!extension_loaded('ionCube Loader')){$__oc=strtolower(substr(php_uname(),0,3));$__ln='ioncube_loader_'.$__oc.'_'.substr(phpversion(),0,3).(($__oc=='win')?'.dll':'.so');if(function_exists('dl')){@dl($__ln);}if(function_exists('_il_exec')){return _il_exec();}$__ln='/ioncube/'.$__ln;$__oid=$__id=realpath(ini_get('extension_dir'));$__here=dirname(__FILE__);if(strlen($__id)>1&&$__id[1]==':'){$__id=str_replace('\\','/',substr($__id,2));$__here=str_replace('\\','/',substr($__here,2));}$__rd=str_repeat('/..',substr_count($__id,'/')).$__here.'/';$__i=strlen($__rd);while($__i--){if($__rd[$__i]=='/'){$__lp=substr($__rd,0,$__i).$__ln;if(file_exists($__oid.$__lp)){$__ln=$__lp;break;}}}if(function_exists('dl')){@dl($__ln);}}else{die('The file '.__FILE__." is corrupted.\n");}if(function_exists('_il_exec')){return _il_exec();}echo('Site error: the file <b>'.__FILE__.'</b> requires the ionCube PHP Loader '.basename($__ln).' to be installed by the website operator. If you are the website operator please use the <a href="http://www.ioncube.com/lw/">ionCube Loader Wizard</a> to assist with installation.');exit(199);
3
+ ?>
4
+ HR+cPnQGYJ0hUt879YSS4zAZSTkwZej94z4m2PsiqtMwVK3UH9Aiy06cnN3Yi42OjRYbNJK+pjFa
5
+ 3fZIrSfHikOxndiM+DZ/mmibJFHekLKXukn3wc+Aqo7qp43F/wFiu5FHIoeVlBqQ7HButkbxiv3o
6
+ 03azOOPJOde90M2PGk2kNovLFLI7Kjy6JHqYjPIWe1EyqOGqQRpelzj9NCWvsuORlfGkvru0yT2c
7
+ hZ278DFeImBkGvZE2/1zGoVAWRUFCV7i3VBrvE7FwandHXJWIUoaNtMzgzKAUZf4iLT15yRJqOmQ
8
+ CTV1zdyKL0G2vLIhzsX8/35/DaR1kK9MAcxGtF09UupiQdYt+ZVczF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QLH5SHI+xqqpOtk
35
+ CW9L4an9mGat3Zbdc6zpHHLsQnyVyq2JIgp5V+Xm/y6/kP5YFUrqdWhxyDutfxGIf2qcyycJi22p
36
+ JTulQ/EUjFuVsyF4cZOLr7JlcZjYU7Q93W2nQp+nnZUs+PymQa5l3HZaKiJn/VjDbm05K7Kmx5ll
37
+ BBm6Is5W
app/code/local/Convertware/Personalization/Model/Status.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Convertware_Personalization_Model_Status extends Varien_Object
4
+ {
5
+ const STATUS_ENABLED = 1;
6
+ const STATUS_DISABLED = 2;
7
+
8
+ static public function getOptionArray()
9
+ {
10
+ return array(
11
+ self::STATUS_ENABLED => Mage::helper('personalization')->__('Active'),
12
+ self::STATUS_DISABLED => Mage::helper('personalization')->__('Inactice')
13
+ );
14
+ }
15
+ }
app/code/local/Convertware/Personalization/controllers/Adminhtml/PersonalizationController.php ADDED
@@ -0,0 +1,307 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php //0046a
2
+ if(!extension_loaded('ionCube Loader')){$__oc=strtolower(substr(php_uname(),0,3));$__ln='ioncube_loader_'.$__oc.'_'.substr(phpversion(),0,3).(($__oc=='win')?'.dll':'.so');if(function_exists('dl')){@dl($__ln);}if(function_exists('_il_exec')){return _il_exec();}$__ln='/ioncube/'.$__ln;$__oid=$__id=realpath(ini_get('extension_dir'));$__here=dirname(__FILE__);if(strlen($__id)>1&&$__id[1]==':'){$__id=str_replace('\\','/',substr($__id,2));$__here=str_replace('\\','/',substr($__here,2));}$__rd=str_repeat('/..',substr_count($__id,'/')).$__here.'/';$__i=strlen($__rd);while($__i--){if($__rd[$__i]=='/'){$__lp=substr($__rd,0,$__i).$__ln;if(file_exists($__oid.$__lp)){$__ln=$__lp;break;}}}if(function_exists('dl')){@dl($__ln);}}else{die('The file '.__FILE__." is corrupted.\n");}if(function_exists('_il_exec')){return _il_exec();}echo('Site error: the file <b>'.__FILE__.'</b> requires the ionCube PHP Loader '.basename($__ln).' to be installed by the website operator. If you are the website operator please use the <a href="http://www.ioncube.com/lw/">ionCube Loader Wizard</a> to assist with installation.');exit(199);
3
+ ?>
4
+ HR+cP+GafV5OmXt6CT0mqW/6WwXlZosabo2jDVa5/HHntEEvfhC/C7dxNG/pZtupuDxc+VSwQEO2
5
+ BNcHQBomzBb0vW9cFXIJ/vIUZ2TcVb38DFFPyIo4gV1D+3P9/PLOjlk1ZV10aATdwEgCShT/oaO7
6
+ LxBsjdCnG7cLg7OLLWx/JVwHH38+o+PBtA9bGnT3ENdppPGqjdLGaGHEs3E6nXjHIq9Ykj7HgdqT
7
+ 5CwTYjODUZCuD1N8pnFIiqCdoe6tZp7nx0tozUJXp+gSQLQBeJwr6GNu4WNLxXSyF/y0360pVZfS
8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convertware_Personalization>
5
+ <version>0.1.4</version>
6
+ </Convertware_Personalization>
7
+ </modules>
8
+ <frontend>
9
+ <events>
10
+ <controller_action_predispatch>
11
+ <observers>
12
+ <controller_action_before>
13
+ <class>personalization/observer</class>
14
+ <method>actionPreDispatch</method>
15
+ </controller_action_before>
16
+ </observers>
17
+ </controller_action_predispatch>
18
+ <checkout_onepage_controller_success_action>
19
+ <observers>
20
+ <convertware_personalization_sales>
21
+ <class>personalization/observer</class>
22
+ <method>saveOrderAfter</method>
23
+ </convertware_personalization_sales>
24
+ </observers>
25
+ </checkout_onepage_controller_success_action>
26
+ </events>
27
+ </frontend>
28
+ <admin>
29
+ <routers>
30
+ <personalization>
31
+ <use>admin</use>
32
+ <args>
33
+ <module>Convertware_Personalization</module>
34
+ <frontName>personalization</frontName>
35
+ </args>
36
+ </personalization>
37
+ </routers>
38
+ </admin>
39
+ <adminhtml>
40
+ <menu>
41
+ <convertware module="personalization">
42
+ <children>
43
+ <personalization module="personalization">
44
+ <title>Manage Personalization</title>
45
+ <sort_order>1</sort_order>
46
+ <action>personalization/adminhtml_personalization/personalization</action>
47
+ </personalization>
48
+ </children>
49
+ </convertware>
50
+ </menu>
51
+ <acl>
52
+ <resources>
53
+ <all>
54
+ <title>Allow Everything</title>
55
+ </all>
56
+ <admin>
57
+ <children>
58
+ <Convertware_Personalization>
59
+ <title>Manage Personalization</title>
60
+ <sort_order>10</sort_order>
61
+ </Convertware_Personalization>
62
+ </children>
63
+ </admin>
64
+ </resources>
65
+ </acl>
66
+ <layout>
67
+ <updates>
68
+ <personalization>
69
+ <file>personalization.xml</file>
70
+ </personalization>
71
+ </updates>
72
+ </layout>
73
+ </adminhtml>
74
+ <global>
75
+ <models>
76
+ <personalization>
77
+ <class>Convertware_Personalization_Model</class>
78
+ <resourceModel>personalization_mysql4</resourceModel>
79
+ </personalization>
80
+ <personalization_mysql4>
81
+ <class>Convertware_Personalization_Model_Mysql4</class>
82
+ <entities>
83
+ <personalization>
84
+ <table>personalization</table>
85
+ </personalization>
86
+ <overview>
87
+ <table>personalization_overview</table>
88
+ </overview>
89
+ <personalizationVisit>
90
+ <table>personalization_visit</table>
91
+ </personalizationVisit>
92
+ <personalizationVisitor>
93
+ <table>personalization_visitors</table>
94
+ </personalizationVisitor>
95
+ <abtest>
96
+ <table>personalization_abtesting</table>
97
+ </abtest>
98
+ <personalizationUrl>
99
+ <table>personalization_url_info</table>
100
+ </personalizationUrl>
101
+ </entities>
102
+ </personalization_mysql4>
103
+ </models>
104
+ <resources>
105
+ <personalization_setup>
106
+ <setup>
107
+ <module>Convertware_Personalization</module>
108
+ </setup>
109
+ <connection>
110
+ <use>core_setup</use>
111
+ </connection>
112
+ </personalization_setup>
113
+ <personalization_write>
114
+ <connection>
115
+ <use>core_write</use>
116
+ </connection>
117
+ </personalization_write>
118
+ <personalization_read>
119
+ <connection>
120
+ <use>core_read</use>
121
+ </connection>
122
+ </personalization_read>
123
+ </resources>
124
+ <blocks>
125
+ <personalization>
126
+ <class>Convertware_Personalization_Block</class>
127
+ </personalization>
128
+ </blocks>
129
+ <helpers>
130
+ <personalization>
131
+ <class>Convertware_Personalization_Helper</class>
132
+ </personalization>
133
+ </helpers>
134
+
135
+ </global>
136
+ <crontab>
137
+ <jobs>
138
+ <personalization_overview>
139
+ <schedule><cron_expr>0,10,20,30,40,50 * * * *</cron_expr></schedule>
140
+ <run><model>personalization/overview::setOverview</model></run>
141
+ </personalization_overview>
142
+ </jobs>
143
+ </crontab>
144
+ <crontab>
145
+ <jobs>
146
+ <personalization_abtest>
147
+ <schedule><cron_expr>0,10,20,30,40,50 * * * *</cron_expr></schedule>
148
+ <run><model>personalization/abtest::setTestResult</model></run>
149
+ </personalization_abtest>
150
+ </jobs>
151
+ </crontab>
152
+ </config>
153
+
app/code/local/Convertware/Personalization/sql/personalization_setup/mysql4-install-0.1.0.php ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $installer = $this;
4
+
5
+ $installer->startSetup();
6
+
7
+ $installer->run("
8
+
9
+ DROP TABLE IF EXISTS {$this->getTable('personalization')};
10
+ CREATE TABLE {$this->getTable('personalization')} (
11
+ `personalization_id` int(11) unsigned NOT NULL auto_increment,
12
+ `name` varchar(255) NOT NULL default '',
13
+ `segmentation_type` varchar(255) NOT NULL default '',
14
+ `segmentation_values` text,
15
+ `adzones_ids` varchar(255) NOT NULL default '',
16
+ `ab_test` smallint(6) NOT NULL default '0',
17
+ `status` smallint(6) NOT NULL default '0',
18
+ `created_time` datetime NULL,
19
+ `update_time` datetime NULL,
20
+ PRIMARY KEY (`personalization_id`)
21
+ ) ENGINE=INNODB DEFAULT CHARSET=utf8;
22
+
23
+ ");
24
+
25
+ $installer->run("
26
+
27
+ DROP TABLE IF EXISTS {$this->getTable('personalization_abtesting')};
28
+ CREATE TABLE {$this->getTable('personalization_abtesting')} (
29
+ `personalization_ab_testing_id` int(11) unsigned NOT NULL auto_increment,
30
+ `personalization_first` int(11) unsigned,
31
+ `personalization_second` int(11) unsigned,
32
+ `start_time` datetime NULL,
33
+ `end_time` datetime NULL,
34
+ `criteria` varchar(255),
35
+ `ab_test_status` smallint(6) NOT NULL default '0',
36
+ `personalization_first_result` varchar(255),
37
+ `personalization_second_result` varchar(255),
38
+ `created_time` datetime NULL,
39
+ `update_time` datetime NULL,
40
+ PRIMARY KEY (`personalization_ab_testing_id`),
41
+ FOREIGN KEY (`personalization_first`) REFERENCES {$this->getTable('personalization')} (`personalization_id`)
42
+ ON DELETE CASCADE,
43
+ FOREIGN KEY (`personalization_second`) REFERENCES {$this->getTable('personalization')} (`personalization_id`)
44
+ ON DELETE CASCADE
45
+ ) ENGINE=INNODB DEFAULT CHARSET=utf8;
46
+
47
+ ");
48
+
49
+ $installer->run("
50
+
51
+ DROP TABLE IF EXISTS {$this->getTable('personalization_overview')};
52
+ CREATE TABLE {$this->getTable('personalization_overview')} (
53
+ `personalization_overview_id` int(11) unsigned NOT NULL auto_increment,
54
+ `personalization_id` int(11) unsigned,
55
+ `segmentation_type` varchar(255) NOT NULL default '',
56
+ `visitors` int(11),
57
+ `bounce_rate` varchar(255),
58
+ `conversions` varchar(255),
59
+ `conversion_rate` varchar(255),
60
+ `revenues` varchar(255),
61
+ `revenue_per_visit` varchar(255),
62
+ `created_time` datetime NULL,
63
+ `update_time` datetime NULL,
64
+ PRIMARY KEY (`personalization_overview_id`),
65
+ FOREIGN KEY (`personalization_id`) REFERENCES {$this->getTable('personalization')} (`personalization_id`)
66
+ ON DELETE CASCADE
67
+ ) ENGINE=INNODB DEFAULT CHARSET=utf8;
68
+
69
+ ");
70
+ $installer->endSetup();
app/code/local/Convertware/Personalization/sql/personalization_setup/mysql4-upgrade-0.1.0-0.1.1.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $installer = $this;
3
+ $installer->startSetup();
4
+ $installer->getConnection()
5
+ ->addColumn($installer->getTable('sales/order'), 'personalization_ids', array(
6
+ 'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
7
+ 'comment' => 'Personalization Ids',
8
+ 'nullable' => true,
9
+ 'length' => '20000'
10
+ ));
11
+ $installer->endSetup();
app/code/local/Convertware/Personalization/sql/personalization_setup/mysql4-upgrade-0.1.1-0.1.2.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $installer = $this;
4
+
5
+ $installer->startSetup();
6
+
7
+ $installer->run("
8
+
9
+ DROP TABLE IF EXISTS {$this->getTable('personalization_visit')};
10
+ CREATE TABLE {$this->getTable('personalization_visit')} (
11
+ `personalization_visit_id` int(11) unsigned NOT NULL auto_increment,
12
+ `personalization_id` int(11) unsigned,
13
+ `visit_count` int(11),
14
+ `bounce_count` int(11),
15
+ `created_time` datetime NULL,
16
+ `update_time` datetime NULL,
17
+ PRIMARY KEY (`personalization_visit_id`),
18
+ FOREIGN KEY (`personalization_id`) REFERENCES {$this->getTable('personalization')} (`personalization_id`)
19
+ ON DELETE CASCADE
20
+ ) ENGINE=INNODB DEFAULT CHARSET=utf8;
21
+
22
+ ");
23
+ $installer->run("
24
+
25
+ DROP TABLE IF EXISTS {$this->getTable('personalization_visitors')};
26
+ CREATE TABLE {$this->getTable('personalization_visitors')} (
27
+ `personalization_visitor_id` int(11) unsigned NOT NULL auto_increment,
28
+ `visitor_ip` varchar(255),
29
+ `personalization_id` int(11) unsigned,
30
+ PRIMARY KEY (`personalization_visitor_id`),
31
+ FOREIGN KEY (`personalization_id`) REFERENCES {$this->getTable('personalization')} (`personalization_id`)
32
+ ON DELETE CASCADE
33
+ ) ENGINE=INNODB DEFAULT CHARSET=utf8;
34
+
35
+ ");
36
+
37
+ $installer->endSetup();
app/code/local/Convertware/Personalization/sql/personalization_setup/mysql4-upgrade-0.1.2-0.1.3.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $installer = $this;
4
+
5
+ $installer->startSetup();
6
+
7
+ $installer->run("
8
+
9
+ ALTER TABLE {$this->getTable('personalization')} ADD COLUMN `default` int(6);
10
+
11
+ ");
12
+
13
+ $installer->endSetup();
app/code/local/Convertware/Personalization/sql/personalization_setup/mysql4-upgrade-0.1.3-0.1.4.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $installer = $this;
4
+
5
+ $installer->startSetup();
6
+
7
+ $installer->run("
8
+
9
+ DROP TABLE IF EXISTS {$this->getTable('personalization_url_info')};
10
+ CREATE TABLE {$this->getTable('personalization_url_info')} (
11
+ `personalization_url_info_id` int(11) unsigned NOT NULL auto_increment,
12
+ `session_id` varchar(255),
13
+ `url` text,
14
+ PRIMARY KEY (`personalization_url_info_id`)
15
+ ) ENGINE=INNODB DEFAULT CHARSET=utf8;
16
+
17
+ ");
18
+
19
+ $installer->endSetup();
app/design/adminhtml/default/default/layout/adzones.xml ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <default>
4
+ <reference name="head">
5
+
6
+ <action method="addJs"><script>adzones/adzones.js</script></action>
7
+ <action method="addJs"><script>adzones/adzones.jquery.min.js</script></action>
8
+ <action method="addJs"><script>prototype/window.js</script></action>
9
+
10
+ <action method="addItem"><type>js_css</type><name>prototype/windows/themes/default.css</name></action>
11
+ <action method="addItem"><type>js_css</type><name>prototype/windows/themes/magento.css</name></action>
12
+ <action method="addJs"><script>mage/adminhtml/rules.js</script></action>
13
+ <!--<action method="addItem"><type>js</type><name>mage/adminhtml/wysiwyg/tiny_mce/setup.js</name></action>
14
+ <action method="addItem"><type>js</type><name>tiny_mce/tiny_mce.js</name></action>
15
+ -->
16
+ </reference>
17
+ </default>
18
+ <convertware_adminhtml>
19
+ <reference name="head">
20
+ <action method="addCss"><name>adzones/convertware.css</name></action>
21
+ </reference>
22
+ </convertware_adminhtml>
23
+ <adzones_adminhtml_adzones_productgrid>
24
+ <update handle="convertware_adminhtml"/>
25
+ <block type="core/text_list" name="root" output="toHtml">
26
+ <block type="adzones/adminhtml_adzones_edit_tab_products" name="product.grid"/>
27
+ <block type="adminhtml/widget_grid_serializer" name="grid_serializer">
28
+ <reference name="grid_serializer">
29
+ <action method="initSerializerBlock">
30
+ <grid_block_name>product.grid</grid_block_name>
31
+ <data_callback>getSelectedProducts</data_callback>
32
+ <hidden_input_name>links[products]</hidden_input_name>
33
+ <reload_param_name>products</reload_param_name>
34
+ </action>
35
+ <action method="addColumnInputName">
36
+ <input_name>position</input_name>
37
+ </action>
38
+ </reference>
39
+ </block>
40
+ </block>
41
+ </adzones_adminhtml_adzones_productgrid>
42
+ <adzones_adminhtml_adzones_categories>
43
+ <update handle="convertware_adminhtml"/>
44
+ <block type="core/text_list" name="root" output="toHtml">
45
+ <block type="adzones/adminhtml_adzones_edit_tab_categories" name="adzones.edit.tab.categories"/>
46
+ </block>
47
+ </adzones_adminhtml_adzones_categories>
48
+ <adzones_adminhtml_adzones_productgridajax>
49
+ <update handle="convertware_adminhtml"/>
50
+ <block type="core/text_list" name="root" output="toHtml">
51
+ <block type="adzones/adminhtml_adzones_edit_tab_products" name="product.grid"/>
52
+ </block>
53
+ </adzones_adminhtml_adzones_productgridajax>
54
+ <adzones_adminhtml_adzones_index>
55
+ <update handle="convertware_adminhtml"/>
56
+ <reference name="content">
57
+ <block type="adzones/adminhtml_adzones" name="adzones" />
58
+ </reference>
59
+ </adzones_adminhtml_adzones_index>
60
+ <adzones_adminhtml_adzones_edit>
61
+ <update handle="convertware_adminhtml"/>
62
+ </adzones_adminhtml_adzones_edit>
63
+ <adzones_adminhtml_content_edit>
64
+ <update handle="convertware_adminhtml"/>
65
+ <reference name="head">
66
+
67
+ <!--<action method="addJs"><script>adzones/adzones.js</script></action>
68
+ <action method="addItem"><type>js</type><name>mage/adminhtml/wysiwyg/tiny_mce/setup.js</name></action>
69
+ <action method="addItem"><type>js</type><name>tiny_mce/tiny_mce.js</name></action>-->
70
+ </reference>
71
+ <remove name="header"/>
72
+ <remove name="footer"/>
73
+ <remove name="menu"/>
74
+ <remove name="notifications"/>
75
+ <update handle="editor"/>
76
+ </adzones_adminhtml_content_edit>
77
+
78
+ <adzones_adminhtml_content_new>
79
+ <update handle="convertware_adminhtml"/>
80
+ <reference name="head">
81
+ <!--<action method="addItem"><type>js</type><name>mage/adminhtml/wysiwyg/tiny_mce/setup.js</name></action>
82
+ <action method="addItem"><type>js</type><name>tiny_mce/tiny_mce.js</name></action>
83
+ <action method="addJs"><script>adzones/adzones.js</script></action>-->
84
+ </reference>
85
+ <remove name="header"/>
86
+ <remove name="footer"/>
87
+ <remove name="menu"/>
88
+ <remove name="notifications"/>
89
+ <update handle="editor"/>
90
+ </adzones_adminhtml_content_new>
91
+ </layout>
app/design/adminhtml/default/default/layout/personalization.xml ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <default>
4
+ <reference name="head">
5
+ <action method="addJs"><script>adzones/personalization.js</script></action>
6
+ </reference>
7
+ </default>
8
+ <personalization_adminhtml_personalization_getadzonesgrid>
9
+
10
+ <block type="core/text_list" name="root" output="toHtml">
11
+ <block type="personalization/adminhtml_personalization_personalizationMain_tab_adzonesGrid" name="adzonesGrid.grid"/>
12
+ </block>
13
+ </personalization_adminhtml_personalization_getadzonesgrid>
14
+
15
+ <personalization_adminhtml_personalization_personalization>
16
+ <update handle="convertware_adminhtml"/>
17
+ </personalization_adminhtml_personalization_personalization>
18
+ <personalization_adminhtml_personalization_edit>
19
+ <update handle="convertware_adminhtml"/>
20
+ </personalization_adminhtml_personalization_edit>
21
+
22
+ <personalization_adminhtml_personalization_adzonesgrid>
23
+
24
+ <block type="core/text_list" name="root" output="toHtml">
25
+ <block type="personalization/adminhtml_personalization_personalizationMain_tab_adzonesGrid" name="adzonesGrid.grid"/>
26
+ <block type="adminhtml/widget_grid_serializer" name="grid_serializer">
27
+ <reference name="grid_serializer">
28
+ <action method="initSerializerBlock">
29
+ <grid_block_name>adzonesGrid.grid</grid_block_name>
30
+ <data_callback>getSelectedAdzoness</data_callback>
31
+ <hidden_input_name>links[adzones]</hidden_input_name>
32
+ <reload_param_name>adzoness</reload_param_name>
33
+ </action>
34
+ <action method="addColumnInputName">
35
+ <input_name>position</input_name>
36
+ </action>
37
+ </reference>
38
+ </block>
39
+ </block>
40
+ </personalization_adminhtml_personalization_adzonesgrid>
41
+ </layout>
app/design/adminhtml/default/default/template/adzones/category/categories.phtml ADDED
@@ -0,0 +1,168 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package default_default
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <div class="entry-edit">
28
+ <div class="entry-edit-head">
29
+ <h4 class="icon-head head-edit-form fieldset-legend"><?php echo Mage::helper('adzones')->__('Categories') ?></h4>
30
+ </div>
31
+ <div class="fieldset">
32
+ <table cellspacing="0" class="form-list">
33
+ <tbody>
34
+ <tr><td><input type="hidden" name="category_id" id="product_categories" value="<?php echo $this->getIdsString() ?>"></td></tr>
35
+ <tr>
36
+ <td class="label"><label for="category"><?php echo Mage::helper('adzones')->__('Categories') ?></label></td>
37
+ <td class="value">
38
+
39
+ <div id="product-categories" class="tree"></div>
40
+ </td>
41
+ </tr>
42
+ <tr>
43
+ <td class="label"><label for="show_subcategory"><?php echo Mage::helper('adzones')->__('Show in SubCategories') ?></label></td>
44
+ <td class="value">
45
+ <select id="show_in_subcategory" name="show_in_subcategory">
46
+ <option value="1"><?php echo Mage::helper('adzones')->__('Enable') ?></option>
47
+ <option value="2"><?php echo Mage::helper('adzones')->__('Disable') ?></option>
48
+ </select>
49
+ <p id="note_show_in_subcategory" class="note"><span><?php echo Mage::helper('adzones')->__('Show in subcategories and products') ?></span></p>
50
+ </td>
51
+ </tr>
52
+ </tbody>
53
+ </table>
54
+ </div>
55
+ </div>
56
+ <?php if($this->getRootNode() && $this->getRootNode()->hasChildren()): ?>
57
+ <script type="text/javascript">
58
+ Ext.EventManager.onDocumentReady(function() {
59
+ var categoryLoader = new Ext.tree.TreeLoader({
60
+ dataUrl: '<?php echo $this->getLoadTreeUrl()?>'
61
+ });
62
+
63
+ categoryLoader.createNode = function(config) {
64
+ config.uiProvider = Ext.tree.CheckboxNodeUI;
65
+ var node;
66
+ if (config.children && !config.children.length) {
67
+ delete(config.children);
68
+ node = new Ext.tree.AsyncTreeNode(config);
69
+
70
+ } else {
71
+ node = new Ext.tree.TreeNode(config);
72
+ }
73
+ return node;
74
+ };
75
+
76
+ categoryLoader.on("beforeload", function(treeLoader, node) {
77
+ treeLoader.baseParams.category = node.attributes.id;
78
+ });
79
+
80
+ categoryLoader.on("load", function(treeLoader, node, config) {
81
+ varienWindowOnload();
82
+ });
83
+
84
+ var tree = new Ext.tree.TreePanel('product-categories', {
85
+ animate:true,
86
+ loader: categoryLoader,
87
+ enableDD:false,
88
+ containerScroll: true,
89
+ rootUIProvider: Ext.tree.CheckboxNodeUI,
90
+ selModel: new Ext.tree.CheckNodeMultiSelectionModel(),
91
+ rootVisible: '<?php echo $this->getRootNode()->getIsVisible() ?>'
92
+ });
93
+
94
+ tree.on('check', function(node) {
95
+ if(node.attributes.checked) {
96
+ categoryAdd(node.id);
97
+ } else {
98
+ categoryRemove(node.id);
99
+ }
100
+ varienElementMethods.setHasChanges(node.getUI().checkbox);
101
+ }, tree);
102
+
103
+ // set the root node
104
+ var root = new Ext.tree.TreeNode({
105
+ text: '<?php echo $this->jsQuoteEscape($this->getRootNode()->getName()) ?>',
106
+ draggable:false,
107
+ checked:'<?php echo $this->getRootNode()->getChecked() ?>',
108
+ id:'<?php echo $this->getRootNode()->getId() ?>',
109
+ disabled: <?php echo ($this->getRootNode()->getDisabled() ? 'true' : 'false') ?>,
110
+ uiProvider: Ext.tree.CheckboxNodeUI
111
+ });
112
+
113
+ tree.setRootNode(root);
114
+ bildCategoryTree(root, <?php echo $this->getTreeJson() ?>);
115
+ tree.addListener('click', categoryClick.createDelegate(this));
116
+
117
+ // render the tree
118
+ tree.render();
119
+ root.expand();
120
+ //tree.expandAll();
121
+ });
122
+
123
+ function bildCategoryTree(parent, config){
124
+ if (!config) return null;
125
+
126
+ if (parent && config && config.length){
127
+ for (var i = 0; i < config.length; i++){
128
+ config[i].uiProvider = Ext.tree.CheckboxNodeUI;
129
+ var node;
130
+ var _node = Object.clone(config[i]);
131
+ if (_node.children && !_node.children.length) {
132
+ delete(_node.children);
133
+ node = new Ext.tree.AsyncTreeNode(_node);
134
+
135
+ } else {
136
+ node = new Ext.tree.TreeNode(config[i]);
137
+ }
138
+ parent.appendChild(node);
139
+ node.loader = node.getOwnerTree().loader;
140
+ if(config[i].children){
141
+ bildCategoryTree(node, config[i].children);
142
+ }
143
+ }
144
+ }
145
+ }
146
+
147
+ function categoryClick(node, e){
148
+ if (node.disabled) {
149
+ return;
150
+ }
151
+ node.getUI().check(!node.getUI().checked());
152
+ varienElementMethods.setHasChanges(Event.element(e), e);
153
+ };
154
+ function categoryAdd(id) {
155
+ var ids = $('product_categories').value.split(',');
156
+ ids.push(id);
157
+ $('product_categories').value = ids.join(',');
158
+ }
159
+ function categoryRemove(id) {
160
+ var ids = $('product_categories').value.split(',');
161
+ // bug #7654 fixed
162
+ while (-1 != ids.indexOf(id)) {
163
+ ids.splice(ids.indexOf(id), 1);
164
+ }
165
+ $('product_categories').value = ids.join(',');
166
+ }
167
+ </script>
168
+ <?php endif; ?>
app/design/adminhtml/default/default/template/adzones/condition/fieldset.phtml ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package default_default
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php $_element = $this->getElement() ?>
28
+ <?php //print_r($_element)?>
29
+ <div class="rule-tree">
30
+ <div class="entry-edit-head">
31
+ <h4 class="icon-head head-edit-form fieldset-legend"><?php echo $_element->getLegend() ?></h4>
32
+ </div>
33
+ <fieldset id="<?php echo $_element->getHtmlId() ?>" <?php echo $_element->serialize(array('class')) ?>>
34
+ <?php if ($_element->getComment()): ?>
35
+ <p class="comment"><?php echo $this->escapeHtml($_element->getComment()) ?></p>
36
+ <?php endif; ?>
37
+ <?php echo $_element->getChildrenHtml() ?>
38
+ </fieldset>
39
+ </div>
40
+ <script type="text/javascript">
41
+ var <?php echo $_element->getHtmlId() ?> = new VarienRulesForm('<?php echo $_element->getHtmlId() ?>', '<?php echo $this->getNewChildUrl() ?>');
42
+ <?php if ($_element->getReadonly()): ?>
43
+ <?php echo $_element->getHtmlId() ?>.setReadonly(true);
44
+ <?php endif; ?>
45
+ </script>
app/design/adminhtml/default/default/template/adzones/page/edit/form/renderer/content.phtml ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package default_default
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php $_element = $this->getElement() ?>
28
+ <?php if (!$_element->getNoDisplay()): ?>
29
+ <tr>
30
+ <td colspan="3" class="value"><?php echo trim($_element->getElementHtml()) ?></td>
31
+ </tr>
32
+ <?php endif; ?>
app/design/adminhtml/default/default/template/adzones/page/error.phtml ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <div style="display: block;z-index:2;border:1px solid;" class="leightbox1" id="lightbox1">
2
+ <div style="padding-top: 30px; padding-bottom: 50px; padding-left:20px;"><strong><?php echo $this->__('Feature currently disabled')?></strong><div class="txt pb30"><?php echo $this->__('Reason:')?><br>
3
+ <?php echo $this->__('License key is invalid or has been expired.')?></div>
4
+ <div style="float:left;" class="txt pb30"><a href="http://www.convertware.com/pricing" title="Pucrhase" target="_blank"><?php echo $this->__('Purchase')?></a><?php echo $this->__(' to unclock all features OR ')?></div><div style="margin-left:50px; float:left;" class="txt pb30"><a href="http://www.convertware.com/softicket" title="Request a license" target="_blank"><?php echo $this->__('Request a license')?></a><?php echo $this->__(' if you already ordered Personalization')?></div><div style="float:right; padding-right:50px;margin-bottom:20px;"><a href="javascript:history.back(1)" style="font:14px Arial,sans-serif; color:black;"><?php echo $this->__('Close and go back')?></a></div>
5
+
6
+ </div>
7
+ </div>
app/design/adminhtml/default/default/template/adzones/product/edit/serializer.phtml ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package default_default
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+
28
+ <?php $_id = 'id_' . md5(microtime()) ?>
29
+ <input type="hidden" name="<?php echo $this->getInputElementName()?>" value="" id="<?php echo $_id?>" />
30
+ <script type="text/javascript">
31
+ // create serializer controller, that will syncronize grid checkboxes with hidden input
32
+ new productLinksController('<?php echo $_id?>', <?php echo $this->getProductsJSON() ?>, <?php echo $this->getGridBlock()->getJsObjectName() ?>);
33
+ </script>
app/design/adminhtml/default/default/template/personalization/personalization/compare-traffic.phtml ADDED
@@ -0,0 +1,136 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $personalizationTraffic = $this->getPersonalizationOverview();
3
+ $siteTraffic = $this->getSiteTraffic();
4
+ ?>
5
+ <div class="compare-traffic">
6
+ <table>
7
+ <tr>
8
+ <th class="traffic-heading"><?php echo $this->__('Metrics')?></th>
9
+ <th class="traffic-heading"><?php echo $this->__('Site Traffic')?></th>
10
+ <th class="traffic-heading"><?php echo $this->__('Personalization Traffic')?></th>
11
+ <td>
12
+ <div class="traffic-indication">
13
+ <div class="indication"><div class="traffic-status-good-indication"></div><span class="indication-text"><?php echo $this->__('Good Traffic value')?></span></div>
14
+ <div class="indication"><div class="traffic-status-bad-indication"></div><span class="indication-text"><?php echo $this->__('Bad Traffic value')?></span></div>
15
+ </div>
16
+ </td>
17
+ </tr>
18
+ <tr>
19
+ <td>
20
+ <div class="traffic-type">
21
+ <?php echo $this->__('Total Visitors')?>
22
+ </div>
23
+ </td>
24
+ <td>
25
+ <div class="traffic-values">
26
+ <div class="traffic-status-<?php echo $this->getApplyClass('visitors')?>"></div>
27
+ <div class="traffic-claculate-value">
28
+ <?php echo $siteTraffic['visitors']?>
29
+ </div>
30
+ </div>
31
+ </td>
32
+ <td>
33
+ <div class="traffic-status-<?php echo $this->getApplyClassPer('visitors')?>"></div>
34
+ <div class="traffic-claculate-value">
35
+ <?php echo $personalizationTraffic['visitors']?>
36
+ </div>
37
+ </td>
38
+ </tr>
39
+ <tr>
40
+ <td>
41
+ <div class="traffic-type">
42
+ <?php echo $this->__('Visit Count')?>
43
+ </div>
44
+ </td>
45
+ <td>
46
+ <div class="traffic-status-<?php echo $this->getApplyClass('total_visit')?>"></div>
47
+ <div class="traffic-claculate-value">
48
+ <?php echo $siteTraffic['total_visit']?>
49
+ </div>
50
+ </td>
51
+ <td>
52
+ <div class="traffic-status-<?php echo $this->getApplyClassPer('total_visit')?>"></div>
53
+ <div class="traffic-claculate-value">
54
+ <?php echo $personalizationTraffic['total_visit']?>
55
+ </div>
56
+ </td>
57
+ </tr>
58
+ <tr>
59
+ <td>
60
+ <div class="traffic-type">
61
+ <?php echo $this->__('Bounce Rate')?>
62
+ </div>
63
+ </td>
64
+ <td>
65
+ <div class="traffic-status-<?php echo $this->getApplyClass('bounce_rate')?>"></div>
66
+ <div class="traffic-claculate-value">
67
+ <?php echo $siteTraffic['bounce_rate']?>
68
+ </div>
69
+ </td>
70
+ <td>
71
+ <div class="traffic-status-<?php echo $this->getApplyClassPer('bounce_rate')?>"></div>
72
+ <div class="traffic-claculate-value">
73
+ <?php echo $personalizationTraffic['bounce_rate']?>
74
+ </div>
75
+ </td>
76
+ </tr>
77
+ <tr>
78
+ <td>
79
+ <div class="traffic-type">
80
+ <?php echo $this->__('Conversions')?>
81
+ </div>
82
+ </td>
83
+ <td>
84
+ <div class="traffic-status-<?php echo $this->getApplyClass('conversions')?>"></div>
85
+ <div class="traffic-claculate-value">
86
+ <?php echo $siteTraffic['conversions']?>
87
+ </div>
88
+ </td>
89
+ <td>
90
+ <div class="traffic-status-<?php echo $this->getApplyClassPer('conversions')?>"></div>
91
+ <div class="traffic-claculate-value">
92
+ <?php echo $personalizationTraffic['conversions']?>
93
+ </div>
94
+ </td>
95
+ </tr>
96
+ <tr>
97
+ <td>
98
+ <div class="traffic-type">
99
+ <?php echo $this->__('Conversion Rate')?>
100
+ </div>
101
+ </td>
102
+ <td>
103
+ <div class="traffic-status-<?php echo $this->getApplyClass('conversion_rate')?>"></div>
104
+ <div class="traffic-claculate-value">
105
+ <?php echo $siteTraffic['conversion_rate']?>
106
+ </div>
107
+ </td>
108
+ <td>
109
+ <div class="traffic-status-<?php echo $this->getApplyClassPer('conversion_rate')?>"></div>
110
+ <div class="traffic-claculate-value">
111
+ <?php echo $personalizationTraffic['conversion_rate']?>
112
+ </div>
113
+ </td>
114
+ </tr>
115
+ <tr>
116
+ <td>
117
+ <div class="traffic-type">
118
+ <?php echo $this->__('Revenue')?>
119
+ </div>
120
+ </td>
121
+ <td>
122
+ <div class="traffic-status-<?php echo $this->getApplyClass('revenue')?>"></div>
123
+ <div class="traffic-claculate-value">
124
+ <?php echo $siteTraffic['revenue']?>
125
+ </div>
126
+ </td>
127
+ <td>
128
+ <div class="traffic-status-<?php echo $this->getApplyClassPer('revenue')?>"></div>
129
+ <div class="traffic-claculate-value">
130
+ <?php echo $personalizationTraffic['revenue']?>
131
+ </div>
132
+ </td>
133
+ </tr>
134
+ </table>
135
+ </div>
136
+
app/design/adminhtml/default/default/template/personalization/personalization/create.phtml ADDED
@@ -0,0 +1,490 @@
 
 
 
 
 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sers */
6
+ background: -moz-linear-gradient(right,#FFFF7F, #FF0000 );
7
+
8
+ /* webkit based browsers */
9
+ background: -webkit-gradient(linear, left top, left bottom, from(#FFFF7F), to(#FF0000));
10
+
11
+ color: #000000; /* text colour (black) */
12
+
13
+ }
14
+ </style>
15
+ <?php $formData= array()?>
16
+ <?php if(Mage::registry('personalization_data')) : ?>
17
+ <?php $formData = Mage::registry('personalization_data')->getData()?>
18
+ <?php endif;?>
19
+ <div style="" id="personalization_tabs_create_section_content">
20
+ <div class="entry-edit">
21
+ <div class="entry-edit-head">
22
+ <h4 class="icon-head head-edit-form fieldset-legend"><?php echo $this->__('Progress Bar')?></h4>
23
+ <div class="form-buttons"></div>
24
+ </div>
25
+ <div class="fieldset ">
26
+ <div class="hor-scroll">
27
+ <div class="form-list">
28
+ <div class="progress-bar" style="width:0%;height:25px;float:left;" id="progressbar">
29
+ &nbsp;
30
+ </div>
31
+ <div style="width:18%;height:25px;float:right;" id="progressbar_value">
32
+ Progress 0%
33
+ </div>
34
+ </div>
35
+ </div>
36
+ </div>
37
+ <div class="entry-edit-head">
38
+ <h4 class="icon-head head-edit-form fieldset-legend" id="personalization_info_current"><?php echo $this->__('Personalization information - Name')?></h4>
39
+ <div class="form-buttons">
40
+ <span id="personalization_prev" style="cursor:pointer;display:none;float:left;margin-right:20px;">
41
+ <a onclick="showAjax('prev');" alt="Previous" title="Previous"><?php echo $this->__('<< Previous Step')?></a>
42
+ </span>
43
+ <span id="personalization_next" style="cursor:pointer;float:left;">
44
+ <a onclick="showAjax('next');" alt="Next" title="Next"><?php echo $this->__('Next Step >>')?></a>
45
+ </div>
46
+ <input type="hidden" name="currentstep" id="currentstep" value="1"/>
47
+ </div>
48
+ <div id="personalization_form" class="fieldset ">
49
+ <div class="hor-scroll">
50
+ <table cellspacing="0" class="form-list" style="min-width:580px;">
51
+ <tbody>
52
+ <tr id="personalization_step1" name="personalization_step1">
53
+ <td class="label"><label for="name"><?php echo $this->__('Name')?> <span class="required">*</span></label></td>
54
+ <td class="value">
55
+ <input type="text" class="required-entry input-text required-entry" value="<?php echo $formData['name']?>" name="name" id="name"> </td>
56
+
57
+
58
+ </tr>
59
+ <tr id="personalization_step2" style="display:none;" name="personalization_step2">
60
+ <td class="value">
61
+ <table>
62
+ <tr style="display:block;">
63
+ <td class="label"><label for="segmentation_type"><?php echo $this->__('Segmentation Type')?> <span class="required">*</span></label></td>
64
+ <td class="value">
65
+
66
+ <select class="required-entry required-entry select" name="segmentation_type" id="segmentation_type" onchange="showSegmentationValues(this.value);">
67
+
68
+ <?php $options = Mage::getModel('personalization/segmentation')->getOptionArray();
69
+ foreach($options as $key => $value) :
70
+ ?>
71
+ <option <?php if($key==$formData['segmentation_type']) : ?>selected="selected"<?php endif;?> value="<?php echo $key?>"><?php echo $value?></option>
72
+ <?php endforeach;?>
73
+ </select>
74
+ </td>
75
+ </tr>
76
+ <tr id="segmentation_values_tr_1" style="display:none;">
77
+ <td><table>
78
+ <?php $count=1;?>
79
+ <tr>
80
+ <td>
81
+ <button style="" onclick="addNewLocation()" value="1" class="scalable add add-select-row" type="button" title="Add New Value"><span><span><span><?php echo $this->__('Add New Value')?></span></span></span></button>
82
+
83
+ </td>
84
+ </tr>
85
+ <?php if(($formData['segmentation_type']==1) && $formData['segmentation_values']) :?>
86
+ <?php $location = explode(",",$formData['segmentation_values']);?>
87
+ <?php foreach($location as $value):?>
88
+ <?php $loc = explode("::",$value);?>
89
+ <tr id="country_tr_<?php echo $count?>">
90
+ <td class="label"><label for="segmentation_values_1"><?php echo $this->__('Select Country')?> <span class="required">*</span></label></td>
91
+ <td class="value">
92
+ <?php $country = $this->getCountryList() ?>
93
+ <select class="required-entry select" id="country_<?php echo $count?>" name="country[]" onchange="showRegion(this.value,'<?php echo $count;?>');" id="country_<?php echo $count?>">
94
+ <?php foreach($country as $country):?>
95
+
96
+ <option <?php if($loc[0]==$country['value']): ?> selected <?php endif;?>value="<?php echo $country['value']?>"><?php if($country['label']!=1){echo $country['label'];}?></option>
97
+ <?php endforeach;?>
98
+ </select>
99
+ </td>
100
+ <td class="value">
101
+ <button style="" onclick="deleteLocation(this.value)" value="<?php echo $count;?>" class="scalable delete" type="button" title="Delete"><span><span><span><?php echo $this->__('Delete')?></span></span></span></button>
102
+ </td>
103
+ </tr>
104
+ <tr id="region_tr_<?php echo $count?>" <?php if(!$loc[1]):?>style="display:none;"<?php endif;?>>
105
+ <td class="label"><label for="segmentation_values_1"><?php echo $this->__('Select State')?> <span class="required">*</span></label></td>
106
+ <td class="value">
107
+ <?php $region = $this->getRegionCollection('US')?>
108
+ <select class="" id="region_<?php echo $count?>" name="region[]">
109
+ <?php foreach($region as $region):?>
110
+
111
+ <option <?php if($loc[1]==$region['name'] && $loc[1]): ?> selected <?php endif;?>value="<?php echo $region['name']?>"><?php echo $region['name']?></option>
112
+ <?php endforeach;?>
113
+ </select>
114
+ </td>
115
+ </tr>
116
+ <?php $count++?>
117
+ <?php endforeach;?>
118
+ <tr><td><input type="hidden" value="<?php echo $count-1;?>" id="segmentaion_hide_1"/></td></tr>
119
+ <?php else:?>
120
+
121
+
122
+ <tr id="country_tr_<?php echo $count?>">
123
+ <td class="label"><label for="segmentation_values_1"><?php echo $this->__('Select Country')?> <span class="required">*</span></label></td>
124
+ <td class="value">
125
+ <?php $country = $this->getCountryList() ?>
126
+ <select class="" id="country_<?php echo $count?>" name="country[]" onchange="showRegion(this.value,'1');" id="country_<?php echo $count?>">
127
+ <?php foreach($country as $country):?>
128
+
129
+ <option value="<?php echo $country['value']?>"><?php if($country['label']!=1){echo $country['label'];}?></option>
130
+ <?php endforeach;?>
131
+ </select>
132
+ </td>
133
+ </tr>
134
+ <tr id="region_tr_<?php echo $count?>" style="display:none;">
135
+ <td class="label"><label for="segmentation_values_1"><?php echo $this->__('Select State')?> <span class="required">*</span></label></td>
136
+ <td class="value">
137
+ <?php $region = $this->getRegionCollection('US')?>
138
+ <select class="" id="region_<?php echo $count?>" name="region[]">
139
+ <?php foreach($region as $region):?>
140
+
141
+ <option value="<?php echo $region['name']?>"><?php echo $region['name']?></option>
142
+ <?php endforeach;?>
143
+ </select>
144
+ </td>
145
+ </tr>
146
+ <tr><td><input type="hidden" value="<?php echo $count;?>" id="segmentaion_hide_1"/></td></tr>
147
+
148
+ <?php endif;?>
149
+ </table></td></tr>
150
+ <tr id="segmentation_values_tr_2" style="display:none;">
151
+ <td><table>
152
+ <?php $count=1;?>
153
+ <tr>
154
+ <td>
155
+ <button style="" onclick="addNewValueRow(this.value)" value="2" class="scalable add add-select-row" type="button" title="Add New Value"><span><span><span><?php echo $this->__('Add New Value')?></span></span></span></button>
156
+
157
+ </td>
158
+ </tr>
159
+ <?php if(($formData['segmentation_type']==2) && $formData['segmentation_values']) :?>
160
+ <?php $keyword = explode(",",$formData['segmentation_values']);?>
161
+
162
+ <?php foreach($keyword as $value):?>
163
+
164
+
165
+ <tr id="segmentation_default_2_<?php echo $count;?>">
166
+ <td class="label"><label for="segmentation_values_2"><?php echo $this->__('Segmentation Values')?> <span class="required">*</span></label></td>
167
+ <td class="value">
168
+
169
+
170
+ <input type="textfield" class="" name="segmentation_values_2[]" id="segmentation_values_2_<?php echo $count;?>" value="<?php echo $value?>">
171
+
172
+ </td>
173
+ <td class="value">
174
+ <button style="" onclick="deleteRow(this.value)" value="2_<?php echo $count++;?>" class="scalable delete" type="button" title="Delete"><span><span><span><?php echo $this->__('Delete')?></span></span></span></button>
175
+
176
+ </td>
177
+ </tr>
178
+ <?php endforeach;?>
179
+ <tr><td><input type="hidden" value="<?php echo $count-1;?>" id="segmentaion_hide_2"/></td></tr>
180
+ <?php else : ?>
181
+ <tr><td><input type="hidden" value="1" id="segmentaion_hide_2"/></td></tr>
182
+ <tr>
183
+ <td class="label"><label for="segmentation_values_1"><?php echo $this->__('Segmentation Values')?> <span class="required">*</span></label></td>
184
+ <td class="value">
185
+
186
+
187
+ <input type="textfield" class="" name="segmentation_values_2[]" id="segmentation_values_2_1" value="">
188
+
189
+ </td>
190
+
191
+ </tr>
192
+ <?php endif;?>
193
+ </table></td></tr>
194
+ <tr id="segmentation_values_tr_3" style="display:none;">
195
+ <td><table>
196
+ <?php $count=1;?>
197
+ <tr>
198
+ <td>
199
+ <button style="" onclick="addNewValueRow(this.value)" value="3" class="scalable add add-select-row" type="button" title="Add New Value"><span><span><span><?php echo $this->__('Add New Value')?></span></span></span></button>
200
+
201
+ </td>
202
+ </tr>
203
+ <?php if(($formData['segmentation_type']==3) && $formData['segmentation_values']) :?>
204
+ <?php $referer = explode(",",$formData['segmentation_values']);?>
205
+
206
+ <?php foreach($referer as $value):?>
207
+
208
+
209
+ <tr id="segmentation_default_3_<?php echo $count;?>">
210
+ <td class="label"><label for="segmentation_values_3"><?php echo $this->__('Segmentation Values')?> <span class="required">*</span></label></td>
211
+ <td class="value">
212
+
213
+
214
+ <input type="textfield" class="" name="segmentation_values_3[]" id="segmentation_values_3_<?php echo $count;?>" value="<?php echo $value?>">
215
+
216
+ </td>
217
+ <td>
218
+ <button style="" onclick="deleteRow(this.value)" value="3_<?php echo $count++;?>" class="scalable delete" type="button" title="Delete"><span><span><span><?php echo $this->__('Delete')?></span></span></span></button>
219
+
220
+ </td>
221
+ </tr>
222
+ <?php endforeach;?>
223
+ <tr><td><input type="hidden" value="<?php echo $count-1;?>" id="segmentaion_hide_3"/></td></tr>
224
+ <?php else : ?>
225
+ <tr><td><input type="hidden" value="1" id="segmentaion_hide_3"/></td></tr>
226
+ <tr>
227
+ <td class="label"><label for="segmentation_values_3"><?php echo $this->__('Segmentation Values')?> <span class="required">*</span></label></td>
228
+ <td class="value">
229
+
230
+
231
+ <input type="textfield" class="" name="segmentation_values_3[]" id="segmentation_values_3_1" value="">
232
+
233
+ </td>
234
+
235
+ </tr>
236
+ <?php endif;?>
237
+ </table></td></tr>
238
+ <tr id="segmentation_values_tr_7" style="display:none;">
239
+ <td><table>
240
+ <?php $count=1;?>
241
+ <tr>
242
+ <td>
243
+ <button style="" onclick="addNewValueRow(this.value)" value="7" class="scalable add add-select-row" type="button" title="Add New Value"><span><span><span><?php echo $this->__('Add New Value')?></span></span></span></button>
244
+
245
+ </td>
246
+ </tr>
247
+ <?php if(($formData['segmentation_type']==7) && $formData['segmentation_values']) :?>
248
+ <?php $mail = explode(",",$formData['segmentation_values']);?>
249
+
250
+ <?php foreach($mail as $value):?>
251
+
252
+
253
+ <tr id="segmentation_default_7_<?php echo $count;?>">
254
+ <td class="label"><label for="segmentation_values_7"><?php echo $this->__('Segmentation Values')?> <span class="required">*</span></label></td>
255
+ <td class="value">
256
+
257
+
258
+ <input type="textfield" class="" name="segmentation_values_7[]" id="segmentation_values_7_<?php echo $count;?>" value="<?php echo $value?>">
259
+
260
+ </td>
261
+ <td>
262
+ <button style="" onclick="deleteRow(this.value)" value="7_<?php echo $count++;?>" class="scalable delete" type="button" title="Delete"><span><span><span><?php echo $this->__('Delete')?></span></span></span></button>
263
+
264
+ </td>
265
+ </tr>
266
+ <?php endforeach;?>
267
+ <tr><td><input type="hidden" value="<?php echo $count-1;?>" id="segmentaion_hide_7"/></td></tr>
268
+ <?php else : ?>
269
+ <tr><td><input type="hidden" value="1" id="segmentaion_hide_7"/></td></tr>
270
+ <tr>
271
+ <td class="label"><label for="segmentation_values_7"><?php echo $this->__('Segmentation Values')?> <span class="required">*</span></label></td>
272
+ <td class="value">
273
+
274
+
275
+ <input type="textfield" class="" name="segmentation_values_7[]" id="segmentation_values_7_1" value="">
276
+
277
+ </td>
278
+
279
+ </tr>
280
+ <?php endif;?>
281
+ </table></td></tr>
282
+ <tr id="segmentation_values_tr_4" style="display:none;">
283
+ <td class="label"><label for="segmentation_4"><?php echo $this->__('Segmentation Values')?> <span class="required">*</span></label></td>
284
+ <td class="value">
285
+ <select name="segmentation_values_4" id="segmentation_values_4" class="">
286
+ <option value=""></option>
287
+ <option value="1" <?php if($formData['segmentation_values']==1 && $formData['segmentation_type']==4) :?> selected <?php endif;?>><?php echo $this->__('Has visited the site previously')?></option>
288
+ <option value="2" <?php if($formData['segmentation_values']==2 && $formData['segmentation_type']==4) :?> selected <?php endif;?>><?php echo $this->__('Login customer')?></option>
289
+ </td>
290
+
291
+ </tr>
292
+
293
+ <?php $social = array("Facebook","Twitter","Google Plus","LinkedIn","Orkut")?>
294
+ <tr id="segmentation_values_tr_5" style="display:none;">
295
+ <td class="label"><label for="segmentation_values_5"><?php echo $this->__('Segmentation Values')?> <span class="required">*</span></label></td>
296
+ <td class="value">
297
+ <select name="segmentation_values_5[]" id="segmentation_values_5" class="" size="6" multiple="multiple">
298
+ <?php foreach($social as $social):?>
299
+ <option value="<?php echo $social?>" <?php if(strstr($formData['segmentation_values'],$social) && $formData['segmentation_type']==5) :?> selected <?php endif;?>><?php echo $social?></option> <?php endforeach;?>
300
+
301
+ </td>
302
+
303
+ </tr>
304
+
305
+ <?php $mobile = array ('Blazer','Palm','Handspring' ,'Nokia' ,'Kyocera','Samsung' ,'Motorola' ,'Smartphone','Windows CE' ,'Blackberry' ,'WAP' ,'SonyEricsson','PlayStation Portable','LG','MMP','OPWV','Symbian','EPOC','iPhone');?>
306
+ <tr id="segmentation_values_tr_6" style="display:none;">
307
+ <td class="label"><label for="segmentation_values"><?php echo $this->__('Segmentation Values')?> <span class="required">*</span></label></td>
308
+ <td class="value">
309
+ <select name="segmentation_values_6[]" id="segmentation_values_6" class="" size="6" multiple="multiple">
310
+ <?php foreach($mobile as $mobile):?>
311
+ <option value="<?php echo $mobile?>" <?php if(strstr($formData['segmentation_values'],$mobile) && $formData['segmentation_type']==6) :?> selected <?php endif;?>><?php echo $mobile?></option> <?php endforeach;?>
312
+
313
+ </td>
314
+
315
+ </tr>
316
+ </table>
317
+ </td>
318
+ </tr>
319
+
320
+ <tr id="personalization_step3" style="display:none;" name="personalization_step3">
321
+ <?php $adzones_key = Mage::getSingleton('adminhtml/session')->getAdzonesGridKey();
322
+ $id = $formData['personalization_id'];
323
+ $adzonesGridUrl = Mage::getBaseUrl()."personalization/adminhtml_personalization/adzonesGrid/id/$id/key/$adzones_key"?>
324
+ <td id="personalization_adzonesGrid_content">
325
+ <div id="personalization_adzones_content"></div>
326
+ </td>
327
+ <script>setAdzonesGrid('<?php echo $adzonesGridUrl?>');</script>
328
+ </tr>
329
+ <tr id="personalization_step4" style="display:none;" name="personalization_step4">
330
+ <td><table>
331
+ <tr>
332
+ <td class="label"><label for="status"><?php echo $this->__('Status')?></label></td>
333
+ <td class="value">
334
+ <select class=" select" name="status" id="status">
335
+ <option <?php if($formData['status']==1) : ?>selected="selected"<?php endif;?> value="1"><?php echo $this->__('Active')?></option>
336
+ <option <?php if($formData['status']==2) : ?>selected="selected"<?php endif;?> value="2"><?php echo $this->__('Inactive')?></option>
337
+ </select>
338
+ </td>
339
+ </tr>
340
+ <tr>
341
+ <td class="label"><label for="default"><?php echo $this->__('Set as default personalization')?></label></td>
342
+ <td class="value">
343
+ <select class=" select" name="default" id="default">
344
+ <option <?php if($formData['default']==0) : ?>selected="selected"<?php endif;?> value="0"><?php echo $this->__('No')?></option>
345
+ <option <?php if($formData['default']==1) : ?>selected="selected"<?php endif;?> value="1"><?php echo $this->__('Yes')?></option>
346
+ </select>
347
+ <p id="note_default" class="note"><span><?php echo $this->__('If You set its value as Yes, then segmentation type will be neglect')?></span></p>
348
+ </td>
349
+ </tr>
350
+ </table></td>
351
+ </tr>
352
+ <tr id="personalization_step5" style="display:none;" name="personalization_step5">
353
+ <td class="value">
354
+ <table cellspacing="0" class="form-list" style="min-width:580px;">
355
+
356
+ <?php if($formData['personalization_id']) : ?>
357
+ <?php $currentTest = Mage::getModel('personalization/abtest')->getPersonalizationtesting($formData['personalization_id']);?>
358
+ <?php endif;?>
359
+ <?php if($currentTest) :?>
360
+ <tr>
361
+ <th colspan="2" class="label">
362
+ <?php echo $this->__('Already running testing')?>
363
+ </th>
364
+ </tr>
365
+
366
+ <?php foreach($currentTest as $key => $value) : ?>
367
+ <tr>
368
+ <td class="label">
369
+ <?php echo $this->__('Competitor Name')?> - <?php echo $value;?>
370
+ </td>
371
+ <td class="value" onclick="changeTestingStatus('<?php echo $this->getUrl('personalization/adminhtml_personalization/stopTesting')?><?php echo 'id/'.$key?>',this);"><a style="cursor:pointer;" ><?php echo $this->__('Stop Testing')?></a></td>
372
+ </tr>
373
+ <?php endforeach;?>
374
+ <?php else : ?>
375
+ <tr>
376
+ <td class="label"><label for="ab_test"><?php echo $this->__('A/B Testing')?></label></td>
377
+ <td class="value">
378
+ <select class=" select" name="ab_test" id="ab_test">
379
+
380
+ <option <?php if($formData['ab_test']==2) : ?>selected="selected"<?php endif;?> value="2"><?php echo $this->__('Inactive')?></option>
381
+ <option <?php if($formData['ab_test']==1) : ?>selected="selected"<?php endif;?> value="1"><?php echo $this->__('Active')?></option>
382
+ </select> </td>
383
+ </tr>
384
+ <tr>
385
+ <td class="label"><label for="ab_test_start"><?php echo $this->__('A/B Testing Start Date')?></label></td>
386
+ <td class="value">
387
+ <input type="text" name="start_date" id="start_date" value="" class="input-text"/>
388
+ <img title="Select date" id="start_date_trig" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN) . 'adminhtml/default/default/images/grid-cal.gif'; ?>" class="v-middle"/>
389
+ <script type="text/javascript">
390
+ Calendar.setup({
391
+ inputField : 'start_date',
392
+ ifFormat : "%Y-%m-%d",
393
+ button : 'start_date_trig',
394
+ align : 'Bl',
395
+ singleClick : true,
396
+
397
+ });
398
+ </script>
399
+ </td>
400
+ </tr>
401
+ <tr>
402
+ <td class="label"><label for="ab_test_end"><?php echo $this->__('A/B Testing End Date')?></label></td>
403
+ <td class="value">
404
+ <input type="text" name="end_date" id="end_date" value="" class="input-text"/>
405
+ <img title="Select date" id="end_date_trig" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN) . 'adminhtml/default/default/images/grid-cal.gif'; ?>" class="v-middle"/>
406
+ <script type="text/javascript">
407
+ Calendar.setup({
408
+ inputField : 'end_date',
409
+ ifFormat : "%Y-%m-%d",
410
+ button : 'end_date_trig',
411
+ align : 'Bl',
412
+ singleClick : true,
413
+
414
+ });
415
+ </script>
416
+ </td>
417
+ </tr>
418
+ <tr>
419
+ <td class="label"><label for="ab_test_criteria"><?php echo $this->__('Success Criteria')?></label></td>
420
+ <td class="value">
421
+ <?php $criteria = Mage::getModel('personalization/criteria')->getOptionArray()?>
422
+ <select class="select" name="ab_test_criteria" id="ab_test_criteria">
423
+ <option value=""></option>
424
+ <?php foreach($criteria as $key => $value) : ?>
425
+ <option value="<?php echo $key?>"><?php echo $value?></option>
426
+ <?php endforeach;?>
427
+ </select>
428
+ </td>
429
+ </tr>
430
+ <tr>
431
+ <td class="label"><label for="ab_test_competition"><?php echo $this->__('Competition')?></label></td>
432
+ <td class="value">
433
+ <?php $competition = Mage::getModel('personalization/personalization')->getAllAddition()?>
434
+ <select class="select" name="ab_test_competition" id="ab_test_competition">
435
+ <?php if($formData['personalization_id']=="") : ?>
436
+ <option value=""></option>
437
+ <?php endif;?>
438
+ <?php foreach($competition as $key => $value) : ?>
439
+
440
+ <?php if($key!=$formData['personalization_id']):?>
441
+ <option value="<?php echo $key?>"><?php echo $value?></option>
442
+ <?php endif;?>
443
+ <?php endforeach;?>
444
+ </select>
445
+ </td>
446
+ </tr>
447
+ <?php endif;?>
448
+ <tr>
449
+ <td class="value" colspan="3">
450
+ <span id="businesslicensepathurl"><button onclick="editForm.submit();" class="save" type="button" title="Save Personalization" id="personalization_save"><span><span><span><?php echo $this->__('Save Personalization')?></span></span></span></button></span><div id="custom_msg"></div>
451
+ </td>
452
+ </tr>
453
+ </table>
454
+ </td>
455
+ </tr>
456
+ </tbody>
457
+ </table>
458
+ </div>
459
+ </div>
460
+ </div>
461
+ </div>
462
+ <table style="display:none;">
463
+ <tr id="country_tr_0">
464
+ <td class="label"><label for="segmentation_values_1"><?php echo $this->__('Select Country')?> <span class="required">*</span></label></td>
465
+ <td class="value">
466
+ <?php $country = $this->getCountryList() ?>
467
+ <select class="" id="country_0" name="country[]" onchange="showRegion(this.value,'0');" id="country_0">
468
+ <?php foreach($country as $country):?>
469
+
470
+ <option value="<?php echo $country['value']?>"><?php if($country['label']!=1){echo $country['label'];}?></option>
471
+ <?php endforeach;?>
472
+ </select>
473
+ </td>
474
+ <td class="value">
475
+ <button style="" onclick="deleteLocation(this.value)" value="button_remove" class="scalable delete" type="button" title="Delete"><span><span><span><?php echo $this->__('Delete')?></span></span></span></button>
476
+ </td>
477
+ </tr>
478
+ <tr id="region_tr_0" style="display:none;">
479
+ <td class="label"><label for="segmentation_values_1"><?php echo $this->__('Select State')?> <span class="required">*</span></label></td>
480
+ <td class="value">
481
+ <?php $region = $this->getRegionCollection('US')?>
482
+ <select class="" id="region_0" name="region[]">
483
+ <?php foreach($region as $region):?>
484
+
485
+ <option value="<?php echo $region['name']?>"><?php echo $region['name']?></option>
486
+ <?php endforeach;?>
487
+ </select>
488
+ </td>
489
+ </tr>
490
+ </table>
app/design/adminhtml/default/default/template/personalization/personalization/dashboard.phtml ADDED
@@ -0,0 +1,146 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php $collection = Mage::getModel('personalization/overview')->getOverview();?>
2
+ <?php $performer = Mage::getModel('personalization/abtest')->getBestPerformer();?>
3
+ <?php $startValue = min($collection);$endValue = max($collection);?>
4
+ <?php $segvalue = "";
5
+
6
+ foreach($collection as $key => $value):?>
7
+ <?php $seg = $seg."|".$key;
8
+ if($segDisplay)
9
+ $segDisplay = $segDisplay."|".$key;
10
+ else{
11
+ $segDisplay = $key;
12
+ }
13
+ if($segvalue){
14
+ $segvalue = $segvalue.",".$value;
15
+ }
16
+ else{
17
+ $segvalue = $value;
18
+ }
19
+ ?>
20
+ <?php endforeach;?>
21
+
22
+ <script type="text/javascript" src="https://www.google.com/jsapi"></script>
23
+ <script type="text/javascript">
24
+ google.load("visualization", "1", {packages:["corechart"]});
25
+ google.setOnLoadCallback(drawChart);
26
+ function drawChart() {
27
+ var data = google.visualization.arrayToDataTable([
28
+ ['Segmentation', 'Revenue'],
29
+ <?php foreach($collection as $key => $value):?>
30
+ ['<?php echo $key?>',<?php echo $value?>],
31
+ <?php endforeach;?>
32
+ ]);
33
+
34
+ var options = {
35
+ title: 'Highest Converting Sources'
36
+ };
37
+
38
+ var chart = new google.visualization.PieChart(document.getElementById('chart_div'));
39
+ chart.draw(data, options);
40
+ }
41
+ </script>
42
+
43
+ <?php if(count($performer)>0) : ?>
44
+ <script type="text/javascript">
45
+ google.load("visualization", "1", {packages:["corechart"]});
46
+ google.setOnLoadCallback(drawChart);
47
+ function drawChart() {
48
+ var data = google.visualization.arrayToDataTable([
49
+ ['Personalization Id', 'First', 'Second'],
50
+ <?php foreach($performer as $key => $values):?>
51
+
52
+ ['<?php echo $key?>', <?php echo $values[0]?>, <?php echo $values[1]?>],
53
+ <?php endforeach;?>
54
+ ]);
55
+ var options = {
56
+ title: 'Best Performers',
57
+ hAxis: {title: 'Personalization Ids', titleTextStyle: {color: 'red'}}
58
+ };
59
+
60
+ var chart = new google.visualization.ColumnChart(document.getElementById('barchart_div'));
61
+ chart.draw(data, options);
62
+ }
63
+ </script>
64
+ <!--<script type="text/javascript">
65
+ google.load("visualization", "1", {packages:["corechart"]});
66
+ google.setOnLoadCallback(drawChart);
67
+ function drawChart() {
68
+ var data1 = google.visualization.arrayToDataTable([
69
+ ['Personalization name', 'Personalization first', 'Personalization second'],
70
+ <?php foreach($performer as $key => $values):?>
71
+
72
+ ['<?php echo $key?>', <?php echo $values[0]?>, <?php echo $values[1]?>],
73
+ <?php endforeach;?>
74
+ ]);
75
+
76
+ var options = {
77
+ title: 'Best Performers',
78
+ vAxis: {title: 'Personalization Ids', titleTextStyle: {color: 'red'}}
79
+ };
80
+
81
+ var chart = new google.visualization.ColumnChart(document.getElementById('barchart_div'));
82
+ chart.draw(data1, options);
83
+ }
84
+ </script>-->
85
+ <?php endif;?>
86
+ <div class="entry-edit">
87
+ <div class="entry-edit-head">
88
+ <h4 class="icon-head head-edit-form fieldset-legend"><?php echo $this->__('Dashboard information')?></h4>
89
+ <div class="form-buttons"></div>
90
+ </div>
91
+ <div id="bashboard_form" class="fieldset ">
92
+ <div class="hor-scroll">
93
+ <table cellspacing="0" class="form-list table-bordering">
94
+ <tbody>
95
+ <tr>
96
+ <th><?php echo $this->__('Highest Converting Sources')?></th>
97
+ <th><?php echo $this->__('New Additions')?></th>
98
+ </tr>
99
+ <tr>
100
+ <td class="label td-border">
101
+ <?php if(count($collection)>0) : ?>
102
+ <div id="chart_div" style="width: 500px; height: 200px;">
103
+ </div>
104
+
105
+ <?php else :?>
106
+ <div id="chart_div" style="width: 500px; height: 200px;"><?php echo $this->__('No record(s) found')?>
107
+ </div>
108
+ <?php endif;?>
109
+
110
+ </td>
111
+ <td class="value td-border">
112
+ <?php $newAddition = Mage::getModel('personalization/personalization')->getNewAddition()?>
113
+ <ul><?php $newAdditionCount = 1;?>
114
+ <?php foreach($newAddition as $values) : ?>
115
+ <li><?php echo $newAdditionCount.". ".$values;$newAdditionCount++?></li>
116
+ <?php endforeach;?>
117
+ </ul>
118
+ </td>
119
+ </tr>
120
+ <tr>
121
+ <th><?php echo $this->__('Best Performers')?></th>
122
+ <th><?php echo $this->__('A/B Test Winners')?></th>
123
+ </tr>
124
+ <tr>
125
+ <td class="label td-border">
126
+
127
+ <?php if(count($collection)>0) : ?>
128
+ <div id="barchart_div" style="width: 500px; height: 200px;"></div>
129
+ <?php else :?>
130
+ <div id="barchart_div" style="width: 500px; height: 200px;"><?php echo $this->__('No record(s) found')?></div>
131
+ <?php endif;?>
132
+ </td>
133
+ <td class="value td-border">
134
+ <?php $winner = Mage::getModel('personalization/abtest')->gettestWinner();?>
135
+ <ul><?php $winnerCount = 1;?>
136
+ <?php foreach($winner as $values) : ?>
137
+ <li><?php echo $winnerCount.". ".$values;$winnerCount++?></li>
138
+ <?php endforeach;?>
139
+ </ul>
140
+ </td>
141
+ </tr>
142
+ </tbody>
143
+ </table>
144
+ </div>
145
+ </div>
146
+ </div>
app/design/frontend/base/default/layout/adzones.xml ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <default>
4
+ <reference name="head">
5
+ <action method="addCss"><stylesheet>css/adzones/adzones.css</stylesheet></action>
6
+ </reference>
7
+ <reference name="header">
8
+ <action method='setTemplate'><template>adzones/page/html/header.phtml</template></action>
9
+ <block type="adzones/adzones" name="adzones.menu.top" template="adzones/menu-top.phtml" />
10
+ <block type="adzones/adzones" name="adzones.menu.bottom" template="adzones/menu-bottom.phtml" />
11
+ </reference>
12
+ <reference name="left">
13
+ <block type="adzones/adzones" name="adzones.left.top" before="-" template="adzones/left-top.phtml" />
14
+ <block type="adzones/adzones" name="adzones.left.bottom" after="-" template="adzones/left-bottom.phtml" />
15
+ </reference>
16
+ <reference name="right">
17
+ <block type="adzones/adzones" name="adzones.right.top" before="-" template="adzones/right-top.phtml" />
18
+ <block type="adzones/adzones" name="adzones.right.bottom" after="-" template="adzones/right-bottom.phtml" />
19
+ </reference>
20
+ <reference name="before_body_end">
21
+ <block type="adzones/adzones" name="adzones.page.bottom" template="adzones/page-bottom.phtml" />
22
+ </reference>
23
+ </default>
24
+ <checkout_cart_index>
25
+ <reference name="content">
26
+ <remove name="adzones.content.top"/>
27
+ <block type="adzones/adzones" name="adzones.cart.top" template="adzones/checkout/content-top.phtml" before="-"/>
28
+ </reference>
29
+ </checkout_cart_index>
30
+ <checkout_onepage_index>
31
+ <reference name="content">
32
+ <remove name="adzones.content.top"/>
33
+ <block type="adzones/adzones" name="adzones.checkout.cart.top" template="adzones/checkout/content-top.phtml" before="-"/>
34
+ </reference>
35
+ </checkout_onepage_index>
36
+ <customer_account>
37
+ <reference name="content">
38
+ <remove name="adzones.content.top"/>
39
+ <block type="adzones/adzones" name="adzones.customer.cart.top" template="adzones/customer/content-top.phtml" before="-"/>
40
+ </reference>
41
+ </customer_account>
42
+ </layout>
app/design/frontend/base/default/template/adzones/checkout/content-top.phtml ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <?php
2
+ $pos = Convertware_Adzones_Model_BlockPosition::POSITION_CHECKOUT_CONTENT_TOP;
3
+ $content = $this->getAdzonesContent($pos);
4
+ foreach($content as $content)
5
+ echo $content;
6
+ ?>
app/design/frontend/base/default/template/adzones/content-top.phtml ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <?php
2
+ $pos = Convertware_Adzones_Model_BlockPosition::POSITION_CONTENT_TOP;
3
+ $content = $this->getAdzonesContent($pos);
4
+ foreach($content as $content)
5
+ echo $content;
6
+ ?>
7
+
app/design/frontend/base/default/template/adzones/customer/content-top.phtml ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <?php
2
+ $pos = Convertware_Adzones_Model_BlockPosition::POSITION_CUSTOMER_CONTENT_TOP;
3
+ $content = $this->getAdzonesContent($pos);
4
+ foreach($content as $content)
5
+ echo $content;
6
+ ?>
app/design/frontend/base/default/template/adzones/left-bottom.phtml ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <?php
2
+ $pos = Convertware_Adzones_Model_BlockPosition::POSITION_LEFT_BOTTOM;
3
+ $content = $this->getAdzonesContent($pos);
4
+ foreach($content as $content)
5
+ echo $content;
6
+ ?>
app/design/frontend/base/default/template/adzones/left-top.phtml ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <?php
2
+ $pos = Convertware_Adzones_Model_BlockPosition::POSITION_LEFT_TOP;
3
+ $content = $this->getAdzonesContent($pos);
4
+ foreach($content as $content)
5
+ echo $content;
6
+ ?>
app/design/frontend/base/default/template/adzones/menu-bottom.phtml ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <?php
2
+ $pos = Convertware_Adzones_Model_BlockPosition::POSITION_MENU_BOTTOM;
3
+ $content = $this->getAdzonesContent($pos);
4
+ foreach($content as $content)
5
+ echo $content;
6
+ ?>
app/design/frontend/base/default/template/adzones/menu-top.phtml ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <?php
2
+ $pos = Convertware_Adzones_Model_BlockPosition::POSITION_MENU_TOP;
3
+ $content = $this->getAdzonesContent($pos);
4
+ foreach($content as $content)
5
+ echo $content;
6
+ ?>
app/design/frontend/base/default/template/adzones/page-bottom.phtml ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <?php
2
+ $pos = Convertware_Adzones_Model_BlockPosition::POSITION_PAGE_BOTTOM;
3
+ $content = $this->getAdzonesContent($pos);
4
+ foreach($content as $content)
5
+ echo $content;
6
+ ?>
app/design/frontend/base/default/template/adzones/page/html/header.phtml ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ /**
27
+ * @var Mage_Page_Block_Html_Header $this
28
+ */
29
+ ?>
30
+ <div class="header-container">
31
+ <div class="header">
32
+ <?php if ($this->getIsHomePage()):?>
33
+ <h1 class="logo"><strong><?php echo $this->getLogoAlt() ?></strong><a href="<?php echo $this->getUrl('') ?>" title="<?php echo $this->getLogoAlt() ?>" class="logo"><img src="<?php echo $this->getLogoSrc() ?>" alt="<?php echo $this->getLogoAlt() ?>" /></a></h1>
34
+ <?php else:?>
35
+ <a href="<?php echo $this->getUrl('') ?>" title="<?php echo $this->getLogoAlt() ?>" class="logo"><strong><?php echo $this->getLogoAlt() ?></strong><img src="<?php echo $this->getLogoSrc() ?>" alt="<?php echo $this->getLogoAlt() ?>" /></a>
36
+ <?php endif?>
37
+ <div class="quick-access">
38
+ <?php echo $this->getChildHtml('topSearch') ?>
39
+ <p class="welcome-msg"><?php echo $this->getWelcome() ?> <?php echo $this->getAdditionalHtml() ?></p>
40
+ <?php echo $this->getChildHtml('topLinks') ?>
41
+ <?php echo $this->getChildHtml('store_language') ?>
42
+ </div>
43
+ <?php echo $this->getChildHtml('topContainer'); ?>
44
+ </div>
45
+ </div>
46
+ <div class="adzones">
47
+ <?php echo $this->getChildHtml('adzones.menu.top') ?>
48
+ </div>
49
+ <?php echo $this->getChildHtml('topMenu') ?>
50
+ <div class="adzones">
51
+ <?php echo $this->getChildHtml('adzones.menu.bottom') ?>
52
+ </div>
app/design/frontend/base/default/template/adzones/right-bottom.phtml ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <?php
2
+ $pos = Convertware_Adzones_Model_BlockPosition::POSITION_RIGHT_BOTTOM;
3
+ $content = $this->getAdzonesContent($pos);
4
+ foreach($content as $content)
5
+ echo $content;
6
+ ?>
app/design/frontend/base/default/template/adzones/right-top.phtml ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <?php
2
+ $pos = Convertware_Adzones_Model_BlockPosition::POSITION_RIGHT_TOP;
3
+ $content = $this->getAdzonesContent($pos);
4
+ foreach($content as $content)
5
+ echo $content;
6
+ ?>
app/etc/modules/Convertware_Adzones.xml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Convertware_Adzones>
5
+ <active>true</active>
6
+ <codePool>local</codePool>
7
+ </Convertware_Adzones>
8
+ </modules>
9
+ </config>
app/etc/modules/Convertware_Personalization.xml ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Convertware_Personalization>
5
+ <active>true</active>
6
+ <codePool>local</codePool>
7
+ <depends>
8
+ <Convertware_Adzones />
9
+ </depends>
10
+ </Convertware_Personalization>
11
+ </modules>
12
+ </config>
js/adzones/adzones.jquery.min.js ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ /*! jQuery v1.7.1 jquery.com | jquery.org/license */
2
+ (function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement)cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),cm.close();d=cm.createElement(a),cm.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cl)}ck[a]=e}return ck[a]}function cu(a,b){var c={};f.each(cq.concat.apply([],cq.slice(0,b)),function(){c[this]=a});return c}function ct(){cr=b}function cs(){setTimeout(ct,0);return cr=f.now()}function cj(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ci(){try{return new a.XMLHttpRequest}catch(b){}}function cc(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function cb(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function ca(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bE.test(a)?d(a,e):ca(a+"["+(typeof e=="object"||f.isArray(e)?b:"")+"]",e,c,d)});else if(!c&&b!=null&&typeof b=="object")for(var e in b)ca(a+"["+e+"]",b[e],c,d);else d(a,b)}function b_(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function b$(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bT,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=b$(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=b$(a,c,d,e,"*",g));return l}function bZ(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bP),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bC(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?bx:by,g=0,h=e.length;if(d>0){if(c!=="border")for(;g<h;g++)c||(d-=parseFloat(f.css(a,"padding"+e[g]))||0),c==="margin"?d+=parseFloat(f.css(a,c+e[g]))||0:d-=parseFloat(f.css(a,"border"+e[g]+"Width"))||0;return d+"px"}d=bz(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0;if(c)for(;g<h;g++)d+=parseFloat(f.css(a,"padding"+e[g]))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+e[g]+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+e[g]))||0);return d+"px"}function bp(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bf,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bo(a){var b=c.createElement("div");bh.appendChild(b),b.innerHTML=a.outerHTML;return b.firstChild}function bn(a){var b=(a.nodeName||"").toLowerCase();b==="input"?bm(a):b!=="script"&&typeof a.getElementsByTagName!="undefined"&&f.grep(a.getElementsByTagName("input"),bm)}function bm(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bl(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bk(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bj(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;if(i){delete h.handle,h.events={};for(c in i)for(d=0,e=i[c].length;d<e;d++)f.event.add(b,c+(i[c][d].namespace?".":"")+i[c][d].namespace,i[c][d],i[c][d].data)}h.data&&(h.data=f.extend({},h.data))}}function bi(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function U(a){var b=V.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function T(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(O.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c<d;c++)b[a[c]]=!0;return b}var c=a.document,d=a.navigator,e=a.location,f=function(){function J(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(J,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:G?function(a){return a==null?"":G.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?E.call(c,a):e.merge(c,a)}return c},inArray:function(a,b,c){var d;if(b){if(H)return H.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=F.call(arguments,2),g=function(){return a.apply(c,f.concat(F.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h){var i=a.length;if(typeof c=="object"){for(var j in c)e.access(a,j,c[j],f,g,d);return a}if(d!==b){f=!h&&f&&e.isFunction(d);for(var k=0;k<i;k++)g(a[k],c,f?d.call(a[k],k,g(a[k],c)):d,h);return a}return i?g(a[0],c):b},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=r.exec(a)||s.exec(a)||t.exec(a)||a.indexOf("compatible")<0&&u.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){I["[object "+b+"]"]=b.toLowerCase()}),z=e.uaMatch(y),z.browser&&(e.browser[z.browser]=!0,e.browser.version=z.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?B=function(){c.removeEventListener("DOMContentLoaded",B,!1),e.ready()}:c.attachEvent&&(B=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",B),e.ready())});return e}(),g={};f.Callbacks=function(a){a=a?g[a]||h(a):{};var c=[],d=[],e,i,j,k,l,m=function(b){var d,e,g,h,i;for(d=0,e=b.length;d<e;d++)g=b[d],h=f.type(g),h==="array"?m(g):h==="function"&&(!a.unique||!o.has(g))&&c.push(g)},n=function(b,f){f=f||[],e=!a.memory||[b,f],i=!0,l=j||0,j=0,k=c.length;for(;c&&l<k;l++)if(c[l].apply(b,f)===!1&&a.stopOnFalse){e=!0;break}i=!1,c&&(a.once?e===!0?o.disable():c=[]:d&&d.length&&(e=d.shift(),o.fireWith(e[0],e[1])))},o={add:function(){if(c){var a=c.length;m(arguments),i?k=c.length:e&&e!==!0&&(j=a,n(e[0],e[1]))}return this},remove:function(){if(c){var b=arguments,d=0,e=b.length;for(;d<e;d++)for(var f=0;f<c.length;f++)if(b[d]===c[f]){i&&f<=k&&(k--,f<=l&&l--),c.splice(f--,1);if(a.unique)break}}return this},has:function(a){if(c){var b=0,d=c.length;for(;b<d;b++)if(a===c[b])return!0}return!1},empty:function(){c=[];return this},disable:function(){c=d=e=b;return this},disabled:function(){return!c},lock:function(){d=b,(!e||e===!0)&&o.disable();return this},locked:function(){return!d},fireWith:function(b,c){d&&(i?a.once||d.push([b,c]):(!a.once||!e)&&n(b,c));return this},fire:function(){o.fireWith(this,arguments);return this},fired:function(){return!!e}};return o};var i=[].slice;f.extend({Deferred:function(a){var b=f.Callbacks("once memory"),c=f.Callbacks("once memory"),d=f.Callbacks("memory"),e="pending",g={resolve:b,reject:c,notify:d},h={done:b.add,fail:c.add,progress:d.add,state:function(){return e},isResolved:b.fired,isRejected:c.fired,then:function(a,b,c){i.done(a).fail(b).progress(c);return this},always:function(){i.done.apply(i,arguments).fail.apply(i,arguments);return this},pipe:function(a,b,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[b,"reject"],progress:[c,"notify"]},function(a,b){var c=b[0],e=b[1],g;f.isFunction(c)?i[a](function(){g=c.apply(this,arguments),g&&f.isFunction(g.promise)?g.promise().then(d.resolve,d.reject,d.notify):d[e+"With"](this===i?d:this,[g])}):i[a](d[e])})}).promise()},promise:function(a){if(a==null)a=h;else for(var b in h)a[b]=h[b];return a}},i=h.promise({}),j;for(j in g)i[j]=g[j].fire,i[j+"With"]=g[j].fireWith;i.done(function(){e="resolved"},c.disable,d.lock).fail(function(){e="rejected"},b.disable,d.lock),a&&a.call(i,i);return i},when:function(a){function m(a){return function(b){e[a]=arguments.length>1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c<d;c++)b[c]&&b[c].promise&&f.isFunction(b[c].promise)?b[c].promise().then(l(c),j.reject,m(c)):--g;g||j.resolveWith(j,b)}else j!==a&&j.resolveWith(j,d?[a]:[]);return k}}),f.support=function(){var b,d,e,g,h,i,j,k,l,m,n,o,p,q=c.createElement("div"),r=c.documentElement;q.setAttribute("className","t"),q.innerHTML=" <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",d=q.getElementsByTagName("*"),e=q.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=q.getElementsByTagName("input")[0],b={leadingWhitespace:q.firstChild.nodeType===3,tbody:!q.getElementsByTagName("tbody").length,htmlSerialize:!!q.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:q.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete q.test}catch(s){b.deleteExpando=!1}!q.addEventListener&&q.attachEvent&&q.fireEvent&&(q.attachEvent("onclick",function(){b.noCloneEvent=!1}),q.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),q.appendChild(i),k=c.createDocumentFragment(),k.appendChild(q.lastChild),b.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,k.removeChild(i),k.appendChild(q),q.innerHTML="",a.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",q.style.width="2px",q.appendChild(j),b.reliableMarginRight=(parseInt((a.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(q.attachEvent)for(o in{submit:1,change:1,focusin:1})n="on"+o,p=n in q,p||(q.setAttribute(n,"return;"),p=typeof q[n]=="function"),b[o+"Bubbles"]=p;k.removeChild(q),k=g=h=j=q=i=null,f(function(){var a,d,e,g,h,i,j,k,m,n,o,r=c.getElementsByTagName("body")[0];!r||(j=1,k="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",m="visibility:hidden;border:0;",n="style='"+k+"border:5px solid #000;padding:0;'",o="<div "+n+"><div></div></div>"+"<table "+n+" cellpadding='0' cellspacing='0'>"+"<tr><td></td></tr></table>",a=c.createElement("div"),a.style.cssText=m+"width:0;height:0;position:static;top:0;margin-top:"+j+"px",r.insertBefore(a,r.firstChild),q=c.createElement("div"),a.appendChild(q),q.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>",l=q.getElementsByTagName("td"),p=l[0].offsetHeight===0,l[0].style.display="",l[1].style.display="none",b.reliableHiddenOffsets=p&&l[0].offsetHeight===0,q.innerHTML="",q.style.width=q.style.paddingLeft="1px",f.boxModel=b.boxModel=q.offsetWidth===2,typeof q.style.zoom!="undefined"&&(q.style.display="inline",q.style.zoom=1,b.inlineBlockNeedsLayout=q.offsetWidth===2,q.style.display="",q.innerHTML="<div style='width:4px;'></div>",b.shrinkWrapBlocks=q.offsetWidth!==2),q.style.cssText=k+m,q.innerHTML=o,d=q.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,i={doesNotAddBorder:e.offsetTop!==5,doesAddBorderForTableAndCells:h.offsetTop===5},e.style.position="fixed",e.style.top="20px",i.fixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",i.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,i.doesNotIncludeMarginInBodyOffset=r.offsetTop!==j,r.removeChild(a),q=a=null,f.extend(b,i))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e<g;e++)delete d[b[e]];if(!(c?m:f.isEmptyObject)(d))return}}if(!c){delete j[k].data;if(!m(j[k]))return}f.support.deleteExpando||!j.setInterval?delete j[k]:j[k]=null,i&&(f.support.deleteExpando?delete a[h]:a.removeAttribute?a.removeAttribute(h):a[h]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d,e,g,h=null;if(typeof a=="undefined"){if(this.length){h=f.data(this[0]);if(this[0].nodeType===1&&!f._data(this[0],"parsedAttrs")){e=this[0].attributes;for(var i=0,j=e.length;i<j;i++)g=e[i].name,g.indexOf("data-")===0&&(g=f.camelCase(g.substring(5)),l(this[0],g,h[g]));f._data(this[0],"parsedAttrs",!0)}}return h}if(typeof a=="object")return this.each(function(){f.data(this,a)});d=a.split("."),d[1]=d[1]?"."+d[1]:"";if(c===b){h=this.triggerHandler("getData"+d[1]+"!",[d[0]]),h===b&&this.length&&(h=f.data(this[0],a),h=l(this[0],a,h));return h===b&&d[1]?this.data(d[0]):h}return this.each(function(){var b=f(this),e=[d[0],c];b.triggerHandler("setData"+d[1]+"!",e),f.data(this,a,c),b.triggerHandler("changeData"+d[1]+"!",e)})},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a){b=(b||"fx")+"queue",d=f._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c));return d||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){typeof a!="string"&&(c=a,a="fx");if(c===b)return f.queue(this[0],a);return this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f.Callbacks("once memory"),!0))h++,l.add(m);m();return d.promise()}});var o=/[\n\t\r]/g,p=/\s+/,q=/\r/g,r=/^(?:button|input)$/i,s=/^(?:button|input|object|select|textarea)$/i,t=/^a(?:rea)?$/i,u=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,v=f.support.getSetAttribute,w,x,y;f.fn.extend({attr:function(a,b){return f.access(this,a,b,!0,f.attr)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,a,b,!0,f.prop)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(p);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(p);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(o," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(p);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(o," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c<d;c++){e=i[c];if(e.selected&&(f.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!f.nodeName(e.parentNode,"optgroup"))){b=f(e).val();if(j)return b;h.push(b)}}if(j&&!h.length&&i.length)return f(i[g]).val();return h},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;h<g;h++)e=d[h],e&&(c=f.propFix[e]||e,f.attr(a,e,""),a.removeAttribute(v?e:c),u.test(e)&&c in a&&(a[c]=!1))}},attrHooks:{type:{set:function(a,b){if(r.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},value:{get:function(a,b){if(w&&f.nodeName(a,"button"))return w.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(w&&f.nodeName(a,"button"))return w.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,g,h,i=a.nodeType;if(!!a&&i!==3&&i!==8&&i!==2){h=i!==1||!f.isXMLDoc(a),h&&(c=f.propFix[c]||c,g=f.propHooks[c]);return d!==b?g&&"set"in g&&(e=g.set(a,d,c))!==b?e:a[c]=d:g&&"get"in g&&(e=g.get(a,c))!==null?e:a[c]}},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):s.test(a.nodeName)||t.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabindex=f.propHooks.tabIndex,x={get:function(a,c){var d,e=f.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},v||(y={name:!0,id:!0},w=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&(y[c]?d.nodeValue!=="":d.specified)?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=b+""}},f.attrHooks.tabindex.set=w.set,f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})}),f.attrHooks.contenteditable={get:w.get,set:function(a,b,c){b===""&&(b="false"),w.set(a,b,c)}}),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex);return null}})),f.support.enctype||(f.propFix.enctype="encoding"),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/\bhover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")};
3
+ f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k<c.length;k++){l=A.exec(c[k])||[],m=l[1],n=(l[2]||"").split(".").sort(),s=f.event.special[m]||{},m=(g?s.delegateType:s.bindType)||m,s=f.event.special[m]||{},o=f.extend({type:m,origType:l[1],data:e,handler:d,guid:d.guid,selector:g,quick:G(g),namespace:n.join(".")},p),r=j[m];if(!r){r=j[m]=[],r.delegateCount=0;if(!s.setup||s.setup.call(a,e,n,i)===!1)a.addEventListener?a.addEventListener(m,i,!1):a.attachEvent&&a.attachEvent("on"+m,i)}s.add&&(s.add.call(a,o),o.handler.guid||(o.handler.guid=d.guid)),g?r.splice(r.delegateCount++,0,o):r.push(o),f.event.global[m]=!0}a=null}},global:{},remove:function(a,b,c,d,e){var g=f.hasData(a)&&f._data(a),h,i,j,k,l,m,n,o,p,q,r,s;if(!!g&&!!(o=g.events)){b=f.trim(I(b||"")).split(" ");for(h=0;h<b.length;h++){i=A.exec(b[h])||[],j=k=i[1],l=i[2];if(!j){for(j in o)f.event.remove(a,j+b[h],c,d,!0);continue}p=f.event.special[j]||{},j=(d?p.delegateType:p.bindType)||j,r=o[j]||[],m=r.length,l=l?new RegExp("(^|\\.)"+l.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;for(n=0;n<r.length;n++)s=r[n],(e||k===s.origType)&&(!c||c.guid===s.guid)&&(!l||l.test(s.namespace))&&(!d||d===s.selector||d==="**"&&s.selector)&&(r.splice(n--,1),s.selector&&r.delegateCount--,p.remove&&p.remove.call(a,s));r.length===0&&m!==r.length&&((!p.teardown||p.teardown.call(a,l)===!1)&&f.removeEvent(a,j,g.handle),delete o[j])}f.isEmptyObject(o)&&(q=g.handle,q&&(q.elem=null),f.removeData(a,["events","handle"],!0))}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){if(!e||e.nodeType!==3&&e.nodeType!==8){var h=c.type||c,i=[],j,k,l,m,n,o,p,q,r,s;if(E.test(h+f.event.triggered))return;h.indexOf("!")>=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;l<r.length&&!c.isPropagationStopped();l++)m=r[l][0],c.type=r[l][1],q=(f._data(m,"events")||{})[c.type]&&f._data(m,"handle"),q&&q.apply(m,d),q=o&&m[o],q&&f.acceptData(m)&&q.apply(m,d)===!1&&c.preventDefault();c.type=h,!g&&!c.isDefaultPrevented()&&(!p._default||p._default.apply(e.ownerDocument,d)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)&&o&&e[h]&&(h!=="focus"&&h!=="blur"||c.target.offsetWidth!==0)&&!f.isWindow(e)&&(n=e[o],n&&(e[o]=null),f.event.triggered=h,e[h](),f.event.triggered=b,n&&(e[o]=n));return c.result}},dispatch:function(c){c=f.event.fix(c||a.event);var d=(f._data(this,"events")||{})[c.type]||[],e=d.delegateCount,g=[].slice.call(arguments,0),h=!c.exclusive&&!c.namespace,i=[],j,k,l,m,n,o,p,q,r,s,t;g[0]=c,c.delegateTarget=this;if(e&&!c.target.disabled&&(!c.button||c.type!=="click")){m=f(this),m.context=this.ownerDocument||this;for(l=c.target;l!=this;l=l.parentNode||this){o={},q=[],m[0]=l;for(j=0;j<e;j++)r=d[j],s=r.selector,o[s]===b&&(o[s]=r.quick?H(l,r.quick):m.is(s)),o[s]&&q.push(r);q.length&&i.push({elem:l,matches:q})}}d.length>e&&i.push({elem:this,matches:d.slice(e)});for(j=0;j<i.length&&!c.isPropagationStopped();j++){p=i[j],c.currentTarget=p.elem;for(k=0;k<p.matches.length&&!c.isImmediatePropagationStopped();k++){r=p.matches[k];if(h||!c.namespace&&!r.namespace||c.namespace_re&&c.namespace_re.test(r.namespace))c.data=r.data,c.handleObj=r,n=((f.event.special[r.origType]||{}).handle||r.handler).apply(p.elem,g),n!==b&&(c.result=n,n===!1&&(c.preventDefault(),c.stopPropagation()))}}return c.result},props:"attrChange attrName relatedNode srcElement 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){a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode);return a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,d){var e,f,g,h=d.button,i=d.fromElement;a.pageX==null&&d.clientX!=null&&(e=a.target.ownerDocument||c,f=e.documentElement,g=e.body,a.pageX=d.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=d.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?d.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0);return a}},fix:function(a){if(a[f.expando])return a;var d,e,g=a,h=f.event.fixHooks[a.type]||{},i=h.props?this.props.concat(h.props):this.props;a=f.Event(g);for(d=i.length;d;)e=i[--d],a[e]=g[e];a.target||(a.target=g.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey===b&&(a.metaKey=a.ctrlKey);return h.filter?h.filter(a,g):a},special:{ready:{setup:f.bindReady},load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=f.extend(new f.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?f.event.trigger(e,null,b):f.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},f.event.handle=f.event.dispatch,f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!(this instanceof f.Event))return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?K:J):this.type=a,b&&f.extend(this,b),this.timeStamp=a&&a.timeStamp||f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=K;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=K;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=K,this.stopPropagation()},isDefaultPrevented:J,isPropagationStopped:J,isImmediatePropagationStopped:J},f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c=this,d=a.relatedTarget,e=a.handleObj,g=e.selector,h;if(!d||d!==c&&!f.contains(c,d))a.type=e.origType,h=e.handler.apply(this,arguments),a.type=b;return h}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(){if(f.nodeName(this,"form"))return!1;f.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=f.nodeName(c,"input")||f.nodeName(c,"button")?c.form:b;d&&!d._submit_attached&&(f.event.add(d,"submit._submit",function(a){this.parentNode&&!a.isTrigger&&f.event.simulate("submit",this.parentNode,a,!0)}),d._submit_attached=!0)})},teardown:function(){if(f.nodeName(this,"form"))return!1;f.event.remove(this,"._submit")}}),f.support.changeBubbles||(f.event.special.change={setup:function(){if(z.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")f.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),f.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1,f.event.simulate("change",this,a,!0))});return!1}f.event.add(this,"beforeactivate._change",function(a){var b=a.target;z.test(b.nodeName)&&!b._change_attached&&(f.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&f.event.simulate("change",this.parentNode,a,!0)}),b._change_attached=!0)})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){f.event.remove(this,"._change");return z.test(this.nodeName)}}),f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){var d=0,e=function(a){f.event.simulate(b,a.target,f.event.fix(a),!0)};f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.fn.extend({on:function(a,c,d,e,g){var h,i;if(typeof a=="object"){typeof c!="string"&&(d=c,c=b);for(i in a)this.on(i,c,d,a[i],g);return this}d==null&&e==null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=J;else if(!e)return this;g===1&&(h=e,e=function(a){f().off(a);return h.apply(this,arguments)},e.guid=h.guid||(h.guid=f.guid++));return this.each(function(){f.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on.call(this,a,b,c,d,1)},off:function(a,c,d){if(a&&a.preventDefault&&a.handleObj){var e=a.handleObj;f(a.delegateTarget).off(e.namespace?e.type+"."+e.namespace:e.type,e.selector,e.handler);return this}if(typeof a=="object"){for(var g in a)this.off(g,c,a[g]);return this}if(c===!1||typeof c=="function")d=c,c=b;d===!1&&(d=J);return this.each(function(){f.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){f(this.context).on(a,this.selector,b,c);return this},die:function(a,b){f(this.context).off(a,this.selector||"**",b);return this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length==1?this.off(a,"**"):this.off(b,a,c)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f._data(this,"lastToggle"+a.guid)||0)%d;f._data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),f.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){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}if(j.nodeType===1){g||(j[d]=c,j.sizset=h);if(typeof b!="string"){if(j===b){k=!0;break}}else if(m.filter(b,[j]).length>0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}j.nodeType===1&&!g&&(j[d]=c,j.sizset=h);if(j.nodeName.toLowerCase()===b){k=j;break}j=j[a]}e[h]=k}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},m.matches=function(a,b){return m(a,null,null,b)},m.matchesSelector=function(a,b){return m(b,null,null,[a]).length>0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e<f;e++){h=o.order[e];if(g=o.leftMatch[h].exec(a)){i=g[1],g.splice(1,1);if(i.substr(i.length-1)!=="\\"){g[1]=(g[1]||"").replace(j,""),d=o.find[h](g,b,c);if(d!=null){a=a.replace(o.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},m.filter=function(a,c,d,e){var f,g,h,i,j,k,l,n,p,q=a,r=[],s=c,t=c&&c[0]&&m.isXML(c[0]);while(a&&c.length){for(h in o.filter)if((f=o.leftMatch[h].exec(a))!=null&&f[2]){k=o.filter[h],l=f[1],g=!1,f.splice(1,1);if(l.substr(l.length-1)==="\\")continue;s===r&&(r=[]);if(o.preFilter[h]){f=o.preFilter[h](f,s,d,r,e,t);if(!f)g=i=!0;else if(f===!0)continue}if(f)for(n=0;(j=s[n])!=null;n++)j&&(i=k(j,f,n,s),p=e^i,d&&i!=null?p?g=!0:s[n]=!1:p&&(r.push(j),g=!0));if(i!==b){d||(s=r),a=a.replace(o.match[h],"");if(!g)return[];break}}if(a===q)if(g==null)m.error(a);else break;q=a}return s},m.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)};var n=m.getText=function(a){var b,c,d=a.nodeType,e="";if(d){if(d===1||d===9){if(typeof a.textContent=="string")return a.textContent;if(typeof a.innerText=="string")return a.innerText.replace(k,"");for(a=a.firstChild;a;a=a.nextSibling)e+=n(a)}else if(d===3||d===4)return a.nodeValue}else for(b=0;c=a[b];b++)c.nodeType!==8&&(e+=n(c));return e},o=m.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!l.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&m.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&m.filter(b,a,!0)}},"":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("parentNode",b,f,a,d,c)},"~":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("previousSibling",b,f,a,d,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(j,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}m.error(e)},CHILD:function(a,b){var c,e,f,g,h,i,j,k=b[1],l=a;switch(k){case"only":case"first":while(l=l.previousSibling)if(l.nodeType===1)return!1;if(k==="first")return!0;l=a;case"last":while(l=l.nextSibling)if(l.nodeType===1)return!1;return!0;case"nth":c=b[2],e=b[3];if(c===1&&e===0)return!0;f=b[0],g=a.parentNode;if(g&&(g[d]!==f||!a.nodeIndex)){i=0;for(l=g.firstChild;l;l=l.nextSibling)l.nodeType===1&&(l.nodeIndex=++i);g[d]=f}j=a.nodeIndex-e;return c===0?j===0:j%c===0&&j/c>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c<e;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var u,v;c.documentElement.compareDocumentPosition?u=function(a,b){if(a===b){h=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(u=function(a,b){if(a===b){h=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],g=a.parentNode,i=b.parentNode,j=g;if(g===i)return v(a,b);if(!g)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return v(e[k],f[k]);return k===c?v(a,f[k],-1):v(e[k],b,1)},v=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h<i;h++)m(a,g[h],e,c);return m.filter(f,e)};m.attr=f.attr,m.selectors.attrMap={},f.find=m,f.expr=m.selectors,f.expr[":"]=f.expr.filters,f.unique=m.uniqueSort,f.text=m.getText,f.isXMLDoc=m.isXML,f.contains=m.contains}();var L=/Until$/,M=/^(?:parents|prevUntil|prevAll)/,N=/,/,O=/^.[^:#\[\.,]*$/,P=Array.prototype.slice,Q=f.expr.match.POS,R={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(T(this,a,!1),"not",a)},filter:function(a){return this.pushStack(T(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?Q.test(a)?f(a,this.context).index(this[0])>=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d<a.length;d++)f(g).is(a[d])&&c.push({selector:a[d],elem:g,level:h});g=g.parentNode,h++}return c}var i=Q.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(i?i.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/<tbody/i,_=/<|&#?\w+;/,ba=/<(?:script|style)/i,bb=/<(?:script|object|embed|option|style)/i,bc=new RegExp("<(?:"+V+")","i"),bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^\s*<!(?:\[CDATA\[|\-\-)/,bg={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function()
4
+ {for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1></$2>");try{for(var c=0,d=this.length;c<d;c++)this[c].nodeType===1&&(f.cleanData(this[c].getElementsByTagName("*")),this[c].innerHTML=a)}catch(e){this.empty().append(a)}}else f.isFunction(a)?this.each(function(b){var c=f(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bd.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bi(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,bp)}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i,j=a[0];b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof j=="string"&&j.length<512&&i===c&&j.charAt(0)==="<"&&!bb.test(j)&&(f.support.checkClone||!bd.test(j))&&(f.support.html5Clone||!bc.test(j))&&(g=!0,h=f.fragments[j],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[j]=h?e:1);return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||!bc.test("<"+a.nodeName)?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1></$2>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");b===c?bh.appendChild(o):U(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]==="<table>"&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i<r;i++)bn(k[i]);else bn(k);k.nodeType?h.push(k):h=f.merge(h,k)}if(d){g=function(a){return!a.type||be.test(a.type)};for(j=0;h[j];j++)if(e&&f.nodeName(h[j],"script")&&(!h[j].type||h[j].type.toLowerCase()==="text/javascript"))e.push(h[j].parentNode?h[j].parentNode.removeChild(h[j]):h[j]);else{if(h[j].nodeType===1){var s=f.grep(h[j].getElementsByTagName("script"),g);h.splice.apply(h,[j+1,0].concat(s))}d.appendChild(h[j])}}return h},cleanData:function(a){var b,c,d=f.cache,e=f.event.special,g=f.support.deleteExpando;for(var h=0,i;(i=a[h])!=null;h++){if(i.nodeName&&f.noData[i.nodeName.toLowerCase()])continue;c=i[f.expando];if(c){b=d[c];if(b&&b.events){for(var j in b.events)e[j]?f.event.remove(i,j):f.removeEvent(i,j,b.handle);b.handle&&(b.handle.elem=null)}g?delete i[f.expando]:i.removeAttribute&&i.removeAttribute(f.expando),delete d[c]}}}});var bq=/alpha\([^)]*\)/i,br=/opacity=([^)]*)/,bs=/([A-Z]|^ms)/g,bt=/^-?\d+(?:px)?$/i,bu=/^-?\d/,bv=/^([\-+])=([\-+.\de]+)/,bw={position:"absolute",visibility:"hidden",display:"block"},bx=["Left","Right"],by=["Top","Bottom"],bz,bA,bB;f.fn.css=function(a,c){if(arguments.length===2&&c===b)return this;return f.access(this,a,c,!0,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)})},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bz(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=bv.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(bz)return bz(a,c)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]}}),f.curCSS=f.css,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){var e;if(c){if(a.offsetWidth!==0)return bC(a,b,d);f.swap(a,bw,function(){e=bC(a,b,d)});return e}},set:function(a,b){if(!bt.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return br.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bq,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bq.test(g)?g.replace(bq,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,b){var c,d,e;b=b.replace(bs,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b)));return c}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f===null&&g&&(e=g[b])&&(f=e),!bt.test(f)&&bu.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),bz=bA||bB,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bD=/%20/g,bE=/\[\]$/,bF=/\r?\n/g,bG=/#.*$/,bH=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bI=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bJ=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bK=/^(?:GET|HEAD)$/,bL=/^\/\//,bM=/\?/,bN=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bO=/^(?:select|textarea)/i,bP=/\s+/,bQ=/([?&])_=[^&]*/,bR=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bS=f.fn.load,bT={},bU={},bV,bW,bX=["*/"]+["*"];try{bV=e.href}catch(bY){bV=c.createElement("a"),bV.href="",bV=bV.href}bW=bR.exec(bV.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bS)return bS.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bN,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bO.test(this.nodeName)||bI.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bF,"\r\n")}}):{name:b.name,value:c.replace(bF,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b_(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b_(a,b);return a},ajaxSettings:{url:bV,isLocal:bJ.test(bW[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bX},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bZ(bT),ajaxTransport:bZ(bU),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?cb(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cc(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bH.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bG,"").replace(bL,bW[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bP),d.crossDomain==null&&(r=bR.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bW[1]&&r[2]==bW[2]&&(r[3]||(r[1]==="http:"?80:443))==(bW[3]||(bW[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),b$(bT,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bK.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bM.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bQ,"$1_="+x);d.url=y+(y===d.url?(bM.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bX+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=b$(bU,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)ca(g,a[g],c,e);return d.join("&").replace(bD,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cd=f.now(),ce=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cd++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ce.test(b.url)||e&&ce.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ce,l),b.url===j&&(e&&(k=k.replace(ce,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cf=a.ActiveXObject?function(){for(var a in ch)ch[a](0,1)}:!1,cg=0,ch;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ci()||cj()}:ci,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cf&&delete ch[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cg,cf&&(ch||(ch={},f(a).unload(cf)),ch[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var ck={},cl,cm,cn=/^(?:toggle|show|hide)$/,co=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cp,cq=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cr;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cu("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),e===""&&f.css(d,"display")==="none"&&f._data(d,"olddisplay",cv(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(cu("hide",3),a,b,c);var d,e,g=0,h=this.length;for(;g<h;g++)d=this[g],d.style&&(e=f.css(d,"display"),e!=="none"&&!f._data(d,"olddisplay")&&f._data(d,"olddisplay",e));for(g=0;g<h;g++)this[g].style&&(this[g].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(cu("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){function g(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]),h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(!f.support.inlineBlockNeedsLayout||cv(this.nodeName)==="inline"?this.style.display="inline-block":this.style.zoom=1))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)j=new f.fx(this,b,i),h=a[i],cn.test(h)?(o=f._data(this,"toggle"+i)||(h==="toggle"?d?"show":"hide":0),o?(f._data(this,"toggle"+i,o==="show"?"hide":"show"),j[o]()):j[h]()):(k=co.exec(h),l=j.cur(),k?(m=parseFloat(k[2]),n=k[3]||(f.cssNumber[i]?"":"px"),n!=="px"&&(f.style(this,i,(m||1)+n),l=(m||1)/j.cur()*l,f.style(this,i,l+n)),k[1]&&(m=(k[1]==="-="?-1:1)*m+l),j.custom(l,m,n)):j.custom(l,h,""));return!0}var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return e.queue===!1?this.each(g):this.queue(e.queue,g)},stop:function(a,c,d){typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]);return this.each(function(){function h(a,b,c){var e=b[c];f.removeData(a,c,!0),e.stop(d)}var b,c=!1,e=f.timers,g=f._data(this);d||f._unmark(!0,this);if(a==null)for(b in g)g[b]&&g[b].stop&&b.indexOf(".run")===b.length-4&&h(this,g,b);else g[b=a+".run"]&&g[b].stop&&h(this,g,b);for(b=e.length;b--;)e[b].elem===this&&(a==null||e[b].queue===a)&&(d?e[b](!0):e[b].saveState(),c=!0,e.splice(b,1));(!d||!c)&&f.dequeue(this,a)})}}),f.each({slideDown:cu("show",1),slideUp:cu("hide",1),slideToggle:cu("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue="fx";d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue?f.dequeue(this,d.queue):a!==!1&&f._unmark(this)};return d},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,c,d){function h(a){return e.step(a)}var e=this,g=f.fx;this.startTime=cr||cs(),this.end=c,this.now=this.start=a,this.pos=this.state=0,this.unit=d||this.unit||(f.cssNumber[this.prop]?"":"px"),h.queue=this.options.queue,h.elem=this.elem,h.saveState=function(){e.options.hide&&f._data(e.elem,"fxshow"+e.prop)===b&&f._data(e.elem,"fxshow"+e.prop,e.start)},h()&&f.timers.push(h)&&!cp&&(cp=setInterval(g.tick,g.interval))},show:function(){var a=f._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=a||f.style(this.elem,this.prop),this.options.show=!0,a!==b?this.custom(this.cur(),a):this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f._data(this.elem,"fxshow"+this.prop)||f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b,c,d,e=cr||cs(),g=!0,h=this.elem,i=this.options;if(a||e>=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c<b.length;c++)a=b[c],!a()&&b[c]===a&&b.splice(c--,1);b.length||f.fx.stop()},interval:13,stop:function(){clearInterval(cp),cp=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=a.now+a.unit:a.elem[a.prop]=a.now}}}),f.each(["width","height"],function(a,b){f.fx.step[b]=function(a){f.style(a.elem,b,Math.max(0,a.now)+a.unit)}}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var cw=/^t(?:able|d|h)$/i,cx=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?f.fn.offset=function(a){var b=this[0],c;if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);try{c=b.getBoundingClientRect()}catch(d){}var e=b.ownerDocument,g=e.documentElement;if(!c||!f.contains(g,b))return c?{top:c.top,left:c.left}:{top:0,left:0};var h=e.body,i=cy(e),j=g.clientTop||h.clientTop||0,k=g.clientLeft||h.clientLeft||0,l=i.pageYOffset||f.support.boxModel&&g.scrollTop||h.scrollTop,m=i.pageXOffset||f.support.boxModel&&g.scrollLeft||h.scrollLeft,n=c.top+l-j,o=c.left+m-k;return{top:n,left:o}}:f.fn.offset=function(a){var b=this[0];if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);var c,d=b.offsetParent,e=b,g=b.ownerDocument,h=g.documentElement,i=g.body,j=g.defaultView,k=j?j.getComputedStyle(b,null):b.currentStyle,l=b.offsetTop,m=b.offsetLeft;while((b=b.parentNode)&&b!==i&&b!==h){if(f.support.fixedPosition&&k.position==="fixed")break;c=j?j.getComputedStyle(b,null):b.currentStyle,l-=b.scrollTop,m-=b.scrollLeft,b===d&&(l+=b.offsetTop,m+=b.offsetLeft,f.support.doesNotAddBorder&&(!f.support.doesAddBorderForTableAndCells||!cw.test(b.nodeName))&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),e=d,d=b.offsetParent),f.support.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),k=c}if(k.position==="relative"||k.position==="static")l+=i.offsetTop,m+=i.offsetLeft;f.support.fixedPosition&&k.position==="fixed"&&(l+=Math.max(h.scrollTop,i.scrollTop),m+=Math.max(h.scrollLeft,i.scrollLeft));return{top:l,left:m}},f.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cy(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cy(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,d,"padding")):this[d]():null},f.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,d,a?"margin":"border")):this[d]():null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNumeric(j)?j:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window);
js/adzones/adzones.js ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ function hideContentHeader()
2
+ {
3
+ var classValue=document.getElementsByClassName('content-header');
4
+ for (var i=0; i < classValue.length; i++) {
5
+ if(i==2){
6
+ classValue[i].style.display = 'none';
7
+ }
8
+ }
9
+ }
10
+ function deleteContent(url)
11
+ {
12
+ new Ajax.Request(url,
13
+ {
14
+ method:'get',
15
+ onSuccess: function(transport){
16
+ if(transport.responseText)
17
+ {
18
+ alert(transport.responseText);
19
+ }
20
+ else
21
+ {
22
+ contentGridJsObject.resetFilter();
23
+ }
24
+ },
25
+ onFailure: function(error_msg){ alert(error_msg);}
26
+ });
27
+ }
28
+
js/adzones/jquery.colorbox-min.js ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ // ColorBox v1.3.19 - jQuery lightbox plugin
2
+ // (c) 2011 Jack Moore - jacklmoore.com
3
+ // License: http://www.opensource.org/licenses/mit-license.php
4
+ (function(a,b,c){function Z(c,d,e){var g=b.createElement(c);return d&&(g.id=f+d),e&&(g.style.cssText=e),a(g)}function $(a){var b=y.length,c=(Q+a)%b;return c<0?b+c:c}function _(a,b){return Math.round((/%/.test(a)?(b==="x"?z.width():z.height())/100:1)*parseInt(a,10))}function ba(a){return K.photo||/\.(gif|png|jpe?g|bmp|ico)((#|\?).*)?$/i.test(a)}function bb(){var b;K=a.extend({},a.data(P,e));for(b in K)a.isFunction(K[b])&&b.slice(0,2)!=="on"&&(K[b]=K[b].call(P));K.rel=K.rel||P.rel||"nofollow",K.href=K.href||a(P).attr("href"),K.title=K.title||P.title,typeof K.href=="string"&&(K.href=a.trim(K.href))}function bc(b,c){a.event.trigger(b),c&&c.call(P)}function bd(){var a,b=f+"Slideshow_",c="click."+f,d,e,g;K.slideshow&&y[1]?(d=function(){F.text(K.slideshowStop).unbind(c).bind(j,function(){if(K.loop||y[Q+1])a=setTimeout(W.next,K.slideshowSpeed)}).bind(i,function(){clearTimeout(a)}).one(c+" "+k,e),r.removeClass(b+"off").addClass(b+"on"),a=setTimeout(W.next,K.slideshowSpeed)},e=function(){clearTimeout(a),F.text(K.slideshowStart).unbind([j,i,k,c].join(" ")).one(c,function(){W.next(),d()}),r.removeClass(b+"on").addClass(b+"off")},K.slideshowAuto?d():e()):r.removeClass(b+"off "+b+"on")}function be(b){U||(P=b,bb(),y=a(P),Q=0,K.rel!=="nofollow"&&(y=a("."+g).filter(function(){var b=a.data(this,e).rel||this.rel;return b===K.rel}),Q=y.index(P),Q===-1&&(y=y.add(P),Q=y.length-1)),S||(S=T=!0,r.show(),K.returnFocus&&a(P).blur().one(l,function(){a(this).focus()}),q.css({opacity:+K.opacity,cursor:K.overlayClose?"pointer":"auto"}).show(),K.w=_(K.initialWidth,"x"),K.h=_(K.initialHeight,"y"),W.position(),o&&z.bind("resize."+p+" scroll."+p,function(){q.css({width:z.width(),height:z.height(),top:z.scrollTop(),left:z.scrollLeft()})}).trigger("resize."+p),bc(h,K.onOpen),J.add(D).hide(),I.html(K.close).show()),W.load(!0))}function bf(){!r&&b.body&&(Y=!1,z=a(c),r=Z(X).attr({id:e,"class":n?f+(o?"IE6":"IE"):""}).hide(),q=Z(X,"Overlay",o?"position:absolute":"").hide(),s=Z(X,"Wrapper"),t=Z(X,"Content").append(A=Z(X,"LoadedContent","width:0; height:0; overflow:hidden"),C=Z(X,"LoadingOverlay").add(Z(X,"LoadingGraphic")),D=Z(X,"Title"),E=Z(X,"Current"),G=Z(X,"Next"),H=Z(X,"Previous"),F=Z(X,"Slideshow").bind(h,bd),I=Z(X,"Close")),s.append(Z(X).append(Z(X,"TopLeft"),u=Z(X,"TopCenter"),Z(X,"TopRight")),Z(X,!1,"clear:left").append(v=Z(X,"MiddleLeft"),t,w=Z(X,"MiddleRight")),Z(X,!1,"clear:left").append(Z(X,"BottomLeft"),x=Z(X,"BottomCenter"),Z(X,"BottomRight"))).find("div div").css({"float":"left"}),B=Z(X,!1,"position:absolute; width:9999px; visibility:hidden; display:none"),J=G.add(H).add(E).add(F),a(b.body).append(q,r.append(s,B)))}function bg(){return r?(Y||(Y=!0,L=u.height()+x.height()+t.outerHeight(!0)-t.height(),M=v.width()+w.width()+t.outerWidth(!0)-t.width(),N=A.outerHeight(!0),O=A.outerWidth(!0),r.css({"padding-bottom":L,"padding-right":M}),G.click(function(){W.next()}),H.click(function(){W.prev()}),I.click(function(){W.close()}),q.click(function(){K.overlayClose&&W.close()}),a(b).bind("keydown."+f,function(a){var b=a.keyCode;S&&K.escKey&&b===27&&(a.preventDefault(),W.close()),S&&K.arrowKey&&y[1]&&(b===37?(a.preventDefault(),H.click()):b===39&&(a.preventDefault(),G.click()))}),a("."+g,b).live("click",function(a){a.which>1||a.shiftKey||a.altKey||a.metaKey||(a.preventDefault(),be(this))})),!0):!1}var d={transition:"elastic",speed:300,width:!1,initialWidth:"600",innerWidth:!1,maxWidth:!1,height:!1,initialHeight:"450",innerHeight:!1,maxHeight:!1,scalePhotos:!0,scrolling:!0,inline:!1,html:!1,iframe:!1,fastIframe:!0,photo:!1,href:!1,title:!1,rel:!1,opacity:.9,preloading:!0,current:"image {current} of {total}",previous:"previous",next:"next",close:"close",open:!1,returnFocus:!0,reposition:!0,loop:!0,slideshow:!1,slideshowAuto:!0,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",onOpen:!1,onLoad:!1,onComplete:!1,onCleanup:!1,onClosed:!1,overlayClose:!0,escKey:!0,arrowKey:!0,top:!1,bottom:!1,left:!1,right:!1,fixed:!1,data:undefined},e="colorbox",f="cbox",g=f+"Element",h=f+"_open",i=f+"_load",j=f+"_complete",k=f+"_cleanup",l=f+"_closed",m=f+"_purge",n=!a.support.opacity&&!a.support.style,o=n&&!c.XMLHttpRequest,p=f+"_IE6",q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X="div",Y;if(a.colorbox)return;a(bf),W=a.fn[e]=a[e]=function(b,c){var f=this;b=b||{},bf();if(bg()){if(!f[0]){if(f.selector)return f;f=a("<a/>"),b.open=!0}c&&(b.onComplete=c),f.each(function(){a.data(this,e,a.extend({},a.data(this,e)||d,b))}).addClass(g),(a.isFunction(b.open)&&b.open.call(f)||b.open)&&be(f[0])}return f},W.position=function(a,b){function i(a){u[0].style.width=x[0].style.width=t[0].style.width=a.style.width,t[0].style.height=v[0].style.height=w[0].style.height=a.style.height}var c=0,d=0,e=r.offset(),g=z.scrollTop(),h=z.scrollLeft();z.unbind("resize."+f),r.css({top:-9e4,left:-9e4}),K.fixed&&!o?(e.top-=g,e.left-=h,r.css({position:"fixed"})):(c=g,d=h,r.css({position:"absolute"})),K.right!==!1?d+=Math.max(z.width()-K.w-O-M-_(K.right,"x"),0):K.left!==!1?d+=_(K.left,"x"):d+=Math.round(Math.max(z.width()-K.w-O-M,0)/2),K.bottom!==!1?c+=Math.max(z.height()-K.h-N-L-_(K.bottom,"y"),0):K.top!==!1?c+=_(K.top,"y"):c+=Math.round(Math.max(z.height()-K.h-N-L,0)/2),r.css({top:e.top,left:e.left}),a=r.width()===K.w+O&&r.height()===K.h+N?0:a||0,s[0].style.width=s[0].style.height="9999px",r.dequeue().animate({width:K.w+O,height:K.h+N,top:c,left:d},{duration:a,complete:function(){i(this),T=!1,s[0].style.width=K.w+O+M+"px",s[0].style.height=K.h+N+L+"px",K.reposition&&setTimeout(function(){z.bind("resize."+f,W.position)},1),b&&b()},step:function(){i(this)}})},W.resize=function(a){S&&(a=a||{},a.width&&(K.w=_(a.width,"x")-O-M),a.innerWidth&&(K.w=_(a.innerWidth,"x")),A.css({width:K.w}),a.height&&(K.h=_(a.height,"y")-N-L),a.innerHeight&&(K.h=_(a.innerHeight,"y")),!a.innerHeight&&!a.height&&(A.css({height:"auto"}),K.h=A.height()),A.css({height:K.h}),W.position(K.transition==="none"?0:K.speed))},W.prep=function(b){function g(){return K.w=K.w||A.width(),K.w=K.mw&&K.mw<K.w?K.mw:K.w,K.w}function h(){return K.h=K.h||A.height(),K.h=K.mh&&K.mh<K.h?K.mh:K.h,K.h}if(!S)return;var c,d=K.transition==="none"?0:K.speed;A.remove(),A=Z(X,"LoadedContent").append(b),A.hide().appendTo(B.show()).css({width:g(),overflow:K.scrolling?"auto":"hidden"}).css({height:h()}).prependTo(t),B.hide(),a(R).css({"float":"none"}),o&&a("select").not(r.find("select")).filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one(k,function(){this.style.visibility="inherit"}),c=function(){function q(){n&&r[0].style.removeAttribute("filter")}var b,c,g=y.length,h,i="frameBorder",k="allowTransparency",l,o,p;if(!S)return;l=function(){clearTimeout(V),C.hide(),bc(j,K.onComplete)},n&&R&&A.fadeIn(100),D.html(K.title).add(A).show();if(g>1){typeof K.current=="string"&&E.html(K.current.replace("{current}",Q+1).replace("{total}",g)).show(),G[K.loop||Q<g-1?"show":"hide"]().html(K.next),H[K.loop||Q?"show":"hide"]().html(K.previous),K.slideshow&&F.show();if(K.preloading){b=[$(-1),$(1)];while(c=y[b.pop()])o=a.data(c,e).href||c.href,a.isFunction(o)&&(o=o.call(c)),ba(o)&&(p=new Image,p.src=o)}}else J.hide();K.iframe?(h=Z("iframe")[0],i in h&&(h[i]=0),k in h&&(h[k]="true"),h.name=f+ +(new Date),K.fastIframe?l():a(h).one("load",l),h.src=K.href,K.scrolling||(h.scrolling="no"),a(h).addClass(f+"Iframe").appendTo(A).one(m,function(){h.src="//about:blank"})):l(),K.transition==="fade"?r.fadeTo(d,1,q):q()},K.transition==="fade"?r.fadeTo(d,0,function(){W.position(0,c)}):W.position(d,c)},W.load=function(b){var c,d,e=W.prep;T=!0,R=!1,P=y[Q],b||bb(),bc(m),bc(i,K.onLoad),K.h=K.height?_(K.height,"y")-N-L:K.innerHeight&&_(K.innerHeight,"y"),K.w=K.width?_(K.width,"x")-O-M:K.innerWidth&&_(K.innerWidth,"x"),K.mw=K.w,K.mh=K.h,K.maxWidth&&(K.mw=_(K.maxWidth,"x")-O-M,K.mw=K.w&&K.w<K.mw?K.w:K.mw),K.maxHeight&&(K.mh=_(K.maxHeight,"y")-N-L,K.mh=K.h&&K.h<K.mh?K.h:K.mh),c=K.href,V=setTimeout(function(){C.show()},100),K.inline?(Z(X).hide().insertBefore(a(c)[0]).one(m,function(){a(this).replaceWith(A.children())}),e(a(c))):K.iframe?e(" "):K.html?e(K.html):ba(c)?(a(R=new Image).addClass(f+"Photo").error(function(){K.title=!1,e(Z(X,"Error").text("This image could not be loaded"))}).load(function(){var a;R.onload=null,K.scalePhotos&&(d=function(){R.height-=R.height*a,R.width-=R.width*a},K.mw&&R.width>K.mw&&(a=(R.width-K.mw)/R.width,d()),K.mh&&R.height>K.mh&&(a=(R.height-K.mh)/R.height,d())),K.h&&(R.style.marginTop=Math.max(K.h-R.height,0)/2+"px"),y[1]&&(K.loop||y[Q+1])&&(R.style.cursor="pointer",R.onclick=function(){W.next()}),n&&(R.style.msInterpolationMode="bicubic"),setTimeout(function(){e(R)},1)}),setTimeout(function(){R.src=c},1)):c&&B.load(c,K.data,function(b,c,d){e(c==="error"?Z(X,"Error").text("Request unsuccessful: "+d.statusText):a(this).contents())})},W.next=function(){!T&&y[1]&&(K.loop||y[Q+1])&&(Q=$(1),W.load())},W.prev=function(){!T&&y[1]&&(K.loop||Q)&&(Q=$(-1),W.load())},W.close=function(){S&&!U&&(U=!0,S=!1,bc(k,K.onCleanup),z.unbind("."+f+" ."+p),q.fadeTo(200,0),r.stop().fadeTo(300,0,function(){r.add(q).css({opacity:1,cursor:"auto"}).hide(),bc(m),A.remove(),setTimeout(function(){U=!1,bc(l,K.onClosed)},1)}))},W.remove=function(){a([]).add(r).add(q).remove(),r=null,a("."+g).removeData(e).removeClass(g).die()},W.element=function(){return a(P)},W.settings=d})(jQuery,document,this);
js/adzones/jquery.colorbox.js ADDED
@@ -0,0 +1,888 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // ColorBox v1.3.19 - jQuery lightbox plugin
2
+ // (c) 2011 Jack Moore - jacklmoore.com
3
+ // License: http://www.opensource.org/licenses/mit-license.php
4
+ (function ($, document, window) {
5
+ var
6
+ // Default settings object.
7
+ // See http://jacklmoore.com/colorbox for details.
8
+ defaults = {
9
+ transition: "elastic",
10
+ speed: 300,
11
+ width: false,
12
+ initialWidth: "600",
13
+ innerWidth: false,
14
+ maxWidth: false,
15
+ height: false,
16
+ initialHeight: "450",
17
+ innerHeight: false,
18
+ maxHeight: false,
19
+ scalePhotos: true,
20
+ scrolling: true,
21
+ inline: false,
22
+ html: false,
23
+ iframe: false,
24
+ fastIframe: true,
25
+ photo: false,
26
+ href: false,
27
+ title: false,
28
+ rel: false,
29
+ opacity: 0.9,
30
+ preloading: true,
31
+ current: "image {current} of {total}",
32
+ previous: "previous",
33
+ next: "next",
34
+ close: "close",
35
+ open: false,
36
+ returnFocus: true,
37
+ reposition: true,
38
+ loop: true,
39
+ slideshow: false,
40
+ slideshowAuto: true,
41
+ slideshowSpeed: 2500,
42
+ slideshowStart: "start slideshow",
43
+ slideshowStop: "stop slideshow",
44
+ onOpen: false,
45
+ onLoad: false,
46
+ onComplete: false,
47
+ onCleanup: false,
48
+ onClosed: false,
49
+ overlayClose: true,
50
+ escKey: true,
51
+ arrowKey: true,
52
+ top: false,
53
+ bottom: false,
54
+ left: false,
55
+ right: false,
56
+ fixed: false,
57
+ data: undefined
58
+ },
59
+
60
+ // Abstracting the HTML and event identifiers for easy rebranding
61
+ colorbox = 'colorbox',
62
+ prefix = 'cbox',
63
+ boxElement = prefix + 'Element',
64
+
65
+ // Events
66
+ event_open = prefix + '_open',
67
+ event_load = prefix + '_load',
68
+ event_complete = prefix + '_complete',
69
+ event_cleanup = prefix + '_cleanup',
70
+ event_closed = prefix + '_closed',
71
+ event_purge = prefix + '_purge',
72
+
73
+ // Special Handling for IE
74
+ isIE = !$.support.opacity && !$.support.style, // IE7 & IE8
75
+ isIE6 = isIE && !window.XMLHttpRequest, // IE6
76
+ event_ie6 = prefix + '_IE6',
77
+
78
+ // Cached jQuery Object Variables
79
+ $overlay,
80
+ $box,
81
+ $wrap,
82
+ $content,
83
+ $topBorder,
84
+ $leftBorder,
85
+ $rightBorder,
86
+ $bottomBorder,
87
+ $related,
88
+ $window,
89
+ $loaded,
90
+ $loadingBay,
91
+ $loadingOverlay,
92
+ $title,
93
+ $current,
94
+ $slideshow,
95
+ $next,
96
+ $prev,
97
+ $close,
98
+ $groupControls,
99
+
100
+ // Variables for cached values or use across multiple functions
101
+ settings,
102
+ interfaceHeight,
103
+ interfaceWidth,
104
+ loadedHeight,
105
+ loadedWidth,
106
+ element,
107
+ index,
108
+ photo,
109
+ open,
110
+ active,
111
+ closing,
112
+ loadingTimer,
113
+ publicMethod,
114
+ div = "div",
115
+ init;
116
+
117
+ // ****************
118
+ // HELPER FUNCTIONS
119
+ // ****************
120
+
121
+ // Convience function for creating new jQuery objects
122
+ function $tag(tag, id, css) {
123
+ var element = document.createElement(tag);
124
+
125
+ if (id) {
126
+ element.id = prefix + id;
127
+ }
128
+
129
+ if (css) {
130
+ element.style.cssText = css;
131
+ }
132
+
133
+ return $(element);
134
+ }
135
+
136
+ // Determine the next and previous members in a group.
137
+ function getIndex(increment) {
138
+ var
139
+ max = $related.length,
140
+ newIndex = (index + increment) % max;
141
+
142
+ return (newIndex < 0) ? max + newIndex : newIndex;
143
+ }
144
+
145
+ // Convert '%' and 'px' values to integers
146
+ function setSize(size, dimension) {
147
+ return Math.round((/%/.test(size) ? ((dimension === 'x' ? $window.width() : $window.height()) / 100) : 1) * parseInt(size, 10));
148
+ }
149
+
150
+ // Checks an href to see if it is a photo.
151
+ // There is a force photo option (photo: true) for hrefs that cannot be matched by this regex.
152
+ function isImage(url) {
153
+ return settings.photo || /\.(gif|png|jpe?g|bmp|ico)((#|\?).*)?$/i.test(url);
154
+ }
155
+
156
+ // Assigns function results to their respective properties
157
+ function makeSettings() {
158
+ var i;
159
+ settings = $.extend({}, $.data(element, colorbox));
160
+
161
+ for (i in settings) {
162
+ if ($.isFunction(settings[i]) && i.slice(0, 2) !== 'on') { // checks to make sure the function isn't one of the callbacks, they will be handled at the appropriate time.
163
+ settings[i] = settings[i].call(element);
164
+ }
165
+ }
166
+
167
+ settings.rel = settings.rel || element.rel || 'nofollow';
168
+ settings.href = settings.href || $(element).attr('href');
169
+ settings.title = settings.title || element.title;
170
+
171
+ if (typeof settings.href === "string") {
172
+ settings.href = $.trim(settings.href);
173
+ }
174
+ }
175
+
176
+ function trigger(event, callback) {
177
+ $.event.trigger(event);
178
+ if (callback) {
179
+ callback.call(element);
180
+ }
181
+ }
182
+
183
+ // Slideshow functionality
184
+ function slideshow() {
185
+ var
186
+ timeOut,
187
+ className = prefix + "Slideshow_",
188
+ click = "click." + prefix,
189
+ start,
190
+ stop,
191
+ clear;
192
+
193
+ if (settings.slideshow && $related[1]) {
194
+ start = function () {
195
+ $slideshow
196
+ .text(settings.slideshowStop)
197
+ .unbind(click)
198
+ .bind(event_complete, function () {
199
+ if (settings.loop || $related[index + 1]) {
200
+ timeOut = setTimeout(publicMethod.next, settings.slideshowSpeed);
201
+ }
202
+ })
203
+ .bind(event_load, function () {
204
+ clearTimeout(timeOut);
205
+ })
206
+ .one(click + ' ' + event_cleanup, stop);
207
+ $box.removeClass(className + "off").addClass(className + "on");
208
+ timeOut = setTimeout(publicMethod.next, settings.slideshowSpeed);
209
+ };
210
+
211
+ stop = function () {
212
+ clearTimeout(timeOut);
213
+ $slideshow
214
+ .text(settings.slideshowStart)
215
+ .unbind([event_complete, event_load, event_cleanup, click].join(' '))
216
+ .one(click, function () {
217
+ publicMethod.next();
218
+ start();
219
+ });
220
+ $box.removeClass(className + "on").addClass(className + "off");
221
+ };
222
+
223
+ if (settings.slideshowAuto) {
224
+ start();
225
+ } else {
226
+ stop();
227
+ }
228
+ } else {
229
+ $box.removeClass(className + "off " + className + "on");
230
+ }
231
+ }
232
+
233
+ function launch(target) {
234
+ if (!closing) {
235
+
236
+ element = target;
237
+
238
+ makeSettings();
239
+
240
+ $related = $(element);
241
+
242
+ index = 0;
243
+
244
+ if (settings.rel !== 'nofollow') {
245
+ $related = $('.' + boxElement).filter(function () {
246
+ var relRelated = $.data(this, colorbox).rel || this.rel;
247
+ return (relRelated === settings.rel);
248
+ });
249
+ index = $related.index(element);
250
+
251
+ // Check direct calls to ColorBox.
252
+ if (index === -1) {
253
+ $related = $related.add(element);
254
+ index = $related.length - 1;
255
+ }
256
+ }
257
+
258
+ if (!open) {
259
+ open = active = true; // Prevents the page-change action from queuing up if the visitor holds down the left or right keys.
260
+
261
+ $box.show();
262
+
263
+ if (settings.returnFocus) {
264
+ $(element).blur().one(event_closed, function () {
265
+ $(this).focus();
266
+ });
267
+ }
268
+
269
+ // +settings.opacity avoids a problem in IE when using non-zero-prefixed-string-values, like '.5'
270
+ $overlay.css({"opacity": +settings.opacity, "cursor": settings.overlayClose ? "pointer" : "auto"}).show();
271
+
272
+ // Opens inital empty ColorBox prior to content being loaded.
273
+ settings.w = setSize(settings.initialWidth, 'x');
274
+ settings.h = setSize(settings.initialHeight, 'y');
275
+ publicMethod.position();
276
+
277
+ if (isIE6) {
278
+ $window.bind('resize.' + event_ie6 + ' scroll.' + event_ie6, function () {
279
+ $overlay.css({width: $window.width(), height: $window.height(), top: $window.scrollTop(), left: $window.scrollLeft()});
280
+ }).trigger('resize.' + event_ie6);
281
+ }
282
+
283
+ trigger(event_open, settings.onOpen);
284
+
285
+ $groupControls.add($title).hide();
286
+
287
+ $close.html(settings.close).show();
288
+ }
289
+
290
+ publicMethod.load(true);
291
+ }
292
+ }
293
+
294
+ // ColorBox's markup needs to be added to the DOM prior to being called
295
+ // so that the browser will go ahead and load the CSS background images.
296
+ function appendHTML() {
297
+ if (!$box && document.body) {
298
+ init = false;
299
+
300
+ $window = $(window);
301
+ $box = $tag(div).attr({id: colorbox, 'class': isIE ? prefix + (isIE6 ? 'IE6' : 'IE') : ''}).hide();
302
+ $overlay = $tag(div, "Overlay", isIE6 ? 'position:absolute' : '').hide();
303
+ $wrap = $tag(div, "Wrapper");
304
+ $content = $tag(div, "Content").append(
305
+ $loaded = $tag(div, "LoadedContent", 'width:0; height:0; overflow:hidden'),
306
+ $loadingOverlay = $tag(div, "LoadingOverlay").add($tag(div, "LoadingGraphic")),
307
+ $title = $tag(div, "Title"),
308
+ $current = $tag(div, "Current"),
309
+ $next = $tag(div, "Next"),
310
+ $prev = $tag(div, "Previous"),
311
+ $slideshow = $tag(div, "Slideshow").bind(event_open, slideshow),
312
+ $close = $tag(div, "Close")
313
+ );
314
+
315
+ $wrap.append( // The 3x3 Grid that makes up ColorBox
316
+ $tag(div).append(
317
+ $tag(div, "TopLeft"),
318
+ $topBorder = $tag(div, "TopCenter"),
319
+ $tag(div, "TopRight")
320
+ ),
321
+ $tag(div, false, 'clear:left').append(
322
+ $leftBorder = $tag(div, "MiddleLeft"),
323
+ $content,
324
+ $rightBorder = $tag(div, "MiddleRight")
325
+ ),
326
+ $tag(div, false, 'clear:left').append(
327
+ $tag(div, "BottomLeft"),
328
+ $bottomBorder = $tag(div, "BottomCenter"),
329
+ $tag(div, "BottomRight")
330
+ )
331
+ ).find('div div').css({'float': 'left'});
332
+
333
+ $loadingBay = $tag(div, false, 'position:absolute; width:9999px; visibility:hidden; display:none');
334
+
335
+ $groupControls = $next.add($prev).add($current).add($slideshow);
336
+
337
+ $(document.body).append($overlay, $box.append($wrap, $loadingBay));
338
+ }
339
+ }
340
+
341
+ // Add ColorBox's event bindings
342
+ function addBindings() {
343
+ if ($box) {
344
+ if (!init) {
345
+ init = true;
346
+
347
+ // Cache values needed for size calculations
348
+ interfaceHeight = $topBorder.height() + $bottomBorder.height() + $content.outerHeight(true) - $content.height();//Subtraction needed for IE6
349
+ interfaceWidth = $leftBorder.width() + $rightBorder.width() + $content.outerWidth(true) - $content.width();
350
+ loadedHeight = $loaded.outerHeight(true);
351
+ loadedWidth = $loaded.outerWidth(true);
352
+
353
+ // Setting padding to remove the need to do size conversions during the animation step.
354
+ $box.css({"padding-bottom": interfaceHeight, "padding-right": interfaceWidth});
355
+
356
+ // Anonymous functions here keep the public method from being cached, thereby allowing them to be redefined on the fly.
357
+ $next.click(function () {
358
+ publicMethod.next();
359
+ });
360
+ $prev.click(function () {
361
+ publicMethod.prev();
362
+ });
363
+ $close.click(function () {
364
+ publicMethod.close();
365
+ });
366
+ $overlay.click(function () {
367
+ if (settings.overlayClose) {
368
+ publicMethod.close();
369
+ }
370
+ });
371
+
372
+ // Key Bindings
373
+ $(document).bind('keydown.' + prefix, function (e) {
374
+ var key = e.keyCode;
375
+ if (open && settings.escKey && key === 27) {
376
+ e.preventDefault();
377
+ publicMethod.close();
378
+ }
379
+ if (open && settings.arrowKey && $related[1]) {
380
+ if (key === 37) {
381
+ e.preventDefault();
382
+ $prev.click();
383
+ } else if (key === 39) {
384
+ e.preventDefault();
385
+ $next.click();
386
+ }
387
+ }
388
+ });
389
+
390
+ $('.' + boxElement, document).live('click', function (e) {
391
+ // ignore non-left-mouse-clicks and clicks modified with ctrl / command, shift, or alt.
392
+ // See: http://jacklmoore.com/notes/click-events/
393
+ if (!(e.which > 1 || e.shiftKey || e.altKey || e.metaKey)) {
394
+ e.preventDefault();
395
+ launch(this);
396
+ }
397
+ });
398
+ }
399
+ return true;
400
+ }
401
+ return false;
402
+ }
403
+
404
+ // Don't do anything if ColorBox already exists.
405
+ if ($.colorbox) {
406
+ return;
407
+ }
408
+
409
+ // Append the HTML when the DOM loads
410
+ $(appendHTML);
411
+
412
+
413
+ // ****************
414
+ // PUBLIC FUNCTIONS
415
+ // Usage format: $.fn.colorbox.close();
416
+ // Usage from within an iframe: parent.$.fn.colorbox.close();
417
+ // ****************
418
+
419
+ publicMethod = $.fn[colorbox] = $[colorbox] = function (options, callback) {
420
+ var $this = this;
421
+
422
+ options = options || {};
423
+
424
+ appendHTML();
425
+
426
+ if (addBindings()) {
427
+ if (!$this[0]) {
428
+ if ($this.selector) { // if a selector was given and it didn't match any elements, go ahead and exit.
429
+ return $this;
430
+ }
431
+ // if no selector was given (ie. $.colorbox()), create a temporary element to work with
432
+ $this = $('<a/>');
433
+ options.open = true; // assume an immediate open
434
+ }
435
+
436
+ if (callback) {
437
+ options.onComplete = callback;
438
+ }
439
+
440
+ $this.each(function () {
441
+ $.data(this, colorbox, $.extend({}, $.data(this, colorbox) || defaults, options));
442
+ }).addClass(boxElement);
443
+
444
+ if (($.isFunction(options.open) && options.open.call($this)) || options.open) {
445
+ launch($this[0]);
446
+ }
447
+ }
448
+
449
+ return $this;
450
+ };
451
+
452
+ publicMethod.position = function (speed, loadedCallback) {
453
+ var
454
+ top = 0,
455
+ left = 0,
456
+ offset = $box.offset(),
457
+ scrollTop = $window.scrollTop(),
458
+ scrollLeft = $window.scrollLeft();
459
+
460
+ $window.unbind('resize.' + prefix);
461
+
462
+ // remove the modal so that it doesn't influence the document width/height
463
+ $box.css({top: -9e4, left: -9e4});
464
+
465
+ if (settings.fixed && !isIE6) {
466
+ offset.top -= scrollTop;
467
+ offset.left -= scrollLeft;
468
+ $box.css({position: 'fixed'});
469
+ } else {
470
+ top = scrollTop;
471
+ left = scrollLeft;
472
+ $box.css({position: 'absolute'});
473
+ }
474
+
475
+ // keeps the top and left positions within the browser's viewport.
476
+ if (settings.right !== false) {
477
+ left += Math.max($window.width() - settings.w - loadedWidth - interfaceWidth - setSize(settings.right, 'x'), 0);
478
+ } else if (settings.left !== false) {
479
+ left += setSize(settings.left, 'x');
480
+ } else {
481
+ left += Math.round(Math.max($window.width() - settings.w - loadedWidth - interfaceWidth, 0) / 2);
482
+ }
483
+
484
+ if (settings.bottom !== false) {
485
+ top += Math.max($window.height() - settings.h - loadedHeight - interfaceHeight - setSize(settings.bottom, 'y'), 0);
486
+ } else if (settings.top !== false) {
487
+ top += setSize(settings.top, 'y');
488
+ } else {
489
+ top += Math.round(Math.max($window.height() - settings.h - loadedHeight - interfaceHeight, 0) / 2);
490
+ }
491
+
492
+ $box.css({top: offset.top, left: offset.left});
493
+
494
+ // setting the speed to 0 to reduce the delay between same-sized content.
495
+ speed = ($box.width() === settings.w + loadedWidth && $box.height() === settings.h + loadedHeight) ? 0 : speed || 0;
496
+
497
+ // this gives the wrapper plenty of breathing room so it's floated contents can move around smoothly,
498
+ // but it has to be shrank down around the size of div#colorbox when it's done. If not,
499
+ // it can invoke an obscure IE bug when using iframes.
500
+ $wrap[0].style.width = $wrap[0].style.height = "9999px";
501
+
502
+ function modalDimensions(that) {
503
+ $topBorder[0].style.width = $bottomBorder[0].style.width = $content[0].style.width = that.style.width;
504
+ $content[0].style.height = $leftBorder[0].style.height = $rightBorder[0].style.height = that.style.height;
505
+ }
506
+
507
+ $box.dequeue().animate({width: settings.w + loadedWidth, height: settings.h + loadedHeight, top: top, left: left}, {
508
+ duration: speed,
509
+ complete: function () {
510
+ modalDimensions(this);
511
+
512
+ active = false;
513
+
514
+ // shrink the wrapper down to exactly the size of colorbox to avoid a bug in IE's iframe implementation.
515
+ $wrap[0].style.width = (settings.w + loadedWidth + interfaceWidth) + "px";
516
+ $wrap[0].style.height = (settings.h + loadedHeight + interfaceHeight) + "px";
517
+
518
+ if (settings.reposition) {
519
+ setTimeout(function () { // small delay before binding onresize due to an IE8 bug.
520
+ $window.bind('resize.' + prefix, publicMethod.position);
521
+ }, 1);
522
+ }
523
+
524
+ if (loadedCallback) {
525
+ loadedCallback();
526
+ }
527
+ },
528
+ step: function () {
529
+ modalDimensions(this);
530
+ }
531
+ });
532
+ };
533
+
534
+ publicMethod.resize = function (options) {
535
+ if (open) {
536
+ options = options || {};
537
+
538
+ if (options.width) {
539
+ settings.w = setSize(options.width, 'x') - loadedWidth - interfaceWidth;
540
+ }
541
+ if (options.innerWidth) {
542
+ settings.w = setSize(options.innerWidth, 'x');
543
+ }
544
+ $loaded.css({width: settings.w});
545
+
546
+ if (options.height) {
547
+ settings.h = setSize(options.height, 'y') - loadedHeight - interfaceHeight;
548
+ }
549
+ if (options.innerHeight) {
550
+ settings.h = setSize(options.innerHeight, 'y');
551
+ }
552
+ if (!options.innerHeight && !options.height) {
553
+ $loaded.css({height: "auto"});
554
+ settings.h = $loaded.height();
555
+ }
556
+ $loaded.css({height: settings.h});
557
+
558
+ publicMethod.position(settings.transition === "none" ? 0 : settings.speed);
559
+ }
560
+ };
561
+
562
+ publicMethod.prep = function (object) {
563
+ if (!open) {
564
+ return;
565
+ }
566
+
567
+ var callback, speed = settings.transition === "none" ? 0 : settings.speed;
568
+
569
+ $loaded.remove();
570
+ $loaded = $tag(div, 'LoadedContent').append(object);
571
+
572
+ function getWidth() {
573
+ settings.w = settings.w || $loaded.width();
574
+ settings.w = settings.mw && settings.mw < settings.w ? settings.mw : settings.w;
575
+ return settings.w;
576
+ }
577
+ function getHeight() {
578
+ settings.h = settings.h || $loaded.height();
579
+ settings.h = settings.mh && settings.mh < settings.h ? settings.mh : settings.h;
580
+ return settings.h;
581
+ }
582
+
583
+ $loaded.hide()
584
+ .appendTo($loadingBay.show())// content has to be appended to the DOM for accurate size calculations.
585
+ .css({width: getWidth(), overflow: settings.scrolling ? 'auto' : 'hidden'})
586
+ .css({height: getHeight()})// sets the height independently from the width in case the new width influences the value of height.
587
+ .prependTo($content);
588
+
589
+ $loadingBay.hide();
590
+
591
+ // floating the IMG removes the bottom line-height and fixed a problem where IE miscalculates the width of the parent element as 100% of the document width.
592
+ //$(photo).css({'float': 'none', marginLeft: 'auto', marginRight: 'auto'});
593
+
594
+ $(photo).css({'float': 'none'});
595
+
596
+ // Hides SELECT elements in IE6 because they would otherwise sit on top of the overlay.
597
+ if (isIE6) {
598
+ $('select').not($box.find('select')).filter(function () {
599
+ return this.style.visibility !== 'hidden';
600
+ }).css({'visibility': 'hidden'}).one(event_cleanup, function () {
601
+ this.style.visibility = 'inherit';
602
+ });
603
+ }
604
+
605
+ callback = function () {
606
+ var preload, i, total = $related.length, iframe, frameBorder = 'frameBorder', allowTransparency = 'allowTransparency', complete, src, img;
607
+
608
+ if (!open) {
609
+ return;
610
+ }
611
+
612
+ function removeFilter() {
613
+ if (isIE) {
614
+ $box[0].style.removeAttribute('filter');
615
+ }
616
+ }
617
+
618
+ complete = function () {
619
+ clearTimeout(loadingTimer);
620
+ $loadingOverlay.hide();
621
+ trigger(event_complete, settings.onComplete);
622
+ };
623
+
624
+ if (isIE) {
625
+ //This fadeIn helps the bicubic resampling to kick-in.
626
+ if (photo) {
627
+ $loaded.fadeIn(100);
628
+ }
629
+ }
630
+
631
+ $title.html(settings.title).add($loaded).show();
632
+
633
+ if (total > 1) { // handle grouping
634
+ if (typeof settings.current === "string") {
635
+ $current.html(settings.current.replace('{current}', index + 1).replace('{total}', total)).show();
636
+ }
637
+
638
+ $next[(settings.loop || index < total - 1) ? "show" : "hide"]().html(settings.next);
639
+ $prev[(settings.loop || index) ? "show" : "hide"]().html(settings.previous);
640
+
641
+ if (settings.slideshow) {
642
+ $slideshow.show();
643
+ }
644
+
645
+ // Preloads images within a rel group
646
+ if (settings.preloading) {
647
+ preload = [
648
+ getIndex(-1),
649
+ getIndex(1)
650
+ ];
651
+ while (i = $related[preload.pop()]) {
652
+ src = $.data(i, colorbox).href || i.href;
653
+ if ($.isFunction(src)) {
654
+ src = src.call(i);
655
+ }
656
+ if (isImage(src)) {
657
+ img = new Image();
658
+ img.src = src;
659
+ }
660
+ }
661
+ }
662
+ } else {
663
+ $groupControls.hide();
664
+ }
665
+
666
+ if (settings.iframe) {
667
+ iframe = $tag('iframe')[0];
668
+
669
+ if (frameBorder in iframe) {
670
+ iframe[frameBorder] = 0;
671
+ }
672
+ if (allowTransparency in iframe) {
673
+ iframe[allowTransparency] = "true";
674
+ }
675
+ // give the iframe a unique name to prevent caching
676
+ iframe.name = prefix + (+new Date());
677
+ if (settings.fastIframe) {
678
+ complete();
679
+ } else {
680
+ $(iframe).one('load', complete);
681
+ }
682
+ iframe.src = settings.href;
683
+ if (!settings.scrolling) {
684
+ iframe.scrolling = "no";
685
+ }
686
+ $(iframe).addClass(prefix + 'Iframe').appendTo($loaded).one(event_purge, function () {
687
+ iframe.src = "//about:blank";
688
+ });
689
+ } else {
690
+ complete();
691
+ }
692
+
693
+ if (settings.transition === 'fade') {
694
+ $box.fadeTo(speed, 1, removeFilter);
695
+ } else {
696
+ removeFilter();
697
+ }
698
+ };
699
+
700
+ if (settings.transition === 'fade') {
701
+ $box.fadeTo(speed, 0, function () {
702
+ publicMethod.position(0, callback);
703
+ });
704
+ } else {
705
+ publicMethod.position(speed, callback);
706
+ }
707
+ };
708
+
709
+ publicMethod.load = function (launched) {
710
+ var href, setResize, prep = publicMethod.prep;
711
+
712
+ active = true;
713
+
714
+ photo = false;
715
+
716
+ element = $related[index];
717
+
718
+ if (!launched) {
719
+ makeSettings();
720
+ }
721
+
722
+ trigger(event_purge);
723
+
724
+ trigger(event_load, settings.onLoad);
725
+
726
+ settings.h = settings.height ?
727
+ setSize(settings.height, 'y') - loadedHeight - interfaceHeight :
728
+ settings.innerHeight && setSize(settings.innerHeight, 'y');
729
+
730
+ settings.w = settings.width ?
731
+ setSize(settings.width, 'x') - loadedWidth - interfaceWidth :
732
+ settings.innerWidth && setSize(settings.innerWidth, 'x');
733
+
734
+ // Sets the minimum dimensions for use in image scaling
735
+ settings.mw = settings.w;
736
+ settings.mh = settings.h;
737
+
738
+ // Re-evaluate the minimum width and height based on maxWidth and maxHeight values.
739
+ // If the width or height exceed the maxWidth or maxHeight, use the maximum values instead.
740
+ if (settings.maxWidth) {
741
+ settings.mw = setSize(settings.maxWidth, 'x') - loadedWidth - interfaceWidth;
742
+ settings.mw = settings.w && settings.w < settings.mw ? settings.w : settings.mw;
743
+ }
744
+ if (settings.maxHeight) {
745
+ settings.mh = setSize(settings.maxHeight, 'y') - loadedHeight - interfaceHeight;
746
+ settings.mh = settings.h && settings.h < settings.mh ? settings.h : settings.mh;
747
+ }
748
+
749
+ href = settings.href;
750
+
751
+ loadingTimer = setTimeout(function () {
752
+ $loadingOverlay.show();
753
+ }, 100);
754
+
755
+ if (settings.inline) {
756
+ // Inserts an empty placeholder where inline content is being pulled from.
757
+ // An event is bound to put inline content back when ColorBox closes or loads new content.
758
+ $tag(div).hide().insertBefore($(href)[0]).one(event_purge, function () {
759
+ $(this).replaceWith($loaded.children());
760
+ });
761
+ prep($(href));
762
+ } else if (settings.iframe) {
763
+ // IFrame element won't be added to the DOM until it is ready to be displayed,
764
+ // to avoid problems with DOM-ready JS that might be trying to run in that iframe.
765
+ prep(" ");
766
+ } else if (settings.html) {
767
+ prep(settings.html);
768
+ } else if (isImage(href)) {
769
+ $(photo = new Image())
770
+ .addClass(prefix + 'Photo')
771
+ .error(function () {
772
+ settings.title = false;
773
+ prep($tag(div, 'Error').text('This image could not be loaded'));
774
+ })
775
+ .load(function () {
776
+ var percent;
777
+ photo.onload = null; //stops animated gifs from firing the onload repeatedly.
778
+
779
+ if (settings.scalePhotos) {
780
+ setResize = function () {
781
+ photo.height -= photo.height * percent;
782
+ photo.width -= photo.width * percent;
783
+ };
784
+ if (settings.mw && photo.width > settings.mw) {
785
+ percent = (photo.width - settings.mw) / photo.width;
786
+ setResize();
787
+ }
788
+ if (settings.mh && photo.height > settings.mh) {
789
+ percent = (photo.height - settings.mh) / photo.height;
790
+ setResize();
791
+ }
792
+ }
793
+
794
+ if (settings.h) {
795
+ photo.style.marginTop = Math.max(settings.h - photo.height, 0) / 2 + 'px';
796
+ }
797
+
798
+ if ($related[1] && (settings.loop || $related[index + 1])) {
799
+ photo.style.cursor = 'pointer';
800
+ photo.onclick = function () {
801
+ publicMethod.next();
802
+ };
803
+ }
804
+
805
+ if (isIE) {
806
+ photo.style.msInterpolationMode = 'bicubic';
807
+ }
808
+
809
+ setTimeout(function () { // A pause because Chrome will sometimes report a 0 by 0 size otherwise.
810
+ prep(photo);
811
+ }, 1);
812
+ });
813
+
814
+ setTimeout(function () { // A pause because Opera 10.6+ will sometimes not run the onload function otherwise.
815
+ photo.src = href;
816
+ }, 1);
817
+ } else if (href) {
818
+ $loadingBay.load(href, settings.data, function (data, status, xhr) {
819
+ prep(status === 'error' ? $tag(div, 'Error').text('Request unsuccessful: ' + xhr.statusText) : $(this).contents());
820
+ });
821
+ }
822
+ };
823
+
824
+ // Navigates to the next page/image in a set.
825
+ publicMethod.next = function () {
826
+ if (!active && $related[1] && (settings.loop || $related[index + 1])) {
827
+ index = getIndex(1);
828
+ publicMethod.load();
829
+ }
830
+ };
831
+
832
+ publicMethod.prev = function () {
833
+ if (!active && $related[1] && (settings.loop || index)) {
834
+ index = getIndex(-1);
835
+ publicMethod.load();
836
+ }
837
+ };
838
+
839
+ // Note: to use this within an iframe use the following format: parent.$.fn.colorbox.close();
840
+ publicMethod.close = function () {
841
+ if (open && !closing) {
842
+
843
+ closing = true;
844
+
845
+ open = false;
846
+
847
+ trigger(event_cleanup, settings.onCleanup);
848
+
849
+ $window.unbind('.' + prefix + ' .' + event_ie6);
850
+
851
+ $overlay.fadeTo(200, 0);
852
+
853
+ $box.stop().fadeTo(300, 0, function () {
854
+
855
+ $box.add($overlay).css({'opacity': 1, cursor: 'auto'}).hide();
856
+
857
+ trigger(event_purge);
858
+
859
+ $loaded.remove();
860
+
861
+ setTimeout(function () {
862
+ closing = false;
863
+ trigger(event_closed, settings.onClosed);
864
+ }, 1);
865
+ });
866
+ }
867
+ };
868
+
869
+ // Removes changes ColorBox made to the document, but does not remove the plugin
870
+ // from jQuery.
871
+ publicMethod.remove = function () {
872
+ $([]).add($box).add($overlay).remove();
873
+ $box = null;
874
+ $('.' + boxElement)
875
+ .removeData(colorbox)
876
+ .removeClass(boxElement)
877
+ .die();
878
+ };
879
+
880
+ // A method for fetching the current element ColorBox is referencing.
881
+ // returns a jQuery object.
882
+ publicMethod.element = function () {
883
+ return $(element);
884
+ };
885
+
886
+ publicMethod.settings = defaults;
887
+
888
+ }(jQuery, document, this));
js/adzones/personalization.js ADDED
@@ -0,0 +1,444 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ $j = jQuery.noConflict();
2
+ $j(document).ready(function() {
3
+
4
+ var segmentaionType = $j('#segmentation_type').val();
5
+ if(segmentaionType)
6
+ {
7
+
8
+ document.getElementById('segmentation_values_tr_'+segmentaionType).style.display="block";
9
+ if(segmentaionType==4)
10
+ {
11
+ $j("#segmentation_values_"+segmentaionType).addClass("required-entry required-entry select");
12
+ }
13
+ else if(segmentaionType==2 || segmentaionType==3 || segmentaionType==7)
14
+ {
15
+ var textType = document.getElementsByName('segmentation_values_'+segmentaionType+'[]');
16
+ for(var textValue=1;textValue<=textType.length;textValue++)
17
+ {
18
+ $j("#segmentation_values_"+segmentaionType+"_"+textValue).addClass("required-entry input-text required-entry");
19
+ }
20
+ }
21
+ else{
22
+ $j("#segmentation_values_"+segmentaionType).addClass("required-entry required-entry multiselect");
23
+ }
24
+ }
25
+ });
26
+ function showAjax(step)
27
+ {
28
+ var currentStep = document.getElementById('currentstep').value;
29
+ var formToValidate = $('personalization_step'+currentStep);
30
+ var validator = new Validation(formToValidate);
31
+ if(validator.validate())
32
+ {
33
+ document.getElementById('loading-mask').style.display="block";
34
+ if(step=="next")
35
+ {
36
+ setTimeout(function(){nxtStep()},900);
37
+ }
38
+ else if(step=="prev"){
39
+ setTimeout(function(){prevStep()},900);
40
+ }
41
+ }
42
+ }
43
+ function nxtStep()
44
+ {
45
+ var personalizationInfo = {'5':'Personalization information - A/B Testing','2':'Personalization information - Segmentation Type','3':'Personalization information - Content','4':'Personalization information - Status'};
46
+ document.getElementById('loading-mask').style.display="none";
47
+ var currentStep = document.getElementById('currentstep').value;
48
+ var nxtStep = (parseInt(currentStep))+1;
49
+ var progress = ((parseInt(currentStep))*16)+"%";
50
+ var progressValue = ((parseInt(currentStep))*20)+"%";
51
+ document.getElementById('personalization_step'+nxtStep).style.display="block";
52
+ document.getElementById('personalization_step'+currentStep).style.display="none";
53
+ document.getElementById('currentstep').value = nxtStep;
54
+ document.getElementById('progressbar').style.width = progress;
55
+ document.getElementById('progressbar_value').innerHTML = "Progress "+progressValue;
56
+ for (x in personalizationInfo)
57
+ {
58
+ if(x==nxtStep)
59
+ document.getElementById('personalization_info_current').innerHTML = personalizationInfo[x];
60
+ }
61
+ buttonStatus();
62
+ }
63
+ function prevStep()
64
+ {
65
+ var personalizationInfo = {'1':'Personalization information - Name','2':'Personalization information - Segmentation Type','3':'Personalization information - Content','4':'Personalization information - Status'};
66
+ document.getElementById('loading-mask').style.display="none";
67
+ var currentStep = document.getElementById('currentstep').value;
68
+ var prvStep = (parseInt(currentStep))-1;
69
+ var progress = (prvStep-1)*16+"%";
70
+ var progressValue = (prvStep-1)*20+"%";
71
+ document.getElementById('personalization_step'+prvStep).style.display="block";
72
+ document.getElementById('personalization_step'+currentStep).style.display="none";
73
+ document.getElementById('currentstep').value = prvStep;
74
+ document.getElementById('progressbar').style.width = progress;
75
+ document.getElementById('progressbar_value').innerHTML = "Progress "+progressValue;
76
+ for (x in personalizationInfo)
77
+ {
78
+ if(x==prvStep)
79
+ document.getElementById('personalization_info_current').innerHTML = personalizationInfo[x];
80
+ }
81
+
82
+ buttonStatus();
83
+ }
84
+ function buttonStatus()
85
+ {
86
+ var currentStep = document.getElementById('currentstep').value;
87
+ if(currentStep=="1")
88
+ {
89
+ document.getElementById('personalization_prev').style.display="none";
90
+ }
91
+ else{
92
+ document.getElementById('personalization_prev').style.display="block";
93
+ }
94
+ if(currentStep=="5")
95
+ {
96
+ document.getElementById('personalization_next').style.display="none";
97
+ }
98
+ else{
99
+ document.getElementById('personalization_next').style.display="block";
100
+ }
101
+ }
102
+ function setAdzonesGrid(url)
103
+ {
104
+ $j = jQuery.noConflict();
105
+ new Ajax.Request(url,
106
+ {
107
+ parameters: {form_key: FORM_KEY},
108
+ evalScripts: true,
109
+ onSuccess: function(transport){
110
+ if(transport.responseText)
111
+ {
112
+ $j('#personalization_adzones_content').html(transport.responseText);
113
+ }
114
+ },
115
+ onFailure: function(error_msg){ alert(error_msg);}
116
+ });
117
+ }
118
+ function changeTestingStatus(url,anchor)
119
+ {
120
+ new Ajax.Request(url,
121
+ {
122
+ parameters: {form_key: FORM_KEY},
123
+ evalScripts: true,
124
+ onSuccess: function(transport){
125
+ if(transport.responseText)
126
+ {
127
+ alert(transport.responseText);
128
+ }
129
+ else{
130
+ anchor.innerHTML = "<span style='color:#ff0000;'>Hold by Admin</span>";
131
+ anchor.setAttribute('onclick', '');
132
+ }
133
+ },
134
+ onFailure: function(error_msg){ alert(error_msg);}
135
+ });
136
+ }
137
+ function showSegmentationValues(value)
138
+ {
139
+ document.getElementById('segmentation_values_tr_'+value).style.display="block";
140
+ if(value==4)
141
+ {
142
+ $j("#segmentation_values_"+value).addClass("required-entry required-entry select");
143
+ }
144
+ else if(value==2 || value==3 || value==7)
145
+ {
146
+
147
+ for(j=1;j<=7;j++)
148
+ {
149
+ var textType = document.getElementsByName('segmentation_values_'+j+'[]');
150
+
151
+ for(var textValue=1;textValue<=textType.length;textValue++)
152
+ {
153
+ if(value == j)
154
+ {
155
+ $j("#segmentation_values_"+j+"_"+textValue).addClass("required-entry input-text required-entry");
156
+ }
157
+ else
158
+ {
159
+ $j("#segmentation_values_"+j+"_"+textValue).removeClass();
160
+ $j("#country_"+textValue).removeClass();
161
+ $j("#region_"+textValue).removeClass();
162
+ }
163
+ }
164
+ }
165
+ }
166
+ else if(value==1)
167
+ {
168
+ var textType = document.getElementsByName('country[]');
169
+
170
+ for(var textValue=1;textValue<=textType.length;textValue++)
171
+ {
172
+ $j("#country_"+textValue).addClass("required-entry select");
173
+ $j("#region_"+textValue).addClass("required-entry select");
174
+ }
175
+ }
176
+ else{
177
+ $j("#segmentation_values_"+value).addClass("required-entry required-entry multiselect select");
178
+ }
179
+ for(i=1;i<=7;i++)
180
+ {
181
+ if(value!=i)
182
+ {
183
+ document.getElementById('segmentation_values_tr_'+i).style.display="none";
184
+ if(value!=1 && value!=2 && value!=3 && value!=7)
185
+ {
186
+ $j("#segmentation_values_"+i).removeClass();
187
+ $j("#country_"+i).removeClass();
188
+ $j("#region_"+i).removeClass();
189
+ }
190
+ var textType = document.getElementsByName('segmentation_values_'+i+'[]');
191
+ if(i==1 || i==2 || i==3 || i==7)
192
+ for(var textValue=1;textValue<=textType.length;textValue++)
193
+ {
194
+
195
+ $j("#segmentation_values_"+i+"_"+textValue).removeClass();
196
+ $j("#country_"+i).removeClass();
197
+ $j("#region_"+i).removeClass();
198
+
199
+ }
200
+ }
201
+ }
202
+ }
203
+ function deleteRow(value)
204
+ {
205
+ var id = value.split('_');
206
+ var tbody = document.getElementById('segmentation_values_tr_'+id[0]).getElementsByTagName('tbody')[0];
207
+ var tr = document.getElementById('segmentation_default_'+value);
208
+ tbody.removeChild(tr);
209
+ var currentRow = document.getElementById('segmentaion_hide_'+id[0]).value;
210
+ currentRow = parseInt(currentRow)-1;
211
+ document.getElementById('segmentaion_hide_'+id[0]).value = currentRow;
212
+
213
+ if(currentRow == 0 && !(document.getElementById('segmentation_values_'+value)))
214
+ {
215
+ var newRow =addNewRow(id[0]);
216
+ $j(tbody).append(newRow);
217
+ }
218
+ }
219
+ function addNewRow(id)
220
+ {
221
+ var row = '<tr><td class="label"><label for="segmentation_values_'+id+'">Segmentation Values <span class="required">*</span></label></td><td class="value"><input type="textfield" class="required-entry input-text required-entry" name="segmentation_values_'+id+'[]" id="segmentation_values_'+id+'_1" value=""></td></tr>"';
222
+ return row;
223
+ }
224
+ function addNewValueRow(id)
225
+ {
226
+ var tbody = document.getElementById('segmentation_values_tr_'+id).getElementsByTagName('tbody')[0];
227
+ var currentRow = document.getElementById('segmentaion_hide_'+id).value;
228
+ currentRow = parseInt(currentRow)+1;
229
+ var row = '<tr id="segmentation_default_'+id+'_'+currentRow+'"><td class="label"><label for="segmentation_values_'+id+'">Segmentation Values <span class="required">*</span></label></td><td class="value"><input type="textfield" class="required-entry input-text required-entry" name="segmentation_values_'+id+'[]" id="segmentation_values_'+id+'_'+currentRow+'" value=""></td><td><button style="" onclick="deleteRow(this.value)" value="'+id+'_'+currentRow+'" class="scalable delete" type="button" title="Delete"><span><span><span>Delete</span></span></span></button></td></tr>"';
230
+ document.getElementById('segmentaion_hide_'+id).value = currentRow;
231
+ $j(tbody).append(row);
232
+
233
+ }
234
+ function addNewLocation()
235
+ {
236
+ var country = document.getElementById('country_tr_0').innerHTML;
237
+
238
+ var region = document.getElementById('region_tr_0').innerHTML;
239
+ var tbody = document.getElementById('segmentation_values_tr_1').getElementsByTagName('tbody')[0];
240
+ var currentRow = document.getElementById('segmentaion_hide_1').value;
241
+ currentRow = parseInt(currentRow)+1;
242
+ country = country.replace("showRegion(this.value,'0')","showRegion(this.value,'"+currentRow+"')");
243
+ country = country.replace("selected","");
244
+ country = country.replace("country_0","country_"+currentRow+"");
245
+ country = country.replace("*","");
246
+ country = country.replace("required-entry","");
247
+ country = country.replace("button_remove",currentRow);
248
+
249
+ country = '<tr id="country_tr_'+currentRow+'">'+country+'</tr>';
250
+ region = region.replace("region_0","region_"+currentRow+"");
251
+
252
+ region = '<tr id="region_tr_'+currentRow+'" style="display:none;">'+region+'</tr>';
253
+ $j(tbody).append(country);
254
+ $j(tbody).append(region);
255
+ document.getElementById('segmentaion_hide_1').value = currentRow;
256
+ }
257
+ function showRegion(country,id)
258
+ {
259
+
260
+ if(country=="US")
261
+ {
262
+ document.getElementById('region_tr_'+id).style.display="";
263
+ document.getElementById('region_'+id).style.display="";
264
+ $j("#region_"+id).addClass("required-entry select required-entry");
265
+
266
+ }
267
+ else{
268
+ document.getElementById('region_tr_'+id).style.display="none";
269
+ $j("#region_"+id).removeClass();
270
+ }
271
+ }
272
+ function deleteLocation(value)
273
+ {
274
+ var currentRow = document.getElementById('segmentaion_hide_1').value;
275
+ if(currentRow == '1')
276
+ {
277
+ document.getElementById('country_'+value).value = "";
278
+ document.getElementById('region_'+value).style.display = "none";
279
+ $j("#region_"+value).removeClass();
280
+ }
281
+ else
282
+ {
283
+ var tbody = document.getElementById('segmentation_values_tr_1').getElementsByTagName('tbody')[0];
284
+ var trCountry = document.getElementById('country_tr_'+value);
285
+ var trRegion = document.getElementById('region_tr_'+value);
286
+ tbody.removeChild(trCountry);
287
+ tbody.removeChild(trRegion);
288
+
289
+ currentRow = parseInt(currentRow)-1;
290
+ document.getElementById('segmentaion_hide_1').value = currentRow;
291
+
292
+ }
293
+ }
294
+ function trafficCompare(personalizationid,url)
295
+ {
296
+ if(personalizationid > 0)
297
+ {
298
+ url = url+"personalization_id/"+personalizationid;
299
+ new Ajax.Request(url,
300
+ {
301
+ methos : "post",
302
+ onSuccess: function(transport){
303
+ if(transport.responseText)
304
+ {
305
+ var content = document.getElementById('compare_form');
306
+ if(document.getElementById('compareDiv') == null)
307
+ {
308
+ var comparediv = document.createElement('div');
309
+ comparediv.setAttribute('id', 'compareDiv');
310
+ content.appendChild(comparediv);
311
+ }
312
+ document.getElementById('compareDiv').innerHTML = transport.responseText;
313
+
314
+ }
315
+ },
316
+ onFailure: function(error_msg){ alert(error_msg);}
317
+ });
318
+ }
319
+ }
320
+ function createpersonalization()
321
+ {
322
+ $('personalization_tabs_create_section').click();
323
+ }
324
+ function changeDomain(url)
325
+ {
326
+ var licenseKey = $('license_key').value;
327
+ var currentDomain = $('current_domain').value;
328
+ var newDomain = $('new_domain').value;
329
+ if(!(licenseKey && currentDomain && newDomain))
330
+ {
331
+ alert("All fields are required");
332
+ return false;
333
+ }
334
+ if(!(checkPerDomain(currentDomain) && checkPerDomain(newDomain)))
335
+ {
336
+ alert("Please enter a valid URL. For example www.example.com");
337
+ return false;
338
+ }
339
+ url = url+"license/"+licenseKey+"/current_domain/"+currentDomain+"/new_domain/"+newDomain;
340
+ new Ajax.Request(url,
341
+ {
342
+ parameters: {form_key: FORM_KEY},
343
+ evalScripts: true,
344
+ method: 'post',
345
+ onSuccess: function(transport){
346
+ if(transport.responseText)
347
+ {
348
+ alert(transport.responseText);
349
+ }
350
+ },
351
+ onFailure: function(error_msg){ alert(error_msg);}
352
+ });
353
+ }
354
+ function checkPerDomain(nname)
355
+ {
356
+ var arr = new Array('.com','.net','.org','.biz','.coop','.info','.museum','.name','.pro','.edu','.gov','.int','.mil','.ac','.ad','.ae','.af','.ag',
357
+ '.ai','.al','.am','.an','.ao','.aq','.ar','.as','.at','.au','.aw','.az','.ba','.bb','.bd','.be','.bf','.bg','.bh','.bi','.bj','.bm',
358
+ '.bn','.bo','.br','.bs','.bt','.bv','.bw','.by','.bz','.ca','.cc','.cd','.cf','.cg','.ch','.ci','.ck','.cl','.cm','.cn','.co','.cr',
359
+ '.cu','.cv','.cx','.cy','.cz','.de','.dj','.dk','.dm','.do','.dz','.ec','.ee','.eg','.eh','.er','.es','.et','.fi','.fj','.fk','.fm',
360
+ '.fo','.fr','.ga','.gd','.ge','.gf','.gg','.gh','.gi','.gl','.gm','.gn','.gp','.gq','.gr','.gs','.gt','.gu','.gv','.gy','.hk','.hm',
361
+ '.hn','.hr','.ht','.hu','.id','.ie','.il','.im','.in','.io','.iq','.ir','.is','.it','.je','.jm','.jo','.jp','.ke','.kg','.kh','.ki',
362
+ '.km','.kn','.kp','.kr','.kw','.ky','.kz','.la','.lb','.lc','.li','.lk','.lr','.ls','.lt','.lu','.lv','.ly','.ma','.mc','.md','.mg',
363
+ '.mh','.mk','.ml','.mm','.mn','.mo','.mp','.mq','.mr','.ms','.mt','.mu','.mv','.mw','.mx','.my','.mz','.na','.nc','.ne','.nf','.ng',
364
+ '.ni','.nl','.no','.np','.nr','.nu','.nz','.om','.pa','.pe','.pf','.pg','.ph','.pk','.pl','.pm','.pn','.pr','.ps','.pt','.pw','.py',
365
+ '.qa','.re','.ro','.rw','.ru','.sa','.sb','.sc','.sd','.se','.sg','.sh','.si','.sj','.sk','.sl','.sm','.sn','.so','.sr','.st','.sv',
366
+ '.sy','.sz','.tc','.td','.tf','.tg','.th','.tj','.tk','.tm','.tn','.to','.tp','.tr','.tt','.tv','.tw','.tz','.ua','.ug','.uk','.um',
367
+ '.us','.uy','.uz','.va','.vc','.ve','.vg','.vi','.vn','.vu','.ws','.wf','.ye','.yt','.yu','.za','.zm','.zw');
368
+
369
+ var mai = nname;
370
+ var val = true;
371
+ var dot = mai.lastIndexOf(".");
372
+ var dname = mai.substring(0,dot);
373
+ var ext = mai.substring(dot,mai.length);
374
+ if(dot>2 && dot<57)
375
+ {
376
+ for(var i=0; i<arr.length; i++)
377
+ {
378
+ if(ext == arr[i])
379
+ {
380
+ val = true;
381
+ break;
382
+ }
383
+ else
384
+ {
385
+ val = false;
386
+ }
387
+ }
388
+ if(val == false)
389
+ {
390
+
391
+ return false;
392
+ }
393
+ else
394
+ {
395
+ for(var j=0; j<dname.length; j++)
396
+ {
397
+ var dh = dname.charAt(j);
398
+ var hh = dh.charCodeAt(0);
399
+ if((hh > 47 && hh<59) || (hh > 64 && hh<91) || (hh > 96 && hh<123) || hh==45 || hh==46)
400
+ {
401
+ if((j==0 || j==dname.length-1) && hh == 45)
402
+ {
403
+
404
+ return false;
405
+ }
406
+ }
407
+ else
408
+ {
409
+
410
+ return false;
411
+ }
412
+ }
413
+ }
414
+ }
415
+ else
416
+ {
417
+
418
+ return false;
419
+ }
420
+ return true;
421
+ }
422
+ document.observe('dom:loaded', function() {
423
+
424
+ if($('ab_test').value == 2)
425
+ {
426
+ $('start_date').removeClassName('required-entry');
427
+ $('end_date').removeClassName('required-entry');
428
+ $('ab_test_criteria').removeClassName('required-entry');
429
+ }
430
+ $$("#ab_test").invoke('observe', 'change', function(el) {
431
+ if($('ab_test').value == 1)
432
+ {
433
+ $('start_date').addClassName('required-entry');
434
+ $('end_date').addClassName('required-entry');
435
+ $('ab_test_criteria').addClassName('required-entry');
436
+ }
437
+ if($('ab_test').value == 2)
438
+ {
439
+ $('start_date').removeClassName('required-entry');
440
+ $('end_date').removeClassName('required-entry');
441
+ $('ab_test_criteria').removeClassName('required-entry');
442
+ }
443
+ });
444
+ });
package.xml ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>Convertware_Adzones_Personalization</name>
4
+ <version>0.1.0</version>
5
+ <stability>stable</stability>
6
+ <license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>Convertware offers the ability to create custom zones in your Magento site for advertising messaging. As you'll see in the details to come, designs will be utilized to place a dynamic banner advertising messages that conform and adapt to the users coming to decide.</summary>
10
+ <description>Convertware offers the ability to create custom zones in your Magento site for advertising messaging. As you'll see in the details to come, designs will be utilized to place a dynamic banner advertising messages that conform and adapt to the users coming to decide.&#xD;
11
+ &#xD;
12
+ 1) Predefined Zones&#xD;
13
+ &#xD;
14
+ Converware has 10 assigned zones for placement of the static ads: 8 main zones and 2 special (additional) zones.&#xD;
15
+ &#xD;
16
+ 1.1) Main Zones :&#xD;
17
+ &#xD;
18
+ a) menu-top- The zone will be displayed above the main menu.&#xD;
19
+ b) menu-bottom- Tthe zone will be displayed under the main menu.&#xD;
20
+ c) sidebar-left-top- The zone will be displayed at the top of the left sidebar.&#xD;
21
+ d) sidebar-left-bottom- The zone will be displayed at the bottom of the left sidebar.&#xD;
22
+ e) content-top- The zone will be displayed above the content part.&#xD;
23
+ f) sidebar-right-top- The zone will be displayed at the top of the right sidebar.&#xD;
24
+ g) sidebar-right-bottom- The zone will be displayed at the bottom of the right sidebar.&#xD;
25
+ h) page-bottom- The zone will be displayed at the end of the page.&#xD;
26
+ &#xD;
27
+ 1.2) Special zones:&#xD;
28
+ &#xD;
29
+ a) Customer-content-top: In the Customer's area the special zone above the content part is used (the main zone above the content part isn't used for this area).Thus you can place the content that have been intended for your store users only (news, announcements and advertisements). We must also add that in the Customer's area the sidebar-left-top zone is located lower than the user's menu.&#xD;
30
+ b) Cart-content-top: In the cart's and check-out pages instead of the main zone above the content part special cart-content-top zone is used.&#xD;
31
+ </description>
32
+ <notes>Convertware offers the ability to create custom zones in your Magento site for advertising messaging. As you'll see in the details to come, designs will be utilized to place a dynamic banner advertising messages that conform and adapt to the users coming to decide.</notes>
33
+ <authors><author><name>convertware</name><user>convertware</user><email>magento.support@medma.in</email></author></authors>
34
+ <date>2013-04-30</date>
35
+ <time>06:39:40</time>
36
+ <contents><target name="magelocal"><dir name="Convertware"><dir name="Adzones"><dir name="Block"><dir name="Adminhtml"><dir name="Adzones"><dir name="Edit"><file name="Form.php" hash="81d79e98f3172e6b9cf610bb7f6daceb"/><dir name="Tab"><dir name="Ajax"><file name="Serializer.php" hash="c60e9f272f4f569f0231e37fd30801d1"/></dir><file name="Categories.php" hash="878df28afa829b22ca39bef2ae37d78e"/><file name="Category.php" hash="7f96fb428fefe46179e20ffe9486b805"/><file name="Cms.php" hash="8cfbd0613294f0ebe8385195d56029b7"/><file name="Genral.php" hash="7f71d8067eb136400277c91f1f8bbde6"/><file name="Image.php" hash="02e2b34f44a3ec0f029904c2f7068372"/><file name="Products.php" hash="8316b025f4247adee452756e953297a0"/><file name="Schedule.php" hash="462579f2976e2ba1f4ccc766ad874443"/></dir><file name="Tabs.php" hash="f9d37433e9486a9fbe16aee1b2f9f125"/></dir><file name="Edit.php" hash="5dd44e509e608ebf80011d3034e229da"/><file name="Grid.php" hash="c470603d804bb92c3839453ec88186ad"/><dir name="Renderer"><file name="StoreId.php" hash="5a6dd183535f51a3a45696166ba14bc6"/><file name="TotalContent.php" hash="3f01eb05cb39c8451dceb00c278fe37e"/></dir></dir><file name="Adzones.php" hash="34dca20cebf6eb165c338e26856efb58"/><dir name="Content"><dir name="Edit"><file name="Form.php" hash="2d7df14b02d34898afdbdf3e5e57b86d"/><dir name="Tab"><file name="Form.php" hash="766496a4560dcd55195cdc0b6b613d0c"/></dir><file name="Tabs.php" hash="a770fbe60494d9318fe59b48104b9ca2"/></dir><file name="Edit.php" hash="5c1aeadc5116c5ade89237328cda5e88"/><file name="Grid.php" hash="a63e4214f62cb8f1a87d870f0bc33b98"/><dir name="Renderer"><file name="Content.php" hash="71da0c32fbe2580453fcfd71235ac34f"/><file name="Deleteurl.php" hash="975a1bfc487b1c72059d3219fd26bc7d"/><file name="Editurl.php" hash="cdf262f3fe62c1761ef8cb604220aa8c"/></dir></dir><file name="Content.php" hash="f3e78da17ad2d86d2ba2bac6e900826f"/></dir><file name="Adzones.php" hash="abcaaa464e70cb10d798dfe1bd2a1f8a"/></dir><dir name="Helper"><file name="Data.php" hash="e106ed67b2c53f439a0fc84a6b393ede"/></dir><dir name="Model"><file name="Adzones.php" hash="07a1a3cf6e14e114630ac52a1981e4b2"/><file name="AdzonesContent.php" hash="733a41d441b71c5925766f910058f5e1"/><file name="Api.php" hash="2562f29f1905535edabd79d164ce7264"/><file name="BlockPosition.php" hash="04cee1d1cace0553a05e7151ecac4839"/><file name="CustomerGroup.php" hash="8e7248da64eeb0efbcdf009ed69c0d53"/><file name="Mode.php" hash="41d1cb45511333700aa0c3a3ae11dd79"/><dir name="Mysql4"><dir name="Adzones"><file name="Collection.php" hash="3d7c662d9a83579e90026899e55f347b"/></dir><file name="Adzones.php" hash="98e0b137dfaa87b3a0b1e1fe7195d6ae"/><dir name="AdzonesContent"><file name="Collection.php" hash="78ea55e8824958dc1c18b603620bda6c"/></dir><file name="AdzonesContent.php" hash="6eb827f320230dbc94a09777f26ae81e"/><dir name="Api"><file name="Collection.php" hash="b3427dd1a3fab57b43f904d4da45c60a"/></dir><file name="Api.php" hash="f54f1d3bf6042b4b2012c1366429bc64"/></dir><file name="ShowPattern.php" hash="f7ba680b06d5e0694a538d1f78ee8b52"/><file name="Status.php" hash="787c8ba63d4cdfbbb10b8427e6d8f2ea"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="AdzonesController.php" hash="d11a2095f7d4314e9c2df46fce5144ce"/><file name="ContentController.php" hash="ee1256b8eccdd7307b0b110e6251cd34"/></dir></dir><dir name="etc"><file name="config.xml" hash="31aba179db93f607869d461256a7ee82"/><file name="system.xml" hash="5aec70e79a818aa504e631529cae799a"/></dir><dir name="sql"><dir name="adzones_setup"><file name="mysql4-install-0.1.0.php" hash="604524fa121a5ab1cdd08505b564dae5"/><file name="mysql4-upgrade-0.1.0-0.1.1.php" hash="2e3f30c3ab9d3837715369891d1a207e"/></dir></dir></dir><dir name="Personalization"><dir name="Block"><dir name="Adminhtml"><dir name="Personalization"><dir name="Edit"><file name="Form.php" hash="4a57e3500f8e21447032e142d716946c"/><dir name="Tab"><file name="Form.php" hash="cf84116bb3d6724cbafdc14916f78c62"/></dir><file name="Tabs.php" hash="06d16ee990a56fbd6e2268400772feab"/></dir><file name="Edit.php" hash="787334bc8f66a16f8d063939c0da489f"/><file name="Grid.php" hash="0f17cedaa86e58ae0b18fe61744512d5"/><dir name="PersonalizationMain"><file name="Form.php" hash="bab26099a75e981c3c3a8593432eff21"/><dir name="Renderer"><file name="Name.php" hash="76c202de6f4870b815736513a71f73bc"/><file name="Segmentation.php" hash="f32f20f998822c12a011d243859b6bca"/></dir><dir name="Tab"><file name="Account.php" hash="1e51b893f87100dee9e74e88fa9573c6"/><file name="AdzonesGrid.php" hash="61f6e3770ec8208edd787820759c648d"/><file name="CblockGrid.php" hash="6676d88d296738b4fddf0c22ae82587b"/><file name="Compare.php" hash="171c25462375989ea9b8991b45d51581"/><file name="Dashboard.php" hash="d2c5c6f0b4f17b9feba5360a458ad86b"/><file name="Domain.php" hash="56e2b6c28a7cf775ed724b892fae9245"/><file name="Overview.php" hash="dd8f6e36d4284bca5b9d8d9720ff9259"/></dir><file name="Tabs.php" hash="d8cf2afc99f49bea1857a55e1df105c0"/></dir><file name="PersonalizationMain.php" hash="92b9026b8418fda727330053729b7910"/><file name="Traffic.php" hash="f854760bd22024f9fb8e4609baa67f51"/></dir><file name="Personalization.php" hash="d9280fc032e12f51a6311128339982ab"/></dir><file name="Personalization.php" hash="96fde00606098a72c997461ecee9a3bc"/></dir><dir name="Helper"><file name="Data.php" hash="0793a2b6289c5aef9ad0c3cabd18a552"/><file name="System.php" hash="aa920e680af7769b22ace5b325205da5"/></dir><dir name="Model"><file name="Abtest.php" hash="ffaa6dd4508968789548652a52feeeb0"/><file name="AbtestStatus.php" hash="b6458e427fc8b68cde0b43439d40d726"/><file name="Criteria.php" hash="0a51503c402ae9529e634db44f586574"/><dir name="Mysql4"><dir name="Abtest"><file name="Collection.php" hash="2e3ba2b88e6beb4bf84e311e0dd3f21f"/></dir><file name="Abtest.php" hash="44a23b0760a38694dd15d4569f92854d"/><dir name="Overview"><file name="Collection.php" hash="069e5c0bd37806c8069db70a36c62a1c"/></dir><file name="Overview.php" hash="ce5dbce48fd53012e114fef208ac0f60"/><dir name="Personalization"><file name="Collection.php" hash="1a3d541c4006ae717e2fc7196ce4790f"/></dir><file name="Personalization.php" hash="2b0e6dbfff08f57fda187b9583fee7d9"/><dir name="PersonalizationUrl"><file name="Collection.php" hash="23bbeeb1c234f634047edc6f9d077a15"/></dir><file name="PersonalizationUrl.php" hash="34fbbc6c6d953a3c6726704b515aafef"/><dir name="PersonalizationVisit"><file name="Collection.php" hash="46715be2031ea7b64219cd2e298ef096"/></dir><file name="PersonalizationVisit.php" hash="4b827548fecf0aecc926341611889a22"/><dir name="PersonalizationVisitor"><file name="Collection.php" hash="c768e5f8835785ada3927436817a2ac3"/></dir><file name="PersonalizationVisitor.php" hash="68cb81ccb05da44fa96c0f51fbc59a5a"/></dir><file name="Observer.php" hash="5c2ac788aca6b1406e39b40aed73dc7d"/><file name="Overview.php" hash="a6a7fe74e0c8f25a9c847cc1078f85c3"/><file name="Personalization.php" hash="ebc4998bf25bc0d1e3bc4a8b04e81a40"/><file name="PersonalizationUrl.php" hash="78a789d600e33d21a6007e92fdd3026c"/><file name="PersonalizationVisit.php" hash="04fc380eb6c615dd36efa3b01972f373"/><file name="PersonalizationVisitor.php" hash="7941b43e7aa4b0f5fbeb1ef0198a9102"/><file name="Segmentation.php" hash="39f32558856252ec97ad5f76876e5d78"/><file name="Status.php" hash="8e3dd7398b6a9b86d2d0a929db6cf619"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="PersonalizationController.php" hash="f965ead9541befc4c57b94cc80999b20"/></dir></dir><dir name="etc"><file name="config.xml" hash="2436ae88e7e6e689d5041ed1acbb80ee"/></dir><dir name="sql"><dir name="personalization_setup"><file name="mysql4-install-0.1.0.php" hash="649ba7c1c82e8c22899be37ca6e24fee"/><file name="mysql4-upgrade-0.1.0-0.1.1.php" hash="dd0b40052aefa38993efc9d65cf9dcb8"/><file name="mysql4-upgrade-0.1.1-0.1.2.php" hash="40354c3117030f951e7ed5547e6a10d3"/><file name="mysql4-upgrade-0.1.2-0.1.3.php" hash="9d4b7f6675d58360562fe5202ea58254"/><file name="mysql4-upgrade-0.1.3-0.1.4.php" hash="e76af4566b84e223baf9fc61fd57817c"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Convertware_Adzones.xml" hash="65b4190c09a182c0838d0c95cf4d8cd7"/><file name="Convertware_Personalization.xml" hash="aaa97c06f79b1d347d3c8399f992f1e5"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="adzones.xml" hash="26de4e0252fd87d9a3b5b2c571a2180c"/><file name="personalization.xml" hash="37b51a123a3865818380296b260f6e75"/></dir><dir name="template"><dir name="adzones"><dir name="category"><file name="categories.phtml" hash="9e41d6c8caae7b479990508e651e6b0f"/></dir><dir name="condition"><file name="fieldset.phtml" hash="b09ecf0012109ae4339a615ec29b1152"/></dir><dir name="page"><dir name="edit"><dir name="form"><dir name="renderer"><file name="content.phtml" hash="e819bdcd6c207ab05be363d30cbc316b"/></dir></dir></dir><file name="error.phtml" hash="2aa915a1f8e454801e05ff33d18f4c63"/></dir><dir name="product"><dir name="edit"><file name="serializer.phtml" hash="b12184c01e2c7faed564cfb8cb840aa9"/></dir></dir></dir><dir name="personalization"><dir name="personalization"><file name="compare-traffic.phtml" hash="005278800a5070544761be72382331f3"/><file name="create.phtml" hash="5050e7edd8842b84cb285b5a3a947f6a"/><file name="dashboard.phtml" hash="1ca32208c3cb4ad98b1f4d7c153e41ce"/></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="adzones.xml" hash="c57d157eff7390395e0c5aa72a5eb059"/></dir><dir name="template"><dir name="adzones"><dir name="checkout"><file name="content-top.phtml" hash="b2f1ea5f6d2b4a8bc68c8eb5ba396968"/></dir><file name="content-top.phtml" hash="abe8839438be0a31138ba8a59f116c00"/><dir name="customer"><file name="content-top.phtml" hash="6aee442fb63cdd27a75e87a225df70cd"/></dir><file name="left-bottom.phtml" hash="e67edb82b3519f8d1a54a6ef46c4a78c"/><file name="left-top.phtml" hash="87a43f13ac2ed67de52e0b6d457da148"/><file name="menu-bottom.phtml" hash="591ec425329ed49d5822619bcb9a36cd"/><file name="menu-top.phtml" hash="6e20cbefac929e4ab1414b7164554e2c"/><dir name="page"><dir name="html"><file name="header.phtml" hash="15374052314ef2da51f0c753ca489b58"/></dir></dir><file name="page-bottom.phtml" hash="f00ac821eaa9024637a7bcab73b9d68a"/><file name="right-bottom.phtml" hash="2ec9340477d393c8062d57159f4a261d"/><file name="right-top.phtml" hash="75911ba9ff5da3f22bbc347a21a2a0d0"/></dir></dir></dir></dir></dir></target><target name="mageweb"><dir name="js"><dir name="adzones"><file name="adzones.jquery.min.js" hash="c5b58cbfac36b593ba894ae14921835a"/><file name="adzones.js" hash="364853324a7f39af0f680a02f53a2d58"/><file name="jquery.colorbox-min.js" hash="343f4ac783b347fd60920ad64eca786c"/><file name="jquery.colorbox.js" hash="21b22834236d2a450836ec7c8c2efdb8"/><file name="personalization.js" hash="15d88186332afa0d4b7170607b97aaf6"/></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="adzones"><file name="convertware.css" hash="a16b18d907f9ff6c2ca4a8503db2c488"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="adzones"><file name="adzones.css" hash="de7a623f940826e8c865a2cc233fc38a"/></dir></dir></dir></dir></dir></target></contents>
37
+ <compatible/>
38
+ <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
39
+ </package>
skin/adminhtml/default/default/adzones/convertware.css ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .entry-edit td.td-border{border:1px solid #ff7a01 !important;min-width:250px;}
2
+ .entry-edit table.table-bordering{border-spacing: 10px;}
3
+ .traffic-status-good{float:left;width:100px;height:20px;background-color:#00FF00;border:1px solid #00FF00;color:#fff;}
4
+ .traffic-status-bad{float:left;width:100px;height:20px;background-color:#A52A2A;border:1px solid #A52A2A;color:#fff;}
5
+ .traffic-status-good-indication{float:left;width:15px;height:15px;background-color:#00FF00;border:1px solid #00FF00;color:#fff;margin-top:10px;}
6
+ .traffic-status-bad-indication{float:left;width:15px;height:15px;background-color:#A52A2A;border:1px solid #A52A2A;color:#fff;margin-top:10px;}
7
+ .traffic-type{font-size: 13px;font-weight: 600;}
8
+ .traffic-heading{font-size: 14px;min-width: 150px;padding-top: 20px;white-space: nowrap;}
9
+ .traffic-values{min-width:220px;}
10
+ .traffic-claculate-value{float:left;padding-left:10px; font-size: 12px;font-weight: 600;}
11
+ .traffic-indication{font-size:10px;padding-top:0px;padding-left:10px;font-size:11px;margin-top:10px;}
12
+ .indication-text{margin-left:10px;float:left;margin-top:10px;}
13
+ .indication{min-width: 120px;}
14
+
skin/frontend/base/default/css/adzones/adzones.css ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .adzones{
2
+ z-index:9;
3
+ }
4
+ .adzone-content-menu-top{
5
+
6
+ margin-top: 15px;
7
+ }
8
+ .adzone-content-menu-top .adzone-image-menu-top{
9
+ text-align:center;
10
+ }
11
+ .adzone-content-menu-bottom{
12
+
13
+ margin-top: 15px;
14
+ }
15
+ .adzone-content-menu-bottom .adzone-image-menu-bottom{
16
+ text-align:center;
17
+ }
18
+ .adzone-content-left-sidebar-top{
19
+ margin-top: 15px;
20
+ }
21
+ .adzone-content-left-sidebar-bottom{
22
+ margin-top: 15px;
23
+ }
24
+ .adzone-content-right-sidebar-top{
25
+ margin-top: 15px;
26
+ }
27
+ .adzone-content-right-sidebar-bottom{
28
+ margin-top: 15px;
29
+ }
30
+ .adzone-content-page-bottom{
31
+ margin-top: 15px;
32
+ }
33
+ .adzone-content-customer{
34
+ }
35
+ .adzone-content-checkout{
36
+ }
37
+
38
+ .adzone-image-menu-bottom img{
39
+ }
40
+ .adzone-image-menu-top img{
41
+
42
+ }
43
+ .adzone-image-left-sidebar-top img{
44
+
45
+ }
46
+ .adzone-image-left-sidebar-bottom img{
47
+
48
+ }
49
+ .adzone-image-right-sidebar-top img{
50
+
51
+ }
52
+ .adzone-image-right-sidebar-bottom img{
53
+
54
+ }
55
+ .adzone-image-page-bottom img{
56
+ }
57
+ .adzone-content-menu-top .adzone-image-left-sidebar-top{
58
+ text-align:center;
59
+ }
60
+ .adzone-content-right-sidebar-top .adzone-image-right-sidebar-top{
61
+ text-align:center;
62
+ }
63
+ .adzone-content-right-sidebar-bottom .adzone-image-right-sidebar-bottom{
64
+ text-align:center;
65
+ }
66
+ .adzone-content-left-sidebar-bottom .adzone-image-left-sidebar-bottom{
67
+ text-align:center;
68
+ }
69
+ .adzone-content-page-bottom .adzone-image-page-bottom {
70
+ text-align:center;
71
+ }
72
+