示例#1
0
function array_htmlspecialchars_decode(&$input)
{
    if (is_array($input)) {
        foreach ($input as $key => $value) {
            if (is_array($value)) {
                $input[$key] = array_htmlspecialchars_decode($value);
            } else {
                $input[$key] = htmlspecialchars_decode($value);
            }
        }
        return $input;
    }
    return htmlspecialchars_decode($input);
}
示例#2
0
文件: index.php 项目: xplhak/WebGen
    echo "<link href=\"./css/step_{$TYPE}_{$_GET['step']}.css\" rel=\"stylesheet\" type=\"text/css\" media=\"all\" />\n";
}
if (!empty($_SESSION['step_all_2']['css_choice']) && $_SESSION['step_all_2']['css_choice'] == 'glasses') {
    echo "<link href=\"./css/glasses.css\" rel=\"stylesheet\" type=\"text/css\" media=\"all\" />\n";
}
?>
        <link rel="bookmark" href="http://lsd.fi.muni.cz/webgen/" title="<?php 
echo $webgen_info[$language];
?>
" />
        <script type="text/javascript">
            
            <?php 
// promenne ze SESSION do JS
// nejprve pridame vsem prvkum ve vzbranych polich addslashes()
$_SESSION = array_htmlspecialchars_decode(array_map_r('addslashes', $_SESSION));
// nahrajeme promenne do JS
getJavascriptArray($_SESSION, 'session', $result);
// vratime na puvodni hodnotu pomoci stripslashes()
$_SESSION = array_htmlspecialchars(array_map_r('stripslashes', $_SESSION));
// ulozim si aktualni krok, kvuli napovede
getJavascriptArray($_GET, 'get', $result);
// nacteni nekterych promluv do js promennych
getJavascriptArray($webgen_basic_info, 'webgen_basic_info', $result);
getJavascriptArray($feat_answ_next, 'feat_answ_next', $result);
getJavascriptArray($webgen_u_r_day, 'webgen_u_r_day', $result);
getJavascriptArray($webgen_u_s_project_next, 'webgen_u_s_project_next', $result);
getJavascriptArray($webgen_u_s_project_coauthor_next, 'webgen_u_s_project_coauthor_next', $result);
getJavascriptArray($webgen_firm_direction_another, 'webgen_firm_direction_another', $result);
getJavascriptArray($webgen_firm_workload_another, 'webgen_firm_workload_another', $result);
getJavascriptArray($hobby_next, 'hobby_next', $result);