media @ VU
[] readme course(s) preface I 1 2 II 3 4 III 5 6 7 IV 8 9 10 V 11 12 afterthought(s) appendix reference(s) example(s) resource(s) _

talk show tell print

wiki-makedir.php



  <?php
  
  if(_GET["go"]==true){
  
  	error = false;
  	if(strpos(_POST["titel"],"/")){
  		error = true;
  	}
  	_POST["directory_name"] = trim(_POST["directory_name"]);
  	if(strpos(_POST["directory_name"],"/")){
  		error = true;
  	}
  	
  	if(error == false){
  		make_dir = "d:/www/media/"._POST["titel"]."/"._POST["directory_name"];
  		mkdir(make_dir, 0777);
  		chmod(make_dir, 0777);
  		
  		message =	""._POST["directory_name"]." in "._POST["titel"].".

" . "back to ".$_POST["titel"]."
" ; } else{ $message = "".$_POST["titel"]." of ".$_POST["directory_name"]." failed.

" . "back to ".$_POST["titel"]."
" ; } } else{ $message = "creat ".$_GET["titel"]." ?
" . "Gdo not use: \\ / : * ? \" < > |
" . "
<input type=text name='directory_name' size=50><BR> <input type='hidden' name='titel' value='"._GET["titel"]."'> <input type='button' value=' cancel ' onClick='history.go(-1)'>&nbsp;&nbsp; <input type='Submit' value=' continue '></form>" ; } ?> <?php include 'header.php' ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Upload file</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link href="css/style.css" rel="stylesheet" type="text/css"> <script language="JavaScript" type="text/JavaScript"> </script> <body> <center> <table border=0 width=500> <tr> <td colspan=4 align=center><b>Folder </b>&nbsp;&nbsp;&nbsp;v0.1 2005(c)</td> </tr> <tr> <td colspan=4 height=10></td> </tr> <tr> <td width=10 height=10></td> <td colspan=2> <?php echo message; ?> </td> <td width=10 height=10></td> </tr> </table> </center> <?php include 'footer.php' ?>

(C) A. Eliëns 21/5/2007

You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.