Notice
Recent Posts
Recent Comments
Link
250x250
«   2025/01   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
Tags more
Archives
Today
Total
관리 메뉴

혼자서 앱 만드는 개발자 함께하는 AI 세상

[쇼핑몰관리] 월별 주문 수량 집계화면 본문

시트메타 백엔드 노코드 플랫폼 시스템

[쇼핑몰관리] 월별 주문 수량 집계화면

혼앱사 2022. 9. 14. 21:54
반응형


<?
$g4_path ="./";
include './_comm.php';
session_start();
$g4_path =".";

if($_SESSION["user_name"] == null ){

Header("Location:./login.php?msite={$msiteName}");
print_r($_SESSION); // 모든 세션 변수의 정보를 연관 배열 형태로 보여줌.
}



$site = $msiteName; //


?>


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, ial-scale=1, shrink-to-fit=no" />
<meta name="description" content="" />
<meta name="author" content="" />
<title><?echo $SITE['siteName']?> </title>
<link href="https://cdn.jsdelivr.net/npm/simple-datatables@latest/dist/style.css?12314r123123121111" rel="stylesheet" />
<link href="css/styles.css?220424" rel="stylesheet" />
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" crossorigin="anonymous"></script>
<script src="js/scripts.js?ver=202208050001"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.8.0/Chart.min.js" crossorigin="anonymous"></script>



<link rel="stylesheet" type="text/css" href="./js/ax5layout.css">
<link rel="stylesheet" type="text/css" href="./js/ax5grid.css?ver=20220423802">
<link rel="stylesheet" href="./js/font-awesome.min.css">
<link rel="stylesheet" href="./js/ax5calendar.css">
<link rel="stylesheet" href="./js/ax5picker.css?ver=20220226002">
<link rel="stylesheet" type="text/css" href="./js/ax5select.css">
<link rel="stylesheet" type="text/css" href="./js/ax5docker.css?ver=20220421801"/>
<link href="./js/multiple-select.min.css" rel="stylesheet">
<script type="text/javascript" src="./js/jquery.min.js"></script>
<script type="text/javascript" src="./js/ax5core.js"></script>
<script type="text/javascript" src="./js/ax5grid.js"></script>
<script type="text/javascript" src="./js/ax5calendar.js?220424"></script>
<script type="text/javascript" src="./js/ax5formatter.min.js"></script>
<script type="text/javascript" src="./js/ax5picker.min.js"></script>
<script type="text/javascript" src="./js/ax5select.js"></script>
<script src="./js/ax5menu.js"></script>
<script type="text/javascript" src="./js/ax5docker.js?ver=20220421801"></script>
<script type="text/javascript" src="./js/ax5binder.min.js"></script>
<script src="./js/multiple-select.min.js"></script>
<style type="text/css">
body {
margin: 10px;
padding: 10px;
font-family: sans-serif;
font-size: small;
}
h1 {
font-family: sans-serif;
color: #0068B8;
}

li.LOCKED {
font-weight: bold;
}

div {
margin: 0px;
padding: 0px;
font-family: sans-serif;
font-size: small;
margin-left: 0px;
}

.gridJ {
margin: 0px;
padding: 0px;
font-family: sans-serif;
font-size: small;
margin-left: 0px;
}
table.type11 {
font-size: 12px;
border-collapse: separate;
border-spacing: 1px;
text-align: center;
line-height: 1.0;
margin: 5px 5px;
}
table.type11 th {
font-size: 10px;
width: 10%;
padding: 1px;
font-weight: bold;
vertical-align: center;
color: #fff;
background: #ce4869 ;
text-overflow:ellipsis;
overflow:hidden;
}
table.type11 td {
width: 10%;
padding: 2px;
vertical-align: center;
text-align: left;
border-bottom: 1px solid #ccc;
background: #eee;
}




div.type11 {
border-collapse: separate;
border-spacing: 1px;
text-align: left;
line-height: 1.0;
margin: 5px 5px;
}


.readonly {
background-color: #ccc;
}

.grid-cell-red{
background: #f8d2cb;

}
.grid-cell-blue{
background: #dcf0f8;

}

.grid-cell-red2{
background: #FA8072;

}


.grid-cell-white{

}

.grid-cell-red_font{
color: red;
font-weight: bold;

}
.grid-cell-black_font{
color: black;

}




</style>



<script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/js/all.min.js" crossorigin="anonymous"></script>









</head>
<body class="sb-nav-fixed">


<?php include 'top.php'; ?>
<div id="layoutSidenav">
<div id="layoutSidenav_nav">
<nav class="sb-sidenav accordion sb-sidenav-dark" id="sidenavAccordion">
<div class="sb-sidenav-menu">

<?php include 'leftmenu.php'; ?>
</div>
<div id="layoutSidenav_content">
<main>






<script type="text/javascript" >
var today = new Date();//오늘 날짜
let buy = 2000;
let confirm = 3000;
let cancel = 5000;

function prevClaendar(){//이전 달력
today = new Date(today.getFullYear(), today.getMonth()-1,today.getDate());
buildCalendar();
getMonth(today);
}
//다음 달력을 오늘을 저장하고 달력에 뿌려줌
function nextCalendar(){
today = new Date(today.getFullYear(), today.getMonth()+1,today.getDate());
buildCalendar();

getMonth(today);


}
function buildCalendar(){
var nMonth = new Date(today.getFullYear(),today.getMonth(),1);// 이번달의 첫번째날
var lastDate =new Date(today.getFullYear(),today.getMonth()+1,0);//이번달의 마지막날
var tblCalendar =document.getElementById("calendar"); //테이블 달력을 만드는 테이블
var tblCalendarYM =document.getElementById("calendarYM"); ///XXXX년도XX월 출력
tblCalendarYM.innerHTML = today.getFullYear()+"년"+(today.getMonth()+1)+"월";

//기존에 테이블에 잇던 달력 내용 삭제
while(tblCalendar.rows.length>2){
tblCalendar.deleteRow(tblCalendar.rows.length -1);
}
var row = null;
row =tblCalendar.insertRow();
var cnt =0;
// 1일이 시작되는 칸을 맞추어줌

for ( i=0; i <nMonth.getDay(); i++) {
cell =row.insertCell();
cnt = cnt + 1;
}
//달력 출력
for(i=1; i<=lastDate.getDate(); i++){
cell =row.insertCell();
cell.innerHTML = i+ ` `;
cell.id =i;
cell.style="color: ;vertical-align: top;width:100px;height:100px";
cnt = cnt + 1;
if (cnt%7 == 0) //1주=7일
row = calendar.insertRow();

}
}








</script>

<table id="calendar" class="type11" border="1" width="1000" height="600" >
<tr style="height:50px" >
<th align ="center"> <label onclick="prevClaendar()">이전달</label> </th>
<th colspan="5" id="calendarYM">yyyy년 m월</th>
<th align ="center" > <label onclick="nextCalendar()" >다음달</label> </th>
</tr>

<tr style="height:50px">
<th align="center">일</th>
<th align="center">월</th>
<th align="center">화</th>
<th align="center">수</th>
<th align="center">목</th>
<th align="center">금</td>
<th align="center">토</th>
</tr>

</table>

<!--js에서 만든 buildCalendar(); 함수를 테이불 밑에 붙이면 완성된다
테이블 전체 테두리가 안되는것과 마지막일 다은 공란이 안생기는 점이 보안
해야한다-->
<!-- <script type="text/javascript">
buildCalendar();
</script>
컨트롤 하는것을 모르겠다 -->

<script type="text/javascript" >

buildCalendar();
</script>



<script src="https://code.jquery.com/jquery-2.2.4.min.js"></script>

<script>

function getToday(){
var date = new Date();
var year = date.getFullYear();
var month = ("0" + (1 + date.getMonth())).slice(-2);
var day = ("0" + date.getDate()).slice(-2);

return year + month + day;
}

function getToday2(date){
var year = date.getFullYear();
var month = ("0" + (1 + date.getMonth())).slice(-2);
var day = ("0" + date.getDate()).slice(-2);

return year + "-" + month ;
}



function getMonth(targetMonth){


$.ajax({
url: "https://iukj.cafe24.com/msite_test/dao/stateDao.php?month="+getToday2(targetMonth),
cache: false
})
.done(function(data, textStatus, jqXHR) {
$("#content").html(data);
data.forEach(element => {
let date3 = new Date(element.mb1);

if(element.mb4 =="") $("td[id="+date3.getDate()+"]").append("<BR><BR>미 지 정 ["+element.cnt+"]");
else $("td[id="+date3.getDate()+"]").append("<BR><BR>"+element.mb4+" ["+element.cnt+"]");

console.log(date3.getDate());

}


);





})
.fail(function(jqXHR, textStatus, errorThrown){
console.log("fail: ", jqXHR);
})
.always(function(data, textStatus, jqXHR){
console.log("always: ", data);
});

}

getMonth(new Date());
</script>




</main>



<?php include 'footer.php'; ?>
</div>
</div>








728x90
반응형
Comments