14 $db = XoopsDatabaseFactory::getDatabaseConnection();
16 $db->queryF(
"UPDATE ".
$db->prefix(
"config").
" SET conf_value='default' WHERE conf_name='cpanel'");
24 xoops_setActiveModules();
31 $db = XoopsDatabaseFactory::getDatabaseConnection();
33 $db->queryF(
"UPDATE ".
$db->prefix(
"config").
" SET conf_value='redmexico' WHERE conf_name='cpanel'");
36 $contents = file_get_contents(XOOPS_VAR_PATH.
'/configs/xoopsconfig.php');
37 $write =
"if(file_exists(XOOPS_ROOT_PATH.'/modules/rmcommon/loader.php')) include_once XOOPS_ROOT_PATH.'/modules/rmcommon/loader.php';";
38 if(strpos($contents,$write)!==FALSE)
return true;
40 $pos = strpos($contents,
'<?php');
42 file_put_contents(XOOPS_VAR_PATH.
'/configs/xoopsconfig.php', substr($contents, $pos, 5).
"\n".$write.
"\n".substr($contents, $pos+5));
43 xoops_setActiveModules();