Пример #1
0
function processTheRequest($userId)
{
    $function = getIntendedFunction();
    $timezone = getParameter(APIKeys::$TIMEZONE);
    //Login
    if ($function == APIKeys::$FUNCTION_LOGIN) {
        login($timezone);
    } else {
        if ($function == APIKeys::$FUNCTION_CREATE_ACCOUNT) {
            createAccount($timezone);
        } else {
            if ($function == APIKeys::$FUNCTION_GET_INFORMATION) {
                getInformation($userId, $timezone);
            } else {
                if ($function == APIKeys::$FUNCTION_START_ACTIVITY) {
                    startActivity($userId, $timezone);
                } else {
                    if ($function == APIKeys::$FUNCTION_STOP_EVENT) {
                        stopEvent($userId, $timezone);
                    } else {
                        if ($function == APIKeys::$FUNCTION_SET_PUSH_TOKEN) {
                            setPushToken($userId, $timezone);
                        } else {
                            if ($function == APIKeys::$FUNCTION_CREATE_ACTIVITY) {
                                createActivity($userId, $timezone);
                            } else {
                                error();
                            }
                        }
                    }
                }
            }
        }
    }
}
Пример #2
0
/** Updates a node's cache nonrecursively.
 *
 * @author Ben Dodson
 */
function updateNodeCache($node, $recursive = false, $showStatus = false, $force = false, $readTags = true, $root_path = false)
{
    global $media_dirs, $live_update, $jzSERVICES, $hierarchy, $backend, $default_importer, $jukebox, $include_path;
    $flags = array();
    $flags['showstatus'] = $showStatus;
    $flags['force'] = $force;
    $flags['readtags'] = $readTags;
    $flags['recursive'] = $recursive;
    $importer = $default_importer;
    // TODO: more dynamic choice of importer.
    if (false !== stristr($importer, "id3tags")) {
        // id3tag importer doesn't care about your hierarchy.
        // TODO: seperate hierarchy for display / import.
    } else {
        // TODO: Remove this stuff once we have a propper way
        // of getting the path from the node. Make
        // the function recursive with respect to the node.
        $mypath = array();
        if (false !== ($val = getInformation($node, "genre"))) {
            $mypath['genre'] = $val;
        }
        if (false !== ($val = getInformation($node, "subgenre"))) {
            $mypath['subgenre'] = $val;
        }
        if (false !== ($val = getInformation($node, "artist"))) {
            $mypath['artist'] = $val;
        }
        if (false !== ($val = getInformation($node, "album"))) {
            $mypath['album'] = $val;
        }
        if (false !== ($val = getInformation($node, "disk"))) {
            $mypath['disk'] = $val;
        }
        $flags['path'] = $mypath;
        $flags['hierarchy'] = array_slice($hierarchy, sizeof($mypath), sizeof($hierarchy) - sizeof($mypath));
    }
    $jzSERVICES->loadService("importing", $importer);
    // TODO: Move flags array into parameters of this function.
    /*if ($flags['recursive']) {
    		@ini_set("max_execution_time","0");
    		@ini_set("memory_limit","64");
    	}*/
    if ($node->getLevel() == 0 && $root_path === false) {
        $mediapaths = explode("|", $media_dirs);
        for ($i = 0; $i < sizeof($mediapaths); $i++) {
            if (is_dir($mediapaths[$i]) && $mediapaths[$i] != "/" && $mediapaths[$i] != "") {
                //$node->updateCache($recursive,$mediapaths[$i], $showStatus,$force,$readTags);
                $jzSERVICES->importMedia($node, $mediapaths[$i], $flags);
            }
        }
    } else {
        //$node->updateCache($recursive,$root_path,$showStatus,$force, $readTags);
        $jzSERVICES->importMedia($node, $root_path, $flags);
        if ($recursive === false && $node->getSubNodeCount('tracks', -1) == 0) {
            //$node->updateCache(true,$root_path,$showStatus,$force,$readTags);
            $flags['recursive'] = true;
            $jzSERVICES->importMedia($node, $root_path, $flags);
        }
    }
    if ($jukebox == "true") {
        include_once $include_path . "jukebox/class.php";
        $jb = new jzJukebox();
        $jb->updateDB($node, $recursive, $root_path);
    }
}
Пример #3
0
echo word("Artist");
?>
				</td>
				<td>
					<input onClick="document.retagger.edit_reArtist_custom.value='';" value="filesystem" type="radio" checked name="reArtist_filesystem"> <?php 
echo word("Filesystem Data");
?>
<br>
					<input value="custom" type="radio" name="reArtist_filesystem"> 
					<input type="text" name="edit_reArtist_custom" value="" size="30" class="jz_input">
				</td>
			</tr>
			<tr>
				<td valign="top">
					<input type="checkbox" <?php 
if (getInformation($node, "album") !== false) {
    echo "checked";
}
?>
 name="reAlbum"> <?php 
echo word("Album");
?>
				</td>
				<td>
					<input onClick="document.retagger.edit_reAlbum_custom.value='';" value="filesystem" type="radio" checked name="reAlbum_filesystem"> <?php 
echo word("Filesystem Data");
?>
<br>
					<input value="custom" type="radio" name="reAlbum_filesystem"> 
					<input type="text" name="edit_reAlbum_custom" value="" size="30" class="jz_input">
					<br><br>
Пример #4
0
    function trackTable($tracks, $purpose = false)
    {
        global $media_dir, $jinzora_skin, $hierarchy, $album_name_truncate, $row_colors, $img_more, $img_email, $img_rate, $img_discuss, $num_other_albums, $enable_ratings, $this_site, $allow_clips, $root_dir, $jzUSER, $hide_id3_comments, $max_song_length, $enable_discussion, $max_song_name_length, $show_lyrics_links, $allow_send_email, $handle_compilations, $video_types, $show_track_numbers;
        if (sizeof($tracks) == 0) {
            return;
        }
        // Let's setup the new display object
        $display =& new jzDisplay();
        $tracks_only = array();
        foreach ($tracks as $track) {
            if (is_object($track)) {
                $tracks_only[] = $track;
            }
        }
        // Now let's see if this is a Audio, Video, or Photo node
        $video = true;
        foreach ($tracks_only as $track) {
            if (!preg_match("/\\.({$video_types})\$/i", $track->getDataPath())) {
                $video = false;
            }
        }
        if ($video) {
            $this->videoTable($tracks_only, $purpose);
            return;
        }
        // Let's figure out our settings:
        // First, set the defaults.
        $showNumbers = false;
        if ($show_track_numbers == "true") {
            $showNumbers = true;
        }
        $showArtist = false;
        $showAlbum = false;
        $showCheck = false;
        $showInfo = false;
        $showEmail = false;
        $showRate = false;
        $showDisc = false;
        $showAlbumNames = false;
        $trackTruncate = false;
        $showPlayCount = false;
        if ($enable_discussion == "true") {
            $showDisc = true;
        }
        $trackTruncate = $max_song_name_length;
        // Now adjust as needed:
        switch ($purpose) {
            case "generic":
                $showNumbers = false;
                break;
            case "album":
                $showCheck = true;
                $showInfo = true;
                $showPlayCount = true;
                $showEmail = true;
                break;
            case "search":
                $showCheck = true;
                $showArtist = true;
                $showInfo = true;
                $showEmail = true;
                $trackTruncate = 100;
                break;
            case "sample":
                // We only want to show album thumbs IF this artist has more than 1 album
                $parent = $tracks_only[0]->getParent();
                $gParent = $parent->getParent();
                $nodes = $gParent->getSubNodes("nodes");
                $showNumbers = false;
                $showAlbum = true;
                break;
            case "sample-all":
                $showNumbers = false;
                $showCheck = true;
                $showAlbumNames = true;
                $trackTruncate = 20;
                break;
        }
        if ($allow_send_email == "false") {
            $showEmail = false;
        }
        // Do we need to start the form
        if ($showCheck) {
            $node = $tracks_only[0]->getParent();
            ?>
			<form name="albumForm" action="<?php 
            echo urlize();
            ?>
" method="POST">
			<input type="hidden" name="<?php 
            echo jz_encode("action");
            ?>
" value="<?php 
            echo jz_encode("mediaAction");
            ?>
">
				<?php 
            if ($purpose != "search") {
                ?>
 
			  <input type="hidden" name="<?php 
                echo jz_encode("jz_path");
                ?>
" value="<?php 
                echo htmlentities(jz_encode($node->getPath("String")));
                ?>
">
				<?php 
            }
            ?>
			<input type="hidden" name="<?php 
            echo jz_encode("jz_list_type");
            ?>
" value="<?php 
            echo jz_encode("tracks");
            ?>
">
			<?php 
        }
        // Now let's setup the big table to display everything
        $i = 0;
        ?>
		  <table class="jz_track_table" width="100%" cellpadding="3" cellspacing="0" border="0">
		 <?php 
        $artists = array();
        if ($handle_compilations == "true") {
            foreach ($tracks_only as $child) {
                $a = $child->getMeta();
                if (!isNothing($a['artist'])) {
                    $artists[$a['artist']] = true;
                }
            }
        } else {
            foreach ($tracks_only as $child) {
                $a = $child->getAncestor('artist');
                if ($a !== false) {
                    $artists[strtoupper($a->getName())] = true;
                }
            }
        }
        if (sizeof($artists) > 1) {
            $multiArtist = true;
        } else {
            $multiArtist = false;
        }
        $first_label = true;
        foreach ($tracks as $child) {
            // is it a header?
            if (is_string($child)) {
                if (!$first_label) {
                    echo '<tr><td colspan="100">&nbsp;</td></tr>';
                }
                echo '<tr><td colspan="100">' . $child . '</td></tr>';
                $first_label = false;
                continue;
            }
            // Let's make sure this isn't a lofi track
            if (substr($child->getPath("String"), -9) == ".lofi.mp3" or substr($child->getPath("String"), -9) == ".clip.mp3") {
                continue;
            }
            // First let's grab all the tracks meta data
            $metaData = $child->getMeta();
            $album = $child->getParent();
            if (findPType($album) == "disk") {
                $album = $album->getParent();
            }
            $gParent = $album->getParent();
            $artist = getInformation($album, "artist");
            ?>
		   <tr class="<?php 
            echo $row_colors[$i];
            ?>
">
		   <?php 
            if ($showCheck and $jzUSER->getSetting('stream')) {
                $value = htmlentities(jz_encode($child->getPath("String")));
                ?>
		   <td width="1%" valign="top" class="jz_track_table_songs_td">
		   <input type="checkbox" name="jz_list[]" value="<?php 
                echo $value;
                ?>
">
		   </td>
		   <?php 
            }
            ?>
		   
		   <td width="99%" valign="top" class="jz_track_table_songs_td" nowrap>
		   	<?php 
            echo $display->playButton($child);
            ?>
			 <?php 
            // Now, is there a lofi version?
            $loFile = substr($child->getDataPath("String"), 0, -4) . ".lofi.mp3";
            if (is_file($loFile) and $jzUSER->getSetting('stream')) {
                $lofi = new jzMediaTrack(substr($child->getPath("String"), 0, -4) . ".lofi.mp3");
                //echo '<td width="1%" valign="top" class="jz_track_table_songs_td">';
                echo $display->lofiPlayButton($lofi);
                //echo '</td>';
            }
            ?>
			   <?php 
            // Now, is there a clip version?
            $loFile = substr($child->getDataPath("String"), 0, -4) . ".clip.mp3";
            if (is_file($loFile) || $allow_clips == "true") {
                //echo '<td width="1%" valign="top" class="jz_track_table_songs_td">';
                echo $display->clipPlayButton($child);
                //echo '</td>';
            }
            ?>
			   
		   <?php 
            echo $display->downloadButton($child);
            ?>
		   <?php 
            // Do they want ratings?
            if ($enable_ratings == "true") {
                $display->rateButton($child);
            }
            if ($showInfo) {
                echo " ";
                $display->infoButton($child);
            }
            if ($showEmail and $jzUSER->getSetting('stream')) {
                $display->emailButton($child);
            }
            ?>
		   <?php 
            if ($showDisc) {
                ?>
		   <a class="jz_track_table_songs_href" href=""><?php 
                $display->displayDiscussIcon($child);
                ?>
</a>
		   <?php 
            }
            ?>
		   <?php 
            if ($showArtist !== false) {
                $j = 0;
                while ($j < sizeof($hierarchy) && $hierarchy[$j] != 'artist') {
                    $j++;
                }
                if ($j < sizeof($hierarchy)) {
                    $parent = $child;
                    while ($parent->getLevel() > $j + 1) {
                        $parent = $parent->getParent();
                    }
                    $display->link($parent, $parent->getName(), $parent->getName(), "jz_track_table_songs_href");
                    echo " / ";
                }
            }
            // This is where we display the name
            if ($multiArtist) {
                if ($handle_compilations == "true") {
                    $artistName = $metaData['artist'];
                    if (isNothing($artistName)) {
                        $artist = $child->getAncestor("artist");
                        if ($artist !== false) {
                            $artistName = $artist->getName();
                        }
                    }
                } else {
                    $artist = $child->getAncestor("artist");
                    if ($artist !== false) {
                        $artistName = $artist->getName();
                    }
                }
                if (isset($artistName)) {
                    $tName = $child->getName();
                    unset($artistName);
                } else {
                    $tName = $child->getName();
                }
            } else {
                $tName = $child->getName();
            }
            if ($trackTruncate) {
                $tName = returnItemShortName($tName, $trackTruncate);
            }
            if ($purpose == "search") {
                $album = $child->getAncestor("album");
                $display->link($album, $album->getName(), $album->getName(), "jz_track_table_songs_href");
                echo " / ";
            }
            if ($showNumbers) {
                echo $metaData['number'] . " -&nbsp;";
            }
            if ($jzUSER->getSetting('stream')) {
                if ($showAlbum) {
                    $descName = $album->getName() . " - " . $child->getName();
                } else {
                    $descName = $child->getName();
                }
                // $tName = $child->getName();
                $display->link($child, $tName, $descName, "jz_track_table_songs_href");
            } else {
                echo $tName;
            }
            // Did they want to see lyrics links?
            if ($show_lyrics_links == "true") {
                if ($metaData['lyrics'] != "") {
                    $urlArr = array();
                    $urlArr['jz_path'] = $child->getPath("String");
                    $urlArr['action'] = "popup";
                    $urlArr['ptype'] = "viewlyricsfortrack";
                    echo '<a href="' . urlize($urlArr) . '" onclick="openPopup(this, 450, 450); return false;"> - ' . word("Lyrics") . '</a>';
                }
            }
            // Now let's show the description if there is one
            if ($short_desc = $child->getShortDescription() and $hide_id3_comments == "false") {
                echo "<br>" . $short_desc;
            }
            if ($description = $child->getDescription()) {
                echo "<br>" . $description;
            }
            // Do they want ratings?
            /*if ($enable_ratings == "true"){
               		//$rating = $display->displayRating($child,true);
            		if ($rating){
            			//echo "<br>". $rating;
            		}
            		//unset($rating);
               }*/
            ?>
		   </td>
		   
		   <?php 
            $lyricsSearch = false;
            if (isset($_POST['search_type'])) {
                if ($_POST['search_type'] == "lyrics") {
                    $lyricsSearch = $_POST['search_query'];
                }
            }
            if (isset($_GET['search_type'])) {
                if ($_GET['search_type'] == "lyrics") {
                    $lyricsSearch = $_GET['search_query'];
                }
            }
            if ($lyricsSearch) {
                // Now let's get the lyrics back
                $lyrics = $child->getLyrics();
                // Now let's parse it out
                $lyrics = str_replace("Lyrics Provided by: Leo's Lyrics\nhttp://www.leoslyrics.com", "", $lyrics);
                $start = strpos(strtolower($lyrics), strtolower($lyricsSearch)) - 20;
                if ($start < 0) {
                    $start = 0;
                }
                $lyrics = "&nbsp; &nbsp; &nbsp; &nbsp;(..." . substr($lyrics, $start, strlen($lyricsSearch) + 40) . "...)";
                $lyrics = highlight($lyrics, $lyricsSearch);
                echo '<td width="6%" align="center" valign="top" class="jz_track_table_songs_td" nowrap>';
                echo $lyrics;
                echo '</td>';
            }
            ?>
		   
		   
		   <?php 
            if ($showAlbumNames) {
                echo '<td width="1%" class="jz_track_table_songs_td" nowrap>';
                $display->link($album, returnItemShortName($album->getName(), 20), $album->getName(), "jz_track_table_songs_href");
                echo '</td>';
            }
            ?>
		   
			<?php 
            if ($showPlayCount) {
                echo '<td width="1%" align="center" valign="top" class="jz_track_table_songs_td" nowrap>';
                if ($child->getPlayCount() != 0) {
                    echo $child->getPlayCount() . " " . word("Plays");
                } else {
                    echo " - ";
                }
                echo '</td>';
            }
            ?>
		   
		   
		   <td width="6%" align="center" valign="top" class="jz_track_table_songs_td" nowrap>
		   &nbsp; <?php 
            echo convertSecMins($metaData['length']);
            ?>
 &nbsp;
		   </td>
		   </tr>
		   <?php 
            $i = 1 - $i;
            unset($gParent);
            unset($album);
        }
        // Now let's set a field with the number of checkboxes that were here
        echo "</table>";
        // Now let's show the playlist bar if we should
        if ($showCheck) {
            $this->blockSpacer();
            $this->playlistBar();
            echo "</form>";
        }
    }
Пример #5
0
} catch {
}
*/
//	$result_array = new cFoundInformation;
/* search for entries in hgkmedialib db */
//    $read_wsdl_loc = "http://media1.hgkz.ch/winet-backend/soap/wsdl/HgkMediaLib_Reading.wsdl";
/*
	$read_client = new SoapClient($read_wsdl_loc);
    $function_list = $read_client->__getFunctions();
*/
$html = showHTMLHeader();
switch ($_GET['action']) {
    case 'getinformation':
        // $result_array = $read_client->getInformation($session_id, $_GET['id'], "de");
        include 'getinfo.php';
        $result_array = getInformation($session_id, $_GET['id'], "de");
        // $result_array->subtree = initArray();
        /*
        			$html .= showInformationHeader($result_array);
        			$aItem = 0;
        			$html .= showObjectsData($result_array->informationBlocks[$aItem]->data, $aItem);
        */
        $aLevelBackground = array(array("#afa8a3", "#bab4af", "#c6c2bd", "#d7d4d1", "#ddd8d8"), array("#be9994", "#c7a6a2", "#d0b5b2", "#dfccca", "#e3d3d1"), array("#a0a4ac", "#bec2c8", "#d8d8df", "#e6e8eb", "#f0f1f2", "#f6f6f7"), array("#888d95", "#a8acb3", "#c4c7cb", "#d3d5d8"));
        $gLevelBackground = $aLevelBackground[2];
        $gCounter = 0;
        $aNodeLevel = 0;
        $html .= showsubtree($result_array->subtree, $aNodeLevel);
        break;
    default:
        $result_array = $read_client->find($session_id, $clauses, $sort_order, $limit, $lang);
        $html .= showAccordionObject($result_array);
Пример #6
0
    /**
     * Displays a table of the given tracks.
     *
     * @author Ross Carlson
     * @version 11/30/04
     * @since 01/11/05
     * @param array $tracks The array of objects of each track
     * @param $purpose The type of this track table. One of:
     * generic|album|search|sample|sample-all
     */
    function trackTable($tracks, $purpose = false)
    {
        global $media_dir, $jinzora_skin, $hierarchy, $album_name_truncate, $row_colors, $img_more, $img_email, $img_rate, $img_discuss, $num_other_albums, $enable_ratings, $this_site, $root_dir;
        if (sizeof($tracks) == 0) {
            return;
        }
        // Let's setup the new display object
        $display =& new jzDisplay();
        // Let's figure out our settings:
        // First, set the defaults.
        $showNumbers = true;
        $showArtist = false;
        $showAlbum = false;
        $showCheck = false;
        $showInfo = false;
        $showEmail = false;
        $showRate = false;
        $showDisc = false;
        $albumArtThumbs = false;
        $showAlbumNames = false;
        $trackTruncate = false;
        $showPlayCount = false;
        // Now adjust as needed:
        switch ($purpose) {
            case "generic":
                $showNumbers = false;
                break;
            case "album":
                $showCheck = true;
                $showNumbers = false;
                $showInfo = true;
                $showPlayCount = true;
                $showEmail = true;
                break;
            case "search":
                $showArtist = true;
                break;
            case "sample":
                // We only want to show album thumbs IF this artist has more than 1 album
                $parent = $tracks[0]->getParent();
                $gParent = $parent->getParent();
                $nodes = $gParent->getSubNodes("nodes");
                if (count($nodes) > 1) {
                    $albumArtThumbs = true;
                }
                $showNumbers = false;
                $showAlbum = true;
                break;
            case "sample-all":
                $showNumbers = false;
                $showCheck = true;
                $showAlbumNames = true;
                $trackTruncate = 20;
                break;
        }
        // Do we need to start the form
        if ($showCheck) {
            $node = $tracks[0]->getParent();
            ?>
			<form name="albumForm" action="<?php 
            echo urlize();
            ?>
" method="POST">
			<input type="hidden" name="<?php 
            echo jz_encode("action");
            ?>
" value="<?php 
            echo jz_encode("mediaAction");
            ?>
">
			<input type="hidden" name="<?php 
            echo jz_encode("jz_path");
            ?>
" value="<?php 
            echo htmlentities(jz_encode($node->getPath("String")));
            ?>
">
			<input type="hidden" name="<?php 
            echo jz_encode("jz_list_type");
            ?>
" value="<?php 
            echo jz_encode("tracks");
            ?>
">
			<?php 
        }
        // Now let's setup the big table to display everything
        $i = 0;
        ?>
		  <table class="jz_track_table" width="100%" cellpadding="3" cellspacing="0" border="0">
		 <?php 
        foreach ($tracks as $child) {
            // First let's grab all the tracks meta data
            $metaData = $child->getMeta();
            $album = $child->getParent();
            if (findPType($album) == "disk") {
                $album = $album->getParent();
            }
            $gParent = $album->getParent();
            $artist = getInformation($album, "artist");
            ?>
		   <tr class="<?php 
            echo $row_colors[$i];
            ?>
">
		   <?php 
            if ($showCheck) {
                ?>
		   <td width="1%" valign="top" class="jz_track_table_songs_td">
		   <input type="checkbox" name="jz_list[]" value="<?php 
                echo jz_encode($child->getPath("String"));
                ?>
">
		   </td>
		   
		   
		   <td width="1%" valign="top" class="jz_track_table_songs_td">
		   <?php 
                echo $display->playButton($child);
                ?>
		   </td>
		   <td width="1%" valign="top" class="jz_track_table_songs_td">
		   <?php 
                echo $display->downloadButton($child);
                ?>
		   </td>
		   
		   
		   <?php 
            }
            // Do they want ratings?
            if ($enable_ratings == "true") {
                echo '<td width="1%" valign="top" class="jz_track_table_songs_td">';
                $display->rateButton($child);
                echo '</td>';
            }
            ?>
		  
		   <?php 
            if ($showInfo) {
                $arr = array();
                $arr['action'] = "popup";
                $arr['ptype'] = "trackinfo";
                $arr['jz_path'] = $child->getPath("String");
                $link = urlize($arr);
                ?>
		   <td width="1%" valign="top" class="jz_track_table_songs_td">
		   <a href="<?php 
                echo $link;
                ?>
" target="_blank" onclick="openPopup(this, 375, 650); return false;"><?php 
                echo $img_more;
                ?>
</a>
		   </td>
		   <?php 
            }
            ?>
		   <?php 
            if ($showEmail) {
                ?>
		   <td width="1%" valign="top" class="jz_track_table_songs_td">
		   <?php 
                $arr = array();
                $arr['action'] = "playlist";
                $arr['jz_path'] = $child->getPath("String");
                $arr['type'] = "track";
                $link = $this_site . $root_dir . "/" . str_replace("&", "%26", urlize($arr));
                $mailLink = "mailto:?subject=" . $artist . " - " . $album->getName() . "&body=Click to play " . $artist . " - " . $album->getName() . ":%0D%0A%0D%0A" . $link . "%0D%0A%0D%0APowered%20by%20Jinzora%20%0D%0AJinzora%20::%20Free%20Your%20Media%0D%0Ahttp://www.jinzora.org";
                ?>
		   <a class="jz_track_table_songs_href" href="<?php 
                echo $mailLink;
                ?>
"><?php 
                echo $img_email;
                ?>
</a>
		   </td>
		   <?php 
            }
            ?>
		   <?php 
            if ($showDisc) {
                ?>
		   <td width="1%" valign="top" class="jz_track_table_songs_td">
		   <a class="jz_track_table_songs_href" href=""><?php 
                echo $img_discuss;
                ?>
</a>
		   </td>
		   <?php 
            }
            ?>
		   <td nowrap width="100%" valign="top" class="jz_track_table_songs_td">
		   <?php 
            // Do they want tiny thumbnails?
            if ($albumArtThumbs) {
                if (($art = $album->getMainArt()) !== false) {
                    $display->link($album, $display->returnImage($art, $album->getName(), 25, 25, "limit", false, false, "left", "2", "2"), $album->getName(), "jz_track_table_songs_href");
                }
            }
            if ($showArtist !== false) {
                $j = 0;
                while ($j < sizeof($hierarchy) && $hierarchy[$j] != 'artist') {
                    $j++;
                }
                if ($j < sizeof($hierarchy)) {
                    $parent = $child;
                    while ($parent->getLevel() > $j + 1) {
                        $parent = $parent->getParent();
                    }
                    $display->link($parent, $parent->getName(), $parent->getName(), "jz_track_table_songs_href");
                    echo " / ";
                }
            }
            if (!$trackTruncate) {
                $tName = $child->getName();
            } else {
                $tName = returnItemShortName($child->getName(), $trackTruncate);
            }
            $display->link($child, $tName, $child->getName(), "jz_track_table_songs_href");
            if ($showAlbum) {
                echo "<br>From: ";
                $display->link($album, returnItemShortName($album->getName(), 20), $album->getName(), "jz_track_table_songs_href");
            }
            // Do they want ratings?
            if ($enable_ratings == "true") {
                $rating = $display->displayRating($child, true);
                if ($rating) {
                    echo "<br>" . $rating;
                }
                unset($rating);
            }
            ?>
		   </td>
		   
		   <?php 
            $lyricsSearch = false;
            if (isset($_POST['search_type'])) {
                if ($_POST['search_type'] == "lyrics") {
                    $lyricsSearch = $_POST['search_query'];
                }
            }
            if (isset($_GET['search_type'])) {
                if ($_GET['search_type'] == "lyrics") {
                    $lyricsSearch = $_GET['search_query'];
                }
            }
            if ($lyricsSearch) {
                // Now let's get the lyrics back
                $lyrics = $child->getLyrics();
                // Now let's parse it out
                $lyrics = str_replace("Lyrics Provided by: Leo's Lyrics\nhttp://www.leoslyrics.com", "", $lyrics);
                $start = strpos(strtolower($lyrics), strtolower($lyricsSearch)) - 20;
                if ($start < 0) {
                    $start = 0;
                }
                $lyrics = "&nbsp; &nbsp; &nbsp; &nbsp;(..." . substr($lyrics, $start, strlen($lyricsSearch) + 40) . "...)";
                $lyrics = highlight($lyrics, $lyricsSearch);
                echo '<td width="6%" align="center" valign="top" class="jz_track_table_songs_td">';
                echo "<nobr>" . $lyrics . "</nobr>";
                echo '</td>';
            }
            ?>
		   
		   
		   <?php 
            if ($showAlbumNames) {
                echo '<td width="1%" align="center" valign="top" class="jz_track_table_songs_td"><nobr>';
                $display->link($gParent, returnItemShortName($gParent->getName(), 20), $gParent->getName(), "jz_track_table_songs_href");
                echo '</nobr></td>';
            }
            ?>
		   
			<?php 
            if ($showPlayCount) {
                echo '<td width="1%" align="center" valign="top" class="jz_track_table_songs_td">';
                echo $child->getPlayCount();
                echo '</td>';
            }
            ?>
		   
		   
		   <td width="6%" align="center" valign="top" class="jz_track_table_songs_td">
		   <nobr> &nbsp; <?php 
            echo convertSecMins($metaData['length']);
            ?>
 &nbsp; </nobr>
		   </td>
		   </tr>
		   <?php 
            $i = 1 - $i;
            unset($gParent);
            unset($album);
        }
        // Now let's set a field with the number of checkboxes that were here
        echo "</table>";
        // Now let's show the playlist bar if we should
        if ($showCheck) {
            $blocks = new jzBlocks();
            $blocks->blockSpacer();
            $blocks->playlistBar();
            echo "</form>";
        }
    }
function isWooSeqNumber($row)
{
    $result = getInformation($row, '_order_number');
    return $result != null;
}
Пример #8
0
 protected function setInfoJigoshop()
 {
     include_once PLUGIN_PATH_SHIPWORKSWORDPRESS . 'functions/jigoshop/functionsJigoshop.php';
     $this->id_order = $this->row['ID'];
     $this->createdDate = gmdate("Y-m-d\\TH:i:s\\Z", strtotime($this->row['post_date_gmt']));
     $this->modifiedDate = gmdate("Y-m-d\\TH:i:s\\Z", strtotime($this->row['post_modified_gmt']));
     $this->shipoption = getInformation($this->row, 'shipping_service');
     $this->status = getStatus($this->row);
     $this->firstname = getInformation($this->row, 'billing_first_name');
     $this->middlename = '';
     $this->lastname = getInformation($this->row, 'billing_last_name');
     $this->company = getInformation($this->row, 'billing_company');
     $this->address = getInformation($this->row, 'billing_address_1');
     $this->xaddress = '';
     $this->street2 = getInformation($this->row, 'billing_address_2');
     $this->street3 = '';
     $this->city = getInformation($this->row, 'billing_city');
     $this->state = getInformation($this->row, 'billing_state');
     $this->postcode = getInformation($this->row, 'billing_postcode');
     $this->country = getInformation($this->row, 'billing_country');
     if ('' != $this->company) {
         $this->residential = 'false';
     }
     $this->phone = getInformation($this->row, 'billing_phone');
     $this->email = getInformation($this->row, 'billing_email');
     $this->fax = '';
     $this->website = '';
     $this->shipfirstname = getInformation($this->row, 'shipping_first_name');
     $this->shiplastname = getInformation($this->row, 'shipping_last_name');
     $this->shipaddress = getInformation($this->row, 'shipping_address_1');
     $this->shipstreet2 = getInformation($this->row, 'shipping_address_2');
     $this->shipxaddress = getInformation($this->row, 'shipping_address_1');
     $this->shipcity = getInformation($this->row, 'shipping_city');
     $this->shipstate = getInformation($this->row, 'shipping_state');
     $this->shippostcode = getInformation($this->row, 'shipping_postcode');
     $this->shipcountry = getInformation($this->row, 'shipping_country');
     $this->cardtype = getInformation($this->row, 'payment_method_title');
     $this->freight = getInformation($this->row, 'order_shipping');
     // Shipping Fee
     $this->tax = (double) getInformation($this->row, 'order_tax_no_shipping_tax') + (double) getInformation($this->row, 'order_shipping_tax');
     //Tax Fee
     $this->discount = (double) getInformation($this->row, 'order_discount');
     // Discount
     $this->fees = '';
     // Add Fee
     global $wpdb;
     $time = strtotime($this->date . ' UTC');
     $dateInLocal = date("Y-m-d H:i:s", $time);
     $table = $wpdb->prefix . "postmeta";
     $result = $wpdb->get_row("SELECT * FROM " . $table . " WHERE post_id = " . $this->row['ID'] . " and meta_key = 'order_items'", ARRAY_A);
     $object = unserialize($result['meta_value']);
     foreach ($object as $key => $value) {
         array_push($this->items, new Item($this->software, $this->date, $value, $result['meta_id']));
     }
     /* Les coupons */
     if (getCoupons($this->row['ID']) != null) {
         $coupons = getCoupons($this->row['ID']);
         foreach ($coupons as $coupon) {
             array_push($this->coupons, 'Coupon : ' . $coupon['code']);
         }
     }
     // La note customer
     if ($this->row['post_excerpt'] != null) {
         array_push($this->coupons, $this->row['post_excerpt']);
     }
 }
Пример #9
0
<?php

if (!defined(JZ_SECURE_ACCESS)) {
    die('Security breach detected.');
}
// Let's set the image directory
global $image_dir, $jzUSER, $jzSERVICES;
// Let's clean up the variables
$genreDispName = str_replace("'", "", getInformation($node, "genre"));
$artistDispName = str_replace("'", "", getInformation($node, "artist"));
// Now we need to include the menu library
include_once $include_path . "frontend/menus/menu.lib.php";
// Now we need to do a fix on all the words to remove the ' from them (if they had them)
$word_play_all_albums_from = str_replace("'", "", word("Play all albums from"));
$word_randomize_all_albums_from = str_replace("'", "", word("Randomize all albums from"));
$word_play = str_replace("'", "", word("Play"));
$word_selected = str_replace("'", "", word("Selected"));
$word_session_playlist = str_replace("'", "", word("Session Playlist"));
$word_new_playlist = str_replace("'", "", word("New Playlist"));
$word_new = str_replace("'", "", word("New"));
$word_media_management = str_replace("'", "", word("Media Management"));
$word_actions = str_replace("'", "", word("Actions"));
$word_search = str_replace("'", "", word("Search"));
$word_rewrite_tags = str_replace("'", "", word("Rewrite tags"));
$word_download_album = str_replace("'", "", word("Download album"));
$word_group_features = str_replace("'", "", word("Group Features"));
$word_rate = str_replace("'", "", word("Rate"));
$word_play_album = str_replace("'", "", word("Play album"));
$word_play_random = str_replace("'", "", word("Play Random"));
$word_discuss = str_replace("'", "", word("Discss"));
$word_item_information = str_replace("'", "", word("Item Information"));
Пример #10
0
echo $row_colors[$i];
$i = 1 - $i;
?>
">
				<td width="40%">
					<?php 
echo word("Most Played Track");
?>
:
				</td>
				<td width="60%">
				    <?php 
$a = $node->getMostPlayed("tracks", -1, 1);
if (sizeof($a) > 0) {
    if ($node->getPType() != "artist") {
        echo getInformation($a[0], 'artist') . " - " . $a[0]->getName();
    } else {
        echo $a[0]->getName();
    }
}
?>
				</td>
			</tr>
			<tr class="<?php 
echo $row_colors[$i];
$i = 1 - $i;
?>
">
				<td width="40%">
					<?php 
echo word("Average Track Length");
Пример #11
0
 /**
  *  Injects a leaf or a node into $this.
  * Updated parameters for Jinzora 3.0.
  * 
  * $pathArray can set the following fields:
  * genre, subgenre, artist, album, disk, track
  * If anything is not set, this function will try and pull
  * the information from $this.
  * 
  * @author Ben Dodson
  * @since version - Jul 28, 2006
  */
 function inject($pathArray, $filename, $meta = false)
 {
     if (!isset($pathArray['genre']) && false !== ($info = getInformation($this, "genre"))) {
         $pathArray['genre'] = $info;
     }
     if (!isset($pathArray['subgenre']) && false !== ($info = getInformation($this, "subgenre"))) {
         $pathArray['subgenre'] = $info;
     }
     if (!isset($pathArray['artist']) && false !== ($info = getInformation($this, "artist"))) {
         $pathArray['artist'] = $info;
     }
     if (!isset($pathArray['album']) && false !== ($info = getInformation($this, "album"))) {
         $pathArray['album'] = $info;
     }
     if (!isset($pathArray['disk']) && false !== ($info = getInformation($this, "disk"))) {
         $pathArray['disk'] = $info;
     }
     $mpath = buildPath($pathArray);
     $root = new jzMediaNode();
     $res = $root->oldInject($mpath, $filename);
     if (is_object($res) and $res->isLeaf()) {
         $be = new jzBackend();
         $be->registerFile($filename, $mpath);
         if (is_array($meta) && sizeof($meta) > 0) {
             $res->setMeta($meta, "cache");
             $res->playpath = $filename;
         }
     }
     return $res;
 }
Пример #12
0
    function emailButton($node)
    {
        global $img_email, $this_site;
        $arr = array();
        $arr['action'] = "playlist";
        $arr['jz_path'] = $node->getPath("String");
        if ($node->isLeaf()) {
            $arr['type'] = "track";
        }
        $link = $this_site . urlencode(urlize($arr));
        $artist = getInformation($node, "artist");
        $album = getInformation($node, "album");
        // hack : make 'album' trackname if that's what we're playing.
        if ($node->isLeaf()) {
            $album = $node->getName();
        }
        $mailLink = "mailto:?subject=" . $artist . " - " . $album . "&body=Click to play " . $artist . " - " . $album . ":%0D%0A%0D%0A" . $link . "%0D%0A%0D%0APowered%20by%20Jinzora%20%0D%0AJinzora%20::%20Free%20Your%20Media%0D%0Ahttp://www.jinzora.org";
        ?>
	      <a class="jz_track_table_songs_href" href="<?php 
        echo $mailLink;
        ?>
"><?php 
        echo $img_email;
        ?>
</a>
              <?php 
    }
Пример #13
0
function retrieveInfo()
{
    global $resumeID, $resumeUserID, $conn;
    $userSelectSQL = "SELECT gpa,degree,school,DATE_FORMAT(graduationDate, '%Y-%m-%d'),resumeID,additionalInfomation,userID,status FROM Resume_Post WHERE userID= ? AND resumeID= ?";
    getInformation($userSelectSQL, $conn);
}