| Server IP : 208.122.213.31 / Your IP : 216.73.216.45 Web Server : Apache System : Linux msd6191.mjhst.com 4.18.0-553.137.1.el8_10.x86_64 #1 SMP Wed Jun 24 11:40:24 UTC 2026 x86_64 User : WHMCS_MIA_382 ( 1001) PHP Version : 7.4.33 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/httpd/html/cms.classicscash.com/public_html/cms_admin/ |
Upload File : |
<?php
define('ELCMXS6',1);
require_once("includes/adm_top.inc.php");
FixTable($svr, "plg_comments", array("username", "displayname", "commenttxt"));
FixTable($svr, "contentgroup", array("Title", "Description", "PreviewXML", "extrafields"));
FixTable($svr, "plg_contentasc", array("ModelName", "PreviewXML", "extrafields"));
FixTable($svr, "plg_templateconf", array("TValue"));
function FixTable(&$svr, $table, $fixf)
{
$sql = "select * from $table";
echo "<BR>Scanning table $table";
$r = $svr->DoQuery($sql,1);
foreach ($r as $s)
{
$upd = 0;
foreach ($fixf as $fix)
{
if (!mb_check_encoding($s[$fix], "UTF-8"))
{
$det = mb_detect_encoding($s[$fix], "windows-1252,iso-8859-1,ascii");
$s[$fix] = mb_convert_encoding($s[$fix], "UTF-8", $det);
$upd = 1;
}
}
if ($upd)
{
$arr = array();
foreach ($fixf as $fix)
{
array_push($arr, "$fix='".$svr->EscapeString($s[$fix])."'");
}
$sql = "update $table SET " . join(",", $arr) . " WHERE Id = $s[Id]";
echo "<P>$sql";
$svr->DoQuery($sql,1);
}
}
}