예제 #1
0
파일: admin.php 프로젝트: vazahat/dudex
 public function index()
 {
     $language = OW::getLanguage();
     OW::getDocument()->setHeading($language->text('mcompose', 'heading_configuration'));
     OW::getDocument()->setHeadingIconClass('ow_ic_gear_wheel');
     $this->assign('pluginUrl', 'http://www.oxwall.org/store/item/10');
     if (!$this->plugin->isAvaliable()) {
         $this->assign('avaliable', false);
         return;
     }
     $this->assign('avaliable', true);
     $settingUrl = OW::getRouter()->urlForRoute('mailbox_admin_config');
     $this->assign('settingsUrl', $settingUrl);
     $configs = OW::getConfig()->getValues('mcompose');
     $features = array();
     $features["friends"] = MCOMPOSE_CLASS_FriendsBridge::getInstance()->isActive();
     $features["groups"] = MCOMPOSE_CLASS_GroupsBridge::getInstance()->isActive();
     $features["events"] = MCOMPOSE_CLASS_EventsBridge::getInstance()->isActive();
     $form = new MCOMPOSE_ConfigForm($configs, $features);
     $this->addForm($form);
     $this->assign("configs", $configs);
     $this->assign("features", $features);
     $this->assign("activeFeatures", array_filter($features));
     if (OW::getRequest()->isPost() && $form->isValid($_POST)) {
         if ($form->process($_POST)) {
             OW::getFeedback()->info($language->text('mcompose', 'admin_settings_updated'));
             $this->redirect(OW::getRouter()->urlForRoute('mcompose-admin'));
         }
     }
 }
예제 #2
0
파일: init.php 프로젝트: vazahat/dudex
<?php

/**
 * Copyright (c) 2012, Sergey Kambalin
 * All rights reserved.
 * ATTENTION: This commercial software is intended for use with Oxwall Free Community Software http://www.oxwall.org/
 * and is licensed under Oxwall Store Commercial License.
 * Full text of this license can be found at http://www.oxwall.org/store/oscl
 */
require 'plugin.php';
MCOMPOSE_Plugin::getInstance()->init();
MCOMPOSE_CLASS_BaseBridge::getInstance()->init();
MCOMPOSE_CLASS_FriendsBridge::getInstance()->init();
MCOMPOSE_CLASS_GroupsBridge::getInstance()->init();
MCOMPOSE_CLASS_EventsBridge::getInstance()->init();