'videos/thumb-merci.png', 'video' => './player.html?size=small&v=merci&i=937', 'video_sd' => 'player.html?size=small&v=merci&i=937', 'video_hd' => 'player.html?v=merci&i=937', 'start' => '2012-12-18 16:00', ), Array ( 'image' => 'img/pack-merci-fin.png', 'start' => '2012-12-17 12:30', ), Array ( 'thumb' => 'videos/thumb-lol.png', 'video' => './player.html?size=small&v=lol&i=936', 'video_sd' => 'player.html?size=small&v=lol&i=936', 'video_hd' => 'player.html?v=lol&i=936', 'start' => '2012-12-17 10:00', ), Array ( 'thumb' => 'videos/thumb-chemises.png', 'video' => './player.html?size=small&v=chemises&i=935', 'video_sd' => 'player.html?size=small&v=chemises&i=935', 'video_hd' => 'player.html?v=chemises&i=935', 'start' => '2012-12-16 10:00', ), Array ( 'thumb' => 'videos/thumb-nyan_chaton1.png', 'video' => './player.html?size=small&v=nyan_chaton1&i=932&w=1', 'video_sd' => 'player.html?size=small&v=nyan_chaton1&i=932&w=1', 'video_hd' => 'player.html?v=nyan_chaton1&i=932&w=1', 'start' => '2012-12-14 10:00', ), Array ( 'thumb' => 'videos/thumb-souris.png', 'video' => './player.html?size=small&v=souris&i=934&w=1', 'video_sd' => 'player.html?size=small&v=souris&i=934&w=1', 'video_hd' => 'player.html?v=souris&i=934&w=1', 'start' => '2012-12-13 10:00', ), Array ( 'thumb' => 'videos/thumb-zzz.png', 'video' => './player.html?size=small&v=zzz&i=931', 'video_sd' => 'player.html?size=small&v=zzz&i=931', 'video_hd' => 'player.html?v=zzz&i=931', 'start' => '2012-12-12 10:00', ), Array ( 'thumb' => 'videos/thumb-geek.png', 'video' => './player.html?size=small&v=geek&i=930', 'video_sd' => 'player.html?size=small&v=geek&i=930', 'video_hd' => 'player.html?v=geek&i=930', 'start' => '2012-12-11 10:00', ), Array ( 'thumb' => 'videos/thumb-jz_chaton1.png', 'video' => './player.html?size=small&v=jz_chaton1&i=923', 'video_sd' => 'player.html?size=small&v=jz_chaton1&i=923', 'video_hd' => 'player.html?v=jz_chaton1&i=923', 'start' => '2012-12-10 10:00', ), Array ( 'thumb' => 'videos/thumb-cafe.png', 'video' => './player.html?size=small&v=cafe&i=921', 'video_sd' => 'player.html?size=small&v=cafe&i=921', 'video_hd' => 'player.html?v=cafe&i=921', 'start' => '2012-12-09 10:00', ), Array ( 'thumb' => 'videos/thumb-brocolis.png', 'video' => './player.html?size=small&v=brocolis&i=925', 'video_sd' => 'player.html?size=small&v=brocolisg&i=925', 'video_hd' => 'player.html?v=brocolis&i=925', 'start' => '2012-12-08 10:00', ), Array ( 'thumb' => 'videos/thumb-gang.png', 'video' => './player.html?size=small&v=gang&i=927&w=1', 'video_sd' => 'player.html?size=small&v=gang&i=927&w=1', 'video_hd' => 'player.html?v=gang&i=927&w=1', 'start' => '2012-12-07 13:00', ), Array ( 'thumb' => 'videos/thumb-vrp.png', 'video' => './player.html?size=small&v=vrp&i=918', 'video_sd' => 'player.html?size=small&v=vrp&i=918', 'video_hd' => 'player.html?v=vrp&i=918', 'start' => '2012-12-07 10:00', ), Array ( 'thumb' => 'videos/thumb-noel.png', 'video' => './player.html?size=small&v=noel&i=928', 'video_sd' => 'player.html?size=small&v=noel&i=928', 'video_hd' => 'player.html?v=noel&i=928', 'start' => '2012-12-06 18:00', ), Array ( 'thumb' => 'videos/thumb-bieres-cultes.png', 'video' => './player.html?size=small&v=bieres-cultes&i=920', 'video_sd' => 'player.html?size=small&v=bieres-cultes&i=920', 'video_hd' => 'player.html?v=bieres-cultes&i=920', 'start' => '2012-12-06 10:00', ), Array ( 'thumb' => 'videos/thumb-tristan.png', 'video' => './player.html?size=small&v=tristan&i=917', 'video_sd' => 'player.html?size=small&v=tristan&i=917', 'video_hd' => 'player.html?v=tristan&i=917', 'start' => '2012-12-05 10:00', ), Array ( 'thumb' => 'videos/thumb-hadolol.png', 'video' => './player.html?size=small&v=hadolol&i=924', 'video_sd' => 'player.html?size=small&v=hadolol&i=924', 'video_hd' => 'player.html?v=hadolol&i=924', 'start' => '2012-12-04 14:00', ), Array ( 'thumb' => 'videos/thumb-pq.png', 'video' => './player.html?size=small&v=pq&i=919', 'video_sd' => 'player.html?size=small&v=pq&i=919', 'video_hd' => 'player.html?v=pq&i=919', 'start' => '2012-12-04 10:00', ), Array ( 'thumb' => 'videos/thumb-clavier.png', 'video' => './player.html?size=small&v=clavier&i=916', 'video_sd' => 'player.html?size=small&v=clavier&i=916', 'video_hd' => 'player.html?v=clavier&i=916', 'start' => '2012-12-03 10:00', ), Array ( 'thumb' => 'videos/thumb-juriste.png', 'video' => './player.html?size=small&v=juriste&i=922', 'video_sd' => 'player.html?size=small&v=juriste&i=922', 'video_hd' => 'player.html?v=juriste&i=922', 'start' => '2012-12-03 18:00', ), Array ( 'thumb' => 'gallerie/thumb1.png', 'image' => 'img/manif-acta.jpg', 'title' => 'Les chatons manifestent', 'start' => '2012-12-01 10:00', ), // Cas spécial, le dernier n'a pas de thumbnail Array ( 'thumb' => 'gallerie/thumb2.png', 'image' => 'img/packliberte-adopter.png', 'title' => 'Envoyez nous vos vidéos de chatons Packliberté !', ), ); function fix_medias ( $m ) { $o = Array (); foreach ( $m as $e ) { if ( array_key_exists ( 'video_sd', $e ) && ! array_key_exists ( 'title', $e ) ) { if ( array_key_exists ( 'start', $e ) ) { preg_match ( '/^(....)-(..)-(..)/', $e [ 'start' ], $m ); $e [ 'title' ] = sprintf ( 'La vidéo du jour du %02d/%02d/%04d - ', $m [ 3 ], $m [ 2 ], $m [ 1 ] ); } $e [ 'title' ] .= sprintf ( 'Version SD', $e [ 'video_sd' ] ); if ( array_key_exists ( 'video_hd', $e ) ) { $e [ 'title' ] .= sprintf ( ' - Version HD', $e [ 'video_hd' ] ); } } if ( array_key_exists ( 'start', $e ) ) { if ( strcmp ( $e [ 'start' ], date("Y-m-d H:i" ) ) <= 0 ) { array_push ( $o, $e ); } } else { array_push ( $o, $e ); } } return $o; } ?>