Changeset 4 for frontend.php
- Timestamp:
- Nov 26, 2008, 9:56:46 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
frontend.php
r3 r4 12 12 function show_mass() { 13 13 global $database; 14 $Query = $database->select('mass', '*' );14 $Query = $database->select('mass', '*', 'time > now()'); 15 15 while($DbRow = $Query->fetch_array()) 16 16 { … … 18 18 } 19 19 } 20 21 function show_login() { 22 echo '<form action="?admin" method="post">'.GIF_PASS.'<input name="pass"></form>'; 23 } 24 25 function show_upload_mass() { 26 echo UPLOAD_MASS.'<form action="?admin" method="post"> 27 '.GIF_DATE.' <input name="date"><br> 28 '.GIF_FILE.' <input name="file" type="file"><br> 29 <input value="Uložit" type="submit"> 30 </form>'; 31 } 32 33 function save_file() { 34 if (array_key_exists('date',$_POST) ) { 35 if (is_uploaded_file($_FILES['file']['tmp_name'])) { 36 echo "Soubor ". $_FILES['file']['name'] ." Byl nahrán"; 37 $tmp_name = $_FILES["file"]["tmp_name"]; 38 move_uploaded_file($tmp_name, "mass/".$_POSS['date']); 39 } else { 40 echo "Possible file upload attack: "; 41 echo "filename '". $_FILES['file']['tmp_name'] . "'."; 42 } 43 } 44 45 } 20 46 ?>
Note:
See TracChangeset
for help on using the changeset viewer.