code en vrac, mais tu devrais t'y retrouver
<?php
oups_adminfooter();
xoops_cp_footer();
} // thing
//
//----------------------------------------------------------------------------//
//
if(isset($_REQUEST['op']) AND $_REQUEST['op'] == "updates") {
if(!@include('http://labs.xoofoo.org/uploads/modversion/oupsversion.txt')) {
echo "Sorry, I was unable to get version info!<br /> The server could be unavailable, or your host does not allow remote file fetching.<br />Please visit the main web site <a href="http://labs.xoofoo/modules/mydownloads/" rel="external">here</a>. ";
exit;
}
?>
<div class="center"><input type="button" value=" Close window " onclick="window.close();"></div>
<table border="0" style="width: 100%;">
<tr>
<th colspan="2">Updates</th>
</tr>
<tr>
<td style="width: 90px; font-weight: bold;">Status:</td>
<td>
<?php
if (round($xoopsModule->getVar('version')/100 , 2) > $version) {
echo "You are using a newer version than the latest release, you are probably using a test release.";
}
if (round($xoopsModule->getVar('version')/100 , 2) < $version) {
echo "An update is available.";
}
if (round($xoopsModule->getVar('version')/100 , 2) == $version) {
echo "You are using the latest version.";
}
?>
</td>
</tr>
<tr>
<td style="width: 90px; font-weight: bold; vertical-align: top;">Details:</td>
<td>
Your version: <?php echo round($xoopsModule->getVar('version')/100 , 2); ?><br/>
Available version: <?php echo $version; ?>
</td>
</tr>
<tr>
<td style="width: 90px; font-weight: bold; vertical-align: top;">Download:</td>
<td>
<!--.tar.gz version: <a href="<?php echo $urlgzip; ?>" rel="external">Download</a> page.<br/>-->
.zip version: <a href="<?php echo $urlzip; ?>" rel="external">Download</a> page.
</td>
</tr>
<tr>
<td colspan="2">
<span style="font-weight: bold;">History:</span><br />
<pre>
<?php echo $history; ?>
</pre>
</td>
</tr>
</table>
<div style="text-align:center;"><input type="button" value=" Close window " onclick="window.close();"></div>
et le fichier oupsversion.txt par exemple :
<?php
$version = "1.1";
$url = "http://labs.xoofoo.org/modules/mydownloads/viewcat.php?cid=11";
$urlzip="http://labs.xoofoo.org/modules/mydownloads/singlefile.php?lid=68";
//$urlgzip = "http://labs.xoofoo.org/modules/mydownloads/singlefile.php?lid=66";
$history = "Oups History
Key:
+ Added feature.
- Removed.
! Bug fix.
o General comment.
";
?>