Skip to main content

Opencart - create a php array of the countries IDs

A fast (not elegant) way to get an array of the countries iso codes and country ID from opencart. I just needed them to compare the data with an external source.
Just put the file in the Opencart folder (ex. arrayp.php).
I know that it's crap ...




    $dbconn = mysqli_connect(DB_HOSTNAME,DB_USERNAME,DB_PASSWORD) or die("Cannot connect to the database");
    mysqli_select_db($dbconn, DB_DATABASE) or die($dbconn->error());
    $sql_q = "SELECT CONCAT( '\'', `iso_code_2`, '\' => \'',`country_id`, '\', ' ) as arrcodes FROM `" . DB_PREFIX . "country`;";
    $result = mysqli_query($dbconn, $sql_q);
    if( !$result){ die($dbconn->error); }
    echo '$mycountries = array(' . "\r\n";
    // $queryResult = array();
    while($mres = $result->fetch_object()){
            echo "\t" . $mres->arrcodes . "\r\n";
    echo ");";
    // echo 'Done';



Popular posts from this blog

Hashes Algorithms used in different web applications

Hashes Algorithms used in different web applications.
I've done this list by hand. Not all the hashes algos are correct (I've generically added md5 or ??? where is unkwnown).
If you are interested send corrections and I will update it.
I will publish also a better version with tabs.
You can reproduce it without problems. It's part of the project mdcrack gui on sourceforge.
Use the | as data separator.

| Title | Hash Algorithm | TablePrefix | Table Name | Website |
| 1C Битрикс | md5($pass) | | |
| 1024cms | md5($pass) | | |
| 4images | md5($pass) | | |http://www.4homepage…

iPod Shuffle reset Utility for 64bit windows 10 (xp and above)

iPod Shuffle reset Utility (if iTunes fails)

Download the uncompressed "iPodResetUtilitySetup.exe" from one of the following links (mirrors):

Download from Onedrive
Mirror -  Tinyupload
Mirror -  Filesharing1
Mirror -  Exoshare
Mirror - EmbedUpload
Mirror - Multiup
Install iTunes for drivers etc (needed on Windows 64bit)Make sure that iTunes is fully installed (the services are running).Check if the iPod can be detected and sync by iTunes.Close iTunes.Run "iPodResetUtility.exe" with Windows XP compatibility mode and "Run as Administrator".If the reset fails try to run  with Windows XP SP2 compatibility mode and "Run as Administrator".

Should work to:
reset iPod Shuffle on Windows XP 32 bit
reset iPod Shuffle on Windows Vista 32 bit
reset iPod Shuffle on Windows 7 32 bit
reset iPod Shuffle on Windows 8 32 bit
reset iPod Shuffle on Windows 8.1 32 bit
reset iPod Shuffle on Windows 10 32 bit

reset iPod Shuffle on Windows XP 64 bit
reset iPod Shuffle on Win…

Force Unmount and Clean up of a Wim Image using DISM

Force Unmount and Clean up of a Wim Image using DISM

When you use RT7 (+ AIK) sometimes an error occurs stating that there's a mounted wim (ex.  boot.wim).
To solve the problem you should run, as administrator, the command:

dism /cleanup-wim
If it doesn't work I've found another solution by editing the registry and deleting all the (necessary) entries within:

"HKLM\SOFTWARE\Microsoft\WIMMount\mounted images\"

It should work as long as you are an administrator.