// JavaScript Document var scripts = document.getElementsByTagName("script"), SrcPath = scripts[1].src; SrcPath = SrcPath.replace("/js/script.js", ""); $(document).ready(function(){ $('.toggle').click(function(){ $(".toggle_s").slideToggle("fast"); }); $('.toggle1').click(function(){ $(".toggle_s1").slideToggle("fast"); }); $('.toggle2').click(function(){ var imgSrc = document.getElementById('plus_minus').src; imgSrc = imgSrc.substr(-12, 12); if(imgSrc == "plus_but.png"){ document.getElementById('plus_minus').src = "/images/minus_but.png" } else{ document.getElementById('plus_minus').src = "/images/plus_but.png" } $(".toggle_s2").slideToggle("fast"); }); $('.toggle3').click(function(){ $(".toggle_s3").slideToggle("fast"); }); }); function closeerr(t) { if(t=="err"){ $("#error_messagedisplay").hide(); } else{ $("#messagedisplay").hide(); } } function blockunblockCity(country,city,type) { if(country && city){ window.location.href = SrcPath+"/admin/"+type+"-city/"+country+"/"+city+".html" } return; } function deleteCity(country,city) { if(country && city && confirm('Are you sure you want to delete?')){ window.location.href = SrcPath+"/admin/delete-city/"+country+"/"+city+".html" } return; } function blockunblockCategory(id,catUrl,type) { if(id && catUrl){ window.location.href = SrcPath+"/admin/"+type+"-category/"+id+"/"+catUrl+".html" } return; } function deleteCategory(id,catUrl) { if(id && catUrl && confirm('Are you sure you want to delete?')){ window.location.href = SrcPath+"/admin/delete-category/"+id+"/"+catUrl+".html" } return; } function changelogoimage(name) { var theme = document.getElementById('themeselectName').value; document.getElementById('themeImgID').src = SrcPath+"/themes/"+theme+"/images/"+name+".png"; } function blockunblockUser(id,code,type) { if(id && type){ window.location.href = SrcPath+"/admin/"+type+"-user/"+code+"/"+id+".html" } return; } function deleteUser(id,code) { if(id && confirm('Are you sure you want to delete?')){ window.location.href = SrcPath+"/admin/delete-user/"+id+"/"+code+".html" } return; } function blockunblockaffiliate(id,code,type) { if(id && type){ window.location.href = SrcPath+"/admin/"+type+"-affiliate/"+code+"/"+id+".html" } return; } function deleteaffiliate(id,code) { if(id && confirm('Are you sure you want to delete?')){ window.location.href = SrcPath+"/admin/delete-affiliate/"+id+"/"+code+".html" } return; } function blockunblockcitylink(id,code,type) { if(id && type){ window.location.href = SrcPath+"/admin/"+type+"-citylinks/"+code+"/"+id+".html" } return; } function deletecitylink(id,code) { if(id && code && confirm('Are you sure you want to delete?')){ window.location.href = SrcPath+"/admin/delete-citylinks/"+id+"/"+code+".html" } return; } function blockunblockdeal(id,code,type) { if(id && type && code){ window.location.href = SrcPath+"/admin/"+type+"-deal/"+code+"/"+id+".html" } return; } function deletedeal(id,code) { if(id && code && confirm('Are you sure you want to delete?')){ window.location.href = SrcPath+"/admin/delete-deal/"+id+"/"+code+".html" } return; } function blockunblocksubscriber(id,code,type) { if(id && type && code){ window.location.href = SrcPath+"/admin/"+type+"-subscriber/"+code+"/"+id+".html" } return; } function deletesubscriber(id,code) { if(id && code && confirm('Are you sure you want to delete?')){ window.location.href = SrcPath+"/admin/delete-subscriber/"+id+"/"+code+".html" } return; } function blockunblockBlog(id,code,type) { if(id && type && code){ window.location.href = SrcPath+"/blog/"+type+"-blog/"+code+"/"+id+".html" } return; } function deleteBlog(id,code) { if(id && code && confirm('Are you sure you want to delete?')){ window.location.href = SrcPath+"/blog/delete-blog/"+id+"/"+code+".html" } return; } function blockunblockCMS(id,code,type) { if(id && type && code){ window.location.href = SrcPath+"/cms/"+type+"-cms/"+code+"/"+id+".html" } return; } function deleteCMS(id,code) { if(id && code && confirm('Are you sure you want to delete?')){ window.location.href = SrcPath+"/cms/delete-cms/"+id+"/"+code+".html" } return; } function deleteContact(id) { if(id && confirm('Are you sure you want to delete?')){ window.location.href = SrcPath+"/admin/delete/"+id+".html" } return; } $(document).ready(function () { if($('#messagedisplay')){ $('#messagedisplay').animate({opacity: 1.0}, 6000) $('#messagedisplay').fadeOut('slow'); } if($('#error_messagedisplay')){ $('#error_messagedisplay').animate({opacity: 1.0}, 6000) $('#error_messagedisplay').fadeOut('slow'); } }); $(document).ready(function(){ $('#startdate').datetimepicker({ //timeFormat: 'hh:mm:ss' }); $('#enddate').datetimepicker({ //timeFormat: 'hh:mm:ss' }); $('#expirydate').datetimepicker({ //timeFormat: 'hh:mm:ss' }); }); function checkboxcheckAll(form_name,check_all,isO){ var trk=0; var frm = eval('document.'+form_name); var check_frm = eval('document.'+form_name+'.'+check_all); for (var i=0;i