<?php
include ("config.php");
$link = mysql_connect(DB_HOSTNAME, DB_USERNAME, DB_PASSWORD);
if (!$link) {
die('Could not connect: ' . mysql_error());
}
else {
mysql_select_db(DB_DATABASE);
}
$magic_table = DB_PREFIX . "order";
$magic = $_POST['magic'];
if ($magic!==""){
$query="ALTER TABLE `$magic_table` AUTO_INCREMENT = $magic";
mysql_query($query);
}
$query = "SELECT Auto_increment FROM information_schema.tables WHERE table_name='$magic_table' AND table_schema = DATABASE()";
$result = mysql_query($query);
$row = mysql_fetch_row($result);
$magic = $row[0];
?>
<html><head><title>HelderIM : OpenCart : (Re)set ordernumber</title></head><body>
<h1>(Re)set Ordernumber (by HelderIM)</h1>
<p>
This tool reads the next ordernumber that will be generated. You can change the ordernumber by entering a new number and press "SET". It does not change ordernumbers already generated.
</p>
<p>
This tool is tested on OpenCart using MySQL.<br>
Delete this tool from your website after usage. It has no protection whatsoever!!!!
</p>
<?php
echo '<form name="EQ" action="magic.php" method="post">';
echo "<input name='magic' type='text' value='". $magic . "'/><br>";
echo "<input type='submit' value='SET'/></form>";
echo "</body></html>";
?>
And now, upload it to your Store FTP and then goto yourstore.com/order
0 comments:
Post a Comment