
<?php session_start();
include("./../config/config.php");  
include("./backend/validated_admin.php");
?>
   <!DOCTYPE html>
   <html lang="en">
      <head>
         <meta charset="UTF-8">
         <title>file Upload - iCouponWorld | Coupons | Discounts| Promo Codes</title>
         <meta http-equiv="X-UA-Compatible" content="IE=edge">
         <link id="favicon" rel="icon" type="image/x-icon" href="../images/web-images/home/favicon.png">
         <meta name="robots" content="index, follow" />
         <meta name="author" content="Design Collection">
         <meta name="description" content="If you have a question or a comment, please call us on +91 7987887047 (9.30am to 5.30pm. Monday to Saturday.) or email us">
      <meta name="keywords" content="contact us, reach us, email us, whatsapp us, call us">
      <link rel="canonical" href="text-file-upload.php"/>
         <!-- Viewport configuration, scaling options -->
         <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
         <!-- Bootstrap CSS -->
         <link href="../css/icouponworld.css" rel="stylesheet">
         <!-- CSS Stylesheet -->
         <link href="../css/dashboard.css" rel="stylesheet">
         <!-- Font Awesome icon -->
         <link href="../fontawesome/css/fontawesome.css" rel="stylesheet" />
         <!-- Roboto font  -->
         <link rel="preconnect" href="https://fonts.googleapis.com">
         <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
         <link href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;1,100;1,300;1,400;1,500;1,700&display=swap" rel="stylesheet">
		  <!-- CSS Stylesheet -->
		 
      <!-- DataTables Bootstrap CSS -->
      <link href="../css/dataTables.bootstrap5.min.css" rel="stylesheet">
         <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
         <!--[if lt IE 9]>
         <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
         <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
         <![endif]-->
      </head>
      <body>
         <!--unique id begin -->
         <div id="s_mm">
          
            <!--scroll-top Begin-->
            <div id="scroll-top">
               <!--sidebarwrapper Begin-->
               <div id="sidebarwrapper">
               <!--Sidebarmenu Begin-->
             <?php include("./includefiles/sidebar.php"); ?>
               <!--Sidebarmenu End-->
                  <!--content-wrapper Begin-->
                  <div id="content-wrapper" class="d-flex flex-column dashboard-navbar">
                     <div id="maincontent">
                           <!-- Navbar Topbar Begin-->
                               <?php include("./includefiles/header.php"); ?>
                           <!-- Navbar Topbar End-->
                         <!-- Support Begin-->
                        <div class="container-fluid px-4 row">
                         
						   <div class="col-md-6">
                              <div class="card border-0   mb-4">
                                 <div class="card-header bg-white border-bottom py-3">
                                    <h6 class="m-0 fw-bold text-inherit">Sitemap Auto Generate</h6>
                                 </div>
								 
                                 <div class="profile bg-white shadow mb-4 br-4 p-4">
                                    <div class="d-flex">
                                       
                                       <div class="flex-grow-1 ms-3">
                                        <!----  <h6 class="text-truncate fw-bold">xml File Upload Here</h6> ----->
                                          <div class="mb-1">
                                             <label for="formFile" class="form-label">Click Button to Generate Sitemap</label>
                                            
                                          </div>
                                          <a href="./sitemap.php" class="btn btn-primary my-1">Click to Generate</a>
                                       </div>

                                       <?php if($_SESSION["redirect-url"] != ""){?>
                                          <div class="mb-1">
                                          <a href="../sitemap.xml" target="_blank" class="btn btn-primary my-1">View Sitemap</a>
                                          </div>
                                          <?php }  unset($_SESSION["redirect-url"]) ?>
                                    </div>
                                 </div>
                              
							  
                              </div>
							  <?php
							
                                    if( $_SESSION['msg'] != ""){
										
							  ?>
							   <div class="alert alert-warning" role="alert">
                                <?php echo ($_SESSION['msg'] );?>
                                         </div>
                                
							  <?php 
							unset($_SESSION["msg"]);
							}?>
                           </div>
                           <div class="col-md-6">
                              <div class="card border-0  mb-4">
                                 <div class="card-header bg-white border-bottom py-3">
                                    <h6 class="m-0 fw-bold text-inherit">Text file Upload</h6>
                                 </div>
								 <form action="./upload-txt.php" method="post" enctype="multipart/form-data">
                                 <div class="profile bg-white shadow mb-4 br-4 p-4">
                                    <div class="d-flex">
                                       
                                       <div class="flex-grow-1 ms-3">
                                          <!-- <h6 class="text-truncate fw-bold">xml File Upload Here</h6> -->
                                          <div class="mb-1">
                                             <label for="formFile" class="form-label">Select text file</label>
                                             <input class="form-control" name="file" type="file">
                                          </div>
                                          <button type="submit"  name="submit" class="btn btn-primary my-4">Save</button>
                                       </div>
                                    </div>
                                 </div>
                              </form>
                              </div>
							  <?php
							
                                    if( $_SESSION['msgg'] != ""){
										
							  ?>
							   <div class="alert alert-warning" role="alert">
                                <?php echo ($_SESSION['msgg'] );?>
                                         </div>
                                
							  <?php 
							unset($_SESSION["msgg"]);
							}?>
                           </div>
                           <div class="col-md-6">
                              <div class="card border-0   mb-4">
                                 <div class="card-header bg-white border-bottom py-3">
                                    <h6 class="m-0 fw-bold text-inherit">ico file upload</h6>
                                 </div>
								 <form action="./upload-ico.php" method="post" enctype="multipart/form-data">
                                 <div class="profile bg-white shadow mb-4 br-4 p-4">
                                    <div class="d-flex">
                                       
                                       <div class="flex-grow-1 ms-3">
                                        <!----  <h6 class="text-truncate fw-bold">xml File Upload Here</h6> ----->
                                          <div class="mb-1">
                                             <label for="formFile" class="form-label">Select ico file</label>
                                             <input class="form-control" name="file" type="file">
                                          </div>
                                          <button type="submit" name="submit" class="btn btn-primary my-4">Save</button>
                                       </div>
                                    </div>
                                 </div>
                              </form>
							  
                              </div>
							              <?php 
                                        if( $_SESSION['msg-ico']!= ""){?>
                                   <div class="alert alert-warning" role="alert">
                                <?php echo ($_SESSION['msg-ico'] );?>
                                         </div>
                                
							  <?php 
							unset($_SESSION["msg-ico"]);
							}?>
                           </div>
                        </div>
                          </div>
                        <!-- Support End-->
                     
                  <!--Copyright Begin-->
               <?php include("./includefiles/footer.php"); ?>
                  <!--Copyright End-->
                  </div>
                  <!--content-wrapper End-->
               </div>
               <!--sidebarwrapper End-->
               <!--Scroll to top Begin-->
               <a class="scroll-to-top rounded" href="#scroll-top">
               <i class="fas fa-angle-up"></i>
               </a>
               <!--Scroll to top End-->
               <!-- Jquery Script Begin-->
               <script src="../js/jquery-3.4.1.min.js"></script>
                <!-- Jquery Script End-->
               <!-- Bootstrap Script Begin-->
               <script src="../js/bootstrap.bundle.min.js"></script>
                 <!-- Bootstrap Script End-->
               <!-- dashboard-icouponworld Script Begin-->
               <script src="../js/dashboard-icouponworld.js"></script>
                <!-- dashboard-icouponworld Script End-->
                <!-- dataTables.bootstrap5.min Script Begin-->
			   <script src="../js/dataTables.bootstrap5.min.js"></script>
              <!-- dataTables.bootstrap5.min Script End-->
             <!-- jquery.dataTables.min Script Begin-->
			   <script src="../js/jquery.dataTables.min.js"></script>
             <!-- jquery.dataTables.min Script End-->
            </div>
            <!--scroll-top End-->
         </div>
         <!--unique id End -->
      </body>
       <!-- Script for search table data in footer and xml file Submit Begin-->
	  <script>
         $(document).ready(function () {
         $('#affiliatecompany tfoot th, #merchant tfoot th, #company_wise tfoot th').each(function () {
         var title = $(this).text();
         $(this).html('<input type="text" class="form-control" placeholder="Search ' + title + '" />');
         
         });
         
         // DataTable
         
         var table = $('#affiliatecompany, #merchant , #company_wise').DataTable({
         searchPanes: true,
         initComplete: function () {
          // Apply the search
          this.api()
             .columns()
             .every(function () {
         
                var that = this;
                $('input', this.footer()).on('keyup change clear', function () {
                   if (that.search() !== this.value) {
                      that.search(this.value).draw();
                   }
                });
             });
         },
         });
         })
          $('#xmlfile').on("submit" ,function() {
			var filesname = $('#formFile').val();

			console.log(filesname);
		  })
		  $('#xmlfile').validate({
    rules: { inputimage: { required: true, extension: "xml", filesize: 1048576  }},
    messages: { inputimage: "File must be xml formate less than 1MB" }
});
      </script>
       <!-- Script for search table data in footer and xml file Submit End-->
   </html>
   