Beispiel #1
0
 */
// No direct access to this file
defined('_JEXEC') or die('Restricted Access');
//Get plugin contents
$item_onBeforePJContent = $this->events->onBeforePJContent;
$item_onAfterPJContent = $this->events->onAfterPJContent;
// load tooltip behavior
JHtml::_('behavior.tooltip');
JHtml::_('formbehavior.chosen', 'select');
//load javascript and css script
$document = JFactory::getDocument();
// add style sheet
if ($this->params->get('css_type', 'pj_css') == 'pj_css') {
    $document->addStyleSheet(JURI::root(true) . '/components/com_playjoom/assets/css/playlist_view.css');
}
echo '<form action="' . JRoute::_('index.php?option=com_playjoom&&view=adminplaylist&listid=' . JRequest::getVar('listid') . '&Itemid=' . JRequest::getVar('Itemid')) . '" method="post" name="adminForm">';
echo $this->loadTemplate('toolbar');
//check if one or more track in the playlist
if (PlayJoomHelper::getPlaylistEntries(JRequest::getVar('listid')) >= 1) {
    echo $item_onBeforePJContent;
    echo '<table class="adminlist">';
    echo '<thead>' . $this->loadTemplate('head') . '</thead>';
    echo '<tfoot>' . $this->loadTemplate('foot') . '</tfoot>';
    echo '<tbody>' . $this->loadTemplate('body') . '</tbody>';
    echo '</table>';
    echo JHtml::_('form.token');
    echo '</form>';
    echo $item_onAfterPJContent;
} else {
    echo JText::_('COM_PLAYJOOM_PLAYLIST_EMPTY');
}
 protected function DeletePlaylist($playlist_id)
 {
     $db = JFactory::getDBO();
     // Delete playlist
     $query = $db->getQuery(true);
     $query->delete();
     $query->from('#__jpplaylists');
     $query->where('id = "' . $playlist_id . '"');
     $db->setQuery($query);
     // Check for a database error.
     if (!$this->_db->query()) {
         $e = new JException(JText::_('JLIB_DATABASE_ERROR_DELETE_FAILED', get_class($this), $this->_db->getErrorMsg()));
         $this->setError($e);
         return false;
     }
     if (PlayJoomHelper::getPlaylistEntries($playlist_id) >= 1) {
         //Delete playlist content as well, if something exists
         $query = $db->getQuery(true);
         $query->delete();
         $query->from('#__jpplaylist_content');
         $query->where('list_id = "' . $playlist_id . '"');
         $db->setQuery($query);
         // Check for a database error.
         if (!$this->_db->query()) {
             $e = new JException(JText::_('JLIB_DATABASE_ERROR_DELETE_FAILED', get_class($this), $this->_db->getErrorMsg()));
             $this->setError($e);
             return false;
         }
     }
     return true;
 }
<?php 
foreach ($this->items as $i => $item) {
    ?>
        <tr class="row<?php 
    echo $i % 2;
    ?>
">
                <td>
                        <?php 
    echo $item->albumid;
    ?>
                </td>
                <td>
                        <?php 
    echo $item->albumyear;
    ?>
                        
                </td>
                <td>
                        <?php 
    echo $item->albumtitle;
    ?>
                </td>
                <td>
                        <?php 
    echo PlayJoomHelper::getPlaylistEntries($item->albumid);
    ?>
                </td>
        </tr>
<?php 
}
 * @copyright Copyright (C) 2010-2013 by www.teglo.info
 * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
 * @date $Date$
 * @revision $Revision$
 * @author $Author$
 * @headurl $HeadURL$
 */
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// load tooltip behavior
JHtml::_('behavior.tooltip');
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
echo '<h4>' . JText::_('COM_PLAYJOOM_HOMEPAGE_NEWPLAYLISTS') . '</h4>';
echo '<ul class="circle">';
foreach ($this->PlaylistItems as $i => $item) {
    $PlaylistEntries = PlayJoomHelper::getPlaylistEntries($item->id);
    if ($PlaylistEntries != 0) {
        //Check for category item
        if ($item->category_title) {
            $categoryItem = ' (' . $item->category_title . ')';
        } else {
            $categoryItem = null;
        }
        //create links for playlist
        $link = 'index.php?option=com_playjoom&view=playlist&source=playlist&listid=' . $item->id . '&name=' . base64_encode($item->name) . '&disposition=inline';
        $linkwithorder = 'index.php?option=com_playjoom&view=playlist&source=playlist&listid=' . $item->id . '&orderplaylist=RAND()&disposition=inline';
        echo '<li><a href="index.php?option=com_playjoom&view=adminplaylist&listid=' . $item->id . '&Itemid=' . JRequest::getVar('Itemid') . '" title="Continue to edit the playlist">' . $item->name . '</a> ' . $categoryItem . ' [' . $PlaylistEntries . ']' . ' <a href="' . $link . '" title="' . JText::_('COM_PLAYJOOM_PLAYLIST_CONTINUE_PLAYLIST') . '" class="tiny button secondary" target="_blank">' . JText::_('COM_PLAYJOOM_PLAYLIST_PLAY_ALL') . '</a>' . ' <a href="' . $linkwithorder . '" title="' . JText::_('COM_PLAYJOOM_PLAYLIST_CONTINUE_PLAYLIST') . '" class="tiny button secondary" target="_blank">' . JText::_('COM_PLAYJOOM_PLAYLIST_PLAY_RAND') . '</a>' . '</li>';
    }
}
echo '<ul>';
 * source software licenses. See COPYRIGHT.php for copyright notices and
 * details.
 *
 * @PlayJoom Component
 * @copyright Copyright (C) 2010-2012 by www.teglo.info
 * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
 * @date $Date$
 * @revision $Revision$
 * @author $Author$
 * @headurl $HeadURL$
 */
// No direct access to this file
defined('_JEXEC') or die('Restricted Access');
// add style sheet
if ($this->params->get('css_type', 'pj_css') == 'pj_css') {
    $document = JFactory::getDocument();
    $document->addStyleSheet(JURI::base(true) . '/components/com_playjoom/assets/css/tables.css');
}
foreach ($this->items as $i => $item) {
    echo '<tr class="row' . $i % 2 . '">';
    echo '<td>' . $item->id . '</td>';
    echo '<td><a href="index.php?option=com_playjoom&view=adminplaylist&listid=' . $item->id . '&Itemid=' . JRequest::getVar('Itemid') . '" title="Continue to edit the playlist">' . $item->name . '</a>
                  <br />
                  <img src="components/com_playjoom/images/icons/application_form_edit.png" alt="edit icon" width="16px" height="16px" style="margin-right:3px;margin-top:2px;vertical-align:bottom;" />&nbsp;<a href="index.php?option=com_playjoom&view=adminplaylists&layout=editlist&id=' . $item->id . '&Itemid=' . JRequest::getVar('Itemid') . '" title="Continue to change the name of this playlist">' . JText::_('COM_PLAYJOOM_PLAYLIST_CHANGE') . '</a>&nbsp;|&nbsp;<img src="components/com_playjoom/images/icons/application_form_delete.png" alt="edit icon" width="16px" height="16px" style="margin-right:3px;margin-top:2px;vertical-align:bottom;" />&nbsp;<a href="index.php?option=com_playjoom&view=adminplaylists&layout=dellist&id=' . $item->id . '&Itemid=' . JRequest::getVar('Itemid') . '" title="Continue to delete this playlist">' . JText::_('COM_PLAYJOOM_PLAYLIST_DELETE') . '</a>';
    echo '</td>';
    echo '<td>' . $item->category_title . '</td>';
    echo '<td>' . $item->access_title . '</td>';
    echo '<td>' . JHtml::_('date', $item->create_date, JText::_('DATE_FORMAT_LC2')) . '</td>';
    echo '<td>' . PlayJoomHelper::getPlaylistEntries($item->id) . '</td>';
    echo '</tr>';
}
Beispiel #6
0
:&nbsp;<?php 
echo $this->playlistinfo->create_date;
?>
</li>
		   <li id="playlist_info"><?php 
echo JText::_('COM_PLAYJOOM_DELPLAYLIST_MODIFIER');
?>
:&nbsp;<?php 
echo $this->playlistinfo->modifier_date;
?>
</li>
		   <li id="playlist_info"><?php 
echo JText::_('COM_PLAYJOOM_DELPLAYLIST_NO_OF_TRACKS');
?>
:&nbsp;<?php 
echo PlayJoomHelper::getPlaylistEntries(JRequest::getVar('id'));
?>
</li>
		 </ul>
		</div>
	</fieldset>
	<div>
		<input type="hidden" name="task" value="" />
        <input type="hidden" name="list_id" value="<?php 
echo $this->playlistinfo->id;
?>
" />
		<?php 
echo JHtml::_('form.token');
?>
	</div>
 * Joomla! is free software. This version may have been modified pursuant to the
 * GNU General Public License, and as distributed it includes or is derivative
 * of works licensed under the GNU General Public License or other free or open
 * source software licenses. See COPYRIGHT.php for copyright notices and
 * details.
 *
 * @PlayJoom Component
 * @copyright Copyright (C) 2010-2012 by www.teglo.info
 * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
 * @date $Date: 2013-09-10 19:13:25 +0200 (Di, 10 Sep 2013) $
 * @revision $Revision: 842 $
 * @author $Author: toto $
 * @headurl $HeadURL: http://dev.teglo.info/svn/playjoom/components/com_playjoom/views/adminplaylists/tmpl/default_body.php $
 */
// No direct access to this file
defined('_JEXEC') or die('Restricted Access');
// add style sheet
if ($this->params->get('css_type', 'pj_css') == 'pj_css') {
    $document = JFactory::getDocument();
    $document->addStyleSheet(JURI::base(true) . '/components/com_playjoom/assets/css/tables.css');
}
foreach ($this->items as $i => $item) {
    if ($item->category_title) {
        $genre_info = '(' . $item->category_title . ')';
    } else {
        $genre_info = null;
    }
    echo '<li>' . sprintf("%02d", $item->id) . ' - <a href="index.php?option=com_playjoom&view=adminplaylist&listid=' . $item->id . '&Itemid=' . JRequest::getVar('Itemid') . '" title="Continue to edit the playlist">' . $item->name . '</a><br /><img src="components/com_playjoom/images/icons/application_form_edit.png" alt="edit icon" width="16px" height="16px" style="margin-right:3px;margin-top:2px;vertical-align:bottom;" />&nbsp;<a href="index.php?option=com_playjoom&view=adminplaylists&layout=editlist&id=' . $item->id . '&Itemid=' . JRequest::getVar('Itemid') . '" title="Continue to change the name of this playlist">' . JText::_('COM_PLAYJOOM_PLAYLIST_CHANGE') . '</a>&nbsp;|&nbsp;<img src="components/com_playjoom/images/icons/application_form_delete.png" alt="edit icon" width="16px" height="16px" style="margin-right:3px;margin-top:2px;vertical-align:bottom;" />&nbsp;<a href="index.php?option=com_playjoom&view=adminplaylists&layout=dellist&id=' . $item->id . '&Itemid=' . JRequest::getVar('Itemid') . '" title="Continue to delete this playlist">' . JText::_('COM_PLAYJOOM_PLAYLIST_DELETE') . '</a> ' . $genre_info . '</li>';
    echo '<li class="createline">' . JText::_('COM_PLAYJOOM_PLAYJOOM_HEADING_CREATE') . ' ' . JHtml::_('date', $item->create_date, JText::_('DATE_FORMAT_LC2')) . ', ' . JText::_('COM_PLAYJOOM_PLAYJOOM_HEADING_NOOFTRACKS') . ': ' . PlayJoomHelper::getPlaylistEntries($item->id) . '</li>';
    echo '<li class="divider"></li>';
}