sideview.js 를 head.sub.php 에 포함
This commit is contained in:
@ -69,9 +69,6 @@ function textarea_size(fld, size)
|
||||
}
|
||||
</script>
|
||||
|
||||
<script src="<?=G4_URL?>/js/common.js"></script>
|
||||
<script src="<?=G4_URL?>/js/sideview.js"></script>
|
||||
|
||||
<header>
|
||||
|
||||
<div id="to_content"><a href="#wrapper">본문 바로가기</a></div>
|
||||
|
||||
@ -55,7 +55,6 @@ include_once('./admin.head.php');
|
||||
$colspan = 5;
|
||||
?>
|
||||
|
||||
<script src="<?=$g4['path']?>/js/sideview.js"></script>
|
||||
<script>
|
||||
var list_update_php = '';
|
||||
var list_delete_php = 'auth_list_delete.php';
|
||||
|
||||
@ -55,8 +55,6 @@ include_once('./admin.head.php');
|
||||
$colspan = 7;
|
||||
?>
|
||||
|
||||
<script src="<?=$g4['path']?>/js/sideview.js"></script>
|
||||
|
||||
<form id="fsearch" name="fsearch" method="get">
|
||||
<input type="hidden" name="gr_id" value="<?=$gr_id?>">
|
||||
<fieldset>
|
||||
|
||||
@ -69,8 +69,6 @@ $result = sql_query($sql);
|
||||
$colspan = 15;
|
||||
?>
|
||||
|
||||
<script src="<?=$g4['path']?>/js/sideview.js"></script>
|
||||
|
||||
<form id="fsearch" name="fsearch" method="get">
|
||||
<fieldset>
|
||||
<legend>회원검색</legend>
|
||||
|
||||
@ -61,7 +61,6 @@ include_once ('./admin.head.php');
|
||||
$colspan = 8;
|
||||
?>
|
||||
|
||||
<script src="<?=$g4['path']?>/js/sideview.js"></script>
|
||||
<script>
|
||||
var list_update_php = '';
|
||||
var list_delete_php = 'point_list_delete.php';
|
||||
|
||||
@ -180,8 +180,6 @@ if ($member['mb_id'] && ($is_admin == 'super' || $group['gr_admin'] == $member['
|
||||
|
||||
include_once('./board_head.php');
|
||||
|
||||
echo '<script src="'.G4_JS_URL.'/sideview.js"></script>';
|
||||
|
||||
// 게시물 아이디가 있다면 게시물 보기를 INCLUDE
|
||||
if (isset($wr_id) && $wr_id) {
|
||||
include_once('./view.php');
|
||||
|
||||
@ -26,8 +26,6 @@ for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
$list[$i]['num'] = sprintf('%03d',$i+1);
|
||||
}
|
||||
|
||||
echo '<script src="'.G4_PATH.'/js/sideview.js"></script>';
|
||||
|
||||
include_once($connect_skin_path.'/current_connect.skin.php');
|
||||
|
||||
include_once('./_tail.php');
|
||||
|
||||
@ -74,8 +74,6 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
$list[$i]['del_href'] = './memo_delete.php?me_id='.$row['me_id'].'&kind='.$kind;
|
||||
}
|
||||
|
||||
echo '<script src="'.G4_PATH.'/js/sideview.js"></script>';
|
||||
|
||||
include_once($member_skin_path.'/memo.skin.php');
|
||||
|
||||
include_once(G4_PATH.'/tail.sub.php');
|
||||
|
||||
@ -63,8 +63,6 @@ else
|
||||
|
||||
$mb = get_member($memo['me_'.$unkind.'_mb_id']);
|
||||
|
||||
echo '<script src="'.G4_PATH.'/js/sideview.js"></script>';
|
||||
|
||||
$member_skin_path = G4_PATH.'/skin/member/'.$config['cf_member_skin'];
|
||||
|
||||
include_once($member_skin_path.'/memo_view.skin.php');
|
||||
|
||||
@ -105,8 +105,6 @@ for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
|
||||
$write_pages = get_paging($config['cf_write_pages'], $page, $total_page, "?gr_id=$gr_id&view=$view&mb_id=$mb_id&page=");
|
||||
|
||||
echo '<script src="'.G4_PATH.'/js/sideview.js"></script>'.PHP_EOL;
|
||||
|
||||
include_once($new_skin_path.'/new.skin.php');
|
||||
|
||||
include_once('./_tail.php');
|
||||
|
||||
@ -86,8 +86,6 @@ for ($i=0; $row2=sql_fetch_array($result); $i++) {
|
||||
|
||||
include_once(G4_PATH.'/head.sub.php');
|
||||
|
||||
echo '<script src="'.G4_PATH.'/js/sideview.js"></script>';
|
||||
|
||||
if (!file_exists($poll_skin_path.'/poll_result.skin.php')) die('skin error');
|
||||
include_once ($poll_skin_path.'/poll_result.skin.php');
|
||||
|
||||
|
||||
@ -27,8 +27,6 @@ $mb_reg_after = $row['days'];
|
||||
$mb_homepage = set_http($mb['mb_homepage']);
|
||||
$mb_profile = $mb['mb_profile'] ? conv_content($mb['mb_profile'],0) : '소개 내용이 없습니다.';
|
||||
|
||||
echo '<script src="'.G4_PATH.'/js/sideview.js"></script>';
|
||||
|
||||
include_once($member_skin_path.'/profile.skin.php');
|
||||
|
||||
include_once(G4_PATH.'/tail.sub.php');
|
||||
|
||||
@ -211,8 +211,6 @@ if ($stx) {
|
||||
}
|
||||
|
||||
$write_pages = get_paging($config['cf_write_pages'], $page, $total_page, $_SERVER['PHP_SELF'].'?'.$search_query.'&gr_id='.$gr_id.'&srows='.$srows.'&onetable='.$onetable.'&page=');
|
||||
|
||||
echo '<script src="'.G4_PATH.'/js/sideview.js"></script>';
|
||||
}
|
||||
|
||||
$group_select = '<select id="gr_id" name="gr_id" class="select" title="그룹선택"><option value="">전체 분류';
|
||||
|
||||
@ -65,6 +65,7 @@ if ($is_admin) {
|
||||
<script src="<?=G4_JS_URL?>/jquery-1.8.3.min.js"></script>
|
||||
<script src="<?=G4_JS_URL?>/common.js"></script>
|
||||
<script src="<?=G4_JS_URL?>/wrest.js"></script>
|
||||
<script src="<?=G4_JS_URL?>/sideview.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<a id="g4_head"></a>
|
||||
142
js/sideview.js
142
js/sideview.js
@ -1,30 +1,23 @@
|
||||
if (typeof(SIDEVIEW_JS) == 'undefined') // 한번만 실행
|
||||
// 아래의 소스코드는 daum.net 카페의 자바스크립트를 참고하였습니다.
|
||||
// 회원이름 클릭시 회원정보등을 보여주는 레이어
|
||||
function insertHead(name, text, evt)
|
||||
{
|
||||
if (typeof g4_is_member == 'undefined')
|
||||
alert('g4_is_member 변수가 선언되지 않았습니다. js/sideview.js');
|
||||
|
||||
var SIDEVIEW_JS = true;
|
||||
|
||||
// 아래의 소스코드는 daum.net 카페의 자바스크립트를 참고하였습니다.
|
||||
// 회원이름 클릭시 회원정보등을 보여주는 레이어
|
||||
function insertHead(name, text, evt)
|
||||
{
|
||||
var idx = this.heads.length;
|
||||
var row = new SideViewRow(-idx, name, text, evt);
|
||||
this.heads[idx] = row;
|
||||
return row;
|
||||
}
|
||||
}
|
||||
|
||||
function insertTail(name, evt)
|
||||
{
|
||||
function insertTail(name, evt)
|
||||
{
|
||||
var idx = this.tails.length;
|
||||
var row = new SideViewRow(idx, name, evt);
|
||||
this.tails[idx] = row;
|
||||
return row;
|
||||
}
|
||||
}
|
||||
|
||||
function SideViewRow(idx, name, onclickEvent)
|
||||
{
|
||||
function SideViewRow(idx, name, onclickEvent)
|
||||
{
|
||||
this.idx = idx;
|
||||
this.name = name;
|
||||
this.onclickEvent = onclickEvent;
|
||||
@ -32,25 +25,25 @@ if (typeof(SIDEVIEW_JS) == 'undefined') // 한번만 실행
|
||||
|
||||
this.isVisible = true;
|
||||
this.isDim = false;
|
||||
}
|
||||
}
|
||||
|
||||
function renderRow()
|
||||
{
|
||||
function renderRow()
|
||||
{
|
||||
if (!this.isVisible)
|
||||
return "";
|
||||
|
||||
var str = "<li><span id=\"sideViewRow_"+this.name+"\">"+this.onclickEvent+"</span></li>";
|
||||
return str;
|
||||
}
|
||||
}
|
||||
|
||||
function showSideView(curObj, mb_id, name, email, homepage)
|
||||
{
|
||||
function showSideView(curObj, mb_id, name, email, homepage)
|
||||
{
|
||||
var sideView = new SideView('sideview', curObj, mb_id, name, email, homepage);
|
||||
sideView.showLayer();
|
||||
}
|
||||
}
|
||||
|
||||
function SideView(targetObj, curObj, mb_id, name, email, homepage)
|
||||
{
|
||||
function SideView(targetObj, curObj, mb_id, name, email, homepage)
|
||||
{
|
||||
this.targetObj = targetObj;
|
||||
this.curObj = curObj;
|
||||
this.mb_id = mb_id;
|
||||
@ -104,10 +97,10 @@ if (typeof(SIDEVIEW_JS) == 'undefined') // 한번만 실행
|
||||
if (mb_id)
|
||||
this.insertTail("point", "<a href='"+g4_admin_url+"/point_list.php?sfl=mb_id&stx="+mb_id+"' target='_blank'>포인트내역</a>");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function showLayer()
|
||||
{
|
||||
function showLayer()
|
||||
{
|
||||
clickAreaCheck = true;
|
||||
var oSideViewLayer = document.getElementById(this.targetObj);
|
||||
var oBody = document.body;
|
||||
@ -138,12 +131,12 @@ if (typeof(SIDEVIEW_JS) == 'undefined') // 한번만 실행
|
||||
divDisplay(this.targetObj, 'block');
|
||||
|
||||
selectBoxHidden(this.targetObj);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
|
||||
function getAbsoluteTop(oNode)
|
||||
{
|
||||
function getAbsoluteTop(oNode)
|
||||
{
|
||||
var oCurrentNode=oNode;
|
||||
var iTop=0;
|
||||
while(oCurrentNode.tagName!="body") {
|
||||
@ -151,10 +144,10 @@ if (typeof(SIDEVIEW_JS) == 'undefined') // 한번만 실행
|
||||
oCurrentNode=oCurrentNode.offsetParent;
|
||||
}
|
||||
return iTop;
|
||||
}
|
||||
}
|
||||
|
||||
function getAbsoluteLeft(oNode)
|
||||
{
|
||||
function getAbsoluteLeft(oNode)
|
||||
{
|
||||
var oCurrentNode=oNode;
|
||||
var iLeft=0;
|
||||
iLeft+=oCurrentNode.offsetWidth;
|
||||
@ -163,13 +156,13 @@ if (typeof(SIDEVIEW_JS) == 'undefined') // 한번만 실행
|
||||
oCurrentNode=oCurrentNode.offsetParent;
|
||||
}
|
||||
return iLeft;
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
*/
|
||||
|
||||
|
||||
function makeNameContextMenus()
|
||||
{
|
||||
function makeNameContextMenus()
|
||||
{
|
||||
var str = "<ul>";
|
||||
|
||||
var i=0;
|
||||
@ -182,10 +175,10 @@ if (typeof(SIDEVIEW_JS) == 'undefined') // 한번만 실행
|
||||
|
||||
str += "</ul>";
|
||||
return str;
|
||||
}
|
||||
}
|
||||
|
||||
function getRow(name)
|
||||
{
|
||||
function getRow(name)
|
||||
{
|
||||
var i = 0;
|
||||
var row = null;
|
||||
for (i=0; i<this.heads.length; ++i)
|
||||
@ -200,26 +193,26 @@ if (typeof(SIDEVIEW_JS) == 'undefined') // 한번만 실행
|
||||
if (row.name == name) return row;
|
||||
}
|
||||
return row;
|
||||
}
|
||||
}
|
||||
|
||||
function hideRow(name)
|
||||
{
|
||||
function hideRow(name)
|
||||
{
|
||||
var row = this.getRow(name);
|
||||
if (row != null)
|
||||
row.isVisible = false;
|
||||
}
|
||||
}
|
||||
|
||||
function dimRow(name)
|
||||
{
|
||||
function dimRow(name)
|
||||
{
|
||||
var row = this.getRow(name);
|
||||
if (row != null)
|
||||
row.isDim = true;
|
||||
}
|
||||
// Internet Explorer에서 셀렉트박스와 레이어가 겹칠시 레이어가 셀렉트 박스 뒤로 숨는 현상을 해결하는 함수
|
||||
// 레이어가 셀렉트 박스를 침범하면 셀렉트 박스를 hidden 시킴
|
||||
// <div id=LayerID style="display:none; position:absolute;" onpropertychange="selectBoxHidden('LayerID')">
|
||||
function selectBoxHidden(layer_id)
|
||||
{
|
||||
}
|
||||
// Internet Explorer에서 셀렉트박스와 레이어가 겹칠시 레이어가 셀렉트 박스 뒤로 숨는 현상을 해결하는 함수
|
||||
// 레이어가 셀렉트 박스를 침범하면 셀렉트 박스를 hidden 시킴
|
||||
// <div id=LayerID style="display:none; position:absolute;" onpropertychange="selectBoxHidden('LayerID')">
|
||||
function selectBoxHidden(layer_id)
|
||||
{
|
||||
//var ly = eval(layer_id);
|
||||
var ly = document.getElementById(layer_id);
|
||||
|
||||
@ -261,11 +254,11 @@ if (typeof(SIDEVIEW_JS) == 'undefined') // 한번만 실행
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 감추어진 셀렉트 박스를 모두 보이게 함
|
||||
function selectBoxVisible()
|
||||
{
|
||||
// 감추어진 셀렉트 박스를 모두 보이게 함
|
||||
function selectBoxVisible()
|
||||
{
|
||||
for (i=0; i<document.forms.length; i++)
|
||||
{
|
||||
for (k=0; k<document.forms[i].length; k++)
|
||||
@ -275,11 +268,11 @@ if (typeof(SIDEVIEW_JS) == 'undefined') // 한번만 실행
|
||||
el.style.visibility = 'visible';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function getAbsoluteTop(oNode)
|
||||
{
|
||||
function getAbsoluteTop(oNode)
|
||||
{
|
||||
var oCurrentNode=oNode;
|
||||
var iTop=0;
|
||||
while(oCurrentNode.tagName!="BODY") {
|
||||
@ -287,11 +280,11 @@ if (typeof(SIDEVIEW_JS) == 'undefined') // 한번만 실행
|
||||
oCurrentNode=oCurrentNode.offsetParent;
|
||||
}
|
||||
return iTop;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function getAbsoluteLeft(oNode)
|
||||
{
|
||||
function getAbsoluteLeft(oNode)
|
||||
{
|
||||
var oCurrentNode=oNode;
|
||||
var iLeft=0;
|
||||
iLeft+=oCurrentNode.offsetWidth;
|
||||
@ -300,27 +293,26 @@ if (typeof(SIDEVIEW_JS) == 'undefined') // 한번만 실행
|
||||
oCurrentNode=oCurrentNode.offsetParent;
|
||||
}
|
||||
return iLeft;
|
||||
}
|
||||
}
|
||||
|
||||
function divDisplay(id, act)
|
||||
{
|
||||
function divDisplay(id, act)
|
||||
{
|
||||
selectBoxVisible();
|
||||
|
||||
document.getElementById(id).style.display = act;
|
||||
}
|
||||
}
|
||||
|
||||
function hideSideView()
|
||||
{
|
||||
function hideSideView()
|
||||
{
|
||||
if (document.getElementById("sideview"))
|
||||
divDisplay ("sideview", 'none');
|
||||
}
|
||||
}
|
||||
|
||||
var clickAreaCheck = false;
|
||||
document.onclick = function()
|
||||
{
|
||||
var clickAreaCheck = false;
|
||||
document.onclick = function()
|
||||
{
|
||||
if (!clickAreaCheck)
|
||||
hideSideView();
|
||||
else
|
||||
clickAreaCheck = false;
|
||||
}
|
||||
}
|
||||
@ -77,8 +77,6 @@ jQuery(function($){
|
||||
var member_skin_path = "<?=$member_skin_path?>";
|
||||
</script>
|
||||
<script type="text/javascript" src="<?=$member_skin_path?>/ajax_register_form.jquery.js"></script>
|
||||
<script type="text/javascript" src="<?=$g4[path]?>/js/md5.js"></script>
|
||||
<script type="text/javascript" src="<?=$g4[path]?>/js/sideview.js"></script>
|
||||
|
||||
<form id="fregisterform" name=fregisterform method=post onsubmit="return fregisterform_submit(this);" enctype="multipart/form-data" autocomplete="off">
|
||||
<input type=hidden name=w value="<?=$w?>">
|
||||
@ -551,7 +549,7 @@ function fregisterform_submit(f)
|
||||
?>
|
||||
|
||||
// 보안인증관련 코드로 반드시 포함되어야 합니다.
|
||||
set_cookie("<?=md5($token)?>", "<?=base64_encode($token)?>", 1, "<?=$g4['cookie_domain']?>");
|
||||
//set_cookie("<?=md5($token)?>", "<?=base64_encode($token)?>", 1, "<?=$g4['cookie_domain']?>");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user