コード例 #1
0
ファイル: index.php プロジェクト: rludvik/phpfreechat
}
if ($dcchat_installed)
{
  buffer::str('<li>'.sprintf($img_check,'on').' '.
	      __('dcChat is installed.').
	      '</li>'
	      );
}
else
{
  buffer::str('<li>'.sprintf($img_check,'off').' '.
	      __('dcChat is not installed.').($can_install?' (<a href="'.$url.'&amp;install">install it</a>)':'').
	      '</li>'
	      );
}
*/
/*
if (is_writable($dir)) {
  buffer::str('<li>'.sprintf($img_check,'on').' '.
	      sprintf(__('Directory %s is writable.'),'<strong><code>'.$dir.'</code></strong>').
	      '</li>'
	      );
} else {
  buffer::str('<li>'.sprintf($img_check,'off').' '.
	      sprintf(__('Directory %s is not writable.'),'<strong><code>'.$dir.'</code></strong>').
	      '</li>'
	      );
}
*/
buffer::str("</ul>");
コード例 #2
0
ファイル: index.php プロジェクト: BackupTheBerlios/wikiplug
function testerConfig(&$sortie, $texte, $test, $texte_erreur = '', $stop_erreur = 1, $erreur)
{
    if ($erreur == 2) {
        return 2;
    }
    buffer::str($texte . ' ');
    if ($test) {
        buffer::str('<span class="ok">&nbsp;OK&nbsp;</span><br />' . "\n");
        return 0;
    } else {
        buffer::str('<span class="failed">&nbsp;ECHEC&nbsp;</span>');
        if ($texte_erreur) {
            buffer::str(' <span class="erreur">' . $texte_erreur . '</span>');
        }
        buffer::str('<br />' . "\n");
        if ($stop_erreur == 1) {
            return 2;
        } else {
            return 1;
        }
    }
}
コード例 #3
0
ファイル: index.php プロジェクト: BackupTheBerlios/wikiplug
<?php

// Administration
// Vérification de sécurité
if (!defined("TOOLS_MANAGER")) {
    die("acc&egrave;s direct interdit");
}
buffer::str(' 
Ajouter les lignes suivantes dans le fichier wakka.css pour personnaliser
votre menu de navigation :
<br>
<code>
.page_table {margin: 0px; padding: 0px ; border: none; height: 100%;width: 100%;} 
<br>
.menu_column {background-color: #FFFFCC; vertical-align: top; width: 150px; border: 1px solid #000000;padding:5px;}
<br>
.body_column {vertical-align: top; border: none;padding:5px;}
<br>
</code>
');
コード例 #4
0
ファイル: index.php プロジェクト: BackupTheBerlios/wikiplug
<?php

// index.php
// Administration de l'extension : initialisations (tables, fichier de configuration) , information etc. : toutes
// opérations réservées à l'administrateur technique de Wikini.
// Vérification de sécurité
if (!defined("TOOLS_MANAGER")) {
    die("acc&egrave;s direct interdit");
}
// Affichage au moyen de la méthode statique buffer::str :
buffer::str('Parametrage de l\'extension Hello ...' . '<br />');
// Utilisation d'un objet Wiki pour acces à la base de donnée
$wiki = new Wiki($wakkaConfig);
buffer::str('Utilisateurs enregistrés : ' . '<br />');
$last_users = $wiki->LoadAll("select name, signuptime from " . $wiki->config["table_prefix"] . "users order by signuptime desc limit 10");
foreach ($last_users as $user) {
    buffer::str($user["name"] . " . . . " . $user["signuptime"] . "<br />\n");
}
コード例 #5
0
ファイル: index.php プロジェクト: BackupTheBerlios/wikiplug
<?php

// index.php
// Administration de l'extension : initialisations (tables, fichier de configuration) , information etc. : toutes
// opérations réservées à l'administrateur technique de Wikini.
// Vérification de sécurité
if (!defined("TOOLS_MANAGER")) {
    die("acc&egrave;s direct interdit");
}
// Affichage au moyen de la méthode statique buffer::str :
buffer::str('Parametrage de l\'extension akismet ...' . '<br />');
# Liste des thèmes
$plugins_root = dirname(__FILE__) . '/../';
$plugins = new plugins($plugins_root);
$plugins->getPlugins(false);
$plugins_list = $plugins->getPluginsList();
$is_writable = is_writable($plugins_root);
if (!$is_writable) {
    buffer::str('<p>' . sprintf(__('The folder %s is not writable, please check its permissions.'), DC_ECRIRE . '/tools/') . '</p>');
} else {
    buffer::str('<form action="tools.php" method="post">' . '<p><label for="tool_url">' . __('Entrez votre clef Akismet') . ' :</label>' . form::field('akismet_key', 50, '', $akismet_key) . '</p>' . '<p><input type="submit" class="submit" value="' . __('Install') . '" />' . '<input type="hidden" name="p" value="akismet" /></p>' . '</form>');
}
if (isset($_POST['akismet_key'])) {
    $key_path = $plugins->location . $p . '/akismet.key.php';
    $content = "<?php\n" . "\$akismet_key='" . $_POST['akismet_key'] . "';\n" . "?>";
    if (!files::putContent($key_path, $content)) {
        buffer::str('Problème installation de la clef' . '<br />');
    } else {
        buffer::str('Clef installée !' . '<br />');
    }
}
コード例 #6
0
ファイル: index.php プロジェクト: BackupTheBerlios/wikiplug
if (!empty($_POST['p_theme'])) {
    $fname = 'theme-' . $_POST['p_theme'];
    if (!empty($themes_list[$_POST['p_theme']]['version'])) {
        $fname .= '-' . $themes_list[$_POST['p_theme']]['version'];
    }
    $fname .= '.pkg.gz';
    dcPackager::packIt($_POST['p_theme'], $themes_root, $fname, !empty($_POST['p_save']) && is_writable(DC_SHARE_DIR), $tool_url . '&t_ok=1', __('An error occured while creating the theme.'), $err);
}
/* Affichage
-------------------------------------------------------- */
buffer::str('<h2>' . __('Themes and plugins packing') . '</h2>');
if ($err != '') {
    buffer::str('<div class="erreur"><p><strong>' . __('Error(s)') . ' :</strong></p>' . $err . '</div>');
}
if (!empty($_GET['p_ok'])) {
    buffer::str('<p class="message">' . __('Plugin saved.') . '</p>');
}
if (!empty($_GET['t_ok'])) {
    buffer::str('<p class="message">' . __('Theme saved.') . '</p>');
}
buffer::str('<form action="' . $tool_url . '" method="post">' . '<fieldset class="clear"><legend>' . __('Pack a plugin') . '</legend>' . '<p class="field"><label class="float" for="p_plugin">' . __('Plugin name') . ' :</label>' . form::combo('p_plugin', $p_list) . '</p>' . '<p><input class="submit" type="submit" name="p_dl" value="' . __('Download this plugin') . '" />');
if (is_writable(DC_SHARE_DIR)) {
    buffer::str(' <input class="submit" type="submit" name="p_save" value="' . __('Save this plugin in share folder') . '" /></p>');
}
buffer::str('</p>' . '</fieldset></form>');
buffer::str('<form action="' . $tool_url . '" method="post">' . '<fieldset class="clear"><legend>' . __('Pack a theme') . '</legend>' . '<p class="field"><label class="float" for="p_theme">' . __('Theme name') . ' :</label>' . form::combo('p_theme', $t_list) . '</p>' . '<p><input class="submit" type="submit" name="p_dl" value="' . __('Download this theme') . '" />');
if (is_writable(DC_SHARE_DIR)) {
    buffer::str(' <input class="submit" type="submit" name="p_save" value="' . __('Save this theme in share folder') . '" /></p>');
}
buffer::str('</p>' . '</fieldset></form>');
コード例 #7
0
ファイル: index.php プロジェクト: BackupTheBerlios/wikiplug
<?php

// Administration
// Verification de securite
if (!defined("TOOLS_MANAGER")) {
    die("acc&egrave;s direct interdit");
}
buffer::str('
Le plugin "Templates" vous permet de gerer des template html et css pour votre design web.
');
コード例 #8
0
ファイル: index.php プロジェクト: BackupTheBerlios/wikiplug
    buffer::str('<p>' . sprintf(__('The folder %s is not writable, please check its permissions.'), DC_ECRIRE . '/tools/') . '</p>');
} else {
    buffer::str('<form action="tools.php" method="get">' . '<p><label for="tool_url">' . __('Please give the URL (http or ftp) of the plugin\'s file') . ' :</label>' . form::field('tool_url', 50, '', $tool_url) . '</p>' . '<p><input type="submit" class="submit" value="' . __('install') . '" />' . '<input type="hidden" name="p" value="toolsmng" /></p>' . '</form>');
}
buffer::str('<p><a href="http://www.wikini.net">' . __('Install new plugins') . '</a></p>');
# Traduction des plugins
foreach ($plugins_list as $k => $v) {
    $plugins->loadl10n($k);
    $plugins_list[$k]['label'] = __($v['label']);
    $plugins_list[$k]['desc'] = __($v['desc']);
}
# Tri des plugins par leur nom
uasort($plugins_list, create_function('$a,$b', 'return strcmp($a["label"],$b["label"]);'));
buffer::str('<h3>' . __('List of installed plugins') . '</h3>' . '<dl>');
foreach ($plugins_list as $k => $v) {
    buffer::str('<dt>' . __($v['label']) . ' - ' . $k . '</dt>' . '<dd>' . __($v['desc']) . ' <br />' . 'par ' . $v['author'] . ' - ' . __('version') . ' ' . $v['version'] . ' <br />');
    if ($k != 'toolsmng') {
        if (is_writable($plugins_root . $k . '/desc.xml')) {
            $action = $v['active'] ? 'disable' : 'enable';
            buffer::str('<a href="tools.php?p=toolsmng&switch=' . $k . '">' . __($action) . '</a>');
        } else {
            buffer::str('<em>' . sprintf(__('cannot enable/disable'), 'desc.xml') . '</em>');
        }
        if ($is_writable) {
            buffer::str(' - <a href="tools.php?p=toolsmng&amp;delete=' . $k . '" ' . 'onclick="return window.confirm(\'' . __('Are you sure you want to delete this plugin ?') . '\')">' . __('delete') . '</a>');
        }
    }
    buffer::str('</dd>');
}
buffer::str('</dl>');
コード例 #9
0
ファイル: index.php プロジェクト: BackupTheBerlios/wikiplug
                    $wiki->DeleteOrphanedPage($page);
                    $deletedPages .= $page . ", ";
                }
                $deletedPages = trim($deletedPages, ", ");
            }
            // -- 3.2 Restauration des pages sélectionnées ---
            if (!empty($_POST['rev'])) {
                //print_r($_POST["rev"]);
                foreach ($_POST["rev"] as $rev_id) {
                    buffer::str($rev_id . "<br>");
                    // Sélectionne la révision
                    $revision = $wiki->LoadSingle("select * from " . $wiki->config["table_prefix"] . "pages where id = '" . mysql_escape_string($rev_id) . "' limit 1");
                    // Fait de la dernière version de cette révision
                    // une version archivée
                    $requeteUpdate = "update " . $wiki->config["table_prefix"] . "pages " . "set latest = 'N' " . "where latest = 'Y' " . "and tag = '" . $revision["tag"] . "' " . "limit 1";
                    $wiki->Query($requeteUpdate);
                    $restoredPages .= $revision["tag"] . ", ";
                    // add new revision
                    $wiki->Query("insert into " . $wiki->config["table_prefix"] . "pages set " . "tag = '" . mysql_escape_string($revision['tag']) . "', " . "time = now(), " . "owner = '" . mysql_escape_string($revision['owner']) . "', " . "user = '******', " . "latest = 'Y', " . "body = '" . mysql_escape_string(chop($revision['body'])) . "'");
                }
            }
            $restoredPages = trim($restoredPages, ", ");
            buffer::str("<li>Pages restaurées&nbsp;: " . $restoredPages . ".</li>\n");
            buffer::str("<li>Pages supprimées&nbsp;: " . $deletedPages . ".</li>\n");
            buffer::str("</ul>\n");
            buffer::str("<p><a href=\"" . $despam_url . "\">Retour au formulaire de départ >></a></p>\n");
            buffer::str("<p><a href=\"");
            buffer::str("</div>\n\n");
        }
    }
}
コード例 #10
0
ファイル: index.php プロジェクト: BackupTheBerlios/wikiplug
<?php

// Administration
// Verification de securite
if (!defined("TOOLS_MANAGER")) {
    die("acc&egrave;s direct interdit");
}
buffer::str('
Le plugin "Bazar" vous permet de gerer un systeme de fiches (saisie, modification, RSS, recherche, consultation, administration).
');
コード例 #11
0
ファイル: index.php プロジェクト: YesWiki/yeswiki-sandstorm
if ($is_writable && $switch != '' && in_array($switch, array_keys($plugins_list)) && $switch != 'toolsmng') {
    $plugins->switchStatus($switch);
    header('Location: tools.php?p=toolsmng');
    exit;
}
# Suppression d'un thème
$delete = !empty($_GET['delete']) ? $_GET['delete'] : '';
if ($is_writable && $delete != '' && in_array($delete, array_keys($plugins_list)) && $delete != 'toolsmng') {
    files::deltree($plugins_root . '/' . $delete);
    header('Location: tools.php?p=toolsmng');
    exit;
}
$buffer = new buffer();
$form = new form();
if ($err != '') {
    $buffer->str('<div class="erreur"><p><strong>' . __('Error(s)') . ' :</strong></p>' . $err . '</div>');
}
$buffer->str('<h2>' . __('Plugins manager') . '</h2>' . '<h3>' . __('Install a plugin') . '</h3>');
if (!$is_writable) {
    $buffer->str('<p>' . sprintf(__('The folder %s is not writable, please check its permissions.'), DC_ECRIRE . '/tools/') . '</p>');
} else {
    $buffer->str('<form action="tools.php" method="get">' . '<p><label for="tool_url">' . __('Please give the URL (http or ftp) of the plugin\'s file') . ' :</label>' . $form->field('tool_url', 50, '', $tool_url) . '</p>' . '<p><input type="submit" class="submit" value="' . __('install') . '" />' . '<input type="hidden" name="p" value="toolsmng" /></p>' . '</form>');
}
$buffer->str('<p><a href="http://www.wikini.net">' . __('Install new plugins') . '</a></p>');
# Traduction des plugins
foreach ($plugins_list as $k => $v) {
    $plugins->loadl10n($k);
    $plugins_list[$k]['label'] = __($v['label']);
    $plugins_list[$k]['desc'] = __($v['desc']);
}
# Tri des plugins par leur nom
コード例 #12
0
ファイル: index.php プロジェクト: BackupTheBerlios/wikiplug
<?php

// Administration
// Verification de securite
if (!defined("TOOLS_MANAGER")) {
    die("acc&egrave;s direct interdit");
}
buffer::str('
Le plugin duplicateur vous permet d\'envoyer des pages vers un autre wiki sur la meme base de donnee. A manier avec precaution, son usage est reserve aux administrateurs.
');
コード例 #13
0
ファイル: index.php プロジェクト: BackupTheBerlios/wikiplug
<?php

// Administration
// Verification de securite
if (!defined("TOOLS_MANAGER")) {
    die("acc&egrave;s direct interdit");
}
buffer::str('
Le plugin "Tags" vous permet de gerer des mots clés par page et ajoute des actions pour les consulter par flux RSS, moteur de recherche ou liste.
');