Ejemplo n.º 1
0
	public static function printArtistData($artist_list)
	{
		if(count($artist_list != 0))
		{
			foreach($artist_list as $artist)
			{
				//print_r($artist);
				echo "<item>";	
				COMMON::printXMLElement($artist->name,'name');
				COMMON::printXMLElement($artist->url,'url');
				if(count($artist->image[0]->text != 0))
				{
					COMMON::printXMLElement($artist->image[0]->text,'image');
				}
				else
				{
					echo '<image></image>';
				}
				COMMON::printXMLElement($artist->listeners,'listeners');
				COMMON::printXMLElement($artist->plays,'plays');
				echo "</item>";
			}
		}
		else
		{
			//don't have data
			echo '<result><item></item></result>';
		}
	}
Ejemplo n.º 2
0
	public static function printMovieData($movie_list)
	{
		if(count($movie_list != 0))
		{
			foreach($movie_list as $movie)
			{
				echo "<item>";	
				COMMON::printXMLElement($movie->name,'title');
				if(count($movie->poster_img != 0))
				{
					COMMON::printXMLElement($movie->poster_img[0]->image->url,'thumbnail');
				}
				else
				{
					echo '<thumbnail></thumbnail>';
				}
				$studio = COMMON::MurgeArray($movie->studios);				
				COMMON::printXMLElement($studio,'director');
				COMMON::printXMLElement($movie->released,'year');
				echo '<actor></actor>';	
				echo '<nation></nation>';
				$genre = COMMON::MurgeArray($movie->genres);
				COMMON::printXMLElement($genre,'genre');
				echo '<open></open>';
				COMMON::printXMLElement($movie->rating,'grade');
				echo '<story></story>';
	//			COMMON::printXMLElement($movie->overview,'story');
				echo '<grade1></grade1>';
				echo '<grade2></grade2>';
				echo '<grade3></grade3>';
				COMMON::printXMLElement($movie->url,'homepage');
				echo "</item>";
			}
		}
	}
Ejemplo n.º 3
0
	public static function printGoogleData($google_list)
	{
		if(count($google_list != 0))
		{
			foreach($google_list as $google)
			{
				//print_r($google);
				echo "<item>";
				COMMON::printXMLElement($google->distance,'distance');
				COMMON::printXMLElement($google->duration,'duration');
				foreach($google->steps as $step)
				{
					echo "<step>";
					COMMON::printXMLElement($step->distance,'distance');
					COMMON::printXMLElement($step->distance,'duration');
					COMMON::printXMLElement($step->html_instructions,'html_instructions');
					COMMON::printXMLElement($step->travel_mode,'travel_mode');
					echo "</step>";
				}
				echo "</item>";
			}
		}
		else
		{
			//don't have data
			echo '<result><item></item></result>';
		}
	}
Ejemplo n.º 4
0
	public static function printBookData($book_list)
	{
		if(count($book_list != 0))
		{
			foreach($book_list as $book)
			{
				//print_r($book);
				echo "<item>";
				COMMON::printXMLElement($book->title,'title');
				echo "<link></link>";
				echo "<cover_s_url></cover_s_url>";
				COMMON::printXMLElement($book->authorsText,'author');
				COMMON::printXMLElement($book->publishertext,'description');
				echo "<pub_nm></pub_nm>";
				echo "<pub_date></pub_date>";
				echo "<category></category>";
				echo "<price></price>";				
				echo "</item>";
			}
		}
		else
		{
			//don't have data
		}
	}
Ejemplo n.º 5
0
	public static function printUserData($user_list)
	{
		if(count($user_list != 0))
		{
			foreach($user_list as $user)
			{
				echo "<user>";
				COMMON::printXMLElement($user->id,'id');
				
				echo "<name>". iconv("EUC-KR", "UTF-8", $user->name)."</name>";
				COMMON::printXMLElement($user->sex,'sex');
				COMMON::printXMLElement($user->cellphone,'cellphone');
				COMMON::printXMLElement($user->email,'email');
				COMMON::printXMLElement($user->pic,'pic');
				COMMON::printXMLElement($user->num,'num');
				COMMON::printXMLElement($user->pic_path,'pic_path');

				echo "</user>";
			}
		}
	}
Ejemplo n.º 6
0
	public static function printEbayData($ebay_list)
	{
		if(count($ebay_list != 0))
		{
			foreach($ebay_list as $ebay)
			{
				//print_r($book);
				echo "<item>";
				COMMON::printXMLElement($ebay->title,'title');
				echo("<store>EBAY</store>");
				echo "<imageurl></imageurl>";
				COMMON::printXMLElement($ebay->currentPrice.'$','price');
				COMMON::printXMLElement($ebay->viewItemURL,'link');
				echo "</item>";
			}
		}
		else
		{
			//don't have data
			echo '<item></item>';
		}
	}
Ejemplo n.º 7
0
	public static function GetMovieData($idList)
	{
		$movie_list = array();
		
		if(count($idList) != 0)
		{
			foreach($idList as $id)
			{
				$url = URL::GetthemoviedbUrl(ApiKey::$themoviedb,'getInfo',$id);
				$value = COMMON::MakeJson($url);			
			
				if(count($value) != 0)
				{
					//$name,$url,$overview,$rating,$released,$runtime,$budget,$category,$studios,$poster_img,$adult,$genres;
					//theMovieData($a,$b,$c,$d,$e,$f,$g,$h,$i,$j,$k,$l)
					$movie = $value[0];
					
					$a = $movie->name;
					$b = $movie->url;
					$c = $movie->overview;
					$d = $movie->rating;
					$e = $movie->released;
					$f = $movie->runtime;
					$g = $movie->budget;
					$h = $movie->studios;
					$i = $movie->posters;
					$j = $movie->genres;
					
					$movieData = new M_theMovieData($a,$b,$c,$d,$e,$f,$g,$h,$i,$j);
					array_push($movie_list,$movieData);
				}
			}
		}
		
		//print_r($movie_list);
		return $movie_list;
	}
Ejemplo n.º 8
0
//define('MAINDIR','/Users/rpkim/Sites/');
define('MAINDIR',$_SERVER['DOCUMENT_ROOT'].'/');
define('BADADIR',MAINDIR.'bada/');
define('BADAENDIR',BADADIR.'en/');

include BADAENDIR.'model/apikey.php'; 
include BADAENDIR.'model/url.php'; 

include BADAENDIR.'lib/json.php';
include BADAENDIR.'lib/common.php';

include BADAENDIR.'control/lastfm.php';
include BADAENDIR.'model/lastfm.php';
include BADAENDIR.'view/lastfm.php';

#main
$search = $_GET['search'];
if($search != "")
{
	$url = URL::GetlastfmUrl(ApiKey::$lastfm,'search',$search,'artist','');
	$value = COMMON::MakeJson($url);
	$basic_list = C_lastfmData::GetArtistID($value->results->artistmatches->artist);
	$artist_list = C_lastfmData::GetArtistData($basic_list);
	V_lastfmArtistData::printArtistData($artist_list);
}
else
{
	die('do not search value');
}

?>
Ejemplo n.º 9
0
<?
#header
define('MAINDIR',$_SERVER['DOCUMENT_ROOT'].'/');
define('BADADIR',MAINDIR.'bada/');
define('BADAENDIR',BADADIR.'en/');

include BADAENDIR.'model/apikey.php'; 
include BADAENDIR.'model/url.php'; 

include BADAENDIR.'lib/json.php';
include BADAENDIR.'lib/common.php';

include BADAENDIR.'control/isbndb.php';
include BADAENDIR.'model/isbndb.php';
include BADAENDIR.'view/isbndb.php';

#main
$search = $_GET['search'];
if($search != "")
{
	$url = URL::GetisbndbUrl(ApiKey::$isbndb,$search);
	$value = COMMON::MakeXml($url);
	$book_info = C_IsbnData::GetBookData($value);
	V_IsbnData::printBookData($book_info);
}
?>
Ejemplo n.º 10
0
            <div class="settings-view">
                <div class="config-menu">
                    <label><?php 
        i18n("Settings");
        ?>
</label>
                    <div class="panels-components">
                        <ul>
                            <li name="editor-settings" data-file="components/settings/settings.editor.php" data-name="editor" class="active">
                                <a><span class="icon-home bigger-icon"></span>Editor</a>
                            </li>
                            <li name="system-settings" data-file="components/settings/settings.system.php" data-name="system">
                                <a><span class="icon-doc-text bigger-icon"></span>System</a>
                            </li>
                            <?php 
        if (COMMON::checkAccess()) {
            ?>
                                    <li name="extension-settings" data-file="components/fileext_textmode/dialog.php?action=fileextension_textmode_form" data-name="fileext_textmode">
                                        <a><span class="icon-pencil bigger-icon"></span>Extensions</a>
                                    </li>
                                    <?php 
        }
        ?>
                        </ul>
                    </div>
                    <hr>
                    <div class="panels-plugins">
                        <?php 
        $plugins = Common::readDirectory(PLUGINS);
        foreach ($plugins as $plugin) {
            if (file_exists(PLUGINS . "/" . $plugin . "/plugin.json")) {
Ejemplo n.º 11
0
include BADAENDIR.'model/apikey.php'; 
include BADAENDIR.'model/url.php'; 

include BADAENDIR.'lib/json.php';
include BADAENDIR.'lib/common.php';

include BADAENDIR.'control/ebay.php';
include BADAENDIR.'model/ebay.php';
include BADAENDIR.'view/ebay.php';

#main
//$apikey = ApiKey();

#artist test
$url = URL::GetEbayUrl(ApiKey::$ebay,'nintendo');
//echo $url;
//$value = COMMON::MakeJson($url);
//$value = COMMON::MakeXml($url);
$value = COMMON::OpenXml($url);
//print_r($value);
//echo $value->searchResult->item[0]->title;//artist[0]->mbid;

$ebay_list = C_EbayData::GetEbayData($value->searchResult->item);
//print_r($book_info);
V_EbayData::printEbayData($ebay_list);

?>


Ejemplo n.º 12
0
	public static function GetArtistData($BasicList)
	{
		$artist_list = array();
		
		if(count($BasicList) != 0)
		{
			foreach($BasicList as $basic)
			{
				$url = URL::GetlastfmUrl(ApiKey::$lastfm,'getInfo',$basic,'artist');
				$value = COMMON::MakeJson($url);			
				$artist = $value->artist;		
				if(count($value) != 0)
				{
					//$name,$url,$image,$listeners,$plays;
					
					$a = $artist->name;
					$b = $artist->url;
					$c = $artist->image;
					$d = $artist->stats->listeners;
					$e = $artist->stats->playcount;
										
					$artistData = new M_lastfmArtistData($a,$b,$c,$d,$e);
					array_push($artist_list,$artistData);
				}
			}
		}
		
		//print_r($album_list);
		return $artist_list;
	}