Esempio n. 1
0
function editTemplateSource($p_tname, $option, $client)
{
    global $mosConfig_absolute_path;
    if ($client == 'admin') {
        $file = $mosConfig_absolute_path . '/administrator/templates/' . $p_tname . '/index.php';
    } else {
        $file = $mosConfig_absolute_path . '/templates/' . $p_tname . '/index.php';
    }
    if ($fp = fopen($file, 'r')) {
        $content = fread($fp, filesize($file));
        $content = htmlspecialchars($content);
        HTML_templates::editTemplateSource($p_tname, $content, $option, $client);
    } else {
        mosRedirect('index2.php?option=' . $option . '&client=' . $client, sprintf(T_('Operation Failed: Could not open %s'), $file));
    }
}
Esempio n. 2
0
function editTemplateSource($p_tname, $option, $client)
{
    global $mosConfig_absolute_path, $adminLanguage;
    if ($client == 'admin') {
        $file = $mosConfig_absolute_path . '/administrator/templates/' . $p_tname . '/index.php';
    } else {
        $file = $mosConfig_absolute_path . '/templates/' . $p_tname . '/index.php';
    }
    if ($fp = fopen($file, 'r')) {
        $content = fread($fp, filesize($file));
        $content = htmlspecialchars($content);
        HTML_templates::editTemplateSource($p_tname, $content, $option, $client);
    } else {
        mosRedirect('index2.php?option=' . $option . '&client=' . $client, $adminLanguage->A_COMP_TEMP_NOT_OPEN . ' ' . $file);
    }
}