function zcssleedmaker_plugin_update($_)
{
    if ($_['action'] == 'zcssleedmaker_update') {
        $configurationManager = new Configuration();
        $configurationManager->getAll();
        $configurationManager->put('plugin_cssLeedMaker_css', $_['plugin_cssLeedMaker_css']);
        $configurationManager->put('plugin_cssLeedMaker_addcss', rawurlencode($_['plugin_cssLeedMaker_addcss']));
        $_SESSION['configuration'] = null;
        header('location: settings.php#CSSLeedMaker');
    }
}
Example #2
0
 /**
  * @todo Implement testPut().
  */
 public function testPut()
 {
     $newServerAddress = 'http://test.server.com';
     Configuration::put('server-address', $newServerAddress);
     // check that server address is updated
     $serverAddress = Configuration::get('server-address');
     $this->assertNotNull($serverAddress);
     $this->assertEquals($newServerAddress, $serverAddress);
 }
function leedHomeLink_plugin_update($_)
{
    $configurationManager = new Configuration();
    $configurationManager->getAll();
    if ($_['action'] == 'leedHomeLink_update') {
        $configurationManager->put('plugin_leedHomeLink_1_name', $_['plugin_leedHomeLink_1_name']);
        $configurationManager->put('plugin_leedHomeLink_1_link', $_['plugin_leedHomeLink_1_link']);
        $configurationManager->put('plugin_leedHomeLink_2_name', $_['plugin_leedHomeLink_2_name']);
        $configurationManager->put('plugin_leedHomeLink_2_link', $_['plugin_leedHomeLink_2_link']);
        $configurationManager->put('plugin_leedHomeLink_3_name', $_['plugin_leedHomeLink_3_name']);
        $configurationManager->put('plugin_leedHomeLink_3_link', $_['plugin_leedHomeLink_3_link']);
        $configurationManager->put('plugin_leedHomeLink_4_name', $_['plugin_leedHomeLink_4_name']);
        $configurationManager->put('plugin_leedHomeLink_4_link', $_['plugin_leedHomeLink_4_link']);
        $configurationManager->put('plugin_leedHomeLink_5_name', $_['plugin_leedHomeLink_5_name']);
        $configurationManager->put('plugin_leedHomeLink_5_link', $_['plugin_leedHomeLink_5_link']);
        $_SESSION['configuration'] = null;
        header('location: settings.php#leedHomeLink');
    }
}
function toggleEventContent_Update($_)
{
    if ($_['action'] == 'toggleEventContent_update') {
        $config = new Configuration();
        $config->getAll();
        $config->put('toggleEventContent_default', $_['toggleEventContent_default']);
        $_SESSION['configuration'] = null;
        //		header('location: settings.php#toggleEventContent');
        header('location: /');
    }
}
function intheleed_plugin_update($_)
{
    $myUser = isset($_SESSION['currentUser']) ? unserialize($_SESSION['currentUser']) : false;
    if ($myUser === false) {
        exit(_t('P_INTHELEED_CONNECTION_ERROR'));
    }
    if ($_['action'] == 'intheleed_update') {
        $configurationManager = new Configuration();
        $configurationManager->put('plugin_poche_link', $_['plugin_poche_link']);
        $_SESSION['configuration'] = null;
        header('location: settings.php');
    }
}
function cacheListFeed_plugin_action(&$_)
{
    if ($_['action'] == 'cacheListFeed') {
        $myUser = isset($_SESSION['currentUser']) ? unserialize($_SESSION['currentUser']) : false;
        if ($myUser == false) {
            exit;
        }
        $configurationManager = new Configuration();
        $configurationManager->getAll();
        $configurationManager->put('cacheListFeed', $_['cacher']);
    }
    if ($_['action'] == 'getCacheListFeed') {
        $myUser = isset($_SESSION['currentUser']) ? unserialize($_SESSION['currentUser']) : false;
        if ($myUser == false) {
            echo 1;
            exit;
        }
        $configurationManager = new Configuration();
        $configurationManager->getAll();
        echo $configurationManager->get('cacheListFeed');
    }
}
function i18n_plugin_AddForm()
{
    $test = array();
    $configuration = new Configuration();
    $configuration->getAll();
    echo '<section id="i18n" name="i18n" class="i18n">
			<h2>' . _t('P_I18N_PREF_TITLE') . '</h2>';
    /* -------------------------------------------------------- */
    // Gestion des retours des formulaires
    /* -------------------------------------------------------- */
    // cas de changement de la langue de Leed
    if (isset($_POST['plugin_i18n_changeLngLeed'])) {
        $langue = substr(basename($_POST['plugin_i18n_changeLngLeed']), 0, 2);
        $configuration->put('language', $langue);
        $test['info'][] = _t('P_I18N_MSG_CHG_LNG_LEED');
    }
    // Cas validation de la création d'une langue sur Leed.
    $newLanguage = '';
    if (isset($_POST['plugin_i18n_newLanguage'])) {
        $newLanguage = $_POST['plugin_i18n_newLanguage'];
        if (is_file($newLanguage)) {
            $test['Erreur'][] = _t('P_I18N_NEW_LNG_FILE_EXIST') . $newLanguage;
        } else {
            file_put_contents($newLanguage, '');
            $test['Info'][] = _t('P_I18N_NEW_LNG_FILE_OK', array($newLanguage));
            $_POST['plugin_i18n_selectLanguage'] = $newLanguage;
        }
    }
    // Cas d'une copy de fichier
    if (isset($_POST['plugin_i18n_copyLanguage'])) {
        $copyLanguage = $_POST['plugin_i18n_copyLanguage'];
        $fileDest = $_POST['plugin_i18n_copyFileDest'];
        if (is_file($fileDest)) {
            $test['Erreur'][] = _t('P_I18N_NEW_LNG_FILE_EXIST') . $fileDest;
        } else {
            if (is_writable(dirname($fileDest))) {
                copy($copyLanguage, $fileDest);
                $test['Info'][] = _t('P_I18N_NEW_LNG_FILE_OK', array($fileDest));
                $_POST['plugin_i18n_selectLanguage'] = $fileDest;
            } else {
                $test['Erreur'][] = _t('P_I18N_VERIF_ERR1') . ' ' . $fileDest;
            }
        }
    }
    // Cas validation d'une MAJ d'un fichier de langue
    if (isset($_POST['0123456789MAJLanguage'])) {
        $_ = array_map('addslashes', array_merge($_GET, $_POST));
        ksort($_);
        $ModifLanguage = $_['0123456789MAJLanguage'];
        unset($_['0123456789MAJLanguage']);
        if (is_writable($ModifLanguage)) {
            file_put_contents($ModifLanguage, plugin_i18n_json_encode($_));
            $test['Info'][] = _t('P_I18N_UPD_LNG_FILE_OK', array($_POST['0123456789MAJLanguage']));
            $_POST['plugin_i18n_selectLanguage'] = $ModifLanguage;
        } else {
            $test['Erreur'][] = _t('P_I18N_UPD_LNG_FILE_ERR', array($_POST['0123456789MAJLanguage']));
        }
    }
    // Gestion des erreurs PHP possible permettant l'écriture de fichier dans les répertoires de Leed
    if (!is_writable('./locale/')) {
        $test['Erreur'][] = _t('P_I18N_VERIF_ERR1');
    }
    if (!@function_exists('file_get_contents')) {
        $test['Erreur'][] = _t('P_I18N_VERIF_ERR2');
    }
    if (!@function_exists('file_put_contents')) {
        $test['Erreur'][] = _t('P_I18N_VERIF_ERR2');
    }
    if (@version_compare(PHP_VERSION, '5.1.0') <= 0) {
        $test['Erreur'][] = _t('P_I18N_VERIF_ERR3', array(PHP_VERSION));
    }
    if (ini_get('safe_mode') && ini_get('max_execution_time') != 0) {
        $test['Erreur'][] = _t('P_I18N_VERIF_ERR4');
    }
    if (count($test) != 0) {
        echo '<div id="result_i18n" class="result_i18n">
                  <table>
                      <th class="i18n_border i18n_th">' . _t('P_I18N_MESSAGES') . '</th>';
        foreach ($test as $type => $messages) {
            echo '<tr>';
            foreach ($messages as $message) {
                echo '<td class="i18n_border ' . ($type == 'Erreur' ? 'i18n_warn' : 'i18n_info') . '">' . $message . '</td>';
            }
            echo '</tr>';
        }
        echo '    </table>
              </div>';
    }
    // Sélectionner la langue ou saisir une nouvelle langue
    echo '<h3>' . _t('P_I18N_MANAGE_LNG_TITLE') . '</h3>';
    echo '<form action="settings.php#i18n" method="POST">
              <select name="plugin_i18n_changeLngLeed">';
    $filesLeed = glob('./templates/' . $configuration->get('theme') . '/locale/*.json');
    foreach ($filesLeed as $file) {
        if ($file == './templates/' . $configuration->get('theme') . '/locale/' . $configuration->get('language') . '.json') {
            echo '<option selected=selected value="' . $file . '">' . $file . '</option>';
        } else {
            echo '<option value="' . $file . '">' . $file . '</option>';
        }
    }
    echo '     </select>
              <input type="submit" name="plugin_i18n_chgLngLeed" value="' . _t('P_I18N_BTN_CHG_LNG_LEED') . '" class="button">
          </form>
          <h3>' . _t('P_I18N_CREA_FIC_LNG') . '</h3>
          <form action="settings.php#i18n" method="POST">
              <input type="text" value="" placeholder="./templates/theme/locale/xx.json" name="plugin_i18n_newLanguage">
              <input type="submit" name="plugin_i18n_saveButton" value="' . _t('P_I18N_BTN_CREATE_FILE') . '" class="button">
          </form>
          <h3>' . _t('P_I18N_MANAGE_TEMPLATE_LNG') . '</h3>
          <form action="settings.php#i18n" method="POST">
              <select name="plugin_i18n_copyLanguage">';
    $filesLeed = glob('./templates/*/locale/*.json');
    foreach ($filesLeed as $file) {
        if (isset($_POST['plugin_i18n_selectLanguage']) && $_POST['plugin_i18n_selectLanguage'] == $file) {
            echo '<option selected=selected value="' . $file . '">' . $file . '</option>';
        } else {
            echo '<option value="' . $file . '">' . $file . '</option>';
        }
    }
    echo '    </select> ' . _t('P_I18N_COPY_TO') . '
              <input type="text" value="" placeholder="./templates/theme/locale/xx.json" name="plugin_i18n_copyFileDest">
              <input type="submit" value="' . _t('P_I18N_BTN_COPY_FILE') . '" class="button">
          </form>
          <form action="settings.php#i18n" method="POST">
              <select name="plugin_i18n_selectLanguage">';
    foreach ($filesLeed as $file) {
        if (isset($_POST['plugin_i18n_selectLanguage']) && $_POST['plugin_i18n_selectLanguage'] == $file) {
            echo '<option selected=selected value="' . $file . '">' . $file . '</option>';
        } else {
            echo '<option value="' . $file . '">' . $file . '</option>';
        }
    }
    echo '    </select>
              <input type="submit" value="' . _t('P_I18N_BTN_LOAD_FILE') . '" class="button">
          </form>';
    echo '<h3>' . _t('P_I18N_MANAGE_PLUGIN_LNG') . '</h3>
            <form action="settings.php#i18n" method="POST">
              <select name="plugin_i18n_copyLanguage">';
    $filesLeed = glob('./plugins/*/locale/*.json');
    foreach ($filesLeed as $file) {
        if (isset($_POST['plugin_i18n_selectLanguage']) && $_POST['plugin_i18n_selectLanguage'] == $file) {
            echo '<option selected=selected value="' . $file . '">' . $file . '</option>';
        } else {
            echo '<option value="' . $file . '">' . $file . '</option>';
        }
    }
    echo '    </select> ' . _t('P_I18N_COPY_TO') . '
                          <input type="text" value="" placeholder="./plugins/plug/locale/xx.json" name="plugin_i18n_copyFileDest">
                          <input type="submit" value="' . _t('P_I18N_BTN_COPY_FILE') . '" class="button">
                      </form>
                      <form action="settings.php#i18n" method="POST">
                          <select name="plugin_i18n_selectLanguage">';
    foreach ($filesLeed as $file) {
        if (isset($_POST['plugin_i18n_selectLanguage']) && $_POST['plugin_i18n_selectLanguage'] == $file) {
            echo '<option selected=selected value="' . $file . '">' . $file . '</option>';
        } else {
            echo '<option value="' . $file . '">' . $file . '</option>';
        }
    }
    echo '    </select>
              <input type="submit" value="' . _t('P_I18N_BTN_LOAD_FILE') . '" class="button">
          </form>';
    echo '<h3>Gestion des fichiers de langues de Leed</h3>
            <form action="settings.php#i18n" method="POST">
              <select name="plugin_i18n_copyLanguage">';
    $filesLeed = glob('./locale/*.json');
    foreach ($filesLeed as $file) {
        if (isset($_POST['plugin_i18n_selectLanguage']) && $_POST['plugin_i18n_selectLanguage'] == $file) {
            echo '<option selected=selected value="' . $file . '">' . $file . '</option>';
        } else {
            echo '<option value="' . $file . '">' . $file . '</option>';
        }
    }
    echo '    </select> ' . _t('P_I18N_COPY_TO') . '
                          <input type="text" value="" placeholder="ex: ./locale/xx.json" name="plugin_i18n_copyFileDest">
                          <input type="submit" value="' . _t('P_I18N_BTN_COPY_FILE') . '" class="button">
                      </form>
                      <form action="settings.php#i18n" method="POST">
                          <select name="plugin_i18n_selectLanguage">';
    foreach ($filesLeed as $file) {
        if (isset($_POST['plugin_i18n_selectLanguage']) && $_POST['plugin_i18n_selectLanguage'] == $file) {
            echo '<option selected=selected value="' . $file . '">' . $file . '</option>';
        } else {
            echo '<option value="' . $file . '">' . $file . '</option>';
        }
    }
    echo '    </select>
              <input type="submit" value="' . _t('P_I18N_BTN_LOAD_FILE') . '" class="button">
          </form>';
    // sélection d'un langage à charger
    if (isset($_POST['plugin_i18n_selectLanguage'])) {
        $selectLanguage = $_POST['plugin_i18n_selectLanguage'];
        echo '<hr><h3>' . _t('P_I18N_UPD_FILE_TITLE', array($selectLanguage)) . '</h3>
                <span>' . _t('P_I18N_MSG_ALERT') . '</span>';
        // On scan tous les tags de Leed
        $foundTags = array();
        if (stripos(dirname($selectLanguage), './') === false) {
            $foundTags = plugin_i18n_scanTags(dirname($selectLanguage) . '/../', 'plugins');
        } else {
            // on est dans le répertoire ./locale/fr.json
            $foundTags = plugin_i18n_scanTags('./', 'plugins', 'templates');
        }
        // On charge le fichier de langue existant
        $currentLanguage = json_decode(file_get_contents($selectLanguage), true);
        ksort($currentLanguage);
        echo '<hr><h4>' . _t('P_I18N_KEY_INFILE_TITLE') . '</h4>
              <form action="settings.php#i18n" method="POST">
              <input type="hidden" name="0123456789MAJLanguage" value="' . $selectLanguage . '">
              <table class="diffTab">
                <tr>
                    <th class="i18n_border i18n_th">' . _t('P_I18N_KEY_FILE_NB_KEY', array(count($currentLanguage))) . '</th>
                    <th class="i18n_border i18n_th">' . _t('P_I18N_KEY_CODE_NB_KEY', array(count($foundTags))) . '</th>
                </tr>';
        $language = substr(basename($_POST['plugin_i18n_selectLanguage']), 0, 2);
        foreach ($currentLanguage as $key => $value) {
            if (in_array($key, $foundTags, true)) {
                echo ' <tr>
                            <td class="i18n_border i18n_textcenter">' . $key . '</td>
                            <td class="i18n_border i18n_textcenter">';
                $value = htmlentities($value, ENT_COMPAT, 'UTF-8');
                if (strlen($value) > 100) {
                    echo '<textarea name="' . $key . '">' . $value . '</textarea>';
                } else {
                    echo '<input type="text" name="' . $key . '" value="' . $value . '">';
                }
                echo '      </td>
                            <td class="i18n_a">&nbsp;<a style="color:#fff" target="_blank" href="http://translate.google.fr/#auto/' . $language . '/' . $value . '" title="' . _t('P_I18N_TRANSLATE') . '">T</a></td>
                      </tr>';
            }
        }
        echo '</table>';
        echo '<hr><h4>' . _t('P_I18N_KEY_INFILE_NOTFND_TITLE') . '</h4>
              <table class="diffTab">
                <tr>
                    <th class="i18n_border i18n_th">' . _t('P_I18N_KEY_FILE_NB_KEY', array(count($currentLanguage))) . '</th>
                    <th class="i18n_border i18n_th">' . _t('P_I18N_KEY_CODE_NB_KEY', array(count($foundTags))) . '</th>
                </tr>';
        // recherche des tags existant mais non trouvé dans la recherche du code
        foreach ($currentLanguage as $key => $value) {
            if (!in_array($key, $foundTags, true)) {
                echo '<tr><td class="i18n_border i18n_textcenter">' . $key . '</td>
                          <td class="i18n_border i18n_textcenter">' . $value . '<br />' . _t('P_I18N_MSG_NOT_FND_CODE') . '</td>
                      </tr>';
            }
        }
        // Recherche des tags existants dans le code mais non trouvé dans la traduction
        foreach ($foundTags as $key => $value) {
            if (!isset($currentLanguage[$value])) {
                echo '<tr><td class="i18n_border i18n_textcenter">' . $value . '</td>
                          <td class="i18n_border i18n_textcenter"><input type="text" name="' . $value . '" value="">+</td></tr>';
            }
        }
        echo '</table>
              <input type="submit" value="' . _t('P_I18N_BTN_UPD_FILE') . '" class="button">
              </form>';
    }
    echo '</section>';
}
Example #8
0
require_once 'KodiCmd.class.php';
$table = new KodiCmd();
$table->create();
$s1 = new Section();
$s1->setLabel('kodi');
$s1->save();
$r1 = new Right();
$r1->setSection($s1->getId());
$r1->setRead('1');
$r1->setDelete('1');
$r1->setCreate('1');
$r1->setUpdate('1');
$r1->setRank('1');
$r1->save();
$conf = new Configuration();
$conf->put('plugin_kodiCmd_api_url_kodi', 'http://192.168.1.107:85/jsonrpc');
$conf->put('plugin_kodiCmd_api_timeout_kodi', 5);
$conf->put('plugin_kodiCmd_api_recognition_status', '');
$ro = new Room();
$ro->setName('KODI');
$ro->setDescription('De la bonne zic, un bon p\'tit film....');
$ro->save();
$roomManager = new Room();
$rooms = $roomManager->populate();
foreach ($rooms as $room) {
    if ($room->getName() == "KODI") {
        $kodiRoomId = $room->getId();
    }
}
$id = 0;
$kodi = new KodiCmd();
Example #9
0
 $user = new User();
 $configuration = new Configuration();
 $right = new Right();
 $rank = new Rank();
 $section = new Section();
 $event = new Event();
 $client = new Client();
 //Création des tables SQL
 $configuration->create();
 $user->create();
 $right->create();
 $rank->create();
 $section->create();
 $event->create();
 $client->create();
 $configuration->put('UPDATE_URL', 'http://update.idleman.fr/yana?callback=?');
 $configuration->put('DEFAULT_THEME', 'default');
 $configuration->put('COOKIE_NAME', 'yana');
 $configuration->put('COOKIE_LIFETIME', '7');
 $configuration->put('VOCAL_ENTITY_NAME', 'YANA');
 $configuration->put('PROGRAM_VERSION', '3.0.6');
 $configuration->put('HOME_PAGE', 'index.php');
 $configuration->put('VOCAL_SENSITIVITY', '0.0');
 //Création du rang admin
 $rank = new Rank();
 $rank->setLabel('admin');
 $rank->save();
 //Déclaration des sections du programme
 $sections = array('event', 'vocal', 'user', 'plugin', 'configuration', 'admin');
 //Création des sections déclarées et attribution de tous les droits sur toutes ces sections pour l'admin
 foreach ($sections as $sectionName) {
function plugin_leedUpdateSource_messageAccueil()
{
    $configurationManager = new Configuration();
    $configurationManager->getAll();
    // afin de ne pas intéroger cinquante fois par jour et bouffer du temps de réponse, une recherche par jour est suffisante.
    if ($configurationManager->get('plugin_leedUpdateSource_date') == date('Ymd')) {
        echo '';
    } else {
        $configurationManager->put('plugin_leedUpdateSource_date', date('Ymd'));
        $message = plugin_leedUpdateSource_message('plugin_leedUpdateSource_source');
        if ($message == '') {
            $message = plugin_leedUpdateSource_message('plugin_leedUpdateSource_sourcePlugin');
        }
        $message == '' ? $return = '' : ($return = '<aside>Une mise à jour est disponible - <a href="settings.php#leedUpdateSource">Go !!!</a></aside>');
        echo $return;
    }
}
function epub_plugin_update_settings(&$_)
{
    if ($_['action'] == 'epub_plugin_update') {
        $myUser = isset($_SESSION['currentUser']) ? unserialize($_SESSION['currentUser']) : false;
        if ($myUser === false) {
            exit(_t('P_EPUB_NOTLOGGED_ERROR_MODIFY_SETTINGS'));
        }
        $configManager = new Configuration();
        $configManager->getAll();
        $configManager->put('epub_version', $_['epub_version']);
        $configManager->put('epub_menu', isset($_['epub_menu']) ? $_['epub_menu'] === 'on' ? 1 : 0 : 0);
        $configManager->put('epub_menu_unread', isset($_['epub_menu_unread']) ? $_['epub_menu_unread'] === 'on' ? 1 : 0 : 0);
        $configManager->put('epub_menu_favorites', isset($_['epub_menu_favorites']) ? $_['epub_menu_favorites'] === 'on' ? 1 : 0 : 0);
        $_SESSION['configuration'] = null;
        header('location: settings.php#epub');
    }
}
Example #12
0
     $feed = $feed->getById($_['idFeed']);
     $feed->setIsverbose($_['displayFeedIsVerbose'] == "0" ? 1 : 0);
     $feed->save();
     break;
 case 'optionFeedIsVerbose':
     if ($myUser == false) {
         $response_array['status'] = 'noconnect';
         $response_array['texte'] = _t('YOU_MUST_BE_CONNECTED_ACTION');
         header('Content-type: application/json');
         echo json_encode($response_array);
         exit;
     }
     // changement du statut de l'option
     $configurationManager = new Configuration();
     $conf = $configurationManager->getAll();
     $configurationManager->put('optionFeedIsVerbose', $_['optionFeedIsVerbose'] == "0" ? 0 : 1);
     break;
 case 'articleDisplayMode':
     if ($myUser == false) {
         $response_array['status'] = 'noconnect';
         $response_array['texte'] = _t('YOU_MUST_BE_CONNECTED_ACTION');
         header('Content-type: application/json');
         echo json_encode($response_array);
         exit;
     }
     // chargement du content de l'article souhaité
     $newEvent = new Event();
     $event = $newEvent->getById($_['event_id']);
     if ($_['articleDisplayMode'] == 'content') {
         //error_log(print_r($_SESSION['events'],true));
         $content = $event->getContent();
Example #13
0
<?php

$conf = new Configuration();
$conf->put('ip', 'localhost', 'transmission');
$conf->put('port', '9091', 'transmission');
Example #14
0
require_once 'Sensor.class.php';
$table = new Sensor();
$table->create();
require_once 'SensorType.class.php';
$table2 = new SensorType();
$table2->create();
$s1 = new Section();
$s1->setLabel('sensor');
$s1->save();
$s2 = new Section();
$s2->setLabel('sensortypes');
$s2->save();
$r1 = new Right();
$r1->setSection($s1->getId());
$r1->setRead('1');
$r1->setDelete('1');
$r1->setCreate('1');
$r1->setUpdate('1');
$r1->setRank('1');
$r1->save();
$r2 = new Right();
$r2->setSection($s2->getId());
$r2->setRead('1');
$r2->setDelete('1');
$r2->setCreate('1');
$r2->setUpdate('1');
$r2->setRank('1');
$r2->save();
$conf = new Configuration();
$conf->put('plugin_sensor_receptor_pin', '0');
Example #15
0
$eventManager = new Event();
$folderManager = new Folder();
$configurationManager = new Configuration();
$conf = $configurationManager->getAll();
$language = $configurationManager->get('language');
//@todo requis pour la MAJ mais pourra être supprimé.
if (empty($language)) {
    // On tente de récupérer la valeur issue de 'constant.php'
    if (defined('LANGUAGE')) {
        $language = LANGUAGE;
    } elseif (defined('LANGAGE')) {
        $language = LANGAGE;
    } else {
        $language = Translation::DEFAULT_LANGUAGE;
    }
    $configurationManager->put('language', $language);
}
// Faut-il supprimer la variable /langu?age/ de 'constant.php'?
$theme = $configurationManager->get('theme');
//Instanciation du template
$tpl = new RainTPL();
//Definition des dossiers de template
raintpl::configure("base_url", null);
raintpl::configure("tpl_dir", './templates/' . $theme . '/');
raintpl::configure("cache_dir", "./cache/tmp/");
i18n_init($language, dirname(__FILE__) . '/templates/' . $theme . '/');
if ($resultUpdate) {
    die(_t('LEED_UPDATE_MESSAGE'));
}
$view = '';
$tpl->assign('myUser', $myUser);
function social_plugin_update($_)
{
    if ($_['action'] == 'social_update') {
        $configurationManager = new Configuration();
        $configurationManager->getAll();
        $configurationManager->put('plugin_social_twitter', $_['socialTwitter']);
        $configurationManager->put('plugin_social_googleplus', $_['socialGooglePlus']);
        $configurationManager->put('plugin_social_facebook', $_['socialFacebook']);
        $configurationManager->put('plugin_social_delicious', $_['socialDelicious']);
        $configurationManager->put('plugin_social_shaarli', $_['socialShaarli']);
        $configurationManager->put('plugin_social_shaarli_link', $_['plugin_social_shaarli_link']);
        $configurationManager->put('plugin_social_pocket', $_['socialPocket']);
        $configurationManager->put('plugin_social_instapaper', $_['socialInstapaper']);
        $configurationManager->put('plugin_social_mail', $_['socialMail']);
        $configurationManager->put('plugin_social_linkedin', $_['socialLinkedIn']);
        $configurationManager->put('plugin_social_wallabag', $_['socialwallabag']);
        $configurationManager->put('plugin_social_wallabag_link', $_['plugin_social_wallabag_link']);
        $configurationManager->put('plugin_social_diigo', $_['socialdiigo']);
        $configurationManager->put('plugin_social_diigo_apikey', $_['plugin_social_diigo_apikey']);
        $_SESSION['configuration'] = null;
        header('location: settings.php#socialBloc');
    }
}
function preference_plugin_action()
{
    global $_, $myUser, $conf;
    switch ($_['action']) {
        case 'SAVE_SETTINGS':
            $configuration = new Configuration();
            $configuration->getAll();
            foreach ($_['data'] as $key => $value) {
                $configuration->put($key, $value);
            }
            echo 'Réglages sauvegardés';
            break;
    }
}
Example #18
0
<?php

require_once 'MarantzCmd.class.php';
$table = new MarantzCmd();
$table->create();
$conf = new Configuration();
$conf->put('ip', '192.168.0.11', 'marantz');
$conf->put('port', '80', 'marantz');
$conf->put('zone', 'MainZone', 'marantz');
Example #19
0
<?php

require_once 'DomoticzCmd.class.php';
$table = new DomoticzCmd();
$table->create();
$conf = new Configuration();
$conf->put('ip', 'localhost', 'domoticz');
$conf->put('port', '8080', 'domoticz');