Example #1
0
<?php

$this->pageTitle = Yii::app()->name . ' - ' . tc('Manage modules');
$this->breadcrumbs = array(tc('Modules'));
$this->menu = array(array());
$this->adminTitle = tc('Manage modules');
$proModules = ConfigurationModel::getProModules();
$freeModules = ConfigurationModel::getFreeModules();
$modules = CMap::mergeArray($proModules, $freeModules);
if ($modules) {
    foreach ($modules as $module) {
        $enabled = false;
        $isFree = true;
        if (param('module_enabled_' . $module)) {
            $type = 'success';
            $enabled = true;
        } else {
            $type = 'warning';
        }
        if (in_array($module, $proModules)) {
            $isFree = false;
        }
        if (!$isFree) {
            if (!issetModule($module, true)) {
                $type = 'danger';
                $enabled = false;
            }
        }
        echo '<div class="alert in alert-block fade alert-' . $type . '">';
        echo '<div class="row-fluid">';
        echo '<div class="span3">';