<?php
// This script and data application were generated by AppGini 5.81
// Download AppGini for free from https://bigprof.com/appgini/download/

	$currDir = dirname(__FILE__);
	include("$currDir/defaultLang.php");
	include("$currDir/language.php");
	include("$currDir/lib.php");

	handle_maintenance();

	header('Content-type: text/javascript; charset=' . datalist_db_encoding);

	$table_perms = getTablePermissions('reunions');
	if(!$table_perms[0]) { die('// Access denied!'); }

	$mfk = $_GET['mfk'];
	$id = makeSafe($_GET['id']);
	$rnd1 = intval($_GET['rnd1']); if(!$rnd1) $rnd1 = '';

	if(!$mfk) {
		die('// No js code available!');
	}

	switch($mfk) {

		case 'avec_entete':
			if(!$id) {
				?>
				$j('#rs<?php echo $rnd1; ?>').html('&nbsp;');
				$j('#devise<?php echo $rnd1; ?>').html('&nbsp;');
				$j('#logo<?php echo $rnd1; ?>').html('&nbsp;');
				$j('#description<?php echo $rnd1; ?>').html('&nbsp;');
				$j('#adresse<?php echo $rnd1; ?>').html('&nbsp;');
				$j('#telephone<?php echo $rnd1; ?>').html('&nbsp;');
				$j('#whatsapp<?php echo $rnd1; ?>').html('&nbsp;');
				$j('#email<?php echo $rnd1; ?>').html('&nbsp;');
				$j('#site_web<?php echo $rnd1; ?>').html('&nbsp;');
				$j('#bp<?php echo $rnd1; ?>').html('&nbsp;');
				$j('#footer_3<?php echo $rnd1; ?>').html('&nbsp;');
				$j('#notice<?php echo $rnd1; ?>').html('&nbsp;');
				$j('#signataire<?php echo $rnd1; ?>').html('&nbsp;');
				<?php
				break;
			}
			$res = sql("SELECT `entete`.`identete` as 'identete', `entete`.`link_in` as 'link_in', `entete`.`nom` as 'nom', `entete`.`raison_sociale` as 'raison_sociale', `entete`.`description` as 'description', `entete`.`adresse` as 'adresse', `entete`.`telephone` as 'telephone', `entete`.`whatsapp` as 'whatsapp', `entete`.`email` as 'email', `entete`.`site_web` as 'site_web', `entete`.`bp` as 'bp', `entete`.`footer` as 'footer', `entete`.`footer_1` as 'footer_1', `entete`.`footer_2` as 'footer_2', `entete`.`footer_3` as 'footer_3', `entete`.`logo` as 'logo', `entete`.`logop` as 'logop', `entete`.`notice` as 'notice', `entete`.`devise` as 'devise', `entete`.`signataire` as 'signataire', `entete`.`observations` as 'observations', `entete`.`groupe` as 'groupe', `entete`.`agent` as 'agent' FROM `entete`  WHERE `entete`.`identete`='{$id}' limit 1", $eo);
			$row = db_fetch_assoc($res);
			?>
			$j('#rs<?php echo $rnd1; ?>').html('<?php echo addslashes(str_replace(array("\r", "\n"), '', nl2br($row['raison_sociale']))); ?>&nbsp;');
			$j('#devise<?php echo $rnd1; ?>').html('<?php echo addslashes(str_replace(array("\r", "\n"), '', nl2br($row['devise']))); ?>&nbsp;');
			<?php if($row['logo']) { ?> 
				$j('#logo<?php echo $rnd1; ?>').html('<a href="<?php echo $Translation['ImageFolder'] . addslashes(str_replace(array("\r", "\n"), '', $row['logo'])); ?>" data-lightbox="reunions_dv"><img src="thumbnail.php?i=<?php echo urlencode($row['logo']); ?>&t=entete&f=logo&v=dv" class="img-thumbnail"></a>');
			<?php }else{ ?>
				$j('#logo<?php echo $rnd1; ?>').html('<img src="thumbnail.php?i=&t=entete&f=logo&v=dv" class="img-thumbnail">');
			<?php } ?>
			$j('#description<?php echo $rnd1; ?>').html('<?php echo addslashes(str_replace(array("\r", "\n"), '', nl2br($row['description']))); ?>&nbsp;');
			$j('#adresse<?php echo $rnd1; ?>').html('<?php echo addslashes(str_replace(array("\r", "\n"), '', nl2br($row['adresse']))); ?>&nbsp;');
			$j('#telephone<?php echo $rnd1; ?>').html('<?php echo addslashes(str_replace(array("\r", "\n"), '', nl2br($row['telephone']))); ?>&nbsp;');
			$j('#whatsapp<?php echo $rnd1; ?>').html('<?php echo addslashes(str_replace(array("\r", "\n"), '', nl2br($row['whatsapp']))); ?>&nbsp;');
			$j('#email<?php echo $rnd1; ?>').html('<?php echo addslashes(str_replace(array("\r", "\n"), '', nl2br($row['email']))); ?>&nbsp;');
			$j('#site_web<?php echo $rnd1; ?>').html('<?php echo addslashes(str_replace(array("\r", "\n"), '', nl2br($row['site_web']))); ?>&nbsp;');
			$j('#bp<?php echo $rnd1; ?>').html('<?php echo addslashes(str_replace(array("\r", "\n"), '', nl2br($row['bp']))); ?>&nbsp;');
			$j('#footer_3<?php echo $rnd1; ?>').html('<?php echo addslashes(str_replace(array("\r", "\n"), '', nl2br($row['footer_3']))); ?>&nbsp;');
			$j('#notice<?php echo $rnd1; ?>').html('<?php echo addslashes(str_replace(array("\r", "\n"), '', nl2br($row['notice']))); ?>&nbsp;');
			$j('#signataire<?php echo $rnd1; ?>').html('<?php echo addslashes(str_replace(array("\r", "\n"), '', nl2br($row['signataire']))); ?>&nbsp;');
			<?php
			break;


	}

?>