当前位置: 首页>>代码示例>>PHP>>正文


PHP displayResults函数代码示例

本文整理汇总了PHP中displayResults函数的典型用法代码示例。如果您正苦于以下问题:PHP displayResults函数的具体用法?PHP displayResults怎么用?PHP displayResults使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了displayResults函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: main

function main()
{
    global $numEpochs;
    global $numPatterns;
    global $patNum;
    global $RMSerror;
    // initiate the weights
    initWeights();
    // load in the data
    initData();
    // train the network
    for ($j = 0; $j <= $numEpochs; $j++) {
        for ($i = 0; $i < $numPatterns; $i++) {
            //select a pattern at random
            //srand();
            $patNum = rand(0, $numPatterns - 1);
            //calculate the current network output
            //and error for this pattern
            calcNet();
            //change network weights
            WeightChangesHO();
            WeightChangesIH();
        }
        //display the overall network error
        //after each epoch
        calcOverallError();
        if (gmp_mod($j, 50) == 0) {
            print "epoch = " . $j . "  RMS Error = " . $RMSerror . "</br>";
        }
    }
    //training has finished
    //display the results
    displayResults();
}
开发者ID:0-php,项目名称:AI,代码行数:34,代码来源:mlpnn.php

示例2: showResults

function showResults($array, $teamFor, $teamAgainst)
{
    $complete = FALSE;
    foreach ($array as $value) {
        if ($value['Team One'] == $teamFor) {
            if ($value['Team Two'] == $teamAgainst) {
                displayResults($value);
                $complete = TRUE;
            }
        }
    }
    if ($complete == FALSE) {
        echo "Bad Selection";
    }
}
开发者ID:TeamBall,项目名称:CapstoneProject,代码行数:15,代码来源:displayResults.php

示例3: findSavings

function findSavings()
{
    $row = $_POST['row'];
    $implode = implode(',', $row);
    $explode = explode(',', $implode);
    $itemNumber = $explode[0];
    $retail = $explode[5];
    $selectPromotionsForItemStatement = "Select * From PromotionItem WHERE ItemNumber = '" . $itemNumber . "'";
    $promotionItemResult = mysql_query($selectPromotionsForItemStatement);
    //Test whether the queries were successful
    if (!$promotionItemResult) {
        $promotionItemMessage = "The retrieval of promotion items was unsuccessful: ";
    }
    $numberPromotionItemRows = mysql_num_rows($promotionItemResult);
    // Check if results turned out empty
    $promotionItemMessage = "";
    if ($numberPromotionItemRows == 0) {
        $promotionItemMessage = "No items found in database";
    }
    $bestPromo = $retail;
    $bestPrice = "none";
    $adEvent = "none";
    while ($row = mysql_fetch_assoc($promotionItemResult)) {
        $promoCode = $row['PromoCode'];
        $salePrice = $row['SalePrice'];
        if ($salePrice < $bestPrice) {
            $selectAdEventsForPromotionStatement = "Select * From AdEventPromotion WHERE PromoCode = '" . $promoCode . "'";
            $adEventPromotionResult = mysql_query($selectAdEventsForPromotionStatement);
            //Test whether the queries were successful
            if (!$adEventPromotionResult) {
                $adEventPromotionMessage = "The retrieval of promotion items was unsuccessful: ";
            }
            $numberAdEventPromotionRows = mysql_num_rows($adEventPromotionResult);
            // Check if results turned out empty
            $adEventPromotionMessage = "";
            if ($numberAdEventPromotionRows == 0) {
                $adEventPromotionMessage = "No items found in database";
            } else {
                $result = mysql_fetch_assoc($adEventPromotionResult);
                $eventCode = $result['EventCode'];
                $bestPrice = $salePrice;
                $bestPromo = $promoCode;
                $adEvent = $eventCode;
            }
        }
    }
    displayResults($itemNumber, $retail, $bestPrice, $bestPromo, $adEvent);
}
开发者ID:evanlws,项目名称:423-Term-Project,代码行数:48,代码来源:item_savings_report.php

示例4: leagueHandler

$leagueID = leagueHandler($_POST, $userID);
debug("League is {$leagueID}");
$season = getSeason();
?>


To join a league, choose the league you're looking to join, the password provided by its administrator, and the name of your team. You can only join a league once. If a league's registration deadline has passed, it does not appear on the list.<p/>
<?php 
debug($_POST["action"]);
if ($_POST["action"] == "leagueEnroll") {
    $pass = getSingleton("fch_leagues", "pw", " where id = " . $_POST['leagueID'] . " and season = \"" . getSeason() . "\"");
    debug("Criteria -- displName=" . $_POST["teamDisplayName"] . " pw=" . $_POST['password'] . " pass=" . $pass);
    if ($_POST['password'] == $pass && strlen($_POST["teamDisplayName"]) > 0) {
        echo displayResults(addGMToLeague($_POST["leagueID"], $userID, $_POST["teamDisplayName"]));
    } else {
        echo displayResults(getReturnCode(0, "Sorry, your password was incorrect or you didn't enter a team name."));
    }
}
?>

 <div class="contact-form">
<form  name="leagueEnroll" method="post" class="form-validate form-horizontal" >
			<input name = "action" value = "leagueEnroll" type = "hidden">
  
		<fieldset>
			<legend>What League Would You Like to Join?</legend>
			<div class="control-group">
				<div class="control-label">
					<label id="jform_contact_name-lbl" for="jform_contact_name" class="hasTooltip required" title="&lt;strong&gt;Name&lt;/strong&gt;&lt;br /&gt;Your name.">
						League</label>
				</div>
开发者ID:BobHatcher,项目名称:FantasyCollegeHockey,代码行数:31,代码来源:join-league.php

示例5: displayResults

    }
}
if ($_POST["action"] == "removeGM") {
    if (!okToTransact($_POST["transactionID"])) {
        echo displayResults(getReturnCode(0, "This transaction has already been completed. Please do not use the refresh button."));
    } else {
        $gmToDelete = intval($_POST["gmToDelete"]);
        debug("Removing {$gmToDelete} from league {$leagueID}");
        $r = executeGenericSQL("UPDATE fch_league_membership SET status = \"removed\" WHERE userID = {$gmToDelete} and {$leagueID} = leagueID and season = \"{$season}\"");
        if ($r != -1) {
            $r = executeGenericSQL("UPDATE fch_rosters SET releaseDate = DATE_ADD(CURRENT_TIMESTAMP, INTERVAL +3 HOUR) where  userID = {$gmToDelete} and leagueID = {$leagueID} and  releaseDate is NULL and season = \"{$season}\" ");
            if ($r != -1) {
                echo displayResults(getReturnCode(1, "Successfully removed this GM."));
            }
        } else {
            echo displayResults(getReturnCode(0, "There has been an error releasing this GM's players."));
        }
    }
    setTransactionComplete($_POST["transactionID"]);
}
?>

   
   <h3>More Admin Tools Coming Soon.</h3>
   
   <h4>Registration Deadline</h4>
   <?php 
echo getSingleton("fch_leagues", "registrationDeadline", " WHERE id = {$leagueID} and season = \"{$season}\"");
?>

   
开发者ID:BobHatcher,项目名称:FantasyCollegeHockey,代码行数:29,代码来源:league-admin.php

示例6: displayResults

            echo "<div class=\"row-fluid\">";
            echo "<div class=\"span3\">";
            //echo "<h2 class=\"text-center\">Cluster 1<br /></h2>";
            echo "<p class=\"text-center\"><b>Keywords:" . "</b><br />{$titlesCluster1}<br />";
            displayResults($cluster1);
            echo "</div>";
            echo "<div class=\"span3\">";
            //echo "<h2 class=\"text-center\">Cluster 2<br /></h2>";
            echo "<p class=\"text-center\"><b>Keywords: " . "</b><br />{$titlesCluster2}<br />";
            displayResults($cluster2);
            echo "</div>";
            echo "<div class=\"span3\">";
            //echo "<h2 class=\"text-center\">Cluster 3<br /></h2>";
            echo "<p class=\"text-center\"><b>Keywords: " . "</b><br />{$titlesCluster3}<br />";
            displayResults($cluster3);
            echo "</div>";
            echo "<div class=\"span3\">";
            //echo "<h2 class=\"text-center\">Cluster 4<br /></h2>";
            echo "<p class=\"text-center\"><b>Keywords: " . "</b><br />{$titlesCluster4}<br />";
            displayResults($cluster4);
            echo "</div>";
            echo "</div>";
        }
        //**************************************************************************
    }
    //check memory usage
    //(not available on csserver)
    //echo "<br /> " . memory_get_peak_usage() . "<br /> ";
}
//Include footer file
require 'includes/searchFooter.php';
开发者ID:soitun,项目名称:php_software_engineering_project,代码行数:31,代码来源:index.php

示例7: displayResults

        case "date":
            $date = "'" . $_POST['sCriteria'] . "'";
            $db->runQuery("select CL.lead_id , CL.customer_id ,\n                                first_name, last_name ,email, CL.employee_id , date, L.type\n                                from customer_leads CL, customers C, Leads L where\n                                CL.date={$date} and C.id = CL.customer_id and L.id = CL.lead_id;");
            if ($db->result->num_rows > 0) {
                displayResults($db);
                $customerFound = 1;
            } else {
                echo "<script>location.href='viewEditLead.php?error=1'</script>";
            }
            break;
    }
    echo "</table></form></body></html>";
    get_footer();
}
if (isset($_GET['status']) && !isset($_GET['error'])) {
    $status = $_GET['status'];
    echo "<html>\n                        <head>\n                        <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1' />\n                        <script type='text/javascript'>\n                            function changeRowColor (Row,State)\n                            {\n                                if(State)\n                                    {\n                                        Row.style.backgroundColor = '#E0E0E0';\n                                        Row.style.color = 'Black';\n                                    }\n                                else\n                                    {\n                                        Row.style.backgroundColor = '#f6f6f6';\n                                        Row.style.color = 'Black';\n                                    }\n                            }\n\n                            function pageRedirect(indexOfRow)\n                            {\n                                var lead = document.getElementById('leadsTable').rows[indexOfRow].cells[0].innerHTML;\n                                document.location.href = 'leadUpdate.php?leadID='+lead;\n\n                            }\n                        </script>\n                        </head>\n                        <body>\n                        <h3>Click to View / Update Lead</h3>\n                        <div id='profileBox'></div>\n                        <form action='{$PHP_SELF}' method='POST'>\n                            <table  align='center' id='leadsTable' class='profile_sect'>\n                                <tr align = 'center'>\n                                    <th> &nbsp &nbsp Lead ID &nbsp &nbsp </th>\n                                    <th> &nbsp &nbsp Customer ID &nbsp &nbsp </th>\n                                    <th> &nbsp &nbsp First Name &nbsp &nbsp </th>\n                                    <th> &nbsp &nbsp Last Name &nbsp &nbsp </th>\n                                    <th> &nbsp &nbsp e-Mail ID &nbsp &nbsp </th>\n                                    <th> &nbsp &nbsp Sales Person's ID &nbsp &nbsp </th>\n                                    <th> &nbsp &nbsp Date &nbsp &nbsp </th>\n                                    <th> &nbsp &nbsp Lead Type &nbsp &nbsp </th>\n                                </tr>\n                ";
    switch ($status) {
        case 'Open':
            $db->runQuery("select CL.lead_id , CL.customer_id ,\n                            C.first_name, C.last_name ,C.email, CL.employee_id , date, L.type\n                            from customer_leads CL, customers C, Leads L where\n                            L.status = 'open' and L.id = CL.lead_id and C.id = CL.customer_id;");
            break;
        case 'Closed':
            $db->runQuery("select CL.lead_id , CL.customer_id ,\n                            C.first_name, C.last_name ,C.email, CL.employee_id , date, L.type\n                            from customer_leads CL, customers C, Leads L where\n                            L.status = 'closed' and L.id = CL.lead_id and C.id = CL.customer_id;");
            break;
    }
    displayResults($db);
}
if (isset($_GET['error'])) {
    echo "<h3>ERROR: Not found!</h3>";
    echo '<br/><br/><form><input type="submit" value="Try Again" onClick="history.go(-1);return true;"> </form>';
}
开发者ID:bajmhunter,项目名称:pcrs,代码行数:31,代码来源:viewEditLead.php

示例8: displayScore

		$output .= displayScore($phpscore, $this->sl_get_path(), "php");
		$output .= "		</div>";
		$output .= "		<div style=\"width: 24%; float: left;\">";
		$output .= displayScore($slscore, $this->sl_get_path(), "sl");
		$output .= "		</div>";
		$output .= "		<div style=\"width: 24%; float: left;\">";
		$output .= displayScore($cmsscore, $this->sl_get_path(), "cms");
		$output .= "		</div>";
		$output .= "		<div style=\"width: 24%; float: left;\">";
		$output .= displayScore($overallscore, $this->sl_get_path(), "overall");
		$output .= "		</div>";
		$output .= "	</div>";
		$output .= "</div>";
		$output .= "<div style=\"clear: both;\"></div>";
		$output .= "<div style=\"width: 918px;\">";
		$output .= displayResults($warnings, $pass);
		$output .= "</div>";
	}

	/**
	* Display the results in a nice looking form
	*
	* @param mixed $bad
	* @param mixed $good
	*/
	function displayResults($bad, $good){
		$n = "\n";
		$message = "";
		//$message .= "<script type=\"text/javascript\" charset=\"utf-8\">var myTabs = new mootabs('myTabs', {height: 440, width:895});</script>".$n;
		$message .= "<div id=\"myTabs\">".$n;
		$message .= "	<ul class=\"mootabs_title\" style=\"background: url('../images/alert-icon.png');\">".$n;
开发者ID:realfluid,项目名称:umbaugh,代码行数:31,代码来源:sl_scorecard.php

示例9: getUserID

Due to the 12-hour rule, players are not available to manage here for the 12 hours immediately following the start time of a game in which their school is participating. For more information see <a href="./index.php/about/game-rules">Game Rules</a> under "Roster Moves."

<?php 
$document = JFactory::getDocument();
#$document->addScript('fch-lib.js');
require_once "fch-lib.js";
require_once "fch-lib.php";
$userID = getUserID();
$leagueID = leagueHandler($_POST, $userID);
debug("League is {$leagueID}");
$season = getSeason();
if ($_POST['action'] == "doAcquire") {
    echo displayResults(acquirePlayer($userID, $leagueID, $_POST['playerID'], $_POST['destination'], $_POST['position'], $_POST["transactionID"]));
}
$limit_f_a = getPositionLimit("F", "a", $leagueID);
$limit_f_b = getPositionLimit("F", "b", $leagueID);
$limit_d_a = getPositionLimit("D", "a", $leagueID);
$limit_d_b = getPositionLimit("D", "b", $leagueID);
$limit_g_a = getPositionLimit("G", "a", $leagueID);
$limit_g_b = getPositionLimit("G", "b", $leagueID);
$roster_f_a = selectCount("fch_rosters", " Where season = \"{$season}\" and leagueID = {$leagueID} and userID = {$userID} and releaseDate is  null and position = \"F\" and statusCode = \"act\"");
$roster_f_b = selectCount("fch_rosters", " Where season = \"{$season}\" and leagueID = {$leagueID} and userID = {$userID} and releaseDate is  null and position = \"F\" and statusCode = \"ben\"");
$roster_d_a = selectCount("fch_rosters", " Where season = \"{$season}\" and leagueID = {$leagueID} and userID = {$userID} and releaseDate is  null and position = \"D\" and statusCode = \"act\"");
$roster_d_b = selectCount("fch_rosters", " Where season = \"{$season}\" and leagueID = {$leagueID} and userID = {$userID} and releaseDate is  null and position = \"D\" and statusCode = \"ben\"");
$roster_g_a = selectCount("fch_rosters", " Where season = \"{$season}\" and leagueID = {$leagueID} and userID = {$userID} and releaseDate is  null and position = \"G\" and statusCode = \"act\"");
$roster_g_b = selectCount("fch_rosters", " Where season = \"{$season}\" and leagueID = {$leagueID} and userID = {$userID} and releaseDate is  null and position = \"G\" and statusCode = \"ben\"");
?>

<p/>
<h3>Your Roster Slots (used/allowed)</h3>
<style>
开发者ID:BobHatcher,项目名称:FantasyCollegeHockey,代码行数:31,代码来源:acquire.php

示例10: session_start

<?php

session_start();
?>

<?php 
if (isset($_GET['lat']) && isset($_GET['long']) && isset($_GET['radius'])) {
    displayResults($_GET['lat'], $_GET['long'], $_GET['radius']);
}
function displayResults($lat, $long, $radius)
{
    $_SESSION["myLat"] = $lat;
    $_SESSION["myLong"] = $long;
}
header('refresh: 0; url=main.php');
开发者ID:ppllmmqqaazz,项目名称:GoodWegmansHunting,代码行数:15,代码来源:loading2.php

示例11: debug

<?php 
require_once "fch-lib.js";
require_once "fch-lib.php";
if ($_POST['action'] == "doCreateLeague") {
    debug("creating league");
    echo displayResults(createLeague($_POST['leagueDisplayName'], $_POST['password'], $_POST['teamDisplayName'], $_POST["limit_f_a"], $_POST["limit_f_b"], $_POST["limit_d_a"], $_POST["limit_d_b"], $_POST["limit_g_a"], $_POST["limit_g_b"], $_POST["registrationDate"] . " " . $_POST["registrationTime"], $_POST["draftDate"] . " " . $_POST["draftTime"], $_POST["invitees"]));
}
?>
  <script src="//code.jquery.com/jquery-1.10.2.js"></script>
  <script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>

	<link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">

	<script>
	/*
	function validateDates() 
	{
		var regDate = new Date(document.forms["createLeague"].elements["registrationDate"].value + " " + document.forms["createLeague"].elements["registrationTime"].value);
		var draftDate = new Date(document.forms["createLeague"].elements["draftDate"].value + " " + document.forms["createLeague"].elements["draftTime"].value);
		if ((draftDate - regDate) < 86400000)
		{
			alert("Your draft must be 24 hours or more after your registration date.");
			return false;
		}
		return true;
	}
	*/
	function intValue(field)
	{
		return parseInt(document.forms["createLeague"].elements[field].value);
开发者ID:BobHatcher,项目名称:FantasyCollegeHockey,代码行数:30,代码来源:create-league.php

示例12: while

        while ($row = mysql_fetch_assoc($restults_academic_calendar)) {
            $upcomingArray[$upcomingCount]['date_from'] = $row['date_from'];
            $upcomingArray[$upcomingCount]['time_from'] = NULL;
            $upcomingArray[$upcomingCount]['location'] = NULL;
            $upcomingArray[$upcomingCount]['date_to'] = $row['date_to'];
            $upcomingArray[$upcomingCount]['title'] = $row['description'];
            $upcomingArray[$upcomingCount]['url'] = NULL;
            $upcomingArray[$upcomingCount]['semester'] = $row['semester'];
            $upcomingArray[$upcomingCount]['type'] = NULL;
            $upcomingArray[$upcomingCount]['ts_speaker'] = NULL;
            $upcomingArray[$upcomingCount]['ts_affiliation'] = NULL;
            $upcomingCount++;
        }
        rsort($upcomingArray);
        // display results
        displayResults($upcomingArray);
    }
}
if (isset($_POST['freq']) && $_POST['freq'] == 'tech') {
    $currentDate = currentDate();
    $sql = "SELECT * FROM events WHERE (type='tech session' && status='approved' AND date_from > '2014-01-01') ORDER BY date_from ASC";
    $results = mysql_query($sql) or die("Unable to execute:" . mysql_error());
    ?>
<style>
#tech td {
	padding:8px;
}
</style><br />

<p>
<strong>All the sessions will be held in GS 100 at 4:00 PM</strong>
开发者ID:DinethH,项目名称:EES,代码行数:31,代码来源:events_page.php

示例13: displayError

            displayError("Could not update IP tracking.");
            exit;
        }
        setcookie("voted", "255", strtotime($config["expiration"]));
    } else {
        if (!mysql_query("INSERT INTO `{$dbTblT}` VALUES('{$userIP}','" . $_POST["voteFor"] . "','1',NOW());")) {
            displayError("Could not update IP tracking.");
            exit;
        }
        setcookie("voted", $_POST["voteFor"], strtotime($config["expiration"]));
    }
    if (!mysql_query("UPDATE `{$dbTblR}` SET `votes` = votes + 1 WHERE `id` = '" . $_POST["voteFor"] . "' LIMIT 1;")) {
        displayError("Could not update vote result.");
        exit;
    }
    displayResults(0);
    exit;
}
///////////////////
function getIP($ip)
{
    return long2ip($ip);
}
function putIP($ip)
{
    return ip2long(gethostbyname($ip));
}
function openProxy()
{
    // conceptualized by frostjedi.com; heavily modified
    global $_GET, $_SERVER, $PHP_SELF;
开发者ID:brocococonut,项目名称:yGallery,代码行数:31,代码来源:supervote.php

示例14: nextDraftOrder

function nextDraftOrder($leagueID)
{
    $picksSoFar = intval(selectCount("fch_draft", " WHERE leagueID = {$leagueID}"));
    $totalPlayers = intval(selectCount("fch_league_membership", " WHERE leagueID = {$leagueID} and status = \"active\""));
    $max = getLastPickNumber($leagueID) + 1;
    // because we want the NEXT player
    $season = getSeason();
    debug($picksSoFar . " " . $totalPlayers . " " . $max);
    if (!($totalPlayers > 0)) {
        displayResults(getReturnCode(0, "Error: No players in this league."));
    }
    $quotient = intval(($max - 1) / $totalPlayers);
    debug("quotient {$quotient}");
    $mod = ($max - 1) % $totalPlayers + 1;
    debug("mod {$mod}");
    if ($quotient % 2 == 0) {
        $r = intval($mod);
        debug("{$r} = r");
    } else {
        $r = intval($totalPlayers - $mod + 1);
        debug("{$r} = r");
    }
    return $r;
}
开发者ID:BobHatcher,项目名称:FantasyCollegeHockey,代码行数:24,代码来源:fch-lib.php

示例15: substr

        // Expect b_ to be baseline, s_ to be status as updated by user
        if (substr($key, 0, 2) == "s_") {
            $playerID = substr($key, 2);
            debug("Player is " . $playerID . " trigger is " . $_POST["s_" . $playerID]);
            if ($_POST["s_" . $playerID] == "dirty") {
                debug("RELEASING " . $playerID);
                $r = releasePlayer($userID, $leagueID, $playerID, $_POST["transactionID"]);
                $x++;
            }
        }
    }
    if ($x == 0) {
        $r["status"] = 0;
        $r["msg"] = "You did not select any players to drop.";
    }
    echo displayResults($r);
}
?>



<script>

jQuery(function($) {

jQuery(document).ready(function (){
    jQuery('#l2').on('click','li',function(){
      var t=jQuery(this);
      jQuery('#l1').append(t);
	  //alert(jQuery("#s_" + this.id).val());
	  jQuery("#s_" + this.id).val("ok");
开发者ID:BobHatcher,项目名称:FantasyCollegeHockey,代码行数:31,代码来源:release.php


注:本文中的displayResults函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。