Przedszkolak
Postów: 41 Pomógł: 3
Data rejestracji: 09.12.2007 11:19
|
Witam wszystkich
Mam mały problem odnośnie modułu redakcja. Chciałbym dodać do tego modu możliwość wyświetlania użytkowników z danej grupy np o id=5. Czy posiada może ktoś taką modyfikację lub mógłby mod redakcja odpowiednio zmienić? Z góry dziękuję
Oto kod modułu redakcja
<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2005 Nick Jones
| http://www.php-fusion.co.uk/
| Team - Mod v2 by Daniel (Divine JazOOn) Rynduch
| http://power.portal.4cms.pl
| http://jazoon.themes.of.pl
|
| and Wooya
| http://mfusion.2loud.net.pl
|
+----------------------------------------------------+
| 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("Administracja");
echo "<center><br><b>Super Administratorzy</b></center><br>";
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;
$result = dbquery("SELECT * FROM ".$db_prefix."users".$orderby." WHERE user_level = 103 ORDER BY user_level DESC, user_name LIMIT $rowstart,20");
while ($data = dbarray($result)) {
$cell_color = ($i % 2 == 0 ? "tbl1" : "tbl2"); $i++;
echo "<table align='center' cellpadding='0' cellspacing='1' width='100%' class='tbl-border'>\n";
echo "<tr>\n<td width='50%' align='center' class='tbl2'>\n<a href='profile.php?lookup=".$data['user_id']."'>".$data['user_name']."</a></td>";
echo "<td align='center' rowspan='5' class='tbl2'>\n";
echo ($data['user_avatar'] ? "<img src='".IMAGES."avatars/".$data['user_avatar']."' alt='".$locale['u017']."'>" : $locale['u046'])."</td>\n";
echo "<td align='center' width='50%' class='tbl2' style='white-space:nowrap'>Doł±czył: ".showdate("longdate", $data['user_joined'])."</td>\n</tr>
<tr>
<td align='center' class='tbl1'>Lokalizacja: ".($data['user_location'] ? $data['user_location'] : $locale['u048'])."</td>
<td align='center' class='tbl1'>Postów w Shoutbox: <b>".number_format(dbcount("(shout_id)", "shoutbox", "shout_name='".$data['user_id']."'"))."</b></td>
</tr>
<tr>
<td align='center' class='tbl2'>Data urodzenia: ";
if ($data['user_birthdate'] != "0000-00-00") {
$months = explode("|", $locale['months']);
$user_birthdate = explode("-", $data['user_birthdate']);
echo $months[number_format($user_birthdate['1'])]." ".number_format($user_birthdate['2'])." ".$user_birthdate['0'];
} else {
echo $locale['u048'];
}
echo "</td>
<td align='center' class='tbl2'>Komentarzy: <b>".number_format(dbcount("(comment_id)", "comments", "comment_name='".$data['user_id']."'"))."</b></td>
</tr>
<tr>
<td align='center' class='tbl1'>Ostatnia wizyta: ".($data['user_lastvisit'] != 0 ? showdate("longdate", $data['user_lastvisit']) : $locale['u049'])."</td>
<td align='center' class='tbl1'>Postów na forum: <b>".number_format(dbcount("(post_id)", "posts", "post_author='".$data['user_id']."'"))."</b></td>
</tr></table>";
echo "<table align='center' cellpadding='0' cellspacing='1' width='100%' class='tbl-border'>";
if (iMEMBER) {
echo "<tr><td align='center' class='tbl2'>\n";
if ($data['user_hide_email'] != "1" || iADMIN) {
echo "| <a href='mailto:".str_replace("@","@",$data['user_email'])."' title='".str_replace("@","@",$data['user_email'])."'>".$data['user_email']."</a> | \n";
}
if ($data['user_web']) {
$urlprefix = !strstr($data['user_web'], "http://") ? "http://" : "";
echo "<a href='".$urlprefix.$data['user_web']."' title='".$urlprefix.$data['user_web']."' target='_blank'>".$data['user_web']."</a> | ";
}
if (!isset($userdata['user_id']) || $data['user_id'] != $userdata['user_id']) {
echo "| <a href='messages.php?msg_send=".$data['user_id']."' title='".$locale['u060']."'>Prywatna Wiadomo¶ć</a> |";
}
echo"<tr><td align='center' class='tbl1'><br></td></tr>";
echo "</td>\n</tr>";
}else{ // End IF
echo "<tr><td align='center' class='tbl2'>\n";
echo "<center>Kontakt: Tylko dla użytkowników</center></td></tr>\n";
echo"<tr><td align='center' class='tbl1'><br></td></tr>";
}
echo "</table>\n";
} // End while
} else {
echo "<center><br>\n".$locale['403']."$sortby<br><br>\n</center>\n";
} // End If
echo "<center><br><b>Administratorzy</b></center><br>";
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;
$result = dbquery("SELECT * FROM ".$db_prefix."users".$orderby." WHERE user_level = 102 ORDER BY user_level DESC, user_name LIMIT $rowstart,20");
while ($data = dbarray($result)) {
$cell_color = ($i % 2 == 0 ? "tbl1" : "tbl2"); $i++;
echo "<table align='center' cellpadding='0' cellspacing='1' width='100%' class='tbl-border'>\n";
echo "<tr>\n<td width='50%' align='center' class='tbl2'>\n<a href='profile.php?lookup=".$data['user_id']."'>".$data['user_name']."</a></td>";
echo "<td align='center' rowspan='5' class='tbl2'>\n";
echo ($data['user_avatar'] ? "<img src='".IMAGES."avatars/".$data['user_avatar']."' alt='".$locale['u017']."'>" : $locale['u046'])."</td>\n";
echo "<td align='center' width='50%' class='tbl2' style='white-space:nowrap'>Doł±czył: ".showdate("longdate", $data['user_joined'])."</td>\n</tr>
<tr>
<td align='center' class='tbl1'>Lokalizacja: ".($data['user_location'] ? $data['user_location'] : $locale['u048'])."</td>
<td align='center' class='tbl1'>Postów w Shoutbox: <b>".number_format(dbcount("(shout_id)", "shoutbox", "shout_name='".$data['user_id']."'"))."</b></td>
</tr>
<tr>
<td align='center' class='tbl2'>Data urodzenia: ";
if ($data['user_birthdate'] != "0000-00-00") {
$months = explode("|", $locale['months']);
$user_birthdate = explode("-", $data['user_birthdate']);
echo $months[number_format($user_birthdate['1'])]." ".number_format($user_birthdate['2'])." ".$user_birthdate['0'];
} else {
echo $locale['u048'];
}
echo "</td>
<td align='center' class='tbl2'>Komentarzy: <b>".number_format(dbcount("(comment_id)", "comments", "comment_name='".$data['user_id']."'"))."</b></td>
</tr>
<tr>
<td align='center' class='tbl1'>Ostatnia wizyta: ".($data['user_lastvisit'] != 0 ? showdate("longdate", $data['user_lastvisit']) : $locale['u049'])."</td>
<td align='center' class='tbl1'>Postów na forum: <b>".number_format(dbcount("(post_id)", "posts", "post_author='".$data['user_id']."'"))."</b></td>
</tr></table>";
echo "<table align='center' cellpadding='0' cellspacing='1' width='100%' class='tbl-border'>";
if (iMEMBER) {
echo "<tr><td align='center' class='tbl2'>\n";
if ($data['user_hide_email'] != "1" || iADMIN) {
echo "| <a href='mailto:".str_replace("@","@",$data['user_email'])."' title='".str_replace("@","@",$data['user_email'])."'>".$data['user_email']."</a> | \n";
}
if ($data['user_web']) {
$urlprefix = !strstr($data['user_web'], "http://") ? "http://" : "";
echo "<a href='".$urlprefix.$data['user_web']."' title='".$urlprefix.$data['user_web']."' target='_blank'>".$data['user_web']."</a> | ";
}
if (!isset($userdata['user_id']) || $data['user_id'] != $userdata['user_id']) {
echo "| <a href='messages.php?msg_send=".$data['user_id']."' title='".$locale['u060']."'>Prywatna Wiadomo¶ć</a> |";
}
echo"<tr><td align='center' class='tbl1'><br></td></tr>";
echo "</td>\n</tr>";
}else{ // End IF
echo "<tr><td align='center' class='tbl2'>\n";
echo "<center>Kontakt: Tylko dla użytkowników</center></td></tr>\n";
echo"<tr><td align='center' class='tbl1'><br></td></tr>";
}
echo "</table>\n";
} // End while
} else {
echo "<center><br>\n".$locale['403']."$sortby<br><br>\n</center>\n";
} // End If
echo "<center><br><b>Moderatorzy</b></center><br>";
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);
$result2 = dbquery("SELECT * FROM ".$db_prefix."forums");
$f_mods = array();
while ($data2 = dbarray($result2)) {
$f_mods = ($data2['forum_moderators'] ? explode(".", $data2['forum_moderators']) : "");
for ($i=0;$i<sizeof($f_mods);$i++) {
$forum_mods[] = $f_mods[$i];
}
}
$forum_mods = array_unique($forum_mods);
if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0;
if ($rows != 0) {
$i = 0;
for ($x=0;$x<sizeof($forum_mods);$x++) {
$result3 = dbquery("SELECT user_id,user_name,user_avatar,user_joined,user_birthdate,user_lastvisit,user_location,user_email,user_web FROM ".$db_prefix."users WHERE user_id='".$forum_mods[$x]."'");
$rows3 = dbrows($result3);
if ($rows3!=0) {
$data3 = dbarray($result3);
$cell_color = ($i % 2 == 0 ? "tbl1" : "tbl2"); $i++;
echo "<table align='center' cellpadding='0' cellspacing='1' width='100%' class='tbl-border'>\n";
echo "<tr>\n<td width='50%' align='center' class='tbl2'>\n<a href='profile.php?lookup=".$data3['user_id']."'>".$data3['user_name']."</a></td>";
echo "<td align='center' rowspan='5' class='tbl2'>\n";
echo ($data3['user_avatar'] ? "<img src='".IMAGES."avatars/".$data3['user_avatar']."' alt='".$locale['u017']."'>" : $locale['u046'])."</td>\n";
echo "<td align='center' width='50%' class='tbl2' style='white-space:nowrap'>Doł±czył: ".showdate("longdate", $data3['user_joined'])."</td>\n</tr>
<tr>
<td align='center' class='tbl1'>Lokalizacja: ".($data3['user_location'] ? $data3['user_location'] : $locale['u048'])."</td>
<td align='center' class='tbl1'>Postów w Shoutbox: <b>".number_format(dbcount("(shout_id)", "shoutbox", "shout_name='".$data3['user_id']."'"))."</b></td>
</tr>
<tr>
<td align='center' class='tbl2'>Data urodzenia: ";
if ($data3['user_birthdate'] != "0000-00-00") {
$months = explode("|", $locale['months']);
$user_birthdate = explode("-", $data3['user_birthdate']);
echo $months[number_format($user_birthdate['1'])]." ".number_format($user_birthdate['2'])." ".$user_birthdate['0'];
} else {
echo $locale['u048'];
}
echo "</td>
<td align='center' class='tbl2'>Komentarzy: <b>".number_format(dbcount("(comment_id)", "comments", "comment_name='".$data3['user_id']."'"))."</b></td>
</tr>
<tr>
<td align='center' class='tbl1'>Ostatnia wizyta: ".($data3['user_lastvisit'] != 0 ? showdate("longdate", $data3['user_lastvisit']) : $locale['u049'])."</td>
<td align='center' class='tbl1'>Postów na forum: <b>".number_format(dbcount("(post_id)", "posts", "post_author='".$data3['user_id']."'"))."</b></td>
</tr></table>";
echo "<table align='center' cellpadding='0' cellspacing='1' width='100%' class='tbl-border'>";
if (iMEMBER) {
echo "<tr><td align='center' class='tbl2'>\n";
if ($data3['user_hide_email'] != "1" || iADMIN) {
echo "| <a href='mailto:".str_replace("@","@",$data3['user_email'])."' title='".str_replace("@","@",$data3['user_email'])."'>".$data3['user_email']."</a> | \n";
}
if ($data3['user_web']) {
$urlprefix = !strstr($data3['user_web'], "http://") ? "http://" : "";
echo "<a href='".$urlprefix.$data3['user_web']."' title='".$urlprefix.$data3['user_web']."' target='_blank'>".$data3['user_web']."</a> | ";
}
if (!isset($userdata['user_id']) || $data3['user_id'] != $userdata['user_id']) {
echo "| <a href='messages.php?msg_send=".$data3['user_id']."' title='".$locale['u060']."'>Prywatna Wiadomo¶ć</a> |";
}
echo"<tr><td align='center' class='tbl1'><br></td></tr>";
echo "</td>\n</tr>";
} else { // End IF
echo "<tr><td align='center' class='tbl2'>\n";
echo "<center>Kontakt: Tylko dla użytkowników</center></td></tr>\n";
echo"<tr><td align='center' class='tbl1'><br></td></tr>";
}
echo "</table>\n";
}
} // End while
} else {
echo "<center><br>\n".$locale['403']."$sortby<br><br>\n</center>\n";
} // End If
closetable();
require_once "side_right.php";
require_once "footer.php";
?>
|
Weteran
Postów: 3264 Pomógł: 236
v7.02.06 Data rejestracji: 26.05.2007 12:25
|
echo "<center><br><b>[b]Tu sobie wpisz nazwe[/b]</b></center><br>";
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;
$result = dbquery("SELECT * FROM ".$db_prefix."users".$orderby." WHERE user_groups LIKE '%.[b]5[/b]%' ORDER BY user_id DESC, user_name LIMIT $rowstart,20");
while ($data = dbarray($result)) {
$cell_color = ($i % 2 == 0 ? "tbl1" : "tbl2"); $i++;
echo "<table align='center' cellpadding='0' cellspacing='1' width='100%' class='tbl-border'>\n";
echo "<tr>\n<td width='50%' align='center' class='tbl2'>\n<a href='profile.php?lookup=".$data['user_id']."'>".$data['user_name']."</a></td>";
echo "<td align='center' rowspan='5' class='tbl2'>\n";
echo ($data['user_avatar'] ? "<img src='".IMAGES."avatars/".$data['user_avatar']."' alt='".$locale['u017']."'>" : $locale['u046'])."</td>\n";
echo "<td align='center' width='50%' class='tbl2' style='white-space:nowrap'>Doł±czył: ".showdate("longdate", $data['user_joined'])."</td>\n</tr>
<tr>
<td align='center' class='tbl1'>Lokalizacja: ".($data['user_location'] ? $data['user_location'] : $locale['u048'])."</td>
<td align='center' class='tbl1'>Postów w Shoutbox: <b>".number_format(dbcount("(shout_id)", "shoutbox", "shout_name='".$data['user_id']."'"))."</b></td>
</tr>
<tr>
<td align='center' class='tbl2'>Data urodzenia: ";
if ($data['user_birthdate'] != "0000-00-00") {
$months = explode("|", $locale['months']);
$user_birthdate = explode("-", $data['user_birthdate']);
echo $months[number_format($user_birthdate['1'])]." ".number_format($user_birthdate['2'])." ".$user_birthdate['0'];
} else {
echo $locale['u048'];
}
echo "</td>
<td align='center' class='tbl2'>Komentarzy: <b>".number_format(dbcount("(comment_id)", "comments", "comment_name='".$data['user_id']."'"))."</b></td>
</tr>
<tr>
<td align='center' class='tbl1'>Ostatnia wizyta: ".($data['user_lastvisit'] != 0 ? showdate("longdate", $data['user_lastvisit']) : $locale['u049'])."</td>
<td align='center' class='tbl1'>Postów na forum: <b>".number_format(dbcount("(post_id)", "posts", "post_author='".$data['user_id']."'"))."</b></td>
</tr></table>";
echo "<table align='center' cellpadding='0' cellspacing='1' width='100%' class='tbl-border'>";
if (iMEMBER) {
echo "<tr><td align='center' class='tbl2'>\n";
if ($data['user_hide_email'] != "1" || iADMIN) {
echo "| <a href='mailto:".str_replace("@","@",$data['user_email'])."' title='".str_replace("@","@",$data['user_email'])."'>".$data['user_email']."</a> | \n";
}
if ($data['user_web']) {
$urlprefix = !strstr($data['user_web'], "http://") ? "http://" : "";
echo "<a href='".$urlprefix.$data['user_web']."' title='".$urlprefix.$data['user_web']."' target='_blank'>".$data['user_web']."</a> | ";
}
if (!isset($userdata['user_id']) || $data['user_id'] != $userdata['user_id']) {
echo "| <a href='messages.php?msg_send=".$data['user_id']."' title='".$locale['u060']."'>Prywatna Wiadomo¶ć</a> |";
}
echo"<tr><td align='center' class='tbl1'><br></td></tr>";
echo "</td>\n</tr>";
}else{ // End IF
echo "<tr><td align='center' class='tbl2'>\n";
echo "<center>Kontakt: Tylko dla użytkowników</center></td></tr>\n";
echo"<tr><td align='center' class='tbl1'><br></td></tr>";
}
echo "</table>\n";
} // End while
} else {
echo "<center><br>\n".$locale['403']."$sortby<br><br>\n</center>\n";
} // End If
To dodajesz na końcu pliku, przed
closetable();
require_once "side_right.php";
require_once "footer.php";
Niby działa, tylko nie wiem jak jest z osobami, które należą do więcej niż jednej grupy. Proszę kogoś o sprawdzenie, bo też tego potrzebuję ;).
Edytowane przez bartek124 dnia 13.01.2008 19:26:18
Nie pomagam na komunikatorach oraz PW!
|