示例#1
0
<?php

/**
 * Open Source Social Network
 *
 * @package   (Informatikon.com).ossn
 * @author    OSSN Core Team <*****@*****.**>
 * @copyright 2014 iNFORMATIKON TECHNOLOGIES
 * @license   General Public Licence http://www.opensource-socialnetwork.org/licence
 * @link      http://www.opensource-socialnetwork.org/licence
 */
?>
<div class="panel-group" id="accordion">
   	<?php 
$themes = new OssnThemes();
$list = $themes->getThemes();
if ($list) {
    foreach ($list as $id) {
        $vars = array();
        $vars['OssnThemes'] = $themes;
        $vars['id'] = $id;
        $vars['theme'] = $themes->getTheme($id);
        echo ossn_plugin_view("admin/themes/list/item", $vars);
    }
}
?>
</div> 
<?php

/**
 *    OpenSource-SocialNetwork
 *
 * @package   (Informatikon.com).ossn
 * @author    OSSN Core Team <*****@*****.**>
 * @copyright 2014 iNFORMATIKON TECHNOLOGIES
 * @license   General Public Licence http://opensource-socialnetwork.com/licence
 * @link      http://www.opensource-socialnetwork.com/licence
 */
$OssnThemes = new OssnThemes();
foreach ($OssnThemes->getThemes() as $id) {
    $Theme = $OssnThemes->getTheme($id);
    echo "<div class='ossn-components-item'>";
    echo "<div class='component-controls'>";
    if (ossn_site_settings('theme') == $id) {
        echo "<a href='#' class='components-button components-button-blue'>" . ossn_print('admin:button:enabled') . "</a>";
    } else {
        $enable = ossn_site_url("action/theme/enable?theme={$id}", true);
        echo "<a href='{$enable}' class='components-button components-button-green'>" . ossn_print('admin:button:enable') . "</a>";
    }
    if ($OssnThemes->getActive() !== $id) {
        $delete = ossn_site_url("action/theme/delete?theme={$id}", true);
        echo "<a href='{$delete}' class='components-button components-button-red'>" . ossn_print('admin:button:delete') . "</a>";
    }
    echo "</div>";
    echo "<div class='component-name'>{$Theme->theme_name} {$Theme->theme_version}</div>";
    echo "<div class='compontnet-meta'>\n\t        \t" . ossn_print('admin:component:author') . ": {$Theme->theme_author}<br />\n\t\t\t\t" . ossn_print('admin:component:website') . ": {$Theme->theme_author_url}\n\t </div>";
    echo "<div class='component-description'>{$Theme->theme_description}</div>";
    echo '</div>';