Jump to content

[SOLVED] Getting an error when script is rendered


ublapach

Recommended Posts

Im getting this error

Parse error: parse error, unexpected $ in /usr/home/jlytal/public_html/newsite/projnew.php on line 513

when i try to load this page heres the code

 

<? 
require ("./siteclas.php");
$dbh = new CEIS_DB;

require ("./auth.php");
$username = $_SESSION['username'];

$recUser = $dbh->UserInfo($username);

//REDIRECT IF THE USER IS NOT AN ADMIN OR IS A CUSTOMER WITHOUT ACCESS TO CREATE NEW PROJECTS
if ($recUser['accesslvl'] != "admin") {

// Get the project creation access records
$sQuery = 
	"SELECT pca.`projectcreationaccessid`, wu.`username`, wu.`fname`, wu.`lname` " . 
	"FROM `projectcreationaccess` pca " .
	"INNER JOIN `webusers` wu ON wu.`username` = pca.`ceis_username` " .
	"WHERE pca.`cust_username` = '$recUser[username]' " .
	"ORDER BY pca.`ceis_username` ASC";

$resProjectCreationAccess = $dbh->query($sQuery);
if (!$resProjectCreationAccess || mysql_num_rows($resProjectCreationAccess) == 0) {
	$sURL = "http://" . $_SERVER['SERVER_NAME'] . "index.php";
	header("Location: $sURL");
	exit;
}


}

// GET THE ENGINEER'S INFO IF ONE HAS BEEN SELECTED
if (isset($_POST[selEngName])) 
$recEngineer = $dbh->UserInfo($_POST[selEngName]);
else
$recEngineer = $recUser;

//************************************************************
// CREATE A NEW JOB IF THE FORM HAS BEEN SUBMITTED
//************************************************************
if ($_POST[beenSubmitted]) {

// MAKE SURE THAT THE JOB NUMBER IS UNIQUE
$query = "SELECT COUNT(*) as numrows FROM `projects` WHERE jobnum=$_POST[txtJobNum]";
$row = $dbh->query($query);
$ticketNumCount = mysql_result($row, 0); 
if ((int) $ticketNumCount > 0) {
	echo "Ticket Number $_POST[txtJobNum] already exists.  This must be a unique value.";
} else {

	// MAKE A DIRECTORY FOR THE UPLOADS
	mkdir("./" . $_POST[txtJobNum], 0777) or die("Could not create directory /tracking/" . $_POST[txtJobNum] . " for job #" . $_POST[txtJobNum] . ".  Does this job number already exist?  Are the permissions incorrect?<br><br>Use the back button to return to the form.");

	// CREATE A BLANK INDEX.PHP TO PREVENT FILE BROWSING
	touch("./" . $_POST[txtJobNum] . "/index.php") or die ("Could not create a blank index.php.  Please check permissions or contact the admin/developer");

	require("./fileupload-class.php");
	$path = "./" . $_POST[txtJobNum] . "/";
	$mode = 2;
	$my_uploader = new uploader('en');
	$my_uploader->max_filesize(20000000);
	$my_uploader->max_image_size(1920, 1080);

	$filenameArray = array();

	//GET THE PICTURES FIRST
	for ($i = 1; $i <= 10; $i++) {

		$upload_file_name = "upFile" . $i;

		if ($_FILES[$upload_file_name]['name'] != '') {

			// UPLOAD the file
			if ($my_uploader->upload($upload_file_name, $acceptable_file_types, $default_extension)) {
				$my_uploader->save_file($path, $mode);
			}

			if ($my_uploader->error) {
				echo $my_uploader->error . "<br>\n";

			} else {
				// Successful upload!
				//print ($my_uploader->file['name'] . " was uploaded successfully.<br>");
				$filenameArray[$x++] = $my_uploader->file['name'];
			}
		}
	}

	//2004-09-27 RKB: ADD CAPABILITY FOR MULTIPLE SOWS (3 ENABLED)
	//UPLOAD THE SOWS
	for ($i = 1; $i <= 10; $i++) {

		$upload_file_name = "upFileSOW" . $i;

		if ($_FILES[$upload_file_name]['name'] != '') {

			//UPLOAD THE FILE
			if ($my_uploader->upload($upload_file_name, $acceptable_file_types, $default_extension)) {
				$my_uploader->save_file($path, $mode);
			}

			if ($my_uploader->error) {
				echo $my_uploader->error . "<br>\n";

			} else {
				// SUCCESSFUL UPLOAD!
				$sFileSOW .= $my_uploader->file['name'] . ",";
			}
		}
	}
	if (strlen($sFileSOW) > 0) $sFileSOW = substr($sFileSOW, 0, strlen($sFileSOW) - 1);

	//2004-09-27 RKB: REMOVED AS-BUILTS FROM PROJNEW FORM
	//UPLOAD THE AS-BUILT
	//if ($my_uploader->upload("upFileAsBuilt", $acceptable_file_types, $default_extension)) {
	//	$my_uploader->save_file($path, $mode);
	//}
	//if ($my_uploader->error) {
	//	echo $my_uploader->error . "<br>\n";
	//} else {
		//print ($my_uploader->file['name'] . " was uploaded successfully.<br>");
	//	$sFileAsBuilt = $my_uploader->file['name'];
	//}

	//CHMOD THE NEW DIRECTORY SO THE FILES CAN BE DELETED BY THE FTP USER'S ACCOUNT
	chmod ($path, 0777);

	//MAKE A STRING WITH THE PICTURE NAMES
	foreach ($filenameArray as $sName) $sPics .= $sName . ",";
	$sPics = substr($sPics, 0, strlen($sPics) - 1);
	$sNow = date("Y-m-d G:i:s"); 

	//DO THE DB INSERT
	if ($recUser['accesslvl'] == "admin") {
		$create_engname = $_POST[selEngName];
	}
	else {
		$create_engname = $recUser['username'];
	}

	$sQuery = "INSERT INTO `projects` ( `custid`, `po_num`, `wo_num`, `jobtitle`, `ceis_engineer`, `status`, `jobnum`, `stickernum`,
										`ceis_invoice`, `details`, `date_start`, `date_projected`, `file_sow`, 
										`file_asbuilt`, `pics`, `ceis_admin`, `date_created`, `city`, `state`, `site_id`, `email_distro`, `bidprice`, `DivisionID` ) 
				VALUES (
					'$create_engname', '$_POST[txtPO]', '$_POST[txtWO]', '$_POST[txtCEISJobTitle]', '$_POST[selCEISName]', 
					'$_POST[selJobStatus]', $_POST[txtJobNum], $_POST[txtStickerNum], '$_POST[txtInvoiceNum]', '$_POST[txtADetails]',
					'$_POST[txtStartDate]', '$_POST[txtCompleteDate]', '$sFileSOW', '$sFileAsBuilt', '$sPics', 
					'$recUser[username]', '$sNow', '$_POST[txtCity]', '$_POST[selState]', '$_POST[txtSiteID]', '$_POST[txtA_Emails]', '$_POST[txtBidPrice]', $_POST[selCEISDivision] )";
	$resIns = $dbh->query($sQuery);

	//echo $sQuery;

	if (!$resIns) {
		echo ("INSERT query failed: " . mysql_error()) . "<br/><br/>" . $sQuery;
		exit;		
	}

	// 2006-12-31 RKB
	// ADD MULTIPLE CEIS ENGINEERS WITH ACCESS TO THE PROJECT
	for ($i = 2; $i <= 5; $i++) {
		$ceis_name = "selCEISName" . $i;
		if ($_POST[$ceis_name] <> "NOTSELECTED") {
			$sQuery = "INSERT INTO `projectengineers` ( `ProjectEngineersID` , `username` , `jobnum` )
					   VALUES (NULL , '$_POST[$ceis_name]', '$_POST[txtJobNum]')";
			$resIns = $dbh->query($sQuery);
		}
	}

	//GET THE PROJET DETAILS AGAIN
	$recProject = $dbh->ProjectDetails($_POST[txtJobNum]);

	//GET THE FULL NAME AND EMAIL/PHONE OF THE CEIS ENGINEER
	$recCEISName = $dbh->UserInfo($_POST[selCEISName]);

	//SEND AN EMAIL
	$content =  "New " . $recProject[DivisionName] . " Ticket #" 			. date("Ymd", $recProject[ftime]) . $_POST[txtJobNum] . "\r\n" .
				"\r\nSticker Number:             " 				. $recProject[stickernum] . 
				"\r\nCustomer/Engineer Name:     "				. $recEngineer[fname] . " " . $recEngineer[lname] . 
				"\r\nOffice Phone #:             " 				. $_POST[txtPhone] .
				"\r\nEmail Address:              " 				. $_POST[txtEmail] .
				"\r\nCompany Name:               " 				. $_POST[selCompany] .
				"\r\n\r\n" . $recProject[DivisionName] . " Job Title:    " . $_POST[txtCEISJobTitle] .
				"\r\n" . $recProject[DivisionName] . " Assigned Engineer:  " . $recCEISName[fname] . " " . $recCEISName[lname] . 
				"\r\n  Phone:                    " 				. $recCEISName[phone_office] .
				"\r\n  Email:                    " 				. $recCEISName[email] .
				"\r\nWork Order #:               " 				. $_POST[txtWO] .
				"\r\n\r\nPO #:                       " 			. $_POST[txtPO] .
				"\r\n" . $recProject[DivisionName] . " Invoice #:             " . $_POST[txtInvoiceNum] . 
				"\r\nJob Status:                 " 				. $_POST[selJobStatus] .
				"\r\nJob Details:                " 				. $_POST[txtADetails] . 
				"\r\nCity:                       " 				. $_POST[txtCity] . 
				"\r\nState:                      " 				. $_POST[selState] .
				"\r\nSite ID:                    " 				. $_POST[txtSiteID] .
				"\r\n\r\nStart Date:                 " 			. $_POST[txtStartDate] .
				"\r\nProjected Completion Date:  " 				. $_POST[txtCompleteDate];
	if ($sFileSOW != '') {
		$content .=	"\r\n\r\nCopy of SOW:\r\n" . "http://" . $_SERVER['SERVER_NAME'] . "/tracking/" . $_POST[txtJobNum] . "/" . $sFileSOW;
	}
	//RKB 2004-09-27 REMOVED AS-BUILTS FROM NEW PROJECT FORM
	//if ($sFileAsBuilt != '') {
	//	$content .= "\r\n\r\nCopy of AsBuilt:\r\n" . "http://" . $_SERVER['SERVER_NAME'] . "/tracking/" . $_POST[txtJobNum] . "/" . $sFileAsBuilt;
	//}
	if (!empty($filenameArray)) {
		$content .=	"\r\n\r\nPictures:";

		foreach ($filenameArray as $sName) { 
			$content .= "\r\n" . "http://" . $_SERVER['SERVER_NAME'] . "/tracking/" . $_POST[txtJobNum] . "/" . $sName;
		}
	}

	$content .= "\r\n\r\nTo view this project, please go to http://" . $_SERVER['SERVER_NAME'] . "/tracking/projlist.php?id=" . $_POST[txtJobNum] . " and log in with your " .
				"assigned username and password.\r\n";

	//PRODUCTION 
	$totag = "CEIS/TECHSICO Sales <[email protected]>";

	//DEVELOPMENT
	//$totag = "";

	$fromtag = "From: \"CEIS/TECHSICO PROJECT CREATION\" <[email protected]>\nX-Mailer: PHP/" . phpversion();
	$subjtag = "New Project #" . $_POST[txtJobNum] . " Created";
	mail($totag, $subjtag, $content, "$fromtag\n" . 
		"Cc: $recCEISName[email] \n" . 
		"Bcc: \n" . 
		"X-Mailer: PHP 4.x");

	// RKB 2007-10-25 Log Email
	$dbh->LogEmail($totag, $subjtag, $_POST[txtJobNum]);
}
}

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-2" />
<meta name="author" content="Luka Cvrk (www.solucija.com)" />
<link rel="stylesheet" href="style.css" type="text/css" />
    <script type="text/javascript" src="newsite/login/char.js"></script>
    <SCRIPT LANGUAGE="JavaScript" SRC="/include/javascript_all.js"></SCRIPT>

    <script type="text/javascript">
function user()
{
document.getElementById('username').value="";
}
function pass()
{
document.getElementById('passwd').value="";
}
</script>
<SCRIPT Language="Javascript">
function TryCallFunction() {
var sd = document.MForm.mydate1.value.split("-");
document.MForm.iday.value = sd[1];
document.MForm.imonth.value = sd[0];
document.MForm.iyear.value = sd[2];
}
var styleVar = "td { font-family:Courier; font-size:12 }";

function subChangeCust(f, g) {
if (f.value != 'NOTSELECTED') {
	this.document.frmNewProject.CompanyChanged.value = g;
	this.document.frmNewProject.submit();
}
}
function subSubmitForm() {
f = this.document.frmNewProject;
if (f.txtCEISJobTitle.value == '') {
	alert ("You must enter a job title to create a new job.");
	return 0;
}
    if (isNaN(f.txtJobNum.value) || f.txtJobNum.value == '') {
    	alert ("The CEIS job number must be a number with no spaces.");
	return 0;
  	}
if (isNaN(f.txtStickerNum.value) || f.txtStickerNum.value == '') {
    	alert ("The CEIS Sticker number must be a number with no spaces.");
	return 0;
  	}
f.BeenSubmitted.value = 1;
f.submit();
}
function showdiv(sDiv) {
var obj;
if(document.getElementById) {obj = document.getElementById(sDiv);
}else{obj = document.all[sDiv];}
if (obj.style.display == "") {
	obj.style.display = "none";
}else{
	obj.style.display = "";
}
}
</SCRIPT>
<title>CEIS/TECHSICO</title>
</head>
<body>
<form name="frmNewProject" enctype="multipart/form-data" method="POST" action="<? echo $PHP_SELF ?>">
<input type="hidden" name="BeenSubmitted" value="0">
<input type="hidden" name="CompanyChanged" value="0">
<?
if ($_POST[beenSubmitted]) {
// 2004-10-15 RKB : AFTER CREATING THE RECORD, VIEW SHOULD COME UP
echo "<SCRIPT LANGUAGE=\"JAVASCRIPT\">window.open('projview.php?ProjectNum=$_POST[txtJobNum]', '', \"fullscreen=no,toolbar=yes,status=no,menubar=no,scrollbars=yes,resizable=yes,directories=no,location=no,width=775,height=590,left=10,top=10\");</SCRIPT>";
}
?>
<div id="content">
  <div id="header">
	  

  <div id="logo">    <img src="newsite/images/techsico banner.gif" height="235" width="900" align="middle"  /></div>					
	<div id="tabs">
		<ul>	
			<li><a href="index.php" class="current">Home<br/>
		    </a></li>
              <li><a href="devisions.php">Devisions</a></li>
			<li><a href="products.php">Products</a></li>
	    <li><a href="engproc.php">Engineering</a></li>
			<li><a href="bidrequest.php">Bid Form</a></li>
			<li></li>
                <li></li>
                <li><a href="staff.php" >Staff</a></li>
                <li><a href="contact.php" >Contact Us</a></li>
		</ul>
  <div id="spacer">
			<p></p>
		</div>
	</div>



  <div class="left">
		<div class="left_articles">
		  	<p><table border="0" cellspacing="0" cellpadding="0" width="460">
			<tr><td width="460" valign="top" height="6"></td></tr>
          		<tr>
            		<td width="460" valign="top">
					<font face="Arial" style="font-size:16px" color="#003366"><b>Select Customer</b></font>
				</td>
          		</tr>
          		<tr><td width="460" valign="top" bgcolor="#336699" height="2"></td></tr>
          		<tr><td width="460" valign="top" height="6"></td></tr>
			<tr>
				<td width="460" valign="top" class="formtext"><span style="color:red">*</span> Company Name</td>
			</tr>
			<tr>
				<td width="460" valign="baseline">
					<?
					if ($recUser['accesslvl'] == "admin") {
					?>
						<select name="selCompany" style="width:460px;" onChange="subChangeCust(this, 1);">
							<? echo $dbh->co_box(); ?>
						</select>
					<?
					}
					else {
					?>
						<select name="selCompany" style="width:460px; disabled:true;" disabled>
							<option value="<? echo $recUser['company'] ?>"><? echo $recUser['company'] ?></option>
						</select>
					<?
					}
					?>
				</td>
			</tr>
			<?
			if (isset($_POST[selCompany]) || $recUser['accesslvl'] != "admin") {
			?>
			<tr><td height="6"></td></tr>
			<tr>
				<td width="460" valign="top" class="formtext"><span style="color:red">*</span> Customer/Engineer Name</td>
			</tr>
			<tr>
				<td width="460" valign="baseline">
					<?
					if ($recUser['accesslvl'] == "admin") {
					?>
						<select name="selEngName" style="width:460px;" onChange="subChangeCust(this, 0);">
							<? 
								$cust_options = $dbh->eng_box(false, $_POST[selEngName], true, $_POST[selCompany]);
								echo $cust_options; 
							?>
					<?
					}
					else {
					?>
						<select name="selEngName" style="width:460px; disabled:true;" disabled>
							<option value="<? echo $recUser['username'] ?>"><? echo $recUser['lname'] . ", " . $recUser['fname'] ?></option>
						</select>
					<?
					}
					?>
					</select>
				</td>
			</tr>
			<?
			}
			if ((isset($_POST[selEngName])  && !$_POST[CompanyChanged]) || $recUser['accesslvl'] != "admin")  {
				//RKB 2006-07-29 Get Next Ticket #
				$query = "SELECT jobnum FROM `projects` ORDER BY date_created DESC LIMIT 0,1";
				$result = $dbh->query($query);
				$nextJob = (int) mysql_result($result,0) + 1;
			?>
			<tr><td height="6"></td></tr>
		</table>
		<table border="0" cellpadding="0" cellspacing="0" width="460">
          		<tr>
            		<td width="200" valign="top" nowrap class="formtext">Office Phone #</td>
				<td width="54"></td>
            		<td width="200" valign="top" nowrap class="formtext">Email Address</td>
          		</tr>
          		<tr>
            		<td width="200" valign="baseline">
					<input type="text" name="txtPhone" value="<? echo $recEngineer[phone_office] ?>" style="width:200px" maxlength="40" onFocus="blur();">
            		</td>
				<td width="54"></td>
            		<td width="200" valign="baseline">
					<input type="text" name="txtEmail" value="<? echo $recEngineer[email] ?>" style="width:206px;" maxlength="40" onFocus="blur();">
				</td>
          		</tr>
			<tr><td colspan="3" height="15"></td></tr>
		</table>
		<table border="0" cellpadding="0" cellspacing="0" width="460">
			<tr>
            		<td width="460" valign="top">
					<font face="Arial" style="font-size:16px" color="#003366"><b>Input Project Details</b></font>
				</td>
          		</tr>
			<tr><td width="460" valign="top" bgcolor="#336699" height="2"></td></tr>
			<tr>
				<td width="460" valign="top" class="formtext" style="padding-top:10px">Ticket Number (The system will prefix with project creation date)</td>
			</tr>
			<tr>
				<td width="460" colspan="4" valign="baseline">
					<input type="text" name="txtJobNum" style="width:460px;" maxlength="6" value="<? echo $nextJob ?>">
				</td>
			</tr>
			<tr>
				<td width="460" valign="top" class="formtext" style="padding-top:10px">Work Order Number</td>
			</tr>
			<tr>
				<td width="460" colspan="4" valign="baseline">
					<input type="text" name="txtWO" style="width:460px;" maxlength="30" value="<? echo $_POST[txtWO] ?>">
				</td>
			</tr>
			<tr>
				<td width="460" valign="top" class="formtext" style="padding-top:6px">PO Number</td>
			</tr>
			<tr>
				<td width="460" colspan="4" valign="baseline">
					<input type="text" name="txtPO" style="width:460px;" maxlength="30" value="<? echo $_POST[txtPO] ?>">
				</td>
			</tr>
			<tr>
				<td colspan="3" valign="top" class="formtext" style="padding-top:6px">CEIS Invoice Number</td>
			</tr>
			<tr>
				<td colspan="3" valign="baseline">
					<input type="text" name="txtInvoiceNum" style="width:460px;" value="<? echo $_POST[txtInvoiceNum] ?>">
				</td>
			</tr>
			<tr>
				<td width="460" valign="top" class="formtext" style="padding-top:6px"><span style="color:red">*</span> CEIS Job Title/Desc</td>
			</tr>
			<tr>
				<td width="460" colspan="4" valign="baseline">
					<input type="text" name="txtCEISJobTitle" style="width:460px;" value="<? echo $_POST[txtCEISJobTitle] ?>">
				</td>
			</tr>
			<tr>
				<td width="460" valign="top" class="formtext" style="padding-top:6px">Bid Price</td>
			</tr>
			<tr>
				<td width="460" colspan="4" valign="baseline">
					<input type="text" name="txtBidPrice" style="width:460px;">
				</td>
			</tr>
			<tr>
				<td width="460" valign="top" class="formtext" style="padding-top:6px">
					<table width="460" border="0" cellpadding="0" cellspacing="0">
						<tr><td width="300" class="formtext">City</td>
							<td width="160" class="formtext" align="right">State</td>
						</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td width="460" colspan="4" valign="baseline">
					<table width="460" border="0" cellpadding="0" cellspacing="0">
						<tr>
							<td width="300">
								<input type="text" name="txtCity" style="width:300px;" value="<? echo $_POST[txtCity] ?>">
							</td>
							<td width="160" align="right">
								<select name="selState" style="width:130px;">
									<option value="AK">Alaska</option>
									<option value="AL">Alabama</option>
									<option value="AR">Arkansas</option>
									<option value="AS">American Samoa</option>
									<option value="AZ">Arizona</option>
									<option value="CA">California</option>
									<option value="CO">Colorado</option>
									<option value="CT">Conneticut</option>
									<option value="DC">District of Colombia</option>
									<option value="DE">Delaware</option>
									<option value="FL">Florida</option>
									<option value="FM">Federated States</option>
									<option value="GA">Georgia</option>
									<option value="GU">Guam</option>
									<option value="HI">Hawaii</option>
									<option value="IA">Iowa</option>
									<option value="ID">Idaho</option>
									<option value="IL">Illinois</option>
									<option value="IN">Indiana</option>
									<option value="KS">Kansas</option>
									<option value="KY">Kentucky</option>
									<option value="LA">Louisiana</option>
									<option value="MA">Massachusetts</option>
									<option value="MD">Maryland</option>
									<option value="ME">Maine</option>
									<option value="MI">Michigan</option>
									<option value="MN">Minnesota</option>
									<option value="MO">Missouri</option>
									<option value="MS">Mississippi</option>
									<option value="MT">Montana</option>
									<option value="NC">North Carolina</option>
									<option value="ND">North Dakota</option>
									<option value="NE">Nebraska</option>
									<option value="NH">New Hampshire</option>
									<option value="NJ">New Jersey</option>
									<option value="NM">New Mexico</option>
									<option value="NV">Nevada</option>
									<option value="NY">New York</option>
									<option value="OH">Ohio</option>
									<option value="OK" selected>Oklahoma</option>
									<option value="OR">Oregon</option>
									<option value="PA">Pennsylvania</option>
									<option value="PR">Puerto Rico</option>
									<option value="RI">Rhode Island</option>
									<option value="SC">South Carolina</option>
									<option value="SD">South Dakota</option>
									<option value="TN">Tennessee</option>
									<option value="TX">Texas</option>
									<option value="UT">Utah</option>
									<option value="VI">Virgin Islands</option>
									<option value="VT">Vermont</option>
									<option value="VA">Virginia</option>
									<option value="WA">Washington</option>
									<option value="WI">Wisconsin</option>
									<option value="WV">West Virginia</option>
									<option value="WY">Wyoming</option>
									<option value="XX">Other...</option>
								</select>
							</td>
						</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td width="460" valign="top" class="formtext" style="padding-top:6px">Site ID</td>
			</tr>
			<tr>
				<td width="460" colspan="4" valign="baseline">
					<input type="text" name="txtSiteID" style="width:460px;" value="<? echo $_POST[txtSiteID] ?>">
				</td>
			</tr>
			<tr>
				<td width="460" valign="top" class="formtext" style="padding-top:6px">CEIS Engineer Name</td>
			</tr>
			<tr>
				<?

					if ($recUser['accesslvl'] == "admin") {
						$eng_options = $dbh->eng_box(false, $sCEISName, true, 'CEIS');
					}
					else {

						$eng_options = "<option value=\"NOTSELECTED\">SELECT AN ENGINEER</option>";

						while ($recAllowedEng = mysql_fetch_array($resProjectCreationAccess)) {
							$eng_options .= "<option value=\"$recAllowedEng[username]\">$recAllowedEng[lname], $recAllowedEng[fname]</option>";
						}
					}
				?>
				<td width="460" valign="baseline">
					<select name="selCEISName" style="width:390px;">
						<? 
							echo $eng_options;
						?>
					</select> <a href="#" onClick="javascript:showdiv('more_engineers');">+more</a>
				</td>
			</tr>
			<tr>
				<td style="width:460px">
					<div id="more_engineers" style="display:none">
					<table style="width:460px" cellpadding="0" cellspacing="0">
						<tr>
							<td style="width:460px" valign="baseline">
								<select name="selCEISName2" style="width:390px;">
									<? 
										echo $eng_options;
									?>
								</select>
							</td>
						</tr>
						<tr>
							<td style="width:460px" valign="baseline">
								<select name="selCEISName3" style="width:390px;">
									<? 
										echo $eng_options;
									?>
								</select>
							</td>
						</tr>
						<tr>
							<td style="width:460px" valign="baseline">
								<select name="selCEISName4" style="width:390px;">
									<? 
										echo $eng_options;
									?>
								</select>
							</td>
						</tr>
						<tr>
							<td style="width:460px" valign="baseline">
								<select name="selCEISName5" style="width:390px;">
									<? 
										echo $eng_options;
									?>
								</select>
							</td>
						</tr>
					</table>
					</div>
				</td>
			</tr>
			<tr>
				<td width="460" valign="top" class="formtext" style="padding-top:6px">Division:</td>
			</tr>
			<tr>
				<td width="460" class="baseline">
					<select name="selCEISDivision" style="width:100%;">
						<?
							$ceis_divisions = $dbh->division_box();
							echo $ceis_divisions;
						?>
					</select>
				</td>
			</tr>
		</table>
		<table border="0" cellpadding="0" cellspacing="0" width="460">
			<tr>
            		<td width="200" valign="top" nowrap class="formtext" style="padding-top:6px; padding-right:54px">Job Status</td>
            		<td width="200" valign="top" nowrap class="formtext" style="padding-top:6px">Sticker Number</td>
          		</tr>
          		<tr>
            		<td width="200" valign="baseline" style="padding-right:54px">
					<select name="selJobStatus" style="width:200px">
						<option value="new">NEW</option>
						<option value="assigned">ASSIGNED</option>
					</select>
            		</td>
            		<td width="200" valign="baseline">
					<input type="text" name="txtStickerNum" value="<? if ($_POST[txtStickerNum] == '') echo '0'; else echo $_POST[txtStickerNum]; ?>" style="width:200px" />
				</td>
          		</tr>
			<tr>
				<td colspan="3" valign="top" class="formtext" style="padding-top:6px">Job Details</td>
			</tr>
			<tr>
				<td colspan="3" valign="baseline">
					<textarea name="txtADetails" style="width:460px;" rows="5"><? echo $_POST[txtADetails] ?></textarea>
				</td>
			</tr>
			<tr>
            		<td width="200" valign="top" nowrap class="formtext" style="padding-top:6px; padding-right:54px">Start Date</td>
            		<td width="200" valign="top" nowrap class="formtext" style="padding-top:6px">Projected Completion Date</td>
          		</tr>
          		<tr>
            		<td width="200" valign="baseline" nowrap style="padding-right:54px">
					<input type="text" name="txtStartDate" style="width:175px;" value="<? echo date("Y-m-d"); ?>"><img align="absmiddle" name="mpick1" src="Calendar.gif" border="0" onClick="javascript:show_calendar('frmNewProject.txtStartDate', '', '', 'YYYY-MM-DD', 'INLINE')" onMouseOver="this.style.cursor='hand';">
            		</td>
            		<td width="200" valign="baseline" nowrap>
					<input type="text" name="txtCompleteDate" style="width:176px;" value="<? echo $_POST[txtCompleteDate] ?>"><img align="absmiddle" name="mpick1" src="Calendar.gif" border="0" onClick="javascript:show_calendar('frmNewProject.txtCompleteDate', '', '', 'YYYY-MM-DD', 'INLINE')" onMouseOver="this.style.cursor='hand';"><br>
				</td>
          		</tr>
			<tr>
				<td width="460" valign="top" colspan="3" class="formtext" style="padding-top:6px">Copy of SOW(s)</td>
			</tr>
			<tr>
				<td width="460" valign="top" colspan="3" class="formtext">
					<input name="upFileSOW1" type="file" id="upFileSOW1" style="width:460px;" maxlength="255" value="<? echo $_POST[upFileSOW1] ?>">
				</td>
			</tr>
			<tr>
				<td width="460" valign="top" colspan="3" class="formtext">
					<input name="upFileSOW2" type="file" id="upFileSOW2" style="width:460px;" maxlength="255" value="<? echo $_POST[upFileSOW2] ?>">
				</td>
			</tr>
			<tr>
				<td width="460" valign="top" colspan="3" class="formtext">
					<input name="upFileSOW3" type="file" id="upFileSOW3" style="width:460px;" maxlength="255" value="<? echo $_POST[upFileSOW3] ?>">
				</td>
			</tr>
			<!-- 2004-09-27 RKB: REMOVED AS-BUILTS FROM PROJNEW FORM
			<tr><td colspan="3" height="6"></td></tr>
			<tr>
				<td width="460" valign="top" colspan="3" class="formtext">Copy of AsBuilt</td>
			</tr>
			<tr>
				<td width="460" valign="top" colspan="3" class="formtext">
					<input name="upFileAsBuilt" type="file" id="upFileAsBuilt" style="width:460px;" maxlength="255" value="<? echo $_POST[upFileAsBuilt] ?>">
				</td>
			</tr>
			-->
			<tr>
				<td width="460" valign="top" colspan="3" class="formtext" style="padding-top:6px">Upload Pictures</td>
			</tr>
			<tr><td width="460" valign="top" colspan="3" class="formtext"><input name="upFile1" type="file" id="upFile1" style="width:460px;" maxlength="255"></td></tr>
			<tr><td width="460" valign="top" colspan="3" class="formtext"><input name="upFile2" type="file" id="upFile2" style="width:460px;" maxlength="255"></td></tr>
			<tr><td width="460" valign="top" colspan="3" class="formtext"><input name="upFile3" type="file" id="upFile3" style="width:460px;" maxlength="255"></td></tr>
			<tr><td width="460" valign="top" colspan="3" class="formtext"><input name="upFile4" type="file" id="upFile4" style="width:460px;" maxlength="255"></td></tr>
			<tr><td width="460" valign="top" colspan="3" class="formtext"><input name="upFile5" type="file" id="upFile5" style="width:460px;" maxlength="255"></td></tr>
			<tr><td width="460" valign="top" colspan="3" class="formtext"><input name="upFile6" type="file" id="upFile6" style="width:460px;" maxlength="255"></td></tr>
			<tr><td width="460" valign="top" colspan="3" class="formtext"><input name="upFile7" type="file" id="upFile7" style="width:460px;" maxlength="255"></td></tr>
			<tr><td width="460" valign="top" colspan="3" class="formtext"><input name="upFile8" type="file" id="upFile8" style="width:460px;" maxlength="255"></td></tr>
			<tr><td width="460" valign="top" colspan="3" class="formtext"><input name="upFile9" type="file" id="upFile9" style="width:460px;" maxlength="255"></td></tr>
			<tr><td width="460" valign="top" colspan="3" class="formtext"><input name="upFile10" type="file" id="upFile10" style="width:460px;" maxlength="255"></td></tr>
			<tr><td width="460" valign="top" height="6"></td></tr>
			<tr>
				<td width="460" colspan="4" valign="top" class="formtext">Email addresses for project distro (COMMA-SEPARATED)</td>
			</tr>
			<tr>
				<td width="460" colspan="4" valign="baseline">
					<textarea name="txtA_Emails" style="width:460px;" rows="5"><? echo $_POST[txtA_Emails] ?></textarea>
				</td>
			</tr>
		</table>
		<table border="0" cellpadding="0" cellspacing="0" width="460">
			<tr>
				<td align="right" style="padding-top:6px">
					<input type="reset" value="Clear" class="button" style="width:100px; margin-right:15px">
					<input type="button" value="Submit" onClick="javascript:subSubmitForm();" class="button" style="width:100px">
				</td>
			</tr>
			<?
			}
			?>
		</table>
            </p>
    </div>

		<!--<div class="thirds">
			<div class="smallboxtop"></div>
		  <div class="smallbox">Comments From Users Could Go Here</div>
	  </div>

		<div class="thirds">
			<div class="smallboxtop"></div>
			<div class="smallbox">Here	</div>
		</div>

		<div class="thirds">
			<div class="smallboxtop"></div>
			<div class="smallbox">And Here</div>
	  </div>-->
	</div>	

	<div id="right">
		<div class="boxtop"></div>
		<div class="box">
		  <p>
              <!--<?php if (isset($_SESSION['problem'])) { echo "{$_SESSION['problem']}"; } ?>Login to Job Tracking<form action="newsite/login/authuser.php" method="post" class="formation">
  <input type="text" id="username" name="username" value="User Name" onclick="user()" onkeydown="valid(this,'special');" onblur="valid(this,'special');" />
  <input type="password" id="passwd" name="passwd" value="Password" onclick="pass()" onkeydown="valid(this,'special');" onblur="valid(this,'special');" /><br/>
  <input type="submit" name="submit" value="Log In"/></form></p>
<p><a href="newsite/login/pass.php">Forgot Password?</a></p>-->

<td class="head">Project Tracking Options for <?php echo strtoupper($username) ?></td>
				<td class="head" align="right"><a class="colhead" href="/newsite/logout.php">Logout</a></td>
			</tr>
			<?
			if ($recUser[accesslvl] == "cust") {
			?>
				<tr><td class="formtext" colspan="2"><a href="./projlist.php"><li>View Your Projects</li></a></td></tr>
			<?php
				// Get the project creation access records
				$sQuery = "SELECT `projectcreationaccessid` FROM `projectcreationaccess` WHERE `cust_username` = '$recUser[username]'";
				$res = $dbh->query($sQuery);
				if ($res && mysql_num_rows($res) > 0) {
					?>
						<tr><td class="formtext" colspan="2"><a href="./projnew.php"><li>Create a New Project</li></a></td></tr>
					<?php
				}
			} 
			if ($recUser[accesslvl] == "admin" || $recUser[accesslvl] == "ceis") { 
			?>
				<tr><td class="formtext" colspan="2"><a href="./projlist.php"><li>View/Edit/Update Projects</li></a></td></tr>
				<tr><td class="formtext" colspan="2"><a href="./addressbook/index.php"><li>Address Book</li></a></td></tr>
			<?php
			}
			if ($recUser[accesslvl] == "admin") {
			?>
				<tr><td class="formtext" colspan="2"><a href="./projnew.php"><li>Create a New Project</li></a></td></tr>
				<tr><td class="formtext" colspan="2"><a href="./reports.php"><li>Reports</li></a></td></tr>
			<?php
			}
			?>
		<!--<div class="boxtop"></div>
		<div class="box">
		  <p>News Can Go Here!</p>
	    </div> --></div></div>
<div class="footer">
        
	  <p>©  <a href="mailto:[email protected]">Michael LaPach</a></p>
  </div>
</div>
</body>
</html>

 

Please help

line 513 is:

 

<option value="IN">Indiana</option>

 

can't see any $ here...

 

Although on line 491 you have this code:

 

<input type="text" name="txtCity" style="width:300px;" value="<? echo $_POST[txtCity] ?>">

 

Where you're missing a ;

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.