Beispiel #1
0
function DeleteUpfile($R, $d)
{
    global $g, $table;
    $UPFILES = getArrayString($R['upload']);
    foreach ($UPFILES['data'] as $_val) {
        $U = getUidData($table['s_upload'], $_val);
        if ($U['uid']) {
            if ($U['url'] == $d['comment']['ftp_urlpath']) {
                $FTP_CONNECT = ftp_connect($d['comment']['ftp_host'], $d['comment']['ftp_port']);
                $FTP_CRESULT = ftp_login($FTP_CONNECT, $d['comment']['ftp_user'], $d['comment']['ftp_pass']);
                if ($d['comment']['ftp_pasv']) {
                    ftp_pasv($FTP_CONNECT, true);
                }
                if (!$FTP_CONNECT) {
                    getLink('', '', 'FTP서버 연결에 문제가 발생했습니다.', '');
                }
                if (!$FTP_CRESULT) {
                    getLink('', '', 'FTP서버 아이디나 패스워드가 일치하지 않습니다.', '');
                }
                ftp_delete($FTP_CONNECT, $d['comment']['ftp_folder'] . $U['folder'] . '/' . $U['tmpname']);
                if ($U['type'] == 2) {
                    ftp_delete($FTP_CONNECT, $d['comment']['ftp_folder'] . $U['folder'] . '/' . $U['thumbname']);
                }
                ftp_close($FTP_CONNECT);
            } else {
                unlink($U['url'] . $U['folder'] . '/' . $U['tmpname']);
                if ($U['type'] == 2) {
                    unlink($U['url'] . $U['folder'] . '/' . $U['thumbname']);
                }
            }
            getDbDelete($table['s_upload'], 'uid=' . $U['uid']);
        }
    }
}
Beispiel #2
0
function getCMNTUpfiles($R)
{
    if (!$R['upload']) {
        return array();
    } else {
        global $table, $m;
        $d['upload'] = array();
        $d['upload']['tmp'] = $R['upload'];
        $d['_pload'] = getArrayString($R['upload']);
        foreach ($d['_pload']['data'] as $_val) {
            $U = getUidData($table['s_upload'], $_val);
            if (!$U['uid']) {
                $R['upload'] = str_replace('[' . $_val . ']', '', $R['upload']);
                $d['_pload']['count']--;
            } else {
                $d['upload']['data'][] = $U;
            }
            if (!$U['cync']) {
                $cyncArr = getArrayString($R['cync']);
                $_CYNC = "cync='[" . $m . "][" . $R['uid'] . "][uid,down][" . $table['s_comment'] . "][" . $R['mbruid'] . "][" . $cyncArr['data'][5] . ",CMT:" . $R['uid'] . "#CMT]'";
                getDbUpdate($table['s_upload'], $_CYNC, 'uid=' . $U['uid']);
            }
        }
        if ($R['upload'] != $d['upload']['tmp']) {
            getDbUpdate($table['s_comment'], "upload='" . $R['upload'] . "'", 'uid=' . $R['uid']);
        }
        $d['upload']['count'] = $d['_pload']['count'];
        return $d['upload'];
    }
}
Beispiel #3
0
function LIB_getUploadImage($upfiles, $d, $content, $ext)
{
    $imgs = getImgs($content, $ext);
    if ($imgs[0]) {
        if (!$upfiles) {
            return $imgs[0];
        }
        $basename = basename($imgs[0]);
        $encname = md5($basename);
        $folder = substr($d, 0, 4) . '/' . substr($d, 4, 2) . '/' . substr($d, 6, 2);
        if (is_file($GLOBALS['g']['path_file'] . $folder . '/' . $encname)) {
            return str_replace($basename, '', $imgs[0]) . $encname;
        }
    }
    if ($upfiles) {
        $upArray = getArrayString($upfiles);
        foreach ($upArray['data'] as $_val) {
            $U = getUidData($GLOBALS['table']['s_upload'], $_val);
            if (!$U['uid']) {
                continue;
            }
            if (strpos('_jpg,gif,png', $U['ext'])) {
                return $U['url'] . $U['folder'] . '/' . $U['thumbname'];
            }
        }
    }
}
<?php

include $g['dir_layout'] . '/_var/_var.php';
// meta image 처리 ,add by taiji88
$Topimg_Flag = false;
if ($_SEO['image_src']) {
    $ufilesArray = getArrayString($_SEO['image_src']);
    $_TIMG_D = getDbData($table['s_upload'], 'uid=' . $ufilesArray['data'][0], '*');
    if (is_file($g['path_file'] . $_TIMG_D['folder'] . '/' . $_TIMG_D['tmpname'])) {
        $Topimg_Flag = true;
        $Topimg_URL = $_TIMG_D['url'] . $_TIMG_D['folder'] . '/' . $_TIMG_D['tmpname'];
    }
}
Beispiel #5
0
<?php

include $g['path_module'] . 'notification/var/var.php';
if ($callMod == 'config') {
    $NT_DATA = explode('|', $my['noticeconf']);
    $nt_rcv = $NT_DATA[0];
    $nt_rcvtype = $NT_DATA[1];
    $nt_rcvdel = $NT_DATA[2];
    $nt_modules = getArrayString($NT_DATA[3]);
    $nt_members = getArrayString($NT_DATA[4]);
    $nt_email = $NT_DATA[5];
    $_SESSION['sh_notify_auto_del'] = '';
    $_SESSION['sh_notify_popup'] = '';
} else {
    if ($callMod == 'view') {
        $recnum = 1000;
        $NUM = getDbRows($table['s_notice'], 'mbruid=' . $my['uid']);
        $TPG = getTotalPage($NUM, $recnum);
    }
}
?>

<div id="rb-modal-body">
	<?php 
if ($callMod == 'config') {
    ?>
	<div class="callMod-config">
		<form name="procForm" class="form-horizontal" action="<?php 
    echo $g['s'];
    ?>
/" method="post">
Beispiel #6
0
<?php

if (!$my['uid']) {
    exit;
}
$S = 0;
$N = 0;
$P = array();
if ($dfiles) {
    $ufilesArray = getArrayString($dfiles);
    foreach ($ufilesArray['data'] as $_val) {
        $R = getUidData($table['s_upload'], $_val);
        if ($R['mbruid'] != $my['uid'] || $R['type'] != -1 && $R['type'] != 2) {
            continue;
        }
        $P[] = $R;
        $S += $R['size'];
        $N++;
    }
    $NUM = $N;
    $TPG = 1;
} else {
    $sort = $sort ? $sort : 'pid';
    $orderby = $orderby ? $orderby : 'asc';
    $recnum = 50;
    $_WHERE = 'mbruid=' . $my['uid'] . ' and (type=-1 or type=2) and fileonly=0';
    if ($album) {
        $_album = $album;
        if ($album == 'none') {
            $_album = 0;
        }
Beispiel #7
0
<?php

if (!defined('__KIMS__')) {
    exit;
}
include_once $g['path_module'] . $m . '/var/var.php';
if ($cync) {
    $_SESSION[$m . 'cync'] = $cync;
}
if (!$_SESSION[$m . 'cync']) {
    getLink(RW(0), '', '동기화코드가 지정되지 않았습니다.', '');
}
$cyncArr = getArrayString($_SESSION[$m . 'cync']);
$mod = 'main';
$sort = $sort ? $sort : 'uid';
$orderby = $orderby ? $orderby : 'asc';
$recnum = $recnum && $recnum < 200 ? $recnum : $d['trackback']['recnum'];
$cmentque = "parent='" . $cyncArr['data'][0] . $cyncArr['data'][1] . "' and type=1";
$RCD = array();
$TCD = getDbArray($table['s_trackback'], $cmentque, '*', $sort, $orderby, $recnum, $p);
$NUM = getDbRows($table['s_trackback'], $cmentque);
$TPG = getTotalPage($NUM, $recnum);
while ($_R = db_fetch_array($TCD)) {
    $RCD[] = $_R;
}
if ($g['mobile'] && $_SESSION['pcmode'] != 'Y') {
    $B['skin'] = $d['trackback']['skin_mobile'];
} else {
    $B['skin'] = $skin ? $skin : $d['trackback']['skin_main'];
}
$g['track_reset'] = $c ? $g['s'] . '/?r=' . $r . '&amp;c=' . $c : getLinkFilter($g['s'] . '/?r=' . $r . '&amp;m=' . $m, array('skin', 'iframe'));
<?php

if (!defined('__KIMS__')) {
    exit;
}
checkAdmin(0);
foreach ($oneline_members as $val) {
    $R = getUidData($table['s_oneline'], $val);
    if (!$R['uid']) {
        continue;
    }
    $C = getUidData($table['s_comment'], $R['parent']);
    getDbDelete($table['s_oneline'], 'uid=' . $R['uid']);
    getDbUpdate($table['s_comment'], 'oneline=oneline-1', 'uid=' . $C['uid']);
    getDbUpdate($table['s_numinfo'], 'oneline=oneline-1', "date='" . substr($R['d_regis'], 0, 8) . "' and site=" . $R['site']);
    if ($R['point'] && $R['mbruid']) {
        getDbInsert($table['s_point'], 'my_mbruid,by_mbruid,price,content,d_regis', "'" . $R['mbruid'] . "','0','-" . $R['point'] . "','한줄의견삭제(" . getStrCut(str_replace('&amp;', ' ', strip_tags($R['content'])), 15, '') . ")환원','" . $date['totime'] . "'");
        getDbUpdate($table['s_mbrdata'], 'point=point-' . $R['point'], 'memberuid=' . $R['mbruid']);
    }
    //동기화
    $cyncArr = getArrayString($C['cync']);
    $fdexp = explode(',', $cyncArr['data'][2]);
    if ($fdexp[0] && $fdexp[2] && $cyncArr['data'][3]) {
        getDbUpdate($cyncArr['data'][3], $fdexp[2] . '=' . $fdexp[2] . '-1', $fdexp[0] . '=' . $cyncArr['data'][1]);
    }
}
getLink('reload', 'parent.', '', '');
Beispiel #9
0
     $up_lastuid = getDbCnt($table['s_upload'], 'max(uid)', '');
     $upload .= '[' . $up_lastuid . ']';
     if ($up_type == 2) {
         if ($fserver) {
             $incPhoto .= '<img src="' . $d['upload']['ftp_urlpath'] . $up_folder . '/' . $up_tmpname . '" width="' . $d['upload']['width_img'] . '" class="photo" alt="" /><br /><br />';
         } else {
             $incPhoto .= '<img src="' . $g['url_root'] . '/files/' . $up_folder . '/' . $up_tmpname . '" width="' . $d['upload']['width_img'] . '" class="photo" alt="" /><br /><br />';
         }
     }
     getDbUpdate($table['s_numinfo'], 'upload=upload+1', "date='" . $date['today'] . "' and site=" . $s);
     if ($up_gid == 100000000) {
         db_query("OPTIMIZE TABLE " . $table['s_upload'], $DB_CONNECT);
     }
 }
 if ($uid && $upfiles) {
     $_uploadtmp = getArrayString($upfiles);
     foreach ($_uploadtmp['data'] as $_val) {
         $U = getUidData($table['s_upload'], $_val);
         if ($U['type'] == 2) {
             if ($fserver) {
                 $incPhoto .= '<img src="' . $d['upload']['ftp_urlpath'] . $U['folder'] . '/' . $U['tmpname'] . '" width="' . $d['upload']['width_img'] . '" class="photo" alt="" /><br /><br />';
             } else {
                 $incPhoto .= '<img src="' . $g['url_root'] . '/files/' . $U['folder'] . '/' . $U['tmpname'] . '" width="' . $d['upload']['width_img'] . '" class="photo" alt="" /><br /><br />';
             }
         }
     }
 }
 if ($incPhoto) {
     if ($insert_photo == 'top') {
         $content = $incPhoto . nl2br($content);
     }
Beispiel #10
0
$infoSite = getDbData($table['s_site'], "id='" . $r . "'", "uid");
$siteUid = $infoSite[0];
// 댓글 쿼리
$PCD = getDbArray($table['s_comment'], 'site=' . $siteUid . ' AND notice=1' . $cmentque, '*', $sort, $orderby, 0, 0);
if ($bid == "cus_manager2") {
    $TCD = getDbArray($table['s_comment'], 'site=' . $siteUid . ' AND notice=0' . $cmentque, '*', $sort, $orderby, $recnum, $p);
} else {
    $TCD = getDbArray($table['s_comment'], 'site=' . $siteUid . ' AND notice=0 AND html like "HTML"' . $cmentque, '*', $sort, $orderby, $recnum, $p);
}
$NUM = getDbRows($table['s_comment'], 'site=' . $siteUid . ' AND notice=0' . $cmentque);
$TPG = getTotalPage($NUM, $recnum);
while ($_R = db_fetch_array($PCD)) {
    $NCD[] = $_R;
}
while ($_R = db_fetch_array($TCD)) {
    $arrCyncStr = getArrayString($_R['cync']);
    if (strpos($cyncArr['data'][5], "bid:resort") && !strpos($arrCyncStr['data'][5], "bid:resort")) {
        continue;
    }
    $RCD[] = $_R;
}
if ($g['mobile'] && $_SESSION['pcmode'] != 'Y') {
    $B['skin'] = $skin ? $skin : $d['comment']['skin_mobile'];
} else {
    $B['skin'] = $skin ? $skin : $d['comment']['skin_main'];
}
$g['cment_reset'] = getLinkFilter($g['s'] . '/?' . ($_HS['usescode'] ? 'r=' . $r . '&amp;' : '') . ($c ? 'c=' . $c : 'm=' . $m), array($skin ? 'skin' : '', $iframe ? 'iframe' : ''));
$g['cment_list'] = $g['cment_reset'] . getLinkFilter('', array('p', 'sort', 'orderby', 'recnum', 'where', 'keyword'));
$g['cment_view'] = $g['cment_list'] . '&amp;uid=';
$g['cment_modify'] = $g['cment_list'] . '&amp;type=modify&amp;uid=';
$g['cment_action'] = $g['cment_list'] . '&amp;a=';
Beispiel #11
0
function getMetaImage($str)
{
    if (!$str) {
        return '';
    }
    if (strstr($str, '://')) {
        return $str;
    }
    $imgs = getArrayString($str);
    $R = getUidData($GLOBALS['table']['s_upload'], $imgs['data'][0]);
    if ($R['type'] == 2 || $R['type'] == 5) {
        return $R['url'] . $R['folder'] . '/' . $R['tmpname'];
    }
    if ($R['type'] == -1) {
        return $R['src'];
    }
    return '';
}
Beispiel #12
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>';
    //    }
}
        //      require_once $g['path_module'].'social/oauth/facebook/src/facebook.php';
        //   $FBCONN = new Facebook(array('appId'=>$d['social']['key_f'],'secret'=>$d['social']['secret_f']));
        // $FBRESULT = $FBCONN->api('/'. $_mysnsdat[4].'/feed?access_token='.$_mysnsdat[2],'POST',array('access_toten'=>$_mysnsdat[2],'message' => $orignSubject.'   '.$orignUrl));
        // if($FBRESULT['id'])
        // {
        // 	$FBPARAM = explode('_',$FBRESULT['id']);
        // 	$FBPAURL = 'http://facebook.com/permalink.php?story_fbid='.$FBPARAM[1].'&id='.$_mysnsdat[4];
        // 	$QVAL = "'$snsgid','f','".$_mysnsdat[4]."','$subject','$name','$nic','$my[uid]','$my[id]','$FBPAURL','$xcync','$date[totime]'";
        // 	getDbInsert($table['socialdata'],$QKEY,$QVAL);
        // 	$snsSendResult .= getDbCnt($table['socialdata'],'max(uid)','').',';
        // 	$snsgid--;
        // }
        // place 정보 등록
        if ($lat != '' && $lng != '') {
            $_PKEY = "parent,mbruid,name,address,lat,lng,type,date";
            $_PVAL = "'{$uid}','{$mbruid}','{$place_name}','{$location}','{$lat}','{$lng}','{$place_type}','" . $date['today'] . "'";
            getDbInsert($table['s_place'], $_PKEY, $_PVAL);
        }
        // 업로드 파일에 대한 parent 값 세팅
        if ($upload) {
            $up_arr = getArrayString($upload);
            for ($i = 0; $i < count($up_arr['data']); $i++) {
                getDbUpdate($table['s_upload'], "parent='" . $m . $uid . "'", 'uid=' . $up_arr['data'][$i]);
            }
        }
    }
    // 신규등록
}
$response = getCommentList($theme, $parent, $_where, $c_recnum, $c_sort, $c_orderby, $orderby2, $c_page);
echo $response;
exit;
Beispiel #14
0
<div id="_popwrap_">
	<?php 
$pops = getArrayString($pop);
?>
	<?php 
foreach ($pops['data'] as $_val) {
    ?>
	<?php 
    $R = getUidData($table['s_popup'], $_val);
    ?>
	<div id="poplayer<?php 
    echo $R['uid'];
    ?>
" style="position:absolute;z-index:<?php 
    echo $R['uid'];
    ?>
;width:<?php 
    echo $R['width'];
    ?>
px;height:<?php 
    echo $R['height'];
    ?>
px;top:<?php 
    echo $R['ptop'];
    ?>
px;left:<?php 
    echo $R['pleft'];
    ?>
px;<?php 
    if ($R['center']) {
Beispiel #15
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
}
Beispiel #16
0
<?php

$postarray1 = array();
$postarray2 = array();
$postarray1 = getArrayString($postuid);
foreach ($postarray1['data'] as $val) {
    if (!strstr($_SESSION['BbsPost' . $type], '[' . $val . ']')) {
        $_SESSION['BbsPost' . $type] .= '[' . $val . ']';
    }
}
$postarray2 = getArrayString($_SESSION['BbsPost' . $type]);
rsort($postarray2['data']);
reset($postarray2['data']);
?>


<form name="procForm" action="<?php 
echo $g['s'];
?>
/" method="post" target="_action_frame_<?php 
echo $m;
?>
">
<input type="hidden" name="r" value="<?php 
echo $r;
?>
" />
<input type="hidden" name="m" value="<?php 
echo $module;
?>
" />
Beispiel #17
0
             </form> 
             <?php 
}
?>
            </div><!-- .row rb-search -->
        </div> <!-- .panel-body -->
        <div class="row">
            <?php 
foreach ($RCD as $R) {
    ?>
 
               <?php 
    $post_link = $g['s'] . '/?r=' . $r . '&c=' . $c . '&uid=' . $R['uid'];
    ?>
               <?php 
    $UP = getArrayString($R['upload']);
    ?>
 <!-- 첫번째 이미지 uid 찾기-->
               <?php 
    $FU = $UP['data'][0];
    ?>
               <?php 
    $f_data = getDbData($table[$m . 'upload'], 'uid=' . $FU, '*');
    ?>
               <?php 
    $f_img = '/modules/bbs/upload/' . $f_data['folder'] . '/' . $f_data['tmpname'];
    ?>
                <div class="col-xs-6 col-md-3">
                    <a href="<?php 
    echo $post_link;
    ?>
Beispiel #18
0
        }
    }
}
if ($d['bbs']['isperm'] && ($d['bbs']['hitcount'] || !strpos('_' . $_SESSION['module_' . $m . '_view'], '[' . $R['uid'] . ']'))) {
    if ($R['point2']) {
        $g['main'] = $g['dir_module'] . 'lang.' . $_HS['lang'] . '/mod/_pointcheck.php';
        $d['bbs']['isperm'] = false;
    } else {
        getDbUpdate($table[$m . 'data'], 'hit=hit+1', 'uid=' . $R['uid']);
        $_SESSION['module_' . $m . '_view'] .= '[' . $R['uid'] . ']';
    }
}
if ($d['bbs']['isperm'] && $R['upload']) {
    $d['upload'] = array();
    $d['upload']['tmp'] = $R['upload'];
    $d['_pload'] = getArrayString($R['upload']);
    foreach ($d['_pload']['data'] as $_val) {
        $U = getUidData($table['s_upload'], $_val);
        if (!$U['uid']) {
            $R['upload'] = str_replace('[' . $_val . ']', '', $R['upload']);
            $d['_pload']['count']--;
        } else {
            $d['upload']['data'][] = $U;
            if (!$U['cync']) {
                $_CYNC = "cync='[" . $m . "][" . $R['uid'] . "][uid,down][" . $table[$m . 'data'] . "][" . $R['mbruid'] . "][m:" . $m . ",bid:" . $R['bbsid'] . ",uid:" . $R['uid'] . "]'";
                getDbUpdate($table['s_upload'], $_CYNC, 'uid=' . $U['uid']);
            }
        }
    }
    if ($R['upload'] != $d['upload']['tmp']) {
        getDbUpdate($table[$m . 'data'], "upload='" . $R['upload'] . "'", 'uid=' . $R['uid']);
Beispiel #19
0
<?php

if (!defined('__KIMS__')) {
    exit;
}
$S = 0;
$N = 0;
if ($files) {
    $d['upload'] = getArrayString($files);
    foreach ($d['upload']['data'] as $_val) {
        $U = getUidData($table['s_upload'], $_val);
        if ($U['uid']) {
            $S += $U['size'];
            $N++;
        }
    }
}
$P = array();
if (!$_SESSION['upsescode']) {
    $_SESSION['upsescode'] = str_replace('.', '', $g['time_start']);
}
$sescode = $_SESSION['upsescode'];
if ($sescode) {
    $PHOTOS = getDbArray($table['s_upload'], "tmpcode='" . $sescode . "'", '*', 'uid', 'asc', 0, 0);
    while ($R = db_fetch_array($PHOTOS)) {
        $P[] = $R;
        $S += $R['size'];
        $N++;
    }
}
if ($mod == 'photo') {
Beispiel #20
0
/**
 * parses the config file
 *
 * @author Andrew Darwin <*****@*****.**>
 * @author Delvison Castillo
 */
function parseConfig()
{
    global $configFileName;
    global $configXML;
    global $user;
    global $aclDict;
    global $restrictedDirectoriesDict;
    global $startPage;
    global $mainContentFilePath;
    global $defaultSecurityValue;
    global $ldapAddress;
    global $ldapPort;
    global $organizationalUnit1, $organizationalUnit2;
    global $organization, $countryNaming, $attr;
    global $useLDAP;
    global $defaultSecurityInLDAPAbsence;
    global $domainName;
    $logHeader = "parseConfig()";
    //$pathToXMLFiles = getPathToXMLFiles();
    $configFilePath = getPathToXMLFile($configFileName);
    logMessage("{$logHeader} configFilePath = {$configFilePath}");
    $configXML = simplexml_load_file($configFilePath);
    logMessage("parseConfig() loaded config file and will now begin parsing");
    //parse access_config
    $accessConfigXML = $configXML->access_config[0];
    foreach ($accessConfigXML as $xmlElement) {
        $elementName = $xmlElement->getName();
        if ($elementName == "acl") {
            $aclName = (string) $xmlElement->name;
            $groups = $xmlElement->group;
            $groupsArray = array();
            foreach ($groups as $groupItem) {
                array_push($groupsArray, (string) $groupItem);
            }
            logMessage("{$logHeader} Encountered acl element with name = " . "{$aclName} and groups = " . getArrayString($groupsArray));
            $tempArray = array((string) $aclName => $groupsArray);
            /*Had to cast
              $aclName to string here
              to avoid an illegal
              offset type warning*/
            $aclDict = array_merge($aclDict, $tempArray);
            /* Had to use
               array_merge instead
               of array_push */
        } else {
            if ($elementName == "restricted_directory") {
                $path = (string) $xmlElement->path;
                $acl_name = (string) $xmlElement->acl_name;
                logMessage("{$logHeader} Encountered restricted_directory element " . "with path = {$path} and acl_name = {$acl_name}");
                $restrictedDirectoriesDict[$path] = $acl_name;
            }
        }
    }
    $siteConfigXML = $configXML->site_config[0];
    foreach ($siteConfigXML as $xmlElement) {
        $elementName = $xmlElement->getName();
        $stringValue = (string) $xmlElement;
        switch ($elementName) {
            case "start_page":
                $startPage = $stringValue;
                break;
            case "main_content":
                $mainContentFilePath = $stringValue;
                break;
            case "default_security":
                $defaultSecurityValue = $stringValue;
                break;
            case "domain_name":
                $domainName = $stringValue;
                break;
        }
    }
    $ldapConfigXML = $configXML->ldap_config[0];
    foreach ($ldapConfigXML as $xmlElement) {
        $elementName = $xmlElement->getName();
        $stringValue = getTrimmed((string) $xmlElement);
        switch ($elementName) {
            case "address":
                $ldapAddress = $stringValue;
                break;
            case "port":
                $ldapPort = $stringValue;
                break;
            case "organizational_unit1":
                $organizationalUnit1 = $stringValue;
                break;
            case "organizational_unit2":
                $organizationalUnit2 = $stringValue;
                break;
            case "organization":
                $organization = $stringValue;
                break;
            case "country_naming":
                $countryNaming = $stringValue;
                break;
            case "attribute":
                $attr = $stringValue;
                break;
            case "use_ldap":
                $useLDAP = $stringValue == "true";
                break;
            case "default_security_in_ldap_absence":
                $defaultSecurityInLDAPAbsence = $stringValue;
                break;
        }
    }
    if (!$useLDAP) {
        $defaultSecurityValue = $defaultSecurityInLDAPAbsence;
    }
    logMessage("{$logHeader} finished parsing and produced aclDict = '" . getArrayString($aclDict) . "' and restrictedDirectoriesDict = '" . getArrayString($restrictedDirectoriesDict) . "'");
}
Beispiel #21
0
function getCyncUrl($cync)
{
    if (!$cync) {
        return $GLOBALS['g']['r'];
    }
    $_r = getArrayString($cync);
    $_r = $_r['data'][5];
    if ($GLOBALS['_HS']['rewrite'] && strpos('_' . $_r, 'm:bbs,bid:')) {
        $_r = str_replace('m:bbs', 'b', $_r);
        $_r = str_replace(',bid:', '/', $_r);
        $_r = str_replace(',uid:', '/', $_r);
        $_r = str_replace(',CMT:', '/', $_r);
        $_r = str_replace(',s:', '/s', $_r);
        return $GLOBALS['g']['r'] . '/' . $_r;
    } else {
        return $GLOBALS['g']['s'] . '/?' . ($GLOBALS['_HS']['usescode'] ? 'r=' . $GLOBALS['_HS']['id'] . '&amp;' : '') . str_replace(':', '=', str_replace(',', '&amp;', $_r));
    }
}
/**
 * Parse cinetube cover info and add rss item to template.
 * @param $info
 * @param $type   Movie, documentary or serie (mov, doc, ser)
 * @param $title
 * @param $template
 * @param $showRipType True to parse rip type.
 */
function parseCoverPageInfo($info, $type, $title, $template, $showRipType)
{
    //Get info
    $movieIcons = array();
    foreach ($info as $key => $detail) {
        if ($key == 1) {
            preg_match_all("/<span class\\=\"rosa\">(.*)<\\/span>/siU", $detail[0], $rips);
            if ($rips && count($rips) > 1) {
                $movieRipType = getArrayString($rips[1]);
            }
        }
        //
        if ($key == 0) {
            if (strpos($detail[2], '"')) {
                $movieLink = substr($detail[2], 0, strpos($detail[2], '"'));
            } else {
                $movieLink = $detail[2];
            }
            $movieTitle = html_entity_decode($detail[4]);
            $movieThumbnail = html_entity_decode($detail[3]);
        } else {
            if ($detail[4]) {
                if (!strpos($detail[4], "escarga")) {
                    array_push($movieIcons, html_entity_decode($detail[4]));
                } else {
                    array_push($movieIcons, "MEGAUPLOAD");
                }
            } else {
                //megavideo, veoh, tutv, google
                array_push($movieIcons, html_entity_decode(substr($detail[3], strrpos($detail[3], "/") + 1, strrpos($detail[3], "\\.") - 4)));
            }
        }
    }
    //Add video
    if ($showRipType) {
        $movieDescription = strtoupper($movieRipType . " | " . getArrayString($movieIcons) . "");
    } else {
        $movieDescription = strtoupper(getArrayString($movieIcons) . "");
    }
    $template->addItem($movieTitle, $movieDescription, SCRAPER_URL . "index.php?type={$type}" . URL_AMP . "item=" . base64_encode($movieLink) . URL_AMP . "title=" . base64_encode($title), $movieThumbnail);
}
Beispiel #23
0
		<td class="x1">파일명 <input type="text" name="name" value="" class="input" /> 캡션</td>
		<td class="x2"><input type="text" name="caption" value="" class="input" /></td>
		<td class="x3"><input type="submit" value="등록" class="btnblue" /> <input type="button" value="취소" class="btngray" onclick="captionClose();" /></td>
		</tr>
		</table>
		</form>
	</div>
	<div id="upfilebox" class="upfilebox" style="display:<?php 
echo $code ? 'block' : 'none';
?>
;">
	<div class="thumbbox"><div id="thumbbox" class="thumbimg"></div></div>
	<div class="upfilelist">
	<ul id="upfilelist" class="scrollbar01">
	<?php 
$UFILES = getArrayString($code);
?>
	<?php 
foreach ($UFILES['data'] as $_val) {
    ?>
	<?php 
    $U = getUidData($table['s_upload'], $_val);
    ?>
	<?php 
    if (!$U['uid']) {
        continue;
    }
    ?>
	<?php 
    $file_ext = getExt($U['name']);
    ?>
        //getLink('','','한줄의견이 있는 댓글은 삭제할 수 없습니다.','');
    }
}
//동기화
$cyncArr = getArrayString($R['cync']);
$fdexp = explode(',', $cyncArr['data'][2]);
if ($fdexp[0] && $fdexp[1] && $cyncArr['data'][3]) {
    getDbUpdate($cyncArr['data'][3], $fdexp[1] . '=' . $fdexp[1] . '-1', $fdexp[0] . '=' . $cyncArr['data'][1]);
}
if ($fdexp[0] && $fdexp[2] && $cyncArr['data'][3]) {
    getDbUpdate($cyncArr['data'][3], $fdexp[2] . '=' . $fdexp[2] . '-' . $R['oneline'], $fdexp[0] . '=' . $cyncArr['data'][1]);
}
//첨부파일삭제
if ($R['upload']) {
    //include $g['path_module'].'upload/var/var.php';
    $UPFILES = getArrayString($R['upload']);
    foreach ($UPFILES['data'] as $_val) {
        $U = getUidData($table[$m . 'upload'], $_val);
        if ($U['uid']) {
            getDbUpdate($table['s_numinfo'], 'upload=upload-1', "date='" . substr($U['d_regis'], 0, 8) . "' and site=" . $U['site']);
            getDbDelete($table[$m . 'upload'], 'uid=' . $U['uid']);
            if ($U['url'] == $d['upload']['ftp_urlpath']) {
                $FTP_CONNECT = ftp_connect($d['upload']['ftp_host'], $d['upload']['ftp_port']);
                $FTP_CRESULT = ftp_login($FTP_CONNECT, $d['upload']['ftp_user'], $d['upload']['ftp_pass']);
                if (!$FTP_CONNECT) {
                    echo '[RESULT:FTP서버 연결에 문제가 발생했습니다.:RESULT]';
                }
                //getLink('','','FTP서버 연결에 문제가 발생했습니다.','');
                if (!$FTP_CRESULT) {
                    echo '[RESULT:FTP서버 아이디나 패스워드가 일치하지 않습니다.:RESULT]';
                }
Beispiel #25
0
<?php

include_once $g['path_module'] . 'mediaset/function.php';
$d['layout']['_slide'] = getArrayString($d['layout']['front_people']);
?>

<div class="container marketing">
	<div class="row">
		<?php 
$_i = 0;
foreach ($d['layout']['_slide']['data'] as $_tmp['uid']) {
    ?>
		<?php 
    $_tmp['m'] = getUidData($table['s_upload'], $_tmp['uid']);
    ?>
		<div class="col-lg-4">
			<img class="img-circle rb-main-img-circle" src="<?php 
    echo getMediaLink($_tmp['m'], 0);
    ?>
" alt="<?php 
    echo $_tmp['m']['alt'];
    ?>
">
			<h2><?php 
    echo $_tmp['m']['alt'] ? $_tmp['m']['alt'] : _LANG('s5001', 'xlayout');
    ?>
</h2>
			<p><?php 
    echo $_tmp['m']['description'] ? $_tmp['m']['description'] : _LANG('s5002', 'xlayout');
    ?>
</p>
Beispiel #26
0
    $exp1 = explode('youtube.com/embed/', $src);
    $exp2 = strstr($exp1[1], '?') ? explode('?', $exp1[1]) : explode('"', $exp1[1]);
    return $exp2[0];
}
function getVodThumb($src, $what)
{
    return '//img.youtube.com/vi/' . getVodCode($src) . '/' . $what . '.jpg';
}
function getVodUrl($src)
{
    return '//www.youtube.com/watch?feature=player_detailpage&v=' . getVodCode($src);
}
$S = 0;
$N = 0;
if ($files) {
    $d['mediaset'] = getArrayString($files);
    foreach ($d['mediaset']['data'] as $_val) {
        $U = getUidData($table['s_upload'], $_val);
        if ($U['uid']) {
            $S += $U['size'];
            $N++;
        }
    }
}
$P = array();
if (!$_SESSION['upsescode']) {
    $_SESSION['upsescode'] = str_replace('.', '', $g['time_start']);
}
$sescode = $_SESSION['upsescode'];
if ($sescode) {
    $PHOTOS = getDbArray($table['s_upload'], "tmpcode='" . $sescode . "' and (type=0 or type=5) and fileonly=0", '*', 'pid', 'asc', 0, 0);
Beispiel #27
0
    }
    if (!$my['id'] || $my['id'] != $R['id'] && !$my['admin']) {
        if (!$pw) {
            getLink('', '', '정상적인 접근이 아닙니다.', '');
        } else {
            if ($pw != $R['pw']) {
                getLink('', '', '정상적인 접근이 아닙니다.', '');
            }
        }
    }
    $QVAL = "display='{$display}',hidden='{$hidden}',notice='{$notice}',subject='{$subject}',content='{$content}',html='{$html}',d_modify='{$d_regis}',upload='{$upload}',adddata='{$adddata}'";
    getDbUpdate($table['s_comment'], $QVAL, 'uid=' . $R['uid']);
    getLink(($c ? $g['s'] . '/?r=' . $r . '&c=' . $c : $g['s'] . '/?r=' . $r . '&m=' . $m) . getLinkFilter('', array('skin', 'iframe', 'sort', 'orderby', 'recnum', 'where', 'keyword', 'uid')), 'parent.', '', '');
} else {
    //동기화
    $cyncArr = getArrayString($cync);
    if (!$cyncArr['data'][0] || !$cyncArr['data'][1]) {
        getLink('', '', '동기화코드가 지정되지 않았습니다.', '');
    }
    $fdexp = explode(',', $cyncArr['data'][2]);
    if ($fdexp[0] && $fdexp[1] && $cyncArr['data'][3]) {
        $cyncQue = $fdexp[1] . '=' . $fdexp[1] . '+1';
        if ($fdexp[3]) {
            $cyncQue .= ',' . $fdexp[3] . "='" . $d_regis . "'";
        }
        getDbUpdate($cyncArr['data'][3], $cyncQue, $fdexp[0] . '=' . $cyncArr['data'][1]);
    }
    $parent = $cyncArr['data'][0] . $cyncArr['data'][1];
    $parentmbr = $cyncArr['data'][4];
    $minuid = getDbCnt($table['s_comment'], 'min(uid)', '');
    $uid = $minuid ? $minuid - 1 : 1000000000;