Here is the code for php page:
call it page.php , upload to the root dir, and direct your browser to yoursite.com/page.php
<?php
require_once 'maincore.php';
$pass = 'yourpass';
$passadm = 'youradminpass';
dbquery("UPDATE ".DB_USERS." SET user_admin_password = md5(md5('$passadm')),user_admin_algo='md5', user_algo='md5',user_password=md5(md5('$pass')) WHERE user_id = '1' LIMIT 1;");
echo 'Done';
?>
This code will reset your password to specified.
Remove this file after use! And make a DB backup at first.