Source for file show_capabilities.php
Documentation is available at show_capabilities.php
* Tera_WURFL - PHP MySQL driven WURFL
* Tera-WURFL was written by Steve Kamerman, and is based on the
* Java WURFL Evolution package by Luca Passani and WURFL PHP Tools by Andrea Trassati.
* This version uses a MySQL database to store the entire WURFL file, multiple patch
* files, and a persistent caching mechanism to provide extreme performance increases.
* @package TeraWurflAdmin
* @author Steve Kamerman <stevekamerman AT gmail.com>
* @version Stable 2.1.3 $Date: 2010/09/18 15:43:21
* @license http://www.mozilla.org/MPL/ MPL Vesion 1.1
require_once realpath(dirname(__FILE__ ). '/../../TeraWurfl.php');
if($db->connected === true){
$tables = $db->getTableList();
// See what tables are in the DB
//die(var_export($tables,true));
foreach($required_tables as $req_table){
$cap = $db->getDeviceFromCache($ua);
$parts = explode(',',$cap['tera_wurfl']['fall_back_tree']);
$cap['tera_wurfl']['fall_back_tree'] = implode(' - ',$parts);
foreach($cap as $group => $capability){
$nicecap .= "<tr><th colspan=\"2\"><a id=\"$group\"/> </th></tr>";
$nicecap .= "<tr><td class=\"cap_heading\">$group</td><td class=\"cap_value\">";
foreach($capability as $property => $value){
$class = ($i++ % 2 == 0)? 'lightrow': 'darkrow';
$nicecap .= "<tr><td class=\"cap_title $class\">$property</td><td class=\"cap_value $class\">". htmlspecialchars($value). "</td></tr>\n";
$nicecap .= "</td></tr>\n";
$capability = (is_bool($capability) || $capability == "true" || $capability == "false")? WurflSupport::showBool($capability): $capability;
$nicecap .= "<tr><td class=\"cap_heading\">$group</td><td class=\"cap_value\">$capability</td></tr>\n";
foreach($groups as $num => $group){
$groups[$num]= "<a href=\"#$group\">$group</a>";
$grouplinks = implode(' | ',$groups);
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Tera-WURFL Cache Browser</title>
<link href="../style.css" rel="stylesheet" type="text/css" /></head>
<div align="center" class="titlediv version">
<h3> <?php echo $grouplinks;?></h3>
|