Subversion Repositories Applications.projet

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 ddelon 1
<?php
2
 
3
/*
4
backlinks.php
5
 
6
Copyright 2002  Patrick PAUL
7
Copyright 2003  David DELON
8
Copyright 2003  Charles NEPOTE
9
 
10
This program is free software; you can redistribute it and/or modify
11
it under the terms of the GNU General Public License as published by
12
the Free Software Foundation; either version 2 of the License, or
13
(at your option) any later version.
14
 
15
This program is distributed in the hope that it will be useful,
16
but WITHOUT ANY WARRANTY; without even the implied warranty of
17
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
GNU General Public License for more details.
19
 
20
You should have received a copy of the GNU General Public License
21
along with this program; if not, write to the Free Software
22
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
23
*/
24
 
25
 
26
	if ($this->GetParameter("page"))
27
	{
28
		$page = $this->GetParameter("page");
29
		$title = "Pages ayant un lien vers ".$this->ComposeLinkToPage($page)."&nbsp;: <br />\n";
30
	}
31
	else
32
	{
33
		$page = $this->getPageTag();
34
		$title = "Pages ayant un lien vers la page courante&nbsp;: <br />\n";
35
	}
36
 
37
	$pages = $this->LoadPagesLinkingTo($page);
38
 
39
	if ($pages)
40
	{
41
		echo $title;
42
		if (!$exclude = $this->GetParameter("exclude"))
43
		{
44
			foreach ($pages as $page)
45
			{
46
				echo $this->ComposeLinkToPage($page["tag"]), "<br />\n";
47
			}
48
		}
49
		else
50
		{
51
			foreach ($pages as $page)
52
			{
53
				// Show link if it isn't an excluded link
54
				if (!preg_match("/".$page["tag"]."(;|$)/", $exclude)) echo $this->ComposeLinkToPage($page["tag"]), "<br />\n";
55
			}
56
		}
57
	}
58
	else
59
	{
60
		echo "<i>Aucune page n'a de lien vers ", $this->ComposeLinkToPage($page), ".</i>";
61
	}
62
?>