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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113
| <%@ language="JScript" %>
<script language="javascript" runat="server"></script>
<%
var cn = Server.CreateObject("ADODB.Connection");
var ProvStr = "Provider=SQLNCLI10; Data Source=sql3; Initial Catalog=BarForce; Integrated Security=SSPI;"
cn.Open(ProvStr);
var sql = cn
var today = new Date();
var today_getDay = today.getDay();
var yesterday = new Date(today);
var yesterday_getDay = 1;
if (today_getDay==1){
yesterday_getDay =3;
} my_month = my_month + 1;
function change_Date_Format_Field(myField_Date)
{
if (myField_Date == null || myField_Date == "")
return "";
strQuery = "RIGHT(REPLICATE('0', 2) + CAST(DATEPART(DAY,"+ myField_Date +") AS varchar(2)), 2) + '.' +"
+ "RIGHT(REPLICATE('0', 2) + CAST(DATEPART(MONTH, "+ myField_Date +") AS varchar(2)), 2) + '.' + "
+ "CAST(YEAR("+ myField_Date +") AS VARCHAR(4)) +' '+ "
+ "Convert(varchar(5), "+ myField_Date +", 108) "
return strQuery;
}
var myColorGreen = "#73bf26";
var myColorRed = "#d13426";
%>
<html>
<head>
<title>chayns® Live App-Infos</title>
<style>
p {
margin: 0px;
font-family: Arial;
font-size: 14px;
}
.small_text {
font-size: 13px;
color: #8c8c8c;
}
</style>
</head>
<body style=" margin: 0px; background-color: #edf0f2;">
<div style="width: 100%; background-color: #5798d9; height: 40%;">
<div style="; width: 1220px; height: 540px; top: 50%; left: 50%; margin-top: -300px; margin-left: -610px; border: #cccccc 0px solid;">
<div style="; width: 286px; height: 26px; left: 50%; margin-top: 20px; margin-left: -143px; background-image: url('allinfos_title.png');"></div>
<div style="float: left; width: 280px; height: 415px; margin-top: 15px; margin-left: 35px; background-image: url('karte.png');">
<div style="; width: 50px; height: 50px; left: 50%; margin-left: -25px; margin-top: 20px; background-image: url('icon_apple.png');"></div>
<p style="margin-top: 9px; color: #8c8c8c;" align="center"><b>Letzte App hochgeladen</b></p>
<p style="margin-top: 6px; color: #73bf26;" align="center"><b>
<%
var sub_query = change_Date_Format_Field("iOS_EndTime");
strQuery_Datum_Formiert = "SELECT TOP 1" + sub_query + "FROM ChaynsProductionStatus (NOLOCK) WHERE iOS_EndTime IS NOT NULL ORDER BY iOS_EndTime DESC";
var rs = sql.execute(strQuery_Datum_Formiert)
if (!rs.EOF) {
var myValue_Datum_Formatiert = rs(0) + "";
rs.movenext();
}
var mySeconds = get_TimeLeft_to_now (myValue_Datum_Formatiert);
var str_full_mySeconds = secondsToString(mySeconds);
if (str_full_mySeconds[1] == "green") { Response.Write("<span>"); }
if (str_full_mySeconds[1] == "red") { Response.Write("<span style='color: #d13426;'>");}
Response.Write(str_full_mySeconds[0]);
Response.Write("");
%>
</b></p>
<p style="margin-top: 9px; color: #8c8c8c;" align="center"><b>Telechargement journalier</b></p>
<p style="margin-top: 6px; color: #73bf26; font-size: 17px;" align="center"><b>
strQuery_today = "select COUNT(ITC_Status1) from SlitteApp where ITC_Status1 = 'Waiting For Review' AND CONVERT(date,ITC_LastModified1) >= Convert(date, GETDATE())";
rs = sql.execute(strQuery_today)
if (!rs.EOF) {
var myValue_Today= rs(0) + "";
rs.movenext();
}
strQuery_yesterday = "select COUNT(ITC_Status1) from SlitteApp where ITC_Status1 = 'Waiting For Review' AND CONVERT(date,ITC_LastModified1) >= Convert(date, GETDATE()-1) AND CONVERT(date,ITC_LastModified1) < Convert(date, GETDATE())";
if( today_getDay == 1){ strQuery_yesterday = "select COUNT(ITC_Status1) from SlitteApp where ITC_Status1 = 'Waiting For Review' AND CONVERT(date,ITC_LastModified1) >= Convert(date, GETDATE()-3) AND CONVERT(date,ITC_LastModified1) < Convert(date, GETDATE())";}
rs = sql.execute(strQuery_yesterday)
if (!rs.EOF) {
var myValue_yesterday= rs(0) + "";
rs.movenext();
}
Response.Write("");
Response.Write(myValue_yesterday +" / " + myValue_Today);
Response.Write("");
%>
</div>
</body>
</html> |
Partager