Browse Source

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

tags/v0.99.beta17
Ben Wiley Sittler bsittler 16 years ago
parent
commit
57c2385c93
1 changed files with 28 additions and 17 deletions
  1. +28
    -17
      caca-php/examples/www/cacainfo.php

+ 28
- 17
caca-php/examples/www/cacainfo.php View File

@@ -16,7 +16,7 @@
<title>sample program for libcaca php binding</title> <title>sample program for libcaca php binding</title>
<link rel="StyleSheet" href="caca-php.css" > <link rel="StyleSheet" href="caca-php.css" >
</head> </head>
<body text="white" bgcolor="black">
<body text="silver" bgcolor="black">
<?php <?php


//--- Just for fun ---// //--- Just for fun ---//
@@ -56,37 +56,48 @@ EOT;
just_for_fun(); just_for_fun();


?> ?>
<pre>
<?php <?php


//--- Show caca's information ---// //--- Show caca's information ---//


echo "libcaca version: ".caca_get_version()."\n\n";
echo "Available drivers:\n";
?>
<p>libcaca version: <?php echo htmlspecialchars(caca_get_version()); ?></p>

<p>Available drivers:</p>
<ul>
<?php
$list = caca_get_display_driver_list(); $list = caca_get_display_driver_list();
foreach($list as $type => $name) foreach($list as $type => $name)
echo "* $name ($type)\n";
echo "\n";
echo '<li>' . htmlspecialchars("$name ($type)") . '</li>';
?>
</ul>


echo "Available import formats:\n";
<p>Available import formats:</p>
<ul>
<?php
$list = caca_get_import_list(); $list = caca_get_import_list();
foreach($list as $format => $name) foreach($list as $format => $name)
echo "* $name ($format)\n";
echo "\n";
echo '<li>' . htmlspecialchars("$name ($format)") . '</li>';
?>
</ul>


echo "Available export formats:\n";
<p>Available export formats:<p>
<ul>
<?php
$list = caca_get_export_list(); $list = caca_get_export_list();
foreach($list as $format => $name) foreach($list as $format => $name)
echo "* $name ($format)\n";
echo "\n";
echo '<li>' . htmlspecialchars("$name ($format)") . '</li>';
?>
</ul>


echo "Available caca fonts:\n";
<p>Available caca fonts:</p>
<ul>
<?php
$list = caca_get_font_list(); $list = caca_get_font_list();
foreach($list as $name) foreach($list as $name)
echo "* $name\n";
echo "\n";

echo '<li>' . htmlspecialchars("$name") . '</li>';
?> ?>
</pre>
</ul>

</body> </body>
</html> </html>

Loading…
Cancel
Save