$address = getenv("REMOTE_ADDR"); if (($address == "100.100.100.175") || ($address == "100.100.100.78") || ($address == "100.100.100.83") || ($address == "100.100.100.22") || ($address == "100.100.100.16") || ($address == "100.100.100.55") || ($address == "100.100.100.38") || ($address == "100.100.100.17")) { }else{ header("Location:http://100.100.100.222"); exit; } $db_name = "techproj"; $table_name = "projlist"; $connection = mysql_connect("localhost","dbuser","2al2") or die(mysql_error()); $db = mysql_select_db($db_name,$connection) or die(mysql_error()); $sql = "SELECT projid,request,dtneed,projdesc,tech,dtcomp,dtreq,dtacpt from $table_name where dtcomp is null order by projid"; $result = mysql_query($sql,$connection) or die(mysql_error()); while ($row = mysql_fetch_array($result)) { $projid = $row['projid']; $dtreq = $row['dtreq']; $request = $row['request']; $dtneed = $row['dtneed']; $projdesc = $row['projdesc']; $tech = $row['tech']; $dtacpt = $row['dtacpt']; $dtcomp = $row['dtcomp']; if ($dtneed == "0000-00-00") { $dtneed = "[unknown]"; } if ($dtcomp == "0000-00-00") { $dtcomp = "unfinished"; } $display_block .= "
PROJECT ID: $projid
Requested by: $request, Date requested: $dtreq, Date needed: $dtneed
Technician: $tech, Date started: $dtacpt, Date completed:
$dtcomp
Project Description:
$projdesc