open($saveFile) === TRUE) { $zip->extractTo($extPath1); $zip->close(); } else { echo 'failed'; } unlink($saveFile); mkdir($plfldPath,0707); @chmod($plfldPath,0707); DirCopy($extPath1,$tgFolder); DirDelete($extPath); mkdir($extPath,0707); @chmod($extPath,0707); } else { getLink('','','모듈 파일을 선택해 주세요.',''); } $module = $plFolder; $_tmptable2 = $table; $table = array(); $table_db = $g['path_module'].$module.'/_setting/db.table.php'; $table_sc = $g['path_module'].$module.'/_setting/db.schema.php'; if(is_file($table_db)) { $_tmptable1 = array(); $_tmptfile = $g['path_var'].'table.info.php'; include $table_db; include $table_sc; $_tmptable1 = $table; rename($table_db,$table_db.'.done'); $fp = fopen($_tmptfile,'w'); fwrite($fp, " $val) fwrite($fp, "\$table['$key'] = \"$val\";\n"); foreach($_tmptable1 as $key => $val) fwrite($fp, "\$table['$key'] = \"$val\";\n"); fwrite($fp, "?>"); fclose($fp); @chmod($_tmptfile,0707); } else { if(is_file($table_db.'.done')) include $table_db.'.done'; } $maxgid = getDbCnt($_tmptable2['s_module'],'max(gid)',''); $QKEY = "gid,sys,hidden,mobile,name,id,tblnum,icon,d_regis"; $QVAL = "'".($maxgid+1)."','0','0','1','".getFolderName($g['path_module'].$module)."','$module','".count($table)."','kf-module','".$date['totime']."'"; getDbInsert($_tmptable2['s_module'],$QKEY,$QVAL); ?>