<table class='linedDataTable'> <tr> <th style='width:100%;'><?php echo _("Value"); ?> </th> <th style='width:20px;'> </th> <th style='width:20px;'> </th> </tr> <?php foreach ($detailedSubjectArray as $instance) { echo "<tr>"; echo "<td>" . $instance['shortName'] . "</td>"; echo "<td><a href='ajax_forms.php?action=getDetailSubjectUpdateForm&className=" . "DetailedSubject" . "&updateID=" . $instance[lcfirst("DetailedSubject") . 'ID'] . "&height=128&width=260&modal=true' class='thickbox'><img src='images/edit.gif' alt='" . _("edit") . "' title='" . _("edit") . "'></a></td>"; $detailedSubject = new DetailedSubject(); if ($detailedSubject->inUse($instance[lcfirst("DetailedSubject") . 'ID'], -1) == 0) { echo "<td><a href='javascript:deleteDetailedSubject(\"DetailedSubject\", " . $instance[lcfirst("DetailedSubject") . 'ID'] . ");'><img src='images/cross.gif' alt='" . _("remove") . "' title='" . _("remove") . "'></a></td>"; } else { echo "<td><img src='images/do_not_enter.png' alt='" . _("subject in use") . "' title='" . _("subject in use") . "' /></td>"; } echo "</tr>"; } ?> </table> <?php } else { echo _("(none found)") . "<br />"; } echo "<a href='ajax_forms.php?action=getDetailSubjectUpdateForm&className=" . "DetailedSubject" . "&updateID=&height=145&width=260&modal=true' class='thickbox'>" . _("add new ") . strtolower(preg_replace("/[A-Z]/", " \\0", lcfirst("DetailedSubject"))) . "</a>"; ?>
<select class='changeSelect detailedSubjectID' style='width:145px;'> <option value='<?php echo $dsSubject->detailedSubjectID; ?> '><?php echo $dsSubject->shortName; ?> </option> </select> </td> <td style='vertical-align:top;text-align:left;width:40px;'> <?php // Check to see if detail subject is in use. If not allow removal. $subjectObj = new DetailedSubject(); if ($subjectObj->inUse($dsSubject->detailedSubjectID, $generalSubject->generalSubjectID) == 0) { ?> <a href='javascript:void();'><img src='images/cross.gif' alt="<?php echo _("remove detailed subject"); ?> " title="<?php echo _("remove detailed subject"); ?> " class='remove' /></a> <?php } else { ?> <img src='images/do_not_enter.png' alt="<?php echo _("subject in use"); ?> " title="<?php