• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP ordinal函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: _dependency

 function _dependency($pool)
 {
     if (!empty($pool['dependency_pool_id'])) {
         if (!array_key_exists('DependencyPool', $pool)) {
             trigger_error('Missing dependency information', E_USER_ERROR);
         }
         if ($pool['DependencyPool']['type'] == 'crossover') {
             return ($pool['dependency_id'] == 1 ? 'winner' : 'loser') . ' of ' . $pool['DependencyPool']['name'];
         } else {
             return ordinal($pool['dependency_id']) . ' in pool ' . $pool['DependencyPool']['name'];
         }
     } else {
         if (!empty($pool['dependency_ordinal'])) {
             return ordinal($pool['dependency_id']) . ' among ' . ordinal($pool['dependency_ordinal']) . ' place teams';
         } else {
             return sprintf(__('%s seed', true), ordinal($pool['dependency_id']));
         }
     }
 }
开发者ID:roboshed,项目名称:Zuluru,代码行数:19,代码来源:pool.php


示例2: PDO

$username = "w-menu";
$dbname = "w_menu";
$conn = new PDO("mysql:host={$dbserver};dbname={$dbname}", $username, $password);
$conn->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$stmt = $conn->prepare('SELECT * FROM allGroupUsers;');
$stmt->execute();
$result = $stmt->fetchAll();
$temp_user_array = [];
$temp_group_array = [];
$final_array = [];
$i = 0;
foreach ($result as $row) {
    if ($row['user'] == NULL) {
        $i++;
        $temp = array('place' => ordinal($i), 'group' => $row['groupName'], 'user' => '', 'total' => $row['total']);
        array_push($temp_group_array, $temp);
    } else {
        $temp1 = array('place' => '', 'group' => $row['groupName'], 'user' => $row['user'], 'total' => $row['total']);
        array_push($temp_user_array, $temp1);
    }
}
asort($temp_user_array);
asort($temp_group_array);
foreach ($temp_group_array as $tg) {
    array_push($final_array, $tg);
    foreach ($temp_user_array as $tu) {
        if ($tu['group'] == $tg['group']) {
            $temp = array('place' => '', 'group' => '', 'user' => $tu['user'], 'total' => $tu['total']);
            array_push($final_array, $temp);
        }
开发者ID:rkalin,项目名称:SolsRecycling,代码行数:31,代码来源:subGroups.php


示例3: ordinal

        case 5:
            # friday
            $style_wd = ' style="border-bottom:1px solid #aaa;"';
            break;
        case 0:
            # sunday
            $style_wd = ' style="border-bottom:1px solid #666;"';
            break;
        default:
            $style_wd = '';
    }
    echo '<tr class="', $is_weekend ? 'even' : 'odd', '">', "\n";
    # day
    #
    echo '<td class="r"', $style_wd, '>';
    echo ordinal($day, $lang_2, true);
    echo '</td>', "\n";
    # inbound calls
    #
    $num_entered = (int) @$CDR_DB->executeGetOne('SELECT COUNT(DISTINCT(`ast_call_id`)) FROM `queue_log` WHERE
    `queue_id`=' . $queue_id . '
AND `event`=\'_ENTER\'
AND ' . $sql_time);
    echo '<td class="r"', $style_wd, '>', $num_entered, '</td>', "\n";
    $totals['num_entered'] += $num_entered;
    # connected to an agent
    #
    $num_connected = (int) @$CDR_DB->executeGetOne('SELECT COUNT(*) FROM `queue_log` WHERE
    `queue_id`=' . $queue_id . '
AND `event`=\'_CONNECT\'
AND ' . $sql_time);
开发者ID:philipp-kempgen,项目名称:amooma-gemeinschaft-pbx,代码行数:31,代码来源:stats_qclassical.php


示例4: _e

 if ($camp->action == 3) {
     /*
      * When new content is added
      */
     _e('Scheduled to post when new content is added:<br/>', 'sola');
     if ($type == 1) {
         _e('Daily at ' . $time, 'sola');
     } else {
         if ($type == 2) {
             _e('Weekly on ' . $day . ' at ' . $time, 'sola');
         } else {
             if ($type == 3) {
                 /*
                  * fix 1st 2nd 3rd
                  */
                 _e('Monthly on the ' . $daynum . ordinal($daynum) . ' at ' . $time, 'sola');
             } else {
                 if ($type == 4) {
                     /*
                      * Do nothing for this type
                      */
                 } else {
                     if ($type == 5) {
                         _e('Immediately', 'sola');
                     }
                 }
             }
         }
     }
 } else {
     if ($camp->action == 4) {
开发者ID:jekv,项目名称:devia,代码行数:31,代码来源:admin-page.php


示例5: count

    $stmt = $db->query("SELECT * FROM users WHERE id={$uid}");
    return $stmt->fetchAll(PDO::FETCH_ASSOC);
}
include $_SERVER['DOCUMENT_ROOT'] . "/pdc.php";
$stmt = $db->query('SELECT * FROM user_stats WHERE stat_id=14 AND value > 100 ORDER BY value DESC');
$results = $stmt->fetchAll(PDO::FETCH_ASSOC);
$j = count($results);
?>
<div class="row">
	<div class="col-md-2"></div>
	<div class="col-md-8 table-responsive">
		<h1>Flashcard Rankings</h1>
		<p>Increase your rank by answering more flashcards correctly.</p>
		<table class="table table-striped table-hover">
			<?php 
echo ($_GET['player'] != $_SESSION['username'] ? "<a href='http://www.JPVocab.com/player.php?player=" . $_GET['player'] . "&report=summary'>" . $_GET['player'] . '</a> is ' : 'You are ') . 'ranked <b>' . ordinal($ranktfca) . '</b>';
?>
			<tr>
				<th class="text-center">Rank</th>
				<th>User</th>
				<th class="text-center">#</th>
			</tr><?php 
$n = $ranktfca - 4 <= 0 ? 0 : $ranktfca - 4;
$j = $n + 5;
for ($n; $n < $j; $n++) {
    try {
        $user = getUN($results[$n]['user_id'], $db);
    } catch (PDOException $ex) {
        //echo "Username error <br />";
    }
    if ($results[$n + 1]['value'] == $results[$n]['value']) {
开发者ID:Knixd,项目名称:JPVocab,代码行数:31,代码来源:flashcardrank.php


示例6: datetimeToText

function datetimeToText($datetime = "", $includeTime = false)
{
    $unixdatetime = strtotime($datetime);
    $day = ordinal(strftime("%d", $unixdatetime));
    if (!$includeTime) {
        return stripZerosFromDate(strftime("%B *{$day}, %Y", $unixdatetime));
    }
    return stripZerosFromDate(strftime("%B *{$day}, %Y at *%I:%M %p", $unixdatetime));
}
开发者ID:RezNikTaylor,项目名称:RNK-Redesign,代码行数:9,代码来源:functions.php


示例7: render_option

 private function render_option($sv, $o)
 {
     global $Conf;
     if ($o) {
         $id = $o->id;
     } else {
         $o = PaperOption::make(array("id" => $o, "name" => "(Enter new option)", "description" => "", "type" => "checkbox", "position" => count(PaperOption::nonfixed_option_list()) + 1, "display" => "default"));
         $id = "n";
     }
     if ($sv->use_req() && isset($sv->req["optn{$id}"])) {
         $o = PaperOption::make(array("id" => $id, "name" => $sv->req["optn{$id}"], "description" => get($sv->req, "optd{$id}"), "type" => get($sv->req, "optvt{$id}", "checkbox"), "visibility" => get($sv->req, "optp{$id}", ""), "position" => get($sv->req, "optfp{$id}", 1), "display" => get($sv->req, "optdt{$id}")));
         if ($o->has_selector()) {
             $o->selector = explode("\n", rtrim(defval($sv->req, "optv{$id}", "")));
         }
     }
     echo "<table><tr><td><div class='f-contain'>\n", "  <div class='f-i'>", "<div class='f-c'>", $sv->label("optn{$id}", $id === "n" ? "New option name" : "Option name"), "</div>", "<div class='f-e'>", Ht::entry("optn{$id}", $o->name, $sv->sjs("optn{$id}", array("placeholder" => "(Enter new option)", "size" => 50))), "</div>\n", "  </div><div class='f-i'>", "<div class='f-c'>", $sv->label("optd{$id}", "Description"), "</div>", "<div class='f-e'>", Ht::textarea("optd{$id}", $o->description, array("rows" => 2, "cols" => 50, "id" => "optd{$id}")), "</div>\n", "  </div></div></td>";
     echo '<td style="padding-left:1em">';
     if ($id !== "n" && ($examples = $o->example_searches())) {
         echo '<div class="f-i"><div class="f-c">Example ' . pluralx($examples, "search") . "</div>";
         foreach ($examples as &$ex) {
             $ex = "<a href=\"" . hoturl("search", array("q" => $ex[0])) . "\">" . htmlspecialchars($ex[0]) . "</a>";
         }
         echo '<div class="f-e">', join("<br/>", $examples), "</div></div>";
     }
     echo "</td></tr>\n  <tr><td colspan='2'><table id='foldoptvis{$id}' class='fold2c fold3o'><tr>";
     echo "<td class='pad'><div class='f-i'><div class='f-c'>", $sv->label("optvt{$id}", "Type"), "</div><div class='f-e'>";
     $optvt = $o->type;
     if ($optvt == "text" && $o->display_space > 3) {
         $optvt .= ":ds_" . $o->display_space;
     }
     if ($o->final) {
         $optvt .= ":final";
     }
     $show_final = $Conf->collectFinalPapers();
     foreach (PaperOption::nonfixed_option_list() as $ox) {
         $show_final = $show_final || $ox->final;
     }
     $otypes = array();
     if ($show_final) {
         $otypes["xxx1"] = array("optgroup", "Options for submissions");
     }
     $otypes["checkbox"] = "Checkbox";
     $otypes["selector"] = "Selector";
     $otypes["radio"] = "Radio buttons";
     $otypes["numeric"] = "Numeric";
     $otypes["text"] = "Text";
     if ($o->type == "text" && $o->display_space > 3 && $o->display_space != 5) {
         $otypes[$optvt] = "Multiline text";
     } else {
         $otypes["text:ds_5"] = "Multiline text";
     }
     $otypes["pdf"] = "PDF";
     $otypes["slides"] = "Slides";
     $otypes["video"] = "Video";
     $otypes["attachments"] = "Attachments";
     if ($show_final) {
         $otypes["xxx2"] = array("optgroup", "Options for accepted papers");
         $otypes["pdf:final"] = "Alternate final version";
         $otypes["slides:final"] = "Final slides";
         $otypes["video:final"] = "Final video";
         $otypes["attachments:final"] = "Final attachments";
     }
     echo Ht::select("optvt{$id}", $otypes, $optvt, array("onchange" => "do_option_type(this)", "id" => "optvt{$id}")), "</div></div></td>\n";
     $Conf->footerScript("do_option_type(\$\$('optvt{$id}'),true)");
     echo "<td class='fn2 pad'><div class='f-i'><div class='f-c'>", $sv->label("optp{$id}", "Visibility"), "</div><div class='f-e'>", Ht::select("optp{$id}", array("admin" => "Administrators only", "rev" => "Visible to PC and reviewers", "nonblind" => "Visible if authors are visible"), $o->visibility, array("id" => "optp{$id}")), "</div></div></td>\n";
     echo "<td class='pad'><div class='f-i'><div class='f-c'>", $sv->label("optfp{$id}", "Form order"), "</div><div class='f-e'>";
     $x = array();
     // can't use "foreach (PaperOption::nonfixed_option_list())" because caller
     // uses cursor
     for ($n = 0; $n < count(PaperOption::nonfixed_option_list()); ++$n) {
         $x[$n + 1] = ordinal($n + 1);
     }
     if ($id === "n") {
         $x[$n + 1] = ordinal($n + 1);
     } else {
         $x["delete"] = "Delete option";
     }
     echo Ht::select("optfp{$id}", $x, $o->position, array("id" => "optfp{$id}")), "</div></div></td>\n";
     echo "<td class='pad fn3'><div class='f-i'><div class='f-c'>", $sv->label("optdt{$id}", "Display"), "</div><div class='f-e'>";
     echo Ht::select("optdt{$id}", ["default" => "Default", "prominent" => "Prominent", "topics" => "With topics", "submission" => "Near submission"], $o->display_name(), array("id" => "optdt{$id}")), "</div></div></td>\n";
     if (isset($otypes["pdf:final"])) {
         echo "<td class='pad fx2'><div class='f-i'><div class='f-c'>&nbsp;</div><div class='f-e hint' style='margin-top:0.7ex'>(Set by accepted authors during final version submission period)</div></div></td>\n";
     }
     echo "</tr></table>";
     $rows = 3;
     if (PaperOption::type_has_selector($optvt) && count($o->selector)) {
         $value = join("\n", $o->selector) . "\n";
         $rows = max(count($o->selector), 3);
     } else {
         $value = "";
     }
     echo "<div id='foldoptv{$id}' class='", PaperOption::type_has_selector($optvt) ? "foldo" : "foldc", "'><div class='fx'>", "<div class='hint' style='margin-top:1ex'>Enter choices one per line.  The first choice will be the default.</div>", Ht::textarea("optv{$id}", $value, $sv->sjs("optv{$id}", array("rows" => $rows, "cols" => 50))), "</div></div>";
     echo "</td></tr></table>\n";
 }
开发者ID:vaskevich,项目名称:nu-admissions-review,代码行数:94,代码来源:s_subform.php


示例8: prepareVariables

 function prepareVariables($variables, $userid = NULL)
 {
     if ($userid == NULL) {
         if (isset($_SESSION["userinfo"]["id"])) {
             $userid = $_SESSION["userinfo"]["id"];
         }
     }
     if ($variables["id"]) {
         //i.e. only on update
         unset($this->fields["type"]);
         if ($variables["typeCheck"] == "TS" && isset($variables["repeating"]) && $variables["lastrepeat"]) {
             $variables["lastrepeat"] = NULL;
             $variables["firstrepeat"] = NULL;
             $variables["timesrepeated"] = NULL;
             if (isset($variables["completed"])) {
                 $variables["completedChange"] = 0;
             }
             $this->resetRepeating($variables["id"]);
         }
         //end if
     }
     //end if
     if (isset($variables["thetype"])) {
         $variables["type"] = $variables["thetype"];
     }
     if (!isset($variables["completed"])) {
         $variables["completeddate"] = NULL;
     }
     if ($variables["enddate"] == "") {
         $variables["enddate"] = NULL;
         $variables["endtime"] = NULL;
     }
     if ($variables["startdate"] == "") {
         $variables["startdate"] = NULL;
         $variables["starttime"] = NULL;
     }
     if (isset($variables["repeating"])) {
         $thename = "Every ";
         switch ($variables["repeattype"]) {
             case "Daily":
                 if ($variables["repeatevery"] != 1) {
                     $thename .= $variables["repeatevery"] . " days";
                 } else {
                     $thename .= " day ";
                 }
                 $variables["repeatechlist"] = NULL;
                 $variables["repeatontheday"] = NULL;
                 $variables["repeatontheweek"] = NULL;
                 break;
             case "Weekly":
                 if ($variables["repeatevery"] != 1) {
                     $thename .= $variables["repeatevery"] . " weeks on";
                 } else {
                     $thename .= "week on";
                 }
                 foreach (explode("::", $variables["eachlist"]) as $dayNum) {
                     $tempday = $dayNum != 7 ? $dayNum + 1 : 1;
                     $thename .= " " . nl_langinfo(constant("ABDAY_" . $tempday)) . ", ";
                 }
                 $thename = substr($thename, 0, strlen($thename) - 2);
                 if (strpos($thename, ",") != false) {
                     $thename = strrev(preg_replace("/,/", "dna ", strrev($thename), 1));
                 }
                 $variables["repeateachlist"] = $variables["eachlist"];
                 $variables["repeatontheday"] = NULL;
                 $variables["repeatontheweek"] = NULL;
                 break;
             case "Monthly":
                 if ($variables["repeatevery"] != 1) {
                     $thename .= $variables["repeatevery"] . " months";
                 } else {
                     $thename .= "month";
                 }
                 $thename .= " on the";
                 if ($variables["monthlyWhat"] == 1) {
                     foreach (explode("::", $variables["eachlist"]) as $dayNum) {
                         $thename .= " " . ordinal($dayNum) . ", ";
                     }
                     $thename = substr($thename, 0, strlen($thename) - 2);
                     if (strpos($thename, ",") != false) {
                         $thename = strrev(preg_replace("/,/", "dna ", strrev($thename), 1));
                     }
                     $variables["repeateachlist"] = $variables["eachlist"];
                     $variables["repeatontheday"] = NULL;
                     $variables["repeatontheweek"] = NULL;
                 } else {
                     foreach ($this->weekArray as $key => $value) {
                         if ($value == $variables["monthlyontheweek"]) {
                             $thename .= " " . strtolower($key);
                         }
                     }
                     foreach ($this->dayOfWeekArray as $key => $value) {
                         if ($value == $variables["monthlyontheday"]) {
                             $thename .= " " . $key;
                         }
                     }
                     $variables["repeateachlist"] = NULL;
                     $variables["repeatontheday"] = $variables["monthlyontheday"];
                     $variables["repeatontheweek"] = $variables["monthlyontheweek"];
                 }
//.........这里部分代码省略.........
开发者ID:Jacquesvw,项目名称:phpBMS,代码行数:101,代码来源:notes.php


示例9: _l

                        <?php 
    if (module_config::c('ticket_allow_priority', 0)) {
        ?>

                        <tr>
                            <th class="width1">
                                <?php 
        echo _l('Priority Support');
        ?>

                            </th>
                            <td>
                                <?php 
        module_template::init_template('ticket_priority_support', '<em>New!</em> Need a <strong>fast</strong> reply? Priority support will place your ticket at the front of the support queue. <br/>Priority Support Cost: {COST}<br/>{CHECKBOX} <label for="do_priority">Yes, upgrade to <strong>priority support</strong> and move my ticket to position: {TICKET_POSITION}</label>', 'Displayed at the bottom of ticket support signup', 'code', array('cost' => 'Cost as defined by ticket_priority_code advanced setting', 'TICKET_POSITION' => 'displays the string (example) "1st out of 44"'));
        $template = module_template::get_template_by_key('ticket_priority_support');
        $template->assign_values(array('cost' => dollar(module_config::c('ticket_priority_cost', 10), true, module_config::c('ticket_priority_currency', 1)), 'TICKET_POSITION' => _l('%s out of %s', ordinal(module_ticket::ticket_count('priority') + 1), $ticket['total_pending']), 'CHECKBOX' => '<input type="checkbox" name="do_priority" id="do_priority" value="1">'));
        echo $template->replace_content();
        ?>


                            </td>
                        </tr>
                            <?php 
    }
    ?>

                        <?php 
    if (module_config::c('ticket_turn_around_days_show', 1)) {
        ?>

                        <tr>
开发者ID:sgh1986915,项目名称:php-crm,代码行数:31,代码来源:ticket_customer_new.php


示例10: toString

 public function toString()
 {
     global $app;
     // lack of quoted attributes prevents weird double escaping errors
     $m = "<div class=bdp>";
     foreach ($this->combos as $combo) {
         if ($combo->vendorName == 'Bookstore' && $combo->numItems != 1) {
             $bookstoreMulti = 'true';
         } else {
             $bookstoreMulti = 'false';
         }
         $vendorName = $combo->vendorName == 'Bookstore' ? 'the bookstore' : $combo->vendorName;
         $m .= "<p><span class=vendor data-bookstore={$bookstoreMulti}>";
         $m .= "{$combo->numItems} book" . ($combo->numItems != 1 ? 's' : '');
         $m .= " from {$vendorName}</span>";
         if ($bookstoreMulti == 'false') {
             $url = $app->urlFor('redirect', array('url' => '', 'type' => 'bdp', 'vendor' => $combo->vendorName)) . $combo->url;
             $label = $combo->vendorName == 'Chegg' ? 'Rent' : 'Buy';
             $m .= "<button data-url={$url}>{$label}</button></p>";
         } else {
             $m .= "</span></p>";
             foreach (array_values($combo->prices) as $i => $price) {
                 $num = ordinal($i + 1);
                 $url = $app->urlFor('redirect', array('url' => '', 'type' => 'bdp', 'vendor' => $price->vendorName)) . $price->url;
                 $m .= "<p><span class=aBookstoreBook>{$num} Book</span>" . "<button data-url={$url}>Buy</button></p>";
             }
         }
     }
     $m .= "</div>";
     return $m;
 }
开发者ID:therealchiko,项目名称:getchabooks,代码行数:31,代码来源:BestDealPeriod.php


示例11: get_grade_name

function get_grade_name($grade_id)
{
    return ordinal($grade_id) . " " . "Grade";
}
开发者ID:hasithakj,项目名称:sep,代码行数:4,代码来源:class_helper.php


示例12: _l

							<tr>
								<th>
									<?php 
echo _l('Status');
?>

								</th>
								<td>
									<?php 
//echo print_select_box(module_ticket::get_statuses(),'status_id',$ticket['status_id'],'',true,false,true);
$s = module_ticket::get_statuses();
echo $s[$ticket['status_id']];
if ($ticket['status_id'] == 2 || $ticket['status_id'] == 3 || $ticket['status_id'] == 5) {
    if (module_config::c('ticket_show_position', 1)) {
        echo ' ';
        echo _l('(%s out of %s tickets)', ordinal($ticket['position']), module_ticket::ticket_count('pending'));
    }
}
?>

								</td>
							</tr>
						</tbody>
					</table>

	                <?php 
$fieldset_data = array('heading' => array('title' => _l('Ticket Details'), 'type' => 'h3'), 'elements_before' => ob_get_clean());
echo module_form::generate_fieldset($fieldset_data);
unset($fieldset_data);
if (file_exists(dirname(__FILE__) . '/../inc/ticket_priority_sidebar.php')) {
    include dirname(__FILE__) . '/../inc/ticket_priority_sidebar.php';
开发者ID:sgh1986915,项目名称:php-crm,代码行数:31,代码来源:ticket_customer_view.php


示例13: date

$newDateMonth = date("M", strtotime($date));
$content = $_POST['nowcontent'];
$CTA = $_POST['nowCTA'];
?>

<?php 
function ordinal($number)
{
    $ends = array('<span class="ord">th</span>', '<span class="ord">st</span>', '<span class="ord">nd</span>', '<span class="ord">rd</span>', '<span class="ord">th</span>', '<span class="ord">th</span>', '<span class="ord">th</span>', '<span class="ord">th</span>', '<span class="ord">th</span>', '<span class="ord">th</span>');
    if ($number % 100 >= 11 && $number % 100 <= 13) {
        return $number . '<span class="ord">th</span>';
    } else {
        return $number . $ends[$number % 10];
    }
}
$newDateDayPrint = ordinal($newDateDay);
?>

<div class="container">
    <div class="date">
    <?php 
echo $newDateDayPrint;
?>
    <?php 
echo htmlspecialchars($newDateMonth);
?>
<br/>
        Right Now
        </div>
    <div class="now-content">
        <?php 
开发者ID:jgadsbypeet,项目名称:rightnow,代码行数:31,代码来源:output.php


示例14: ordinal

     $notificationMessage = "For some reason, the reset email could not be sent.<br>Please try again later.";
     break;
 case "couldnotsetresetlink":
     $notificationMessage = "The email address specified for password reset does not have an account.";
     break;
 case "emailresetinvalid":
     $notificationMessage = "The email address specified for password reset didn't work.<br>Please try again.";
     break;
 case "resetemailblank":
     $notificationMessage = "The password reset form somehow got submitted without some essential information.<br>Please try filling it out again.";
     break;
 case "loginfailed":
     $notificationMessage = "We couldn't log you in because your email or password was incorrect.<br>";
     $_SESSION['loginfailures'] += 1;
     if ($_SESSION['loginfailures'] < 10) {
         $notificationMessage .= "This is your <strong>" . ordinal($_SESSION['loginfailures']) . "</strong> failed attempt.<br>After 10 failures, you will not be able to log in for 1 hour.<br>Please try again.";
     } else {
         $_SESSION['loginlockouttime'] = time();
         $notificationMessage .= "Since you failed to log in successfully 10 times, you may not try again for 1 hour.";
     }
     break;
 case "emaildoesnotexist":
     $notificationMessage = "The email address you entered doesn't have an account.<br>Would you like to <span class='clickable' onclick='ShowInfo(\"loginForm\")'>create an account</span>?";
     break;
 case "emailinvalid":
     $notificationMessage = "The email address you entered didn't work.<br>Please try another.";
     break;
 case "resetlinkfailed":
     $notificationMessage = "The reset link used is not valid. Please make sure you have copied it correctly.";
     break;
 case "resetlinkinvalid":
开发者ID:Alamantus,项目名称:Lexiconga,代码行数:31,代码来源:notificationconditiontree.php


示例15: if

				<td class="text-right"><b>Total</b></td>
				<td><?php 
echo $sumcfc;
?>
</td>
			</tr>
			
			<tr>
				<td colspan="2" class="text-center active"><h4>Ranking</h4></td>
			</tr><?
			if($ranktfca == 1){ 
					$ranktfcaGlyph = '<abbr title="The King of flashcards!"><span class="glyphicon glyphicon-king" aria-hidden="true"></span></abbr>';
				}else if($ranktfca == 2){ 
					$ranktfcaGlyph = '<abbr title="This player is ranked #2 for Flashcards!"><span class="glyphicon glyphicon-knight" aria-hidden="true"></span></abbr>';
				}else if($ranktfca == 3){ 
					$ranktfcaGlyph = '<abbr title="This player is ranked #3 for Flashcards!"><span class="glyphicon glyphicon-bishop" aria-hidden="true"></span></abbr>';
				}else{ $ranktfcaGlyph = '';}?>
			<tr >
				<td>Flashcard Rank</td>
				<td><a href='http://www.JPVocab.com/player.php?player=<?php 
echo $_GET['player'];
?>
&report=flashcardrank'><?php 
echo ordinal($ranktfca) . " <span class='pull-right'>" . $ranktfcaGlyph . '</span>';
?>
</a></td>
			</tr>
		</table>
	</div>
	<div class="col-md-2"></div>
</div><!-- end .row-->
开发者ID:Knixd,项目名称:JPVocab,代码行数:31,代码来源:summary.php


示例16: rand

				output("None in the land are mightier than you!`n");
			}
			if ($session['user']['referer']>0 && $session['user']['level']>=4 && $session['user']['refererawarded']<1){
				$sql = "UPDATE accounts SET donation=donation+25 WHERE acctid={$session['user']['referer']}";
				db_query($sql);
				$session['user']['refererawarded']=1;
				systemmail($session['user']['referer'],"`%One of your referrals advanced!`0","`%{$session['user']['name']}`# has advanced to level `^{$session['user']['level']}`#, and so you have earned `^25`# points!");
			}
			increment_specialty();
			addnav("Question Master","train.php?op=question");
			addnav("Challenge Master","train.php?op=challenge");
			if ($session['user']['superuser'] > 2) {
				addnav("Superuser Gain level","train.php?op=challenge&victory=1");
			}
			addnav("Return to the Village","village.php");
			addnews("`%".$session[user][name]."`3 has defeated ".($session[user][sex]?"her":"his")." master, `%$badguy[creaturename]`3 to advance to level `^".$session[user][level]."`3 on ".($session[user][sex]?"her":"his")." `^".ordinal($session[user][age])."`3 day!!");
			$badguy=array();
			$session[user][hitpoints] = $session[user][maxhitpoints];
			//$session[user][seenmaster]=1;
		}else{
			if($defeat){
				//addnav("Daily news","news.php");
				$sql = "SELECT taunt FROM taunts ORDER BY rand(".e_rand().") LIMIT 1";
				$result = db_query($sql) or die(db_error(LINK));
				$taunt = db_fetch_assoc($result);
				$taunt = str_replace("%s",($session[user][gender]?"him":"her"),$taunt[taunt]);
				$taunt = str_replace("%o",($session[user][gender]?"he":"she"),$taunt);
				$taunt = str_replace("%p",($session[user][gender]?"his":"her"),$taunt);
				$taunt = str_replace("%x",($session[user][weapon]),$taunt);
				$taunt = str_replace("%X",$badguy[creatureweapon],$taunt);
				$taunt = str_replace("%W",$badguy[creaturename],$taunt);
开发者ID:BackupTheBerlios,项目名称:dragonsaga-svn,代码行数:31,代码来源:train.php


示例17: _reseed

 function _reseed($id)
 {
     $options = $valid_options = $pool_sizes = $ordinal_counts = $save = array();
     list($type, $pools) = explode('_', $this->data['Game']['pools']);
     $stages = Set::extract('/Pool/stage', $this->division);
     if (!empty($stages)) {
         $last_stage = max($stages);
     } else {
         $last_stage = 0;
     }
     $this_stage = $last_stage + 1;
     // Check if the previous stage was crossovers
     $crossovers = Set::extract("/Pool[type=crossover][stage={$last_stage}]", $this->division);
     $crossover_names = Set::extract('/Pool/name', $crossovers);
     if (!empty($crossovers)) {
         $crossover_stage = $last_stage;
         --$last_stage;
     } else {
         $crossover_stage = 0;
     }
     // List of finishing options for each pool
     foreach ($this->division['Pool'] as $pool) {
         if ($pool['stage'] == $last_stage) {
             $group = "Pool {$pool['name']}";
             $pool_sizes[] = count($pool['PoolsTeam']);
             for ($i = 1; $i <= count($pool['PoolsTeam']); ++$i) {
                 $in_crossover = Set::extract("/Pool/PoolsTeam[dependency_pool_id={$pool['id']}][dependency_id={$i}]", $crossovers);
                 if (empty($in_crossover)) {
                     $key = "{$pool['name']}-{$i}";
                     $options[$group][$key] = ordinal($i) . " ({$key})";
                     if (!array_key_exists($i, $ordinal_counts)) {
                         $ordinal_counts[$i] = 1;
                     } else {
                         ++$ordinal_counts[$i];
                     }
                 }
             }
             if (!empty($options[$group])) {
                 $valid_options = array_merge($valid_options, $options[$group]);
             }
         }
     }
     // List of finishing options between pools
     for ($ordinal = 1; $ordinal <= max($pool_sizes); ++$ordinal) {
         if (array_key_exists($ordinal, $ordinal_counts)) {
             $group = ordinal($ordinal) . ' ' . __('place teams', true);
             // List of finishing options for each pool
             for ($i = 1; $i <= $ordinal_counts[$ordinal]; ++$i) {
                 $in_crossover = Set::extract("/Pool/PoolsTeam[dependency_ordinal={$ordinal}][dependency_id={$i}]", $crossovers);
                 if (empty($in_crossover)) {
                     $key = "{$ordinal}-{$i}";
                     $options[$group][$key] = ordinal($i) . " ({$key})";
                 }
             }
             $valid_options = array_merge($valid_options, $options[$group]);
         }
     }
     // Add any crossovers
     foreach ($crossovers as $crossover) {
         $options['Crossovers']["{$crossover['Pool']['name']}-1"] = "Winner of {$crossover['Pool']['name']}";
         $options['Crossovers']["{$crossover['Pool']['name']}-2"] = "Loser of {$crossover['Pool']['name']}";
         $valid_options = array_merge($valid_options, $options['Crossovers']);
     }
     // Validate any data posted to us, building the data to save as we go
     if ($this->data['Game']['step'] == 'reseed') {
         $proceed = true;
         // Check that no qualifier was chosen twice
         $qualifiers = $qualifier_type = array();
         foreach ($this->data['Game']['name'] as $key => $name) {
             $qualifiers = array_merge($qualifiers, $this->data['Game'][$name]);
             $save[$key] = array('Pool' => array('division_id' => $id, 'name' => $name, 'stage' => $this_stage, 'type' => $type == 'crossover' ? 'crossover' : 'power'), 'PoolsTeam' => array());
             foreach ($this->data['Game'][$name] as $qkey => $qualifier) {
                 // Make sure that some weird option didn't get selected.
                 if (!array_key_exists($qualifier, $valid_options)) {
                     $this->Session->setFlash(sprintf(__('Invalid qualifier %s.', true), $qualifier), 'default', array('class' => 'info'));
                     $proceed = false;
                     break;
                 }
                 // Make sure that we haven't got both pool and ordinal types selected
                 // for any particular "tier" in the pools. For example, A-1 can be used
                 // with B-1, but not with 1-1. Crossovers can be used with either.
                 list($pool, $pos) = explode('-', $qualifier);
                 $numeric = is_numeric($pool);
                 if (!in_array($pool, $crossover_names)) {
                     if (array_key_exists($pos, $qualifier_type)) {
                         if ($qualifier_type[$pos]['value'] != $numeric) {
                             $this->Session->setFlash(sprintf(__('You have selected %s and %s, but you cannot mix "pool"-type options with "ordinal"-type options; both could end up being the same team.', true), $qualifier_type[$pos]['qualifier'], $qualifier), 'default', array('class' => 'info'));
                             $proceed = false;
                             break;
                         }
                     } else {
                         $qualifier_type[$pos] = array('qualifier' => $qualifier, 'value' => $numeric);
                     }
                 }
                 if ($numeric) {
                     $save[$key]['PoolsTeam'][] = array('alias' => "{$name}{$qkey}", 'dependency_type' => 'ordinal', 'dependency_ordinal' => $pool, 'dependency_id' => $pos);
                 } else {
                     $pool_id = current(Set::extract("/Pool[name={$pool}]/id", $this->division));
                     $save[$key]['PoolsTeam'][] = array('alias' => "{$name}{$qkey}", 'dependency_type' => 'pool', 'dependency_pool_id' => $pool_id, 'dependency_id' => $pos);
                 }
//.........这里部分代码省略.........
开发者ID:roboshed,项目名称:Zuluru,代码行数:101,代码来源:schedules_controller.php


示例18: external_hook


//.........这里部分代码省略.........
                                                    </li>
                                                    <?php 
                        }
                        ?>

                                            </ul>
                                        </td>
                                        <td width="50%" valign="top">
                                            <ul><?php 
                        foreach ($faqs as $data) {
                            $faq = module_faq::get_faq($data['faq_id']);
                            ?>

                                                    <li>
                                                        <a href="<?php 
                            echo module_faq::link_open_public($data['faq_id'], false);
                            ?>
" target="_blank"><?php 
                            echo htmlspecialchars($faq['question']);
                            ?>
</a>
                                                    </li>
                                                    <?php 
                        }
                        ?>

                                            </ul>
                                        </td>
                                    </tr>
                                    </tbody>
                                </table>

                            </td>
                        </tr>
                        <?php 
                        $html = preg_r 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP orsee_db_load_array函数代码示例发布时间:2022-05-15
下一篇:
PHP ordersupplier_prepare_head函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap