summaryrefslogtreecommitdiff
path: root/appli_3_alpha_old/include/ludo/mail_textarea.php
blob: 4861e1d31b89e245295607ef5690111545130074 (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
<?php
require_once('session_verify.inc.php');
include('config.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=$_GET['model']; } else { $model='empty'; }
?>

<textarea name="msgText" cols="80" rows="8">
<?php
	if ( $model != 'empty')
	{
		include('../connect.inc.php');
		if ( ! isset($CONFIG['MAIL']['TEMPLATES'][$model]['tpl_file']) )
		{
			echo 'D�sol�, mod�le indisponible...';
		}
		else
		{
			// On r�cup�re quelques information � propos de la r�union pour que les templates puissent �tre customis�s
			$objetR=$ordreJourR=$lieuR=$remarquesR="";
			if (isset( $_GET['idR']) )
			{
				$idR=addslashes($_GET['idR']);
				$result = mysql_query("SELECT objetR, ordreJourR, lieuR, remarquesR FROM 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�sol�, impossible de charger le fichier mod�le...';
			}
		}
	}
	//print_r($_REQUEST);
	//print_r($CONFIG);
?>
</textarea>