Location: PHPKode > projects > ERPSOD > erpsod/soddep.php
<?PHP
include_once("config.php");
session_start();
$id=$_SESSION ["stask"];
$task=$id;
$sql="select * from erptask where taskid=$id";
$result = mysql_query($sql);
$num_rows = mysql_num_rows($result);
if ($num_rows <>0){
	$row = mysql_fetch_row($result);
	$taskname= $row[1];
	$taskdesc = $row[2];
} else {
   die('Could not find task');
}
$sql = "select * from erptask,tasksod where tasksod.taskid=$id and tasksod.sodid=erptask.taskid order by taskname"; 
$result = mysql_query($sql);
$size = mysql_num_rows($result);
if ($size == 0){
	$size=1 ;
} else {
	$size=10;
}

$sql= "CREATE TEMPORARY TABLE ERPSOD select erptask.taskid,taskname from erptask,tasksod where tasksod.taskid=$id and tasksod.sodid=erptask.taskid order by taskname"; 
$result = mysql_query($sql);
// $num_rows = mysql_num_rows($result);
if (!$result) {
    die('Problem with this query: ' . $sql);
} 
?>
<HTML>
<HEAD>
<link rel="stylesheet" type="text/css" href="<?PHP echo $style ?>">
<script language="JavaScript1.2" src="js/coolmenus4.js">
</script>
</HEAD>
<body bgcolor="#ffffff">
<script language="JavaScript1.2" src="js/erpsod.js">
</script><br><br>
<FORM ACTION="soddep1.php?form=soddep"  METHOD="POST">
<INPUT TYPE="HIDDEN" NAME="ID" VALUE="<?PHP echo $id ?>">
<INPUT TYPE="HIDDEN" NAME="task" VALUE="<?PHP echo $task ?>">
<center>
<B>Conflicting tasks for :</b>
<?php echo $taskname ?>
<table border=1 cellpadding=0 cellspacing=0 bgcolor="AQUA"><tr><td>
<table border=0 cellpadding=10 cellspacing=0>
<tr>
<td valign="top">
<?PHP echo html_drop_down ($size,"tasklist","erpsod","taskid","taskname","taskid"); ?>
</td>

<td valign="bottom">
<INPUT TYPE="SUBMIT" NAME="command" VALUE="Done" style="width: 80px;"><br>
<INPUT TYPE="SUBMIT" NAME="command" VALUE="Mitigate" style="width: 80px;"><br>
<?php if (role_check("Updater")) { ?>
	<INPUT TYPE="SUBMIT" NAME="command" VALUE="Add" style="width: 80px;"><br>
	<INPUT TYPE="SUBMIT" NAME="command" VALUE="Delete" style="width: 80px;" ONCLICK="return confirm('Delete selected Conflict?')"><br>
<?PHP } ?>
</td>
</tr>
</table>
</td></tr></table>
</center>
</FORM>
</BODY>
<?php
include_once("footer.php");
?>
</HTML>
Return current item: ERPSOD