PageSourceSearch

http://www.activa.com.au/js/userpanel.js

js activa.com.au collected 2026-10-06 13:15:14 UTC 30,422 bytes, 1,222 lines download raw bytes

1// JavaScript Document
2/*Contact us validation script*/
3function print_page()
4{
5		window.print();
6		document.getElementById("h1").style.display="none";
7}
8function reloadcaptcha()
9{
10	$.ajax({
11 	    type: "POST",
12		url:siteurl + "reloadcode/",
13		dataType:'html',
14		success:function(data)
15		{ 
16			d = data.split("<@@>");
17			$("#security_check").val(d[0]);
18			$('#code_img').attr("src",d[1]);
19			
20		}		
21	});		
22}
23function contactus_validate()
24{
25	$(document).ready(function() {
26	$("#reset").click(function(){
27		resetform('frmcontact');
28		reloadcaptcha();
29	});
30	$("#flash_msg" ).hide().css({visibility: "hidden", display: "none"});
31	$("#frmcontact").validate({
32	rules: {
33     name: "required",
34	 com_name:
35        {
36        	required: true,
37            minlength: 2
38        },
39	 cell:
40	 {
41	 	required: true,
42		digits: true
43	 },
44     email: {
45       required: true,
46       email: true
47     },
48	 code:
49	 {
50	 	required: true,
51		remote: {
52        url: siteurl+"checkcode/",
53        type: "post",
54        data: {
55          code: function() {
56			return $("#code").val();
57          },
58		  security_check:function(){
59			  return $("#security_check").val();
60		  }
61        },
62		beforeSend   : function(){ 
63		}
64      }
65
66	 }
67   },
68   messages: {
69     name: " Please enter your name.",
70	 com_name:
71     {
72         required: " Please enter a company name.",
73         minlength: " Company name is not long enough."
74     },
75	 cell:
76	 {
77	 	required: " Please enter cell number.",
78		digits: " Please enter valid number."
79	 },
80     email: {
81       required: " Email address require.",
82       email: " Please enter valid email address."
83     },
84	 code:
85	 {
86	 	required: " Please enter security code.",
87		remote: " Please Enter valid security code."
88	 }
89   },
90	errorPlacement: function(error, element) {  
91					error.appendTo(element.next());
92				},  
93				
94	submitHandler: function() {  
95			sendmail();
96			}, 
97	success: function(label) { 		 
98				label.html("&nbsp;").addClass("valid_small"); 					
99			} 
100	
101    });
102	}); 
103}
104function sendmail()
105{
106	
107	$.ajax({
108 	    type: "POST",
109		url:siteurl + "sendmail/",
110		data: {
111          name: function() {
112			return $("#name").val();
113          },
114		  com_name:function(){
115			  return $("#com_name").val();
116		  },
117		  add1:function(){
118			  return $("#add1").val();
119		  },
120		  add2:function(){
121			  return $("#add2").val();
122		  },
123		  phone:function(){
124			  return $("#phone").val();
125		  },
126		  cell:function(){
127			  return $("#cell").val();
128		  },
129		  email:function(){
130			  return $("#email").val();
131		  },
132		   comments:function(){
133			  return $("#comments").val();
134		  }
135        },
136		dataType:'html',
137		success:function(data)
138		{ 
139			//alert(data); 
140
141				$("#flash_msg" ).removeClass("error")
142			   $("#flash_msg" ).addClass("success");
143			   $("#flash_msg" ).show().css({visibility: "visible", display: "block"});
144			   $("#flash_msg" ).html('Mail Sent Successfully.');
145
146			   resetform('frmcontact');
147			   reloadcaptcha();
148				$('#flash_msg').fadeOut(15000);
149		}		
150	});
151	 
152}
153
154
155function loginvalidation()
156{
157	
158	$("#formlogin").validate({
159	rules: {
160     username:
161	 {
162		 required: true
163	 },
164	 userpassword:
165	 {
166	 	required: true
167	 }
168   },
169   messages: {
170     username:
171     {
172         required: " Please enter a username.<br />"
173     },
174	 userpassword:
175	 {
176	 	required: " Please enter password.<br />"
177	 }
178   },
179	errorPlacement: function(error, element) {  
180					if($('#flash_msg').html() == "Invalid Username OR Password")
181					{
182						$('#flash_msg').html("");
183					}
184					//error.appendTo(element.next());
185					$("#flash_msg" ).show().css({visibility: "visible", display: "block"});
186					error.appendTo($('#flash_msg'));
187					//$('#flash_msg').append("<br />");
188				},  
189				
190	submitHandler: function() {  
191			loginprocess();
192			}, 
193	success: function(label) {
194				label.remove();
195				if($("#flash_msg" ).html() == "")
196				{
197					$("#flash_msg" ).hide().css({visibility: "hidden", display: "none"});
198				}
199			} 
200	}); 
201}
202function callLogin()
203{
204	 $(document).ready(function(){
205		 $('tr#db').hide();
206 		 $('tr#db1').hide();	
207		  $("#donelogin" ).hide();
208		$("#flash_msg" ).hide().css({visibility: "hidden", display: "none"});	
209		
210		//if user press enter key then call loginprocess function
211		$('input[type=password]').keyup(function(e) {
212			  if(e.keyCode == 13) {
213				loginprocess();
214			  }
215		});
216		//if user press enter key then call loginprocess function
217		$('input[type=text]').keyup(function(e) {
218			  if(e.keyCode == 13) {
219				loginprocess();
220			  }
221		});
222		
223		//if user press login button key then call loginprocess function
224		 $("#loginbtn" ).click(function() {  
225				//loginvalidation();
226				loginprocess();
227			});
228	});	
229}
230function loginprocess()
231{
232	var username = $('#username').val();
233	var password = $('#userpassword').val();
234	
235	if(username=="")
236	{
237		 $("#flash_msg" ).hide().css({visibility: "visible", display: "block"});
238			   $("#flash_msg" ).html('Username can not be blank');
239			  // $('#flash_msg').fadeOut(20000);
240			   $('#username').focus();
241			  return false;
242	}
243	else
244	{
245		 $("#flash_msg" ).hide().css({visibility: "hidden", display: "none"});
246	}
247	if(password=="")
248	{
249		 $("#flash_msg" ).hide().css({visibility: "visible", display: "block"});
250			   $("#flash_msg" ).html('Password can not be blank');
251			  // $('#flash_msg').fadeOut(9000);
252			   $('#password').focus();
253			  return false;
254	}
255	else
256	{
257		 $("#flash_msg" ).hide().css({visibility: "hidden", display: "none"});
258	}
259	
260	$.ajax({
261          type: "POST",
262          //url: siteurl+"/chkvalidate/",
263		  url: siteurl+"/chkvalidateandgetdb/",
264		  data: "checkUserUsername="+username+"&checkUserPassword="+password,
265          dataType:"json",
266       success: function(data)
267       {		   		
268	   		var msg = data['msg'];
269		  if(msg == "false")
270          {
271			   $("#flash_msg" ).show().css({visibility: "visible", display: "block"});
272			   $("#flash_msg" ).html('Invalid Username OR Password');
273			   $('#flash_msg').fadeOut(15000);			   
274		  }
275		  else if(msg == "client")
276          {
277			   $("#flash_msg" ).show().css({visibility: "visible", display: "block"});
278			   $("#flash_msg" ).html('Invalid Username OR Password in FrontOffice');
279			   $('#flash_msg').fadeOut(15000);			   
280		  }		  
281		  else if(msg == "db")
282		  {
283			  $('tr#db').show().css({visibility: "visible"});
284 		 	  $('tr#db1').show().css({visibility: "visible"});
285			  var cdata = data['db'];
286			 
287			  var counter=0;
288			  var chkBox= cdata.split(",");			   
289			  var control = " <select name='database' id='database' style='width:142px; font-size:11px; border-radius:0px; height:23px;'>";
290						
291			  for (counter=0;counter<chkBox.length;counter++)
292			  {
293				var rData= chkBox[counter].split("=");
294				var checkStr ="";							
295				control+= " &nbsp; <option "+checkStr+" value='"+rData[0]+"'  > "+rData[1] + "</option>";	 
296			  }
297			  control+= " </select ><label></label>";
298
299			  $('#dbdiv').html(control);
300			  
301			  $("#loginbtn" ).hide();
302			  $("#donelogin" ).show();
303				
304		  }
305		  else if(msg=="done")
306		  {			
307			window.location = redirecturl;
308		  }
309       }
310     })
311}
312
313function logindone()
314{
315	var username = $('#username').val();
316	var password = $('#userpassword').val();
317	var database= $('#database').val();
318	
319	if(database=="")
320	{
321		 $("#flash_msg" ).hide().css({visibility: "visible", display: "block"});
322			   $("#flash_msg" ).html('Database can not be blank');
323			  // $('#flash_msg').fadeOut(9000);
324			   $('#database').focus();
325			  return false;
326	}
327	else
328	{
329		 $("#flash_msg" ).hide().css({visibility: "hidden", display: "none"});
330	}
331	
332	$.ajax({
333          type: "POST",
334          url: siteurl+"/chkvalidate/",
335		  data: "checkUserUsername="+username+"&checkUserPassword="+password+"&database="+database,
336          dataType:"json",
337       success: function(data)
338       {		 
339	   	  var msg = data['msg'];
340		  if(msg == "false")
341          	  {
342			   $("#flash_msg" ).hide().css({visibility: "visible", display: "block"});
343			   $("#flash_msg" ).html('Invalid Username OR Password');
344			   $('#flash_msg').fadeOut(15000);			   
345		  }
346		  else if(msg=="done")
347		  {
348			window.location = redirecturl;
349		  }
350		  else if(msg == "client")
351          {
352			   $("#flash_msg" ).show().css({visibility: "visible", display: "block"});
353			   $("#flash_msg" ).html('Invalid Username OR Password in FrontOffice');
354			   $('#flash_msg').fadeOut(15000);			   
355		  }	
356		  else
357		  {
358			alert(msg);
359		  }
360
361       }
362     });
363}
364
365function resetform(formname)
366{
367	$("#"+formname+" .textbox_padd").not($("#"+formname+" .combofield")).val("");
368	$("#"+formname+" .small_textbox_padd").not($("#"+formname+" .combofield")).val("");
369	$("#"+formname+" .error_small").not($("#"+formname+" .combofield")).html("");
370	$("#"+formname+" .error_small").removeClass("error_small");
371	$("#"+formname+" .valid_small").not($("#"+formname+" .combofield")).html("");
372	$("#"+formname+" .valid_small").removeClass("valid_small");	
373	
374	$("#"+formname+" .textbox_padd").val("");
375	$("#"+formname+" .small_textbox_padd").val("");
376	$("#"+formname+" .error_small").html("");
377	$("#"+formname+" .error_small").removeClass("error_small");
378	$("#"+formname+" .valid_small").html("");
379	$("#"+formname+" .valid_small").removeClass("valid_small");	
380			
381	$("#"+formname+" .hidden_files").val("");
382	$("#"+formname+" .mutiple_files").html("");
383	$("#"+formname+" .single_files").html("");
384	
385	$("#"+formname+" input[type=checkbox]").removeAttr('checked')
386	$("#"+formname+" input[type=checkbox]").change();
387	
388	
389			$("#"+formname+" .form-field").not($("#"+formname+" .combofield")).val("");
390			$("#"+formname+" .error_small").not($("#"+formname+" .combofield")).html("");
391			$("#"+formname+" .error_small").removeClass("error_small");
392			$("#"+formname+" .valid_small").not($("#"+formname+" .combofield")).html("");
393			$("#"+formname+" .valid_small").removeClass("valid_small");	
394			
395			$("#"+formname+" .form-field").attr("disabled",false);
396			$("#"+formname+" .combofield").attr("disabled",false);
397			//$("#"+formname+" .combofield").attr('selectedIndex', 0);
398			
399			$("#"+formname+" .form-field").val("");
400			$("#"+formname+" .error_small").html("");
401			$("#"+formname+" .error_small").removeClass("error_small");
402			$("#"+formname+" .valid_small").html("");
403			$("#"+formname+" .valid_small").removeClass("valid_small");	
404			 
405			$("#"+formname+" .hidden_files").val("");
406			$("#"+formname+" .mutiple_files").html("");
407			$("#"+formname+" .single_files").html("");
408			$("#"+formname+" .uploader_image").attr("src",imagepath+"images/NOIMAGE.JPG");
409			
410
411			$('#"+formname+" input[type=checkbox]').removeAttr('checked')
412			$('#"+formname+" input[type=checkbox]').change();
413}
414
415/*trialregistration validation script*/
416function trialregistration()
417{
418	$(document).ready(function() {
419	$("#reset").click(function(){
420		resetform('frmtrialregistration');	
421		reloadcaptcha();
422	});
423	$("#flash_msg" ).hide().css({visibility: "hidden", display: "none"});
424	$("#frmtrialregistration").validate({
425	rules: {
426     orgname:
427        {
428        	required: true,
429            minlength: 2
430        },
431	 address1:
432	 {
433	 	required: true
434	 },
435     no_of_emp: {
436       required: true,
437	   digits: true
438     },
439	  c_name:{
440		 required: true
441	 },
442	  email: {
443       required: true,
444       email: true
445     },
446	 code:
447	 {
448	 	required: true,
449		remote: {
450        url: siteurl+"checkcode/",
451        type: "post",
452        data: {
453          code: function() {
454			return $("#code").val();
455          },
456		  security_check:function(){
457			  return $("#security_check").val();
458		  }
459        },
460		beforeSend   : function(){ 
461		}
462      }
463
464	 }
465   },
466   messages: {
467     orgname:
468     {
469         required: " Please enter organization name.",
470         minlength: " Organization name is not long enough."
471     },
472	 address1:
473	 {
474	 	address1: " Please enter address."
475	 },
476     no_of_emp: {
477       required: " Please enter number of employees.",
478	   digits: " Please enter valid number."
479     },
480	 c_name:{
481		 required: " Please enter name."
482	 },
483	 email: {
484       required: " Email address require.",
485       email: " Your email address must be in the format of [email protected]."
486     },
487	 code:
488	 {
489	 	required: " Please enter security code.",
490		remote: " Please Enter valid security code."
491	 }
492   },
493	errorPlacement: function(error, element) {  
494					error.appendTo(element.next());
495				},  
496				
497	submitHandler: function() {  
498			trial_registration_process();
499			}, 
500	success: function(label) { 	
501				/*label.html("&nbsp;").removeClass("error_small");
502				label.html("&nbsp;").addClass("valid_small");*/ 	
503				label.html("&nbsp;").addClass("valid_small"); 	
504			} 
505	
506    });
507	}); 
508}
509
510
511
512function trial_registration_process()
513{
514	$.ajax({
515          type: "POST",
516           url: siteurl+"add/",
517          data: {
518			  name: function() {
519				return $("#orgname").val();
520			  },
521			  add1:function(){
522				  return $("#address1").val();
523			  },
524			  add2:function(){
525				  return $("#address2").val();
526			  },
527			   Financial_year_end_date:function(){
528				  return $("#fin_month").val();
529			  },
530			  no_of_employees:function(){
531				  return $("#no_of_emp").val();
532			  },
533			   	org_email_id:function(){
534				  return $("#email").val();
535			  },
536			  contact_person:function(){
537				  return $("#c_name").val();
538			  }
539        	},
540          dataType:"html",
541       success: function(msg)
542       {
543		   if(msg == "successfull")
544		   {
545			    $("#flash_msg" ).addClass("success");
546				 $("#flash_msg" ).removeClass("error");
547			   $("#flash_msg" ).show().css({visibility: "visible", display: "block"});
548			   $("#flash_msg" ).html('Registration is done. Please check email for username and password');
549			    $('#flash_msg' ).fadeOut(15000);
550			   resetform('frmtrialregistration');
551			   reloadcaptcha();
552		   }
553       }
554     })
555}
556
557
558
559/*registration validation script*/
560function registration()
561{	
562	$(document).ready(function() {
563	$("#flash_msg" ).hide().css({visibility: "hidden", display: "none"});
564	
565	$("#reset").click(function(){
566		resetform('formRegister');			
567	});
568	
569	$("#formRegister").validate({
570	rules: {
571     email:
572     {
573       	required: true,
574        email: true,
575     },
576	 username:
577     {
578        required: true
579     },	
580	 password:
581     {
582        required: true
583     }
584   },
585   messages: {    
586	 email: {
587       required: "Required",
588       email: "Invalid"
589     },
590	  username: {
591        required: "Required"
592     },
593	  password: {
594       required: "Required"
595     }
596	 
597   },
598	errorPlacement: function(error, element) {  
599					error.appendTo(element.next());
600				},  
601				
602	submitHandler: function() {  
603			registration_process();
604			}, 
605	success: function(label) { 	
606				//label.html("&nbsp;").removeClass("error_small");
607				label.html("&nbsp;
607").addClass("valid_small"); 					
608			} 
609	
610    });
611	}); 
612}
613
614function registration_process()
615{
616	$.ajax({
617          type: "POST",
618           url: siteurl+"registernew/",
619          data: {			 
620			  email:function(){
621				  return $("#email").val();
622			  },
623			  username:function(){
624				  return $("#username").val();
625			  },
626			  password:function(){
627				  return $("#password").val();
628			  },
629			  clientid:function(){
630				  return $("#clientid").val();
631			  }
632        	},
633          dataType:"html",
634       success: function(msg)
635       {
636		   //alert(msg);
637		   if(msg == "successfull")
638		   {
639			   $("#flash_msg").removeClass("error");
640			   $("#flash_msg").addClass("success");
641			   $("#flash_msg" ).show().css({visibility: "visible", display: "block"});
642			   $("#flash_msg" ).html('Registration is done. Please wait for approve');
643			    $('#flash_msg' ).fadeOut(15000);
644			   resetform('formRegister');			  
645		   }
646       }
647     })
648}
649
650function call_forgot()
651{
652	 $(document).ready(function(){
653	$("#flash_msg" ).hide().css({visibility: "hidden", display: "none"});
654	$("#formforgotpass").validate({
655	rules: {
656     username:
657	 {
658        	required: true
659	 }
660   },
661   messages: {
662     username:
663     {
664         required: " Please enter a username."
665     }
666   },
667	errorPlacement: function(error, element) {  
668					error.appendTo(element.next());
669				},  
670				
671	submitHandler: function() {  
672			forgotProcess();
673			}, 
674	success: function(label) { 		 
675				label.html("&nbsp;").addClass("valid_small"); 					
676			} 
677	}); 
678	});	
679}
680function forgotProcess()
681{
682	$.ajax({
683          type: "POST",
684           url: siteurl+"check/",
685          data: {
686			  username: function() {
687				return $("#username").val();
688			  }
689        	},
690          dataType:"html",
691       success: function(msg)
692       {
693		   if(msg == "successfull")
694		   {
695			   $("#flash_msg" ).show().css({visibility: "visible", display: "block",'padding-left':'0px'});
696			   $("#flash_msg" ).html('Password sent to your email address. Please check your email.');
697			    $('#flash_msg' ).fadeOut(15000);
698			   resetform('formforgotpass');
699		   }
700		   else if(msg == "blank")
701		   {
702			    $("#flash_msg" ).show().css({visibility: "visible", display: "block",'padding-left':'0px'});
703			   	$("#flash_msg" ).html('You have not set your email. Please contact administrator.');
704				 $('#flash_msg' ).fadeOut(15000);
705			   resetform('formforgotpass');
706		   }
707		   else if(msg == "false")
708		   {
709			   	$("#flash_msg" ).removeClass("error")
710			   $("#flash_msg" ).addClass("success");
711			    $("#flash_msg" ).show().css({visibility: "visible", display: "block",'padding-left':'0px'});
712			   	$("#flash_msg" ).html('Username does not exists.');
713				 $('#flash_msg' ).fadeOut(15000);
714			   resetform('formforgotpass');
715		   }
716		  
717       }
718     })
719}
720
721function changepass()
722{
723	 $(document).ready(function(){
724	$("#flash_msg" ).hide().css({visibility: "hidden", display: "none"});
725	$("#formchangepass").validate({
726	rules: {
727    oldpassword:
728	 {
729	 	required: true,
730		remote: {
731        url: siteurl+"chkpassword/",
732        type: "post",
733        data: {
734          oldpassword: function() {
735			return $("#oldpassword").val();
736          }
737        },
738		beforeSend   : function(){ 
739		}
740      }
741	},
742	newpassword:
743	 {
744        	required: true,
745			maxlength: 16
746	 },
747	 confirmpassword:
748	 {
749        	required: true,
750			maxlength: 16,
751			equalTo: '#newpassword'
752	 }
753   },
754   messages: {
755     oldpassword:
756     {
757         required: " Please enter old password.",
758		 remote: " Password does not match."
759     },
760	 newpassword:
761	 {
762		required: " Please enter new password.",
763		maxlength: " You can not enter more then 16 charactor"
764	 },
765	 confirmpassword:
766	 {
767		required: " Please enter confirm password.",
768		maxlength: " You can not enter more then 16 charactor",
769		equalTo: "Confirm password does not match."
770	 }
771   },
772	errorPlacement: function(error, element) {  
773					error.appendTo(element.next());
774				},  
775				
776	submitHandler: function() {  
777			changepassProcess();
778			}, 
779	success: function(label) { 		 
780				label.html("&nbsp;
780").addClass("valid_small"); 					
781			} 
782	}); 
783	});	
784}
785
786function changepassProcess()
787{
788	$.ajax({
789          type: "POST",
790           url: siteurl+"change/",
791          data: {
792			  oldpassword: function() {
793				return $("#oldpassword").val();
794			  },
795			   newpassword: function() {
796				return $("#newpassword").val();
797			  }
798        	},
799          dataType:"html",
800       success: function(msg)
801       {
802		   if(msg == "successfull")
803		   {
804			   $("#flash_msg" ).addClass("success");
805			   $("#flash_msg" ).show().css({visibility: "visible", display: "block",'padding-left':'0px'});
806			   $("#flash_msg" ).html('Password successfully changed.');
807			   $('#flash_msg' ).fadeOut(15000);
808			   resetform('formchangepass');
809		   }
810		   else if(msg == "fail")
811		   {
812			    $("#flash_msg" ).show().css({visibility: "visible", display: "block",'padding-left':'0px'});
813			   	$("#flash_msg" ).html('Passowrd could not change.');
814				$('#flash_msg' ).fadeOut(15000);
815			   resetform('formchangepass');
816		   }
817	   }
818     })
819}
820function getRadioValue()
821{
822	var objTmp = (document.getElementsByTagName('input'));
823	for (i=0;i<objTmp.length;i++)
824	{
825		//alert(objTmp[i].id+" "+objTmp[i].type+" "+objTmp[i].name);
826		if(objTmp[i].type=="radio"  && objTmp[i].name == "gender" && objTmp[i].checked)
827		{	
828			if(objTmp[i].id == "female")
829			{
830				return 0;
831			}
832			else if(objTmp[i].id == "male")
833			{
834				return 1;
835			}
836		}
837	}
838}
839
840function editTimesheet(id,date)
841{
842	
843	window.location = siteurl+"edit/?id="+id+"&date="+date;
844		
845		/*$.ajax({
846          type: "POST",
847           url: siteurl+"edit/",
848          data: {
849			  id: function() {
850				return id;
851			  },
852			  date: function() {
853				return date;
854			  }
855			},
856          dataType:"html",
857       success: function(msg)
858       {
859		   alert(msg);
860		   if(msg == "successfull")
861		   {
862			   $("#flash_msg" ).removeClass("error")
863			   $("#flash_msg" ).addClass("success");
864			   $("#flash_msg" ).show().css({visibility: "visible", display: "block"});
865			   $("#flash_msg" ).html('Your Timesheet has been updated.');
866			   resetform('frmeditprofile');
867		   }
868       }
869     })
870*/
871}
872function editprofile()
873{
874	$(document).ready(function() {
875							   
876	
877	$("#flash_msg" ).hide().css({visibility: "hidden", display: "none"});
878	
879	$("#reset").click(function(){
880		resetform('frmeditprofile');						   
881	});
882	
883	$("#frmeditprofile").validate({
884	rules: {
885     firstname:
886     {
887       	required: true,
888        minlength: 2
889     },
890	 lastname:
891     {
892        required: true,
893        minlength: 2
894     },
895	 address1:
896	 {
897	 	required: true
898	 },
899     city: {
900       required: true
901     },
902	  state:{
903		 required: true
904	 },
905	 country:{
906		 required: true
907	 },
908	  phno:{
909		 digits: true
910	 },
911	  mob_no:{
912		 required: true,
913		 digits: true
914	 },
915	  email: {
916       required: true,
917       email: true
918     }
919   },
920   messages: {
921     firstname:
922     {
923         required: " Please enter first name.",
924         minlength: " First name is not long enough."
925     },
926	 lastname:
927	 {
928        required: " Please enter last name.",
929		minlength: " Last name is not long enough."
930     },
931	 address1:
932	 {
933	 	address1: "Please enter address."
934	 },
935     city: {
936       required: " Please select city."
937     },
938	 state:{
939		 required: " Please select state."
940	 },
941	 country:{
942		 required: " Please select country."
943	 },
944	  phno:{
945		 digits: " Please enter valid number."
946	 },
947	  mob_no:{
948		 required: "Please enter mobile number",
949		 digits: " Please enter valid number."
950	 },
951	 email: {
952       required: " Email address require.",
953       email: " Please enter valid email."
954     }
955   },
956	errorPlacement: function(error, element) {  
957					error.appendTo(element.next());
958				},  
959				
960	submitHandler: function() {  
961			editprofile_process();
962			}, 
963	success: function(label) { 	
964				//label.html("&nbsp;").removeClass("error_small");
965				label.html("&nbsp;").addClass("valid_small"); 					
966			} 
967	
968    });
969	}); 
970}
971function editprofile_process()
972{
973	$.ajax({
974          type: "POST",
975           url: siteurl+"add/",
976          data: {
977			  firstname: function() {
978				return $("#firstname").val();
979			  },
980			  lastname: function(){
981				return $("#lastname").val();
982			  },
983			  city: function(){
984				return $("#city").val();
985			  },
986			  state: function(){
987				return $("#state").val();
988			  },
989			  country: function(){
990				return $("#country").val();
991			  },
992			   zipcode: function(){
993				return $("#z_code").val();
994			  },
995			  phone_no: function(){
996				return $("#phno").val();
997			  },
998			  mobile: function(){
999				return $("#mob_no").val();
1000			  },
1001			  add1:function(){
1002				  return $("#address1").val();
1003			  },
1004			  add2:function(){
1005				  return $("#address2").val();
1006			  },
1007			  gender:function(){
1008				  return getRadioValue();
1009			  },
1010			  email:function(){
1011				  return $("#email").val();
1012			  }
1013			},
1014          dataType:"html",
1015       success: function(msg)
1016       {
1017		   //alert(msg);
1018		   if(msg == "successfull")
1019		   {
1020			   $("#flash_msg" ).removeClass("error")
1021			   $("#flash_msg" ).addClass("success");
1022			   $("#flash_msg" ).show().css({visibility: "visible", display: "block"});
1023			   $("#flash_msg" ).html('Your profile has been updated.');
1024			   $('#flash_msg' ).fadeOut(15000);
1025			   //resetform('frmeditprofile');
1026		   }
1027       }
1028     })
1029}
1030
1031function show_hide_overtime(val)
1032{
1033	if(val == 1)
1034	{
1035		$("#overtime").hide().css({visibility: "hidden", display: "none"});
1036	}
1037	else if(val == 0)
1038	{
1039		$("#overtime").show().css({visibility: "visible", display: "block"});
1040	}
1041	$("#ovr").val(val);
1042}
1043
1044function timesheet()
1045{
1046	$(document).ready(function() {
1047	
1048	$("input:radio").click(function () { 
1049     	if(this.id == "o_yes")
1050		{
1051			show_hide_overtime(0);
1052		}
1053		else if(this.id == "o_no")
1054		{
1055			show_hide_overtime(1);
1056		}
1057    });
1058
1059	
1060	$("#flash_msg" ).hide().css({visibility: "hidden", display: "none"});
1061	
1062	$("#submit").click(function () { 
1063		//alert(siteurl+"add/");
1064		$.ajax({
1065          type: "POST",
1066           url: siteurl+"add/",
1067          data: {
1068			  check_in: function() {
1069				return $("#i_hour").val()+","+$("#i_mins").val()+","+$("#i_timespan").val();
1070			  },
1071			  check_out: function(){
1072				return $("#o_hour").val()+","+$("#o_mins").val()+","+$("#o_timespan").val();
1073			  },
1074			  break_time: function(){
1075				return $("#b_hour").val()+","+$("#b_mins").val()+",";
1076			  },
1077			  ovr_start_time: function(){
1078					return $("#over_start_hour").val()+","+$("#over_start_min").val()+","+$("#over_start_timespan").val();
1079			  },
1080			  ovr_end_time: function(){
1081				 	return $("#over_end_hour").val()+","+$("#over_end_min").val()+","+$("#over_end_timespan").val();
1082			  },
1083			  overtime_done: function(){
1084				return $("#ovr").val();
1085			  },
1086			   work_done: function(){
1087				return $("#workdone").val();
1088			  },
1089			   note: function(){
1090				return $("#note").val();
1091			  }
1092			},
1093          dataType:"html",
1094       success: function(msg)
1095       {
1096		   //alert(msg);
1097		   if(msg == "successfull")
1098		   {
1099			   $("#flash_msg" ).removeClass("error")
1100			   $("#flash_msg" ).addClass("success");
1101			   $("#flash_msg" ).show().css({visibility: "visible", display: "block"});
1102			   $("#flash_msg" ).html('Data has been successfully added.');
1103			   $('#flash_msg' ).fadeOut(15000);
1104			   resetform('frmtimesheet');
1105		   }
1106		   else if(msg == "available")
1107		   {
1108			   $("#flash_msg" ).removeClass("success")
1109			   $("#flash_msg" ).addClass("error");
1110			   $("#flash_msg" ).show().css({visibility: "visible", display: "block"});
1111			   $("#flash_msg" ).html('Timesheet entry is updated.');
1112			   $('#flash_msg' ).fadeOut(15000);
1113			   resetform('frmtimesheet');
1114		   }
1115		   else if(msg == "fail")
1116		   {
1117			   $("#flash_msg" ).removeClass("success")
1118			   $("#flash_msg" ).addClass("error");
1119			   $("#flash_msg" ).show().css({visibility: "visible", display: "block"});
1120			   $("#flash_msg" ).html('Data could not added due to some problem.');
1121			   $('#flash_msg' ).fadeOut(15000);
1122			   resetform('frmtimesheet');
1123		   }
1124       }
1125     })
1126    });
1127	
1128	});
1129}
1130function edittimesheetdata()
1131{
1132	$(document).ready(function() {
1133	
1134	$("input:radio").click(function () { 
1135     	if(this.id == "o_yes")
1136		{
1137			show_hide_overtime(0);
1138		}
1139		else if(this.id == "o_no")
1140		{
1141			show_hide_overtime(1);
1142		}
1143    });
1144
1145	
1146	$("#flash_msg" ).hide().css({visibility: "hidden", display: "none"});
1147	
1148	$("#submit").click(function () { 
1149		
1150		$.ajax({
1151          type: "POST",
1152           url: siteurl+"editdone/",
1153          data: {
1154			  check_in: function() {
1155				return $("#i_hour").val()+","+$("#i_mins").val()+","+$("#i_timespan").val();
1156			  },
1157			  check_out: function(){
1158				return $("#o_hour").val()+","+$("#o_mins").val()+","+$("#o_timespan").val();
1159			  },
1160			  break_time: function(){
1161				return $("#b_hour").val()+","+$("#b_mins").val()+",";
1162			  },
1163			  ovr_start_time: function(){
1164					return $("#over_start_hour").val()+","+$("#over_start_min").val()+","+$("#over_start_timespan").val();
1165			  },
1166			  ovr_end_time: function(){
1167				 	return $("#over_end_hour").val()+","+$("#over_end_min").val()+","+$("#over_end_timespan").val();
1168			  },
1169			  overtime_done: function(){
1170				return $("#ovr").val();
1171			  },
1172			   work_done: function(){
1173				return $("#workdone").val();
1174			  },
1175			   note: function(){
1176				return $("#note").val();
1177			  },
1178			   date: function(){
1179				return $("#dt").val();
1180			  },
1181			  id: function(){
1182				return $("#vid").val();
1183			  }
1184			},
1185          dataType:"html",
1186       success: function(msg)
1187       {
1188		   //alert(msg);
1189		   if(msg == "successfull")
1190		   {
1191			   window.location = siteurl+"view";
1192			   $("#flash_msg" ).removeClass("error")
1193			   $("#flash_msg" ).addClass("success");
1194			   $("#flash_msg" ).show().css({visibility: "visible", display: "block"});
1195			   $("#flash_msg" ).html('Data has been successfully updated.');
1196			   $('#flash_msg' ).fadeOut(15000);
1197			   resetform('frmtimesheet');
1198		   }
1199		   else if(msg == "available")
1200		   {
1201			   $("#flash_msg" ).removeClass("success")
1202			   $("#flash_msg" ).addClass("error");
1203			   $("#flash_msg" ).show().css({visibility: "visible", display: "block"});
1204			   $("#flash_msg" ).html('Timesheet entry is updated.');
1205			   $('#flash_msg' ).fadeOut(15000);
1206			   resetform('frmtimesheet');
1207		   }
1208		   else if(msg == "fail")
1209		   {
1210			   $("#flash_msg" ).removeClass("success")
1211			   $("#flash_msg" ).addClass("error");
1212			   $("#flash_msg" ).show().css({visibility: "visible", display: "block"});
1213			   $("#flash_msg" ).html('Data could not added due to some problem.');
1214			   $('#flash_msg' ).fadeOut(15000);
1215			   resetform('frmtimesheet');
1216		   }
1217       }
1218     })
1219    });
1220	
1221	});
1222}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.