本文整理汇总了PHP中Version::getVersions方法的典型用法代码示例。如果您正苦于以下问题:PHP Version::getVersions方法的具体用法?PHP Version::getVersions怎么用?PHP Version::getVersions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Version
的用法示例。
在下文中一共展示了Version::getVersions方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: param
require_once 'lib/path.php';
$action = param('action', 'none');
$do = param('do', 'none');
if ($do == 'none') {
echo '<h1>IRIN System Version Update</h1>';
}
if ($action == 'none') {
?>
<table class="table table-hover">
<tr>
<th>Version</th>
<th>Updated</th>
<th></th>
</tr>
<?php
foreach (Version::getVersions() as $version) {
?>
<tr>
<td>
<?php
echo $version->getVersion();
?>
<?php
if ($version->isCurrent()) {
echo '(Current)';
}
?>
</td>
<td><?php
echo $version->getDate();
?>
示例2: define
define("ROOT", "../");
require ROOT . 'www/header.php';
$message = "";
//Do we need to set a version as active?
if (isset($_GET['setactive'])) {
if (ctype_digit($_GET['setactive'])) {
$activeVersion = $_GET['setactive'];
try {
Version::setAsActive($activeVersion);
$message = "Active version updated successfully";
} catch (Exception $ex) {
$message = $ex->getMessage();
}
}
}
$versions = Version::getVersions();
?>
<h2>Transporter Server</h2>
<p><a href="edit_files.php">Edit override files</a></p>
<p><button id="new_version" type="button">Create new version</button></p>
<?php
print "<p><b>{$message}</b></p>";
?>
<p>Clicking on the "Create new version" or "Generate" (image) buttons will start
processes on the server that will take at least 3-4 minutes to complete.
Do not refresh or navigate away from the page till you get a pop up message with the status.</p>
<table border="1">