當前位置: 首頁>>代碼示例>>PHP>>正文


PHP NavigationBar函數代碼示例

本文整理匯總了PHP中NavigationBar函數的典型用法代碼示例。如果您正苦於以下問題:PHP NavigationBar函數的具體用法?PHP NavigationBar怎麽用?PHP NavigationBar使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了NavigationBar函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: DisplayAdminList

function DisplayAdminList()
{
    $urllist['Administration'] = "admin.php";
    NavigationBar("Admin", $urllist);
    ?>
		<ul>
		<li><a href="adminusers.php">Users</a>
		<li><a href="adminprojects.php">Projects</a>
		<li><a href="adminassessmentforms.php">Assessment Forms</a>
		<li><a href="adminmodules.php">Modules</a>
		<li><a href="adminmodalities.php">Modalities</a>
		<li><a href="adminsites.php">Sites</a>
		<li><a href="reports.php">Reports</a>
		<li><a href="adminqc.php">QC</a>
		<li><a href="importlog.php">Import Logs</a>
		<li><a href="admininstances.php">Instances</a>
		<li><a href="adminaudits.php">Audits</a>
		<li><a href="cleanup.php">Clean-up</a>
		<li><a href="system.php">System info</a>
		<li><a href="stats.php">Usage stats</a>
		<li><a href="longqc.php">Longitudinal QC</a>
		<li><a href="adminemail.php">Mass email</a>
		</ul>
		<?php 
}
開發者ID:pmolfese,項目名稱:nidb,代碼行數:25,代碼來源:admin.php

示例2: DisplayMenu

function DisplayMenu()
{
    $urllist['Administration'] = "adminaudits.php";
    $urllist['Audits'] = "adminaudits.php";
    NavigationBar("Admin", $urllist);
    ?>
		<br><br>
		<?php 
}
開發者ID:pmolfese,項目名稱:nidb,代碼行數:9,代碼來源:adminaudits.php

示例3: DisplayMenu

function DisplayMenu()
{
    $urllist['Administration'] = "importlog.php";
    $urllist['Import Log'] = "importlog.php";
    NavigationBar("Admin", $urllist);
    ?>
		View import <a href="importlog.php?action=viewtransactions">transactions</a><br>
		<!--View <a href="importlog.php?action=viewreceived">received</a><br>
		View <a href="importlog.php?action=viewimported">imported</a><br>-->
		<br><br>
		<?php 
}
開發者ID:pmolfese,項目名稱:nidb,代碼行數:12,代碼來源:importlog.php

示例4: DisplayAbout

function DisplayAbout()
{
    $urllist['Home'] = "index.php";
    $urllist['About'] = "about.php";
    NavigationBar("About", $urllist);
    ?>
		<p><i>Neuroinformatics Database</i> (NiDB) was developed at the Olin Neuropsychiatry Research Center at Hartford Hospital. This system is open source, released under the <a href="http://www.gnu.org/copyleft/gpl.html">GPLv3</a> license.</p>
		
		<p>Visit the NiDB website at <a href="http://nidb.sourceforge.net">http://nidb.sourceforge.net</a></p>
		
		<p>Problems, compliments, or suggestions should be directed to <a href="mailto:gregory.book@hhchealth.org">gregory.book@hhchealth.org</a></p>
		<?php 
}
開發者ID:pmolfese,項目名稱:nidb,代碼行數:13,代碼來源:about.php

示例5: DisplayMenu

	function DisplayMenu() {
		$urllist['Administration'] = "cleanup.php";
		$urllist['Cleanup'] = "cleanup.php";
		NavigationBar("Admin", $urllist);
		
		?>
		View empty <a href="cleanup.php?action=viewemptysubjects">subjects</a><br>
		View empty <a href="cleanup.php?action=viewemptyenrollments">enrollments</a><br>
		<!--View empty <a href="cleanup.php?action=viewemptystudies">studies</a><br>-->
		<!--View empty <a href="cleanup.php?action=viewemptyseries">series</a><br>-->
		<br><br>
		<?
	}
開發者ID:EugeniaRadulescu,項目名稱:nidb,代碼行數:13,代碼來源:cleanup.php

示例6: DisplayEmailForm

function DisplayEmailForm()
{
    $urllist['Administration'] = "cleanup.php";
    $urllist['Cleanup'] = "cleanup.php";
    NavigationBar("Admin", $urllist);
    ?>
		<form action="adminemail.php" method="post" name="theform">
		<input type="hidden" name="action" value="sendemail">
		<input type="text" name="emailsubject" size="60" placeholder="Subject">
		<br><br>
		<textarea name="emailbody" rows="10" cols="60" placeholder="Body"></textarea>
		<br>
		<input type="submit" value="Send email">
		</form>
		<?php 
}
開發者ID:pmolfese,項目名稱:nidb,代碼行數:16,代碼來源:adminemail.php

示例7: DisplayProjectList

function DisplayProjectList()
{
    $urllist['Project List'] = "projects.php";
    NavigationBar("Projects for " . $_SESSION['instancename'], $urllist, 0, '', '', '', '');
    ?>
		View <a href="projects.php?action=viewinstancesummary&id=<?php 
    echo $_SESSION['instanceid'];
    ?>
">instance summary</a>
		<br><br>
		<table class="graydisplaytable" width="100%">
			<thead>
				<tr>
					<th>Name</th>
					<th>UID</th>
					<th>Cost Center</th>
					<th>Admin</th>
					<th>PI</th>
					<th>View report</th>
					<th>Group Protocols</th>
					<th>Studies</th>
				</tr>
			</thead>
			<tbody>
				<?php 
    $sqlstring = "select a.*, b.username 'adminusername', b.user_fullname 'adminfullname', c.username 'piusername', c.user_fullname 'pifullname' from projects a left join users b on a.project_admin = b.user_id left join users c on a.project_pi = c.user_id where a.project_status = 'active' and a.instance_id = " . $_SESSION['instanceid'] . " order by a.project_name";
    //PrintSQL($sqlstring);
    //exit(0);
    $result = mysql_query($sqlstring) or die("Query failed: " . mysql_error() . "<br><i>{$sqlstring}</i><br>");
    while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
        $id = $row['project_id'];
        $name = $row['project_name'];
        $adminusername = $row['adminusername'];
        $adminfullname = $row['adminfullname'];
        $piusername = $row['piusername'];
        $pifullname = $row['pifullname'];
        $projectuid = $row['project_uid'];
        $costcenter = $row['project_costcenter'];
        $sqlstringA = "select * from user_project where user_id in (select user_id from users where username = '" . $GLOBALS['username'] . "') and project_id = {$id}";
        //PrintSQL($sqlstringA);
        $resultA = mysql_query($sqlstringA) or die("Query failed: " . mysql_error() . "<br><i>{$sqlstring}</i><br>");
        $rowA = mysql_fetch_array($resultA, MYSQL_ASSOC);
        $view_data = $rowA['view_data'];
        $view_phi = $rowA['view_phi'];
        if ($view_data) {
            ?>
							<tr valign="top">
								<td><a href="projects.php?action=displayproject&id=<?php 
            echo $id;
            ?>
"><?php 
            echo $name;
            ?>
</td>
								<td><?php 
            echo $projectuid;
            ?>
</td>
								<td><?php 
            echo $costcenter;
            ?>
</td>
								<td><?php 
            echo $adminfullname;
            ?>
</td>
								<td><?php 
            echo $pifullname;
            ?>
</td>
								<td><a href="projectreport.php?action=viewprojectreport&projectid=<?php 
            echo $id;
            ?>
">Report</a></td>
								<td><a href="projects.php?action=viewuniqueseries&id=<?php 
            echo $id;
            ?>
">Edit</a> | <a href="projects.php?action=viewaltseriessummary&id=<?php 
            echo $id;
            ?>
">Summary</a></td>
								<td align="right">
									<table cellpadding="0" cellspacing="0" border="0">
								<?php 
            $sqlstring = "SELECT a.study_modality, b.project_id, count(b.project_id) 'count' FROM `studies` a left join enrollment b on a.enrollment_id = b.enrollment_id left join subjects c on b.subject_id = c.subject_id where b.project_id = {$id} and c.isactive = 1 group by b.project_id,a.study_modality";
            //PrintSQL($sqlstring);
            $result2 = mysql_query($sqlstring) or die("Query failed: " . mysql_error() . "<br><i>{$sqlstring}</i><br>");
            while ($row2 = mysql_fetch_array($result2, MYSQL_ASSOC)) {
                $modality = $row2['study_modality'];
                $count = $row2['count'];
                $projectModalitySize = 0;
                if ($modality != "") {
                    $sqlstring3 = "select sum(series_size) 'modalitysize' from " . strtolower($modality) . "_series where study_id in (SELECT a.study_id FROM `studies` a left join enrollment b on a.enrollment_id = b.enrollment_id left join subjects c on b.subject_id = c.subject_id where b.project_id = {$id} and c.isactive = 1 and a.study_modality = '{$modality}')";
                    //$result3 = mysql_query($sqlstring3) or die("Query failed: " . mysql_error() . "<br><i>$sqlstring3</i><br>");
                    //$row3 = mysql_fetch_array($result3, MYSQL_ASSOC);
                    $projectModalitySize = $row3['modalitysize'];
                }
                if ($modality == "") {
                    $modality = "(blank)";
                }
//.........這裏部分代碼省略.........
開發者ID:pmolfese,項目名稱:nidb,代碼行數:101,代碼來源:projects.php

示例8: DisplaySearchForm

	function DisplaySearchForm($searchvars, $action) {
	
		$urllist['New Search'] = "search.php";
		NavigationBar("Search", $urllist);
		
	?>
	<script type="text/javascript">
	$(function() {
		$(".datepick").datepicker({changeMonth: true, changeYear: true, dateFormat: 'yy-mm-dd', minDate: '-130y', maxDate: '+130y'});
	});
	</script>

	<style>
		.sidelabel {
			font-weight: bold;
			font-size: 12pt;
			border-right: solid 1px #CCC;
			border-bottom: solid 1px #CCC;
			padding-right: 15px;
			padding-left: 10px;
			text-align: right;
		}
		.toplabel {
			color: white;
			font-weight: bold;
			font-size: 14pt;
			padding-top: 5px;
			padding-bottom: 5px;
			text-align: center;
			/*border-top-right-radius: 5px;*/
			background-color: #3B5998;
		}
		.tiny {
			font-size: 8pt;
			color: gray;
		}
		.fieldlabel {
			color: darkblue;
			text-align: right;
			vertical-align: top;
		}
		.importantfield {
			border: 1pt solid darkblue;
			background-color: lightyellow;
		}
		.fakelink {
			background-color: #DDD;
			border-right: solid 2px #777
			/*border-top: 2px solid #999;
			border-left: 2px solid #444;
			border-bottom: 2px solid #444;
			border-radius:3px; */
			padding: 1px 4px;
			font-size:9pt;
			font-weight: normal;
			color: black;
			cursor: pointer;
			-moz-transform: rotate(-90deg);
			-o-transform: rotate(-90deg);
			-webkit-transform: rotate(-90deg);
		}
		.advancedhover:hover {
			max-width: 25px;
			background-color: #DDD;
			color: #000;
			border-right: 1px solid #444;
			cursor: pointer;
			align: center;
			vertical-align: middle;
			/*border-top-left-radius: 5px;
			border-bottom-left-radius: 5px;*/
		}
		.advancedhover {
			max-width: 25px;
			background-color: #EEE;
			color: #AAA;
			border-right: 1px solid #AAA;
			cursor: pointer;
			align: center;
			vertical-align: middle;
			/*border-top-left-radius: 5px;
			border-bottom-left-radius: 5px;*/
		}
	</style>
	<script type="text/javascript">
	<!--
		$(document).ready(function() {
			/* default action */
			$('tr.advanced').hide();
			
			$('#searchtoggle').click(function(){
				$('tr.advanced').toggle();
			});
		});
	-->
	</script>
	<script>
		$(function() {
			$( "#s_studyinstitution" ).autocomplete({
				source: "autocomplete_institution.php",
//.........這裏部分代碼省略.........
開發者ID:EugeniaRadulescu,項目名稱:nidb,代碼行數:101,代碼來源:search.php

示例9: DisplayCommonList

function DisplayCommonList()
{
    $urllist['Common objects'] = "common.php";
    NavigationBar("Common objects", $urllist);
    ?>
		<SCRIPT LANGUAGE="Javascript">
		<!---
			function decision(message, url){
				if(confirm(message)) location.href = url;
			}
		// --->
		</SCRIPT>
		
		<table class="smalldisplaytable">
			<thead>
				<tr>
					<th>Group</th>
					<th>Name</th>
					<th>Description</th>
					<th>Type</th>
					<th>Value</th>
					<th>Size</th>
					<th>Upload <?php 
    echo strtoupper($modality);
    ?>
 file<br><span class="tiny">Click button or Drag & Drop</span></th>
					<th>Delete</th>
				</tr>
			</thead>
			<tbody>
				<form action="common.php" method="post" enctype="multipart/form-data">
				<input type="hidden" name="action" value="addobject">
				<input type="hidden" name="modality" value="<?php 
    echo strtoupper($modality);
    ?>
">
				<input type="hidden" name="id" value="<?php 
    echo $id;
    ?>
">
				<tr>
					<td><input type="text" name="common_group" size="15"></td>
					<td><input type="text" name="common_name"></td>
					<td><input type="text" name="common_desc"></td>
					<td>
						<select name="common_type">
							<option value="file">File</option>
							<option value="text">Text</option>
							<option value="number">Number</option>
						</select>
					</td>
					<td><input type="text" name="common_value"></td>
					<td></td>
					<td>
						<input type="file" name="file">
					</td>
					<td><input type="submit" value="Create"></td>
				</tr>
				</form>
				<?php 
    $sqlstring = "select * from common order by common_group, common_name";
    $result = mysql_query($sqlstring) or die("Query failed: " . mysql_error() . "<br><b>{$sqlstring}</b><br>");
    while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
        $common_id = $row['common_id'];
        $type = $row['common_type'];
        $group = $row['common_group'];
        $name = $row['common_name'];
        $desc = $row['common_desc'];
        $number = $row['common_number'];
        $text = $row['common_text'];
        $file = $row['common_file'];
        $size = $row['common_size'];
        switch ($type) {
            case 'number':
                $value = $number;
                break;
            case 'file':
                $value = $file;
                break;
            case 'text':
                $value = $text;
                break;
        }
        ?>
						<script type="text/javascript">
							$(document).ready(function(){
								$(".edit_inline<?php 
        echo $common_id;
        ?>
").editInPlace({
									url: "common_inlineupdate.php",
									params: "action=editinplace&id=<?php 
        echo $series_id;
        ?>
",
									default_text: "<i style='color:#AAAAAA'>Edit here...</i>",
									bg_over: "white",
									bg_out: "lightyellow",
								});
							});
//.........這裏部分代碼省略.........
開發者ID:pmolfese,項目名稱:nidb,代碼行數:101,代碼來源:common.php

示例10: DisplayGraph

function DisplayGraph()
{
    $urllist['Cluster Stats'] = "cluster.php";
    NavigationBar("Cluster Stats", $urllist);
    list($statsoutput, $report, $queues, $hostnames) = GetClusterStats();
    DisplayStatsMenu();
    $slotsusedcolor = "FF4500";
    $slotsunusedcolor = "EEEEEE";
    ?>

		<table>
			<tr>
				<td valign="top">
					<table border="0">
						<tr>
							<td>Queue</td>
						<?php 
    foreach ($queues as $queue) {
        $slotsused = 0;
        $slotsunused = 0;
        foreach ($hostnames as $hostname) {
            if (isset($report[$hostname]['queues'][$queue])) {
                echo "<pre>";
                //print_r($report[$hostname]['queues'][$queue]['jobs']);
                $slotsused += $report[$hostname]['queues'][$queue]['slotsused'];
                $slotsunused += $report[$hostname]['queues'][$queue]['slotsavailable'];
                echo "</pre>";
            }
        }
        ?>
								<tr>
									<td><b><?php 
        echo $queue;
        ?>
</b> &nbsp;</td>
									<td>
										<img src="horizontalchart.php?b=yes&w=600&h=25&v=<?php 
        echo $slotsused;
        ?>
,<?php 
        echo $slotsunused - $slotsused;
        ?>
&c=<?php 
        echo $slotsusedcolor;
        ?>
,<?php 
        echo $slotsunusedcolor;
        ?>
">
										<?php 
        if ($slotsused == 0 && $slotsunused == 0) {
            echo "Idle";
        } else {
            echo "{$slotsused} of {$slotsunused}";
        }
        ?>
									</td>
								</tr>
								<?php 
    }
    ?>
					</table>
				</td>
				<td valign="top">
				</td>
			</tr>
		</table>
	<?php 
}
開發者ID:pmolfese,項目名稱:nidb,代碼行數:69,代碼來源:cluster.php

示例11: DisplaySubjectForm

	function DisplaySubjectForm($type, $id) {

		/* populate the fields if this is an edit */
		if ($type == "edit") {
			$sqlstring = "select * from subjects where subject_id = $id";
			$result = MySQLQuery($sqlstring, __FILE__, __LINE__);
			$row = mysql_fetch_array($result, MYSQL_ASSOC);
			$name = $row['name'];
			$dob = $row['birthdate'];
			$gender = $row['gender'];
			$ethnicity1 = $row['ethnicity1'];
			$ethnicity2 = $row['ethnicity2'];
			$handedness = $row['handedness'];
			$education = $row['education'];
			$phone1 = $row['phone1'];
			$email = $row['email'];
			$maritalstatus = $row['marital_status'];
			$smokingstatus = $row['smoking_status'];
			$uid = $row['uid'];
			$guid = $row['guid'];
			$cancontact = $row['cancontact'];
			
			list($lastname, $firstname) = explode("^",$name);
		
			/* get privacy information */
			$username = $_SESSION['username'];
			$sqlstring = "select user_id from users where username = '$username'";
			$result = MySQLQuery($sqlstring, __FILE__, __LINE__);
			$row = mysql_fetch_array($result, MYSQL_ASSOC);
			$userid = $row['user_id'];
			
			$sqlstring = "select c.*, d.*  from subjects a left join enrollment b on a.subject_id = b.subject_id left join user_project c on b.project_id = c.project_id left join projects d on d.project_id = c.project_id where a.subject_id = '$id' and c.user_id = $userid and c.view_phi = 1";
			//PrintSQL($sqlstring);
			$result = MySQLQuery($sqlstring, __FILE__, __LINE__);
			if (mysql_num_rows($result) > 0) {
				while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
					$projectname = $row['project_name'];
					$projectcostcenter = $row['project_costcenter'];
					$phiprojectlist[] = "$projectname ($projectcostcenter)";
				}
				$phiaccess = 1;
			}
			else {
				$phiaccess = 0;
			}
			
			$sqlstring = "select c.*, d.*  from subjects a left join enrollment b on a.subject_id = b.subject_id left join user_project c on b.project_id = c.project_id left join projects d on d.project_id = c.project_id where a.subject_id = '$id' and c.user_id = $userid and c.view_data = 1";
			//PrintSQL($sqlstring);
			$result = MySQLQuery($sqlstring, __FILE__, __LINE__);
			if (mysql_num_rows($result) > 0) {
				while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
					$projectname = $row['project_name'];
					$projectcostcenter = $row['project_costcenter'];
					$dataprojectlist[] = "$projectname ($projectcostcenter)";
				}
				$dataaccess = 1;
			}
			else {
				$dataaccess = 0;
			}			
			$formaction = "confirmupdate";
			$formtitle = "Updating &nbsp;<span class='uid'>" . FormatUID($uid) . "</span>";
			$submitbuttonlabel = "Update";
		}
		else {
			$formaction = "confirmadd";
			$formtitle = "Add new subject";
			$submitbuttonlabel = "Add";
			$dob = "1900-01-01";
			$phiaccess = 1;
		}

		$urllist['Subject List'] = "subjects.php";
		$urllist[$uid] = "subjects.php?action=display&id=$id";
		NavigationBar("Subjects", $urllist, 1, $phiaccess, $dataaccess, $phiprojectlist, $dataprojectlist);
		
		/* kick them out if they shouldn't be seeing anything on this page */
		if ((!$phiaccess) && (!$dataaccess)) {
			return;
		}
	?>
		<script type="text/javascript">
			$(document).ready(function() {
				$("#form1").validate();
			});
		</script>
		<div align="center">
		<table class="entrytable">
			<form method="post" id="form1" action="subjects.php">
			<input type="hidden" name="action" value="<?php 
echo $formaction;
?>
">
			<input type="hidden" name="id" value="<?php 
echo $id;
?>
">
			<input type="hidden" name="uid" value="<?php 
echo $uid;
?>
//.........這裏部分代碼省略.........
開發者ID:EugeniaRadulescu,項目名稱:nidb,代碼行數:101,代碼來源:subjects.php

示例12: DisplayGroupList

	function DisplayGroupList() {
	
		$urllist['Groups'] = "groups.php";
		$urllist['Add Group'] = "groups.php?action=addform";
		NavigationBar("Groups", $urllist,0,'','','','');
		
	?>

	<table class="graydisplaytable">
		<thead>
			<tr>
				<th>Name</th>
				<th>Type</th>
				<th>Owner</th>
				<th>Group size</th>
				<th></th>
			</tr>
		</thead>
		<tbody>
			<form action="groups.php" method="post">
			<input type="hidden" name="action" value="add">
			<tr>
				<td style="border-bottom: 2pt solid gray"><input type="text" name="groupname"></td>
				<td style="border-bottom: 2pt solid gray">
					<select name="grouptype">
						<option value="subject">Subject
						<option value="study">Study
						<option value="series">Series
					</select>
				</td>
				<td style="border-bottom: 2pt solid gray"><?php 
echo $GLOBALS['username'];
?>
</td>
				<td style="border-bottom: 2pt solid gray"><input type="submit" value="Create group"></td>
				<td style="border-bottom: 2pt solid gray">Delete group</td>
			</tr>
			</form>
			<?
				$sqlstring = "select a.*, b.username 'ownerusername', b.user_fullname 'ownerfullname' from groups a left join users b on a.group_owner = b.user_id order by a.group_name";
				$result = mysql_query($sqlstring) or die("Query failed: " . mysql_error() . "<br><i>$sqlstring</i><br>");
				while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
					$id = $row['group_id'];
					$name = $row['group_name'];
					$ownerusername = $row['ownerusername'];
					$grouptype = $row['group_type'];
					
					$sqlstring2 = "select count(*) 'count' from group_data where group_id = $id";
					$result2 = mysql_query($sqlstring2) or die("Query failed: " . mysql_error() . "<br><i>$sqlstring2</i><br>");
					$row2 = mysql_fetch_array($result2, MYSQL_ASSOC);
					$count = $row2['count'];
			?>
			<tr style="<?php 
echo $style;
?>
">
				<td><a href="groups.php?action=viewgroup&id=<?php 
echo $id;
?>
"><?php 
echo $name;
?>
</a></td>
				<td><?php 
echo $grouptype;
?>
</td>
				<td><?php 
echo $ownerusername;
?>
</td>
				<td><?php 
echo $count;
?>
</td>
				<td align="right">
					<? if ($ownerusername == $GLOBALS['username']) { ?>
					<a href="groups.php?action=delete&id=<?php 
echo $id;
?>
" style="color:red">X</a>
					<? } ?>
				</td>
			</tr>
			<? 
				}
			?>
		</tbody>
	</table>
	<?
	}
開發者ID:EugeniaRadulescu,項目名稱:nidb,代碼行數:91,代碼來源:groups.php

示例13: htmlspecialchars

        echo htmlspecialchars($session);
        ?>
">
    Do you really want to delete the category?
    <input type="submit" name="submit" value="Delete">
</form>
<?php 
    }
}
/*
 * ########################################################################################
 * Edit a category
 * ########################################################################################
 */
if ('category-edit' == $action) {
    NavigationBar($action);
    print "<h3>Edit Category</h3>";
    if (isset($_POST['submit'])) {
        if (empty($_POST['category-name'])) {
            print "The category name can't be empty";
        } else {
            $categoryName = addslashes(fix_umlauts($_POST['category-name']));
            $result = mysql_query(<<<SQL
SELECT
    COUNT(categoryid)
FROM
    {$pref}category
WHERE
    categoryname = '{$categoryName}'
SQL
);
開發者ID:adrianbroher,項目名稱:thwboard,代碼行數:31,代碼來源:boards.php

示例14: PrintForm

	function PrintForm($experimentid) {
	
		$sqlstring = "select * from assessments where experiment_id = $experimentid";
		$result = mysql_query($sqlstring) or die("Query failed [" . __FILE__ . "(line " . __LINE__ . ")]: " . mysql_error() . "<br><i>$sqlstring</i><br>");
		$row = mysql_fetch_array($result, MYSQL_ASSOC);
		$enrollmentid = $row['enrollment_id'];
		$formid = $row['form_id'];
		$experimentor = $row['experimentor'];
		$exp_admindate = $row['exp_admindate'];
		$iscomplete = $row['iscomplete'];
		$lastupdate = date("M n, Y g:i a",strtotime($row['lastupdate']));

		$sqlstring = "select * from assessment_forms where form_id = $formid";
		$result = mysql_query($sqlstring) or die("Query failed [" . __FILE__ . "(line " . __LINE__ . ")]: " . mysql_error() . "<br><i>$sqlstring</i><br>");
		$row = mysql_fetch_array($result, MYSQL_ASSOC);
		$title = $row['form_title'];
		$desc = $row['form_desc'];
		
		$sqlstring = "select a.* from subjects a left join enrollment b on a.subject_id = b.subject_id where b.enrollment_id = $enrollmentid";
		$result = mysql_query($sqlstring) or die("Query failed [" . __FILE__ . "(line " . __LINE__ . ")]: " . mysql_error() . "<br><i>$sqlstring</i><br>");
		$row = mysql_fetch_array($result, MYSQL_ASSOC);
		$uid = $row['uid'];
		$id = $row['subject_id'];
		
		$urllist['Subject List'] = "subjects.php";
		$urllist[$uid] = "subjects.php?action=display&id=$id";
		NavigationBar("Subjects", $urllist);
		
		if ($viewtype == "view") {
			$readonly = "readonly";
		}
		if ($viewtype == "print") $print = 1; else $print = 0;
		
		if ($iscomplete) {
			$formstatusclass = "completeform";
			$formstatus = "Complete";
		}
		else {
			$formstatusclass = "incompleteform";
			$formstatus = "Incomplete";
		}
		
	?>
		<div align="center">
		<br><br>
		<table>
			<tr>
				<td align="right" style="font-weight: bold; font-size: 11pt; color: #444444">Experimentor</td>
				<td><?php 
echo $experimentor;
?>
</td>
			</tr>
			<tr>
				<td align="right" style="font-weight: bold; font-size: 11pt; color: #444444">Experiment date</td>
				<td><?php 
echo $exp_admindate;
?>
</td>
			</tr>
		</table>
		<br><br>
		
		<table class="formentrytable">
			<tr>
				<td class="title" colspan="3"><?php 
echo $title;
?>
</td>
				<td rowspan="2"><div class="<?php 
echo $formstatusclass;
?>
"><?php 
echo $formstatus;
?>
<br><span style="font-size:8pt; font-weight: normal"><?php 
echo $lastupdate;
?>
</span></div></td>
			</tr>
			<tr>
				<td class="desc" colspan="3"><?php 
echo $desc;
?>
</td>
			</tr>
			<tr>
				<td colspan="3">&nbsp;</td>
			</tr>
			<?
				/* display all other rows, sorted by order */
				$sqlstring = "SELECT a.*, b.value_text, b.value_number, b.value_string, b.value_binary, b.value_date, b.update_username FROM assessment_formfields a left outer join assessment_data b on a.formfield_id = b.formfield_id where a.form_id = $formid and (b.experiment_id = $experimentid or b.experiment_id is NULL) order by a.formfield_order + 0";
				//echo $sqlstring;
				$result = mysql_query($sqlstring) or die("Query failed [" . __FILE__ . "(line " . __LINE__ . ")]: " . mysql_error() . "<br><i>$sqlstring</i><br>");
				while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
					//print_r($row);
					$formfield_id = $row['formfield_id'];
					$formfield_desc = $row['formfield_desc'];
					$formfield_values = $row['formfield_values'];
					$formfield_datatype = $row['formfield_datatype'];
//.........這裏部分代碼省略.........
開發者ID:EugeniaRadulescu,項目名稱:nidb,代碼行數:101,代碼來源:assessments.php

示例15: DisplayModalityList

	function DisplayModalityList() {
	
		$urllist['Administration'] = "admin.php";
		$urllist['Modalities'] = "adminmodalities.php";
		NavigationBar("Admin", $urllist);
		
	?>

	<table class="graydisplaytable">
		<thead>
			<tr>
				<th>Name<br><span class="tiny">View table schema</span></th>
				<th>Protocol groups</th>
				<th>Description</th>
				<th>Rows</th>
				<th>Table size<br><span class="tiny">(data + index)</span></th>
				<th>Enable/Disable</th>
			</tr>
		</thead>
		<tbody>
			<?
				$sqlstring = "select * from modalities order by mod_code";
				$result = MySQLQuery($sqlstring,__FILE__,__LINE__);
				while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
					$id = $row['mod_id'];
					$name = $row['mod_code'];
					$desc = $row['mod_desc'];
					$enabled = $row['mod_enabled'];
					
					/* calculate the status color */
					if (!$enabled) { $color = "gray"; }
					else { $color = "black"; }
					
					/* get information about the modality table */
					$sqlstringA = "show table status like '" . strtolower($name) . "_series'";
					$resultA = MySQLQuery($sqlstringA,__FILE__,__LINE__);
					$rowA = mysql_fetch_array($resultA, MYSQL_ASSOC);
					$rows = $rowA['Rows'];
					$tablesize = $rowA['Data_length'];
					$indexsize = $rowA['Index_length'];

					/* get info about the modality protocol group */
					//$sqlstringB = "select count(*) 'count' from modality_protocolgroup where modality = '$name'";
					//$resultB = mysql_query($sqlstringB) or die("Query failed: " . mysql_error() . "<br><i>$sqlstringB</i><br>");
					//$rowB = mysql_fetch_array($resultB, MYSQL_ASSOC);
					//$grouprowcount = $rowB['count'];
					
					?>
					<tr style="color: <?php 
echo $color;
?>
">
						<td><a href="adminmodalities.php?action=edit&id=<?php 
echo $id;
?>
"><?php 
echo $name;
?>
</a></td>
						<td><a href="adminmodalities.php?action=editprotocolgroups&id=<?php 
echo $id;
?>
">View</a></td>
						<td><?php 
echo $desc;
?>
</td>
						<td align="right"><?php 
echo number_format($rows, 0);
?>
</td>
						<td align="right"><?php 
echo number_format($tablesize + $indexsize);
?>
</td>
						<td>
							<?
								if ($enabled) {
									?><a href="adminmodalities.php?action=disable&id=<?php 
echo $id;
?>
"><img src="images/checkedbox16.png"></a><?
								}
								else {
									?><a href="adminmodalities.php?action=enable&id=<?php 
echo $id;
?>
"><img src="images/uncheckedbox16.png"></a><?
								}
							?>
						</td>
					</tr>
					<? 
				}
			?>
		</tbody>
	</table>
	<?
	}
開發者ID:EugeniaRadulescu,項目名稱:nidb,代碼行數:99,代碼來源:adminmodalities.php


注:本文中的NavigationBar函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。