Deprecated: Assigning the return value of new by reference is deprecated in /home/bluestat/public_html/source/index.php on line 477
page_start('Template Variable Usage'); // ################################################################### $templates = $db->query("SELECT * FROM template WHERE styleid = -1 ORDER BY templatename ASC"); while ($template = $db->fetch_array($templates)) { $templateusage["$template[templateid]"] = $template['templatename']; } $select = ''; echo "

$select

"; // ################################################################### if ($_REQUEST['templateid']) { $print->table_start(); $tpl = $db->query_first("SELECT * FROM template WHERE templateid = " . intval($_REQUEST['templateid'])); $print->table_head("Template: $tpl[templatename]; Style: Master; Id: $tpl[templateid]"); $tpl['template'] = htmlspecialchars($tpl['template']); // convert tabs $tpl['template'] = str_replace("\t", '    ', $tpl['template']); // handle lang sprints preg_match_all('#<lang(.*?)</lang>#', $tpl['template'], $matches); foreach ((array)$matches[0] AS $match) { $tpl['template'] = str_replace($match, '' . $match . '', $tpl['template']); } // handle variables preg_match_all('#\$[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff\'\[\]"]*#', $tpl['template'], $matches); foreach ((array)$matches[0] AS $match) { $tpl['template'] = str_replace($match, '' . $match . '', $tpl['template']); $varlist['PHP Variables'][] = $match; } // language objects preg_match_all('#\{@("|")(\w+?)\1\}#is', $tpl['template'], $matches); foreach ((array)$matches[0] AS $id => $match) { $tpl['template'] = str_replace($match, '' . $match . '', $tpl['template']); $varlist['Language Objects'][] = '' . $matches[2]["$id"] . ''; } //$tpl['template'] = preg_replace('#<lang(.*?)</lang>#', '<lang\\1</lang>', $tpl['template']); //$tpl['template'] = preg_replace('#\$([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff\[\]]*)#', '$\\1', $tpl['template']); //$tpl['template'] = preg_replace('#\{lang\.(\w+?)\}#is', '{lang.\\1}', $tpl['template']); $print->row_span('
' . nl2br($tpl['template']) . '
'); $print->table_head('Match List'); foreach ((array)$varlist AS $type => $matchlist) { $print->row_span($type, 'thead'); foreach ((array)$matchlist AS $variable) { $print->row_span($variable); } } $print->table_end(); } $print->page_end(); /*=====================================================================*\ || ################################################################### || # $HeadURL$ || # $Id$ || ################################################################### \*=====================================================================*/ ?>