HEX
Server: LiteSpeed
System: Linux d8 4.18.0-553.121.1.lve.el8.x86_64 #1 SMP Thu Apr 30 16:40:41 UTC 2026 x86_64
User: wbwebdes (3015)
PHP: 8.1.31
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: /home/wbwebdes/domains/mailing.wb-cloud.nl/public_html/admin/addprefix.php
<?php

require_once dirname(__FILE__).'/accesscheck.php';

// convert the database to add the prefix
// dangerous, should not be used, particularly not if the prefix already exists

if (!$GLOBALS['table_prefix']) {
    echo 'No prefix defined, nothing to do';

    return;
}

include 'structure.php';

foreach ($DBstruct as $table => $value) {
    if ($table != $tables[$table]) {
        Sql_Verbose_Query("drop table if exists $tables[$table]", 0);
        Sql_Verbose_Query("alter table $table rename $tables[$table]", 0);
    }
}

$req = Sql_Verbose_Query('select tablename from '.$tables['attribute']);
while ($row = Sql_Fetch_Row($req)) {
    set_time_limit(500);
    if (Sql_Table_Exists('listattr_'.$row[0]) && $table_prefix) {
        Sql_Verbose_Query("alter table listattr_$row[0] rename $table_prefix".'listattr_'.$row[0]);
    }
    if (Sql_Table_Exists($table_prefix.'listattr_'.$row[0])) {
        Sql_Query("alter table $table_prefix".'listattr_'.$row[0].' add column listorder integer default 0', 0);
    }
}
flush();