summaryrefslogtreecommitdiff
path: root/final/app/include/ludo/mail_textarea.php
blob: 41537a96bdbadee7e9ba530bb244e8b7b2e925f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
require_once('session_verify.inc.php');
include('config.inc.php');
@include('../tools.inc.php');
@include('include/tools.inc.php');
//~ require_once('/home/lud/shares/public_html/awor/appli_3_alpha/include/connect.inc.php');

//include('include/connect.inc.php');

if ( isset($_GET['model']) ) { $model=addslashes_if_needed($_GET['model']); } else { $model='empty'; }
?>

<textarea name="msgText" cols="80" rows="15">
<?php
	if ( $model != 'empty')
	{
		include('../connect.inc.php');
		if ( ! isset($CONFIG['MAIL']['TEMPLATES'][$model]['tpl_file']) )
		{
			echo 'D&eacute;sol&eacute;, mod&egrave;le indisponible...';
		}
		else
		{
			// On r&eacute;cup&egrave;re quelques information &agrave; propos de la r&eacute;union pour que les templates puissent &ecirc;tre customis&eacute;s
			$objetR=$ordreJourR=$lieuR=$remarquesR="";
			if (isset( $_GET['idR']) )
			{
				$idR=addslashes($_GET['idR']);
				$result = mysql_query("SELECT objetR, ordreJourR, lieuR, remarquesR FROM AWOR_Reunion WHERE idR='$idR'");
				if (mysql_num_rows($result)===1)
				{
					list($objetR, $ordreJourR, $lieuR, $remarquesR) = mysql_fetch_array($result);
				}
			}
			//echo 'DEBUG : ../../templates/' . $CONFIG['MAIL']['TEMPLATES'][$model]['tpl_file'] . "\n";
			if (!@include('../../templates/' . $CONFIG['MAIL']['TEMPLATES'][$model]['tpl_file']) )
			{
				echo 'D&eacute;sol&eacute;, impossible de charger le fichier mod&egrave;le...';
			}
		}
	}
	//print_r($_REQUEST);
	//print_r($CONFIG);
?>
</textarea>