Wyomind_WatchLog - Version 1.0.0

Version Notes

test

Download this release

Release Info

Developer Wyomind
Extension Wyomind_WatchLog
Version 1.0.0
Comparing to
See all releases


Version 1.0.0

Files changed (27) hide show
  1. app/code/community/Wyomind/Watchlog/Block/Adminhtml/Advanced.php +20 -0
  2. app/code/community/Wyomind/Watchlog/Block/Adminhtml/Advanced/Grid.php +71 -0
  3. app/code/community/Wyomind/Watchlog/Block/Adminhtml/Basic.php +15 -0
  4. app/code/community/Wyomind/Watchlog/Block/Adminhtml/Basic/Grid.php +64 -0
  5. app/code/community/Wyomind/Watchlog/Block/Adminhtml/Chart.php +99 -0
  6. app/code/community/Wyomind/Watchlog/Block/Adminhtml/Renderer/Ip.php +14 -0
  7. app/code/community/Wyomind/Watchlog/Block/Adminhtml/Renderer/Status.php +17 -0
  8. app/code/community/Wyomind/Watchlog/Block/Adminhtml/System/Config/Form/Field/Cron.php +189 -0
  9. app/code/community/Wyomind/Watchlog/Helper/Data.php +5 -0
  10. app/code/community/Wyomind/Watchlog/Model/Mysql4/Watchlog.php +8 -0
  11. app/code/community/Wyomind/Watchlog/Model/Mysql4/Watchlog/Collection.php +12 -0
  12. app/code/community/Wyomind/Watchlog/Model/Observer.php +195 -0
  13. app/code/community/Wyomind/Watchlog/Model/System/Config/Source/Link.php +13 -0
  14. app/code/community/Wyomind/Watchlog/Model/Watchlog.php +56 -0
  15. app/code/community/Wyomind/Watchlog/controllers/Adminhtml/AdvancedController.php +25 -0
  16. app/code/community/Wyomind/Watchlog/controllers/Adminhtml/BasicController.php +54 -0
  17. app/code/community/Wyomind/Watchlog/etc/config.xml +175 -0
  18. app/code/community/Wyomind/Watchlog/etc/system.xml +127 -0
  19. app/code/community/Wyomind/Watchlog/sql/watchlog_setup/mysql4-install-1.0.0.php +24 -0
  20. app/design/adminhtml/default/default/layout/watchlog.xml +14 -0
  21. app/design/adminhtml/default/default/template/watchlog/advanced.phtml +29 -0
  22. app/design/adminhtml/default/default/template/watchlog/basic.phtml +28 -0
  23. app/design/adminhtml/default/default/template/watchlog/chart.phtml +75 -0
  24. app/design/adminhtml/default/default/template/watchlog/email/report.phtml +29 -0
  25. app/etc/modules/Wyomind_Watchlog.xml +10 -0
  26. app/locale/en_US/template/email/watchlog_report.html +6 -0
  27. package.xml +125 -0
app/code/community/Wyomind/Watchlog/Block/Adminhtml/Advanced.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Wyomind_Watchlog_Block_Adminhtml_Advanced extends Mage_Adminhtml_Block_Widget_Grid_Container {
4
+
5
+
6
+ public function __construct() {
7
+ $this->_controller = 'adminhtml_advanced';
8
+
9
+ $this->_blockGroup = 'watchlog';
10
+
11
+ $this->_headerText = Mage::helper('watchlog')->__('Watchlog Summary');
12
+
13
+
14
+ parent::__construct();
15
+ $this->setTemplate('watchlog/advanced.phtml');
16
+ $this->removeButton('add');
17
+ }
18
+
19
+
20
+ }
app/code/community/Wyomind/Watchlog/Block/Adminhtml/Advanced/Grid.php ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Wyomind_Watchlog_Block_Adminhtml_Advanced_Grid extends Mage_Adminhtml_Block_Widget_Grid {
4
+
5
+ public function __construct() {
6
+ parent::__construct();
7
+ $this->setId('watchlogGrid');
8
+ $this->setDefaultSort('attempts');
9
+ $this->setDefaultDir('DESC');
10
+ $this->setSaveParametersInSession(true);
11
+ }
12
+
13
+ protected function _prepareCollection() {
14
+
15
+ $collection = Mage::getModel('watchlog/watchlog')->getSummary();
16
+
17
+ $this->setCollection($collection);
18
+ return parent::_prepareCollection();
19
+ }
20
+
21
+ protected function _prepareColumns() {
22
+
23
+
24
+
25
+
26
+ $this->addColumn('ip', array(
27
+ 'header' => Mage::helper('watchlog')->__('IP'),
28
+ 'width' => '100px',
29
+ 'align'=>'center',
30
+ "type" => "text",
31
+ 'renderer' => 'Wyomind_Watchlog_Block_Adminhtml_Renderer_Ip',
32
+ 'index' => "ip"
33
+ ));
34
+
35
+
36
+ $this->addColumn('date', array(
37
+ 'header' => Mage::helper('watchlog')->__('Last attempt'),
38
+ 'width' => 'auto',
39
+ "type" => "datetime",
40
+ 'index' => "date"
41
+ ));
42
+
43
+ $this->addColumn('attempts', array(
44
+ 'header' => Mage::helper('watchlog')->__('Attempts'),
45
+ 'width' => '100px',
46
+ "type" => "number",
47
+ 'index' => "attempts",
48
+ 'filter'=>false,
49
+ ));
50
+
51
+ $this->addColumn('failed', array(
52
+ 'header' => Mage::helper('watchlog')->__('Failed'),
53
+ 'width' => '100px',
54
+ "type" => "number",
55
+ 'index' => "failed",
56
+ 'filter'=>false,
57
+ ));
58
+
59
+ $this->addColumn('succeeded', array(
60
+ 'header' => Mage::helper('watchlog')->__('Succeeded'),
61
+ 'width' => '100px',
62
+ "type" => "number",
63
+ 'index' => "succeeded",
64
+ 'filter'=>false,
65
+ ));
66
+
67
+ return parent::_prepareColumns();
68
+ }
69
+
70
+
71
+ }
app/code/community/Wyomind/Watchlog/Block/Adminhtml/Basic.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Wyomind_Watchlog_Block_Adminhtml_Basic extends Mage_Adminhtml_Block_Widget_Grid_Container {
4
+
5
+ public function __construct() {
6
+
7
+ $this->_controller = "adminhtml_basic";
8
+ $this->_blockGroup = "watchlog";
9
+ $this->_headerText = Mage::helper("watchlog")->__("Watchlog");
10
+ parent::__construct();
11
+ $this->setTemplate('watchlog/basic.phtml');
12
+
13
+ }
14
+
15
+ }
app/code/community/Wyomind/Watchlog/Block/Adminhtml/Basic/Grid.php ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Wyomind_Watchlog_Block_Adminhtml_Basic_Grid extends Mage_Adminhtml_Block_Widget_Grid {
4
+
5
+ public function __construct() {
6
+ parent::__construct();
7
+ $this->setId("watchlogGrid");
8
+ $this->setDefaultSort("date");
9
+ $this->setDefaultDir("DESC");
10
+ $this->setSaveParametersInSession(true);
11
+ }
12
+
13
+ protected function _prepareCollection() {
14
+ $collection = Mage::getModel("watchlog/watchlog")->getCollection();
15
+ $this->setCollection($collection);
16
+ return parent::_prepareCollection();
17
+ }
18
+
19
+ protected function _prepareColumns() {
20
+
21
+ $this->addColumn("ip", array(
22
+ "header" => Mage::helper("watchlog")->__("IP"),
23
+ "width" => "100px",
24
+ "align" => "center",
25
+ 'renderer' => 'Wyomind_Watchlog_Block_Adminhtml_Renderer_Ip',
26
+ "index" => "ip",
27
+ ));
28
+ $this->addColumn('date', array(
29
+ 'header' => Mage::helper('watchlog')->__('Date'),
30
+ 'index' => 'date',
31
+ 'width' => '200px',
32
+ 'type' => 'datetime',
33
+ ));
34
+
35
+ $this->addColumn("login", array(
36
+ "header" => Mage::helper("watchlog")->__("Login"),
37
+ "index" => "login",
38
+ 'width' => '200px',
39
+ ));
40
+ $this->addColumn('message', array(
41
+ 'header' => Mage::helper('watchlog')->__('Message'),
42
+ 'index' => 'message',
43
+ 'width' => '200px',
44
+ ));
45
+ $this->addColumn('url', array(
46
+ 'header' => Mage::helper('watchlog')->__('Url'),
47
+ 'index' => 'url',
48
+ ));
49
+ $this->addColumn('user_agent', array(
50
+ 'header' => Mage::helper('watchlog')->__('Status'),
51
+ 'index' => 'user_agent',
52
+ 'renderer' => 'Wyomind_Watchlog_Block_Adminhtml_Renderer_Status',
53
+ 'width' => '100px',
54
+ 'filter' => false,
55
+ ));
56
+
57
+ return parent::_prepareColumns();
58
+ }
59
+
60
+ public function getRowUrl($row) {
61
+ return '#';
62
+ }
63
+
64
+ }
app/code/community/Wyomind/Watchlog/Block/Adminhtml/Chart.php ADDED
@@ -0,0 +1,99 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Wyomind_Watchlog_Block_Adminhtml_Chart extends Mage_Adminhtml_Block_Widget_Container {
4
+
5
+ const FAIL = 0;
6
+ const SUCCESS = 1;
7
+ const BLOCKED = 2;
8
+
9
+ public function __construct() {
10
+
11
+ $this->_controller = "adminhtml_chart";
12
+ $this->_blockGroup = "watchlog";
13
+ parent::__construct();
14
+ $this->setTemplate('watchlog/chart.phtml');
15
+ }
16
+
17
+ public function getChartDataSummaryMonth() {
18
+
19
+ $pro = Mage::helper('core')->isModuleEnabled("Wyomind_Watchlogpro") && Mage::helper('core')->isModuleOutputEnabled("Wyomind_Watchlogpro") && Mage::getConfig()->getNode('modules/Wyomind_Watchlogpro/active');
20
+
21
+ $data = array();
22
+ $headers = array(Mage::helper('watchlog')->__('Date'), Mage::helper('watchlog')->__('Success'), Mage::helper('watchlog')->__('Failed'));
23
+ if ($pro)
24
+ $headers[] = Mage::helper('watchlog')->__('Blocked');
25
+
26
+ $data[] = $headers;
27
+
28
+ $tmp_data = array();
29
+
30
+
31
+ $current_timestamp = Mage::getModel('core/date')->gmtTimestamp();
32
+ $yestermonth_timestamp = $current_timestamp - 29 * 24 * 60 * 60;
33
+ while ($yestermonth_timestamp <= $current_timestamp) {
34
+ $key = Mage::getModel('core/date')->date('Y-m-d', $yestermonth_timestamp);
35
+ $tmp_data[$key] = array(self::FAIL => 0, self::SUCCESS => 0, self::BLOCKED => 0);
36
+ $yestermonth_timestamp += 24 * 60 * 60;
37
+ }
38
+
39
+ $collection = Mage::getModel('watchlog/watchlog')->getSummaryMonth();
40
+ foreach ($collection as $entry) {
41
+ $key = Mage::getModel('core/date')->date('Y-m-d', strtotime($entry->getDate()));
42
+ if (!isset($tmp_data[$key])) {
43
+ $tmp_data[$key] = array(self::FAIL => 0, self::SUCCESS => 0, self::BLOCKED => 0);
44
+ }
45
+ $tmp_data[$key][$entry->getType()] = $entry->getNb();
46
+ }
47
+
48
+ foreach ($tmp_data as $date => $entry) {
49
+ if ($pro)
50
+ $data[] = array("#new Date('" . $date . "')#", (int) $entry[self::SUCCESS], (int) $entry[self::FAIL], (int) $entry[self::BLOCKED]);
51
+ else
52
+ $data[] = array("#new Date('" . $date . "')#", (int) $entry[self::SUCCESS], (int) $entry[self::FAIL]);
53
+ }
54
+
55
+ return $data;
56
+ }
57
+
58
+ public function getChartDataSummaryDay() {
59
+
60
+ $pro = Mage::helper('core')->isModuleEnabled("Wyomind_Watchlogpro") && Mage::helper('core')->isModuleOutputEnabled("Wyomind_Watchlogpro") && Mage::getConfig()->getNode('modules/Wyomind_Watchlogpro/active');
61
+
62
+ $data = array();
63
+ $headers = array(Mage::helper('watchlog')->__('Date'), Mage::helper('watchlog')->__('Success'), Mage::helper('watchlog')->__('Failed'));
64
+ if ($pro)
65
+ $headers[] = Mage::helper('watchlog')->__('Blocked');
66
+
67
+ $data[] = $headers;
68
+
69
+ $tmp_data = array();
70
+
71
+ $current_timestamp = Mage::getModel('core/date')->gmtTimestamp();
72
+ $yesterday_timestamp = $current_timestamp - 23 * 60 * 60;
73
+ while ($yesterday_timestamp <= $current_timestamp) {
74
+ $key = Mage::getModel('core/date')->date('M d, Y H:00:00', $yesterday_timestamp);
75
+ $tmp_data[$key] = array(self::FAIL => 0, self::SUCCESS => 0, self::BLOCKED => 0);
76
+ $yesterday_timestamp += 60 * 60;
77
+ }
78
+
79
+ $collection = Mage::getModel('watchlog/watchlog')->getSummaryDay();
80
+ foreach ($collection as $entry) {
81
+ $key = Mage::getModel('core/date')->date('M d, Y H:00:00', strtotime($entry->getDate()));
82
+ if (!isset($tmp_data[$key])) {
83
+ $tmp_data[$key] = array(self::FAIL => 0, self::SUCCESS => 0, self::BLOCKED => 0);
84
+ }
85
+ $tmp_data[$key][$entry->getType()] = $entry->getNb();
86
+ }
87
+
88
+ // ksort($tmp_data);
89
+
90
+ foreach ($tmp_data as $date => $entry) {
91
+ if ($pro)
92
+ $data[] = array("#new Date('" . $date . "')#", (int) $entry[self::SUCCESS], (int) $entry[self::FAIL], (int) $entry[self::BLOCKED]);
93
+ else
94
+ $data[] = array("#new Date('" . $date . "')#", (int) $entry[self::SUCCESS], (int) $entry[self::FAIL]);
95
+ }
96
+ return $data;
97
+ }
98
+
99
+ }
app/code/community/Wyomind/Watchlog/Block/Adminhtml/Renderer/Ip.php ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+
4
+ class Wyomind_Watchlog_Block_Adminhtml_Renderer_Ip extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract {
5
+
6
+ public function render(Varien_Object $row) {
7
+
8
+ $ip = $row->getIp();
9
+
10
+ return "<a target='_blank' href='http://www.abuseipdb.com/check/".$ip."' title='".$this->__('Check this ip')."'>".$ip."</a>";
11
+
12
+ }
13
+
14
+ }
app/code/community/Wyomind/Watchlog/Block/Adminhtml/Renderer/Status.php ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+
4
+ class Wyomind_Watchlog_Block_Adminhtml_Renderer_Status extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract {
5
+
6
+ public function render(Varien_Object $row) {
7
+
8
+ if ($row->getType() == 1) {
9
+ return "<span class='grid-severity-notice' title='".$row->getUseragent()."'><span>".Mage::helper('watchlog')->__("Success")."</span></span>";
10
+ } else if ($row->getType() == 2) {
11
+ return "<span class='grid-severity-minor' title='".$row->getUseragent()."'><span>".Mage::helper('watchlog')->__("Blocked")."</span></span>";
12
+ } else {
13
+ return "<span class='grid-severity-critical' title='".$row->getUseragent()."'><span>".Mage::helper('watchlog')->__("Failed")."</span></span>";
14
+ }
15
+ }
16
+
17
+ }
app/code/community/Wyomind/Watchlog/Block/Adminhtml/System/Config/Form/Field/Cron.php ADDED
@@ -0,0 +1,189 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Wyomind_Watchlog_Block_Adminhtml_System_Config_Form_Field_Cron extends Mage_Adminhtml_Block_System_Config_Form_Field {
4
+
5
+ protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element) {
6
+
7
+ $html = "";
8
+
9
+ $html .= "<input class=' input-text' type='hidden' id='" . $element->getHtmlId() . "' name='" . $element->getName() . "' value='" . $element->getEscapedValue() . "' '" . $element->serialize($element->getHtmlAttributes()) . "/>";
10
+
11
+ $html .= "
12
+ <script>
13
+ document.observe('dom:loaded', function(){
14
+
15
+ if(!$('" . $element->getHtmlId() . "').value.isJSON())$('" . $element->getHtmlId() . "').value='{\"days\":[],\"hours\":[]}';
16
+ cron=$('" . $element->getHtmlId() . "').value.evalJSON();
17
+
18
+
19
+ cron.days.each(function(d){
20
+ if($('d-'+d)){
21
+ $('d-'+d).checked=true;
22
+ $('d-'+d).ancestors()[0].addClassName('checked');
23
+ }
24
+
25
+ })
26
+ cron.hours.each(function(h){
27
+ if( $('h-'+h.replace(':',''))){
28
+ $('h-'+h.replace(':','')).checked=true;
29
+ $('h-'+h.replace(':','')).ancestors()[0].addClassName('checked');
30
+ }
31
+ })
32
+
33
+ $$('.cron-box').each(function(e){
34
+ e.observe('click',function(){
35
+
36
+ if(e.checked)e.ancestors()[0].addClassName('checked');
37
+ else e.ancestors()[0].removeClassName('checked');
38
+
39
+ d=new Array
40
+ $$('.cron-d-box INPUT').each(function(e){
41
+ if(e.checked) d.push(e.value)
42
+ })
43
+ h=new Array;
44
+ $$('.cron-h-box INPUT').each(function(e){
45
+ if(e.checked) h.push(e.value)
46
+ })
47
+
48
+ $('" . $element->getHtmlId() . "').value=Object.toJSON({days:d,hours:h})
49
+
50
+ })
51
+ })
52
+ })
53
+
54
+ </script>
55
+ ";
56
+
57
+ $html .= "
58
+ <style>
59
+ .morning .cron-h-box{
60
+ border: 1px solid #AFAFAF;
61
+ border-radius: 3px 3px 3px 3px;
62
+ margin: 2px;
63
+ padding: 0 3px;
64
+ background:#efefef;
65
+ }
66
+ .afternoon .cron-h-box{
67
+ border: 1px solid #AFAFAF;
68
+ border-radius: 3px 3px 3px 3px;
69
+ margin: 2px;
70
+ padding: 0 3px;
71
+ background:#efefef;
72
+ }
73
+ .morning-half .cron-h-box{
74
+ border: 1px solid #AFAFAF;
75
+ border-radius: 3px 3px 3px 3px;
76
+ margin: 2px;
77
+ padding: 0 3px;
78
+ background:#efefef;
79
+ }
80
+ .afternoon-half .cron-h-box{
81
+
82
+ border: 1px solid #AFAFAF;
83
+ border-radius: 3px 3px 3px 3px;
84
+ margin: 2px;
85
+ padding: 0 3px;
86
+ background:#efefef;
87
+ }
88
+
89
+ .cron-d-box{
90
+
91
+ background:#efefef;
92
+ border: 1px solid #AFAFAF;
93
+ border-radius: 3px 3px 3px 3px;
94
+ margin: 2px;
95
+ padding: 0 3px;
96
+ }
97
+ .checked{
98
+ background-color: #EFFFF0!important;
99
+ }
100
+ </style>";
101
+
102
+
103
+ $html .= "<table style='width:600px !important'>
104
+ <thead>
105
+ <tr><th>Days of the week</th><th width='20'></th><th colspan='4'>Hours of the day</th></tr>
106
+ </thead>
107
+ <tr>
108
+ <td width='300'>
109
+ <div class='cron-d-box'><input class='cron-box' value='Monday' id='d-Monday' type='checkbox'/> Monday</div>
110
+ <div class='cron-d-box'><input class='cron-box' value='Tuesday' id='d-Tuesday' type='checkbox'/> Tuesday</div>
111
+ <div class='cron-d-box'><input class='cron-box' value='Wednesday' id='d-Wednesday' type='checkbox'/> Wednesday</div>
112
+ <div class='cron-d-box'><input class='cron-box' value='Thursday' id='d-Thursday' type='checkbox'/> Thursday</div>
113
+ <div class='cron-d-box'><input class='cron-box' value='Friday' id='d-Friday' type='checkbox'/> Friday</div>
114
+ <div class='cron-d-box'><input class='cron-box' value='Saturday' id='d-Saturday' type='checkbox'/> Saturday</div>
115
+ <div class='cron-d-box'><input class='cron-box' value='Sunday' id='d-Sunday' type='checkbox'/> Sunday</div>
116
+ </td>
117
+ <td></td>
118
+ <td width='150' class='morning-half'>
119
+ <div class='cron-h-box'><input class='cron-box' value='00:00' id='h-0000' type='checkbox'/> 00:00 AM</div>
120
+ <div class='cron-h-box'><input class='cron-box' value='01:00' id='h-0100' type='checkbox'/> 01:00 AM</div>
121
+ <div class='cron-h-box'><input class='cron-box' value='02:00' id='h-0200' type='checkbox'/> 02:00 AM</div>
122
+ <div class='cron-h-box'><input class='cron-box' value='03:00' id='h-0300' type='checkbox'/> 03:00 AM</div>
123
+ <div class='cron-h-box'><input class='cron-box' value='04:00' id='h-0400' type='checkbox'/> 04:00 AM</div>
124
+ <div class='cron-h-box'><input class='cron-box' value='05:00' id='h-0500' type='checkbox'/> 05:00 AM</div>
125
+ <div class='cron-h-box'><input class='cron-box' value='06:00' id='h-0600' type='checkbox'/> 06:00 AM</div>
126
+ <div class='cron-h-box'><input class='cron-box' value='07:00' id='h-0700' type='checkbox'/> 07:00 AM</div>
127
+ <div class='cron-h-box'><input class='cron-box' value='08:00' id='h-0800' type='checkbox'/> 08:00 AM</div>
128
+ <div class='cron-h-box'><input class='cron-box' value='09:00' id='h-0900' type='checkbox'/> 09:00 AM</div>
129
+ <div class='cron-h-box'><input class='cron-box' value='10:00' id='h-1000' type='checkbox'/> 10:00 AM</div>
130
+ <div class='cron-h-box'><input class='cron-box' value='11:00' id='h-1100' type='checkbox'/> 11:00 AM</div>
131
+
132
+ </td>
133
+ <td width='150' class='morning'>
134
+ <div class='cron-h-box'><input class='cron-box' value='00:30' id='h-0030' type='checkbox'/> 00:30 AM</div>
135
+ <div class='cron-h-box'><input class='cron-box' value='01:30' id='h-0130' type='checkbox'/> 01:30 AM</div>
136
+ <div class='cron-h-box'><input class='cron-box' value='02:30' id='h-0230' type='checkbox'/> 02:30 AM</div>
137
+ <div class='cron-h-box'><input class='cron-box' value='03:30' id='h-0330' type='checkbox'/> 03:30 AM</div>
138
+ <div class='cron-h-box'><input class='cron-box' value='04:30' id='h-0430' type='checkbox'/> 04:30 AM</div>
139
+ <div class='cron-h-box'><input class='cron-box' value='05:30' id='h-0530' type='checkbox'/> 05:30 AM</div>
140
+ <div class='cron-h-box'><input class='cron-box' value='06:30' id='h-0630' type='checkbox'/> 06:30 AM</div>
141
+ <div class='cron-h-box'><input class='cron-box' value='07:30' id='h-0730' type='checkbox'/> 07:30 AM</div>
142
+ <div class='cron-h-box'><input class='cron-box' value='08:30' id='h-0830' type='checkbox'/> 08:30 AM</div>
143
+ <div class='cron-h-box'><input class='cron-box' value='09:30' id='h-0930' type='checkbox'/> 09:30 AM</div>
144
+ <div class='cron-h-box'><input class='cron-box' value='10:30' id='h-1030' type='checkbox'/> 10:30 AM</div>
145
+ <div class='cron-h-box'><input class='cron-box' value='11:30' id='h-1130' type='checkbox'/> 11:30 AM</div>
146
+
147
+
148
+
149
+
150
+ </td>
151
+ <td width='150' class='afternoon-half'>
152
+ <div class='cron-h-box'><input class='cron-box' value='12:00' id='h-1200' type='checkbox'/> 12:00 AM</div>
153
+ <div class='cron-h-box'><input class='cron-box' value='13:00' id='h-1300' type='checkbox'/> 01:00 PM</div>
154
+ <div class='cron-h-box'><input class='cron-box' value='14:00' id='h-1400' type='checkbox'/> 02:00 PM</div>
155
+ <div class='cron-h-box'><input class='cron-box' value='15:00' id='h-1500' type='checkbox'/> 03:00 PM</div>
156
+ <div class='cron-h-box'><input class='cron-box' value='16:00' id='h-1600' type='checkbox'/> 04:00 PM</div>
157
+ <div class='cron-h-box'><input class='cron-box' value='17:00' id='h-1700' type='checkbox'/> 05:00 PM</div>
158
+ <div class='cron-h-box'><input class='cron-box' value='18:00' id='h-1800' type='checkbox'/> 06:00 PM</div>
159
+ <div class='cron-h-box'><input class='cron-box' value='19:00' id='h-1900' type='checkbox'/> 07:00 PM</div>
160
+ <div class='cron-h-box'><input class='cron-box' value='20:00' id='h-2000' type='checkbox'/> 08:00 PM</div>
161
+ <div class='cron-h-box'><input class='cron-box' value='21:00' id='h-2100' type='checkbox'/> 09:00 PM</div>
162
+ <div class='cron-h-box'><input class='cron-box' value='22:00' id='h-2200' type='checkbox'/> 10:00 PM</div>
163
+ <div class='cron-h-box'><input class='cron-box' value='23:00' id='h-2300' type='checkbox'/> 11:00 PM</div>
164
+
165
+ </td>
166
+ <td width='150' class='afternoon'>
167
+ <div class='cron-h-box'><input class='cron-box' value='12:30' id='h-1230' type='checkbox'/> 12:30 AM</div>
168
+ <div class='cron-h-box'><input class='cron-box' value='13:30' id='h-1330' type='checkbox'/> 01:30 PM</div>
169
+ <div class='cron-h-box'><input class='cron-box' value='14:30' id='h-1430' type='checkbox'/> 02:30 PM</div>
170
+ <div class='cron-h-box'><input class='cron-box' value='15:30' id='h-1530' type='checkbox'/> 03:30 PM</div>
171
+ <div class='cron-h-box'><input class='cron-box' value='16:30' id='h-1630' type='checkbox'/> 04:30 PM</div>
172
+ <div class='cron-h-box'><input class='cron-box' value='17:30' id='h-1730' type='checkbox'/> 05:30 PM</div>
173
+ <div class='cron-h-box'><input class='cron-box' value='18:30' id='h-1830' type='checkbox'/> 06:30 PM</div>
174
+ <div class='cron-h-box'><input class='cron-box' value='19:30' id='h-1930' type='checkbox'/> 07:30 PM</div>
175
+ <div class='cron-h-box'><input class='cron-box' value='20:30' id='h-2030' type='checkbox'/> 08:30 PM</div>
176
+ <div class='cron-h-box'><input class='cron-box' value='21:30' id='h-2130' type='checkbox'/> 09:30 PM</div>
177
+ <div class='cron-h-box'><input class='cron-box' value='22:30' id='h-2230' type='checkbox'/> 10:30 PM</div>
178
+ <div class='cron-h-box'><input class='cron-box' value='23:30' id='h-2330' type='checkbox'/> 11:30 PM</div>
179
+
180
+
181
+ </td>
182
+ </tr>
183
+ </table>";
184
+
185
+ $html .= $element->getAfterElementHtml();
186
+ return $html;
187
+ }
188
+
189
+ }
app/code/community/Wyomind/Watchlog/Helper/Data.php ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <?php
2
+
3
+ class Wyomind_Watchlog_Helper_Data extends Mage_Core_Helper_Abstract {
4
+
5
+ }
app/code/community/Wyomind/Watchlog/Model/Mysql4/Watchlog.php ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Wyomind_Watchlog_Model_Mysql4_Watchlog extends Mage_Core_Model_Mysql4_Abstract
3
+ {
4
+ protected function _construct()
5
+ {
6
+ $this->_init("watchlog/watchlog", "watchlog_id");
7
+ }
8
+ }
app/code/community/Wyomind/Watchlog/Model/Mysql4/Watchlog/Collection.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Wyomind_Watchlog_Model_Mysql4_Watchlog_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
3
+ {
4
+
5
+ public function _construct(){
6
+ $this->_init("watchlog/watchlog");
7
+ }
8
+
9
+
10
+
11
+ }
12
+
app/code/community/Wyomind/Watchlog/Model/Observer.php ADDED
@@ -0,0 +1,195 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Wyomind_Watchlog_Model_Observer {
4
+
5
+ public function loginSuccess($observer) {
6
+
7
+ $url = Mage::app()->getRequest()->getRequestUri();
8
+ $login = $observer->getEvent()->getUser()->getUsername();
9
+
10
+ $ip = Mage::helper('core/http')->getRemoteAddr();
11
+
12
+ $data = array(
13
+ "login" => $login,
14
+ "ip" => $ip,
15
+ "date" => Mage::getModel('core/date')->gmtDate('Y-m-d H:i:s'),
16
+ "type" => 1,
17
+ "useragent" => Mage::helper('core/http')->getHttpUserAgent(),
18
+ "message" => "",
19
+ "url" => $url
20
+ );
21
+
22
+ $model = Mage::getModel('watchlog/watchlog')->load(0);
23
+ $model->setData($data);
24
+ $model->save();
25
+ }
26
+
27
+ public function loginFailed($observer) {
28
+ $url = Mage::app()->getRequest()->getRequestUri();
29
+ $login = $observer->getEvent()->getUserName();
30
+ $message = $observer->getEvent()->getException()->getMessage();
31
+
32
+ $ip = Mage::helper('core/http')->getRemoteAddr();
33
+
34
+ $data = array(
35
+ "login" => $login,
36
+ "ip" => $ip,
37
+ "date" => Mage::getModel('core/date')->gmtDate('Y-m-d H:i:s'),
38
+ "type" => 0,
39
+ "useragent" => Mage::helper('core/http')->getHttpUserAgent(),
40
+ "message" => $message,
41
+ "url" => $url
42
+ );
43
+
44
+ $model = Mage::getModel('watchlog/watchlog')->load(0);
45
+ $model->setData($data);
46
+ $model->save();
47
+ }
48
+
49
+ /**
50
+ * Purge the data in the table every 30 minutes
51
+ */
52
+ public function purgeData() {
53
+ $timestamp = Mage::getSingleton('core/date')->gmtTimestamp();
54
+ $histolength = Mage::getStoreConfig("watchlogpro/settings/history");
55
+ $delete_before = $timestamp - $histolength * 60 * 60 * 24;
56
+
57
+ if ($histolength != 0) {
58
+
59
+ $log = array();
60
+ $log[] = "-------------------- PURGE PROCESS --------------------";
61
+ $log[] = "current date : " . Mage::getSingleton('core/date')->gmtDate('Y-m-d H:i:s', $timestamp);
62
+ $log[] = "deleting row before : " . Mage::getSingleton('core/date')->gmtDate('Y-m-d H:i:s', $delete_before);
63
+
64
+ $resource = Mage::getSingleton('core/resource');
65
+ $watchlog = $resource->getTableName('watchlog');
66
+ $writeConnection = $resource->getConnection('core_write');
67
+ $query = "DELETE FROM " . $watchlog . " WHERE date < '" . Mage::getSingleton('core/date')->gmtDate('Y-m-d H:i:s', $delete_before) . "'";
68
+ $log[] = $query;
69
+ $writeConnection->query($query);
70
+
71
+ Mage::log("\n" . implode($log, "\n"), null, "Watchlog-cron.log");
72
+ }
73
+ }
74
+
75
+ public function sendReport() {
76
+ try {
77
+
78
+
79
+ $log = array();
80
+
81
+ $update = Mage::getStoreConfig("watchlogpro/settings/last_report");
82
+ $cronExpr = json_decode(Mage::getStoreConfig("watchlogpro/settings/cron"));
83
+ $cron['curent']['localDate'] = Mage::getSingleton('core/date')->date('l Y-m-d H:i:s');
84
+ $cron['curent']['gmtDate'] = Mage::getSingleton('core/date')->gmtDate('l Y-m-d H:i:s');
85
+ $cron['curent']['localTime'] = Mage::getSingleton('core/date')->timestamp();
86
+ $cron['curent']['gmtTime'] = Mage::getSingleton('core/date')->gmtTimestamp();
87
+
88
+
89
+ $cron['file']['localDate'] = Mage::getSingleton('core/date')->date('l Y-m-d H:i:s', $update);
90
+ $cron['file']['gmtDate'] = $update;
91
+ $cron['file']['localTime'] = Mage::getSingleton('core/date')->timestamp($update);
92
+ $cron['file']['gmtTime'] = strtotime($update);
93
+
94
+ /* Magento getGmtOffset() is bugged and doesn't include daylight saving time, the following workaround is used */
95
+ // date_default_timezone_set(Mage::app()->getStore()->getConfig('general/locale/timezone'));
96
+ // $date = new DateTime();
97
+ //$cron['offset'] = $date->getOffset() / 3600;
98
+ $cron['offset'] = Mage::getSingleton('core/date')->getGmtOffset("hours");
99
+
100
+ $log[] = "-------------------- REPORT PROCESS --------------------";
101
+
102
+ $log[] = ' * Last update : ' . $cron['file']['gmtDate'] . " GMT / " . $cron['file']['localDate'] . ' GMT+' . $cron['offset'];
103
+ $log[] = ' * Current date : ' . $cron['curent']['gmtDate'] . " GMT / " . $cron['curent']['localDate'] . ' GMT+' . $cron['offset'];
104
+
105
+ $i = 0;
106
+ $done = false;
107
+
108
+ foreach ($cronExpr->days as $d) {
109
+
110
+ foreach ($cronExpr->hours as $h) {
111
+ $time = explode(':', $h);
112
+ if (date('l', $cron['curent']['gmtTime']) == $d) {
113
+ $cron['tasks'][$i]['localTime'] = strtotime(Mage::getSingleton('core/date')->date('Y-m-d')) + ($time[0] * 60 * 60) + ($time[1] * 60);
114
+ $cron['tasks'][$i]['localDate'] = date('l Y-m-d H:i:s', $cron['tasks'][$i]['localTime']);
115
+ } else {
116
+ $cron['tasks'][$i]['localTime'] = strtotime("last " . $d, $cron['curent']['localTime']) + ($time[0] * 60 * 60) + ($time[1] * 60);
117
+ $cron['tasks'][$i]['localDate'] = date('l Y-m-d H:i:s', $cron['tasks'][$i]['localTime']);
118
+ }
119
+
120
+
121
+
122
+ if ($cron['tasks'][$i]['localTime'] >= $cron['file']['localTime'] && $cron['tasks'][$i]['localTime'] <= $cron['curent']['localTime'] && $done != true) {
123
+
124
+ $log[] = ' * Scheduled : ' . ($cron['tasks'][$i]['localDate'] . " GMT" . $cron['offset']);
125
+
126
+ /*
127
+ * app/locale/en_US/template/email/watchlog_report.html
128
+ */
129
+ $emailTemplate = Mage::getModel('core/email_template')->loadDefault('watchlog_report');
130
+ $date = Mage::getSingleton('core/date')->gmtDate("Y-m-d H:i:s", Mage::getSingleton('core/date')->gmtTimestamp() - Mage::getStoreConfig("watchlogpro/settings/report_period") * 86400);
131
+
132
+ $history = Mage::getModel("watchlog/watchlog")
133
+ ->getCollection()->addFieldToFilter('date', array('gteq' => $date));
134
+
135
+
136
+ $history->getSelect()
137
+ ->columns('COUNT(watchlog_id) as attempts')
138
+ ->columns('MAX(date) as date')
139
+ ->columns('SUM(IF(type=0,1,0)) as failed')
140
+ ->columns('SUM(IF(type=1,1,0)) as succeeded')
141
+ ->columns('SUM(IF(type=2,1,0)) as blocked')
142
+ ->order("SUM(IF(type=0,1,0)) DESC")
143
+ ->group("ip");
144
+
145
+
146
+
147
+ foreach ($history as $line) {
148
+
149
+ $emailTemplateVariables['log'][] = array(
150
+ "ip" => $line->getIp(),
151
+ "attempts" => $line->getAttempts(),
152
+ "date" => $line->getDate(),
153
+ "failed" => $line->getFailed(),
154
+ "succeeded" => $line->getSucceeded(),
155
+ "blocked" => $line->getBlocked(),
156
+ );
157
+ }
158
+
159
+
160
+
161
+ $emailTemplateVariables['days'] = Mage::getStoreConfig("watchlogpro/settings/report_period");
162
+
163
+ $processedTemplate = $emailTemplate->getProcessedTemplate($emailTemplateVariables);
164
+
165
+ foreach (explode(',', Mage::getStoreConfig("watchlogpro/settings/report_emails")) as $email) {
166
+ $mail = Mage::getModel('core/email')
167
+ ->setToEmail($email)
168
+ ->setBody($processedTemplate)
169
+ ->setSubject(Mage::getStoreConfig("watchlogpro/settings/report_title"))
170
+ ->setFromEmail($email)
171
+ ->setFromName('Magento | Watchlog')
172
+ ->setType('html');
173
+ $mail->send();
174
+ }
175
+
176
+ Mage::getConfig()->saveConfig("watchlogpro/settings/last_report", Mage::getSingleton("core/date")->gmtDate("Y-m-d H:i:s"), "default", "0");
177
+ $done = true;
178
+ }
179
+ $i++;
180
+ }
181
+ }
182
+ } catch (Exception $e) {
183
+ $log[] = ' * ERROR! ' . ($e->getMessage());
184
+ }
185
+ if (!$done)
186
+ $log[] = ' * SKIPPED!';
187
+
188
+
189
+ if (isset($_GET['wl']))
190
+ echo "<br/>" . implode($log, "<br/>");
191
+
192
+ Mage::log("\n" . implode($log, "\n"), null, "Watchlog-cron.log");
193
+ }
194
+
195
+ }
app/code/community/Wyomind/Watchlog/Model/System/Config/Source/Link.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Wyomind_Watchlog_Model_System_Config_Source_Link extends Mage_Adminhtml_Block_System_Config_Form_Field {
4
+
5
+ protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element) {
6
+
7
+ $html = '<a id="' . $element->getHtmlId() . '" ' . $element->serialize($element->getHtmlAttributes()) . '>' . $element->getEscapedValue() . "</a>\n";
8
+ $html.= $element->getAfterElementHtml();
9
+ return $html;
10
+ }
11
+
12
+
13
+ }
app/code/community/Wyomind/Watchlog/Model/Watchlog.php ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Wyomind_Watchlog_Model_Watchlog extends Mage_Core_Model_Abstract {
4
+
5
+ protected function _construct() {
6
+
7
+ $this->_init("watchlog/watchlog");
8
+ }
9
+
10
+ public function getSummary() {
11
+
12
+
13
+ $collection = Mage::getModel("watchlog/watchlog")->getCollection();
14
+ $collection->getSelect()
15
+ ->columns('COUNT(watchlog_id) as attempts')
16
+ ->columns('MAX(date) as date')
17
+ ->columns('SUM(IF(`type`=0,1,0)) as failed')
18
+ ->columns('SUM(IF(`type`=1,1,0)) as succeeded')
19
+ ->order("SUM(IF(`type`=0,1,0)) DESC")
20
+ ->group("ip");
21
+
22
+ return $collection;
23
+ }
24
+
25
+ public function getSummaryDay() {
26
+
27
+
28
+ $collection = Mage::getModel("watchlog/watchlog")->getCollection();
29
+
30
+ $collection->getSelect()
31
+ ->columns('COUNT(watchlog_id) as nb')
32
+ ->where("date >= '".Mage::getModel('core/date')->gmtDate('Y-m-d H:i:s')."' - interval 23 hour")
33
+ ->group("concat(hour(date))")
34
+ ->order("date asc")
35
+ ->group("type");
36
+
37
+
38
+ return $collection;
39
+ }
40
+
41
+ public function getSummaryMonth() {
42
+
43
+ $collection = Mage::getModel("watchlog/watchlog")->getCollection();
44
+
45
+ $collection->getSelect()
46
+ ->columns('COUNT(watchlog_id) as nb')
47
+ ->columns("CONCAT(year(date),'-',month(date),'-',day(date)) as date")
48
+ ->where("date > '".Mage::getModel('core/date')->gmtDate('Y-m-d H:i:s')."' - INTERVAL 30 DAY")
49
+ ->order("date asc")
50
+ ->group("concat(year(date),'-',month(date),'-',day(date))")
51
+ ->group("type");
52
+
53
+ return $collection;
54
+ }
55
+
56
+ }
app/code/community/Wyomind/Watchlog/controllers/Adminhtml/AdvancedController.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Wyomind_Watchlog_Adminhtml_AdvancedController extends Mage_Adminhtml_Controller_Action {
4
+
5
+ protected function _initAction() {
6
+ $this->loadLayout()->_setActiveMenu("watchlog/watchlog")->_addBreadcrumb(Mage::helper("adminhtml")->__("Watchlog Manager"), Mage::helper("adminhtml")->__("Watchlog Manager"));
7
+ return $this;
8
+ }
9
+
10
+ public function indexAction() {
11
+ $this->_title($this->__("Watchlog"));
12
+ $this->_title($this->__("Manager Watchlog"));
13
+
14
+ $this->_initAction();
15
+ $this->renderLayout();
16
+ }
17
+
18
+ public function purgeAction() {
19
+ $log = Mage::helper('watchlog')->purgeData();
20
+ $this->_redirect('*/*');
21
+ }
22
+
23
+
24
+
25
+ }
app/code/community/Wyomind/Watchlog/controllers/Adminhtml/BasicController.php ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Wyomind_Watchlog_Adminhtml_BasicController extends Mage_Adminhtml_Controller_Action {
4
+
5
+ protected function _initAction() {
6
+ $this->loadLayout()->_setActiveMenu("watchlog/watchlog")->_addBreadcrumb(Mage::helper("adminhtml")->__("Watchlog Manager"), Mage::helper("adminhtml")->__("Watchlog Manager"));
7
+ return $this;
8
+ }
9
+
10
+ public function indexAction() {
11
+ $this->_title($this->__("Watchlog"));
12
+ $this->_title($this->__("Manager Watchlog"));
13
+ $this->_initAction();
14
+ $this->renderLayout();
15
+ }
16
+
17
+ public function purgeAction() {
18
+ $log = Mage::helper('watchlog')->purgeData();
19
+ $this->_redirect('*/*');
20
+ }
21
+
22
+
23
+ public function deleteAction() {
24
+ if ($this->getRequest()->getParam("id") > 0) {
25
+ try {
26
+ $model = Mage::getModel("watchlog/watchlog");
27
+ $model->setId($this->getRequest()->getParam("id"))->delete();
28
+ Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Item was successfully deleted"));
29
+ $this->_redirect("*/*/");
30
+ } catch (Exception $e) {
31
+ Mage::getSingleton("adminhtml/session")->addError($e->getMessage());
32
+ $this->_redirect("*/*/edit", array("id" => $this->getRequest()->getParam("id")));
33
+ }
34
+ }
35
+ $this->_redirect("*/*/");
36
+ }
37
+
38
+ public function massRemoveAction() {
39
+ try {
40
+ $ids = $this->getRequest()->getParams('watchlolg_ids', array());
41
+ foreach ($ids['watchlog_ids'] as $id) {
42
+ $model = Mage::getModel("watchlog/watchlog");
43
+ $model->load($id)->delete();
44
+ }
45
+ Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Item(s) was successfully removed"));
46
+ } catch (Exception $e) {
47
+ Mage::getSingleton("adminhtml/session")->addError($e->getMessage());
48
+ }
49
+ $this->_redirect('*/*/');
50
+ }
51
+
52
+
53
+
54
+ }
app/code/community/Wyomind/Watchlog/etc/config.xml ADDED
@@ -0,0 +1,175 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Wyomind_Watchlog>
5
+ <version>1.0.0</version>
6
+ </Wyomind_Watchlog>
7
+ </modules>
8
+ <default>
9
+ <watchlogpro>
10
+ <license>
11
+ <version>1.0.0</version>
12
+ </license>
13
+ <settings>
14
+ <history>30</history>
15
+ <report>0</report>
16
+ <report_period>1</report_period>
17
+ <report_title>Watchlog report</report_title>
18
+ <last_report>2000-01-01 00:00:00</last_report>
19
+ </settings>
20
+ </watchlogpro>
21
+ </default>
22
+ <global>
23
+ <helpers>
24
+ <watchlog>
25
+ <class>Wyomind_Watchlog_Helper</class>
26
+ </watchlog>
27
+ </helpers>
28
+ <blocks>
29
+ <watchlog>
30
+ <class>Wyomind_Watchlog_Block</class>
31
+ </watchlog>
32
+ </blocks>
33
+ <models>
34
+ <watchlog>
35
+ <class>Wyomind_Watchlog_Model</class>
36
+ <resourceModel>watchlog_mysql4</resourceModel>
37
+ </watchlog>
38
+ <watchlog_mysql4>
39
+ <class>Wyomind_Watchlog_Model_Mysql4</class>
40
+ <entities>
41
+ <watchlog>
42
+ <table>watchlog</table>
43
+ </watchlog>
44
+ </entities>
45
+ </watchlog_mysql4>
46
+ </models>
47
+ <resources>
48
+ <watchlog_setup>
49
+ <setup>
50
+ <module>Wyomind_Watchlog</module>
51
+ </setup>
52
+ <connection>
53
+ <use>core_setup</use>
54
+ </connection>
55
+ </watchlog_setup>
56
+ <watchlog_write>
57
+ <connection>
58
+ <use>core_write</use>
59
+ </connection>
60
+ </watchlog_write>
61
+ <watchlog_read>
62
+ <connection>
63
+ <use>core_read</use>
64
+ </connection>
65
+ </watchlog_read>
66
+ </resources>
67
+ <events>
68
+ <admin_session_user_login_success>
69
+ <observers>
70
+ <wyomind_watchlog_observer>
71
+ <type>singleton</type>
72
+ <class>watchlog/observer</class>
73
+ <method>loginSuccess</method>
74
+ </wyomind_watchlog_observer>
75
+ </observers>
76
+ </admin_session_user_login_success>
77
+ <admin_session_user_login_failed>
78
+ <observers>
79
+ <wyomind_watchlog_observer>
80
+ <type>singleton</type>
81
+ <class>watchlog/observer</class>
82
+ <method>loginFailed</method>
83
+ </wyomind_watchlog_observer>
84
+ </observers>
85
+ </admin_session_user_login_failed>
86
+ </events>
87
+ <template>
88
+ <email>
89
+ <watchlog_report module="watchlog">
90
+ <label>watchlog_report</label>
91
+ <file>watchlog_report.html</file>
92
+ <type>html</type>
93
+ </watchlog_report>
94
+ </email>
95
+ </template>
96
+ </global>
97
+ <admin>
98
+ <routers>
99
+ <watchlog>
100
+ <use>admin</use>
101
+ <args>
102
+ <module>Wyomind_Watchlog</module>
103
+ <frontName>watchlog</frontName>
104
+ </args>
105
+ </watchlog>
106
+ </routers>
107
+ </admin>
108
+ <adminhtml>
109
+ <menu>
110
+ <system>
111
+ <children>
112
+ <watchlog module="watchlog">
113
+ <title>Watchlog</title>
114
+ <sort_order>1</sort_order>
115
+ <action>watchlog/adminhtml_basic</action>
116
+ </watchlog>
117
+ </children>
118
+ </system>
119
+ </menu>
120
+ <acl>
121
+ <resources>
122
+ <all>
123
+ <title>Allow Everything</title>
124
+ </all>
125
+ <admin>
126
+ <children>
127
+ <system>
128
+ <children>
129
+ <watchlog translate="title" module="watchlog">
130
+ <title>Watchlog</title>
131
+ </watchlog>
132
+ <config>
133
+ <children>
134
+ <watchlogpro translate="title" module="watchlog">
135
+ <title>Watchlog</title>
136
+ </watchlogpro>
137
+ </children>
138
+ </config>
139
+ </children>
140
+ </system>
141
+ </children>
142
+ </admin>
143
+ </resources>
144
+ </acl>
145
+ <layout>
146
+ <updates>
147
+ <watchlog>
148
+ <file>watchlog.xml</file>
149
+ </watchlog>
150
+ </updates>
151
+ </layout>
152
+ </adminhtml>
153
+ <crontab>
154
+ <jobs>
155
+ <watchlog_purge>
156
+ <schedule>
157
+ <cron_expr>*/30 * * * *</cron_expr>
158
+ </schedule>
159
+ <run>
160
+ <model>watchlog/observer::purgeData</model>
161
+ </run>
162
+ </watchlog_purge>
163
+ </jobs>
164
+ <jobs>
165
+ <watchlog_report>
166
+ <schedule>
167
+ <cron_expr>*/30 * * * *</cron_expr>
168
+ </schedule>
169
+ <run>
170
+ <model>watchlog/observer::sendReport</model>
171
+ </run>
172
+ </watchlog_report>
173
+ </jobs>
174
+ </crontab>
175
+ </config>
app/code/community/Wyomind/Watchlog/etc/system.xml ADDED
@@ -0,0 +1,127 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <tabs>
4
+ <WYOMIND translate="label">
5
+ <label>WYOMIND</label>
6
+ <sort_order>1000000</sort_order>
7
+ </WYOMIND>
8
+ </tabs>
9
+ <sections>
10
+ <watchlogpro translate="label">
11
+ <label>Watchlog</label>
12
+ <tab>WYOMIND</tab>
13
+ <frontend_type>text</frontend_type>
14
+ <sort_order>1000</sort_order>
15
+ <show_in_default>1</show_in_default>
16
+ <show_in_website>0</show_in_website>
17
+ <show_in_store>0</show_in_store>
18
+ <groups>
19
+ <license translate="label">
20
+ <label>License</label>
21
+ <frontend_type>text</frontend_type>
22
+ <sort_order>10</sort_order>
23
+ <show_in_default>1</show_in_default>
24
+ <show_in_website>0</show_in_website>
25
+ <show_in_store>0</show_in_store>
26
+ <fields>
27
+ <version translate="label comment">
28
+ <label>Extension version</label>
29
+ <frontend_type>text</frontend_type>
30
+ <frontend_model>Wyomind_Watchlog_Model_System_Config_Source_Link</frontend_model>
31
+ <sort_order>100</sort_order>
32
+ <show_in_default>1</show_in_default>
33
+ <show_in_website>0</show_in_website>
34
+ <show_in_store>0</show_in_store>
35
+ </version>
36
+ </fields>
37
+ </license>
38
+ <settings translate="label">
39
+ <label>Connection attempts history</label>
40
+ <frontend_type>text</frontend_type>
41
+ <sort_order>20</sort_order>
42
+ <show_in_default>1</show_in_default>
43
+ <show_in_website>0</show_in_website>
44
+ <show_in_store>0</show_in_store>
45
+ <fields>
46
+ <history translate="label comment">
47
+ <label>History lifetime in days</label>
48
+ <comment>
49
+ <![CDATA[<span class="notice">Enter 0 for unlimited life time</span>]]>
50
+ </comment>
51
+ <frontend_type>text</frontend_type>
52
+ <sort_order>10</sort_order>
53
+ <show_in_default>1</show_in_default>
54
+ <show_in_website>0</show_in_website>
55
+ <show_in_store>0</show_in_store>
56
+ </history>
57
+ <report translate="label comment">
58
+ <label>Send a periodical report</label>
59
+
60
+ <frontend_type>select</frontend_type>
61
+ <source_model>adminhtml/system_config_source_yesno</source_model>
62
+ <sort_order>20</sort_order>
63
+ <show_in_default>1</show_in_default>
64
+ <show_in_website>0</show_in_website>
65
+ <show_in_store>0</show_in_store>
66
+ </report>
67
+ <report_title translate="label comment">
68
+ <label>Report title</label>
69
+ <frontend_type>text</frontend_type>
70
+ <sort_order>30</sort_order>
71
+ <show_in_default>1</show_in_default>
72
+ <show_in_website>0</show_in_website>
73
+ <show_in_store>0</show_in_store>
74
+ <depends>
75
+ <report>1</report>
76
+ </depends>
77
+ </report_title>
78
+ <report_period translate="label comment">
79
+ <label>Period to report in days</label>
80
+ <comment>
81
+ <![CDATA[<span class="notice">Enter 0 for unlimited period</span>]]>
82
+ </comment>
83
+ <frontend_type>text</frontend_type>
84
+ <sort_order>30</sort_order>
85
+ <show_in_default>1</show_in_default>
86
+ <show_in_website>0</show_in_website>
87
+ <show_in_store>0</show_in_store>
88
+ <depends>
89
+ <report>1</report>
90
+ </depends>
91
+ </report_period>
92
+ <report_emails translate="label comment">
93
+ <label>Report recipients</label>
94
+ <comment>
95
+ <![CDATA[<span class="notice">Emails must be separated with a comma (,).</span>]]>
96
+ </comment>
97
+ <frontend_type>text</frontend_type>
98
+ <sort_order>40</sort_order>
99
+ <show_in_default>1</show_in_default>
100
+ <show_in_website>0</show_in_website>
101
+ <show_in_store>0</show_in_store>
102
+ <depends>
103
+ <report>1</report>
104
+ </depends>
105
+ </report_emails>
106
+ <cron translate="label comment">
107
+ <label>Report schedule</label>
108
+ <frontend_type>text</frontend_type>
109
+ <frontend_model>Wyomind_Watchlog_Block_Adminhtml_System_Config_Form_Field_Cron</frontend_model>
110
+ <sort_order>50</sort_order>
111
+ <show_in_default>1</show_in_default>
112
+ <show_in_website>0</show_in_website>
113
+ <show_in_store>0</show_in_store>
114
+ <depends>
115
+ <report>1</report>
116
+ </depends>
117
+ </cron>
118
+ </fields>
119
+ </settings>
120
+ </groups>
121
+ </watchlogpro>
122
+ </sections>
123
+ </config>
124
+
125
+
126
+
127
+
app/code/community/Wyomind/Watchlog/sql/watchlog_setup/mysql4-install-1.0.0.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $installer = $this;
4
+ $installer->startSetup();
5
+ $installer->run("
6
+ DROP TABLE IF EXISTS {$this->getTable('watchlog')};
7
+ ");
8
+
9
+ $sql="CREATE TABLE IF NOT EXISTS `{$this->getTable('watchlog')}` (
10
+ `watchlog_id` int(11) NOT NULL AUTO_INCREMENT,
11
+ `ip` varchar(15),
12
+ `date` datetime NOT NULL,
13
+ `login` varchar(200),
14
+ `useragent` varchar(1000),
15
+ `message` varchar(200),
16
+ `type` char(1),
17
+ `url` varchar(500),
18
+ PRIMARY KEY (`watchlog_id`)
19
+ )";
20
+
21
+ $installer->run($sql);
22
+
23
+ $installer->endSetup();
24
+
app/design/adminhtml/default/default/layout/watchlog.xml ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <watchlog_adminhtml_basic_index>
4
+ <reference name="content">
5
+ <block type="watchlog/adminhtml_basic" name="basic" />
6
+ </reference>
7
+ </watchlog_adminhtml_basic_index>
8
+
9
+ <watchlog_adminhtml_advanced_index>
10
+ <reference name="content">
11
+ <block type="watchlog/adminhtml_advanced" name="advanced" />
12
+ </reference>
13
+ </watchlog_adminhtml_advanced_index>
14
+ </layout>
app/design/adminhtml/default/default/template/watchlog/advanced.phtml ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ <?php
3
+ echo $this->getLayout()->createBlock('watchlog/adminhtml_chart')->toHtml();
4
+ ?>
5
+
6
+
7
+
8
+
9
+
10
+ <div class="content-header">
11
+ <table cellspacing="0" style="width:50%; float:left">
12
+ <tbody><tr>
13
+ <td style="width:50%;"><h3 class="icon-head head-adminhtml-watchlog">
14
+ <?php if (Mage::getStoreConfig("watchlogpro/settings/history") != 0) : ?>
15
+ <?php echo $this->__("Summary of the last") . " " . Mage::getStoreConfig("watchlogpro/settings/history") . " " . $this->__("days"); ?>
16
+ <?php else: ?>
17
+ <?php echo $this->__("Summary view"); ?>
18
+ <?php endif; ?>
19
+ </h3></td>
20
+ <td class="form-buttons"></td>
21
+ </tr>
22
+ </tbody></table>
23
+
24
+ <button style="float:right" onclick="document.location = '<?php echo $this->getUrl("watchlog/adminhtml_basic/"); ?>'" class="scalable " type="button" id="id_ac70c58d4253e1185f2c709235b0c991"><span><span><span><?php echo $this->__("Switch to the detailled view"); ?></span></span></span></button>
25
+
26
+ </div>
27
+
28
+ <?php
29
+ echo $this->getGridHtml();
app/design/adminhtml/default/default/template/watchlog/basic.phtml ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ <?php
3
+ echo $this->getLayout()->createBlock('watchlog/adminhtml_chart')->toHtml();
4
+ ?>
5
+
6
+
7
+
8
+ <div class="content-header">
9
+ <table cellspacing="0" style="width:50%; float:left">
10
+ <tbody><tr>
11
+ <td style="width:50%;"><h3 class="icon-head head-adminhtml-watchlog">
12
+ <?php if (Mage::getStoreConfig("watchlogpro/settings/history") != 0): ?>
13
+ <?php echo $this->__("Details of the last") . " " . Mage::getStoreConfig("watchlogpro/settings/history") . " " . $this->__("days"); ?>
14
+ <?php else: ?>
15
+ <?php echo $this->__("Detailed view"); ?>
16
+ <?php endif; ?>
17
+ </h3></td>
18
+ <td class="form-buttons"></td>
19
+ </tr>
20
+ </tbody>
21
+ </table>
22
+
23
+ <button style="float:right" onclick="document.location = '<?php echo $this->getUrl("watchlog/adminhtml_advanced/"); ?>'" class="scalable " type="button" id="id_ac70c58d4253e1185f2c709235b0c991"><span><span><span><?php echo $this->__("Switch to the summarized view"); ?></span></span></span></button>
24
+
25
+ </div>
26
+
27
+ <?php
28
+ echo $this->getGridHtml();
app/design/adminhtml/default/default/template/watchlog/chart.phtml ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="content-header">
2
+ <table cellspacing="0" style="width:50%; float:left">
3
+ <tbody><tr>
4
+ <td style="width:50%;"><h3 class="icon-head head-adminhtml-watchlog"><?php echo $this->__("Watchlog charts"); ?></h3></td>
5
+ <td class="form-buttons"></td>
6
+ </tr>
7
+ </tbody>
8
+ </table>
9
+ </div>
10
+
11
+ <script type="text/javascript"
12
+ src="https://www.google.com/jsapi?autoload={'modules':[{'name':'visualization','version':'1','packages':['corechart']}]}">
13
+ </script>
14
+
15
+ <?php
16
+ $data = $this->getChartDataSummaryMonth();
17
+ $data_day = $this->getChartDataSummaryDay();
18
+ ?>
19
+
20
+ <script type="text/javascript">
21
+ google.setOnLoadCallback(drawChart);
22
+ function drawChart() {
23
+
24
+
25
+ var options = {
26
+ title: 'Logging attempts (last 30 days)',
27
+ legend: { position: 'bottom' },
28
+ series: {
29
+ 0: { color: 'darkgreen' },
30
+ 1: { color: 'red' },
31
+ 2: { color: 'orange' },
32
+ },
33
+ hAxis : {
34
+ format : 'd/M/y'
35
+ },
36
+ tooltip: {isHtml: false},
37
+ pointSize : 5,
38
+ };
39
+
40
+ var formatter = new google.visualization.DateFormat({pattern: "d/M/y"});
41
+
42
+ // last 30 days
43
+ var data = google.visualization.arrayToDataTable(<?php echo str_replace(array('"#', '#"'), '', json_encode($data)); ?>);
44
+ var chart = new google.visualization.LineChart(document.getElementById('summary'));
45
+ formatter.format(data, 0);
46
+ chart.draw(data, options);
47
+
48
+
49
+ // last 24 hours
50
+
51
+ var options = {
52
+ title: 'Logging attempts (last 24 hours)',
53
+ legend: { position: 'bottom' },
54
+ series: {
55
+ 0: { color: 'darkgreen' },
56
+ 1: { color: 'red' },
57
+ 2: { color: 'orange' },
58
+ },
59
+ hAxis : {
60
+ format : 'h:00 a'
61
+ },
62
+ tooltip: {isHtml: false},
63
+ pointSize : 5
64
+ };
65
+
66
+ var formatter = new google.visualization.DateFormat({pattern: "d/M/y - h:00 a"});
67
+ var data_day = google.visualization.arrayToDataTable(<?php echo str_replace(array('"#', '#"'), '', json_encode($data_day)); ?>);
68
+ var chart = new google.visualization.LineChart(document.getElementById('summary_day'));
69
+ formatter.format(data_day, 0);
70
+ chart.draw(data_day, options);
71
+ }
72
+ </script>
73
+ <div id="summary" style="width: 49%; height: 500px; float:left;"></div>
74
+
75
+ <div id="summary_day" style="width: 49%; height: 500px; display:inline-block"></div>
app/design/adminhtml/default/default/template/watchlog/email/report.phtml ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ <table border='1' cellmargin='0' cellpaddin='2'>
3
+ <thead>
4
+ <tr>
5
+ <td align="center" width='150'><b>IP</b></td>
6
+ <td align="center" width='100'><b>Date</b></td>
7
+ <td align="center" width='100'><b>Total Attempts</b></td>
8
+ <td align="center" width='100'><b>Failed attemtps</b></td>
9
+ <td align="center" width='100'><b>Succeeded attemtps</b></td>
10
+ <td align="center" width='100'><b>Blocked attemtps</b></td>
11
+
12
+ </tr>
13
+ </thead>
14
+ <tbody>
15
+ <?php foreach ($this->getLog() as $data): ?>
16
+ <tr>
17
+ <td align="right"><?php echo ($data['ip']) ?> </td>
18
+ <td align="right"><?php echo Mage::getSingleton('core/date')->date("m/d/Y", strtotime($data['date'])) ?></td>
19
+ <td align="right"><?php echo $data['attempts'] ?></td>
20
+ <td align="right"><?php echo $data['failed'] ?></td>
21
+ <td align="right"><?php echo $data['succeeded'] ?></td>
22
+ <td align="right"><?php echo $data['blocked'] ?></td>
23
+ </tr>
24
+ <?php endforeach; ?>
25
+ </tbody>
26
+
27
+ </table>
28
+
29
+
app/etc/modules/Wyomind_Watchlog.xml ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Wyomind_Watchlog>
5
+ <active>true</active>
6
+ <codePool>community</codePool>
7
+ <version>1.0.0</version>
8
+ </Wyomind_Watchlog>
9
+ </modules>
10
+ </config>
app/locale/en_US/template/email/watchlog_report.html ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <!--@subject ActiveCodeline custom email module @-->
2
+
3
+ <div>
4
+ <h1>Here are the connection attempts for the last {{var days}} day(s).</h1>
5
+ {{block type='core/template' area='adminhtml' template='watchlog/email/report.phtml' log=$log}}
6
+ </div>
package.xml ADDED
@@ -0,0 +1,125 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>Wyomind_WatchLog</name>
4
+ <version>1.0.0</version>
5
+ <stability>stable</stability>
6
+ <license>Commercial</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>Wyomind Watchlog extension</summary>
10
+ <description>Wyomind Watchlog extension</description>
11
+ <notes>test</notes>
12
+ <authors>
13
+ <author>
14
+ <name>Wyomind</name>
15
+ <user>Watchlog</user>
16
+ <email>contact@wyomind.com</email>
17
+ </author>
18
+ </authors>
19
+ <date>2015-04-06</date>
20
+ <time>11:20:32</time>
21
+ <contents>
22
+ <target name="magecommunity">
23
+ <dir name="Wyomind">
24
+ <dir name="Watchlog">
25
+ <dir name="Block">
26
+ <dir name="Adminhtml">
27
+ <dir name="Advanced">
28
+ <file name="Grid.php" hash="ec2be21058bb8bffb2d859fe47d83038"/>
29
+ </dir>
30
+ <file name="Advanced.php" hash="e5e5a813508b0b72a2061297a936ce81"/>
31
+ <dir name="Basic">
32
+ <file name="Grid.php" hash="b6a78230ba28fbcee4d307ad38e840a9"/>
33
+ </dir>
34
+ <file name="Basic.php" hash="03f04c46cdb5077733cc417c0d10bd72"/>
35
+ <file name="Chart.php" hash="37d73fc3aff1a5f8c1fe42f96ce31a8b"/>
36
+ <dir name="Renderer">
37
+ <file name="Ip.php" hash="5bd831a03c1c6400e4fdaf870c68fc31"/>
38
+ <file name="Status.php" hash="bf96de45d6a88ae4b2d4ac3517923ad5"/>
39
+ </dir>
40
+ <dir name="System">
41
+ <dir name="Config">
42
+ <dir name="Form">
43
+ <dir name="Field">
44
+ <file name="Cron.php" hash="c6b2cfc1988c6517920e6b9b150ba6ae"/>
45
+ </dir>
46
+ </dir>
47
+ </dir>
48
+ </dir>
49
+ </dir>
50
+ </dir>
51
+ <dir name="controllers">
52
+ <dir name="Adminhtml">
53
+ <file name="AdvancedController.php" hash="0b8800a3a1fc33e7ebb57e2b3d2ebaf6"/>
54
+ <file name="BasicController.php" hash="e56ce29ba89c81e1d7aac1084af21961"/>
55
+ </dir>
56
+ </dir>
57
+ <dir name="etc">
58
+ <file name="config.xml" hash="3fc965b8995cfa6c892ae1951ca7dc2b"/>
59
+ <file name="system.xml" hash="401cd5b8c13f9c092f2838172da714ff"/>
60
+ </dir>
61
+ <dir name="Helper">
62
+ <file name="Data.php" hash="ee75b0a1f3a8b8e02fb318c7761d1825"/>
63
+ </dir>
64
+ <dir name="Model">
65
+ <dir name="Mysql4">
66
+ <dir name="Watchlog">
67
+ <file name="Collection.php" hash="9d50aa0ce6b7ea5c472832c89f822276"/>
68
+ </dir>
69
+ <file name="Watchlog.php" hash="091d0b82dabc51de01108b29ac6f1f2b"/>
70
+ </dir>
71
+ <file name="Observer.php" hash="c81d741df5284b0412531d8d5ebfefcd"/>
72
+ <dir name="System">
73
+ <dir name="Config">
74
+ <dir name="Source">
75
+ <file name="Link.php" hash="ddf42490323e314f86e608f0239ff036"/>
76
+ </dir>
77
+ </dir>
78
+ </dir>
79
+ <file name="Watchlog.php" hash="7b4b8e7b838ba59c1aa80e3e2e11eaf3"/>
80
+ </dir>
81
+ <dir name="sql">
82
+ <dir name="watchlog_setup">
83
+ <file name="mysql4-install-1.0.0.php" hash="e684d06971d0258c94cf92f094dea1cd"/>
84
+ </dir>
85
+ </dir>
86
+ </dir>
87
+ </dir>
88
+ </target>
89
+ <target name="magedesign">
90
+ <dir name="adminhtml">
91
+ <dir name="default">
92
+ <dir name="default">
93
+ <dir name="layout">
94
+ <file name="watchlog.xml" hash="5128504499f65e82c7fad74ab0783394"/>
95
+ </dir>
96
+ <dir name="template">
97
+ <dir name="watchlog">
98
+ <file name="advanced.phtml" hash="87761a8bb08926299cbb2abae2b7f25d"/>
99
+ <file name="basic.phtml" hash="5f31f62449b9dc014975f4b9c33b1fd7"/>
100
+ <file name="chart.phtml" hash="d310e9a644ca2b2c7c0740a47cb6e0c4"/>
101
+ <dir name="email">
102
+ <file name="report.phtml" hash="8fbbc89b71371cbd73478582c9c41be8"/>
103
+ </dir>
104
+ </dir>
105
+ </dir>
106
+ </dir>
107
+ </dir>
108
+ </dir>
109
+ </target>
110
+ <target name="mageetc">
111
+ <dir name="modules">
112
+ <file name="Wyomind_Watchlog.xml" hash="45876d11d4021326439587a7a5fc3f86"/>
113
+ </dir>
114
+ </target>
115
+ </contents>
116
+ <compatible/>
117
+ <dependencies>
118
+ <required>
119
+ <php>
120
+ <min>5.0.0</min>
121
+ <max>6.0.0</max>
122
+ </php>
123
+ </required>
124
+ </dependencies>
125
+ </package>