403Webshell
Server IP : 85.158.181.41  /  Your IP : 216.73.217.12
Web Server : Apache
System : Linux cloud9-vm129 6.1.178+1-ph #ph SMP PREEMPT_DYNAMIC Wed Jul 29 09:00:54 UTC 2026 x86_64
User : moncbefd ( 1024)
PHP Version : 7.3.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/moncbefd/www.moneta.at/admin/html/assets/javascript/legacy/gm/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/moncbefd/www.moneta.at/admin/html/assets/javascript/legacy/gm/image_mapper.min.js
!function(e){e.fn.image_mapper=function(i){var t,a,s,o,l,n,r,c,_,d,h,g,p,f,y,x,u,v,m,b,w,k={canvas_width:e(".sliderWidth").val(),canvas_height:e(".sliderHeight").val(),slider_image_id:e(this).parent().parent().find(".slider_set_id").val(),image_url:"../images/slider_images/"+e(this).parent().parent().find(".gx_slider_image_path").val(),interval_time:20,lightbox_width:"960",lightbox_height:""},I=[],S=[],T=[],A=!1,R=!1,P=-1,O=-1,D=!1,C=null,E=null,z="#ff0000",q=.5,j="#ff0000",K=4,U=[],W=!1;return this.each(function(){function N(){v=e(window).width(),m=e(window).height(),"auto"!=k.lightbox_width&&""!=k.lightbox_width?b=k.lightbox_width:"auto"==k.lightbox_width?b=v-60:(b=u.width()+40,alert(u.width())),b>v-60&&(b=v-60),y.css("left",(v-b)/2),"auto"!=k.lightbox_height&&""!=k.lightbox_height?w=k.lightbox_height:"auto"==k.lightbox_height&&(w=m-60),(x.height()>m-60||x.height()<u.height()+30)&&(x.height(m-60),w=m-60),g.width(v),g.height(m),f.width(v),f.height(m),y.width(b),y.height(w),x.height(w)}function L(){function i(i){e.ajax({type:"POST",url:"request_port.php?module=SliderAdmin",data:{action:"get_template",template:"image_mapper_wrong_browser.html"},success:function(t){t.match(/WARNING\(512\)/)||""==t?(g.remove(),alert("Smarty Error - Unable to find Template")):t.match(/t_action_request not found/)?(g.remove(),alert("Warning - Unable to call function")):(p.hide(),f.show(),e(i).append(t),y=e(".lightbox_package_container"),x=e(".lightbox_package_wrapper"),u=e(".lightbox_package_content"),y.show(),N(),e(".lightbox_package_close").bind("click",function(){g.remove()}))},error:function(){g.remove(),alert("Connection Error - Unable to connect to server")}})}i(g)}function M(){function i(i){e.ajax({type:"POST",url:"request_port.php?module=SliderAdmin",data:{action:"get_template",template:"image_mapper_standard.html"},success:function(l){l.match(/WARNING\(512\)/)||""==l?(g.remove(),alert("Smarty Error - Unable to find Template")):l.match(/t_action_request not found/)?(g.remove(),alert("Warning - Unable to call function")):(p.hide(),f.show(),e(i).append(l),y=e(".lightbox_package_container"),x=e(".lightbox_package_wrapper"),u=e(".lightbox_package_content"),y.show(),N(),e(".gx_control .float_left").css("display","none"),e(".gx_control .float_right").css("display","none"),e(".gx_control .add").css("display","block"),e(".gx_control .fields input").attr("disabled","disabled"),e(".gx_control .fields select").attr("disabled","disabled"),e(".gx_control .editor").css("display","none"),e(".gx_control .fields").css("display","none"),e(".gx_image_container").width(k.canvas_width).height(k.canvas_height),e(".gx_image_container img").attr("src",k.image_url),e(".gx_image_container canvas").attr("width",k.canvas_width).attr("height",k.canvas_height),CKEDITOR.replace("image_mapper_flyover",{toolbar:"ImageMapper",filebrowserBrowseUrl:"includes/ckeditor/filemanager/index.html",language:e("#ckeditor_language").val(),baseHref:e("#ckeditor_base_href").val(),width:"900px",height:"100px",resize_enabled:!1}),t=document.getElementById("image_canvas"),a=t.getContext("2d"),a.strokeStyle="#ff0000",a.lineWidth=q,s=document.createElement("canvas"),s.width=k.canvas_width,s.height=k.canvas_height,o=s.getContext("2d"),t.onselectstart=function(){return!1},t.onmousedown=J,t.onmouseup=Q,t.onmousemove=H,h=setInterval(G,k.interval_time),N(),F({action:"get_image_area_data"}),e(".lightbox_package_close").bind("click",function(){if("none"==e(".gx_control .buttons .add").css("display")){var i=confirm(e("#alert_message_text").val());i&&(clearInterval(h),g.remove())}else clearInterval(h),g.remove()}),e(".buttons .add").bind("click",function(){return e(".gx_control .float_right").css("display","block"),e(".gx_control .float_right.add").css("display","none"),e(".gx_control .float_right.save").css("display","none"),e(".gx_control .float_right.delete").css("display","none"),e(".gx_control .fields #field_type").removeAttr("disabled"),e(".gx_control .fields input").removeAttr("disabled"),e(".gx_control .fields select").removeAttr("disabled"),e(".gx_control .float_left").css("display","block"),e(".gx_control .division").css("display","none"),e(".gx_control .fields").css("display","block"),e(".gx_control .float_left.flyover").css("display","none"),e("#field_id").val(0),!1}),e("#field_type").bind("change",function(){if(e(".gx_control .float_right.save").css("display","none"),e(".gx_control .float_right.delete").css("display","none"),e(".gx_control .float_left.flyover").css("display","none"),""!=e(this).val()){switch(I.length>0&&0==I[I.length-1].slider_image_area_id&&I.splice(I.length-1,1),B(a),B(o),C=null,Z(),e(this).val()){case"rectangle":case"circle":var i=new $;i.slider_image_id=k.slider_image_id,i.slider_image_area_id=0,i.shape=e(this).val(),i.title="",i.link_url="",i.link_target="",i.flyover_content="",i.coords="",i.width=60,i.height=60,i.pos_x=k.canvas_width/2-30,i.pos_y=k.canvas_height/2-30,I.push(i);break;case"polygon":V()}X()}}),e(".buttons .save").bind("click",function(){return e(".gx_control .float_left").css("display","block"),e(".gx_control .float_right").css("display","none"),e(".gx_control .fields input").attr("disabled","disabled"),e(".gx_control .fields select").attr("disabled","disabled"),C.title=e("#field_title").val(),C.link_url=e("#field_href").val(),C.link_target=e("#field_target").val(),1==W&&(C.flyover_content=CKEDITOR.instances.image_mapper_flyover.getData()),F(0==C.slider_image_area_id?{action:"create_area"}:{action:"save_area",area:C}),e(".gx_control .division").css("display","block"),e(".gx_control .editor").css("display","none"),e(".gx_control .fields").css("display","none"),e(".gx_control .float_left").css("display","none"),e(".gx_control .add").css("display","block"),e(".gx_control .fields input").val(""),e(".gx_control .fields select").val(""),CKEDITOR.instances.image_mapper_flyover.setData(""),W=!1,!1}),e(".buttons .cancle").bind("click",function(){if(e(".gx_control .float_left").css("display","none"),e(".gx_control .float_right").css("display","none"),e(".gx_control .add").css("display","block"),e(".gx_control .fields input").attr("disabled","disabled"),e(".gx_control .fields select").attr("disabled","disabled"),e(".gx_control .division").css("display","block"),e(".gx_control .fields").css("display","none"),e(".gx_control .editor").css("display","none"),0==e("#field_id").val())"polygon"==e("#field_type").val()&&(0==U.length&&I.splice(I.length-1,1),Z(),U=[]),"rectangle"!=e("#field_type").val()&&"circle"!=e("#field_type").val()||(C=null,E=null,I.splice(I.length-1,1));else{var i=-1;e.each(I,function(e,t){C.slider_image_area_id==t.slider_image_area_id&&(i=e)}),"polygon"==C.shape?(I[i].polygon_coords=E.polygon_coords,Z(),U=[],C=null,E=null):(I[i].pos_x=E.pos_x,I[i].pos_y=E.pos_y,I[i].width=E.width,I[i].height=E.height,C=null,E=null)}return e(".gx_control .fields input").val(""),e(".gx_control .fields select").val(""),CKEDITOR.instances.image_mapper_flyover.setData(""),W=!1,X(),!1}),e(".buttons .delete").bind("click",function(){if(e(".gx_control .float_left").css("display","none"),e(".gx_control .float_right").css("display","none"),e(".gx_control .add").css("display","block"),e(".gx_control .fields input").attr("disabled","disabled"),e(".gx_control .fields select").attr("disabled","disabled"),e(".gx_control .division").css("display","block"),e(".gx_control .fields").css("display","none"),e(".gx_control .editor").css("display","none"),null!=C){var i=-1;e.each(I,function(e,t){C.slider_image_area_id==t.slider_image_area_id&&(i=e)}),i!=-1&&F({action:"delete_area",area:I[i]})}return e(".gx_control .fields input").val(""),e(".gx_control .fields select").val(""),CKEDITOR.instances.image_mapper_flyover.setData(""),W=!1,!1}),e(".buttons .general").bind("click",function(){return null!=C&&(C.flyover_content=CKEDITOR.instances.image_mapper_flyover.getData()),e(".gx_control .division").css("display","none"),e(".gx_control .fields").css("display","block"),e(".gx_control .editor").css("display","none"),!1}),e(".buttons .flyover").bind("click",function(){return CKEDITOR.instances.image_mapper_flyover.setData(C.flyover_content),e("iframe").css("position","fixed"),W=!0,e(".gx_control .division").css("display","none"),e(".gx_control .fields").css("display","none"),e(".gx_control .editor").css("display","block"),N(),!1}))},error:function(){g.remove(),alert("Connection Error - Unable to connect to server")}})}i(g)}function $(){this.pos_x=0,this.pos_y=0,this.width=1,this.height=1}function B(e){e.clearRect(0,0,k.canvas_width,k.canvas_height)}function G(){if(0==D){B(a);for(var e=I.length,i=0;i<e;i++)I[i].draw(a);D=!0}}function H(i){if(A)Y(i),"rectangle"!=C.shape&&"circle"!=C.shape||(Y(i),C.pos_x=l-_,C.pos_y=n-d),"polygon"==C.shape&&(e.each(I,function(i,t){C.slider_image_area_id==t.slider_image_area_id&&e.each(t.polygon_coords,function(e,i){i.x=parseInt(i.x)+(l-r),i.y=parseInt(i.y)+(n-c)})}),Y(i),C.pos_x=l-_,C.pos_y=n-d),r=l,c=n,X();else if(R){var t=C.pos_x,a=C.pos_y;if("rectangle"==C.shape||"circle"==C.shape)switch(P){case 0:C.pos_x=l,C.pos_y=n,C.width+=t-l,C.height+=a-n;break;case 1:C.pos_y=n,C.height+=a-n;break;case 2:C.pos_y=n,C.width=l-t,C.height+=a-n;break;case 3:C.pos_x=l,C.width+=t-l;break;case 4:C.width=l-t;break;case 5:C.pos_x=l,C.width+=t-l,C.height=n-a;break;case 6:C.height=n-a;break;case 7:C.width=l-t,C.height=n-a}"polygon"==C.shape&&(I[O].polygon_coords[P].x=l,I[O].polygon_coords[P].y=n),X()}if(Y(i),null!==C&&!R){var s=this,o=!1;if("rectangle"==C.shape||"circle"==C.shape)for(var h=0;h<8;h++){var g=S[h];if(l>=g.x&&l<=g.x+K&&n>=g.y&&n<=g.y+K){switch(P=h,X(),h){case 0:s.style.cursor="nw-resize";break;case 1:s.style.cursor="n-resize";break;case 2:s.style.cursor="ne-resize";break;case 3:s.style.cursor="w-resize";break;case 4:s.style.cursor="e-resize";break;case 5:s.style.cursor="sw-resize";break;case 6:s.style.cursor="s-resize";break;case 7:s.style.cursor="se-resize"}o=!0}}"polygon"==C.shape&&e.each(I,function(i,t){t.slider_image_area_id==C.slider_image_area_id&&e.each(t.polygon_coords,function(e,t){var a=T[i][e];l>=a.x&&l<=a.x+K&&n>=a.y&&n<=a.y+K&&(P=e,O=i,X(),s.style.cursor="crosshair",o=!0)})}),0==o&&(R=!1,O=-1,P=-1,this.style.cursor="auto")}}function J(i){if(Y(i),P!==-1)return void(R=!0);B(o);for(var t=I.length,a=t-1;a>=0;a--){I[a].draw(o);var s=o.getImageData(l,n,1,1);if(s.data[3]>0){if(""!=e("#field_id").val()&&I[a].slider_image_area_id!=e("#field_id").val()||(C=I[a],ee(C),"rectangle"==C.shape||"circle"==C.shape?(_=l-C.pos_x,d=n-C.pos_y,C.pos_x=l-_,C.pos_y=n-d):(r=l,c=n),A=!0),X(),B(o),null==E&&null!=C)if("polygon"==C.shape){var h=[];e.each(C.polygon_coords,function(e,i){h.push({x:i.x,y:i.y})}),E={polygon_coords:h}}else E={pos_x:C.pos_x,pos_y:C.pos_y,width:C.width,height:C.height};return}}}function Q(){A=!1,R=!1,O=-1,P=-1}function X(){D=!1}function Y(i){var a=t,s=0,o=0;if(a.offsetParent)do s+=a.offsetLeft,o+=a.offsetTop;while(a=a.offsetParent);s+=e(document).scrollLeft(),o+=e(document).scrollTop(),l=i.pageX-s+e(".gx_image_container").scrollLeft(),n=i.pageY-o+e(".gx_image_container").scrollTop()}function F(i){switch(i.action){case"create_area":e.ajax({type:"POST",url:"request_port.php?module=SliderAdmin",data:{action:i.action,slider_image_id:k.slider_image_id},dataType:"JSON",success:function(i){C.slider_image_area_id=i.slider_image_area_id,e.each(I,function(e,t){0==t.slider_image_id&&(t.slider_image_id=i.slider_image_area_id)}),F({action:"save_area",area:C})}});break;case"save_area":switch(i.area.shape){case"rectangle":var t="rect",a=i.area.pos_x+","+i.area.pos_y+","+parseInt(i.area.pos_x+i.area.width)+","+parseInt(i.area.pos_y+i.area.height);break;case"circle":var t="circle";if(i.area.width>i.area.height)var a=parseInt(i.area.pos_x+i.area.width/2)+","+parseInt(i.area.pos_y+i.area.height/2)+","+parseInt(i.area.height/2);else var a=parseInt(i.area.pos_x+i.area.width/2)+","+parseInt(i.area.pos_y+i.area.height/2)+","+parseInt(i.area.width/2);break;case"polygon":var a,t="poly";e.each(i.area.polygon_coords,function(e,i){0==e?(a=i.x,a=a+","+i.y):a=a+","+i.x+","+i.y})}i.area.flyover_content=i.area.flyover_content.replace(/\n+/g,""),e.ajax({type:"POST",url:"request_port.php?module=SliderAdmin",data:{action:i.action,slider_image_id:k.slider_image_id,slider_image_area_id:i.area.slider_image_area_id,shape:t,coords:a,title:i.area.title,link_url:i.area.link_url,link_target:i.area.link_target,flyover_content:i.area.flyover_content},success:function(){e(".gx_control .fields input").val(""),e("#field_type").val(""),Z(),C=null,E=null,X()}});break;case"delete_area":e.ajax({type:"POST",url:"request_port.php?module=SliderAdmin",data:{action:i.action,slider_image_area_id:i.area.slider_image_area_id},success:function(){var t=-1;e.each(I,function(e,a){i.area.slider_image_area_id==a.slider_image_area_id&&(t=e)}),I.splice(t,1),ie(),Z(),C=null,E=null,X()}});break;case"get_image_area_data":e.ajax({type:"POST",dataType:"JSON",url:"request_port.php?module=SliderAdmin",data:{action:i.action,slider_image_id:k.slider_image_id},success:function(i){I=[],e.each(i,function(i,t){var a=new $;a.slider_image_id=parseInt(t.slider_image_id),a.slider_image_area_id=parseInt(t.slider_image_area_id),a.title=t.title,a.link_url=t.link_url,a.link_target=t.link_target,a.flyover_content=t.flyover_content,a.coords=t.coords;var s=t.coords.split(",");switch(t.shape){case"rect":a.width=parseInt(s[2])-parseInt(s[0]),a.height=parseInt(s[3])-parseInt(s[1]),a.pos_x=parseInt(s[0]),a.pos_y=parseInt(s[1]),a.shape="rectangle";break;case"circle":a.width=2*parseInt(s[2]),a.height=2*parseInt(s[2]),a.pos_x=parseInt(s[0])-parseInt(s[2]),a.pos_y=parseInt(s[1])-parseInt(s[2]),a.shape="circle";break;case"poly":a.shape="polygon";var o=[];e.each(s,function(e,i){if((e+1)%2==0){var t={x:parseInt(s[e-1]),y:parseInt(i)};o.push(t)}}),a.polygon_coords=o,T[i]=[],e.each(a.polygon_coords,function(e,t){T[i][e]=[],T[i][e][0]=t.x,T[i][e][1]=t.y})}I.push(a)});for(var t=0;t<8;t++){var a=new $;S.push(a)}X()}})}}function V(){e("#image_canvas").bind("click",function(i){Y(i),0==U.length?(a.beginPath(),a.moveTo(l,n),U.push({x:l,y:n}),e(".gx_image_container").append(e("<div style='width: 6px; height: 6px; position: absolute; display: block;'></div>")),e(".gx_image_container div").css("top",n-4).css("left",l-4),e(".gx_image_container div").bind("click",function(){a.lineTo(U[0].x,U[0].y),a.stroke(),a.closePath(),e(this).remove();var i="";e.each(U,function(e,t){i+=""+t.x+","+t.y,e!=U.length-1&&(i+=",")});var t=new $;t.slider_image_id=k.slider_image_id,t.slider_image_area_id=0,t.shape="polygon",t.polygon_coords=U,t.pos_x=1,t.pos_y=1,t.width=1,t.height=1,t.flyover_content="",I.push(t),C=t,X(),ie(),Z(),e(".gx_control .float_right.save").css("display","block"),e(".gx_control .float_left.flyover").css("display","block")})):(a.lineTo(l,n),U.push({x:l,y:n})),a.stroke()})}function Z(){e("#image_canvas").unbind("click"),e(".gx_image_container div").unbind("click"),U=[],e(".gx_image_container div").remove()}function ee(i){e("#field_type").val(i.shape),e("#field_id").val(i.slider_image_area_id),e("#field_href").val(i.link_url),e("#field_title").val(i.title),e("#field_target").val(i.link_target),"block"==e(".gx_control .division").css("display")&&(e(".gx_control .division").css("display","none"),e(".gx_control .editor").css("display","none"),e(".gx_control .fields").css("display","block")),e(".gx_control .float_left").css("display","block"),e(".gx_control .float_right").css("display","none"),0!=e("#field_id").val()&&e(".gx_control .delete").css("display","block"),e(".gx_control .save").css("display","block"),e(".gx_control .cancle").css("display","block"),e(".gx_control input").removeAttr("disabled"),e(".gx_control #field_target").removeAttr("disabled")}function ie(){e.each(I,function(i,t){"polygon"==t.shape&&(T[i]=[],e.each(t.polygon_coords,function(e,t){T[i][e]=[],T[i][e][0]=t.x,T[i][e][1]=t.y}))})}return i&&e.extend(k,i),v=e(window).width(),m=e(window).height(),g=e("<div></div>").addClass("lightbox_package image_mapper"),f=e("<div></div>").addClass("lightbox_package_shadow"),g.append(f),p=e("<img></img>").attr("src","../images/loading.gif"),p.css("position","absolute").css("top",m/2-8).css("left",v/2-8),g.append(p),e("body").append(g),e.browser.msie&&e.browser.version<9?L():M(),e(document).bind("scroll",function(){N()}),e(window).bind("resize",function(){N()}),$.prototype={draw:function(i){if(i===o?(i.fillStyle="#000000",B(i)):i.fillStyle="#ffffff","rectangle"==this.shape)this.pos_x+this.width>k.canvas_width&&(this.pos_x=k.canvas_width-this.width),this.pos_y+this.height>k.canvas_height&&(this.pos_y=k.canvas_height-this.height),this.pos_x<0&&(this.pos_x=0),this.pos_y<0&&(this.pos_y=0),i.globalAlpha=.7,i.fillRect(this.pos_x,this.pos_y,this.width,this.height),i.globalAlpha=1,i.strokeRect(this.pos_x,this.pos_y,this.width,this.height);else if("circle"==this.shape)this.pos_x+this.width>k.canvas_width&&(this.pos_x=k.canvas_width-this.width),this.pos_y+this.height>k.canvas_height&&(this.pos_y=k.canvas_height-this.height),this.pos_x<0&&(this.pos_x=0),this.pos_y<0&&(this.pos_y=0),i.globalAlpha=.7,i.beginPath(),this.width>this.height?i.arc(this.pos_x+this.width/2,this.pos_y+this.height/2,this.height/2,0,2*Math.PI,!1):i.arc(this.pos_x+this.width/2,this.pos_y+this.height/2,this.width/2,0,2*Math.PI,!1),i.globalAlpha=1,i.strokeRect(this.pos_x,this.pos_y,this.width,this.height),i.closePath(),i.globalAlpha=.7,i.fillStyle="#ffffff",i.fill(),i.globalAlpha=1;else if("polygon"==this.shape){var t=this.slider_image_area_id;i.beginPath(),e.each(I,function(a,s){if(t==s.slider_image_area_id){var o=s.polygon_coords[0].x,l=s.polygon_coords[0].y;e.each(s.polygon_coords,function(e,t){0==e?i.moveTo(t.x,t.y):(i.lineTo(t.x,t.y),e==s.polygon_coords.length-1&&i.lineTo(o,l))}),i.globalAlpha=.7,i.fillStyle="#ffffff",i.fill(),i.globalAlpha=1}}),i.stroke(),i.closePath(),e.each(I,function(t,a){"polygon"==a.shape&&e.each(a.polygon_coords,function(e,s){i.strokeRect(s.x-2,s.y-2,4,4),null!=C&&C.slider_image_area_id==a.slider_image_area_id?(i.fillStyle="#ff0000",i.fillRect(s.x-2,s.y-2,4,4),i.fillStyle="#ffffff"):(i.fillStyle="#ffffff",i.fillRect(s.x-2,s.y-2,4,4)),T[t][e].x=s.x-2,T[t][e].y=s.y-2})})}if(C===this&&"polygon"!=C.shape){i.strokeStyle=z,i.lineWidth=q,i.strokeRect(this.pos_x,this.pos_y,this.width,this.height);var a=K/2;S[0].x=this.pos_x-a,S[0].y=this.pos_y-a,S[1].x=this.pos_x+this.width/2-a,S[1].y=this.pos_y-a,S[2].x=this.pos_x+this.width-a,S[2].y=this.pos_y-a,S[3].x=this.pos_x-a,S[3].y=this.pos_y+this.height/2-a,S[4].x=this.pos_x+this.width-a,S[4].y=this.pos_y+this.height/2-a,S[5].x=this.pos_x-a,S[5].y=this.pos_y+this.height-a,S[6].x=this.pos_x+this.width/2-a,S[6].y=this.pos_y+this.height-a,S[7].x=this.pos_x+this.width-a,S[7].y=this.pos_y+this.height-a,i.fillStyle=j;for(var s=0;s<8;s++){var l=S[s];i.fillRect(l.x,l.y,K,K)}}}},!1})}}(jQuery),$(document).ready(function(){$(".gx_image_mapper_open").bind("click",function(){return $(this).image_mapper(),!1})});

Youez - 2016 - github.com/yon3zu
LinuXploit