Chat window now opens with no messages inside.
[Assignment-Trapper.git] / file_raw.php
blob300a515beafaaf4d8a5403c662d18fb873ed3166
1 <?php
3 include_once("auth.php");
4 include_once("time.php");
6 if (!$_GET["file_id"]) { die("No File Name Sent"); }
8 $_GET["file_id"] = mysql_real_escape_string($_GET["file_id"]);
10 if($role == 0 ) {
11 $sql = 'select file_1, user_id from files where file_id ='.$_GET["file_id"];
12 } else {
13 $sql = 'select file_1, user_id from files where file_id ='.$_GET["file_id"].' and user_id='.$user_id;
16 //echo $sql;
18 $result = mysql_query($sql);
20 $row = mysql_fetch_row($result);
22 $row[0] = htmlspecialchars($row[0]);
23 $row[0] = tab2space($row[0]);
25 echo "<html><pre>".$row[0]."</pre></html>";