コード例 #1
0
<?php

$generalSubject = new GeneralSubject();
$generalSubjectArray = $generalSubject->allAsArray();
$detailedSubject = new DetailedSubject();
$detailedSubjectArray = $detailedSubject->allAsArray();
echo "<div class='adminRightHeader'>General Subject</div>";
if (count($generalSubjectArray) > 0) {
    ?>
			<table class='linedDataTable'>
				<tr>
				<th style='width:100%;'>Value</th>
				<th style='width:20px;'>&nbsp;</th>
				<th style='width:20px;'>&nbsp;</th>
				</tr>
				<?php 
    foreach ($generalSubjectArray as $instance) {
        echo "<tr>";
        echo "<td>" . $instance['shortName'] . "</td>";
        echo "<td><a href='ajax_forms.php?action=getGeneralSubjectUpdateForm&className=" . "GeneralSubject" . "&updateID=" . $instance[lcfirst("GeneralSubject") . 'ID'] . "&height=128&width=260&modal=true' class='thickbox'><img src='images/edit.gif' alt='edit' title='edit'></a></td>";
        $generalSubject = new GeneralSubject();
        if ($generalSubject->inUse($instance[lcfirst("GeneralSubject") . 'ID']) == 0) {
            echo "<td><a href='javascript:deleteGeneralSubject(\"GeneralSubject\", " . $instance[lcfirst("GeneralSubject") . '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 
コード例 #2
0
ファイル: index.php プロジェクト: jsteverman/resources
	<tr>
	<td class='searchRow'><label for='searchGeneralSubjectID'><b>General Subject</b></label>
	<br />
	<select name='search[generalSubjectID]' id='searchGeneralSubjectID' style='width:150px'>
	<option value=''>All</option>

	<?php 
if ($search['generalSubjectID'] == "none") {
    echo "<option value='none' selected>(none)</option>";
} else {
    echo "<option value='none'>(none)</option>";
}
$display = array();
$generalSubject = new GeneralSubject();
foreach ($generalSubject->allAsArray() as $display) {
    if ($search['generalSubjectID'] == $display['generalSubjectID']) {
        echo "<option value='" . $display['generalSubjectID'] . "' selected>" . $display['shortName'] . "</option>";
    } else {
        echo "<option value='" . $display['generalSubjectID'] . "'>" . $display['shortName'] . "</option>";
    }
}
?>
	</select>
	</td>
	</tr>

	<tr>
	<td class='searchRow'><label for='searchDetailedSubjectID'><b>Detailed Subject</b></label>
	<br />
	<select name='search[detailedSubjectID]' id='searchDetailedSubjectID' style='width:150px'>