$sortDir = $_REQUEST["sortDir"]; } else { $sortDir = "ASC"; } $db = login(); $selfUrl = "https://" . $_SERVER["HTTP_HOST"] . $_SERVER["PHP_SELF"]; $msg = ""; writeHeader("Building session- build new session", "secure", $msg); wizardHeader(2); //echo "<p><font size=+1><a href=\"selectExistingSession.php?table=sessions&returnURL=".urlencode($selfUrl)."&returnIdName=sessionId\">Select existing session</a>\n"; //echo " or add a new session:\n</font></p>"; $idStr = '<a href="buildSession3.php?studyId=' . $studyId . '&sessionId=<ID>"><ID></a>'; $sortbyStr = '<a href="' . selfURL() . '?table=' . $table . '&studyId=' . $studyId . '&sortDir=<DIR2>&sortBy=<ID>"><ID><DIR></a>'; if ($sortBy == "") { // Default sort $sortBy = 'id'; } $displaySummary = 1; echo "<p><font size=+1><b>Select from the following existing sessions:</b></font></p>"; //tableText = displayTable($db, $table, $idStr, "WHERE primaryStudyID=".$studyId, 0, $displaySummary, "", $studyId, $subjectId, $sessionId, "", "", "", ""); $tableText = displayTable($db, $table, $idStr, "WHERE primaryStudyID=" . $studyId, 0, $displaySummary, "", $studyId, 0, $sessionId, $sortbyStr, $sortBy, $sortDir, ""); if ($tableText != "") { echo $tableText; } else { echo "<p class=error>No entries found for studyid=" . $studyId . ".</p>\n"; echo "<p><a href=buildSession2.php?studyId=" . $studyId . ">Back to previous page</a></p>\n"; } //echo "<p><a href=\"editTable.php?table=studies&returnURL=".urlencode($selfUrl); //echo "&returnIdName=studyId\">Select a study...</a>\n"; //echo "(Create a new one or select an existing study by clicking the id).</p>\n"; writeFooter('basic');
function getViewDetailsForTeacher($userID) { $s = ''; $sdata = ''; $academyID = getTeacherAcademie($userID); $school = getTeacherOneSchool($userID); $schoolType = $school->type; $schoolID = $school->ID; $schoolX = $school->X; $schoolY = $school->Y; $schools = getNearbySchools($academyID, $schoolType, $schoolX, $schoolY); $data = array(); foreach ($schools as $id => $school) { $row = array(); $row[] = getSchoolShortName($school->name); $row[] = $school->name; $row[] = $school->city; $row[] = $school->distance; $data[] = $row; } $sdata = displayTable($data); $s .= "academyID = {$academyID}<br>"; $s .= "schoolID = {$schoolID}<br>"; $s .= "schoolType = {$schoolType}<br>"; $s .= "schoolX = {$schoolX}<br>"; $s .= "schoolY = {$schoolY}<br>"; $s .= "===========================<br>"; if ($academyID != -1) { if ($schoolType == "Lycée") { $s .= "Voir la participation de tous les " . linkAction("viewParticipLycees", "lycees", "&academie=" . $academyID) . " de votre académie"; } else { if ($schoolType == "Collège") { $s .= "Voir la participation de tous les " . linkAction("viewParticipColleges", "colleges", "&academie=" . $academyID) . " de votre académie"; } else { $s .= "Voir la participation des établissements de votre académie : " . linkAction("viewParticipColleges", "colleges", "&academie=" . $academyID) . " " . linkAction("viewParticipLycees", "lycees", "&academie=" . $academyID); } } } else { $s .= "Academie not deduced from email."; } $s .= "<br>Etblissements non participants les plus proches : <br> "; $s .= $sdata; return $s; }
$sortBy = $_REQUEST["sortBy"]; } else { $sortBy = ""; } if (isset($_REQUEST["sortDir"])) { $sortDir = $_REQUEST["sortDir"]; } else { $sortDir = "ASC"; } $selfUrl = "https://" . $_SERVER["HTTP_HOST"] . $_SERVER["PHP_SELF"]; $msg = ""; writeHeader("Building session- select study", "secure", $msg); wizardHeader(1); echo "<p><font size=+1><a href=\"buildNewStudy.php?table=studies&returnURL=" . urlencode($selfUrl) . "&returnIdName=studyId\">Add new study</a>\n"; echo " or select an existing study:\n</font></p>"; $table = 'studies'; $idStr = '<a href="buildSession2.php?studyId=<ID>"><ID></a>'; $sortbyStr = '<a href="' . selfURL() . '?sortDir=<DIR2>&sortBy=<ID>"><ID2><DIR></a>'; if ($sortBy == "") { // Default sort $sortBy = 'id'; } $displaySummary = 1; $tableText = displayTable($db, $table, $idStr, "", 0, $displaySummary, "", $studyId, $subjectId, $sessionId, $sortbyStr, $sortBy, $sortDir, "builder"); if ($tableText != "") { echo $tableText; } else { echo "<p class=error>No entries found.</p>\n"; } echo "<p><font size=+1><a href=index.php>Back to home page</font></a></p>\n"; writeFooter('basic');
//echo $table; //init_session(); //echo $table; //if(!isset($table) || $table==""){ $db = login(); //echo $table; if (isset($_REQUEST["table"]) && $_REQUEST["table"] != "") { $table = $_REQUEST["table"]; } else { trigger_error("'table' is not specified."); exit; } $msg = "Connected as user " . $_SESSION['username']; writeHeader("Display {$table}", "secure", $msg); echo "<h1>Display table '{$table}':</h1>\n"; $selfURL = "https://" . $_SERVER["HTTP_HOST"] . $_SERVER["PHP_SELF"]; ?> <hr> <h1>Existing entries in table '<?php echo $table; ?> ':</h1> <? $tableText = displayTable($db, $table); if($tableText!=""){ echo $tableText; } else { echo "<p class=error>No entries found.</p>\n"; } writeFooter('basic'); ?>
</div> <!-- end workout details row --> <div class="row"> <!-- add button row --> <!-- Trigger the modal with a button --> <p>Select a workout from the table below, or enter a new workout.</p> <button type="button" class="btn btn-info btn-lg" data-toggle="modal" data-target="#addModal">Add Workout</button> </div><!-- end add button row --> </div><!--end container --> <div class="container"> <!-- contain the columns --> <div class="container"> <div class="row"> <div class="col-md-12" id="list_container"> <?php //include("response.php"); displayTable($records); //could eventually move this to AJAX on page load //displayUserActivityTable($users); //writeTable(); ?> </div> <!--end table column --> <div class="col-md-4"> <div class="container" id="workout_details"> <!--<h4>Workout Details</h4> --> <div class="container" id="recordInfo_container"> <p></p> </div> </div>
border-collapse: collapse; } table tr td { border: 1px solid black; padding: 5px; } td:first-child { background-color: orange; font-weight: bold; width: 110px; } td:last-child { text-align: right; width: 100px; } </style> </head> <body> <?php displayTable($names[0], $phoneNumbers[0], $ages[0], $addresses[0]); ?> <br/> <?php displayTable($names[1], $phoneNumbers[1], $ages[1], $addresses[1]); ?> </body> </html>
</li> <li class="pure-menu-item"> <form class="pure-form" action="clientApps.php" method="post"> <button type="submit" class="pure-button pure-button-primary" name="seeWerks">Display Work Order History</button> </form> </li> <li class="pure-menu-item"> <a class="pure-button pure-button-primary" href="Logout.php">Logout</a> </li> </ul> </div> <?php if (isset($_POST["seeDocs"])) { displayTable($showVids); } if (isset($_POST["seeWerks"])) { displayWerks($showWerks); } $finalDB->close(); ?> </div> <!-- <footer class="blog-footer site-footer" > <p>Spanish-Services Management System</p> <p>
<option value="10">10x10</option> </select> <br/> Select a Letter to Omit: <select name="letterToOmit"> <?php for ($i = 65; $i <= 89; $i++) { echo "<option value=" . chr($i) . ">" . chr($i) . " </option>"; } ?> <option value="Z" selected>Z</option> </select> <br/> <input type="submit" value="Create Table" name="submitForm" /> </form> <h2 id="feedback"></h2> <h2 id="time" ></h2> <?php echo displayTable(); ?> </div> </div> </body> </html>
return $cornerString; } function getCornerLine($tableValues, $corner, $cornerLine) { if ($cornerLine == 0) { return substr($tableValues, $corner * 3 + 9 * $cornerLine, 3); } if ($cornerLine == 1) { return substr($tableValues, $corner * 3 + 9 * $cornerLine, 3); } if ($cornerLine == 2) { return substr($tableValues, $corner * 3 + 9 * $cornerLine, 3); } } $tableValues = initializeTable($tableValues); echo displayTable($tableValues); if (getDeadIndex($cornerString = "1", $index = 0) !== 1) { echo getDeadIndex($cornerString = "1", $index = 0) . "--13<BR>"; } if (sizeof(removeExisting($cornerString = "000000076")) == 7) { echo sizeof(removeExisting($cornerString = "000000076")); echo "--14<BR>"; } if (sizeof(getPosibleValues($tableValues, 0, 0)) != 6) { print_r(getPosibleValues($tableValues, 0, 0)); echo "--15<BR>"; } if (sizeof(getPosibleValues($tableValues, $x = 0, $y = 0)) != 6) { print_r(getPosibleValues($tableValues, $x = 0, $y = 0)); echo "--16<BR>"; }
<legend>See Employee's Current Workload:</legend> <form class="pure-form" action="Appointments.php" method="post"> <input size="16" type="text" name="empWorkName">Employee<br> <button type="submit" class="pure-button pure-button-primary" name="empWork">Submit Name</button> </form> </fieldset> </li> </ul> </div> <?php if (isset($_POST['seeEmps'])) { displayEmps($showEmps); } if (isset($_POST['seeProj'])) { displayTable($showProjects); } if (isset($_POST['empWorkName'])) { displayWorkLoad($empWorker); } ?> </div> <footer class="blog-footer site-footer" > <p>Spanish-Services Management System</p> <p> <a href="#">Back to top</a> </p> </footer>
echo $sessionName; ?> (<?php echo $sessionCode; ?> )</h1> <a href="<?php echo $addScanUrl; ?> ">Add a scan...</a> <h2><?php echo $numScans; ?> scans in session <?php echo $sessionName; ?> :</h2> <? // *** Add a link that allows you to add data to the scan. $idStr = "<a href=\"editTable.php?table=scans&d[scans][scanCode]=$newScanCode" ."&returnURL=".urlencode($selfUrl."?sessionId=$sessionId") ."&defaultDataId=<ID>\">clone</a> <a href=\"addScanData.php?" ."sessionId=$sessionId&scanId=<ID>&examNumber=".$session['examNumber'] ."&scanner=".urlencode($session['scanner'])."\">data</a> <a href=\"editTable.php?table=scans&updateId=<ID>" ."&returnURL=".urlencode($selfUrl."?sessionId=$sessionId") ."\">edit</a>"; echo displayTable($db, "scans", $idStr, "WHERE sessionID=".$sessionId, 1); writeFooter('basic'); ?>
?> </div> </div> <div style="display: none;"> <div id="data_table_4" class="data_table_opengov"> <?php displayTable("https://www.data.gov/media/2013/11/opendatasites1.csv", true); ?> </div> </div> <div style="display: none;"> <div id="data_table_5" class="data_table_opengov"> <?php displayTable("https://www.data.gov/media/2013/11/opendatasites1.csv", true); ?> </div> </div> <?php // Function that converts csv to html function displayTable($filename, $header = false) { $handle = fopen($filename, "r"); echo '<table>'; //Header if ($header) { $csvcontents = fgetcsv($handle); echo '<tr>'; foreach ($csvcontents as $headercolumn) {
$table = 'scans'; $tableText = displayRecord($db, $table, "WHERE id=" . $scanId); if ($tableText != "") { echo $tableText; } else { echo "<p class=error>Entry not found.</p>\n"; } echo '<p><a href="' . selfURL() . '?sessionId=' . $sessionId . '">Back to scan list</a>' . "</p>\n"; } else { if ($sessionId > 0) { $table = 'scans'; $idStr = '<a href="' . selfURL() . '?sessionId=' . $sessionId . '&scanId=<ID>"><ID></a>'; $tableText = displayTable($db, $table, $idStr, "WHERE sessionID=" . $sessionId); if ($tableText != "") { echo $tableText; } else { echo "<p class=error>No entries found.</p>\n"; } echo '<p><a href="' . selfURL() . '">Select new session</a>' . "</p>\n"; } else { $table = 'sessions'; $idStr = '<a href="' . selfURL() . '?sessionId=<ID>"><ID></a>'; $tableText = displayTable($db, $table, $idStr); if ($tableText != "") { echo $tableText; } else { echo "<p class=error>No entries found.</p>\n"; } } } writeFooter('basic');
<?php require '/lib/Database.class.php'; if (isset($_POST['action']) && $_POST['action'] == 'displayTable') { displayTable(); } function displayTable() { $dbh = Database::getInstance(); $sth = $dbh->prepare("Select * from user"); $sth->execute(); $arr = $sth->fetchAll(); echo json_encode($arr); }
<td>' . $routeTag . '</td> <td>' . implode(", ", $dirTagArray) . '</td> </tr>'; } print '</table><br />'; } $agencyArray = Agency::getAgencies(); ?> <h2>Routes with more than two directions having useForUI=true</h2> <p><a href="index.php">Home</a></p> <b>Version: <?php print $version; ?> </b> <p><b>AC Transit</b></p> <?php $routeArray = getRoutes($agencyArray['actransit'], $version); displayTable($routeArray); ?> <p><b>SF-Muni</b></p> <?php $routeArray = getRoutes($agencyArray['sf-muni'], $version); displayTable($routeArray); require 'footer.php';