묻고답하기
page_full_width" class="col-xs-12" |cond="$__Context->page_full_width">
달력 관련 소스 좀 확인 해 주세요.
2005.09.26 18:46
http://patou.cafe24.com/calendar/car555.php소스좀 확인 해 주세요
테이블이 밀려나가고 있습니다.
지난번에 올린 부분에서 계속 트러블이 생기는 것 같습니다.
아, 그리고 이미지는 제가 올리지 않아 보이지 않는 것입니다.
고수님들 또 다시 부탁드립니다.
링크를 참조하시면 될 것 같습니다. (-..-;)
::: source :::
<html>
<head>
<style>
<!--
td { font-size : 9pt; }
A : link { font : 9pt; color : black; text-decoration : none; font-family : 굴림; font-size : 9pt; }
A : visited { text- decoration: none; color: black; font-size: 9pt; }
A : hover { text-decoration: underline; color: black; font-size: 9pt; }
-->
</style>
<script language=javascript>
function content_check(form)
{
name=form.name.value.length;
comment=form.comment.value.length;
if (name == 0) {
alert("정확한 이름을 입력하세요.");
form.name.focus();
return(false);
}
if (comment == 0) {
alert("오늘의 일정을 입력하세요.");
form.comment.focus();
return(false);
}
if (comment > 40) {
alert("일정은 최대 한글 35자, 영문 50자 까지만 허용합니다.");
form.comment.focus();
retrun(false);
}
return(true);
}
</script>
</head>
<body bgcolor="#ffffff">
<?
include "car_config.inc";
if(!$year) {
$year=date("Y");
}
if(!$month) {
$month=date("m");
}
if(!$today) {
$todya=date("j");
}
function car($year,$month,$today) {
$lastday=date("t",mktime(0,0,0,$month,date("d"),$year));
$tday2=date("D",mktime(0,0,0,$month,1,$year));
switch($tday2)
{
case"Sun";
$a=1;
break;
case"Mon";
$a=2;
break;
case"Tue";
$a=3;
break;
case"Wed";
$a=4;
break;
case"Thu";
$a=5;
break;
case"Fri";
$a=6;
break;
case"Sat";
$a=7;
break;
}
echo"<table border=0>";
echo"<tr>";
echo"<td colspan=7 align=center>";
echo"Select :: $year 년 $momth 월 $today 일 <br> ";
echo"</td>";
echo"</tr>";
echo"<tr>";
echo"<td colspan=7 align=center>";
echo"$year 년 $month 월 달력 <br> ";
echo"</td>";
echo"</tr>";
echo"<tr>";
echo"<td colspan=7 align=center>";
$month2=$month-1;
$month3=$month+1;
if($month2>=1)
{
echo "<a href=car555.php?year=$year&month=$month2&today=$today>";
echo "◀ ";
echo "</a>";
}
echo " 이동 ";
if($month3<=12)
{
echo"<a href=car555.php?year=$year&month=$month3&today=$today>";
echo" ▶ ";
echo"</a><br>";
}
echo"</td>";
echo"</tr>";
echo("
<tr>
<td width=20><font color=red>일 </font></td>
<td width=20><font color=green>월 </font></td>
<td width=20><font color=green>화 </font></td>
<td width=20><font color=green>수 </font></td>
<td width=20><font color=green>목 </font></td>
<td width=20><font color=green>금 </font></td>
<td width=20><font color=green>토 </font></td>
</tr>
");
$b=1;
for ($k=1;$k<=6;$k++)
{
echo"<tr>";
for($i=1;$i<=7;$i++) {
if($b==$today)
{
$today_color="#336699";
$today_color2="white";
}else{
$today_color="white";
$today_color2="black";
}
echo "<td bgcolor=$today_color>";
if($a==$i || $b>1)
{
echo "<a href=car555.php?year=$year&month=$month&today=$b>";
echo "<font color=$today_color2>";
echo $b;
echo "</font>";
echo "</a>";
if($b>=$lastday){
<<< 바로 이부분 >>> return; }
$b++;
}
echo "</td>";
}
echo"</tr>";
}
echo"</table>";
}
?>
<br>
<table border=0 cellpadding=1 cellspacing=1 bgcolor=#336699>
<tr>
<td width=250 height=20 align=center bgcolor=#336699>
<?
$res=mysql_query("select see from car where id=1");
$res2=mysql_fetch_array($res);
$see=$res2[see]+1;
$res4=mysql_query("update car set see=$see where id=1");
echo "<font color=white size=2>";
echo "<b> patou schedule [총 방문객 :: $see ] </b> </font>";
?>
</td>
</tr>
</table>
<table border=0 cellpadding=1 cellspacing=1 width=650 bgcolor=#336699>
<tr>
<td bgcolor=white align=top topmargin=0 leftmargin=0>
<? car($year,$month,$today); ?>
</td>
<td bgcolor=white>
<?
$today=(int)$today;
$month=(int)$month;
$result=mysql_query("select * from car where month(wdate)=$month and dayofmonth(wdate)=$today order by id desc ");
echo "<table bgcolor=#f3f7ff width=650>";
while($row=mysql_fetch_array($result)){
$name=htmlspecialchars($row[name]);
$comment=htmlspecialchars($row[comment]);
echo "<tr>";
echo "<td width=60><font color=#336699>$name</font></td>";
echo "<td><font color=#336699>::$comment</font></td>";
echo "</tr>";
echo "<tr>";
echo "<td colspan=2 align=right bgcolor=white><font color=#336699>ip ADDress :: $row[uip]</font></td>";
echo "</tr>";
}
echo "</table>";
mysql_close();
?>
<?
echo ("
<form method=post action=up_car555.php?year=$year&month=$month&today=$today onSubmit="return content_check(this)">
");
?>
<table border=0 cellpadding=1 cellspacing=1>
<tr>
<td width=100 height=20 align=left>
<font color=green size=2 face=돋움>User_name</font>
</td>
<td width=250 height=20 align=left>
<input type=text name=name size=10 maxlength=12>
</td>
</tr>
<tr>
<td width=100 height=20 align=left>
<font color=green size=2 face=돋움>오늘의 일정 </font>
</td>
<td width=250 height=20 align=left>
<input type=text name=name size=50 maxlength=40>
</td>
</tr>
<tr>
<td width=100 height=20 align=left>
</td>
<td width=250 height=20 align=left>
<input type=image src=http://myhome.naver.com/suhoi/images/vot2.phg alt="올리기">
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
테이블이 밀려나가고 있습니다.
지난번에 올린 부분에서 계속 트러블이 생기는 것 같습니다.
아, 그리고 이미지는 제가 올리지 않아 보이지 않는 것입니다.
고수님들 또 다시 부탁드립니다.
링크를 참조하시면 될 것 같습니다. (-..-;)
::: source :::
<html>
<head>
<style>
<!--
td { font-size : 9pt; }
A : link { font : 9pt; color : black; text-decoration : none; font-family : 굴림; font-size : 9pt; }
A : visited { text- decoration: none; color: black; font-size: 9pt; }
A : hover { text-decoration: underline; color: black; font-size: 9pt; }
-->
</style>
<script language=javascript>
function content_check(form)
{
name=form.name.value.length;
comment=form.comment.value.length;
if (name == 0) {
alert("정확한 이름을 입력하세요.");
form.name.focus();
return(false);
}
if (comment == 0) {
alert("오늘의 일정을 입력하세요.");
form.comment.focus();
return(false);
}
if (comment > 40) {
alert("일정은 최대 한글 35자, 영문 50자 까지만 허용합니다.");
form.comment.focus();
retrun(false);
}
return(true);
}
</script>
</head>
<body bgcolor="#ffffff">
<?
include "car_config.inc";
if(!$year) {
$year=date("Y");
}
if(!$month) {
$month=date("m");
}
if(!$today) {
$todya=date("j");
}
function car($year,$month,$today) {
$lastday=date("t",mktime(0,0,0,$month,date("d"),$year));
$tday2=date("D",mktime(0,0,0,$month,1,$year));
switch($tday2)
{
case"Sun";
$a=1;
break;
case"Mon";
$a=2;
break;
case"Tue";
$a=3;
break;
case"Wed";
$a=4;
break;
case"Thu";
$a=5;
break;
case"Fri";
$a=6;
break;
case"Sat";
$a=7;
break;
}
echo"<table border=0>";
echo"<tr>";
echo"<td colspan=7 align=center>";
echo"Select :: $year 년 $momth 월 $today 일 <br> ";
echo"</td>";
echo"</tr>";
echo"<tr>";
echo"<td colspan=7 align=center>";
echo"$year 년 $month 월 달력 <br> ";
echo"</td>";
echo"</tr>";
echo"<tr>";
echo"<td colspan=7 align=center>";
$month2=$month-1;
$month3=$month+1;
if($month2>=1)
{
echo "<a href=car555.php?year=$year&month=$month2&today=$today>";
echo "◀ ";
echo "</a>";
}
echo " 이동 ";
if($month3<=12)
{
echo"<a href=car555.php?year=$year&month=$month3&today=$today>";
echo" ▶ ";
echo"</a><br>";
}
echo"</td>";
echo"</tr>";
echo("
<tr>
<td width=20><font color=red>일 </font></td>
<td width=20><font color=green>월 </font></td>
<td width=20><font color=green>화 </font></td>
<td width=20><font color=green>수 </font></td>
<td width=20><font color=green>목 </font></td>
<td width=20><font color=green>금 </font></td>
<td width=20><font color=green>토 </font></td>
</tr>
");
$b=1;
for ($k=1;$k<=6;$k++)
{
echo"<tr>";
for($i=1;$i<=7;$i++) {
if($b==$today)
{
$today_color="#336699";
$today_color2="white";
}else{
$today_color="white";
$today_color2="black";
}
echo "<td bgcolor=$today_color>";
if($a==$i || $b>1)
{
echo "<a href=car555.php?year=$year&month=$month&today=$b>";
echo "<font color=$today_color2>";
echo $b;
echo "</font>";
echo "</a>";
if($b>=$lastday){
<<< 바로 이부분 >>> return; }
$b++;
}
echo "</td>";
}
echo"</tr>";
}
echo"</table>";
}
?>
<br>
<table border=0 cellpadding=1 cellspacing=1 bgcolor=#336699>
<tr>
<td width=250 height=20 align=center bgcolor=#336699>
<?
$res=mysql_query("select see from car where id=1");
$res2=mysql_fetch_array($res);
$see=$res2[see]+1;
$res4=mysql_query("update car set see=$see where id=1");
echo "<font color=white size=2>";
echo "<b> patou schedule [총 방문객 :: $see ] </b> </font>";
?>
</td>
</tr>
</table>
<table border=0 cellpadding=1 cellspacing=1 width=650 bgcolor=#336699>
<tr>
<td bgcolor=white align=top topmargin=0 leftmargin=0>
<? car($year,$month,$today); ?>
</td>
<td bgcolor=white>
<?
$today=(int)$today;
$month=(int)$month;
$result=mysql_query("select * from car where month(wdate)=$month and dayofmonth(wdate)=$today order by id desc ");
echo "<table bgcolor=#f3f7ff width=650>";
while($row=mysql_fetch_array($result)){
$name=htmlspecialchars($row[name]);
$comment=htmlspecialchars($row[comment]);
echo "<tr>";
echo "<td width=60><font color=#336699>$name</font></td>";
echo "<td><font color=#336699>::$comment</font></td>";
echo "</tr>";
echo "<tr>";
echo "<td colspan=2 align=right bgcolor=white><font color=#336699>ip ADDress :: $row[uip]</font></td>";
echo "</tr>";
}
echo "</table>";
mysql_close();
?>
<?
echo ("
<form method=post action=up_car555.php?year=$year&month=$month&today=$today onSubmit="return content_check(this)">
");
?>
<table border=0 cellpadding=1 cellspacing=1>
<tr>
<td width=100 height=20 align=left>
<font color=green size=2 face=돋움>User_name</font>
</td>
<td width=250 height=20 align=left>
<input type=text name=name size=10 maxlength=12>
</td>
</tr>
<tr>
<td width=100 height=20 align=left>
<font color=green size=2 face=돋움>오늘의 일정 </font>
</td>
<td width=250 height=20 align=left>
<input type=text name=name size=50 maxlength=40>
</td>
</tr>
<tr>
<td width=100 height=20 align=left>
</td>
<td width=250 height=20 align=left>
<input type=image src=http://myhome.naver.com/suhoi/images/vot2.phg alt="올리기">
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>