Your IP : 216.73.216.40


Current Path : /var/www/html/venkat/projectjan2016/project1/
Upload File :
Current File : /var/www/html/venkat/projectjan2016/project1/pchoose.php

<script langauge="JavaScript">
function validateForm()
{

var x2=document.getElementById("projecttype");
if(x2.value=='#')
{
alert("please fill all details");  
}

if(typeof document.getElementById("faculty") == "undefined")
{
alert(faculty);  
}
}
</script>



<?php

//include("phome.php");
include("create.php");

?>
<!--
<table width="600" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<form name="form1" enctype="multipart/form-data" method="post" action="pchoose.php">
<td>
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF">
<tr>
<td colspan="3"><strong>Choose your option</strong></td>
</tr>
!-->
<?php
/*
include("size.php");
*/
?>

<!--
<tr>
<td width="100"> </td>
<td width="16"></td>
<td align="right" width="25"><input type="submit" value="Submit " /></td>
</tr>
</form>

</table>
</td>

</tr>
</table>

-->

<form name="form1" enctype="multipart/form-data" method="post" action="projectstore.php">

<table width="600" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr>

<td>
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF">
<tr>
<td colspan="1"><strong>Choose your Guide from the available faculties slot </strong></td>

<?php

if(!isset($_POST['size'])){
	header("location:create.php");
}
$size = addslashes($_POST['size']);

if(isset($_POST['area1'])){
	$area = addslashes($_POST['area1']);
}

if(strlen($avail) == 6){
	$avai1 = substr($avail, 0, 2);
	$avai2 = substr($avail, 2, 2);
	$avai3 = substr($avail, 4, 2);
	$quer2 = mysql_query("select * from faculty where $avai3 > 0 and (dept = '$avai1' or dept = '$avai2') order by name asc") or die("Invalid Access1 !!!");
}
else {
	$avai1 = substr($avail, 0, 2);
	$avai2 = substr($avail, 2, 2);
	if($depta == "ec" && $area != "other_area") {
		$quer2 = mysql_query("SELECT B.name from projectarea B where B.area = '$area' and EXISTS (select A.name from faculty A where A.$avai2 > 0) order by B.name asc") or die ("Invalid Access !!!");
	}
	else if($area == "other_area") {
		$quer2=mysql_query("select * from faculty where $avai2 > 0 and dept <>'$depta' order by name asc") or die("Invalid Access2 !!!");
	}
	else {
	$quer2=mysql_query("select * from faculty where $avai2 > 0 order by name asc") or die("Invalid Access1 !!!");
	}
}
echo(" <td> </td> <td> <select name='faculty' id='faculty' />");
echo("<option value='#'>-Select-</option>");		
while ($row = mysql_fetch_array( $quer2 )) {
	$m=$row['name'];
	echo("<option value=$m>$m</option>");
}
echo("</select></tr>");


?>

</tr>
<tr> <td> </td> </tr>

<tr>
<td colspan="1"><strong>Enter your Project Area/Title  </strong></td>
</td> <td> </td><td>
<?php
if($dept == "ec" && $area != "other_area") {
	?><input type ="text" name="title" cols="30" rows="2" value = "<?php echo($area); ?>" readonly >
	<?php
}
else if($area == "other_area"){
	?><textarea name="title"cols="30"rows="2"></textarea>
	<?php
}
else {
	?><textarea name="title"cols="30"rows="2"></textarea>
	<?php
}
echo ("</td></tr>");
if($area == "other_area") {
	?>
	<tr> <td> </td> </tr>
	<tr>
	<td colspan="1"><strong>Choose the Co-Guide from the List </strong></td>
	</td> <td>
	<?php
	$quer2=mysql_query("select * from faculty where dept ='$depta'") or die("Invalid Access1 !!!");
	echo(" <td> <select name='coguide' id='coguide' />");
	echo("<option value='#'>-Select-</option>");		
	while ($row = mysql_fetch_array( $quer2 )) {
		$m=$row['name'];
		echo("<option value=$m>$m</option>");
	}
	echo("</select></tr>");
}
else {
	echo("<input type='hidden' name='coguide' value='No'>");
}

?>
</td>
</tr>
</table>
</td>
</tr>
</table>

<table width="600" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr>

<td>
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF">

<?php
if($sem == 8) {
	?>
	<tr>
	<td width="100"> Project Type</td>
	<td width="16">:</td>
	<td width="100">
	<input type="radio" name="ptype" value="IN">In-house &nbsp;&nbsp;&nbsp; </input>
	<input type="radio" name="ptype" value="OUT">Out-side&nbsp;&nbsp;&nbsp; </input>
	</tr>
	<tr>
	<td width="100"> Enter the External Guide Name(if available) </td>
	<td width="16">:</td>
	<td> <input type="text" name="eguide"></td>
	</tr>
	<tr>
	<td> Enter the External Guide e-mail id(if available) </td>
	<td width="16">:</td>
	<td> <input type="text" name="email"></td>
	<input type="hidden" name="size" value="<?php echo($size);?>">
	</tr> <?php
}
else if($sem == 3) {
	 ?> <input type="hidden" name="size" value="<?php echo($size);?>"> <?php
}
else {
	?>
	<tr>
	<td colspan="3"><strong>Enter your partner(s) details (Pls. provide the right information)</strong></td>
	</tr>
	<?php
	$size = addslashes($_POST['size']);
	for ($i = 1; $i <= $size-1; $i++) {
		$nv="name".$i;
		$nuv="number".$i;
		$div1="division".$i;
		?>
		<tr> 
		<td width="100"> RollNo. of person <?php echo($i+1);?></td>
		<td width="16">:</td>
		<td width="100"><input type="text" name="<?php echo($nuv);?>"  ></td>
		<input type="hidden" name="size" value="<?php echo($size);?>">
		</tr>
		<?php
	}
} ?>

<td width="1"> </td>
<td width="16"></td>
<td width="1"><font color="red">Enter all details and
<input type="submit" value="Submit " onmouseover="validateForm()" /></td>
</tr>


</table>
</td>

</tr>
</table>

</form>
<center>

<font color="red"> Your information is not required. It will be automatically considered. </font><br><br>
<Center>