This commit is contained in:
shim
2023-04-17 11:06:08 +09:00
parent d0b393aa97
commit 76264e09ad
4686 changed files with 552713 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
<?php
if(!defined('__KIMS__')) exit;
checkAdmin(0);
if (!$cat) getLink($g['r'].'/?m=admin&module='.$m,'parent.','','');
include_once $g['path_core'].'function/menu.func.php';
$subQue = getMenuCodeToSql($table['s_domain'],$cat,'uid');
if ($subQue)
{
$DAT = db_query('select * from '.$table['s_domain'].' where '.$subQue,$DB_CONNECT);
while($R=db_fetch_array($DAT))
{
db_query('delete from '.$table['s_domain'].' where uid='.$R['uid'],$DB_CONNECT);
}
if ($parent)
{
if (!getDbRows($table['s_domain'],'parent='.$parent))
{
db_query('update '.$table['s_domain'].' set is_child=0 where uid='.$parent,$DB_CONNECT);
}
}
}
getLink($g['s'].'/?r='.$r.'&m=admin&module='.$m.'&cat='.$parent.'&code='.$code,'parent.','','');
?>

View File

@@ -0,0 +1,10 @@
<?php
if(!defined('__KIMS__')) exit;
checkAdmin(0);
$i = 0;
foreach($menumembers as $val) getDbUpdate($table['s_domain'],'gid='.($i++),'uid='.$val);
getLink('reload','parent.','','');
?>

View File

@@ -0,0 +1,52 @@
<?php
if(!defined('__KIMS__')) exit;
checkAdmin(0);
$name = trim($name);
$name = str_replace('http://','',$name);
$name = str_replace('/','',$name);
if ($vtype == 'sub')
{
$name = $name.$_fdomain;
}
if ($cat && !$vtype)
{
$R = getDbData($table['s_domain'],"uid<>".$cat." and name='".$name."'",'*');
if ($R['uid'])
{
getLink('','',_q('This is a domain already has registered.','a1001','domain'),'');
}
getDbUpdate($table['s_domain'],"name='$name',site='$site'",'uid='.$cat);
getLink('reload','parent.','','');
}
else {
$R = getDbData($table['s_domain'],"name='".$name."'",'*');
if ($R['uid'])
{
getLink('','','이미 등록된 도메인입니다.','');
}
$MAXC = getDbCnt($table['s_domain'],'max(gid)','depth='.($depth+1).' and parent='.$parent);
$gid = $MAXC+1;
$xdepth = $depth+1;
getDbInsert($table['s_domain'],"gid,is_child,parent,depth,name,site","'$gid','0','$parent','$xdepth','$name','$site'");
if ($parent)
{
getDbUpdate($table['s_domain'],'is_child=1','uid='.$parent);
}
db_query("OPTIMIZE TABLE ".$table['s_domain'],$DB_CONNECT);
getLink($g['s'].'/?r='.$r.'&m=admin&module='.$m.($parent?'&cat='.$parent:'').($code?'&code='.$code:''),'parent.','','');
}
?>