AvocadoAmber/AvocadoEdition_Light/_extra_font.php
Arcturus db14446cb2
check_url_host fix and editor font update
- now can parse `@import` in editorfont add
- fix url host check
2024-10-05 06:00:41 +09:00

26 lines
717 B
PHP

<?php
if (!defined('_GNUBOARD_'))
exit;
$font_sql = "SELECT * FROM {$g5['font_table']} ORDER BY font_name ASC";
$font_result = sql_query($font_sql);
echo "<style id=\"extra_font\">";
while ($row = sql_fetch_array($font_result)) {
$font_family = $row['font_family'];
$font_url = stripslashes($row['font_url']);
$font_weight = $row['font_weight'];
$font_style = $row['font_style'];
if (strpos($font_url, '@import') !== false) {
echo "{$font_url}\n\n";
} else {
echo "@font-face {\n";
echo " font-family: '{$font_family}';\n";
echo " src: {$font_url};\n";
echo " font-weight: {$font_weight};\n";
echo " font-style: {$font_style};\n";
echo "}\n\n";
}
}
echo "</style>";