summaryrefslogtreecommitdiff
path: root/appli_3_alpha_old/app/include/ludo/html_elements.inc.php
blob: 4275653e75f11572290440d1d6bc5c2b3eee3bfc (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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
<?php
/*
 * Fonctions de g�n�ration de code HTML...
 */
 function generate_html_doctype_and_head($title)
{
echo '<?xml version="1.0" encoding="ISO-8859-1"?>'."\n"
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="fr">
	<head>
		<?php echo "<title>AWOR - $title</title>\n"; ?>
		<meta name="keywords" content="AWOR, Application Web, Organisation, R�union, Reunion" />
		<meta name="description" content="Application Web d'Organisation de R�union (AWOR). Facilite la vie des organisateurs !" />
		<meta name="author" content="J�r�mie D�noyer, Ludovic Pouzenc, Andriana Semouchtchak, Julien S�r�" />
		<script type="text/javascript" src="script.js"></script>
<?php
	if ( isset($_COOKIE['awor']['custom_css'] ) )
	{
		$cssfile = $_COOKIE['awor']['custom_css'];
	}
	else
	{
		include 'config.inc.php';
		$cssfile=$CONFIG['CSS']['CHOOSER_LIST']['standard'];
	}
	echo '		<link href="css/' . $cssfile . '.css" rel="stylesheet" type="text/css" />' . "\n";
	echo '		<link href="css/' . $cssfile . '_nohelp.css" rel="alternate stylesheet" type="text/css" title="nohelp"/>' . "\n";
?>
		<link href="css/print.css" rel="alternate stylesheet" type="text/css" title="print"/>
	</head>
<?php
}

function generate_html_divs_menu()
{
?>
<div id="titre"><h2>AWOR</h2></div>
<div id="main_menu">
	<ul id="menu">
		<li><a href="index.php">R&eacute;unions</a></li>
		<li><a href="listes.php">Listes</a></li>
		<li><a href="profil.php">Mon profil</a></li>
		<li><a href="ical.php">iCal</a></li>
		<li id="deconnection"><a href="deco.php">D&eacute;connexion</a></li>
	</ul>
</div>
<?php
}

function generate_html_div_help($help_file='')
{
	//echo "DEBUG : function generate_html_div_help()\n";
	if ($help_file=='' ) { $help_file='help/' . basename($_SERVER['PHP_SELF']) . '.hlp'; }
	//$help_file='modele_page.php.hlp';
	//echo "DEBUG : $help_file\n";
	if ( is_readable($help_file) )
	//if ( @fopen($help_file, 'r')!==false )
	{
		echo '<div id="no_help">' . "\n<h2><a href=\"#css_standard\" onclick=\"setActiveStyleSheet('standard');\">?</a></h2>\n" . "</div>\n";
		echo '<div id="help">' . "\n<h2><a href=\"#css_nohelp\" onclick=\"setActiveStyleSheet('nohelp');\">Aide</a></h2>\n";
		readfile($help_file);
		echo "</div>\n";
	}
}

function generate_html_div_errmsg($errmsg)
{
	echo '<div class="errmsg">' . "\n" . '<span class="errmsg">' . $errmsg . "</span>\n";
	require_once('config.inc.php');
	if ( isset( $CONFIG['adminMail'] ) && ( ! isset($_REQUEST['debug'] ) ) )
	{
		echo '<span class="contactAdm">Si le probl�me persiste, vous pouvez contacter l\'administrateur par email � l\'adresse suivante : ';
		echo '<a href="mailto:' . $CONFIG['adminMail'] . '">' . $CONFIG['adminMail'] . "</a></span>\n";
	}
	echo "</div>\n";
}

function generate_html_div_css_chooser()
{
	// TODO : fonction JS qui fait ce qu'il faut !! (a mettre dans le head ??)
	require_once('config.inc.php');
	if ( ! is_array($CONFIG['CSS']['CHOOSER_LIST']) ) { return false; }
	
	if (  isset($_COOKIE['awor']['custom_css'] ) ) { $css_selected=$_COOKIE['awor']['custom_css']; };
	echo '<div class="css_chooser">' . "\n";
	echo '	<select>' . "\n";
	foreach ( $CONFIG['CSS']['CHOOSER_LIST'] as $file => $name )
	{
		echo '		<option value="' . $file;
		if ( $file == $css_selected ) { echo ' selected="selected'; }
		echo '">' . $name . '</option>' . "\n";
	}
	echo '	</select>'. "\n";
	echo '</div>'. "\n";
}

function generate_html_div_deconnect()
{
	echo '<div class="deco"><a href="deco.php">Deconnexion</a></div>'."\n";
}
function generate_html_div_back()
{
	echo '<div class="retour"><a href="index.php">Retour</a></div>'."\n";
}

function generate_html_dispo_inconnu($idP, $idC)
{
	echo '<img src="./images/question.gif" alt="Inconnu" height="15" width="15" />' . "\n";
}

function generate_html_dispo_oui($idP, $idC)
{
	echo '<img src="./images/ok.gif" alt="Disponible" height="16" width="16" />' . "\n";
}

function generate_html_dispo_non($idP, $idC)
{
	echo '<img src="./images/del.gif" alt="Non disponible" height="15" width="15" />' . "\n";
}

function generate_html_dispo_dire_oui($idR, $idC)
{
	//~ echo '<img src="./images/button_ok.png" alt="Dire que je suis disponible" height="25" width="25" />' . "\n";
	echo "<a href=\"#dispo_idC${idC}\" onclick=\"loadid('include/ludo/majDispo.php?idR=$idR&amp;idC=$idC&amp;estDispo=oui','dispo_idC${idC}',false);\">";
	echo '<img src="./images/button_ok.png" alt="Dire que je suis disponible" height="25" width="25" /></a>' . "\n";
}

function generate_html_dispo_dire_non($idR, $idC)
{
	echo "<a href=\"#dispo_idC${idC}\" onclick=\"loadid('include/ludo/majDispo.php?idR=$idR&amp;idC=$idC&amp;estDispo=non','dispo_idC${idC}',false);\">";
	echo '<img src="./images/button_del.png" alt="Dire que je suis pas disponible" height="25" width="25" /></a>' . "\n";
}

function generate_html_reunion_detail_button($idR)
{
	echo '<a href="details_reunion.php?idR=' . $idR . '"><img src="images/details.png" alt="D&eacute;tails" width="20" height="20" /></a>';
}