작성일 : 11-12-24 00:42
|
[JQuery] Christmas Event
|
|
|
글쓴이 :
조형래
 조회 : 4,588
|
http://malsup.com/jquery/cycle/int.html [3591] |
<style>
#Christmas_mask {
position:absolute;
z-index:9000;
background-color:#000;
display:none;
left:0;
top:0;
}
.window{
display: none;
position:absolute;
left:100px;
top:100px;
z-index:10000;
}
</style>
<script src="http://www.spicus.com/js/jquery/jquery-latest.min.js" type="text/javascript"></script>
<script src="/js/jquery.cycle.all.js" type="text/javascript"></script>
<script type="text/javascript">
function wrapWindowByMask() {
// 화면의 높이와 너비를 구한다.
var maskHeight = $(document).height();
var maskWidth = $(window).width();
// 마스크의 높이와 너비를 화면 것으로 만들어 전체 화면을 채운다.
$('#Christmas_mask').css({ 'width': maskWidth, 'height': maskHeight });
$('#Christmas_mask').fadeTo("slow", 0.5);
//윈도우 같은 거 띄운다.
$('.window').show();
}
$(document).ready(function () {
wrapWindowByMask();
//닫기 버튼을 눌렀을 때
$('.window .close').click(function (e) {
//링크 기본동작은 작동하지 않도록 한다.
e.preventDefault();
$('#Christmas_mask, .window').hide();
});
//검은 막을 눌렀을 때
$('#Christmas_mask').click(function () {
$(this).hide();
$('.window').hide();
});
$('#Christmas_button0').click(function () {
$('#Christmas0').hide();
$('#Christmas4').hide();
$('#Christmas1').show();
$('#Christmas1').cycle({
fx: 'shuffle',
autostop: 1,
delay: -4000,
shuffle: {
top: 600,
left: 450
}
});
});
$('#Christmas_button1').click(function () {
$('#Christmas1').hide();
$('#Christmas2').show();
$('#Christmas2').cycle({
fx: 'shuffle',
autostop: 1,
delay: -4000,
shuffle: {
top: 600,
left: 450
}
});
});
$('#Christmas_button2').click(function () {
$('#Christmas_button2').click(function () {
$('#Christmas2').hide();
$('#Christmas3').show();
$('#Christmas3').cycle({
fx: 'shuffle',
autostop: 1,
delay: -4000,
shuffle: {
top: 600,
left: 450
}
});
});
});
$('#Christmas_button_again').click(function () {
$('#Christmas3').hide();
$('#Christmas4').show();
$('#Christmas4').cycle({
fx: 'shuffle',
autostop: 1,
delay: -4000,
shuffle: {
top: 600,
left: 450
}
});
});
});
</script>
<div class="window" style="position:absolute; top:121px; left:100px; width:880px; height:600px;">
<!--v_event01.jpg 부터 v_event04.jpg 까지 순서대로 돌아갑니다.-->
<div id="Christmas0" class="pics">
<img src="../data/cheditor4/1112/v_event01_PwFvR8y5gCkbl.jpg" border="0" usemap="#Christmas_Map1" style="position:absolute; width:880px; height:600px;"/>
</div>
<div id="Christmas1" class="pics" style="display: none;">
<img src="../data/cheditor4/1112/v_event01_PwFvR8y5gCkbl.jpg" border="0" style="position:absolute; top:121px; left:100px; width:880px; height:600px;"/>
<img src="../data/cheditor4/1112/v_event02_612kNEEl73.jpg" border="0" usemap="#Christmas_Map2" style="position:absolute; top:121px; left:100px; width:880px; height:600px;"/>
</div>
<div id="Christmas2" class="pics" style="display: none;">
<img src="../data/cheditor4/1112/v_event02_612kNEEl73.jpg" border="0" style="position:absolute; top:121px; left:100px; width:880px; height:600px;"/>
<img src="../data/cheditor4/1112/v_event03_bKNcZwfQCq.jpg" border="0" usemap="#Christmas_Map3" style="position:absolute; top:121px; left:100px; width:880px; height:600px;"/>
</div>
<div id="Christmas3" class="pics" style="display: none;">
<img src="../data/cheditor4/1112/v_event03_bKNcZwfQCq.jpg" border="0" style="position:absolute; top:121px; left:100px; width:880px; height:600px;"/>
<img src="../data/cheditor4/1112/v_event04_5H14l35FK31.jpg" border="0" usemap="#Christmas_Map4" style="position:absolute; top:121px; left:100px; width:880px; height:600px;"/>
</div>
<div id="Christmas4" class="pics" style="display: none;">
<img src="../data/cheditor4/1112/v_event04_5H14l35FK31.jpg" border="0" style="position:absolute; top:121px; left:100px; width:880px; height:600px;"/>
<img src="../data/cheditor4/1112/v_event01_PwFvR8y5gCkbl.jpg" border="0" usemap="#Christmas_Map1" style="position:absolute; top:121px; left:100px; width:880px; height:600px;"/>
</div>
<map name="Christmas_Map1" id="Christmas_Map1">
<!--닫기링크는 v_event01.jpg 부터 v_event04.jpg 까지 동일-->
<area shape="rect" coords="832,9,872,47" href="javascript:;" class="close" alt="닫기" onfocus="this.blur()" />
<!--다음 이미지 보기 링크는 v_event01.jpg 부터 v_event03.jpg 까지 동일-->
<area shape="poly" coords="0,0,0,600,880,600,880,48,830,48,830,0" href="javascript:;" ID="Christmas_button0" alt="Next please~!" onfocus="this.blur()" />
</map>
<map name="Christmas_Map2" id="Christmas_Map2">
<!--닫기링크는 v_event01.jpg 부터 v_event04.jpg 까지 동일-->
<area shape="rect" coords="832,9,872,47" href="javascript:;" class="close" alt="닫기" onfocus="this.blur()" />
<!--다음 이미지 보기 링크는 v_event01.jpg 부터 v_event03.jpg 까지 동일-->
<area shape="poly" coords="0,0,0,600,880,600,880,48,830,48,830,0" href="javascript:;" ID="Christmas_button1" alt="Next please~!" onfocus="this.blur()" />
</map>
<map name="Christmas_Map3" id="Christmas_Map3">
<!--닫기링크는 v_event01.jpg 부터 v_event04.jpg 까지 동일-->
<area shape="rect" coords="832,9,872,47" href="javascript:;" class="close" alt="닫기" onfocus="this.blur()" />
<!--다음 이미지 보기 링크는 v_event01.jpg 부터 v_event03.jpg 까지 동일-->
<area shape="poly" coords="0,0,0,600,880,600,880,48,830,48,830,0" href="javascript:;" ID="Christmas_button2" alt="Next please~!" onfocus="this.blur()" />
</map>
<map name="Christmas_Map4" id="Christmas_Map4">
<!--닫기링크는 v_event01.jpg 부터 v_event04.jpg 까지 동일-->
<area shape="rect" coords="832,9,872,47" href="javascript:;" class="close" alt="닫기" onfocus="this.blur()" />
<area shape="poly" coords="423,456,406,476,402,492,403,512,409,522,416,532,427,538,441,543,452,543,466,540,473,538,488,585,500,593,723,522,728,512,723,499,699,427,695,405,677,398,478,461,450,449" href="javascript:;" alt="쿠폰받기" onfocus="this.blur()" />
<area shape="rect" coords="17,14,158,54" href="javascript:;" class="close" alt="이 화면 이제 그만" onfocus="this.blur()" />
<area shape="rect" coords="17,63,158,99" href="javascript:;" ID="Christmas_button_again" alt="한번 더 보실래요?" onfocus="this.blur()" />
</map>
</div>
<div id="Christmas_mask"></div>
[login page]
<!-- #include virtual="/common/asp/MD5Encode.asp" -->
<!-- #include virtual="/common/asp/CommVar.asp"-->
<!-- #include virtual="/common/asp/DBHelper.asp" -->
<!-- #include virtual="/common/asp/DbCon.asp" -->
<!-- #include virtual="/common/asp/CmdExec.asp" -->
<!-- #include virtual="/common/CommFunc.asp" -->
<!-- #include virtual="/common/asp/CommInit.asp" -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title><%=BROWSER_TITLE%></title>
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr">
<link rel="stylesheet" href="<%=URL_COMMON_CSS%>/common.css" type="text/css">
<script language="javaScript" type="text/javascript" SRC="/js/common.js"></SCRIPT>
<script type="text/javascript">
function Christmas_submit() {
if (Christmas_login.user_id.value == "") {
alert("ID를 입력하세요.");
Christmas_login.user_id.focus()
return;
}
if (Christmas_login.passwd.value == "") {
alert("비밀번호를 입력하세요.");
Christmas_login.passwd.focus()
return;
}
Christmas_login.submit()
}
</script>
</head>
<body>
<% if request("Christmas") <> "Y" then %>
<form name="Christmas_login" action="Christmas_login.asp" method="post">
<center>
<br />
<br />
<br />
<br />
<table border=0>
<tr><td colspan="2" align="center" bgcolor="F3F3F3" height="30">스피쿠스 로그인 </td></tr>
<tr><td height="6"></td></tr>
<tr><td width=35>ID</td><td><input name="user_id" type="text" id="uid" size="11" maxlength="20" title="아이디" style="ime-mode:disabled" /></td></tr>
<tr><td width=35>PW</td><td><input name="passwd" type="password" id="upw" size="11" maxlength="20" title="비밀번호"></td></tr>
<tr><td height="10"></td></tr>
<tr><td align="center" colspan="2"><a href="javascript:Christmas_submit()"><img src="<%=IMG_COMMON_BTN%>/btn_pop_confirm.gif" border="0"></a> <a href="javascript:window.close()"><img src="<%=IMG_COMMON_BTN%>/btn_pop_cancel.gif" border="0"></a></td></tr>
</table>
</center>
<input type="hidden" name="Christmas" value="Y" />
</form>
<% else %>
<%
user_id = GetTrimStrCheck(Trim(Request("user_id")), "", False) ': Response.Write "user_id : " & user_id & "<BR>"
passwd = GetTrimStrCheck(Trim(request("passwd")), "", False) ': Response.Write "passwd : " & passwd & "<BR>"
Christmas = GetTrimStrCheck(Trim(request("Christmas")), "", False)
passwd = MD5(passwd)
'2009-01-16 최병권 로그인 이력 남기기 위해 추가
mem_ip = Request.ServerVariables("REMOTE_ADDR")
if mem_ip = "" or isnull(mem_ip) or isempty(mem_ip) then mem_ip = "UNKNOWN"
Set DBHelper = new clsDBHelper
Dim paramNew(5)
paramNew(0) = DBHelper.MakeParam("@user_id", adVarChar, adParamInput, 20, user_id)
paramNew(1) = DBHelper.MakeParam("@passwd", adVarChar, adParamInput, 40, passwd)
paramNew(2) = DBHelper.MakeParam("@mem_ip", adVarChar, adParamInput, 15, mem_ip)
paramNew(3) = DBHelper.MakeParam("@PATH_INFO", adVarChar, adParamInput, 100, "/")
paramNew(4) = DBHelper.MakeParam("@LRN_SEQ", adInteger, adParamOutput, , "")
paramNew(5) = DBHelper.MakeParam("@LRN_GROUP_SEQ", adInteger, adParamOutput, , "")
Set rs = DBHelper.ExecSPReturnRS("USP_MEMBER_LOGIN", paramNew, Nothing)
if rs.eof then
%>
<script type="text/javascript">
alert("아이디나 비밀번호가 틀렸습니다.");
location.href = "Christmas_login.asp";
</script>
<%
end if
fedate = rs("lrninfo_fedate")
if IsNull (fedate) Then fedate = ""
group_id = rs("group_id") ' 그룹 아이디 또는 이메일 주소가 없는 경우 아래의 연산 과정에서 Null 에러 발생
email = rs("email")
fullname = rs("fullname")
COURSE_NAME = rs("COURSE_NAME")
If COURSE_NAME = "" Or IsNull(COURSE_NAME) Then COURSE_NAME = ""
COURSE_ID = rs("COURSE_ID")
If COURSE_ID = "" Or IsNull(COURSE_ID) Then COURSE_ID = ""
PRODUCT_NAME = rs("PRODUCT_NAME")
If PRODUCT_NAME = "" Or IsNull(PRODUCT_NAME) Then PRODUCT_NAME = ""
PRODUCT_ID = rs("PRODUCT_ID")
If PRODUCT_ID = "" Or IsNull(PRODUCT_ID) Then PRODUCT_ID = ""
TUTOR_NAME = rs("TUTOR_FULLNAME")
If TUTOR_NAME = "" Or IsNull(TUTOR_NAME) Then TUTOR_NAME = ""
TUTOR_ID = rs("TUTOR_ID")
If TUTOR_ID = "" Or IsNull(TUTOR_ID) Then TUTOR_ID = ""
MANAGE_NAME = rs("MANAGE_NAME")
If MANAGE_NAME = "" Or IsNull(MANAGE_NAME) Then MANAGE_NAME = ""
MANAGE_ID = rs("MANAGE_ID")
If MANAGE_ID = "" Or IsNull(MANAGE_ID) Then MANAGE_ID = ""
COMPANY_NO = rs("COMPANY_NO")
If COMPANY_NO = "" Or IsNull(COMPANY_NO) Then COMPANY_NO = ""
PER_NO = rs("PER_NO")
If PER_NO = "" Or IsNull(PER_NO) Then PER_NO = ""
B2B_MNG_YN = rs("B2B_MNG_YN")
If B2B_MNG_YN = "" Or IsNull(B2B_MNG_YN) Then B2B_MNG_YN = ""
LRN_SEQ = rs("LRN_SEQ")
LRN_GROUP_SEQ = rs("LRN_GROUP_SEQ")
If LRN_SEQ = "" Or IsNull(LRN_SEQ) Then LRN_SEQ = ""
If LRN_GROUP_SEQ = "" Or IsNull(LRN_GROUP_SEQ) Then LRN_GROUP_SEQ = ""
ARTICLE_AGREE_YN = rs("ARTICLE_AGREE_YN")
If ARTICLE_AGREE_YN = "" Or IsNull(ARTICLE_AGREE_YN) Then ARTICLE_AGREE_YN = ""
Dim EncodeA : EncodeA = StrReverse(strAnsi2Unicode(Base64encode(strUnicode2Ansi(user_id))))
call SetCookie("L_lrninfo_fedate",fedate)
call SetCookie("L_user_id", EncodeA) ' ID
call SetCookie("L_email", email) ' E-mail
call SetCookie("L_NAME", fullname) ' 로그인 사용자 이름
call SetCookie("L_COURSE_NAME", COURSE_NAME) ' 코스 이름
call SetCookie("L_COURSE_ID", COURSE_ID) ' 코스 ID
call SetCookie("L_PRODUCT_NAME", PRODUCT_NAME) ' 구매상품 이름
call SetCookie("L_PRODUCT_ID", PRODUCT_ID) ' 구매상품 ID
call SetCookie("L_TUTOR_NAME", TUTOR_NAME) ' 로그인 사용자의 튜터 이름
call SetCookie("L_TUTOR_ID", TUTOR_ID) ' 로그인 사용자의 튜터 ID
call SetCookie("L_MANAGE_NAME", MANAGE_NAME) ' 로그인 사용자의 매니저 이름
call SetCookie("L_MANAGE_ID", MANAGE_ID) ' 로그인 사용자의 매니저 ID
call SetCookie("LRN_SEQ", LRN_SEQ) ' 학습자의 학습정보 SEQ
call SetCookie("LRN_GROUP_SEQ", LRN_GROUP_SEQ) ' 학습자의 학습정보 GROUP SEQ
call SetCookie("COMPANY_NO", COMPANY_NO) ' 기업회원 번호
call SetCookie("ARTICLE_AGREE_YN", ARTICLE_AGREE_YN) '-- 약관 동의 여부
if group_id<>"" then
call SetCookie("L_group_id", group_id)
end if
rs.close
DBHelper.Dispose
Set DBHelper = Nothing
'O75326261023122011
Set DBHelper = new clsDBHelper
Dim arrParamNew(2)
arrParamNew(0) = DBHelper.MakeParam("@user_id", adVarChar, adParamInput, 50, user_id)
arrParamNew(1) = DBHelper.MakeParam("@cuppn_ident_id", adVarChar, adParamInput, 8000, "O75326261023122011")
arrParamNew(2) = DBHelper.MakeParam("@OperResult", adChar, adParamOutput, 1, "")
DBHelper.ExecSP "Christmas_Event", arrParamNew, Nothing
OperResult = DBHelper.GetValue(arrParamNew, "@OperResult")
%>
<%If OperResult = "Y" Then%>
<script type="text/javascript">
function setCookie(name, value, expiredays) {
var todayDate = new Date();
todayDate.setDate(todayDate.getDate() + expiredays);
document.cookie = name + "=" + escape(value) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}
opener.location.reload();
setCookie("Christmas_end", "end", 1);
</script>
<div>
<a href="javascript:close();"><img src="../data/cheditor4/1112/pop_SH2xJebFwaNN.jpg" border="0" alt="쿠폰발급 완료 - 클릭하면 닫힙니다." /></a>
</div>
<% else %> <!-- OperResult 가 N 일경우임 -->
<script type="text/javascript">
function setCookie(name, value, expiredays) {
var todayDate = new Date();
todayDate.setDate(todayDate.getDate() + expiredays);
document.cookie = name + "=" + escape(value) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}
setCookie("Christmas_end", "end", 1);
alert("쿠폰이 이미 등록되어 있습니다. \n마이스피쿠스 구매내역의 포인트/쿠폰 란을 확인하세요");
opener.location.reload();
close();
</script>
<% end if %> <!-- OperResult 가 N 일경우 끝 -->
<% end if %>
</body>
</html>
<!-- #include virtual="/common/asp/CommEnd.asp" -->
|
|