<?php function status($value) { $res=mysql_query("SELECT `status_name` FROM `status`"); echo "<select name='status'>"; while($row=mysql_fetch_assoc($res)) { foreach($row as $a) { echo "<option value='".$a."'"; if($value==$a) { echo 'selected'; } echo ">".$a."</option>"; } } echo "</select>"; } function emploe($value) { $res=mysql_query("SELECT `emploe_name` FROM `emploe` WHERE `emploe_role`='user'"); echo "<select name='emploe'>"; while($row=mysql_fetch_assoc($res)) { foreach($row as $a) { echo "<option value='".$a."'"; if($value==$a) { echo 'selected'; } echo ">".$a."</option>"; } } echo "</select>"; } function pre_show_table() { $res=mysql_query("SELECT `project_id`,`project_name`,`date_start`,`date_finish` FROM `projects`"); echo "<table >"; echo "<tr ><td>Project Name</td><td>Date Start</td><td>Date Finish</td><td>Select</td></tr>"; while($row=mysql_fetch_assoc($res)) { echo '<tr> <td>'.$row['project_name'].'</td> <td>'.$row['date_start'].'</td> <td>'.$row['date_finish'].'</td> <td><input type="radio" name="project_select" value="'.$row['project_id'].'"/></td> </tr>'; } echo "</table>"; } function admin_show($id) { echo "<table border='1'>"; echo "<tr > <td>Project Name</td> <td>Date Start</td> <td>Date Finish</td> <td>TZ</td> <td>TZ Status</td> <td>Design</td> <td>Design Status</td> <td>Verstka</td> <td>Verstka Status</td> <td>Proger</td> <td>Proger Status</td> <td>Sdacha</td> </tr>"; $res=mysql_query("SELECT * FROM `projects` WHERE `project_id`='".$id."'"); $row=mysql_fetch_assoc($res); { echo '<tr> <td>'.$row['project_name'].'</td> <td>'.$row['date_start'].'</td> <td>'.$row['date_finish'].'</td> <td>'.emploe($row['TZ']).'</td> <td>'.status($row['TZ_st']).'</td> <td>'.emploe($row['designer']).'</td> <td>'.status($row['designer_st']).'</td> <td>'.emploe($row['verstka']).'</td> <td>'.status($row['verstka_st']).'</td> <td>'.emploe($row['proger']).'</td> <td>'.status($row['proger_st']).'</td> <td>'.status($row['Sdacha']).'</td> </tr>'; } echo "</table>"; } admin_show(6); ?>
The admin_show
function admin_show
not draw in the table, the emploe()
and status()
functions are called. Who can, tell me, please.