Subversion Repositories Applications.papyrus

Compare Revisions

Ignore whitespace Rev 432 → Rev 433

/trunk/client/integrateur_wikini/bibliotheque/wikini/actions/orphanedpages.php
New file
0,0 → 1,15
<?php
 
if ($pages = $this->LoadOrphanedPages())
{
foreach ($pages as $page)
{
print($this->ComposeLinkToPage($page["tag"], "", "", 0)."<br />\n");
}
}
else
{
print("<i>Pas de pages orphelines</i>");
}
 
?>
/trunk/client/integrateur_wikini/bibliotheque/wikini/actions/recentlycommented.php
New file
0,0 → 1,25
<?php
 
if ($pages = $this->LoadRecentlyCommented())
{
foreach ($pages as $page)
{
// day header
list($day, $time) = explode(" ", $page["time"]);
if ($day != $curday)
{
if ($curday) print("<br />\n");
print("<b>$day:</b><br />\n");
$curday = $day;
}
 
// print entry
print("&nbsp;&nbsp;&nbsp;(".$page["comment_time"].") <a href=\"".$this->href("", $page["tag"], "show_comments=1")."#".$page["comment_tag"]."\">".$page["tag"]."</a> . . . . dernier commentaire par ".$this->Format($page["comment_user"])."<br />\n");
}
}
else
{
print("<i>Aucune page n'a été commentée récemment.</i>");
}
 
?>
/trunk/client/integrateur_wikini/bibliotheque/wikini/actions/recentcomments.php
New file
0,0 → 1,25
<?php
 
if ($comments = $this->LoadRecentComments())
{
foreach ($comments as $comment)
{
// day header
list($day, $time) = explode(" ", $comment["time"]);
if ($day != $curday)
{
if ($curday) print("<br />\n");
print("<b>$day:</b><br />\n");
$curday = $day;
}
 
// print entry
print("&nbsp;&nbsp;&nbsp;(".$comment["time"].") <a href=\"".$this->href("", $comment["comment_on"], "show_comments=1")."#".$comment["tag"]."\">".$comment["comment_on"]."</a> . . . . ".$this->Format($comment["user"])."<br />\n");
}
}
else
{
print("<i>Pas de commentaires récents.</i>");
}
 
?>
/trunk/client/integrateur_wikini/bibliotheque/wikini/actions/header.php
New file
0,0 → 1,46
<?php
$message = $this->GetMessage();
$user = $this->GetUser();
?>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
 
 
<head>
<title><?php echo $this->GetWakkaName().":".$this->GetPageTag(); ?></title>
<?php if ($this->GetMethod() != 'show')
echo "<meta name=\"robots\" content=\"noindex, nofollow\"/>\n";?>
<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 "wakka.css";</style>
<script type="text/javascript">
function fKeyDown() { if (event.keyCode == 9) {
event.returnValue= false;
document.selection.createRange().text = String.fromCharCode(9) } }
</script>
</head>
 
 
<body <?php echo (!$user || ($user["doubleclickedit"] == 'Y')) && ($this->GetMethod() == "show") ? "ondblclick=\"document.location='".$this->href("edit")."';\" " : "" ?>
<?php echo $message ? "onLoad=\"alert('".$message."');\" " : "" ?>
>
 
 
<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>
</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 êtes <?php echo $this->Format($this->GetUserName()); if ($user = $this->GetUser()) echo " (<a href=\"".$this->config["base_url"] ."ParametresUtilisateur&amp;action=logout\">Déconnexion</a>)\n"; ?>
</div>
/trunk/client/integrateur_wikini/bibliotheque/wikini/actions/listpages.php
New file
0,0 → 1,65
<?php
if (!function_exists("TreeView"))
{
function TreeView($node,$level,$indent=0)
{
global $wiki;
if ($level>0) {
$head=split(" :: ",$wiki->GetConfigValue("navigation_links"));
// we don't want page from the header
if (!in_array($node, $head, TRUE))
{
if (($indent>0) && (!($wiki->GetConfigValue("root_page")==$node)) || ($indent==0) )
{
// Ignore users too ...
if (!$wiki->LoadUser($node))
{
if ($indent)
print((str_repeat("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;",$indent)).$wiki->Link($node)."<br/>\n");
$pages = $wiki->LoadAll("select to_tag from ".$wiki->config["table_prefix"]."links where from_tag='".mysql_escape_string($node)."' order by to_tag asc");
 
if (is_array($pages)) {
foreach ($pages as $page)
{
$wiki->CachePage($page);
TreeView($page["to_tag"],$level-1,$indent+1);
}
}
}
}
}
}
}
}
 
if($sortkey = $this->GetParameter("sort")) {
if (($sortkey != "tag") && ($sortkey != "time") && ($sortkey != "owner") && ($sortkey != "user")) $sortkey = "tag";
$pages = $this->LoadAll("select tag, owner, user from ".$this->config["table_prefix"]."pages where latest = 'Y' and comment_on = '' order by $sortkey asc");
foreach ($pages as $page) {
$this->CachePage($page);
$owner=$page["owner"]?$page["owner"]:"Inconnu";
print("&nbsp;&nbsp;&nbsp;".$this->ComposeLinkToPage($page["tag"], "", "", 0)." . . . . ".$this->Format($owner).". . . . derni&egrave;re modification par " . $this->Format($page["user"]) . "<br/>\n");
}
}
// Tree display
else if ($sortkey = $this->GetParameter("tree"))
{
// No rootpage specified, assume root_page
if ($sortkey=="tree") $sortkey=$this->GetConfigValue("root_page");
print($this->ComposeLinkToPage($sortkey)."<br /><br/>\n");
 
// 3 levels displayed, It should be parameter ...
TreeView($sortkey,3);
 
}
// Default Action : sort by tag
else
{
$pages = $this->LoadAll("select tag, owner, user from ".$this->config["table_prefix"]."pages where latest = 'Y' and comment_on = '' order by tag asc");
foreach ($pages as $page) {
$this->CachePage($page);
$owner=$page["owner"]?$page["owner"]:"Inconnu";
print("&nbsp;&nbsp;&nbsp;".$this->ComposeLinkToPage($page["tag"], "", "", 0)." . . . . ".$this->Format($owner)."<br/>\n");
}
}
?>
/trunk/client/integrateur_wikini/bibliotheque/wikini/actions/listusers.php
New file
0,0 → 1,24
<?php
if ($last = $this->GetParameter("last"))
{
if ($last=="last") $last=150; else $last= (int) $last;
if ($last)
{
$last_users = $this->LoadAll("select name, signuptime from ".$this->config["table_prefix"]."users order by signuptime desc limit $last");
foreach($last_users as $user) { print($this->Format($user["name"])." . . . ".$user["signuptime"]."<br />\n"); }
}
}
 
else
{
if ($last_users = $this->LoadAll("select name, signuptime from ".$this->config["table_prefix"]."users order by name asc")
)
{
foreach($last_users as $user)
{
print($this->Format($user["name"])." . . . ".$user["signuptime"]."<br />\n");
}
}
}
 
?>
/trunk/client/integrateur_wikini/bibliotheque/wikini/actions/footer.php
New file
0,0 → 1,71
 
 
<div class="footer">
<?php
echo $this->FormOpen("", "RechercheTexte", "get");
echo $this->HasAccess("write") ? "<a href=\"".$this->href("edit")."\" title=\"Cliquez pour &eacute;diter cette page.\">&Eacute;diter cette page</a> ::\n" : "";
echo $this->GetPageTime() ? "<a href=\"".$this->href("revisions")."\" title=\"Cliquez pour voir les derni&egrave;res modifications sur cette page.\">".$this->GetPageTime()."</a> ::\n" : "";
// if this page exists
if ($this->page)
{
// if owner is current user
if ($this->UserIsOwner())
{
print
"Propri&eacute;taire&nbsp;: vous :: \n".
"<a href=\"".$this->href("acls")."\" title=\"Cliquez pour &eacute;diter les permissions de cette page.\">&Eacute;diter permissions</a> :: \n".
"<a href=\"".$this->href("deletepage")."\">Supprimer</a> :: \n";
}
else
{
if ($owner = $this->GetPageOwner())
{
print "Propri&eacute;taire : ".$this->Format($owner);
}
else
{
print "Pas de propri&eacute;taire ".($this->GetUser() ? "(<a href=\"".$this->href("claim")."\">Appropriation</a>)" : "");
}
print " :: \n";
}
}
?>
<a href="<?php echo $this->href("referrers") ?>" title="Cliquez pour voir les URLs faisant référence à cette page.">
References</a> ::
Recherche : <input name="phrase" size="15" class="searchbox" />
<?php echo $this->FormClose(); ?>
</div>
 
 
<div class="copyright">
<a href="http://validator.w3.org/check/referer">Valid XHTML 1.0</a> ::
<a href="http://jigsaw.w3.org/css-validator/check/referer">Valid CSS</a> ::
-- powered by <?php echo $this->Link("WikiNi:PagePrincipale", "", "WikiNi ".$this->GetWikiNiVersion()) . "\n"; ?>
</div>
 
 
<?php
if ($this->GetConfigValue("debug")=="yes")
{
print "<span class=\"debug\"><b>Query log :</b><br />\n";
$t_SQL=0;
foreach ($this->queryLog as $query)
{
print $query["query"]." (".round($query["time"],4).")<br />\n";
$t_SQL = $t_SQL + $query["time"];
}
print "</span>\n";
 
print "<span class=\"debug\">".round($t_SQL, 4)." s (total SQL time)</span><br />\n";
list($g2_usec, $g2_sec) = explode(" ",microtime());
define ("t_end", (float)$g2_usec + (float)$g2_sec);
print "<span class=\"debug\"><b>".round(t_end-t_start, 4)." s (total time)</b></span><br />\n";
 
print "<span class=\"debug\">SQL time represent : ".round((($t_SQL/(t_end-t_start))*100),2)."% of total time</span>\n";
}
?>
 
 
</body>
</html>
/trunk/client/integrateur_wikini/bibliotheque/wikini/actions/usersettings.php
New file
0,0 → 1,223
<?php
if ($_REQUEST["action"] == "logout")
{
$this->LogoutUser();
$this->SetMessage("Vous êtes maintenant déconnecté !");
$this->Redirect($this->href());
}
else if ($user = $this->GetUser())
{
// is user trying to update?
if ($_REQUEST["action"] == "update")
{
$this->Query("update ".$this->config["table_prefix"]."users set ".
"email = '".mysql_escape_string($_POST["email"])."', ".
"doubleclickedit = '".mysql_escape_string($_POST["doubleclickedit"])."', ".
"show_comments = '".mysql_escape_string($_POST["show_comments"])."', ".
"revisioncount = '".mysql_escape_string($_POST["revisioncount"])."', ".
"changescount = '".mysql_escape_string($_POST["changescount"])."', ".
"motto = '".mysql_escape_string($_POST["motto"])."' ".
"where name = '".$user["name"]."' limit 1");
$this->SetUser($this->LoadUser($user["name"]));
// forward
$this->SetMessage("Paramètres sauvegardés !");
$this->Redirect($this->href());
}
if ($_REQUEST["action"] == "changepass")
{
// check password
$password = $_POST["password"];
if (preg_match("/ /", $password)) $error = "Les espaces ne sont pas permis dans les mots de passe.";
else if (strlen($password) < 5) $error = "Password too short.";
else if ($user["password"] != md5($_POST["oldpass"])) $error = "Mauvais mot de passe.";
else
{
$this->Query("update ".$this->config["table_prefix"]."users set "."password = md5('".mysql_escape_string($password)."') "."where name = '".$user["name"]."'");
$this->SetMessage("Mot de passe changé !");
$user["password"]=md5($password);
$this->SetUser($user);
$this->Redirect($this->href());
}
}
// user is logged in; display config form
print($this->FormOpen());
?>
<input type="hidden" name="action" value="update" />
<table>
<tr>
<td align="right"></td>
<td>Hello, <?php echo $this->Link($user["name"]) ?>!</td>
</tr>
<tr>
<td align="right">Votre adresse e-mail :</td>
<td><input name="email" value="<?php echo htmlentities($user["email"]) ?>" size="40" /></td>
</tr>
<tr>
<td align="right">Edition en Doublecliquant :</td>
<td><input type="hidden" name="doubleclickedit" value="N" /><input type="checkbox" name="doubleclickedit" value="Y" <?php echo $user["doubleclickedit"] == "Y" ? "checked=\"checked\"" : "" ?> /></td>
</tr>
<tr>
<td align="right">Montrer les commentaires par default :</td>
<td><input type="hidden" name="show_comments" value="N" /><input type="checkbox" name="show_comments" value="Y" <?php echo $user["show_comments"] == "Y" ? "checked\"checked\"" : "" ?> /></td>
</tr>
<tr>
<td align="right">Nombre maximum de derniers commentaires :</td>
<td><input name="changescount" value="<?php echo htmlentities($user["changescount"]) ?>" size="40" /></td>
</tr>
<tr>
<td align="right">Nombre maximum de versions :</td>
<td><input name="revisioncount" value="<?php echo htmlentities($user["revisioncount"]) ?>" size="40" /></td>
</tr>
<tr>
<td align="right">Votre devise :</td>
<td><input name="motto" value="<?php echo htmlentities($user["motto"]) ?>" size="40" /></td>
</tr>
<tr>
<td></td>
<td><input type="submit" value="Mise à jour" /> <input type="button" value="Déconnection" onClick="document.location='<?php echo $this->href("", "", "action=logout"); ?>'" /></td>
</tr>
 
<?php
print($this->FormClose());
 
print($this->FormOpen());
?>
<input type="hidden" name="action" value="changepass" />
 
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td align="right"></td>
<td><?php echo $this->Format("Changement de mot de passe"); ?></td>
</tr>
<?php
if ($error)
{
print("<tr><td></td><td><div class=\"error\">".$this->Format($error)."</div></td></tr>\n");
}
?>
<tr>
<td align="right">Votre ancien mot de passe :</td>
<td><input type="password" name="oldpass" size="40" /></td>
</tr>
<tr>
<td align="right">Nouveau mot de passe :</td>
<td><input type="password" name="password" size="40" /></td>
</tr>
<tr>
<td></td>
<td><input type="submit" value="Changer" size="40" /></td>
</tr>
</table>
<?php
print($this->FormClose());
 
}
else
{
// user is not logged in
// is user trying to log in or register?
if ($_REQUEST["action"] == "login")
{
// if user name already exists, check password
if ($existingUser = $this->LoadUser($_POST["name"]))
{
// check password
if ($existingUser["password"] == md5($_POST["password"]))
{
$this->SetUser($existingUser, $_POST["remember"]);
$this->Redirect($this->href());
}
else
{
$error = "Mauvais mot de passe !";
}
}
// otherwise, create new account
else
{
$name = trim($_POST["name"]);
$email = trim($_POST["email"]);
$password = $_POST["password"];
$confpassword = $_POST["confpassword"];
 
// check if name is WikkiName style
if (!$this->IsWikiName($name)) $error = "Votre nom d'utilisateur dois être formaté en NomWiki.";
else if (!$email) $error = "Vous devez spécifier une adresse e-mail.";
else if (!preg_match("/^.+?\@.+?\..+$/", $email)) $error = "Ceci ne ressemble pas à une adresse e-mail.";
else if ($confpassword != $password) $error = "Les mots de passe n'étaient pas identiques";
else if (preg_match("/ /", $password)) $error = "Les espaces ne sont pas permis dans un mot de passe.";
else if (strlen($password) < 5) $error = "Mot de passe trop court. Un mot de passe doit contenir au minimum 5 caractères alphanumériques.";
else
{
$this->Query("insert into ".$this->config["table_prefix"]."users set ".
"signuptime = now(), ".
"name = '".mysql_escape_string($name)."', ".
"email = '".mysql_escape_string($email)."', ".
"password = md5('".mysql_escape_string($_POST["password"])."')");
 
// log in
$this->SetUser($this->LoadUser($name));
 
// forward
$this->Redirect($this->href());
}
}
}
print($this->FormOpen());
?>
<input type="hidden" name="action" value="login" />
<table>
<tr>
<td align="right"></td>
<td><?php echo $this->Format("Si vous êtes déjà enregistré, identifiez-vous ici"); ?></td>
</tr>
<?php
if ($error)
{
print("<tr><td></td><td><div class=\"error\">".$this->Format($error)."</div></td></tr>\n");
}
?>
<tr>
<td align="right">Votre NomWiki :</td>
<td><input name="name" size="40" value="<?php echo $name ?>" /></td>
</tr>
<tr>
<td align="right">Mot de passe (5 caractères minimum) :</td>
<td><input type="password" name="password" size="40" />
<input type="hidden" name="remember" value="0" /><input type="checkbox" name="remember" value="1" /> <?php echo $this->Format("Se souvenir de moi.") ?> </td>
</tr>
<tr>
<td></td>
<td><input type="submit" value="Identification" size="40" /></td>
</tr>
<tr>
<td align="right"></td>
<td width="500"><?php echo $this->Format("Les champs suivants sont à remplir si vous vous identifiez pour la première fois (vous créérez ainsi un compte)"); ?></td>
</tr>
<tr>
<td align="right">Confirmation du mot de passe :</td>
<td><input type="password" name="confpassword" size="40" /></td>
</tr>
<tr>
<td align="right">Adresse e-mail :</td>
<td><input name="email" size="40" value="<?php echo $email ?>" /></td>
</tr>
<tr>
<td></td>
<td><input type="submit" value="Nouveau compte" size="40" /></td>
</tr>
</table>
<?php
print($this->FormClose());
}
?>
 
/trunk/client/integrateur_wikini/bibliotheque/wikini/actions/backlinks.php
New file
0,0 → 1,15
<?php
 
if ($pages = $this->LoadPagesLinkingTo($this->getPageTag()))
{
print("Pages ayant un lien vers la page courante : <br />\n");
foreach ($pages as $page)
{
print($this->ComposeLinkToPage($page["tag"])."<br />\n");
}
}
else
{
print("<i>Aucune page n'a de lien vers ".$this->ComposeLinkToPage($this->getPageTag()).".</i>");
}
?>
/trunk/client/integrateur_wikini/bibliotheque/wikini/actions/interwikilist.php
New file
0,0 → 1,4
<?php
$file = implode("", file("interwiki.conf", 1));
print($this->Format("%%".$file."%%"));
?>
/trunk/client/integrateur_wikini/bibliotheque/wikini/actions/recentchangesrss.php
New file
0,0 → 1,41
<?php
if ($user = $this->GetUser())
{
$max = $user["changescount"];
}
else
{
$max = 50;
}
 
if ($pages = $this->LoadRecentlyChanged($max))
{
if (!($link = $this->GetParameter("link"))) $link=$this->config["root_page"];
$output = "<?xml version=\"1.0\" encoding=\"iso-8859-1\" ?>\n";
$output .= "<!-- RSS v0.91 generated by Wikini -->\n";
$output .= "<rdf:RDF\n";
$output .= "xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\n";
$output .= "xmlns=\"http://my.netscape.com/publish/formats/rss-0.91.dtd\">\n";
$output .= "<channel>\n";
$output .= "<title> Derniers changements sur ". $this->config["wakka_name"] . "</title>\n";
$output .= "<link>" . $this->config["base_url"] . $link . "</link>\n";
$output .= "<description> Derniers changements sur " . $this->config["wakka_name"] . " </description>\n";
$output .= "<language>fr</language>\n";
$output .= "</channel>\n";
 
foreach ($pages as $i => $page)
{
list($day, $time) = explode(" ", $page["time"]);
$day= preg_replace("/-/", " ", $day);
list($hh,$mm,$ss) = explode(":", $time);
$output .= "<item>\n";
$output .= "<title>" . $page["tag"] . " --- par " .$page["user"] . " le " . $day ." - ". $hh .":". $mm . "</title>\n";
$output .= "<description> Modification de " . $page["tag"] . " --- par " .$page["user"] . " le " . $day ." - ". $hh .":". $mm . "</description>\n";
$output .= "<link>" . $this->config["base_url"] . $page["tag"] . "&amp;time=" . rawurlencode($page["time"]) . "</link>\n";
$output .= "</item>\n";
}
$output .= "</rdf:RDF>\n";
print($output);
}
?>
/trunk/client/integrateur_wikini/bibliotheque/wikini/actions/wantedpages.php
New file
0,0 → 1,14
<?php
if ($pages = $this->LoadWantedPages())
{
foreach ($pages as $page)
{
print($this->Link($page["tag"])." (<a
ref=\"".$this->href()."&amp;linking_to=".$page["tag"]."\">".$page["count"]."</a>)<br />\n");
}
}
else
{
print("<i>Aucune page à créer.</i>");
}
?>
/trunk/client/integrateur_wikini/bibliotheque/wikini/actions/pageindex.php
New file
0,0 → 1,28
<?php
 
if ($pages = $this->LoadAllPages())
{
foreach ($pages as $page)
{
if (!preg_match("/^Comment/", $page["tag"])) {
$firstChar = strtoupper($page["tag"][0]);
if (!preg_match("/[A-Z,a-z]/", $firstChar)) {
$firstChar = "#";
}
 
if ($firstChar != $curChar) {
if ($curChar) print("<br />\n");
print("<b>$firstChar</b><br />\n");
$curChar = $firstChar;
}
 
print($this->ComposeLinkToPage($page["tag"])."<br />\n");
}
}
}
else
{
print("<i>Aucune page trouv&eacute;e.</i>");
}
 
?>
/trunk/client/integrateur_wikini/bibliotheque/wikini/actions/resetpassword.php
New file
0,0 → 1,59
<?php
 
if (($user = $this->GetUser()) && ($user["name"]==$this->GetConfigValue("admin")) && $this->GetConfigValue("admin"))
{
 
if (($_REQUEST["action"] == "resetpass"))
{
$this->Query("update ".$this->config["table_prefix"]."users set ".
"password = md5('".mysql_escape_string($_POST["password"])."') ".
"where name = '".mysql_escape_string($_POST["name"])."' limit 1");
$this->SetMessage("Mot de passe réinitialisé !");
$this->Redirect($this->href());
}
else
{
$error="";
//$error = "Il est interdit de réinistialiser le mot de pass de cet utilisateur ! Non mais !";
}
print($this->FormOpen());
$name=$_GET["name"];
?>
<input type="hidden" name="action" value="resetpass">
<table>
<tr>
<td align="right"></td>
<td><?php echo $this->Format("Réinitialisation du mot de passe"); ?></td>
</tr>
<?php
if ($error)
{
print("<tr><td></td><td><div class=\"error\">".$this->Format($error)."</div></td></tr>\n");
}
?>
<tr>
<td align="right">Login:</td>
<td><input name="name" size="40" value="<?php echo $name ?>"></td>
</tr>
<tr>
<td align="right">Nouveau mot de passe:</td>
<td><input type="password" name="password" size="40"></td>
</tr>
<tr>
<td></td>
<td><input type="submit" value="Reset password" size="40"></td>
</tr>
</table>
<?php
print($this->FormClose());
}
else
{
print("<i>Vous n'avez pas les permissions nécessaires pour l'exécution de cette action.</i>");
}
 
?>
/trunk/client/integrateur_wikini/bibliotheque/wikini/actions/mypages.php
New file
0,0 → 1,50
<?php
 
// actions/mypages.php
// written by Carlo Zottmann
// http://wakkawikki.com/CarloZottmann
 
if ($user = $this->GetUser())
{
print("<b>Liste des pages dont vous &ecirc;tes le propri&eacute;taire.</b><br /><br />\n");
 
$my_pages_count = 0;
 
if ($pages = $this->LoadAllPages())
{
foreach ($pages as $page)
{
if ($this->UserName() == $page["owner"] && !preg_match("/^Comment/", $page["tag"])) {
$firstChar = strtoupper($page["tag"][0]);
if (!preg_match("/[A-Z,a-z]/", $firstChar)) {
$firstChar = "#";
}
if ($firstChar != $curChar) {
if ($curChar) print("<br />\n");
print("<b>$firstChar</b><br />\n");
$curChar = $firstChar;
}
print($this->ComposeLinkToPage($page["tag"])."<br />\n");
$my_pages_count++;
}
}
if ($my_pages_count == 0)
{
print("<i>Vous n'&ecirc;tes le propri&eacute;taire d'aucune page.</i>");
}
}
else
{
print("<i>Aucune page trouv&eacute;e.</i>");
}
}
else
{
print("<i>Vous n'&ecirc;tes pas identifi&eacute; : impossible d'afficher la liste des pages que vous avez modifi&eacute;es.</i>");
}
 
?>
/trunk/client/integrateur_wikini/bibliotheque/wikini/actions/recentchanges.php
New file
0,0 → 1,46
<?php
 
// Which is the max number of pages to be shown ?
if ($max = $this->GetParameter("max"))
{
if ($max=="last") $max=50; else $last = (int) $max;
}
elseif ($user = $this->GetUser())
{
$max = $user["changescount"];
}
else
{
$max = 50;
}
 
// Show recently changed pages
if ($pages = $this->LoadRecentlyChanged($max))
{
if ($this->GetParameter("max"))
{
foreach ($pages as $i => $page)
{
// print entry
print("(".$page["time"].") (".$this->ComposeLinkToPage($page["tag"], "revisions", "historique", 0).") ".$this->ComposeLinkToPage($page["tag"], "", "", 0)." . . . . ".$this->Format($page["user"])."<br />\n");
}
}
else
{
$curday='';
foreach ($pages as $i => $page)
{
// day header
list($day, $time) = explode(" ", $page["time"]);
if ($day != $curday)
{
if ($curday) print("<br />\n");
print("<b>$day&nbsp;:</b><br />\n");
$curday = $day;
}
// print entry
print("&nbsp;&nbsp;&nbsp;(".$time.") (".$this->ComposeLinkToPage($page["tag"], "revisions", "historique", 0).") ".$this->ComposeLinkToPage($page["tag"], "", "", 0)." . . . . ".$this->Format($page["user"])."<br />\n");
}
}
}
?>
/trunk/client/integrateur_wikini/bibliotheque/wikini/actions/textsearch.php
New file
0,0 → 1,28
<?php echo $this->FormOpen("", "", "get") ?>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>Ce que vous souhaitez chercher :&nbsp;</td>
<td><input name="phrase" size="40" value="<?php echo htmlentities($_REQUEST["phrase"]) ?>" /> <input type="submit" value="Chercher" /></td>
</tr>
</table>
<?php echo $this->FormClose(); ?>
 
<?php
if ($phrase = $_REQUEST["phrase"])
{
print("<br />");
if ($results = $this->FullTextSearch($phrase))
{
print("<b>Résultat(s) de la recherche de \"$phrase\":</b><br /><br />\n");
foreach ($results as $i => $page)
{
print(($i+1).". ".$this->ComposeLinkToPage($page["tag"])."<br />\n");
}
}
else
{
print("Aucun résultat pour \"$phrase\". :-(");
}
}
 
?>
/trunk/client/integrateur_wikini/bibliotheque/wikini/actions/findpage.php
New file
0,0 → 1,0
The unfinished FindPage action.
/trunk/client/integrateur_wikini/bibliotheque/wikini/actions/mychanges.php
New file
0,0 → 1,95
<?php
 
// actions/mychanges.php
// written by Carlo Zottmann
// http://wakkawikki.com/CarloZottmann
 
if ($user = $this->GetUser())
{
$my_edits_count = 0;
 
if ($_REQUEST["bydate"] == 1)
{
print("<b>Liste des pages que vous avez modifi&eacute;es, tri&eacute;e par date de modification (<a href=\"".$this->href("", $tag)."\">tri alphab&eacute;tique</a>).</b><br /><br />\n");
 
if ($pages = $this->LoadAll("SELECT tag, time FROM ".$this->config["table_prefix"]."pages WHERE user = '".mysql_escape_string($this->UserName())."' AND tag NOT LIKE 'Comment%' ORDER BY time ASC, tag ASC"))
{
foreach ($pages as $page)
{
$edited_pages[$page["tag"]] = $page["time"];
}
 
$edited_pages = array_reverse($edited_pages);
 
foreach ($edited_pages as $page["tag"] => $page["time"])
{
// day header
list($day, $time) = explode(" ", $page["time"]);
if ($day != $curday)
{
if ($curday) print("<br />\n");
print("<b>$day:</b><br />\n");
$curday = $day;
}
 
// print entry
print("&nbsp;&nbsp;&nbsp;($time) (".$this->ComposeLinkToPage($page["tag"], "revisions", "history", 0).") ".$this->ComposeLinkToPage($page["tag"], "", "", 0)."<br />\n");
 
$my_edits_count++;
}
if ($my_edits_count == 0)
{
print("<i>Vous n'avez pas modifi&eacute; de page.</i>");
}
}
else
{
print("<i>Aucune page trouv&eacute;e.</i>");
}
}
else
{
print("<b>Liste des pages que vous avez modifi&eacute;es, tri&eacute;e par date de modification (<a href=\"".$this->href("", $tag)."&amp;bydate=1\">tri par date</a>).</b><br /><br />\n");
 
if ($pages = $this->LoadAll("SELECT tag, time FROM ".$this->config["table_prefix"]."pages WHERE user = '".mysql_escape_string($this->UserName())."' AND tag NOT LIKE 'Comment%' ORDER BY tag ASC, time DESC"))
{
foreach ($pages as $page)
{
if ($last_tag != $page["tag"]) {
$last_tag = $page["tag"];
$firstChar = strtoupper($page["tag"][0]);
if (!preg_match("/[A-Z,a-z]/", $firstChar)) {
$firstChar = "#";
}
if ($firstChar != $curChar) {
if ($curChar) print("<br />\n");
print("<b>$firstChar</b><br />\n");
$curChar = $firstChar;
}
// print entry
print("&nbsp;&nbsp;&nbsp;(".$page["time"].") (".$this->ComposeLinkToPage($page["tag"], "revisions", "history", 0).") ".$this->ComposeLinkToPage($page["tag"], "", "", 0)."<br />\n");
$my_edits_count++;
}
}
if ($my_edits_count == 0)
{
print("<i>Vous n'avez pas modifi&eacute; de page.</i>");
}
}
else
{
print("<i>Aucune page trouv&eacute;e.</i>");
}
}
}
else
{
print("<i>Vous n'etes pas identifi&eacute; : impossible d'afficher la liste des pages que vous avez modifi&eacute;es.</i>");
}
 
?>
/trunk/client/integrateur_wikini/bibliotheque/wikini/actions/test.php
New file
0,0 → 1,0
I'm a test!