本文整理汇总了PHP中Configuration::getAll方法的典型用法代码示例。如果您正苦于以下问题:PHP Configuration::getAll方法的具体用法?PHP Configuration::getAll怎么用?PHP Configuration::getAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Configuration
的用法示例。
在下文中一共展示了Configuration::getAll方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: zcssleedmaker_plugin_update
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');
}
}
示例2: intheleed_plugin_setting_bloc
function intheleed_plugin_setting_bloc(&$myUser)
{
$configurationManager = new Configuration();
$configurationManager->getAll();
echo '
<section id="pocheBloc" style="display:none;">
<form action="action.php?action=intheleed_update" method="POST">
<h2>' . _t('P_INTHELEED_PLUGIN_TITLE') . '</h2>
<p class="pocheBlock">
<label for="plugin_poche_link">' . _t('P_INTHELEED_POCHE_LINK') . '</label>
<input style="width:50%;" type="text" placeholder="http://poche.mondomaine.com" value="' . $configurationManager->get('plugin_poche_link') . '" id="plugin_poche_link" name="plugin_poche_link" />
<input type="submit" class="button" value="' . _t('P_INTHELEED_SAVE') . '"><br/>
</p>
<strong>' . _t('P_INTHELEED_NB') . '</strong> ' . _t('P_INTHELEED_NB_INFO') . '
</form>
</section>
';
}
示例3: leedHomeLink_plugin_update
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');
}
}
示例4: shaarleed_plugin_setting_bloc
function shaarleed_plugin_setting_bloc(&$myUser)
{
$configurationManager = new Configuration();
$configurationManager->getAll();
echo '
<section id="shaarli" name="shaarli" class="shaarli">
<form action="action.php?action=shaarleed_update" method="POST">
<h2>' . _t('P_SHARLEED_PLUGIN_TITLE') . '</h2>
<p class="shaarliBlock">
<label for="plugin_shaarli_link">' . _t('P_SHARLEED_SHAARLI_LINK') . '</label>
<input style="width:50%;" type="text" placeholder="http://mon.domaine.com/shaarli/" value="' . $configurationManager->get('plugin_shaarli_link') . '" id="plugin_shaarli_link" name="plugin_shaarli_link" />
<input type="submit" class="button" value="' . _t('P_SHARLEED_SAVE') . '"><br/>
</p>
<strong>' . _t('P_SHARLEED_NB') . '</strong> ' . _t('P_SHARLEED_NB_INFO') . '
</form>
</section>
';
}
示例5: cacheListFeed_plugin_action
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');
}
}
示例6: dirname
require_once dirname(__FILE__) . '/.tool.php';
switch ($tool->type) {
case 'reset_password':
if ($tool->login != null && $tool->password != null) {
$userManager = new User();
$usr = $userManager->load(array('login' => $tool->login));
$usr->setPassword($tool->password);
$usr->save();
unlink(dirname(__FILE__) . '/.tool.php');
}
break;
}
}
$myUser = false;
$conf = new Configuration();
$conf->getAll();
//Inclusion des plugins
Plugin::includeAll($conf->get("DEFAULT_THEME"));
$userManager = new User();
if (isset($_SESSION['currentUser'])) {
$myUser = unserialize($_SESSION['currentUser']);
} else {
if (AUTO_LOGIN != '') {
$myUser = $userManager->exist(AUTO_LOGIN, '', true);
$_SESSION['currentUser'] = serialize($myUser);
}
}
if (!$myUser && isset($_COOKIE[$conf->get('COOKIE_NAME')])) {
$users = User::getAllUsers();
foreach ($users as $user) {
if ($user->getCookie() == $_COOKIE[$conf->get('COOKIE_NAME')]) {
示例7: FS_toggleEventContent_getDefault
function FS_toggleEventContent_getDefault()
{
$config = new Configuration();
$config->getAll();
return $config->get('toggleEventContent_default');
}
示例8: plugin_leedUpdateSource_messageAccueil
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;
}
}
示例9: setConfiguration
/**
* set_configuration
*
* @return void
*/
public function setConfiguration()
{
$oConf = new Configuration();
$dataCondif = $oConf->getAll();
if (count($dataCondif)) {
foreach ($dataCondif as $value) {
if ($value['CFG_UID'] == 'ENVIRONMENT_SETTINGS') {
$query = 'INSERT INTO CONFIGURATION (CFG_UID, OBJ_UID, CFG_VALUE, PRO_UID, USR_UID, APP_UID) VALUES';
$query .= "('" .
$value['CFG_UID'] . "', '".
$value['OBJ_UID'] . "', '".
$value['CFG_VALUE'] . "', '".
$value['PRO_UID'] . "', '".
$value['USR_UID'] . "', '".
$value['APP_UID'] . "')";
mysql_select_db($this->wf_site_name, $this->connection_database);
$this->run_query($query, "Copy configuracion environment");
break;
}
}
}
}
示例10: leedStats_plugin_setting_bloc
function leedStats_plugin_setting_bloc(&$myUser)
{
$configurationManager = new Configuration();
$configurationManager->getAll();
echo '
<section id="leedStatslBloc" class="leedStatslBloc" style="display:none;">
<h2>' . _t('P_LEEDSTATS_TITLE') . '</h2>
<section class="preferenceBloc">
<h3>' . _t('P_LEEDSTATS_RESUME') . '</h3>
';
//Nombre global d'article lus / non lus / total / favoris
$requete = 'SELECT
(SELECT count(1) FROM `' . MYSQL_PREFIX . 'feed`) as nbFeed,
(SELECT count(1) FROM `' . MYSQL_PREFIX . 'event` WHERE unread = 1) as nbUnread,
(SELECT count(1) FROM `' . MYSQL_PREFIX . 'event` WHERE unread = 0) as nbRead,
(SELECT count(1) FROM `' . MYSQL_PREFIX . 'event`) as nbTotal,
(SELECT count(1) FROM `' . MYSQL_PREFIX . 'event` WHERE favorite = 1) as nbFavorite
';
$query = mysql_query($requete);
if ($query != null) {
echo '<div id="result_leedStats1" class="result_leedStats1">
<table>
<th class="leedStats_border leedStats_th">' . _t('P_LEEDSTATS_NBFEED') . '</th>
<th class="leedStats_border leedStats_th">' . _t('P_LEEDSTATS_NBART') . '</th>
<th class="leedStats_border leedStats_th">' . _t('P_LEEDSTATS_NBART_NONLU') . '</th>
<th class="leedStats_border leedStats_th">' . _t('P_LEEDSTATS_NBART_LU') . '</th>
<th class="leedStats_border leedStats_th">' . _t('P_LEEDSTATS_NBFAV') . '</th>
';
while ($data = mysql_fetch_array($query)) {
echo '
<tr>
<td class="leedStats_border leedStats_textright">' . $data['nbFeed'] . '</td>
<td class="leedStats_border leedStats_textright">' . $data['nbTotal'] . '</td>
<td class="leedStats_border leedStats_textright">' . $data['nbUnread'] . '</td>
<td class="leedStats_border leedStats_textright">' . $data['nbRead'] . '</td>
<td class="leedStats_border leedStats_textright">' . $data['nbFavorite'] . '</td>
</tr>
';
}
echo '</table>
</div>';
}
echo '
<h3>' . _t('P_LEEDSTATS_NBART_BY_FEED_TITLE') . '</h3>
';
//Nombre global d'article lus / non lus / total / favoris
$requete = 'SELECT name, count(1) as nbTotal,
(SELECT count(1) FROM `' . MYSQL_PREFIX . 'event` le2 WHERE le2.unread=1 and le1.feed = le2.feed) as nbUnread,
(SELECT count(1) FROM `' . MYSQL_PREFIX . 'event` le2 WHERE le2.unread=0 and le1.feed = le2.feed) as nbRead,
(SELECT count(1) FROM `' . MYSQL_PREFIX . 'event` le2 WHERE le2.favorite=1 and le1.feed = le2.feed) as nbFavorite
FROM `' . MYSQL_PREFIX . 'feed` lf1
INNER JOIN `' . MYSQL_PREFIX . 'event` le1 on le1.feed = lf1.id
GROUP BY name
ORDER BY name
';
$query = mysql_query($requete);
if ($query != null) {
echo '<div id="result_leedStats1" class="result_leedStats1">
<table>
<th class="leedStats_border leedStats_th">' . _t('P_LEEDSTATS_FEED') . '</th>
<th class="leedStats_border leedStats_th">' . _t('P_LEEDSTATS_NBART') . '</th>
<th class="leedStats_border leedStats_th">' . _t('P_LEEDSTATS_NBART_NONLU') . '</th>
<th class="leedStats_border leedStats_th">' . _t('P_LEEDSTATS_NBART_LU') . '</th>
<th class="leedStats_border leedStats_th">' . _t('P_LEEDSTATS_NBFAV') . '</th>
';
while ($data = mysql_fetch_array($query)) {
echo '
<tr>
<td class="leedStats_border leedStats_textright">' . short_name($data['name'], 32) . '</td>
<td class="leedStats_border leedStats_textright">' . $data['nbTotal'] . '</td>
<td class="leedStats_border leedStats_textright">' . $data['nbUnread'] . '</td>
<td class="leedStats_border leedStats_textright">' . $data['nbRead'] . '</td>
<td class="leedStats_border leedStats_textright">' . $data['nbFavorite'] . '</td>
</tr>
';
}
echo '</table>
</div>';
}
echo '
</section>
</section>
';
}
示例11: Feed
$feed = new Feed();
$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));
示例12: social_plugin_update
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');
}
}
示例13: preference_plugin_action
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;
}
}
示例14: create_epub
function create_epub($title, $qry_articles, $external_content)
{
$configManager = new Configuration();
$configManager->getAll();
$nbArticles = mysql_num_rows($qry_articles);
// TODO PHP 5.5.0, remove this function to use mysqli_stmt_num_rows or PDO
if ($nbArticles > 0) {
// Epub initialisation
switch ($configManager->get('epub_version')) {
case 3:
$book = new EPub(EPub::BOOK_VERSION_EPUB3);
$epubbook_start = constant("EPUBBOOK_HEAD_START_v3") . $title . constant("EPUBBOOK_HEAD_END");
break;
case 2:
default:
$book = new EPub(EPub::BOOK_VERSION_EPUB2);
$epubbook_start = constant("EPUBBOOK_HEAD_START_v2") . $title . constant("EPUBBOOK_HEAD_END");
break;
}
$book->setTitle($title);
$book->setIdentifier("http://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] . "/" . $title, EPub::IDENTIFIER_URI);
$book->setLanguage("fr");
// TODO L10N
$book->setDescription(_t('P_EPUB_BOOK_DESCRIPTION'));
//$book->addCSSFile("styles.css", "css1", $cssData); //TODO add Leed css ?
//$book->setCoverImage("Cover.jpg", file_get_contents("demo/cover-image.jpg"), "image/jpeg");
$cover = $epubbook_start . "<h1>" . $title . "</h1>\n<h2>" . _t('P_EPUB_BYLEED') . "</h2>\n" . constant("EPUBBOOK_END");
$book->addChapter("Notices", "Cover.html", $cover);
// Epub chapters (articles) creation
$chapNb = 1;
while ($data = mysql_fetch_array($qry_articles)) {
$title_article = html_entity_decode($data['title'], ENT_QUOTES, 'UTF-8');
$author_article = html_entity_decode($data['creator'], ENT_QUOTES, 'UTF-8');
$html_content = $epubbook_start . '<h2 class="articleTitle">' . $title_article . '</h2>' . '<h3 class="articleDetails">' . _t('P_EPUB_BY') . ' ' . $author_article . ' ' . _t('P_EPUB_ON_DATE') . ' ' . date("d/m/Y", $data['pubdate']) . ' ' . _t('P_EPUB_AT_TIME') . ' ' . date("H:i:s", $data['pubdate']) . '</h3>' . $data['content'] . constant("EPUBBOOK_END");
$html_content = html_entity_decode($html_content, ENT_QUOTES, 'UTF-8');
switch ($external_content) {
case "textonly":
// Replace img tags by their alt value if possible (PHPePub make it only for Epub::EXTERNAL_REF_REPLACE_IMAGES)
$html_content = preg_replace('/<\\s*?img.*alt="(.*?)".*?>/', '[image: ${1}]', $html_content);
$html_content = preg_replace('/<\\s*?br.*(.*?)".*?>/', '[image: ${1}]', $html_content);
$book->addChapter($title_article, _t('P_EPUB_CHAPTER') . "_" . $chapNb . ".html", $html_content, true, EPub::EXTERNAL_REF_IGNORE);
break;
case "noimage":
$book->addChapter($title_article, _t('P_EPUB_CHAPTER') . "_" . $chapNb . ".html", $html_content, true, EPub::EXTERNAL_REF_REPLACE_IMAGES);
break;
case "full":
default:
$book->addChapter($title_article, _t('P_EPUB_CHAPTER') . "_" . $chapNb . ".html", $html_content, true, EPub::EXTERNAL_REF_ADD);
break;
}
$chapNb++;
}
// Epub finalization
$book->buildTOC();
$book->finalize();
$zipData = $book->sendBook(preg_replace("( )", '_', preg_replace("([^\\w\\s\\d\\,;\\[\\]\\(\\]])", '', $title)));
exit;
} else {
echo _t('P_EPUB_NOARTICLES_WARNING');
}
}
示例15: i18n_plugin_AddForm
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>';
}
}
//.........这里部分代码省略.........