Location: PHPKode > projects > PhpMyDVDs > phpmydvds/admin-request.php
<?php

    /***************************************************************************
                                 admin-request.php  -  description
                                -------------------

        copyright          : (C) 2002 by Cédric Rochat
        email                : hide@address.com
    ***************************************************************************/
    /***************************************************************************
    *
    *   This program is free software; you can redistribute it and/or modify
    *   it under the terms of the GNU General Public License as published by
    *   the Free Software Foundation; either version 2 of the License, or
    *   (at your option) any later version.
    *
    ***************************************************************************/

    require ("util.php");



		echo "<table width='100%' cellspacing=2 border=0 cellpadding=2>
			<tr>
				<td width='100%' valign='top'>
					<br>
					<br>";

					if ($submit=="Quitter la session" or $quit=='TRUE')
					{
						$session=session_id();
						DetruireSession($session);
					}

					if ($AdminRequest==1)
					{
						require ("config.php");
						if ($FirstTime==1)
						{
							if (md5($password)==$admin_pwd) include ("administration.php");
							else echo "<center><h2>Mot&nbsp;de&nbsp;passe&nbsp;incorrect<BR>ou<BR>session&nbsp;terminée</h2><br><a href='index.php?sousPage=admin-request.php'>Autentifiez-vous&nbsp;ici</a></center>";
						}
						else
						{
							if (ControleAcces ($password, $Internaute, session_id())) include ("administration.php");
							else echo "<center><h2>Mot&nbsp;de&nbsp;passe&nbsp;incorrect<BR>ou<BR>session&nbsp;terminée</h2><br><a href='index.php?sousPage=admin-request.php'>Autentifiez-vous&nbsp;ici</a></center>";
						}
					}
					else
					{
					echo "
					<form name='admin' method='POST' action='index.php?sousPage=admin-request.php&AdminRequest=1'>
						<table border='0' cellspacing='5' cellpadding='5' align='center'>
							<tr>
								<td>
									<b>
										<i>
											<font face='Arial, Helvetica, sans-serif' size='2'>Vous voulez:</font>
										</i>
									</b>
								</td>
								<td>";
								if ($FirstTime!=1)
								{
									if (!$IDDVD)
									{
										switch ($MenuChoix)
										{
											case 1 :
												echo "<input type='radio' name='MenuChoix' value='1' checked>
													<font face='Arial, Helvetica, sans-serif' size='2'>Modifier les paramètres généraux</font>";
												break;
											case 2 :
												echo "<input type='radio' name='MenuChoix' value='2' checked>
													<font face='Arial, Helvetica, sans-serif' size='2'>Supprimer ou modifier des enregistrements</font>";
												break;
											case 3 :
												echo "<input type='radio' name='MenuChoix' value='3' checked>
													<font face='Arial, Helvetica, sans-serif' size='2'>Ajouter un nouvel enregistrement</font>";
												break;
											case 4 :
												echo "<input type='radio' name='MenuChoix' value='4' checked>
													<font face='Arial, Helvetica, sans-serif' size='2'>Administrer les prêts</font>";
												break;
											default :
												echo "
												<input type='radio' name='MenuChoix' value='1'>
													<font face='Arial, Helvetica, sans-serif' size='2'>Modifier les paramètres généraux</font>
													<br>
													<br>
												<input type='radio' name='MenuChoix' value='2' checked>
													<font face='Arial, Helvetica, sans-serif' size='2'>Supprimer ou modifier des enregistrements</font>
													<br>
													<br>
												<input type='radio' name='MenuChoix' value='3'>
													<font face='Arial, Helvetica, sans-serif' size='2'>Ajouter un nouvel enregistrement</font>
													<br>
													<br>
												<input type='radio' name='MenuChoix' value='4'>
													<font face='Arial, Helvetica, sans-serif' size='2'>Administrer les prêts</font>";
										}
									}
									elseif ($IDDVD)  echo "<input type='radio' name='MenuChoix' value='4' checked>
										<font face='Arial, Helvetica, sans-serif' size='2'>Administrer les prêts</font>
										<input type='hidden' name='IDDVD' value=$IDDVD>";
								}
								else
								{
									echo "<input type='radio' name='MenuChoix' value='1' checked>
											<font face='Arial, Helvetica, sans-serif' size='2'>Modifier les paramètres généraux</font>
											<input type='hidden' name='ProblemeConnexion' value=$ProblemeConnexion>";
								}
								echo "
								</td>
							</tr>";
							require ("config.php");
							if ($FirstTime!=1 and (ControleAcces ($password, $Internaute, session_id())))
							{
							echo "
							<tr>
								<td align=center colspan=2>
									<b>
										<i>
											<font face='Arial, Helvetica, sans-serif' size='2'>Votre session est toujours active !</font>
										</i>
									</b>
								</td>
							</tr>";
							}
							else
							{
							echo "
							<tr>
								<td>
									<b>
										<i>
											<font face='Arial, Helvetica, sans-serif' size='2'>Mot de passe:</font>
										</i>
									</b>
								</td>
								<td>
									<input type='password' name='password' value='' maxlength=30 size=30>
								</td>
							</tr>";
							}
							echo "
							<tr>
								<td align='center' colspan='2'>
									<input type='submit' value='Entrer' name='submit'>"; if ($FirstTime!=1 and (ControleAcces ($password, $Internaute, session_id()))) echo "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type='submit' value='Quitter la session' name='submit'>";
								echo "</td>
							</tr>
						</table>
					</form>";
					}
					echo "<br>
					<br>
				</td>
			</tr>
		</table>";
Return current item: PhpMyDVDs