Your IP : 216.73.216.40


Current Path : /var/www/html/venkat/projectaug2017/
Upload File :
Current File : //var/www/html/venkat/projectaug2017/edit.php

<?php
include("phome.php");
$projectid = $_POST['projectid'];
if($summer == "yes") {
	$avail = $summeravail;
}
if(strlen($avail) == 6){
	$avai2 = substr($avail,0,2);
	$avai3 = substr($avail,2,2);
	$avai1 = substr($avail,4,2);
}
else {
	$avai3 = "nodept";
	$avai2 = substr($avail,0,2);
	$avai1 = substr($avail,2,2);
}

$quer1=mysql_query("select projectid,accepted,coguide,guide,title from projectsubmit where rollno='$r' and projectid = '$projectid'") or die("Invalid Access3 !!!");

if ($row = mysql_fetch_array( $quer1 )) {

	$projectid = $row['projectid'];
	$accepted = $row['accepted'];
	$guide = $row['guide'];
	$coguide = $row['coguide'];
	$title = $row['title'];


	if($accepted == "yes") {
		echo "<br> <center> <font color = 'green'> Your Project is already accepted by your guide. You cannot edit the project details now. </font> </center>";
	}
	else if ($ndate >= $my_t) {
		if($depta == "ec" && $coguide == "No") {
                	$quer12 = mysql_query("SELECT B.name from projectarea B where B.area = '$title' and B.name != '$guide' and B.name in (select A.name from faculty A where A.$avai1 > 0) order by B.name asc") or die ("Invalid Access1 !!!");
		}
		else if($depta == "ec"){
			$quer12=mysql_query("select name from faculty where $avai1 > 0 and dept != '$depta' and name != '$guide' order by name asc") or die("Invalid Access !!!"); 
		}
		else {
		
			$quer12=mysql_query("select name from faculty where $avai1 > 0 and name != '$guide' and (dept = '$avai2' or dept = '$avai3') order by name asc") or die("IInvalid Access !!!"); 
		}
		$i=0;
		echo ("<br> <center><font color='blue'> Edit only the Project Guide </font>  </center> <br> <form name='form1' enctype='multipart/form-data' method='post' action='editstore.php'>");
		echo("<table width='600' border='1' align='center' cellpadding='0' cellspacing='1'> <tr> <td> Choose Your New Guide: </font></td>");
		echo("<td> <select name='faculty' id='faculty' />");
		echo("<option value='#'>-Select-</option>");		
		while ($row = mysql_fetch_array( $quer12 )) {
			$m=$row['name'];
			echo("<option value=$m>$m</option>");
		}
		echo("</select></td> </tr> <tr> <td> <input type = 'hidden' value = '$projectid' name = 'projectid'>  </td> </tr><tr> <td> <input type='submit' value ='submit'> </td> </tr> </table></form>  ");
	
		if($coguide != "No" && $coguuide != "") {
			$quer12=mysql_query("select name from faculty where name != '$coguide' and dept = '$depta'") or die("Invalid Access !!!"); 
	
			$i=0;
			echo ("<br> <center><font color='blue'> Edit only the Project Co-Guide </font>  </center> <br> <form name='form1' enctype='multipart/form-data' method='post' action='coeditstore.php'>");
			echo("<table width='600' border='1' align='center' cellpadding='0' cellspacing='1'> <tr> <td> Choose Your New Co-Guide: </font></td>");
			echo("<td> <select name='faculty' id='faculty' />");
			echo("<option value='#'>-Select-</option>");		
			while ($row = mysql_fetch_array( $quer12 )) {
				$m=$row['name'];
				echo("<option value=$m>$m</option>");
			}
			echo("</select></td> </tr> <tr> <td> <input type = 'hidden' value = '$projectid' name = 'projectid'>  </td> </tr><tr> <td> <input type='submit' value ='submit'> </td> </tr> </table></form>  ");
		}		

	
	}
	else {
		echo "<center> <font color = 'blue'> <br> Date is Over. </font> </center>";
	}
}
else {
	echo "<center> <font color = 'blue'> <br> You have not yet registered your project. </font> </center>";
}