Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- define('NL', "\r\n");
- $version = '1.02.0011';
- $new = $_GET['v'];
- if ($_GET['c'] !== '2' || !is_string($new) || $new == $version)
- {
- echo '1' . NL . $version . NL;
- exit;
- }
- // If we get to here, they are using a newer version of the
- // version system, but it's not the latest.
- echo '2' . NL . $version . NL;
- // Define the data for the changelog.
- $changelog = array(
- '1.02.0011' => 'Added files for the y_timers Delay: system previ ously not updated. Also updated the version system to accept changelogs.',
- // '1.02.0012' => 'Testing multiple changelog entries. May as well make it a long one.',
- );
- foreach ($changelog as $v => $c)
- {
- if ($v > $new)
- {
- echo NL . NL . ' ' . $v . ':' . NL . NL . wordwrap(' ' . $c, 38, NL, true);
- }
- }
- ?>
- alex@server /raid/web/version $ cat index.php
- <?php
- define('NL', "\r\n");
- $version = '1.02.0011';
- $new = $_GET['v'];
- if ($_GET['c'] !== '2' || !is_string($new) || $new == $version)
- {
- echo '1' . NL . $version . NL;
- exit;
- }
- // If we get to here, they are using a newer version of the
- // version system, but it's not the latest.
- echo '2' . NL . $version . NL;
- // Define the data for the changelog.
- $changelog = array(
- '1.02.0011' => 'Added files for the y_timers Delay: system previously not updated. Also updated the version system to accept changelogs.',
- // '1.02.0012' => 'Testing multiple changelog entries. May as well make it a long one.',
- );
- foreach ($changelog as $v => $c)
- {
- if ($v > $new)
- {
- echo NL . NL . ' ' . $v . ':' . NL . NL . wordwrap(' ' . $c, 38, NL, true);
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment