Ignore:
Timestamp:
Nov 1, 2008, 7:26:29 AM (12 years ago)
Author:
bsittler
Message:

now HTML markup is generated, rather than a giant PRE block

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/caca-php/examples/www/cacainfo.php

    r3183 r3185  
    1717<link rel="StyleSheet" href="caca-php.css" >
    1818</head>
    19 <body text="white" bgcolor="black">
     19<body text="silver" bgcolor="black">
    2020<?php
    2121
     
    5757
    5858?>
    59 <pre>
    6059<?php
    6160
    6261//--- Show caca's information ---//
    6362
    64 echo "libcaca version: ".caca_get_version()."\n\n";
    65 echo "Available drivers:\n";
     63?>
     64<p>libcaca version: <?php echo htmlspecialchars(caca_get_version()); ?></p>
     65
     66<p>Available drivers:</p>
     67<ul>
     68<?php
    6669$list = caca_get_display_driver_list();
    6770foreach($list as $type => $name)
    68         echo "* $name ($type)\n";
    69 echo "\n";
     71        echo '<li>' . htmlspecialchars("$name ($type)") . '</li>';
     72?>
     73</ul>
    7074
    71 echo "Available import formats:\n";
     75<p>Available import formats:</p>
     76<ul>
     77<?php
    7278$list = caca_get_import_list();
    7379foreach($list as $format => $name)
    74         echo "* $name ($format)\n";
    75 echo "\n";
     80        echo '<li>' . htmlspecialchars("$name ($format)") . '</li>';
     81?>
     82</ul>
    7683
    77 echo "Available export formats:\n";
     84<p>Available export formats:<p>
     85<ul>
     86<?php
    7887$list = caca_get_export_list();
    7988foreach($list as $format => $name)
    80         echo "* $name ($format)\n";
    81 echo "\n";
     89        echo '<li>' . htmlspecialchars("$name ($format)") . '</li>';
     90?>
     91</ul>
    8292
    83 echo "Available caca fonts:\n";
     93<p>Available caca fonts:</p>
     94<ul>
     95<?php
    8496$list = caca_get_font_list();
    8597foreach($list as $name)
    86         echo "* $name\n";
    87 echo "\n";
     98        echo '<li>' . htmlspecialchars("$name") . '</li>';
     99?>
     100</ul>
    88101
    89 ?>
    90 </pre>
    91102</body>
    92103</html>
Note: See TracChangeset for help on using the changeset viewer.