TeraWurflAdmin
[ class tree: TeraWurflAdmin ] [ index: TeraWurflAdmin ] [ all elements ]

Source for file browse_classic.php

Documentation is available at browse_classic.php

  1. <?php
  2. /**
  3.  * Tera_WURFL - PHP MySQL driven WURFL
  4.  * 
  5.  * Tera-WURFL was written by Steve Kamerman, and is based on the
  6.  * Java WURFL Evolution package by Luca Passani and WURFL PHP Tools by Andrea Trassati.
  7.  * This version uses a MySQL database to store the entire WURFL file, multiple patch
  8.  * files, and a persistent caching mechanism to provide extreme performance increases.
  9.  * 
  10.  * @package TeraWurflAdmin
  11.  * @author Steve Kamerman <stevekamerman AT gmail.com>
  12.  * @version Stable 2.1.3 $Date: 2010/09/18 15:43:21
  13.  * @license http://www.mozilla.org/MPL/ MPL Vesion 1.1
  14.  */
  15. require_once realpath(dirname(__FILE__).'/../../TeraWurfl.php');
  16.  
  17. $tw new TeraWurfl();
  18. $db $tw->db;
  19.  
  20. $missing_tables false;
  21. if($db->connected === true){
  22.     $required_tables array(TeraWurflConfig::$TABLE_PREFIX.'Cache');
  23.     $tables $db->getTableList();
  24. // See what tables are in the DB
  25. //die(var_export($tables,true));
  26.     foreach($required_tables as $req_table){
  27.         if(!in_array($req_table,$tables)){
  28.             $missing_tables true;
  29.         }
  30.     }
  31. }
  32. ?>
  33. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  34. <html xmlns="http://www.w3.org/1999/xhtml">
  35. <head>
  36. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  37. <title>Tera-WURFL Cache Browser</title>
  38. <link href="../style.css" rel="stylesheet" type="text/css" /></head>
  39. <body>
  40. <table width="800">
  41.     <tr><td>
  42. <div align="center" class="titlediv">
  43.     <p>        Tera-WURFL Cache Browser<br />
  44.         <span class="version">Version <?php echo $tw->release_branch." ".$tw->release_version?></span></p>
  45. </div>
  46. </td></tr><tr><td>
  47.         <h3><br />
  48.             <a href="../index.php">&lt;&lt; Back to main page </a></h3>
  49. <table>
  50. <tr><th colspan="2">Cached User Agents</th></tr>
  51. <?php
  52. $cached_uas $db->getCachedUserAgents();
  53. $i 0;
  54. foreach($cached_uas as $ua){
  55.     $class ($i++ % == 0)'lightrow''darkrow';
  56.     echo "<tr><td>$i)</td><td class=\"$class\"><pre style=\"padding: 0px; margin: 0px;\"><a style=\"text-decoration: none;\" target=\"_blank\" href=\"show_capabilities.php?ua=".urlencode($ua)."\" title=\"Click to see details\">".htmlspecialchars($ua)."</a></pre></td></tr>";
  57. }
  58. ?>
  59. </table>
  60.                 <br/></td>
  61.         </tr>
  62.     </table>
  63. </body>
  64. </html>

Documentation generated on Sun, 19 Sep 2010 00:15:47 +0000 by phpDocumentor 1.4.3