| Server IP : 199.79.62.161 / Your IP : 216.73.216.245 [ Web Server : Microsoft-IIS/10.0 System : Windows NT MDUS-PP-WB12 10.0 build 20348 (Windows Server 2022) AMD64 User : IWPD_5096(nirmaowd) ( 0) PHP Version : 8.3.30 Disable Function : NONE Domains : 0 Domains MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : D:/INETPUB/VHOSTS/nirmalamatha.edu.in/ponnuguruvayurappan.org/Admin/ |
Upload File : |
<%@ Page Title="" Language="C#" MasterPageFile="~/admin/Admin.master" AutoEventWireup="true" CodeFile="add_photogallery.aspx.cs" Inherits="admin_add_photogallery" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<div class="row">
<div class="col-md-12">
<h1 class="page-head-line">ADD/ EDIT PHOTO GALLERY</h1>
</div>
</div>
<br />
<div class="row">
<div class="col-sm-12">
<div class="portlet portlet-boxed">
<div class="portlet-header">
<h1 class="page-head-line">ADD PHOTO GALLERY
</h1>
</div>
<!-- /.portlet-header -->
<div class="portlet-body">
<div class="row">
<div class="col-sm-6">
<div class="form-group has-success">
<label class="control-label" for="success">Select Photo Gallery Group</label>
<asp:DropDownList CssClass="form-control" ID="DDL_PGGroup" AutoPostBack="true" OnSelectedIndexChanged="DDL_PGGroup_SelectedIndexChanged" DataSourceID="SDS_PGGroup" runat="server" ValidationGroup="ITEMS" DataTextField="GroupName" DataValueField="GID" AppendDataBoundItems="True">
<asp:ListItem Value="-1"> Select Photo Gallery Group </asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="DDL_PGGroup"
Display="Dynamic" ErrorMessage="Select Photo Gallery Group" ValidationGroup="ITEMS" InitialValue="-1" SetFocusOnError="True">*</asp:RequiredFieldValidator>
<asp:SqlDataSource ID="SDS_PGGroup" runat="server" ConnectionString="<%$ ConnectionStrings:myconnectionstring %>"
ProviderName="<%$ ConnectionStrings:myconnectionstring.ProviderName %>" SelectCommand="SELECT [GID], GroupName FROM [PHOTOGALLERYGROUPS] ORDER BY [GID] DESC"></asp:SqlDataSource>
</div>
<div class="form-group has-success">
<label class="control-label" for="success">Choose File</label>
<asp:FileUpload ID="FU_Attachments" runat="server" class="multi" />
</div>
<div class="form-group has-success">
<label class="control-label" for="success">Display Order</label>
<asp:TextBox ID="txt_DisplayOrder" class="form-control" runat="server"></asp:TextBox>
</div>
</div>
</div>
<div class="form-group has-success">
<asp:Label ID="lbl_messages" runat="server" Text=""></asp:Label>
<br />
<br />
<asp:Button ID="btnUpload" CssClass="btn btn-primary" ValidationGroup="ITEMS" runat="server" Text="UPLOAD" OnClick="btnUpload_Click" />
</div>
</div>
</div>
</div>
</div>
<div class="portlet portlet-boxed">
<br /><a name="msg"></a>
<div runat="server" id="div_msg" class="alert alert-success" style="text-align: center;vertical-align:middle;" ><strong><%=Request.QueryString["msg"] %></strong></div>
<br />
<div class="portlet-header">
<h1 class="page-head-line">VIEW/ EDIT PHOTO GALLERY
</h1>
</div>
<!-- /.portlet-header -->
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<asp:UpdateProgress ID="updateProgress" runat="server" DynamicLayout="true">
<ProgressTemplate>
<div id="divLoading" style="margin: 0px; padding: 0px; position: fixed; right: 0px; top: 0px; width: 100%; height: 100%; background-color: rgb(102, 102, 102); z-index: 30001; opacity: 0.8;">
<p style="position: absolute; color: White; top: 50%; left: 45%;">
<img src="/admin/img/apploading.gif">
</p>
</div>
</ProgressTemplate>
</asp:UpdateProgress>
<asp:UpdatePanel ID="UpdatePanel1" UpdateMode="Conditional" runat="server">
<ContentTemplate>
<a name="view" href="/default.aspx"></a>
<script language="javascript" type="text/javascript">
function SetScrollEvent() {
window.scrollTo(0, 0);
}
</script>
<div class="portlet-body">
<asp:Label ID="lbl_deletemessage" runat="server" Text=""></asp:Label>
<div class="table-responsive">
<asp:GridView ID="GV_PHOTOGALLERY" OnRowDeleted="GV_PHOTOGALLERY_RowDeleted" OnRowDeleting="GV_PHOTOGALLERY_RowDeleting" DataSourceID="ADS_DataSource" CssClass="table table-striped table-bordered table-hover ui-datatable" AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="PGID" UseAccessibleHeader="False" runat="server">
<Columns>
<asp:TemplateField HeaderText="Image">
<ItemStyle Width="150px" HorizontalAlign="Left" />
<HeaderStyle Font-Bold="true" HorizontalAlign="Left" />
<ItemTemplate>
<img width="150px" height="100px" src="https://<%#HttpContext.Current.Request.Url.Authority%>/assets/uploads/<%#Eval("Filename")%>" />
<asp:HiddenField ID="HF_DelFile" runat="server" Value='<%#Eval("Filename")%>' />
<a href="edit_photogallery.aspx?pgid=<%#Eval("PGID")%>" >EDIT</a>
<asp:Button ID="Button2" runat="server" CommandName="Delete" CausesValidation="false" OnClientClick="return confirm('Are you sure you want to delete?')" Text="DELETE" />
Display Order: <b><%#Eval("Display")%></b>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<EmptyDataTemplate>
<strong>NO PHOTO GALLERY FOUND</strong>
</EmptyDataTemplate>
</asp:GridView>
<asp:SqlDataSource ID="ADS_DataSource" runat="server"
ConnectionString="<%$ ConnectionStrings:myconnectionstring %>"
ProviderName="<%$ ConnectionStrings:myconnectionstring.ProviderName %>"
DeleteCommand="DELETE FROM [PHOTOGALLERY] WHERE (PGID = @PGID)">
<DeleteParameters>
<asp:Parameter Name="PGID" Type="Int32" />
</DeleteParameters>
</asp:SqlDataSource>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</asp:Content>