&1", $updw); $s = "/var/www/html/one/tick/scripts/pics.pl $filename t_ 130"; exec("$s 2>&1", $updw); } $stageID = 0; if (isset($_POST['stageID'])) { $stageID = $_POST['stageID']; } if ($stageID != 0) { $query = "INSERT INTO markers (stageID, icon, title, text, image, latitude, longitude) VALUES (" . "'" . $stageID . "', " . "'" . $_POST['icon'] . "', " . "'" . myaddslashes($_POST['title']) . "', " . "'" . myaddslashes($_POST['text']) . "', " . "'" . $filename . "', " . "'" . $_POST['latitude'] . "', " . "'" . $_POST['longitude'] . "')"; $result = mysql_query($query, $db) or mysql_error($result); } if ($filename != "") { $big = "http://www.onemillionrevolutions.org/tick/images/gallery/${filename}\n"; $small = "http://www.onemillionrevolutions.org/tick/images/gallery/t_${filename}\n"; $file = "/var/www/html/one/tick/images/gallery/pic${ID}.txt"; if (!$file_handle = fopen($file,"a")) { echo "Cannot open file"; } if (!fwrite($file_handle, $big)) { echo "Cannot write to file"; } if (!fwrite($file_handle, $small)) { echo "Cannot write to file"; } fclose($file_handle); } staticify($_POST['stageID']); header("Location: /tick/markers.php"); ?>