| 1 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,26 @@ |
| 1 |
+<?php |
|
| 2 |
+define("_BASEDIR", "../");
|
|
| 3 |
+include("../config.php");
|
|
| 4 |
+include("../includes/dbfunctions.php");
|
|
| 5 |
+list($tableprefix, $language) = dbrow(dbquery("SELECT tableprefix, language FROM ".$settingsprefix."fanfiction_settings WHERE sitekey = '$sitekey'"));
|
|
| 6 |
+define("TABLEPREFIX", $tableprefix);
|
|
| 7 |
+if(file_exists(_BASEDIR."languages/{$language}.php")) include (_BASEDIR."languages/{$language}.php");
|
|
| 8 |
+else include (_BASEDIR."languages/en.php"); |
|
| 9 |
+include("../includes/queries.php");
|
|
| 10 |
+ |
|
| 11 |
+header("Content-Type: text/html; charset="._CHARSET);
|
|
| 12 |
+ |
|
| 13 |
+$users = dbquery("SELECT "._UIDFIELD." as uid, "._PENNAMEFIELD." as username FROM "._AUTHORTABLE." WHERE LOWER(".
|
|
| 14 |
+ _PENNAMEFIELD.") LIKE \"".escapestring($_GET['str'])."%\" ORDER BY username ASC limit 10"); |
|
| 15 |
+echo "var element = '".$_GET['element']."';\n"; |
|
| 16 |
+while($u = dbassoc($users)) {
|
|
| 17 |
+ $userlist[$u['uid']] = $u['username']; |
|
| 18 |
+} |
|
| 19 |
+if(count($userlist) > 0) {
|
|
| 20 |
+ $x = 0; |
|
| 21 |
+ foreach($userlist as $k => $v) {
|
|
| 22 |
+ echo "userList[$x] = new Array('$k','$v');\n";
|
|
| 23 |
+ $x++; |
|
| 24 |
+ } |
|
| 25 |
+} |
|
| 26 |
+?> |
|
| 0 | 27 |
\ No newline at end of file |