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

PHP l_t函数代码示例

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

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



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

示例1: send

 /**
  * Send a message to the public forum. The variables passed are assumed to be already sanitized
  *
  * @param int $toID User/Thread ID to send to
  * @param int $fromUserID UserID sent from
  * @param string $message The message to be sent
  * @param string[optional] $subject The subject
  * @param string[optional] $type 'Bulletin'(GameMaster->Player) 'ThreadStart'(User->All) 'ThreadReply'(User->Thread)
  *
  * @return int The message ID
  */
 public static function send($toID, $fromUserID, $message, $subject = "", $type = 'Bulletin')
 {
     global $DB;
     if (defined('AdminUserSwitch')) {
         $fromUserID = AdminUserSwitch;
     }
     $message = self::linkify($message);
     $sentTime = time();
     if (65000 < strlen($message)) {
         throw new Exception(l_t("Message too long"));
     }
     libCache::wipeDir(libCache::dirName('forum'));
     $DB->sql_put("INSERT INTO wD_ForumMessages\r\n\t\t\t\t\t\tSET toID = " . $toID . ", fromUserID = " . $fromUserID . ", timeSent = " . $sentTime . ",\r\n\t\t\t\t\t\tmessage = '" . $message . "', subject = '" . $subject . "', replies = 0,\r\n\t\t\t\t\t\ttype = '" . $type . "', latestReplySent = 0");
     $id = $DB->last_inserted();
     if ($type == 'ThreadReply') {
         $DB->sql_put("UPDATE wD_ForumMessages " . "SET latestReplySent = " . $id . ", replies = replies + 1 WHERE ( id=" . $id . " OR id=" . $toID . " )");
     } else {
         $DB->sql_put("UPDATE wD_ForumMessages SET latestReplySent = id WHERE id = " . $id);
     }
     $tabl = $DB->sql_tabl("SELECT t.id FROM wD_ForumMessages t LEFT JOIN wD_ForumMessages r ON ( r.toID=t.id AND r.fromUserID=" . $fromUserID . " AND r.type='ThreadReply' ) WHERE t.type='ThreadStart' AND ( t.fromUserID=" . $fromUserID . " OR r.id IS NOT NULL ) GROUP BY t.id");
     $participatedThreadIDs = array();
     while (list($participatedThreadID) = $DB->tabl_row($tabl)) {
         $participatedThreadIDs[$participatedThreadID] = $participatedThreadID;
     }
     $cacheUserParticipatedThreadIDsFilename = libCache::dirID('users', $fromUserID) . '/readThreads.js';
     file_put_contents($cacheUserParticipatedThreadIDsFilename, 'participatedThreadIDs = $A([' . implode(',', $participatedThreadIDs) . ']);');
     return $id;
 }
开发者ID:Yoyoyozo,项目名称:webDiplomacy,代码行数:39,代码来源:message.php


示例2: turnAsDate

 public function turnAsDate($turn)
 {
     if ($turn == -1) {
         return l_t("Pre-game");
     } else {
         return ($turn % 2 ? l_t("Autumn") . ", " : l_t("Spring") . ", ") . (floor($turn / 2) + 1);
     }
 }
开发者ID:Yoyoyozo,项目名称:webDiplomacy,代码行数:8,代码来源:variant.php


示例3: formHTML

 public function formHTML()
 {
     print '<form method="post" name="search">';
     foreach ($this->searchItems as $item) {
         print $item->formHTML();
     }
     print '<br /><input type="submit" class="form-submit" value="' . l_t('Search') . '" />';
     print '</form>';
 }
开发者ID:Yoyoyozo,项目名称:webDiplomacy,代码行数:9,代码来源:search.php


示例4: membersList

 /**
  * Display a table with the vital members info; who is finalized, who has sent messages etc, each member
  * takes up a short, thin column.
  * @return string
  */
 function membersList()
 {
     global $User;
     // $membersList[$i]=array($nameOrCountryID,$iconOne,$iconTwo,...);
     $membersList = array();
     if ($this->Game->phase == 'Pre-game') {
         $count = count($this->ByID);
         for ($i = 0; $i < $count; $i++) {
             $membersList[] = array($i + 1, '<img src="' . l_s('images/icons/tick.png') . '" alt=" " title="' . l_t('Player joined, spot filled') . '" />');
         }
         for ($i = $count; $i <= count($this->Game->Variant->countries); $i++) {
             $membersList[] = array($i + 1, '');
         }
     } else {
         for ($countryID = 1; $countryID <= count($this->Game->Variant->countries); $countryID++) {
             $Member = $this->ByCountryID[$countryID];
             //if ( $User->id == $this->ByCountryID[$countryID]->userID )
             //	continue;
             //elseif( $Member->status != 'Playing' && $Member->status != 'Left' )
             //	continue;
             $membersList[] = $Member->memberColumn();
         }
     }
     $buf = '<table class="homeMembersTable">';
     $rowsCount = count($membersList[0]);
     $alternate = libHTML::$alternate;
     for ($i = 0; $i < $rowsCount; $i++) {
         $rowBuf = '';
         $dataPresent = false;
         $remainingPlayers = count($this->ByID);
         $remainingWidth = 100;
         foreach ($membersList as $data) {
             if ($data[$i]) {
                 $dataPresent = true;
             }
             if ($remainingPlayers > 1) {
                 $width = floor($remainingWidth / $remainingPlayers);
             } else {
                 $width = $remainingWidth;
             }
             $remainingPlayers--;
             $remainingWidth -= $width;
             $rowBuf .= '<td style="width:' . $width . '%" class="barAlt' . libHTML::alternate() . '">' . $data[$i] . '</td>';
         }
         libHTML::alternate();
         if ($dataPresent) {
             $buf .= '<tr>' . $rowBuf . '</tr>';
         }
         libHTML::$alternate = $alternate;
     }
     libHTML::alternate();
     $buf .= '</table>';
     return $buf;
 }
开发者ID:Yoyoyozo,项目名称:webDiplomacy,代码行数:59,代码来源:membershome.php


示例5: dir

 public static function dir($dir, array $dirParts)
 {
     $name = array_pop($dirParts);
     if (is_null($name)) {
         return $dir;
     }
     if (!is_dir($dir . '/' . $name) && !mkdir($dir . '/' . $name, 0775, true)) {
         throw new Exception(l_t("Couldn't make cache directory '%s'.", $dir . '/' . $name));
     }
     return self::dir($dir . '/' . $name, $dirParts);
 }
开发者ID:Yoyoyozo,项目名称:webDiplomacy,代码行数:11,代码来源:cache.php


示例6: iconText

 function iconText()
 {
     if ($this->None) {
         return l_t('No orders to submit');
     } elseif ($this->Ready) {
         return l_t('Ready to move to the next turn');
     } elseif ($this->Completed) {
         return l_t('Orders completed, but not ready for next turn');
     } elseif ($this->Saved) {
         return l_t('Orders saved, but not completed!');
     } else {
         return l_t('No orders submitted!');
     }
 }
开发者ID:Yoyoyozo,项目名称:webDiplomacy,代码行数:14,代码来源:set.php


示例7: formHTML

    function formHTML()
    {
        $output = "";
        $output .= '<input type="radio" 
			value="' . $this->value . '" 
			' . ($this->locked ? '' : 'name="' . $this->htmlName . '"') . ' 
			' . ($this->checked ? 'checked ' : '') . '
			' . ($this->locked ? 'disabled ' : '') . '/> 
			' . l_t($this->label);
        if ($this->locked) {
            $output .= ' <input type="hidden" name="' . $this->htmlName . '" value="' . $this->value . '" />';
        }
        return $output;
    }
开发者ID:Yoyoyozo,项目名称:webDiplomacy,代码行数:14,代码来源:searchOptions.php


示例8: toTerrIDCheck

 protected function toTerrIDCheck()
 {
     $this->toTerrID = (int) $this->toTerrID;
     if ($this->type == 'Build Army') {
         /*
          * Creating an army at which territory
          *
          * Unoccupied supply centers owned by our country, which the specified unit type
          * can be built in. If a parent coast is found return Child entries.
          */
         return $this->sqlCheck("SELECT t.id\r\n\t\t\t\tFROM wD_TerrStatus ts\r\n\t\t\t\tINNER JOIN wD_Territories t\r\n\t\t\t\t\tON ( t.id = ts.terrID )\r\n\t\t\t\tWHERE ts.gameID = " . $this->gameID . "\r\n\t\t\t\t\tAND ts.countryID = " . $this->countryID . "\r\n\t\t\t\t\tAND t.countryID = " . $this->countryID . "\r\n\t\t\t\t\tAND ts.occupyingUnitID IS NULL\r\n\t\t\t\t\tAND t.supply = 'Yes' AND NOT t.type='Sea'\r\n\t\t\t\t\tAND NOT t.coast = 'Child'\r\n\t\t\t\t\tAND t.id=" . $this->toTerrID . "\r\n\t\t\t\t\tAND t.mapID=" . MAPID . "\r\n\t\t\t\tLIMIT 1");
     } elseif ($this->type == 'Build Fleet') {
         return $this->sqlCheck("SELECT IF(t.coast='Parent', coast.id, t.id) as terrID\r\n\t\t\t\tFROM wD_TerrStatus ts\r\n\t\t\t\tINNER JOIN wD_Territories t ON ( t.id = ts.terrID )\r\n\t\t\t\tLEFT JOIN wD_Territories coast ON ( coast.mapID=t.mapID AND coast.coastParentID = t.id AND NOT t.id = coast.id )\r\n\t\t\t\tWHERE ts.gameID = " . $this->gameID . "\r\n\t\t\t\t\tAND ts.countryID = " . $this->countryID . "\r\n\t\t\t\t\tAND t.countryID = " . $this->countryID . "\r\n\t\t\t\t\tAND ts.occupyingUnitID IS NULL\r\n\t\t\t\t\tAND t.supply = 'Yes'\r\n\t\t\t\t\tAND t.type = 'Coast'\r\n\t\t\t\t\tAND ( t.coast='No' OR ( t.coast='Parent' AND NOT coast.id IS NULL ) )\r\n\t\t\t\t\tAND (\r\n\t\t\t\t\t\t(t.coast='Parent' AND coast.id=" . $this->toTerrID . ")\r\n\t\t\t\t\t\tOR t.id=" . $this->toTerrID . "\r\n\t\t\t\t\t)\r\n\t\t\t\t\tAND t.mapID=" . MAPID . "\r\n\t\t\t\tLIMIT 1");
     } elseif ($this->type == 'Destroy') {
         /*
          * Destroying a unit at which territory
          */
         return $this->sqlCheck("SELECT terrID\n\t\t\t\tFROM wD_TerrStatus\r\n\t\t\t\tWHERE gameID = " . $this->gameID . "\r\n\t\t\t\t\tAND occupyingUnitID IS NOT NULL\r\n\t\t\t\t\tAND countryID = " . $this->countryID . "\r\n\t\t\t\t\tAND terrID = " . $this->toTerrID . "\r\n\t\t\t\tLIMIT 1");
     } else {
         throw new Exception(l_t("Checking the territory when not required."));
     }
 }
开发者ID:Yoyoyozo,项目名称:webDiplomacy,代码行数:22,代码来源:builds.php


示例9: send

 /**
  * Send a game message. Messages are sanitized
  *
  * @param string $toCountryID The countryID being sent to. 'Global' sends to all.
  * @param string $fromCountryID The county being sent from. 'GameMaster' can also be used.
  * @param string|array $message The message(s) to be sent (Can be an array of messages for)
  * @param int[optional] $gameID The game ID to use. If not given the current global Game is sent to.
  */
 public static function send($toCountryID, $fromCountryID, $message, $gameID = -1)
 {
     global $DB, $Game;
     if (!is_object($Game)) {
         $Variant = libVariant::loadFromGameID($gameID);
         $Game = $Variant->Game($gameID);
     }
     $message = $DB->msg_escape($message);
     if (!is_numeric($toCountryID)) {
         $toCountryID = 0;
     }
     if (!is_numeric($fromCountryID)) {
         $message = '<strong>' . $fromCountryID . ':</strong> ' . $message;
         $fromCountryID = 0;
     }
     if (65000 < strlen($message)) {
         throw new Exception(l_t("Message too long"));
     }
     $DB->sql_put("INSERT INTO wD_GameMessages\r\n\t\t\t\t\t(gameID, toCountryID, fromCountryID, turn, message, timeSent)\r\n\t\t\t\t\tVALUES(" . $Game->id . ",\r\n\t\t\t\t\t\t" . $toCountryID . ",\r\n\t\t\t\t\t\t" . $fromCountryID . ",\r\n\t\t\t\t\t\t" . $Game->turn . ",\r\n\t\t\t\t\t\t'" . $message . "',\r\n\t\t\t\t\t\t" . time() . ")");
     if ($toCountryID != $fromCountryID || $fromCountryID == 0) {
         libGameMessage::notify($toCountryID, $fromCountryID);
     }
 }
开发者ID:Yoyoyozo,项目名称:webDiplomacy,代码行数:31,代码来源:gamemessage.php


示例10: terrJSON

 /**
  * Saves the territories.js JSON file which the order-generation code need to know the board layout.
  *
  * @param string $jsonFileLocation Where the file will be saved to
  * @param int $mapID
  */
 public static function terrJSON($jsonFileLocation, $mapID)
 {
     global $DB;
     $territories = array();
     $tabl = $DB->sql_tabl("SELECT id, name, type, supply, countryID, coast, coastParentID, smallMapX, smallMapY\r\n\t\t\tFROM wD_Territories\r\n\t\t\tWHERE mapID=" . $mapID . "\r\n\t\t\tORDER BY id ASC");
     $selectVars = '';
     while ($row = $DB->tabl_hash($tabl)) {
         $row['Borders'] = array();
         $row['CoastalBorders'] = array();
         $row['name'] = l_t($row['name']);
         $territories[$row['id']] = $row;
     }
     $tabl = $DB->sql_tabl("SELECT * FROM wD_Borders WHERE mapID=" . $mapID);
     while ($row = $DB->tabl_hash($tabl)) {
         // id, a, f saves space
         $territories[$row['fromTerrID']]['Borders'][] = array('id' => $row['toTerrID'], 'a' => $row['armysPass'] == 'Yes', 'f' => $row['fleetsPass'] == 'Yes');
     }
     $tabl = $DB->sql_tabl("SELECT * FROM wD_CoastalBorders WHERE mapID=" . $mapID);
     while ($row = $DB->tabl_hash($tabl)) {
         $territories[$row['fromTerrID']]['CoastalBorders'][] = array('id' => $row['toTerrID'], 'a' => $row['armysPass'] == 'Yes', 'f' => $row['fleetsPass'] == 'Yes');
     }
     $javascript = "function loadTerritories() {\n" . 'Territories = $H(' . json_encode($territories) . ');' . "\n}\n";
     file_put_contents($jsonFileLocation, $javascript);
 }
开发者ID:Yoyoyozo,项目名称:webDiplomacy,代码行数:30,代码来源:install.php


示例11: processTimetxt

 /**
  * Return the next process time in textual format, in terms of time remaining
  *
  * @return string
  */
 function processTimetxt()
 {
     if ($this->processTime < time()) {
         return l_t("Now");
     } else {
         return libTime::remainingText($this->processTime);
     }
 }
开发者ID:Yoyoyozo,项目名称:webDiplomacy,代码行数:13,代码来源:game.php


示例12: l_t

						<input type="hidden" name="viewthread" value="0" />
						<input type="submit" class="form-submit" value="' . l_t('Close') . '" />
				</form>';
    } else {
        print '<a href="forum.php?viewthread=' . $message['id'] . '#' . $message['id'] . '" ' . 'title="' . l_t('Open this thread to view the replies, or post your own reply') . '">' . l_t('Open') . '</a>';
        /*
        print '<form action="forum.php#'.$message['id'].'" method="get">
        				<input type="hidden" name="viewthread" value="'.$message['id'].'" />
        				<input type="submit" class="form-submit" value="Open"
        					title="Open this thread to view the replies, or post your own reply" />
        		</form>';
        */
    }
    print "</div>\r\n\t\t</div>";
}
print '<div class="hr"></div>';
print '<div>';
print $forumPager->html('bottom');
print '<div><a href="#forum">' . l_t('Back to top') . '</a><a name="bottom"></a></div>';
print '<div style="clear:both;"> </div>
		</div>';
print '</div>';
print '</div>';
if ($User->type['User']) {
    if (isset($replyToID)) {
        libHTML::$footerScript[] = 'readThread(' . $replyToID . ', ' . $replyID . ');';
    }
}
libHTML::$footerScript[] = 'makeFormsSafe();';
$_SESSION['lastSeenForum'] = time();
libHTML::footer();
开发者ID:Yoyoyozo,项目名称:webDiplomacy,代码行数:31,代码来源:forum.php


示例13: footerCopyright

    private static function footerCopyright()
    {
        // Version, sourceforge and HTML compliance logos
        return l_t('webDiplomacy version <strong>%s</strong>', number_format(VERSION / 100, 2)) . '<br />
			<a href="http://github.com/kestasjk/webDiplomacy" class="light">GitHub Project</a> | 
			<a href="http://github.com/kestasjk/webDiplomacy/issues" class="light">Bug Reports</a> | <a href="mailto:' . Config::$modEMail . '" class="light">Contact Moderator</a>';
    }
开发者ID:Yoyoyozo,项目名称:webDiplomacy,代码行数:7,代码来源:html.php


示例14: unset

            if ($percentLeft > 0) {
                $percentLeft--;
                $percent = 1;
                continue;
            } else {
                break;
            }
        }
        $percentLeft -= $percent;
        $scCountsByTurn[$turn][$countryID] = $percent;
    }
}
$scRatiosByTurn = $scCountsByTurn;
unset($scCountsByTurn);
if (count($scRatiosByTurn) < 3) {
    print l_t('Game too new to graph.');
    return;
}
print '<div class="variant' . $Variant->name . ' boardGraph" style="width:auto">';
foreach ($scRatiosByTurn as $turn => $scRatiosByCountryID) {
    print '<div class="boardGraphTurn" style="width:auto">';
    //500px">';
    foreach ($scRatiosByCountryID as $countryID => $scRatio) {
        if ($scRatio < 1) {
            continue;
        }
        print '<div class="boardGraphTurnCountry occupationBar' . $countryID . '" ' . 'style="text-align:center; font-size:10pt; font-weight:bold; overflow:hidden;' . 'float:left;width:' . $scRatio . '%">' . $scRatio . '%</div>';
    }
    print '<div style="clear:both"></div>';
    print '</div>';
}
开发者ID:Yoyoyozo,项目名称:webDiplomacy,代码行数:31,代码来源:graph.php


示例15: number_format

            $sql[] = number_format(round($chance, 3), 3);
        }
        $lastLine = "(" . implode(",", $sql) . ")";
        unset($userID);
    }
}
print "<br />";
flush();
print l_t("Indexing") . "<br />";
flush();
$DB->sql_put("ALTER TABLE `Chances` ADD INDEX ( `id` )");
print l_t("Putting chances table data into users table") . "<br />";
flush();
$sqlBuf = "UPDATE wD_Users u INNER JOIN Chances c SET ";
$first = true;
foreach ($Game->Variant->countries as $c) {
    if ($first) {
        $first = false;
    } else {
        $sqlBuf .= ", ";
    }
    $sqlBuf .= "u.Chance" . $c . " = c.Chance" . $c;
}
$sqlBuf .= " WHERE u.id = c.id";
$DB->sql_put($sqlBuf);
print l_t("Deleting chances table");
flush();
$DB->sql_put("DROP TABLE Chances");
$DB->sql_put("COMMIT");
print l_t("Done");
flush();
开发者ID:Yoyoyozo,项目名称:webDiplomacy,代码行数:31,代码来源:resetCountryBalancer.php


示例16: loadTerritories

 /**
  * Load the $this->territoryPositions array
  */
 protected function loadTerritories()
 {
     global $DB;
     $territoryPositionsSQL = "SELECT id, name, ";
     if ($this->smallmap) {
         $territoryPositionsSQL .= 'smallMapX, smallMapY';
     } else {
         $territoryPositionsSQL .= 'mapX, mapY';
     }
     $territoryPositionsSQL .= " FROM wD_Territories WHERE mapID=" . $this->mapID;
     $this->territoryPositions = array();
     $tabl = $DB->sql_tabl($territoryPositionsSQL);
     while (list($terrID, $terrName, $x, $y) = $DB->tabl_row($tabl)) {
         $this->territoryPositions[$terrID] = array($x, $y);
         $this->territoryNames[$terrID] = l_t($terrName);
     }
 }
开发者ID:Yoyoyozo,项目名称:webDiplomacy,代码行数:20,代码来源:drawMap.php


示例17: l_t

            if ($set != '') {
                $set .= ', ';
            }
            $set .= $SQLName . " = '" . $SQLVars[$SQLName] . "'";
            $formOutput .= l_t('%s updated successfully.', $name) . ' ';
        }
        if ($set != '') {
            $DB->sql_put("UPDATE wD_Users SET " . $set . " WHERE id = " . $User->id);
        }
        if (isset($SQLVars['password'])) {
            $DB->sql_put("UPDATE wD_Users SET password = " . $SQLVars['password'] . " WHERE id = " . $User->id);
            libAuth::keyWipe();
            header('refresh: 3; url=logon.php');
            $formOutput .= l_t('Password updated successfully; you have been logged out and ' . 'will need to logon with the new password.') . ' ';
        }
    } catch (Exception $e) {
        $formOutput .= $e->getMessage();
    }
    // We may have received no new data
    if ($formOutput) {
        $User->load();
        // Reload in case of a change
        print '<div class="content"><p class="notice">' . $formOutput . '</p></div>';
    }
}
print libHTML::pageTitle(l_t('User account settings'), l_t('Alter the settings for your webDiplomacy user account; e.g. change your password/e-mail.'));
print '<form method="post">
<ul class="formlist">';
require_once l_r('locales/English/user.php');
print '</div>';
libHTML::footer();
开发者ID:Yoyoyozo,项目名称:webDiplomacy,代码行数:31,代码来源:usercp.php


示例18: link

 public function link()
 {
     return '<a class="light" href="variants.php#' . $this->name . '">' . l_t($this->fullName) . '</a>';
 }
开发者ID:Yoyoyozo,项目名称:webDiplomacy,代码行数:4,代码来源:variant.php


示例19: _compare

 /**
  * Compares numeric values using the max and min possible values returned, and will
  * throw a paradox if the comparison cannot be made. $hisValueSource can be a static integer
  * value, or it can be an array of a dependencyNode, and the name of the value to be
  * compared with from the dependencyNode.
  *
  * This function behaves like the __call wrapper function, except instead of wrapping
  * true/false decisions it wraps numeric comparisons in such a way that they behave like
  * true/false decisions
  *
  * @param string $myValueName What this node is comparing
  * @param string $comparison Greater, smaller, equal, etc
  * @param int|array $hisValueSource A max/min array, or a static value
  * @return bool True or false (or else throw a paradox)
  */
 private function _compare($myValueName, $comparison, $hisValueSource)
 {
     // Load the values which will be getting compared
     if (is_array($hisValueSource)) {
         /*
          * It's an object numeric value call
          */
         list($him, $valueName) = $hisValueSource;
         // These functions are called directly without going through __call
         $hisValue = $him->{$valueName}();
     } else {
         /*
          * It's a static value; max = min = value
          */
         $hisValue = array('max' => $hisValueSource, 'min' => $hisValueSource);
     }
     $myValue = $this->{$myValueName}();
     if ($comparison == '>') {
         // My min is larger than his max; myVal is larger
         if ($myValue['min'] > $hisValue['max']) {
             return true;
         }
         // My max is smaller than or equal to his min; myVal is not larger
         if ($myValue['max'] <= $hisValue['min']) {
             return false;
         }
     } else {
         // My max is smaller than his min; myVal is smaller
         if ($myValue['max'] < $hisValue['min']) {
             return true;
         }
         // My min is not smaller than his max; myVal is not smaller
         if ($myValue['min'] >= $hisValue['max']) {
             return false;
         }
     }
     /*
      * There are only 4 ways to get a sure true or false decision, and we haven't got it
      *
      * The comparison couldn't be resolved due to a paradox; re-throw the smallest paradox
      */
     if (isset($myValue['paradox']) and isset($hisValue['paradox'])) {
         $p = $myValue['paradox'];
         $p->downSizeTo($hisValue['paradox']);
     } elseif (isset($myValue['paradox'])) {
         $p = $myValue['paradox'];
     } elseif (isset($hisValue['paradox'])) {
         $p = $hisValue['paradox'];
     } else {
         trigger_error(l_t("Comparison paradox code reached, without a paradox."));
     }
     throw $p;
     // The comparison failed
 }
开发者ID:Yoyoyozo,项目名称:webDiplomacy,代码行数:69,代码来源:dependencyNode.php


示例20: l_t

                $DB->sql_put("UPDATE wD_Games SET attempts=0 WHERE id=" . $Game->id);
                $DB->sql_put("COMMIT");
                print l_t('Processed.');
            }
        }
    } catch (Exception $e) {
        if ($e->getMessage() == "Abandoned" || $e->getMessage() == "Cancelled") {
            $DB->sql_put("COMMIT");
            print l_t('Abandoned.');
        } else {
            $DB->sql_put("ROLLBACK");
            print l_t('Crashed: "%s".', $e->getMessage());
        }
    }
    print '<br />';
}
// If it took over 30 secs there may still be games to process
if (time() - $startTime >= 30) {
    /*
     * For when you're developing and just reloaded the DB from a backup,
     * you usually have to refresh a few times before it runs out of games
     * to process
     */
    header('refresh: 4; url=gamemaster.php');
    print '<p class="notice">' . l_t('Timed-out; re-running') . '</p>';
} else {
    // Finished all remaining games with time to spare; update the civil disorder and NMR counts
    //libGameMaster::updateCDNMRCounts();
}
print '</div>';
libHTML::footer();
开发者ID:Yoyoyozo,项目名称:webDiplomacy,代码行数:31,代码来源:gamemaster.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP label函数代码示例发布时间:2022-05-15
下一篇:
PHP l_r函数代码示例发布时间: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