|
Event order
|
| Chibanga |
Posted on 10-06-2012 16:50
|

Junior Member

Posts: 17
Joined: 12/07/2009
|
I have a event panel and i want to be order by table: tnpm9496_aw_ec_events column:ev_start_time
pls help
panel:
Code<?php
if(!defined('IN_FUSION')) {
die;
}
require_once(INFUSIONS.'aw_ecal_panel/include/core.php');
/****************************************************************************
* FUNCS
*/
if(!function_exists('awec_post_process_events')) {
function awec_post_process_events(&$events, &$out)
{
global $ec_today, $ec_tomorrow, $locale, $awec_settings;
$count = 0;
$out = array(
'today' => array(),
'tomorrow' => array(),
'others' => array(),
);
$current = 'others';
$path_event = INFUSIONS.'aw_ecal_panel/view_event.php?id=';
$path_birthday = INFUSIONS.'aw_ecal_panel/birthday.php?id=';
$show_details = ($awec_settings['show_today_in_panel'] ? true : false);
foreach($events as $year => $y_data) {
ksort($y_data, SORT_NUMERIC);
foreach($y_data as $month => $m_data) {
ksort($m_data, SORT_NUMERIC);
$today_month = ($ec_today['mon']==$month && $ec_today['year']==$year);
$tomorrow_month = ($ec_tomorrow['mon']==$month && $ec_tomorrow['year']==$year);
foreach($m_data as $mday => $d_data) {
if($today_month && $ec_today['mday']==$mday) {
$current = 'today';
} else if($tomorrow_month && $ec_tomorrow['mday']==$mday) {
$current = 'tomorrow';
} else {
$current = 'others';
}
foreach($d_data as $ev) {
$item = '';
if($current!='others') {
if($ev['start_time']) {
$item .= $ev['start_time'];
if($ev['end_time']) {
$item .= '-'.$ev['end_time'];
}
$item .= ' ';
}
} else {
$item .= awec_format_****ing_date($year,
$month, $mday).' ';
}
if($ev['is_birthday']) {
$path = $path_birthday.$ev['user_id'];
} else {
$path = $path_event.$ev['event_id'];
}
$item .= '<a href="'.$path.'">'
.$ev['ev_title'].'</a>';
if($show_details && $current=='today') {
$body = parseubb($ev['ev_body']);
$body = explode(stripinput(AWEC_BREAK), $body);
if(count($body)>1) {
$body[0] .= ' <a href="'.$path.'">'.$locale['EC207'].'</a>';
}
$item .= '<br /><span class="small2">'.$body[0].'</span>';
}
$out[$current][] = $item;
++$count;
}
}
}
}
return $count;
}
}
/****************************************************************************
* GUI
*/
opensidex("Today freerolls", "off");
$path = INFUSIONS.'aw_ecal_panel';
if(iMEMBER && false) {
echo '
<ul>';
if(iAWEC_POST) {
echo '
<li><a href="'.$path.'/edit_event.php">'.$locale['EC200'].'</a></li>';
}
echo '
<li><a href="'.$path.'/my_events.php">'.$locale['EC204'].'</a></li>
<li><a href="'.$path.'/my_logins.php">'.$locale['EC206'].'</a></li>';
if(iSUPERADMIN) {
echo '
<li><a href="'.$path.'/admin.php">'.$locale['EC700'].'</a></li>';
}
echo '
</ul>';
}
if(iAWEC_ADMIN
&& ff_db_count("(*)", AWEC_DB_EVENTS, "(ev_status='".AWEC_PENDING."')"))
{
echo '
<div style="text-align:center;">
<p>
<strong><a href="'.$path.'/new_events.php">'.$locale['EC203'].'</a></strong>
</p>
</div>';
}
/*
* show next x days
*/
if($awec_settings['next_days_in_panel']) {
$from_time = $awec_now;
$to_time = $from_time+($awec_settings['next_days_in_panel']-1)*86400;
$events = array();
$needle = array(
'from' => date('Y-m-d', $from_time),
'to' => date('Y-m-d', $to_time),
);
awec_get_events($needle, $events, false);
$out = array();
$count = awec_post_process_events($events, $out);
if(!$count) {
echo '
<p>
<span class="small2">'.$locale['awec_no_events'].'</span>
</p>';
}
$more = 0;
foreach($out as $type => $content) {
if(!count($content)) {
continue;
}
if($type!='others' || $more) {
echo '
<strong>'.$locale['EC209'][$type].':</strong>';
}
echo '
<ul>
<li>'.implode("</li>\n\t<li>", $content).'</li>
</ul>';
++$more;
}
}
echo '<strong>Help us by submiting your freerolls: <a href="http://www.tugasnopoker.com/Poker/forum/viewforum.php?forum_id=2">SPECIAL</a> | <a href="http://www.tugasnopoker.com/Poker/forum/viewforum.php?forum_id=35">DAILY</a> | <a href="http://www.tugasnopoker.com/Poker/forum/viewforum.php?forum_id=60">WEEKLY</a> | <a href="http://www.tugasnopoker.com/Poker/forum/viewforum.php?forum_id=68">MONTHLY</a></strong>
';
closesidex();
?>
|
| |
|
|
| wibix |
Posted on 10-06-2012 17:39
|

Member

Posts: 73
Joined: 21/11/2005
|
that should already be the case. it is not? |
| |
|
|
| Chibanga |
Posted on 10-06-2012 17:48
|

Junior Member

Posts: 17
Joined: 12/07/2009
|
no if you visit www.tugasnopoker.... you can see its not order
00:00 Carbon poker - Pokercam weekly freeroll
12:00 True Poker - Freeroll Super Series
18:00 Poker MIRA - Chek-Reis Freeroll
19:02 888 Poker - $1000 Dia de Portugal Freeroll
17:30 Ladbrokes Poker - Ladbrokes Poker Social Series
18:00 24h Poker - GT500 Texas Freeroll
18:00 Carbon poker- World Series Tavern Poker's Sunday
18:30 Ladbrokes - Pokerstrategy Daily €100 freeroll
19:00 Betsson - Omaha $ 50 Freeroll
19:00 *Comeon Poker - Reloaders Freeroll*
19:19 MyBet - mouz.CardCoaches Sonntagsevent
20:00 PokerMambo - Weekly 150€ Freeroll
20:00 *PaddyPowerPoker - Power One Freeroll*
21:00 LadBrokes Poker - BettingPro Euro 2012 Freeroll
21:00 *888poker - Liga del Jugón Master*
21:30 BwinPoker - $1.000 Added Freeroll
almost all are order but some dosent |
| |
|
|
| wibix |
Posted on 11-06-2012 17:16
|

Member

Posts: 73
Joined: 21/11/2005
|
i see. assume it has something to do with the recurring events but could not reproduce at home. which of the events are recurring and how? |
| |
|
|
| Chibanga |
Posted on 12-06-2012 20:45
|

Junior Member

Posts: 17
Joined: 12/07/2009
|
Look today events 12-06-2012:
repeted daily 10.06.2012 12:00 True Poker - Freeroll Super Series
repeted daily 10.06.2012 16:00 BwinPoker - $1.000 Added Freeroll
repeted daily 10.06.2012 18:00 24h Poker - GT500 Texas Freeroll
repeted daily 10.06.2012 18:30 Ladbrokes - Pokerstrategy Daily €100 freeroll
repeted daily 10.06.2012 19:00 Betsson - Omaha $ 50 Freeroll
repeted daily 10.06.2012 21:30 BwinPoker - $1.000 Added Freeroll
repeted daily 11.06.2012 17:30-21:30 Betclic - $50 Freeroll
repeted daily 11.06.2012 to 31.12.2012 18:00 Bestpoker - $100 Freeroll
repeted daily 11.06.2012 19:00 Casinoeuro - 50$ Omaha
repeted daily 11.06.2012 to 19.06.2012 19:30 *Pokeridol - Xbox Freeroll Qualiffier*
00:00 Betraiser - Facebook Tuesdays
19:00 *SmartLive Poker/GuruPlay Poker - Twitter Tuesday*
21:00 Lotus Poker - ua.Championat.com
repeted daily 12.06.2012 to 31.12.2012 19:00 Casinoeuro - 100$ Texas Freeroll
21:00 Offsidebet - Pokerleague $100 RB |
| |
|
|
| wibix |
Posted on 13-06-2012 17:13
|

Member

Posts: 73
Joined: 21/11/2005
|
ok, now i could reproduce it. i see whats wrong. i ll try to fix it...
Merged on Jun 18 2012 at 19:10:19:
pls try the attached file.
wibix attached the following file:
Edited by wibix on 18-06-2012 18:11
|
| |
|
|
| Chibanga |
Posted on 18-06-2012 23:53
|

Junior Member

Posts: 17
Joined: 12/07/2009
|
wibix wrote:
ok, now i could reproduce it. i see whats wrong. i ll try to fix it...
Merged on Jun 18 2012 at 19:10:19:
pls try the attached file.
no, not right order see:
18:30 Pkr poker - $20 Freeroll Facebook (Special)
12.06.2012 19:00 DAILY - CasinoEuro - 100$ Texas Freeroll
21:00 *Offsidebet - Pokerleague $50 OPP*
21:00 Everest Poker - Liga Estrela do Męs
21:45 *iGame - PokerPT.com 6-max*
21:30 *iGame - PokerPT.com 6-max*
12.06.2012 19:00-22:00 DAILY - Betclic - $100 Freeroll
11.06.2012 18:00 DAILY - Bestpoker - $100 Freeroll
10.06.2012 18:00 DAILY - 24h Poker - GT500 Texas Freeroll
10.06.2012 16:00 DAILY - BwinPoker - $1.000 Added Freeroll
10.06.2012 18:30 DAILY - Ladbrokes - Pokerstrategy Daily €100 freeroll
10.06.2012 19:00 DAILY - Betsson OR CasinoEuro - Omaha $ 50 Freeroll
11.06.2012 17:30-21:30 DAILY - Betclic - $50 Freeroll
10.06.2012 21:30 DAILY - BwinPoker - $1.000 Added Freeroll
10.06.2012 12:00 DAILY - True Poker - Freeroll Super Series
it should order only by time, by the way it wasent the aw_ecal_panel but the aw_ecal_next_panel that i wanted. Its possible to put category name before the event and on the top a dropdown box with event selector? that would be great... |
| |
|
|
| wibix |
Posted on 19-06-2012 17:13
|

Member

Posts: 73
Joined: 21/11/2005
|
aw_ecal_next_panel -- aahh -- check out the attachment.
categories: dropdown box with event selector? does not understand that
wibix attached the following file:
|
| |
|
|
| Chibanga |
Posted on 19-06-2012 18:40
|

Junior Member

Posts: 17
Joined: 12/07/2009
|
wibix wrote:
aw_ecal_next_panel -- aahh -- check out the attachment.
categories: dropdown box with event selector? does not understand that
No, not right order time
see:
Today:
21:00 WEEKLY - Offsidebet - Pokerleague $100 RB
12.06.2012 19:00 DAILY - CasinoEuro - 100$ Texas Freeroll
18:00 Trimori Poker - Trimori Club Freeroll
18:30 Pkr poker - $100 added Facebook Tournament
21:00 TitanPoker - Liga Estrela do Męs
19:00 *SmartLive Poker / Guru Poker - Twitter Tuesdays*
12.06.2012 19:00-22:00 DAILY - Betclic - $100 Freeroll
11.06.2012 18:00 DAILY - Bestpoker - $100 Freeroll
10.06.2012 18:00 DAILY - 24h Poker - GT500 Texas Freeroll
10.06.2012 16:00 DAILY - BwinPoker - $1.000 Added Freeroll
10.06.2012 18:30 DAILY - Ladbrokes - Pokerstrategy Daily €100 freeroll
10.06.2012 19:00 DAILY - Betsson OR CasinoEuro - Omaha $ 50 Freeroll
11.06.2012 17:30-21:30 DAILY - Betclic - $50 Freeroll
10.06.2012 21:30 DAILY - BwinPoker - $1.000 Added Freeroll
10.06.2012 12:00 DAILY - True Poker - Freeroll Super Series
Tomorrow:
18:30 WEEKLY - dbet Poker - 6 x €500
21:00 WEEKLY - *Offsidebet - Pokerleague $50 OPP*
20:30 Pokeridol - Xbox Final Freeroll
23:00 Pokertime - WickedWednesday500
sorry 
dropdown box with category selector and the category name befor the Event like this
21:00 - Category - Offsidebet - Pokerleague $100 RB |
| |
|
|
| wibix |
Posted on 20-06-2012 17:46
|

Member

Posts: 73
Joined: 21/11/2005
|
ok, try the attachment first.
as for categories. dropbox maybe a problem but category before the rest could be done.
wibix attached the following file:
|
| |
|
|
| Chibanga |
Posted on 20-06-2012 18:42
|

Junior Member

Posts: 17
Joined: 12/07/2009
|
wibix wrote:
ok, try the attachment first.
as for categories. dropbox maybe a problem but category before the rest could be done.
works fine great job...
Today:
10.06.2012 12:00 DAILY - True Poker - Freeroll Super Series
10.06.2012 16:00 DAILY - BwinPoker - $1.000 Added Freeroll
11.06.2012 17:30-21:30 DAILY - Betclic - $50 Freeroll
17:30 TowerPoker - $25 Facebook Fan Freeroll
11.06.2012 18:00 DAILY - Bestpoker - $100 Freeroll
10.06.2012 18:00 DAILY - 24h Poker - GT500 Texas Freeroll
18:30 EuroPoker - Facebook Friends Freeroll
18:30 WEEKLY - dbet Poker - 6 x €500
18:30 Pkr poker - $50 Freeroll Facebook (Special)
10.06.2012 18:30 DAILY - Ladbrokes - Pokerstrategy Daily €100 freeroll
19:00 MyBet - $100 Facebook Freeroll
12.06.2012 19:00 DAILY - CasinoEuro - 100$ Texas Freeroll
12.06.2012 19:00-22:00 DAILY - Betclic - $100 Freeroll
10.06.2012 19:00 DAILY - Betsson OR CasinoEuro - Omaha $ 50 Freeroll
20:00 *WilliamHill - L&H Tournament*
20:02 *888 poker - $2,000 Flash Freeroll*
20:30 Pokeridol - Xbox Final Freeroll
21:00 Irish Eyes poker/Toro poker Irish Eyes - Facebook Freeroll
21:00 *Paf poker - Liga del Jugón Classic*
21:00 WEEKLY - *Offsidebet - Pokerleague $50 OPP*
10.06.2012 21:30 DAILY - BwinPoker - $1.000 Added Freeroll
21:30 *iGame - PokerPT.com 6-max*
21:45 *iGame - PokerPT.com 6-max*
22:03 *888 poker - $20,000 EuroMania Tournament*
23:00 Pokertime - WickedWednesday500
Tomorrow:
17:45 WEEKLY - EuroPoker - $1,000 Thursday's FreeRoll
20:00 WEEKLY - Offsidebet - Pokerleague $100 RB
ty _o_ |
| |
|
|
| wibix |
Posted on 21-06-2012 16:45
|

Member

Posts: 73
Joined: 21/11/2005
|
hm, i am not sure about tomorrow but i ll check it out next week.
i ll also make a new next-panel with categories |
| |
|
|
| Chibanga |
Posted on 21-06-2012 18:40
|

Junior Member

Posts: 17
Joined: 12/07/2009
|
wibix wrote:
hm, i am not sure about tomorrow but i ll check it out next week.
i ll also make a new next-panel with categories
Ok, I appreciate |
| |
|
|
| wibix |
Posted on 25-06-2012 17:47
|

Member

Posts: 73
Joined: 21/11/2005
|
sry to say, but this looks like so more coding than expected and i dont have much time atm. sry cant do it. |
| |
|