Lista userów dla wszystkich
|
Wolverine |
Dodany dnia 03.05.2007 21:08:47
|
Przedszkolak
Postów: 22
Data rejestracji: 24.04.2007 14:26
|
Witam, jak mogę zmienić, aby lista userów była dostępna dla wszystkich? Dla gości itd.
Mój kod Members.php:
<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright ę 2002 - 2005 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------*/
require_once "maincore.php";
require_once "subheader.php";
require_once "side_left.php";
include LOCALE.LOCALESET."members-profile.php";
opentable($locale['400']);
[color=red]if (iMEMBER) {[/color]
if (!isset($sortby) || !preg_match("/^[A-Z]$/", $sortby)) $sortby = "all";
$orderby = ($sortby == "all" ? "" : " WHERE user_name LIKE '".stripinput($sortby)."%'");
$result = dbquery("SELECT * FROM ".$db_prefix."users".$orderby."");
$rows = dbrows($result);
if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0;
if ($rows != 0) {
$i = 0;
echo "<table align='center' cellpadding='0' cellspacing='1' width='100%' class='tbl-border'>
<tr>
<td class='tbl2'><b>".$locale['401']."</b></td>
<td align='center' width='1%' class='tbl2' style='white-space:nowrap'><b>".$locale['402']."</b></td>
</tr>\n";
$result = dbquery("SELECT * FROM ".$db_prefix."users".$orderby." ORDER BY user_level DESC, user_name LIMIT $rowstart,20");
while ($data = dbarray($result)) {
$cell_color = ($i % 2 == 0 ? "tbl1" : "tbl2"); $i++;
echo "<tr>\n<td class='$cell_color'>\n<a href='".seoname($data['user_name'])."-id-".$data['user_id'].".htm' style='color:#".$data['user_color']."'>".$data['user_prefix'].$data['user_name']."</a></td>\n";
echo "<td align='center' width='1%' class='$cell_color' style='white-space:nowrap'>".getuserlevel($data['user_level'])."</td>\n</tr>";
}
echo "</table>\n";
} else {
echo "<center><br>\n".$locale['403']."$sortby<br><br>\n</center>\n";
}
$search = array(
"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R",
"S","T","U","V","W","X","Y","Z","0","1","2","3","4","5","6","7","8","9"
);
echo "<hr>\n<table align='center' cellpadding='0' cellspacing='1' class='tbl-border'>\n<tr>\n";
echo "<td rowspan='2' class='tbl2'><a href='".FUSION_SELF."?sortby=all'>".$locale['404']."</a></td>";
for ($i=0;$i < 36!="";$i++) {
echo "<td align='center' class='tbl1'><div class='small'><a href='".FUSION_SELF."?sortby=".$search[$i]."'>".$search[$i]."</a></div></td>";
echo ($i==17 ? "<td rowspan='2' class='tbl2'><a href='".FUSION_SELF."?sortby=all'>".$locale['404']."</a></td>\n</tr>\n<tr>\n" : "\n");
}
echo "</tr>\n</table>\n";
[color=red]} else {
echo "<center><br>\n".$locale['003']."<br><br>\n</center>\n";
}[/color]
closetable();
if ($rows > 20) echo "<div align='center' style='margin-top:5px;'>".makePageNav($rowstart,20,$rows,3,FUSION_SELF."?sortby=$sortby&")."\n</div>\n";
require_once "side_right.php";
require_once "footer.php";
?> Czekam na pomoc.
Na czerwono masz do usuniecia/Pieka
Edytowane przez Pieka dnia 04.05.2007 13:33:52
|
|
|
|
Wścibski Gość |
Dodany dnia 25.11.2024 14:48:34
|
Pan Kontekstualny
Postów: n^x
Data rejestracji: Zawsze
|
|
IP: localhost |
|
|
szer |
Dodany dnia 03.05.2007 21:09:47
|
Zaawansowany
Postów: 1139 Pomógł: 4
Data rejestracji: 13.11.2004 23:06
|
if (iMEMBER) {
zamień na
if (iGUEST) {
|
|
|
|
Pieka |
Dodany dnia 03.05.2007 21:13:13
|
Postów: 19882 Pomógł: 767
v7.02.03 Data rejestracji: 23.02.2005 18:12
|
Nie, jak tak zrobi, to tylko goscie beda mieli dostep
Musi po prostu usunac if.
Jestem jaki jestem
|
|
|
|
szer |
Dodany dnia 03.05.2007 23:01:17
|
Zaawansowany
Postów: 1139 Pomógł: 4
Data rejestracji: 13.11.2004 23:06
|
Ah racja @Pieka racja . O tym nie pomyślałem . Hehehe. |
|
|
|
Wolverine |
Dodany dnia 04.05.2007 13:20:49
|
Przedszkolak
Postów: 22
Data rejestracji: 24.04.2007 14:26
|
Pokazuje się błąd :/ mógłby ktoś usunąć z powyższego kodu usunąć zbędne i wstawić do posta? |
|
|
|
szer |
Dodany dnia 04.05.2007 13:32:44
|
Zaawansowany
Postów: 1139 Pomógł: 4
Data rejestracji: 13.11.2004 23:06
|
<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright ę 2002 - 2005 Nick Jones
| http://www.php-fu...
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------*/
require_once "maincore.php";
require_once "subheader.php";
require_once "side_left.php";
include LOCALE.LOCALESET."members-profile.php";
opentable($locale['400']);
if (!isset($sortby) || !preg_match("/^[A-Z]$/", $sortby)) $sortby = "all";
$orderby = ($sortby == "all" ? "" : " WHERE user_name LIKE '".stripinput($sortby)."%'");
$result = dbquery("SELECT * FROM ".$db_prefix."users".$orderby."");
$rows = dbrows($result);
if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0;
if ($rows != 0) {
$i = 0;
echo "<table align='center' cellpadding='0' cellspacing='1' width='100%' class='tbl-border'>
<tr>
<td class='tbl2'><b>".$locale['401']."</b></td>
<td align='center' width='1%' class='tbl2' style='white-space:nowrap'><b>".$locale['402']."</b></td>
</tr>\n";
$result = dbquery("SELECT * FROM ".$db_prefix."users".$orderby." ORDER BY user_level DESC, user_name LIMIT $rowstart,20");
while ($data = dbarray($result)) {
$cell_color = ($i % 2 == 0 ? "tbl1" : "tbl2"); $i++;
echo "<tr>\n<td class='$cell_color'>\n<a href='".seoname($data['user_name'])."-id-".$data['user_id'].".htm' style='color:#".$data['user_color']."'>".$data['user_prefix'].$data['user_name']."</a></td>\n";
echo "<td align='center' width='1%' class='$cell_color' style='white-space:nowrap'>".getuserlevel($data['user_level'])."</td>\n</tr>";
}
echo "</table>\n";
} else {
echo "<center><br>\n".$locale['403']."$sortby<br><br>\n</center>\n";
}
$search = array(
"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R",
"S","T","U","V","W","X","Y","Z","0","1","2","3","4","5","6","7","8","9"
);
echo "<hr>\n<table align='center' cellpadding='0' cellspacing='1' class='tbl-border'>\n<tr>\n";
echo "<td rowspan='2' class='tbl2'><a href='".FUSION_SELF."?sortby=all'>".$locale['404']."</a></td>";
for ($i=0;$i < 36!="";$i++) {
echo "<td align='center' class='tbl1'><div class='small'><a href='".FUSION_SELF."?sortby=".$search[$i]."'>".$search[$i]."</a></div></td>";
echo ($i==17 ? "<td rowspan='2' class='tbl2'><a href='".FUSION_SELF."?sortby=all'>".$locale['404']."</a></td>\n</tr>\n<tr>\n" : "\n");
}
echo "</tr>\n</table>\n";
closetable();
if ($rows > 20) echo "<div align='center' style='margin-top:5px;'>".makePageNav($rowstart,20,$rows,3,FUSION_SELF."?sortby=$sortby&")."\n</div>\n";
require_once "side_right.php";
require_once "footer.php";
?>
|
|
|
|
Wolverine |
Dodany dnia 05.05.2007 08:54:22
|
Przedszkolak
Postów: 22
Data rejestracji: 24.04.2007 14:26
|
Ok, działa wielkie dzięki :* |
|
|