|
Revision 45, 0.6 kB
(checked in by sven, 3 years ago)
|
dos2unix to clean line endings, set svn property eol-style native, some whitespace homogenisation
|
- Property svn:eol-style set to
native
|
| Line | |
|---|
| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
include("../includes.php"); |
|---|
| 4 |
|
|---|
| 5 |
$people = db_query("select * from users where ident != 8"); |
|---|
| 6 |
$friends = db_query("select * from friends where owner != 8 and friend != 8"); |
|---|
| 7 |
|
|---|
| 8 |
echo "digraph G {\n\n"; |
|---|
| 9 |
|
|---|
| 10 |
foreach($people as $person) { |
|---|
| 11 |
|
|---|
| 12 |
$name = stripslashes($person->name); |
|---|
| 13 |
$name = preg_replace('/[^\w ]/i','',$name); |
|---|
| 14 |
|
|---|
| 15 |
echo "\tuser" . $person->ident; |
|---|
| 16 |
|
|---|
| 17 |
if ($person->user_type == "community") { |
|---|
| 18 |
echo "fillcolor=\"gold\""; |
|---|
| 19 |
} |
|---|
| 20 |
echo "]";*/ |
|---|
| 21 |
echo ";\n"; |
|---|
| 22 |
|
|---|
| 23 |
} |
|---|
| 24 |
|
|---|
| 25 |
foreach($friends as $friend) { |
|---|
| 26 |
|
|---|
| 27 |
echo "\tuser" . $friend->owner . " -> user" . $friend->friend . ";\n"; |
|---|
| 28 |
|
|---|
| 29 |
} |
|---|
| 30 |
|
|---|
| 31 |
echo "\n}"; |
|---|
| 32 |
|
|---|
| 33 |
?> |
|---|