Example #1
0
function create_link($filename, $text)
{
    return "<a href=\"index.html?filename={$filename}\" title=\"" . get_title_variable($filename) . "\">{$text}</a>";
}
Example #2
0
 $GSMG_infilename = "sitemap_{$lang}";
 if ($l_charset_encoding != 'utf-8') {
     # convert the utf-8 charmap to the local encoding, so that the string conversion back to utf-8 works
     unset($local_charmap);
     foreach ($charmap as $htmlchar => $value) {
         $local_charmap[] = array($htmlchar => @iconv('utf-8', $l_charset_encoding, $value));
     }
 }
 unset($graph_input);
 unset($graph_input_at_bottom);
 while ($row = mysql_fetch_object($result)) {
     if ($row->filename == 'main.html') {
         $page_title = 'Homepage';
     } else {
         if (substr($row->filename, strlen($row->filename) - 5, strlen($row->filename)) == '.html') {
             $page_title = get_title_variable($row->filename);
         } else {
             $page_title = strtr(${'l_pt_' . strtr($row->filename, '-/.', '___')}, $local_charmap);
         }
     }
     $graph_line = "{$row->id}\t{$row->sitemap_parentnode}\t{$page_title}\t{$row->prefix}{$row->filename}";
     // Change the character encoding to UTF-8 if dot does not support it.
     // dot does not understand 'iso-8859-9' nor 'koi8-r', so convert them to utf-8
     if ($l_charset_encoding == 'iso-8859-9' || $l_charset_encoding == 'koi8-r') {
         $graph_line = iconv($l_charset_encoding, 'utf-8', $graph_line);
         // works fine on my computer
         //$graph_line=recode_string($graph_line, "$l_charset_encoding..utf-8"); // buggy
         //$graph_line=mb_convert_encoding($graph_line, 'utf-8', $l_charset_encoding); // seams not to be installed on the server
     }
     // take a look at http://www.graphviz.org/pub/scm/graphviz2/doc/info/colors.html for colors names
     switch ($row->sitemap_group) {