½ÃÀÛÆäÀÌÁö·Î Áñ°Üã±âÃß°¡
·Î±×ÀÎ
ȸ¿ø°¡ÀÔ l Ã⼮üũ l ¸¶ÀÌÆäÀÌÁö l CGIMALL
ÀÚ·á½Ç »çÀÌÆ®µî·Ï ·©Å·100 ÇÁ·Î±×·¥¸®ºä °ü¸®ÀÚÃßõÀÚ·á Ãʺ¸°¡À̵å
Ä¿¹Â´ÏƼ
Àüü ÆîÃ帱â
Äü¸Þ´º¸µÅ© jquery , CSS , PHP , Javascript , ¹«·áÆùÆ® , ASP
»ó¼¼°Ë»ö
Ȩ > Ä¿¹Â´ÏƼ > Áú¹®°ú´äº¯ »ó¼¼º¸±â
Ä¿¹Â´ÏƼ ±¸Àα¸Á÷
»çÀÌÆ®µî·Ï
Ŭ¶ó¿ìµåű×
Javascript
PHP
ASP
CSS
HTML
MYSQL
jquery
image
Mobile
API
slide
°Ô½ÃÆÇ
¸Þ´º
ÇöÀçÁ¢¼ÓÀÚ ¸í »õ·Î°íħ
°Ô½ÃÆÇŸÀÌƲ Áú¹®°ú´äº¯ / »ó¼¼º¸±â
Æ®À§ÅÍ·Î º¸³»±â
Ãßõ¼ö 327 | Á¶È¸¼ö 4,141 | µî·ÏÀÏ 2010-05-10 14:30:32

´Ð³×ÀÓ

hotensia

À̸ÞÀÏ

sunju1121@nate.com

Á¦¸ñ

°øÈÞÀÏ Ç¥½ÃÇÏ´Â ÇÁ·Î±×·¥À» ¾î¶»°Ô Â¥¸é ÁÁÀ»±î¿ä?
³»¿ë

<%@ page contentType="text/html;charset=euc-kr" %>
<%@ page import = "java.sql.*" %>
<%@ page import="java.net.InetAddress" %>
<%@ page import="java.text.*" %>
<%@ page import="java.util.*" %>
<%@ page import="java.io.*" %>
<% request.setCharacterEncoding("euc-kr"); %>

<HTML>
<HEAD>
<TITLE>¿¬¼ö¿ø¿¹¾àÇöȲ°ü¸®</TITLE>
<link href="schedule_css.css" rel="stylesheet" type="text/css">
</HEAD>
<BODY>

<META http-equiv="Content-Type" content="text/html; charset=euc-kr">
<style type='text/css'>
<!--
 a:link  {font-family:"";color:black;text-decoration:none;}
 a:visited {font-family:"";color:black;text-decoration:none;}
 a:hover  {font-family:"";color:black;text-decoration:underline;}
-->
</style>

<%
// CalendarŬ·¡½ºÀÇ ÀνºÅϽº cal »ý¼º
java.util.Calendar cal = java.util.Calendar.getInstance();

// JSP ±âº»°´Ã¼ request.getParameter¸¦ »ç¿ëÇÏ¿© url·Î ºÎÅÍ year, monthÁ¤º¸¸¦ ·Îµå
String strYear = request.getParameter("year");
String strMonth = request.getParameter("month");

// ³¯Â¥¸¦ ÀúÀåÇÏ´Â º¯¼ö year, month, date¿¡ ¿À´Ã ³¯Â¥¸¦ ¼³Á¤
int year = cal.get(java.util.Calendar.YEAR);
int month = cal.get(java.util.Calendar.MONTH);
int date = cal.get(java.util.Calendar.DATE);

// urlÀ» ÅëÇØ Àоî¿Â Ç¥½ÃÇÏ°íÀÚ ÇÏ´Â ³¯Â¥ÀÇ Á¤º¸¸¦ ¼³Á¤
if(strYear != null)
{
   year = Integer.parseInt(strYear);
 month = Integer.parseInt(strMonth);
 
 
if(month  == -1)
{
   year = Integer.parseInt(strYear) - 1;
   month = 11;
}

if(month  == 12)
{
   year = Integer.parseInt(strYear) + 1;
   month = 0;

 
}

cal.set(year, month, 1);

int startDay = cal.getMinimum(java.util.Calendar.DATE);
// Ç¥½ÃÇÏ°íÀÚ ÇÏ´Â ´ÞÀÇ ¸¶Áö¸· ³¯Â¥¸¦ ¼³Á¤
int endDay = cal.getActualMaximum(java.util.Calendar.DAY_OF_MONTH);
// Ç¥½ÃÇÏ°íÀÚ ÇÏ´Â ´ÞÀÇ ½ÃÀÛ ³¯Â¥ÀÇ ¿äÀÏÀ» ¼³Á¤
int start = cal.get(java.util.Calendar.DAY_OF_WEEK);
int newLine = 0;
int j = 0;
%>
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
  <TR>         
    <TD valign="bottom" width="25%">
      <%--Ç¥½ÃÇÏ°íÀÚ ÇÏ´Â ³¯Â¥ÀÇ ³â, ¿ù Á¤º¸¸¦ Àü´Þ--%>
      &nbsp;<a href="index.jsp?year=<%=year-1%>&month=<%=month%>"><font color="#484848">¢¸</font></a>
      <STRONG><%=year%>³â </STRONG><a href="index.jsp?year=<%=year+1%>&month=<%=month%>"><font color="#484848">¢º</font></a>
    </TD>        
    <TD valign="bottom" width="50%">
      <DIV align="center"> &nbsp;&nbsp;<a href="index.jsp?year=<%=year%>&month=<%=month - 1%>"><img src="images/month_left.gif" border="0"></a>
        <font style='font-family:¸íÁ¶; font-size:22pt; color:#333333;'><STRONG><%=month + 1%></STRONG></font>
        <img src="images/month.gif" width="20"><img src="images/month_icon.gif" width="45">
        <a href="index.jsp?year=<%=year%>&month=<%=month + 1%>">&nbsp</a><a href="index.jsp?year=<%=year%>&month=<%=month + 1%>"><img src="images/month_right.gif" width="38" height="30" border="0"></a>
      </DIV>
 </TD>     
    <TD align="right" valign="bottom" width="25%">
      <!--  <DIV align="right"> <a href=index.jsp></a><STRONG>¼±ÅÃÀÏÀÚ <%=year + "-" + (month +1) + "-" + date%>&nbsp;</STRONG> </DIV> -->
      <strong>Today
      <script type="text/javascript">
    <!--
     var tDate = new Date();
     document.write(tDate.getYear()+"³â "+(tDate.getMonth()+1)+"¿ù "+tDate.getDate()+"ÀÏ");
     //-->
    </script>
      </strong>
 </TD>
    </TR>
</TABLE>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="10"></td> 
  </tr>
</table>
<TABLE width="100%" border="1" cellpadding="2" cellspacing="0" bordercolor="BBBBBB" style="border-collapse:collapse">
  <TR valign="middle" bgcolor="F1F0EE">
    <TD width='14%' height='30'align='center'>
      <DIV align="center"><img src="images/day01.gif" width="60" height="20"></DIV></TD>
    <TD width='14%'align='center'>
      <DIV align="center"><img src="images/day02.gif" width="60" height="20"></DIV></TD>
    <TD width='14%'align='center'>
      <DIV align="center"><img src="images/day03.gif" width="60" height="20"></DIV></TD>
    <TD width='14%'align='center'>
      <DIV align="center"><img src="images/day04.gif" width="60" height="20"></DIV></TD>
    <TD width='14%'align='center'>
      <DIV align="center"><img src="images/day05.gif" width="60" height="20"></DIV></TD>
    <TD width='14%'align='center'>
      <DIV align="center"><img src="images/day06.gif" width="60" height="20"></DIV></TD>
    <TD width='14%'align='center'>
      <DIV align="center"><img src="images/day07.gif" width="60" height="20"></DIV></TD>
  </TR>
  <%
for(int index = 1; index < start ; index++ )
{
   out.print("<TD>&nbsp;</TD>");
   newLine++;
}

for(int index = 1; index <= endDay; index++)
{
   String color = (newLine == 0)?"RED":"BLACK"; 
 
 
   // ³¯Â¥¸¦ 1¾¿ Áõ°¡½ÃÅ°¸é¼­ Å×À̺íÀ» »ý¼ºÇÏ¿© ´Þ·ÂÀ» ¿Ï¼º
%>
    <TD width='14%' height='70' align='left' valign='top'><span class="day"><b><a href='write.jsp?year=<%=year%>&month=<%=month+1%>&day=<%=index%>'>
      </a></b></span><b><a href='write.jsp?year=<%=year%>&month=<%=month+1%>&day=<%=index%>'><font color = <%=color %>>
      <%=index%></a></b>
     
      <%

    softband.common.db.DBPool dbpool  = softband.common.db.PoolManager.getInstance("OC4JPool");
 com.evermind.sql.OrclCMTConnection conn = null;
 java.sql.PreparedStatement pstmt   = null;
 java.sql.ResultSet rs      = null;
 boolean isComplete      = false;
 
try{
  conn    =  dbpool.getConnection("test");
  conn.setAutoCommit(false);

 StringBuffer strSql = new StringBuffer();
 strSql.delete(0, strSql.length());

    strSql.append( "SELECT NO, YEAR, MONTH, DAY, TITLE, S_TIME, E_Time, POSITION, CONTENT, MAN_COUNT, ATT_NAME  FROM calendar1 WHERE year='" + year + "' and month='" + ( month + 1 ) + "' and day='" + index +"'" );

    pstmt    =  conn.prepareStatement( strSql.toString() );
 
 rs     =  pstmt.executeQuery();

     
while (rs.next()){
   
%>
      <a href=content.jsp?year=<%=year%>&month=<%=month+1%>&day=<%=index%>&no=<%=rs.getInt("no")%>
   onMouseOver='toggle(document.all.<%="HideShow" + j%>);'
   onMouseOut='toggle(document.all.<%="HideShow" + j%>);'><br>
      <span class="content"><img src="images/arrow_icon.gif" width="3" border="0"> 
      <% 
 String strTitle = rs.getString("title");
 out.println(strTitle); %>
      (<%String strCount = rs.getString("man_count");
 out.println(strCount);%>¸í) </span></a>
      <div id='<%= "HideShow" + j%>'style="visibility:hidden;position:absolute;left:43px; top:209px; width:104; height:74px; z-index:2" class="layer">
        <table width="104" border="1" cellpadding="1" cellspacing="0" bordercolor="#83C4D9" bgcolor="#FFFFFF" style="border-collapse:collapse">
          <tr>
            <td><table width='104' border='0' cellpadding="2" cellspacing='0' class="layer">
                <tr bgcolor="#FFFFFF">
                  <td width="100" height="12"><img src="images/arrow_icon.gif" width="3" border="0">
                    ±â°ü¸í<br>
                    : <%=strTitle%>
                    <img src="images/line.gif" width="104" height="1"></td>
                </tr>
                <tr bgcolor="#FFFFFF">
                  <td height="12"><img src="images/arrow_icon.gif" width="3" border="0">
                    ½ÅûÀÚ<br>
                    : <%=rs.getString("att_name")%><br>
                    <img src="images/line.gif" width="104" height="1"></td>
                </tr>
                <tr bgcolor="#FFFFFF">
                  <td height="12"><img src="images/arrow_icon.gif" width="3" border="0">
                    ½Ã¼³<br>
                    : <%=rs.getString("position")%><br>
                    <img src="images/line.gif" width="104" height="1"></td>
                </tr>
                <tr bgcolor="#FFFFFF">
                  <td height="12"><img src="images/arrow_icon.gif" width="3" border="0">
                    Àοø<br>
                    : <%=rs.getString("man_count")%>¸í<br>
                    <img src="images/line.gif" width="104" height="1"></td>
                </tr>
                <tr bgcolor="#FFFFFF">
                  <td height="12"><img src="images/arrow_icon.gif" width="3" border="0">
                    ±â°£<br>
                    : <%=rs.getString("s_time")%></td>
                </tr>
              </table></td>
          </tr>
        </table>
      </div>
    <%
j = j+1;  
}
 

 conn.commit();
 conn.setAutoCommit(true);
 isComplete = true;

 rs.close();
 pstmt.close();
 dbpool.returnConnection("test",conn);
 
 
  
  }catch(java.sql.SQLException sqle)
 {
  conn.rollback();
  isComplete = false;
 }
 catch(Exception e)
 {
  e.printStackTrace(System.out);
  isComplete = false;
 }
  finally
 {
         if(rs!=null)   try { rs.close(); } catch(Exception e) {}
         if(pstmt!=null)  try { pstmt.close();} catch(Exception e) {}
         if(conn!=null)  try { dbpool.returnConnection("test",conn);} catch(Exception e) {}
 }
 
 
 
%>
    <%
newLine++;

if(newLine == 7){
 out.print("</TR>");
if(index <= endDay){
 out.print("<TR>");
}
newLine=0;
}
}

while(newLine > 0 && newLine < 7)
{
 out.print("<TD>&nbsp;</TD>");
 newLine++;
}
%>
</TABLE>
 
<SCRIPT LANGUAGE="JavaScript">
<!--
function toggle(e) {
   if(e.style.visibility=="hidden") {
      e.style.top = event.y;
      e.style.left = event.x;
      e.style.visibility="visible";
     }
     else
     {
       e.style.visibility="hidden";
     }
}
-->
</SCRIPT>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td align="center"><img src="images/text.gif" width="600" height="45"> </td>
  </tr>
</table>
<table width="630" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="100">&nbsp;</td>
  </tr>
</table>
</BODY>
</HTML>

À§¿Í °°Àº ´Þ·ÂÇÁ·Î±×·¥¿¡¼­ °øÈÞÀÏÀ» Ç¥½ÃÇÒ¼ö ÀÖ´Â ÇÁ·Î±×·¥À» Ãß°¡ÇÏ°í ½ÍÀºµ¥¿ä..

¾Æ½Ã´Â ºÐ ºü¸¥ ´äº¯ ºÎŹµå¸³´Ï´Ù.

Ãßõ½ºÅ©·¦¼Ò½ºº¸±â ¸ñ·Ï
°Ë¹«Ç÷½Å 2010-05-10 18:09:34
´ä±Û

Åä,ÀÏ µîÀÇ ±ÔÄ¢ÀûÀÎ °øÈÞÀÏÀº ½±°Ô Ç¥½Ã°¡ °¡´ÉÇÏÁö¸¸,
5¿ù5ÀÏ°ú °°Àº ÁöÁ¤µÈ ÈÞÀÏÀ̳ª À½·ÂÀ¸·Î ½¬´Â ºÎó´Ô³¯°ú °°Àº ³¯µéÀº
µû·Î º¯¼ö¿¡ ÇØ´ç ÀÏÀÚ¸¦ ÁöÁ¤ÇØµÎ¼Å¾ß ÇÕ´Ï´Ù.

ÀÌÀü°Ô½Ã±Û Æ®¸®±¸Á¶ Áú¹® µå¸³´Ï´Ù. 2010-04-30 09:41:05
´ÙÀ½°Ô½Ã±Û Åä¿äÀÏ ÆĶõ»öÀ¸·Î Ç¥½ÃÇÏ°í ½Í¾î¿ä.. 2010-05-11 10:18:44