function getMenuUrlCode($site, $table, $parent, $depth, $uid, $code) { static $string; $xdepth = $depth + 1; $CD = getDbSelect($table, ($site ? 'site=' . $site . ' and ' : '') . 'depth=' . $xdepth . ' and parent=' . $parent . ' and hidden=0 and reject=0 order by gid asc', '*'); while ($C = db_fetch_array($CD)) { $code1 = $code . $C['id'] . '/'; $_code = substr($code1, 0, strlen($code1) - 1); $string .= "<url><loc>" . getRWurl('c=' . $_code) . "</loc></url>\n"; if ($C['isson']) { getMenuUrlCode($site, $table, $C['uid'], $C['depth'], $uid, $code1); } } return $string; }
function getMenuCodeToSql($table, $cat, $f) { static $sql; $R = getUidData($table, $cat); if ($R['uid']) { $sql .= $f . '=' . $R['uid'] . ' or '; } if ($R['isson']) { $RDATA = getDbSelect($table, 'parent=' . $R['uid'], 'uid'); while ($C = db_fetch_array($RDATA)) { getMenuCodeToSql($table, $C['uid'], $f); } } return substr($sql, 0, strlen($sql) - 4); }
function getMenuWidgetTree($site, $table, $is_child, $parent, $depth, $id, $w, $_C) { global $_CA; if ($depth < $w['limit']) { $CD = getDbSelect($table, ($site ? 'site=' . $site . ' and ' : '') . 'hidden=0 and parent=' . $parent . ' and depth=' . ($depth + 1) . ($w['mobile'] ? ' and mobile=1' : '') . ' order by gid asc', '*'); echo "\n"; for ($i = 0; $i < $depth; $i++) { echo "\t"; } if ($is_child) { echo "<ul" . ($w['dropdown'] ? ' class="dropdown-menu" role="menu" aria-labelledby="dLabel"' : '') . ">\n"; if ($w['dropdown'] && $w['dispfmenu']) { echo $_C['link']; echo '<li role="presentation" class="divider"></li>' . "\n"; } } while ($C = db_fetch_array($CD)) { $_newTree = ($id ? $id . '/' : '') . $C['id']; $_href = $w['link'] == 'bookmark' ? ' data-scroll href="#' . ($C['is_child'] && $w['limit'] > 1 && !$parent && $w['dropdown'] ? '' : str_replace('/', '-', $_newTree)) . '"' : ' href="' . RW('c=' . $_newTree) . '"'; $_dropdown = $w['dropdown'] && $C['is_child'] && $C['depth'] == $w['depth'] + 1 && $w['olimit'] > 1 ? ' class="dropdown-toggle" data-toggle="dropdown"' : ''; $_name = $C['name'] . ($_dropdown ? ' <i class="caret"></i>' : ''); $_target = $C['target'] == '_blank' ? ' target="_blank"' : ''; $_addattr = $C['addattr'] ? ' ' . $C['addattr'] : ''; for ($i = 0; $i < $C['depth']; $i++) { echo "\t"; } if ($_dropdown) { echo '<li class="dropdown' . (in_array($C['id'], $_CA) ? ' active' : '') . '"><a' . $_addattr . $_href . $_dropdown . $_target . '>' . $_name . '</a>'; } else { echo '<li' . (in_array($C['id'], $_CA) ? ' class="active"' : '') . '><a' . $_addattr . $_href . $_dropdown . $_target . '>' . $_name . '</a>'; } if ($C['is_child']) { $C['link'] = '<li><a' . $_addattr . $_href . $_target . '>' . $C['name'] . '</a></li>'; getMenuWidgetTree($site, $table, $C['is_child'], $C['uid'], $C['depth'], $_newTree, $w, $C); } echo "</li>\n"; } for ($i = 0; $i < $depth; $i++) { echo "\t"; } if ($is_child) { echo "</ul>\n"; } for ($i = 0; $i < $depth; $i++) { echo "\t"; } } }
function DeleteOneline($C, $d, $sync_arr) { global $table, $date; $_ONELINE = getDbSelect($table['s_oneline'], 'parent=' . $C['uid'], '*'); while ($_O = db_fetch_array($_ONELINE)) { if ($d['comment']['give_opoint'] && $_O['mbruid']) { getDbInsert($table['s_point'], 'my_mbruid,by_mbruid,price,content,d_regis', "'" . $_O['mbruid'] . "','0','-" . $d['comment']['give_opoint'] . "','한줄의견삭제(" . getStrCut(str_replace('&', ' ', strip_tags($_O['content'])), 15, '') . ")환원','" . $date['totime'] . "'"); getDbUpdate($table['s_mbrdata'], 'point=point-' . $d['comment']['give_opoint'], 'memberuid=' . $_O['mbruid']); } } getDbDelete($table['s_oneline'], 'parent=' . $C['uid']); // 댓글 수량 동기화 $sync_arr = explode('|', $R['sync']); $feed_table = $sync_arr[0]; $feed_uid = $sync_arr[1]; getDbUpdate($feed_table, 'oneline=oneline-1', 'uid=' . $feed_uid); }
function getMenuShowSelect($site, $table, $j, $parent, $depth, $uid, $hidden, $id) { global $cat, $_isUid; static $j; $CD = getDbSelect($table, ($site ? 'site=' . $site . ' and ' : '') . 'depth=' . ($depth + 1) . ' and parent=' . $parent . ($hidden ? ' and hidden=0' : '') . ' order by gid asc', '*'); while ($C = db_fetch_array($CD)) { $nId = ($id ? $id . '/' : '') . $C[$_isUid . 'id']; $j++; echo '<option class="selectcat' . $C['depth'] . '" value="' . $nId . '"' . ($nId == $cat ? ' selected' : '') . '>'; for ($i = 1; $i < $C['depth']; $i++) { echo ' '; } if ($C['depth'] > 1) { echo 'ㄴ'; } echo $C['name'] . ($C['num'] ? ' (' . $C['num'] . ')' : '') . '</option>'; if ($C['is_child']) { getMenuShowSelect($site, $table, $j, $C['uid'], $C['depth'], $uid, $hidden, $nId); } } }
function getMenuTxt($site, $table, $j, $parent, $depth, $uid, $code) { global $g; static $j, $string; $xdepth = $depth + 1; $CD = getDbSelect($table, ($site ? 'site=' . $site . ' and ' : '') . 'depth=' . $xdepth . ' and parent=' . $parent . ' order by gid asc', '*'); while ($C = db_fetch_array($CD)) { $j++; $code = $code . $C['id'] . '/'; $_code = substr($code, 0, strlen($code) - 1); for ($i = 0; $i < $depth; $i++) { $string .= "\t"; } $string .= '[' . $xdepth . ']' . ($C['hidden'] ? '[숨김]' : '') . ($C['reject'] ? '[차단]' : '') . ($C['target'] ? '[새창]' : '') . $C['name'] . " = " . RW('c=' . $_code) . "\r\n"; if ($C['isson']) { getMenuTxt($site, $table, $j, $C['uid'], $C['depth'], $uid, $code); } if ($xdepth == 1) { $string .= "\r\n"; } $code = ''; } return $string; }
//기존메뉴삭제 if ($ACT_DM) { $_MENUS = getDbSelect($table['s_menu'], 'site=' . $S['uid'] . ' order by gid asc', '*'); while ($_M = db_fetch_array($_MENUS)) { @unlink($g['path_var'] . 'menu/' . $_M['imghead']); @unlink($g['path_var'] . 'menu/' . $_M['imgfoot']); getDbDelete($table['s_seo'], 'rel=1 and parent=' . $_M['uid']); } getDbDelete($table['s_menu'], 'site=' . $S['uid']); db_query("OPTIMIZE TABLE " . $table['s_menu'], $DB_CONNECT); db_query("OPTIMIZE TABLE " . $table['s_seo'], $DB_CONNECT); DirDelete($g['path_page'] . $S['id'] . '-menus'); } //기존페이지삭제 if ($ACT_DP) { $_PAGES = getDbSelect($table['s_page'], 'site=' . $S['uid'] . ' order by uid asc', '*'); while ($_P = db_fetch_array($_PAGES)) { getDbDelete($table['s_seo'], 'rel=2 and parent=' . $_P['uid']); } getDbDelete($table['s_page'], 'site=' . $S['uid']); db_query("OPTIMIZE TABLE " . $table['s_page'], $DB_CONNECT); db_query("OPTIMIZE TABLE " . $table['s_seo'], $DB_CONNECT); DirDelete($g['path_page'] . $S['id'] . '-pages'); } @rename($g['path_tmp'] . 'app/' . $package_folder . '/pages/' . $d['package']['siteid'] . '-menus', $g['path_tmp'] . 'app/' . $package_folder . '/pages/' . $S['id'] . '-menus'); @rename($g['path_tmp'] . 'app/' . $package_folder . '/pages/' . $d['package']['siteid'] . '-pages', $g['path_tmp'] . 'app/' . $package_folder . '/pages/' . $S['id'] . '-pages'); } else { $MAXC = getDbCnt($table['s_site'], 'max(gid)', ''); $gid = $MAXC + 1; $name = 'SITE ' . $gid; $id = 's' . date('His');
>멕시코</option> <option value="seychelles"<?php if ($r == "seychelles") { ?> selected="selected"<?php } ?> >세이쉘</option> </select> <?php } ?> <!-- / 통합 트레비아 임시 조치 --> <?php $resCate = getDbSelect($table[$m . 'data'], "site=" . $s . " AND bbsid='resort'", "subject"); ?> <select onchange="document.bbssearchf.cat.value=this.value;document.bbssearchf.submit();"> <option value=""> + 리조트 선택</option> <option value="" class="sline">-------------------</option> <?php while ($infoCate = db_fetch_array($resCate)) { ?> <option value="<?php echo $infoCate[0]; ?> "<?php if ($infoCate[0] == $R['category'] || $infoCate[0] == $cat) { ?> selected="selected"<?php }
function getTreeMenu($conf, $cat, $code, $depth, $parent, $tmpcode) { $id = 'tree_' . filterstr(microtime()); $tree = '<div class="rb-tree"><ul id="' . $id . '">'; $CD = getDbSelect($conf['table'], ($conf['site'] ? 'site=' . $conf['site'] . ' and ' : '') . 'depth=' . ($depth + 1) . ' and parent=' . $parent . ($conf['dispHidden'] ? ' and hidden=0' : '') . ' order by gid asc', '*'); $_i = 0; while ($C = db_fetch_array($CD)) { $rcode = $tmpcode ? $tmpcode . '/' . $C['uid'] : $C['uid']; $topen = $rcode == substr($code, 0, strlen($rcode)) ? true : false; $tree .= '<li>'; if ($C['isson']) { $tree .= '<a data-toggle="collapse" href="#' . $id . '-' . $_i . '-' . $C['uid'] . '" class="rb-branch' . ($conf['allOpen'] || $topen ? '' : ' collapsed') . '"></a>'; $tree .= '<a href="' . $conf['link'] . $C['uid'] . '&code=' . $rcode . ($conf['bookmark'] ? '#' . $conf['bookmark'] : '') . '"><span' . ($code == $rcode ? ' class="rb-active"' : '') . '>'; if ($conf['dispCheckbox']) { $tree .= '<input type="checkbox" name="tree_members[]" value="' . $C['uid'] . '">'; } $tree .= $C['name'] . '</span></a>'; if ($conf['dispNum'] && $C['num']) { $tree .= ' <small>(' . $C['num'] . ')</small>'; } if ($C['mobile']) { $tree .= '<i class="glyphicon glyphicon-phone" title="모바일"></i>'; } if ($C['hidden']) { $tree .= '<i class="glyphicon glyphicon-eye-close" title="숨김"></i>'; } if ($C['reject']) { $tree .= '<i class="glyphicon glyphicon-ban-circle" title="차단"></i>'; } $tree .= '<ul id="' . $id . '-' . $_i . '-' . $C['uid'] . '" class="collapse' . ($conf['allOpen'] || $topen ? ' in' : '') . '">'; $tree .= getTreeMenu($conf, $cat, $code, $C['depth'], $C['uid'], $rcode); $tree .= '</ul>'; } else { $tree .= '<a href="#." class="rb-leaf"></a>'; $tree .= '<a href="' . $conf['link'] . $C['uid'] . '&code=' . $rcode . ($conf['bookmark'] ? '#' . $conf['bookmark'] : '') . '"><span' . ($code == $rcode ? ' class="rb-active"' : '') . '>'; if ($conf['dispCheckbox']) { $tree .= '<input type="checkbox" name="tree_members[]" value="' . $C['uid'] . '">'; } $tree .= $C['name'] . '</span></a>'; if ($conf['dispNum'] && $C['num']) { $tree .= ' <small>(' . $C['num'] . ')</small>'; } if ($C['mobile']) { $tree .= '<i class="glyphicon glyphicon-phone" title="모바일"></i>'; } if ($C['hidden']) { $tree .= '<i class="glyphicon glyphicon-eye-close" title="숨김"></i>'; } if ($C['reject']) { $tree .= '<i class="glyphicon glyphicon-ban-circle" title="차단"></i>'; } } $tree .= '</li>'; $_i++; } $tree .= '</ul></div>'; return $tree; }
$SITES = getDbArray($table['s_site'], '', '*', 'gid', 'asc', 0, 1); $year1 = $year1 ? $year1 : substr($date['today'], 0, 4); $month1 = $month1 ? $month1 : substr($date['today'], 4, 2); $day1 = $day1 ? $day1 : 1; $year2 = $year2 ? $year2 : substr($date['today'], 0, 4); $month2 = $month2 ? $month2 : substr($date['today'], 4, 2); $day2 = $day2 ? $day2 : substr($date['today'], 6, 2); $p = $p ? $p : 1; $recnum = $recnum && $recnum < 200 ? $recnum : 20; $sort = $sort ? $sort : 'hit'; $orderby = $orderby ? $orderby : 'desc'; $accountQue = $account ? 'site=' . $account . ' and ' : ''; $_WHERE1 = $accountQue . 'date >= ' . $year1 . sprintf('%02d', $month1) . sprintf('%02d', $day1) . ' and date <= ' . $year2 . sprintf('%02d', $month2) . sprintf('%02d', $day2); $_WHERE2 = 'keyword,sum(hit) as hit'; $RCD = getDbSelect($table['s_inkey'], $_WHERE1 . ' group by keyword order by ' . $sort . ' ' . $orderby . ' limit 0,' . $recnum, $_WHERE2); ?> <form name="procForm" action="<?php echo $g['s']; ?> /" method="get"> <input type="hidden" name="r" value="<?php echo $r; ?> " /> <input type="hidden" name="m" value="<?php echo $m;
<div class="category"> <?php if ($type != 'follower') { ?> <select onchange="goHref('<?php echo $g['url_page']; ?> &type=<?php echo $type; ?> &category='+this.value);"> <option value=""> + 전체</option> <option value="">-------------</option> <?php $_CATS = getDbSelect($table['s_friend'], "my_mbruid=" . $my['uid'] . " and category<>'' group by category", 'category'); ?> <?php while ($_R = db_fetch_array($_CATS)) { ?> <option value="<?php echo $_R['category']; ?> "<?php if ($_R['category'] == $category) { ?> selected="selected"<?php } ?> >ㆍ<?php echo $_R['category'];
</ul> </div> <div class="lnb<?php if ($my['id']) { ?> in<?php } else { ?> out<?php } ?> "> <ul> <?php $_MENUS1 = getDbSelect($table['s_menu'], 'site=' . $s . ' and hidden=0 and depth=1 order by gid asc', '*'); ?> <?php $infoDubai = db_fetch_array(getDbArray($table['bbsdata'], "site=6 AND category='두바이'", "uid", "", "rand()", 1, 1)); // $infoThailand1 = db_fetch_array(getDbArray($table['bbsdata'],"site=4 AND category='미주허니문'","uid","","rand()",1,1)); $infoThailand1 = db_fetch_array(getDbArray($table['bbsdata'], "site=4 AND category='푸켓'", "uid", "", "rand()", 1, 1)); $infoThailand4 = db_fetch_array(getDbArray($table['bbsdata'], "site=4 AND category='보라카이'", "uid", "", "rand()", 1, 1)); $infoThailand2 = db_fetch_array(getDbArray($table['bbsdata'], "site=4 AND category='하와이'", "uid", "", "rand()", 1, 1)); $infoThailand3 = db_fetch_array(getDbArray($table['bbsdata'], "site=4 AND category='코사무이'", "uid", "", "rand()", 1, 1)); $infoIndonesia1 = db_fetch_array(getDbArray($table['bbsdata'], "site=5 AND category='발리'", "uid", "", "rand()", 1, 1)); $infoIndonesia2 = db_fetch_array(getDbArray($table['bbsdata'], "site=5 AND category='롬복'", "uid", "", "rand()", 1, 1)); $infoSeychelles = db_fetch_array(getDbArray($table['bbsdata'], "site=8 AND bbsid='resort'", "uid", "", "rand()", 1, 1)); //15-11-12 칸쿤만 랜덤함수 13XXX으로 시작하면 여행후기로 넘어가서 강제로 임의의 숫자를 주었음. //난수 발생 로직이 왜 필요한지는 파악이 안됨. // $infoMexico = db_fetch_array(getDbArray($table['bbsdata'],"site=7 AND category='칸쿤'","uid","","rand()",1,1)); $infoMexico = db_fetch_array(getDbArray($table['bbsdata'], "site=7 AND category='칸쿤'", "uid", "", "2786", 1, 1));
?> /<?php echo $TPG; ?> 페이지) </div> <div class="category"> <select onchange="goHref('<?php echo str_replace('&', '&', $g['url_page']); ?> &category='+this.value);"> <option value=""> + 전체</option> <option value="">-------------</option> <?php $_CATS = getDbSelect($table['s_scrap'], "mbruid=" . $M['memberuid'] . " and category<>'' group by category", 'category'); ?> <?php while ($_R = db_fetch_array($_CATS)) { ?> <option value="<?php echo $_R['category']; ?> "<?php if ($_R['category'] == $category) { ?> selected="selected"<?php } ?> >ㆍ<?php echo $_R['category'];
/" method="post"> <input type="hidden" name="r" value="<?php echo $r; ?> "> <input type="hidden" name="m" value="<?php echo $module; ?> "> <input type="hidden" name="a" value="modifygid"> <div class="panel-body" style="border-top:1px solid #DEDEDE;"> <div class="dd" id="nestable-menu"> <ol class="dd-list"> <?php $_MENUS = getDbSelect($table['s_domain'], 'parent=' . intval($CINFO['uid']) . ' and depth=' . ($CINFO['depth'] + 1) . ' order by gid asc', '*'); ?> <?php $_i = 1; while ($_M = db_fetch_array($_MENUS)) { ?> <li class="dd-item" data-id="<?php echo $_i; ?> "> <input type="checkbox" name="menumembers[]" value="<?php echo $_M['uid']; ?> " checked class="hidden"> <div class="dd-handle"><i class="fa fa-arrows fa-fw"></i> <?php
if ($where == 'term' && $keyword) { $_yr = substr($keyword, 0, 4); $_mh = substr($keyword, 4, 2); } else { $_yr = $_yr ? $_yr : $date['year']; $_mh = $_mh ? $_mh : substr($date['month'], 4, 2); } $todaynum = $date['today']; $firstday = mktime(0, 0, 0, $_mh, 1, $_yr); $startday = date('w', $firstday); $endday = date('t', $firstday); $prevyear = date('Y', mktime(0, 0, 0, $_mh - 1, 1, $_yr)); $nextyear = date('Y', mktime(0, 0, 0, $_mh + 1, 1, $_yr)); $prevmonth = date('m', mktime(0, 0, 0, $_mh - 1, 1, $_yr)); $nextmonth = date('m', mktime(0, 0, 0, $_mh + 1, 1, $_yr)); $DAYNUM = getDbSelect($table['bbsday'], "date like '" . $_yr . $_mh . "%' and site=" . $s . ' order by date asc', '*'); while ($_R = db_fetch_array($DAYNUM)) { if ($_R['num']) { $_D[$_R['date']] = $_R['num']; } } ?> <div class="daily"> <a name="calendar"></a> <div class="tt"> <a href="<?php echo $g['s']; ?> /?r=<?php echo $r;
<?php // ******************* 메인배너 이미지/링크 ******************* / $rcd = getDbSelect($table['sliderdata'], "sitecode='maldives'", "*"); $seq_array = array(); for ($i = 0; $R = db_fetch_array($rcd); $i++) { if (empty($R['imgsrc']) || empty($R['url'])) { continue; } $bannerImageTemp[$R['seq']] = "/modules/slider/var/files/" . $R['imgsrc']; $bannerLinkTemp[$R['seq']] = $R['url']; //echo $bannerImageTemp[$i] . " - " . $bannerLinkTemp[$i]; array_push($seq_array, $R['seq']); /* echo "<pre>"; print_r($R); echo "</pre>"; //--*/ } /* echo "<pre>"; print_r($seq_array); echo "</pre>"; //--*/ for ($i = min($seq_array); $i <= max($seq_array); $i++) { do { $index = rand(min($seq_array), max($seq_array)); } while ($bannerImageTemp[$index] == "ok"); if ($bannerImageTemp[$index] != null) { $bannerImage[$i] = $bannerImageTemp[$index]; $bannerLink[$i] = $bannerLinkTemp[$index];
?> <span class="num">(<?php echo $_M2['num']; ?> )</span><?php } if (getNew($_M2['d_last'], $d['layout']['newhour'])) { ?> <span class="new">new</span><?php } ?> </a> </li> <?php if ($_M2['isson']) { $_MENUS3 = getDbSelect($table['s_menu'], 'site=' . $s . ' and parent=' . $_M2['uid'] . ' and hidden=0 and depth=3 and mobile=1 order by gid asc', '*'); while ($_M3 = db_fetch_array($_MENUS3)) { ?> <li class="m3<?php if ($_M1['id'] . '/' . $_M2['id'] . '/' . $_M3['id'] == $c) { ?> selected3<?php } ?> "> <a href="<?php echo RW('c=' . $_M1['id'] . '/' . $_M2['id'] . '/' . $_M3['id']); ?> " target="<?php echo $_M3['target']; ?>
function getMenuWidgetCollapse($site, $table, $is_child, $parent, $depth, $id, $w, $_C) { global $_CA; $CD = getDbSelect($table, ($site ? 'site=' . $site . ' and ' : '') . 'hidden=0 and parent=' . $parent . ' and depth=' . ($depth + 1) . ($w['mobile'] ? ' and mobile=1' : '') . ' order by gid asc', '*'); if (db_num_rows($CD)) { ?> <div class="list-group" id="<?php echo $w['collid']; ?> "> <?php while ($C = db_fetch_array($CD)) { $CD1 = getDbSelect($table, ($site ? 'site=' . $site . ' and ' : '') . 'hidden=0 and parent=' . $C['uid'] . ' and depth=' . ($C['depth'] + 1) . ' order by gid asc', '*'); $_newTree = ($id ? $id . '/' : '') . $C['id']; $_newTreeB = str_replace('/', '-', $_newTree); $_href = $w['link'] == 'bookmark' ? '#' . $_newTreeB : RW('c=' . $_newTree); $_name = $C['name']; $_target = $C['target'] == '_blank' ? ' target="_blank"' : ''; $_addattr = $C['addattr'] ? ' ' . $C['addattr'] : ''; $_isActive = in_array($C['id'], $_CA); ?> <?php if ($C['is_child'] && $w['limit'] > 1 && $w['collapse']) { ?> <div class="panel rb-panel"> <a data-toggle="collapse" data-parent="#<?php echo $w['collid']; ?> " href="#<?php echo $w['collid']; ?> -<?php echo $C['uid']; ?> " class="list-group-item<?php if ($_isActive) { ?> active<?php } ?> "> <?php echo $C['name']; ?> <span class="branch"></span> </a> <div id="<?php echo $w['collid']; ?> -<?php echo $C['uid']; ?> " class="collapse<?php if ($_isActive) { ?> in<?php } ?> "> <ul class="nav"> <?php if ($w['dispfmenu']) { ?> <li class="rb-fmenu"><a href="<?php echo $_href; ?> "<?php echo $_addattr . $_target; ?> ><?php echo $_name; ?> </a></li> <li role="presentation" class="divider"></li> <?php } ?> <?php while ($C1 = db_fetch_array($CD1)) { ?> <li<?php if (in_array($C1['id'], $_CA)) { ?> class="active"<?php } ?> ><a href="<?php echo $w['link'] == 'bookmark' ? '#' . $_newTreeB . '-' . $C1['id'] : RW('c=' . $_newTree . '/' . $C1['id']); ?> "<?php if ($C1['addattr']) { ?> <?php echo $C1['addattr']; } if ($C1['target']) { ?> target="<?php echo $C1['target']; ?> "<?php } ?> ><?php echo $C1['name']; ?> </a></li> <?php } ?> </ul> </div> </div> <?php } else { ?> <a href="<?php echo $_href; ?> "<?php echo $_addattr . $_target; ?> class="list-group-item<?php if ($_isActive) { ?> active<?php } ?> "> <?php echo $C['name']; ?> <?php if ($C['is_child']) { ?> <span class="branch"></span><?php } ?> </a> <?php if ($C['is_child'] && $w['limit'] > 1 && $_isActive) { ?> <ul class="nav"> <?php while ($C1 = db_fetch_array($CD1)) { ?> <li<?php if (in_array($C1['id'], $_CA)) { ?> class="active"<?php } ?> ><a href="<?php echo $w['link'] == 'bookmark' ? '#' . $_newTreeB . '-' . $C1['id'] : RW('c=' . $_newTree . '/' . $C1['id']); ?> "<?php if ($C1['addattr']) { ?> <?php echo $C1['addattr']; } if ($C1['target']) { ?> target="<?php echo $C1['target']; ?> "<?php } ?> ><?php echo $C1['name']; ?> </a></li> <?php } ?> </ul> <?php } ?> <?php } ?> <?php } ?> </div> <?php } }
</tr> <?php } ?> <?php } ?> <?php $where = "site = {$s}"; if (in_array($s, array(6, 7))) { $where = 'site in (6,7)'; } ?> <?php $resCate = getDbSelect($table[$m . 'data'], $where . " AND bbsid='resort'", "subject"); ?> <tr> <td class="td1">카테고리</td> <td class="td2"> <select name="category"> <option value=""> + 리조트 선택</option> <option value="칸쿤">칸쿤</option> <option value="미주허니문">미주허니문</option> <option value="하와이">하와이</option> <option value="발리">발리</option> <option value="코사무이">코사무이</option> <option value="몰디브">몰디브</option> <option value="세이셸">세이셸</option> <option value="모리셔스">모리셔스</option> <option value="기타">기타</option>
<?php // ******************* 메인배너 이미지/링크 ******************* // $rcd = getDbSelect($table['sliderdata'], "sitecode='newtrevia'", "*"); $seq_array = array(); for ($i = 0; $R = db_fetch_array($rcd); $i++) { if (empty($R['imgsrc']) || empty($R['url'])) { continue; } $bannerImageTemp[$R['seq']] = "/modules/slider/var/files/" . $R['imgsrc']; $bannerLinkTemp[$R['seq']] = $R['url']; //echo $bannerImageTemp[$i] . " - " . $bannerLinkTemp[$i]; array_push($seq_array, $R['seq']); /* echo "<pre>"; print_r($R); echo "</pre>"; //--*/ } for ($i = min($seq_array); $i <= max($seq_array); $i++) { do { $index = rand(min($seq_array), max($seq_array)); } while ($bannerImageTemp[$index] == "ok"); if ($bannerImageTemp[$index] != null) { $bannerImage[$i] = $bannerImageTemp[$index]; $bannerLink[$i] = $bannerLinkTemp[$index]; } $bannerImageTemp[$index] = "ok"; //echo " ( " . $i . " : " . $index . " ) " . $bannerImage[$i] . " - " . $bannerLink[$i]; } /*$bannerImage[0] = "/pages/image/main/newtrevia/main_slide_04.jpg";
</a> </div> <?php } ?> <div id="_action_layer_"></div> <div id="_action_layer_popup"></div> <iframe name="_action_frame_<?php echo $m; ?> " width="0" height="0" frameborder="0" scrolling="no"></iframe> <script type="text/javascript"> //<![CDATA[ <?php if ($m != 'admin' && $iframe != 'Y' && !$g['mobile']) { $POPUPS = getDbSelect($table['s_popup'], 'hidden=0', '*'); while ($POP = db_fetch_array($POPUPS)) { if (!$POP['term0'] && ($POP['term1'] > $date['totime'] || $POP['term2'] < $date['totime'])) { getDbUpdate($table['s_popup'], 'hidden=1', 'uid=' . $POP['uid']); continue; } $POP['xdispage'] = '_' . $POP['dispage']; if (strpos($POP['xdispage'], '[c[' . $_HS['uid'] . ']]')) { continue; } if (!strpos($POP['xdispage'], '[s[' . $_HS['uid'] . ']]') && !strpos($POP['xdispage'], '[m[' . $_HS['uid'] . ']' . $_HM['id'] . ']') && !strpos($POP['xdispage'], '[m[' . $_HS['uid'] . ']' . $_HP['id'] . ']')) { continue; } ?> //alert(getCookie('popview')); if (getCookie('popview').indexOf('[<?php
$_M2 = db_fetch_array($_MENUS2); ?> <li id="top-2-2"><a href="<?php echo RW('c=' . $_M1['id'] . '/' . $_M2['id']); ?> ">서브메뉴2</a></li> </ul></li> <?php $_M1 = db_fetch_array($_MENUS1); ?> <li id="top-menu3"><a href="<?php echo $_M1['redirect'] ? $_M1['joint'] : RW('c=' . $_M1['id']); ?> " id="top-menu-head3">메뉴3</a> <?php $_MENUS2 = getDbSelect($table['s_menu'], 'site=' . $s . ' and parent=' . $_M1['uid'] . ' and hidden=0 and depth=2 order by gid asc', '*'); ?> <ul id="top-sub-menu3"> <?php $_M2 = db_fetch_array($_MENUS2); ?> <li id="top-3-1"><a href="<?php echo RW('c=' . $_M1['id'] . '/' . $_M2['id']); ?> ">서브메뉴1</a></li> <?php $_M2 = db_fetch_array($_MENUS2); ?> <li id="top-3-2"><a href="<?php echo RW('c=' . $_M1['id'] . '/' . $_M2['id']); ?>
<input type="hidden" name="a" value="modifymenugid" /> <div class="savebtn"> <img src="<?php echo $g['img_core']; ?> /_public/btn_admin.gif" alt="" title="펼치기" onclick="orderOpen();" /> <input type="image" src="<?php echo $g['img_core']; ?> /_public/btn_save.gif" title="순서저장" /> </div> <div class="tt1">메뉴순서</div> <ul id="menuorder" class="dragul"> <?php $_MENUS = getDbSelect($table['s_menu'], 'site=' . $s . ' and parent=' . intval($CINFO['uid']) . ' and depth=' . ($CINFO['depth'] + 1) . ' order by gid asc', '*'); ?> <?php while ($_M = db_fetch_array($_MENUS)) { ?> <li> <input type="checkbox" name="menumembers[]" value="<?php echo $_M['uid']; ?> " checked="checked" /> <img src="<?php echo $g['img_core']; ?> /_public/ico_drag.gif" alt="" class="drag" /> <?php echo $_M['name'];
$fp = fopen('./_package/dump_page.dat', 'w'); $_PAGES = getDbSelect($table['s_page'], '', '*'); while ($R = db_fetch_array($_PAGES)) { //$_SEO = getDbData($table['s_seo'],'rel=2 and parent='.$R['uid'],'*'); fwrite($fp, $R['pagetype'] . "\t" . $R['ismain'] . "\t" . $R['mobile'] . "\t" . $R['id'] . "\t" . $R['category'] . "\t" . $R['name'] . "\t" . $R['layout'] . "\t" . $R['joint'] . "\t" . $R['sosokmenu'] . "\t\n"); $_xfile1 = $g['path_page'] . $R['id']; $_xfile2 = './_package/rb/pages/' . $R['id']; @copy($_xfile1 . '.php', $_xfile2 . '.php'); @copy($_xfile1 . '.widget.php', $_xfile2 . '.widget.php'); @copy($_xfile1 . '.mobile.php', $_xfile2 . '.mobile.php'); @copy($_xfile1 . '.css', $_xfile2 . '.css'); @copy($_xfile1 . '.js', $_xfile2 . '.js'); } fclose($fp); $fp = fopen('./_package/dump_bbs.dat', 'w'); $_BBS = getDbSelect($table['bbslist'], 'uid order by gid asc', '*'); while ($R = db_fetch_array($_BBS)) { fwrite($fp, $R['id'] . "\t" . $R['name'] . "\t" . $R['category'] . "\t" . $R['imghead'] . "\t" . $R['imgfoot'] . "\t" . $R['puthead'] . "\t" . $R['putfoot'] . "\t\n"); $_xfile1 = $g['path_module'] . 'bbs/var/var.' . $R['id']; $_xfile2 = './_package/rb/modules/bbs/var/var.' . $R['id']; @copy($_xfile1 . '.php', $_xfile2 . '.php'); } fclose($fp); $fp = fopen('./_package/readme.txt', 'w'); fwrite($fp, "패키지 안내문\n------------------\n"); fwrite($fp, "여기(/_package/readme.txt)에 이 패키지의 설명글을 작성해 주세요.\n"); fwrite($fp, "이 패키지는 샘플이므로 실제 적용가능한 패키지를 구성하려면 매뉴얼을 참조하세요.\n"); fwrite($fp, "이 샘플패키지는 '적용취소' 버튼을 클릭하면 삭제할 수 있습니다.\n"); fclose($fp); $fp = fopen('./_package/package.rule.php', 'w'); fwrite($fp, "<?php\n");
<?php if (!defined('__KIMS__')) { exit; } checkAdmin(0); $R = getUidData($table['s_site'], $account); if ($R['uid']) { getDbDelete($table['s_start'], 'site=' . $R['uid']); getDbDelete($table['s_site'], 'uid=' . $R['uid']); $_MENUS = getDbSelect($table['s_menu'], 'site=' . $R['uid'] . ' order by gid asc', '*'); while ($_M = db_fetch_array($_MENUS)) { $_xfile = $g['path_page'] . 'menu/' . sprintf('%05d', $_M['uid']); unlink($_xfile . '.php'); unlink($_xfile . '.widget.php'); @unlink($_xfile . '.mobile.php'); @unlink($_xfile . '.css'); @unlink($_xfile . '.js'); @unlink($_xfile . '.header.php'); @unlink($_xfile . '.footer.php'); @unlink($_xfile . '.txt'); @unlink($_xfile . '.cache'); @unlink($_xfile . '.widget.cache'); @unlink($_xfile . '.mobile.cache'); @unlink($g['path_var'] . 'menu/' . $_M['imghead']); @unlink($g['path_var'] . 'menu/' . $_M['imgfoot']); getDbDelete($table['s_seo'], 'rel=1 and parent=' . $_M['uid']); } getDbDelete($table['s_menu'], 'site=' . $R['uid']); db_query("OPTIMIZE TABLE " . $table['s_site'], $DB_CONNECT); db_query("OPTIMIZE TABLE " . $table['s_menu'], $DB_CONNECT);
<?php if (!defined('__KIMS__')) { exit; } checkAdmin(0); if (!$cat) { getLink('./?m=admin&module=' . $m . '&front=menu', 'parent.', '', ''); } include_once $g['path_core'] . 'function/menu.func.php'; $subQue = getMenuCodeToSql($table['s_menu'], $cat, 'uid'); if ($subQue) { $DAT = getDbSelect($table['s_menu'], $subQue, '*'); while ($R = db_fetch_array($DAT)) { getDbDelete($table['s_menu'], 'uid=' . $R['uid']); getDbDelete($table['s_seo'], 'rel=1 and parent=' . $R['uid']); $_xfile = $g['path_page'] . 'menu/' . sprintf('%05d', $R['uid']); unlink($_xfile . '.php'); unlink($_xfile . '.widget.php'); @unlink($_xfile . '.mobile.php'); @unlink($_xfile . '.css'); @unlink($_xfile . '.js'); @unlink($_xfile . '.header.php'); @unlink($_xfile . '.footer.php'); @unlink($_xfile . '.txt'); @unlink($_xfile . '.cache'); @unlink($_xfile . '.widget.cache'); @unlink($_xfile . '.mobile.cache'); @unlink($g['path_var'] . 'menu/' . $R['imghead']); @unlink($g['path_var'] . 'menu/' . $R['imgfoot']); }
function getDbData($table, $where, $data) { $row = db_fetch_array(getDbSelect($table, getSqlFilter($where), $data)); return $row; }
function getTreeMenu($conf, $code, $depth, $parent, $tmpcode) { $ctype = $conf['ctype'] ? $conf['ctype'] : 'uid'; $id = 'tree_' . filterstr(microtime()); $tree = '<div class="rb-tree"><ul id="' . $id . '">'; $CD = getDbSelect($conf['table'], ($conf['site'] ? 'site=' . $conf['site'] . ' and ' : '') . 'depth=' . ($depth + 1) . ' and parent=' . $parent . ($conf['dispHidden'] ? ' and hidden=0' : '') . ($conf['mobile'] ? ' and mobile=1' : '') . ' order by gid asc', '*'); $_i = 0; while ($C = db_fetch_array($CD)) { $rcode = $tmpcode ? $tmpcode . '/' . $C[$ctype] : $C[$ctype]; $t_arr = explode('/', $code); $t1_arr = explode('/', $rcode); $topen = in_array($t1_arr[count($t1_arr) - 1], $t_arr) ? true : false; $tree .= '<li>'; if ($C['is_child']) { $tree .= '<a data-toggle="collapse" href="#' . $id . '-' . $_i . '-' . $C['uid'] . '" class="rb-branch' . ($conf['allOpen'] || $topen ? '' : ' collapsed') . '"></a>'; if ($conf['userMenu'] == 'link') { $tree .= '<a href="' . RW('c=' . $rcode) . '"><span' . ($code == $rcode ? ' class="rb-active"' : '') . '>'; } else { if ($conf['userMenu'] == 'bookmark') { $tree .= '<a data-scroll href="#rb-tree-menu-' . $C['id'] . '"><span' . ($code == $rcode ? ' class="rb-active"' : '') . '>'; } else { $tree .= '<a href="' . $conf['link'] . $C['uid'] . '&code=' . $rcode . ($conf['bookmark'] ? '#' . $conf['bookmark'] : '') . '"><span' . ($code == $rcode ? ' class="rb-active"' : '') . '>'; } } if ($conf['dispCheckbox']) { $tree .= '<input type="checkbox" name="tree_members[]" value="' . $C['uid'] . '">'; } if ($C['hidden']) { $tree .= '<u title="' . _LANG('fs002', 'admin') . '" data-tooltip="tooltip">'; } $tree .= $C['name']; if ($C['hidden']) { $tree .= '</span>'; } $tree .= '</u></a>'; if ($conf['dispNum'] && $C['num']) { $tree .= ' <small>(' . $C['num'] . ')</small>'; } if (!$conf['hideIcon']) { //if($C['mobile']) $tree.= '<i class="glyphicon glyphicon-phone" title="'._LANG('fs005','admin').'" data-tooltip="tooltip"></i> '; if ($C['target']) { $tree .= '<i class="glyphicon glyphicon-new-window" title="' . _LANG('fs004', 'admin') . '" data-tooltip="tooltip"></i> '; } if ($C['reject']) { $tree .= '<i class="glyphicon glyphicon-ban-circle" title="' . _LANG('fs003', 'admin') . '" data-tooltip="tooltip"></i>'; } } $tree .= '<ul id="' . $id . '-' . $_i . '-' . $C['uid'] . '" class="collapse' . ($conf['allOpen'] || $topen ? ' in' : '') . '">'; $tree .= getTreeMenu($conf, $code, $C['depth'], $C['uid'], $rcode); $tree .= '</ul>'; } else { $tree .= '<a href="#." class="rb-leaf"></a>'; if ($conf['userMenu'] == 'link') { $tree .= '<a href="' . RW('c=' . $rcode) . '"><span' . ($code == $rcode ? ' class="rb-active"' : '') . '>'; } else { if ($conf['userMenu'] == 'bookmark') { $tree .= '<a data-scroll href="#rb-tree-menu' . $C['id'] . '"><span' . ($code == $rcode ? ' class="rb-active"' : '') . '>'; } else { $tree .= '<a href="' . $conf['link'] . $C['uid'] . '&code=' . $rcode . ($conf['bookmark'] ? '#' . $conf['bookmark'] : '') . '"><span' . ($code == $rcode ? ' class="rb-active"' : '') . '>'; } } if ($conf['dispCheckbox']) { $tree .= '<input type="checkbox" name="tree_members[]" value="' . $C['uid'] . '">'; } if ($C['hidden']) { $tree .= '<u title="' . _LANG('fs002', 'admin') . '" data-tooltip="tooltip">'; } $tree .= $C['name']; if ($C['hidden']) { $tree .= '</u>'; } $tree .= '</span></a>'; if ($conf['dispNum'] && $C['num']) { $tree .= ' <small>(' . $C['num'] . ')</small>'; } if (!$conf['hideIcon']) { //if($C['mobile']) $tree.= '<i class="glyphicon glyphicon-phone" title="'._LANG('fs005','admin').'" data-tooltip="tooltip"></i> '; if ($C['target']) { $tree .= '<i class="glyphicon glyphicon-new-window" title="' . _LANG('fs004', 'admin') . '" data-tooltip="tooltip"></i> '; } if ($C['reject']) { $tree .= '<i class="glyphicon glyphicon-ban-circle" title="' . _LANG('fs003', 'admin') . '" data-tooltip="tooltip"></i>'; } } } $tree .= '</li>'; $_i++; } $tree .= '</ul></div>'; return $tree; }
} ftp_close($FTP_CONNECT); } else { //unlink($g['path_file'].$U['folder'].'/'.$U['tmpname']); //if($U['type']==2) unlink($g['path_file'].$U['folder'].'/'.$U['thumbname']); unlink('./modules/bbs/upload/' . $U['folder'] . '/' . $U['tmpname']); if ($U['type'] == 2) { unlink('./modules/bbs/upload/' . $U['folder'] . '/' . $U['thumbname']); } } } } } //한줄의견삭제 if ($R['oneline']) { $_ONELINE = getDbSelect($table['s_oneline'], 'parent=' . $R['uid'], '*'); while ($_O = db_fetch_array($_ONELINE)) { getDbUpdate($table['s_numinfo'], 'oneline=oneline-1', "date='" . substr($_O['d_regis'], 0, 8) . "' and site=" . $_O['site']); if ($_O['point'] && $_O['mbruid']) { getDbInsert($table['s_point'], 'my_mbruid,by_mbruid,price,content,d_regis', "'" . $_O['mbruid'] . "','0','-" . $_O['point'] . "','한줄의견삭제(" . getStrCut(str_replace('&', ' ', strip_tags($_O['content'])), 15, '') . ")환원','" . $date['totime'] . "'"); getDbUpdate($table['s_mbrdata'], 'point=point-' . $_O['point'], 'memberuid=' . $_O['mbruid']); } } getDbDelete($table['s_oneline'], 'parent=' . $R['uid']); } getDbDelete($table['s_comment'], 'uid=' . $R['uid']); getDbUpdate($table['s_numinfo'], 'comment=comment-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($R['subject'], 15, '') . ")환원','" . $date['totime'] . "'"); getDbUpdate($table['s_mbrdata'], 'point=point-' . $R['point'], 'memberuid=' . $R['mbruid']); }
function getMenuPackage($site, $table, $j, $parent, $depth, $uid) { global $g; static $j, $string; $xdepth = $depth + 1; $CD = getDbSelect($table, ($site ? 'site=' . $site . ' and ' : '') . 'depth=' . $xdepth . ' and parent=' . $parent . ' order by gid asc', '*'); while ($C = db_fetch_array($CD)) { $_parent = $C['parent'] ? getDbData($table, ($site ? 'site=' . $site . ' and ' : '') . 'uid=' . $C['parent'], 'id') : array(); $j++; for ($i = 0; $i < $depth; $i++) { $string .= "\t"; } $string .= "\tarray('name'=>'" . $C['name'] . "','id'=>'" . $C['id'] . "','menutype'=>'" . $C['menutype'] . "','mobile'=>'" . $C['mobile'] . "','target'=>'" . $C['target'] . "','redirect'=>'" . $C['redirect'] . "','joint'=>'" . $C['joint'] . "','layout'=>'" . $C['layout'] . "','imghead'=>'" . $C['imghead'] . "','imgfoot'=>'" . $C['imgfoot'] . "','addattr'=>'" . $C['addattr'] . "','depth'=>'" . $C['depth'] . "','parent'=>'" . $_parent['id'] . "','is_child'=>'" . $C['is_child'] . "','gid'=>'" . $C['gid'] . "',),\r\n"; if ($C['is_child']) { getMenuPackage($site, $table, $j, $C['uid'], $C['depth'], $uid); } } return $string; }