function make_theme_list() { $themes = list_info_dir('../inc/themes', 'theme'); $current_theme = get_setting_value("theme_dir_name"); for ($n = 0; $n < count($themes); $n++) { $theme = $themes[$n]; $dirname = $theme[1]; $attrs = $theme[0]; $name = $attrs['Name']; if ($dirname == $current_theme) { $spid = " id=\"curr-theme-box\""; } else { $spid = ''; } $onclick = "onclick=\"Settings.setTheme('{$dirname}');return false;\""; echo "<div class=\"theme-icon action-link\" {$onclick} {$spid}>"; echo "<a href=\"set-theme.php?dirname={$dirname}\" title=\"{$attrs['Comment']}\" class=\"action-link\" {$onclick}>"; echo "<img src=\"../inc/themes/{$dirname}/{$attrs['Icon']}\" alt=\"{$name}\" width=\"160px\" height=\"160px\" class=\"theme-image\" />"; echo "</a>"; if ($dirname == $current_theme) { echo "<img src=\"inc/images/ok32.png\" alt=\"current theme\" title=\"Planetoid is currently using this theme.\" id=\"curr-theme\" />"; } else { echo "<a href=\"set-theme.php?dirname={$dirname}\" title=\"{$attrs['Comment']}\" class=\"action-link\" {$onclick}><img src=\"inc/images/set-theme.png\" alt=\"current theme\" title=\"Select this theme.\" class=\"set-theme\" /></a>"; } echo "<span>{$name} {$attrs['Version']}<br/><small>by <a href=\"{$attrs['AuthorURL']}\" target=\"_blank\">{$attrs['Author']}</a></small></span>"; echo "</div>"; } echo "<br style=\"clear:both\"/>"; }
function make_plugins_table() { $plugins = list_info_dir('../inc/plugins', 'plugin'); echo "<table cellpadding=\"0\" cellspacing=\"1px\" id=\"plugins-table\">"; echo "<thead><tr class=\"header\"><td>Name</td><td>Description</td><td>Manage</td></tr></thead>"; echo "<tbody>"; for ($n = 0; $n < count($plugins); $n++) { $plugin = $plugins[$n]; $dir = $plugin[1]; $attrs = $plugin[0]; echo "<tr id=\"{$dir}-row\"><td>" . "<img src=\"../inc/plugins/{$dir}/{$attrs['Icon']}\" alt=\"\" style=\"height:16px;\" />" . "<a href=\"{$attrs['PluginURL']}\">{$attrs['PluginName']}</a> <small>{$attrs['PluginVersion']}</small></td>" . "<td>{$attrs['PluginDescrip']} <em>‒ <a href=\"{$attrs['AuthorURL']}\">{$attrs['AuthorName']}</a></em></td>" . "<td>" . generate_manage_links($dir) . "</td></tr>"; } echo "</tbody>"; echo "</table>"; }