$b['date_timestamp'] ) ? -1 : 1; } function channel_cmp($a, $b) { if ($a['channel_url'] == $b['channel_url'] ) { if ($a['date_timestamp'] == $b['date_timestamp'] ) { return ( strcmp($a['title'], $b['title']) == 1 ) ? -1 : 1; } return ($a['date_timestamp'] > $b['date_timestamp'] ) ? -1 : 1; } return ($a['channel_url'] > $b['channel_url'] ) ? -1 : 1; } function title_cmp($a, $b) { if ($a['channel_title'] == $b['channel_title'] ) { if ($a['date_timestamp'] == $b['date_timestamp'] ) { return ( strcmp($a['title'], $b['title']) == 1 ) ? -1 : 1; } return ($a['date_timestamp'] > $b['date_timestamp'] ) ? -1 : 1; } return ($a['channel_title'] > $b['channel_title'] ) ? -1 : 1; } $TIMERANGE = ( $_REQUEST['hours'] ? $_REQUEST['hours']*3600 : 3600*24 ) ; $data = file_get_contents($DATAFILE) ; $data = unserialize( base64_decode($data) ) ; $items = array(); // load times if (file_exists($TIMEFILE)) { $time_table = file_get_contents($TIMEFILE) ; $time_table = unserialize($time_table) ; } else { $time_table = array(); } $channel_list= "Sources" ; usort($items, 'date_cmp'); // sortowanie na kanaly w obrebie jednego dnia $start = 0; $item1 = $items[0] ; $date1 = date('D d F, Y', $item1['date_timestamp'] ) ; for($i=0;$i" ; // + nagłówek w formie ikony $out .= "
$channel_title \"Channel"."
" ; } else { // if ($channel_url_old != $channel_url) { if ($channel_url_old) $out .= "
" ; $out .= "
" ; } } $out .= "
" ; $out .="\"Click" ; //if ($ico) $out .= "\"Channel" ; $out .= "$time " ; $out .= "$title" ; //$out .= "» $channel_title" ; $out .= "source »" ; $out .= delicious_tags($href) ; $out .= "
" ; $out .= "$summary"; //$out .= "
\"add add to del.icio.us." ; //$out .= " look up in del.icio.us. " . delicious_tags($href) ; $out .= google_get_res($title,0) ; $channel_url_old=$channel_url; $channel_title_old=$channel_title; //$out .= "   \"add add to furl" ; $out .= "
\n" ; $out .= "
\n" ; if ( ($TIMERANGE>-1) && (time() - $item['date_timestamp'] > $TIMERANGE) ) break ; } $out .= "
" ; //Close the last "feed" div. // save times $ttime = serialize($time_table); $fp = fopen($TIMEFILE,'w') ; fputs($fp, $ttime) ; fclose($fp) ; $itemCount = $i+1 ; ?>
 123
 123