File Manager

Current Path : /webspace/www.alexishaulot.be/html/admin/
Upload File :
Current File : /webspace/www.alexishaulot.be/html/admin/index.php

<?php 
	if ( !isset($_COOKIE['user']) ) {
		header("Location:login.php");
	}
	require_once("header.php");
	require_once("../config.php");
?>
<script language="javascript">
	
	function GetPhoto(reportage) {
		if (reportage.selectedIndex != 0) {
			http.open("GET", "getphotos.php?rep="+reportage.value, true);
			http.onreadystatechange = SetPhotos;
			http.send(null);
		} else {
			photos=document.getElementById('photo_id');
	        photos.disabled=true;
	        photos.length=1;
	            
		}
	}
	
	function SetPhotos() {
		if (http.readyState == 4) {
			if (http.status == 200) {
	            // ...processing statements go here...
	            rep = http.responseXML.documentElement;
	            photos=document.getElementById('photo_id');
	            photos.disabled=false;
	            photos.length=1;
	            for (i = 0; i < rep.getElementsByTagName('photo').length; i++) {
					titre = rep.getElementsByTagName('photo')[i].firstChild.data;
					id = rep.getElementsByTagName('photo')[i].getAttribute('id');
					//id = rep.getElementsByTagName('id')[i].firstChild.data;
					photos.options[photos.length] = new Option(titre,id)
					//alert(id);
	            }
					
	        } else {
	            alert("There was a problem retrieving the XML data:\n" +
	                http.statusText);
	        }
		}
	}
	
	function getHTTPObject() { 
		var xmlhttp; 
		/*@cc_on 
		@if (@_jscript_version >= 5) 
			try { 
				xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); 
			} catch (e) { 
				try { 
					xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); 
				} catch (E) {
					xmlhttp = false; 
				} 
			} 
		@else 
		xmlhttp = false; 
		@end @*/  
		if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
			try {
				xmlhttp = new XMLHttpRequest(); 
			} catch (e) { 
				xmlhttp = false; 
			} 
		} 
		return xmlhttp; 
	} 
	var http = getHTTPObject(); // We create the HTTP Object 
</script>
			<table width="600" border="0" cellspacing="0" cellpadding="4">
				<form method="post" action="add_reportage.php" enctype="multipart/form-data">
	              <tr>
	                <td width="50%"><span class="style1">HOMEPAGE</span></td>
	                <td width="50%">&nbsp;</td>
	              </tr>
	              <tr bgcolor="#333333">
	                <td width="50%"><div align="left"><strong>Ajouter</strong> un reportage</div></td>
	                <td width="50%">&nbsp;</td>
	              </tr>
	              <tr bgcolor="#333333">
	                <td width="50%"><div align="right">titre du reportage  :</div></td>
	                <td width="50%"><input name="titre" type="text" size="25"></td>
	              </tr>
	              <tr bgcolor="#333333">
	                <td width="50%"><div align="right">&agrave; date du :</div></td>
	                <td width="50%"><input name="date" type="text" size="8"></td>
	              </tr>
	              <tr bgcolor="#333333">
	                <td><div align="right">photo &quot;sommaire&quot; :<br>
	                  l: 140 / h: 90 pixels 
	                </div></td>
	                <td><input type="file" name="image">                 
	                   (.jpeg)</td>
	              </tr>
	              <tr bgcolor="#333333">
	                <td><div align="right">photo &quot;sommaire&quot; avec titre :<br>
	                  l: 140 / h: 90 pixels 
	                </div></td>
	                <td><input type="file" name="image_t">                 
	                   (.jpeg)</td>
	              </tr>
	              <tr bgcolor="#333333">
	                <td><div align="right">texte (commun) g&eacute;n&eacute;rique du reportage  :</div></td>
	                <td><textarea name="texte" cols="25" rows="4"></textarea></td>
	              </tr>
	              <tr bgcolor="#333333">
	                <td><div align="right">mots cl&eacute;s (metatags et bas de page)  :</div></td>
	                <td><textarea name="keywords" cols="25" rows="2"></textarea></td>
	              </tr>
	              <tr bgcolor="#333333">
	                <td width="50%">&nbsp;</td>
	                <td width="50%"><input type="submit" name="Submit2" value="Ajouter"></td>
	              </tr>
	            </form>
	              <tr>
	                <td>&nbsp;</td>
	                <td>&nbsp;</td>
	              </tr>
				<form method="post" action="order_home.php">
	              <tr bgcolor="#333333">
	                <td>Reportage &quot;<strong>&agrave; la une</strong>&quot; </td>
	                <td>Le(s) reportage(s) coch&eacute;s passeront s'afficheront en sommet de homepage</td>
	              </tr>
	              <tr bgcolor="#333333">
	                <td>&nbsp;</td>
	                <td>
	                	<?php
	                		$q = "select id,titre,prior from reportage";
	                		$r = mysql_query($q,$link);
	                		while ($s = mysql_fetch_assoc($r)) {
	                			$str = "<input type=\"checkbox\" name=\"checkbox_".$s['id']."\" value=\"checkbox\"";
	                			if ($s['prior'] == 1) {
	                				$str .= " checked ";
	                			}
	                			$str .= ">".$s['titre']."<br>";
	                			echo $str;
	                		}
	                	?>
					</td>
	              </tr>
	              <tr bgcolor="#333333">
	                <td align="right">Ne pas oublier d'enregistrer la s&eacute;lection &gt;&gt;&gt; </td>
	                <td><input type="submit" name="Submit5" value="Enregistrer"></td>
	              </tr>
	            </form>
	              <tr>
	                <td width="50%">&nbsp;</td>
	                <td width="50%">&nbsp;</td>
	              </tr>
	            <form method="post" action="del_reportage.php">
	              <?php
	            	$query = "select * from reportage";
	            	$res = mysql_query($query,$link);
	              ?>
	              <tr bgcolor="#FF0000">
	                <td width="50%"><strong>Effacer</strong> un reportage</td>
	                <td width="50%"><select name="reportage">
	                  <option selected>S&eacute;lectionner le reportage (complet) &agrave; effacer</option>
	                  <?php
	                  	while ($rec = mysql_fetch_assoc($res) ) {
	                  		echo "<option value=\"".$rec['id']."\">".$rec['titre']."</option>";
	                  	}
	                  ?>
	                </select></td>
	              </tr>
	              <tr bgcolor="#FF0000">
	                <td width="50%"><div align="right">Attention cette op&eacute;ration est d&eacute;finitive et sans annulation possible</div></td>
	                <td width="50%"><input type="submit" name="Submit" value="Effacer le reportage !"></td>
	              </tr>
	            </form>
	              <tr>
	                <td width="50%">&nbsp;</td>
	                <td width="50%">&nbsp;</td>
	              </tr>
	              <tr>
	                <td width="50%">&nbsp;</td>
	                <td width="50%">&nbsp;</td>
	              </tr>
	              <tr>
	                <td><span class="style1">REPORTAGES</span></td>
	                <td>&nbsp;</td>
	              </tr>
	              <tr bgcolor="#333333">
	                <td><strong>Ajouter</strong> une photo</td>
	                <td>&nbsp;</td>
	              </tr>
	            <form method="post" action="add_photo.php" enctype="multipart/form-data">
	              <?php
	            	$query = "select * from reportage order by id desc";
	            	$res = mysql_query($query,$link);
	              ?>
	              <tr bgcolor="#333333">
	                <td><div align="right">au reportage suivant :</div></td>
	                <td><select name="rep_id">
	                  <!-- <option selected>S&eacute;lectionner le reportage</option> -->
	                  <?php
	                  	while ($rec = mysql_fetch_assoc($res) ) {
	                  		echo "<option value=\"".$rec['id']."\">".$rec['titre']."</option>";
	                  	}
	                  ?>
	                </select></td>
	              </tr>
	              <tr bgcolor="#333333">
	                <td> <div align="right">photo       &mdash; 
				      Horizontale: 524 / h: 357 pixels<br>  
				      photo |
				      Verticale: 357 / h: 524 pixels</div></td>
	                <td><input type="file" name="photo">                  
	                (.jpeg)</td>
	              </tr>
	              <tr bgcolor="#333333">
	                <td><div align="right">photo &quot;contact/navigateur&quot; :<br>
	  					l: 60 / h: 60 pixels</div></td>
	                <td><input type="file" name="thumb">
						(.jpeg)</td>
	              </tr>
	              <tr bgcolor="#333333">
	                <td align="right">titre de la photo :</td>
	                <td><input name="titre" type="text" size="25"></td>
	              </tr>
	              <tr bgcolor="#333333">
	                <td><div align="right">l&eacute;gende de la photo :</div></td>
	                <td><textarea name="legende" cols="25" rows="4"></textarea></td>
	              </tr>
	              <tr bgcolor="#333333">
	                <td>&nbsp;</td>
	                <td><input type="submit" name="Submit22" value="Ajouter"></td>
	              </tr>
	            </form>
	              <tr>
	                <td>&nbsp;</td>
	                <td>&nbsp;</td>
	              </tr>
	              <tr bgcolor="#990000">
	                <td><strong>Effacer</strong> une photo (photo, contact et l&eacute;gende) </td>
	                <td>&nbsp;                </td>
	              </tr>
	            <form method="post" action="del_photo.php">
	              <?php
	            	$query = "select * from reportage";
	            	$res = mysql_query($query,$link);
	              ?>
	              <tr bgcolor="#990000">
	                <td>&nbsp;</td>
	                <td><select name="reportage_id" onchange="GetPhoto(this)">
	                  <option selected>S&eacute;lectionner le reportage</option>
						<?php
	                  	while ($rec = mysql_fetch_assoc($res) ) {
	                  		echo "<option value=\"".$rec['id']."\">".$rec['titre']."</option>";
	                  	}
	                  ?>
	                  </select></td>
	              </tr>
	              <tr bgcolor="#990000">
	                <td>&nbsp;</td>
	                <td><select name="photo_id" id="photo_id" disabled>
	                  <option selected>S&eacute;lectionner la photo</option>
                    </select></td>
	              </tr>
	              <tr bgcolor="#990000">
	                <td><div align="right">Attention cette op&eacute;ration est d&eacute;finitive et sans annulation possible</div></td>
	                <td><input type="submit" name="Submit4" value="Effacer la photo !"></td>
	              </tr>
	            </form>
              <tr>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
              </tr>
</table>
	</div>
</body>

</html>

File Manager Version 1.0, Coded By Lucas
Email: hehe@yahoo.com