public function getRequestAndAnswer()
 {
     $feed = new Feed();
     if ($this->returnAll == false) {
         $content = $_POST['content'];
         echo json_encode($feed->getSpecific($content));
     } else {
         echo json_encode($feed->getAll());
     }
 }
Ejemplo n.º 2
0
	if(empty($id) || empty($value) || !is_numeric($value)) {
			$response['error'] = -1;
			$response['message'] = _t('잘못된 접근입니다.');
	} else {
		if (!isLoggedIn()) {
			$response['error'] = 1;
			$response['message'] = _t('로그인 한 사람만 이 기능을 사용할 수 있습니다.');
		} else {
			$ids = explode(',', $id);

			foreach($ids as $id) {	
				if(empty($id)) continue;

				$feedItem = FeedItem::getAll($id);
				$feed = Feed::getAll($feedItem['feed']);
				
				if(isAdmin() || $feed['owner'] == getLoggedId()) {
					Category::setItemCategory($id, $value);					
					Category::rebuildCount($value);					
					Category::rebuildCount($feedItem['category']);
				} else {
					$response['error'] = -1;
					$response['message'] = _t('잘못된 접근입니다.');
					break;
				}
			}
		}
	}

	func::printRespond($response);
Ejemplo n.º 3
0
	$id = $_POST['id'];

	if(empty($id)) {
			$response['error'] = -1;
			$response['message'] = _t('잘못된 접근입니다.');
	} else {
		if (!isLoggedIn()) {
			$response['error'] = 1;
			$response['message'] = _t('로그인 한 사람만 이 기능을 사용할 수 있습니다.');
		} else {
			$ids = explode(',', $id);

			foreach($ids as $id) {		
				if(empty($id)) continue;

				$feed = Feed::getAll($id);
				
				if(isAdmin() || $feed['owner'] == getLoggedId()) {
					$feeder = new Feed;
					$result = $feeder->updateFeed($feed['xmlURL']);
					$response['feed'] = $result[1];
					$response['updated'] = $result[2];
				} else {
					$response['error'] = -1;
					$response['message'] = _t('잘못된 접근입니다.');
					break;
				}
			}
		}
	}
Ejemplo n.º 4
0
		<h3><?php echo empty($read)?_t("블로그목록"):_t("블로그수정 & 블로그목록");?> <span class="cnt">(<?php echo $totalFeeds;?>)</span></h3>
		<div class="search">
			<form method="get">
				<select name="type">
					<option value="blogname"<?php echo $type=='blogname'?' selected="selected"':'';?>><?php echo _t('블로그 제목');?></option>
					<option value="owner"<?php echo $type=='owner'?' selected="selected"':'';?>><?php echo _t('등록자 아이디');?></option>
					<option value="ownername"<?php echo $type=='ownername'?' selected="selected"':'';?>><?php echo _t('등록자 별명');?></option>
				</select>
				<input type="text" class="input faderInput" name="keyword" value="<?php echo $keyword;?>"/> <span class="searchbutton"><input type="submit" value="<?php echo _t('검색');?>" align="bottom" /></span><?php if(!empty($keyword)) {?><a href="<?php echo $service['path'];?>/admin/blog/entrylist" class="searchbutton"><span><?php echo _t('검색취소');?></span></a><?php } ?>
			</form>
		</div>
		<div class="clear"></div>
	</div>
<?php
	if(!empty($read)) {
		$readFeed = Feed::getAll($read);
		if($readFeed) {
			$date = Func::dateToString($readFeed['created']);			
			$date2 = Func::dateToString($readFeed['lastUpdate']);
			$noVerifier = Validator::getBool($config->useVerifier) && !Validator::getBool($readFeed['isVerified']) && ($readFeed['owner'] != 1);


			$desc = str_replace('&nbsp;','',func::stripHTML($readFeed['description']));				
			if(empty($desc)) {
				$desc = '<span class="empty">'._t('설명이 없습니다.').'</span>';
			}						
			$posts = FeedItem::getFeedItemsByFeedId($read,10);					
?>
<div class="wrap">
	<div class="read_item read_item1">
		<?php echo drawAdminBoxBegin('item_wrap');?>
Ejemplo n.º 5
0
<?php
	define('ROOT', '..');
	include ROOT . '/lib/include.php';
	include ROOT . '/lib/link.begin.php';	

	if(isset($accessInfo['action'])) {
		$id = $accessInfo['action'];	
		if(!is_numeric($id) || empty($id)) {
			$id = FeedItem::getIdByURL($accessInfo['address']);
		}

		$linker_post = FeedItem::getFeedItem($id);
		$linker_feed = Feed::getAll($linker_post['feed']);
		
		FeedItem::edit($linker_post['id'], 'click', $linker_post['click']+1);
	}

	if(!empty($config->linkskin)) {	
		$skin = new Skin;	
		$skin->load('link/'.$config->linkskin);

		include ROOT.'/lib/link/skin.begin.php';
			include ROOT . '/lib/piece/linker.php';	
		include ROOT.'/lib/link/skin.end.php';
	} else {
		if(isset($linker_post)) {	
			header('Location: ' . func::translate_uri($linker_post['permalink'])); // 한글주소 문제없이..
		}
	}
	
	include ROOT . '/lib/link.end.php';