Beispiel #1
0
" target="_blank" title="<?php 
    echo $R['referer'];
    ?>
"><?php 
    echo getDomain($R['referer']);
    ?>
</a></td>
	<td class="agent">
		<?php 
    if ($_browse == 'Mobile') {
        ?>
		<img src="<?php 
        echo $g['img_core'];
        ?>
/_public/ico_mobile.gif" class="imgpos" alt="모바일" title="모바일(<?php 
        echo isMobileConnect($R['agent']);
        ?>
)접속" />
		<?php 
    }
    ?>
		
		<?php 
    echo strtoupper($_browse);
    ?>
	</td>
	<td><?php 
    echo getDateFormat($R['d_regis'], 'Y.m.d H:i');
    ?>
</td>
	</tr> 
Beispiel #2
0
	<col width="80"> 
	<col> 
	<col width="70">
	<col width="50">
	</colgroup> 
	<tbody>


	<?php 
$cnt = count($RCD);
?>
	<?php 
foreach ($RCD as $R) {
    ?>
	<?php 
    $R['mobile'] = isMobileConnect($R['agent']);
    ?>
	<tr class="dotline<?php 
    if ($cnt == ++$_ol) {
        ?>
 none<?php 
    }
    ?>
">
	<td class="name"><a href="javascript:;"<?php 
    if ($my['admin']) {
        ?>
  onclick="getMemberLayer2('<?php 
        echo $R['mbruid'];
        ?>
',event)<?php 
Beispiel #3
0
<?php

if (!defined('__KIMS__')) {
    exit;
}
if ($d['admin']['ssl_type'] == 1) {
    if ($_SERVER['HTTPS'] != 'on') {
        getLink($g['ssl_root'] . '/?' . $_SERVER['QUERY_STRING'], '', '', '');
    }
}
$DB_CONNECT = isConnectDb($DB);
$g['mobile'] = isMobileConnect($_SERVER['HTTP_USER_AGENT']);
$g['device'] = $g['mobile'] && $_SESSION['pcmode'] != 'Y';
$my = array();
$my['level'] = 0;
if ($_SESSION['mbr_uid']) {
    $my = array_merge(getUidData($table['s_mbrid'], $_SESSION['mbr_uid']), getDbData($table['s_mbrdata'], "memberuid='" . $_SESSION['mbr_uid'] . "'", '*'));
    if ($my['pw'] != $_SESSION['mbr_pw']) {
        exit;
    }
    $g['mysns'] = explode('|', $my['sns']);
}
if ($r) {
    $_HS = getDbData($table['s_site'], "id='" . $r . "'", '*');
    $s = $_HS['uid'];
}
if (!$s) {
    if ($g['mobile']) {
        $_HH = getDbData($table['s_mobile'], '', '*');
        if ($_HH['usemobile'] == 1) {
            $_HS = getUidData($table['s_site'], $_HH['startsite']);
Beispiel #4
0
function getCommentList($theme, $parent, $_where, $recnum, $sort, $orderby1, $orderby2, $cp)
{
    global $g, $table, $_HS, $m, $my;
    include $theme . '_var.php';
    // 설정파일 인클루드
    $g['img_module_skin'] = $theme . 'image/';
    $NCD = array();
    $RCD = array();
    $cp = $cp ? $cp : 1;
    $sort = $sort ? $sort : 'uid';
    $orderby1 = $orderby1 ? $orderby1 : $d['comment']['orderby1'];
    $orderby2 = $orderby2 ? $orderby2 : $d['comment']['orderby2'];
    $recnum = $recnum ? $recnum : $d['comment']['recnum'];
    $cmentque = " and parent='" . str_replace('-', '', $parent) . "'";
    if ($_where) {
        $cmentque .= " and " . $_where;
    }
    $PCD = getDbArray($table['s_comment'], 'notice=1' . $cmentque, '*', $sort, $orderby1, 0, 0);
    $TCD = getDbArray($table['s_comment'], 'notice=0' . $cmentque, '*', $sort, $orderby2, $recnum, $cp);
    $NUM = getDbRows($table['s_comment'], 'notice=0' . $cmentque);
    $TPG = getTotalPage($NUM, $recnum);
    while ($_R = db_fetch_array($PCD)) {
        $NCD[] = $_R;
    }
    while ($_R = db_fetch_array($TCD)) {
        $RCD[] = $_R;
    }
    //echo $cmentque;
    $RCD = $NCD + $RCD;
    $i = 1;
    $namegi = $NUM - $cp * $recnum;
    if ($namegi > 0) {
        $namegi_ment = '총 <span class="text-danger namegi">' . $namegi . '</span> 개의 댓글이 더 있습니다.';
        $btn_more = 'btn-more';
        $is_namegi = 1;
    } else {
        $namegi_ment = '더이상 댓글이 없습니다.';
        $btn_more = 'disabled';
        $is_namegi = 0;
    }
    foreach ($RCD as $C) {
        $C['mobile'] = isMobileConnect($C['agent']);
        if ($C['mbruid']) {
            $M = getDbData($table['s_mbrdata'], 'memberuid=' . $C['mbruid'], '*');
            $M1 = getUidData($table['s_mbrid'], $C['mbruid']);
        }
        $isSECRETCHECK = true;
        $compare_time = $C['d_modify'] ? $C['d_modify'] : $C['d_regis'];
        $JN_time = getJNTime($compare_time);
        // 지난시간 얻기 함수 호출
        // 아바타 사진 url 세팅
        if ($M['photo']) {
            $avatar_img = $g['url_root'] . '/_var/avatar/' . $M['photo'];
        } else {
            $avatar_img = $g['url_root'] . '/_var/avatar/0.gif';
        }
        echo '
		   <a name="one-write2-' . $C['uid'] . '"></a>
	   	<li id="' . $C['uid'] . '-' . $C['score1'] . '-' . $C['oneline'] . '" class="list-group-item comment-list">
				<div class="media" id="cuid-' . $C['uid'] . '">
				   <input type="hidden" name="is_namegi" value="' . $is_namegi . '"/>
				   <input type="hidden" name="TPG" value="' . $TPG . '"/>
				   <input type="hidden" name="theme" class="theme" value="' . $theme . '" />
	  	         <input type="hidden" name="parent" class="parent" value="' . $parent . '" />
	  	         <input type="hidden" name="c_content" class="c_content" value="' . htmlspecialchars(getContents($C['content'], $C['html'], $keyword)) . '" />
                  <div class="media-left">
					   <a target="_blank" title="프로필 보기" data-toggle="tooltip" href="' . $g['s'] . '/profile/' . $M1['id'] . '" class="pull-left hidden-xs rb-avatar">
						   <img src="' . $avatar_img . '" class="media-object img-rounded" alt="48x48" data-src="holder.js/48x48" style="width: 48px; height: 48px;">
					   </a>
                  </div>
					<div class="media-body">
					  	<h5 class="media-heading">
					  		 <a class="a-muted" href="' . $g['s'] . '/profile/' . $M1['id'] . '">' . ($C[$_HS['nametype']] ? $C[$_HS['nametype']] : $C['name']) . '</a>
					  		 <span class="text-muted small time-wrap"><time title="' . getDateFormat($compare_time, 'Y년 m월 d일  H시 i분') . '" data-toggle="tooltip" class="timeago live-tooltip">' . $JN_time . '</time></span>
                           <span></span>
					  	    <span class="pull-right top-tools">';
        if ($my['admin'] || $C['mbruid'] == $my['uid']) {
            echo '<span class="text-muted"><a href="#" id="delete-' . $C['uid'] . '" class="live-tooltip cmt-tools" title="삭제" ><i class="fa fa-trash-o"></i></a></span>';
            echo '<span class="text-muted"><a href="#" id="edit-' . $C['uid'] . '" class="live-tooltip cmt-tools" title="수정" ><i class="fa fa-edit"></i></a></span>';
        } else {
            echo '<span class="text-muted"><a href="#" id="report-' . $C['uid'] . '" class="live-tooltip cmt-tools" title="신고" ><i class="fa fa-frown-o"></i></a></span>';
        }
        echo '</span>
					  	</h5>
					  	<hr class="cmt-hr">';
        echo '<div class="panel-body nopd-left comment-content" id="comment-content-' . $C['uid'] . '" >';
        if (!$C['hidden'] || $my['admin'] || $my['id'] && $my['id'] == $C['id'] || strstr($_SESSION['module_' . $m . '_view'], '[' . $C['uid'] . ']')) {
            echo getContents($C['content'], $C['html'], $keyword);
        } else {
            $isSECRETCHECK = false;
            echo '<i class="fa fa-lock-o"></i> <a href="' . $g['cment_modify'] . $C['uid'] . '" onclick="return cmentHidden(\'' . $C['id'] . '\',\'' . $C['uid'] . '\',event);">비공개 댓글입니다.</a>';
        }
        echo '</div>';
        echo '<div class="clearfix">
							<div class="pull-left" style="margin-top:4px;">
								<a class="small live-tooltip" href="#comments-' . $C['uid'] . '-reply" data-parent="#comments-' . $C['uid'] . '" data-toggle="collapse">답글 <span id="one-num-' . $C['uid'] . '">' . $C['oneline'] . '</span> <i class="fa fa-sort-desc"></i></a>
                              <span class="thumb-wrap" style="margin-left:15px;">
                                  <a class="live-tooltip cmt-tools" title="공감" data-toggle="tooltip" id="good-' . $C['uid'] . '"><i class="fa fa-thumbs-up fa-sm"></i> <span id="good-num-' . $C['uid'] . '">' . $C['score1'] . '</span></a>
                                  <a class="live-tooltip cmt-tools" title="비공감" data-toggle="tooltip" id="bad-' . $C['uid'] . '" style="margin-left:7px;"><i class="fa fa-thumbs-down fa-sm"></i> <span id="bad-num-' . $C['uid'] . '">' . $C['score2'] . '</span></a>
                              </span>
							</div>
							<div class="pull-right">
					            <div class="clearfix cmt-modify-btn-wrap" style="display:none;margin:5px 0" id="btn-cmt-modify-wrap-' . $C['uid'] . '">
                                    <button class="btn btn-default btn-sm cmt-modify-cancel" id="' . $C['uid'] . '" >취소</button>
                                    <button class="btn btn-primary btn-sm cmt-modify" id="' . $C['uid'] . '" >수정</button>
                               </div> 
							</div>
						</div>
						<!-- nested -->
						<div class="rb-comment-reply collapse" id="comments-' . $C['uid'] . '-reply">
							<!-- 의견쓰기 -->
							<div class="media">								
								<div class="media-body">
									   <input type="hidden" name="parent" value="' . $C['uid'] . '" />
										<input type="hidden" name="theme" value="' . $theme . '" />
										<input type="hidden" name="ouid" value="" />
										<fieldset>
										 	<p class="col-sm-11 nopd-left">
												<textarea placeholder="답글을 입력하세요..." name="oneline"  rows="1" class="form-control rb-commnet-reply"></textarea>
											</p>
											<div class="col-sm-1 nopd-left pull-right">
								 				 <div><button class="btn btn-primary btn-md one-regis" id="one-regis-' . $C['uid'] . '">등록</button>
											</div>	
										</fieldset>
								</div>
							</div>';
        echo '<div id="oneline-box-' . $C['uid'] . '" class="one-list-wrap">';
        // 한줄 의견 리스트 출력함수 호출
        getOnelineList($theme, $C['uid']);
        echo '</div>';
        // 한 줄 의견 출력 박스
        echo '</div>
					</div>
				</div>
			</li>';
        $i++;
    }
    //endforeach
    $R = array();
    // 더보기 버튼 설정시
    if ($d['comment']['show_more']) {
        echo '<button class="text-center btn btn-default btn-block ' . $btn_more . '"><i class="fa fa-sort-desc fa-lg"></i><span class="text-muted small"> 더 보기 ( ' . $namegi_ment . ' ) </span></button>';
    }
}
Beispiel #5
0
function getCommentList($theme, $parent, $_where, $recnum, $sort, $orderby1, $orderby2, $cp)
{
    global $g, $table, $_HS, $m, $my;
    include $theme . '_var.php';
    // 설정파일 인클루드
    $g['img_module_skin'] = $theme . 'image/';
    $NCD = array();
    $RCD = array();
    $cp = $cp ? $cp : 1;
    $sort = $sort ? $sort : 'uid';
    $orderby1 = $orderby1 ? $orderby1 : $d['comment']['orderby1'];
    $orderby2 = $orderby2 ? $orderby2 : $d['comment']['orderby2'];
    $recnum = $recnum ? $recnum : $d['comment']['recnum'];
    $cmentque = " and parent='" . str_replace('-', '', $parent) . "'";
    if ($_where) {
        $cmentque .= " and " . $_where;
    }
    $PCD = getDbArray($table['s_comment'], 'notice=1' . $cmentque, '*', $sort, $orderby1, 0, 0);
    $TCD = getDbArray($table['s_comment'], 'notice=0' . $cmentque, '*', $sort, $orderby2, $recnum, $cp);
    $NUM = getDbRows($table['s_comment'], 'notice=0' . $cmentque);
    $TPG = getTotalPage($NUM, $recnum);
    while ($_R = db_fetch_array($PCD)) {
        $NCD[] = $_R;
    }
    while ($_R = db_fetch_array($TCD)) {
        $RCD[] = $_R;
    }
    //echo $cmentque;
    $RCD = $NCD + $RCD;
    $i = 1;
    $namegi = $NUM - $cp * $recnum;
    if ($namegi > 0) {
        $namegi_ment = '총 <span class="text-danger namegi">' . $namegi . '</span> 개의 댓글이 더 있습니다.';
        $btn_more = 'btn-more';
        $is_namegi = 1;
    } else {
        $namegi_ment = '더이상 댓글이 없습니다.';
        $btn_more = 'disabled';
        $is_namegi = 0;
    }
    // 한줄의견 쓰는(현재 로그인한) 사용자 아바타 사진 url 세팅
    if ($my['photo']) {
        $avatar_img = $g['url_root'] . '/_var/avatar/' . $my['photo'];
    } else {
        $avatar_img = $g['url_root'] . '/_var/avatar/0.gif';
    }
    foreach ($RCD as $C) {
        $C['mobile'] = isMobileConnect($C['agent']);
        if ($C['mbruid']) {
            $M = getDbData($table['s_mbrdata'], 'memberuid=' . $C['mbruid'], '*');
        } else {
            $M = array();
        }
        $isSECRETCHECK = true;
        $JN_time = getJNTime($C['d_regis']);
        // 지난시간 얻기 함수 호출
        // 댓글 작성자 아바타 사진 url 세팅
        if ($M['photo']) {
            $avatar_img = $g['url_root'] . '/_var/avatar/' . $M['photo'];
        } else {
            $avatar_img = $g['url_root'] . '/_var/avatar/0.gif';
        }
        echo '
         <section id="pinBoot" class="rb-pinterest-grid">
		   <article class="panel panel-default panel-google-plus comment-list" id="' . $C['uid'] . '-' . $C['score1'] . '-' . $C['oneline'] . '">
             <div  id="cuid-' . $C['uid'] . '">
                 <input type="hidden" name="is_namegi" value="' . $is_namegi . '"/>
                 <input type="hidden" name="TPG" value="' . $TPG . '"/>
                 <input type="hidden" name="theme" class="theme" value="' . $theme . '" />
                 <input type="hidden" name="parent" class="parent" value="' . $parent . '" />
                 <input type="hidden" name="c_content" class="c_content" value="' . htmlspecialchars(getContents($C['content'], $C['html'], $keyword)) . '" />
                 <div class="dropdown">
                     <span class="dropdown-toggle" type="button" data-toggle="dropdown">
                         <span class="[ glyphicon glyphicon-chevron-down ]"></span>
                     </span>
                     <ul class="dropdown-menu" role="menu">
                         <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Action</a></li>
                         <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Another action</a></li>
                         <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Something else here</a></li>
                         <li role="presentation" class="divider"></li>
                         <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Separated link</a></li>
                     </ul>
                 </div>
                 <div class="panel-google-plus-tags">
                     <ul>
                         <li>#자동차</li>
                         <li>#귀성길</li>
                     </ul>
                 </div>
                 <div class="panel-heading">
                     <img class="img-circle pull-left" src="/_core/opensrc/thumb/image.php?width=46&amp;height:46&amp;cropratio=1:1&amp;image=' . $avatar_img . '" alt="' . $M[$_HS['nametype']] . ' 아바타 " />
                     <h3>소비자와 함께</h3>
                     <h5><span>제한적으로 공유함</span> - <span>' . getDateFormat($C['d_regis'], 'Y. m. d') . '</span> </h5>
                 </div>
                 <div class="panel-body">
                     <p>' . getContents($C['content'], $C['html'], $keyword) . '</p>
                 </div>
                 <div class="panel-footer">
                     <button type="button" class="btn btn-default">+1</button>
                     <button type="button" class="btn btn-default">
                         <span class="glyphicon glyphicon-share-alt"></span>
                     </button>
                     <div class="input-placeholder">댓글 추가...</div>
                 </div>
                 <div class="panel-google-plus-comment" id="comments-' . $C['uid'] . '-reply">
                     <input type="hidden" name="parent" value="' . $C['uid'] . '" />
                     <input type="hidden" name="theme" value="' . $theme . '" />
                     <input type="hidden" name="ouid" value="" />
                     <img class="img-circle pull-left" src="/_core/opensrc/thumb/image.php?width=46&amp;height:46&amp;cropratio=1:1&amp;image=' . $avatar_img . '" alt="' . $my[$_HS['nametype']] . ' 아바타 " />
                     <div class="panel-google-plus-textarea">
                         <textarea rows="4"></textarea>
                         <button type="button" class="btn btn-success disabled" id="one-regis-' . $C['uid'] . '">댓글 올리기</button>
                         <button type="reset" class="btn btn-default">취소</button>
                     </div>
                     <div class="clearfix"></div>
                 </div>';
        echo '<div id="oneline-box-' . $C['uid'] . '" class="one-list-wrap">';
        // 한줄 의견 리스트 출력함수 호출
        getOnelineList($theme, $C['uid']);
        echo '</div>';
        // 한 줄 의견 출력 박스
        echo '</div>   
          </article>
          </section>';
        $i++;
    }
    //endforeach
    $R = array();
    // 더보기 버튼 설정시
    if ($d['comment']['show_more']) {
        echo '<button class="text-center btn btn-default btn-block ' . $btn_more . '"><i class="fa fa-sort-desc fa-lg"></i><span class="text-muted small"> 더 보기 ( ' . $namegi_ment . ' ) </span></button>';
    }
}
Beispiel #6
0
		<th scope="col">브라우져</th>
		<th scope="col">키워드</th>
		<th scope="col">접속시간</th>
		<th scope="col"></th>
	</tr>
	</thead>
	<tbody>
<?php 
$j = 0;
while ($R = db_fetch_array($RCD)) {
    $j++;
    $_engine = getSearchEngine($R['referer']);
    $_outkey = getKeyword($R['referer']);
    $_browse = getBrowzer($R['agent']);
    $_domain = getDomain($R['referer']);
    $_mobile = isMobileConnect($R['agent']);
    ?>

	<tr class="rooptd<?php 
    echo ++$i % 2;
    ?>
">
		<td class="check"><input type="checkbox" name="members[]" value="<?php 
    echo $R['uid'];
    ?>
" /></td>
		<td class="number"><?php 
    echo $NUM - (($p - 1) * $recnum + $_recnum++);
    ?>
</td>
		<td class="name"><a href="#." onclick="whoisSearch('<?php 
Beispiel #7
0
function getBrowzer($agent)
{
    if (isMobileConnect($agent)) {
        return 'Mobile';
    }
    $set = array('MSIE 9', 'MSIE 8', 'MSIE 7', 'MSIE 6', 'Firefox', 'Opera', 'Chrome', 'Safari');
    foreach ($set as $val) {
        if (strpos('_' . $agent, $val)) {
            return $val;
        }
    }
    return '';
}
Beispiel #8
0
function getCommentList($theme, $parent, $_where, $recnum, $sort, $orderby1, $orderby2, $cp)
{
    global $g, $table, $_HS, $m, $my;
    include $theme . '_var.php';
    // 설정파일 인클루드
    $g['img_module_skin'] = $theme . 'image/';
    $NCD = array();
    $RCD = array();
    $cp = $cp ? $cp : 1;
    $sort = $sort ? $sort : 'uid';
    $orderby1 = $orderby1 ? $orderby1 : $d['comment']['orderby1'];
    $orderby2 = $orderby2 ? $orderby2 : $d['comment']['orderby2'];
    $recnum = $recnum ? $recnum : $d['comment']['recnum'];
    $cmentque = " and parent='" . str_replace('-', '', $parent) . "'";
    if ($_where) {
        $cmentque .= " and " . $_where;
    }
    $PCD = getDbArray($table['s_comment'], 'notice=1' . $cmentque, '*', $sort, $orderby1, 0, 0);
    $TCD = getDbArray($table['s_comment'], 'notice=0' . $cmentque, '*', $sort, $orderby2, $recnum, $cp);
    $NUM = getDbRows($table['s_comment'], 'notice=0' . $cmentque);
    $TPG = getTotalPage($NUM, $recnum);
    while ($_R = db_fetch_array($PCD)) {
        $NCD[] = $_R;
    }
    while ($_R = db_fetch_array($TCD)) {
        $RCD[] = $_R;
    }
    //echo $cmentque;
    $RCD = $NCD + $RCD;
    $i = 1;
    $namegi = $NUM - $cp * $recnum;
    if ($namegi > 0) {
        $namegi_ment = '총 <span class="text-danger namegi">' . $namegi . '</span> 개의 댓글이 더 있습니다.';
        $btn_more = 'btn-more';
        $is_namegi = 1;
    } else {
        $namegi_ment = '더이상 댓글이 없습니다.';
        $btn_more = 'disabled';
        $is_namegi = 0;
    }
    foreach ($RCD as $C) {
        $C['mobile'] = isMobileConnect($C['agent']);
        if ($C['mbruid']) {
            $M = getDbData($table['s_mbrdata'], 'memberuid=' . $C['mbruid'], '*');
        } else {
            $M = array();
        }
        $isSECRETCHECK = true;
        $compare_time = $C['d_modify'] ? $C['d_modify'] : $C['d_regis'];
        $JN_time = getJNTime($compare_time);
        // 지난시간 얻기 함수 호출
        // 아바타 사진 url 세팅
        if ($M['photo']) {
            $avatar_img = $g['url_root'] . '/_var/avatar/' . $M['photo'];
        } else {
            $avatar_img = $g['url_root'] . '/_var/avatar/0.gif';
        }
        echo '
		   <a name="one-write2-' . $C['uid'] . '"></a>
	   	<li id="' . $C['uid'] . '-' . $C['score1'] . '-' . $C['oneline'] . '" class="list-group-item comment-list">
				<div class="media" id="cuid-' . $C['uid'] . '">
				   <input type="hidden" name="is_namegi" value="' . $is_namegi . '"/>
				   <input type="hidden" name="TPG" value="' . $TPG . '"/>
				   <input type="hidden" name="theme" class="theme" value="' . $theme . '" />
	  	         <input type="hidden" name="parent" class="parent" value="' . $parent . '" />
	  	         <input type="hidden" name="c_content" class="c_content" value="' . htmlspecialchars(getContents($C['content'], $C['html'], $keyword)) . '" />
                  <div class="media-left">
					   <a target="_blank" title="프로필 새창 열림" data-toggle="tooltip" href="#" class="pull-left hidden-xs rb-avatar">
						   <img src="' . $avatar_img . '" class="media-object img-rounded" alt="48x48" data-src="holder.js/48x48" style="width: 48px; height: 48px;">
					   </a>
                  </div>
					<div class="media-body">
					  	<h5 class="media-heading">
					  		 <a class="a-muted" data-toggle="popover" href="">' . ($C[$_HS['nametype']] ? $C[$_HS['nametype']] : $C['name']) . '</a>
					  		 <span class="text-muted small time-wrap"><time title="' . getDateFormat($compare_time, 'Y년 m월 d일  H시 i분') . '" data-toggle="tooltip" class="timeago live-tooltip">' . $JN_time . '</time></span>
                           <span></span>
					  	    <span class="pull-right top-tools">';
        if ($my['admin'] || $C['mbruid'] == $my['uid']) {
            echo '<span class="text-muted"><a href="#" id="delete-' . $C['uid'] . '" class="live-tooltip cmt-tools" title="삭제" ><i class="fa fa-trash-o"></i></a></span>';
            echo '<span class="text-muted"><a href="#" id="edit-' . $C['uid'] . '" class="live-tooltip cmt-tools" title="수정" ><i class="fa fa-edit"></i></a></span>';
        } else {
            echo '<span class="text-muted"><a href="#" id="report-' . $C['uid'] . '" class="live-tooltip cmt-tools" title="신고" ><i class="fa fa-frown-o"></i></a></span>';
        }
        echo '</span>
					  	</h5>';
        echo '<hr class="cmt-hr">
    	  	         <div class="panel-body nopd-left comment-content" id="comment-content-' . $C['uid'] . '">';
        if (!$C['hidden'] || $my['admin'] || $my['id'] && $my['id'] == $C['id'] || strstr($_SESSION['module_' . $m . '_view'], '[' . $C['uid'] . ']')) {
            echo autolink(getContents($C['content'], $C['html'], $keyword));
        } else {
            $isSECRETCHECK = false;
            echo '<i class="fa fa-lock-o"></i> <a href="' . $g['cment_modify'] . $C['uid'] . '" onclick="return cmentHidden(\'' . $C['id'] . '\',\'' . $C['uid'] . '\',event);">비공개 댓글입니다.</a>';
        }
        echo '</div>';
        if ($C['is_link']) {
            $links_arr = explode('^^', $C['links']);
            $link_title = $links_arr[0];
            $link_url = $links_arr[1];
            $link_desc = $links_arr[2];
            $link_thumb = $links_arr[3];
            echo '<div class="rb-comment-links clearfix">
                       <div class="media">
                           <div class="media-left" id="extracted_thumb"><img src="' . $link_thumb . '" width="100" height="100"></div>
                           <div class="media-body">
                               <h4 class="media-heading"><a href="' . $link_url . '" target="_blank">' . $link_title . '</a></h4>
                               <p class="rb-description">' . $link_desc . '</p>
                           </div>
                        </div>
                     </div>';
        }
        // 링크 출력부
        // 포토출력
        if ($C['is_photo']) {
            $upArray = getArrayString($C['upload']);
            $_pque = '(';
            foreach ($upArray['data'] as $val) {
                $_pque .= 'uid=' . $val . ' or ';
            }
            $_pque = substr($_pque, 0, -4) . ')';
            $_UCD = getDbArray($table['s_upload'], $_pque, '*', 'gid', 'asc', 10, 1);
            echo '<ul class="rb-img-wrapper list-inline">';
            while ($_U = db_fetch_array($_UCD)) {
                $img = str_replace('.', '', $_U['url']) . $_U['folder'] . '/' . $_U['tmpname'];
                $img_src = '/_core/opensrc/thumb/thumb.php?width=100&amp;cropratio=2:1.5&amp;image=' . $img;
                $img_alt = $_U['caption'] ? $_U['caption'] : $_U['name'];
                echo '<li><a href="#"><img src="' . $img . '" class="img-responsive" alt="' . $img_alt . '" width="100px" height="100px" /></a></li>';
            }
            echo '</ul>';
        }
        // 포토 출력부
        // 지도 출력
        if ($C['is_place']) {
            $P = getDbData($table['s_place'], 'parent=' . $C['uid'], '*');
            // Lat, Lng 은 숫자형으로 적용해야 한다.
            echo '<script>
                   $(\'document\').ready(function(){
                      var Lat=' . $P['lat'] . ';var Lng=' . $P['lng'] . ';var name=\'' . $P['name'] . '\';var addr=\'' . $P['addr'] . '\';var map_id=\'cmap_' . $C['uid'] . '\';
                      PlaceToMap(Lat,Lng,name,addr,map_id);
                    });
                </script>
                <div id="cmap_' . $C['uid'] . '" style="height:200px;"></div>';
        }
        // 지도 출력
        echo '<div class="clearfix">
							<div class="pull-left" style="margin-top:4px;">
								<a class="small live-tooltip" href="#comments-' . $C['uid'] . '-reply" data-parent="#comments-' . $C['uid'] . '" data-toggle="collapse">답글 <span id="one-num-' . $C['uid'] . '">' . $C['oneline'] . '</span> <i class="fa fa-sort-desc"></i></a>
                              <span class="thumb-wrap" style="margin-left:15px;">
                                  <a class="live-tooltip cmt-tools" title="공감" data-toggle="tooltip" id="good-' . $C['uid'] . '"><i class="fa fa-thumbs-up fa-sm"></i> <span id="good-num-' . $C['uid'] . '">' . $C['score1'] . '</span></a>
                                  <a class="live-tooltip cmt-tools" title="비공감" data-toggle="tooltip" id="bad-' . $C['uid'] . '" style="margin-left:7px;"><i class="fa fa-thumbs-down fa-sm"></i> <span id="bad-num-' . $C['uid'] . '">' . $C['score2'] . '</span></a>
                              </span>
							</div>
							<div class="pull-right">
					            <div class="clearfix cmt-modify-btn-wrap" style="display:none;margin:5px 0" id="btn-cmt-modify-wrap-' . $C['uid'] . '">
                                    <button class="btn btn-default btn-sm cmt-modify-cancel" id="' . $C['uid'] . '" >취소</button>
                                    <button class="btn btn-primary btn-sm cmt-modify" id="' . $C['uid'] . '" >수정</button>
                               </div> 
							</div>
						</div>
						<!-- nested -->
						<div class="rb-comment-reply collapse" id="comments-' . $C['uid'] . '-reply">
							<!-- 의견쓰기 -->
							<div class="media">								
								<div class="media-left" style="width:90%;">
								    <input type="hidden" name="parent" value="' . $C['uid'] . '" />
								     <input type="hidden" name="theme" value="' . $theme . '" />
								     <input type="hidden" name="ouid" value="" />
                                                     <textarea placeholder="답글을 입력하세요..." name="oneline"  rows="1" class="form-control rb-commnet-reply"></textarea>
			                              </div>
                                                <div class="media-body">
                                                       <button class="btn btn-primary btn-md one-regis" id="one-regis-' . $C['uid'] . '">등록</button>
							       </div>								
							</div>';
        echo '<div id="oneline-box-' . $C['uid'] . '" class="one-list-wrap">';
        // 한줄 의견 리스트 출력함수 호출
        getOnelineList($theme, $C['uid']);
        echo '</div>';
        // 한 줄 의견 출력 박스
        echo '</div>
					</div>
				</div>
			</li>';
        $i++;
    }
    //endforeach
    // 더보기 버튼 설정시
    if ($NUM && $d['comment']['show_more']) {
        echo '<button class="text-center btn btn-default btn-block ' . $btn_more . '"><i class="fa fa-sort-desc fa-lg"></i><span class="text-muted small"> 더 보기 ( ' . $namegi_ment . ' ) </span></button>';
    }
    //    if(!$NUM){
    // echo '<div class="rb-timeline">
    //               <div class="rb-nopost">
    //                   <i class="fa fa-exclamation-circle"></i>
    //                   등록된 소식이 없습니다.
    //               </div>
    //           </div>';
    //    }
}
Beispiel #9
0
</th>
						<th><?php 
    echo _LANG('ad035', 'admin');
    ?>
</th>
					</tr>
				</thead>
				<tbody>
					<?php 
    while ($R = db_fetch_array($RCD)) {
        ?>
					<?php 
        $_browzer = getBrowzer($R['agent']);
        ?>
					<?php 
        $_deviceKind = isMobileConnect($R['agent']);
        ?>
					<?php 
        $_deviceType = getDeviceKind($R['agent'], $_deviceKind);
        ?>
					<tr>
						<td><?php 
        echo $NUM - (($p - 1) * $recnum + $_rec++);
        ?>
</td>
						<td><?php 
        echo $R['ip'];
        ?>
</td>
						<td class="rb-url"><a href="<?php 
        echo $R['referer'];
Beispiel #10
0
function getCommentList($theme, $parent, $_where, $recnum, $sort, $orderby1, $orderby2, $cp)
{
    global $g, $table, $_HS, $m, $my;
    include $theme . '_var.php';
    // 설정파일 인클루드
    $g['img_module_skin'] = $theme . 'image/';
    $NCD = array();
    $RCD = array();
    $cp = $cp ? $cp : 1;
    $sort = $sort ? $sort : 'uid';
    $orderby1 = $orderby1 ? $orderby1 : $d['comment']['orderby1'];
    $orderby2 = $orderby2 ? $orderby2 : $d['comment']['orderby2'];
    $recnum = $recnum ? $recnum : $d['comment']['recnum'];
    $cmentque = " and parent='" . str_replace('-', '', $parent) . "'";
    if ($_where) {
        $cmentque .= " and " . $_where;
    }
    $PCD = getDbArray($table['s_comment'], 'notice=1' . $cmentque, '*', $sort, $orderby1, 0, 0);
    $TCD = getDbArray($table['s_comment'], 'notice=0' . $cmentque, '*', $sort, $orderby2, $recnum, $cp);
    $NUM = getDbRows($table['s_comment'], 'notice=0' . $cmentque);
    $TPG = getTotalPage($NUM, $recnum);
    while ($_R = db_fetch_array($PCD)) {
        $NCD[] = $_R;
    }
    while ($_R = db_fetch_array($TCD)) {
        $RCD[] = $_R;
    }
    //echo $cmentque;
    $RCD = $NCD + $RCD;
    $i = 1;
    $namegi = $NUM - $cp * $recnum;
    if ($namegi > 0) {
        $namegi_ment = '총 <span class="text-danger namegi">' . $namegi . '</span> 개의 댓글이 더 있습니다.';
        $btn_more = 'btn-more';
        $is_namegi = 1;
    } else {
        $namegi_ment = '더이상 댓글이 없습니다.';
        $btn_more = 'disabled';
        $is_namegi = 0;
    }
    // 로그인 사용자 아바타 사진 url 세팅
    if ($my['photo']) {
        $my_avatar = $g['url_root'] . '/_var/avatar/' . $my['photo'];
    } else {
        $my_avatar = $g['url_root'] . '/_var/avatar/0.gif';
    }
    echo '<!-- filter -->
    <div class="btn-toolbar" role="toolbar">
        <div class="btn-group btn-group-sm" data-toggle="buttons">
            <label class="btn btn-default active">
                <input type="radio" name="options" id="option1" autocomplete="off" checked> 광장
            </label>
            <label class="btn btn-default">
                <input type="radio" name="options" id="option2" autocomplete="off"> 핫이슈
            </label>
            <label class="btn btn-default">
                <input type="radio" name="options" id="option3" autocomplete="off"> 내 피드
            </label>
        </div>
    </div>';
    foreach ($RCD as $C) {
        $C['mobile'] = isMobileConnect($C['agent']);
        if ($C['mbruid']) {
            $M = getDbData($table['s_mbrdata'], 'memberuid=' . $C['mbruid'], '*');
            $M1 = getUidData($table['s_mbrid'], $C['mbruid']);
        }
        $isSECRETCHECK = true;
        $compare_time = $C['d_modify'] ? $C['d_modify'] : $C['d_regis'];
        $JN_time = getJNTime($compare_time);
        // 지난시간 얻기 함수 호출
        // 아바타 사진 url 세팅
        if ($M['photo']) {
            $avatar_img = $g['url_root'] . '/_var/avatar/' . $M['photo'];
        } else {
            $avatar_img = $g['url_root'] . '/_var/avatar/0.gif';
        }
        echo '		  
        <div class="rb-item panel panel-default" id="' . $C['uid'] . '-' . $C['score1'] . '-' . $C['oneline'] . '">
            <div class="panel-heading clearfix">
                <div class="rb-media media"  id="cuid-' . $C['uid'] . '">
                    <input type="hidden" name="is_namegi" value="' . $is_namegi . '"/>
                    <input type="hidden" name="TPG" value="' . $TPG . '"/>
                    <input type="hidden" name="theme" class="theme" value="' . $theme . '" />
                    <input type="hidden" name="parent" class="parent" value="' . $parent . '" />
                    <input type="hidden" name="c_content" class="c_content" value="' . htmlspecialchars(getContents($C['content'], $C['html'], $keyword)) . '" />
                    <div class="media-left">
                        <a href="' . $g['s'] . '/profile/' . $M1['id'] . '"><img class="media-object" src="' . $avatar_img . '" alt="' . $M[$_HS['nametype']] . '님 아바타"></a>
                    </div>
                    <div class="media-body">
                        <h4 class="media-heading">' . ($C[$_HS['nametype']] ? $C[$_HS['nametype']] : $C['name']) . '</h4>
                        <div class="rb-meta">
                            <a class="rb-time" data-toggle="tooltip" title="' . getDateFormat($compare_time, 'Y년 m월 d일  H시 i분') . '">' . $JN_time . '</a>
                            <a class="rb-range" data-toggle="tooltip" title="공유대상 : 전체공개"><i class="fa fa-globe"></i></a>
                        </div>
                    </div>
                </div>

                <div class="rb-actions">
                    <div class="dropdown">
                        <button class="btn btn-link dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
                            <span class="glyphicon glyphicon-menu-down" aria-hidden="true"></span>
                        </button>';
        if ($my['admin'] || $C['mbruid'] == $my['uid']) {
            echo ' 
                        <ul class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenu1">
                            <li><a href="#" class="rb-hidden cmt-acts" id="hidden-' . $C['uid'] . '" ><i class="fa fa-eye-slash fa-fw"></i> 게시물 숨기기</a></li>
                            <li><a href="#" class="rb-report cmt-acts" id="report-' . $C['uid'] . '"><i class="fa fa-info-circle fa-fw"></i> 게시물 신고</a></li>
                            <li><a href="#" class="rb-linkSave cmt-acts" id="savelink-' . $C['uid'] . '"><i class="fa fa-bookmark fa-fw"></i> 링크 저장</a></li>
                            <li role="separator" class="divider"></li>
                            <li class="dropdown-header">' . ($C[$_HS['nametype']] ? $C[$_HS['nametype']] : $C['name']) . '님</li>
                            <li><a href="#" class="rb-unfolow cmt-acts" id="' . $C['mbruid'] . '"><i class="fa fa-chain-broken fa-fw"></i> 팔로우 취소</a></li>
                            <li role="separator" class="divider"></li>
                            <li class="dropdown-header">게시물 관리</li>
                            <li><a href="#" class="rb-modify cmt-acts" id="edit-' . $C['uid'] . '"><i class="fa fa-pencil fa-fw"></i> 게시물 수정</a></li>
                            <li><a href="#" class="rb-delete cmt-acts" id="delete-' . $C['uid'] . '"><i class="fa fa-trash fa-fw"></i> 게시물 삭제</a></li>
                        </ul>';
        }
        echo '
                    </div>
                </div>
            </div> <!-- panel-heading-->

            <div class="panel-body">
                <p class="comment-content" id="comment-content-' . $C['uid'] . '">' . autolink(getContents($C['content'], $C['html'], $keyword)) . '</p>
                <div class="clearfix cmt-modify-btn-wrap hide" id="btn-cmt-modify-wrap-' . $C['uid'] . '">
                    <div class="rb-action pull-right">
                         <button type="button" class="btn btn-default btn-sm cmt-modify-cancel" id="' . $C['uid'] . '">취소</button>
                         <button type="button" class="btn btn-primary btn-sm cmt-modify" id="' . $C['uid'] . '">수정</button>
                    </div>
                 </div>    
            </div>';
        if ($C['is_link']) {
            $links_arr = explode('^^', $C['links']);
            $link_title = $links_arr[0];
            $link_url = $links_arr[1];
            $link_desc = $links_arr[2];
            $link_thumb = $links_arr[3];
            echo '<div class="rb-comment-links clearfix">
               <div class="media">
                   <div class="media-left" id="extracted_thumb"><img src="' . $link_thumb . '" width="100" height="100"></div>
                   <div class="media-body">
                       <h4 class="media-heading"><a href="' . $link_url . '" target="_blank">' . $link_title . '</a></h4>
                       <p class="rb-description">' . $link_desc . '</p>
                   </div>
                </div>
             </div>';
        }
        // 링크 출력부
        // 포토출력
        if ($C['is_photo']) {
            $upArray = getArrayString($C['upload']);
            $upQty = $upArray['count'];
            $_pque = '(';
            foreach ($upArray['data'] as $val) {
                $_pque .= 'uid=' . $val . ' or ';
            }
            $_pque = substr($_pque, 0, -4) . ')';
            $_UCD = getDbArray($table['s_upload'], $_pque, '*', 'gid', 'asc', 10, 1);
            $data_layout = array('6' => '23', '5' => '23', '4' => '22', '3' => '12', '2' => '2', '1' => '1');
            echo '<div class="rb-attach">';
            echo '<div class="photoset-grid-lightbox" data-layout="' . $data_layout[$upQty] . '">';
            while ($_U = db_fetch_array($_UCD)) {
                $_tmpArray = explode('.', $_U['tmpname']);
                $_name = $_tmpArray[0];
                // 이름
                $_ext = $_tmpArray[1];
                // 확장자
                $s_src = str_replace('.', '', $_U['url']) . $_U['folder'] . '/' . $_name . '_feed.' . $_ext;
                $b_src = str_replace('.', '', $_U['url']) . $_U['folder'] . '/' . $_name . '_b.' . $_ext;
                $img_alt = $_U['caption'] ? $_U['caption'] : $_U['name'];
                echo '<img src="' . $s_src . '" alt="' . $img_alt . '"  data-hightres="' . $b_src . '"/>';
            }
            echo '</div>';
            echo '</div>';
        }
        // 포토 출력부
        // 지도 출력
        if ($C['is_place']) {
            $P = getDbData($table['s_place'], 'parent=' . $C['uid'], '*');
            // Lat, Lng 은 숫자형으로 적용해야 한다.
            echo '<script>
               $(\'document\').ready(function(){
                  var Lat=' . $P['lat'] . ';var Lng=' . $P['lng'] . ';var name=\'' . $P['name'] . '\';var addr=\'' . $P['addr'] . '\';var map_id=\'cmap_' . $C['uid'] . '\';
                  PlaceToMap(Lat,Lng,name,addr,map_id);
                });
            </script>
            <div id="cmap_' . $C['uid'] . '" style="height:200px;"></div>';
        }
        // 지도 출력
        echo '  
            <div class="rb-buttons">
                <button type="button" id="like-issue" class="rb-like btn btn-link" data-toggle="button">
                    <i class="fa fa-thumbs-up fa-fw fa-lg"></i>좋아요
                </button>
                <button type="button" class="rb-comment btn btn-link" id="' . $C['uid'] . '"><i class="fa fa-comment fa-fw fa-lg"></i>댓글달기</button>
                <button type="button" class="rb-share btn btn-link" data-toggle="modal"><i class="fa fa-share fa-fw fa-lg"></i>공유하기</button>
            </div>

            <div class="panel-footer">

                <div class="rb-state-like">
                    <span id="likeMe">회원님 외 </span>
                    <a href="#" class="rb-tooltip rb-likeUsers" data-toggle="modal" data-html="true"  data-container=".rb-item"
                        title="홍길동<br>벽돌이<br>홍길동<br>벽돌이<br>홍길동<br>벽돌이<br>홍길동<br>벽돌이<br>홍길동<br>벽돌이<br>20명 더 있음">
                        13명
                    </a>
                    이 좋아합니다.
                </div>

                <!-- 이슈 공유이력이 있을 때만 출력 -->
                <div class="rb-state-share hidden">
                    <a href="#" class="rb-tooltip rb-shareUsers" data-toggle="modal">
                        공유 1회
                    </a>
                </div>

                <ul class="rb-commnets media-list" id="oneline-box-' . $C['uid'] . '">';
        getOnelineList($theme, $C['uid']);
        // 한줄의견 출력
        echo '
                </ul>

                <!-- 댓글작성 -->
                <div class="rb-comment-input media" id="comments-' . $C['uid'] . '-reply">
                    <div class="media-left">
                        <a href="' . $g['s'] . '/profile/' . $my['id'] . '" target="_blank">
                            <img class="media-object" src="' . $my_avatar . '" alt="' . $my[$_HS['nametype']] . '">
                        </a>
                    </div>
                    <div class="media-body">
                        <input type="hidden" name="parent" value="' . $C['uid'] . '" />
                        <input type="hidden" name="theme" value="' . $theme . '" />
                        <input type="hidden" name="ouid" value="" />
                        <textarea class="rb-textarea form-control" id="oneline-ta-' . $C['uid'] . '" name="oneline" rows="1" placeholder="댓글을 입력하세요..."></textarea>
                        <div class="rb-attach"> 
                            <button type="button" class="rb-photo rb-tooltip btn btn-link" title="사진 첨부">
                                <i class="fa fa-camera"></i>
                            </button> 
                            <button type="button" class="rb-smile rb-tooltip btn btn-link" title="스티커 올리기">
                                <i class="fa fa-smile-o"></i>
                            </button> 
                        </div>
                    </div>
                </div>

            </div>
        </div>';
        $i++;
    }
    //endforeach
}