diff --git a/RELEASE b/RELEASE index b8c896405..f968b36c7 100644 --- a/RELEASE +++ b/RELEASE @@ -1 +1 @@ -0.5.4 rev 3481 +0.5.4 rev 3483 diff --git a/config/alter.ini b/config/alter.ini index 554755395..d8e6cc13f 100644 --- a/config/alter.ini +++ b/config/alter.ini @@ -57,7 +57,7 @@ NMCHANGE=0 ;Highlight rows in online module ONLINE_LIGHTER=1 ;OpenPayz support -OPENPAYZ_SUPPORT=1 +OPENPAYZ_SUPPORT=0 ;OpenPayz manual mode? OPENPAYZ_MANUAL=1 ;OpenPayz cash type diff --git a/modules/general/openpayz/index.php b/modules/general/openpayz/index.php index ba47b07b1..69d2b6364 100755 --- a/modules/general/openpayz/index.php +++ b/modules/general/openpayz/index.php @@ -23,6 +23,42 @@ function zb_OPGetCount() { } + function zb_OPShowGraphs() { + $query="SELECT * from `op_transactions` ORDER by `date` ASC"; + $all= simple_queryall($query); + $psysdata=array(); + $result= wf_Link('?module=openpayz', __('Back'), true, 'ubButton'); + if (!empty($all)) { + foreach ($all as $io=>$each) { + $timestamp= strtotime($each['date']); + $date= date("Y-m-d",$timestamp); + if (isset($psysdata[$each['paysys']][$date]['count'])) { + $psysdata[$each['paysys']][$date]['count']++; + $psysdata[$each['paysys']][$date]['summ']=$psysdata[$each['paysys']][$date]['summ']+$each['summ']; + } else { + $psysdata[$each['paysys']][$date]['count']=1; + $psysdata[$each['paysys']][$date]['summ']=$each['summ']; + } + } + } + + if (!empty($psysdata)) { + foreach ($psysdata as $psys=>$opdate) { + $gdata=__('Date').','.__('Count').','.__('Cash')."\n"; + foreach ($opdate as $datestamp=>$optrans) { + $gdata.=$datestamp.','.$optrans['count'].','.$optrans['summ']."\n"; + } + + $result.=wf_tag('div', false, 'dashtask', ''); + $result.=wf_tag('span').$psys.wf_tag('span',true).wf_delimiter(); + $result.= wf_Graph($gdata, '600', '200',false); + $result.=wf_tag('div',true); + } + + } + show_window(__('Graphs'), $result); + } + function web_OPShowTransactions() { global $alter_conf; $perpage=100; @@ -97,7 +133,8 @@ function web_OPShowTransactions() { } $result= wf_TableBody($rows, '100%', '0', 'sortable'); $result.=$paginator; - show_window(__('OpenPayz transactions'),$result); + $graphs= wf_Link('?module=openpayz&graphs=true', wf_img('skins/icon_stats.gif',__('Graphs')), false, ''); + show_window(__('OpenPayz transactions').' '.$graphs,$result); } function zb_OPTransactionSetProcessed($transactionid) { @@ -143,41 +180,13 @@ function zb_OPTransactionGetData($transactionid) { } } - function zb_OPShowGraphs() { - $curyear=date("Y"); - //$query="SELECT * from `op_transactions` WHERE `date` LIKE '".$curyear."-%'"; - $query="SELECT * from `op_transactions`"; - $all= simple_queryall($query); - $psysdata=array(); - if (!empty($all)) { - foreach ($all as $io=>$each) { - $timestamp= strtotime($each['date']); - $date= date("Y-m",$timestamp); - // $date='2014'; - if (isset($psysdata[$each['paysys']][$date]['count'])) { - $psysdata[$each['paysys']][$date]['count']++; - $psysdata[$each['paysys']][$date]['summ']=$psysdata[$each['paysys']][$date]['summ']+$each['summ']; - } else { - $psysdata[$each['paysys']][$date]['count']=1; - $psysdata[$each['paysys']][$date]['summ']=$each['summ']; - } - } - } - debarr($psysdata); - if (!empty($psysdata)) { - - - foreach ($psysdata as $psys=>$opdate) { - foreach ($opdate as $datestamp=>$optrans) { - - } - - } - - } - } - zb_OPShowGraphs(); + + +if (!wf_CheckGet(array('graphs'))) { web_OPShowTransactions(); +} else { + zb_OPShowGraphs(); +} } else { diff --git a/modules/general/zbsannouncements/index.php b/modules/general/zbsannouncements/index.php index 6e9f9140b..3f0a55d63 100644 --- a/modules/general/zbsannouncements/index.php +++ b/modules/general/zbsannouncements/index.php @@ -25,7 +25,7 @@ public function __construct() { */ protected function loadData() { - $query = "SELECT * from `zbsannouncements` ORDER by `id` ASC;"; + $query = "SELECT * from `zbsannouncements` ORDER by `id` DESC;"; $all = simple_queryall($query); if (!empty($all)) { foreach ($all as $io => $each) { diff --git a/userstats/languages/russian/lang.php b/userstats/languages/russian/lang.php index a1fff548e..042c6ae86 100755 --- a/userstats/languages/russian/lang.php +++ b/userstats/languages/russian/lang.php @@ -180,5 +180,6 @@ $lang['def']['Announcements'] = 'Объявления'; $lang['def']['Do not have any announcements.'] = 'На данный момент нету никаких объявлений.'; $lang['def']['Some announcements is available'] = 'Доступны важные объявления'; +$lang['def']['This module is disabled'] = 'Этот модуль сейчас отключен'; ?> \ No newline at end of file diff --git a/userstats/languages/ukrainian/lang.php b/userstats/languages/ukrainian/lang.php index 2bf593bf5..e5f8e21a6 100755 --- a/userstats/languages/ukrainian/lang.php +++ b/userstats/languages/ukrainian/lang.php @@ -182,4 +182,6 @@ $lang['def']['Announcements'] = 'Оголошення'; $lang['def']['Do not have any announcements.'] = 'На даний момент немає жодних оголошень.'; $lang['def']['Some announcements is available'] = 'Доступні важливі оголошення'; +$lang['def']['This module is disabled'] = 'Цей модуль зараз вимкнено'; + ?> diff --git a/userstats/modules/general/announcements/index.php b/userstats/modules/general/announcements/index.php index 0abdcacbd..189e59115 100644 --- a/userstats/modules/general/announcements/index.php +++ b/userstats/modules/general/announcements/index.php @@ -6,7 +6,7 @@ function zbs_AnnouncementsShow() { - $query="SELECT * from `zbsannouncements` WHERE `public`='1'"; + $query="SELECT * from `zbsannouncements` WHERE `public`='1' ORDER by `id` DESC"; $all= simple_queryall($query); $result=''; if (!empty($all)) { @@ -31,6 +31,10 @@ function zbs_AnnouncementsShow() { show_window('',$result); } - +if ($us_config['AN_ENABLED']) { zbs_AnnouncementsShow(); +} else { + show_window(__('Sorry'), __('This module is disabled')); +} + ?> \ No newline at end of file