Example #1
0
function getMenuCodeToPath($table, $cat, $j)
{
    global $DB_CONNECT;
    static $arr;
    $R = getUidData($table, $cat);
    if ($R['parent']) {
        $arr[$j]['uid'] = $R['uid'];
        $arr[$j]['id'] = $R['id'];
        $arr[$j]['name'] = $R['name'];
        getMenuCodeToPath($table, $R['parent'], $j + 1);
    } else {
        $C = getUidData($table, $cat);
        $arr[$j]['uid'] = $C['uid'];
        $arr[$j]['id'] = $C['id'];
        $arr[$j]['name'] = $C['name'];
    }
    sort($arr);
    reset($arr);
    return $arr;
}
Example #2
0




<?php 
if ($type == 'menu') {
    ?>

<?php 
    include_once $g['path_core'] . 'function/menu.func.php';
    $ISCAT = getDbRows($table['s_menu'], 'site=' . $s);
    $catcode = '';
    if ($cat) {
        $CINFO = getUidData($table['s_menu'], $cat);
        $ctarr = getMenuCodeToPath($table['s_menu'], $cat, 0);
        $ctnum = count($ctarr);
        for ($i = 0; $i < $ctnum; $i++) {
            $CXA[] = $ctarr[$i]['uid'];
        }
    }
    $is_fcategory = $CINFO['uid'] && $vtype != 'sub';
    $is_regismode = !$CINFO['uid'] || $vtype == 'sub';
    if ($is_regismode) {
        $CINFO['menutype'] = '';
        $CINFO['name'] = '';
        $CINFO['joint'] = '';
        $CINFO['redirect'] = '';
        $CINFO['hidden'] = '';
        $CINFO['target'] = '';
        $CINFO['imghead'] = '';
Example #3
0
 $sarr = explode(',', trim($name));
 $slen = count($sarr);
 for ($i = 0; $i < $slen; $i++) {
     if (!$sarr[$i]) {
         continue;
     }
     $gid = $MAXC + 1 + $i;
     $xdepth = $depth + 1;
     $xname = trim($sarr[$i]);
     $xnarr = explode('=', $xname);
     $QKEY = "gid,site,isson,parent,depth,id,menutype,mobile,hidden,reject,name,target,redirect,joint,perm_g,perm_l,layout,imghead,imgfoot,puthead,putfoot,num,d_last,addinfo";
     $QVAL = "'{$gid}','{$account}','0','{$parent}','{$xdepth}','{$xnarr['1']}','{$menutype}','{$mobile}','{$hidden}','{$reject}','{$xnarr['0']}','{$target}','{$redirect}','{$joint}','{$perm_g}','{$perm_l}','{$layout}','','','','','0','',''";
     getDbInsert($table['s_menu'], $QKEY, $QVAL);
     $lastmenu = getDbCnt($table['s_menu'], 'max(uid)', '');
     if (!$redirect && $menutype == 1 && strstr($joint, 'cync=Y')) {
         $ctarr = getMenuCodeToPath($table['s_menu'], $lastmenu, 0);
         $catcode = '';
         $ctnum = count($ctarr);
         for ($j = 0; $j < $ctnum; $j++) {
             $catcode .= $ctarr[$j]['id'] . '/';
         }
         $c = substr($catcode, 0, strlen($catcode) - 1);
         $joint = str_replace('cync=Y', 'cync=[' . $m . '][c' . $lastmenu . '][,,,][][][c:' . $c . ']', $joint);
     }
     if (!$xnarr[1]) {
         getDbUpdate($table['s_menu'], "id='" . $lastmenu . "',joint='" . $joint . "'", 'uid=' . $lastmenu);
     } else {
         $ISMCODE = getDbData($table['s_menu'], "uid<> " . $lastmenu . " and id='" . $xnarr[1] . "' and site=" . $s, '*');
         if ($ISMCODE['uid']) {
             getDbUpdate($table['s_menu'], "id='" . $lastmenu . "',joint='" . $joint . "'", 'uid=' . $lastmenu);
         }
Example #4
0
<?php

include_once $g['path_core'] . 'function/menu.func.php';
$ISCAT = getDbRows($table['s_domain'], '');
if ($cat) {
    $CINFO = getUidData($table['s_domain'], $cat);
    $ctarr = getMenuCodeToPath($table['s_domain'], $cat, 0);
    $ctnum = count($ctarr);
    for ($i = 0; $i < $ctnum; $i++) {
        $CXA[] = $ctarr[$i]['uid'];
    }
}
$is_fcategory = $CINFO['uid'] && $vtype != 'sub';
$is_regismode = !$CINFO['uid'] || $vtype == 'sub';
if ($is_regismode) {
    $CINFO['name'] = '';
    $CINFO['site'] = '';
}
?>


<div id="catebody">
	<div id="category">
		<div class="title">
			연결도메인
		</div>
		<?php 
if ($ISCAT) {
    ?>
		<div class="joinimg"></div>
		<div class="tree<?php 
Example #5
0
<?php

if ($_mtype == 'page') {
    $_HP = getUidData($table['s_page'], $uid);
    $_filekind = $r . '-pages/' . $_HP['id'];
    $_filetype = _LANG('a4001', 'site');
    $_filesbj = $_HP['name'];
}
if ($_mtype == 'menu') {
    $_HM = getUidData($table['s_menu'], $uid);
    $_filekind = $r . '-menus/' . $_HM['id'];
    $_filetype = _LANG('a4002', 'site');
    $_filesbj = $_HM['name'];
    include $g['path_core'] . 'function/menu.func.php';
    $ctarr = getMenuCodeToPath($table['s_menu'], $_HM['uid'], 0);
    $ctnum = count($ctarr);
    $_HM['code'] = '';
    for ($i = 0; $i < $ctnum; $i++) {
        $_HM['code'] .= $ctarr[$i]['id'] . ($i < $ctnum - 1 ? '/' : '');
    }
}
if ($type == 'source') {
    $_editArray = array('source' => array('', 'HTML (Basic)', '.php'), 'mobile' => array('mobile', 'HTML (Mobile Only)', '.mobile.php'), 'css' => array('css', 'CSS', '.css'), 'js' => array('js', 'Javascript', '.js'));
    ?>
<!-- 직접 꾸미기 -->
<div id="rb-page-source">

	<div class="page-header">
		<h4>
			<?php 
    echo $_filetype;