Ad_Manager - Version 1.0.1

Version Notes

Fix package directories issues

Download this release

Release Info

Developer Rohit Goel
Extension Ad_Manager
Version 1.0.1
Comparing to
See all releases


Code changes from version 1.0.0 to 1.0.1

Files changed (38) hide show
  1. app/code/local/Ghrix/Bannercampaign/Block/Adminhtml/Bannercampaign.php +0 -17
  2. app/code/local/Ghrix/Bannercampaign/Block/Adminhtml/Bannercampaign/Edit.php +0 -44
  3. app/code/local/Ghrix/Bannercampaign/Block/Adminhtml/Bannercampaign/Edit/Form.php +0 -17
  4. app/code/local/Ghrix/Bannercampaign/Block/Adminhtml/Bannercampaign/Edit/Tab/Form.php +0 -97
  5. app/code/local/Ghrix/Bannercampaign/Block/Adminhtml/Bannercampaign/Edit/Tabs.php +0 -21
  6. app/code/local/Ghrix/Bannercampaign/Block/Adminhtml/Bannercampaign/Grid.php +0 -140
  7. app/code/local/Ghrix/Bannercampaign/Block/Adminhtml/Bannercampaignbackend.php +0 -5
  8. app/code/local/Ghrix/Bannercampaign/Block/Index.php +0 -8
  9. app/code/local/Ghrix/Bannercampaign/Helper/Data.php +0 -5
  10. app/code/local/Ghrix/Bannercampaign/Model/Bannercampaign.php +0 -12
  11. app/code/local/Ghrix/Bannercampaign/Model/Mysql4/Bannercampaign.php +0 -8
  12. app/code/local/Ghrix/Bannercampaign/Model/Mysql4/Bannercampaign/Collection.php +0 -12
  13. app/code/local/Ghrix/Bannercampaign/controllers/Adminhtml/BannercampaignController.php +0 -210
  14. app/code/local/Ghrix/Bannercampaign/controllers/Adminhtml/BannercampaignbackendController.php +0 -10
  15. app/code/local/Ghrix/Bannercampaign/controllers/IndexController.php +0 -22
  16. app/code/local/Ghrix/Bannercampaign/etc/config.xml +0 -134
  17. app/code/local/Ghrix/Bannercampaign/sql/bannercampaign_setup/mysql4-install-0.1.0.php +0 -26
  18. app/code/local/Ghrix/Campaign/controllers/IndexController.php +2 -70
  19. app/code/local/Ghrix/Campaignmanager/Block/Adminhtml/Campaignmanager.php +0 -17
  20. app/code/local/Ghrix/Campaignmanager/Block/Adminhtml/Campaignmanager/Edit.php +0 -44
  21. app/code/local/Ghrix/Campaignmanager/Block/Adminhtml/Campaignmanager/Edit/Form.php +0 -17
  22. app/code/local/Ghrix/Campaignmanager/Block/Adminhtml/Campaignmanager/Edit/Tab/Form.php +0 -97
  23. app/code/local/Ghrix/Campaignmanager/Block/Adminhtml/Campaignmanager/Edit/Tabs.php +0 -21
  24. app/code/local/Ghrix/Campaignmanager/Block/Adminhtml/Campaignmanager/Grid.php +0 -140
  25. app/code/local/Ghrix/Campaignmanager/Block/Adminhtml/Campaignmanagerbackend.php +0 -5
  26. app/code/local/Ghrix/Campaignmanager/Block/Index.php +0 -8
  27. app/code/local/Ghrix/Campaignmanager/Helper/Data.php +0 -5
  28. app/code/local/Ghrix/Campaignmanager/Model/Campaignmanager.php +0 -12
  29. app/code/local/Ghrix/Campaignmanager/Model/Mysql4/Campaignmanager.php +0 -8
  30. app/code/local/Ghrix/Campaignmanager/Model/Mysql4/Campaignmanager/Collection.php +0 -12
  31. app/code/local/Ghrix/Campaignmanager/controllers/Adminhtml/CampaignmanagerController.php +0 -210
  32. app/code/local/Ghrix/Campaignmanager/controllers/Adminhtml/CampaignmanagerbackendController.php +0 -10
  33. app/code/local/Ghrix/Campaignmanager/controllers/IndexController.php +0 -22
  34. app/code/local/Ghrix/Campaignmanager/etc/config.xml +0 -134
  35. app/design/adminhtml/default/default/layout/campaign.xml +8 -0
  36. app/design/frontend/base/default/template/campaign/index.phtml +1 -0
  37. app/etc/modules/Ghrix_Campaign.xml +10 -0
  38. package.xml +17 -12
app/code/local/Ghrix/Bannercampaign/Block/Adminhtml/Bannercampaign.php DELETED
@@ -1,17 +0,0 @@
1
- <?php
2
-
3
-
4
- class Ghrix_Bannercampaign_Block_Adminhtml_Bannercampaign extends Mage_Adminhtml_Block_Widget_Grid_Container{
5
-
6
- public function __construct()
7
- {
8
-
9
- $this->_controller = "adminhtml_bannercampaign";
10
- $this->_blockGroup = "bannercampaign";
11
- $this->_headerText = Mage::helper("bannercampaign")->__("Bannercampaign Manager");
12
- $this->_addButtonLabel = Mage::helper("bannercampaign")->__("Add New Item");
13
- parent::__construct();
14
-
15
- }
16
-
17
- }
app/code/local/Ghrix/Bannercampaign/Block/Adminhtml/Bannercampaign/Edit.php DELETED
@@ -1,44 +0,0 @@
1
- <?php
2
-
3
- class Ghrix_Bannercampaign_Block_Adminhtml_Bannercampaign_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
4
- {
5
- public function __construct()
6
- {
7
-
8
- parent::__construct();
9
- $this->_objectId = "id";
10
- $this->_blockGroup = "bannercampaign";
11
- $this->_controller = "adminhtml_bannercampaign";
12
- $this->_updateButton("save", "label", Mage::helper("bannercampaign")->__("Save Item"));
13
- $this->_updateButton("delete", "label", Mage::helper("bannercampaign")->__("Delete Item"));
14
-
15
- $this->_addButton("saveandcontinue", array(
16
- "label" => Mage::helper("bannercampaign")->__("Save And Continue Edit"),
17
- "onclick" => "saveAndContinueEdit()",
18
- "class" => "save",
19
- ), -100);
20
-
21
-
22
-
23
- $this->_formScripts[] = "
24
-
25
- function saveAndContinueEdit(){
26
- editForm.submit($('edit_form').action+'back/edit/');
27
- }
28
- ";
29
- }
30
-
31
- public function getHeaderText()
32
- {
33
- if( Mage::registry("bannercampaign_data") && Mage::registry("bannercampaign_data")->getId() ){
34
-
35
- return Mage::helper("bannercampaign")->__("Edit Item '%s'", $this->htmlEscape(Mage::registry("bannercampaign_data")->getId()));
36
-
37
- }
38
- else{
39
-
40
- return Mage::helper("bannercampaign")->__("Add Item");
41
-
42
- }
43
- }
44
- }
app/code/local/Ghrix/Bannercampaign/Block/Adminhtml/Bannercampaign/Edit/Form.php DELETED
@@ -1,17 +0,0 @@
1
- <?php
2
- class Ghrix_Bannercampaign_Block_Adminhtml_Bannercampaign_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
3
- {
4
- protected function _prepareForm()
5
- {
6
- $form = new Varien_Data_Form(array(
7
- "id" => "edit_form",
8
- "action" => $this->getUrl("*/*/save", array("id" => $this->getRequest()->getParam("id"))),
9
- "method" => "post",
10
- "enctype" =>"multipart/form-data",
11
- )
12
- );
13
- $form->setUseContainer(true);
14
- $this->setForm($form);
15
- return parent::_prepareForm();
16
- }
17
- }
app/code/local/Ghrix/Bannercampaign/Block/Adminhtml/Bannercampaign/Edit/Tab/Form.php DELETED
@@ -1,97 +0,0 @@
1
- <?php
2
- class Ghrix_Bannercampaign_Block_Adminhtml_Bannercampaign_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form
3
- {
4
- protected function _prepareForm()
5
- {
6
-
7
- $form = new Varien_Data_Form();
8
- $this->setForm($form);
9
- $fieldset = $form->addFieldset("bannercampaign_form", array("legend"=>Mage::helper("bannercampaign")->__("Item information")));
10
-
11
-
12
- $fieldset->addField("id", "text", array(
13
- "label" => Mage::helper("bannercampaign")->__("id"),
14
- "class" => "required-entry",
15
- "required" => true,
16
- "name" => "id",
17
- ));
18
-
19
- $fieldset->addField("title", "text", array(
20
- "label" => Mage::helper("bannercampaign")->__("title"),
21
- "name" => "title",
22
- ));
23
-
24
- $fieldset->addField("content", "text", array(
25
- "label" => Mage::helper("bannercampaign")->__("content"),
26
- "name" => "content",
27
- ));
28
-
29
- $fieldset->addField("positon", "text", array(
30
- "label" => Mage::helper("bannercampaign")->__("positon"),
31
- "name" => "positon",
32
- ));
33
-
34
- $fieldset->addField('photo', 'image', array(
35
- 'label' => Mage::helper('bannercampaign')->__('photo'),
36
- 'name' => 'photo',
37
- 'note' => '(*.jpg, *.png, *.gif)',
38
- ));
39
- $fieldset->addField("width", "text", array(
40
- "label" => Mage::helper("bannercampaign")->__("width"),
41
- "name" => "width",
42
- ));
43
-
44
- $fieldset->addField("height", "text", array(
45
- "label" => Mage::helper("bannercampaign")->__("height"),
46
- "name" => "height",
47
- ));
48
-
49
- $fieldset->addField('country', 'select', array(
50
- 'label' => Mage::helper('bannercampaign')->__('country'),
51
- 'values' => Ghrix_Bannercampaign_Block_Adminhtml_Bannercampaign_Grid::getValueArray7(),
52
- 'name' => 'country',
53
- ));
54
- $dateFormatIso = Mage::app()->getLocale()->getDateTimeFormat(
55
- Mage_Core_Model_Locale::FORMAT_TYPE_SHORT
56
- );
57
-
58
- $fieldset->addField('startfrom', 'date', array(
59
- 'label' => Mage::helper('bannercampaign')->__('startfrom'),
60
- 'name' => 'startfrom',
61
- 'time' => true,
62
- 'image' => $this->getSkinUrl('images/grid-cal.gif'),
63
- 'format' => $dateFormatIso
64
- ));
65
- $dateFormatIso = Mage::app()->getLocale()->getDateTimeFormat(
66
- Mage_Core_Model_Locale::FORMAT_TYPE_SHORT
67
- );
68
-
69
- $fieldset->addField('startto', 'date', array(
70
- 'label' => Mage::helper('bannercampaign')->__('startto'),
71
- 'name' => 'startto',
72
- 'time' => true,
73
- 'image' => $this->getSkinUrl('images/grid-cal.gif'),
74
- 'format' => $dateFormatIso
75
- ));
76
- $fieldset->addField('whichday', 'multiselect', array(
77
- 'label' => Mage::helper('bannercampaign')->__('whichday'),
78
- 'values' => Ghrix_Bannercampaign_Block_Adminhtml_Bannercampaign_Grid::getValueArray10(),
79
- 'name' => 'whichday',
80
- ));
81
- $fieldset->addField("enable", "text", array(
82
- "label" => Mage::helper("bannercampaign")->__("enable"),
83
- "name" => "enable",
84
- ));
85
-
86
-
87
- if (Mage::getSingleton("adminhtml/session")->getBannercampaignData())
88
- {
89
- $form->setValues(Mage::getSingleton("adminhtml/session")->getBannercampaignData());
90
- Mage::getSingleton("adminhtml/session")->setBannercampaignData(null);
91
- }
92
- elseif(Mage::registry("bannercampaign_data")) {
93
- $form->setValues(Mage::registry("bannercampaign_data")->getData());
94
- }
95
- return parent::_prepareForm();
96
- }
97
- }
app/code/local/Ghrix/Bannercampaign/Block/Adminhtml/Bannercampaign/Edit/Tabs.php DELETED
@@ -1,21 +0,0 @@
1
- <?php
2
- class Ghrix_Bannercampaign_Block_Adminhtml_Bannercampaign_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
3
- {
4
- public function __construct()
5
- {
6
- parent::__construct();
7
- $this->setId("bannercampaign_tabs");
8
- $this->setDestElementId("edit_form");
9
- $this->setTitle(Mage::helper("bannercampaign")->__("Item Information"));
10
- }
11
- protected function _beforeToHtml()
12
- {
13
- $this->addTab("form_section", array(
14
- "label" => Mage::helper("bannercampaign")->__("Item Information"),
15
- "title" => Mage::helper("bannercampaign")->__("Item Information"),
16
- "content" => $this->getLayout()->createBlock("bannercampaign/adminhtml_bannercampaign_edit_tab_form")->toHtml(),
17
- ));
18
- return parent::_beforeToHtml();
19
- }
20
-
21
- }
app/code/local/Ghrix/Bannercampaign/Block/Adminhtml/Bannercampaign/Grid.php DELETED
@@ -1,140 +0,0 @@
1
- <?php
2
-
3
- class Ghrix_Bannercampaign_Block_Adminhtml_Bannercampaign_Grid extends Mage_Adminhtml_Block_Widget_Grid
4
- {
5
-
6
- public function __construct()
7
- {
8
- parent::__construct();
9
- $this->setId("bannercampaignGrid");
10
- $this->setDefaultSort("id");
11
- $this->setDefaultDir("DESC");
12
- $this->setSaveParametersInSession(true);
13
- }
14
-
15
- protected function _prepareCollection()
16
- {
17
- $collection = Mage::getModel("bannercampaign/bannercampaign")->getCollection();
18
- $this->setCollection($collection);
19
- return parent::_prepareCollection();
20
- }
21
- protected function _prepareColumns()
22
- {
23
- $this->addColumn("id", array(
24
- "header" => Mage::helper("bannercampaign")->__("ID"),
25
- "align" =>"right",
26
- "width" => "50px",
27
- "type" => "number",
28
- "index" => "id",
29
- ));
30
-
31
- $this->addColumn("title", array(
32
- "header" => Mage::helper("bannercampaign")->__("title"),
33
- "index" => "title",
34
- ));
35
- $this->addColumn("content", array(
36
- "header" => Mage::helper("bannercampaign")->__("content"),
37
- "index" => "content",
38
- ));
39
- $this->addColumn("positon", array(
40
- "header" => Mage::helper("bannercampaign")->__("positon"),
41
- "index" => "positon",
42
- ));
43
- $this->addColumn("width", array(
44
- "header" => Mage::helper("bannercampaign")->__("width"),
45
- "index" => "width",
46
- ));
47
- $this->addColumn("height", array(
48
- "header" => Mage::helper("bannercampaign")->__("height"),
49
- "index" => "height",
50
- ));
51
- $this->addColumn('country', array(
52
- 'header' => Mage::helper('bannercampaign')->__('country'),
53
- 'index' => 'country',
54
- 'type' => 'options',
55
- 'options'=>Ghrix_Bannercampaign_Block_Adminhtml_Bannercampaign_Grid::getOptionArray7(),
56
- ));
57
-
58
- $this->addColumn('startfrom', array(
59
- 'header' => Mage::helper('bannercampaign')->__('startfrom'),
60
- 'index' => 'startfrom',
61
- 'type' => 'datetime',
62
- ));
63
- $this->addColumn('startto', array(
64
- 'header' => Mage::helper('bannercampaign')->__('startto'),
65
- 'index' => 'startto',
66
- 'type' => 'datetime',
67
- ));
68
- $this->addColumn("enable", array(
69
- "header" => Mage::helper("bannercampaign")->__("enable"),
70
- "index" => "enable",
71
- ));
72
- $this->addExportType('*/*/exportCsv', Mage::helper('sales')->__('CSV'));
73
- $this->addExportType('*/*/exportExcel', Mage::helper('sales')->__('Excel'));
74
-
75
- return parent::_prepareColumns();
76
- }
77
-
78
- public function getRowUrl($row)
79
- {
80
- return $this->getUrl("*/*/edit", array("id" => $row->getId()));
81
- }
82
-
83
-
84
-
85
- protected function _prepareMassaction()
86
- {
87
- $this->setMassactionIdField('id');
88
- $this->getMassactionBlock()->setFormFieldName('ids');
89
- $this->getMassactionBlock()->setUseSelectAll(true);
90
- $this->getMassactionBlock()->addItem('remove_bannercampaign', array(
91
- 'label'=> Mage::helper('bannercampaign')->__('Remove Bannercampaign'),
92
- 'url' => $this->getUrl('*/adminhtml_bannercampaign/massRemove'),
93
- 'confirm' => Mage::helper('bannercampaign')->__('Are you sure?')
94
- ));
95
- return $this;
96
- }
97
-
98
- static public function getOptionArray7()
99
- {
100
- $data_array=array();
101
- $data_array[0]='india';
102
- $data_array[1]='us';
103
- return($data_array);
104
- }
105
- static public function getValueArray7()
106
- {
107
- $data_array=array();
108
- foreach(Ghrix_Bannercampaign_Block_Adminhtml_Bannercampaign_Grid::getOptionArray7() as $k=>$v){
109
- $data_array[]=array('value'=>$k,'label'=>$v);
110
- }
111
- return($data_array);
112
-
113
- }
114
-
115
- static public function getOptionArray10()
116
- {
117
- $data_array=array();
118
- $data_array[0]='weekday';
119
- $data_array[1]='weekend';
120
- $data_array[2]='monday';
121
- $data_array[3]='tuesday';
122
- $data_array[4]='wednesday';
123
- $data_array[5]='thursday';
124
- $data_array[6]='friday';
125
- $data_array[7]='saturday';
126
- $data_array[8]='sunday';
127
- return($data_array);
128
- }
129
- static public function getValueArray10()
130
- {
131
- $data_array=array();
132
- foreach(Ghrix_Bannercampaign_Block_Adminhtml_Bannercampaign_Grid::getOptionArray10() as $k=>$v){
133
- $data_array[]=array('value'=>$k,'label'=>$v);
134
- }
135
- return($data_array);
136
-
137
- }
138
-
139
-
140
- }
app/code/local/Ghrix/Bannercampaign/Block/Adminhtml/Bannercampaignbackend.php DELETED
@@ -1,5 +0,0 @@
1
- <?php
2
-
3
- class Ghrix_Bannercampaign_Block_Adminhtml_Bannercampaignbackend extends Mage_Adminhtml_Block_Template {
4
-
5
- }
app/code/local/Ghrix/Bannercampaign/Block/Index.php DELETED
@@ -1,8 +0,0 @@
1
- <?php
2
- class Ghrix_Bannercampaign_Block_Index extends Mage_Core_Block_Template{
3
-
4
-
5
-
6
-
7
-
8
- }
app/code/local/Ghrix/Bannercampaign/Helper/Data.php DELETED
@@ -1,5 +0,0 @@
1
- <?php
2
- class Ghrix_Bannercampaign_Helper_Data extends Mage_Core_Helper_Abstract
3
- {
4
- }
5
-
app/code/local/Ghrix/Bannercampaign/Model/Bannercampaign.php DELETED
@@ -1,12 +0,0 @@
1
- <?php
2
-
3
- class Ghrix_Bannercampaign_Model_Bannercampaign extends Mage_Core_Model_Abstract
4
- {
5
- protected function _construct(){
6
-
7
- $this->_init("bannercampaign/bannercampaign");
8
-
9
- }
10
-
11
- }
12
-
app/code/local/Ghrix/Bannercampaign/Model/Mysql4/Bannercampaign.php DELETED
@@ -1,8 +0,0 @@
1
- <?php
2
- class Ghrix_Bannercampaign_Model_Mysql4_Bannercampaign extends Mage_Core_Model_Mysql4_Abstract
3
- {
4
- protected function _construct()
5
- {
6
- $this->_init("bannercampaign/bannercampaign", "id");
7
- }
8
- }
app/code/local/Ghrix/Bannercampaign/Model/Mysql4/Bannercampaign/Collection.php DELETED
@@ -1,12 +0,0 @@
1
- <?php
2
- class Ghrix_Bannercampaign_Model_Mysql4_Bannercampaign_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
3
- {
4
-
5
- public function _construct(){
6
- $this->_init("bannercampaign/bannercampaign");
7
- }
8
-
9
-
10
-
11
- }
12
-
app/code/local/Ghrix/Bannercampaign/controllers/Adminhtml/BannercampaignController.php DELETED
@@ -1,210 +0,0 @@
1
- <?php
2
-
3
- class Ghrix_Bannercampaign_Adminhtml_BannercampaignController extends Mage_Adminhtml_Controller_Action
4
- {
5
- protected function _initAction()
6
- {
7
- $this->loadLayout()->_setActiveMenu("bannercampaign/bannercampaign")->_addBreadcrumb(Mage::helper("adminhtml")->__("Bannercampaign Manager"),Mage::helper("adminhtml")->__("Bannercampaign Manager"));
8
- return $this;
9
- }
10
- public function indexAction()
11
- {
12
- $this->_title($this->__("Bannercampaign"));
13
- $this->_title($this->__("Manager Bannercampaign"));
14
-
15
- $this->_initAction();
16
- $this->renderLayout();
17
- }
18
- public function editAction()
19
- {
20
- $this->_title($this->__("Bannercampaign"));
21
- $this->_title($this->__("Bannercampaign"));
22
- $this->_title($this->__("Edit Item"));
23
-
24
- $id = $this->getRequest()->getParam("id");
25
- $model = Mage::getModel("bannercampaign/bannercampaign")->load($id);
26
- if ($model->getId()) {
27
- Mage::register("bannercampaign_data", $model);
28
- $this->loadLayout();
29
- $this->_setActiveMenu("bannercampaign/bannercampaign");
30
- $this->_addBreadcrumb(Mage::helper("adminhtml")->__("Bannercampaign Manager"), Mage::helper("adminhtml")->__("Bannercampaign Manager"));
31
- $this->_addBreadcrumb(Mage::helper("adminhtml")->__("Bannercampaign Description"), Mage::helper("adminhtml")->__("Bannercampaign Description"));
32
- $this->getLayout()->getBlock("head")->setCanLoadExtJs(true);
33
- $this->_addContent($this->getLayout()->createBlock("bannercampaign/adminhtml_bannercampaign_edit"))->_addLeft($this->getLayout()->createBlock("bannercampaign/adminhtml_bannercampaign_edit_tabs"));
34
- $this->renderLayout();
35
- }
36
- else {
37
- Mage::getSingleton("adminhtml/session")->addError(Mage::helper("bannercampaign")->__("Item does not exist."));
38
- $this->_redirect("*/*/");
39
- }
40
- }
41
-
42
- public function newAction()
43
- {
44
-
45
- $this->_title($this->__("Bannercampaign"));
46
- $this->_title($this->__("Bannercampaign"));
47
- $this->_title($this->__("New Item"));
48
-
49
- $id = $this->getRequest()->getParam("id");
50
- $model = Mage::getModel("bannercampaign/bannercampaign")->load($id);
51
-
52
- $data = Mage::getSingleton("adminhtml/session")->getFormData(true);
53
- if (!empty($data)) {
54
- $model->setData($data);
55
- }
56
-
57
- Mage::register("bannercampaign_data", $model);
58
-
59
- $this->loadLayout();
60
- $this->_setActiveMenu("bannercampaign/bannercampaign");
61
-
62
- $this->getLayout()->getBlock("head")->setCanLoadExtJs(true);
63
-
64
- $this->_addBreadcrumb(Mage::helper("adminhtml")->__("Bannercampaign Manager"), Mage::helper("adminhtml")->__("Bannercampaign Manager"));
65
- $this->_addBreadcrumb(Mage::helper("adminhtml")->__("Bannercampaign Description"), Mage::helper("adminhtml")->__("Bannercampaign Description"));
66
-
67
-
68
- $this->_addContent($this->getLayout()->createBlock("bannercampaign/adminhtml_bannercampaign_edit"))->_addLeft($this->getLayout()->createBlock("bannercampaign/adminhtml_bannercampaign_edit_tabs"));
69
-
70
- $this->renderLayout();
71
-
72
- }
73
- public function saveAction()
74
- {
75
-
76
- $post_data=$this->getRequest()->getPost();
77
-
78
-
79
- if ($post_data) {
80
-
81
- try {
82
-
83
-
84
- $post_data['whichday']=implode(',',$post_data['whichday']);
85
- //save image
86
- try{
87
-
88
- if((bool)$post_data['photo']['delete']==1) {
89
-
90
- $post_data['photo']='';
91
-
92
- }
93
- else {
94
-
95
- unset($post_data['photo']);
96
-
97
- if (isset($_FILES)){
98
-
99
- if ($_FILES['photo']['name']) {
100
-
101
- if($this->getRequest()->getParam("id")){
102
- $model = Mage::getModel("bannercampaign/bannercampaign")->load($this->getRequest()->getParam("id"));
103
- if($model->getData('photo')){
104
- $io = new Varien_Io_File();
105
- $io->rm(Mage::getBaseDir('media').DS.implode(DS,explode('/',$model->getData('photo'))));
106
- }
107
- }
108
- $path = Mage::getBaseDir('media') . DS . 'bannercampaign' . DS .'bannercampaign'.DS;
109
- $uploader = new Varien_File_Uploader('photo');
110
- $uploader->setAllowedExtensions(array('jpg','png','gif'));
111
- $uploader->setAllowRenameFiles(false);
112
- $uploader->setFilesDispersion(false);
113
- $destFile = $path.$_FILES['photo']['name'];
114
- $filename = $uploader->getNewFileName($destFile);
115
- $uploader->save($path, $filename);
116
-
117
- $post_data['photo']='bannercampaign/bannercampaign/'.$filename;
118
- }
119
- }
120
- }
121
-
122
- } catch (Exception $e) {
123
- Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
124
- $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
125
- return;
126
- }
127
- //save image
128
-
129
-
130
- $model = Mage::getModel("bannercampaign/bannercampaign")
131
- ->addData($post_data)
132
- ->setId($this->getRequest()->getParam("id"))
133
- ->save();
134
-
135
- Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Bannercampaign was successfully saved"));
136
- Mage::getSingleton("adminhtml/session")->setBannercampaignData(false);
137
-
138
- if ($this->getRequest()->getParam("back")) {
139
- $this->_redirect("*/*/edit", array("id" => $model->getId()));
140
- return;
141
- }
142
- $this->_redirect("*/*/");
143
- return;
144
- }
145
- catch (Exception $e) {
146
- Mage::getSingleton("adminhtml/session")->addError($e->getMessage());
147
- Mage::getSingleton("adminhtml/session")->setBannercampaignData($this->getRequest()->getPost());
148
- $this->_redirect("*/*/edit", array("id" => $this->getRequest()->getParam("id")));
149
- return;
150
- }
151
-
152
- }
153
- $this->_redirect("*/*/");
154
- }
155
-
156
-
157
-
158
- public function deleteAction()
159
- {
160
- if( $this->getRequest()->getParam("id") > 0 ) {
161
- try {
162
- $model = Mage::getModel("bannercampaign/bannercampaign");
163
- $model->setId($this->getRequest()->getParam("id"))->delete();
164
- Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Item was successfully deleted"));
165
- $this->_redirect("*/*/");
166
- }
167
- catch (Exception $e) {
168
- Mage::getSingleton("adminhtml/session")->addError($e->getMessage());
169
- $this->_redirect("*/*/edit", array("id" => $this->getRequest()->getParam("id")));
170
- }
171
- }
172
- $this->_redirect("*/*/");
173
- }
174
-
175
-
176
- public function massRemoveAction()
177
- {
178
- try {
179
- $ids = $this->getRequest()->getPost('ids', array());
180
- foreach ($ids as $id) {
181
- $model = Mage::getModel("bannercampaign/bannercampaign");
182
- $model->setId($id)->delete();
183
- }
184
- Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Item(s) was successfully removed"));
185
- }
186
- catch (Exception $e) {
187
- Mage::getSingleton("adminhtml/session")->addError($e->getMessage());
188
- }
189
- $this->_redirect('*/*/');
190
- }
191
-
192
- /**
193
- * Export order grid to CSV format
194
- */
195
- public function exportCsvAction()
196
- {
197
- $fileName = 'bannercampaign.csv';
198
- $grid = $this->getLayout()->createBlock('bannercampaign/adminhtml_bannercampaign_grid');
199
- $this->_prepareDownloadResponse($fileName, $grid->getCsvFile());
200
- }
201
- /**
202
- * Export order grid to Excel XML format
203
- */
204
- public function exportExcelAction()
205
- {
206
- $fileName = 'bannercampaign.xml';
207
- $grid = $this->getLayout()->createBlock('bannercampaign/adminhtml_bannercampaign_grid');
208
- $this->_prepareDownloadResponse($fileName, $grid->getExcelFile($fileName));
209
- }
210
- }
app/code/local/Ghrix/Bannercampaign/controllers/Adminhtml/BannercampaignbackendController.php DELETED
@@ -1,10 +0,0 @@
1
- <?php
2
- class Ghrix_Bannercampaign_Adminhtml_BannercampaignbackendController extends Mage_Adminhtml_Controller_Action
3
- {
4
- public function indexAction()
5
- {
6
- $this->loadLayout();
7
- $this->_title($this->__("bannercampaign"));
8
- $this->renderLayout();
9
- }
10
- }
app/code/local/Ghrix/Bannercampaign/controllers/IndexController.php DELETED
@@ -1,22 +0,0 @@
1
- <?php
2
- class Ghrix_Bannercampaign_IndexController extends Mage_Core_Controller_Front_Action{
3
- public function IndexAction() {
4
-
5
- $this->loadLayout();
6
- $this->getLayout()->getBlock("head")->setTitle($this->__("Titlename"));
7
- $breadcrumbs = $this->getLayout()->getBlock("breadcrumbs");
8
- $breadcrumbs->addCrumb("home", array(
9
- "label" => $this->__("Home Page"),
10
- "title" => $this->__("Home Page"),
11
- "link" => Mage::getBaseUrl()
12
- ));
13
-
14
- $breadcrumbs->addCrumb("titlename", array(
15
- "label" => $this->__("Titlename"),
16
- "title" => $this->__("Titlename")
17
- ));
18
-
19
- $this->renderLayout();
20
-
21
- }
22
- }
app/code/local/Ghrix/Bannercampaign/etc/config.xml DELETED
@@ -1,134 +0,0 @@
1
- <?xml version="1.0"?>
2
- <config>
3
- <modules>
4
- <Ghrix_Bannercampaign>
5
- <version>0.1.0</version>
6
- </Ghrix_Bannercampaign>
7
- </modules>
8
- <frontend>
9
- <routers>
10
- <bannercampaign>
11
- <use>standard</use>
12
- <args>
13
- <module>Ghrix_Bannercampaign</module>
14
- <frontName>bannercampaign</frontName>
15
- </args>
16
- </bannercampaign>
17
- </routers>
18
- <layout>
19
- <updates>
20
- <bannercampaign>
21
- <file>bannercampaign.xml</file>
22
- </bannercampaign>
23
- </updates>
24
- </layout>
25
- </frontend>
26
- <global>
27
- <helpers>
28
- <bannercampaign>
29
- <class>Ghrix_Bannercampaign_Helper</class>
30
- </bannercampaign>
31
- </helpers>
32
- <blocks>
33
- <bannercampaign>
34
- <class>Ghrix_Bannercampaign_Block</class>
35
- </bannercampaign>
36
- </blocks>
37
- <models>
38
- <bannercampaign>
39
- <class>Ghrix_Bannercampaign_Model</class>
40
- <resourceModel>bannercampaign_mysql4</resourceModel>
41
- </bannercampaign>
42
- <bannercampaign_mysql4>
43
- <class>Ghrix_Bannercampaign_Model_Mysql4</class>
44
- <entities>
45
- <bannercampaign>
46
- <table>bannercampaign</table>
47
- </bannercampaign>
48
- </entities>
49
- </bannercampaign_mysql4>
50
- </models>
51
- <resources>
52
- <bannercampaign_setup>
53
- <setup>
54
- <module>Ghrix_Bannercampaign</module>
55
- </setup>
56
- <connection>
57
- <use>core_setup</use>
58
- </connection>
59
- </bannercampaign_setup>
60
- <bannercampaign_write>
61
- <connection>
62
- <use>core_write</use>
63
- </connection>
64
- </bannercampaign_write>
65
- <bannercampaign_read>
66
- <connection>
67
- <use>core_read</use>
68
- </connection>
69
- </bannercampaign_read>
70
- </resources>
71
- </global>
72
- <admin>
73
- <routers>
74
- <bannercampaign>
75
- <use>admin</use>
76
- <args>
77
- <module>Ghrix_Bannercampaign</module>
78
- <frontName>admin_bannercampaign</frontName>
79
- </args>
80
- </bannercampaign>
81
- </routers>
82
- </admin>
83
- <adminhtml>
84
- <menu>
85
- <bannercampaign module="bannercampaign">
86
- <title>Bannercampaign</title>
87
- <sort_order>100</sort_order>
88
- <children>
89
- <bannercampaignbackend module="bannercampaign">
90
- <title>bannercampaign</title>
91
- <sort_order>0</sort_order>
92
- <action>admin_bannercampaign/adminhtml_bannercampaignbackend</action>
93
- </bannercampaignbackend>
94
- <bannercampaign module="bannercampaign">
95
- <title>Manage Bannercampaign</title>
96
- <sort_order>0</sort_order>
97
- <action>admin_bannercampaign/adminhtml_bannercampaign</action>
98
- </bannercampaign>
99
- </children>
100
- </bannercampaign>
101
- </menu>
102
- <acl>
103
- <resources>
104
- <all>
105
- <title>Allow Everything</title>
106
- </all>
107
- <admin>
108
- <children>
109
- <bannercampaign translate="title" module="bannercampaign">
110
- <title>Bannercampaign</title>
111
- <sort_order>1000</sort_order>
112
- <children>
113
- <bannercampaignbackend translate="title">
114
- <title>bannercampaign</title>
115
- </bannercampaignbackend>
116
- <bannercampaign translate="title">
117
- <title>Manage Bannercampaign</title>
118
- <sort_order>0</sort_order>
119
- </bannercampaign>
120
- </children>
121
- </bannercampaign>
122
- </children>
123
- </admin>
124
- </resources>
125
- </acl>
126
- <layout>
127
- <updates>
128
- <bannercampaign>
129
- <file>bannercampaign.xml</file>
130
- </bannercampaign>
131
- </updates>
132
- </layout>
133
- </adminhtml>
134
- </config>
app/code/local/Ghrix/Bannercampaign/sql/bannercampaign_setup/mysql4-install-0.1.0.php DELETED
@@ -1,26 +0,0 @@
1
- <?php
2
- $installer = $this;
3
- $installer->startSetup();
4
- $sql=<<<SQLTEXT
5
- create table bannercampaign(id int not null auto_increment,
6
- title varchar(100),
7
- positon varchar(100),
8
- content varchar(100),
9
- photo varchar(100),
10
- width varchar(100),
11
- height varchar(100),
12
- country varchar(100),
13
- startfrom varchar(100),
14
- startto varchar(100),
15
- whichday varchar(100),
16
- enable varchar(100),
17
- primary key(id));
18
-
19
- SQLTEXT;
20
-
21
- $installer->run($sql);
22
- //demo
23
- //Mage::getModel('core/url_rewrite')->setId(null);
24
- //demo
25
- $installer->endSetup();
26
-
app/code/local/Ghrix/Campaign/controllers/IndexController.php CHANGED
@@ -1,76 +1,8 @@
1
<?php
2
class Ghrix_Campaign_IndexController extends Mage_Core_Controller_Front_Action{
3
public function IndexAction() {
4
- $usercurrent_country = $this->getLocationInfoByIp();
5
-
6
- $collection = Mage::getModel("campaign/campaign")->getCollection()->addFieldToFilter("positon", 'content')
7
- ->addFieldToFilter("enable", "1")
8
- // ->addFieldToFilter("id", "2")
9
-
10
- ->addOrder('pos','DES');
11
-
12
- foreach ($collection as $collectiondta)
13
- {
14
-
15
- $getcountry = explode(',' , $collectiondta->getData('country'));
16
-
17
- if(is_array($getcountry)){
18
- $country = explode(',' , $collectiondta->getData('country')) ;
19
- }else{
20
- $country['0'] = $collectiondta->getData('country') ;
21
- }
22
- $imagestartfrom = strtotime($collectiondta->getData('startfrom'));
23
- $imagestartto = strtotime($collectiondta->getData('startto'));
24
- echo "<br/>";
25
- $today_day = strtolower(date( "l")); // get current day
26
- $today_date = time();
27
- //echo "<br/>";
28
-
29
- // to get days from the ids storre in the db
30
- $imagewhichday = explode(',' , $collectiondta->getData('whichday'));
31
- $dayasarray = Ghrix_Campaign_Block_Adminhtml_Campaign_Grid::getOptionArray10(); // get defined whichdays arrays
32
- $array_new = [];
33
- foreach($imagewhichday as $key)
34
- {
35
- if(array_key_exists($key, $dayasarray))
36
- {
37
- $array_new[$key] = $dayasarray[$key];
38
- }
39
- }
40
- // end to get days from the ids storre in the db
41
- print_r($usercurrent_country);
42
- if(in_array($today_day ,$array_new)){
43
- if($today_date >= $imagestartfrom && $today_date <= $imagestartto)
44
- {
45
- if(in_array($usercurrent_country , $country)) {
46
- print_r($usercurrent_country);
47
-
48
- echo $collectiondta->getData('title')."<br><img height =".$collectiondta->getData('height')." width = ".$collectiondta->getData('width')." src = ".Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).$collectiondta->getData('photo')."><br/>".$collectiondta->getData('content')."<br/> ";
49
- }
50
- }
51
- }
52
}
53
- }
54
-
55
- public function getLocationInfoByIp(){
56
- $client = @$_SERVER['HTTP_CLIENT_IP'];
57
- $forward = @$_SERVER['HTTP_X_FORWARDED_FOR'];
58
- $remote = @$_SERVER['REMOTE_ADDR'];
59
- $result = array('country'=>'', 'city'=>'');
60
- if(filter_var($client, FILTER_VALIDATE_IP)){
61
- $ip = $client;
62
- }elseif(filter_var($forward, FILTER_VALIDATE_IP)){
63
- $ip = $forward;
64
- }else{
65
- $ip = $remote;
66
- }
67
- $ip_data = @json_decode(file_get_contents("http://www.geoplugin.net/json.gp?ip=".$ip));
68
- if($ip_data && $ip_data->geoplugin_countryName != null){
69
- $result['country'] = $ip_data->geoplugin_countryCode;
70
- $result['city'] = $ip_data->geoplugin_city;
71
- }
72
- return $result['country'];
73
- }
74
-
75
76
}
1
<?php
2
class Ghrix_Campaign_IndexController extends Mage_Core_Controller_Front_Action{
3
public function IndexAction() {
4
+
5
}
6
7
+
8
}
app/code/local/Ghrix/Campaignmanager/Block/Adminhtml/Campaignmanager.php DELETED
@@ -1,17 +0,0 @@
1
- <?php
2
-
3
-
4
- class Ghrix_Campaignmanager_Block_Adminhtml_Campaignmanager extends Mage_Adminhtml_Block_Widget_Grid_Container{
5
-
6
- public function __construct()
7
- {
8
-
9
- $this->_controller = "adminhtml_campaignmanager";
10
- $this->_blockGroup = "campaignmanager";
11
- $this->_headerText = Mage::helper("campaignmanager")->__("Campaignmanager Manager");
12
- $this->_addButtonLabel = Mage::helper("campaignmanager")->__("Add New Item");
13
- parent::__construct();
14
-
15
- }
16
-
17
- }
app/code/local/Ghrix/Campaignmanager/Block/Adminhtml/Campaignmanager/Edit.php DELETED
@@ -1,44 +0,0 @@
1
- <?php
2
-
3
- class Ghrix_Campaignmanager_Block_Adminhtml_Campaignmanager_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
4
- {
5
- public function __construct()
6
- {
7
-
8
- parent::__construct();
9
- $this->_objectId = "id";
10
- $this->_blockGroup = "campaignmanager";
11
- $this->_controller = "adminhtml_campaignmanager";
12
- $this->_updateButton("save", "label", Mage::helper("campaignmanager")->__("Save Item"));
13
- $this->_updateButton("delete", "label", Mage::helper("campaignmanager")->__("Delete Item"));
14
-
15
- $this->_addButton("saveandcontinue", array(
16
- "label" => Mage::helper("campaignmanager")->__("Save And Continue Edit"),
17
- "onclick" => "saveAndContinueEdit()",
18
- "class" => "save",
19
- ), -100);
20
-
21
-
22
-
23
- $this->_formScripts[] = "
24
-
25
- function saveAndContinueEdit(){
26
- editForm.submit($('edit_form').action+'back/edit/');
27
- }
28
- ";
29
- }
30
-
31
- public function getHeaderText()
32
- {
33
- if( Mage::registry("campaignmanager_data") && Mage::registry("campaignmanager_data")->getId() ){
34
-
35
- return Mage::helper("campaignmanager")->__("Edit Item '%s'", $this->htmlEscape(Mage::registry("campaignmanager_data")->getId()));
36
-
37
- }
38
- else{
39
-
40
- return Mage::helper("campaignmanager")->__("Add Item");
41
-
42
- }
43
- }
44
- }
app/code/local/Ghrix/Campaignmanager/Block/Adminhtml/Campaignmanager/Edit/Form.php DELETED
@@ -1,17 +0,0 @@
1
- <?php
2
- class Ghrix_Campaignmanager_Block_Adminhtml_Campaignmanager_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
3
- {
4
- protected function _prepareForm()
5
- {
6
- $form = new Varien_Data_Form(array(
7
- "id" => "edit_form",
8
- "action" => $this->getUrl("*/*/save", array("id" => $this->getRequest()->getParam("id"))),
9
- "method" => "post",
10
- "enctype" =>"multipart/form-data",
11
- )
12
- );
13
- $form->setUseContainer(true);
14
- $this->setForm($form);
15
- return parent::_prepareForm();
16
- }
17
- }
app/code/local/Ghrix/Campaignmanager/Block/Adminhtml/Campaignmanager/Edit/Tab/Form.php DELETED
@@ -1,97 +0,0 @@
1
- <?php
2
- class Ghrix_Campaignmanager_Block_Adminhtml_Campaignmanager_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form
3
- {
4
- protected function _prepareForm()
5
- {
6
-
7
- $form = new Varien_Data_Form();
8
- $this->setForm($form);
9
- $fieldset = $form->addFieldset("campaignmanager_form", array("legend"=>Mage::helper("campaignmanager")->__("Item information")));
10
-
11
-
12
- $fieldset->addField("id", "text", array(
13
- "label" => Mage::helper("campaignmanager")->__("id"),
14
- "class" => "required-entry",
15
- "required" => true,
16
- "name" => "id",
17
- ));
18
-
19
- $fieldset->addField("title", "text", array(
20
- "label" => Mage::helper("campaignmanager")->__("title"),
21
- "name" => "title",
22
- ));
23
-
24
- $fieldset->addField("content", "text", array(
25
- "label" => Mage::helper("campaignmanager")->__("content"),
26
- "name" => "content",
27
- ));
28
-
29
- $fieldset->addField("positon", "text", array(
30
- "label" => Mage::helper("campaignmanager")->__("positon"),
31
- "name" => "positon",
32
- ));
33
-
34
- $fieldset->addField('photo', 'image', array(
35
- 'label' => Mage::helper('campaignmanager')->__('photo'),
36
- 'name' => 'photo',
37
- 'note' => '(*.jpg, *.png, *.gif)',
38
- ));
39
- $fieldset->addField("width", "text", array(
40
- "label" => Mage::helper("campaignmanager")->__("width"),
41
- "name" => "width",
42
- ));
43
-
44
- $fieldset->addField("height", "text", array(
45
- "label" => Mage::helper("campaignmanager")->__("height"),
46
- "name" => "height",
47
- ));
48
-
49
- $fieldset->addField('country', 'select', array(
50
- 'label' => Mage::helper('campaignmanager')->__('country'),
51
- 'values' => Ghrix_Campaignmanager_Block_Adminhtml_Campaignmanager_Grid::getValueArray7(),
52
- 'name' => 'country',
53
- ));
54
- $dateFormatIso = Mage::app()->getLocale()->getDateTimeFormat(
55
- Mage_Core_Model_Locale::FORMAT_TYPE_SHORT
56
- );
57
-
58
- $fieldset->addField('startfrom', 'date', array(
59
- 'label' => Mage::helper('campaignmanager')->__('startfrom'),
60
- 'name' => 'startfrom',
61
- 'time' => true,
62
- 'image' => $this->getSkinUrl('images/grid-cal.gif'),
63
- 'format' => $dateFormatIso
64
- ));
65
- $dateFormatIso = Mage::app()->getLocale()->getDateTimeFormat(
66
- Mage_Core_Model_Locale::FORMAT_TYPE_SHORT
67
- );
68
-
69
- $fieldset->addField('startto', 'date', array(
70
- 'label' => Mage::helper('campaignmanager')->__('startto'),
71
- 'name' => 'startto',
72
- 'time' => true,
73
- 'image' => $this->getSkinUrl('images/grid-cal.gif'),
74
- 'format' => $dateFormatIso
75
- ));
76
- $fieldset->addField('whichday', 'multiselect', array(
77
- 'label' => Mage::helper('campaignmanager')->__('whichday'),
78
- 'values' => Ghrix_Campaignmanager_Block_Adminhtml_Campaignmanager_Grid::getValueArray10(),
79
- 'name' => 'whichday',
80
- ));
81
- $fieldset->addField("enable", "text", array(
82
- "label" => Mage::helper("campaignmanager")->__("enable"),
83
- "name" => "enable",
84
- ));
85
-
86
-
87
- if (Mage::getSingleton("adminhtml/session")->getCampaignmanagerData())
88
- {
89
- $form->setValues(Mage::getSingleton("adminhtml/session")->getCampaignmanagerData());
90
- Mage::getSingleton("adminhtml/session")->setCampaignmanagerData(null);
91
- }
92
- elseif(Mage::registry("campaignmanager_data")) {
93
- $form->setValues(Mage::registry("campaignmanager_data")->getData());
94
- }
95
- return parent::_prepareForm();
96
- }
97
- }
app/code/local/Ghrix/Campaignmanager/Block/Adminhtml/Campaignmanager/Edit/Tabs.php DELETED
@@ -1,21 +0,0 @@
1
- <?php
2
- class Ghrix_Campaignmanager_Block_Adminhtml_Campaignmanager_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
3
- {
4
- public function __construct()
5
- {
6
- parent::__construct();
7
- $this->setId("campaignmanager_tabs");
8
- $this->setDestElementId("edit_form");
9
- $this->setTitle(Mage::helper("campaignmanager")->__("Item Information"));
10
- }
11
- protected function _beforeToHtml()
12
- {
13
- $this->addTab("form_section", array(
14
- "label" => Mage::helper("campaignmanager")->__("Item Information"),
15
- "title" => Mage::helper("campaignmanager")->__("Item Information"),
16
- "content" => $this->getLayout()->createBlock("campaignmanager/adminhtml_campaignmanager_edit_tab_form")->toHtml(),
17
- ));
18
- return parent::_beforeToHtml();
19
- }
20
-
21
- }
app/code/local/Ghrix/Campaignmanager/Block/Adminhtml/Campaignmanager/Grid.php DELETED
@@ -1,140 +0,0 @@
1
- <?php
2
-
3
- class Ghrix_Campaignmanager_Block_Adminhtml_Campaignmanager_Grid extends Mage_Adminhtml_Block_Widget_Grid
4
- {
5
-
6
- public function __construct()
7
- {
8
- parent::__construct();
9
- $this->setId("campaignmanagerGrid");
10
- $this->setDefaultSort("id");
11
- $this->setDefaultDir("DESC");
12
- $this->setSaveParametersInSession(true);
13
- }
14
-
15
- protected function _prepareCollection()
16
- {
17
- $collection = Mage::getModel("campaignmanager/campaignmanager")->getCollection();
18
- $this->setCollection($collection);
19
- return parent::_prepareCollection();
20
- }
21
- protected function _prepareColumns()
22
- {
23
- $this->addColumn("id", array(
24
- "header" => Mage::helper("campaignmanager")->__("ID"),
25
- "align" =>"right",
26
- "width" => "50px",
27
- "type" => "number",
28
- "index" => "id",
29
- ));
30
-
31
- $this->addColumn("title", array(
32
- "header" => Mage::helper("campaignmanager")->__("title"),
33
- "index" => "title",
34
- ));
35
- $this->addColumn("content", array(
36
- "header" => Mage::helper("campaignmanager")->__("content"),
37
- "index" => "content",
38
- ));
39
- $this->addColumn("positon", array(
40
- "header" => Mage::helper("campaignmanager")->__("positon"),
41
- "index" => "positon",
42
- ));
43
- $this->addColumn("width", array(
44
- "header" => Mage::helper("campaignmanager")->__("width"),
45
- "index" => "width",
46
- ));
47
- $this->addColumn("height", array(
48
- "header" => Mage::helper("campaignmanager")->__("height"),
49
- "index" => "height",
50
- ));
51
- $this->addColumn('country', array(
52
- 'header' => Mage::helper('campaignmanager')->__('country'),
53
- 'index' => 'country',
54
- 'type' => 'options',
55
- 'options'=>Ghrix_Campaignmanager_Block_Adminhtml_Campaignmanager_Grid::getOptionArray7(),
56
- ));
57
-
58
- $this->addColumn('startfrom', array(
59
- 'header' => Mage::helper('campaignmanager')->__('startfrom'),
60
- 'index' => 'startfrom',
61
- 'type' => 'datetime',
62
- ));
63
- $this->addColumn('startto', array(
64
- 'header' => Mage::helper('campaignmanager')->__('startto'),
65
- 'index' => 'startto',
66
- 'type' => 'datetime',
67
- ));
68
- $this->addColumn("enable", array(
69
- "header" => Mage::helper("campaignmanager")->__("enable"),
70
- "index" => "enable",
71
- ));
72
- $this->addExportType('*/*/exportCsv', Mage::helper('sales')->__('CSV'));
73
- $this->addExportType('*/*/exportExcel', Mage::helper('sales')->__('Excel'));
74
-
75
- return parent::_prepareColumns();
76
- }
77
-
78
- public function getRowUrl($row)
79
- {
80
- return $this->getUrl("*/*/edit", array("id" => $row->getId()));
81
- }
82
-
83
-
84
-
85
- protected function _prepareMassaction()
86
- {
87
- $this->setMassactionIdField('id');
88
- $this->getMassactionBlock()->setFormFieldName('ids');
89
- $this->getMassactionBlock()->setUseSelectAll(true);
90
- $this->getMassactionBlock()->addItem('remove_campaignmanager', array(
91
- 'label'=> Mage::helper('campaignmanager')->__('Remove Campaignmanager'),
92
- 'url' => $this->getUrl('*/adminhtml_campaignmanager/massRemove'),
93
- 'confirm' => Mage::helper('campaignmanager')->__('Are you sure?')
94
- ));
95
- return $this;
96
- }
97
-
98
- static public function getOptionArray7()
99
- {
100
- $data_array=array();
101
- $data_array[0]='india';
102
- $data_array[1]='us';
103
- return($data_array);
104
- }
105
- static public function getValueArray7()
106
- {
107
- $data_array=array();
108
- foreach(Ghrix_Campaignmanager_Block_Adminhtml_Campaignmanager_Grid::getOptionArray7() as $k=>$v){
109
- $data_array[]=array('value'=>$k,'label'=>$v);
110
- }
111
- return($data_array);
112
-
113
- }
114
-
115
- static public function getOptionArray10()
116
- {
117
- $data_array=array();
118
- $data_array[0]='weekday';
119
- $data_array[1]='weekend';
120
- $data_array[2]='monday';
121
- $data_array[3]='tuesday';
122
- $data_array[4]='wednesday';
123
- $data_array[5]='thursday';
124
- $data_array[6]='friday';
125
- $data_array[7]='saturday';
126
- $data_array[8]='sunday';
127
- return($data_array);
128
- }
129
- static public function getValueArray10()
130
- {
131
- $data_array=array();
132
- foreach(Ghrix_Campaignmanager_Block_Adminhtml_Campaignmanager_Grid::getOptionArray10() as $k=>$v){
133
- $data_array[]=array('value'=>$k,'label'=>$v);
134
- }
135
- return($data_array);
136
-
137
- }
138
-
139
-
140
- }
app/code/local/Ghrix/Campaignmanager/Block/Adminhtml/Campaignmanagerbackend.php DELETED
@@ -1,5 +0,0 @@
1
- <?php
2
-
3
- class Ghrix_Campaignmanager_Block_Adminhtml_Campaignmanagerbackend extends Mage_Adminhtml_Block_Template {
4
-
5
- }
app/code/local/Ghrix/Campaignmanager/Block/Index.php DELETED
@@ -1,8 +0,0 @@
1
- <?php
2
- class Ghrix_Campaignmanager_Block_Index extends Mage_Core_Block_Template{
3
-
4
-
5
-
6
-
7
-
8
- }
app/code/local/Ghrix/Campaignmanager/Helper/Data.php DELETED
@@ -1,5 +0,0 @@
1
- <?php
2
- class Ghrix_Campaignmanager_Helper_Data extends Mage_Core_Helper_Abstract
3
- {
4
- }
5
-
app/code/local/Ghrix/Campaignmanager/Model/Campaignmanager.php DELETED
@@ -1,12 +0,0 @@
1
- <?php
2
-
3
- class Ghrix_Campaignmanager_Model_Campaignmanager extends Mage_Core_Model_Abstract
4
- {
5
- protected function _construct(){
6
-
7
- $this->_init("campaignmanager/campaignmanager");
8
-
9
- }
10
-
11
- }
12
-
app/code/local/Ghrix/Campaignmanager/Model/Mysql4/Campaignmanager.php DELETED
@@ -1,8 +0,0 @@
1
- <?php
2
- class Ghrix_Campaignmanager_Model_Mysql4_Campaignmanager extends Mage_Core_Model_Mysql4_Abstract
3
- {
4
- protected function _construct()
5
- {
6
- $this->_init("campaignmanager/campaignmanager", "id");
7
- }
8
- }
app/code/local/Ghrix/Campaignmanager/Model/Mysql4/Campaignmanager/Collection.php DELETED
@@ -1,12 +0,0 @@
1
- <?php
2
- class Ghrix_Campaignmanager_Model_Mysql4_Campaignmanager_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
3
- {
4
-
5
- public function _construct(){
6
- $this->_init("campaignmanager/campaignmanager");
7
- }
8
-
9
-
10
-
11
- }
12
-
app/code/local/Ghrix/Campaignmanager/controllers/Adminhtml/CampaignmanagerController.php DELETED
@@ -1,210 +0,0 @@
1
- <?php
2
-
3
- class Ghrix_Campaignmanager_Adminhtml_CampaignmanagerController extends Mage_Adminhtml_Controller_Action
4
- {
5
- protected function _initAction()
6
- {
7
- $this->loadLayout()->_setActiveMenu("campaignmanager/campaignmanager")->_addBreadcrumb(Mage::helper("adminhtml")->__("Campaignmanager Manager"),Mage::helper("adminhtml")->__("Campaignmanager Manager"));
8
- return $this;
9
- }
10
- public function indexAction()
11
- {
12
- $this->_title($this->__("Campaignmanager"));
13
- $this->_title($this->__("Manager Campaignmanager"));
14
-
15
- $this->_initAction();
16
- $this->renderLayout();
17
- }
18
- public function editAction()
19
- {
20
- $this->_title($this->__("Campaignmanager"));
21
- $this->_title($this->__("Campaignmanager"));
22
- $this->_title($this->__("Edit Item"));
23
-
24
- $id = $this->getRequest()->getParam("id");
25
- $model = Mage::getModel("campaignmanager/campaignmanager")->load($id);
26
- if ($model->getId()) {
27
- Mage::register("campaignmanager_data", $model);
28
- $this->loadLayout();
29
- $this->_setActiveMenu("campaignmanager/campaignmanager");
30
- $this->_addBreadcrumb(Mage::helper("adminhtml")->__("Campaignmanager Manager"), Mage::helper("adminhtml")->__("Campaignmanager Manager"));
31
- $this->_addBreadcrumb(Mage::helper("adminhtml")->__("Campaignmanager Description"), Mage::helper("adminhtml")->__("Campaignmanager Description"));
32
- $this->getLayout()->getBlock("head")->setCanLoadExtJs(true);
33
- $this->_addContent($this->getLayout()->createBlock("campaignmanager/adminhtml_campaignmanager_edit"))->_addLeft($this->getLayout()->createBlock("campaignmanager/adminhtml_campaignmanager_edit_tabs"));
34
- $this->renderLayout();
35
- }
36
- else {
37
- Mage::getSingleton("adminhtml/session")->addError(Mage::helper("campaignmanager")->__("Item does not exist."));
38
- $this->_redirect("*/*/");
39
- }
40
- }
41
-
42
- public function newAction()
43
- {
44
-
45
- $this->_title($this->__("Campaignmanager"));
46
- $this->_title($this->__("Campaignmanager"));
47
- $this->_title($this->__("New Item"));
48
-
49
- $id = $this->getRequest()->getParam("id");
50
- $model = Mage::getModel("campaignmanager/campaignmanager")->load($id);
51
-
52
- $data = Mage::getSingleton("adminhtml/session")->getFormData(true);
53
- if (!empty($data)) {
54
- $model->setData($data);
55
- }
56
-
57
- Mage::register("campaignmanager_data", $model);
58
-
59
- $this->loadLayout();
60
- $this->_setActiveMenu("campaignmanager/campaignmanager");
61
-
62
- $this->getLayout()->getBlock("head")->setCanLoadExtJs(true);
63
-
64
- $this->_addBreadcrumb(Mage::helper("adminhtml")->__("Campaignmanager Manager"), Mage::helper("adminhtml")->__("Campaignmanager Manager"));
65
- $this->_addBreadcrumb(Mage::helper("adminhtml")->__("Campaignmanager Description"), Mage::helper("adminhtml")->__("Campaignmanager Description"));
66
-
67
-
68
- $this->_addContent($this->getLayout()->createBlock("campaignmanager/adminhtml_campaignmanager_edit"))->_addLeft($this->getLayout()->createBlock("campaignmanager/adminhtml_campaignmanager_edit_tabs"));
69
-
70
- $this->renderLayout();
71
-
72
- }
73
- public function saveAction()
74
- {
75
-
76
- $post_data=$this->getRequest()->getPost();
77
-
78
-
79
- if ($post_data) {
80
-
81
- try {
82
-
83
-
84
- $post_data['whichday']=implode(',',$post_data['whichday']);
85
- //save image
86
- try{
87
-
88
- if((bool)$post_data['photo']['delete']==1) {
89
-
90
- $post_data['photo']='';
91
-
92
- }
93
- else {
94
-
95
- unset($post_data['photo']);
96
-
97
- if (isset($_FILES)){
98
-
99
- if ($_FILES['photo']['name']) {
100
-
101
- if($this->getRequest()->getParam("id")){
102
- $model = Mage::getModel("campaignmanager/campaignmanager")->load($this->getRequest()->getParam("id"));
103
- if($model->getData('photo')){
104
- $io = new Varien_Io_File();
105
- $io->rm(Mage::getBaseDir('media').DS.implode(DS,explode('/',$model->getData('photo'))));
106
- }
107
- }
108
- $path = Mage::getBaseDir('media') . DS . 'campaignmanager' . DS .'campaignmanager'.DS;
109
- $uploader = new Varien_File_Uploader('photo');
110
- $uploader->setAllowedExtensions(array('jpg','png','gif'));
111
- $uploader->setAllowRenameFiles(false);
112
- $uploader->setFilesDispersion(false);
113
- $destFile = $path.$_FILES['photo']['name'];
114
- $filename = $uploader->getNewFileName($destFile);
115
- $uploader->save($path, $filename);
116
-
117
- $post_data['photo']='campaignmanager/campaignmanager/'.$filename;
118
- }
119
- }
120
- }
121
-
122
- } catch (Exception $e) {
123
- Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
124
- $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
125
- return;
126
- }
127
- //save image
128
-
129
-
130
- $model = Mage::getModel("campaignmanager/campaignmanager")
131
- ->addData($post_data)
132
- ->setId($this->getRequest()->getParam("id"))
133
- ->save();
134
-
135
- Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Campaignmanager was successfully saved"));
136
- Mage::getSingleton("adminhtml/session")->setCampaignmanagerData(false);
137
-
138
- if ($this->getRequest()->getParam("back")) {
139
- $this->_redirect("*/*/edit", array("id" => $model->getId()));
140
- return;
141
- }
142
- $this->_redirect("*/*/");
143
- return;
144
- }
145
- catch (Exception $e) {
146
- Mage::getSingleton("adminhtml/session")->addError($e->getMessage());
147
- Mage::getSingleton("adminhtml/session")->setCampaignmanagerData($this->getRequest()->getPost());
148
- $this->_redirect("*/*/edit", array("id" => $this->getRequest()->getParam("id")));
149
- return;
150
- }
151
-
152
- }
153
- $this->_redirect("*/*/");
154
- }
155
-
156
-
157
-
158
- public function deleteAction()
159
- {
160
- if( $this->getRequest()->getParam("id") > 0 ) {
161
- try {
162
- $model = Mage::getModel("campaignmanager/campaignmanager");
163
- $model->setId($this->getRequest()->getParam("id"))->delete();
164
- Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Item was successfully deleted"));
165
- $this->_redirect("*/*/");
166
- }
167
- catch (Exception $e) {
168
- Mage::getSingleton("adminhtml/session")->addError($e->getMessage());
169
- $this->_redirect("*/*/edit", array("id" => $this->getRequest()->getParam("id")));
170
- }
171
- }
172
- $this->_redirect("*/*/");
173
- }
174
-
175
-
176
- public function massRemoveAction()
177
- {
178
- try {
179
- $ids = $this->getRequest()->getPost('ids', array());
180
- foreach ($ids as $id) {
181
- $model = Mage::getModel("campaignmanager/campaignmanager");
182
- $model->setId($id)->delete();
183
- }
184
- Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Item(s) was successfully removed"));
185
- }
186
- catch (Exception $e) {
187
- Mage::getSingleton("adminhtml/session")->addError($e->getMessage());
188
- }
189
- $this->_redirect('*/*/');
190
- }
191
-
192
- /**
193
- * Export order grid to CSV format
194
- */
195
- public function exportCsvAction()
196
- {
197
- $fileName = 'campaignmanager.csv';
198
- $grid = $this->getLayout()->createBlock('campaignmanager/adminhtml_campaignmanager_grid');
199
- $this->_prepareDownloadResponse($fileName, $grid->getCsvFile());
200
- }
201
- /**
202
- * Export order grid to Excel XML format
203
- */
204
- public function exportExcelAction()
205
- {
206
- $fileName = 'campaignmanager.xml';
207
- $grid = $this->getLayout()->createBlock('campaignmanager/adminhtml_campaignmanager_grid');
208
- $this->_prepareDownloadResponse($fileName, $grid->getExcelFile($fileName));
209
- }
210
- }
app/code/local/Ghrix/Campaignmanager/controllers/Adminhtml/CampaignmanagerbackendController.php DELETED
@@ -1,10 +0,0 @@
1
- <?php
2
- class Ghrix_Campaignmanager_Adminhtml_CampaignmanagerbackendController extends Mage_Adminhtml_Controller_Action
3
- {
4
- public function indexAction()
5
- {
6
- $this->loadLayout();
7
- $this->_title($this->__("Campaignmanager"));
8
- $this->renderLayout();
9
- }
10
- }
app/code/local/Ghrix/Campaignmanager/controllers/IndexController.php DELETED
@@ -1,22 +0,0 @@
1
- <?php
2
- class Ghrix_Campaignmanager_IndexController extends Mage_Core_Controller_Front_Action{
3
- public function IndexAction() {
4
-
5
- $this->loadLayout();
6
- $this->getLayout()->getBlock("head")->setTitle($this->__("Titlename"));
7
- $breadcrumbs = $this->getLayout()->getBlock("breadcrumbs");
8
- $breadcrumbs->addCrumb("home", array(
9
- "label" => $this->__("Home Page"),
10
- "title" => $this->__("Home Page"),
11
- "link" => Mage::getBaseUrl()
12
- ));
13
-
14
- $breadcrumbs->addCrumb("titlename", array(
15
- "label" => $this->__("Titlename"),
16
- "title" => $this->__("Titlename")
17
- ));
18
-
19
- $this->renderLayout();
20
-
21
- }
22
- }
app/code/local/Ghrix/Campaignmanager/etc/config.xml DELETED
@@ -1,134 +0,0 @@
1
- <?xml version="1.0"?>
2
- <config>
3
- <modules>
4
- <Ghrix_Campaignmanager>
5
- <version>0.1.0</version>
6
- </Ghrix_Campaignmanager>
7
- </modules>
8
- <frontend>
9
- <routers>
10
- <campaignmanager>
11
- <use>standard</use>
12
- <args>
13
- <module>Ghrix_Campaignmanager</module>
14
- <frontName>campaignmanager</frontName>
15
- </args>
16
- </campaignmanager>
17
- </routers>
18
- <layout>
19
- <updates>
20
- <campaignmanager>
21
- <file>campaignmanager.xml</file>
22
- </campaignmanager>
23
- </updates>
24
- </layout>
25
- </frontend>
26
- <global>
27
- <helpers>
28
- <campaignmanager>
29
- <class>Ghrix_Campaignmanager_Helper</class>
30
- </campaignmanager>
31
- </helpers>
32
- <blocks>
33
- <campaignmanager>
34
- <class>Ghrix_Campaignmanager_Block</class>
35
- </campaignmanager>
36
- </blocks>
37
- <models>
38
- <campaignmanager>
39
- <class>Ghrix_Campaignmanager_Model</class>
40
- <resourceModel>campaignmanager_mysql4</resourceModel>
41
- </campaignmanager>
42
- <campaignmanager_mysql4>
43
- <class>Ghrix_Campaignmanager_Model_Mysql4</class>
44
- <entities>
45
- <campaignmanager>
46
- <table>campaignmanager</table>
47
- </campaignmanager>
48
- </entities>
49
- </campaignmanager_mysql4>
50
- </models>
51
- <resources>
52
- <campaignmanager_setup>
53
- <setup>
54
- <module>Ghrix_Campaignmanager</module>
55
- </setup>
56
- <connection>
57
- <use>core_setup</use>
58
- </connection>
59
- </campaignmanager_setup>
60
- <campaignmanager_write>
61
- <connection>
62
- <use>core_write</use>
63
- </connection>
64
- </campaignmanager_write>
65
- <campaignmanager_read>
66
- <connection>
67
- <use>core_read</use>
68
- </connection>
69
- </campaignmanager_read>
70
- </resources>
71
- </global>
72
- <admin>
73
- <routers>
74
- <campaignmanager>
75
- <use>admin</use>
76
- <args>
77
- <module>Ghrix_Campaignmanager</module>
78
- <frontName>admin_campaignmanager</frontName>
79
- </args>
80
- </campaignmanager>
81
- </routers>
82
- </admin>
83
- <adminhtml>
84
- <menu>
85
- <campaignmanager module="campaignmanager">
86
- <title>Campaignmanager</title>
87
- <sort_order>100</sort_order>
88
- <children>
89
- <campaignmanagerbackend module="campaignmanager">
90
- <title>Campaignmanager</title>
91
- <sort_order>0</sort_order>
92
- <action>admin_campaignmanager/adminhtml_campaignmanagerbackend</action>
93
- </campaignmanagerbackend>
94
- <campaignmanager module="campaignmanager">
95
- <title>Manage Campaignmanager</title>
96
- <sort_order>0</sort_order>
97
- <action>admin_campaignmanager/adminhtml_campaignmanager</action>
98
- </campaignmanager>
99
- </children>
100
- </campaignmanager>
101
- </menu>
102
- <acl>
103
- <resources>
104
- <all>
105
- <title>Allow Everything</title>
106
- </all>
107
- <admin>
108
- <children>
109
- <campaignmanager translate="title" module="campaignmanager">
110
- <title>Campaignmanager</title>
111
- <sort_order>1000</sort_order>
112
- <children>
113
- <campaignmanagerbackend translate="title">
114
- <title>Campaignmanager</title>
115
- </campaignmanagerbackend>
116
- <campaignmanager translate="title">
117
- <title>Manage Campaignmanager</title>
118
- <sort_order>0</sort_order>
119
- </campaignmanager>
120
- </children>
121
- </campaignmanager>
122
- </children>
123
- </admin>
124
- </resources>
125
- </acl>
126
- <layout>
127
- <updates>
128
- <campaignmanager>
129
- <file>campaignmanager.xml</file>
130
- </campaignmanager>
131
- </updates>
132
- </layout>
133
- </adminhtml>
134
- </config>
app/design/adminhtml/default/default/layout/campaign.xml ADDED
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <campaign_adminhtml_campaign_index>
4
+ <reference name="content">
5
+ <block type="campaign/adminhtml_campaign" name="campaign" />
6
+ </reference>
7
+ </campaign_adminhtml_campaign_index>
8
+ </layout>
app/design/frontend/base/default/template/campaign/index.phtml ADDED
@@ -0,0 +1 @@
1
+ Campaign
app/etc/modules/Ghrix_Campaign.xml ADDED
@@ -0,0 +1,10 @@
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Ghrix_Campaign>
5
+ <active>true</active>
6
+ <codePool>local</codePool>
7
+ <version>0.1.0</version>
8
+ </Ghrix_Campaign>
9
+ </modules>
10
+ </config>
package.xml CHANGED
@@ -1,27 +1,32 @@
1
<?xml version="1.0"?>
2
<package>
3
<name>Ad_Manager</name>
4
- <version>1.0.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>Ad Manager for displaying custom ads in any place of magento </summary>
10
- <description>Ad Manager for displaying custom ads in any place of magento .With this a merchant can easily all there ads from admin.&#xD;
11
&#xD;
12
- Key Features&#xD;
13
&#xD;
14
- 1 Add ads from magento admin&#xD;
15
- 2 Assign time for the ads to be displayed&#xD;
16
- 3 assign default days to be ads showing on the site&#xD;
17
- 4 can group ads&#xD;
18
- 5 easily manageable from admin&#xD;
19
- </description>
20
- <notes>This is fully tested on our servers and works well</notes>
21
<authors><author><name>Rohit Goel</name><user>rohit_goel</user><email>rhtgoel7@gmail.com</email></author></authors>
22
<date>2016-01-15</date>
23
- <time>06:29:18</time>
24
- <contents><target name="mageetc"><dir name="."><file name="Ghrix_Campaign.xml" hash=""/></dir></target><target name="magelocal"><dir name="Ghrix"><dir name="Bannercampaign"><dir name="Block"><dir name="Adminhtml"><dir name="Bannercampaign"><dir name="Edit"><file name="Form.php" hash="f1caee3878363b74ef2cc56520979894"/><dir name="Tab"><file name="Form.php" hash="98e92f8b95301a62fc8946c558c0f5a6"/></dir><file name="Tabs.php" hash="7461ac7737eec70a266ec6bbfca85628"/></dir><file name="Edit.php" hash="1ef092b75d4f089c7fa4088e1b0d2f2d"/><file name="Grid.php" hash="b75fd19dd97ca938d61b263312d17733"/></dir><file name="Bannercampaign.php" hash="cbc42fee605e2c4d5af3e82c0c85b83d"/><file name="Bannercampaignbackend.php" hash="2beb9a8f054bebb68380989b6d4a59af"/></dir><file name="Index.php" hash="e77b67a2edeb108f6031e926b573935a"/></dir><dir name="Helper"><file name="Data.php" hash="07482abcd680d3285f53014d9acbecb6"/></dir><dir name="Model"><file name="Bannercampaign.php" hash="b4a04d6d4cd3ef02236b0d11198510dd"/><dir name="Mysql4"><dir name="Bannercampaign"><file name="Collection.php" hash="f922ec0ca148d1d944d5a9c426707ce2"/></dir><file name="Bannercampaign.php" hash="8e08613a15a6505bae4852fbd925cb11"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="BannercampaignController.php" hash="3e345c153e3ab18b8f38169fc215b0b1"/><file name="BannercampaignbackendController.php" hash="2379c196387e1013fb100bf0c1d9566b"/></dir><file name="IndexController.php" hash="165d3d4a63cfb351cb31870ce2670562"/></dir><dir name="etc"><file name="config.xml" hash="46747b4354eb2e4e5b1c2a097fb2ea67"/></dir><dir name="sql"><dir name="bannercampaign_setup"><file name="mysql4-install-0.1.0.php" hash="0f11698aa7446670aeb50854b0b1d4e6"/></dir></dir></dir><dir name="Campaign"><dir name="Block"><dir name="Adminhtml"><dir name="Campaign"><dir name="Edit"><file name="Form.php" hash="2960b11acabf49bb3f78ce3f443abf55"/><dir name="Tab"><file name="Form.php" hash="d3ab2f48a88d1509cbc49d2ffde07c3f"/></dir><file name="Tabs.php" hash="dec5f736e0790de1bce4cc71295abb2b"/></dir><file name="Edit.php" hash="832be537f03fb8d14e4bbceedff52a5d"/><dir name="Grid"><dir name="Column"><dir name="Renderer"><file name="Image.php" hash="aba1bc04a3831dfbb27ae995b59cff43"/></dir></dir></dir><file name="Grid.php" hash="b8e082c4259fd1f447f6fcc70e6ab36d"/></dir><file name="Campaign.php" hash="8ad218792378e123dd3d30c0b9c0daa6"/></dir><file name="Index.php" hash="204852c2117c36117021f621494ae682"/></dir><dir name="Helper"><file name="Data.php" hash="14398e5ef48fd2f5825773753bb5c110"/></dir><dir name="Model"><file name="Campaign.php" hash="c88d2e47f03a66f21989936c91764682"/><dir name="Mysql4"><dir name="Campaign"><file name="Collection.php" hash="7aaa44a0c14efc1a9bdba8aff398fac9"/></dir><file name="Campaign.php" hash="fdf6f622849228f36e1c5181ea1428f3"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="CampaignController.php" hash="c563860c9320d00c793ab609a310c3eb"/></dir><file name="IndexController.php" hash="db1ef3136a4ca46fc4c37d960e1dc8e4"/></dir><dir name="etc"><file name="config.xml" hash="77e055c312e1102ea5cbeca4820a5b9a"/></dir><dir name="sql"><dir name="campaign_setup"><file name="mysql4-install-0.1.0.php" hash="ed378f971f9196c87a08a4bd0eeb5c11"/></dir></dir></dir><dir name="Campaignmanager"><dir name="Block"><dir name="Adminhtml"><dir name="Campaignmanager"><dir name="Edit"><file name="Form.php" hash="ea771df128eb5c2c2cbb3d56029261f7"/><dir name="Tab"><file name="Form.php" hash="5369de8db60cf48b7b8dd00257555cfb"/></dir><file name="Tabs.php" hash="601999e06020f1b944b193610280ee3b"/></dir><file name="Edit.php" hash="d133f1e5ebdcf3622a9a2b469f35bfb0"/><file name="Grid.php" hash="383f0d15f505e9ff91061799b27184e1"/></dir><file name="Campaignmanager.php" hash="8698f8d7f321c79f05c6a1cae2d285fe"/><file name="Campaignmanagerbackend.php" hash="4604702b15f2bcca76195835742bc132"/></dir><file name="Index.php" hash="d151e4925a7fc082dea67e45eef32cdf"/></dir><dir name="Helper"><file name="Data.php" hash="6a4c5519aa20a588a328b38f2202f63b"/></dir><dir name="Model"><file name="Campaignmanager.php" hash="4528899cf5aa06daa4bb3e67947edabe"/><dir name="Mysql4"><dir name="Campaignmanager"><file name="Collection.php" hash="5b9b35e389118292428dcab34b41094b"/></dir><file name="Campaignmanager.php" hash="44d44d4279b35e8889c1d8e7aca2865c"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="CampaignmanagerController.php" hash="36b4b28adc65663def77b8be20f02f99"/><file name="CampaignmanagerbackendController.php" hash="5258f7c3c89390835e3df539cf6a7bf1"/></dir><file name="IndexController.php" hash="4b65fb50f6fe5bd5b3b7e28e1c1949a5"/></dir><dir name="etc"><file name="config.xml" hash="5d5bd2fe1ddb11b1e5187338bbfcb559"/></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="campaign.xml" hash=""/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="campaign.xml" hash="3aa88733ca4314497c6cccf6c323aea3"/></dir></dir></dir></dir></target></contents>
25
<compatible/>
26
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
27
</package>
1
<?xml version="1.0"?>
2
<package>
3
<name>Ad_Manager</name>
4
+ <version>1.0.1</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>Ad Manager for displaying custom ads in any place of magento </summary>
10
+ <description>Ad Manager for displaying custom ads in any place of magento .With this a merchant can easily add and manage there ads from admin.&#xD;
11
&#xD;
12
+ &lt;p&gt;&lt;h1&gt;Key Features &lt;/h1&gt; &lt;/p&gt;&#xD;
13
+ &lt;p&gt;1 Place particular ads at any place of magento &lt;/p&gt;&#xD;
14
+ &lt;p&gt;2 Show multiple ads on same page &lt;/p&gt;&#xD;
15
+ &lt;p&gt;3 Add ads from magento admin &lt;/p&gt;&#xD;
16
+ &lt;p&gt;4 Assign time for the ads to be displayed &lt;/p&gt; &#xD;
17
+ &lt;p&gt;5 Assign default days to be ads showing on the site&lt;/p&gt; &#xD;
18
+ &lt;p&gt;6 Ads can be group &lt;/p&gt;&#xD;
19
+ &lt;p&gt;7 Easily manageable from admin&lt;/p&gt;&#xD;
20
&#xD;
21
+ &lt;p&gt;To show ads on frontend use the below code in any template&lt;/p&gt;&#xD;
22
+ &lt;p /&gt;&lt;b&gt; Mage::helper('campaign')-&amp;gt;showbanner('content') &lt;/b&gt;&lt;p /&gt;&#xD;
23
+ &#xD;
24
+ &lt;b&gt;&lt;h3&gt;Note: &lt;/h3&gt;&lt;/b&gt; Change &amp;quot; &lt;b&gt;content &lt;/b&gt;&amp;quot; with the parameter value you specified in the admin for &amp;quot;&lt;b&gt;position&lt;/b&gt;&amp;quot; for a particular ad in above code. You can define any value to position field in admin for an ad and to call that ad on frontend you need to use the same value specified for position in the above code.</description>
25
+ <notes>Fix package directories issues</notes>
26
<authors><author><name>Rohit Goel</name><user>rohit_goel</user><email>rhtgoel7@gmail.com</email></author></authors>
27
<date>2016-01-15</date>
28
+ <time>10:04:38</time>
29
+ <contents><target name="magelocal"><dir name="Ghrix"><dir name="Campaign"><dir name="Block"><dir name="Adminhtml"><dir name="Campaign"><dir name="Edit"><file name="Form.php" hash="2960b11acabf49bb3f78ce3f443abf55"/><dir name="Tab"><file name="Form.php" hash="d3ab2f48a88d1509cbc49d2ffde07c3f"/></dir><file name="Tabs.php" hash="dec5f736e0790de1bce4cc71295abb2b"/></dir><file name="Edit.php" hash="832be537f03fb8d14e4bbceedff52a5d"/><dir name="Grid"><dir name="Column"><dir name="Renderer"><file name="Image.php" hash="aba1bc04a3831dfbb27ae995b59cff43"/></dir></dir></dir><file name="Grid.php" hash="b8e082c4259fd1f447f6fcc70e6ab36d"/></dir><file name="Campaign.php" hash="8ad218792378e123dd3d30c0b9c0daa6"/></dir><file name="Index.php" hash="204852c2117c36117021f621494ae682"/></dir><dir name="Helper"><file name="Data.php" hash="14398e5ef48fd2f5825773753bb5c110"/></dir><dir name="Model"><file name="Campaign.php" hash="c88d2e47f03a66f21989936c91764682"/><dir name="Mysql4"><dir name="Campaign"><file name="Collection.php" hash="7aaa44a0c14efc1a9bdba8aff398fac9"/></dir><file name="Campaign.php" hash="fdf6f622849228f36e1c5181ea1428f3"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="CampaignController.php" hash="c563860c9320d00c793ab609a310c3eb"/></dir><file name="IndexController.php" hash="94ed392594a189f854a165d4776ec5fa"/></dir><dir name="etc"><file name="config.xml" hash="77e055c312e1102ea5cbeca4820a5b9a"/></dir><dir name="sql"><dir name="campaign_setup"><file name="mysql4-install-0.1.0.php" hash="ed378f971f9196c87a08a4bd0eeb5c11"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="campaign.xml" hash="89c9d0eb98768a71518a96174688be89"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="campaign.xml" hash="3aa88733ca4314497c6cccf6c323aea3"/></dir><dir name="template"><dir name="campaign"><file name="index.phtml" hash="f00a1d99f6f47917006e88a803ecde1f"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Ghrix_Campaign.xml" hash="e5a6c6f69525118f3333c0dd93ee964d"/></dir></target></contents>
30
<compatible/>
31
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
32
</package>