Файл: upgrade.php
Строк: 72
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>digi-ads - Upgrade</title>
<style type="text/css">
body, td{font-family:verdana,helvetica,arial,sans-serif;font-size:12px;color:#000000;background-color:#ffffff;}
b{font-weight:bold;}
h1{font-size:2.5em;}
.smalltext{font-size:11px;}
.error{color:#ff0000;}
</style>
</head>
<body>
<div align="center"><h1>digi-ads</h1><b>Upgrade</b><br /><br />
<table width="550" border="0" cellspacing="2" cellpadding="2">
<tr>
<td>
<?php
if (isset($_POST['path_dat']) && isset($_POST['path_inc'])) {
    $digiAdsPath = stripslashes($_POST['path_dat']);
    $requirePath = stripslashes($_POST['path_inc']);
    if (file_exists($digiAdsPath) && file_exists($requirePath)) {
        require $requirePath;
        // md5() password
        $digiAds['pass'] = md5($digiAds['pass']);
        // rename $digiAds['url'] to $digiAds['click_url']
        $digiAds['click_url'] =& $digiAds['url'];
        unset($digiAds['url']);
        // add $digiAds['js_url'] config. variable
        $digiAds['js_url'] = '/digi-ads/js.php';
        // add $digiAds['next_autoindex'] config. variable
        $i = 0;
        foreach ($ads as $ad) {
            ereg('^[0-9]+||', $ad, $j);
            $j[0] = str_replace('||', '', $j[0]);
            if ($j[0] > $i) {
                $i = $j[0];
            }
        }
        $i++;
        $digiAds['next_autoindex'] = $i;
        writeads();
        echo '<b>Upgrade Complete!</b> Please remove upgrade.php from your digi-ads directory right now.  You can now login to the control panel by clicking <a href="admin.php">here</a>.';
    } else {
        echo 'Cannot find ads.dat and/or ads.inc.php. Please go <a href="javascript:window.history.go(-1);">back</a> and edit the absolute path to ads.dat and/or ads.inc.php and try again.';
    }
} else {
?>
This script will attempt to upgrade your old ads.dat file to be compatible with digi-ads 1.2. Be sure to back up your ads.dat file before running this script.
<form method="post" action="upgrade.php">
Absolute Path to ads.dat: <input type="text" name="path_dat" value="<?php echo dirname(__FILE__); ?>/ads.dat" size="35" /><br />
Absolute Path to ads.inc.php: <input type="text" name="path_inc" value="<?php echo dirname(__FILE__); ?>/ads.inc.php" size="35" />
<br /><br />
<div align="center"><input type="submit" value="Upgrade" /></div>
</form>
<?php
}
?>
</td>
</tr>
</table>
</div>
<br /><br />
<div align="center"><hr width="550"><span class="smalltext">digi-ads 1.2 © 2001-2003 <a href="http://www.digi-fx.net">digi-FX</a></span></div>
</body>
</html>