//Banner changes
    $('#banneradd').on('submit',function(e){
    e.preventDefault();
      var data = new FormData($('#banneradd')[0]);
        $.ajax({
              url : 'banner-add',
              type : 'post',
              data : data,
              dataType : 'json',
              cache: false,
              contentType: false,
              processData: false,
          })
        .done(function(html){
              if(html.msg == 'Inserted'){
                toastr.success('Banner has been created.', 'Success', { "closeButton": true },'Progress Bar', { "progressBar": true });
                  setTimeout(function(){ window.location.reload(); }, 1000);
              }else{
                toastr.error('Please try again after some time.', 'Error!', { "closeButton": true },'Progress Bar', { "progressBar": true });
              }
          })
     });
     
     
    $('#bannerupdate').on('submit',function(e){
    e.preventDefault();
      var data = new FormData($('#bannerupdate')[0]);
        $.ajax({
              url : 'banner-update',
              type : 'post',
              data : data,
              dataType : 'json',
              cache: false,
              contentType: false,
              processData: false,
          })
        .done(function(html){
          if(html.msg == 'updated'){
              toastr.success('Banner has been updated.', 'Success', { "closeButton": true },'Progress Bar', { "progressBar": true });
              setTimeout(function(){ window.location.href = "https://www.greatvalue.withupartners.com/admin/banner"; }, 1000);
          }else{
              toastr.error('Please try again after some time.', 'Error!', { "closeButton": true },'Progress Bar', { "progressBar": true });
            }
          })
    });
    
  //User Review changes  
    
    $('#partneradd').on('submit',function(e){
    e.preventDefault();
      var data = new FormData($('#partneradd')[0]);
        $.ajax({
              url : 'partners-add',
              type : 'post',
              data : data,
              dataType : 'json',
              cache: false,
              contentType: false,
              processData: false,
          })
        .done(function(html){
              if(html.msg == 'Inserted'){
                toastr.success('Partners has been created.', 'Success', { "closeButton": true },'Progress Bar', { "progressBar": true });
                  setTimeout(function(){ window.location.reload(); }, 1000);
              }else{
                toastr.error('Please try again after some time.', 'Error!', { "closeButton": true },'Progress Bar', { "progressBar": true });
              }
          })
     });
     
     
    $('#partnerupdate').on('submit',function(e){
    e.preventDefault();
      var data = new FormData($('#partnerupdate')[0]);
        $.ajax({
              url : 'partners-update',
              type : 'post',
              data : data,
              dataType : 'json',
              cache: false,
              contentType: false,
              processData: false,
          })
        .done(function(html){
          if(html.msg == 'updated'){
              toastr.success('Partners has been updated.', 'Success', { "closeButton": true },'Progress Bar', { "progressBar": true });
              setTimeout(function(){ window.location.href = "https://www.greatvalue.withupartners.com/admin/partners"; }, 1000);
          }else{
              toastr.error('Please try again after some time.', 'Error!', { "closeButton": true },'Progress Bar', { "progressBar": true });
            }
          })
    });
    
    
    
     $('#awardadd').on('submit',function(e){
    e.preventDefault();
      var data = new FormData($('#awardadd')[0]);
        $.ajax({
              url : 'awards-add',
              type : 'post',
              data : data,
              dataType : 'json',
              cache: false,
              contentType: false,
              processData: false,
          })
        .done(function(html){
              if(html.msg == 'Inserted'){
                toastr.success('Awards has been created.', 'Success', { "closeButton": true },'Progress Bar', { "progressBar": true });
                  setTimeout(function(){ window.location.reload(); }, 1000);
              }else{
                toastr.error('Please try again after some time.', 'Error!', { "closeButton": true },'Progress Bar', { "progressBar": true });
              }
          })
     });
     
     
    $('#awardupdate').on('submit',function(e){
    e.preventDefault();
      var data = new FormData($('#awardupdate')[0]);
        $.ajax({
              url : 'awards-update',
              type : 'post',
              data : data,
              dataType : 'json',
              cache: false,
              contentType: false,
              processData: false,
          })
        .done(function(html){
          if(html.msg == 'updated'){
              toastr.success('Awards has been updated.', 'Success', { "closeButton": true },'Progress Bar', { "progressBar": true });
              setTimeout(function(){ window.location.href = "https://www.greatvalue.withupartners.com/admin/awards"; }, 1000);
          }else{
              toastr.error('Please try again after some time.', 'Error!', { "closeButton": true },'Progress Bar', { "progressBar": true });
            }
          })
    });
    
    
    //Banner changes
    $('#testimonialadd').on('submit',function(e){
    e.preventDefault();
      var data = new FormData($('#testimonialadd')[0]);
        $.ajax({
              url : 'testimonial-add',
              type : 'post',
              data : data,
              dataType : 'json',
              cache: false,
              contentType: false,
              processData: false,
          })
        .done(function(html){
              if(html.msg == 'Inserted'){
                toastr.success('Testimonial has been created.', 'Success', { "closeButton": true },'Progress Bar', { "progressBar": true });
                  setTimeout(function(){ window.location.reload(); }, 1000);
              }else{
                toastr.error('Please try again after some time.', 'Error!', { "closeButton": true },'Progress Bar', { "progressBar": true });
              }
          })
     });
     
     
    $('#testimonialupdate').on('submit',function(e){
    e.preventDefault();
      var data = new FormData($('#testimonialupdate')[0]);
        $.ajax({
              url : 'testimonial-update',
              type : 'post',
              data : data,
              dataType : 'json',
              cache: false,
              contentType: false,
              processData: false,
          })
        .done(function(html){
          if(html.msg == 'updated'){
              toastr.success('Testimonial has been updated.', 'Success', { "closeButton": true },'Progress Bar', { "progressBar": true });
              setTimeout(function(){ window.location.href = "https://www.greatvalue.withupartners.com/admin/testimonial"; }, 1000);
          }else{
              toastr.error('Please try again after some time.', 'Error!', { "closeButton": true },'Progress Bar', { "progressBar": true });
            }
          })
    });
    
    
     $('#directoradd').on('submit',function(e){
    e.preventDefault();
      var data = new FormData($('#directoradd')[0]);
        $.ajax({
              url : 'director-add',
              type : 'post',
              data : data,
              dataType : 'json',
              cache: false,
              contentType: false,
              processData: false,
          })
        .done(function(html){
              if(html.msg == 'Inserted'){
                toastr.success('Director has been created.', 'Success', { "closeButton": true },'Progress Bar', { "progressBar": true });
                  setTimeout(function(){ window.location.reload(); }, 1000);
              }else{
                toastr.error('Please try again after some time.', 'Error!', { "closeButton": true },'Progress Bar', { "progressBar": true });
              }
          })
     });
     
     
    $('#directorupdate').on('submit',function(e){
    e.preventDefault();
      var data = new FormData($('#directorupdate')[0]);
        $.ajax({
              url : 'director-update',
              type : 'post',
              data : data,
              dataType : 'json',
              cache: false,
              contentType: false,
              processData: false,
          })
        .done(function(html){
          if(html.msg == 'updated'){
              toastr.success('Director has been updated.', 'Success', { "closeButton": true },'Progress Bar', { "progressBar": true });
              setTimeout(function(){ window.location.href = "https://www.greatvalue.withupartners.com/admin/director"; }, 1000);
          }else{
              toastr.error('Please try again after some time.', 'Error!', { "closeButton": true },'Progress Bar', { "progressBar": true });
            }
          })
    });
    
    
     $('#whychooseadd').on('submit',function(e){
    e.preventDefault();
      var data = new FormData($('#whychooseadd')[0]);
        $.ajax({
              url : 'why-choose-add',
              type : 'post',
              data : data,
              dataType : 'json',
              cache: false,
              contentType: false,
              processData: false,
          })
        .done(function(html){
              if(html.msg == 'Inserted'){
                toastr.success('Why Choose Us has been created.', 'Success', { "closeButton": true },'Progress Bar', { "progressBar": true });
                  setTimeout(function(){ window.location.reload(); }, 1000);
              }else{
                toastr.error('Please try again after some time.', 'Error!', { "closeButton": true },'Progress Bar', { "progressBar": true });
              }
          })
     });
     
     
    $('#whychooseupdate').on('submit',function(e){
    e.preventDefault();
      var data = new FormData($('#whychooseupdate')[0]);
        $.ajax({
              url : 'why-choose-update',
              type : 'post',
              data : data,
              dataType : 'json',
              cache: false,
              contentType: false,
              processData: false,
          })
        .done(function(html){
          if(html.msg == 'updated'){
              toastr.success('Why Choose Us has been updated.', 'Success', { "closeButton": true },'Progress Bar', { "progressBar": true });
              setTimeout(function(){ window.location.href = "https://www.greatvalue.withupartners.com/admin/why-choose"; }, 1000);
          }else{
              toastr.error('Please try again after some time.', 'Error!', { "closeButton": true },'Progress Bar', { "progressBar": true });
            }
          })
    });
    
    
    $('#profile').on('submit',function(e){
    e.preventDefault();
    var data = new FormData($('#profile')[0]);
    $.ajax({
    		url : 'https://www.greatvalue.withupartners.com/admin/profile-update',
    		type : 'post',
    		data : data,
    		dataType : 'json',
    		cache: false,
    		contentType: false,
    		processData: false,
    		})
    		.done(function(html){
    		    
    		if(html.msg == 'success'){
                toastr.success('Profile Update Successfully.', 'Success', { "closeButton": true },'Progress Bar', { "progressBar": true });
                
    			setTimeout(function(){ window.location.reload(); }, 1000);
           }else{
    				toastr.error('Invalid login credentials. Please try again.', 'Error!', { "closeButton": true },'Progress Bar', { "progressBar": true });
    			}
    		})
    });
    
    $('#password').on('submit',function(e){
    e.preventDefault();
    var data = new FormData($('#password')[0]);
    $.ajax({
    		url : 'https://www.greatvalue.withupartners.com/admin/password-update',
    		type : 'post',
    		data : data,
    		dataType : 'json',
    		cache: false,
    		contentType: false,
    		processData: false,
    		})
    		.done(function(html){
    		    
    		if(html.msg == 'success'){
                toastr.success('Password Update Successfully.', 'Success', { "closeButton": true },'Progress Bar', { "progressBar": true });
                setTimeout(function(){ window.location.href = "https://www.greatvalue.withupartners.com/admin/logout"; }, 1000);
           }else if(html.msg == 'oldpassword'){
               toastr.warning('Old Password Invalid', 'Warning', { "closeButton": true },'Progress Bar', { "progressBar": true });
                
           }else{
    				toastr.error('Invalid login credentials. Please try again.', 'Error!', { "closeButton": true },'Progress Bar', { "progressBar": true });
    			}
    		})
    });
    
    //Banner changes
    $('#faqadd').on('submit',function(e){
    e.preventDefault();
      var data = new FormData($('#faqadd')[0]);
        $.ajax({
              url : 'faq-add',
              type : 'post',
              data : data,
              dataType : 'json',
              cache: false,
              contentType: false,
              processData: false,
          })
        .done(function(html){
              if(html.msg == 'Inserted'){
                toastr.success('Faq has been created.', 'Success', { "closeButton": true },'Progress Bar', { "progressBar": true });
                  setTimeout(function(){ window.location.reload(); }, 1000);
              }else{
                toastr.error('Please try again after some time.', 'Error!', { "closeButton": true },'Progress Bar', { "progressBar": true });
              }
          })
     });
     
     
    $('#faqupdate').on('submit',function(e){
    e.preventDefault();
      var data = new FormData($('#faqupdate')[0]);
        $.ajax({
              url : 'faq-update',
              type : 'post',
              data : data,
              dataType : 'json',
              cache: false,
              contentType: false,
              processData: false,
          })
        .done(function(html){
          if(html.msg == 'updated'){
              toastr.success('Faq has been updated.', 'Success', { "closeButton": true },'Progress Bar', { "progressBar": true });
              setTimeout(function(){ window.location.href = "https://www.greatvalue.withupartners.com/admin/faq"; }, 1000);
          }else{
              toastr.error('Please try again after some time.', 'Error!', { "closeButton": true },'Progress Bar', { "progressBar": true });
            }
          })
    });
    
    
    $('#hwhychoose').on('submit',function(e){
    e.preventDefault();
      var data = new FormData($('#hwhychoose')[0]);
        $.ajax({
              url : 'home-whychooseus-update',
              type : 'post',
              data : data,
              dataType : 'json',
              cache: false,
              contentType: false,
              processData: false,
          })
        .done(function(html){
          if(html.msg == 'updated'){
              toastr.success('Why Choose Us has been updated.', 'Success', { "closeButton": true },'Progress Bar', { "progressBar": true });
              setTimeout(function(){ window.location.href = "https://www.greatvalue.withupartners.com/admin/home-whychooseus"; }, 1000);
          }else{
              toastr.error('Please try again after some time.', 'Error!', { "closeButton": true },'Progress Bar', { "progressBar": true });
            }
          })
    });
    
    $('#missionupdate').on('submit',function(e){
    e.preventDefault();
      var data = new FormData($('#missionupdate')[0]);
        $.ajax({
              url : 'mission-vision-update',
              type : 'post',
              data : data,
              dataType : 'json',
              cache: false,
              contentType: false,
              processData: false,
          })
        .done(function(html){
          if(html.msg == 'updated'){
              toastr.success('Mision Vision has been updated.', 'Success', { "closeButton": true },'Progress Bar', { "progressBar": true });
              setTimeout(function(){ window.location.href = "https://www.greatvalue.withupartners.com/admin/mission-vision"; }, 1000);
          }else{
              toastr.error('Please try again after some time.', 'Error!', { "closeButton": true },'Progress Bar', { "progressBar": true });
            }
          })
    });
    
    
     $('#hprocess').on('submit',function(e){
    e.preventDefault();
      var data = new FormData($('#hprocess')[0]);
        $.ajax({
              url : 'home-process-update',
              type : 'post',
              data : data,
              dataType : 'json',
              cache: false,
              contentType: false,
              processData: false,
          })
        .done(function(html){
          if(html.msg == 'updated'){
              toastr.success('Home Process has been updated.', 'Success', { "closeButton": true },'Progress Bar', { "progressBar": true });
              setTimeout(function(){ window.location.href = "https://www.greatvalue.withupartners.com/admin/home-process"; }, 1000);
          }else{
              toastr.error('Please try again after some time.', 'Error!', { "closeButton": true },'Progress Bar', { "progressBar": true });
            }
          })
    });
    
    
    $('#hbenefits').on('submit',function(e){
    e.preventDefault();
      var data = new FormData($('#hbenefits')[0]);
        $.ajax({
              url : 'home-benefits-update',
              type : 'post',
              data : data,
              dataType : 'json',
              cache: false,
              contentType: false,
              processData: false,
          })
        .done(function(html){
          if(html.msg == 'updated'){
              toastr.success('Home benefits has been updated.', 'Success', { "closeButton": true },'Progress Bar', { "progressBar": true });
              setTimeout(function(){ window.location.href = "https://www.greatvalue.withupartners.com/admin/home-benefits"; }, 1000);
          }else{
              toastr.error('Please try again after some time.', 'Error!', { "closeButton": true },'Progress Bar', { "progressBar": true });
            }
          })
    });
    
    
    
     $('#typeadd').on('submit',function(e){
    e.preventDefault();
      var data = new FormData($('#typeadd')[0]);
        $.ajax({
              url : 'industrie-type-add',
              type : 'post',
              data : data,
              dataType : 'json',
              cache: false,
              contentType: false,
              processData: false,
          })
        .done(function(html){
              if(html.msg == 'Inserted'){
                toastr.success('Industrie Type has been created.', 'Success', { "closeButton": true },'Progress Bar', { "progressBar": true });
                  setTimeout(function(){ window.location.reload(); }, 1000);
              }else{
                toastr.error('Please try again after some time.', 'Error!', { "closeButton": true },'Progress Bar', { "progressBar": true });
              }
          })
     });
     
     
    $('#typeupdate').on('submit',function(e){
    e.preventDefault();
      var data = new FormData($('#typeupdate')[0]);
        $.ajax({
              url : 'industrie-type-update',
              type : 'post',
              data : data,
              dataType : 'json',
              cache: false,
              contentType: false,
              processData: false,
          })
        .done(function(html){
          if(html.msg == 'updated'){
              toastr.success('industrie Type has been updated.', 'Success', { "closeButton": true },'Progress Bar', { "progressBar": true });
              setTimeout(function(){ window.location.href = "https://www.greatvalue.withupartners.com/admin/industrie-type"; }, 1000);
          }else{
              toastr.error('Please try again after some time.', 'Error!', { "closeButton": true },'Progress Bar', { "progressBar": true });
            }
          })
    });
    
    
   