|
Revision 2, 0.6 kB
(checked in by sven, 3 years ago)
|
importing elgg-0.1.1a
|
| Line | |
|---|
| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
if (isset($parameter)) { |
|---|
| 4 |
|
|---|
| 5 |
$name = addslashes($parameter); |
|---|
| 6 |
|
|---|
| 7 |
$searchline = "select distinct name, username, match(name) against ('".$name."') as score from users where "; |
|---|
| 8 |
$searchline .= "(match(name) against ('".$name."') > 0) limit 20"; |
|---|
| 9 |
|
|---|
| 10 |
$results = db_query($searchline); |
|---|
| 11 |
|
|---|
| 12 |
if (sizeof($results) > 0) { |
|---|
| 13 |
|
|---|
| 14 |
$run_result .= "<h2>Matching users:</h2><p>"; |
|---|
| 15 |
foreach($results as $returned_name) { |
|---|
| 16 |
$run_result .= "<a href=\"/".stripslashes($returned_name->username)."/\">" . stripslashes($returned_name->name) . "</a> <br />"; |
|---|
| 17 |
} |
|---|
| 18 |
$run_result .= "</p>"; |
|---|
| 19 |
|
|---|
| 20 |
} |
|---|
| 21 |
|
|---|
| 22 |
} |
|---|
| 23 |
|
|---|
| 24 |
?> |
|---|