Linux server.thearyasamaj.org 4.18.0-553.56.1.el8_10.x86_64 #1 SMP Tue Jun 10 05:00:59 EDT 2025 x86_64
Apache
: 103.90.241.146 | : 216.73.216.222
Cant Read [ /etc/named.conf ]
5.6.40
ftpuser@mantra.thearyasamaj.org
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
home /
thearyasamaj /
public_html /
js /
[ HOME SHELL ]
Name
Size
Permission
Action
popbox
[ DIR ]
drwxr-xr-x
a.js
3.05
KB
-rw-r--r--
addthiswidget.js
6.67
KB
-rw-r--r--
common.js
133.68
KB
-rwxrwxrwx
common_19-01-15.js
132.19
KB
-rw-r--r--
common_19-10-15.js
133.38
KB
-rw-r--r--
conversion.js
8.91
KB
-rw-r--r--
cookies.js
2.03
KB
-rw-r--r--
countdown.js
2.33
KB
-rw-r--r--
index.php
210
B
-rw-r--r--
jquery-1.8.0.min.js
90.39
KB
-rwxrwxrwx
jquery-latest.js
246.98
KB
-rw-r--r--
jquery.accessible-news-slider....
19.84
KB
-rw-r--r--
jquery.accessible-news-slider_...
10.08
KB
-rw-r--r--
jquery.asscountdown.js
3.79
KB
-rw-r--r--
jquery.autocomplete.js
20.77
KB
-rw-r--r--
jquery.colorbox.js
25.62
KB
-rw-r--r--
jquery.colorbox_08-08-14.js
25.62
KB
-rw-r--r--
jquery.countdown.js
3.79
KB
-rw-r--r--
jquery.countdown_14-03-14.js
3.75
KB
-rw-r--r--
jquery.fancybox.js
44.81
KB
-rw-r--r--
jquery.fancybox_21-01-15.js
44.81
KB
-rw-r--r--
jquery.jplayer.min.js
54.44
KB
-rw-r--r--
jquery.js
117.81
KB
-rw-r--r--
jquery.live_time_ago_query.js
6.53
KB
-rw-r--r--
jquery.min.js
76.76
KB
-rw-r--r--
jquery.min_08-08-14.js
76.76
KB
-rw-r--r--
jquery.nivo.slider.pack.js
9.06
KB
-rw-r--r--
jquery.prettyPhoto.js
21.33
KB
-rw-r--r--
jquery.prettyPhoto_05-02-15.js
21.31
KB
-rw-r--r--
jquery.session.js
3.62
KB
-rw-r--r--
jquery.time_ago_min.js
90.62
KB
-rw-r--r--
jquery.timeago.js
4.33
KB
-rw-r--r--
jquery.uniform.js
18.89
KB
-rw-r--r--
jquery.uniform.min.js
8.08
KB
-rw-r--r--
jquery.validate.js
34.53
KB
-rw-r--r--
jquery.validate.min.js
23.95
KB
-rw-r--r--
jquery.wt-lightbox.min-.js
23.08
KB
-rw-r--r--
jquery.wt-lightbox.min-22-6-13...
9.93
KB
-rw-r--r--
jquery.wt-lightbox.min.js
25.76
KB
-rw-r--r--
jquery.wt-lightbox.min_19-03-1...
24.93
KB
-rw-r--r--
jquery.wt-lightbox.min_24-03-1...
25.73
KB
-rw-r--r--
jquery.wt-lightbox.min_new_24-...
26.5
KB
-rw-r--r--
jquery.wt-scroller.min.js
16.21
KB
-rw-r--r--
jquery_linkshwhide.js
13.13
KB
-rw-r--r--
jqueryshwhide.js
76.76
KB
-rw-r--r--
jqueryslider.js
91.44
KB
-rw-r--r--
key.js
534
B
-rw-r--r--
page.js
65.14
KB
-rw-r--r--
pramukhlib.js
20.06
KB
-rw-r--r--
preview.js
5.6
KB
-rw-r--r--
script.js
1.49
KB
-rw-r--r--
slidejquery-1.9.1.min.js
108.97
KB
-rw-r--r--
slidejssor.js
88.14
KB
-rw-r--r--
sliderjssor.slider.js
162.09
KB
-rw-r--r--
sliderscript.js
23.57
KB
-rw-r--r--
sliderscript_09-04-14.js
23.57
KB
-rw-r--r--
superfish.js
3.63
KB
-rw-r--r--
thickbox.js
11.33
KB
-rw-r--r--
timer.js
2.64
KB
-rwxrwxrwx
validate.js
2.03
KB
-rw-r--r--
wimpy.js
24.56
KB
-rwxrwxrwx
wowslider.js
84.33
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : common_19-10-15.js
//Start Useful for paging function function RedirectFindPaging(pgno) { document.frmpaging.page.value=pgno; document.frmpaging.submit(); } function RedirectFindfestival(pgno,urlid) { document.frmfestival.fstid.value=pgno; document.frmfestival.fstpage.value=urlid; document.frmfestival.submit(); } function RedirectFindInstphotoalbumval(pgno) { document.frmmyinstphoto.myphotoinstid.value=pgno; document.frmmyinstphoto.submit(); } function RedirectFindInstofficerval(pgno) { document.frminstofficer.officerinstid.value=pgno; document.frminstofficer.submit(); } /*function Redirecttopstorypageid(pgno,urlid)//chage by arvind 20-04-13 { document.frmtopstories.storyid.value=pgno; document.frmtopstories.storypage.value=urlid; document.frmtopstories.submit(); }*/ function RedirectInstitutionReg(numid,limitid) { document.frminstituionreg.numid.value=numid; document.frminstituionreg.limitid.value=limitid; document.frminstituionreg.submit(); } function Redirectdwnid(pgno,urlid) { document.frmdownload.dwnhid.value=pgno; document.frmdownload.newurl.value=urlid; document.frmdownload.submit(); } function RedirectMagazineReg(numid,limitid) { document.frmmagazinereg.numid.value=numid; document.frmmagazinereg.limitid.value=limitid; document.frmmagazinereg.submit(); } function RedirectFindTakeaTest(pgno) { document.frmtakeatest.levelid.value=pgno; document.frmtakeatest.submit(); } function Redirectphotoalbum(pgno,urlid) { document.frmphotoalbum.albumid.value=pgno; document.frmphotoalbum.albumurl.value=urlid; document.frmphotoalbum.submit(); } /*function Redirectdetailevents(pgno,urlid) { document.frmeventpage.storyid.value=pgno; document.frmeventpage.storypage.value=urlid; document.frmeventpage.submit(); }*/ function Redirectdetailevents(pgno,urlid)//change by arvind { document.frmeventpage.eventid.value=pgno; document.frmeventpage.eventpage.value=urlid; document.frmeventpage.submit(); } function Redirectvideoalbum(pgno,urlid) { document.frmvideoalbum.videoid.value=pgno; document.frmvideoalbum.videourl.value=urlid; document.frmvideoalbum.submit(); } function RedirectPastPollDetail(pgno,urlid) { document.frmpdetail.pollid.value=pgno; document.frmpdetail.pollpage.value=urlid; document.frmpdetail.submit(); } function RedirectPastMantra(pgno,urlid) { document.frmpastmantra.mantraid.value=pgno; document.frmpastmantra.mantrapage.value=urlid; document.frmpastmantra.submit(); } function RedirectFindimportantplace(pgno,urlid) { document.frmimportantplace.impid.value=pgno; document.frmimportantplace.imppage.value=urlid; document.frmimportantplace.submit(); } function RedirectFindactivities(pgno,urlid) { document.frmactivities.actid.value=pgno; document.frmactivities.actpage.value=urlid; document.frmactivities.submit(); } function RedirectFindartcat(pgno,urlid,artposid) { document.frmartcat.artcatid.value=pgno; document.frmartcat.artcatpage.value=urlid; document.frmartcat.artposid.value=artposid; document.frmartcat.submit(); } function RedirectFindartlang(pgno,urlid,artposid) { document.frmartlang.artlangid.value=pgno; document.frmartlang.artlngpage.value=urlid; document.frmartlang.artlngposid.value=artposid; document.frmartlang.submit(); } function RedirectFindservices(pgno,urlid) { document.frmservices.srcid.value=pgno; document.frmservices.srcpage.value=urlid; document.frmservices.submit(); } function RedirectFindvacancy(pgno,urlid) { document.frmvacancy.vcnid.value=pgno; document.frmvacancy.vcnpage.value=urlid; document.frmvacancy.submit(); } function RedirectFinddiscover(pgno,urlid)//This function used to redirect discover contetn page Nitesh { document.frmdiscover.disid.value=pgno; document.frmdiscover.dispage.value=urlid; document.frmdiscover.submit(); } function RedirectTagFestival(pgno,urlid) { document.frmtagfestival.fstid.value=pgno; document.frmtagfestival.fsttagline.value=urlid; document.frmtagfestival.submit(); } function RedirectTagPlace(pgno,urlid) { document.frmtagplace.impid.value=pgno; document.frmtagplace.imptagline.value=urlid; document.frmtagplace.submit(); } function RedirectFindprivious(pgno,urlid)//previous vedmantra module by vaishali { document.frmprivious.prid.value=pgno; document.frmprivious.imppage.value=urlid; document.frmprivious.submit(); } function RedirectFindtodaymantra(pgno,urlid)//previous vedmantra module by vaishali { document.frmtodaymantra.impid.value=pgno; document.frmtodaymantra.imppage.value=urlid; document.frmtodaymantra.submit(); } function RedirectFindEvent(pgno,urlid) { document.frminsevent.impid.value=pgno; document.frminsevent.imppage.value=urlid; document.frminsevent.submit(); } function RedirectPamphlet(pgno,urlid) { document.frmeventss.eid.value=pgno; document.frmeventss.page1.value=urlid; document.frmeventss.submit(); } function Redirectpampletdelete(pgno,urlid) { // document.frmpamp.eventid.value=eid; document.frmpamp.pid.value=pgno; document.frmpamp.imppage.value=urlid; document.frmpamp.submit(); } function RedirectDetailViewNews(pgno,urlid)//detail view news by vaishali { document.frmdetailnews.dnewsid.value=pgno; document.frmdetailnews.denewspage.value=urlid; document.frmdetailnews.submit(); } function RedirectDetailViewEvent(pgno,urlid) { document.frmdetailevent.deid.value=pgno; document.frmdetailevent.deurl.value=urlid; document.frmdetailevent.submit(); } function RedirectProfile(pgno,urlid)//dharmi { document.frmprofile.profileid.value=pgno; document.frmprofile.profileurl.value=urlid; document.frmprofile.submit(); } function RedirectViewNews(pgno,urlid)//dharmi { document.frmpviewnews.viewnewsid.value=pgno; document.frmpviewnews.viewnewsurl.value=urlid; document.frmpviewnews.submit(); } function RedirectViewEvent(pgno,urlid)//dharmi { document.frmevent.eventid.value=pgno; document.frmevent.eventurl.value=urlid; document.frmevent.submit(); } function RedirectArticle(pgno,urlid) { document.frmaarticle.artid.value=pgno; document.frmaarticle.arturl.value=urlid; document.frmaarticle.submit(); } function RedirectArtHome(pgno,urlid) { document.frmarthome.arthmid.value=pgno; document.frmarthome.arthmurl.value=urlid; document.frmarthome.submit(); } function RedirectNewArticle(pgno,urlid) { document.frmnewarticle.newartid.value=pgno; document.frmnewarticle.newarturl.value=urlid; document.frmnewarticle.submit(); } function RedirectFindArticle(pgno,urlid) { document.frminsarticles.impid.value=pgno; document.frminsarticles.imppage.value=urlid; document.frminsarticles.submit(); } function RedirectViewArticle(pgno,urlid)//dharmi { document.frmarticle.articleid.value=pgno; document.frmarticle.articleurl.value=urlid; document.frmarticle.submit(); } // function RedirectMagazineTag(pgno,urlid) // { // document.frmtagmagazine.mgtid.value=pgno; // document.frmtagmagazine.mgztagline.value=urlid; // document.frmtagmagazine.submit(); // } function RedirectFindmagazines(pgno,urlid) //Magazine module in redirect page dharmishtha { document.frminsevent.impid.value=pgno; document.frminsevent.imppage.value=urlid; document.frminsevent.submit(); } function RedirectShophome(pgno,urlid)//Redirect Shopping site from aryasamaj-tab home page { document.frmshop.pageid.value=pgno; document.frmshop.pageurl.value=urlid; document.frmshop.submit(); } function RedirectFindShop(pgno,urlid) //Redirect Shopping site from aryasamaj-top menu { document.frmshopping.pageid.value=pgno; document.frmshopping.pageurl.value=urlid; document.frmshopping.submit(); } function RedirectContributionNews(pgno,urlid) //redirect to display news list { document.frmcontributionnews.constributionnews.value=pgno; document.frmcontributionnews.constributionnewsurl.value=urlid; document.frmcontributionnews.submit(); } function RedirectContributionEvents(pgno,urlid) //redirect to display events list { document.frmcontributionevent.constributionEvents.value=pgno; document.frmcontributionevent.constributioneventsurl.value=urlid; document.frmcontributionevent.submit(); } function RedirectContributionArticles(pgno,urlid) //redirect to display articles list { document.frmcontributionarticles.constributionArticles.value=pgno; document.frmcontributionarticles.constributionarticlesurl.value=urlid; document.frmcontributionarticles.submit(); } function RedirectContributionMagazines(pgno,urlid) //redirect to display magazines list { document.frmcontributionmagazine.constributionMagazines.value=pgno; document.frmcontributionmagazine.constributionmagazinesurl.value=urlid; document.frmcontributionmagazine.submit(); } function RedirectContributionMagazines(pgno,urlid) //redirect to display magazines list { document.frmcontributionmagazine.constributionMagazines.value=pgno; document.frmcontributionmagazine.constributionmagazinesurl.value=urlid; document.frmcontributionmagazine.submit(); } function Redirectviewinst(pgno,insttyid,urlid)//dharmi { document.frmpinst.viewninstid.value=pgno; document.frmpinst.viewninsttypeid.value=insttyid; // added by navneet use for post institution type edit time document.frmpinst.viewinsturl.value=urlid; document.frmpinst.submit(); } function Redirectviewprofileinst(pgno,urlid)//dharmi { document.frmprofileinst.viewprinstid.value=pgno; document.frmprofileinst.viewinsturl.value=urlid; document.frmprofileinst.submit(); } function RedirectFindinstmgz(pgno,urlid)//add by parmar nitesh for post instion magazine { document.frminstmgz.insmgzid.value=pgno; document.frminstmgz.insmgzpage.value=urlid; document.frminstmgz.submit(); } function RedirectFindinstobituary(pgno,urlid)//add by parmar nitesh for post instion magazine { document.frminstobitr.insobitrid.value=pgno; document.frminstobitr.insobitrpage.value=urlid; document.frminstobitr.submit(); } function RedirectFindmgz(pgno,urlid)//add by parmar nitesh for post magazine id { document.frmpmgzleft.mgzid.value=pgno; document.frmpmgzleft.mgzurl.value=urlid; document.frmpmgzleft.submit(); } function RedirectFindeditmgz(pgno,urlid)//add by parmar nitesh for post edit magazine id { document.frmeditmgz.editmgzid.value=pgno; document.frmeditmgz.editmgzurl.value=urlid; document.frmeditmgz.submit(); } function RedirectDelmyinst(delid)//add by parmar nitesh for post Delete id { document.frmmyinst.delid.value=delid; document.frmmyinst.submit(); } function RedirectDelmyMgz(delid)//add by parmar nitesh for post Delete id { document.frmmymgz.delid.value=delid; document.frmmymgz.submit(); } function RedirectIssueDelete(delid)//add by dharmishtha for post Delete id in magazine issue { document.frmissue.issuedelid.value=delid; document.frmissue.submit(); } function Redirectinstaddmagzine(pgno,urlid) { document.frmaddmgz.insmgztid.value=pgno; document.frmaddmgz.insturl.value=urlid; document.frmaddmgz.submit(); } function Redirectinstevents(pgno,urlid) { document.frminstevent.insmgzid.value=pgno; document.frminstevent.insmgzpage.value=urlid; document.frminstevent.submit(); } function Redirectinstpstevents(pgno,urlid) { document.frminstpstevent.insmgzid.value=pgno; document.frminstpstevent.insmgzpage.value=urlid; document.frminstpstevent.submit(); } function Redirectinstnews(pgno,urlid) { document.frminstnews.insnewsid.value=pgno; document.frminstnews.insnwespage.value=urlid; document.frminstnews.submit(); } function Redirectinstphotoalbum(pgno,urlid) { document.frminstphotoalbum.insmgzid.value=pgno; document.frminstphotoalbum.insmgzpage.value=urlid; document.frminstphotoalbum.submit(); } function Redirectinstphotogallary(pgno,urlid) { document.frminstphalbum.instalbumid.value=pgno; document.frminstphalbum.instalbumurl.value=urlid; document.frminstphalbum.submit(); } function Redirectinstpremisessnapshots(pgno,urlid) { document.frminstprimssnapsht.insprmshtsid.value=pgno; document.frminstprimssnapsht.insprmshtspage.value=urlid; document.frminstprimssnapsht.submit(); } function Redirectinstadmnotification(pgno,urlid) { document.frminstnotify.insnotifyid.value=pgno; document.frminstnotify.insnotifypage.value=urlid; document.frminstnotify.submit(); } function Redirectinstvideogallary(pgno,urlid) { document.frmvidalubm.videoabmid.value=pgno; document.frmvidalubm.videoabmurl.value=urlid; document.frmvidalubm.submit(); } function Redirectinstvideoalbum(pgno,urlid) { document.frminstvideoalbum.insmgzid.value=pgno; document.frminstvideoalbum.insmgzpage.value=urlid; document.frminstvideoalbum.submit(); } //End Useful for paging function function checkInt(evt) //this function use for only add number value { evt = (evt) ? evt : window.event var charCode = (evt.which) ? evt.which : evt.keyCode if (charCode > 31 && (charCode < 44 || charCode > 57 )) { status = "This Field Accepts Numbers Only." return false; } status = "" return true } function clearText(theField)//this function use in login popup page { if(theField.value=="EmailAddress" || theField.value=="ईमेल एड्रेस") { theField.value = ""; } else if(theField.value=="Password" || theField.value=="पासवर्ड") { theField.value = ""; } else if(theField.value=="Mobile Number" || theField.value=="मोबाइल नंबर") { theField.value = ""; } else if(theField.value=="Friends email/address") { theField.value=""; } else if(theField.value=="Your message") { theField.value=""; } else if(theField.value=="Start Date" || theField.value=="प्रारंभ दिनांक") { theField.value = ""; } else if(theField.value=="End Date" || theField.value=="समाप्ति तिथि") { theField.value = ""; } else if(theField.value=="First Name" || theField.value=="प्रथम नाम") { theField.value = ""; } else if(theField.value=="HH:MM:SS") { theField.value = ""; } else if(theField.value=="EnterRecaptch") { theField.value = ""; } else if(theField.value=="Nearest Prime Location") { theField.value = ""; } else if(theField.value=="Block and Street" || theField.value=="ब्लॉक और स्ट्रीट") { theField.value = ""; } else if(theField.value=="House No." || theField.value=="मकान नंबर") { theField.value = ""; } else if(theField.value=="Locality" || theField.value=="इलाका") { theField.value = ""; } else if(theField.value=="Nearest Landmark" || theField.value=="निकटतम मील का पत्थर") { theField.value = ""; } else if(theField.value=="Name" || theField.value=="Email Address") { theField.value = ""; } } function addText(theField) { if (theField.value == '') theField.value = theField .defaultValue; } var xmlHttp; function srvTime(){ try { //FF, Opera, Safari, Chrome xmlHttp = new XMLHttpRequest(); } catch (err1) { //IE try { xmlHttp = new ActiveXObject('Msxml2.XMLHTTP'); } catch (err2) { try { xmlHttp = new ActiveXObject('Microsoft.XMLHTTP'); } catch (eerr3) { //AJAX not supported, use CPU time. alert("AJAX not supported"); } } } xmlHttp.open('HEAD',window.location.href.toString(),false); xmlHttp.setRequestHeader("Content-Type", "text/html"); xmlHttp.send(''); return xmlHttp.getResponseHeader("Date"); } function cdtd(a,b,srtime) //use for timer Nitesh { var dateval=a.split("-"); for(var i=1; i<=b; ++i) { var m=i-1; var lastdate=dateval[m]; var xmas = new Date(lastdate); var st = srvTime(); var now = new Date(st); var timeDiff =xmas.getTime() - now.getTime(); if (timeDiff <= 0) { clearTimeout(timer); location.reload(); //document.write("Christmas is here!"); // Run any code needed for countdown completion here } var seconds = Math.floor(timeDiff / 1000); var minutes = Math.floor(seconds / 60); var hours = Math.floor(minutes / 60) ; var days = Math.floor(hours / 24); hours %= 24; minutes %= 60; seconds %= 60; var dname="daysBox"+i; var hname="hoursBox"+i; var mname="minsBox"+i; var sname="secsBox"+i; document.getElementById(dname).innerHTML = days; document.getElementById(hname).innerHTML = hours; document.getElementById(mname).innerHTML = minutes; document.getElementById(sname).innerHTML = seconds; var timer = setTimeout(function(){cdtd(a,b)},1000); } } //=================================Parmar Nitesh===================================// function FileValidation(fileName)//function use for file extension validation { if(fileName != "") { var fileName1 = fileName; var fileExtension = fileName1.lastIndexOf("."); var extension = fileName1.substr(fileExtension,fileName1.length).toLowerCase(); if(extension == ".pdf" || extension == ".PDF") { return true; } else { return false; } } } function indicChangeCallback(id, lang)//use for language { document.getElementById(id).value = lang; if (lang==null || lang=="") lang = 'english'; pph.setGlobalScript(lang); } function changeLanguage(id, newLanguage)//user for language { var str_array = newLanguage.split(','); newLanguagename= str_array[0].replace(/^\s*/, "").replace(/\s*$/, ""); if(newLanguagename=='Hindi') { newLanguagename="Devanagari"; } if (!newLanguagename || newLanguagename == "") newLanguagename = 'english'; pph.setScript(id, newLanguagename); } function findselectstate(countryid,eventlist) //this function is used for Contry wise select state. { var xmlhttp=false; try { xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); } catch (e) { try { xmlhttp = new ActiveXObject('Microsoft.XMLHTTP'); } catch (E) { xmlhttp = false; } } if (!xmlhttp && typeof XMLHttpRequest!='undefined') { xmlhttp = new XMLHttpRequest(); } var file ="include/aryasamaj_fnd_state_ajax.php?countryid="+countryid+"&eventlist="+eventlist; //window.open(file); xmlhttp.open('GET', file, true); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4) { var myContent; myContent=xmlhttp.responseText; document.getElementById('FetchAjaxDatastate').innerHTML=myContent; } } xmlhttp.send(null) //Nullify the XMLHttpRequest return; } function findselcity(stateid) ////this function is used for State wise selected city. 15-08-12 { var xmlhttp=false; try { xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); } catch (e) { try { xmlhttp = new ActiveXObject('Microsoft.XMLHTTP'); } catch (E) { xmlhttp = false; } } if (!xmlhttp && typeof XMLHttpRequest!='undefined') { xmlhttp = new XMLHttpRequest(); } var file ="include/aryasamaj_fnd_city_ajax.php?stateid="+stateid; //window.open(file); xmlhttp.open('GET', file, true); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4) { var myContent; myContent=xmlhttp.responseText; document.getElementById('FetchAjaxDataCity').innerHTML=myContent; } } xmlhttp.send(null) //Nullify the XMLHttpRequest return; } function pollvoteupdate(pqid,ans) //This function use in display Poll% { var xmlhttp=false; try { xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); } catch (e) { try { xmlhttp = new ActiveXObject('Microsoft.XMLHTTP'); } catch (E) { xmlhttp = false; } } if (!xmlhttp && typeof XMLHttpRequest!='undefined') { xmlhttp = new XMLHttpRequest(); } var file ="include/aryasamaj-change_poll_vote.php?pqid="+pqid+"&ans="+ans; //window.open(file); xmlhttp.open('GET', file, true); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4) { var myContent; myContent=xmlhttp.responseText; document.getElementById('FetchAjaxData').innerHTML=myContent; } } xmlhttp.send(null) //Nullify the XMLHttpRequest return; } function blankmemreg(val) //validation of member register form { //alert(document.frmlogin.hidval.value); if(document.frmlogin.txtname.value=="") { alert('Please Enter First Name'); document.frmlogin.txtname.focus(); return false; } // if(document.frmlogin.txtmidname.value=="") // { // alert('Please Enter Middle Name'); // document.frmlogin.txtmidname.focus(); // return false; // } if(document.frmlogin.txtlastname.value=="") { alert('Please Enter Last Name'); document.frmlogin.txtlastname.focus(); return false; } if(val!='add') { //var emailid = document.frmlogin.txtemail.value; //var mobile = document.frmlogin.txtmobno.value; if(document.frmlogin.txtemail.value=="") { alert('Please Enter Email Address.'); document.frmlogin.txtemail.focus(); return false; } // else if(emailid!="") // { // if(emailCheck(document.frmlogin.txtemail)==false) // { // document.frmlogin.txtemail.focus(); // return false; // } // } // if(document.frmlogin.txtmobno.value!="") // { // if(document.getElementById("txtmobno").value.length < 10) // { // alert('Please Enter Minimum 10 Digit Mobile Number.'); // document.frmlogin.txtmobno.focus(); // return false; // } // } if(document.frmlogin.day.value == 0 || document.frmlogin.month.value == 0 || document.frmlogin.year.value == 0) { alert("Please Select Birth date."); document.frmlogin.day.focus(); return false; } if(document.frmlogin.txtpassword.value=="") { alert("Pleace Enter Password"); document.frmlogin.txtpassword.focus(); return false; } if(document.getElementById("txtpassword").value.length < 5) { alert("Pleace Enter Minimum 5 And Maximum 8 Digit Password"); document.frmlogin.txtpassword.focus(); return false; } if(document.frmlogin.txtrepassword.value=="") { alert("Pleace Enter Re-Password"); document.frmlogin.txtrepassword.focus(); return false; } if(document.frmlogin.txtrepassword.value != document.frmlogin.txtpassword.value) { alert("Password is not match to Re-Password"); document.frmlogin.txtrepassword.focus(); return false; } } if(document.frmlogin.cmbcountry.value == 0 ) { alert("Please Select Country"); document.frmlogin.cmbcountry.focus(); return false; } // if(document.frmlogin.txtaddress.value=="") // { // alert("Pleace Enter Address"); // document.frmlogin.txtaddress.focus(); // return false; // } if(document.frmlogin.image_text.value == "") { alert("Please Enter Recaptcha Code"); document.frmlogin.image_text.focus(); return false; } else if(document.frmlogin.image_text.value != document.frmlogin.rechapchatext.value) { alert("Please Enter Valid Recaptcha Code"); document.frmlogin.image_text.focus(); return false; } if(document.frmlogin.hidval.value != "") { alert("Please Enter Valid Email Address"); document.frmlogin.txtemail.focus(); return false; } } function blankComformLink() { /*if(document.frmconformlink.txtimage.value=="") { alert("Please Select Profile Photo."); document.frmconformlink.txtimage.focus(); return false; } else { if(ImageValidation(document.frmconformlink.txtimage.value)==false) { alert("Only jpg,jpeg,JPEG,JPG,png,gif,GIF,bmp,BMP,PNG Photos are allowed."); document.frmconformlink.txtimage.focus(); return false; } } if(document.frmconformlink.txtmobno.value=="") { alert('Please Enter Profile Mobile No.'); document.frmconformlink.txtmobno.focus(); return false; }*/ if(document.frmconformlink.txtproname.value=="") { alert('Please Enter Profile Name'); document.frmconformlink.txtproname.focus(); return false; } if(document.frmconformlink.cmblng.value==0) { alert('Please Select Preferred Poetal Language'); document.frmconformlink.cmblng.focus(); return false; } if(document.getElementById("txtcondition").checked == false) { alert('You are Not accept term and condition.'); document.frmconformlink.txtcondition.focus(); return false; } } function getmgzfile()//for disable link textbox in magazine issue { if(document.frmmagazineissue.txtfile.checked==true) { document.frmmagazineissue.txtlinkfile.checked=false; document.getElementById("txtdocfile").disabled=false; document.getElementById("txtlink").disabled=true; } } function getmgzlink()//for disable document file in magazine issue { if(document.frmmagazineissue.txtlinkfile.checked==true) { document.frmmagazineissue.txtfile.checked=false; document.getElementById("txtdocfile").disabled=true; document.getElementById("txtlink").disabled=false; } } function Check_StartDate(StartDate) { var DateResult="Yes"; var datearray=StartDate.split("/"); var dt = new Date(); var t_day = dt.getDate(); // Returns the day of the month var t_mon = dt.getMonth()+1; // Returns the month as a digit var t_year = dt.getFullYear(); // Returns 4 digit year if(t_day < 10) { var t_day = "0"+t_day; } if(t_mon < 10) { var t_mon = "0"+t_mon; } var cu = t_mon+"/"+t_day+"/"+t_year; var str = datearray[0]+"/"+datearray[1]+"/"+datearray[2]; var expdt = t_mon+"/"+t_day+"/"+(parseInt(t_year)+1); var cudate = new Date(cu); var stdate = new Date(str); var Expdate = new Date(expdt); if(stdate < cudate) { DateResult="No"; } if(Expdate < stdate) { DateResult="No"; } return DateResult; } function Check_EndDate(StartDate,EndDate) { var DateResult="Yes"; //============================================================ // code for 1 year added in start date // code for start date added in 1 year var startDateUp1 = new Date(StartDate); var t_day = startDateUp1.getDate(); // Returns the day of the month var t_mon = startDateUp1.getMonth()+1; // Returns the month as a digit var t_year = startDateUp1.getFullYear(); // Returns 4 digit year if(t_day < 10) { var t_day = "0"+t_day; } if(t_mon < 10) { var t_mon = "0"+t_mon; } var expStrtDt = t_mon+"/"+t_day+"/"+t_year; var expStrtDtAYr = t_mon+"/"+t_day+"/"+(parseInt(t_year)+1); var ExpDtStrTDt = new Date(expStrtDtAYr); // over the code for start date up // code for end date var endDt = new Date(EndDate); var e_day = endDt.getDate(); var e_mon = endDt.getMonth()+1; var e_year = endDt.getFullYear(); if(e_day < 10) { var e_day = "0"+e_day; } if(e_mon < 10) { var e_mon = "0"+e_mon; } var expEndDt = e_mon+"/"+e_day+"/"+e_year; var ExpENDDT = new Date(expEndDt); // over the code for end date // over the code //============================================================ // code for 7 days added in start date var startDateUp = new Date(StartDate); var s_day = startDateUp1.getDate(); // Returns the day of the month var s_mon = startDateUp1.getMonth()+1; // Returns the month as a digit var s_year = startDateUp1.getFullYear(); // Returns 4 digit year if(s_day < 10) { var s_day = "0"+s_day; } if(s_mon < 10) { var s_mon = "0"+s_mon; } var sevenDays = s_mon+"/"+(parseInt(s_day))+"/"+s_year; var addedSevenDays = new Date(sevenDays); //var dd= startDateUp.setDate(startDateUp.getDate() + 7); //finEndSnDt = startDateUp.defaultView(); // over code for 7 days added in start date if(ExpENDDT<addedSevenDays) { DateResult = "No"; } if(ExpENDDT < expStrtDt) { DateResult = "No"; } if(ExpENDDT >ExpDtStrTDt) { DateResult = "No"; } return DateResult; } function findfreqdate(day,month,year,freq) ////this function display publish issue date wise date { var xmlhttp=false; try { xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); } catch (e) { try { xmlhttp = new ActiveXObject('Microsoft.XMLHTTP'); } catch (E) { xmlhttp = false; } } if (!xmlhttp && typeof XMLHttpRequest!='undefined') { xmlhttp = new XMLHttpRequest(); } var file ="include/aryasamaj_fnd_freqdate_ajax.php?day="+day+"&month="+month+"&year="+year+"&freq="+freq; xmlhttp.open('GET', file, true); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4) { var myContent; myContent=xmlhttp.responseText; document.getElementById('fetchfreqdaytest').innerHTML=myContent; } } xmlhttp.send(null) //Nullify the XMLHttpRequest return; } function findfromdatetodate(day,month,year) ////this function display event from date to date { var xmlhttp=false; try { xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); } catch (e) { try { xmlhttp = new ActiveXObject('Microsoft.XMLHTTP'); } catch (E) { xmlhttp = false; } } if (!xmlhttp && typeof XMLHttpRequest!='undefined') { xmlhttp = new XMLHttpRequest(); } var file ="include/aryasamaj-findfromdate_todate.php?day="+day+"&month="+month+"&year="+year; xmlhttp.open('GET', file, true); //window.open(file); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4) { var myContent; myContent=xmlhttp.responseText; document.getElementById('fetchfromdatetodate').innerHTML=myContent; } } xmlhttp.send(null) //Nullify the XMLHttpRequest return; } function blankuploadissue() // crate by Nitesh { var freqid=document.frmmagazineissue.cmbfreqcy.value; if(document.frmmagazineissue.cmbmgztitle.value==0) { alert("Please Select Magazine Title"); document.frmmagazineissue.cmbmgztitle.focus(); return false; } if(document.frmmagazineissue.day.value==0) { alert("Please Select Issue Publish day"); document.frmmagazineissue.day.focus(); return false; } if(document.frmmagazineissue.month.value==0) { alert("Please Select Issue Publish Month"); document.frmmagazineissue.month.focus(); return false; } if(document.frmmagazineissue.year.value==0) { alert("Please Select Issue Publish Year"); document.frmmagazineissue.year.focus(); return false; } if(freqid > 7) { var syear = document.frmmagazineissue.endyear.value; var eyear = document.frmmagazineissue.endfreqyear.value; if(Number(syear) > Number(eyear)) { alert('Enter end year greater than or equal to start year.'); document.frmmagazineissue.endfreqyear.focus(); return false; } } else if(freqid==7) { var smanth = document.frmmagazineissue.endmonth.value; var emanth = document.frmmagazineissue.endfreqmonth.value; var syear = document.frmmagazineissue.endyear.value; var eyear = document.frmmagazineissue.endfreqyear.value; if(Number(syear)>Number(eyear)) { alert('Enter end year greater than or equal to end year'); document.frmmagazineissue.endfreqmonth.focus(); return false; } if(Number(syear) == Number(eyear)) { if(Number(smanth)>Number(emanth)) { alert('Enter end month greater than or equal to start month'); document.frmmagazineissue.endfreqmonth.focus(); return false; } } } else if(freqid >3 && freqid <7) { var smanth = document.frmmagazineissue.endmonth.value; var emanth = document.frmmagazineissue.endfreqmonth.value; var syear = document.frmmagazineissue.endyear.value; var eyear = document.frmmagazineissue.endfreqyear.value; if(Number(syear) == Number(eyear)) { if(Number(smanth) > Number(emanth)) { alert('Enter end month greater than or equal to start month.'); document.frmmagazineissue.endfreqmonth.focus(); return false; } } if(Number(syear) > Number(eyear)) { alert('Enter end year greater than or equal to start year.'); document.frmmagazineissue.endfreqyear.focus(); return false; } } else if(freqid >1 && freqid <=3) { var smanth = document.frmmagazineissue.endmonth.value; var emanth = document.frmmagazineissue.endfreqmonth.value; var syear = document.frmmagazineissue.endyear.value; var eyear = document.frmmagazineissue.endfreqyear.value; var sday = document.frmmagazineissue.endday.value; var eday = document.frmmagazineissue.endfreqday.value; var endDate = emanth+'/'+eday+'/'+eyear; var startDate = smanth+'/'+sday+'/'+syear; if(endDate!= "") { if(Check_EndDate(startDate,endDate)=="No") { alert('Please enter end date greater than or equal to start date.'); document.frmmagazineissue.endfreqday.focus(); return false; } } } if(document.frmmagazineissue.txtimage.value=="") { alert("Please Upload Cover Image."); document.frmmagazineissue.txtimage.focus(); return false; } else { if(ImageValidation(document.frmmagazineissue.txtimage.value)==false) { alert("Only jpg,jpeg,JPEG,JPG,png,gif,GIF,bmp,BMP,PNG Photos are allowed."); document.frmmagazineissue.txtimage.focus(); return false; } } if(document.frmmagazineissue.txtfile.checked==true) { if(document.frmmagazineissue.txtdocfile.value=="") { alert("Please Upload Issue File"); document.frmmagazineissue.txtdocfile.focus(); return false; } else { if(FileValidation(document.frmmagazineissue.txtdocfile.value)==false) { alert("Only PDF files Are Allowed."); document.frmmagazineissue.txtdocfile.focus(); return false; } } } if(document.frmmagazineissue.txtlinkfile.checked == true) { if(document.frmmagazineissue.txtlink.value=="") { alert("Please Enter Link"); document.frmmagazineissue.txtlink.focus(); return false; } } } function blanksimplemgzform() // crate by Nitesh { if(document.frmmagazineissue.cmbmgztitle.value==0) { alert("Please Select Magazine Title"); document.frmmagazineissue.cmbmgztitle.focus(); return false; } if(document.frmmagazineissue.day.value==0) { alert("Please Select Issue Publish day"); document.frmmagazineissue.day.focus(); return false; } if(document.frmmagazineissue.month.value==0) { alert("Please Select Issue Publish Month"); document.frmmagazineissue.month.focus(); return false; } if(document.frmmagazineissue.year.value==0) { alert("Please Select Issue Publish Year"); document.frmmagazineissue.year.focus(); return false; } if(document.frmmagazineissue.txtfile.checked==true) { if(document.frmmagazineissue.txtdocfile.value=="") { alert("Please Upload Issue File"); document.frmmagazineissue.txtdocfile.focus(); return false; } else { if(FileValidation(document.frmmagazineissue.txtdocfile.value)==false) { alert("Only PDF files Are Allowed."); document.frmmagazineissue.txtdocfile.focus(); return false; } } } if(document.frmmagazineissue.txtlinkfile.checked == true) { if(document.frmmagazineissue.txtlink.value=="") { alert("Please Enter Link"); document.frmmagazineissue.txtlink.focus(); return false; } } } function findlanguageid(memid,ldgid) ////this function is used for State wise selected city. 20-01-13 { var langid= document.frmconformlink.cmbmultlang.value; var xmlhttp=false; try { xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); } catch (e) { try { xmlhttp = new ActiveXObject('Microsoft.XMLHTTP'); } catch (E) { xmlhttp = false; } } if (!xmlhttp && typeof XMLHttpRequest!='undefined') { xmlhttp = new XMLHttpRequest(); } if(langid!="") { if(ldgid > 0) { var file ="include/aryasamaj_fnd_langid_ajax.php?dlid="+ldgid+"&memid="+memid; } else { var file ="include/aryasamaj_fnd_langid_ajax.php?lgid="+langid+"&memid="+memid; } } //window.open(file); xmlhttp.open('GET', file, true); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4) { var myContent; myContent=xmlhttp.responseText; document.getElementById('txtlangname').innerHTML=myContent; } } xmlhttp.send(null) //Nullify the XMLHttpRequest return; } //added by navneet function isAlphabetic(evt) //this function is use fro add only character value and also space Date:-25-jan-2013 { var charCode = (evt.which) ? evt.which : event.keyCode if (charCode > 32 && (charCode < 65 || charCode > 90) && (charCode < 97 || charCode > 122)) { return false; } else { return true; } } function isValidURL1(value) { var urlregex = new RegExp("^(https?\\://www\\.)[A-Za-z0-9_\\-]+\\.[A-Za-z0-9_\\-\\%\\&\\?\\.\\=\\+]+$"); //var urlregex = new RegExp("^((https?\\://www\\.)|(www\\.))[A-Za-z0-9_\\-]+\\.[A-Za-z0-9_\\-\\%\\&\\?\\.\\=\\+]+$"); //var urlregex = new RegExp("^(http:\/\/www.|https:\/\/www.|ftp:\/\/www.|www.){1}([0-9A-Za-z]+\.)?[a-z0-9\-\.]{3,}\.[a-z]{3}$"); //var urlregex = /(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/; if(urlregex.test(value)) { return(true); } return(false); } function isValidURL(value) { //var urlregex = /^((https?\://wwww\.)|(www\.))([a-z0-9]([a-z0-9]|(\-[a-z0-9]))*\.)+(com|it|net|uk|de)$/i; //var urlregex = /^((https?\://wwww\.)|(www\.))([a-z0-9]([a-z0-9]|(\-[a-z0-9]))*\.)+[a-z]+(\/[a-z0-9_\-\%\&\?\.\=\+]*)*$/i; //var urlregex = new RegExp("^(https?\\://www\\.)[A-Za-z0-9_\\-]+\\.[A-Za-z0-9_\\-\\%\\&\\?\\.\\=\\+]+$"); //var urlregex = new RegExp("^((https?\\://www\\.)|(www\\.))[A-Za-z0-9_\\-]+\\.[A-Za-z0-9_\\-\\%\\&\\?\\.\\=\\+]+$"); //var urlregex = new RegExp("^(http:\/\/www.|https:\/\/www.|ftp:\/\/www.|www.){1}([0-9A-Za-z]+\.)?[a-z0-9\-\.]{3,}\.[a-z]{3}$"); //var urlregex = /(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/; //var urlregex = new RegExp("^(https?\\://www\\.)[A-Za-z0-9_\\-]+\\.[A-Za-z0-9_\\-\\%\\&\\?\\.\\=\\+]+$"); var urlregex = new RegExp("^((https?\\://www\\.)|(www\\.))[A-Za-z0-9_\\-]+\\.[A-Za-z0-9_\\-\\%\\&\\?\\.\\=\\+]+$"); //var urlregex = new RegExp("^(http:\/\/www.|https:\/\/www.|ftp:\/\/www.|www.){1}([0-9A-Za-z]+\.)?[a-z0-9\-\.]{3,}\.[a-z]{3}$"); //var urlregex = /(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/; if(urlregex.test(value)) { return(true); } return(false); } //This is Used For Send Password With Email Validation Start $(document).ready(function(){ $('#calliframe').click(function(){ var msg=$('#txtmsg').val(); sessionStorage.textmsg=msg; //alert(sessionStorage.textmsg); //$.session.set("myVar", "Hello World!"); }); $('#gtpass').click(function(){ var nvEmail = $("#txtemail").val(); var nvPass = $("#passval").val(); var myhostname = location.hostname; //var submyhostname = myhostname.substring(4); Url = 'http://'+myhostname+'/aryasamaj-sendpassword.php' $.getJSON(""+Url+"?EL="+nvEmail+"&passid="+nvPass,function(result){ $.each(result.EmailList, function(index, EmailListEach){ if(EmailListEach.msg == "Yes") { $("#gtpass").html(""); $("#emailDupErrId").html(""); $("#passent").attr("style","display:inline"); $('#txtemail').val(''); } if(EmailListEach.msg == "No") { $("#passent").attr("style","display:none"); } }); }); }); }); //This is Used For Send Password With Email Validation End function duplicateemailaddress(name,tid,vid) // this is used for check member email duplicate or not navneet { var newname="#"+name; var nvEmail = $(newname).val(); var myhostname = location.hostname; Url = 'http://'+myhostname+'/aryasamaj-duplicateemail.php' $.getJSON(""+Url+"?tid="+tid+"&vid="+vid+"&EL="+nvEmail,function(result){ $.each(result.EmailList, function(index, EmailListEach){ if(EmailListEach.Email=="Yes") { //document.frmlogin.txtemail.focus(); $("#emailDupErrId").attr("style","display:inline"); $("#emailwrongEmailId").show(); $("#emailDupId").attr("value","1"); $("#txtemail").focus(); //$('#txtemail').val(''); } if(EmailListEach.Email=="No") { var a=emailCheck2(nvEmail); if(a==false) { $("#emailinvalidEmailId").show(); $("#txtemail").focus(); } else { $("#emailRightEmailId").show(); } $("#emailDupErrId").attr("style","display:none"); $("#passent").attr("style","display:none"); $("#emailDupId").attr("value",""); } }); }); } function duplicatemobileNumber(name,mtid,vid) // this is used for check member mobile duplicate or not navneet { var newname="#"+name; var nvMobile = $(newname).val(); var myhostname = location.hostname; Url = 'http://'+myhostname+'/aryasamaj-duplicatemobileno.php' $.getJSON(""+Url+"?mtid="+mtid+"&vid="+vid+"&EL="+nvMobile,function(result){ $.each(result.MobileList, function(index, MobileListEach){ if(MobileListEach.Mobile=="Yes") { $("#mobileDupErrId").attr("style","display:inline"); //$('#txtmobno').val(''); document.frmlogin.txtmobno.focus(); } if(MobileListEach.Mobile=="No") { $("#mobileDupErrId").attr("style","display:none"); } }); }); } function blurEmailCheck(val,tid,vid) // blur email check for member registration modules navneet { var emailid = document.frmlogin.txtemail.value; if(emailid!="") { if(emailCheck(document.frmlogin.txtemail)==false) { document.frmlogin.txtemail.focus(); document.frmlogin.txtemail.value=""; return false; } } duplicateemailaddress(val,tid,vid); } function emailcheckmemberregister(val,tid,vid) // blur email check for member registration modules navneet { $("#emailinvalidEmailId").hide(); $("#emailRightEmailId").hide(); $("#emailwrongEmailId").hide(); $("#emailDupErrId").hide(); duplicateemailaddress(val,tid,vid); } /*function TimeValied(value) { var urlregex = new RegExp("^([0-1][0-9]|2[0-3]):([0-5][0-9])$"); if(urlregex.test(value)) { return(true); } return(false); }*/ function TimeValied(value) { var urlregex = new RegExp("^([0-1][0-9]|2[0-3]):([0-5][0-9]) ([am])|([pm])$"); if(urlregex.test(value)) { return(true); } return(false); } /*function duplicateinstemail(name,vid) // this is used for check member email duplicate or not navneet { var newname="#"+name; var nvEmail = $(newname).val(); var myhostname = location.hostname; Url = 'http://'+myhostname+'/aryasamaj-duplicateinstemail.php' $.getJSON(""+Url+"?get=DuplicateEmailCheck&vid="+vid+"&EL="+nvEmail,function(result){ $.each(result.EmailList, function(index, EmailListEach){ if(EmailListEach.Email=="Yes") { $("#emailDupErrId").attr("style","display:inline"); //$('#txtemail').val(''); //document.frmlogin.txtemail.focus(); } if(EmailListEach.Email=="No") { $("#emailDupErrId").attr("style","display:none"); } }); }); }*/ /*function duplicateinstmobile(name,vid) // this is used for check member mobile duplicate or not navneet { var newname="#"+name; var nvMobile = $(newname).val(); var myhostname = location.hostname; Url = 'http://'+myhostname+'/aryasamaj-duplicateinstmobileno.php' $.getJSON(""+Url+"?get=DuplicateMobileCheck&vid="+vid+"&EL="+nvMobile,function(result){ $.each(result.MobileList, function(index, MobileListEach){ if(MobileListEach.Mobile=="Yes") { $("#mobileDupErrId").attr("style","display:inline"); //$('#txtmobno').val(''); document.frmlogin.txtmobno.focus(); } if(MobileListEach.Mobile=="No") { $("#mobileDupErrId").attr("style","display:none"); } }); }); }*/ /*function blurInstEmailCheck(val,vid) // blur email check for member registration modules navneet { var emailid = document.frmlogin.txtemail.value; if(emailid!="") { if(emailCheck(document.frmlogin.txtemail)==false) { document.frmlogin.txtemail.focus(); document.frmlogin.txtemail.value=""; return false; } } duplicateinstemail(val,vid); }*/ function ImageValidation(imageName) { if(imageName != "") { var fileName = imageName; var fileExtension = fileName.lastIndexOf("."); var extension = fileName.substr(fileExtension,fileName.length).toLowerCase(); if(extension == ".jpg" || extension == ".jpeg" || extension == ".gif" || extension == ".png") { return true; } else { return false; } } } // Function added by vimal gohel 2-oct-12 // Function for the event page === aryasamaj-latestevents.php, aryasamaj-events.php function RedirectPhotoEvents(pgno,urlid) { document.frmphotoevents.eventsid.value=pgno; document.frmphotoevents.eventspage.value=urlid; document.frmphotoevents.submit(); } function RedirectVideoEvents(pgno,urlid) { document.frmvideoevents.eventsid.value=pgno; document.frmvideoevents.eventspage.value=urlid; document.frmvideoevents.submit(); } function RedirectAudioEvents(pgno,urlid) { document.frmaudioevents.eventsid.value=pgno; document.frmaudioevents.eventspage.value=urlid; document.frmaudioevents.submit(); } //function for topstoris page function RedirectPhotoNews(pgno,urlid) { document.frmnews.topstoriesid.value=pgno; document.frmnews.newspage.value=urlid; document.frmnews.submit(); } function RedirectVideoNews(pgno,urlid) { document.frmnewsvideo.topstoriesid.value=pgno; document.frmnewsvideo.newspage.value=urlid; document.frmnewsvideo.submit(); } function RedirectAudioNews(pgno,urlid) { document.frmnewsaudio.topstoriesid.value=pgno; document.frmnewsaudio.newspage.value=urlid; document.frmnewsaudio.submit(); } // Function for the festival page === aryasamaj-festival.php function RedirectPhotoFestival(pgno,urlid) { document.frmphotofestival.festivalid.value=pgno; document.frmphotofestival.festivalpage.value=urlid; document.frmphotofestival.submit(); } function RedirectVideoFestival(pgno,urlid) { document.frmvideofestival.festivalid.value=pgno; document.frmvideofestival.festivalpage.value=urlid; document.frmvideofestival.submit(); } function RedirectAudioFestival(pgno,urlid) { document.frmaudiofestival.festivalid.value=pgno; document.frmaudiofestival.festivalpage.value=urlid; document.frmaudiofestival.submit(); } // Function for the topstories module in the homepage == aryasamaj-topstories.php function fnTopStoriesPhoto(pgno,urlid) { document.frmTopStoriesPhoto.topstoriesid.value=pgno; document.frmTopStoriesPhoto.topstoriespage.value=urlid; document.frmTopStoriesPhoto.submit(); } function fnTopStoriesVideo(pgno,urlid) { document.frmTopStoriesVideo.topstoriesid.value=pgno; document.frmTopStoriesVideo.topstoriespage.value=urlid; document.frmTopStoriesVideo.submit(); } function fnTopStoriesAudio(pgno,urlid) { document.frmTopStoriesAudio.topstoriesid.value=pgno; document.frmTopStoriesAudio.topstoriespage.value=urlid; document.frmTopStoriesAudio.submit(); } function RedirectAddMagazine(pgno) { document.frmmagazine.mgid.value=pgno; document.frmmagazine.submit(); } function RedirectAddInstitution(pgno) { document.frminstituion.intid.value=pgno; document.frminstituion.submit(); } function RedirectFindNews(pgno,urlid) { document.frminsnews.impid.value=pgno; document.frminsnews.imppage.value=urlid; document.frminsnews.submit(); } function RedirectEditBearers(sid,typeid) { document.frmeditbearers.sid.value=sid; document.frmeditbearers.typeid.value=typeid; document.frmeditbearers.submit(); } function RedirectPastEvent(pgno,urlid) { document.frmpastevents.festivalid.value=pgno; document.frmpastevents.festivalpage.value=urlid; document.frmpastevents.submit(); } function RedirectCommingEvent(pgno,urlid) { document.frmmajorevents.festivalid.value=pgno; document.frmmajorevents.festivalpage.value=urlid; document.frmmajorevents.submit(); } // End functions == 2-oct-12 function textdisablepoll(id,pqid)//this function use in poll module by dharmishtha { if(id > 0) { document.getElementById('pollsubmit'+pqid).disabled = false; } else { document.getElementById('pollsubmit'+pqid).disabled = true; } } $(document).ready(function(){ //this function use for marqee (function($) { $.fn.textWidth = function(){ var calc = '<span style="display:none">' + $(this).text() + '</span>'; $('body').append(calc); var width = $('body').find('span:last').width(); $('body').find('span:last').remove(); return width; }; $.fn.marquee = function(args) { var that = $(this); var textWidth = that.textWidth(), offset = that.width(), width = offset, css = { 'text-indent' : that.css('text-indent'), 'overflow' : that.css('overflow'), 'white-space' : that.css('white-space') }, marqueeCss = { 'text-indent' : width, 'overflow' : 'hidden', 'white-space' : 'nowrap' }, args = $.extend(true, { count: -1, speed: 1e1, leftToRight: false }, args), i = 0, stop = textWidth*-1, dfd = $.Deferred(); function go() { if(!that.length) return dfd.reject(); if(width == stop) { i++; if(i == args.count) { that.css(css); return dfd.resolve(); } if(args.leftToRight) { width = textWidth*-1; } else { width = offset; } } that.css('text-indent', width + 'px'); if(args.leftToRight) { width++; } else { width--; } setTimeout(go, args.speed); }; if(args.leftToRight) { width = textWidth*-1; width++; stop = offset; } else { width--; } that.css(marqueeCss); go(); return dfd.promise(); }; })(jQuery); $('.marq').marquee({ speed: 20 }); });//]]> function disablebutton()//this is used to button disable at that time when any value not selected from comboxbox by dharmishtha { if(document.frmsearch.cmbsearch.value > 0) document.getElementById('searchsubmit').disabled = false; else document.getElementById('searchsubmit').disabled = true; } function textdisablebutton()//this is used to button disable at that time when any text not inserted into search textbox by dharmishtha { if(document.frmsearch.txtsearch.value.length > 0) document.getElementById('searchsubmit').disabled = false; else document.getElementById('searchsubmit').disabled = true; } //Start Email validation function function emailCheck(objEmail) { //alert(objEmail); if(objEmail.value=="") { alert("Enter your email pls...."); //form1.email.select(); return false; } else { var mail=objEmail.value; return emailCheck1(mail); } } function emailCheck1(emailStr) { var emailPat=/^(.+)@(.+)$/ var specialChars="\\(\\)<>@,;:\\\\\\\"\\.\\[\\]$*{}/^+#%&�=�!`~'" var validChars="\[^\\s" + specialChars + "\]" var quotedUser="(\"[^\"]*\")" var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/ var atom=validChars + '+' var word="(" + atom + "|" + quotedUser + ")" var userPat=new RegExp("^" + word + "(\\." + word + ")*$") var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$") var matchArray=emailStr.match(emailPat) if (matchArray==null) { alert("Please enter correct email address") return false } var user=matchArray[1] var domain=matchArray[2] if (user.match(userPat)==null) { alert("Please enter correct email address") return false } var IPArray=domain.match(ipDomainPat) if (IPArray!=null) { for (var i=1;i<=11;i++) { if (IPArray[i]>255) { alert("Destination IP address is invalid!") return false } } } var domainArray=domain.match(domainPat) if (domainArray==null) { alert("The domain name doesn't seem to be valid.") return false } var atomPat=new RegExp(atom,"g") var domArr=domain.match(atomPat) var len=domArr.length if (domArr[domArr.length-1].length<2 || domArr[domArr.length-1].length>4) { alert("The email address must end in a two to three-letter domain after the dot.") return false } if (len<2) { var errStr="This address is missing a hostname!" alert(errStr) return false } return true; } function emailCheck2(emailStr) { var emailPat=/^(.+)@(.+)$/ var specialChars="\\(\\)<>@,;:\\\\\\\"\\.\\[\\]$*{}/^+#%&�=�!`~'" var validChars="\[^\\s" + specialChars + "\]" var quotedUser="(\"[^\"]*\")" var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/ var atom=validChars + '+' var word="(" + atom + "|" + quotedUser + ")" var userPat=new RegExp("^" + word + "(\\." + word + ")*$") var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$") var matchArray=emailStr.match(emailPat) if (matchArray==null) { return false } var user=matchArray[1] var domain=matchArray[2] if (user.match(userPat)==null) { //alert("Please enter correct email address") return false } var IPArray=domain.match(ipDomainPat) if (IPArray!=null) { for (var i=1;i<=11;i++) { if (IPArray[i]>255) { //alert("Destination IP address is invalid!") return false } } } var domainArray=domain.match(domainPat) if (domainArray==null) { //alert("The domain name doesn't seem to be valid.") return false } var atomPat=new RegExp(atom,"g") var domArr=domain.match(atomPat) var len=domArr.length if (domArr[domArr.length-1].length<2 || domArr[domArr.length-1].length>4) { //alert("The email address must end in a two to three-letter domain after the dot.") return false } if (len<2) { var errStr="This address is missing a hostname!" //alert(errStr) return false } return true; } //over email validation function function check_scriptTag(string) // for address field. { var Comments; Comments=string; Comments=Comments.toLowerCase(); var matchPos = Comments.search('<'); var matchPos1 = Comments.search('<'); var matchPos2 = Comments.search('>'); var matchPos3 = Comments.search('>'); if(matchPos != -1 || matchPos1 != -1 || matchPos2 != -1 || matchPos3 != -1) { return false; } } function ChangeLanguageIdFun(lang) { var str=(lang); var ne=str.split(","); newLng= ne[1].replace(/^\s*/, "").replace(/\s*$/, ""); //alert(newLng); var xmlhttp=false; try { xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); } catch (e) { try { xmlhttp = new ActiveXObject('Microsoft.XMLHTTP'); } catch (E) { xmlhttp = false; } } if (!xmlhttp && typeof XMLHttpRequest!='undefined') { xmlhttp = new XMLHttpRequest(); } var file ="include/aryasamaj_ajaxLanguageChange.php?vlg="+newLng; //window.open(file); xmlhttp.open('GET', file, true); if(newLng>0) { var url = document.URL; url = url.replace(/#$/, ""); window.location.href = window.location.href = url ; //document.location.href='home'; //document.location.href='home'; } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4) { var myContent; myContent=xmlhttp.responseText; } } xmlhttp.send(null) //Nullify the XMLHttpRequest return; } function isValidTime(value) { var urlregex = new RegExp("^([0-1][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$"); if(urlregex.test(value)) { return(true); } return(false); } function blankNews(val) { if(document.frmnews.type[0].checked == true ) { if(document.frmnews.cmbinst.value=='0') { alert("Please Select Institution."); document.frmnews.cmbinst.focus(); return false; } if(document.frmnews.cmbevent.value=='0') { alert("Please Select Event Title."); document.frmnews.cmbevent.focus(); return false; } if(document.frmnews.cmblanguage.options[0].selected) { if(document.frmnews.txtnewstitle.value=='') { alert("Please Enter News Headline."); document.frmnews.txtnewstitle.focus(); return false; } else if(check_scriptTag(document.frmnews.txtnewstitle.value)==false) { alert("Please Enter Valid News Headline."); document.frmnews.txtnewstitle.focus(); return false; } if(document.frmnews.txtshorttexttitle.value=='') { alert("Please Enter Short Text."); document.frmnews.txtshorttexttitle.focus(); return false; } else if(check_scriptTag(document.frmnews.txtshorttexttitle.value)==false) { alert("Please Enter Valid Short Text."); document.frmnews.txtshorttexttitle.focus(); return false; } } else if(document.frmnews.cmblanguage.options[1].selected) { if(document.frmnews.txtnewstitle.value=='') { alert("Please Enter News Headline."); document.frmnews.txtnewstitle.focus(); return false; } else if(check_scriptTag(document.frmnews.txtnewstitle.value)==false) { alert("Please Enter Valid News Headline."); document.frmnews.txtnewstitle.focus(); return false; } if(document.frmnews.txthindititle.value=="") { alert("Please Enter Hindi Headline."); document.frmnews.txthindititle.focus(); return false; } if(document.frmnews.txtshorttexttitle.value=='') { alert("Please Enter Short Text."); document.frmnews.txtshorttexttitle.focus(); return false; } else if(check_scriptTag(document.frmnews.txtshorttexttitle.value)==false) { alert("Please Enter Valid Short Text."); document.frmnews.txtshorttexttitle.focus(); return false; } if(document.frmnews.txthindishorttext.value=="") { alert("Please Enter Hindi Short Text."); document.frmnews.txthindishorttext.focus(); return false; } } else { if(document.frmnews.txtnewstitle.value=='') { alert("Please Enter News Headline."); document.frmnews.txtnewstitle.focus(); return false; } else if(check_scriptTag(document.frmnews.txtnewstitle.value)==false) { alert("Please Enter Valid News Headline."); document.frmnews.txtnewstitle.focus(); return false; } if(document.frmnews.othertxttitle.value=="") { alert("Please Enter Other Headline."); document.frmnews.othertxttitle.focus(); return false; } if(document.frmnews.txtshorttexttitle.value=='') { alert("Please Enter Short Text."); document.frmnews.txtshorttexttitle.focus(); return false; } else if(check_scriptTag(document.frmnews.txtshorttexttitle.value)==false) { alert("Please Enter Valid Short Text."); document.frmnews.txtshorttexttitle.focus(); return false; } if(document.frmnews.othertxtshorttext.value=="") { alert("Please Enter Other Short Text."); document.frmnews.othertxtshorttext.focus(); return false; } } } if(document.frmnews.type[1].checked == true ) { if(document.frmnews.hidimg.value=="") { if(document.frmnews.txtimage.value=="") { alert('Please Select Front Image.'); document.frmnews.txtimage.focus(); return false; } } else if(ImageValidation(document.frmnews.txtimage.value)==false) { alert("Only jpg,jpeg,JPEG,JPG,png,gif,GIF,bmp,BMP,PNG Photos Are Allowed."); document.frmnews.txtimage.focus(); return false; } if(document.frmnews.cmblanguage.options[0].selected) { if(document.frmnews.txtnewstitle.value=='') { alert("Please Enter News Headline."); document.frmnews.txtnewstitle.focus(); return false; } else if(check_scriptTag(document.frmnews.txtnewstitle.value)==false) { alert("Please Enter Valid News Headline."); document.frmnews.txtnewstitle.focus(); return false; } if(document.frmnews.txtshorttexttitle.value=='') { alert("Please Enter Short Text."); document.frmnews.txtshorttexttitle.focus(); return false; } else if(check_scriptTag(document.frmnews.txtshorttexttitle.value)==false) { alert("Please Enter Valid Short Text."); document.frmnews.txtshorttexttitle.focus(); return false; } } else if(document.frmnews.cmblanguage.options[1].selected) { if(document.frmnews.txtnewstitle.value=='') { alert("Please Enter News Headline."); document.frmnews.txtnewstitle.focus(); return false; } else if(check_scriptTag(document.frmnews.txtnewstitle.value)==false) { alert("Please Enter Valid News Headline."); document.frmnews.txtnewstitle.focus(); return false; } if(document.frmnews.txthindititle.value=="") { alert("Please Enter Hindi Headline."); document.frmnews.txthindititle.focus(); return false; } if(document.frmnews.txtshorttexttitle.value=='') { alert("Please Enter Short Text."); document.frmnews.txtshorttexttitle.focus(); return false; } else if(check_scriptTag(document.frmnews.txtshorttexttitle.value)==false) { alert("Please Enter Valid Short Text."); document.frmnews.txtshorttexttitle.focus(); return false; } if(document.frmnews.txthindishorttext.value=="") { alert("Please Enter Hindi Short Text."); document.frmnews.txthindishorttext.focus(); return false; } } else { if(document.frmnews.txtnewstitle.value=='') { alert("Please Enter News Headline."); document.frmnews.txtnewstitle.focus(); return false; } else if(check_scriptTag(document.frmnews.txtnewstitle.value)==false) { alert("Please Enter Valid News Headline."); document.frmnews.txtnewstitle.focus(); return false; } if(document.frmnews.othertxttitle.value=="") { alert("Please Enter Other Headline."); document.frmnews.othertxttitle.focus(); return false; } if(document.frmnews.txtshorttexttitle.value=='') { alert("Please Enter Short Text."); document.frmnews.txtshorttexttitle.focus(); return false; } else if(check_scriptTag(document.frmnews.txtshorttexttitle.value)==false) { alert("Please Enter Valid Short Text."); document.frmnews.txtshorttexttitle.focus(); return false; } if(document.frmnews.othertxtshorttext.value=="") { alert("Please Enter Other Short Text."); document.frmnews.othertxtshorttext.focus(); return false; } } } if(val=='add') { if(document.frmnews.txtimage.value=="" && document.frmnews.hidimg.value=="") { alert('Please Select Front Image.'); document.frmnews.txtimage.focus(); return false; } else if(document.frmnews.txtimage.value!="") { if(ImageValidation(document.frmnews.txtimage.value)==false) { alert("Only jpg,jpeg,JPEG,JPG,png,gif,GIF,bmp,BMP,PNG Photos Are Allowed."); document.frmnews.txtimage.focus(); return false; } } } else { if(document.frmnews.hidimg.value=="") { if(document.frmnews.txtimage.value=="") { alert('Please Select Front Image.'); document.frmnews.txtimage.focus(); return false; } } else if(ImageValidation(document.frmnews.txtimage.value)==false) { alert("Only jpg,jpeg,JPEG,JPG,png,gif,GIF,bmp,BMP,PNG Photos Are Allowed."); document.frmnews.txtimage.focus(); return false; } } if(document.frmnews.type[0].checked == true ) { if(document.frmnews.website.value != "") { if(isValidURL(document.frmnews.website.value)==false) { alert("Please Enter Valid Website URL."); document.frmnews.website.focus(); return false; } } } var videomonth1 = document.frmnews.videomonth.value; var videoday1 = document.frmnews.videoday.value; var videoyear1 = document.frmnews.videoyear.value; var startDate = videomonth1+'/'+videoday1+'/'+videoyear1; if(startDate!= "") { if(videomonth1 == '0' || videoday1 == '0' || videoyear1 == '0') { alert('Please Enter News Date'); document.frmnews.videoday.focus(); return false; } } if(document.frmnews.eventpalce.value=="") { alert("Please Enter News Place."); document.frmnews.eventpalce.focus(); return false; } if(document.frmnews.cmbnvCoun.value==0) { alert("Please Select Country."); document.frmnews.cmbnvCoun.focus(); return false; } if(val=='add') { if(document.frmnews.image_text.value == "") { alert("Please Enter Recaptcha Code"); document.frmnews.image_text.focus(); return false; } else if(document.frmnews.image_text.value != document.frmnews.rechapchatext.value) { alert("Please Enter Valid Recaptcha Code"); document.frmnews.image_text.focus(); return false; } } var emanth = document.frmnews.month1.value; var eday = document.frmnews.day1.value; var eyear = document.frmnews.year1.value; var endDate = emanth+'/'+eday+'/'+eyear; if(endDate!= "") { if(Check_EndDate(startDate,endDate)=="No") { alert('Please Enter Expire Date Greater Than News Date.'); document.frmnews.day1.focus(); return false; } } } function blankAlbum(val) // Javascript Validation For Add Album Added By Navneet date 13/03/2013 { if(document.frmalbum.albumlngid.options[0].selected) { if(document.frmalbum.txtalbumtitle.value=='') { alert("Please Enter Album Title."); document.frmalbum.txtalbumtitle.focus(); return false; } else if(check_scriptTag(document.frmalbum.txtalbumtitle.value)==false) { alert("Please Enter Valid Album."); document.frmalbum.txtalbumtitle.focus(); return false; } if(document.frmalbum.txtshorttexttitle.value=="") { alert("Please Enter Shorttext"); document.frmalbum.txtshorttexttitle.focus(); return false; } else if(check_scriptTag(document.frmalbum.txtshorttexttitle.value)==false) { alert("Please Enter Valid Shorttext"); document.frmalbum.txtshorttexttitle.focus(); return false; } } else if(document.frmalbum.albumlngid.options[1].selected) { if(document.frmalbum.txtalbumtitle.value=='') { alert("Please Enter Album Title."); document.frmalbum.txtalbumtitle.focus(); return false; } else if(check_scriptTag(document.frmalbum.txtalbumtitle.value)==false) { alert("Please Enter Valid News Headline."); document.frmalbum.txtalbumtitle.focus(); return false; } if(document.frmalbum.txtalbumtitlehindi.value=='') { alert("Please Enter Hindi Album Title."); document.frmalbum.txtalbumtitlehindi.focus(); return false; } if(document.frmalbum.txtshorttexttitle.value=="") { alert("Please Enter Shorttext"); document.frmalbum.txtshorttexttitle.focus(); return false; } else if(check_scriptTag(document.frmalbum.txtshorttexttitle.value)==false) { alert("Please Enter Valid Shorttext"); document.frmalbum.txtshorttexttitle.focus(); return false; } if(document.frmalbum.txthindishorttext.value=='') { alert("Please Enter Hindi Short Text."); document.frmalbum.txthindishorttext.focus(); return false; } } else { if(document.frmalbum.txtalbumtitle.value=='') { alert("Please Enter Album Title."); document.frmalbum.txtalbumtitle.focus(); return false; } else if(check_scriptTag(document.frmalbum.txtalbumtitle.value)==false) { alert("Please Enter Valid News Headline."); document.frmalbum.txtalbumtitle.focus(); return false; } if(document.frmalbum.txtalbumtitleother.value=='') { alert("Please Enter Other Album Title."); document.frmalbum.txtalbumtitleother.focus(); return false; } if(document.frmalbum.txtshorttexttitle.value=="") { alert("Please Enter Shorttext"); document.frmalbum.txtshorttexttitle.focus(); return false; } else if(check_scriptTag(document.frmalbum.txtshorttexttitle.value)==false) { alert("Please Enter Valid Shorttext"); document.frmalbum.txtshorttexttitle.focus(); return false; } if(document.frmalbum.othertxtshorttext.value=='') { alert("Please Enter Othe Short Text."); document.frmalbum.othertxtshorttext.focus(); return false; } } /*if(document.frmalbum.cmbInst.value==0) { alert('Please Select Institution'); document.frmalbum.cmbInst.focus(); return false; } if(document.frmalbum.cmbEvent.value==0) { alert('Please Select Event'); document.frmalbum.cmbEvent.focus(); return false; } if(document.frmalbum.cmbNews.value==0) { alert('Please Select News'); document.frmalbum.cmbNews.focus(); return false; } if(document.frmalbum.cmbFestival.value==0) { alert('Please Select Festival'); document.frmalbum.cmbFestival.focus(); return false; }*/ if(val == 'add') { if(document.frmalbum.txtimage.value=="") { alert("Please Select Image"); document.frmalbum.txtimage.focus(); return false; } else { if(ImageValidation(document.frmalbum.txtimage.value)==false) { alert("Only jpg,jpeg,JPEG,JPG,png,gif,GIF,bmp,BMP,PNG Photos are allowed."); document.frmalbum.txtimage.focus(); return false; } } } } //==================institution profile validation start=================== function blankInstpro() //validation of institution profile added by navneet 21/03/2013 { if(document.frmnewinstpro.txtprename.value=="") { alert('Please Enter President Name.'); document.frmnewinstpro.txtprename.focus(); return false; } var preemail = document.frmnewinstpro.txtpreemail.value; if(preemail != "") { if(emailCheck(document.frmnewinstpro.txtpreemail)==false) { document.frmnewinstpro.txtpreemail.focus(); document.frmnewinstpro.txtpreemail.value==''; return false; } } if(document.frmnewinstpro.txtsecname.value=="") { alert('Please Enter Secretory Name.'); document.frmnewinstpro.txtsecname.focus(); return false; } var secemail = document.frmnewinstpro.txtsecemail.value; if(secemail != "") { if(emailCheck(document.frmnewinstpro.txtsecemail)==false) { document.frmnewinstpro.txtsecemail.focus(); return false; } } if(document.frmnewinstpro.txttrename.value=="") { alert('Please Enter Treasurer Name.'); document.frmnewinstpro.txttrename.focus(); return false; } var treemail = document.frmnewinstpro.txttreemail.value; if(treemail != "") { if(emailCheck(document.frmnewinstpro.txttreemail)==false) { document.frmnewinstpro.txttreemail.focus(); return false; } } } //==================institution profile validation end=================== // start the code of check Image extension function imposeMaxLength(Object, MaxLen)//text limit in textarea { return (Object.value.length <= MaxLen); } function ImageValidation(imageName) { if(imageName != "") { var fileName = imageName; var fileExtension = fileName.lastIndexOf("."); var extension = fileName.substr(fileExtension,fileName.length).toLowerCase(); if(extension == ".jpg" || extension == ".jpeg" || extension == ".gif" || extension == ".png") { return true; } else { return false; } } } // Over the code of check Image extension // start the code of check video extension function VideoValidation(videoName) { if(videoName != "") { var fileName = videoName; var fileExtension = fileName.lastIndexOf("."); var extension = fileName.substr(fileExtension,fileName.length).toLowerCase(); if(extension == ".flv" || extension == ".mp4" || extension == ".wmv" || extension == ".avi") { return true; } else { return false; } } } // over the code of check video extension function check_scriptTag(string) // for address field. { var Comments; Comments=string; Comments=Comments.toLowerCase(); var matchPos = Comments.search('<'); var matchPos1 = Comments.search('<'); var matchPos2 = Comments.search('>'); var matchPos3 = Comments.search('>'); if(matchPos != -1 || matchPos1 != -1 || matchPos2 != -1 || matchPos3 != -1) { return false; } } // Over the code of check Image extension function blankInstitution() // crate by Vaishali { if(document.frmlogin.txtname.value=="") { alert("Please Enter Institution Name"); document.frmlogin.txtname.focus(); return false; } else if(check_scriptTag(document.frmlogin.txtname.value)==false) { alert("Please Enter valid Institution Name"); document.frmlogin.txtname.focus(); return false; } if(document.frmlogin.cmbinstitutiontype.value==0) { alert("Please Select Institution Type"); document.frmlogin.cmbinstitutiontype.focus(); return false; } if(document.frmlogin.cmbinstitutionlevel.value==0) { alert("Please Select Institution Level"); document.frmlogin.cmbinstitutionlevel.focus(); return false; } if(document.frmlogin.cmbcountry.value==0) { alert("Please Select Country"); document.frmlogin.cmbcountry.focus(); return false; } if(document.frmlogin.cmbstate.value==0) { alert("Please Select State"); document.frmlogin.cmbstate.focus(); return false; } if(document.frmlogin.cmbcity.value==0) { alert("Please Select City"); document.frmlogin.cmbcity.focus(); return false; } if(document.frmlogin.txtaddress.value=="") { alert("Please Enter Address"); document.frmlogin.txtaddress.focus(); return false; } else if(check_scriptTag(document.frmlogin.txtaddress.value)==false) { alert("Please Enter valid Address"); document.frmlogin.txtaddress.focus(); return false; } var emailid = document.frmlogin.txtemail.value; if(emailid!="") { if(emailCheck(document.frmlogin.txtemail)==false) { document.frmlogin.txtemail.focus(); return false; } } else if(document.frmlogin.txtmobno.value=="") { alert('Please Enter Mobile Number or Email Address.'); document.frmlogin.txtemail.focus(); return false; } if(document.frmlogin.txtmobno.value!="") { if(document.getElementById("txtmobno").value.length < 10) { alert('Please Enter Minimum 10 Digit Mobile Number.'); document.frmlogin.txtmobno.focus(); return false; } } if(document.frmlogin.txtpassword.value=="") { alert("Please Enter Password"); document.frmlogin.txtpassword.focus(); return false; } if(document.getElementById("txtpassword").value.length < 7) { alert("Please Enter Minimum 7 Digit Password."); document.frmlogin.txtpassword.focus(); return false; } if(document.frmlogin.txtpassword.value!="" && document.frmlogin.txtrepassword.value=="") { alert("Please Enter Re-PassWord"); document.frmlogin.txtrepassword.focus(); return false; } if(document.frmlogin.txtpassword.value != document.frmlogin.txtrepassword.value) { alert("Password is not match to Re-Password"); document.frmlogin.txtrepassword.focus(); return false; } /*var emailid = document.frmlogin.txtpreemail.value; if(emailid!="") { if(emailCheck(document.frmlogin.txtpreemail)==false) { document.frmlogin.txtpreemail.focus(); return false; } } else if(document.frmlogin.txtpremo.value=="") { alert('Please Enter President Mobile Number or Email Address.'); document.frmlogin.txtpreemail.focus(); return false; } var emailid = document.frmlogin.txtsecemail.value; if(emailid!="") { if(emailCheck(document.frmlogin.txtsecemail)==false) { document.frmlogin.txtsecemail.focus(); return false; } } else if(document.frmlogin.txtsecmo.value=="") { alert('Please Enter Secretary Mobile Number or Email Address.'); document.frmlogin.txtsecemail.focus(); return false; } var emailid = document.frmlogin.txtteremail.value; if(emailid!="") { if(emailCheck(document.frmlogin.txtteremail)==false) { document.frmlogin.txtteremail.focus(); return false; } } else if(document.frmlogin.txttermo.value=="") { alert('Please Enter Treasurer Mobile Number or Email Address.'); document.frmlogin.txtteremail.focus(); return false; }*/ if(document.frmlogin.image_text.value == "") { alert("Please Enter Recaptcha Code"); document.frmlogin.image_text.focus(); return false; } else if(document.frmlogin.image_text.value != document.frmlogin.rechapchatext.value) { alert("Please Enter Valid Recaptcha Code"); document.frmlogin.image_text.focus(); return false; } if(document.frmlogin.hidval.value != "") { alert("Please Enter Valid Email Address"); document.frmlogin.txtemail.focus(); return false; } } function showConfirm() { alert("vaishali"); //var limitval=document.frmnewinstreg.limitval.value; //var totalval=document.frmnewinstreg.totalval.value; var confirmMsg=confirm("You have added 5 Institutions. you can add 0 more at current Institutions level" ); if (confirmMsg==true) { submitform(); } else { return false; } } /////////this function is for article blank validation start function blankArticle(val) { if(document.frmarticle.txtengtitle.value == "") { alert("Please Enter Title"); document.frmarticle.txtengtitle.focus(); return false; } else if(check_scriptTag(document.frmarticle.txtengtitle.value)==false) { alert("Please Enter Valid Title."); document.frmarticle.txtengtitle.focus(); return false; } if(document.frmarticle.txtshorttexttitle.value == "") { alert("Please Enter Short Text"); document.frmarticle.txtshorttexttitle.focus(); return false; } else if(check_scriptTag(document.frmarticle.txtshorttexttitle.value)==false) { alert("Please Enter Valid Short Text."); document.frmarticle.txtshorttexttitle.focus(); return false; } if(document.frmarticle.cmbcat.value == 0) { alert("Please Select Category"); document.frmarticle.cmbcat.focus(); return false; } if(document.frmarticle.txtauthor.value == "") { alert("Please Enter Author Name"); document.frmarticle.txtauthor.focus(); return false; } else if(check_scriptTag(document.frmarticle.txtauthor.value)==false) { alert("Please Enter Valid Author Name."); document.frmarticle.txtauthor.focus(); return false; } if(val=='add') { if(document.frmarticle.txtimage.value !="") { if(ImageValidation(document.frmarticle.txtimage.value)==false) { alert("Only jpg,jpeg,JPEG,JPG,png,gif,GIF,bmp,BMP,PNG Photos are allowed."); document.frmarticle.txtimage.focus(); return false; } } if(document.frmarticle.txtvideo.value !="") { if(VideoValidation(document.frmarticle.txtvideo.value)==false) { alert("Only MPEG,WMV,FLV and AVI videos are allowed."); document.frmarticle.txtvideo.focus(); return false; } } } if(document.frmarticle.txtcaptcha.value == "") { alert("Please Enter Recaptcha Code"); document.frmarticle.txtcaptcha.focus(); return false; } else if(document.frmarticle.txtcaptcha.value != document.frmarticle.rechapchatext.value) { alert("Please Enter Valid Recaptcha Code"); document.frmarticle.txtcaptcha.focus(); return false; } } //blank validation for magazines function blankLMagazin(val) { if(document.frmlatestmagazines.cmbmagazine.value==0) { alert('Please Select Magazine Title.'); document.frmlatestmagazines.cmbmagazine.focus(); return false; } if(document.frmlatestmagazines.txtisuperiod.value=="") { alert("Please Enter Special Issue Name"); document.frmlatestmagazines.txtisuperiod.focus(); return false; } else if(check_scriptTag(document.frmlatestmagazines.txtisuperiod.value)==false) { alert("Please Enter Special Issue Name."); document.frmlatestmagazines.txtisuperiod.focus(); return false; } if(val=='add') { if(document.frmlatestmagazines.txtimage.value=="") { alert("Please Select Image"); document.frmlatestmagazines.txtimage.focus(); return false; } else { if(ImageValidation(document.frmlatestmagazines.txtimage.value)==false) { alert("Only jpg,jpeg,JPEG,JPG,png,gif,GIF,bmp,BMP,PNG Photos are allowed."); document.frmlatestmagazines.txtimage.focus(); return false; } } if(document.frmlatestmagazines.txtdocfile.value=="") { if(document.frmlatestmagazines.txtlink.value=="") { alert("Please Select Document File OR Enter Link."); document.frmlatestmagazines.txtdocfile.focus(); return false; } } } else { if(document.frmlatestmagazines.txtdocfile.value=="") { if(document.frmlatestmagazines.txtlink.value=="") { alert("Please Select Document File OR Enter Link."); document.frmlatestmagazines.txtdocfile.focus(); return false; } } } if(document.frmlatestmagazines.txtcaptcha.value == "") { alert("Please Enter Recaptcha Code"); document.frmlatestmagazines.txtcaptcha.focus(); return false; } else if(document.frmlatestmagazines.txtcaptcha.value != document.frmlatestmagazines.rechapchatext.value) { alert("Please Enter Valid Recaptcha Code"); document.frmlatestmagazines.txtcaptcha.focus(); return false; } } function ChangeSelectLanguage(lang,val,id) { var str=(lang); var ne=str.split(","); newLng= ne[1].replace(/^\s*/, "").replace(/\s*$/, ""); if(newLng>0) { if(val=='addalbum') { var file = window.location.href ="clientalbum?sellng="+newLng; } if(val=='editnews') { var file = window.location.href ="editinstnews?svid="+id+"&sellng="+newLng; } if(val=='addnews') { window.location.href ="addinstnews?sellng="+newLng; } if(val=='addevents') { //window.location.href ="addinstevent?sellng="+newLng; var xmlhttp=false; try { xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); } catch (e) { try { xmlhttp = new ActiveXObject('Microsoft.XMLHTTP'); } catch (E) { xmlhttp = false; } } if (!xmlhttp && typeof XMLHttpRequest!='undefined') { xmlhttp = new XMLHttpRequest(); } var file ="include/aryasamaj-lngsid.php?sellng="+newLng; //window.open(file); if(newLng>0) { var url = document.URL; url = url.replace(/#$/, ""); window.location.href = window.location.href = url ; } xmlhttp.open('GET', file, true); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4) { var myContent; myContent=xmlhttp.responseText; document.getElementById('FetchAjaxDatastate').innerHTML=myContent; } } xmlhttp.send(null) //Nullify the XMLHttpRequest return; } if(val=='editevents') { //window.location.href ="addinstevent?sellng="+newLng; var xmlhttp=false; try { xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); } catch (e) { try { xmlhttp = new ActiveXObject('Microsoft.XMLHTTP'); } catch (E) { xmlhttp = false; } } if (!xmlhttp && typeof XMLHttpRequest!='undefined') { xmlhttp = new XMLHttpRequest(); } var file ="include/aryasamaj-lngsid.php?impid="+id+"&sellng="+newLng; //window.open(file); if(newLng>0) { var url = document.URL; url = url.replace(/#$/, ""); window.location.href = window.location.href = url ; } xmlhttp.open('GET', file, true); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4) { var myContent; myContent=xmlhttp.responseText; document.getElementById('FetchAjaxDatastate').innerHTML=myContent; } } xmlhttp.send(null) //Nullify the XMLHttpRequest return; } } return; } function UpdateActiveInactiveVal(name,val,id) { var xmlhttp=false; try { xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); } catch (e) { try { xmlhttp = new ActiveXObject('Microsoft.XMLHTTP'); } catch (E) { xmlhttp = false; } } if (!xmlhttp && typeof XMLHttpRequest!='undefined') { xmlhttp = new XMLHttpRequest(); } var file ="include/aryasamaj_ajaxactiveinactive.php?fname="+name+"&val="+val+"&upid="+id; //window.open(file); xmlhttp.open('GET', file, true); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4) { var myContent; myContent=xmlhttp.responseText; document.getElementById('FetchAjaxDataactive['+id+']').innerHTML=myContent; } } xmlhttp.send(null) //Nullify the XMLHttpRequest return; } function UpdateActiveInactiveVal1(name,val,valreg,id) { var xmlhttp=false; try { xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); } catch (e) { try { xmlhttp = new ActiveXObject('Microsoft.XMLHTTP'); } catch (E) { xmlhttp = false; } } if (!xmlhttp && typeof XMLHttpRequest!='undefined') { xmlhttp = new XMLHttpRequest(); } var file ="include/aryasamaj_ajaxactiveinactive.php?fname="+name+"&val="+val+"&valreg="+valreg+"&upid="+id; //window.open(file); xmlhttp.open('GET', file, true); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4) { var myContent; myContent=xmlhttp.responseText; document.getElementById('FetchAjaxDataactive1['+id+']').innerHTML=myContent; } } xmlhttp.send(null) //Nullify the XMLHttpRequest return; } function findselstateinst(stateid) ////this function is used for State wise selected institute. 06-02-13 himanshu { xmlhttp=false; try { xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); } catch (e) { try { xmlhttp = new ActiveXObject('Microsoft.XMLHTTP'); } catch (E) { xmlhttp = false; } } if (!xmlhttp && typeof XMLHttpRequest!='undefined') { xmlhttp = new XMLHttpRequest(); } var file ="include/aryasamaj_fnd_city_instajax.php?stateid="+stateid; //window.open(file); xmlhttp.open('GET', file, true); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4) { var myContent; myContent=xmlhttp.responseText; document.getElementById('FetchAjaxDataInstitute').innerHTML=myContent; } } xmlhttp.send(null) //Nullify the XMLHttpRequest return; } /////////this function is for article blank validation end function getsingle()//for disable period date in event { document.getElementById("pday").disabled=true; document.getElementById("pday1").disabled=true; document.getElementById("pmonth").disabled=true; document.getElementById("pmonth1").disabled=true; document.getElementById("pyear").disabled=true; document.getElementById("pyear1").disabled=true; document.getElementById("day").disabled=false; document.getElementById("month").disabled=false; document.getElementById("year").disabled=false; document.getElementById("txtdayevent1").checked=false; } function getmulti()//for disable date in event { document.getElementById("day").disabled=true; document.getElementById("month").disabled=true; document.getElementById("year").disabled=true; document.getElementById("pday").disabled=false; document.getElementById("pday1").disabled=false; document.getElementById("pmonth").disabled=false; document.getElementById("pmonth1").disabled=false; document.getElementById("pyear").disabled=false; document.getElementById("pyear1").disabled=false; document.getElementById("txtdayevent").checked=false; } function findeventlevel(instid) ////this function is used for find event level using institution id { var xmlhttp=false; try { xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); } catch (e) { try { xmlhttp = new ActiveXObject('Microsoft.XMLHTTP'); } catch (E) { xmlhttp = false; } } if (!xmlhttp && typeof XMLHttpRequest!='undefined') { xmlhttp = new XMLHttpRequest(); } var file ="include/aryasamaj_fnd_eventlevel.php?instid="+instid; //window.open(file); xmlhttp.open('GET', file, true); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4) { var myContent; myContent=xmlhttp.responseText; document.getElementById('fetchLevel').innerHTML=myContent; } } xmlhttp.send(null) //Nullify the XMLHttpRequest return; } function findselevent(instid,eidnew) //this function is used for news wise select event. { var xmlhttp=false; try { xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); } catch (e) { try { xmlhttp = new ActiveXObject('Microsoft.XMLHTTP'); } catch (E) { xmlhttp = false; } } if (!xmlhttp && typeof XMLHttpRequest!='undefined') { xmlhttp = new XMLHttpRequest(); } var file ="include/aryasamaj_fnd_event_ajax.php?instid="+instid+"&eidnew="+eidnew; //window.open(file); xmlhttp.open('GET', file, true); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4) { var myContent; myContent=xmlhttp.responseText; document.getElementById('fetcheventdata').innerHTML=myContent; } } xmlhttp.send(null) //Nullify the XMLHttpRequest return; } function findphotoalbum(id) { var xmlhttp=false; try { xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); } catch (e) { try { xmlhttp = new ActiveXObject('Microsoft.XMLHTTP'); } catch (E) { xmlhttp = false; } } if (!xmlhttp && typeof XMLHttpRequest!='undefined') { xmlhttp = new XMLHttpRequest(); } var file ="include/aryasamaj_photoalbum_ajax.php?urid="+id; //window.open(file); xmlhttp.open('GET', file, true); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4) { var myContent; myContent=xmlhttp.responseText; document.getElementById('Fetchphotoalbum').innerHTML=myContent; } } xmlhttp.send(null) //Nullify the XMLHttpRequest return; } function findphotonewalbum(id) { var xmlhttp=false; try { xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); } catch (e) { try { xmlhttp = new ActiveXObject('Microsoft.XMLHTTP'); } catch (E) { xmlhttp = false; } } if (!xmlhttp && typeof XMLHttpRequest!='undefined') { xmlhttp = new XMLHttpRequest(); } var file ="include/aryasamaj_photonewalbum_ajax.php?urid="+id; //window.open(file); xmlhttp.open('GET', file, true); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4) { var myContent; myContent=xmlhttp.responseText; document.getElementById('Fetchphotoalbum').innerHTML=myContent; } } xmlhttp.send(null) //Nullify the XMLHttpRequest return; } function blankmemprofile() //validation of member register form { //alert(document.frmlogin.hidval.value); if(document.frmconformlink.txtmemprofile.value=="") { alert('Please Enter Profile Name'); document.frmconformlink.txtmemprofile.focus(); return false; } else if(check_scriptTag(document.frmconformlink.txtmemprofile.value)==false) { alert("Please Enter Valid Profile Name."); document.frmconformlink.txtmemprofile.focus(); return false; } if(ImageValidation(document.frmconformlink.txtimage.value)==false) { alert("Only jpg,jpeg,JPEG,JPG,png,gif,GIF,bmp,BMP,PNG Photos Are Allowed."); document.frmconformlink.txtimage.focus(); return false; } } function ChangeLang1(evid,inid) { document.clientnews.evid.value=evid; document.clientnews.eveintid.value=inid; document.clientnews.submit(); } function ChangeInstEvent(eveintid) { document.clientnews.eveintid.value=eveintid; document.clientnews.submit(); } function blankNewregister(val) // Javascript Validation For New Registration Institution Added By Navneet date 14/03/2013 { if(document.frmnewinstreg.cmbInstType.value==0) { alert("Please Select Institution Types."); document.frmnewinstreg.cmbInstType.focus(); return false; } if(document.frmnewinstreg.instlngid.options[0].selected) { if(document.frmnewinstreg.txtinstname.value=='') { alert("Please Enter Institution Name."); document.frmnewinstreg.txtinstname.focus(); return false; } else if(check_scriptTag(document.frmnewinstreg.txtinstname.value)==false) { alert("Please Enter Valid Institution Name."); document.frmnewinstreg.txtinstname.focus(); return false; } } else if(document.frmnewinstreg.instlngid.options[1].selected) { if(document.frmnewinstreg.txtinstname.value=='') { alert("Please Enter Institution Name."); document.frmnewinstreg.txtinstname.focus(); return false; } else if(check_scriptTag(document.frmnewinstreg.txtinstname.value)==false) { alert("Please Enter Valid Institution Name."); document.frmnewinstreg.txtinstname.focus(); return false; } if(document.frmnewinstreg.txtinsthindiname.value=='') { alert("Please Enter Hindi Institution Name."); document.frmnewinstreg.txtinsthindiname.focus(); return false; } } else { if(document.frmnewinstreg.txtinstname.value=='') { alert("Please Enter Institution Name."); document.frmnewinstreg.txtinstname.focus(); return false; } else if(check_scriptTag(document.frmnewinstreg.txtinstname.value)==false) { alert("Please Enter Valid Institution Name."); document.frmnewinstreg.txtinstname.focus(); return false; } if(document.frmnewinstreg.txtinstothername.value=='') { alert("Please Enter Other Institution Name."); document.frmnewinstreg.txtinstothername.focus(); return false; } } /*if(val == 'add') { if(document.frmnewinstreg.txtlogo.value=="") { alert("Please Select Logo"); document.frmnewinstreg.txtlogo.focus(); return false; } else { if(ImageValidation(document.frmnewinstreg.txtlogo.value)==false) { alert("Only jpg,jpeg,JPEG,JPG,png,gif,GIF,bmp,BMP,PNG Photos are allowed."); document.frmnewinstreg.txtlogo.focus(); return false; } } }*/ if(document.frmnewinstreg.txtwebadd.value=='') { alert("Please Enter Web Address."); document.frmnewinstreg.txtwebadd.focus(); return false; } if(document.frmnewinstreg.cmbcountry.value==0) { alert("Please Select Country."); document.frmnewinstreg.cmbcountry.focus(); return false; } if(document.frmnewinstreg.cmbstate.value==0) { alert("Please Select State."); document.frmnewinstreg.cmbstate.focus(); return false; } if(document.frmnewinstreg.txtaddress.value=='') { alert("Please Enter Address."); document.frmnewinstreg.txtaddress.focus(); return false; } var emailid = document.frmnewinstreg.txtoffemail.value; if(document.frmnewinstreg.txtoffemail.value=="") { alert('Please Enter Email Address.'); document.frmnewinstreg.txtoffemail.focus(); return false; } else if(emailid!="") { if(emailCheck(document.frmnewinstreg.txtoffemail)==false) { document.frmnewinstreg.txtoffemail.focus(); return false; } } var offwebid = document.frmnewinstreg.txtwebsite.value; if(offwebid != "") { if(isValidURL(document.frmnewinstreg.txtwebsite.value)==false) { alert("Please Enter Valid Link URL."); document.frmnewinstreg.txtwebsite.focus(); return false; } } if(document.getElementById("txtcondition").checked == false) { alert('You Are Not Accept Term And Condition.'); document.frmnewinstreg.txtcondition.focus(); return false; } if(val == 'add') { var limitval=document.frmnewinstreg.limitval.value; var totalval=document.frmnewinstreg.totalval.value; var confirmMsg=confirm('Thanks for registering this Institution.'+'\n'+'You have already '+limitval+' Institutions & cannot add more Institutions to your Account.' ); if(confirmMsg == true) { submitform() } else { return false; } } } function blankRegisterPro(val,nmarr) // Javascript Validation For New Registration Institution Profile Added By Navneet date 25/03/2013 { temp = nmarr.split('~'); for (var i = 0; i < val; i++) { if(document.getElementById('txtname['+i+']').value=='') { alert ("Please Enter "+temp[i]+" Name."); document.getElementById('txtname['+i+']').focus(); return false; } if(document.getElementById('txtemail['+i+']').value!="") { if(emailCheck(document.getElementById('txtemail['+i+']'))==false) { document.getElementById('txtemail['+i+']').focus(); return false; } } if(document.getElementById('txtphoto['+i+']').value!="") { if(ImageValidation(document.getElementById('txtphoto['+i+']').value)==false) { alert("Only jpg,jpeg,JPEG,JPG,png,gif,GIF,bmp,BMP,PNG Photos Are Allowed."); document.getElementById('txtphoto['+i+']').focus(); return false; } var inputFile = document.getElementById('txtphoto['+i+']'); for (var i = 0; i < inputFile .files.length; i++) { var file = inputFile .files[i]; if ('size' in file) { var sz=file.size/(1024); if(sz >= 100) { alert('Please Upload Only Less-Than 100 Kb Image'); return false; } } }//for } } } function blankOfficer(val,nmarr) // Javascript Validation For New Registration Institution Profile Added By Navneet date 25/03/2013 { temp = nmarr.split('~'); for (var i = 0; i < 3; i++) { if(document.getElementById('txtname['+i+']').value=='') { alert ("Please Enter "+temp[i]+" Name."); document.getElementById('txtname['+i+']').focus(); return false; } if(document.getElementById('txtemail['+i+']').value!="") { if(emailCheck(document.getElementById('txtemail['+i+']'))==false) { document.getElementById('txtemail['+i+']').focus(); return false; } } if(document.getElementById('txtphoto['+i+']').value!="") { if(ImageValidation(document.getElementById('txtphoto['+i+']').value)==false) { alert("Only jpg,jpeg,JPEG,JPG,png,gif,GIF,bmp,BMP,PNG Photos Are Allowed."); document.getElementById('txtphoto['+i+']').focus(); return false; } var inputFile = document.getElementById('txtphoto['+i+']'); for (var i = 0; i < inputFile .files.length; i++) { var file = inputFile .files[i]; if ('size' in file) { var sz=file.size/(1024); if(sz >= 100) { alert('Please Upload Only Less-Than 100 Kb Image'); return false; } } }//for } } } function submitform()//this function is used to submit event form { var test1=document.getElementById('frmnewinstreg'); test1.submit(); } function blanksearch() { if(document.frmbtnsearch.cmbcountry.value != 0 && document.frmbtnsearch.cmbstate.value== 0) { alert("Please Select State"); document.frmbtnsearch.cmbstate.focus(); return false; } if(document.frmbtnsearch.cmbcountry.value == 0 && document.frmbtnsearch.cmbstate.value== 0) { alert("Please Select Country and State"); document.frmbtnsearch.cmbcountry.focus(); return false; } } function blanksearch1() { if(document.frmbtnsearch1.cmbcountry1.value != 0 && document.frmbtnsearch1.txtpicode.value== "") { alert("Please Enter Pincode"); document.frmbtnsearch1.txtpicode.focus(); return false; } if(document.frmbtnsearch1.cmbcountry1.value == 0 && document.frmbtnsearch1.txtpicode.value!= "") { alert("Please Select Country"); document.frmbtnsearch1.cmbcountry1.focus(); return false; } if(document.frmbtnsearch1.cmbcountry1.value == 0 && document.frmbtnsearch1.txtpicode.value== "") { alert("Please Select Country and Pincode"); document.frmbtnsearch1.cmbcountry1.focus(); return false; } } function enable(){ //enable submit button or not created by Parmar Nitesh if (document.frmconformlink.txtcondition.checked==''){ document.frmconformlink.btnsubmit.disabled=true }else{ document.frmconformlink.btnsubmit.disabled=false } } function getCookieValue(key)//user in getcombox function for create cookie created Parmar Nitesh { currentcookie = document.cookie; if (currentcookie.length > 0) { firstidx = currentcookie.indexOf(key + "="); if (firstidx != -1) { firstidx = firstidx + key.length + 1; lastidx = currentcookie.indexOf(";",firstidx); if (lastidx == -1) { lastidx = currentcookie.length; } return unescape(currentcookie.substring(firstidx, lastidx)); } } return ""; } function getComboBox(lid)//store cookie and duplicate validation created by Parmar Nitesh { if (typeof lid === "undefined") { selectedValue = document.frmconformlink.cmbmultlang.value; var cookieid=getCookieValue('yourname'); } else { selectedValue=""; var cookieid=lid; } if(cookieid!="") { var fields = cookieid.split(/,/); var length = fields.length; var keyval=""; for (var i=0; i < length; i++) { if(fields[i]==selectedValue) { alert('Please this value duplicat'); keyval=1; break; } } if(keyval=="") { var newval=cookieid+','+selectedValue; } else { var newval=cookieid; } document.cookie="yourname=" + newval; } else { document.cookie="yourname=" + selectedValue; } } function blankmgztitle(val)//user fir blank magazine title filed validation created by parmar nitesh { if(document.frmmagazines.cmblanguage.options[0].selected) { alert("Please Select Language."); document.frmmagazines.cmblanguage.focus(); return false; } if(document.frmmagazines.cmblanguage.options[1].selected) { if(document.frmmagazines.txttitle.value=='') { alert("Please Enter Title."); document.frmmagazines.txttitle.focus(); return false; } else if(check_scriptTag(document.frmmagazines.txttitle.value)==false) { alert("Please Enter Valid Title."); document.frmmagazines.txttitle.focus(); return false; } } else if(document.frmmagazines.cmblanguage.options[2].selected) { if(document.frmmagazines.txttitle.value=='') { alert("Please Enter Title."); document.frmmagazines.txttitle.focus(); return false; } else if(check_scriptTag(document.frmmagazines.txttitle.value)==false) { alert("Please Enter Valid Title."); document.frmmagazines.txttitle.focus(); return false; } if(document.frmmagazines.txthindititle.value=='') { alert("Please Enter Hindi Title."); document.frmmagazines.txthindititle.focus(); return false; } else if(check_scriptTag(document.frmmagazines.txthindititle.value)==false) { alert("Please Enter Valid Hindi Title."); document.frmmagazines.txthindititle.focus(); return false; } } else { if(document.frmmagazines.txttitle.value=='') { alert("Please Enter Title."); document.frmmagazines.txttitle.focus(); return false; } else if(check_scriptTag(document.frmmagazines.txttitle.value)==false) { alert("Please Enter Valid Title."); document.frmmagazines.txttitle.focus(); return false; } if(document.frmmagazines.othertxttitle.value=='') { alert("Please Enter Other Title."); document.frmmagazines.othertxttitle.focus(); return false; } else if(check_scriptTag(document.frmmagazines.othertxttitle.value)==false) { alert("Please Enter Valid Other Title."); document.frmmagazines.othertxttitle.focus(); return false; } } if(document.frmmagazines.cmblanguage.options[1].selected) { if(document.frmmagazines.txttagline.value=='') { alert("Please Enter Tagline."); document.frmmagazines.txttagline.focus(); return false; } else if(check_scriptTag(document.frmmagazines.txttagline.value)==false) { alert("Please Enter Valid Tagline."); document.frmmagazines.txttagline.focus(); return false; } } else if(document.frmmagazines.cmblanguage.options[2].selected) { if(document.frmmagazines.txttagline.value=='') { alert("Please Enter Tagline."); document.frmmagazines.txttagline.focus(); return false; } else if(check_scriptTag(document.frmmagazines.txttagline.value)==false) { alert("Please Enter Valid Tagline."); document.frmmagazines.txttagline.focus(); return false; } if(document.frmmagazines.txthinditagline.value=='') { alert("Please Enter Hindi Tagline."); document.frmmagazines.txthinditagline.focus(); return false; } else if(check_scriptTag(document.frmmagazines.txthinditagline.value)==false) { alert("Please Enter Valid Hindi Tagline."); document.frmmagazines.txthinditagline.focus(); return false; } } else { if(document.frmmagazines.txttagline.value=='') { alert("Please Enter Tagline."); document.frmmagazines.txttagline.focus(); return false; } else if(check_scriptTag(document.frmmagazines.txttagline.value)==false) { alert("Please Enter Valid Tagline."); document.frmmagazines.txttagline.focus(); return false; } if(document.frmmagazines.txtothertagline.value=='') { alert("Please Enter Other Tagline."); document.frmmagazines.txtothertagline.focus(); return false; } else if(check_scriptTag(document.frmmagazines.txtothertagline.value)==false) { alert("Please Enter Valid Other Tagline."); document.frmmagazines.txtothertagline.focus(); return false; } } if(document.frmmagazines.txtwebadd.value=='') { alert("Please Enter Web Address."); document.frmmagazines.txtwebadd.focus(); return false; } else if(check_scriptTag(document.frmmagazines.txtwebadd.value)==false) { alert("Please Enter Valid Web Address."); document.frmmagazines.txtwebadd.focus(); return false; } if(document.frmmagazines.cmbfreqcy.value=='0') { alert("Please Select Frequency."); document.frmmagazines.cmbfreqcy.focus(); return false; } if(document.frmmagazines.cmblanguage.options[1].selected) { if(document.frmmagazines.txtpublisher.value=='') { alert("Please Enter Publihser."); document.frmmagazines.txtpublisher.focus(); return false; } else if(check_scriptTag(document.frmmagazines.txtpublisher.value)==false) { alert("Please Enter Valid Publisher."); document.frmmagazines.txtpublisher.focus(); return false; } } else if(document.frmmagazines.cmblanguage.options[2].selected) { if(document.frmmagazines.txtpublisher.value=='') { alert("Please Enter Publihser."); document.frmmagazines.txtpublisher.focus(); return false; } else if(check_scriptTag(document.frmmagazines.txtpublisher.value)==false) { alert("Please Enter Valid Publisher."); document.frmmagazines.txtpublisher.focus(); return false; } if(document.frmmagazines.txtpublisherhindi.value=='') { alert("Please Enter Hindi Publihser."); document.frmmagazines.txtpublisherhindi.focus(); return false; } else if(check_scriptTag(document.frmmagazines.txtpublisherhindi.value)==false) { alert("Please Enter Valid Hindi Publisher."); document.frmmagazines.txtpublisherhindi.focus(); return false; } } else { if(document.frmmagazines.txtpublisher.value=='') { alert("Please Enter Publihser."); document.frmmagazines.txtpublisher.focus(); return false; } else if(check_scriptTag(document.frmmagazines.txtpublisher.value)==false) { alert("Please Enter Valid Publisher."); document.frmmagazines.txtpublisher.focus(); return false; } if(document.frmmagazines.txtotherpublisher.value=='') { alert("Please Enter Other Publihser."); document.frmmagazines.txtotherpublisher.focus(); return false; } else if(check_scriptTag(document.frmmagazines.txtotherpublisher.value)==false) { alert("Please Enter Valid Other Publisher."); document.frmmagazines.txtotherpublisher.focus(); return false; } } if(document.frmmagazines.cmbcountry.value=='0') { alert("Please select country."); document.frmmagazines.cmbcountry.focus(); return false; } if(val == 'add') { var limitval=document.frmmagazines.limitval.value; var totalval=document.frmmagazines.totalval.value; var confirmMsg=confirm('Thanks for registering this Magazine.'+'\n'+'You have already '+limitval+' Magazines & cannot add more Magazines to your Account.' ); if(confirmMsg == true) { submitformmgzn() } else { return false; } } var emailid = document.frmmagazines.txtemail.value; if(emailid!="") { if(emailCheck(document.frmmagazines.txtemail)==false) { document.frmmagazines.txtemail.focus(); return false; } } } function submitformmgzn()//this function is used to submit Magazine form { var test1=document.getElementById('frmmagazines'); test1.submit(); } function ChangeLang22(intid) { document.clientnews.intid.value=intid; document.clientnews.submit(); } function ChangeLangnews(lngid) { var str=(lngid); var ne=str.split(","); newLng= ne[1].replace(/^\s*/, "").replace(/\s*$/, ""); if(newLng>0) { document.clientnews.lngid.value=newLng; document.clientnews.submit(); } } function blankEvent() //Event Advanced Validation { if(document.frmEvent.cmbinst.value == 0) { alert("Please Select Organiser."); document.frmEvent.cmbinst.focus(); return false; } if(document.frmEvent.cmbtype.value == 0) { alert("Please Select Event Type."); document.frmEvent.cmbtype.focus(); return false; } if(document.frmEvent.sellng.options[0].selected) { alert("Please Select Language."); document.frmEvent.sellng.focus(); return false; } if(document.frmEvent.sellng.options[1].selected) { if(document.frmEvent.txtevttitleeng.value=='') { alert("Please Enter Event Title."); document.frmEvent.txtevttitleeng.focus(); return false; } else if(check_scriptTag(document.frmEvent.txtevttitleeng.value)==false) { alert("Please Enter Valid Event Title."); document.frmEvent.txtevttitleeng.focus(); return false; } if(document.frmEvent.txtshorteng.value=='') { alert("Please Enter Short Text."); document.frmEvent.txtshorteng.focus(); return false; } else if(check_scriptTag(document.frmEvent.txtshorteng.value)==false) { alert("Please Enter Valid Short Text."); document.frmEvent.txtshorteng.focus(); return false; } } else if(document.frmEvent.sellng.options[2].selected) { if(document.frmEvent.txtevttitleeng.value=='') { alert("Please Enter Event Title."); document.frmEvent.txtevttitleeng.focus(); return false; } else if(check_scriptTag(document.frmEvent.txtevttitleeng.value)==false) { alert("Please Enter Valid Event Title."); document.frmEvent.txtevttitleeng.focus(); return false; } if(document.frmEvent.txtevttitledev.value=="") { alert("Please Enter Hindi Title."); document.frmEvent.txtevttitledev.focus(); return false; } else if(check_scriptTag(document.frmEvent.txtevttitledev.value)==false) { alert("Please Enter Valid Event Title."); document.frmEvent.txtevttitledev.focus(); return false; } if(document.frmEvent.txtshorteng.value=='') { alert("Please Enter Short Text."); document.frmEvent.txtshorteng.focus(); return false; } else if(check_scriptTag(document.frmEvent.txtshorteng.value)==false) { alert("Please Enter Valid Short Text"); document.frmEvent.txtshorteng.focus(); return false; } if(document.frmEvent.txtshortdev.value=="") { alert("Please Enter Hindi Short Text."); document.frmEvent.txtshortdev.focus(); return false; } else if(check_scriptTag(document.frmEvent.txtshortdev.value)==false) { alert("Please Enter Valid Short Text"); document.frmEvent.txtshortdev.focus(); return false; } } else { if(document.frmEvent.txtevttitleeng.value=='') { alert("Please Enter Event Title."); document.frmEvent.txtevttitleeng.focus(); return false; } else if(check_scriptTag(document.frmEvent.txtevttitleeng.value)==false) { alert("Please Enter Valid Event Title."); document.frmEvent.txtevttitleeng.focus(); return false; } if(document.frmEvent.txtevttitleoth.value=="") { alert("Please Enter Other Title."); document.frmEvent.txtevttitleoth.focus(); return false; } else if(check_scriptTag(document.frmEvent.txtevttitleoth.value)==false) { alert("Please Enter Valid Event Title."); document.frmEvent.txtevttitleoth.focus(); return false; } if(document.frmEvent.txtshorteng.value=='') { alert("Please Enter Short Text."); document.frmEvent.txtshorteng.focus(); return false; } else if(check_scriptTag(document.frmEvent.txtshorteng.value)==false) { alert("Please Enter Valid Short Text."); document.frmEvent.txtshorteng.focus(); return false; } if(document.frmEvent.txtshortoth.value=="") { alert("Please Enter Other Short Text."); document.frmEvent.txtshortoth.focus(); return false; } else if(check_scriptTag(document.frmEvent.txtshortoth.value)==false) { alert("Please Enter Valid Short Text."); document.frmEvent.txtshortoth.focus(); return false; } } if(document.frmEvent.hour.value == 0) { alert("Please Select Hour."); document.frmEvent.hour.focus(); return false; } if(document.frmEvent.pday.value == "") { alert("Please Select Day."); document.frmEvent.pday.focus(); return false; } if(document.frmEvent.pmonth.value == "") { alert("Please Select Month."); document.frmEvent.pmonth.focus(); return false; } if(document.frmEvent.pyear.value == "") { alert("Please Select Year."); document.frmEvent.pyear.focus(); return false; } if(document.frmEvent.pday1.value == "") { alert("Please Select Day."); document.frmEvent.pday1.focus(); return false; } if(document.frmEvent.pmonth1.value == "") { alert("Please Select Month."); document.frmEvent.pmonth1.focus(); return false; } if(document.frmEvent.pyear1.value == "") { alert("Please Select Year."); document.frmEvent.pyear1.focus(); return false; } var smanth = document.frmEvent.pmonth.value; var emanth = document.frmEvent.pmonth1.value; var syear = document.frmEvent.pyear.value; var eyear = document.frmEvent.pyear1.value; var sday = document.frmEvent.pday.value; var eday = document.frmEvent.pday1.value; var endDate = emanth+'/'+eday+'/'+eyear; var startDate = smanth+'/'+sday+'/'+syear; if(endDate!= "") { if(Check_EndDate(startDate,endDate)=="No") { alert('Please enter end date greater than or equal to start date.'); document.frmEvent.pday1.focus(); return false; } } if(document.frmEvent.txtpresinm.value!="") { if(check_scriptTag(document.frmEvent.txtpresinm.value)==false) { alert("Please Enter Valid Contact Person."); document.frmEvent.txtpresinm.focus(); return false; } } if(document.frmEvent.presidemail.value!="") { if(emailCheck(document.frmEvent.presidemail)==false) { document.frmEvent.presidemail.focus(); return false; } } if(document.frmEvent.cmbcountry.value==0) { alert('Please Select Country.'); document.frmEvent.cmbcountry.focus(); return false; } if(document.frmEvent.cmbstate.value==0) { alert('Please Select State.'); document.frmEvent.cmbstate.focus(); return false; } if(document.frmEvent.txtaddress.value=="") { alert("Please Enter Address."); document.frmEvent.txtaddress.focus(); return false; } else if(check_scriptTag(document.frmEvent.txtaddress.value)==false) { alert("Please Enter Valid Event Address."); document.frmEvent.txtaddress.focus(); return false; } } function simpleblankEvent() //Event simple Validation { if(document.frmEvent.cmbinst.value == 0) { alert("Please Select Organiser."); document.frmEvent.cmbinst.focus(); return false; } if(document.frmEvent.txtevttitleeng.value=='') { alert("Please Enter Event Title."); document.frmEvent.txtevttitleeng.focus(); return false; } else if(check_scriptTag(document.frmEvent.txtevttitleeng.value)==false) { alert("Please Enter Valid Event Title."); document.frmEvent.txtevttitleeng.focus(); return false; } if(document.frmEvent.pday.value == "") { alert("Please Select Day."); document.frmEvent.pday.focus(); return false; } if(document.frmEvent.pmonth.value == "") { alert("Please Select Month."); document.frmEvent.pmonth.focus(); return false; } if(document.frmEvent.pyear.value == "") { alert("Please Select Year."); document.frmEvent.pyear.focus(); return false; } if(document.frmEvent.pday1.value == "") { alert("Please Select Day."); document.frmEvent.pday1.focus(); return false; } if(document.frmEvent.pmonth1.value == "") { alert("Please Select Month."); document.frmEvent.pmonth1.focus(); return false; } if(document.frmEvent.pyear1.value == "") { alert("Please Select Year."); document.frmEvent.pyear1.focus(); return false; } var smanth = document.frmEvent.pmonth.value; var emanth = document.frmEvent.pmonth1.value; var syear = document.frmEvent.pyear.value; var eyear = document.frmEvent.pyear1.value; var sday = document.frmEvent.pday.value; var eday = document.frmEvent.pday1.value; var endDate = emanth+'/'+eday+'/'+eyear; var startDate = smanth+'/'+sday+'/'+syear; if(endDate!= "") { if(Check_EndDate(startDate,endDate)=="No") { alert('Please enter end date greater than or equal to start date.'); document.frmEvent.pday1.focus(); return false; } } if(document.frmEvent.txtpresinm.value=="") { alert("Please Enter Contact Person Name."); document.frmEvent.txtpresinm.focus(); return false; } else if(check_scriptTag(document.frmEvent.txtpresinm.value)==false) { alert("Please Enter Valid Contact Person Name."); document.frmEvent.txtpresinm.focus(); return false; } if(document.frmEvent.txtpresimbl.value=="") { alert("Please Enter Mobile No."); document.frmEvent.txtpresimbl.focus(); return false; } if(document.frmEvent.presidemail.value!="") { if(emailCheck(document.frmEvent.presidemail)==false) { document.frmEvent.presidemail.focus(); return false; } } if(document.frmEvent.cmbcountry.value==0) { alert('Please Select Country.'); document.frmEvent.cmbcountry.focus(); return false; } if(document.frmEvent.cmbstate.value==0) { alert('Please Select State.'); document.frmEvent.cmbstate.focus(); return false; } if(document.frmEvent.txtaddress.value=="") { alert("Please Enter Address."); document.frmEvent.txtaddress.focus(); return false; } else if(check_scriptTag(document.frmEvent.txtaddress.value)==false) { alert("Please Enter Valid Event Address."); document.frmEvent.txtaddress.focus(); return false; } } function blankEventProgram(id) //Event Program Validation { if(id=='1') { if(document.frmprogram.txtevttitleeng.value=='') { alert("Please Enter program Title."); document.frmprogram.txtevttitleeng.focus(); return false; } else if(check_scriptTag(document.frmprogram.txtevttitleeng.value)==false) { alert("Please Enter Valid program Title."); document.frmprogram.txtevttitleeng.focus(); return false; } if(document.frmprogram.txtshorteng.value=='') { alert("Please Enter Short Text."); document.frmprogram.txtshorteng.focus(); return false; } else if(check_scriptTag(document.frmprogram.txtshorteng.value)==false) { alert("Please Enter Valid Short Text."); document.frmprogram.txtshorteng.focus(); return false; } } else if(id=='2') { if(document.frmprogram.txtevttitleeng.value=='') { alert("Please Enter program Title."); document.frmprogram.txtevttitleeng.focus(); return false; } else if(check_scriptTag(document.frmprogram.txtevttitleeng.value)==false) { alert("Please Enter Valid program Title."); document.frmprogram.txtevttitleeng.focus(); return false; } if(document.frmprogram.txtevttitledev.value=="") { alert("Please Enter Hindi Title."); document.frmprogram.txtevttitledev.focus(); return false; } if(document.frmprogram.txtshorteng.value=='') { alert("Please Enter Short Text."); document.frmprogram.txtshorteng.focus(); return false; } else if(check_scriptTag(document.frmprogram.txtshorteng.value)==false) { alert("Please Enter Valid Short Text."); document.frmprogram.txtshorteng.focus(); return false; } if(document.frmprogram.txtshortdev.value=="") { alert("Please Enter Hindi Short Text."); document.frmprogram.txtshortdev.focus(); return false; } } else { if(document.frmprogram.txtevttitleeng.value=='') { alert("Please Enter Program Title."); document.frmprogram.txtevttitleeng.focus(); return false; } else if(check_scriptTag(document.frmprogram.txtevttitleeng.value)==false) { alert("Please Enter Valid Program Title."); document.frmprogram.txtevttitleeng.focus(); return false; } if(document.frmprogram.txtevttitleoth.value=="") { alert("Please Enter Other Title."); document.frmprogram.txtevttitleoth.focus(); return false; } if(document.frmprogram.txtshorteng.value=='') { alert("Please Enter Short Text."); document.frmprogram.txtshorteng.focus(); return false; } else if(check_scriptTag(document.frmprogram.txtshorteng.value)==false) { alert("Please Enter Valid Short Text."); document.frmprogram.txtshorteng.focus(); return false; } if(document.frmprogram.txtshortoth.value=="") { alert("Please Enter Other Short Text."); document.frmprogram.txtshortoth.focus(); return false; } } } function Delrecord(val,id) //Delete Record Event Program { var xmlhttp=false; try { xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); } catch (e) { try { xmlhttp = new ActiveXObject('Microsoft.XMLHTTP'); } catch (E) { xmlhttp = false; } } if (!xmlhttp && typeof XMLHttpRequest!='undefined') { xmlhttp = new XMLHttpRequest(); } var file ="include/aryasamaj_ajaxpampprgdelete.php?val="+val+"&id="+id; //window.open(file); xmlhttp.open('GET', file, true); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4) { var myContent; myContent=xmlhttp.responseText; document.getElementById('FetchAjaxDatarecodel['+id+']').innerHTML=myContent; } } xmlhttp.send(null) //Nullify the XMLHttpRequest return; } function RedirectEditEvents(neweventid) { document.editinstevent.neweventid.value=neweventid; document.editinstevent.submit(); } function RedirectEditPamplet(eventpamid) { document.editeventpamp.eventpamid.value=eventpamid; document.editeventpamp.submit(); } function RedirectEditinstPamplet(eventpamid,insteventid) { document.editeventpamp.eventpamid.value=eventpamid; document.editeventpamp.insteventid.value=insteventid; document.editeventpamp.submit(); } function RedirectEditProgram(prgeventid,instid) { document.editeventprg.prgeventid.value=prgeventid; document.editeventprg.prginstid.value=instid; document.editeventprg.submit(); } function RedirectInstEvent(pgno,urlid)//dharmi { document.frmmyinstevent.eventinstid.value=pgno; document.frmmyinstevent.eventinsturl.value=urlid; document.frmmyinstevent.submit(); } function RedirectInstNews(pgno,urlid)//dharmi { document.frmmyinstnews.newsinstid.value=pgno; document.frmmyinstnews.newsinsturl.value=urlid; document.frmmyinstnews.submit(); } function RedirectInstOfficer(pgno,urlid)//dharmi { document.frmmyinstofficer.officerinstid.value=pgno; document.frmmyinstofficer.officerinsturl.value=urlid; document.frmmyinstofficer.submit(); } function RedirectDetailInstViewEvent(neweventid) { document.viewevent.neweventid.value=neweventid; document.viewevent.submit(); } function RedirectDelNews(pgno,urlid) { document.frminstmynews.instid.value=pgno; document.frminstmynews.delid.value=urlid; document.frminstmynews.submit(); } function RedirectDelOfficer(pgno,urlid) { document.frminstmyofficer.instid.value=pgno; document.frminstmyofficer.delid.value=urlid; document.frminstmyofficer.submit(); } function RedirectInstAddEvent(insid,url) { document.frmaddevent.ins.value=insid; document.frmaddevent.insturl.value=url; document.frmaddevent.submit(); } function RedirectInstAddNews(insid,url) { document.frmaddnews.insnews.value=insid; document.frmaddnews.insturl.value=url; document.frmaddnews.submit(); } function RedirectInstphotoalbm(insid,url) { document.frmphotoalbm.photoinstid.value=insid; document.frmphotoalbm.insturl.value=url; document.frmphotoalbm.submit(); } function isAlphawebadd(evt) //this function is use fro add character and number value and also space Date:-09-may-2013 { var charCode = (evt.which) ? evt.which : event.keyCode if (charCode >= 32 &&(charCode < 65 || charCode > 90) && (charCode < 97 || charCode > 122) && (charCode < 48 || charCode > 57)) { return false; } else { return true; } } function RedirectInstAppProfile(elecprofinstid) { document.frmelectinstprof.elecprofinstid.value=elecprofinstid; document.frmelectinstprof.submit(); } function RedirectToRegister(newurl) { document.frmlog.newurl.value=newurl; document.frmlog.submit(); } function getbearers(bid,date) { document.frmbearers.bid.value=bid; document.frmbearers.submit(); } function findsessiondate(day,month,year)//function display sessiondate lastdate wise use in admission form create by nitesh { var xmlhttp=false; try { xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); } catch (e) { try { xmlhttp = new ActiveXObject('Microsoft.XMLHTTP'); } catch (E) { xmlhttp = false; } } if (!xmlhttp && typeof XMLHttpRequest!='undefined') { xmlhttp = new XMLHttpRequest(); } var file ="include/aryasamaj-fnd-sessionstartdate.php?day="+day+"&month="+month+"&year="+year; //window.open(file); xmlhttp.open('GET', file, true); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4) { var myContent; myContent=xmlhttp.responseText; document.getElementById('sessiondatediv').innerHTML=myContent; } } xmlhttp.send(null) //Nullify the XMLHttpRequest return; } function Blanknotification(id) { var fmonth = document.frmadmsnnotf.firstmonth.value; var fday = document.frmadmsnnotf.firstday.value; var fyear = document.frmadmsnnotf.firstyear.value; var startDate = fmonth+'/'+fday+'/'+fyear; if(startDate!= "") { if(fmonth == '' || fday == '' || fyear == '') { alert('Please Enter Admission Process Start Date'); document.frmadmsnnotf.firstday.focus(); return false; } } var emanth = document.frmadmsnnotf.endmonth.value; var eday = document.frmadmsnnotf.endday.value; var eyear = document.frmadmsnnotf.endyear.value; var endDate = emanth+'/'+eday+'/'+eyear; if(endDate!= "") { if(emanth=='' || eday=='' || eyear=='') { alert('Please Enter Last Date of Application Submission.'); document.frmadmsnnotf.endday.focus(); return false; } } if(endDate!= "") { if(Check_EndDate(startDate,endDate)=="No") { alert('Please Enter Last Date of Application Submission Greater Than Admission Process Start Date.'); document.frmadmsnnotf.endday.focus(); return false; } } var emailid = document.frmadmsnnotf.txtemail.value; if(emailid!="") { if(emailCheck(document.frmadmsnnotf.txtemail)==false) { document.frmadmsnnotf.txtemail.focus(); return false; } } } function addFileInputTstQues(val,id)//add one by on multiple textbox function { if(id==1) { var iVal = document.getElementById('no_of_i').value; } if(iVal=="-1") { iVal=0; } val = Number(val) + Number(iVal); if(Number(val) == 24) { alert("You can Add Maximum 25 option."); } else { if(id==1) { var divId = 'txtcans_'+val; } var element = document.getElementById(divId); element.style.display = "inline"; iVal ++; if(id==1) { document.getElementById('no_of_i').value = iVal; } } } function hide_TextTstQues(val,id)//this function is used for hide textbox { if(id==1) { var iVal = document.getElementById('no_of_i').value; } var val = Number(val) + Number(iVal); var val1=val-1; if(id==1) { var divId = 'txtcans_'+val1; } var element = document.getElementById(divId); element.style.display = "none"; iVal --; if(id==1) { document.getElementById('no_of_i').value = iVal; } } function charLimit(el)//This two function useful to count character and pending character creat by nitesh { var maxLength=2000; if (el.value.length > maxLength) return false; return true; } function characterCount(el) { var maxLength=2000; var charCount = document.getElementById('charCount'); if (el.value.length > maxLength) el.value = el.value.substring(0,maxLength); if (charCount) charCount.innerHTML = maxLength - el.value.length; return true; } function findpwdusingemail(email) ////this function display password textbox using email { var xmlhttp=false; try { xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); } catch (e) { try { xmlhttp = new ActiveXObject('Microsoft.XMLHTTP'); } catch (E) { xmlhttp = false; } } if (!xmlhttp && typeof XMLHttpRequest!='undefined') { xmlhttp = new XMLHttpRequest(); } var file ="include/aryasamaj-passwordfieldfetch.php?email="+email; xmlhttp.open('GET', file, true); //window.open(file); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4) { var myContent; myContent=xmlhttp.responseText; document.getElementById('displaypassword').innerHTML=myContent; } } xmlhttp.send(null) //Nullify the XMLHttpRequest return; } function checkpassword(pass,email) ////this function display message if password in wrong { var xmlhttp=false; try { xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); } catch (e) { try { xmlhttp = new ActiveXObject('Microsoft.XMLHTTP'); } catch (E) { xmlhttp = false; } } if (!xmlhttp && typeof XMLHttpRequest!='undefined') { xmlhttp = new XMLHttpRequest(); } var file ="include/aryasamaj-checkpassword.php?pass="+pass+"&email="+email; xmlhttp.open('GET', file, true); //window.open(file); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4) { var myContent; myContent=xmlhttp.responseText; document.getElementById('wrongpassmsg').innerHTML=myContent; } } xmlhttp.send(null) //Nullify the XMLHttpRequest return; } function blankphoto() //validation of client photo album form { if(document.frmphoto.txtalbumtitle.value=="") { alert('Please Enter Album Title'); document.frmphoto.txtalbumtitle.focus(); return false; } if(document.frmphoto.txtimage.value=="") { alert('Please Select Photo'); document.frmphoto.txtimage.focus(); return false; } else if(ImageValidation(document.frmphoto.txtimage.value)==false) { alert("Only jpg,jpeg,JPEG,JPG,png,gif,GIF,bmp,BMP,PNG Photos Are Allowed."); document.frmphoto.txtimage.focus(); return false; } } function findserpos(searchid,instid) ////this function is used for get the serch box when select position added by navneet date : 23/08/2013 { var xmlhttp=false; try { xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); } catch (e) { try { xmlhttp = new ActiveXObject('Microsoft.XMLHTTP'); } catch (E) { xmlhttp = false; } } if (!xmlhttp && typeof XMLHttpRequest!='undefined') { xmlhttp = new XMLHttpRequest(); } var file ="include/aryasamaj_fnd_mgznsearch_ajax.php?searchid="+searchid; //window.open(file); xmlhttp.open('GET', file, true); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4) { var myContent; myContent=xmlhttp.responseText; document.getElementById('FetchAjaxSearchCheck').innerHTML=myContent; } } xmlhttp.send(null) //Nullify the XMLHttpRequest return; } function findInstserpos(searchid,instid) ////this function is used for get the serch box when select position added by navneet date : 23/08/2013 { var xmlhttp=false; try { xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); } catch (e) { try { xmlhttp = new ActiveXObject('Microsoft.XMLHTTP'); } catch (E) { xmlhttp = false; } } if (!xmlhttp && typeof XMLHttpRequest!='undefined') { xmlhttp = new XMLHttpRequest(); } var file ="include/aryasamaj_fnd_instmgzsearch_ajax.php?searchid="+searchid+"&instid="+instid; //window.open(file); xmlhttp.open('GET', file, true); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4) { var myContent; myContent=xmlhttp.responseText; document.getElementById('FetchAjaxSearchCheck').innerHTML=myContent; } } xmlhttp.send(null) //Nullify the XMLHttpRequest return; } function findselectmgznstate(nvcountryid) //this function is used for Contry wise select state. { var xmlhttp=false; try { xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); } catch (e) { try { xmlhttp = new ActiveXObject('Microsoft.XMLHTTP'); } catch (E) { xmlhttp = false; } } if (!xmlhttp && typeof XMLHttpRequest!='undefined') { xmlhttp = new XMLHttpRequest(); } var file ="include/aryasamaj_fnd_mgzn_state_ajax.php?nvcountryid="+nvcountryid; //window.open(file); xmlhttp.open('GET', file, true); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4) { var myContent; myContent=xmlhttp.responseText; document.getElementById('FetchAjaxmgznDatastate').innerHTML=myContent; } } xmlhttp.send(null) //Nullify the XMLHttpRequest return; } function QUgetinstructionfield(typeid) //this function is used for display instruction field { var xmlhttp=false; try { xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); } catch (e) { try { xmlhttp = new ActiveXObject('Microsoft.XMLHTTP'); } catch (E) { xmlhttp = false; } } if (!xmlhttp && typeof XMLHttpRequest!='undefined') { xmlhttp = new XMLHttpRequest(); } var file ="include/aryasamaj-fetchinstructionfield.php?typeid="+typeid; //window.open(file); xmlhttp.open('GET', file, true); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4) { var myContent; myContent=xmlhttp.responseText; document.getElementById('fetchinstruction').innerHTML=myContent; } } xmlhttp.send(null) //Nullify the XMLHttpRequest return; } function toSeconds(time_str) //use for get different between two time in test 17/01/2014 { var parts = time_str.split(':'); return parts[0] * 3600 + // an hour has 3600 seconds parts[1] * 60 + // a minute has 60 seconds +parts[2]; // seconds } function hideshowque(val2,val3,val4) { $("#hidid").val(val4); $("input[name='cmbans']:checked").val(''); var b = $("#totnumqus").html(); var a = $("#numqus").html(); var c = $("#backidval").val(val3); if(val2 >= 1) { var va1l= parseInt(a) - 1; } else { var va1l= parseInt(a) + 1; } if(va1l > b) { va1l=va1l-1; $("#"+a+"").attr("style","display:none"); var lqueover = 5000+b; $("#"+va1l+"").attr("style","display:block"); $("#numqus").html(va1l); $("#leftnumqus").html(lqueover); alert("Your Test Is Over Please Click On Submit Button."); } if(va1l > 0) { $("#"+a+"").attr("style","display:none"); $("#"+va1l+"").attr("style","display:block"); $("#numqus").html(va1l); var d = $("#leftnumqus").html(); var leftval= parseInt(d) + 1; $("#"+d+"").attr("style","display:none"); $("#"+leftval+"").attr("style","display:block"); $("#leftnumqus").html(leftval); } else { va1l=1; $("#"+a+"").attr("style","display:none"); $("#"+va1l+"").attr("style","display:block"); $("#numqus").html(va1l); alert("Please Start Your Test."); } } //===this function use for "aryasamaj-prequestion.php" and "aryasamaj-assessmentquestion.php" files start==== function writeCookie(name,value,days) { var date, expires; if (days) { date = new Date(); date.setTime(date.getTime()+(days*24*60*60*1000)); expires = "; expires=" + date.toGMTString(); }else{ expires = ""; } document.cookie = name + "=" + value + expires + "; path=/"; } function readCookie(name) { var i, c, ca, nameEQ = name + "="; ca = document.cookie.split(';'); for(i=0;i < ca.length;i++) { c = ca[i]; while (c.charAt(0)==' ') { c = c.substring(1,c.length); } if (c.indexOf(nameEQ) == 0) { return c.substring(nameEQ.length,c.length); } } return ''; } //this function is useful for random no. put nitesh date:05-05-14 function makeid() { var text = ""; var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; for( var i=0; i < 5; i++ ) text += possible.charAt(Math.floor(Math.random() * possible.length)); return text; } function findrecaptcha() ////this function reload captcha code put by nitesh date:05-05-14 { var xmlhttp=false; try { xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); } catch (e) { try { xmlhttp = new ActiveXObject('Microsoft.XMLHTTP'); } catch (E) { xmlhttp = false; } } if (!xmlhttp && typeof XMLHttpRequest!='undefined') { xmlhttp = new XMLHttpRequest(); } var captcha=makeid(); //alert(captcha); var file ="aryasamaj-reloadverificationcode.php?day="+captcha; xmlhttp.open('GET', file, true); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4) { var myContent; myContent=xmlhttp.responseText; document.getElementById('emptydiv').innerHTML=myContent; //alert("Nitesh"); } } //window.open(file); xmlhttp.send(null) //Nullify the XMLHttpRequest return; } function OnPageNumSub(page)//use for the go to page put by:Nitesh { document.frmpaging.page.value=page; document.frmpaging.submit(); } function mobilecheckpassword(pass,email) ////this function display message if password in wrong { //document.signupform.userpass.focus(); var xmlhttp=false; try { xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); } catch (e) { try { xmlhttp = new ActiveXObject('Microsoft.XMLHTTP'); } catch (E) { xmlhttp = false; } } if (!xmlhttp && typeof XMLHttpRequest!='undefined') { xmlhttp = new XMLHttpRequest(); } var file ="aryasamaj-mobilepasscheck.php?pass="+pass+"&email="+email; xmlhttp.open('GET', file, true); //window.open(file); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4) { var myContent; myContent=xmlhttp.responseText; if(myContent!="") { document.signupform.userpass.focus(); } document.getElementById('wrongpassmsg').innerHTML=myContent; } } xmlhttp.send(null) //Nullify the XMLHttpRequest return; } //===this function use for "aryasamaj-prequestion.php" and "aryasamaj-assessmentquestion.php" files end====
Close