first git

This commit is contained in:
2021-07-06 10:03:36 +02:00
commit 7937ab972e
417 changed files with 18573 additions and 0 deletions

39
admin/addHp.aspx Normal file
View File

@@ -0,0 +1,39 @@
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="addHp.aspx.vb" Inherits="admin_InputBox" EnableEventValidation="false" %>
<!-- EnableEventValidation="false" - gegen Fehler-->
<!DOCTYPE html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title></title>
<link rel="stylesheet" type="text/css" href="../css/main.css"/>
<link rel="stylesheet" type="text/css" href="../css/style.css"/>
<link rel="shortcut_icon" type="image/x-icon" href="../images/Icons/favicon/favicon.ico"/>
<link rel="stylesheet" type="text/css" href="../css/edit_main.css"/>
<script type="text/javascript">
window.close();
<% If Not Page.Session("parentReload") Is Nothing Then%>
window.parent.location.href = "<%= Page.Session("parentReload")%>"
parent.TopUp.close()
<% End If %>
</script>
</head>
<body style="width:500px;height:200px;padding:0px;margin:0px;overflow-x: hidden;background-image:none" >
<div style="width:100%;height:20px;background-color: #003680;font-size:16px;color:white;padding:10px;" ><b>Neue Seite erstellen</b></div>
<form action="addHp.aspx" runat="server">
<div style="padding:10px;">
Bitte geben Sie den deutschen Bezeichner für die neue Homepage ein:<br />
<asp:TextBox ID="input" runat="server" Width="350px"></asp:TextBox><br /><br />
<asp:button runat="server" id="addPage" text="Seite erstellen" BorderStyle="Solid" Height="35px" />
&nbsp;&nbsp;
<asp:button runat="server" id="button1" text="Abbrechen" BorderStyle="Solid" Height="35px" OnClientClick="parent.TopUp.close()" />
</div>
</form>
</body>

66
admin/addHp.aspx.vb Normal file
View File

@@ -0,0 +1,66 @@

Partial Class admin_InputBox
Inherits System.Web.UI.Page
Public laenderkuerzel As String = "de"
Public menueId As Integer = 1
Private DB As New cDBADMINFunctions
Dim hp_content As hp_content = Nothing
Public Overrides Sub VerifyRenderingInServerForm(control As Control)
End Sub
'PreviousPage ????
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not IsPostBack Then 'ERSTES MAL
Page.Session("parentReload") = Nothing
Page.Session("close") = Nothing
' Page.Session("navParent") = "admin"
If Not Request.QueryString("lan") Is Nothing Then
laenderkuerzel = Request.QueryString("lan")
Else
laenderkuerzel = "de"
End If
If Not Request.QueryString("menuID") Is Nothing Then
menueId = Request.QueryString("menuID")
Else
menueId = 1
End If
hp_content = DB.qry_contentNew(menueId, laenderkuerzel)
Page.Session("hp_content") = hp_content
End If
End Sub
Protected Sub addPage_Click(sender As Object, e As EventArgs) Handles addPage.Click
Dim hp_content As hp_content = Nothing
hp_content = Page.Session("hp_content") 'sonst gehs ned, weil werte nicht geladfen sind
' Dim title = InputBox("Bitte geben Sie den deutschen Menü-Titel an:")
' System.Web.HttpContext.Current.Response.Write("<SCRIPT LANGUAGE=""JavaScript"">alert('Hello this is an Alert')</SCRIPT>")
Dim title As String = input.Text
If title <> "" Then
'Request.QueryString("menuID")
Dim menueId As Integer = -1
menueId = DB.insert_HPContentNew(hp_content, laenderkuerzel, title, hp_content.hp_id, hp_content.hp_instance)
'Page.Parent.Page.Response.Redirect("admin.aspx?menuId=" & menueId & "&lan=" & laenderkuerzel)
Page.Session("parentReload") = "admin.aspx?menuID=" & menueId & "&lan=" & laenderkuerzel
Else
MsgBox("Der Titel darf nicht leer sein!")
End If
End Sub
End Class

137
admin/admin.aspx Normal file
View File

@@ -0,0 +1,137 @@
<%@ Page Language="VB" Debug="true" ValidateRequest="false" AutoEventWireup="false" CodeFile="admin.aspx.vb" Inherits="admin_admin" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>HOMEPAGE ADMIN</title>
<link rel="stylesheet" type="text/css" href="../css/main.css"/>
<link rel="stylesheet" type="text/css" href="../css/style.css"/>
<link rel="SHORTCUT ICON" href="../images/Icons/favicon/favicon.ico" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<style type="text/css">
.admin_td {
width: 202px;
vertical-align:top
}
</style>
<script type="text/javascript" src="../js/toptions/top_up-min.js"></script>
<!--[if IE]>
<link rel="stylesheet" type="text/css" href="../css/main.css">
<![endif]-->
<!--[if IE 6]>
<link rel="stylesheet" type="text/css" href="../css/main.css">
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="../css/main.css">
<![endif]-->
<!--[if lte IE 5.5999]>
<link rel="stylesheet" type="text/css" href="../css/main.css">
<![endif]-->
<!--[if gte IE 5.5]>
<link rel="stylesheet" type="text/css" href="../css/main.css">
<![endif]-->
</head>
<body style="height:100%">
<form id="form1" runat="server">
<div id="bodycontent" style="height:100%">
<!-- #include file="..\navigation.aspx" -->
<div id="main-page" style="height:100%">
<div class="pagecontent" style="height:800px">
<div class='content_all' style="height:600px">
<br />
<h1 style="width:100%; border-bottom:1px solid #003688">ADMIN - HOMEPAGE BEARBEITUNG</h1>
<br />
<br />
<table style="width:100%;">
<tr>
<td class="auto-style1">Menü-Bezeichnung:</td>
<td class="auto-style2">Slogan (nur bei Hauptmenü):</td>
<td>Bild-Pfad:</td>
</tr>
<tr>
<td class="admin_td">
<asp:TextBox ID="txtMenueBez" runat="server" Width="100%"></asp:TextBox>
</td>
<td class="admin_td">
<asp:TextBox ID="txtMenueSlogan" runat="server" Width="100%"></asp:TextBox>
</td>
<td class="admin_td">
<asp:TextBox ID="txtMenueIMGPfad" runat="server" Width="100%"></asp:TextBox>
</td >
<td class="admin_td" rowspan="2">
<asp:Image ID="picMenue" runat="server" height="50" width="100"/>&nbsp;
</td>
</tr>
<tr>
<td class="admin_td" colspan="2">
<nobr>Sprache:
<asp:DropDownList ID="Sprache" runat="server" OnSelectedIndexChanged="SpracheChanged" AutoPostBack="True">
<asp:ListItem Text="DE" Value="DE" />
<asp:ListItem Text="EN" Value="EN" />
<asp:ListItem Text="TR" Value="TR" />
<asp:ListItem Text="RO" Value="RO" />
<asp:ListItem Text="YU" Value="YU" />
<asp:ListItem Text="BG" Value="BG" />
</asp:DropDownList>
</nobr>
</td>
</tr>
<tr>
<td class="auto-style1">&nbsp;</td>
<td class="auto-style2">&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
<div class="content_66" style="height:100%;">
<asp:TextBox ID="txtContent" runat="server" Height="100%" Width="100%" TextMode="MultiLine"></asp:TextBox>
</div>
<div class="content_33" style="height:100%;">
<div style=" padding-left:40px">
<asp:Button ID="btnUpdate" runat="server" Text="Update" Width="60%" OnClick="Update_Click" /><br />
<br />
<a href="addHp.aspx?menuID=<%= menueId %>&lan=<%= laenderkuerzel %>" toptions="type = iframe, effect = fade, width = 500, height = 200, overlayClose = 1,shaded=0, layout = flatlook" style='padding:0px;margin:0px;width:50px;height:11px;color:#003688;text-decoration: none;'>
<input type="button" id="BtnAdd" runat="server" value="Unterseite erstellen" style="width:60%" /><br />
</a>
<br />
<a href="delHp.aspx?menuID=<%= menueId %>&lan=<%= laenderkuerzel %>" toptions="type = iframe, effect = fade, width = 500, height = 200, overlayClose = 1,shaded=0, layout = flatlook" style='padding:0px;margin:0px;width:50px;height:11px;color:#003688;text-decoration: none;'>
<input type="button" id="btnDel" runat="server" value="Diese Seite löschen" style="width:60%" /><br />
</a>
<br />
<br />
SQL:<br />
<asp:TextBox id="sqlText" runat="server" TextMode="MultiLine" style="width:100%; height: 200px">
</asp:TextBox>
<asp:Button id="btnDoSql" runat="server" Text="SQL ausführen" style="width:60%" /><br />
</div>
</div>
</div>
</div>
</div>
</div>
</form>
</body>
</html>

166
admin/admin.aspx.vb Normal file
View File

@@ -0,0 +1,166 @@

Partial Class admin_admin
Inherits System.Web.UI.Page
Private DB As New cDBADMINFunctions
Dim blocks As New List(Of cBlock)
Private margin_top As Integer = 20
Private margin_left As Integer = 20
Private top_value As Integer = 0
Private left_value As Integer = 0
Private rowmaxheight As Integer = 0
Private screenwidth As Integer = 1200
' Dim WithEvents fctbHTML As New FastColoredTextBox
Dim hp_content As hp_content = Nothing
Public laenderkuerzel As String = "de"
Dim hp_test As String = ""
Public menueId As Integer = 1
Dim WithEvents fctbHTML As New TextBox
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not Me.Page.User.Identity.IsAuthenticated Then
FormsAuthentication.RedirectToLoginPage()
End If
If Not Request.IsSecureConnection Then
' Response.Redirect(Request.Url.AbsoluteUri.Replace("http://", "https://").Replace("56551", "44300"))
End If
If Not IsPostBack Then 'ERSTES MAL
Page.Session("navParent") = "admin"
If Not Request.QueryString("lan") Is Nothing AndAlso Request.QueryString("lan").ToString <> "" Then
laenderkuerzel = Request.QueryString("lan")
Else
If laenderkuerzel = "" Then laenderkuerzel = "de"
End If
If Not Request.QueryString("menuID") Is Nothing AndAlso Request.QueryString("menuID").ToString <> "" Then
menueId = Request.QueryString("menuID")
Else
menueId = 1
End If
initHomepage()
Page.Session("hp_content") = hp_content
Try
Me.Sprache.SelectedValue = laenderkuerzel.ToUpper
Catch ex As Exception
End Try
End If
End Sub
Protected Sub Update_Click(sender As Object, e As EventArgs) Handles btnUpdate.Click ' Handles btnUpdate.Click
Dim hp_content As hp_content = Nothing
hp_content = Page.Session("hp_content") 'sonst gehs ned, weil werte nicht geladfen sind
hp_content.hp_content = txtContent.Text
hp_content.hp_imgPath = txtMenueIMGPfad.Text
hp_content.hp_title = txtMenueBez.Text
hp_content.hp_slogan = txtMenueSlogan.Text
laenderkuerzel = Request.QueryString("lan")
'If hp_content.hp_id >= 0 Then
DB.update_HPContentNew(hp_content, laenderkuerzel)
'Else
'End If
' initHomepage()
End Sub
Protected Sub SpracheChanged(sender As Object, e As EventArgs) Handles Sprache.SelectedIndexChanged
Response.Redirect("admin.aspx?menuId=" & Request.QueryString("menuID") & "&lan=" & Sprache.Text.ToLower)
End Sub
Protected Sub btnDoSql_Click(sender As Object, e As EventArgs) Handles btnDoSql.Click ' Handles btnUpdate.Click
If sqlText.Text <> "" Then
DB.doTheSql(sqlText.Text)
Else
End If
End Sub
Sub initHomepage()
Try
laenderkuerzel = Request.QueryString("lan")
hp_content = DB.qry_contentNew(menueId, laenderkuerzel)
If hp_content Is Nothing Then
hp_content = New hp_content
hp_content.hp_content = ""
hp_content.hp_id = menueId
' hp_content.hp_id = -1
End If
Catch ex As Exception
' MsgBox("ERR")
System.Web.HttpContext.Current.Response.Write("<SCRIPT LANGUAGE=""JavaScript"">alert('ERR: " & ex.Message & "')</SCRIPT>")
End Try
' Exit Sub
txtContent.Text = hp_content.hp_content.Replace("\r\n", vbNewLine)
txtMenueIMGPfad.Text = hp_content.hp_imgPath
txtMenueBez.Text = hp_content.hp_title
txtMenueSlogan.Text = hp_content.hp_slogan
Try
If hp_content.hp_imgPath <> "" Then
picMenue.ImageUrl = "../" & hp_content.hp_imgPath
End If
Catch ex As Exception
End Try
' btnDel.Enabled = False 'del
' BtnAdd.Enabled = False 'unter
If hp_content.hp_instance <> "" Then
' If hp_content.hp_instance > 0 Then btnDel.Enabled = True
' If hp_content.hp_instance < 2 Then BtnAdd.Enabled = True
End If
End Sub
Protected Sub BtnAdd_Click(sender As Object, e As EventArgs) 'Handles BtnAdd.Click
Exit Sub
Dim hp_content As hp_content = Nothing
hp_content = Page.Session("hp_content") 'sonst gehs ned, weil werte nicht geladfen sind
Dim title = InputBox("Bitte geben Sie den deutschen Menü-Titel an:")
' System.Web.HttpContext.Current.Response.Write("<SCRIPT LANGUAGE=""JavaScript"">alert('Hello this is an Alert')</SCRIPT>")
If title <> "" Then
MsgBox(laenderkuerzel)
'Request.QueryString("menuID")
menueId = DB.insert_HPContentNew(hp_content, laenderkuerzel, title, hp_content.hp_id, hp_content.hp_instance)
Response.Redirect("admin.aspx?menuId=" & menueId & "&lan=" & laenderkuerzel)
'initHomepage()
Else
MsgBox("Der Titel darf nicht leer sein!")
End If
End Sub
Protected Sub btnDel_Click(sender As Object, e As EventArgs) 'Handles btnDel.Click
Dim hp_content As hp_content = Nothing
hp_content = Page.Session("hp_content") 'sonst gehs ned, weil werte nicht geladfen sind
If vbYes = MsgBox("Möchten Sie wirklich diese Seite und allen Sprachen löschen?" & vbNewLine & "'" & hp_content.hp_title & "'", vbYesNoCancel) Then 'alle Unterseiten in
DB.deleteHpMenueAndContent(hp_content.hp_id)
End If
Response.Redirect("admin.aspx?menuId=1&lan=" & laenderkuerzel)
End Sub
End Class

41
admin/delHp.aspx Normal file
View File

@@ -0,0 +1,41 @@
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="delHp.aspx.vb" Inherits="admin_InputBox" EnableEventValidation="false" %>
<!-- EnableEventValidation="false" - gegen Fehler-->
<!DOCTYPE html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title></title>
<link rel="stylesheet" type="text/css" href="../css/main.css"/>
<link rel="stylesheet" type="text/css" href="../css/style.css"/>
<link rel="shortcut_icon" type="image/x-icon" href="../images/Icons/favicon/favicon.ico"/>
<link rel="stylesheet" type="text/css" href="../css/edit_main.css"/>
<script type="text/javascript" src="../js/toptions/top_up-min.js"></script>
<script type="text/javascript">
<% If Not Page.Session("parentReload") Is Nothing Then%>
window.parent.location.href = "<%= Page.Session("parentReload")%>"
parent.TopUp.close()
<% End If %>
</script>
</head>
<body style="width:500px;height:150px;padding:0px;margin:0px;overflow-x: hidden;background-image:none" >
<div style="width:100%;height:20px;background-color: #c00;font-size:16px;color:white;padding:10px;" ><b>Möchten Sie diese Seite wirklich löschen?</b></div>
<form action="delHp.aspx" runat="server">
<div style="padding:10px;">
<asp:button runat="server" id="addPage" text="JA - Seite löschen" style="margin-top: 0px;" BorderStyle="Solid" Height="35px" />
&nbsp;&nbsp;
<asp:button runat="server" id="button1" text="Nein" BorderStyle="Solid" Height="35px" Width="144px" OnClientClick="parent.TopUp.close()" />
</div>
</form>
</body>

51
admin/delHp.aspx.vb Normal file
View File

@@ -0,0 +1,51 @@

Partial Class admin_InputBox
Inherits System.Web.UI.Page
Public laenderkuerzel As String = "de"
Public menueId As Integer = 1
Private DB As New cDBADMINFunctions
Dim hp_content As hp_content = Nothing
Public Overrides Sub VerifyRenderingInServerForm(control As Control)
End Sub
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not IsPostBack Then 'ERSTES MAL
Page.Session("parentReload") = Nothing
Page.Session("close") = Nothing
' Page.Session("navParent") = "admin"
If Not Request.QueryString("lan") Is Nothing Then
laenderkuerzel = Request.QueryString("lan")
Else
laenderkuerzel = "de"
End If
If Not Request.QueryString("menuID") Is Nothing Then
menueId = Request.QueryString("menuID")
Else
menueId = 1
End If
hp_content = DB.qry_contentNew(menueId, laenderkuerzel)
Page.Session("hp_content") = hp_content
End If
End Sub
Protected Sub addPage_Click(sender As Object, e As EventArgs) Handles addPage.Click
Dim hp_content As hp_content = Nothing
hp_content = Page.Session("hp_content") 'sonst gehs ned, weil werte nicht geladfen sind
DB.deleteHpMenueAndContent(hp_content.hp_id)
Page.Session("parentReload") = "admin.aspx?menuID=1&lan=" & laenderkuerzel
End Sub
End Class