コード例 #1
0
 function printDetails($info, $prefix = '(root)', $hide_private = false, $debug = false)
 {
     $output = '';
     if (!empty($info['namespace'])) {
         $output .= '<li class="list-group-item list-group-item-info">' . '<span class="glyphicon glyphicon-home"></span> ' . $this->urlNamespace($info['namespace'], basename($info['namespace'])) . '\\<span class="class shortname">' . $this->urlClass($info['name'], $info['short_name']) . '</span>' . '</li>';
     }
     if (!empty($info['parent'])) {
         $output .= printDetails($info['parent'], '(parent)', true, false);
     }
     if (!empty($info['properties'])) {
         $this->propertyDetails($info, $output);
     }
     if (!empty($info['methods'])) {
         $this->methodDetails($info, $output);
     }
     return '<ul class="list-group">' . $output . '</ul>';
 }
コード例 #2
0
ファイル: compare.php プロジェクト: evarilos/CVC-EVARILOS
        printRoomAccuracy();
        ?>
					</div>
				</div>
			</div>

			<div class="panel panel-default">
				<div class="panel-heading">
					<h4 class="panel-title">
						<a data-toggle="collapse" data-parent="#accordion" href="#collapseDetails">Details</a>
					</h4>
				</div>
				<div id="collapseDetails" class="panel-collapse collapse in">
					<div class="panel-body">
						<?php 
        printDetails();
        ?>
					</div>
				</div>
			</div>
		<?php 
    }
    ?>
	</div>
</div>

<?php 
}
?>

コード例 #3
0
ファイル: reservation.php プロジェクト: holybom/ubcair
        OCICommit($db_conn);
        executePlainSQL("insert into payment values(\r\n\t\t\t\tpayid_sequence.nextval," . $_POST['credit'] . "," . $_COOKIE['cid'] . ")");
        OCICommit($db_conn);
        executePlainSQL("insert into deter_pay values(\r\n\t\t\t\tpayid_sequence.currval,\r\n\t\t\t\tresid_sequence.currval," . $_POST['makeres_totalcost'] . ")");
        OCICommit($db_conn);
        // Confirmation dialog
        ?>
		<script type="text/javascript"> 
			alert("Payment successful. Proceed to adding bags");
			location = "baggage.php";
		</script>
		<?php 
    } else {
        //print_r($res);
        echo "Your flight itinerary:";
        printDetails($res, 0, 0);
        ?>
		<br><br>The summary of your ticket order:
		<table class="pure-table">
			<tr>
				<?php 
        echo "<td>Number of tickets:</td>";
        echo "<td>" . $res['NUMTICKETS'] . "</td>";
        ?>
			</tr>
			<tr>
				<?php 
        echo "<td>Flight class:</td>";
        echo "<td>" . $res['CLASS'] . "</td>";
        ?>
			</tr>
コード例 #4
0
ファイル: flights.php プロジェクト: holybom/ubcair
function printFlights($flights, $locations)
{
    echo "<p><br>Search Results: <br></p>";
    echo "<form method='POST' action='reservation.php'>";
    echo '<table class = "pure-table pure-table-bordered">';
    // print the top row (attribute labels)
    echo '<thead>';
    echo "<tr><th>Departure Airport</th><th>City</th><th>Country</th>" . "<th>Arrival Airport</th><th>City</th><th>Country</th><th>Departure Time (GMT)</th>" . "<th>Total Flight Time</th><th>COST (CAD)</th><th>Choose Flight</th></tr>";
    echo '</thead>';
    // print the data rows (tuples)
    $it = 0;
    while ($flight = OCI_Fetch_Array($flights, OCI_ASSOC)) {
        $printout = "<tr>";
        foreach ($locations as $value) {
            $printout = $printout . "<td>{$value}</td>";
        }
        $departtime = parseDate($flight['DT1'], 1);
        $flighttime = parseDate($flight['TOTALTIME'], 2);
        $cost = $flight['TOTALPRICE'];
        $fclassint = 0;
        // Variable costs depends on class
        if (strcmp($_COOKIE['flightclass'], "economy") == 0) {
            $cost *= 1;
            $fclassint = 1;
        } else {
            if (strcmp($_COOKIE['flightclass'], "business") == 0) {
                $cost *= 3;
                $fclassint = 3;
            } else {
                if (strcmp($_COOKIE['flightclass'], "first") == 0) {
                    $cost *= 5;
                    $fclassint = 5;
                }
            }
        }
        // update the cost if the class is changed
        $flight['TOTALPRICE'] = $cost;
        // Add class and num tickets to the post array
        $flight['CLASS'] = $_COOKIE['flightclass'];
        $flight['CLASSINT'] = $fclassint;
        $flight['NUMTICKETS'] = $_COOKIE['numtickets'];
        $flight_string = serialize($flight);
        echo $printout . "<td>{$departtime}</td><td>{$flighttime}</td><td>{$cost}</td>";
        echo "<td><input type='radio' name='flightchoice' value='{$flight_string}' required></td></tr>";
        echo "<tr><td>";
        printDetails($flight, $it, 1);
        echo "</td></tr>";
        $it++;
    }
    echo "</table>";
    echo "<input type='submit' value='Book my flight'></form>";
}
コード例 #5
0
ファイル: list_reservation.php プロジェクト: holybom/ubcair
function printHistory($history)
{
    echo "<table class ='pure-table pure-table-bordered'>";
    echo "<thead><tr><th>Reservation Id</th><th>Date of Departure (GMT)</th><th>Depart City</th>" . "<th>Depart Country</th><th>Arrival City</th><th>Arrival Country</th>" . "<th>Class</th><th>Number of tickets</th><th>Credit card #</th>" . "<th>COST (CAD)</th></thead>";
    $it = 0;
    while ($tuple = OCI_Fetch_Array($history, OCI_ASSOC)) {
        $numFlights = 1;
        if (array_key_exists("FID3", $tuple)) {
            $numFlights = 3;
        } else {
            if (array_key_exists("FID2", $tuple) && array_key_exists("FID3", $tuple) != TRUE) {
                $numFlights = 2;
            }
        }
        $details = getDetails($tuple, $numFlights);
        echo "<tr><td>" . $tuple['RESID'] . "</td><td>" . $details['DEPARTDATE'] . "</td><td>" . $details['DEPARTCITY'] . "</td><td>" . $details['DEPARTCOUNTRY'] . "</td><td>" . $details['ARRIVALCITY'] . "</td><td>" . $details['ARRIVALCOUNTRY'] . "</td><td>" . parseClass($tuple['PCLASS']) . "</td><td>" . $tuple['TICKET_NUM'] . "</td><td>" . parseCard($tuple['CREDITCARD']) . "</td><td>" . $tuple['TOTAL_COST'] . "</td></tr>";
        echo "<tr><td>";
        $flight = array("FIRSTID" => $tuple['FID1']);
        if ($numFlights >= 2) {
            $flight["SECONDID"] = $tuple['FID2'];
        }
        if ($numFlights == 3) {
            $flight["THIRDID"] = $tuple['FID3'];
        }
        printDetails($flight, $it, 1);
        echo "</td></tr>";
        $it++;
    }
    echo "</table>";
}
コード例 #6
0
    // Your Batch Mates
    OpenTable();
    $query = "select a.name,a.username,a.gradyear,a.company from nuke_users a ,nuke_users b where a.gradyear=b.gradyear and b.username='******' and a.username!= '{$uname}'";
    printDetails($query, "Batch Mates");
    CloseTable();
    // Your Immediate Juniors
    echo "<BR>";
    OpenTable();
    $query = "select a.name,a.username,a.gradyear,a.company from nuke_users a ,nuke_users b where a.gradyear=(b.gradyear-1) and b.username='******'";
    printDetails($query, "Immediate Juniors");
    CloseTable();
    // Your Immediate Seniors
    echo "<BR>";
    OpenTable();
    $query = "select a.name,a.username,a.gradyear,a.company from nuke_users a ,nuke_users b where a.gradyear=(b.gradyear+1) and b.username='******'";
    printDetails($query, "Immediate Seniors");
    CloseTable();
}
function printDetails($query, $type)
{
    global $admin, $user, $cookie, $prefix, $dbi, $user_prefix;
    $result = sql_query($query, $dbi);
    $numrows = sql_num_rows($result, $dbi);
    echo "<Br><B>Your " . $type . " : " . $numrows . "</B><HR>";
    echo "<table width=\"60%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">" . "<tr><td bgcolor=\"#000000\"><table width=\"100%\" border=\"0\" cellpadding=\"1\" cellspacing=\"1\">" . "</tr><tr>" . "<th height=\"25\" colspan=\"1\" align=\"center\" wrap><font color=\"#28313C\"><strong>Name</strong></font></th>" . "<th height=\"15\" colspan=\"1\" align=\"center\" wrap><font color=\"#28313C\"><strong>UserId</strong></font></th>" . "<th height=\"10\" colspan=\"1\" align=\"center\" wrap><font color=\"#28313C\"><strong>Year</strong></font></th>" . "<th height=\"10\" colspan=\"1\" align=\"center\" wrap><font color=\"#28313C\"><strong>Company</strong></font></th>" . "</tr>";
    while (list($name, $username, $gradyear, $company) = sql_fetch_row($result, $dbi)) {
        $username = "******" . $username . "</a>";
        echo "<tr><td class=\"row1\">" . $name . "</td>" . "<td  class=\"row2\">" . $username . "</td>" . "<td  class=\"row1\">" . $gradyear . "</td>" . "<td  class=\"row2\">" . $company . "</td>" . "</tr>";
        //echo    $name . " [" . $username . "]" . "<BR>";
    }
    echo "</table>";