Subversion Repositories Applications.papyrus

Compare Revisions

No changes between revisions

Ignore whitespace Rev 953 → Rev 954

/trunk/client/integrateur_wikini/bibliotheque/iw_admin_wikini.fonct.php
19,7 → 19,7
// | License along with this library; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: iw_admin_wikini.fonct.php,v 1.4 2006-06-02 09:12:16 florian Exp $
// CVS : $Id: iw_admin_wikini.fonct.php,v 1.5 2006-09-21 14:18:06 florian Exp $
/**
* Application gérant les Wikini associe à Papyrus
*
30,13 → 30,13
* TODO : chemin vers le wikini ... (non, calcul en fonction du code alpha) , mais controles ? Pas dans un
* premier temps ...
* TODO : installation des wikini (tables présentes etc, et gestion ... (suppression ...)
* TODO : un wiki par défaut pour chaque papyrus, ce wiki sert de modèle
* TODO : un wiki par défaut pour chaque papyrus, ce wiki sert de modèle
*
*@package Admin_Wikini
//Auteur original :
*@author David Delon <david.delon@clapas.net>
*@copyright Tela-Botanica 2000-2005
*@version $Revision: 1.4 $
*@version $Revision: 1.5 $
// +------------------------------------------------------------------------------------------------------+
*/
 
187,6 → 187,9
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.4 2006/06/02 09:12:16 florian
* ajout constante chemin
*
* Revision 1.3 2006/05/10 16:02:49 ddelon
* Finition multilinguise et schizo flo
*
/trunk/client/integrateur_wikini/bibliotheque/wikini/ACEdImages/listealpha.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/client/integrateur_wikini/bibliotheque/wikini/ACEdImages/crlf.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/client/integrateur_wikini/bibliotheque/wikini/ACEdImages/t3.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/client/integrateur_wikini/bibliotheque/wikini/ACEdImages/php.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/client/integrateur_wikini/bibliotheque/wikini/ACEdImages/t4.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/client/integrateur_wikini/bibliotheque/wikini/ACEdImages/t5.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/client/integrateur_wikini/bibliotheque/wikini/ACEdImages/link.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/client/integrateur_wikini/bibliotheque/wikini/ACEdImages/listepuce.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/client/integrateur_wikini/bibliotheque/wikini/ACEdImages/separator.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/client/integrateur_wikini/bibliotheque/wikini/ACEdImages/listenum.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/client/integrateur_wikini/bibliotheque/wikini/ACEdImages/strike.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/client/integrateur_wikini/bibliotheque/wikini/ACEdImages/italic.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/client/integrateur_wikini/bibliotheque/wikini/ACEdImages/hr.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/client/integrateur_wikini/bibliotheque/wikini/ACEdImages/link.old.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/client/integrateur_wikini/bibliotheque/wikini/ACEdImages/code.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/client/integrateur_wikini/bibliotheque/wikini/ACEdImages/bold.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/client/integrateur_wikini/bibliotheque/wikini/ACEdImages/image.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/client/integrateur_wikini/bibliotheque/wikini/ACEdImages/t1.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/client/integrateur_wikini/bibliotheque/wikini/ACEdImages/t2.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/client/integrateur_wikini/bibliotheque/wikini/ACEdImages/underline.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/client/integrateur_wikini/bibliotheque/wikini/ACeditor.buttonsBar.php
File deleted
/trunk/client/integrateur_wikini/bibliotheque/wikini/ACeditor.js
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/client/integrateur_wikini/bibliotheque/wikini/wakka.basic.css
File deleted
/trunk/client/integrateur_wikini/bibliotheque/wikini/images/Bandeau-wiki.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/client/integrateur_wikini/bibliotheque/wikini/images/Bandeau-wiki.png
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/client/integrateur_wikini/bibliotheque/wikini/images/Logo-wiki.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/client/integrateur_wikini/bibliotheque/wikini/images/Logo-wiki.png
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/client/integrateur_wikini/bibliotheque/wikini/wakka.php
380,19 → 380,7
 
// FORMS
function FormOpen($method = "", $tag = "", $formMethod = "post") {
/* Debut de la modif ACeditor */
// ACEditor: id=\"ACEditor\" name=\"ACEditor\" ci-dessous le if a été ajouté (initialement, seule la ligne du else existait)
// si l'url se termine par edit (expression régulière edit$), on est en mode édition et dans ce cas on donne les id et name au formulaire
// Sinon surtout pas car ça marche plus dans la mesure ou plusieurs formulaires auraient ces ID et name et dans ce cas
// il semble que le dernier soit considéré, c'est à dire pas le bon :o(
 
if (ereg('edit$', $this->href($method, $tag))) {
$result = "<form id=\"ACEditor\" name=\"ACEditor\" action=\"".$this->href($method, $tag)."\" method=\"".$formMethod."\">\n";
} else {
$result = "<form action=\"".$this->href($method, $tag)."\" method=\"".$formMethod."\">\n";
}
 
/* fin de la modif ACeditor */
if (!$this->config["rewrite_mode"]) $result .= "<input type=\"hidden\" name=\"wiki\" value=\"".$this->MiniHref($method, $tag)."\" />\n";
return $result;
}
524,12 → 512,11
if ($ids = $this->LoadAll("select min(id) as id from ".$this->config["table_prefix"]."pages where comment_on != '' group by tag order by id desc"))
{
// load complete comments
$num=0;
foreach ($ids as $id)
{
$comment = $this->LoadSingle("select * from ".$this->config["table_prefix"]."pages where id = '".$id["id"]."' limit 1");
$num=0;
if (!isset($comments[$comment["comment_on"]])) $comments[$comment["comment_on"]]='';
if (!$comments[$comment["comment_on"]] && $num < $limit)
if (!isset($comments[$comment["comment_on"]]) && $num < $limit)
{
$comments[$comment["comment_on"]] = $comment;
$num++;
735,7 → 722,6
"default_write_acl" => "*",
"default_read_acl" => "*",
"default_comment_acl" => "*",
"menu_page" => "PageMenu",
"preview_before_save" => "0");
 
// load config
839,5 → 825,8
$method='';
}
 
include('tools/prepend.php');
$wiki->Run($page, $method);
 
 
?>
/trunk/client/integrateur_wikini/bibliotheque/wikini/wakka.css
1,18 → 1,43
body { background-color: #F5F5F5; color: black; }
 
body, p, td, li, input, select, textarea { font-family: 'Lucida Grande', Verdana, Geneva, Lucida, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 1.3; }
h1, h2, h3, h4, h5 { margin: 0px; padding: 0px; }
a { color: #993333; }
ul { margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; }
* {margin: 0; padding: 0;font: 12px Arial, sans-serif; color: #000;text-align: justify;line-height: 17px;}
body {text-align:center; background:#FFF;}
img {border:0;}
#container {margin: 3px auto;width: 800px;text-align: left;}
#page_table {border-spacing: 0;border-collapse: separate; margin: 0; padding: 0 ; border: 0; border-width:0; }
#bandeau_haut {vertical-align: top;border-spacing: 0;margin: 0; padding: 0; border: 0; background: url(images/Bandeau-wiki.png) no-repeat top left; width:631px; height:165px;}
#logo_ekotribu, #logo_ekotribu img {vertical-align: top; border-spacing: 0; margin: 0; padding: 0; border: 0;}
.menu_column {vertical-align: top; border: 0; background: #F2B814; width: 159px; border: 0;padding:10px 5px 5px 5px;}
.menu_column h1,h2,h3,h4,h5 {text-align: center; font: 12px Arial,sans-serif; color: #4F3493;border-bottom:1px solid #FFF;}
.menu_column h1 {font-size:20px;}
.menu_column h2 {font-size:18px;}
.menu_column h3 {font-size:16px;}
.menu_column h4 {font-size:14px;}
.menu_column h5 {font-size:12px;}
.menu_column h5 {font-size:10px;}
.menu_column a:link, a:visited { font-weight: normal; text-decoration: underline; color: #FFF;}
.menu_column a:hover, a:active { text-decoration:none ; color: #4F3493;}
.menu_column li {display : list-item; list-style-type: disc; padding:0;color: #FFF;}
.menu_column li:hover {color: #4F3493;}
div.centrage {text-align: center;}
.body_column {vertical-align: top; border: 0; padding:5px;}
.page_name {display:none; }
.wiki_name {padding-top:5px;text-align:center;color: #4F3493; font-size:22px;}
.header {display:none;}
.page { background-color: #FFF; padding: 5px; border: 0; }
.page h1 {padding:2px; text-align: center; font-size: 22px; color: #4F3493;}
.page h2 {padding:2px; text-align: left; font-size: 18px; color: #05AEF8; background: #FFFFFF;}
.page h3 {padding:2px; font-weight: bold; font-size:17px; color: #4F3493;}
.page h4 {padding:2px; text-align: center; font-weight: bold; font-size: 14px; color: #05AEF8;}
.page h5 {padding:2px; text-align: center; font-weight: bold; font-size: 12px; color: #4F3493;}
.page a:link { font-weight: normal; text-decoration: underline; color: #FB9B02;}
.page a:visited { font-weight: normal; text-decoration: underline; color: #FB9B02;}
.page a:hover, a:active { text-decoration:none ; color: #05AEF8;}
ul { margin: 0; padding: 0 0 0 15px;}
li { display : list-item; list-style-type: circle; padding:0;}
ol { margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; }
form { margin: 0px; padding: 0px; }
tt { color: Navy; }
hr { border: 0px; color: Black; /* Internet Explorer */ background-color: Black; height: 1px; }
hr {border: 0px; color: #F2B814; /* Internet Explorer */ background-color: #F2B814; height: 2px; }
 
 
.wiki_name { float: left; margin: 0px 15px 0px 10px; font-size: 150%; }
.page_name { font-size: 150%; }
 
.error { color: #CC3333; font-weight: bold; }
.indent { margin-left: 40px; }
.additions { color: #008800; }
19,22 → 44,23
.deletions { color: #880000; }
.add { font-weight: bold; color: #c00; text-decoration: underline; }
.del { font-style: italic; color: #c00; text-decoration: line-through; }
.header { padding: 10px; padding-top: 0px }
.page { background-color: #FFFFFF; padding: 10px; border: 1px inset; border-bottom: none; }
 
.prev_alert { background-color: red; color: white; font-size: 1.7em; font-weight: bold; margin-bottom: 5px; }
.edit { width: 100%; height: 400px; }
.footer { background-color: #DDDDDD; padding: 5px 10px; border: 1px inset; border-top: none; border-top: 1px solid #CCCCCC }
.footer { font-size:13px; padding: 5px; border: 2px solid #F2B814; }
.footer a {color: #4F3493;text-decoration:underline; }
.footer a:hover {color: #F2B814;text-decoration:none; }
.code { background: #FFFFFF; border: solid #888888 2px; font-family: 'Courier New', Courier; color: black; font-size: 10pt; width: 100%; height: 400px; overflow: scroll; padding: 3px; }
.revisioninfo { color: #AAAAAA; padding-bottom: 20px; }
 
.commentsheader { background-color: #DDDDDD; padding: 2px 10px; border-left: 1px inset; border-right: 1px inset; border-top: 1px solid #CCCCCC }
.commentsheader {display:none;}
.comment { background-color: #EEEEEE; padding: 10px; border-left: 1px inset; border-right: 1px inset; border-top: 1px solid #CCCCCC; border-bottom: 1px solid #EEEEEE; }
.commentinfo { color: #AAAAAA; }
.commentform { background-color: #EEEEEE; padding: 10px; border-left: 1px inset; border-right: 1px inset; border-top: 1px solid #CCCCCC }
 
.copyright { font-size: 11px; color: #AAAAAA; text-align: right; }
.copyright A { color: #AAAAAA; }
.searchbox { background: #FFFFF8; border: 0px; border-bottom: 1px solid #CCCCAA; padding: 0px; margin: 0px; }
.copyright { font-size: 11px; color: #000; text-align: right; }
.copyright a { color: #000; }
.searchbox { background: #FFF; border: 1px solid #000; width:100px; }
.debug { font-size: 11px; color: #888888; }
 
.hr_clear { clear: both; visibility: hidden; }
51,20 → 77,3
 
.trail_table { line-height: 30px;}
.trail_button { color: #993333; }
 
.page_table {margin: 0px; padding: 0px ; border: none; height: 100%;width: 100%;}
.menu_column {background-color: #FFFFCC; vertical-align: top; width: 150px; border: 1px solid #000000;padding:5px;}
.body_column {vertical-align: top; border: none;padding:5px;}
.attach_margin05em { margin: 0.5em;} /* marge de 0.5 em autour de l'image*/
.attach_margin1em { margin: 1em;} /* marge de 1em autour de l'image*/
.attach_left {float: left;} /* bloc flotant à gauche */
.attach_right {float: right;} /* bloc flotant à droite */
.attach_noborder {border-width: 0px;} /* pas de bordure */
.attach_vmiddle {vertical-align: text-bottom;} /* aligenement vertical au milieu */
 
.tableFM {border: thin solid Black; width: 100%; }
.tableFM THEAD { background-color: Silver; font-weight: bold; text-align: center; }
.tableFM TFOOT { background-color: Silver; font-weight: bold; text-align: left; }
.tableFM TBODY TR { text-align: center; }
.tableFMCol1 { background-color: Aqua; }
.tableFMCol2 { background-color: Yellow; }
/trunk/client/integrateur_wikini/bibliotheque/wikini/formatters/tableaux.php
File deleted
/trunk/client/integrateur_wikini/bibliotheque/wikini/formatters/hightlighter.class.inc
1,6 → 1,6
<?php
/*
* $Id: hightlighter.class.inc,v 1.2 2005-10-20 10:28:25 ddelon Exp $
* $Id: hightlighter.class.inc,v 1.3 2006-09-21 14:18:06 florian Exp $
*
* Souligneur générique pour colorier la syntaxe de langage de programmation
*
/trunk/client/integrateur_wikini/bibliotheque/wikini/formatters/coloration_delphi.php
1,6 → 1,6
<?php
/*
* $Id: coloration_delphi.php,v 1.2 2005-10-20 10:28:25 ddelon Exp $
* $Id: coloration_delphi.php,v 1.3 2006-09-21 14:18:06 florian Exp $
*
* Souligneur syntaxique Delphi
*
/trunk/client/integrateur_wikini/bibliotheque/wikini/formatters/wakka.php
34,7 → 34,6
 
if (!function_exists("wakka2callback"))
{
include("formatters/tableaux.php"); //EF => tableaux
function wakka2callback($things)
{
$thing = $things[1];
54,11 → 53,6
return "&lt;";
else if ($thing == ">")
return "&gt;";
//EF=> tableaux
else if (preg_match("/^\[\|(.*)\|\]/s", $thing))
{
return parsetable($thing);
} //end tableaux
// bold
else if ($thing == "**")
{
188,7 → 182,7
// forced links
// \S : any character that is not a whitespace character
// \s : any whitespace character
else if (preg_match("/^\[\[(\S*)\s+(.+)?\]\]$/", $thing, $matches))
else if (preg_match("/^\[\[(\S*)(\s+(.+))?\]\]$/", $thing, $matches))
{
list (, $url, $text) = $matches;
if ($url)
320,7 → 314,6
$text = chop($text)."\n";
$text = preg_replace_callback(
"/(\%\%.*?\%\%|".
"^\[\|.*?\|\]|". //EF => tableaux
"\"\".*?\"\"|".
"\[\[.*?\]\]|".
"\b[a-z]+:\/\/\S+|".
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools.php
New file
0,0 → 1,167
<?php
// Get configuration
 
 
require_once ('tools/libs/class.plugins.php');
require_once ('tools/libs/lib.compat.php');
require_once ('tools/libs/lib.form.php');
require_once ('tools/libs/lib.files.php');
require_once ('tools/libs/lib.buffer.php');
require_once ('tools/libs/class.wiki.php');
 
function __($str) {
return $str;
}
 
if (!defined('DC_ECRIRE')) {
define('DC_ECRIRE','');
}
 
if (!defined('TOOLS_MANAGER')) {
define('TOOLS_MANAGER','TOOLS_MANAGER');
}
 
require_once ('tools/libs/Auth.php');
require_once ('tools/libs/Container.php');
 
class CustomAuthContainer extends Auth_Container
{
var $mysql_user;
var $mysql_password;
function CustomAuthContainer($mysql_user, $mysql_password )
{
$this->mysql_user=$mysql_user;
$this->mysql_password=$mysql_password;
}
 
function fetchData($username, $password)
{
if (($username == $this->mysql_user ) && ( $password == $this->mysql_password)) {
return true;
}
return false;
}
}
 
 
$auth_container = new CustomAuthContainer($wakkaConfig['mysql_user'],$wakkaConfig['mysql_password']);
 
$params = array(
"advancedsecurity" => "true"
);
 
 
$a = new Auth($auth_container,$params);
 
$a->start();
 
if ($_GET['tools_action'] == "logout" && $a->checkAuth()) {
$a->logout();
$a->start();
exit;
}
 
 
if($a->checkAuth()) {
}
else {
exit;
}
 
$plugins_root = 'tools/';
 
$plugins = new plugins($plugins_root);
$plugins->getPlugins(true);
$plugins_list = $plugins->getPluginsList();
 
$PLUGIN_HEAD = '';
$PLUGIN_BODY = '';
 
if ((!empty($_REQUEST['p']) && !empty($plugins_list[$_REQUEST['p']])
&& $plugins_list[$_REQUEST['p']]['active']))
{
$p = $_REQUEST['p'];
buffer::init();
include $plugins_root.$p.'/index.php';
$PLUGIN_BODY = buffer::getContent();
buffer::clean();
}
 
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 
<html xmlns="http://www.w3.org/1999/xhtml" lang="fr" xml:lang="fr">
<head>
<title>Configuration extension(s) de WikiNi</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
</head>
 
<body>
 
 
<?php
 
$tools_url= "http://".$_SERVER["SERVER_NAME"].($_SERVER["SERVER_PORT"] != 80 ? ":".$_SERVER["SERVER_PORT"] : "").dirname($_SERVER["REQUEST_URI"]).'/tools.php';
 
echo '<a href="'.$tool_url.'?tools_action=logout">Déconnexion</a>';
 
 
if ($PLUGIN_HEAD != '')
{
echo '<h1>';
echo $PLUGIN_HEAD;
echo '</h1>';
}
 
if ($PLUGIN_BODY != '')
{
echo '<h1>';
echo '<a href="'.$tools_url.'">Retour à la liste des extensions actives</a>';
echo '</h1>';
echo $PLUGIN_BODY;
}
else
{
if (count($plugins_list) == 0)
{
echo '<p>Aucun outil n\'est disponible ou actif</p>';
}
else
{
# Tri des plugins par leur nom
uasort($plugins_list,create_function('$a,$b','return strcmp($a["label"],$b["label"]);'));
# Liste des plugins
echo '<h1>';
echo '<a href="'.$tools_url.'">Liste des extensions actives</a>';
echo '</h1>';
echo '<dl class="plugin-list">';
foreach ($plugins_list as $k => $v)
{
$plink = '<a href="tools.php?p='.$k.'">%s</a>';
$plabel = (!empty($v['label'])) ? $v['label'] : $v['name'];
echo '<dt>';
if (file_exists($plugins_root.$k.'/icon.png')) {
printf($plink,'<img alt="" src="tools/'.$k.'/icon.png" />');
echo ' ';
}
printf($plink,$plabel);
echo '</dt>';
echo '<dd>'.$v['desc'].'</dd>';
}
echo '</dl>';
}
}
?>
</body>
</html>
/trunk/client/integrateur_wikini/bibliotheque/wikini/actions/attach.php
File deleted
/trunk/client/integrateur_wikini/bibliotheque/wikini/actions/attach.class.php
File deleted
/trunk/client/integrateur_wikini/bibliotheque/wikini/actions/attachfm.php
File deleted
/trunk/client/integrateur_wikini/bibliotheque/wikini/actions/header.php
43,8 → 43,7
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<meta name="keywords" content="<?php echo $this->GetConfigValue("meta_keywords") ?>" />
<meta name="description" content="<?php echo $this->GetConfigValue("meta_description") ?>" />
<link rel="stylesheet" type="text/css" media="screen" href="wakka.basic.css" />
<style type="text/css" media="all"> @import "<?php echo (!$_COOKIE["sitestyle"])?'wakka':$_COOKIE["sitestyle"] ?>.css";</style>
<link rel="stylesheet" type="text/css" media="screen" href="<?php echo (!isset($_COOKIE["sitestyle"]))?'wakka':$_COOKIE["sitestyle"] ?>.css" />
<script type="text/javascript">
function fKeyDown() {
if (event.keyCode == 9) {
51,66 → 50,29
event.returnValue= false;
document.selection.createRange().text = String.fromCharCode(9) } }
</script>
<!-- The ACeditor contribution -->
<style type="text/css">
.buttons { background: #ccc; border: 1px solid #ccc; margin: 1; float:left; }
.raise{ border-top: 1px solid buttonhighlight; border-left: 1px solid buttonhighlight; border-bottom: 1px solid buttonshadow; border-right: 1px solid buttonshadow; background: #ccc; margin:1; float:left; }
.press { border-top: 1px solid buttonshadow; border-left: 1px solid buttonshadow; border-bottom: 1px solid buttonhighlight; border-right: 1px solid buttonhighlight; background: #ccc; margin:1; float:left; }
/* ci dessous les petits champs */
.ACsearchbox { background: #FFFFF8; border: 0px; border-bottom: 1px solid #CCCCAA; padding: 0px; margin: 0px; font-size: 10px; }
.texteChampsImage {font-size: 10px; }
#toolbar { margin: 0; width: 450px; padding: 0; height:20px; background: #ccc; border-top: 1px solid buttonhighlight; border-left: 1px solid buttonhighlight; border-bottom: 1px solid buttonshadow; border-right: 1px solid buttonshadow; text-align:left; }
</style>
<script type="text/javascript" src="ACeditor.js"></script>
<!-- End on The ACEditor Contrib -->
</head>
 
 
<body <?php echo (!$user || ($user["doubleclickedit"] == 'Y')) && ($this->GetMethod() == "show") ? "ondblclick=\"document.location='".$this->href("edit")."';\" " : "" ?>
<?php echo $message ? "onLoad=\"alert('".$message."');\" " : "" ?> >
 
<?php /* ACeditor*/ echo "onLoad=\"thisForm=document.ACEditor;\""?> >
 
<div style="display: none;"><a href="<?php echo $this->href() ?>/resetstyle" accesskey="7"></a></div>
 
<?
$menu_page=$this->config["menu_page"];
if (version_compare(phpversion(), '5.0') < 0) {
eval('
if (!function_exists("clone")) {
function clone($object) {
return $object;
}
}
');
}
if (isset($menu_page) and ($menu_page!=""))
{
// Ajout Menu de Navigation
echo '<table class="page_table">';
echo '<tr><td class="menu_column">';
$wikiMenu = clone($this);
$wikiMenu->tag=$menu_page;
$wikiMenu->SetPage($wikiMenu->LoadPage($wikiMenu->tag));
echo $wikiMenu->Format($wikiMenu->page["body"], "wakka");
echo '</td>';
echo '<td class="body_column">';
}
?>
 
<div id="container">
<table id="page_table" border="0" cellspacing="0" cellpadding="0">
<tr><td id="logo_ekotribu"><a id="lien_logo_ekotribu" href="http://ekotribu.org" title="Retour a la page d'accueil Ekotribu"><img alt="logo" src="images/Logo-wiki.png" /></a></td>
<td id="bandeau_haut">
<h1 class="wiki_name"><?php echo $this->config["wakka_name"] ?></h1>
 
 
<h1 class="page_name">
<a href="<?php echo $this->config["base_url"] ?>RechercheTexte&amp;phrase=<?php echo urlencode($this->GetPageTag()); ?>">
<?php echo $this->GetPageTag(); ?>
<a href="<?php echo $this->config["base_url"] ?>RechercheTexte&amp;phrase=<?php echo htmlentities($this->GetPageTag()); ?>">
<?php echo htmlentities($this->GetPageTag()); ?>
</a>
</h1>
 
 
<div class="header">
<?php echo $this->ComposeLinkToPage($this->config["root_page"]); ?> ::
<?php echo $this->config["navigation_links"] ? $this->Format($this->config["navigation_links"])." :: \n" : "" ?>
Vous &ecirc;tes <?php echo $this->Format($this->GetUserName()); if ($user = $this->GetUser()) echo " (<a href=\"".$this->config["base_url"] ."ParametresUtilisateur&amp;action=logout\">D&eacute;connexion</a>)\n"; ?>
</div>
 
 
</td>
</tr>
/trunk/client/integrateur_wikini/bibliotheque/wikini/handlers/page/download.php
File deleted
/trunk/client/integrateur_wikini/bibliotheque/wikini/handlers/page/filemanager.php
File deleted
/trunk/client/integrateur_wikini/bibliotheque/wikini/handlers/page/upload.php
File deleted
/trunk/client/integrateur_wikini/bibliotheque/wikini/handlers/page/edit.php
88,10 → 88,14
}
 
// fetch fields
if (!$previous = $_POST["previous"]) $previous = $this->page["id"];
if (!$body = $_POST["body"]) $body = $this->page["body"];
if (!isset($_POST["previous"])) $previous = $this->page["id"];
else $previous = $_POST["previous"];
if (!isset($_POST["body"])) $body = $this->page["body"];
else $body = $_POST["body"];
 
 
// preview?
if (!isset($_POST["submit"])) $_POST["submit"] = "";
if ($_POST["submit"] == "Aperçu")
{
$output .=
109,20 → 113,22
else
{
// display form
if ($error)
if (isset($error))
{
if (!isset($output)) $output = '';
$output .= "<div class=\"error\">$error</div>\n";
}
 
// append a comment?
if ($_REQUEST["appendcomment"])
if (isset($_REQUEST["appendcomment"]))
{
$body = trim($body)."\n\n----\n\n--".$this->UserName()." (".strftime("%c").")";
}
require_once("ACeditor.buttonsBar.php");
 
if (!isset($output)) $output = '';
$output .=
$this->FormOpen("edit").
"<input type=\"hidden\" name=\"previous\" value=\"".$previous."\" />\n".$ACbuttonsBar.
"<input type=\"hidden\" name=\"previous\" value=\"".$previous."\" />\n".
"<textarea onkeydown=\"fKeyDown()\" name=\"body\" cols=\"60\" rows=\"40\" wrap=\"soft\" class=\"edit\">\n".
htmlspecialchars($body).
"\n</textarea><br />\n".
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/libs/lib.buffer.php
New file
0,0 → 1,46
<?php
# ***** BEGIN LICENSE BLOCK *****
# This file is part of DotClear.
# Copyright (c) 2004 Olivier Meunier and contributors. All rights
# reserved.
#
# DotClear is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# DotClear is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with DotClear; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# ***** END LICENSE BLOCK *****
 
class buffer
{
function init()
{
$GLOBALS['__dc_buffer'] = NULL;
}
function clean()
{
$GLOBALS['__dc_buffer'] = NULL;
}
function getContent()
{
return $GLOBALS['__dc_buffer'];
}
function str($str)
{
$GLOBALS['__dc_buffer'] .= $str;
}
}
 
?>
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/libs/Auth.php
New file
0,0 → 1,1093
<?php
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4 foldmethod=marker: */
 
/**
* The main include file for Auth package
*
* PHP versions 4 and 5
*
* LICENSE: This source file is subject to version 3.01 of the PHP license
* that is available through the world-wide-web at the following URI:
* http://www.php.net/license/3_01.txt. If you did not receive a copy of
* the PHP License and are unable to obtain it through the web, please
* send a note to license@php.net so we can mail you a copy immediately.
*
* @category Authentication
* @package Auth
* @author Martin Jansen <mj@php.net>
* @author Adam Ashley <aashley@php.net>
* @copyright 2001-2006 The PHP Group
* @license http://www.php.net/license/3_01.txt PHP License 3.01
* @version CVS: $Id$
* @link http://pear.php.net/package/Auth
*/
 
/**
* Returned if session exceeds idle time
*/
define('AUTH_IDLED', -1);
/**
* Returned if session has expired
*/
define('AUTH_EXPIRED', -2);
/**
* Returned if container is unable to authenticate user/password pair
*/
define('AUTH_WRONG_LOGIN', -3);
/**
* Returned if a container method is not supported.
*/
define('AUTH_METHOD_NOT_SUPPORTED', -4);
/**
* Returned if new Advanced security system detects a breach
*/
define('AUTH_SECURITY_BREACH', -5);
 
/**
* PEAR::Auth
*
* The PEAR::Auth class provides methods for creating an
* authentication system using PHP.
*
* @category Authentication
* @package Auth
* @author Martin Jansen <mj@php.net>
* @author Adam Ashley <aashley@php.net>
* @copyright 2001-2006 The PHP Group
* @license http://www.php.net/license/3_01.txt PHP License 3.01
* @version Release: @package_version@ File: $Revision$
* @link http://pear.php.net/package/Auth
*/
class Auth {
 
// {{{ properties
 
/**
* Auth lifetime in seconds
*
* If this variable is set to 0, auth never expires
*
* @var integer
* @see setExpire(), checkAuth()
*/
var $expire = 0;
 
/**
* Has the auth session expired?
*
* @var bool
* @see checkAuth()
*/
var $expired = false;
 
/**
* Maximum idletime in seconds
*
* The difference to $expire is, that the idletime gets
* refreshed each time checkAuth() is called. If this
* variable is set to 0, idletime is never checked.
*
* @var integer
* @see setIdle(), checkAuth()
*/
var $idle = 0;
 
/**
* Is the maximum idletime over?
*
* @var boolean
* @see checkAuth()
*/
var $idled = false;
 
/**
* Storage object
*
* @var object
* @see Auth(), validateLogin()
*/
var $storage = '';
 
/**
* User-defined function that creates the login screen
*
* @var string
*/
var $loginFunction = '';
 
/**
* Should the login form be displayed
*
* @var bool
* @see setShowlogin()
*/
var $showLogin = true;
/**
* Is Login Allowed from this page
*
* @var bool
* @see setAllowLogin
*/
var $allowLogin = true;
 
/**
* Current authentication status
*
* @var string
*/
var $status = '';
 
/**
* Username
*
* @var string
*/
var $username = '';
 
/**
* Password
*
* @var string
*/
var $password = '';
 
/**
* Login callback function name
*
* @var string
* @see setLoginCallback()
*/
var $loginCallback = '';
 
/**
* Failed Login callback function name
*
* @var string
* @see setFailedLoginCallback()
*/
var $loginFailedCallback = '';
 
/**
* Logout callback function name
*
* @var string
* @see setLogoutCallback()
*/
var $logoutCallback = '';
 
/**
* Auth session-array name
*
* @var string
*/
var $_sessionName = '_authsession';
 
/**
* Package Version
*
* @var string
*/
var $version = "@version@";
 
/**
* Flag to use advanced security
* When set extra checks will be made to see if the
* user's IP or useragent have changed across requests.
* Turned off by default to preserve BC.
*
* @var boolean
*/
var $advancedsecurity = false;
 
/**
* Username key in POST array
*
* @var string
*/
var $_postUsername = 'username';
 
/**
* Password key in POST array
*
* @var string
*/
var $_postPassword = 'password';
 
/**
* Holds a reference to the session auth variable
* @var array
*/
var $session;
 
/**
* Holds a reference to the global server variable
* @var array
*/
var $server;
 
/**
* Holds a reference to the global post variable
* @var array
*/
var $post;
 
/**
* Holds a reference to the global cookie variable
* @var array
*/
var $cookie;
 
/**
* A hash to hold various superglobals as reference
* @var array
*/
var $authdata;
/**
* How many times has checkAuth been called
* var int
*/
var $authChecks = 0;
 
// }}}
// {{{ Auth() [constructor]
 
/**
* Constructor
*
* Set up the storage driver.
*
* @param string Type of the storage driver
* @param mixed Additional options for the storage driver
* (example: if you are using DB as the storage
* driver, you have to pass the dsn string here)
*
* @param string Name of the function that creates the login form
* @param boolean Should the login form be displayed if neccessary?
* @return void
*/
function Auth($storageDriver, $options = '', $loginFunction = '', $showLogin = true)
{
$this->applyAuthOptions($options);
 
// Start the session suppress error if already started
if(!session_id()){
@session_start();
if(!session_id()) {
// Throw error
include_once 'PEAR.php';
PEAR::throwError('Session could not be started by Auth, '
.'possibly headers are already sent, try putting '
.'ob_start in the beginning of your script');
}
}
 
// Make Sure Auth session variable is there
if( !isset($_SESSION[$this->_sessionName])
&& !isset($GLOBALS['HTTP_SESSION_VARS'][$this->_sessionName])) {
isset($_SESSION)
? $_SESSION[$this->_sessionName] = array()
: $GLOBALS['HTTP_SESSION_VARS'][$this->_sessionName] = array();
}
 
// Assign Some globals to internal references, this will replace _importGlobalVariable
isset($_SESSION)
? $this->session =& $_SESSION[$this->_sessionName]
: $this->session =& $GLOBALS['HTTP_SESSION_VARS'][$this->_sessionName] ;
isset($_SERVER)
? $this->server =& $_SERVER
: $this->server =& $GLOBALS['HTTP_SERVER_VARS'];
isset($_POST)
? $this->post =& $_POST
: $this->post =& $GLOBALS['HTTP_POST_VARS'];
isset($_COOKIE)
? $this->cookie =& $_COOKIE
: $this->cookie =& $GLOBALS['HTTP_COOKIE_VARS'];
//isset($_GET) ? $var = &$_GET : $var = &$GLOBALS['HTTP_GET_VARS'];
 
if ($loginFunction != '' && is_callable($loginFunction)) {
$this->loginFunction = $loginFunction;
}
 
if (is_bool($showLogin)) {
$this->showLogin = $showLogin;
}
 
if (is_object($storageDriver)) {
$this->storage =& $storageDriver;
// Pass a reference to auth to the container, ugly but works
// this is used by the DB container to use method setAuthData not staticaly.
$this->storage->_auth_obj =& $this;
} else {
// $this->storage = $this->_factory($storageDriver, $options);
//
$this->storage_driver = $storageDriver;
$this->storage_options =& $options;
}
}
 
// }}}
// {{{ applyAuthOptions()
 
/**
* Set the Auth options
*
* Some options which are Auth specific will be applied
* the rest will be left for usage by the container
*
* @param array An array of Auth options
* @return array The options which were not applied
* @access private
*/
function &applyAuthOptions(&$options)
{
if(is_array($options)){
if (!empty($options['sessionName'])) {
$this->_sessionName = $options['sessionName'];
unset($options['sessionName']);
}
if (isset($options['allowLogin'])) {
$this->allowLogin = $options['allowLogin'];
unset($options['allowLogin']);
}
if (!empty($options['postUsername'])) {
$this->_postUsername = $options['postUsername'];
unset($options['postUsername']);
}
if (!empty($options['postPassword'])) {
$this->_postPassword = $options['postPassword'];
unset($options['postPassword']);
}
if (isset($options['advancedsecurity'])) {
$this->advancedsecurity = $options['advancedsecurity'];
unset($options['advancedsecurity']);
}
}
return($options);
}
 
// }}}
// {{{ _loadStorage()
/**
* Load Storage Driver if not already loaded
*
* Suspend storage instantiation to make Auth lighter to use
* for calls which do not require login
*
* @return bool True if the conainer is loaded, false if the container
* is already loaded
* @access private
*/
function _loadStorage()
{
if(!is_object($this->storage)) {
$this->storage =& $this->_factory($this->storage_driver,
$this->storage_options);
$this->storage->_auth_obj =& $this;
return(true);
}
return(false);
}
 
// }}}
// {{{ _factory()
 
/**
* Return a storage driver based on $driver and $options
*
* @static
* @param string $driver Type of storage class to return
* @param string $options Optional parameters for the storage class
* @return object Object Storage object
* @access private
*/
function &_factory($driver, $options = '')
{
$storage_class = 'Auth_Container_' . $driver;
include_once $driver . '.php';
$obj =& new $storage_class($options);
return $obj;
}
 
// }}}
// {{{ assignData()
 
/**
* Assign data from login form to internal values
*
* This function takes the values for username and password
* from $HTTP_POST_VARS/$_POST and assigns them to internal variables.
* If you wish to use another source apart from $HTTP_POST_VARS/$_POST,
* you have to derive this function.
*
* @global $HTTP_POST_VARS, $_POST
* @see Auth
* @return void
* @access private
*/
function assignData()
{
if ( isset($this->post[$this->_postUsername])
&& $this->post[$this->_postUsername] != '') {
$this->username = (get_magic_quotes_gpc() == 1
? stripslashes($this->post[$this->_postUsername])
: $this->post[$this->_postUsername]);
}
if ( isset($this->post[$this->_postPassword])
&& $this->post[$this->_postPassword] != '') {
$this->password = (get_magic_quotes_gpc() == 1
? stripslashes($this->post[$this->_postPassword])
: $this->post[$this->_postPassword] );
}
}
 
// }}}
// {{{ start()
 
/**
* Start new auth session
*
* @return void
* @access public
*/
function start()
{
$this->assignData();
if (!$this->checkAuth() && $this->allowLogin) {
$this->login();
}
}
 
// }}}
// {{{ login()
 
/**
* Login function
*
* @return void
* @access private
*/
function login()
{
$login_ok = false;
$this->_loadStorage();
// Check if using challenge response
(isset($this->post['authsecret']) && $this->post['authsecret'] == 1)
? $usingChap = true
: $usingChap = false;
 
// When the user has already entered a username, we have to validate it.
if (!empty($this->username)) {
if (true === $this->storage->fetchData($this->username, $this->password, $usingChap)) {
$this->session['challengekey'] = md5($this->username.$this->password);
$login_ok = true;
}
}
 
if (!empty($this->username) && $login_ok) {
$this->setAuth($this->username);
if (is_callable($this->loginCallback)) {
call_user_func_array($this->loginCallback, array($this->username, $this));
}
}
 
// If the login failed or the user entered no username,
// output the login screen again.
if (!empty($this->username) && !$login_ok) {
$this->status = AUTH_WRONG_LOGIN;
if (is_callable($this->loginFailedCallback)) {
call_user_func_array($this->loginFailedCallback, array($this->username, $this));
}
}
 
if ((empty($this->username) || !$login_ok) && $this->showLogin) {
if (is_callable($this->loginFunction)) {
call_user_func_array($this->loginFunction, array($this->username, $this->status, $this));
} else {
// BC fix Auth used to use drawLogin for this
// call is sub classes implement this
if (is_callable(array($this, 'drawLogin'))) {
return $this->drawLogin($this->username, $this);
}
 
// New Login form
include_once 'Html.php';
return Auth_Frontend_Html::render($this, $this->username);
}
} else {
return;
}
}
 
// }}}
// {{{ setExpire()
 
/**
* Set the maximum expire time
*
* @param integer time in seconds
* @param bool add time to current expire time or not
* @return void
* @access public
*/
function setExpire($time, $add = false)
{
$add ? $this->expire += $time : $this->expire = $time;
}
 
// }}}
// {{{ setIdle()
 
/**
* Set the maximum idle time
*
* @param integer time in seconds
* @param bool add time to current maximum idle time or not
* @return void
* @access public
*/
function setIdle($time, $add = false)
{
$add ? $this->idle += $time : $this->idle = $time;
}
 
// }}}
// {{{ setSessionName()
 
/**
* Set name of the session to a customized value.
*
* If you are using multiple instances of PEAR::Auth
* on the same domain, you can change the name of
* session per application via this function.
* This will chnage the name of the session variable
* auth uses to store it's data in the session
*
* @param string New name for the session
* @return void
* @access public
*/
function setSessionName($name = 'session')
{
$this->_sessionName = '_auth_'.$name;
isset($_SESSION)
? $this->session =& $_SESSION[$this->_sessionName]
: $this->session =& $GLOBALS['HTTP_SESSION_VARS'][$this->_sessionName] ;
}
 
// }}}
// {{{ setShowLogin()
 
/**
* Should the login form be displayed if neccessary?
*
* @param bool show login form or not
* @return void
* @access public
*/
function setShowLogin($showLogin = true)
{
$this->showLogin = $showLogin;
}
 
// }}}
// {{{ setAllowLogin()
 
/**
* Should the login form be displayed if neccessary?
*
* @param bool show login form or not
* @return void
* @access public
*/
function setAllowLogin($allowLogin = true)
{
$this->allowLogin = $allowLogin;
}
 
// }}}
// {{{ setLoginCallback()
/**
* Register a callback function to be called on user login.
* The function will receive two parameters, the username and a reference to the auth object.
*
* @param string callback function name
* @return void
* @see setLogoutCallback()
* @access public
*/
function setLoginCallback($loginCallback)
{
$this->loginCallback = $loginCallback;
}
 
// }}}
// {{{ setFailedLoginCallback()
 
/**
* Register a callback function to be called on failed user login.
* The function will receive a single parameter, the username and a reference to the auth object.
*
* @param string callback function name
* @return void
* @access public
*/
function setFailedLoginCallback($loginFailedCallback)
{
$this->loginFailedCallback = $loginFailedCallback;
}
 
// }}}
// {{{ setLogoutCallback()
 
/**
* Register a callback function to be called on user logout.
* The function will receive three parameters, the username and a reference to the auth object.
*
* @param string callback function name
* @return void
* @see setLoginCallback()
* @access public
*/
function setLogoutCallback($logoutCallback)
{
$this->logoutCallback = $logoutCallback;
}
 
// }}}
// {{{ setAuthData()
 
/**
* Register additional information that is to be stored
* in the session.
*
* @param string Name of the data field
* @param mixed Value of the data field
* @param boolean Should existing data be overwritten? (default
* is true)
* @return void
* @access public
*/
function setAuthData($name, $value, $overwrite = true)
{
if (!empty($this->session['data'][$name]) && $overwrite == false) {
return;
}
$this->session['data'][$name] = $value;
}
 
// }}}
// {{{ getAuthData()
 
/**
* Get additional information that is stored in the session.
*
* If no value for the first parameter is passed, the method will
* return all data that is currently stored.
*
* @param string Name of the data field
* @return mixed Value of the data field.
* @access public
*/
function getAuthData($name = null)
{
if (!isset($this->session['data'])) {
return null;
}
if(!isset($name)) {
return $this->session['data'];
}
if (isset($name) && isset($this->session['data'][$name])) {
return $this->session['data'][$name];
}
return null;
}
 
// }}}
// {{{ setAuth()
 
/**
* Register variable in a session telling that the user
* has logged in successfully
*
* @param string Username
* @return void
* @access public
*/
function setAuth($username)
{
// #2021 - Change the session id to avoid session fixation attacks php 4.3.3 >
// session_regenerate_id(true);
 
if (!isset($this->session) || !is_array($this->session)) {
$this->session = array();
}
 
if (!isset($this->session['data'])) {
$this->session['data'] = array();
}
 
$this->session['sessionip'] = isset($this->server['REMOTE_ADDR'])
? $this->server['REMOTE_ADDR']
: '';
$this->session['sessionuseragent'] = isset($this->server['HTTP_USER_AGENT'])
? $this->server['HTTP_USER_AGENT']
: '';
 
// This should be set by the container to something more safe
// Like md5(passwd.microtime)
if(empty($this->session['challengekey'])) {
$this->session['challengekey'] = md5($username.microtime());
}
 
$this->session['challengecookie'] = md5($this->session['challengekey'].microtime());
setcookie('authchallenge', $this->session['challengecookie']);
 
$this->session['registered'] = true;
$this->session['username'] = $username;
$this->session['timestamp'] = time();
$this->session['idle'] = time();
}
 
// }}}
// {{{ setAdvancedSecurity()
/**
* Enables advanced security checks
*
* Currently only ip change and useragent change
* are detected
* @todo Add challenge cookies - Create a cookie which changes every time
* and contains some challenge key which the server can verify with
* a session var cookie might need to be crypted (user pass)
* @param bool Enable or disable
* @return void
* @access public
*/
function setAdvancedSecurity($flag=true)
{
$this->advancedsecurity = $flag;
}
 
// }}}
// {{{ checkAuth()
 
/**
* Checks if there is a session with valid auth information.
*
* @access public
* @return boolean Whether or not the user is authenticated.
*/
function checkAuth()
{
$this->authChecks++;
if (isset($this->session)) {
// Check if authentication session is expired
if ( $this->expire > 0
&& isset($this->session['timestamp'])
&& ($this->session['timestamp'] + $this->expire) < time()) {
$this->expired = true;
$this->status = AUTH_EXPIRED;
$this->logout();
return false;
}
 
// Check if maximum idle time is reached
if ( $this->idle > 0
&& isset($this->session['idle'])
&& ($this->session['idle'] + $this->idle) < time()) {
$this->idled = true;
$this->status = AUTH_IDLED;
$this->logout();
return false;
}
 
if ( isset($this->session['registered'])
&& isset($this->session['username'])
&& $this->session['registered'] == true
&& $this->session['username'] != '') {
Auth::updateIdle();
 
if ($this->advancedsecurity) {
// Only Generate the challenge once
if($this->authChecks == 1) {
$this->session['challengecookieold'] = $this->session['challengecookie'];
$this->session['challengecookie'] = md5($this->session['challengekey'].microtime());
setcookie('authchallenge', $this->session['challengecookie']);
}
// Check for ip change
if ( isset($this->server['REMOTE_ADDR'])
&& $this->session['sessionip'] != $this->server['REMOTE_ADDR']) {
// Check if the IP of the user has changed, if so we
// assume a man in the middle attack and log him out
$this->expired = true;
$this->status = AUTH_SECURITY_BREACH;
$this->logout();
return false;
}
// Check for useragent change
if ( isset($this->server['HTTP_USER_AGENT'])
&& $this->session['sessionuseragent'] != $this->server['HTTP_USER_AGENT']) {
// Check if the User-Agent of the user has changed, if
// so we assume a man in the middle attack and log him out
$this->expired = true;
$this->status = AUTH_SECURITY_BREACH;
$this->logout();
return false;
}
// Check challenge cookie here, if challengecookieold is not set
// this is the first time and check is skipped
// TODO when user open two pages similtaneuly (open in new window,open
// in tab) auth breach is caused find out a way around that if possible
if ( isset($this->session['challengecookieold'])
&& $this->session['challengecookieold'] != $this->cookie['authchallenge']) {
$this->expired = true;
$this->status = AUTH_SECURITY_BREACH;
$this->logout();
$this->login();
return false;
}
}
 
return true;
}
}
return false;
}
 
// }}}
// {{{ staticCheckAuth() [static]
 
/**
* Statically checks if there is a session with valid auth information.
*
* @access public
* @see checkAuth
* @return boolean Whether or not the user is authenticated.
* @static
*/
function staticCheckAuth($options = null)
{
static $staticAuth;
if(!isset($staticAuth)) {
$staticAuth = new Auth('null', $options);
}
return $staticAuth->checkAuth();
}
 
// }}}
// {{{ getAuth()
 
/**
* Has the user been authenticated?
*
* @access public
* @return bool True if the user is logged in, otherwise false.
*/
function getAuth()
{
return $this->checkAuth();
}
 
// }}}
// {{{ logout()
 
/**
* Logout function
*
* This function clears any auth tokens in the currently
* active session and executes the logout callback function,
* if any
*
* @access public
* @return void
*/
function logout()
{
if (is_callable($this->logoutCallback)) {
call_user_func_array($this->logoutCallback, array($this->session['username'], $this));
}
 
$this->username = '';
$this->password = '';
$this->session = null;
}
 
// }}}
// {{{ updateIdle()
 
/**
* Update the idletime
*
* @access private
* @return void
*/
function updateIdle()
{
$this->session['idle'] = time();
}
 
// }}}
// {{{ getUsername()
 
/**
* Get the username
*
* @return string
* @access public
*/
function getUsername()
{
if (isset($this->session['username'])) {
return($this->session['username']);
}
return('');
}
 
// }}}
// {{{ getStatus()
 
/**
* Get the current status
*
* @return string
* @access public
*/
function getStatus()
{
return $this->status;
}
 
// }}}
// {{{ getPostUsernameField()
/**
* Gets the post varible used for the username
*
* @return string
* @access public
*/
function getPostUsernameField()
{
return($this->_postUsername);
}
 
// }}}
// {{{ getPostPasswordField()
 
/**
* Gets the post varible used for the username
*
* @return string
* @access public
*/
function getPostPasswordField()
{
return($this->_postPassword);
}
 
// }}}
// {{{ sessionValidThru()
 
/**
* Returns the time up to the session is valid
*
* @access public
* @return integer
*/
function sessionValidThru()
{
if (!isset($this->session['idle'])) {
return 0;
}
if ($this->idle == 0) {
return 0;
}
return ($this->session['idle'] + $this->idle);
}
 
// }}}
// {{{ listUsers()
 
/**
* List all users that are currently available in the storage
* container
*
* @access public
* @return array
*/
function listUsers()
{
$this->_loadStorage();
return $this->storage->listUsers();
}
 
// }}}
// {{{ addUser()
 
/**
* Add user to the storage container
*
* @access public
* @param string Username
* @param string Password
* @param mixed Additional parameters
* @return mixed True on success, PEAR error object on error
* and AUTH_METHOD_NOT_SUPPORTED otherwise.
*/
function addUser($username, $password, $additional = '')
{
$this->_loadStorage();
return $this->storage->addUser($username, $password, $additional);
}
 
// }}}
// {{{ removeUser()
 
/**
* Remove user from the storage container
*
* @access public
* @param string Username
* @return mixed True on success, PEAR error object on error
* and AUTH_METHOD_NOT_SUPPORTED otherwise.
*/
function removeUser($username)
{
$this->_loadStorage();
return $this->storage->removeUser($username);
}
 
// }}}
// {{{ changePassword()
 
/**
* Change password for user in the storage container
*
* @access public
* @param string Username
* @param string The new password
* @return mixed True on success, PEAR error object on error
* and AUTH_METHOD_NOT_SUPPORTED otherwise.
*/
function changePassword($username, $password)
{
$this->_loadStorage();
return $this->storage->changePassword($username, $password);
}
 
// }}}
 
}
?>
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/libs/Container.php
New file
0,0 → 1,224
<?php
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4 foldmethod=marker: */
 
/**
* Auth_Container Base Class
*
* PHP versions 4 and 5
*
* LICENSE: This source file is subject to version 3.01 of the PHP license
* that is available through the world-wide-web at the following URI:
* http://www.php.net/license/3_01.txt. If you did not receive a copy of
* the PHP License and are unable to obtain it through the web, please
* send a note to license@php.net so we can mail you a copy immediately.
*
* @category Authentication
* @package Auth
* @author Martin Jansen <mj@php.net>
* @author Adam Ashley <aashley@php.net>
* @copyright 2001-2006 The PHP Group
* @license http://www.php.net/license/3_01.txt PHP License 3.01
* @version CVS: $Id$
* @link http://pear.php.net/package/Auth
*/
 
/**
* Storage class for fetching login data
*
* @category Authentication
* @package Auth
* @author Martin Jansen <mj@php.net>
* @author Adam Ashley <aashley@php.net>
* @copyright 2001-2006 The PHP Group
* @license http://www.php.net/license/3_01.txt PHP License 3.01
* @version Release: @package_version@ File: $Revision$
* @link http://pear.php.net/package/Auth
*/
class Auth_Container
{
 
// {{{ properties
 
/**
* User that is currently selected from the storage container.
*
* @access public
*/
var $activeUser = "";
 
// }}}
// {{{ Auth_Container() [constructor]
 
/**
* Constructor
*
* Has to be overwritten by each storage class
*
* @access public
*/
function Auth_Container()
{
}
 
// }}}
// {{{ fetchData()
 
/**
* Fetch data from storage container
*
* Has to be overwritten by each storage class
*
* @access public
*/
function fetchData($username, $password, $isChallengeResponse=false)
{
}
 
// }}}
// {{{ verifyPassword()
 
/**
* Crypt and verfiy the entered password
*
* @param string Entered password
* @param string Password from the data container (usually this password
* is already encrypted.
* @param string Type of algorithm with which the password from
* the container has been crypted. (md5, crypt etc.)
* Defaults to "md5".
* @return bool True, if the passwords match
*/
function verifyPassword($password1, $password2, $cryptType = "md5")
{
switch ($cryptType) {
case "crypt" :
return ( crypt($password1, $password2) == $password2 );
break;
case "none" :
case "" :
return ($password1 == $password2);
break;
case "md5" :
return (md5($password1) == $password2);
break;
default :
if (function_exists($cryptType)) {
return ($cryptType($password1) == $password2);
} elseif (method_exists($this,$cryptType)) {
return ($this->$cryptType($password1) == $password2);
} else {
return false;
}
break;
}
}
 
// }}}
// {{{ supportsChallengeResponse()
/**
* Returns true if the container supports Challenge Response
* password authentication
*/
function supportsChallengeResponse()
{
return(false);
}
 
// }}}
// {{{ getCryptType()
/**
* Returns the crypt current crypt type of the container
*
* @return string
*/
function getCryptType()
{
return('');
}
 
// }}}
// {{{ listUsers()
 
/**
* List all users that are available from the storage container
*/
function listUsers()
{
return AUTH_METHOD_NOT_SUPPORTED;
}
 
// }}}
// {{{ getUser()
 
/**
* Returns a user assoc array
*
* Containers which want should overide this
*
* @param string The username
*/
function getUser($username)
{
$users = $this->listUsers();
if ($users === AUTH_METHOD_NOT_SUPPORTED) {
return AUTH_METHOD_NOT_SUPPORTED;
}
for ($i=0; $c = count($users), $i<$c; $i++) {
if ($users[$i]['username'] == $username) {
return $users[$i];
}
}
return false;
}
 
// }}}
// {{{ addUser()
 
/**
* Add a new user to the storage container
*
* @param string Username
* @param string Password
* @param array Additional information
*
* @return boolean
*/
function addUser($username, $password, $additional=null)
{
return AUTH_METHOD_NOT_SUPPORTED;
}
 
// }}}
// {{{ removeUser()
 
/**
* Remove user from the storage container
*
* @param string Username
*/
function removeUser($username)
{
return AUTH_METHOD_NOT_SUPPORTED;
}
 
// }}}
// {{{ changePassword()
 
/**
* Change password for user in the storage container
*
* @param string Username
* @param string The new password
*/
function changePassword($username, $password)
{
return AUTH_METHOD_NOT_SUPPORTED;
}
 
// }}}
 
}
 
?>
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/libs/Html.php
New file
0,0 → 1,141
<?php
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4 foldmethod=marker: */
 
/**
* Standard Html Login form
*
* PHP versions 4 and 5
*
* LICENSE: This source file is subject to version 3.01 of the PHP license
* that is available through the world-wide-web at the following URI:
* http://www.php.net/license/3_01.txt. If you did not receive a copy of
* the PHP License and are unable to obtain it through the web, please
* send a note to license@php.net so we can mail you a copy immediately.
*
* @category Authentication
* @package Auth
* @author Martin Jansen <mj@php.net>
* @author Adam Ashley <aashley@php.net>
* @copyright 2001-2006 The PHP Group
* @license http://www.php.net/license/3_01.txt PHP License 3.01
* @version CVS: $Id$
* @link http://pear.php.net/package/Auth
* @since File available since Release 1.3.0
*/
 
/**
* Standard Html Login form
*
* @category Authentication
* @package Auth
* @author Yavor Shahpasov <yavo@netsmart.com.cy>
* @author Adam Ashley <aashley@php.net>
* @copyright 2001-2006 The PHP Group
* @license http://www.php.net/license/3_01.txt PHP License 3.01
* @version Release: @package_version@ File: $Revision$
* @link http://pear.php.net/package/Auth
* @since Class available since Release 1.3.0
*/
class Auth_Frontend_Html {
// {{{ render()
 
/**
* Displays the login form
*
* @param object The calling auth instance
* @param string The previously used username
* @return void
*/
function render(&$caller, $username = '') {
$loginOnClick = 'return true;';
// Try To Use Challene response
// TODO javascript might need some improvement for work on other browsers
if($caller->advancedsecurity && $caller->storage->supportsChallengeResponse() ) {
 
// Init the secret cookie
$caller->session['loginchallenege'] = md5(microtime());
 
print "\n";
print '<script language="JavaScript">'."\n";
 
 
print "\n";
print ' function securePassword() { '."\n";
print ' var pass = document.getElementById(\''.$caller->getPostPasswordField().'\');'."\n";
print ' var secret = document.getElementById(\'authsecret\')'."\n";
//print ' alert(pass);alert(secret); '."\n";
 
// If using md5 for password storage md5 the password before
// we hash it with the secret
// print ' alert(pass.value);';
if ($caller->storage->getCryptType() == 'md5' ) {
print ' pass.value = hex_md5(pass.value); '."\n";
#print ' alert(pass.value);';
}
 
print ' pass.value = hex_md5(pass.value+\''.$caller->session['loginchallenege'].'\'); '."\n";
// print ' alert(pass.value);';
print ' secret.value = 1;'."\n";
print ' var doLogin = document.getElementById(\'doLogin\')'."\n";
print ' doLogin.disabled = true;'."\n";
print ' return true;';
print ' } '."\n";
print '</script>'."\n";;
print "\n";
 
$loginOnClick = ' return securePassword(); ';
}
 
print '<center>'."\n";
 
$status = '';
if (!empty($caller->status) && $caller->status == AUTH_EXPIRED) {
$status = '<i>Your session has expired. Please login again!</i>'."\n";
} else if (!empty($caller->status) && $caller->status == AUTH_IDLED) {
$status = '<i>You have been idle for too long. Please login again!</i>'."\n";
} else if (!empty ($caller->status) && $caller->status == AUTH_WRONG_LOGIN) {
$status = '<i>Wrong login data!</i>'."\n";
} else if (!empty ($caller->status) && $caller->status == AUTH_SECURITY_BREACH) {
$status = '<i>Security problem detected. </i>'."\n";
}
print '<form method="post" action="'.$caller->server['PHP_SELF'].'" '
.'onSubmit="'.$loginOnClick.'">'."\n";
print '<table border="0" cellpadding="2" cellspacing="0" '
.'summary="login form" align="center" >'."\n";
print '<tr>'."\n";
print ' <td colspan="2" bgcolor="#eeeeee"><strong>Login </strong>'
.$status.'</td>'."\n";
print '</tr>'."\n";
print '<tr>'."\n";
print ' <td>Username:</td>'."\n";
print ' <td><input type="text" id="'.$caller->getPostUsernameField()
.'" name="'.$caller->getPostUsernameField().'" value="' . $username
.'" /></td>'."\n";
print '</tr>'."\n";
print '<tr>'."\n";
print ' <td>Password:</td>'."\n";
print ' <td><input type="password" id="'.$caller->getPostPasswordField()
.'" name="'.$caller->getPostPasswordField().'" /></td>'."\n";
print '</tr>'."\n";
print '<tr>'."\n";
//onClick=" '.$loginOnClick.' "
print ' <td colspan="2" bgcolor="#eeeeee"><input value="Login" '
.'id="doLogin" name="doLogin" type="submit" /></td>'."\n";
print '</tr>'."\n";
print '</table>'."\n";
 
// Might be a good idea to make the variable name variable
print '<input type="hidden" id="authsecret" name="authsecret" value="" />';
print '</form>'."\n";
print '</center>'."\n";
}
 
// }}}
}
 
?>
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/libs/class.plugins.php
New file
0,0 → 1,280
<?php
# ***** BEGIN LICENSE BLOCK *****
# This file is part of DotClear.
# Copyright (c) 2004 Olivier Meunier and contributors. All rights
# reserved.
#
# DotClear is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# DotClear is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with DotClear; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# ***** END LICENSE BLOCK *****
 
/*
Classe de gestion des plugins et des thèmes
*/
 
class plugins
{
var $location;
var $type;
var $_xml;
var $p_list = array();
function plugins($location,$type='plugin')
{
if (is_dir($location)) {
$this->location = $location.'/';
} else {
$this->location = NULL;
}
$this->type = $type;
}
function getPlugins($active_only=true)
{
if (($list_files = $this->_readDir()) !== false)
{
$this->p_list = array();
foreach ($list_files as $entry => $pfile)
{
if (($info = $this->_getPluginInfo($pfile)) !== false) {
if (($active_only && $info['active']) || !$active_only) {
$this->p_list[$entry] = $info;
}
}
}
ksort($this->p_list);
return true;
}
else
{
return false;
}
}
function getPluginsList()
{
return $this->p_list;
}
function getFunctions($f='functions.php')
{
$res = array();
if (($list_files = $this->_readDir()) !== false)
{
foreach ($list_files as $entry => $pfile)
{
if (file_exists(dirname($pfile).'/'.$f)) {
$res[] = dirname($pfile).'/'.$f;
}
}
}
return $res;
}
function loadCallbacks()
{
$res['onPost'] = array();
$ires = array_keys($res);
foreach ($this->p_list as $k => $v)
{
# Chargement des fichiers events.php
if (file_exists($this->location.$k.'/events.php'))
{
require_once $this->location.$k.'/events.php';
foreach ($v['callbacks'] as $f)
{
if (in_array($f[0],$ires))
{
$pf = explode('::',$f[1]);
if (count($pf) == 2 && is_callable($pf)) {
$res[$f[0]][] = $pf;
}
}
}
}
}
return $res;
}
function loadl10n($p)
{
if (defined('DC_LANG')) {
if (dc_encoding == 'UTF-8') {
l10n::set($this->location.$p.'/l10n/'.DC_LANG.'-utf8/main');
} else {
l10n::set($this->location.$p.'/l10n/'.DC_LANG.'/main');
}
}
}
function switchStatus($p)
{
$xml_path = $this->location.$p.'/desc.xml';
$p_info = $this->_getPluginInfo($xml_path);
$xml = implode('',file($xml_path));
$active = (integer) !$p_info['active'];
$xml = preg_replace('|(<'.$this->type.'[^>]*?active=)"([^"]+)([^>]*>)|ms',
'$1"'.$active.'$3',$xml);
if (!files::putContent($xml_path,$xml)) {
return false;
}
return true;
}
/* Installation d'un plugin */
function install($url)
{
$dest = $this->location.'/'.basename($url);
if (($err = files::copyRemote($url,$dest)) !== true)
{
return $err;
}
else
{
if (($content = @implode('',@gzfile($dest))) === false) {
return __('Cannot open file');
} else {
if (($list = unserialize($content)) === false)
{
return __('Plugin not valid');
}
else
{
if (is_dir($this->location.'/'.$list['name']))
{
/*if (files::deltree($this->location.'/'.$list['name']) === false)
{
return 'Impossible de supprimer le plugin existant';
}*/
unlink($dest);
return __('This plugin still exists. Delete it before.');
}
foreach ($list['dirs'] as $d)
{
mkdir ($this->location.'/'.$d,fileperms($this->location));
chmod($this->location.'/'.$d,fileperms($this->location));
}
foreach ($list['files'] as $f => $v)
{
$v = base64_decode($v);
$fp = fopen($this->location.'/'.$f,'w');
fwrite($fp,$v,strlen($v));
fclose($fp);
chmod($this->location.'/'.$f,fileperms($this->location) & ~0111);
}
unlink($dest);
}
}
}
return true;
}
/* Lecture d'un répertoire à la recherche des desc.xml */
function _readDir()
{
if ($this->location === NULL) {
return false;
}
$res = array();
$d = dir($this->location);
# Liste du répertoire des plugins
while (($entry = $d->read()) !== false)
{
if ($entry != '.' && $entry != '..' &&
is_dir($this->location.$entry) && file_exists($this->location.$entry.'/desc.xml'))
{
$res[$entry] = $this->location.$entry.'/desc.xml';
}
}
return $res;
}
function _getPluginInfo($p)
{
if (file_exists($p))
{
$this->_current_tag_cdata = '';
$this->_p_info = array('name'=>NULL,'version'=>NULL,
'active'=>NULL,'author'=>NULL,'label'=>NULL,
'desc'=>NULL,'callbacks'=>array());
$this->_xml = xml_parser_create('ISO-8859-1');
xml_parser_set_option($this->_xml, XML_OPTION_CASE_FOLDING, false);
xml_set_object($this->_xml, $this);
xml_set_element_handler($this->_xml,'_openTag','_closeTag');
xml_set_character_data_handler($this->_xml, '_cdata');
xml_parse($this->_xml,implode('',file($p)));
xml_parser_free($this->_xml);
if (!empty($this->_p_info['name'])) {
return $this->_p_info;
} else {
return false;
}
}
}
function _openTag($p,$tag,$attr)
{
if ($tag == $this->type && !empty($attr['name']))
{
$this->_p_info['name'] = $attr['name'];
$this->_p_info['version'] = (!empty($attr['version'])) ? $attr['version'] : NULL;
$this->_p_info['active'] = (!empty($attr['active'])) ? (boolean) $attr['active'] : false;
}
if ($tag == 'callback') {
$this->_p_info['callbacks'][] = array($attr['event'],$attr['function']);
}
}
function _closeTag($p,$tag)
{
switch ($tag)
{
case 'author':
case 'label':
case 'desc':
$this->_p_info[$tag] = $this->_current_tag_cdata;
break;
}
}
function _cdata($p,$cdata)
{
$this->_current_tag_cdata = $cdata;
}
}
 
?>
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/libs/class.wiki.php
New file
0,0 → 1,56
<?php
require_once('wakka.config.php');
 
// Une classe minimal wiki pour l'acces à la base de donnée
 
class Wiki
{
var $dblink;
var $VERSION;
 
// constructor
function Wiki($config)
{
$this->config = $config;
// some host do not allow mysql_pconnect
$this->dblink = @mysql_connect (
$this->config["mysql_host"],
$this->config["mysql_user"],
$this->config["mysql_password"]);
if ($this->dblink)
{
if (!@mysql_select_db($this->config["mysql_database"], $this->dblink))
{
@mysql_close($this->dblink);
$this->dblink = false;
}
}
$this->VERSION = WAKKA_VERSION;
 
}
 
 
// DATABASE
function Query($query)
{
if (!$result = mysql_query($query, $this->dblink))
{
ob_end_clean();
die("Query failed: ".$query." (".mysql_error().")");
}
return $result;
}
function LoadSingle($query) { if ($data = $this->LoadAll($query)) return $data[0]; }
function LoadAll($query)
{
$data=array();
if ($r = $this->Query($query))
{
while ($row = mysql_fetch_assoc($r)) $data[] = $row;
mysql_free_result($r);
}
return $data;
}
 
}
?>
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/libs/lib.files.php
New file
0,0 → 1,328
<?php
# ***** BEGIN LICENSE BLOCK *****
# This file is part of DotClear.
# Copyright (c) 2004 Olivier Meunier and contributors. All rights
# reserved.
#
# DotClear is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# DotClear is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with DotClear; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# ***** END LICENSE BLOCK *****
 
class files
{
function scandir($d,$order=0)
{
$res = array();
if (($dh = @opendir($d)) !== false)
{
while (($f = readdir($dh)) !== false) {
$res[] = $f;
}
closedir($dh);
sort($res);
if ($order == 1) {
rsort($res);
}
return $res;
}
else
{
return false;
}
}
function isDeletable($f)
{
if (is_file($f)) {
return is_writable(dirname($f));
} elseif (is_dir($f)) {
return (is_writable(dirname($f)) && count(files::scandir($f)) <= 2);
}
}
# Suppression récursive d'un répertoire (rm -rf)
function deltree($dir)
{
$current_dir = opendir($dir);
while($entryname = readdir($current_dir))
{
if (is_dir($dir.'/'.$entryname) and ($entryname != '.' and $entryname!='..'))
{
if (!files::deltree($dir.'/'.$entryname)) {
return false;
}
}
elseif ($entryname != '.' and $entryname!='..')
{
if (!@unlink($dir.'/'.$entryname)) {
return false;
}
}
}
closedir($current_dir);
return @rmdir($dir);
}
function touch($f)
{
if (is_writable($f)) {
$c = implode('',file($f));
if ($fp = @fopen($f,'w')) {
fwrite($fp,$c,strlen($c));
fclose($fp);
}
}
}
function secureFile($f)
{
if (is_file($f))
{
@chmod($f,0600);
if (is_readable($f)) {
return true;
} else {
@chmod($f,0660);
if (is_readable($f)) {
return true;
} else {
@chmod($f,0666);
}
}
}
}
function makeDir($f)
{
if (@mkdir($f,fileperms(dirname($f))) === false) {
return false;
}
@chmod($f,fileperms(dirname($f)));
}
function putContent($f, $f_content)
{
if (is_writable($f))
{
if ($fp = @fopen($f, 'w'))
{
fwrite($fp,$f_content,strlen($f_content));
fclose($fp);
return true;
}
}
return false;
}
function size($size)
{
$kb = 1024;
$mb = 1024 * $kb;
$gb = 1024 * $mb;
$tb = 1024 * $gb;
if($size < $kb) {
return $size." B";
}
else if($size < $mb) {
return round($size/$kb,2)." KB";
}
else if($size < $gb) {
return round($size/$mb,2)." MB";
}
else if($size < $tb) {
return round($size/$gb,2)." GB";
}
else {
return round($size/$tb,2)." TB";
}
}
# Copier d'un fichier binaire distant
function copyRemote($src,$dest)
{
if (($fp1 = @fopen($src,'r')) === false)
{
return __('An error occured while downloading the file.');
}
else
{
if (($fp2 = @fopen($dest,'w')) === false)
{
fclose($fp1);
return __('An error occured while writing the file.');
}
else
{
while (($buffer = fgetc($fp1)) !== false) {
fwrite($fp2,$buffer);
}
fclose($fp1);
fclose($fp2);
return true;
}
}
}
# Fonctions de création de packages
#
function getDirList($dirName)
{
static $filelist = array();
static $dirlist = array();
$exclude_list=array('.','..','.svn');
if (empty($res)) {
$res = array();
}
$dirName = preg_replace('|/$|','',$dirName);
if (!is_dir($dirName)) {
return false;
}
$dirlist[] = $dirName;
$d = dir($dirName);
while($entry = $d->read())
{
if (!in_array($entry,$exclude_list))
{
if (is_dir($dirName.'/'.$entry))
{
if ($entry != 'CVS')
{
files::getDirList($dirName.'/'.$entry);
}
}
else
{
$filelist[] = $dirName.'/'.$entry;
}
}
}
$d->close();
return array('dirs'=>$dirlist, 'files'=>$filelist);
}
function makePackage($name,$dir,$remove_path='',$gzip=true)
{
if ($gzip && !function_exists('gzcompress')) {
return false;
}
if (($filelist = files::getDirList($dir)) === false) {
return false;
}
$res = array ('name' => $name, 'dirs' => array(), 'files' => array());
foreach ($filelist['dirs'] as $v) {
$res['dirs'][] = preg_replace('/^'.preg_quote($remove_path,'/').'/','',$v);
}
foreach ($filelist['files'] as $v) {
$f_content = base64_encode(file_get_contents($v));
$v = preg_replace('/^'.preg_quote($remove_path,'/').'/','',$v);
$res['files'][$v] = $f_content;
}
$res = serialize($res);
if ($gzip) {
$res = gzencode($res);
}
return $res;
}
}
 
 
class path
{
function real($p,$strict=true)
{
$os = (DIRECTORY_SEPARATOR == '\\') ? 'win' : 'nix';
# Chemin absolu ou non ?
if ($os == 'win') {
$_abs = preg_match('/^\w+:/',$p);
} else {
$_abs = substr($p,0,1) == '/';
}
# Transformation du chemin, forme std
if ($os == 'win') {
$p = str_replace('\\','/',$p);
}
# Ajout de la racine du fichier appelant si
if (!$_abs) {
$p = dirname($_SERVER['SCRIPT_FILENAME']).'/'.$p;
}
# Nettoyage
$p = preg_replace('|/+|','/',$p);
if (strlen($p) > 1) {
$p = preg_replace('|/$|','',$p);
}
$_start = '';
if ($os == 'win') {
list($_start,$p) = explode(':',$p);
$_start .= ':/';
} else {
$_start = '/';
}
$p = substr($p,1);
# Parcours
$P = explode('/',$p);
$res = array();
for ($i=0;$i<count($P);$i++)
{
if ($P[$i] == '.') {
continue;
}
if ($P[$i] == '..') {
if (count($res) > 0) {
array_pop($res);
}
} else {
array_push($res,$P[$i]);
}
}
$p = $_start.implode('/',$res);
if ($strict && !@file_exists($p)) {
return false;
}
return $p;
}
}
?>
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/libs/lib.compat.php
New file
0,0 → 1,64
<?php
# ***** BEGIN LICENSE BLOCK *****
# This file is part of DotClear.
# Copyright (c) 2004 Olivier Meunier and contributors. All rights
# reserved.
#
# DotClear is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# DotClear is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with DotClear; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# ***** END LICENSE BLOCK *****
 
/* Missing functions
source : http://pear.php.net/package/PHP_Compat
*/
 
/* files_get_contents */
if (!function_exists('file_get_contents'))
{
function file_get_contents($filename, $incpath = false, $resource_context = null)
{
if (false === $fh = fopen($filename, 'rb', $incpath))
{
trigger_error('file_get_contents() failed to open stream: No such file or directory', E_USER_WARNING);
return false;
}
clearstatcache();
if ($fsize = filesize($filename))
{
$data = fread($fh, $fsize);
}
else
{
while (!feof($fh)) {
$data .= fread($fh, 8192);
}
}
fclose($fh);
return $data;
}
}
 
if (!function_exists('is_a'))
{
function is_a($obj, $classname)
{
if (strtolower(get_class($obj)) == strtolower($classname)) {
return true;
} else {
return(is_subclass_of($obj, $classname));
}
}
}
?>
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/libs/lib.form.php
New file
0,0 → 1,137
<?php
# ***** BEGIN LICENSE BLOCK *****
# This file is part of DotClear.
# Copyright (c) 2004 Olivier Meunier and contributors. All rights
# reserved.
#
# DotClear is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# DotClear is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with DotClear; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# ***** END LICENSE BLOCK *****
 
class form
{
function combo($name,$arryData,$default='',$class='',$id='',$tabindex='')
{
$res = '<select name="'.$name.'" ';
if($class != '')
$res .= 'class="'.$class.'" ';
if($tabindex != '')
$res .= 'tabindex="'.$tabindex.'" ';
if($id != '')
$res .= 'id="'.$id.'" ';
else
$res .= 'id="'.$name.'" ';
$res .= '>'."\n";
foreach($arryData as $k => $v)
{
$res .= '<option value="'.$v.'"';
if($v == $default)
$res .= ' selected="selected"';
$res .= '>'.$k.'</option>'."\n";
}
$res .= '</select>'."\n";
return $res;
}
function radio($name, $value, $checked='', $class='', $id='')
{
$res = '<input type="radio" name="'.$name.'" value="'.$value.'" ';
if($class != '') {
$res .= 'class="'.$class.'" ';
}
if($id != '') {
$res .= 'id="'.$id.'" ';
}
if (($checked === 0) or $checked >= 1) {
$res .= 'checked="checked" ';
}
$res .= '/>'."\n";
return $res;
}
 
function checkbox($name, $value, $checked='', $class='', $id='')
{
$res = '<input type="checkbox" name="'.$name.'" value="'.$value.'"';
if($class != '')
$res .= 'class="'.$class.'" ';
if($id != '') {
$res .= 'id="'.$id.'" ';
}
 
if($checked != '') {
$res.='checked="checked"';
}
$res .= ' />'."\n";
 
return $res;
}
 
function field($id,$size,$max,$default='',$tabindex='',$html='')
{
if (is_array($id)) {
$name = $id[0];
$id = isset($id[1]) ? $id[1] : '';
} else {
$name = $id;
}
$res = '<input type="text" size="'.$size.'" name="'.$name.'" ';
$res .= ($id != '') ? 'id="'.$id.'" ' : '';
$res .= ($max != '') ? 'maxlength="'.$max.'" ' : '';
$res .= ($tabindex != '') ? 'tabindex="'.$tabindex.'" ' : '';
$res .= ($default != '') ? 'value="'.$default.'" ' : '';
$res .= $html;
$res .= ' />';
return $res;
}
function textArea($id,$cols,$rows,$default='',$tabindex='',$html='')
{
$res = '<textarea cols="'.$cols.'" rows="'.$rows.'" ';
$res .= 'name="'.$id.'" id="'.$id.'" ';
$res .= ($tabindex != '') ? 'tabindex="'.$tabindex.'" ' : '';
$res .= $html.'>';
$res .= $default;
$res .= '</textarea>';
return $res;
}
function hidden($id,$value)
{
return '<input type="hidden" name="'.$id.'" value="'.$value.'" />';
}
}
?>
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/libs/Auth/Frontend/Html.php
New file
0,0 → 1,142
<?php
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4 foldmethod=marker: */
 
/**
* Standard Html Login form
*
* PHP versions 4 and 5
*
* LICENSE: This source file is subject to version 3.01 of the PHP license
* that is available through the world-wide-web at the following URI:
* http://www.php.net/license/3_01.txt. If you did not receive a copy of
* the PHP License and are unable to obtain it through the web, please
* send a note to license@php.net so we can mail you a copy immediately.
*
* @category Authentication
* @package Auth
* @author Martin Jansen <mj@php.net>
* @author Adam Ashley <aashley@php.net>
* @copyright 2001-2006 The PHP Group
* @license http://www.php.net/license/3_01.txt PHP License 3.01
* @version CVS: $Id$
* @link http://pear.php.net/package/Auth
* @since File available since Release 1.3.0
*/
 
/**
* Standard Html Login form
*
* @category Authentication
* @package Auth
* @author Yavor Shahpasov <yavo@netsmart.com.cy>
* @author Adam Ashley <aashley@php.net>
* @copyright 2001-2006 The PHP Group
* @license http://www.php.net/license/3_01.txt PHP License 3.01
* @version Release: @package_version@ File: $Revision$
* @link http://pear.php.net/package/Auth
* @since Class available since Release 1.3.0
*/
class Auth_Frontend_Html {
// {{{ render()
 
/**
* Displays the login form
*
* @param object The calling auth instance
* @param string The previously used username
* @return void
*/
function render(&$caller, $username = '') {
$loginOnClick = 'return true;';
// Try To Use Challene response
// TODO javascript might need some improvement for work on other browsers
if($caller->advancedsecurity && $caller->storage->supportsChallengeResponse() ) {
 
// Init the secret cookie
$caller->session['loginchallenege'] = md5(microtime());
 
print "\n";
print '<script language="JavaScript">'."\n";
 
include 'Auth/Frontend/md5.js';
 
print "\n";
print ' function securePassword() { '."\n";
print ' var pass = document.getElementById(\''.$caller->getPostPasswordField().'\');'."\n";
print ' var secret = document.getElementById(\'authsecret\')'."\n";
//print ' alert(pass);alert(secret); '."\n";
 
// If using md5 for password storage md5 the password before
// we hash it with the secret
// print ' alert(pass.value);';
if ($caller->storage->getCryptType() == 'md5' ) {
print ' pass.value = hex_md5(pass.value); '."\n";
#print ' alert(pass.value);';
}
 
print ' pass.value = hex_md5(pass.value+\''.$caller->session['loginchallenege'].'\'); '."\n";
// print ' alert(pass.value);';
print ' secret.value = 1;'."\n";
print ' var doLogin = document.getElementById(\'doLogin\')'."\n";
print ' doLogin.disabled = true;'."\n";
print ' return true;';
print ' } '."\n";
print '</script>'."\n";;
print "\n";
 
$loginOnClick = ' return securePassword(); ';
}
 
print '<center>'."\n";
 
$status = '';
if (!empty($caller->status) && $caller->status == AUTH_EXPIRED) {
$status = '<i>Your session has expired. Please login again!</i>'."\n";
} else if (!empty($caller->status) && $caller->status == AUTH_IDLED) {
$status = '<i>You have been idle for too long. Please login again!</i>'."\n";
} else if (!empty ($caller->status) && $caller->status == AUTH_WRONG_LOGIN) {
$status = '<i>Wrong login data!</i>'."\n";
} else if (!empty ($caller->status) && $caller->status == AUTH_SECURITY_BREACH) {
$status = '<i>Security problem detected. </i>'."\n";
}
print '<form method="post" action="'.$caller->server['PHP_SELF'].'" '
.'onSubmit="'.$loginOnClick.'">'."\n";
print '<table border="0" cellpadding="2" cellspacing="0" '
.'summary="login form" align="center" >'."\n";
print '<tr>'."\n";
print ' <td colspan="2" bgcolor="#eeeeee"><strong>Login </strong>'
.$status.'</td>'."\n";
print '</tr>'."\n";
print '<tr>'."\n";
print ' <td>Username:</td>'."\n";
print ' <td><input type="text" id="'.$caller->getPostUsernameField()
.'" name="'.$caller->getPostUsernameField().'" value="' . $username
.'" /></td>'."\n";
print '</tr>'."\n";
print '<tr>'."\n";
print ' <td>Password:</td>'."\n";
print ' <td><input type="password" id="'.$caller->getPostPasswordField()
.'" name="'.$caller->getPostPasswordField().'" /></td>'."\n";
print '</tr>'."\n";
print '<tr>'."\n";
//onClick=" '.$loginOnClick.' "
print ' <td colspan="2" bgcolor="#eeeeee"><input value="Login" '
.'id="doLogin" name="doLogin" type="submit" /></td>'."\n";
print '</tr>'."\n";
print '</table>'."\n";
 
// Might be a good idea to make the variable name variable
print '<input type="hidden" id="authsecret" name="authsecret" value="" />';
print '</form>'."\n";
print '</center>'."\n";
}
 
// }}}
}
 
?>
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/aceditor/ACeditor.js
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/aceditor/ACeditor.js
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/aceditor/wiki.php
New file
0,0 → 1,23
<?php
// Partie publique
 
if (!defined("WIKINI_VERSION"))
{
die ("acc&egrave;s direct interdit");
}
 
$wikiClasses [] = 'Aceditor';
$wikiClassesContent [] = '
 
function FormOpen($method = "", $tag = "", $formMethod = "post") {
 
if (ereg("edit$", $this->href($method, $tag))) {
$result = "<form id=\"ACEditor\" name=\"ACEditor\" action=\"".$this->href($method, $tag)."\" method=\"".$formMethod."\">\n";
} else {
$result = "<form action=\"".$this->href($method, $tag)."\" method=\"".$formMethod."\">\n";
}
 
if (!$this->config["rewrite_mode"]) $result .= "<input type=\"hidden\" name=\"wiki\" value=\"".$this->MiniHref($method, $tag)."\" />\n";
return $result;
}
';
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/aceditor/desc.xml
New file
0,0 → 1,6
<?xml version="1.0" encoding="ISO-8859-1"?>
<plugin name="wkaceditor" version="0.1" active="1">
<author>Alexandre Vicq et Philippe Drouot</author>
<label>Barre d'outil</label>
<desc>Aide à la saisie des règles de formatage wikini, en particulier pour l'insertion d'images et de documents à partir de la contribution ActionAttach</desc>
</plugin>
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/aceditor/index.php
New file
0,0 → 1,12
<?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");
}
 
?>
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/aceditor/actions/header__.php
New file
0,0 → 1,24
<?php
if ($this->GetMethod() == "edit") {
$plugin_output_new=preg_replace ('/<\/head>/',
'
<style type="text/css">
.buttons { background: #ccc; border: 1px solid #ccc; margin: 1; float:left; }
.raise{ border-top: 1px solid buttonhighlight; border-left: 1px solid buttonhighlight; border-bottom: 1px solid buttonshadow; border-right: 1px solid buttonshadow; background: #ccc; margin:1; float:left; }
.press { border-top: 1px solid buttonshadow; border-left: 1px solid buttonshadow; border-bottom: 1px solid buttonhighlight; border-right: 1px solid buttonhighlight; background: #ccc; margin:1; float:left; }
/* ci dessous les petits champs */
.ACsearchbox { background: #FFFFF8; border: 0px; border-bottom: 1px solid #CCCCAA; padding: 0px; margin: 0px; font-size: 10px; }
.texteChampsImage {font-size: 10px; }
#toolbar { margin: 0; width: 450px; padding: 0; height:20px; background: #ccc; border-top: 1px solid buttonhighlight; border-left: 1px solid buttonhighlight; border-bottom: 1px solid buttonshadow; border-right: 1px solid buttonshadow; text-align:left; }
#toolbar_suite { margin: 0; width: 450px; padding: 0; height:20px; background: #ccc; border-top: 1px solid buttonhighlight; border-left: 1px solid buttonhighlight; border-bottom: 1px solid buttonshadow; border-right: 1px solid buttonshadow; text-align:left; }
</style>
<script type="text/javascript" src="tools/aceditor/ACeditor.js"></script>
</head>
',
$plugin_output_new);
$plugin_output_new=preg_replace ('/<body /',
"<body onload=\"thisForm=document.ACEditor;\""
,
$plugin_output_new);
}
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/aceditor/handlers/page/edit__.php
New file
0,0 → 1,57
<?php
if ($this->HasAccess("write") && $this->HasAccess("read"))
{
// preview?
if ($_POST["submit"] == "Aperçu")
{
// Rien
}
else
{
$ACbuttonsBar = "
<div id=\"toolbar\">
<img class=\"buttons\" onmouseover=\"mouseover(this);\" onmouseout=\"mouseout(this);\" onmousedown=\"mousedown(this);\" onmouseup=\"mouseup(this);\" onclick=\"wrapSelection(thisForm.body,'**','**');\" src=\"tools/aceditor/ACEdImages/bold.gif\" title=\"Passe le texte sélectionné en gras ( Ctrl-Maj-b )\" alt=\"Gras\"></img>
<img class=\"buttons\" onmouseover=\"mouseover(this);\" onmouseout=\"mouseout(this);\" onmousedown=\"mousedown(this);\" onmouseup=\"mouseup(this);\" onclick=\"wrapSelection(thisForm.body,'//','//');\" src=\"tools/aceditor/ACEdImages/italic.gif\" title=\"Passe le texte sélectionné en italique ( Ctrl-Maj-t )\" alt=\"Italique\"></img>
<img class=\"buttons\" onmouseover=\"mouseover(this);\" onmouseout=\"mouseout(this);\" onmousedown=\"mousedown(this);\" onmouseup=\"mouseup(this);\" onclick=\"wrapSelection(thisForm.body,'__','__');\" src=\"tools/aceditor/ACEdImages/underline.gif\" title=\"Souligne le texte sélectionné ( Ctrl-Maj-u )\" alt=\"Souligné\"></img>
<img class=\"buttons\" onmouseover=\"mouseover(this);\" onmouseout=\"mouseout(this);\" onmousedown=\"mousedown(this);\" onmouseup=\"mouseup(this);\" onclick=\"wrapSelection(thisForm.body,'@@','@@');\" src=\"tools/aceditor/ACEdImages/strike.gif\" title=\"Barre le texte sélectionné\" alt=\"Barre\"></img>
<img class=\"buttons\" src=\"tools/aceditor/ACEdImages/separator.gif\" alt=\"\" ></img>
<img class=\"buttons\" onmouseover=\"mouseover(this);\" onmouseout=\"mouseout(this);\" onmousedown=\"mousedown(this);\" onmouseup=\"mouseup(this);\" onclick=\"wrapSelection(thisForm.body,'======','======\\n');\" src=\"tools/aceditor/ACEdImages/t1.gif\" title=\" En-tête énorme\" alt=\"\"> </img>
<img class=\"buttons\" onmouseover=\"mouseover(this);\" onmouseout=\"mouseout(this);\" onmousedown=\"mousedown(this);\" onmouseup=\"mouseup(this);\" onclick=\"wrapSelection(thisForm.body,'=====','=====\\n');\" src=\"tools/aceditor/ACEdImages/t2.gif\" title=\" En-tête très gros\" alt=\"\"> </img>
<img class=\"buttons\" onmouseover=\"mouseover(this);\" onmouseout=\"mouseout(this);\" onmousedown=\"mousedown(this);\" onmouseup=\"mouseup(this);\" onclick=\"wrapSelection(thisForm.body,'====','====\\n');\" src=\"tools/aceditor/ACEdImages/t3.gif\" title=\" En-tête gros\" alt=\"\"> </img>
<img class=\"buttons\" onmouseover=\"mouseover(this);\" onmouseout=\"mouseout(this);\" onmousedown=\"mousedown(this);\" onmouseup=\"mouseup(this);\" onclick=\"wrapSelection(thisForm.body,'===','===\\n');\" src=\"tools/aceditor/ACEdImages/t4.gif\" title=\" En-tête normal\" alt=\"\"> </img>
<img class=\"buttons\" onmouseover=\"mouseover(this);\" onmouseout=\"mouseout(this);\" onmousedown=\"mousedown(this);\" onmouseup=\"mouseup(this);\" onclick=\"wrapSelection(thisForm.body,'==','==');\" src=\"tools/aceditor/ACEdImages/t5.gif\" title=\" Petit en-tête\" alt=\"\"> </img>
<img class=\"buttons\" src=\"tools/aceditor/ACEdImages/separator.gif\" alt=\"\" ></img>
<img class=\"buttons\" onmouseover=\"mouseover(this);\" onmouseout=\"mouseout(this);\" onmousedown=\"mousedown(this);\" onmouseup=\"mouseup(this);\" onclick=\"wrapSelectionWithLink(thisForm.body);\" src=\"tools/aceditor/ACEdImages/link.gif\" title=\"Ajoute un lien au texte sélectionné\" alt=\"\"></img>
<img class=\"buttons\" onmouseover=\"mouseover(this);\" onmouseout=\"mouseout(this);\" onmousedown=\"mousedown(this);\" onmouseup=\"mouseup(this);\" onclick=\"wrapSelection(thisForm.body,'\\t-&nbsp;','');\" src=\"tools/aceditor/ACEdImages/listepuce.gif\" title=\"Liste\" alt=\"\"></img>
<img class=\"buttons\" onmouseover=\"mouseover(this);\" onmouseout=\"mouseout(this);\" onmousedown=\"mousedown(this);\" onmouseup=\"mouseup(this);\" onclick=\"wrapSelection(thisForm.body,'\\t1)&nbsp;','');\" src=\"tools/aceditor/ACEdImages/listenum.gif\" title=\"Liste numérique\" alt=\"\"></img>
<img class=\"buttons\" onmouseover=\"mouseover(this);\" onmouseout=\"mouseout(this);\" onmousedown=\"mousedown(this);\" onmouseup=\"mouseup(this);\" onclick=\"wrapSelection(thisForm.body,'\\ta)&nbsp;','');\" src=\"tools/aceditor/ACEdImages/listealpha.gif\" title=\"Liste alphabéthique\" alt=\"\"></img>
<img class=\"buttons\" onmouseover=\"mouseover(this);\" onmouseout=\"mouseout(this);\" onmousedown=\"mousedown(this);\" onmouseup=\"mouseup(this);\" onclick=\"wrapSelectionBis(thisForm.body,'\\n---','');\" src=\"tools/aceditor/ACEdImages/crlf.gif\" title=\"Insère un retour chariot\" alt=\"\"></img>
<img class=\"buttons\" onmouseover=\"mouseover(this);\" onmouseout=\"mouseout(this);\" onmousedown=\"mousedown(this);\" onmouseup=\"mouseup(this);\" onclick=\"wrapSelectionBis(thisForm.body,'\\n------','');\" src=\"tools/aceditor/ACEdImages/hr.gif\" title=\"Insère une ligne horizontale\" alt=\"\"> </img>
<img class=\"buttons\" src=\"tools/aceditor/ACEdImages/separator.gif\" alt=\"\" ></img>
<img class=\"buttons\" onmouseover=\"mouseover(this);\" onmouseout=\"mouseout(this);\" onmousedown=\"mousedown(this);\" onmouseup=\"mouseup(this);\" onclick=\"wrapSelection(thisForm.body,'%%','%%');\" src=\"tools/aceditor/ACEdImages/code.gif\" title=\"Code\" alt=\"\"></img>
<img class=\"buttons\" onmouseover=\"mouseover(this);\" onmouseout=\"mouseout(this);\" onmousedown=\"mousedown(this);\" onmouseup=\"mouseup(this);\" onclick=\"wrapSelection(thisForm.body,'%%(php)','%%');\" src=\"tools/aceditor/ACEdImages/php.gif\" title=\"Code PHP\" alt=\"\"></img>
</div>
<div id=\"toolbar_suite\">
<img class=\"buttons\" onmouseover=\"mouseover(this);\" onmouseout=\"mouseout(this);\" onmousedown=\"mousedown(this);\" onmouseup=\"mouseup(this);\" onclick=\"wrapSelectionWithImage(thisForm.body);\" src=\"tools/aceditor/ACEdImages/image.gif\" title=\"insère un tag image \" alt=\"\"> </img>
<span class=\"texteChampsImage\">
&nbsp;&nbsp;Fichier&nbsp;<input type=\"text\" name=\"filename\" class=\"ACsearchbox\" size=\"10\"/>&nbsp;&nbsp;Description&nbsp;<input type=\"text\" name=\"description\" class=\"ACsearchbox\" size=\"10\"/>
&nbsp;&nbsp;Alignement&nbsp;<select id=\"alignment\" class=\"ACsearchbox\">
<option value=\"left\">Gauche</option>
<option value=\"center\">Centré</option>
<option value=\"right\">Droite</option>
</select>
</span>
</div>";
$plugin_output_new=preg_replace ('/\<textarea onkeydown/',
$ACbuttonsBar.
'<textarea onkeydown',
$plugin_output_new);
}
}
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/aceditor/ACEdImages/separator.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/aceditor/ACEdImages/separator.gif
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/aceditor/ACEdImages/listenum.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/aceditor/ACEdImages/listenum.gif
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/aceditor/ACEdImages/strike.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/aceditor/ACEdImages/strike.gif
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/aceditor/ACEdImages/italic.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/aceditor/ACEdImages/italic.gif
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/aceditor/ACEdImages/hr.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/aceditor/ACEdImages/hr.gif
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/aceditor/ACEdImages/code.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/aceditor/ACEdImages/code.gif
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/aceditor/ACEdImages/link.old.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/aceditor/ACEdImages/link.old.gif
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/aceditor/ACEdImages/bold.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/aceditor/ACEdImages/bold.gif
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/aceditor/ACEdImages/image.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/aceditor/ACEdImages/image.gif
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/aceditor/ACEdImages/t1.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/aceditor/ACEdImages/t1.gif
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/aceditor/ACEdImages/underline.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/aceditor/ACEdImages/underline.gif
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/aceditor/ACEdImages/t2.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/aceditor/ACEdImages/t2.gif
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/aceditor/ACEdImages/t3.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/aceditor/ACEdImages/t3.gif
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/aceditor/ACEdImages/crlf.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/aceditor/ACEdImages/crlf.gif
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/aceditor/ACEdImages/listealpha.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/aceditor/ACEdImages/listealpha.gif
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/aceditor/ACEdImages/t4.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/aceditor/ACEdImages/t4.gif
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/aceditor/ACEdImages/php.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/aceditor/ACEdImages/php.gif
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/aceditor/ACEdImages/t5.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/aceditor/ACEdImages/t5.gif
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/aceditor/ACEdImages/listepuce.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/aceditor/ACEdImages/listepuce.gif
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/aceditor/ACEdImages/link.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/aceditor/ACEdImages/link.gif
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/tableau/formatters/wakka__.php
New file
0,0 → 1,108
<?php
if (!function_exists("wakka2callbacktableaux"))
{
function parsetable($thing)
{
$tableattr = 'border="1"';
// echo "parsetable debut : \$thing = $thing<br>";
// recuperation des attributs
preg_match("/^\[\|(.*)$/m",$thing,$match);
// echo "parsetable : \$match = ";var_dump($match);echo "<br>";
if ($match[1]){
$tableattr = $match[1];
}
$table = "<table $tableattr >\n";
//suppression de [|xxxx et de |]
$thing = preg_replace("/^\[\|(.*)$/m","",$thing);
$thing = trim(preg_replace("/\|\]/m","",$thing));
// echo "parsetable suppression [| |]: \$thing = $thing<br>";
//recuperation de chaque ligne
$rows = preg_split("/$/m",$thing,-1,PREG_SPLIT_NO_EMPTY);
// echo "parsetable preg_split:";var_dump($rows);echo "<br>";
//analyse de chaque ligne
foreach ($rows as $row){
$table .= parsetablerow($row);
}
$table.= "</table>";
return $table;
}
//parse la definition d'une ligne
function parsetablerow($row)
{
$rowattr = "";
$row = trim($row);
// echo "parsetablerow debut : \$row = $row<br>";
//detection des attributs de ligne => si la ligne ne commence pas par | alors attribut
if (!preg_match("/^\|/",$row,$match)){
preg_match("/^!([^\|]*)!\|/",$row,$match);
$rowattr = $match[1];
// echo "\$rowattr = $rowattr<br>";
$row = trim(preg_replace("/^!([^\|]*)!/","",$row));
}
$result .= " <tr $rowattr>\n";
$row = trim(preg_replace("/^\|/","",trim($row)));
$row = trim(preg_replace("/\|$/","",trim($row)));
// echo "parsetablerow sans attribut : \$row = $row<br>";
//recuperation de chaque cellule
$cells = explode("|",$row); //nb : seule les indices impaire sont significatif
// echo "parsetablerow preg_split \$cells:";var_dump($cells);echo "<br>";
$i=0;
foreach ($cells as $cell){
// if ($i % 2){
// echo "\$cell = $cell<br>";
$result .= parsetablecell($cell);
// }
$i++;
}
$result .= " </tr>\n";
return $result;
}
//parse la definition d'une cellule
function parsetablecell($cell)
{
global $wiki;
$cellattr = "";
if (preg_match("/^!(.*)!/",$cell,$match)){
$cellattr = $match[1];
}
$cell = preg_replace("/^!(.*)!/","",$cell);
//si espace au debut => align=right
//si espace a la fin => align=left
//si espace debut et fin => align=center
if (preg_match("/^\s(.*)/",$cell)){
$align="right";
}
if (preg_match("/^(.*)\s$/",$cell)){
$align="left";
}
if (preg_match("/^\s(.*)\s$/",$cell)){
$align="center";
}
if ($align) $cellattr .= " align=\"$align\"";
// echo "\$this->classname = ".get_class($wiki)."<br>";
return " <td $cellattr>".$wiki->Format($cell)."</td>\n";
}
 
 
 
function wakka2callbacktableaux($things)
{
$thing = $things[1];
 
global $wiki;
if (preg_match("/^\[\|(.*)\|\]/s", $thing)) {
$thing=preg_replace("/<br \/>/","", $thing);
return parsetable($thing);
}
// if we reach this point, it must have been an accident.
return $thing;
}
}
 
$plugin_output_new = preg_replace_callback("/(^\[\|.*?\|\])/ms", "wakka2callbacktableaux", $plugin_output_new);
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/tableau/desc.xml
New file
0,0 → 1,6
<?xml version="1.0" encoding="ISO-8859-1"?>
<plugin name="wkattach" version="0.1" active="1">
<author>GardFieldFr</author>
<label>Tableau</label>
<desc>Permet de créer des tableaux dans Wikini</desc>
</plugin>
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/tableau/index.php
New file
0,0 → 1,8
<?php
// Vérification de sécurité
if (!defined("TOOLS_MANAGER"))
{
die ("acc&egrave;s direct interdit");
}
 
?>
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/navigation/wiki.php
New file
0,0 → 1,10
<?php
 
// Partie publique
 
if (!defined("WIKINI_VERSION"))
{
die ("acc&egrave;s direct interdit");
}
$wakkaConfig['menu_page'] = 'PageMenu';
?>
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/navigation/desc.xml
New file
0,0 → 1,6
<?xml version="1.0" encoding="ISO-8859-1"?>
<plugin name="wknavigation" version="0.1" active="1">
<author>Philippe Drouot</author>
<label>Navigation</label>
<desc>Menu de navigation pour Wikini</desc>
</plugin>
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/navigation/index.php
New file
0,0 → 1,30
<?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>
'
 
 
);
 
?>
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/navigation/actions/header__.php
New file
0,0 → 1,14
<?php
$menu_page=$this->config["menu_page"];
if (isset($menu_page) and ($menu_page!=""))
{
// Ajout Menu de Navigation
echo '<tr><td class="menu_column">';
$wikiMenu = $this;
$wikiMenu->tag=$menu_page;
$wikiMenu->SetPage($wikiMenu->LoadPage($wikiMenu->tag));
echo $wikiMenu->Format($wikiMenu->page["body"], "wakka");
echo '</td>';
echo '<td class="body_column">';
}
?>
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/navigation/actions/footer__.php
New file
0,0 → 1,6
<?
$menu_page=$this->config["menu_page"];
if (isset($menu_page) and ($menu_page!="")) {
$plugin_output_new=preg_replace ('/<\/body>/','</td></tr></table></div></body>', $plugin_output_new);
}
?>
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/toolsmng/icon.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/toolsmng/icon.png
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/toolsmng/desc.xml
New file
0,0 → 1,7
<?xml version="1.0" encoding="ISO-8859-1"?>
<plugin name="Plugins Manager" version="0.1" active="1">
<author>David Delon (auteur original : Olivier Meunier)</author>
<label>Gestionnaire d'extension</label>
<desc>Gestionnaire d'extensions pour Wikini.</desc>
</plugin>
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/toolsmng/index.php
New file
0,0 → 1,144
<?php
 
// Vérification de sécurité
if (!defined("TOOLS_MANAGER"))
{
die ("acc&egrave;s direct interdit");
}
 
 
$err = '';
$tool_url = '';
 
# 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);
 
# Installation d'un thème
if ($is_writable && !empty($_GET['tool_url']))
{
$tool_url = $_GET['tool_url'];
$parsed_url = parse_url($tool_url);
if (empty($parsed_url['scheme']) || !preg_match('/^http|ftp$/',$parsed_url['scheme'])
|| empty($parsed_url['host']) || empty($parsed_url['path']))
{
$err = __('URL is not valid.');
}
else
{
if (($err = $plugins->install($tool_url)) === true)
{
header('Location: tools.php?p=toolsmng');
exit;
}
}
}
 
# Changement de status d'un plugin
$switch = (!empty($_GET['switch'])) ? $_GET['switch'] : '';
 
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;
}
 
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
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>');
?>
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/hello/wiki.php
New file
0,0 → 1,20
<?php
// Partie publique
 
if (!defined("WIKINI_VERSION"))
{
die ("acc&egrave;s direct interdit");
}
 
// Surcharge methode GetUserName de la class Wiki
 
$wikiClasses [] = 'Hello';
$wikiClassesContent [] = '
 
function GetUserName() {
if ($user = $this->GetUser()) $name = $user["name"];
else if (!$name = gethostbyaddr($_SERVER["REMOTE_ADDR"])) $name = $_SERVER["REMOTE_ADDR"];
return "Bonjour ".$name;
}
 
';
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/hello/desc.xml
New file
0,0 → 1,6
<?xml version="1.0" encoding="ISO-8859-1"?>
<plugin name="wkhello" version="0.1" active="0">
<author>David Delon</author>
<label>Hello</label>
<desc>Extension exemple pour Wikini</desc>
</plugin>
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/hello/index.php
New file
0,0 → 1,34
<?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"
);
}
 
 
?>
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/hello/actions/__hello.php
New file
0,0 → 1,17
<?php
/*
__hello.php
Appellé AVANT l'execution de l'action hello
*/
 
// Vérification de sécurité
if (!defined("WIKINI_VERSION"))
{
die ("acc&egrave;s direct interdit");
}
 
 
 
echo $this->Format("Je vais dire bonjour !");
 
?>
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/hello/actions/hello__.php
New file
0,0 → 1,17
<?php
/*
hello__.php
Appellé APRES l'execution de l'action hello
*/
 
 
// Vérification de sécurité
if (!defined("WIKINI_VERSION"))
{
die ("acc&egrave;s direct interdit");
}
 
 
echo $this->Format("J'ai dit bonjour !");
 
?>
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/hello/actions/hello.php
New file
0,0 → 1,17
<?php
/*
hello.php
Nouvelle action 'hello' ou remplace l'action hello si déjà présente
*/
 
// Vérification de sécurité
if (!defined("WIKINI_VERSION"))
{
die ("acc&egrave;s direct interdit");
}
 
 
 
echo $this->Format("Bonjour !");
 
?>
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/hello/handlers/page/__hello.php
New file
0,0 → 1,19
<?php
/*
__hello.php
Appelle AVANT le handler 'hello'
*/
 
 
// Vérification de sécurité
if (!defined("WIKINI_VERSION"))
{
die ("acc&egrave;s direct interdit");
}
 
echo $this->Header();
echo $this->Format("===== Je vais dire Bonjour !=====");
 
 
?>
<div class="page">
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/hello/handlers/page/hello__.php
New file
0,0 → 1,21
</div>
<?php
/*
hello__.php
Appelle APRES le handler 'hello'
*/
 
 
// Vérification de sécurité
if (!defined("WIKINI_VERSION"))
{
die ("acc&egrave;s direct interdit");
}
 
echo $this->Format("===== J'ai dit Bonjour !=====");
 
 
echo $this->Footer();
 
 
?>
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/hello/handlers/page/hello.php
New file
0,0 → 1,30
<?php
/*
hello.php
Nouvel handler 'hello' ou remplace le handler hello si déjà présent
*/
 
 
// Vérification de sécurité
if (!defined("WIKINI_VERSION"))
{
die ("acc&egrave;s direct interdit");
}
 
 
echo $this->Format("===== Bonjour !=====");
 
if ($this->HasAccess("read"))
{
if (!$this->page)
{
return;
}
else
{
echo $this->Format($this->page["body"]);
}
}
 
 
?>
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/prepend.php
New file
0,0 → 1,130
<?php
 
// Vérification de sécurité
if (!defined("WIKINI_VERSION"))
{
die ("acc&egrave;s direct interdit");
}
 
 
// Meme nom : remplace
// _Meme nom : avant
// Meme nom : _apres
 
 
require_once('libs/class.plugins.php');
 
 
Class WikiTools extends Wiki {
function Format($text, $formatter = "wakka") {
return $this->IncludeBuffered($formatter.".php", "<i>Impossible de trouver le formateur \"$formatter\"</i>", compact("text"),$this->config['formatter_path']);
}
function IncludeBuffered($filename, $notfoundText = "", $vars = "", $path = "") {
if ($path) $dirs = explode(":", $path);
else $dirs = array("");
$included['before']=array();
$included['new']=array();
$included['after']=array();
foreach($dirs as $dir) {
if ($dir) $dir .= "/";
$fullfilename = $dir.$filename;
if (strstr($filename,'page/')) {
list($file,$extension) = explode("page/", $filename);
$beforefullfilename = $dir.$file.'page/__'.$extension;
}
else {
$beforefullfilename = $dir.'__'.$filename;
}
list($file,$extension) = explode(".", $filename);
$afterfullfilename = $dir.$file.'__.'.$extension;
if (file_exists($beforefullfilename)) {
$included['before'][]=$beforefullfilename;
}
if (file_exists($fullfilename)) {
$included['new'][]=$fullfilename;
}
if (file_exists($afterfullfilename)) {
$included['after'][]=$afterfullfilename;
}
}
 
$plugin_output_before='';
$plugin_output_new='';
$plugin_output_after='';
$found=0;
if (is_array($vars)) extract($vars);
foreach ($included['before'] as $before) {
$found=1;
ob_start();
include($before);
$plugin_output_before.= ob_get_contents();
ob_end_clean();
}
foreach ($included['new'] as $new) {
$found=1;
ob_start();
require($new);
$plugin_output_new = ob_get_contents();
ob_end_clean();
break;
}
foreach ($included['after'] as $after) {
$found=1;
ob_start();
include($after);
$plugin_output_after.= ob_get_contents();
ob_end_clean();
}
if ($found) return $plugin_output_before.$plugin_output_new.$plugin_output_after;
if ($notfoundText) return $notfoundText;
else return false;
}
}
 
$plugins_root = 'tools/';
 
$objPlugins = new plugins($plugins_root);
$objPlugins->getPlugins(true);
$plugins_list = $objPlugins->getPluginsList();
 
$wakkaConfig['formatter_path']='formatters';
$wikiClasses [] = 'WikiTools';
$wikiClassesContent [] = '';
 
foreach ($plugins_list as $k => $v) {
if (file_exists($plugins_root.$k.'/wiki.php')) {
include($plugins_root.$k.'/wiki.php');
}
if (file_exists($plugins_root.$k.'/actions')) {
$wakkaConfig['action_path']=$plugins_root.$k.'/actions/'.':'.$wakkaConfig['action_path'];
}
if (file_exists($plugins_root.$k.'/handlers')) {
$wakkaConfig['handler_path']=$plugins_root.$k.'/handlers/'.':'.$wakkaConfig['handler_path'];
}
if (file_exists($plugins_root.$k.'/formatters')) {
$wakkaConfig['formatter_path']=$plugins_root.$k.'/formatters/'.':'.$wakkaConfig['formatter_path'];
}
}
 
for ($iw=0;$iw<count($wikiClasses);$iw++) {
if ($wikiClasses[$iw]!='WikiTools') {
eval('Class '. $wikiClasses[$iw] .' extends '. $wikiClasses[$iw-1] . ' { '.$wikiClassesContent[$iw].' }; ');
}
}
 
//$wiki = new WikiTools($wakkaConfig);
eval ('$wiki = new '.$wikiClasses[count($wikiClasses)-1]. '($wakkaConfig);');
 
?>
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/attach/desc.xml
New file
0,0 → 1,6
<?xml version="1.0" encoding="ISO-8859-1"?>
<plugin name="wkattach" version="0.1" active="1">
<author>GarfieldFr</author>
<label>Attach</label>
<desc>Action permettant de joindre un fichier a Wikini</desc>
</plugin>
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/attach/index.php
New file
0,0 → 1,12
<?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");
}
 
?>
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/attach/actions/attach.php
New file
0,0 → 1,121
<?php
/*
attach.php
Code original de ce fichier : Eric FELDSTEIN
Copyright (c) 2002, Hendrik Mans <hendrik@mans.de>
Copyright 2002, 2003 David DELON
Copyright 2002, 2003 Charles NEPOTE
Copyright 2003,2004 Eric FELDSTEIN
Copyright 2003 Jean-Pascal MILCENT
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The name of the author may not be used to endorse or promote products
derived from this software without specific prior written permission.
 
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/******************************************************************************
* DOCUMENTATION
*******************************************************************************
RESUME
L'action {{attach}} permet de lier un fichier à une page, d'uploader ce fichier
et de downloader ce fichier. Si le fichier est une image, elle est affichée
dans la page. Lorsque le fichier est sur le serveur, il est possible de faire
une mise à jour de celui-ci.
 
PARAMETRES DE L'ACTION
L'action {{attach}} prend les paramètres suivants :
- file ou attachfile: nom du fichier tel qu'il sera sur le serveur. Les
espaces sont remplacé par des "_". (OBLIGATOIRE)
- desc ou attachdesc: description du fichier. C'est le texte qui sera affiché
comme lien vers le fichier ou dans l'attribut alt de la balise <img>. Ce
paramètre est obligatoire pour les images pour être conforme au XHTML.
- delete ou attachdelete: Si ce paramètre est non vide alors le fichier sera
effacé sur le serveur.
- link ou attachlink: URL de lien pour une image sensible. le lien peut être
un nom de page WikiNi, un lien interwiki ou une adresse http
- class: indique le nom de la ou les classes de style à utiliser pour afficher
l'image. les noms des classes sont séparés par un espace.
 
EXEMPLES
- Attacher un fichier archive:
{{attach file="archive.zip"}}
- Attacher un fichier archive avec une description
{{attach file="archive.zip" desc="Code source de l'application"}}
- Supprimer un fichier:
{{attach file="archive.zip" delete="y"}}
- Afficher une image:
{{attach file="image.png" desc="voici une image"}}
- Afficher une image sensible:
{{attach file="image.png" desc="voici une image" link="PagePrincipale"}}
{{attach file="image.png" desc="voici une image" link="WikiNi:PagePrincipale"}}
{{attach file="image.png" desc="voici une image" link="http://www.wikini.net"}}
- Afficher une image collé sur le bord droit et sans contour:
{{attach file="image.png" desc="voici une image" class="right noborder"}}
 
INSTALLATION
1) Copiez le fichier attach.php dans le répertoire des actions (/actions)
2) Copiez le fichier attach.class.php dans le répertoire des actions (/actions)
3) Copiez le fichier attachfm.php dans le repertoire des actions (/actions)
4) Copiez le fichier filamanager.php dans le répertoire des handlers (/handlers/page)
5) Copiez le fichier upload.php dans le répertoire des handlers (/handlers/page)
6) Copiez le fichier download.php dans le répertoire des handlers (/handlers/page)
7) Créez le répertoire racine des uploads sur le site du wiki. Si le SAFE_MODE
de PHP est activé, vous devez créer vous même ce répertoire et autoriser
l'écriture dans ce répertoire pour l'utilisateur et le groupe.
8) Ouvrez le fichier wakka.config.php et ajoutez la configuration de l'action.
Tous les paramètres de configuration ont une valeur par défaut.
Le configuration par défaut est:
 
$wakkaConfig["attach_config"] = array(
"upload_path" => 'files', //repertoire racine des uploads
"ext_images" => 'gif|jpeg|png|jpg', //extension des fichiers images
"ext_script" => 'php|php3|asp|asx|vb|vbs|js', //extension des script(non utilisé)
"update_symbole" => '*', //symbole pour faire un update du fichier
"max_file_size" => 1024*2000, //taille maximum du fichier en octer (2M par défaut)
"fmDelete_symbole" => 'Supr', //symbole a afficher pour le lien "supprimer" dans le gestionnaire de fichier
"fmRestore_symbole" => 'Rest', //symbole a afficher pour le lien "restaurer" dans le gestionnaire de fichier
"fmTrash_symbole" => 'Poubelle') //symbole a afficher pour le lien "Poubelle" dans le gestionnaire de fichier
 
9) Ajoutez les classes de style au fichier wakka.css. Exemple de style :
.attach_margin05em { margin: 0.5em;}
.attach_margin1em { margin: 1em;}
.attach_left {float: left;}
.attach_right {float: right;}
.attach_noborder {border-width: 0px;}
.attach_vmiddle {vertical-align: text-bottom;}
 
10)Pour configurer l'aspect du gestionnnaire de fichier utiliser les classes de style .tableFM
tableFMCol1 et tableFMCol2
Exemple :
.tableFM {border: thin solid Black; width: 100%; }
.tableFM THEAD { background-color: Silver; font-weight: bold; text-align: center; }
.tableFM TFOOT { background-color: Silver; font-weight: bold; text-align: left; }
.tableFM TBODY TR { text-align: center; }
.tableFMCol1 { background-color: Aqua; }
.tableFMCol2 { background-color: Yellow; }
*******************************************************************************/
 
if (!class_exists('attach')){
include('tools/attach/actions/attach.class.php');
}
$att = new attach($this);
$att->doAttach();
unset($att);
?>
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/attach/actions/attachfm.php
New file
0,0 → 1,38
<?php
/*
attachfm.php
Code original de ce fichier : Eric FELDSTEIN
Copyright (c) 2002, Hendrik Mans <hendrik@mans.de>
Copyright 2002, 2003 David DELON
Copyright 2002, 2003 Charles NEPOTE
Copyright 2003,2004 Eric FELDSTEIN
Copyright 2003 Jean-Pascal MILCENT
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The name of the author may not be used to endorse or promote products
derived from this software without specific prior written permission.
 
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/*
 
*/
$url = $this->href('filemanager',$this->GetPageTag());
echo '<a href="'.$url.'"><span class="attachfm"><span>Gestion des fichiers attachés</span></span></a>';
?>
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/attach/actions/attach.class.php
New file
0,0 → 1,649
<?php
/*
attach.class.php
Code original de ce fichier : Eric FELDSTEIN
Copyright (c) 2002, Hendrik Mans <hendrik@mans.de>
Copyright 2002, 2003 David DELON
Copyright 2002, 2003 Charles NEPOTE
Copyright 2003,2004 Eric FELDSTEIN
Copyright 2003 Jean-Pascal MILCENT
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The name of the author may not be used to endorse or promote products
derived from this software without specific prior written permission.
 
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
# Classe de gestion de l'action {{attach}}
# voir actions/attach.php ppour la documentation
# copyrigth Eric Feldstein 2003-2004
 
class attach {
var $wiki = ''; //objet wiki courant
var $attachConfig = array(); //configuration de l'action
var $file = ''; //nom du fichier
var $desc = ''; //description du fichier
var $link = ''; //url de lien (image sensible)
var $isPicture = 0; //indique si c'est une image
var $isAudio = 0; //indique si c'est un fichier audio
var $classes = ''; //classe pour afficher une image
var $attachErr = ''; //message d'erreur
var $pageId = 0; //identifiant de la page
var $isSafeMode = false; //indicateur du safe mode de PHP
/**
* Constructeur. Met les valeurs par defaut aux paramètres de configuration
*/
function attach(&$wiki){
$this->wiki = $wiki;
$this->attachConfig = $this->wiki->GetConfigValue("attach_config");
if (empty($this->attachConfig["ext_images"])) $this->attachConfig["ext_images"] = "gif|jpeg|png|jpg";
if (empty($this->attachConfig["ext_audio"])) $this->attachConfig["ext_audio"] = "mp3";
if (empty($this->attachConfig["ext_script"])) $this->attachConfig["ext_script"] = "php|php3|asp|asx|vb|vbs|js";
if (empty($this->attachConfig['upload_path'])) $this->attachConfig['upload_path'] = 'files';
if (empty($this->attachConfig['update_symbole'])) $this->attachConfig['update_symbole'] = '*';
if (empty($this->attachConfig['max_file_size'])) $this->attachConfig['max_file_size'] = 1024*2000; //2000ko max
if (empty($this->attachConfig['fmDelete_symbole'])) $this->attachConfig['fmDelete_symbole'] = 'Supr';
if (empty($this->attachConfig['fmRestore_symbole'])) $this->attachConfig['fmRestore_symbole'] = 'Rest';
if (empty($this->attachConfig['fmTrash_symbole'])) $this->attachConfig['fmTrash_symbole'] = 'Poubelle';
$this->isSafeMode = ini_get("safe_mode");
}
/******************************************************************************
* FONCTIONS UTILES
*******************************************************************************/
/**
* Création d'une suite de répertoires récursivement
*/
function mkdir_recursif ($dir) {
if (strlen($dir) == 0) return 0;
if (is_dir($dir)) return 1;
elseif (dirname($dir) == $dir) return 1;
return ($this->mkdir_recursif(dirname($dir)) and mkdir($dir,0755));
}
/**
* Renvois le chemin du script
*/
function GetScriptPath () {
if (preg_match("/.(php)$/i",$_SERVER["PHP_SELF"])){
$a = explode('/',$_SERVER["PHP_SELF"]);
$a[count($a)-1] = '';
$path = implode('/',$a);
}else{
$path = $_SERVER["PHP_SELF"];
}
return !empty($_SERVER["HTTP_HOST"])? 'http://'.$_SERVER["HTTP_HOST"].$path : 'http://'.$_SERVER["SERVER_NAME"].$path ;
}
/**
* Calcul le repertoire d'upload en fonction du safe_mode
*/
function GetUploadPath(){
if ($this->isSafeMode) {
$path = $this->attachConfig['upload_path'];
}else{
$path = $this->attachConfig['upload_path'].'/'.$this->wiki->GetPageTag();
if (! is_dir($path)) $this->mkdir_recursif($path);
}
return $path;
}
/**
* Calcule le nom complet du fichier attaché en fonction du safe_mode, du nom et de la date de
* revision la page courante.
* Le nom du fichier "mon fichier.ext" attache à la page "LaPageWiki"sera :
* mon_fichier_datepage_update.ext
* update : date de derniere mise a jour du fichier
* datepage : date de revision de la page à laquelle le fichier a ete lié/mis a jour
* Si le fichier n'est pas une image un '_' est ajoute : mon_fichier_datepage_update.ext_
* Selon la valeur de safe_mode :
* safe_mode = on : LaPageWiki_mon_fichier_datepage_update.ext_
* safe_mode = off: LaPageWiki/mon_fichier_datepage_update.ext_ avec "LaPageWiki" un sous-repertoire du répertoire upload
*/
function GetFullFilename($newName = false){
$pagedate = $this->convertDate($this->wiki->page['time']);
//decompose le nom du fichier en nom+extension
if (preg_match('`^(.*)\.(.*)$`', str_replace(' ','_',$this->file), $match)){
list(,$file['name'],$file['ext'])=$match;
if(!$this->isPicture() && !$this->isAudio()) $file['ext'] .= '_';
}else{
return false;
}
//recuperation du chemin d'upload
$path = $this->GetUploadPath($this->isSafeMode);
//generation du nom ou recherche de fichier ?
if ($newName){
$full_file_name = $file['name'].'_'.$pagedate.'_'.$this->getDate().'.'.$file['ext'];
if($this->isSafeMode){
$full_file_name = $path.'/'.$this->wiki->GetPageTag().'_'.$full_file_name;
}else{
$full_file_name = $path.'/'.$full_file_name;
}
}else{
//recherche du fichier
if($this->isSafeMode){
//TODO Recherche dans le cas ou safe_mode=on
$searchPattern = '`^'.$this->wiki->GetPageTag().'_'.$file['name'].'_\d{14}_\d{14}\.'.$file['ext'].'$`';
}else{
$searchPattern = '`^'.$file['name'].'_\d{14}_\d{14}\.'.$file['ext'].'$`';
}
$files = $this->searchFiles($searchPattern,$path);
 
$unedate = 0;
foreach ($files as $file){
//recherche du fichier qui une datepage <= a la date de la page
if($file['datepage']<=$pagedate){
//puis qui a une dateupload la plus grande
if ($file['dateupload']>$unedate){
$theFile = $file;
$unedate = $file['dateupload'];
}
}
}
if (is_array($theFile)){
$full_file_name = $path.'/'.$theFile['realname'];
}
}
return $full_file_name;
}
/**
* Test si le fichier est une image
*/
function isPicture(){
return preg_match("/.(".$this->attachConfig["ext_images"].")$/i",$this->file)==1;
}
/**
* Test si le fichier est un fichier audio
*/
function isAudio(){
return preg_match("/.(".$this->attachConfig["ext_audio"].")$/i",$this->file)==1;
}
/**
* Renvoie la date courante au format utilise par les fichiers
*/
function getDate(){
return date('YmdHis');
}
/**
* convertie une date yyyy-mm-dd hh:mm:ss au format yyyymmddhhmmss
*/
function convertDate($date){
$date = str_replace(' ','', $date);
$date = str_replace(':','', $date);
return str_replace('-','', $date);
}
/**
* Parse une date au format yyyymmddhhmmss et renvoie un tableau assiatif
*/
function parseDate($sDate){
$pattern = '`^(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})$`';
$res = '';
if (preg_match($pattern, $sDate, $m)){
//list(,$res['year'],$res['month'],$res['day'],$res['hour'],$res['min'],$res['sec'])=$m;
$res = $m[1].'-'.$m[2].'-'.$m[3].' '.$m[4].':'.$m[5].':'.$m[6];
}
return ($res?$res:false);
}
/**
* Decode un nom long de fichier
*/
function decodeLongFilename($filename){
$afile = array();
$afile['realname'] = basename($filename);
$afile['size'] = filesize($filename);
$afile['path'] = dirname($filename);
if(preg_match('`^(.*)_(\d{14})_(\d{14})\.(.*)(trash\d{14})?$`', $afile['realname'], $m)){
$afile['name'] = $m[1];
//suppression du nom de la page si safe_mode=on
if ($this->isSafeMode){
$afile['name'] = preg_replace('`^('.$this->wiki->tag.')_(.*)$`i', '$2', $afile['name']);
}
$afile['datepage'] = $m[2];
$afile['dateupload'] = $m[3];
$afile['trashdate'] = preg_replace('`(.*)trash(\d{14})`', '$2', $m[4]);
//suppression de trashxxxxxxxxxxxxxx eventuel
$afile['ext'] = preg_replace('`^(.*)(trash\d{14})$`', '$1', $m[4]);
$afile['ext'] = rtrim($afile['ext'],'_');
//$afile['ext'] = rtrim($m[4],'_');
}
return $afile;
}
/**
* Renvois un tableau des fichiers correspondant au pattern. Chaque element du tableau est un
* tableau associatif contenant les informations sur le fichier
*/
function searchFiles($filepattern,$start_dir){
$files_matched = array();
$start_dir = rtrim($start_dir,'\/');
$fh = opendir($start_dir);
while (($file = readdir($fh)) !== false) {
if (strcmp($file, '.')==0 || strcmp($file, '..')==0 || is_dir($file)) continue;
if (preg_match($filepattern, $file)){
$files_matched[] = $this->decodeLongFilename($start_dir.'/'.$file);
}
}
return $files_matched;
}
/******************************************************************************
* FONCTIONS D'ATTACHEMENTS
*******************************************************************************/
/**
* Test les paramètres passé à l'action
*/
function CheckParams(){
//recuperation des parametres necessaire
$this->file = $this->wiki->GetParameter("attachfile");
if (empty($this->file)) $this->file = $this->wiki->GetParameter("file");
$this->desc = $this->wiki->GetParameter("attachdesc");
if (empty($this->desc)) $this->desc = $this->wiki->GetParameter("desc");
$this->link = $this->wiki->GetParameter("attachlink");//url de lien - uniquement si c'est une image
if (empty($this->link)) $this->link = $this->wiki->GetParameter("link");
//test de validité des parametres
if (empty($this->file)){
$this->attachErr = $this->wiki->Format("//action attach : paramètre **file** manquant//---");
}
if ($this->isPicture() && empty($this->desc)){
$this->attachErr .= $this->wiki->Format("//action attach : paramètre **desc** obligatoire pour une image//---");
}
if ($this->wiki->GetParameter("class")) {
$array_classes = explode(" ", $this->wiki->GetParameter("class"));
foreach ($array_classes as $c) { $this->classes = $this->classes . "attach_" . $c . " "; }
$this->classes = trim($this->classes);
}
}
/**
* Affiche le fichier lié comme une image
*/
function showAsImage($fullFilename){
//c'est une image : balise <IMG..../>
$img = "<img src=\"".$this->GetScriptPath().$fullFilename."\" ".
"alt=\"".$this->desc.($this->link?"\nLien vers: $this->link":"")."\" />";
//test si c'est une image sensible
if(!empty($this->link)){
//c'est une image sensible
//test si le lien est un lien interwiki
if (preg_match("/^([A-Z][A-Z,a-z]+)[:]([A-Z,a-z,0-9]*)$/s", $this->link, $matches))
{ //modifie $link pour être un lien vers un autre wiki
$this->link = $this->wiki->GetInterWikiUrl($matches[1], $matches[2]);
}
//calcule du lien
$output = $this->wiki->Format('[['.$this->link." $this->file]]");
$output = eregi_replace(">$this->file<",">$img<",$output);//insertion du tag <img...> dans le lien
}else{
//ce n'est pas une image sensible
$output = $img;
}
$output = ($this->classes?"<span class=\"$this->classes\">$output</span>":$output);
echo $output;
$this->showUpdateLink();
}
/**
* Affiche le fichier lié comme un lien
*/
function showAsLink($fullFilename){
$url = $this->wiki->href("download",$this->wiki->GetPageTag(),"file=$this->file");
echo '<a href="'.$url.'">'.($this->desc?$this->desc:$this->file)."</a>";
$this->showUpdateLink();
}
// Affiche le fichier liee comme un fichier audio
function showAsAudio($fullFilename){
$output = "<object type=\"application/x-shockwave-flash\" data=\"tools/player/dewplayer.swf?son=$fullFilename&amp;bgcolor=FFFFFF\" width=\"200\"
height=\"20\"><param name=\"movie\" value=\"tools/player/dewplayer.swf?son=$fullFilename&amp;bgcolor=FFFFFF\"/></object>";
$output .= "<br></br>";
$output .="[<a href=\"$fullFilename\">mp3</a>]";
echo $output;
$this->showUpdateLink();
}
/**
* Affiche le lien de mise à jour
*/
function showUpdateLink(){
echo " <a href=\"".
$this->wiki->href("upload",$this->wiki->GetPageTag(),"file=$this->file").
"\" title='Mise à jour'>".$this->attachConfig['update_symbole']."</a>";
}
/**
* Affiche un liens comme un fichier inexistant
*/
function showFileNotExits(){
echo $this->file."<a href=\"".$this->wiki->href("upload",$this->wiki->GetPageTag(),"file=$this->file")."\">?</a>";
}
/**
* Affiche l'attachement
*/
function doAttach(){
$this->CheckParams();
if ($this->attachErr) {
echo $this->attachErr;
return;
}
$fullFilename = $this->GetFullFilename();
//test d'existance du fichier
if((!file_exists($fullFilename))||($fullFilename=='')){
$this->showFileNotExits();
return;
}
//le fichier existe : affichage en fonction du type
if($this->isPicture()){
$this->showAsImage($fullFilename);
}else{
if($this->isAudio()){
$this->showAsAudio($fullFilename);
}
else {
$this->showAsLink($fullFilename);
}
}
}
/******************************************************************************
* FONTIONS D'UPLOAD DE FICHIERS
*******************************************************************************/
/**
* Traitement des uploads
*/
function doUpload(){
$HasAccessWrite=$this->wiki->HasAccess("write");
if ($HasAccessWrite){
switch ($_SERVER["REQUEST_METHOD"]) {
case 'GET' : $this->showUploadForm(); break;
case 'POST': $this->performUpload(); break;
default : echo $this->wiki->Format("//Methode de requete invalide//---");
}
}else{
echo $this->wiki->Format("//Vous n'avez pas l'accès en écriture à cette page//---");
echo $this->wiki->Format("Retour à la page ".$this->wiki->GetPageTag());
}
}
/**
* Formulaire d'upload
*/
function showUploadForm(){
echo $this->wiki->Format("====Formulaire d'envois de fichier====\n---");
$this->file = $_GET['file'];
echo $this->wiki->Format("**Envois du fichier $this->file :**\n")
."<form enctype=\"multipart/form-data\" name=\"frmUpload\" method=\"POST\" action=\"".$_SERVER["PHP_SELF"]."\">\n"
." <input type=\"hidden\" name=\"wiki\" value=\"".$this->wiki->GetPageTag()."/upload\" />\n"
." <input TYPE=\"hidden\" name=\"MAX_FILE_SIZE\" value=\"".$this->attachConfig['max_file_size']."\" />\n"
." <input type=\"hidden\" name=\"file\" value=\"$this->file\" />\n"
." <input type=\"file\" name=\"upFile\" size=\"50\" /><br />\n"
." <input type=\"submit\" value=\"Envoyer\" />\n"
."</form>\n";
}
/**
* Execute l'upload
*/
function performUpload(){
$this->file = $_POST['file'];
 
$destFile = $this->GetFullFilename(true); //nom du fichier destination
//test de la taille du fichier recu
if($_FILES['upFile']['error']==0){
$size = filesize($_FILES['upFile']['tmp_name']);
if ($size > $this->attachConfig['max_file_size']){
$_FILES['upFile']['error']=2;
}
}
switch ($_FILES['upFile']['error']){
case 0:
$srcFile = $_FILES['upFile']['tmp_name'];
if (move_uploaded_file($srcFile,$destFile)){
chmod($destFile,0644);
header("Location: ".$this->wiki->href("",$this->wiki->GetPageTag(),""));
}else{
echo $this->wiki->Format("//Erreur lors du déplacement du fichier temporaire//---");
}
break;
case 1:
echo $this->wiki->Format("//Le fichier téléchargé excède la taille de upload_max_filesize, configuré dans le php.ini.//---");
break;
case 2:
echo $this->wiki->Format("//Le fichier téléchargé excède la taille de MAX_FILE_SIZE, qui a été spécifiée dans le formulaire HTML.//---");
break;
case 3:
echo $this->wiki->Format("//Le fichier n'a été que partiellement téléchargé.//---");
break;
case 4:
echo $this->wiki->Format("//Aucun fichier n'a été téléchargé.//---");
break;
}
echo $this->wiki->Format("Retour à la page ".$this->wiki->GetPageTag());
}
/******************************************************************************
* FUNCTIONS DE DOWNLOAD DE FICHIERS
*******************************************************************************/
function doDownload(){
$this->file = $_GET['file'];
$fullFilename = $this->GetUploadPath().'/'.$this->file;
if(!file_exists($fullFilename)){
$fullFilename = $this->GetFullFilename();
$dlFilename = $this->file;
$size = filesize($fullFilename);
}else{
$file = $this->decodeLongFilename($fullFilename);
$size = $file['size'];
$dlFilename =$file['name'].'.'.$file['ext'];
}
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Content-type: application/force-download");
header('Pragma: public');
header("Pragma: no-cache");// HTTP/1.0
header('Last-Modified: '.gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate'); // HTTP/1.1
header('Cache-Control: pre-check=0, post-check=0, max-age=0'); // HTTP/1.1
header('Content-Transfer-Encoding: none');
header('Content-Type: application/octet-stream; name="' . $dlFilename . '"'); //This should work for the rest
header('Content-Type: application/octetstream; name="' . $dlFilename . '"'); //This should work for IE & Opera
header('Content-Type: application/download; name="' . $dlFilename . '"'); //This should work for IE & Opera
header('Content-Disposition: attachment; filename="'.$dlFilename.'"');
header("Content-Description: File Transfer");
header("Content-length: $size".'bytes');
readfile($fullFilename);
}
/******************************************************************************
* FONTIONS DU FILEMANAGER
*******************************************************************************/
function doFileManager(){
$do = $_GET['do']?$_GET['do']:'';
switch ($do){
case 'restore' :
$this->fmRestore();
$this->fmShow(true);
break;
case 'erase' :
$this->fmErase();
$this->fmShow(true);
break;
case 'del' :
$this->fmDelete();
$this->fmShow();
break;
case 'trash' :
$this->fmShow(true); break;
case 'emptytrash' :
$this->fmEmptyTrash(); //pas de break car apres un emptytrash => retour au gestionnaire
default :
$this->fmShow();
}
}
/**
* Affiche la liste des fichiers
*/
function fmShow($trash=false){
$fmTitlePage = $this->wiki->Format("====Gestion des fichiers attachés à la page ".$this->wiki->tag."====\n---");
if($trash){
//Avertissement
$fmTitlePage .= '<div class="prev_alert">Les fichiers effacés sur cette page le sont définitivement</div>';
//Pied du tableau
$url = $this->wiki->Link($this->wiki->tag,'filemanager','Gestion des fichiers');
$fmFootTable = ' <tfoot>'."\n".
' <tr>'."\n".
' <td colspan="6">'.$url.'</td>'."\n";
$url = $this->wiki->Link($this->wiki->tag,'filemanager&do=emptytrash','Vider la poubelle');
$fmFootTable.= ' <td>'.$url.'</td>'."\n".
' </tr>'."\n".
' </tfoot>'."\n";
}else{
//pied du tableau
$url = '<a href="'.$this->wiki->href('filemanager',$this->wiki->GetPageTag(),'do=trash').'" title="Poubelle">'.$this->attachConfig['fmTrash_symbole']."</a>";
$fmFootTable = ' <tfoot>'."\n".
' <tr>'."\n".
' <td colspan="6">'.$url.'</td>'."\n".
' </tr>'."\n".
' </tfoot>'."\n";
}
//entete du tableau
$fmHeadTable = ' <thead>'."\n".
' <tr>'."\n".
' <td>&nbsp;</td>'."\n".
' <td>Nom du fichier</td>'."\n".
' <td>Nom réel du fichier</td>'."\n".
' <td>Taille</td>'."\n".
' <td>Révision de la page</td>'."\n".
' <td>Révison du fichier</td>'."\n";
if($trash){
$fmHeadTable.= ' <td>Suppression</td>'."\n";
}
$fmHeadTable.= ' </tr>'."\n".
' </thead>'."\n";
//corps du tableau
$files = $this->fmGetFiles($trash);
$files = $this->sortByNameRevFile($files);
 
$fmBodyTable = ' <tbody>'."\n";
$i = 0;
foreach ($files as $file){
$i++;
$color= ($i%2?"tableFMCol1":"tableFMCol2");
//lien de suppression
if ($trash){
$url = $this->wiki->href('filemanager',$this->wiki->GetPageTag(),'do=erase&file='.$file['realname']);
}else{
$url = $this->wiki->href('filemanager',$this->wiki->GetPageTag(),'do=del&file='.$file['realname']);
}
$dellink = '<a href="'.$url.'" title="Supprimer">'.$this->attachConfig['fmDelete_symbole']."</a>";
//lien de restauration
$restlink = '';
if ($trash){
$url = $this->wiki->href('filemanager',$this->wiki->GetPageTag(),'do=restore&file='.$file['realname']);
$restlink = '<a href="'.$url.'" title="Restaurer">'.$this->attachConfig['fmRestore_symbole']."</a>";
}
 
//lien pour downloader le fichier
$url = $this->wiki->href("download",$this->wiki->GetPageTag(),"file=".$file['realname']);
$dlLink = '<a href="'.$url.'">'.$file['name'].'.'.$file['ext']."</a>";
$fmBodyTable .= ' <tr class="'.$color.'">'."\n".
' <td>'.$dellink.' '.$restlink.'</td>'."\n".
' <td>'.$dlLink.'</td>'."\n".
' <td>'.$file['realname'].'</td>'."\n".
' <td>'.$file['size'].'</td>'."\n".
' <td>'.$this->parseDate($file['datepage']).'</td>'."\n".
' <td>'.$this->parseDate($file['dateupload']).'</td>'."\n";
if($trash){
$fmBodyTable.= ' <td>'.$this->parseDate($file['trashdate']).'</td>'."\n";
}
$fmBodyTable .= ' </tr>'."\n";
}
$fmBodyTable .= ' </tbody>'."\n";
//pied de la page
$fmFooterPage = "---\n-----\n[[".$this->wiki->tag." Retour à la page ".$this->wiki->tag."]]\n";
//affichage
echo $fmTitlePage."\n";
echo '<table class="tableFM" border="0" cellspacing="0">'."\n".$fmHeadTable.$fmFootTable.$fmBodyTable.'</table>'."\n";
echo $this->wiki->Format($fmFooterPage);
}
/**
* Renvoie la liste des fichiers
*/
function fmGetFiles($trash=false){
$path = $this->GetUploadPath();
if($this->isSafeMode){
$filePattern = '^'.$this->wiki->GetPageTag().'_.*_\d{14}_\d{14}\..*';
}else{
$filePattern = '^.*_\d{14}_\d{14}\..*';
}
if($trash){
$filePattern .= 'trash\d{14}';
}else{
$filePattern .= '[^(trash\d{14})]';
}
return $this->searchFiles('`'.$filePattern.'$`', $path);
}
/**
* Vide la poubelle
*/
function fmEmptyTrash(){
$files = $this->fmGetFiles(true);
foreach ($files as $file){
$filename = $file['path'].'/'.$file['realname'];
if(file_exists($filename)){
unlink($filename);
}
}
}
/**
* Effacement d'un fichier dans la poubelle
*/
function fmErase(){
$path = $this->GetUploadPath();
$filename = $path.'/'.($_GET['file']?$_GET['file']:'');
if (file_exists($filename)){
unlink($filename);
}
}
/**
* Met le fichier a la poubelle
*/
function fmDelete(){
$path = $this->GetUploadPath();
$filename = $path.'/'.($_GET['file']?$_GET['file']:'');
if (file_exists($filename)){
$trash = $filename.'trash'.$this->getDate();
rename($filename, $trash);
}
}
/**
* Restauration d'un fichier mis a la poubelle
*/
function fmRestore(){
$path = $this->GetUploadPath();
$filename = $path.'/'.($_GET['file']?$_GET['file']:'');
if (file_exists($filename)){
$restFile = preg_replace('`^(.*\..*)trash\d{14}$`', '$1', $filename);
rename($filename, $restFile);
}
}
/**
* Tri tu tableau liste des fichiers par nom puis par date de revision(upload) du fichier, ordre croissant
*/
function sortByNameRevFile($files){
if (!function_exists('ByNameByRevFile')){
function ByNameByRevFile($f1,$f2){
$f1Name = $f1['name'].'.'.$f1['ext'];
$f2Name = $f2['name'].'.'.$f2['ext'];
$res = strcasecmp($f1Name, $f2Name);
if($res==0){
//si meme nom => compare la revision du fichier
$res = strcasecmp($f1['dateupload'], $f2['dateupload']);
}
return $res;
}
}
usort($files,'ByNameByRevFile');
return $files;
}
}
?>
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/attach/handlers/page/upload.php
New file
0,0 → 1,55
<?php
/*
upload.php
Code original de ce fichier : Eric FELDSTEIN
Copyright (c) 2002, Hendrik Mans <hendrik@mans.de>
Copyright 2002, 2003 David DELON
Copyright 2002, 2003 Charles NEPOTE
Copyright 2003,2004 Eric FELDSTEIN
Copyright 2003 Jean-Pascal MILCENT
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The name of the author may not be used to endorse or promote products
derived from this software without specific prior written permission.
 
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
# Execute l'upload des fichiers lier par l'action {{attach}}
# Necessite le fichier actions/attach.php pour fonctionner
# voir actions/attach.php ppour la documentation
# copyrigth Eric Feldstein 2003-2004
 
//vérification de sécurité
if (!WIKINI_VERSION) {
die ("acc&egrave;s direct interdit");
}
echo $this->Header();
?>
<div class="page">
<?php
 
if (!class_exists('attach')){
include('tools/attach/actions/attach.class.php');
}
$att = new attach($this);
$att->doUpload();
unset($att);
?>
</div>
<?php echo $this->Footer(); ?>
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/attach/handlers/page/download.php
New file
0,0 → 1,48
<?php
/*
download.php
Code original de ce fichier : Eric FELDSTEIN
Copyright (c) 2002, Hendrik Mans <hendrik@mans.de>
Copyright 2002, 2003 David DELON
Copyright 2002, 2003 Charles NEPOTE
Copyright 2003,2004 Eric FELDSTEIN
Copyright 2003 Jean-Pascal MILCENT
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The name of the author may not be used to endorse or promote products
derived from this software without specific prior written permission.
 
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
# Execute le download des fichiers lier par l'action {{attach}}
# Necessite le fichier actions/attach.php pour fonctionner
# voir actions/attach.php ppour la documentation
# copyrigth Eric Feldstein 2003-2004
 
//vérification de sécurité
if (!WIKINI_VERSION) {
die ("acc&egrave;s direct interdit");
}
if (!class_exists('attach')){
include('tools/attach/actions/attach.class.php');
}
$att = new attach($this);
$att->doDownload();
unset($att);
?>
/trunk/client/integrateur_wikini/bibliotheque/wikini/tools/attach/handlers/page/filemanager.php
New file
0,0 → 1,58
<?php
/*
filemanager.php
Code original de ce fichier : Eric FELDSTEIN
Copyright (c) 2002, Hendrik Mans <hendrik@mans.de>
Copyright 2002, 2003 David DELON
Copyright 2002, 2003 Charles NEPOTE
Copyright 2003,2004 Eric FELDSTEIN
Copyright 2003 Jean-Pascal MILCENT
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The name of the author may not be used to endorse or promote products
derived from this software without specific prior written permission.
 
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
# Execute le gestion des fichiers lier par l'action {{attach}}
# Necessite le fichier actions/attach.php pour fonctionner
# voir actions/attach.php ppour la documentation
# copyrigth Eric Feldstein 2003-2004
 
//vérification de sécurité
if (!WIKINI_VERSION) {
die ("acc&egrave;s direct interdit");
}
echo $this->Header();
?>
<div class="page">
<?php
if($this->UserIsOwner()){
if (!class_exists('attach')){
include('tools/attach/actions/attach.class.php');
}
$att = new attach($this);
$att->doFilemanager();
unset($att);
}else{
echo $this->Format("//Seul le propriétaire de cette page peut accéder au gestionnaire des fichiers attaché//");
}
?>
</div>
<?php echo $this->Footer(); ?>
/trunk/client/integrateur_wikini/bibliotheque/wikini/files/AccueiL/doc_20060920164952_20060920165008.doc_
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/client/integrateur_wikini/bibliotheque/wikini/files/AccueiL/doc_20060920164952_20060920165008.doc_
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/client/integrateur_wikini/bibliotheque/wikini/files/AccueiL/grenouillette_20060920164849_20060920164902.jpg
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/client/integrateur_wikini/bibliotheque/wikini/files/AccueiL/grenouillette_20060920164849_20060920164902.jpg
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/client/integrateur_wikini/bibliotheque/wikini/files/AccueiL/grenouille_20060920161601_20060920161616.jpg
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/client/integrateur_wikini/bibliotheque/wikini/files/AccueiL/grenouille_20060920161601_20060920161616.jpg
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/client/integrateur_wikini/bibliotheque/adwi_wikini.fonct.php
21,7 → 21,7
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: adwi_wikini.fonct.php,v 1.8 2006-07-19 13:55:01 ddelon Exp $
// CVS : $Id: adwi_wikini.fonct.php,v 1.9 2006-09-21 14:18:06 florian Exp $
/**
* Contient les fonctions de l'application gestion des Wikini
*
35,7 → 35,7
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.8 $
*@version $Revision: 1.9 $
// +------------------------------------------------------------------------------------------------------+
*/
 
244,8 → 244,7
// Creation tables wikini
include_once ADWI_CHEMIN_BIBLIOTHEQUE.'gestion_wikini.class.php' ;
$g_wikini = new gestion_wikini($db);
252,8 → 251,7
if ((!isset($valeur['table_prefix'])) || (empty($config_wikini['$valeur']))) {
$valeur['table_prefix'] = $valeur['code_alpha_wikini'];
}
$g_wikini->creation_tables ($valeur['table_prefix']);
$g_wikini->creation_tables($valeur['table_prefix']);
// Creation Wakka.config.php
421,6 → 419,9
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.8 2006/07/19 13:55:01 ddelon
* Bug suppression de Wiki
*
* Revision 1.7 2006/06/02 09:12:16 florian
* ajout constante chemin
*
/trunk/client/integrateur_wikini/bibliotheque/gestion_wikini.class.php
19,7 → 19,7
// | License along with this library; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: gestion_wikini.class.php,v 1.4 2005-11-14 10:14:30 ddelon Exp $
// CVS : $Id: gestion_wikini.class.php,v 1.5 2006-09-21 14:18:06 florian Exp $
/**
* Application projet
*
31,7 → 31,7
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.4 $
*@version $Revision: 1.5 $
// +------------------------------------------------------------------------------------------------------+
*/
 
77,10 → 77,10
*/
function creation_tables( $prefixe )
{
// Connection à la base de donnée de wikini
$prefixe .= '_' ;
// Connection à la base de donné de wikini
$prefixe .= '_' ;
$this->_db->query(
"CREATE TABLE ".$prefixe."pages (".
"CREATE TABLE `".$prefixe."pages` (".
"id int(10) unsigned NOT NULL auto_increment,".
"tag varchar(50) NOT NULL default '',".
"time datetime NOT NULL default '0000-00-00 00:00:00',".
99,7 → 99,7
"KEY idx_comment_on (comment_on)".
") TYPE=MyISAM;");
$this->_db->query(
"CREATE TABLE ".$prefixe."acls (".
"CREATE TABLE `".$prefixe."acls` (".
"page_tag varchar(50) NOT NULL default '',".
"privilege varchar(20) NOT NULL default '',".
"list text NOT NULL,".
106,7 → 106,7
"PRIMARY KEY (page_tag,privilege)".
") TYPE=MyISAM");
$this->_db->query(
"CREATE TABLE ".$prefixe."links (".
"CREATE TABLE `".$prefixe."links` (".
"from_tag char(50) NOT NULL default '',".
"to_tag char(50) NOT NULL default '',".
"UNIQUE KEY from_tag (from_tag,to_tag),".
114,7 → 114,7
"KEY idx_to (to_tag)".
") TYPE=MyISAM");
$this->_db->query(
"CREATE TABLE ".$prefixe."referrers (".
"CREATE TABLE `".$prefixe."referrers` (".
"page_tag char(50) NOT NULL default '',".
"referrer char(150) NOT NULL default '',".
"time datetime NOT NULL default '0000-00-00 00:00:00',".
122,7 → 122,7
"KEY idx_time (time)".
") TYPE=MyISAM");
$this->_db->query(
"CREATE TABLE ".$prefixe."users (".
"CREATE TABLE `".$prefixe."users` (".
"name varchar(80) NOT NULL default '',".
"password varchar(32) NOT NULL default '',".
"email varchar(50) NOT NULL default '',".
137,24 → 137,34
"KEY idx_signuptime (signuptime)".
") TYPE=MyISAM");
 
$this->_db->query("insert into ".$prefixe."pages set tag = 'PagePrincipale', body = '".mysql_escape_string("===== Bienvenue sur le Wikini de ce groupe de travail =====\nCliquer sur le lien \"Modifier cette page\" au bas de la page pour rédiger.\n\n----\n\n\n\n\n\n\n----\n===== Pages utiles =====\n -[[TableauDeBord Tableau de bord de ce Wikini]]\n -[[ReglesDeFormatage Règles de formatage]]\n -[[BacASable Bac à sable]]")."', owner = 'WikiNiInstaller', user = 'WikiNiInstaller', time = now(), latest = 'Y'");
$this->_db->query("insert into ".$prefixe."pages set tag = 'DerniersChangements', body = '** Retour : ** [[TableauDeBord Tableau de bord]]\n----\n{{RecentChanges}}', owner = 'WikiNiInstaller', user = 'WikiNiInstaller', time = now(), latest = 'Y'");
$this->_db->query("insert into ".$prefixe."pages set tag = 'DerniersCommentaires', body = '** Retour : ** [[TableauDeBord Tableau de bord]]\n----\n{{RecentlyCommented}}', owner = 'WikiNiInstaller', user = 'WikiNiInstaller', time = now(), latest = 'Y'");
$this->_db->query("insert into ".$prefixe."pages set tag = 'ParametresUtilisateur', body = '** Retour : ** [[PagePrincipale page principale]]\n----\n** Note : ** L\'idéal pour la création d\'un nom Wiki est d\'accoler son prénom et son nom de cette façon : \"PrenomNom\". \n----\n==== Mes paramètres ====\n\n{{UserSettings}}\n\n----\n', owner = 'WikiNiInstaller', user = 'WikiNiInstaller', time = now(), latest = 'Y'");
$this->_db->query("insert into ".$prefixe."pages set tag = 'PagesACreer', body = '** Retour : ** [[TableauDeBord Tableau de bord]]\n----\n=== Liste des pages à créer : ===\n\n{{WantedPages}}', owner = 'WikiNiInstaller', user = 'WikiNiInstaller', time = now(), latest = 'Y'");
$this->_db->query("insert into ".$prefixe."pages set tag = 'PagesOrphelines', body = '** Retour : ** [[TableauDeBord Tableau de bord]]\n----\n=== Liste des pages orphelines ===\n\n{{OrphanedPages}}', owner = 'WikiNiInstaller', user = 'WikiNiInstaller', time = now(), latest = 'Y'");
$this->_db->query("insert into ".$prefixe."pages set tag = 'RechercheTexte', body = '** Retour : ** [[PagePrincipale Page principale]] > [[TableauDeBord Tableau de bord]]\n----\n{{TextSearch}}', owner = 'WikiNiInstaller', user = 'WikiNiInstaller', time = now(), latest = 'Y'");
$this->_db->query("insert into ".$prefixe."pages set tag = 'ReglesDeFormatage', body = '** Retour : ** [[PagePrincipale Page principale]]\n----\n====== Guide des règles de formatage ======\n\nLes règles de formatage avec Wakka diffèrent légèrement des autres Wikis. (Voir par exemple [[http://c2.com/cgi/wiki?TextFormattingRules les règles de formatage de WikiWikiWeb]], le premier Wiki connu.)\nTout texte placé entre deux guillemets doubles - \" - est présenté tel que.\n\nVous pouvez effectuer vos propres tests dans le BacASable : c\'est un endroit fait pour ça.\n\n=== Règles de base : ===\n \"\"**Texte en gras !** -----\"\"> **Texte en gras !**\n \"\"//Texte en italique.// -----\"\"> //Texte en italique.//\n \"\"Texte __souligné__ ! -----\"\"> Texte __souligné__ !\n \"\"##texte à espacement fixe## -----\"\"> ##texte à espacement fixe##\n \"\"%%code%%\"\"\n \"\"%%(php) PHP code%%\"\"\n\n=== Liens forcés : ===\n \"\"[[http://www.mon-site.org]]\"\"\n \"\"[[http://www.mon-site.org Mon-site]]\"\"\n \"\"[[P2P]]\"\"\n \"\"[[P2P Page sur le P2P]]\"\"\n\n=== Liens dans Wikini ===\n Pour réaliser un lien dans wikini qui apparaisse avec un style normal utilisez cette écriture :\n \"\"[[ReglesDeFormatage Règles de Formatage]]\"\"\n Le lien apparaîtra de cette manière [[ReglesDeFormatage Règles de Formatage]].\n\n=== En-têtes : ===\n \"\"====== En-tête énorme ======\"\" ====== En-tête énorme ======\n \"\"===== En-tête très gros =====\"\" ===== En-tête très gros =====\n \"\"==== En-tête gros ====\"\" ==== En-tête gros ====\n \"\"=== En-tête normal ===\"\" === En-tête normal ===\n \"\"== Petit en-tête ==\"\" == Petit en-tête ==\n\n=== Séparateur horizontal : ===\n \"\"----\"\"\n\n=== Retour de ligne forcé : ===\n \"\"---\"\"\n=== Indentation : ===\nL\'indentation de textes se fait avec la touche \"TAB\". Vous pouvez aussi créer des listes à puces ou numérotées :\n \"\"- liste à puce\"\"\n \"\"1) liste numérotée (chiffres arabes)\"\"\n \"\"A) liste numérotée (capitales alphabétiques)\"\"\n \"\"a) liste numérotée (minuscules alphabétiques)\"\"\n \"\"i) liste numérotée (chiffres romains)\"\"\n\n=== Inclure une image ===\n\n - Pour inclure un lien sur une image (sans l\'inclure à la page):\n \"\"[[http://wiki.tela-botanica.org/eflore/bibliotheque/images/table.gif]]\"\"(ne pas indiquer de texte alternatif).\n Ce qui donne : [[http://wiki.tela-botanica.org/eflore/bibliotheque/images/table.gif]]\n\n - Pour inclure une image sans indiquer de texte alternatif :\n \"\"[[http://wiki.tela-botanica.org/eflore/bibliotheque/images/table.gif]]\"\"(laisser 3 espaces blancs avant la fermeture des crochets).\n Ce qui donne quand l\'image est trouvée : [[http://wiki.tela-botanica.org/eflore/bibliotheque/images/table.gif]]\n Quand l\'image n\'est pas trouvée : [[http://wiki.tela-botanica.org/eflore/bibliotheque/table.gif]]\n\n - Pour inclure une image en indiquant un texte alternatif :\n \"\"[[http://wiki.tela-botanica.org/eflore/bibliotheque/images/table.gif une puce ]]\"\"\n Ce qui donne quand l\'image est trouvée : [[http://wiki.tela-botanica.org/eflore/bibliotheque/images/table.gif une puce ]]\n Quand l\'image n\'est pas trouvée : [[http://wiki.tela-botanica.org/eflore/bibliotheque/table.gif une puce ]]\n\n//Note :// le texte alternatif est affiché à la place de l\'image s\'il y a une erreur lors de l\'affichage de celle-ci.\n\n=== Outils avancés : ===\n\n \"\"{{Backlinks}}\"\" permet de créer un lien vers la page précédente. \n \"\"{{Listusers}}\"\" affiche la liste des utilisateurs du site wikini.\n \"\"{{OrphanedPages}}\"\" affiche les pages orphelines du site wikini.\n \"\"{{ListPages/tree}}\"\" affiche le plan du site wikini.\n \"\"{{pageindex}}\"\" affiche un index des pages du site classées par lettres alphabétiques.\n \"\"{{ListPages}}\"\" affiche un index des pages du site avec le nom de leur propriétaire.\n \"\"{{WantedPages}}\"\" affiche la liste des pages restant à créer. Elles apparaissent dans le site avec un ? à la suite de leur nom.\n \"\"{{RecentChanges}}\"\" affiche la liste des sites faisant référence au site wikini.\n \"\"{{RecentlyCommented}}\"\" affichage de la liste des derniers commentaires.\n \"\"{{TextSearch}}\"\" recherche de texte dans les pages du site.\n\n**Note :** à cause d\'un [[http://bugzilla.mozilla.org/show_bug.cgi?id=10547 bogue dans son moteur de rendu]], les listes, utilisant la touche TAB, ne fonctionnent pas (encore) sous Mozilla.\nUne astuce consiste à réaliser une tabulation dans un éditeur de texte puis de la copier. On peut ensuite coller la tabulation dans la zone de saisie de Wikini.\nVous pouvez également indenter du texte en utilisant des caractères espace au lieu de la touche \"TAB\", les exemples ci-dessus restent valables mais attention à ne pas mélanger des \"TAB\" et des espaces dans la même énumération.\n\n---', owner = 'WikiNiInstaller', user = 'WikiNiInstaller', time = now(), latest = 'Y'");
$this->_db->query("insert into ".$prefixe."pages set tag = 'ListeUtilisateurs', body = '** Retour : ** [[TableauDeBord Tableau de bord]]\n----\n=== Liste des utilisateurs ===\n\n... du premier au dernier.\n\n{{Listusers}}', owner = 'WikiNiInstaller', user = 'WikiNiInstaller', time = now(), latest = 'Y'");
$this->_db->query("insert into ".$prefixe."pages set tag = 'ListeUtilisateursInverse', body = '** Retour : ** [[TableauDeBord Tableau de bord]]\n----\n=== Liste des utilisateurs ===\n\n... du dernier au premier.\n\n{{Listusers/last}}', owner = 'WikiNiInstaller', user = 'WikiNiInstaller', time = now(), latest = 'Y'");
$this->_db->query("insert into ".$prefixe."pages set tag = 'PlanDuSite', body = '**Retour : ** [[TableauDeBord tableau de bord]]\n----\n=== Plan du site : ===\n\n{{ListPages/tree}}', owner = 'WikiNiInstaller', user = 'WikiNiInstaller', time = now(), latest = 'Y'");
$this->_db->query("insert into ".$prefixe."pages set tag = 'IndexDesPages', body = '**Retour : ** [[TableauDeBord tableau de bord]]\n----\n=== Liste des pages : ===\n\n{{ListPages}}', owner = 'WikiNiInstaller', user = 'WikiNiInstaller', time = now(), latest = 'Y'");
$this->_db->query("insert into ".$prefixe."pages set tag = 'IndexAlphabetiqueDesPages', body = '**Retour : ** [[TableauDeBord tableau de bord]]\n----\n=== Liste des pages par ordre alphabétique : ===\n\n{{pageindex}}', owner = 'WikiNiInstaller', user = 'WikiNiInstaller', time = now(), latest = 'Y'");
$this->_db->query("insert into ".$prefixe."pages set tag = 'DerniersChangementsRSS', body = '**Retour : ** [[TableauDeBord tableau de bord]]\n----\nCette page renvoie au fils RSS des derniers changement. Pour savoir comment l\'utiliser voir la page \"\"<a href=\"http://www.wikini.net/wakka.php?wiki=WikiniEtLesFluxRSS\" target=\"_blank\" title=\"Wikini et les flux RSS\">Wikini et les flux RSS</a>\"\".\n\n\"\"<!--\n\n{{recentchangesrss/link=\"DerniersChangements\"}}\n\n-->\"\"', owner = 'WikiNiInstaller', user = 'WikiNiInstaller', time = now(), latest = 'Y'");
$this->_db->query("insert into ".$prefixe."pages set tag = 'BacASable', body = '** Retour : ** [[PagePrincipale Page pincipale]]\n----\nUtilisez cette page pour faire vos tests !', owner = 'WikiNiInstaller', user = 'WikiNiInstaller', time = now(), latest = 'Y'");
$this->_db->query("insert into ".$prefixe."pages set tag = 'TableauDeBord', body = '** Retour : ** [[PagePrincipale Page Principale]]\n----\n===== Tableau de bord =====\n\n - Listes des utilisateurs : [[ListeUtilisateurs par ordre de création ]] ou [[ListeUtilisateursInverse par ordre inverse de création ]].\n\n - [[DerniersChangements Dernières modifications sur les pages]]\n - [[DerniersCommentaires Dernières modifications sur les commentaires]]\n\n\n - [[PagesOrphelines Pages orphelines]]\n - [[PagesACreer Pages à créer]]\n\n - [[RechercheTexte Recherche texte]]\n\n - [[PlanDuSite Plan du site]]\n - [[IndexDesPages Index des pages avec noms des propriétaires]]\n - [[IndexAlphabetiqueDesPages Index des pages par classement alphabétique]]\n\n - [[DerniersChangementsRSS La page permettant le flux RSS]]\n\n----\n==== 5 derniers comptes utilisateurs ====\n{{Listusers last=\"5\"}}\n\n==== 5 dernières pages modifiées ====\n{{recentchanges max=\"5\"}}\n----', owner = 'WikiNiInstaller', user = 'WikiNiInstaller', time = now(), latest = 'Y'");
$this->_db->query("insert into ".$prefixe."pages set tag = 'NomWiki', body = '** Retour : ** [[PagePrincipale Page Principale]]\n----\nUn NomWiki est un nom qui est écrit \"\"CommeCela\"\".\n\nUn NomWiki est transformé automatiquement en lien. Si la page correspondante n\'existe pas, un \'?\' est affiché à côté du mot.', owner = 'WikiNiInstaller', user = 'WikiNiInstaller', time = now(), latest = 'Y'");
 
$this->_db->query("INSERT INTO `".$prefixe."pages` (`id`, `tag`, `time`, `body`, `body_r`, `owner`, `user`, `latest`, `handler`, `comment_on`) VALUES (56, 'PageMemo', '2006-09-21 10:38:12', '[[AideWikiNi Retour]]\n\n======Mémo d''utilisation du site Internet Wikini======\n\n=====Préambule, en règle général :=====\n\n - N''oubliez pas de vous **identifier** pour avoir accès à toutes les pages qui vous concernent.\n\n - Veillez à ne pas effacer le contenu d''une page mis en ligne précédemment. \nEn mode \" édition \" une page n''est pas forcément très lisible, **prenez le temps de vous habituer à la syntaxe, à trouver où vous voulez écrire.**\n\n=====Ecrire sur une page, enregistrer ses modifications ou faire un aperçu de la page :=====\n\n - Pour écrire sur une page, il vous suffit de **double cliquer sur la zone d''écriture** ou de cliquer en bas de la page sur le lien : **\" Editer cette page \"**\nAttention, lorsque vous avez terminé décrire, n''oubliez pas de **sauvegarder vos modifications** en bas de la page en cliquant sur le bouton **Aperçu** puis sur **Sauver**\n\n=====Pour Mettre en page :=====\n\n - Pour mettre en page vos textes vous pouvez **utiliser la barre d''outil** située en haut de la page quand vous êtes en mode édition.\n\n - Sinon, vous pouvez utiliser des codes pré configurés à partir de **symboles de syntaxe.**\nDans tous les cas il faudra utiliser deux symboles juste avant la première lettre à mettre en page et deux autres juste après la dernière lettre à mettre en page.\nPar exemple, si vous tapez : \"\"**Le COCM est une association régie sous la loi 1901**\"\"\nA l''écran le texte apparaîtra ainsi : **Le COCM est une **association** régie sous la loi 1901**\n\n - **Guide des règles de formatage**\n__Règles de base :__\n\n- \"\"##texte à espacement fixe## --->\"\" ##texte à espacement fixe##\n\n- Mettre en gras : \"\"**Texte en gras !** --->\"\" Texte en gras !\n\n- Souligner : \"\"Texte __souligné__ ! --->\"\" __Texte souligné !__ (2 fois le symbole du tiret bas, touche 8 du clavier)\n\n- Barrer un texte : \"\"@@Texte barré@@ ! --->\"\" @@Texte barré !@@ (deux arobaz)\n\n- Mettre en Italique : \"\"//Texte en italique.// --->\"\" //Texte en italique.// (deux slash)\n\n- \"\"======Grand titre (T1):======(6 signes \" égal \") -->\"\" ======Grand titre (T1):======\n\n- \"\"=====Grand titre (T2) :===== -->\"\" =====Grand titre (T2) :===== (5 signes \" égal \")\n\n- \"\"====Grand titre (T3) :==== -->\"\" ====Grand titre (T3) :==== (4 signes \" égal \")\n\n- Séparateur horizontal : il suffit de taper au moins 4 \"-\", au dela de 4 tirets c''est le meme effet : \"\"----\"\" (4 tiret, touche 6 du clavier)\nExemple : ----\n\nRetour de ligne forcé : \"\" ---\"\" \nExemple : \"\"le--- wikini --->\"\"le --- wikini\n\n=====Faire un lien vers un autre site ou une autre page du site :=====\n\n - **Pour faire un lien vers un autre site**, il suffit d''**écrire l''adresse du site entière** sur la page, le wikini reconnaît automatique que c''est un lien. Rappel, une adresse complète commence par [[http://]]\n\n - **Si vous souhaitez q''un autre texte apparaisse**, vous devrez écrire l''adresse du lien entre des crochets avec le texte que vous voulez. \nPar exemple : \"\"[[http://cocmathlétisme.org Visitez le site du club de Mauguio !]]\"\" le texte que le public verra sera : [[http://cocmathlétisme.org Visitez le site du club de Mauguio !]]\n\n - **Pour faire un lien d''une page du site vers une autre page du même site**, pas besoin de mettre toute l''adresse, il vous suffit d''indiquer le dernier mot du chemin (celui avec les deux majuscules) Par exemple pour faire un lien vers cette page, on utilisera seulement le mot écrit en bleu : http://www.cocmathletisme.org/wikini/wakka.php?wiki=AdministraTeurs\nVous pourrez également utiliser un autre texte grâce aux crochets comme expliqué plus haut. (rappel : \"\"[[ParametresUtilisateur Identification ]]\"\" donnera aux visiteurs : [[ParametresUtilisateur Identification ]]\n\n=====Créer une nouvelle page :=====\n\n - **Une nouvelle page se crée** en écrivant un mot qui contient 2 majuscules **CommeCeci**.\nLorsque vous sauvez vos modifications, le mot apparaît à l''écran avec une majuscule en bout de mot : **CommeCeci?** En cliquant sur le point d''interrogation, une nouvelle page blanche apparaît, en y insérant du texte et en sauvant, cette page devient active.\n\n - **Conseil** : Lorsque vous créer la page, il est préférable d''**en informer l''administrateur principal** afin qu''il puisse gérer les droits d''écriture et de lecture de la page (notamment si cette page est créée dans la rubrique des administrateurs)\n\n=====Mettre une image dans le corps d''une page :=====\n\n1) **dimensionner votre photo** de manière à ce qu''elle ne soit pas trop grande (rester sur un format 10X15 cm maxi), vérifier que votre photo ne soit pas trop lourde sinon, elle n''apparaîtra pas. Configurer par exemple **la résolution** qui, pour être sur le Web, doit être de 72 dpi.\n\n2) Quant vous êtes en train de modifier la page, il faut utiliser la barre d''outil en haut de la page, sur la 2ème ligne de la barre, il y a un icône image, avant de cliquez dessus, vous allez informer les cases suivantes : **fichier, description et alignement**\n\n3) **Fichier** : indiquer un nom de fichier et surtout son **extension** (.doc,.jpg,.img ,.gif....) par exemple pour le logo de cocm vous pourrez indiquer **logo.jpg**\n\n4) **Description** : ici vous décrivez la photo par exemple : Le logo du cocm\n\n5) **Alignement** : indiquer si vous souhaitez que l''image soit centrée, à gauche ou à droite de l''écran.\n\n6) **Cliquez enfin sur le bouton image** de la barre d''outil puis **sauver vos modifications**, vous verrez apparaître à côté de la description de votre ficher un point d''interrogation : le logo du cocm?\n\n7/ Cliquez sur le point d''interrogation, le site vous propose de **transférer votre image** via le formulaire d''envois de fichier cliquez sur \" parcourir \". **Pointez l''image** et cliquez sur **envoyer**.\n\n=====Mettre un fichier en téléchargement sur le site :=====\n\n - **Idem que pour mettre une image**, suivez les instructions du point 2/ à 7/\nRappel : ne vous trompez pas sur l''extension de votre fichier :\nQuelques extensions possibles : \nFichier Word : .doc\nPower point : .pps ou . ppt\nExcel : .xls\n\n**Attention, lorsque un fichier est trop lourd, le serveur vous envoie un message d''erreur. Veillez à ne pas trop surcharger le site, en effet, l''espace d''un site n''est pas extensible.**', '', '', 'ekotribu', 'Y', 'page', ''),
(2, 'DerniersChangements', '2006-09-20 12:18:59', '** Retour : ** [[TableauDeBord Tableau de bord]]\n----\n{{RecentChanges}}', '', '', 'ekotribu', 'Y', 'page', ''),
(3, 'DerniersCommentaires', '2006-09-20 12:18:59', '** Retour : ** [[TableauDeBord Tableau de bord]]\n----\n{{RecentlyCommented}}', '', '', 'ekotribu', 'Y', 'page', ''),
(5, 'PagesACreer', '2006-09-20 12:18:59', '** Retour : ** [[TableauDeBord Tableau de bord]]\n----\n=== Liste des pages à créer : ===\n\n{{WantedPages}}', '', '', 'ekotribu', 'Y', 'page', ''),
(6, 'PagesOrphelines', '2006-09-20 12:18:59', '** Retour : ** [[TableauDeBord Tableau de bord]]\n----\n=== Liste des pages orphelines ===\n\n{{OrphanedPages}}', '', '', 'ekotribu', 'Y', 'page', ''),
(7, 'RechercheTexte', '2006-09-20 12:18:59', '** Retour : ** [[PagePrincipale Page principale]] > [[TableauDeBord Tableau de bord]]\n----\n{{TextSearch}}', '', '', 'ekotribu', 'Y', 'page', ''),
(9, 'ListeUtilisateurs', '2006-09-20 12:18:59', '** Retour : ** [[TableauDeBord Tableau de bord]]\n----\n=== Liste des utilisateurs ===\n\n... du premier au dernier.\n\n{{Listusers}}', '', '', 'ekotribu', 'Y', 'page', ''),
(10, 'ListeUtilisateursInverse', '2006-09-20 12:18:59', '** Retour : ** [[TableauDeBord Tableau de bord]]\n----\n=== Liste des utilisateurs ===\n\n... du dernier au premier.\n\n{{Listusers/last}}', '', '', 'ekotribu', 'Y', 'page', ''),
(11, 'PlanDuSite', '2006-09-20 12:18:59', '**Retour : ** [[TableauDeBord tableau de bord]]\n----\n=== Plan du site : ===\n\n{{ListPages/tree}}', '', '', 'ekotribu', 'Y', 'page', ''),
(12, 'IndexDesPages', '2006-09-20 12:18:59', '**Retour : ** [[TableauDeBord tableau de bord]]\n----\n=== Liste des pages : ===\n\n{{ListPages}}', '', '', 'ekotribu', 'Y', 'page', ''),
(13, 'IndexAlphabetiqueDesPages', '2006-09-20 12:18:59', '**Retour : ** [[TableauDeBord tableau de bord]]\n----\n=== Liste des pages par ordre alphabétique : ===\n\n{{pageindex}}', '', '', 'ekotribu', 'Y', 'page', ''),
(14, 'DerniersChangementsRSS', '2006-09-20 12:18:59', '**Retour : ** [[TableauDeBord tableau de bord]]\n----\nCette page renvoie au fils RSS des derniers changement. Pour savoir comment l''utiliser voir la page \"\"<a href=\"http://www.wikini.net/wakka.php?wiki=WikiniEtLesFluxRSS\" target=\"_blank\" title=\"Wikini et les flux RSS\">Wikini et les flux RSS</a>\"\".\n\n\"\"<!--\n\n{{recentchangesrss/link=\"DerniersChangements\"}}\n\n-->\"\"', '', '', 'ekotribu', 'Y', 'page', ''),
(15, 'BacASable', '2006-09-20 12:18:59', '** Retour : ** [[PagePrincipale Page pincipale]]\n----\nUtilisez cette page pour faire vos tests !', '', '', 'ekotribu', 'Y', 'page', ''),
(16, 'TableauDeBord', '2006-09-20 12:18:59', '** Retour : ** [[PagePrincipale Page Principale]]\n----\n===== Tableau de bord =====\n\n - Listes des utilisateurs : [[ListeUtilisateurs par ordre de création ]] ou [[ListeUtilisateursInverse par ordre inverse de création ]].\n\n - [[DerniersChangements Dernières modifications sur les pages]]\n - [[DerniersCommentaires Dernières modifications sur les commentaires]]\n\n\n - [[PagesOrphelines Pages orphelines]]\n - [[PagesACreer Pages à créer]]\n\n - [[RechercheTexte Recherche texte]]\n\n - [[PlanDuSite Plan du site]]\n - [[IndexDesPages Index des pages avec noms des propriétaires]]\n - [[IndexAlphabetiqueDesPages Index des pages par classement alphabétique]]\n\n - [[DerniersChangementsRSS La page permettant le flux RSS]]\n\n----\n==== 5 derniers comptes utilisateurs ====\n{{Listusers last=\"5\"}}\n\n==== 5 dernières pages modifiées ====\n{{recentchanges max=\"5\"}}\n----', '', '', 'ekotribu', 'Y', 'page', ''),
(17, 'NomWiki', '2006-09-20 12:18:59', '** Retour : ** [[PagePrincipale Page Principale]]\n----\nUn NomWiki est un nom qui est écrit \"\"CommeCela\"\".\n\nUn NomWiki est transformé automatiquement en lien. Si la page correspondante n''existe pas, un ''?'' est affiché à côté du mot.', '', '', 'ekotribu', 'Y', 'page', ''),
(38, 'AideUn', '2006-09-20 17:37:43', '[[AideWikiNi Retour]]\n\n=====Comment écrire, mettre en page et sauvegarder sur une page ?=====\n\n\"\"\n<center>\n<OBJECT CLASSID=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" WIDTH=\"508\" HEIGHT=\"375\" CODEBASE=\"http://active.macromedia.com/flash5/cabs/swflash.cab#version=5,0,0,0\">\n<PARAM NAME=movie VALUE=\"tutoriel_wiki1.swf\">\n<PARAM NAME=play VALUE=true>\n<PARAM NAME=loop VALUE=false>\n<PARAM NAME=quality VALUE=low>\n<EMBED SRC=\"http://ekotribu.org/tutos/tutoriel_wiki1.swf\" WIDTH=508 HEIGHT=375 quality=low loop=false TYPE=\"application/x-shockwave-flash\" PLUGINSPAGE=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\">\n</EMBED>\n</OBJECT>\n</center>\n\"\"', '', '', 'ekotribu', 'Y', 'page', ''),
(40, 'AideDeux', '2006-09-20 17:43:32', '[[AideWikiNi Retour]]\n\n=====Comment créer une nouvelle page dans l''espace projet ?=====\n\n\"\"\n<center>\n<OBJECT CLASSID=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" WIDTH=\"509\" HEIGHT=\"374\" CODEBASE=\"http://active.macromedia.com/flash5/cabs/swflash.cab#version=5,0,0,0\">\n<PARAM NAME=movie VALUE=\"tutoriel_wiki2.swf\">\n<PARAM NAME=play VALUE=true>\n<PARAM NAME=loop VALUE=false>\n<PARAM NAME=quality VALUE=low>\n<EMBED SRC=\"http://ekotribu.org/tutos/tutoriel_wiki2.swf\" WIDTH=509 HEIGHT=374 quality=low loop=false TYPE=\"application/x-shockwave-flash\" PLUGINSPAGE=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\">\n</EMBED>\n</OBJECT>\n</center>\n\"\"', '', '', 'ekotribu', 'Y', 'page', ''),
(41, 'AideTrois', '2006-09-20 17:44:11', '[[AideWikiNi Retour]]\n\n=====Comment mettre en ligne un document dans mon projet, illustrer avec une image mes textes ?=====\n\n\"\"\n<center>\n<OBJECT CLASSID=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" WIDTH=\"509\" HEIGHT=\"374\" CODEBASE=\"http://active.macromedia.com/flash5/cabs/swflash.cab#version=5,0,0,0\">\n<PARAM NAME=movie VALUE=\"tutoriel_wiki4.swf\">\n<PARAM NAME=play VALUE=true>\n<PARAM NAME=loop VALUE=false>\n<PARAM NAME=quality VALUE=low>\n<EMBED SRC=\"http://ekotribu.org/tutos/tutoriel_wiki4.swf\" WIDTH=509 HEIGHT=374 quality=low loop=false TYPE=\"application/x-shockwave-flash\" PLUGINSPAGE=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\">\n</EMBED>\n</OBJECT>\n</center>\n\"\"', '', '', 'ekotribu', 'Y', 'page', ''),
(43, 'AideQuatre', '2006-09-20 17:45:30', '[[AideWikiNi Retour]]\n\n=====Comment créer un menu ou le modifier dans l''espace de mon projet ?=====\n\n\"\"\n<center>\n<OBJECT CLASSID=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"WIDTH=\"559\"HEIGHT=\"408\"\nCODEBASE=\"http://active.macromedia.com/flash5/cabs/swflash.cab#version=5,0,0,0\">\n<PARAM NAME=movie VALUE=\"tutoriel_wiki3.swf\">\n<PARAM NAME=play VALUE=true>\n<PARAM NAME=loop VALUE=false>\n<PARAM NAME=quality VALUE=low>\n<EMBED SRC=\"http://ekotribu.org/tutos/tutoriel_wiki3.swf\" WIDTH=509 HEIGHT=374 quality=low loop=false TYPE=\"application/x-shockwave-flash\" PLUGINSPAGE=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\">\n</EMBED>\n</OBJECT>\n</center>\n\"\"', '', '', 'ekotribu', 'Y', 'page', ''),
(44, 'AideCinq', '2006-09-20 17:47:11', '[[AideWikiNi Retour]]\n\n=====Comment faire des liens vers d''autres sites ou d''autre page dans mon projet ?=====\n\n\"\"\n<center>\n<OBJECT CLASSID=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" WIDTH=\"559\" HEIGHT=\"408\" CODEBASE=\"http://active.macromedia.com/flash5/cabs/swflash.cab#version=5,0,0,0\">\n<PARAM NAME=movie VALUE=\"tutoriel_wiki5.swf\">\n<PARAM NAME=play VALUE=true>\n<PARAM NAME=loop VALUE=false>\n<PARAM NAME=quality VALUE=low>\n<EMBED SRC=\"http://ekotribu.org/tutos/tutoriel_wiki5.swf\" WIDTH=559 HEIGHT=408 quality=low loop=false TYPE=\"application/x-shockwave-flash\" PLUGINSPAGE=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\">\n</EMBED>\n</OBJECT>\n</center>\n\"\"', '', '', 'ekotribu', 'Y', 'page', ''),
(47, 'ParametresUtilisateur', '2006-09-20 17:52:04', '** Retour : ** [[PagePrincipale page principale]]\n----\n** Note : ** L''idéal pour la création d''un nom Wiki est d''accoler son prénom et son nom de cette façon : \"\"\"PrenomNom\"\"\". \n----\n==== Mes paramètres ====\n\n{{UserSettings}}\n\n----', '', '', 'ekotribu', 'Y', 'page', ''),
(50, 'ListeDesActionsWikini', '2006-09-20 17:58:42', 'Wikini propose par défaut les \"Actions\" suivantes.\n\n - \"\"ActionBacklinks\"\" insère la liste des pages faisant référence à la page courante\n - \"\"ActionInclude\"\" : inclusion d''une page au sein d''une autre\n - \"\"ActionListPages\"\" : liste la totalité des pages du site (paramètres possibles)\n - \"\"ActionListUsers\"\" : liste la totalité des pages du site (tri /last).\n - \"\"ActionMyChanges\"\" : donne les dernières pages modifiées par l''utilisateur courant (force son identification)\n - \"\"ActionMyPages\"\" : donne la liste des pages dont l''utilisateur courant est le propriétaire\n - \"\"ActionOrphanedPages\"\" : recherche les pages qui ne sont pas cibles de liens (pages orphelines)\n - \"\"ActionPageIndex\"\" : liste toutes les pages classées par ordre alphabétique et regroupées par lettres.\n - \"\"ActionRecentChanges\"\" : affiche la liste des pages récemment modifiées (voir DerniersChangements )\n - \"\"ActionRecentChangesRSS\"\" : automatise la diffusion pr RSS (voir la page DerniersChangementsRss ) \n - \"\"ActionRecentComments\"\" : donne la liste des pages commentées triées par date anti-chronologique (cf. ci-dessous) \n - \"\"ActionRecentlyCommented\"\" : affiche une liste (bornée par max= ) des pages ayant été récemment commentées (voir DerniersCommentaires ).\n - \"\"ActionRedirect\"\" : redirection d''une page vers une autre\n - \"\"ActionResetPassword\"\" : ré-initialise le mot de passe de l''utilisateur (utilisé dans ParametresUtilisateur ) \n - \"\"ActionTextSearch\"\" : recherche d''une chaîne de caractères dans l''ensemble des pages de Wikini\n - \"\"ActionTrail\"\" : permet de lier des pages entres elles et de passer de l''une à l''autre avec un petit navigateur style \"précédente/suivante\"\n - \"\"ActionUserSettings\"\" : création de compte et connexion (voir ParametresUtilisateur ).\n - \"\"ActionWantedPages\"\" : liste les pages de Mot Wiki devant être écrites (voir PagesACreer ).\n.', '', '', 'ekotribu', 'Y', 'page', ''),
(51, 'ControlerLAccesAuxPages', '2006-09-20 18:03:17', 'Chaque page possède trois niveaux de contrôle d''accès :\n - lecture de la page\n - écriture/modification de la page\n - commentaire de la page\n\nLes contrôles d''accès ne peuvent être modifiés que par le propriétaire de la page -- l''administrateur technique peut aussi manuellement modifier ces contrôles en travaillant directement sur la base de données.\nLe propriétaire d''une page voit apparaître, dans la page dont il est propriétaire, l''option \"Éditer permissions\" : cette option lui permet de modifier les contrôles d''accès.\nCes contrôles sont matérialisés par des colonnes où le propriétaire va ajouter ou supprimer des informations.\nLe propriétaire peut compléter ces colonnes par les informations suivantes, séparées par des espaces :\n - le nom d''un ou plusieurs utilisateurs : par exemple \"\"CharlesNepote\"\" ou \"\"DavidDelon\"\"\n - le caractère ***** désignant tous les utilisateurs\n - le caractère **+** désignant les utilisateurs enregistrés\n - le caractère **!** signifiant la négation : par exemple !\"\"CharlesNepote\"\" signifie que \"\"CharlesNepote\"\" **ne doit pas** avoir accès à cette page\n\n===== Droits d''accès par défaut =====\nPour toute nouvelle page créée, [[http://www.wikini.net WikiNi]] applique des droits d''accès par défaut. Ces droits d''accès sont configurables via le fichier /wakka.config.php.\nIl faut renseigner les trois variables de configuration suivantes :\n##\n \"default_write_acl\" => \"*\",\n \"default_read_acl\" => \"*\",\n \"default_comment_acl\" => \"*\",\n##\n\nPar exemple, vous pouvez souhaiter que, par défaut, seuls les utilisateurs enregistrés puisse modifier des pages. Vous utiliserez alors :\n##\n \"default_write_acl\" => \"+\",\n \"default_read_acl\" => \"*\",\n \"default_comment_acl\" => \"*\",\n##', '', '', 'ekotribu', 'Y', 'page', ''),
(59, 'AideWikiNi', '2006-09-21 10:52:50', '**=====Mode d''emploi de la rubrique \"Projet\"=====**\n\n==A partir de petites animations, tu vas découvrir comment utiliser ton espace projet. Clique sur la question qui se rapproche de celle que tu te poses :==\n\n - [[AideUn Comment écrire, mettre en page et sauvegarder sur une page ?]]\n - [[AideDeux Comment créer une nouvelle page dans l''espace projet ?]]\n - [[AideTrois Comment mettre en ligne un document dans mon projet, illustrer mes textes avec une image ?]]\n - [[AideQuatre Comment créer un menu dans l''espace de mon projet ?]]\n - [[AideCinq Comment faire des liens vers d''autres sites ou d''autres pages dans mon projet ?]]\n\n=====Et aussi... =====\n\n - [[PageMemo un petit mémo général]]\n\n - ReglesDeFormatage : résumé des syntaxes \"\"WikiNi\"\" permettant la mise en forme du texte.\n\n - ListeDesActionsWikini : liste des actions disponibles dans [[http://www.wikini.net WikiNi]].\n\n - ControlerLAccesAuxPages : explique comment gérer les droits d''accès aux pages de [[http://www.wikini.net WikiNi]].\n\n - [[http://www.wikini.net un site pleins d''infos sur le WikiNi]]\n\n - Pour poser des questions plus spécifiques [[http://ekotribu.org/papyrus.php?site=1&menu=15&wiki=FaQ C''est ici !]]\n\n----', '', '', 'ekotribu', 'Y', 'page', ''),
(61, 'AccueiL', '2006-09-21 10:53:19', '======Bienvenue sur L''Ekotribu !======\n\n----\n\n=====ICI, C''EST L''ESPACE DE TON PROJET=====\n\nEn tant que participant, tu vas pouvoir **créer tes propres pages** et ton menu pour présenter aux autres participants tes projets mais aussi expliquer, **étape par étape**, tes avancements et tes questionnements. Cet espace, **c''est à toi de le compléter**, autant de fois que tu le souhaites.\n\n\n----\n\n=====Quelques pistes pour personnaliser ton espace :=====\n\n - Double-clique sur la page pour rédiger.\n - Pour trouver les réponses à toutes tes questions, [[http://ekotribu.org/papyrus.php?site=1&menu=15 clique ici !]] \n - Pour apprendre à rédiger, mettre des photos, des liens sur l''espace projet, clique sur l''aide, dans ton menu à gauche\n\n\n----\n\n====Un petit exercice pour s''échauffer ?====\n\n[[http://ekotribu.org/images/Grenouille.jpg image]]\n\nCommence par personnaliser cette page en supprimant tout le texte de bienvenue pour créer ton propre texte sur ton projet. **C''est parti !!**', '', '', 'ekotribu', 'Y', 'page', ''),
(64, 'ReglesDeFormatage', '2006-09-21 12:59:40', '[[AccueiL Retour]]\n\n====== Guide des règles de formatage ======\n\nLes règles de formatage avec Wakka diffèrent légèrement des autres Wikis. (Voir par exemple [[http://c2.com/cgi/wiki?TextFormattingRules les règles de formatage de WikiWikiWeb]], le premier Wiki connu.)\nTout texte placé entre deux guillemets doubles - \" - est présenté tel que.\n\nVous pouvez effectuer vos propres tests dans le BacASable : c''est un endroit fait pour ça.\n\n=== Règles de base : ===\n \"\"**Texte en gras !** -----\"\"> **Texte en gras !**\n \"\"//Texte en italique.// -----\"\"> //Texte en italique.//\n \"\"Texte __souligné__ ! -----\"\"> Texte __souligné__ !\n \"\"##texte à espacement fixe## -----\"\"> ##texte à espacement fixe##\n \"\"%%code%%\"\"\n \"\"%%(php) PHP code%%\"\"\n\n=== Liens forcés : ===\n \"\"[[http://www.mon-site.org]]\"\"\n \"\"[[http://www.mon-site.org Mon-site]]\"\"\n \"\"[[P2P]]\"\"\n \"\"[[P2P Page sur le P2P]]\"\"\n\n=== Liens dans Wikini ===\n Pour réaliser un lien dans wikini qui apparaisse avec un style normal utilisez cette écriture :\n \"\"[[ReglesDeFormatage Règles de Formatage]]\"\"\n Le lien apparaîtra de cette manière [[ReglesDeFormatage Règles de Formatage]].\n\n=== En-têtes : ===\n \"\"====== En-tête énorme ======\"\" ====== En-tête énorme ======\n \"\"===== En-tête très gros =====\"\" ===== En-tête très gros =====\n \"\"==== En-tête gros ====\"\" ==== En-tête gros ====\n \"\"=== En-tête normal ===\"\" === En-tête normal ===\n \"\"== Petit en-tête ==\"\" == Petit en-tête ==\n\n=== Séparateur horizontal : ===\n \"\"----\"\"\n\n=== Retour de ligne forcé : ===\n \"\"---\"\"\n=== Indentation : ===\nL''indentation de textes se fait avec la touche \"TAB\". Vous pouvez aussi créer des listes à puces ou numérotées :\n \"\"- liste à puce\"\"\n \"\"1) liste numérotée (chiffres arabes)\"\"\n \"\"A) liste numérotée (capitales alphabétiques)\"\"\n \"\"a) liste numérotée (minuscules alphabétiques)\"\"\n \"\"i) liste numérotée (chiffres romains)\"\"\n\n=== Inclure une image ===\n\n - Pour inclure un lien sur une image (sans l''inclure à la page):\n \"\"[[http://wiki.tela-botanica.org/eflore/bibliotheque/images/table.gif]]\"\"(ne pas indiquer de texte alternatif).\n Ce qui donne : [[http://wiki.tela-botanica.org/eflore/bibliotheque/images/table.gif]]\n\n - Pour inclure une image sans indiquer de texte alternatif :\n \"\"[[http://wiki.tela-botanica.org/eflore/bibliotheque/images/table.gif]]\"\"(laisser 3 espaces blancs avant la fermeture des crochets).\n Ce qui donne quand l''image est trouvée : [[http://wiki.tela-botanica.org/eflore/bibliotheque/images/table.gif]]\n Quand l''image n''est pas trouvée : [[http://wiki.tela-botanica.org/eflore/bibliotheque/table.gif]]\n\n - Pour inclure une image en indiquant un texte alternatif :\n \"\"[[http://wiki.tela-botanica.org/eflore/bibliotheque/images/table.gif une puce ]]\"\"\n Ce qui donne quand l''image est trouvée : [[http://wiki.tela-botanica.org/eflore/bibliotheque/images/table.gif une puce ]]\n Quand l''image n''est pas trouvée : [[http://wiki.tela-botanica.org/eflore/bibliotheque/table.gif une puce ]]\n\n//Note :// le texte alternatif est affiché à la place de l''image s''il y a une erreur lors de l''affichage de celle-ci.\n\n=== Outils avancés : ===\n\n \"\"{{Backlinks}}\"\" permet de créer un lien vers la page précédente. \n \"\"{{Listusers}}\"\" affiche la liste des utilisateurs du site wikini.\n \"\"{{OrphanedPages}}\"\" affiche les pages orphelines du site wikini.\n \"\"{{ListPages/tree}}\"\" affiche le plan du site wikini.\n \"\"{{pageindex}}\"\" affiche un index des pages du site classées par lettres alphabétiques.\n \"\"{{ListPages}}\"\" affiche un index des pages du site avec le nom de leur propriétaire.\n \"\"{{WantedPages}}\"\" affiche la liste des pages restant à créer. Elles apparaissent dans le site avec un ? à la suite de leur nom.\n \"\"{{RecentChanges}}\"\" affiche la liste des sites faisant référence au site wikini.\n \"\"{{RecentlyCommented}}\"\" affichage de la liste des derniers commentaires.\n \"\"{{TextSearch}}\"\" recherche de texte dans les pages du site.\n\n**Note :** à cause d''un [[http://bugzilla.mozilla.org/show_bug.cgi?id=10547 bogue dans son moteur de rendu]], les listes, utilisant la touche TAB, ne fonctionnent pas (encore) sous Mozilla.\nUne astuce consiste à réaliser une tabulation dans un éditeur de texte puis de la copier. On peut ensuite coller la tabulation dans la zone de saisie de Wikini.\nVous pouvez également indenter du texte en utilisant des caractères espace au lieu de la touche \"TAB\", les exemples ci-dessus restent valables mais attention à ne pas mélanger des \"TAB\" et des espaces dans la même énumération.\n\n---', '', '', 'ekotribu', 'Y', 'page', ''),
(66, 'PageMenu', '2006-09-21 14:30:48', '======Menu======\n\n - [[AccueiL Page d''accueil]]\n - [[AideWikiNi Aide]]\n\n\n\n\n\n\n\n\n\n\n\n\n\n\"\"<div class=\"centrage\"><a id=\"rss\" href=\"wakka.php?wiki=DerniersChangementsRSS/xml\"><img src=\"http://ekotribu.org/images/rss.png\" alt=\"Syndication RSS\" /></a></div>\"\"', '', '', 'ekotribu', 'Y', 'page', '');
");
} // end of member function creation_tables
 
/**
166,14 → 176,11
*/
function suppression_tables( $prefixe )
{
 
// Trop dangereux !!!!
 
// $resultat = $this->_db->query("DROP TABLE ".$prefixe."_acls ,".$prefixe."_links ,".$prefixe."_pages ,".
// $prefixe."_referrers ,".$prefixe."_users") ;
// if (DB::isError ($resultat)) {
// echo ('Echec de la requete de suppression <br />'.$resultat->getMessage()) ;
// }
$resultat = $this->_db->query("DROP TABLE `".$prefixe."_acls` ,`".$prefixe."_links` ,`".$prefixe."_pages` ,`".
$prefixe."_referrers` ,`".$prefixe."_users`") ;
if (DB::isError ($resultat)) {
echo ('Echec de la requete de suppression <br />'.$resultat->getMessage()) ;
}
} // end of member function suppression_tables