4c384853e1
on web.pm update.php updateprocess.php for update page to remember user's last choice git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6698 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
61 lines
1.9 KiB
PHP
61 lines
1.9 KiB
PHP
<?php
|
|
/*
|
|
* update.php
|
|
*
|
|
*/
|
|
require_once "lib/security.php";
|
|
require_once "lib/functions.php";
|
|
require_once "lib/display.php";
|
|
displayMapper(array('home'=>'main.php', 'help' =>'', 'update'=>''));
|
|
?>
|
|
<div class="mContent">
|
|
<h1>Repository</h1>
|
|
<?php
|
|
$DevelRepository = "";
|
|
$StableRepository = "";
|
|
#supposed only AIX & LINUX
|
|
if ("aix" == strtolower(PHP_OS))
|
|
{
|
|
$DevelRepository = "http://xcat.sourceforge.net/aix/devel/xcat-core/";
|
|
$StableRepository = "http://xcat.sourceforge.net/aix/xcat-core/";
|
|
}
|
|
else
|
|
{
|
|
$DevelRepository = "http://xcat.sourceforge.net/yum/devel/xcat-core/";
|
|
$StableRepository = "http://xcat.sourceforge.net/yum/xcat-core/";
|
|
}
|
|
|
|
echo "<input type='radio' ";
|
|
if (1 == $_COOKIE["xcatrepository"])
|
|
{
|
|
echo "checked='true'";
|
|
}
|
|
echo "name='reporadio' value='" . $DevelRepository . "'>" . $DevelRepository . "(<strong>Devel</strong>)<br/>";
|
|
echo "<input type='radio' ";
|
|
if (2 == $_COOKIE["xcatrepository"])
|
|
{
|
|
echo "checked='true'";
|
|
}
|
|
echo "name='reporadio' value='" . $StableRepository . "'>" . $StableRepository . "(<strong>Stable</strong>)<br/>";
|
|
|
|
if(isset($_COOKIE["xcatrepository"]) && (1 != $_COOKIE["xcatrepository"]) && (2 != $_COOKIE["xcatrepository"]))
|
|
{
|
|
echo "<input type=\"radio\" checked=\"true\" name=\"reporadio\" value=\"\">Other:";
|
|
echo "<input style=\"width: 500px\" id=repositoryaddr value=\"" . $_COOKIE["xcatrepository"] ."\"<br/>";
|
|
}
|
|
else
|
|
{
|
|
echo "<input type=\"radio\" name=\"reporadio\" value=\"\">Other:";
|
|
echo "<input style=\"width: 500px\" id=repositoryaddr value=\"http://\"<br/>";
|
|
}
|
|
?>
|
|
</div>
|
|
<div id="temp"></div>
|
|
<div id="update" class="mContent">
|
|
<h1>xCAT Update Info</h1>
|
|
<?php showUpdateInfo(); ?>
|
|
<button onclick='fun_js_update()'>Update</button>
|
|
</div>
|
|
<div id=updateProcess>
|
|
</div>
|