Пример #1
0
				<div class="deletes">				
					<a href="#" onclick="deleteItem(<?php echo $feed['id'];?>); return false;"><img src="<?php echo $service['path'];?>/images/admin/bt_delete.gif" alt="<?php echo _t('삭제');?>" /></a>
				</div>
				<div class="clear"></div>
<?php
			$content = ob_get_contents();
			ob_end_clean();

			array_push($data['datas'], array('class'=>'bloglist_execute','data'=> $content ));

			array_push($datas, $data);
		}

	} else {
			array_push( $datas, array( 'class'=>"list_empty", 'datas'=>array(array('data'=>empty($keyword)?_t('등록된 블로그가 없습니다.'):_t('검색된 블로그가 없습니다.')) )) );
	}
	$footers = '';
	echo makeTableBox('bloglist', $headers, $datas, $footers);	
?>
</div>

<div class="wrap">
	<br />	
	<div class="paging">
		<?php echo func::printPaging($paging,$params);?>
	</div>
</div>
<?php
	include ROOT. '/lib/piece/adminFooter.php';
?>
Пример #2
0
			<input id="pluginStatus<?php echo $plugin['name'];?>" type="hidden" value="<?php echo $plugin['status'];?>" />
<?php
			$content = ob_get_contents();
			ob_end_clean();

			array_push($data['datas'], array('class'=>'plugin_config','data'=> $content ));

			array_push($datas, $data);	

			// 설정창
			array_push($datas, array('empty'=>true, 'id'=>'pluginConfigView'.$plugin['name'],'class'=>'plugin_config_view'));
		}

	} else {
			array_push( $datas, array( 'class'=>"list_empty", 'datas'=>array(array('data'=>'플러그인이 존재하지 않습니다.') )) );
	}
	
	$footers = '';
	echo makeTableBox('pluginlist', $headers, $datas, $footers);	
?>
</div>

<br />

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

<?php
	include ROOT. '/lib/piece/adminFooter.php';
?>
Пример #3
0
			$content = ob_get_contents();
			ob_end_clean();

			array_push($data['datas'], array('class'=>'member_blogs','data'=> $content ));
		
			// 멤버 글수
			array_push($data['datas'], array('class'=>'member_count','data'=> $totalFeedItems ));

			array_push($datas, $data);				
		}

	} else {
			array_push( $datas, array( 'class'=>"list_empty", 'datas'=>array(array('data'=>'회원이 존재하지 않습니다.') )) );
	}
	$footers = '';
	echo makeTableBox('memberlist', $headers, $datas, $footers);	
?>
</div>

<br />

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

<?php
	include ROOT. '/lib/piece/adminFooter.php';
?>
Пример #4
0
			<input id="exportStatus<?php echo $export['domain'];?>" type="hidden" value="<?php echo $export['status'];?>" />
<?php
			$config = ob_get_contents();
			ob_end_clean();

			array_push($data['datas'], array('class'=>'export_config','data'=> $config ));

			array_push( $datas, $data );


			// 설정창
			array_push($datas, array('empty'=>true, 'id'=>'exportConfigView'.$export['domain'],'class'=>'export_config_view'));
		}
	}

	$footers = '';
?>

<?php echo makeTableBox('exportlist', $headers, $datas, $footers);?>
</div>

<br />

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

<?php
	include ROOT. '/lib/piece/adminFooter.php';
?>
Пример #5
0
	function getNoticePage($input, $config) {
		global $database, $db, $event, $service;
		if(!isAdmin()) {
?>
<?php
			return $input;
		} 

		$blogId = isset($config['blog'])?$config['blog']:0;
		$tag = isset($config['tag'])?$config['tag']:'';
		$pluginURL = $event->pluginURL;
		
		$params = '';

		if(!empty($blogId)) {
			
			$pageCount = 15; // 페이지갯수
			$page = isset($_GET['page']) ? $_GET['page'] : 1;
			if(!isset($page) || empty($page)) $page = 1;

			list($posts, $totalFeedItems) = getNoticeFeedItems($blogId,$page,$pageCount);							
			$paging = Func::makePaging($page, $pageCount, $totalFeedItems);
			
			ob_start();

?>
		<link rel="stylesheet" href="<?php echo $pluginURL;?>/style.css" type="text/css" />

		<script type="text/javascript">
			var is_checked = false;
			function toggleCheckAll(className) {
				is_checked = !is_checked;
				$("."+className).each( function() {
						this.checked = is_checked;
				});
			}

			function deleteItem(id) {
				if(confirm("<?php echo _t('이 글을 삭제하시겠습니까?');?>")) {
					$.ajax({
					  type: "POST",
					  url: '<?php echo $pluginURL;?>/delete.php',
					  data: 'id=' + id,
					  dataType: 'xml',
					  success: function(msg){		
						error = $("response error", msg).text();
						if(error == "0") {
							document.location.reload();
						} else {
							alert($("response message", msg).text());
						}
					  },
					  error: function(msg) {
						 alert('unknown error');
					  }
					});
				}
			}

			function deleteAllItem(className) {
				var ids = '';
				$("."+className).each( function() {
						if(this.checked) {
							ids += $(this).val() + ',';
						}
				});

				if(ids == '') {
					return false;
				}		
				
				if(confirm("<?php echo _t('선택된 모든 글을 삭제하시겠습니까?');?>")) {
					$.ajax({
					  type: "POST",
					  url:  '<?php echo $pluginURL;?>/delete.php',
					  data: 'id=' + ids,
					  dataType: 'xml',
					  success: function(msg){		
						error = $("response error", msg).text();
						if(error == "0") {
							document.location.reload();
						} else {
							alert($("response message", msg).text());
						}
					  },
					  error: function(msg) {
						 alert('unknown error');
					  }
					});
				}
			}
		</script>

		<div class="title_wrap">
			<h3><?php echo _t('공지사항');?> <span class="cnt">(<?php echo $totalFeedItems;?>)</span></h3>
		</div>
		
		<div class="notice_wrap">
<?php
	$headers = array(array('title'=>_t('선택'),'class'=>'entrylist_select','width'=>'50px'),
					array('title'=>_t('날짜'),'class'=>'entrylist_date','width'=>'100px'),
					array('title'=>_t('제목'),'class'=>'entrylist_title','width'=>'790px'),
					array('title'=>_t('실행'),'class'=>'entrylist_execute','width'=>'auto'));
	
	$datas = array();

	if(count($posts)>0) {
		foreach($posts as $post) {		
			$data = array();

			$date = Func::dateToString($post['written']);
			$feedvisibility = Feed::get($post['feed'], 'visibility');

			$data['id'] = 'list_item_'.$post['id'];
			$data['class'] = ($post['visibility']=='n'?'list_item_hide':'').($post['id']==$read?' list_item_select':'');
			
			$data['datas'] = array();
			
			// 글 선택
			array_push($data['datas'], array('class'=>'noticelist_select','data'=> '<input type="checkbox" class="postid" value="'.$post['id'].'" />' ));
	
			// 글 등록날짜		
			ob_start();
?>
			<?php echo date('y.m.d H:i:s', $post['written']);?><br />
			<span class="date_text">(<?php echo $date;?>)</span>
<?php
			$content = ob_get_contents();
			ob_end_clean();
			array_push($data['datas'], array('class'=>'noticelist_date','data'=> $content ));
			
			// 글 제목
			ob_start();
?>

<?php
			$desc = UTF8::lessenAsEm(str_replace('&nbsp;','',func::stripHTML($post['description'])),82);
			if(empty($desc)) {
				$desc = '<span class="empty">'._t('내용이 비어있거나 HTML로만 작성되어 있습니다.').'</span>';
			}	
			$isNew = Func::isNew($post['written'],1);
?>

			<div class="title"><?php echo UTF8::lessenAsEm(stripcslashes(func::stripHTML($post['title'])), 60);?> <?php echo ($isNew?' <img	src="'.$service['path'].'/images/admin/icon_new.gif" alt="new" align="absmiddle" class="new" />':'');?></div>
			<?php echo $desc?>
<?php
			$content = ob_get_contents();
			ob_end_clean();

			array_push($data['datas'], array('class'=>'noticelist_title','data'=> $content ));

			// 글 실행
			ob_start();
?>
			<a href="#" class="microbutton alertbutton" onclick="deleteItem(<?php echo $post['id'];?>); return false;"><span><?php echo _t('삭제');?></span></a>
<?php

			$content = ob_get_contents();
			ob_end_clean();

			array_push($data['datas'], array('class'=>'noticelist_execute','data'=> $content ));
			
			array_push($datas, $data);
		}

	} else {
			array_push( $datas, array( 'class'=>"list_empty", 'datas'=>array(array('data'=>empty($keyword)?_t('공지사항이 없습니다.'):_t('검색된 공지사항이 없습니다.')) )) );
	}

	ob_start();
?>
		<div class="select">
			<a href="#" onclick="toggleCheckAll('postid'); return false;"><img src="<?php echo $service['path'];?>/images/admin/bt_arrow.gif" /></a>
		</div>
		<div class="action">
			<strong><a href="#" onclick="deleteAllItem('postid'); return false;"><?php echo _t('삭제');?></a></strong>
		</div>				
		<div class="clear"></div>
<?php
	$footers = ob_get_contents();
	ob_end_clean();

	echo makeTableBox('noticelist', $headers, $datas, $footers);	
?>
</div>

<div class="wrap">
	<br />
	<div class="paging">
		<?php echo func::printPaging($paging, $params);?>
	</div>
</div>
<?php
			$input .= ob_get_contents();
			ob_end_clean();
		}

		return $input;
	}
Пример #6
0
<?php
	$select = ob_get_contents();
	ob_end_clean();

	ob_start();
?>
		<div class="select">
			<input type="checkbox" onclick="toggleCheckAll(this,'postid');" />
		</div>
		<div class="action">
			<?php echo _f('<label for="action_list">선택한 글을</label> %1', $select);?>
		</div>				
		<div class="clear"></div>
<?php
	$footers = ob_get_contents();
	ob_end_clean();

	echo makeTableBox('entrylist', $headers, $datas, $footers);	
?>
</div>

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

<?php
	include ROOT. '/lib/piece/adminFooter.php';
?>