AnonSec Team
Server IP : 10.111.40.2  /  Your IP : 216.73.217.145
Web Server : Apache
System : Linux webd002.cluster111.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64
User : comimage ( 586)
PHP Version : 7.4.33
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0705) :  /home/comimage/batimonte.com/admin/js/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/comimage/batimonte.com/admin/js/javascript.action.js
/*------------------------- Fonctionnalités ------------------------------*/

	function checkrequired(which){
		var pass=true
		
		if (document.images){
			for (i=0;i<which.length;i++){
			var tempobj=which.elements[i]
				if (tempobj.name.substring(0,8)=="required"){
					if (((tempobj.type=="text"||tempobj.type=="textarea")&&tempobj.value=='')||(tempobj.type.toString().charAt(0)=="s"&&tempobj.selectedIndex==-1)){
						pass=false
						break
					}
				}
			}
		}
		if (!pass){
			alert("Vous n'avez pas rempli tous les champs obligatoires !!!")
			return false
		}
		else{
			return true
		}
	}

	function limiteCaracteres(champ,limite,input_id){
		longueur_actuelle = document.getElementById(champ).value.length;
		if (longueur_actuelle > limite ){
			document.getElementById(champ).value = document.getElementById(champ).value.substring(0,limite);
			rest = limite;
		}
		else{
			rest = longueur_actuelle;
		}
		var nouvelle_longueur = limite - rest;
		document.getElementById(input_id).value = nouvelle_longueur;
	}

	// AJAX
	function getXhr(){
	  var xhr = null; 
					if(window.XMLHttpRequest) // Firefox et autres
					   xhr = new XMLHttpRequest(); 
					else if(window.ActiveXObject){ // Internet Explorer 
					   try {
								xhr = new ActiveXObject("Msxml2.XMLHTTP");
							} catch (e) {
								xhr = new ActiveXObject("Microsoft.XMLHTTP");
							}
					}
					else { // XMLHttpRequest non supporté par le navigateur 
					   alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest..."); 
					   xhr = false; 
					} 
									return xhr;
				}
				
	function listerRubriques(){
		var xhr = getXhr();
		xhr.onreadystatechange = function(){
			if(xhr.readyState == 4 && xhr.status == 200){
				leselect = xhr.responseText;
				document.getElementById('selectRubrique').innerHTML = leselect;
			}
		}

		xhr.open("POST","select-rubriques.php",true);
		xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
		sel = document.getElementById('categories');
		idcat = sel.options[sel.selectedIndex].value;
		xhr.send("id="+idcat);
	}

	function goPage(machaine){
		monArray = new Array();
		monArray = machaine.split('|');
		sel = document.getElementById('srwd');
		idpage = sel.options[sel.selectedIndex].value;
		if(idpage > 0){
			window.top.location.href= monArray[idpage];
		}
	}
			
	function popUp(page,largeur,hauteur,options) {
		var top=(screen.height-hauteur)/2;
		var left=(screen.width-largeur)/2;
		window.open(page,"","top="+top+",left="+left+",width="+largeur+",height="+hauteur+","+options); 
	}
		
	function ChangeOnglet(onglet, contenu) {   
		document.getElementById('content_1').style.display = 'none';
		document.getElementById('content_2').style.display = 'none';
		document.getElementById('content_3').style.display = 'none'; 
		document.getElementById('content_4').style.display = 'none';
		document.getElementById(contenu).style.display = 'block';       

		document.getElementById('tab_1').className = '';
		document.getElementById('tab_2').className = '';
		document.getElementById('tab_3').className = '';
		document.getElementById('tab_4').className = '';		
		document.getElementById(onglet).className = 'active';       
	}

	function confirmRefresh(url,msg_confirm,msg_ok,msg_ko) {
		var okToRefresh = confirm(msg_confirm);
		if (okToRefresh){
			//setTimeout("location.reload(true);",1500);
			alert(msg_ok);
			window.location = url;
		}
		else{
			alert(msg_ko);
		}
	}
	
	function fermerMaPage(){
	   //Recharger la page mère pour actualiser les données du paiement
	   parent.opener.location.reload();
	}
	function confirmerAction(url) {
		if (confirm("Voulez-vous vraiment le supprimer ?")){
			window.location = url;
		}
	}
	function bascule(elem){
		etat=document.getElementById(elem).style.display;
		if(etat=="none"){
			document.getElementById(elem).style.display="block";
		}else{
			document.getElementById(elem).style.display="none";
		}
	}
        function listerImagesIbrowser(input){
            var xhr = getXhr();
            xhr.onreadystatechange = function(){
                if(xhr.readyState == 4 && xhr.status == 200){
                    leselect = xhr.responseText;
                    document.getElementById('listImgs').innerHTML = leselect;
                    document.getElementById('urlIbrowser').value = '';
                    if(input == "src"){
                        document.getElementById(input).value = '';
                        document.getElementById('alt').value = '';
                    }else{
                        document.getElementById(input).value = '';
                    }
                }
            }
            xhr.open("POST","../../../../ajax.php",true);
            xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
            sel = document.getElementById('selectRep');
            idrep = sel.options[sel.selectedIndex].value;
            xhr.send("idrep="+idrep+"&c="+input);
	}
	function insertImg(img,input){
            document.getElementById('urlIbrowser').value = img;
            if(input == "src"){
                document.getElementById(input).value = img;
                document.getElementById('alt').value = 'img';
            }else{
                document.getElementById(input).value = img;
            }
	}
	

AnonSec - 2021