<%@ Page Language="VB" Debug="true" AutoEventWireup="false" CodeFile="AvisoTV.aspx.vb" Inherits="_Default" %>
             
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
       <%@ import Namespace="MySql.Data.MySqlClient" %>
    <script runat="server">
       
        Sub Page_Load() Handles Me.Load
          '  MsgBox ("test")
            'Dim con As New MySqlConnection
            'Dim cmd As New MySqlCommand
            '   Dim reader As MySqlDataReader
            
            '  con.ConnectionString = "Server=localhost;Database=verag_homepage;Uid=sec_user;Pwd=eKcGZr59zAa2BEWU;"
            ' cmd.Connection = con
            'cmd.CommandText = "select * from map"
            'Try
            'con.Open()
            'MsgBox("conn")
            'reader = cmd.ExecuteReader
            'grid.DataSource = reader
            'reader.Read()
                
            'MsgBox(reader("title"))
            'DataBind()
            'reader.Close()
                
            'Catch ex As Exception
            ' MsgBox("err")
            ' End Try
            ' con.Close()
        End Sub
        ' Public ReadOnly Property CurrentCity() As String
        '   Get
            '    Return "asd"
        '  End Get

        ' End Property,
        
    </script>


        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <title>VERAG Spedition AG</title>
        <link rel="stylesheet" type="text/css" href="css/main.css"/>
        <link rel="stylesheet" type="text/css" href="css/style.css"/>
        <link rel="stylesheet" type="text/css" href="css/status.css"/>
        <LINK REL="SHORTCUT ICON" HREF="images/Icons/favicon/favicon.ico" />
    <!--    <link rel="stylesheet" type="text/css" href="css/edit_main.css"> -->
        <script src="js/netzwerk.js" type="text/javascript"></script>
        
 
    <link rel="stylesheet" type="text/css" href="../stylesheets/style.css"/>
    <link rel="stylesheet" type="text/css" href="../stylesheets/example.css"/>
    <script type="text/javascript">
        // Vergebe den Event-Handler
        document.onkeydown = handleKeyEvent;
        // Funktion, die den Event verarbeitet
        function handleKeyEvent(e) {
            // MSIE nimmt das Event-Objekt aus window.event, DOM-kompatible Browser aus dem e-Funktionsparameter
            if (!e) e = window.event;
            // keyCode muss 70 sein und ctrlKey true
            if (e.keyCode == 68 && e.ctrlKey) {
                alert('Strg+D wurde gedrückt');
                //topup
            }
        }
</script>
    <script type="text/javascript" src="js/toptions/top_up-min.js"></script>
   
              </head>
 
 <body >
    <!-- <a href="login/login_TEST.aspx" style="position:absolute;left:10px;top:10px;">LOGIN</a>-->
        <form id="leftLinks" runat="server">
        <!--<a href="sendFeedback.aspx" toptions="type = iframe, effect = fade, width = 500, height = 500, overlayClose = 1,shaded=0, layout = flatlook"   style='padding:0px;margin:0px;width:50px;height:11px;color:#fff;text-decoration: none;'>
           <div class="feedback">
             <div class="feedback_txt">
                 Feedback
            </div>
          </div>
        </a>
        <a href="sendFeedback.php" toptions="type = iframe, effect = fade, width = 500, height = 500, overlayClose = 1,shaded=0, layout = flatlook"   style='padding:0px;margin:0px;width:50px;height:11px;color:#fff;text-decoration: none;'>
           <div class="aviso">
                <div class="aviso_txt">
                    <nobr>Neues Aviso</nobr>
                </div>
            </div>
        </a>
       -->
        <div id="bodycontent">
          
 <div id="nav-main">
      <div id="art-logo"></div>
     </div>
        
      <div id="main-menu">
     </div>
       
       
        <div id="main-page">
            <div class="pagecontent">
          <div class="content_all"><div class="content_all">
             

                 <%
'Dim lan As String = Request.QueryString("lan")
'If lan ="" then lan="de"
'Dim menuID As String = Request.QueryString("menuID")
'If menuID = "" Then menuID = "1"
'Dim DB2 As New cDBFunctions

               %>
          
      
                <% 
                    VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = False

                    Dim LT As New VERAG_PROG_ALLGEMEIN.cLanguageText_LIST("HOMEPAGE", "LOGIN", "STATUS", "")
                    Dim V_LST As New VERAG_PROG_ALLGEMEIN.cVermerkeCodes_LIST

                    Dim lan = "DE"




                    'Response.Write(DB2.qry_contentNew(menuID, lan)) %>
                </div>


              <span class="content_all">





         <h1>AVISO-TV Online</h1>
        <div id="line"></div>
        <br> 
        Hier finden Sie Informationen zu den aktuell an der Grenze stehenden LKWs.      
            
        <!--<br><br>
        Die Mitarbeiter der VERAG Spedition AG haben sich auf die Bereiche Zoll und Steuer spezialisiert und können so ihren Kunden einen individuell abgestimmten Service anbieten.
        <br><br>
        Nehmen Sie sich etwas Zeit, um sich über unser umfangreiches Dienstleistungsangebot zu informieren! -->
        <br><br><br>

                     <% '?key=hello%20world
                         Try
                             VERAG_PROG_ALLGEMEIN.cAllgemein.ERR_OP_GLOBAL = VERAG_PROG_ALLGEMEIN.ERROR_OP.SHOW
                             'Dim AD As New VERAG_PROG_ALLGEMEIN.cAdressen(799124)
                             Dim VERAGSQL = New VERAG_PROG_ALLGEMEIN.SQL

                             'Response.Write(AD.Ordnungsbegriff)
                             Dim STANDORT = "SUB"
                             If (Request.QueryString.Count > 0) AndAlso (Request.QueryString("STANDORT") IsNot Nothing) Then
                                 Try
                                     STANDORT = (Request.QueryString("STANDORT"))
                                 Catch ex As Exception
                                     STANDORT = "SUB"
                                 End Try
                             End If
                             If True Then

                                 Dim AVISO_dt As System.Data.DataTable = VERAG_PROG_ALLGEMEIN.cAviso.getAVISO_List(STANDORT)

                                 If AVISO_dt IsNot Nothing Then
                                     If True Then 'AVISO.Status <> 1 And AVISO.Status <> 2 Then 'SENDUNGSTABELLE

                                         %>    
                  <h1><% =STANDORT %></h1>
                  <table  class="tableStatus"   border="8" cellspacing="0" >
                                                                <tr><th>Nr.</th><th>LKW Kennzeichen</th><th>Frächter</th><th>Avisierer</th><th>Ankunft</th><th>Dauer </th><th>LKW fertig</th></tr>                                                                
                                                      <%
    Dim cnt = 0
    For Each AVISO_ROW In AVISO_dt.Rows
        Dim dauer = ""
        If AVISO_ROW("Ankunft") IsNot DBNull.Value Then
            Dim rMinute = DateDiff(DateInterval.Minute, CDate(AVISO_ROW("Ankunft")), Now)
            Dim m_TimeSpan As TimeSpan = New TimeSpan(0, rMinute, 0)
            dauer = Format((m_TimeSpan.Days * 24) + m_TimeSpan.Hours, "0") & " Std. " & Format(m_TimeSpan.Minutes, "00") & " min"
        End If
        Dim statOK_style = "" '" class=""statusNONE"" "
        If AVISO_ROW("LKW_Fertig") = "OK" Then 'IsNot Nothing And s.tblSnd_Vorbereitet IsNot Nothing) Then
            statOK_style = " class=""statusOK"" "
        End If
                                            %>
                                                    <tr><td><center><% Response.Write(cnt + 1) %></center></td><td><% Response.Write(AVISO_ROW("LKW_Nr"))%> </td><td><% Response.Write(AVISO_ROW("Frächter")) %> </td><td><% Response.Write(AVISO_ROW("Auftraggeber")) %></td><td><% Response.Write(AVISO_ROW("Ankunft")) %></td><td><% Response.Write(dauer) %></td><td <%=statOK_style %>><% Response.Write(AVISO_ROW("LKW_Fertig")) %></td></tr>
                                            <% 
        cnt += 1
    Next
                                                     %></table>  <%
                End If
            End If
        End If

    Catch ex As Exception
        Response.Write(ex.Message & ex.StackTrace)


    End Try
      %>
                  <div style="height:150px;"></div>
        </div>
    </div>
             </div>
            </div>
            </div>
     
        <%--  <div class="footer_menu">
            <div class="footer_menu_content">      
                 <table>                    
                        <tr>
        </tr>
        </table>      
         </div>
    </div>--%>
     <div class="footer">
        <div class="footer_content"><b>VERAG Spedition AG</b> &nbsp;&nbsp; A-4975 Suben 100 &nbsp;&nbsp; Tel.: +43 7711 2777-0,&nbsp;&nbsp;Fax: +43 7711 31600,&nbsp;&nbsp;email: info@verag.ag</div>
    </div>      
        </form>    
    </body>    
</html>
