Exemplo n.º 1
0
                             break;
                     }
                 }
                 break;
         }
     }
     break;
 case 'media':
     Manager::LoadExtension('Media', $ClassConstructor);
     $Smarty->translate('Media');
     switch ($_REQUEST['subcategory']) {
         case 'videos':
             $TypeID = Media::getMediaTypeByName($_REQUEST['subcategory']);
             $Data = Media::getMediaRecord($_REQUEST['lastcategory'], $TypeID);
             $Smarty->assign('MediaData', $Data);
             $Smarty->assign('MediaVideos', Media::getMedia(1));
             Page::GeneratePage($Smarty, 'media', null, $Smarty->variable('Media_Videos'), 'pages/media_videos');
             break;
         case 'screenshots':
             break;
         case 'music':
             break;
         case 'wallpapers':
             break;
         default:
             $Smarty->assign('MediaData', Media::getAll());
             Page::GeneratePage($Smarty, 'media', null, $Smarty->variable('Menu_Media'), 'pages/media_index');
             break;
     }
     break;
 case 'shop':
Exemplo n.º 2
0
try {
    $auth->authenticate();
    require_once 'Comment.php';
    require_once 'Media.php';
    require_once 'Posts.php';
    require_once 'Profile.php';
    require_once 'Skillet.php';
    require_once 'Utils.php';
    if (isset($_GET["get"]) && $_GET["get"] == "posts") {
        $posts = new Posts($auth);
        $posts->getPosts();
        print $posts->printOutput();
    } else {
        if (isset($_GET["get"]) && $_GET["get"] == "media") {
            $media = new Media($auth);
            $media->getMedia();
            print $media->printOutput();
        } else {
            if (isset($_POST['changepass'])) {
                $auth->changePassword();
                print $auth->printOutput();
            } else {
                if (isset($_POST["comment"])) {
                    $posts = new Posts($auth);
                    $posts->post();
                    print $posts->printOutput();
                } else {
                    if (isset($_POST["deleteid"])) {
                        $utils = new Utils($auth);
                        if (isset($_POST["deleteid"]) && $_POST["deleteid"] != "" && is_numeric($_POST["deleteid"])) {
                            $id = $_POST["deleteid"];
Exemplo n.º 3
0
				} else {
					$sp_feeds = $skin->parseTag('feed_logo_exist', 'feed_logo_nonexistence', $sp_feeds);
				}
				
				$s_feedrecent = '';
				$src_feedrecent = $skin->cutSkinTag('feedrecent');
				$src_feedrecent_rep = $skin->cutSkinTag('feedrecent_rep');
				$s_feedrecent_rep = '';

					if ($recents = FeedItem::getRecentFeedItemsByFeed($feed['id'], $skinConfig->feedListRecentFeedList)) {
						$sp_feedrecent_rep = '';
						foreach($recents as $recent) {
							$link_url = $config->addressType == 'id' ? $service['path'].'/go/'.$recent['id'] : $service['path'].'/go/'.$recent['permalink'];
							
							$recent['thumbnail'] = '';
							if($media = Media::getMedia($recent['thumbnailId'])) {
								$recent['thumbnail'] = $media['thumbnail'];	
							}

							$src_thumbnail = $skin->cutSkinTag('cond_thumbnail', $src_feedrecent_rep);
							$thumbnailFile =  $event->on('Text.postThumbnail', Media::getMediaFile($recent['thumbnail']));
		
							if(!empty($thumbnailFile)) {
								$s_thumbnail = (!Validator::is_empty($thumbnailFile)) ? $skin->parseTag('feeds_recent_thumbnail', $thumbnailFile, $src_thumbnail) : '';
								$s_feedrecent_rep = $skin->dressOn('cond_thumbnail', $src_thumbnail, $s_thumbnail, $src_feedrecent_rep);	
								$s_feedrecent_rep = $skin->parseTag('feeds_recent_thumbnail_exist', 'post_thumbnail_exist', $s_feedrecent_rep);
							} else {
								$s_feedrecent_rep = $skin->dressOn('cond_thumbnail', $src_thumbnail, '', $src_feedrecent_rep);
								$s_feedrecent_rep = $skin->parseTag('feeds_recent_thumbnail_exist', 'post_thumbnail_nonexistence', $s_feedrecent_rep);
							}
							
Exemplo n.º 4
0
 private static function getPlayerArrayDataBP($gameId, $playerArray, $getItems = true, $getAttributes = true, $getNotes = true)
 {
     //preload data into memory for quick re-use
     $mediaA = Media::getMedia($gameId)->data;
     $mediaMap = array();
     $numMedia = count($mediaA);
     for ($i = 0; $i < $numMedia; $i++) {
         $mediaMap[$mediaA[$i]->media_id] = $mediaA[$i];
     }
     if ($getItems) {
         $itemsMap = array();
         $itemsA = Module::queryArray("SELECT * FROM items WHERE game_id = '{$gameId}' AND (is_attribute = '0' OR is_attribute = '')");
         $numItems = count($itemsA);
         for ($i = 0; $i < $numItems; $i++) {
             $itemsA[$i]->media_url = $mediaMap[$itemsA[$i]->media_id]->url;
             $itemsA[$i]->media_thumb_url = $mediaMap[$itemsA[$i]->media_id]->thumb_url;
             $itemsA[$i]->icon_url = $mediaMap[$itemsA[$i]->icon_media_id]->url;
             $itemsA[$i]->icon_thumb_url = $mediaMap[$itemsA[$i]->icon_media_id]->thumb_url;
             $itemsMap[$itemsA[$i]->item_id] = $itemsA[$i];
         }
     }
     if ($getAttributes) {
         $attributesMap = array();
         $attributesA = Module::queryArray("SELECT * FROM items WHERE game_id = '{$gameId}' AND is_attribute = '1'");
         $numAttributes = count($attributesA);
         for ($i = 0; $i < $numAttributes; $i++) {
             $attributesA[$i]->media_url = $mediaMap[$attributesA[$i]->media_id]->url;
             $attributesA[$i]->media_thumb_url = $mediaMap[$attributesA[$i]->media_id]->thumb_url;
             $attributesA[$i]->icon_url = $mediaMap[$attributesA[$i]->icon_media_id]->url;
             $attributesA[$i]->icon_thumb_url = $mediaMap[$attributesA[$i]->icon_media_id]->thumb_url;
             $attributesMap[$attributesA[$i]->media_id] = $attributesA[$i];
         }
     }
     if ($getNotes) {
         $gameTagsMap = array();
         $gameTagsA = Module::queryArray("SELECT * FROM game_tags WHERE game_id = '{$gameId}'");
         $numGameTags = count($gameTagsA);
         for ($i = 0; $i < $numGameTags; $i++) {
             $gameTagsMap[$gameTagsA[$i]->tag_id] = $gameTagsA[$i];
         }
     }
     $backpacks = array();
     $numPlayers = count($playerArray);
     for ($i = 0; $i < $numPlayers; $i++) {
         $backpack = new stdClass();
         $backpack->owner = Module::queryObject("SELECT player_id, user_name, display_name, group_name, media_id FROM players WHERE player_id = '{$playerArray[$i]}'");
         if (!$backpack->owner) {
             continue;
         }
         $playerPic = Media::getMediaObject('player', $backpack->owner->media_id)->data;
         $backpack->owner->player_pic_url = $playerPic->url;
         $backpack->owner->player_pic_thumb_url = $playerPic->thumb_url;
         $media->thumb_file_path = substr($media->file_path, 0, strrpos($media->file_path, '.')) . '_128' . substr($media->file_path, strrpos($media->file_path, '.'));
         $media->url_path = Config::gamedataWWWPath . "/";
         if ($getItems || $getAttributes) {
             if ($getItems) {
                 $backpack->items = array();
             }
             if ($getAttributes) {
                 $backpack->attributes = array();
             }
             $playerItemData = Module::queryArray("SELECT item_id, qty FROM player_items WHERE game_id = '{$gameId}' AND player_id = '{$playerArray[$i]}'");
             $numItems = count($playerItemData);
             for ($j = 0; $j < $numItems; $j++) {
                 if ($getItems && isset($itemsMap[$playerItemData[$j]->item_id])) {
                     $item = clone $itemsMap[$playerItemData[$j]->item_id];
                     $item->qty = $playerItemData[$j]->qty;
                     $backpack->items[] = $item;
                 } else {
                     if ($getAttributes && isset($attributesMap[$playerItemData[$j]->item_id])) {
                         $attribute = clone $attributesMap[$playerItemData[$j]->item_id];
                         $attribute->qty = $playerItemData[$j]->qty;
                         $backpack->attributes[] = $attribute;
                     }
                 }
             }
         }
         if ($getNotes) {
             $rawNotes = Module::query("SELECT * FROM notes WHERE owner_id = '{$playerArray[$i]}' AND game_id = '{$gameId}' AND parent_note_id = 0 ORDER BY sort_index ASC");
             $backpack->notes = array();
             while ($note = mysql_fetch_object($rawNotes)) {
                 $note->username = $backpack->owner->user_name;
                 if ($backpack->owner->display_name && $backpack->owner->display_name != "") {
                     $note->username = $backpack->owner->display_name;
                 }
                 $rawContent = Module::query("SELECT * FROM note_content WHERE note_id = '{$note->note_id}'");
                 $note->contents = array();
                 while ($content = mysql_fetch_object($rawContent)) {
                     $content->media_url = $mediaMap[$content->media_id]->url;
                     $content->media_thumb_url = $mediaMap[$content->media_id]->thumb_url;
                     $note->contents[] = $content;
                 }
                 $note->likes = Notes::getNoteLikes($note->note_id);
                 $note->player_liked = Notes::playerLiked($playerId, $note->note_id);
                 $result = Module::query("SELECT * FROM note_tags WHERE note_id = '{$note->note_id}'");
                 $note->tags = array();
                 while ($tag = mysql_fetch_object($result)) {
                     $note->tags[] = $gameTagsMap[$tag->tag_id];
                 }
                 $note->dropped = 0;
                 if ($location = Notes::noteDropped($note->note_id, $note->game_id)) {
                     $note->dropped = 1;
                 }
                 $note->lat = $location ? $location->latitude : 0;
                 $note->lon = $location ? $location->longitude : 0;
                 $rawComments = Module::query("SELECT * FROM notes WHERE game_id = '{$gameId}' AND parent_note_id = {$note->note_id} ORDER BY sort_index ASC");
                 $note->comments = array();
                 while ($comment = mysql_fetch_object($rawComments)) {
                     $player = Module::queryObject("SELECT user_name, display_name FROM players WHERE player_id = '{$comment->owner_id}' LIMIT 1");
                     $comment->username = $player->user_name;
                     $comment->displayname = $player->display_name;
                     $rawContent = Module::query("SELECT * FROM note_content WHERE note_id = '{$comment->note_id}'");
                     $comment->contents = array();
                     while ($content = mysql_fetch_object($rawContent)) {
                         $content->media_url = $mediaMap[$content->media_id]->url;
                         $content->media_thumb_url = $mediaMap[$content->media_id]->thumb_url;
                         $comment->contents[] = $content;
                     }
                     $comment->likes = Notes::getNoteLikes($comment->note_id);
                     $comment->player_liked = Notes::playerLiked($playerId, $comment->note_id);
                     $note->comments[] = $comment;
                 }
                 $backpack->notes[] = $note;
             }
         }
         $backpacks[] = $backpack;
     }
     return $backpacks;
 }
Exemplo n.º 5
0
	}
	$skin->dress('focus', $s_focuses);
	$skin->replace('focuslist_url', $servicePath.'/focus/');

	// 인기글
	$src_booms = $skin->cutSkinTag('boom');

	$result = FeedItem::getTopFeedItemsByLastest($skinConfig->boomList,$config->rankBy);
	if(count($result) > 0) {	

		$s_booms_rep = '';
		$src_booms_rep = $skin->cutSkinTag('boom_rep');

		foreach($result as $item) {		
			$item['thumbnail'] = '';
			if($media = Media::getMedia($item['thumbnailId'])) {
				$item['thumbnail'] = $media['thumbnail'];	
			}
			$src_thumbnail = $skin->cutSkinTag('cond_boom_thumbnail');
			$thumbnailFile = Media::getMediaFile($item['thumbnail']);

			if(!empty($thumbnailFile)) {
				$s_thumbnail = (!Validator::is_empty($thumbnailFile)) ? $skin->parseTag('boom_thumbnail', $thumbnailFile, $src_thumbnail) : '';
				$sp_booms = $skin->dressOn('cond_boom_thumbnail', $src_thumbnail, $s_thumbnail, $src_booms_rep);		
				$sp_booms = $skin->parseTag('boom_thumbnail_exist', 'boom_thumbnail_exist', $sp_booms);
			} else {
				$sp_booms = $skin->dressOn('cond_boom_thumbnail', $src_thumbnail, '', $src_booms_rep);
				$sp_booms = $skin->parseTag('boom_thumbnail_exist', 'boom_thumbnail_nonexistence', $sp_booms);
			}

			$link_url = $config->addressType == 'id' ? $service['path'].'/go/'.$item['id'] : $service['path'].'/go/'.$item['permalink'];
Exemplo n.º 6
0
		
		if(isset($linker_feed['xmlURL']) && !empty($linker_feed['xmlURL'])) {
			if($linker_feed['xmlType'] == 'rss') { // rss
				$src_rss = $skin->cutSkinTag('rss');	
					$s_rss = $skin->parseTag('rss_url', $linker_feed['xmlURL'], $src_rss);
				$skin->dress('rss', $s_rss);
			} else if($linker_feed['xmlType'] == 'atom') { // atom
				$src_atom = $skin->cutSkinTag('atom');	
					$s_atom = $skin->parseTag('atom_url', $linker_feed['xmlURL'], $src_atom);
				$skin->dress('atom', $s_atom);
			}
		}

		$linker_post['thumbnail'] = '';

		if($media = Media::getMedia($linker_post['thumbnailId'])) {
			$linker_post['thumbnail'] = $media['thumbnail'];	
		}

		$thumbnailFile = '';

		$src_thumbnail = $skin->cutSkinTag('cond_thumbnail');
		if ((substr($linker_post['thumbnail'], 0, 7) != 'http://')) {
			if (!is_file(ROOT . '/cache/thumbnail/' . $linker_post['thumbnail'])) { 
				$thumbnailFile = '';
			} else {
				$thumbnailFile = str_replace('/cache/thumbnail//', '/cache/thumbnail/', $service['path']. '/cache/thumbnail/'.$linker_post['thumbnail']);			
			}
		}

		if(!empty($thumbnailFile)) {
Exemplo n.º 7
0
<?php

require_once 'models/Http.php';
require_once 'models/Media.php';
require_once 'models/User.php';
require_once 'views/MediaPage.php';
require_once 'views/Standard.php';
$media = new Media();
$media_id = Http::get('id');
$comments = $media->getComments($media_id, 0, 50);
$media_tags = $media->getAllTags($media_id);
$media_data = $media->getMedia($media_id);
$statistics = $media->getMediaStatistics($media_id);
$user = User::getUser(User::getCurrentLogin());
$user_affiliation = $media->getUserVotes($media_id, $user['user_ID']);
$media_code = MediaPage::render($media_data, $media_tags, $comments);
$from = $media_data['from_id'];
$to = $media_data['to_id'];
$control_code = MediaPage::renderControls($media_data['media_ID'], $user_affiliation, $statistics, $from, $to);
$error_code = MediaPage::renderWarning(Http::get('reason'));
echo Standard::render($control_code . $error_code, $media_code, User::generateLoginState());
Exemplo n.º 8
0
 public static function getAll()
 {
     return ['videos' => Media::getMedia(1), 'screenshots' => Media::getMedia(2), 'music' => Media::getMedia(3), 'wallpapers' => Media::getMedia(4)];
 }
Exemplo n.º 9
0
	function getIssueFocus($input, $config) {
		global $database, $db, $skin, $event, $service, $accessInfo;

		// 첫페이지에만 보이기 ..
		if(!(empty($accessInfo['controller']) && ($accessInfo['page']==1))) {
			return $input;
		}

		$pluginURL = $event->pluginURL;
		requireComponent('LZ.PHP.Media');

		if(!isset($config['tabDelay'])) {
			$config['tabDelay'] = 0;
		}

		// css
		ob_start();
?>
<style type="text/css"> 
		.issueFocus { border:1px solid #dbdbdb; }
			.issueFocus ul.menu { width:100%; list-style:none; padding:0; margin:0; color:#999999; letter-spacing:2px;background:url("<?php echo $pluginURL;?>/images/bg_dot.gif") repeat-x bottom #fbfbfb; height:28px;  }
			.issueFocus ul.menu li { float:left; padding:8px; padding-left:10px; padding-right:10px; border-right:1px solid #eaeaea; height:11px; cursor:pointer; }
				.issueFocus ul.menu li.selected {font-weight:bold; color:#0f0f0f; background:#ffffff; border-right:1px solid #dbdbdb; height:12px; }
		
			.issueFocus ul.item { list-style:none; padding:10px; padding-bottom:0px; margin:0; display:none; overflow:hidden;  }
				.issueFocus ul.viewed { display:block; }
			.issueFocus ul.item li { padding-top:5px; padding-bottom:5px; }
				.issueFocus ul.item li.empty { color:#aaa; font-size:11px; padding-bottom:14px; }
				
				.issueFocus ul.item li .thumbnail { float:left; margin-right:10px; width:60px; }
					.issueFocus ul.item li .thumbnail img { width:50px; border:1px solid #ddd; padding:2px; }

				.issueFocus ul.item li .data { float:left; width:670px; padding-top:3px; }
					.issueFocus ul.item li .data h3 { font-size:13px; color:#595959; font-weight:bold; margin:0; margin-bottom:6px; }
						.issueFocus ul.item li .data h3 a { color:#595959; text-decoration:none; }
						.issueFocus ul.item li .data h3 a:hover { text-decoration:underline; }

					.issueFocus ul.item li .data .desc { color:#aaa; line-height:16px; font-size:11px; }

				.issueFocus ul.item li .data2 { width: 745px; }
		
		.issueFocus_shadow { height:0px; font-size:0; border-top:1px solid #f5f5f5; margin-bottom:15px; }
</style>
<?php
		$css = ob_get_contents();
		ob_end_clean();
		
		$skin->css($css);

		// js
		ob_start();
?>
<script type="text/javascript"> 
		var issueFocusTabIntervalId = 0;

		function issueFocusMouseOverMenu(id) {	
<?php
	if($config['tabDelay']>0) {
?>
			if(issueFocusTabIntervalId!=0) {
				clearInterval(issueFocusTabIntervalId);
				issueFocusTabIntervalId = 0;
			}

			issueFocusTabIntervalId = setInterval( function() {
<?php
	}
?>
				var menu = $("#"+id+"_menu");
				var item = $("#"+id+"_item");

				$('._issueFocus_menu').each( function() {
					$(this).removeClass('selected');
				});
				$('._issueFocus_item').each( function() {
					$(this).removeClass('viewed');
				});

				menu.addClass('selected');
				item.addClass('viewed');	
<?php
	if($config['tabDelay']>0) {
?>				
				clearInterval(issueFocusTabIntervalId);
				issueFocusTabIntervalId = 0;
			},<?php echo $config['tabDelay'];?>);
<?php
	}
?>
		}

		function issueFocusMouseOut() {		
			if(issueFocusTabIntervalId!=0) {
				clearInterval(issueFocusTabIntervalId);
				issueFocusTabIntervalId = 0;
			}
		}
</script>
<?php
		$javascript = ob_get_contents();
		ob_end_clean();
		
		$skin->javascript($javascript);

		if($config['issueType'] == 'auto') {
			$issueTags = Tag::getIssueTags($config['issueCount']);
		} else {
			$issueTags = explode(',', $config['issueTag']);
			foreach($issueTags as $key=>$tag) {
				$issueTags[$key] = array('name'=>trim($tag));
			}
		}

		ob_start();
?>
		<div class="issueFocus">
			<ul class="menu" onmouseout="issueFocusMouseOut();">
<?php
		// 포커스

		if($config['useFocus']) {
			$focusFeedItems = FeedItem::getRecentFocusFeedItems($config['focusCount']);
?>
				<li id="_issueFocus_focus_menu" class="selected _issueFocus_menu" onclick="goto('<?php echo $service['path'];?>/focus'); return false;" onmouseover="issueFocusMouseOverMenu('_issueFocus_focus');">포커스</li>
<?php
		}
		
		// 이슈태그

		$index = 0;
		foreach($issueTags as $key=>$tag) {
			list($issueTags[$key]['feedItems'], $totalFeedItemCount) = FeedItem::getFeedItems('tag', $tag['name'], null, 1, $config['issueFeedCount']);
			$index++;
?>	
			<li id="_issueFocus_<?php echo $index;?>_menu" class="<?php echo (!$config['useFocus']&&($index==1))?'selected ':'';?>_issueFocus_menu" onclick="goto('<?php echo $service['path'];?>/search/tag/<?php echo rawurlencode($tag['name']);?>'); return false;" onmouseover="issueFocusMouseOverMenu('_issueFocus_<?php echo $index;?>');" title="클릭하시면 태그검색이 가능합니다."><?php echo $tag['name'];?></li>
<?php
		}
?>
			</ul>

			<div class="clear"></div>
<?php
		// 포커스 내용
		if($config['useFocus']) {
?>
			<ul id="_issueFocus_focus_item" class="item _issueFocus_item viewed">
<?php
	if(count($focusFeedItems)>0) {
		foreach($focusFeedItems as $feedItem) {
			$thumbnailFile = '';
			if($media = Media::getMedia($feedItem['thumbnailId'])) {
				$thumbnailFile = Media::getMediaFile($media['thumbnail']);
			}

			$link_url = $config->addressType == 'id' ? $service['path'].'/go/'.$feedItem['id'] : $service['path'].'/go/'.$feedItem['permalink'];

?>
			<li>
<?php
			if(!empty($thumbnailFile)) {
?>
				<div class="thumbnail">
					<img src="<?php echo $thumbnailFile;?>" alt="미리보기" />
				</div>
<?php
			}
?>
				<div class="data <?php echo empty($thumbnailFile)?'data2':'';?>">
					<h3><a href="<?php echo $link_url;?>" target="_blank"><?php echo UTF8::lessenAsByte(func::stripHTML($feedItem['title']),$config['issueTitleLength']);?></a></h3>
					<div class="desc">
						<?php echo UTF8::lessenAsByte(func::htmltrim(func::stripHTML($feedItem['description'])),$config['issueDescLength']);?>
					</div>
				</div>

				<div class="clear"></div>
			</li>
<?php
		}
	} else {
?>
			<li class="empty">포커스로 지정된 글이 없습니다.</li>
<?php
	}
?>
			</ul>
<?php
		}

		// 이슈태그 내용

		$index = 0;
		foreach($issueTags as $tag) {
			$index ++;
?>
			<ul id="_issueFocus_<?php echo $index;?>_item" class="item _issueFocus_item<?php echo (!$config['useFocus']&&($index==1))?' viewed':'';?>">
<?php
	if(count($tag['feedItems'])>0) {
		foreach($tag['feedItems'] as $feedItem) {
			$thumbnailFile = '';
			if($media = Media::getMedia($feedItem['thumbnailId'])) {
				$thumbnailFile = Media::getMediaFile($media['thumbnail']);
			}		
			
			$link_url = $config->addressType == 'id' ? $service['path'].'/go/'.$feedItem['id'] : $service['path'].'/go/'.$feedItem['permalink'];

?>
			<li>
<?php
			if(!empty($thumbnailFile)) {
?>
				<div class="thumbnail">
					<img src="<?php echo $thumbnailFile;?>" alt="미리보기" />
				</div>
<?php
			}
?>
				<div class="data <?php echo empty($thumbnailFile)?'data2':'';?>">
					<h3><a href="<?php echo $link_url;?>" target="_blank"><?php echo UTF8::lessenAsByte(func::stripHTML($feedItem['title']),60);?></a></h3>
					<div class="desc">
						<?php echo UTF8::lessenAsByte(func::stripHTML($feedItem['description']),$config['issueDescLength']);?>
					</div>
				</div>

				<div class="clear"></div>
			</li>
<?php
		}
	}
?>
			</ul>
<?php
		}
?>
		</div>
		<div class="issueFocus_shadow"></div>
<?php
		$result = ob_get_contents();
		ob_end_clean();

		return $input . $result;
	}
Exemplo n.º 10
0
				$category = $event->on('Data.category', $category);
				
				$sp_categories = $skin->parseTag('category_name', $event->on('Text.categoryName', UTF8::lessenAsByte($category['name'], $skinConfig->categoryListNameLength)), $src_category_rep);

				$s_categoryrecent = '';
				$src_categoryrecent = $skin->cutSkinTag('categoryrecent');
				$src_categoryrecent_rep = $skin->cutSkinTag('categoryrecent_rep');
				$s_categoryrecent_rep = '';

					if ($category['posts']) {	
						$sp_categoryrecent_rep = '';
						foreach($category['posts'] as $post) {
							$link_url = $config->addressType == 'id' ? $service['path'].'/go/'.$post['id'] : $service['path'].'/go/'.$post['permalink'];

							$post['thumbnail'] = '';
							if($media = Media::getMedia($post['thumbnailId'])) {
								$post['thumbnail'] = $media['thumbnail'];	
							}
							$src_thumbnail = $skin->cutSkinTag('cond_thumbnail', $src_category_rep);
							$thumbnailFile =  $event->on('Text.postThumbnail', Media::getMediaFile($post['thumbnail']));
		
							if(!empty($thumbnailFile)) {
								$s_thumbnail = (!Validator::is_empty($thumbnailFile)) ? $skin->parseTag('categories_recent_thumbnail', $thumbnailFile, $src_thumbnail) : '';
								$s_categoryrecent_rep = $skin->dressOn('cond_thumbnail', $src_thumbnail, $s_thumbnail, $src_categoryrecent_rep);	
								$s_categoryrecent_rep = $skin->parseTag('categories_recent_thumbnail_exist', 'post_thumbnail_exist', $s_categoryrecent_rep);
							} else {
								$s_categoryrecent_rep = $skin->dressOn('cond_thumbnail', $src_thumbnail, '', $src_categoryrecent_rep);
								$s_categoryrecent_rep = $skin->parseTag('categories_recent_thumbnail_exist', 'post_thumbnail_nonexistence', $s_categoryrecent_rep);
							}
							
							$s_categoryrecent_rep = $skin->parseTag('categories_recent_url', $post['permalink'], $s_categoryrecent_rep);
Exemplo n.º 11
0
	function getMagazineFocus($input, $config) {	
		global $database, $db, $skin, $event, $service, $accessInfo;

		// 첫페이지에만 보이기 ..
		/*
		if(!(empty($accessInfo['controller']) && ($accessInfo['page']==1))) {
			return $input;
		}
		*/

		$pluginURL = $event->pluginURL;
		requireComponent('LZ.PHP.Media');

		if(!isset($config['tabDelay'])) {
			$config['tabDelay'] = 0;
		}
		
		ob_start();
?>
		<style type="text/css">
			.magazineFocusWrap {  padding-top:10px; }
				.magazineFocusTable { width:100%; border:5px solid #b2c941; }
				.magazineFocusTable .leftTab { width:166px; overflow:hidden; background:url("<?php echo $pluginURL;?>/images/bg_left_tab.gif") repeat-y right #fafafa; vertical-align:top; }
					.magazineFocusTable .leftTab ul { list-style:none; margin:0; padding:0; }
						.magazineFocusTable .leftTab ul li { color:#989898; padding-left:20px; padding-top:8px; padding-bottom:8px; margin-right:1px; background:url("<?php echo $pluginURL;?>/images/bg_left_line.gif") repeat-x top; cursor:pointer; font-size:13px; }
						
						.magazineFocusTable .leftTab ul li a { color:#989898; text-decoration:none; }

						.magazineFocusTable .leftTab ul li.first { background-image:none; }
						.magazineFocusTable .leftTab ul li.selected { background-color:#ffffff; margin-right:0; color:#333; font-weight:bold; }
						.magazineFocusTable .leftTab ul li.selected span { background:url("<?php echo $pluginURL;?>/images/bg_left_select.gif") no-repeat right; padding-right:14px; }

						.magazineFocusTable .leftTab ul li.selected a { color:#333; }

						.magazineFocusTable .leftTab ul li.dummy { cursor:default; }
				
				.magazineFocusTable .mainData { vertical-align:top; }

					.magazineFocusTable .mainData ul.item { list-style:none; padding:10px; padding-right:0; padding-bottom:0px; margin:0; display:none; overflow:hidden;  }
						.magazineFocusTable .mainData ul.viewed { display:block; }
					.magazineFocusTable .mainData ul.item li { width:430px; height:68px; padding-bottom:5px; margin-bottom:10px; overflow:hidden; border-bottom:1px solid #ececec; }
						.magazineFocusTable .mainData ul.item li.empty { color:#aaa; font-size:11px; padding-bottom:14px; }
						
						.magazineFocusTable .mainData ul.item li .thumbnail { float:left; margin-right:10px; width:62px; }
							.magazineFocusTable .mainData ul.item li .thumbnail img { width:62px; }

						.magazineFocusTable .mainData ul.item li .data { float:left; width:350px; }
							.magazineFocusTable .mainData ul.item li .data h3 { font-size:14px; color:#595959; font-weight:bold; margin:0; margin-bottom:2px; }
								.magazineFocusTable .mainData ul.item li .data h3 a { color:#4e4e4e; text-decoration:none; }
								.magazineFocusTable .mainData ul.item li .data h3 a:hover { text-decoration:underline; }
							
							.magazineFocusTable .mainData ul.item li .permalink { font-size:11px; margin-bottom:8px; height:12px; line-height:12px; overflow:hidden; }
								.magazineFocusTable .mainData ul.item li .permalink a { color:#909090; text-decoration:none; }
								.magazineFocusTable .mainData ul.item li .permalink a:hover { text-decoration:underline; }

							.magazineFocusTable .mainData ul.item li .data .desc { color:#5d5d5d; line-height:14px; font-size:11px; }

						.magazineFocusTable .mainData ul.item li .data2 { width: 430px; }

						.magazineFocusTable .mainData ul.item li.title_only { padding-bottom:0; border:0; height:14px; background:url("<?php echo $pluginURL;?>/images/bg_li.gif") no-repeat 0px 6px; padding-left:8px; letter-spacing:0px; }
							.magazineFocusTable .mainData ul.item li.title_only a { color:#4e4e4e; text-decoration:none; }
							.magazineFocusTable .mainData ul.item li.title_only a:hover { text-decoration:underline; }

							.magazineFocusTable .mainData ul.item li.title_only .sep { color:#eee; }
							.magazineFocusTable .mainData ul.item li.title_only .feedTitle { color:#999; font:11px Dotum; }
			
				.magazineFocusTable .focusImageWrap { padding:5px;  }
				.magazineFocusTable .focusImageWrap .focusImageDataWrap { padding:10px; padding-bottom:0px; background:url("<?php echo $pluginURL;?>/images/bg.gif") repeat-x; }
				.magazineFocusTable .focusImageWrap .focusImageDatas { float:left; width: 300px; height:164px; position: relative; overflow: hidden; }
				
					.magazineFocusTable .focusImageWrap #focusImageData { position:absolute; z-index:98; }
					
						.magazineFocusTable .focusImageWrap .focusImage { position:absolute; width: 300px; height: 160px; overflow:hidden; }
							.magazineFocusTable .focusImageWrap .focusImage img { width:300px; height: 344px; }

						.magazineFocusTable .focusImageWrap .focusShadow { position:absolute;  top:160px; width:300px; height:4px; background:url("<?php echo $pluginURL;?>/images/bg_image_shadow.gif") repeat-x; font-size:0; line-height:0; z-index:102; }
						
						.magazineFocusTable .focusImageWrap .focusTitleBG { width:300px; position:absolute; height:40px; background:#000000; opacity:0.3; filter: alpha(opacity = 30); z-index: 100; }
						
						.magazineFocusTable .focusImageWrap .focusImageTitle { width: 300px; color:#ffffff;  position:absolute; top:137px; padding:5px; z-index: 101; font-size:13px; line-height:15px; }

							.magazineFocusTable .focusImageWrap .focusImageTitle a { color:#ffffff; text-decoration:none; font-weight:bold; }
							.magazineFocusTable .focusImageWrap .focusImageTitle a:hover { text-decoration:underline; }	

							.magazineFocusTable .focusImageWrap .focusImageTitle .blogtitle { font-size:11px; color:#cdcdcd; }

				.magazineFocusTable .focusImageWrap .focusImageNav { float:left; margin-left:14px; }
					.magazineFocusTable .focusImageWrap .focusImageNav ul { list-style:none; margin:0; padding:0; }
					.magazineFocusTable .focusImageWrap .focusImageNav ul li { margin-bottom:6px; }
					.magazineFocusTable .focusImageWrap .focusImageNav ul li .thumbnail { width:30px; height:30px; overflow:hidden; border:1px solid #000; }
					.magazineFocusTable .focusImageWrap .focusImageNav ul li .thumbnail img { height:30px; }

					.magazineFocusTable .focusImageWrap .focusImageNav ul li.selected .thumbnail { opacity:0.5; filter: alpha(opacity = 50); }

					.magazineFocusTable .focusImageWrap .focusImageNav ul li .shadow { width:32px; height:4px; background:url("<?php echo $pluginURL;?>/images/bg_image_shadow.gif") repeat-x; font-size:0; line-height:0; }

					.magazineFocusTable .focusImageEmpty { text-align: center; color: #999; }					
		</style>
<?php
		$css = ob_get_contents();
		ob_end_clean();

		$skin->css($css);

		ob_start();
?>
	<script type="text/javascript"> 		
		var magazineFocusTabIntervalId = 0;

		function magazineFocusMouseOverMenu(id) {	
<?php
	if($config['tabDelay']>0) {
?>
			if(magazineFocusTabIntervalId!=0) {
				clearInterval(magazineFocusTabIntervalId);
				magazineFocusTabIntervalId = 0;
			}

			magazineFocusTabIntervalId = setInterval( function() {
<?php
	}
?>
				var menu = $("#"+id+"_menu");
				var item = $("#"+id+"_item");

				$('._magazineFocus_menu').each( function() {
					$(this).removeClass('selected');
				});
				$('._magazineFocus_item').each( function() {
					$(this).removeClass('viewed');
				});

			menu.addClass('selected');
			item.addClass('viewed');	
<?php
		if($config['tabDelay']>0) {
?>				
				clearInterval(magazineFocusTabIntervalId);
				magazineFocusTabIntervalId = 0;
			},<?php echo $config['tabDelay'];?>);
<?php
		}
?>
		}
		function magazineFocusMouseOut() {		
			if(magazineFocusTabIntervalId!=0) {
				clearInterval(magazineFocusTabIntervalId);
				magazineFocusTabIntervalId = 0;
			}
		}
		var lastSelectFocusImage = null;
		function moveFocusImagePosition(objId,pos) {
		//	$("#focusImageData").animate({'top':pos+'px'},'fast');
			$("#focusImageData").css('top',pos+'px');

			var obj = $("#"+objId);
			if(lastSelectFocusImage!=null) {
				lastSelectFocusImage.removeClass('selected');
			}
			obj.addClass('selected');
			lastSelectFocusImage = obj;
		}
	</script>
<?php
		$javascript = ob_get_contents();
		ob_end_clean();
		
		$skin->javascript($javascript);
		
		// 포커스이미지
		$count = 4;

		$focusImages = $db->queryAll('SELECT fi.id,fi.feed,fi.permalink,fi.title,fi.description,fi.author,fi.written,m.source FROM '.$database['prefix'].'FeedItems fi LEFT JOIN '.$database['prefix'].'Medias m ON ( m.feeditem = fi.id ) WHERE fi.focus = "y" AND fi.visibility = "y" AND m.width >= 300 GROUP BY fi.id ORDER BY fi.written DESC LIMIT '. $count);
		
		$path = ROOT . '/cache/thumbnail/m_focus';
		if (!is_dir($path)) {
			mkdir($path);
			@chmod($path, 0777);
		}
		
		$media = new Media;
		foreach($focusImages as $item) {
			if(!file_exists($path.'/'.$item['id'].'.jpg')) {
				$media->getThumbnail($item['source'], 350, 160, $path, $item['id'], 'crop');
			}
		}
		
		// 이슈태그
		
		if($config['issueType'] == 'auto') {
			$issueTags = Tag::getIssueTags($config['issueCount']);
		} else {
			$issueTags = explode(',', $config['issueTag']);
			foreach($issueTags as $key=>$tag) {
				$issueTags[$key] = array('name'=>trim($tag));
			}
		}
	
		// 이슈태그

		ob_start();
?>
		<div class="magazineFocusWrap">
			<table class="magazineFocusTable" cellpadding="0" cellspacing="0">
				<tr>
					<td class="leftTab">
						<ul>
<?php
			$index = 0;
			foreach($issueTags as $key=>$tag) {
				list($issueTags[$key]['feedItems'], $totalFeedItemCount) = FeedItem::getFeedItems('tag', $tag['name'], null, 1, $config['issueFeedCount']);
				$index++;
?>
							<li id="_magazineFocus_<?php echo $index;?>_menu" class="<?php echo ($index==1)?'first selected ':'';?>_magazineFocus_menu" onclick="goto('<?php echo $service['path'];?>/search/tag/<?php echo rawurlencode($tag['name']);?>'); return false;" onmouseover="magazineFocusMouseOverMenu('_magazineFocus_<?php echo $index;?>');" title="클릭하시면 태그검색이 가능합니다."><span><?php echo UTF8::lessen($tag['name'],10);?></span></li>
<?php
		}
?>							<li class="dummy"></li>
						</ul>
					</td>
					<td class="mainData">
<?php
	// 이슈태그 내용
	$index = 0;
	foreach($issueTags as $tag) {
		$index ++;
?>
						<ul id="_magazineFocus_<?php echo $index;?>_item" class="item _magazineFocus_item<?php echo ($index==1)?' viewed':'';?>">
<?php
	if(count($tag['feedItems'])>0) {
			$feedItem = current($tag['feedItems']);

			$thumbnailFile = '';
			if($media = Media::getMedia($feedItem['thumbnailId'])) {
				$thumbnailFile = Media::getMediaFile($media['thumbnail']);
			}			
			
			$link_url = $config->addressType == 'id' ? $service['path'].'/go/'.$feedItem['id'] : $service['path'].'/go/'.$feedItem['permalink'];

?>
							<li>
<?php
			if(!empty($thumbnailFile)) {
?>
								<div class="thumbnail">
									<img src="<?php echo $thumbnailFile;?>" alt="미리보기" />
								</div>
<?php
			}
?>
								<div class="data <?php echo empty($thumbnailFile)?'data2':'';?>">
									<h3><a href="<?php echo $link_url;?>" target="_blank"><?php echo UTF8::lessenAsByte(func::stripHTML($feedItem['title']),60);?></a></h3>
									<div class="permalink">
										<a href="<?php echo $feedItem['permalink'];?>" target="_blank"><?php echo $feedItem['permalink'];?></a>
									</div>
									<div class="desc">
										<?php echo UTF8::lessenAsByte(func::stripHTML($feedItem['description']),140);?>
									</div>
								</div>

								<div class="clear"></div>
							</li>
<?php
			if(count($tag['feedItems'])>1) {
					for($i=1;$i<count($tag['feedItems']);$i++) {
						$tagItem = $tag['feedItems'][$i];

							$link_url = $config->addressType == 'id' ? $service['path'].'/go/'.$tagItem['id'] : $service['path'].'/go/'.$tagItem['permalink'];

?>
							<li class="title_only">
								<a href="<?php echo $link_url;?>" target="_blank"><?php echo UTF8::lessenAsByte(func::stripHTML($tagItem['title']),60);?></a> <span class="sep">|</span> <span class="feedTitle"><?php echo Feed::get($tagItem['feed'],'title');?></span>
							</li>
<?php			
					}
			} else {
?>				
							<li class="title_only"></li>
<?php
			}
	}
?>
						</ul>
<?php
}
?>
					</td>
					<td class="focusImageWrap">
<?php
	if(count($focusImages)) {
?>
					<div class="focusImageDataWrap">
						<div class="focusImageDatas">

						

							<div id="focusImageData">
<?php	
		$i = 1;		
		foreach($focusImages as $focusImage) {
								$link_url = $config->addressType == 'id' ? $service['path'].'/go/'.$focusImage['id'] : $service['path'].'/go/'.$focusImage['permalink'];

?>
								<div class="focusImage" style="top:<?php echo ($i-1)*160;?>px; background:url('<?php echo $service['path'];?>/cache/thumbnail/m_focus/<?php echo $focusImage['id'];?>.jpg') no-repeat top center;">
									<a href="<?php echo $link_url;?>" target="_blank"><img src="<?php echo $pluginURL;?>/images/empty.gif" alt="" /></a>
								</div>

								<div class="focusTitleBG" style="top:<?php echo ($i-1)*160 + 120;?>px;"></div>
								<div class="focusImageTitle" style="top:<?php echo ($i-1)*160 + 120;?>px;">	
									<a href="<?php echo $link_url;?>" target="_blank"><?php echo UTF8::lessenAsByte($focusImage['title'],60);?></a><br />
									<span class="blogtitle"><?php echo Feed::get($focusImage['feed'],'title');?></span>
								</div>
<?php
			$i ++;
		}

?>
							</div>		
							<div class="focusShadow">&nbsp;</div>

						</div>
						<div class="focusImageNav">
							<ul>
<?php
		$i = 1;
		foreach($focusImages as $focusImage) {
?>
								<li id="thumbnail<?php echo $i;?>">
									<div class="thumbnail">
										<a href="#" onmouseover="moveFocusImagePosition('thumbnail<?php echo $i;?>',-<?php echo ($i-1)*160;?>);" onclick="return false;"><img src="<?php echo $service['path'];?>/cache/thumbnail/m_focus/<?php echo $focusImage['id'];?>.jpg" alt="썸네일" /></a>
									</div>
									<div class="shadow">&nbsp;</div>
								</li>
<?php		
			$i ++;
		}
?>
							</ul>
						</div>
						<div class="clear"></div>
					</div> <!-- focusImageDataWrap close -->
					
<?php		
	} else {
?>
					<div class="focusImageEmpty">
						포커스로 지정된 글이 없습니다. 
					</div>
<?php	
	}
?>
					</td>
				</tr>
			</table>
		</div>
<?php
		$result = ob_get_contents();
		ob_end_clean();

		return $input . $result;
	}
Exemplo n.º 12
0
	function exportFunction_iframe($params, $exportConfig) {
		global $export, $service, $config, $event;
		
		$page = isset($params['get']['page'])?$params['get']['page']:1;
		if($page <= 0) $page = 1;

		$thumbnail = isset($exportConfig) && isset($exportConfig['thumbnail']) ?  Validator::getBool($exportConfig['thumbnail']) : true;
		$pageCount = isset($exportConfig) && isset($exportConfig['count']) ?  $exportConfig['count'] : 10;
		$newWindow = isset($exportConfig) && isset($exportConfig['popup']) ?  Validator::getBool($exportConfig['popup']) : true;
		$categoryView = isset($exportConfig) && isset($exportConfig['category_view']) ?  Validator::getBool($exportConfig['category_view']) : false;
		$focusView = isset($exportConfig) && isset($exportConfig['focus_view']) ?  ($exportConfig['focus_view'] == 'focus' ? true : false) : false;
		
		if($focusView) {
			list($posts, $totalFeedItems) = FeedItem::getFeedItems('focus', 'y', '', $page, $pageCount);
		} else {
			if($categoryView) {
				$categoryValue = isset($exportConfig) && isset($exportConfig['category']) ?  $exportConfig['category'] : '';
				list($posts, $totalFeedItems) = FeedItem::getFeedItems('category', $categoryValue, '', $page, $pageCount);
			} else {
				list($posts, $totalFeedItems) = FeedItem::getFeedItems('', '', '', $page, $pageCount);
			}
		}
		$paging = Func::makePaging($page, $pageCount, $totalFeedItems);

		requireComponent('LZ.PHP.Media');

		ob_start();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ko">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title><?php echo $config->title;?></title>
<link rel="stylesheet" media="screen" type="text/css" href="<?php echo $export->exportURL;?>/style.css" />
<link rel="shortcut icon" href="<?php echo $service['path'];?>/images/favicon.ico" />
</head>
<body>
	<div id="export_iframe_wrap">
		<ul>
<?php
		foreach($posts as $post) {	
			$post['thumbnail'] = '';
			if($media = Media::getMedia($post['thumbnailId'])) {
				$post['thumbnail'] = $media['thumbnail'];	
			}
			$thumbnailFile =  $event->on('Text.postThumbnail', Media::getMediaFile($post['thumbnail']));

			$post['description'] = func::stripHTML($post['description'].'>');
			if (substr($post['description'], -1) == '>') $post['description'] = substr($post['description'], 0, strlen($post['description']) - 1);
			$post_description = UTF8::lessenAsByte(func::htmltrim($post['description']), 300);
			if (strlen($post_description) == 0) $post_description = '<span class="empty">'._t('(글의 앞부분이 이미지 혹은 HTML 태그만으로 되어있습니다)').'</span>';					

			$post_description = $event->on('Text.postDescription', $post_description);

?>
			<li class="<?php echo empty($thumbnailFile)||!$thumbnail?'thumbnail_nonexistence':'';?>">
<?php
		if($thumbnail) {

			$link_url = $config->addressType == 'id' ? $service['path'].'/go/'.$post['id'] : $service['path'].'/go/'.$post['permalink'];

			if(!empty($post['thumbnail'])) {
?>
				<div class="thumbnail">
					<a href="<?php echo $link_url;?>" target="<?php echo $newWindow?'_blank':'_parent';?>"><img src="<?php echo $thumbnailFile;?>" alt="thumnail" /></a>
				</div>
<?php
			}
		}
?>
				<div class="data">
					<h3><a href="<?php echo $link_url;?>" target="<?php echo $newWindow?'_blank':'_parent';?>"><?php echo UTF8::clear($event->on('Text.postTitle', func::stripHTML($post['title'])));?></a></h3>
					<p><?php echo $post_description;?></p>
				</div>
				<div class="clear"></div>
			</li>
<?php
		}
?>
		</ul>

		<div class="paging">
			<?php echo func::printPaging($paging);?>
		</div>

	</div>
</body>
</html>
<?php
		$content = ob_get_contents();
		ob_end_clean();

		return $content;
	}
Exemplo n.º 13
0
function printCategoryFocusView($categories, $index, $config) {
	global $service, $event;
	$pluginURL = $event->pluginURL;

	if($index < 0 || $index >= count($categories)) {
		return false;
	}
	$category = $categories[$index];
	$result = '';

	$entries = FeedItem::getRecentFeedItemsByCategory($category['id'], $config['categoryFeedCount']+1);
?>
	<div class="title">
		<h3><a href="<?php echo $service['path'];?>/category/<?php echo func::encode($category['name']);?>"><?php echo $category['name'];?></a></h3>
		<div class="more">
			<a href="<?php echo $service['path'];?>/category/<?php echo func::encode($category['name']);?>"><img src="<?php echo $pluginURL;?>/images/bt_more.gif" alt="<?php echo _t('더보기');?>" /></a>
		</div>
		<div class="clear"></div>
	</div>
	<ul>
<?php
		if(count($entries)>0) {
			$entry = $entries[0];
?>
		<li class="detail">
<?php
		$thumbnailFile = '';
		if($media = Media::getMedia($entry['thumbnailId'])) {
			$thumbnailFile = Media::getMediaFile($media['thumbnail']);
		}
		
		$link_url = $config->addressType == 'id' ? $service['path'].'/go/'.$entry['id'] : $service['path'].'/go/'.$entry['permalink'];

		if(!empty($thumbnailFile)) {
?>
			<div class="thumbnail">
				<img src="<?php echo $thumbnailFile;?>" alt="<?php echo _t('미리보기 이미지');?>" />
			</div>
			<div class="data">
				<h3><a href="<?php echo $link_url;?>" target="_blank"><?php echo UTF8::lessenAsByte(func::stripHTML($entry['title']),$config['categoryTitleLength']);?></a></h3>
				<div class="desc">
					<?php echo UTF8::lessenAsByte(func::stripHTML($entry['description']),$config['categoryDescLength']);?>
				</div>
			</div>
<?php
		} else {
?>
			<div class="data data_full">
				<h3><a href="<?php echo $link_url;?>" target="_blank"><?php echo UTF8::lessenAsByte(func::stripHTML($entry['title']),$config['categoryTitleLength']);?></a></h3>
				<div class="desc">
					<?php echo UTF8::lessenAsByte(func::stripHTML($entry['description']),$config['categoryDescLength']);?>
				</div>
			</div>
<?php
		}
?>
			<div class="clear"></div>
		</li>
<?php
		}
		for($i=1;$i<count($entries);$i++) {
			$entry = $entries[$i];
			$link_url = $config->addressType == 'id' ? $service['path'].'/go/'.$entry['id'] : $service['path'].'/go/'.$entry['permalink'];

?>
		<li class="list"><a href="<?php echo $link_url;?>" target="_blank"><?php echo UTF8::lessenAsByte(func::stripHTML($entry['title']),$config['categoryTitleLength']);?></a></li>
<?php
		}
?>
	</ul>
<?php
	return $result;
}