|
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17 System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64 User : nobody ( 99) PHP Version : 5.2.17 Disable Function : NONE Directory : /home/queenjbs/yuchun/ |
Upload File : |
<?
include"inc_top.php";
$tableName = "board_schedule";
$oneMonthDay =date("Y-m-d", strtotime("-1 month", time())); // 전 달
$QUERY_PAGE = "SELECT year,month FROM $tableName where is_secret='' and schedule_date >= '$oneMonthDay' GROUP BY SUBSTRING(schedule_date, 1, 7 )";
$result= mysql_query($QUERY_PAGE);
$total = mysql_affected_rows();
if(!$total)
{
$SCH_LS = "<div class='post' style='text-align:center;'>情報がありません。</div>";
}
else
{
for($i=0; $i<$total; $i++)
{
$row = mysql_fetch_array($result);
$tmp_year =$row[year];
$tmp_month =$row[month];
switch ($tmp_month) {
case "1":
$month_name ="January";break;
case "2":
$month_name ="February";break;
case "3":
$month_name ="March";break;
case "4":
$month_name ="April";break;
case "5":
$month_name ="May";break;
case "6":
$month_name ="June";break;
case "7":
$month_name ="July";break;
case "8":
$month_name ="August";break;
case "9":
$month_name ="September";break;
case "10":
$month_name ="October";break;
case "11":
$month_name ="November";break;
case "12":
$month_name ="December";break;
}
$SUB_QUERY_PAGE = "SELECT schedule_date FROM $tableName where is_secret='' and year='$tmp_year' and month='$tmp_month' and schedule_date >= '$oneMonthDay' GROUP BY schedule_date ";
$results= mysql_query($SUB_QUERY_PAGE);
unset($day_list);
while ($rows = mysql_fetch_array($results)) {
$tmp_day = explode("-",$rows[schedule_date]);
//내용
$SUB2_QUERY_PAGE = "SELECT subject,sub_content FROM $tableName where is_secret='' and schedule_date= '$rows[schedule_date]' ORDER BY schedule_date ,no";
$results2= mysql_query($SUB2_QUERY_PAGE);
unset($day_contents);
while ($rows_con = mysql_fetch_array($results2)) {
$day_contents .="
<li class='name'>$rows_con[subject]</li>
<li class='time'>$rows_con[sub_content] </li>
";
}
$day_list .="
<div class='schedule-item'>
<ul class='to-do'>
<li class='day'>$tmp_day[2]</li>
$day_contents
</ul>
</div>
";
}
$SCH_LS .= "
<div class='schedule-section'>
<div class='schedule-y-m'>
<div class='date_tit_le'>$tmp_year</div>
<div class='date_tit_mi'>$month_name</div>
</div>
<div class='schedule-list'>
$day_list
</div>
</div>
";
}
}
?>
<SECTION>
<ARTICLE class="article_news">
<div class="article_news_area">
<style>
/*서브 스케줄페이지*/
.schedule-item { display:inline-block; width:248px; margin:0 10px 30px 10px; -webkit-transition:background-color 100ms ease-out; -moz-transition:background-color 100ms ease-out; -o-transition:background-color 100ms ease-out; transition:background-color 100ms ease-out; vertical-align:top; }
.schedule-item .to-do { display:block; width:248px; }
.schedule-item .day { height:46px; font-size:3.5em; font-weight:bold; color:#c5c6cb; text-align:center; border-top:1px solid #CCC; border-bottom:1px solid #CCC;}
.schedule-item .name { color:rgb(44, 44, 44); font-size:1em; font-weight:600; padding:5%; border-bottom:1px solid #CCC; line-height:20px; text-align:left; }
.schedule-item .time { color:rgb(44, 44, 44); font-size:1em; padding:5%; line-height:20px; text-align:left; }
@media only screen and (min-width:1160px)
{
.schedule-section { display:block; width:1140px; margin:50px 10px 0 10px; }
.schedule-section .schedule-y-m { display:inline-block; width:285px; height:89px; padding-left:10px; border:1px solid #CCC; border-left:none; border-right:none; vertical-align:top; }
.schedule-y-m .date_tit_le { display:inline-block; width:2%; min-width:17px; max-width:20px; color: rgb(162, 162, 162); font-size:1.5em; font-weight:bold; text-align:right; margin-top:25px; letter-spacing:-1px; padding-right:5px; writing-mode: vertical-rl; writing-mode: vertical-rl; writing-mode: tb-rl (or vertical-rl) writing-mode: tb-lr; -webkit-writing-mode: tb-lr; -ms-writing-mode: tb-lr; }
.schedule-y-m .date_tit_mi { display:inline-block; width:12%; min-width:75px; max-width:80px; color: rgb(0, 0, 0); font-size:4em; font-weight:bold; }
.schedule-section .schedule-list { display:inline-block; width:820px; margin-left:20px; }
}
@media only screen and (max-width:1159px)
{
.schedule-section { display:block; width:96%; margin:3% 2% 0 2%; }
.schedule-section .schedule-y-m { width:97%; height:89px; margin:0 10px 0 10px; padding-left:10px; border:1px solid #CCC; border-left:none; border-right:none; }
.schedule-y-m .date_tit_le { display:inline-block; width:2%; min-width:17px; max-width:20px; color: rgb(162, 162, 162); font-size:1.5em; font-weight:bold; text-align:right; margin-top:25px; letter-spacing:-1px; padding-right:5px; writing-mode: vertical-rl; writing-mode: vertical-rl; writing-mode: tb-rl (or vertical-rl) writing-mode: tb-lr; -webkit-writing-mode: tb-lr; -ms-writing-mode: tb-lr; }
.schedule-y-m .date_tit_mi { display:inline-block; width:12%; min-width:75px; max-width:80px; color: rgb(0, 0, 0); font-size:4em; font-weight:bold; }
.schedule-section .schedule-list { margin:0 auto; width:100%; display:block; padding:30px 0 30px 0; }
}
</style>
<script>
<!--
$(document).ready(function()
{
main_she_resize();
})
$(window).resize(function()
{
main_she_resize();
})
function main_she_resize()
{
var wid_width = window.document.body.offsetWidth;
if( wid_width < 1130)
{
if( 820 < wid_width && 1130 > wid_width )
{
$(".schedule-list").css({"width":820+"px"});
}
if( wid_width < 820 )
{
$(".schedule-list").css({"width":545+"px"});
}
if( wid_width < 545 )
{
$(".schedule-list").css({"width":250+"px"});
}
}
else
{
$(".schedule-list").css({"width":820+"px"});
}
}
-->
</script>
<div class="sub_con_ar">
<div class="con_tit"><img src="../images/sub/sub_tit_03.jpg" /></div>
<?=$SCH_LS?>
</div>
</ARTICLE>
</SECTION>
<?
include"inc_bottom.php";
?>
<!-- MOUSE ACTION -->
</body>
</html>