source: subversion/sites/other/places/upload.php @ 6985

Last change on this file since 6985 was 1440, checked in by ojw, 14 years ago

city-browsing website, and host for OSM@home

File size: 628 bytes
Line 
1<?php
2include("../Connect/connect.inc");
3$Password = $_POST["mp"];
4switch($Password)
5{
6  // Passwords are hardcoded here: edit this file to change permissions
7  case "user1|password1":
8  case "user2|password2":
9
10  list($User,$Pass) = explode("|", $Password);
11
12  // Size limit for uploaded files
13  if($_FILES['file']['size'] > 800000)
14    exit;
15  $Filename = sprintf("Maps/%d.png", $_POST["id"]);
16  move_uploaded_file($_FILES['file']['tmp_name'], $Filename);
17
18  $SQL = sprintf("update `places2` set `renderer`='%s' where id=%d;",
19    mysql_escape_string($User),
20    $_POST["id"]);
21  mysql_query($SQL); 
22 
23  break;
24default:
25}
26?>
Note: See TracBrowser for help on using the repository browser.