Ejemplo n.º 1
0
 public function process()
 {
     $radio_block = Phpfox::getService('radio.callback')->query("is_active=1", " (total_members*10+total_views) DESC", false, 3);
     foreach ($radio_block[1] as $key => $item) {
         $radio_block[1][$key]["link"] = PHPFOX::permalink('radio.radio', $item["radio_id"], $item['title']);
     }
     $this->template()->assign(array('radio_block' => $radio_block[1]));
 }
Ejemplo n.º 2
0
 public function addfavourite()
 {
     if (PHPFOX::getUserId()) {
         $is_favourite = Phpfox::getService('radio.callback')->addfavourite($this->get('radioid'));
     }
     if ($is_favourite == "un") {
         $this->call("\$('#fav_text').html('<i class=\"fa fa-star-o\"></i> " . Phpfox::getPhrase('radio.add_favourite') . "');");
     } else {
         $this->call("\$('#fav_text').html('<i class=\"fa fa-star\"></i> " . Phpfox::getPhrase('radio.remove_favourite') . "');");
     }
 }
Ejemplo n.º 3
0
 public function process()
 {
     //CHECK PRIVACY
     if (!Phpfox::getUserParam('radio.can_view_radio')) {
         $this->url()->send('subscribe');
         return;
     }
     $aSort = array('latest' => array('radio.radio_id', PHPFOX::getPhrase('photo.latest')), 'most-used' => array('radio.total_members', Phpfox::getPhrase('radio.most_listened')), 'most-viewed' => array('radio.total_views', Phpfox::getPhrase('radio.most_viewed')), 'most-commented' => array('radio.total_comment', Phpfox::getPhrase('radio.most_commented')));
     $this->search()->set(array('type' => 'radio', 'field' => 'radio.radio_id', 'search_tool' => array('table_alias' => 'radio', 'search' => array('action' => $this->url()->makeUrl('radio.favourite'), 'default_value' => PHPFOX::getPhrase('radio.search'), 'name' => 'search', 'field' => 'radio.title'), 'sort' => $aSort, 'show' => array(8, 16, 32), 'when' => array())));
     $aBrowseParams = array('module_id' => 'radio', 'alias' => 'radio', 'field' => 'radio_id', 'table' => PHPFOX::getT('radio'));
     if ($this->request()->get('req2') == 'category') {
         $sCategory = $iCategory = str_replace("-", " ", mysql_escape_string($this->request()->get('req3')));
         $sWhere = "AND radio.category LIKE '%{$sCategory}%'";
         $this->search()->setCondition($sWhere);
     }
     $this->search()->setCondition(" AND f.user_id=" . PHPFOX::getUserId());
     $this->search()->setCondition(" AND is_active=1 ");
     $this->search()->browse()->params($aBrowseParams)->execute();
     $radios = $this->search()->browse()->getRows();
     foreach ($radios as &$radio) {
         $radio["link"] = PHPFOX::permalink('radio.radio', $radio["radio_id"], $radio['title']);
         if (!$radio["image"]) {
             $radio["image"] = Phpfox::getParam('core.path') . "module/radio/static/image/nophoto.png";
         }
         $i = 0;
         $cat_array = explode(",", $radio["category"]);
         $count = count($cat_array);
         $cats = "";
         foreach ($cat_array as $cat) {
             $link = PHPFOX::permalink('radio', "category", $cat);
             $cats .= "<a href='{$link}' >" . trim($cat) . "</a>";
             $i++;
             if ($i != $count) {
                 $cats .= ", ";
             }
         }
         $radio["category_links"] = $cats;
     }
     $aPager = array('page' => $this->search()->getPage(), 'size' => $this->search()->getDisplay(), 'count' => $this->search()->browse()->getCount());
     PHPFOX::getLib('pager')->set($aPager);
     $this->template()->setTitle(Phpfox::getPhrase('radio.radios'))->setBreadcrumb(Phpfox::getPhrase('radio.radios'))->assign(array('radios' => $radios, 'current_category' => $sCategory, 'aCount' => $this->search()->browse()->getCount()))->setHeader('cache', array('index.css' => 'module_radio', 'pager.css' => 'style_css'));
     if (Phpfox::isUser()) {
         $aFilterMenu = array(Phpfox::getPhrase('radio.browse_radios') => 'radio/', Phpfox::getPhrase('radio.favourites_radios') => 'radio.favourite', Phpfox::getPhrase('radio.featured_radios') => 'radio.featured');
     } else {
         $aFilterMenu = array(Phpfox::getPhrase('radio.browse_radios') => 'radio/', Phpfox::getPhrase('radio.featured_radios') => 'radio.featured');
     }
     $this->template()->buildSectionMenu('radio', $aFilterMenu);
 }
Ejemplo n.º 4
0
 public function process()
 {
     if ($this->request()->get('req2') == 'radio') {
         $radio_id = $this->request()->getInt('req3');
         $radio = Phpfox::getService('radio.callback')->query("is_active=1 AND radio.radio_id={$radio_id}");
         if (!$radio[1][0]["title"]) {
             $this->url()->send('radio');
         }
         //MAKE VIEW
         Phpfox::getService('radio.callback')->makeview($radio_id, $radio[1][0]["total_views"]);
         $radio[1][0]["total_views"]++;
     }
     //GET PLAYED USERS
     $users = Phpfox::getService('radio.callback')->getusers($radio_id);
     foreach ($users as &$item) {
         $pUsersInfo = array('title' => $item['full_name'], 'path' => 'core.url_user', 'file' => $item['user_image'], 'suffix' => '_75_square', 'width' => 50, 'height' => 50, 'no_default' => Phpfox::getUserId() == $item['user_id'] ? false : true, 'thickbox' => true, 'class' => 'profile_user_image', 'no_link' => true);
         $item['profile_image'] = Phpfox::getLib('image.helper')->display(array_merge(array('user' => Phpfox::getService('user')->getUserFields(true, $item)), $pUsersInfo));
     }
     //GET SIMILAR GAMES
     $cat_array = explode(",", $radio[1][0]["category"]);
     $sql = "";
     $i = 0;
     foreach ($cat_array as $cat) {
         $i++;
         $sql .= " radio.category LIKE '%{$cat}%' ";
         if ($i != count($cat_array)) {
             $sql .= " OR ";
         }
     }
     $radios = Phpfox::getService('radio.callback')->query("radio.radio_id<>{$radio_id} AND is_active=1 AND ({$sql})", "RAND()", 0, 3);
     foreach ($radios[1] as $key => $game_vasa) {
         $radios[1][$key]["link"] = PHPFOX::permalink('radio.radio', $game_vasa["radio_id"], $game_vasa['title']);
     }
     $this->template()->setTitle($radio[1][0]["title"])->setHeader('cache', array('feed.js' => 'module_feed', 'comment.css' => 'style_css', 'quick_edit.js' => 'static_script', 'index.css' => 'module_radio'))->setBreadcrumb($radio[1][0]["title"])->assign(array('radio' => $radio[1][0], 'radios' => $radios[1], 'users' => $users));
     //COMMENTS
     $this->setParam('aFeed', array('comment_type_id' => 'radio', 'like_type_id' => 'radio', 'feed_is_liked' => isset($radio[1][0]['is_liked']) ? $radio[1][0]['is_liked'] : false, 'feed_is_friend' => 1, 'item_id' => $radio[1][0]['radio_id'], 'user_id' => $radio[1][0]['user_id'], 'total_comment' => $radio[1][0]['total_comment'], 'total_like' => $radio[1][0]['total_like'], 'feed_link' => Phpfox::getLib('url')->makeUrl('radio', array('radio' => $radio[1][0]['game_id'])), 'feed_title' => $radio[1][0]['title'], 'feed_display' => 'view', 'feed_total_like' => $radio[1][0]['total_like'], 'report_module' => 'radio', 'report_phrase' => Phpfox::getPhrase('radio.radio_not_work')));
 }
Ejemplo n.º 5
0
 public function addradios()
 {
     $news = array(0 => array("title" => "BBC RADIO 2", "description" => "Popular music and culture with a diverse range of specialist music.", "stream" => "http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio2_mf_p?s=1423172697&e=1423187097&h=bbd05b014f908bbd0029fd97af560bd6", "is_active" => "1", "category" => "pop, dance", "user_id" => PHPFOX::getUserId(), "image" => "1.png"), 1 => array("title" => "BBC RADIO 4", "description" => "Popular music and culture with a diverse range of specialist music.", "stream" => "http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio4fm_mf_p?s=1423670252&e=1423684652&h=3f9adf1794355e15932f1d78f96c8d35", "is_active" => "1", "category" => "Talk", "user_id" => PHPFOX::getUserId(), "image" => "1.jpg"), 2 => array("title" => "BBC RADIO 1", "description" => "The best new music from the BBC.", "stream" => "http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio1_mf_p?s=1423171792&e=1423186192&h=01f24caa1c3ce3d7594669ba094d622c", "is_active" => "1", "category" => "Pop", "user_id" => PHPFOX::getUserId(), "image" => "2.jpg", "is_featured" => 1), 3 => array("title" => "BBC Radio 5 Live", "description" => "News & Sports - certain programming only available when & where contractual conditions permit.", "stream" => "http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio5live_mf_p?s=1423670821&e=1423685221&h=47e446c4140828a5e0d90d9bed756d5a", "is_active" => "1", "category" => "Sport", "user_id" => PHPFOX::getUserId(), "image" => "3.jpg"), 5 => array("title" => "BBC World Service", "description" => "BBC World Service broadcasts to the world on radio, on TV and online.", "stream" => "http://bbcwssc.ic.llnwd.net/stream/bbcwssc_mp1_ws-eieuk", "is_active" => "1", "category" => "Pop", "user_id" => PHPFOX::getUserId(), "image" => "6.jpg"), 6 => array("title" => "Radio Classique", "description" => "Classic music from France", "stream" => "http://radioclassique.ice.infomaniak.ch/radioclassique-high.mp3?", "is_active" => "1", "category" => "Classic", "user_id" => PHPFOX::getUserId(), "image" => "7.jpg"), 7 => array("title" => "Ibiza Sonica", "description" => "Sonica Radio Ibiza - radio born out of love and passion for music and spreading the musical culture of Ibiza.", "stream" => "http://173.192.105.231:8508/Live", "is_active" => "1", "category" => "Dance, House", "user_id" => PHPFOX::getUserId(), "image" => "8.jpg"), 8 => array("title" => "WABC 770 AM New York, NY", "description" => "The #1 conservative news talk station in NYC, if not the USA.", "stream" => "http://8693.live.streamtheworld.com:80/WLSAM_SC", "is_active" => "1", "category" => "Talk", "user_id" => PHPFOX::getUserId(), "image" => "9.jpg"), 9 => array("title" => "WLS", "description" => "The #1 conservative news talk station in NYC, if not the USA.", "stream" => "http://8693.live.streamtheworld.com:80/WLSAM_SC", "is_active" => "1", "category" => "Talk", "user_id" => PHPFOX::getUserId(), "image" => "9.jpg"), 9 => array("title" => "WPLJ 95.5 FM New York, NY", "description" => "95.5 PLJ - Today's Best Hits Without the Rap", "stream" => "http://8693.live.streamtheworld.com:80/WPLJFM_SC", "is_active" => "1", "category" => "Pop, Rock, Classic", "user_id" => PHPFOX::getUserId(), "image" => "10.jpg"), 10 => array("title" => "Super Country Radio", "description" => "Our music streams are on the air 24 hours per day, 7 days per week, playing a wide variety of country music from today's stars and the legends.", "stream" => "http://ice3.securenetsystems.net/WZBB?", "is_active" => "1", "category" => "Country", "user_id" => PHPFOX::getUserId(), "image" => "11.jpg"), 11 => array("title" => "WMGK 102.9 FM ", "description" => "Classic rock from Greater Philadelphia Radio, Inc.", "stream" => "http://3103.live.streamtheworld.com:80/WMGKFMMOBILE_SC", "is_active" => "1", "category" => "Rock, Classic rock", "user_id" => PHPFOX::getUserId(), "image" => "12.jpg"), 12 => array("title" => "977 Music - Classic Rock ", "description" => "The greatest rock from 70's with the occasional 80's mixed in", "stream" => "http://7669.live.streamtheworld.com:80/977_CLASSROCK_SC", "is_active" => "1", "category" => "Rock, Classic rock", "user_id" => PHPFOX::getUserId(), "image" => "13.jpg"), 14 => array("title" => "KOST 103.5", "description" => " Southern California's popular 'Soft Rock With Less Talk'.", "stream" => "http://kost-fm.akacast.akamaistream.net/7/103/19775/v1/auth.akacast.akamaistream.net/kost-fm", "is_active" => "1", "category" => "Pop, Rock", "user_id" => PHPFOX::getUserId(), "image" => "14.jpg"), 15 => array("title" => "96.3 WDVD ", "description" => " 96.3 WDVD - Today's Best Hits - INTERNET BROADCAST SCHEDULE: Monday - Friday", "stream" => "http://8283.live.streamtheworld.com/WDVDFMAAC_SC", "is_active" => "1", "category" => "Pop, Rock", "user_id" => PHPFOX::getUserId(), "image" => "16.jpg"), 16 => array("title" => "DEEP HOUSE LOUNGE", "description" => " Deep House Radio, House Mixes & Deep House Music. Broadcasting live shows from around the world. T", "stream" => "http://198.15.94.34:8006/stream", "is_active" => "1", "category" => "House", "user_id" => PHPFOX::getUserId(), "image" => "17.jpg"), 17 => array("title" => "Easy Rock 96.3 Manila", "description" => " Just the Rite Rock", "stream" => "http://icecast.eradioportal.com:8000/easy_rock?type=.mp3/;stream.mp3", "is_active" => "1", "category" => "Rock", "user_id" => PHPFOX::getUserId(), "image" => "18.jpg"), 18 => array("title" => "MIX 94.5 Perth", "description" => " Mix Music From Austalia", "stream" => "http://legacy.scahw.com.au/6mix_32", "is_active" => "1", "category" => "Pop", "user_id" => PHPFOX::getUserId(), "image" => "19.jpg"), 19 => array("title" => "Kiss FM 2.0 - Trance", "description" => "Best Trance music", "stream" => "http://online-kissfm.tavrmedia.ua/KissFM_trance", "is_active" => "1", "category" => "Trance", "user_id" => PHPFOX::getUserId(), "image" => "20.jpg"), 20 => array("title" => "Europa Plus ", "description" => "Fresh Europa PLus music", "stream" => "http://epfresh128.streamr.ru/e", "is_active" => "1", "category" => "Pop, Dance", "user_id" => PHPFOX::getUserId(), "image" => "21.jpg"), 21 => array("title" => "Radio Tango-Velours", "description" => "La Radio Francophone du Tango", "stream" => "http://streaming.radionomy.com/Radio-Tango-Velours", "is_active" => "1", "category" => "Latin", "user_id" => PHPFOX::getUserId(), "image" => "22.jpg"), 22 => array("title" => "NRJ - FM", "description" => "Hit Music Only!", "stream" => "http://adwzg3.tdf-cdn.com/8470/nrj_165631.mp3", "is_active" => "1", "category" => "Pop,Dance, Rap, Hip-Hop", "user_id" => PHPFOX::getUserId(), "image" => "23.jpg"), 23 => array("title" => "Sunny 92.3", "description" => "Only best house music!", "stream" => "http://3103.live.streamtheworld.com/WDEFFMAAC_SC", "is_active" => "1", "category" => "Dance,House", "user_id" => PHPFOX::getUserId(), "image" => "24.jpg"), 24 => array("title" => "Radio Swiss Jazz", "description" => "Classic Jazz", "stream" => "http://stream.srg-ssr.ch/m/rsj/mp3_128", "is_active" => "1", "category" => "Jazz", "user_id" => PHPFOX::getUserId(), "image" => "25.jpg"), 25 => array("title" => "France Musique", "description" => "Classic Jazz", "stream" => "http://audio.scdn.arkena.com/11012/francemusique-midfi128.mp3", "is_active" => "1", "category" => "Jazz,Classical", "user_id" => PHPFOX::getUserId(), "image" => "26.jpg"), 26 => array("title" => "Boom 97.3", "description" => "70's, 80's, 90's", "stream" => "http://8283.live.streamtheworld.com:80/CHBMFMAAC_SC", "is_active" => "1", "category" => "rock, old school", "user_id" => PHPFOX::getUserId(), "image" => "27.jpg", "is_featured" => 1), 27 => array("title" => "Radio Peinard Skyrock", "description" => "First rap radio", "stream" => "http://str2.creacast.com/radio_peinard", "is_active" => "1", "category" => "Rap, Hip-Hop", "user_id" => PHPFOX::getUserId(), "image" => "28.jpg"), 28 => array("title" => "One Love Hip Hop Radio", "description" => "One Love Hip Hop Radio, created exclusively to promote the Real Hip Hop", "stream" => "http://streaming.radionomy.com/One-love-Hip-Hop-Radio", "is_active" => "1", "category" => "Rap, Hip-Hop", "user_id" => PHPFOX::getUserId(), "image" => "29.jpg"), 29 => array("title" => "Radio 538 - IBIZA", "description" => "Electronic hits", "stream" => "http://vip-icecast.538.lw.triple-it.nl/WEB01_MP3", "is_active" => "1", "category" => "Dance, Trance", "user_id" => PHPFOX::getUserId(), "image" => "30.jpg"), 31 => array("title" => "Radio 538 - Top 40", "description" => "Hit Radio - Rock/Top 40", "stream" => "http://vip-icecast.538.lw.triple-it.nl/WEB16_MP3", "is_active" => "1", "category" => "Dance, Pop", "user_id" => PHPFOX::getUserId(), "image" => "30.jpg", "is_featured" => 1), 32 => array("title" => "Digitally Imported - Vocal Chillout", "description" => "Enjoy the relaxing vocal sounds of Ibiza chillout", "stream" => "http://pub1.diforfree.org:8000/di_vocalchillout_hi", "is_active" => "1", "category" => "Chillout", "user_id" => PHPFOX::getUserId(), "image" => "31.jpg"));
     foreach ($news as $item) {
         $item["image"] = Phpfox::getParam('core.path') . "module/radio/static/radios/" . $item["image"];
         $this->database()->insert($this->_sTable, $item);
     }
 }
if (Phpfox::getParam('im.enable_im_in_footer_bar') && Phpfox::isUser()) {
    ?>
	<div id="im_footer_wrapper">
		<ul id="im_footer_bar">
			<li id="im_chats_lists">
<?php 
    if (Phpfox::getUserBy('im_hide') != '1') {
        Phpfox::getBlock('im.user', array());
    }
    ?>
			</li>
			<li id="js_im_holder">
				<div id="main_messenger_holder"> </div>
				<div id="main_messenger_link" onclick="if (typeof $Core.im != 'undefined'){$Core.im.toggleMessengerLink();} return false;">
<?php 
    if (PHPFOX::isUser()) {
        ?>
                        <aside class="bookbulk_aside <?php 
        if ($this->_aVars['asideStatus']) {
            ?>
 bookbulk_aside_full<?php 
        }
        ?>
">
                        <div class="bookbulk_navigation_sidebar">
                        <i class="icon-align-justify <?php 
        if (!$this->_aVars['asideStatus']) {
            ?>
 open_aside<?php 
        } else {
            ?>
Ejemplo n.º 7
0
 public function getQueryJoins()
 {
     $this->database()->leftJoin(PHPFOX::getT('radio_favourite'), 'f', 'f.radio_id = radio.radio_id');
 }