System ostrzeżeń
|
Konto ukryte |
Dodany dnia 25.06.2011 10:34:04
|
Początkujący
Postów: 151
Data rejestracji: 29.08.2009 15:26
ZBANOWANY: Dożywotnio
|
@foxi89 paczka zaktualizowana i czekam na więcej propozycji. |
|
|
|
Wścibski Gość |
Dodany dnia 22.11.2024 14:05:26
|
Pan Kontekstualny
Postów: n^x
Data rejestracji: Zawsze
|
|
IP: localhost |
|
|
konto usuniete |
Dodany dnia 25.06.2011 15:42:33
|
Bywalec
Postów: 457
Data rejestracji: 04.11.2009 00:54
ZBANOWANY: Dożywotnio
|
Super, już jest prawie bardzo dobrze.
Fajnie byłoby gdyby wyświetlanie w profilu wyglądało jak tu, na supporcie:)
Oczywiście aby klikalny był link prowadzący do autora ostrzeżenia.
Wiadomość doklejona:
Zapomniałem dodać.
Wchodząc w grupę użytkowników widzę błąd. Jak można to naprawić?
Widok błędu w załączonym obrazku.
Oczywiście błąd w wersji v7.00.05
Proszę khaman- tak by w oczy nie raziła grafika.
profile.php
<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2008 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: profile.php
| Author: Nick Jones (Digitanium)
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at http://www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once "maincore.php";
require_once THEMES."templates/header.php";
include LOCALE.LOCALESET."view_profile.php";
include LOCALE.LOCALESET."user_fields.php";
if (!isset($_GET['group_id']) || !isnum($_GET['group_id'])) {
if (!isset($_GET['lookup']) || !isnum($_GET['lookup'])) { redirect("index.php"); }
$result = dbquery("SELECT * FROM ".DB_USERS." WHERE user_id='".$_GET['lookup']."'");
if (dbrows($result)) { $user_data = dbarray($result); } else { redirect("index.php"); }
if ($user_data['user_status'] > "0") { redirect("index.php"); }
if (iADMIN && checkrights("UG") && $user_data['user_id'] != $userdata['user_id']) {
if ((isset($_POST['add_to_group'])) && (isset($_POST['user_group']) && isnum($_POST['user_group']))) {
if (!preg_match("(^\.{$_POST['user_group']}$|\.{$_POST['user_group']}\.|\.{$_POST['user_group']}$)", $user_data['user_groups'])) {
$result = dbquery("UPDATE ".DB_USERS." SET user_groups='".$user_data['user_groups'].".".$_POST['user_group']."' WHERE user_id='".$user_data['user_id']."'");
}
redirect(FUSION_SELF."?lookup=".$user_data['user_id']);
}
}
add_to_title($locale['global_200'].$locale['400'].$locale['global_201'].$user_data['user_name']);
opentable($locale['400']);
echo "<table cellpadding='0' cellspacing='1' width='400' class='tbl-border center'>\n<tr>\n";
if ($user_data['user_avatar'] && file_exists(IMAGES."avatars/".$user_data['user_avatar'])) {
echo "<td rowspan='5' width='1%' class='tbl profile_user_avatar'><!--profile_user_avatar--><img src='".IMAGES."avatars/".$user_data['user_avatar']."' alt='' /></td>\n";
}
echo "<td width='1%' class='tbl1' style='white-space:nowrap'>".$locale['u001']."</td>\n";
echo "<td align='right' class='tbl1 profile_user_name'><!--profile_user_name-->".$user_data['user_name']."</td>\n";
echo "</tr>\n<tr>\n";
echo "<td width='1%' class='tbl1' style='white-space:nowrap'></td>\n";
echo "<td align='right' class='tbl1 profile_user_level'><!--profile_user_level-->".getuserlevel($user_data['user_level'])."</td>\n";
echo "</tr>\n";
if ($user_data['user_hide_email'] != "1" || iADMIN) {
echo "<tr>\n";
echo "<td width='1%' class='tbl1' style='white-space:nowrap'>".$locale['u005']."</td>\n";
echo "<td align='right' class='tbl1'>".hide_email($user_data['user_email'])."</td>\n";
echo "</tr>\n";
}
echo "<tr>\n";
echo "<td width='1%' class='tbl1' style='white-space:nowrap'>".$locale['u040']."</td>\n";
echo "<td align='right' class='tbl1'>".showdate("longdate", $user_data['user_joined'])."</td>\n";
echo "</tr>\n<tr>\n";
echo "<td width='1%' class='tbl1' style='white-space:nowrap'>".$locale['u041']."</td>\n";
echo "<td align='right' class='tbl1'>".($user_data['user_lastvisit'] ? showdate("longdate", $user_data['user_lastvisit']) : $locale['u042'])."</td>\n";
echo "</tr>\n";
if (iMEMBER && $userdata['user_id'] != $user_data['user_id']) {
echo "<td colspan='".($user_data['user_avatar'] && file_exists(IMAGES."avatars/".$user_data['user_avatar']) ? "3" : "2")."' class='tbl2' style='text-align:center;white-space:nowrap'><a href='messages.php?msg_send=".$user_data['user_id']."' title='".$locale['u043']."'>".$locale['u043']."</a></td>\n";
echo "</tr>\n";
}
echo "</table>\n";
echo "<div style='margin:5px'></div>\n";
$profile_method = "display"; $i = 0; $user_fields_output = array("", "", "", ""); $ob_active = false;
$result2 = dbquery("SELECT * FROM ".DB_USER_FIELDS." ORDER BY field_group, field_order");
if (dbrows($result2)) {
while($data2 = dbarray($result2)) {
if ($i != $data2['field_group']) {
if ($ob_active) {
$user_fields_output[$i] = ob_get_contents();
ob_end_clean();
$ob_active = false;
}
$i = $data2['field_group'];
}
if (!$ob_active) {
ob_start();
$ob_active = true;
}
if (file_exists(LOCALE.LOCALESET."user_fields/".$data2['field_name'].".php")) {
include LOCALE.LOCALESET."user_fields/".$data2['field_name'].".php";
}
if (file_exists(INCLUDES."user_fields/".$data2['field_name']."_include.php")) {
include INCLUDES."user_fields/".$data2['field_name']."_include.php";
}
}
}
if ($ob_active) {
$user_fields_output[$i] = ob_get_contents();
ob_end_clean();
}
if (array_key_exists(1, $user_fields_output) && $user_fields_output[1]) {
echo "<div style='margin:5px'></div>\n";
echo "<table cellpadding='0' cellspacing='1' width='400' class='tbl-border center'>\n<tr>\n";
echo "<td colspan='2' class='tbl2'><strong>".$locale['u044']."</strong></td>\n";
echo "</tr>\n".$user_fields_output[1];
echo "</table>\n";
}
if (array_key_exists(2, $user_fields_output) && $user_fields_output[2]) {
echo "<div style='margin:5px'></div>\n";
echo "<table cellpadding='0' cellspacing='1' width='400' class='tbl-border center'>\n<tr>\n";
echo "<td colspan='2' class='tbl2'><strong>".$locale['u045']."</strong></td>\n";
echo "</tr>\n".$user_fields_output[2];
echo "</table>\n";
}
if (array_key_exists(4, $user_fields_output) && $user_fields_output[4]) {
echo "<div style='margin:5px'></div>\n";
echo "<table cellpadding='0' cellspacing='1' width='400' class='tbl-border center'>\n<tr>\n";
echo "<td colspan='2' class='tbl2'><strong>".$locale['u047']."</strong></td>\n";
echo "</tr>\n".$user_fields_output[4];
echo "</table>\n";
}
if (iADMIN && checkrights("M")) {
echo "<div style='margin:5px'></div>\n";
echo "<table cellpadding='0' cellspacing='1' width='400' class='tbl-border center'>\n<tr>\n";
echo "<td colspan='2' class='tbl2'><strong>".$locale['u048']."</strong></td>\n";
echo "</tr>\n<tr>\n";
echo "<td width='1%' class='tbl1' style='white-space:nowrap'>".$locale['u049']."</td>\n";
echo "<td align='right' class='tbl1'>".$user_data['user_ip']."</td>\n";
echo "</tr>\n</table>\n";
}
if ($user_data['user_groups']) {
echo "<div style='margin:5px'></div>\n";
echo "<table cellpadding='0' cellspacing='1' width='400' class='center tbl-border'>\n<tr>\n";
echo "<td class='tbl2'><strong>".$locale['401']."</strong></td>\n";
echo "</tr>\n<tr>\n";
echo "<td class='tbl1'>\n";
$user_groups = (strpos($user_data['user_groups'], ".") == 0 ? explode(".", substr($user_data['user_groups'], 1)) : explode(".", $user_data['user_groups']));
for ($i = 0; $i < count($user_groups); $i++) {
echo "<div style='float:left'><a href='".FUSION_SELF."?group_id=".$user_groups[$i]."'>".getgroupname($user_groups[$i])."</a></div><div style='float:right'>".getgroupname($user_groups[$i], true)."</div><div style='float:none;clear:both'></div>\n";
}
echo "</td>\n</tr>\n</table>\n";
}
if (iADMIN && checkrights("M") && $user_data['user_id'] != $userdata['user_id']) {
$user_groups_opts = "";
if ($user_data['user_level'] < 102) {
echo "<div style='margin:5px'></div>\n";
echo "<form name='admin_form' method='post' action='".FUSION_SELF."?lookup=".$user_data['user_id']."'>\n";
echo "<table cellpadding='0' cellspacing='0' width='400' class='center tbl-border'>\n<tr>\n";
echo "<td class='tbl2' colspan='2'><strong>".$locale['402']."</strong></td>\n";
echo "</tr>\n<tr>\n";
echo "<td class='tbl1'><!--profile_admin_options-->\n";
echo "<a href='".ADMIN."members.php".$aidlink."&step=edit&user_id=".$user_data['user_id']."'>".$locale['410']."</a> ::\n";
echo "<a href='".ADMIN."members.php".$aidlink."&step=ban&act=on&user_id=".$user_data['user_id']."&status=1' onclick=\"return confirm('".$locale['413']."');\">".$locale['411']."</a> ::\n";
echo "<a href='".ADMIN."members.php".$aidlink."&step=delete&status=0&user_id=".$user_data['user_id']."' onclick=\"return confirm('".$locale['414']."');\">".$locale['412']."</a></td>\n";
$result = dbquery("SELECT * FROM ".DB_USER_GROUPS." ORDER BY group_id ASC");
if (dbrows($result)) {
while ($data2 = dbarray($result)) {
if (!preg_match("(^\.{$data2['group_id']}|\.{$data2['group_id']}\.|\.{$data2['group_id']}$)", $user_data['user_groups'])) {
$user_groups_opts .= "<option value='".$data2['group_id']."'>".$data2['group_name']."</option>\n";
}
}
if (iADMIN && checkrights("UG") && $user_groups_opts) {
echo "<td align='right' class='tbl1'>".$locale['415']."\n";
echo "<select name='user_group' class='textbox' style='width:100px'>\n".$user_groups_opts."</select>\n";
echo "<input type='submit' name='add_to_group' value='".$locale['416']."' class='button' onclick=\"return confirm('".$locale['417']."');\" /></td>\n";
}
}
echo "</tr>\n</table>\n</form>\n";
}
}
} else {
$result = dbquery("SELECT * FROM ".DB_USER_GROUPS." WHERE group_id='".$_GET['group_id']."'");
if (dbrows($result)) {
$data = dbarray($result);
$result = dbquery("SELECT * FROM ".DB_USERS." WHERE user_groups REGEXP('^\\\.{$_GET['group_id']}$|\\\.{$_GET['group_id']}\\\.|\\\.{$_GET['group_id']}$') ORDER BY user_level DESC, user_name");
opentable($locale['420']);
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
echo "<td align='center' colspan='2' class='tbl1'><strong>".$data['group_name']."</strong> (".sprintf((dbrows($result) == 1 ? $locale['421'] : $locale['422']), dbrows($result)).")</td>\n";
echo "</tr>\n<tr>\n";
echo "<td class='tbl2'><strong>".$locale['423']."</strong></td>\n";
echo "<td align='center' width='1%' class='tbl2' style='white-space:nowrap'><strong>".$locale['424']."</strong></td>\n";
echo "</tr>\n";
while ($data = dbarray($result)) {
$cell_color = ($i % 2 == 0 ? "tbl1" : "tbl2"); $i++;
echo "<tr>\n<td class='$cell_color'>\n<a href='profile.php?lookup=".$data['user_id']."'>".$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 {
redirect("index.php");
}
}
closetable();
if (file_exists(INFUSIONS."cautions/locale/".$settings['locale'].".php")) {
include INFUSIONS."cautions/locale/".$settings['locale'].".php";
} else {
include INFUSIONS."cautions/locale/Polish.php";
$cautions_conf = dbarray(dbquery("SELECT group_id from ".$db_prefix."cautions_config"));
}
$cautions_conf = dbarray(dbquery("SELECT group_id from ".$db_prefix."cautions_config"));
echo "<table cellpadding='0' cellspacing='1' width='400' class='tbl-border center'>\n<tr>\n";
echo "<td colspan='2' class='tbl2'><strong>".$locale['C_000']."</strong></td>\n";
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
$caution_r = dbquery("SELECT * from ".$db_prefix."cautions WHERE user_id=".$_GET['lookup']);
$c_count = mysql_numrows($caution_r);
echo "<table cellpadding='0' cellspacing='0' width='100%'>";
echo "</tr>\n<tr>\n";
while ($caution = dbarray($caution_r))
{
//dotyczace innego//
$result = dbquery("DELETE FROM ".$db_prefix."online WHERE online_lastactive<".(time()-60)."");
$facount = dbquery("SELECT count(post_id) FROM ".$db_prefix."posts");
$topics = dbquery("SELECT count(thread_id) FROM ".$db_prefix."threads");
$result = dbquery("SELECT user_id,user_name FROM ".$db_prefix."users ORDER BY user_joined DESC");
$total = dbrows($result);
$data = dbarray($result);//koniec//
$author = dbarray(dbquery("SELECT user_name from ".$db_prefix."users WHERE user_id=".$caution['who']));
echo "<tr>\n<td class='tbl' valign='top' align='right'><font style='font-size:9'>".$locale['C_021']."</font><a href='".BASEDIR."profile.php?lookup=".$caution['user_id']."' class='side'><b>".$author['user_name']."</a>";
if ((checkgroup($cautions_conf['group_id']) && $cautions_conf['group_id']!=0) || iSUPERADMIN)
{
echo" [ <a href='".INFUSIONS."cautions/cautions.php?action=del&userid=".$caution['user_id']."&id=".$caution['id' ]."'>
<font style='font-size:9; color:red'>".$locale['C_015']."</font></a> <font style='font-size:9'> | </font><a href='".INFUSIONS."cautions/cautions.php?action=edit&userid=".$caution['user_id']."&id=".$caution['id']."'>
<font style='font-size:9; color:red'>".$locale['C_016']."</font></a> <font style='font-size:9'></font> ]
"; }
echo"</td>\n<td class='tbl' colspan='2'>\n";
echo "<font style='font-size:9'> | ".$caution['why']."</font><br> | ".showdate("forumdate", $caution['datestamp'])."</td>\n</tr>\n";
}
echo "</table>";
require_once THEMES."templates/footer.php";
?>
Błąd:
Notice: Undefined index: lookup in /home/viget45/domains/***/public_html/profile.php on line 213
Something is wrong in your syntax obok '' w linii 1
Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in /home/viget45/domains/***/public_html/profile.php on line 214
Edytowane przez hoopak dnia 04.08.2011 23:10:23
|
|
|
|
Konto ukryte |
Dodany dnia 25.06.2011 16:16:07
|
Początkujący
Postów: 151
Data rejestracji: 29.08.2009 15:26
ZBANOWANY: Dożywotnio
|
Proszę oto zmodyfikowany plik profile.php mi działa wszystko jak należy:
<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2008 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: profile.php
| Author: Nick Jones (Digitanium)
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at http://www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once "maincore.php";
require_once THEMES."templates/header.php";
include LOCALE.LOCALESET."view_profile.php";
include LOCALE.LOCALESET."user_fields.php";
if (!isset($_GET['group_id']) || !isnum($_GET['group_id'])) {
if (!isset($_GET['lookup']) || !isnum($_GET['lookup'])) { redirect("index.php"); }
$result = dbquery("SELECT * FROM ".DB_USERS." WHERE user_id='".$_GET['lookup']."'");
if (dbrows($result)) { $user_data = dbarray($result); } else { redirect("index.php"); }
if ($user_data['user_status'] > "0") { redirect("index.php"); }
if (iADMIN && checkrights("UG") && $user_data['user_id'] != $userdata['user_id']) {
if ((isset($_POST['add_to_group'])) && (isset($_POST['user_group']) && isnum($_POST['user_group']))) {
if (!preg_match("(^\.{$_POST['user_group']}$|\.{$_POST['user_group']}\.|\.{$_POST['user_group']}$)", $user_data['user_groups'])) {
$result = dbquery("UPDATE ".DB_USERS." SET user_groups='".$user_data['user_groups'].".".$_POST['user_group']."' WHERE user_id='".$user_data['user_id']."'");
}
redirect(FUSION_SELF."?lookup=".$user_data['user_id']);
}
}
add_to_title($locale['global_200'].$locale['400'].$locale['global_201'].$user_data['user_name']);
opentable($locale['400']);
echo "<table cellpadding='0' cellspacing='1' width='400' class='tbl-border center'>\n<tr>\n";
if ($user_data['user_avatar'] && file_exists(IMAGES."avatars/".$user_data['user_avatar'])) {
echo "<td rowspan='5' width='1%' class='tbl profile_user_avatar'><!--profile_user_avatar--><img src='".IMAGES."avatars/".$user_data['user_avatar']."' alt='' /></td>\n";
}
echo "<td width='1%' class='tbl1' style='white-space:nowrap'>".$locale['u001']."</td>\n";
echo "<td align='right' class='tbl1 profile_user_name'><!--profile_user_name-->".$user_data['user_name']."</td>\n";
echo "</tr>\n<tr>\n";
echo "<td width='1%' class='tbl1' style='white-space:nowrap'></td>\n";
echo "<td align='right' class='tbl1 profile_user_level'><!--profile_user_level-->".getuserlevel($user_data['user_level'])."</td>\n";
echo "</tr>\n";
if ($user_data['user_hide_email'] != "1" || iADMIN) {
echo "<tr>\n";
echo "<td width='1%' class='tbl1' style='white-space:nowrap'>".$locale['u005']."</td>\n";
echo "<td align='right' class='tbl1'>".hide_email($user_data['user_email'])."</td>\n";
echo "</tr>\n";
}
echo "<tr>\n";
echo "<td width='1%' class='tbl1' style='white-space:nowrap'>".$locale['u040']."</td>\n";
echo "<td align='right' class='tbl1'>".showdate("longdate", $user_data['user_joined'])."</td>\n";
echo "</tr>\n<tr>\n";
echo "<td width='1%' class='tbl1' style='white-space:nowrap'>".$locale['u041']."</td>\n";
echo "<td align='right' class='tbl1'>".($user_data['user_lastvisit'] ? showdate("longdate", $user_data['user_lastvisit']) : $locale['u042'])."</td>\n";
echo "</tr>\n";
if (iMEMBER && $userdata['user_id'] != $user_data['user_id']) {
echo "<td colspan='".($user_data['user_avatar'] && file_exists(IMAGES."avatars/".$user_data['user_avatar']) ? "3" : "2")."' class='tbl2' style='text-align:center;white-space:nowrap'><a href='messages.php?msg_send=".$user_data['user_id']."' title='".$locale['u043']."'>".$locale['u043']."</a></td>\n";
echo "</tr>\n";
}
echo "</table>\n";
echo "<div style='margin:5px'></div>\n";
$profile_method = "display"; $i = 0; $user_fields_output = array("", "", "", ""); $ob_active = false;
$result2 = dbquery("SELECT * FROM ".DB_USER_FIELDS." ORDER BY field_group, field_order");
if (dbrows($result2)) {
while($data2 = dbarray($result2)) {
if ($i != $data2['field_group']) {
if ($ob_active) {
$user_fields_output[$i] = ob_get_contents();
ob_end_clean();
$ob_active = false;
}
$i = $data2['field_group'];
}
if (!$ob_active) {
ob_start();
$ob_active = true;
}
if (file_exists(LOCALE.LOCALESET."user_fields/".$data2['field_name'].".php")) {
include LOCALE.LOCALESET."user_fields/".$data2['field_name'].".php";
}
if (file_exists(INCLUDES."user_fields/".$data2['field_name']."_include.php")) {
include INCLUDES."user_fields/".$data2['field_name']."_include.php";
}
}
}
if ($ob_active) {
$user_fields_output[$i] = ob_get_contents();
ob_end_clean();
}
if (array_key_exists(1, $user_fields_output) && $user_fields_output[1]) {
echo "<div style='margin:5px'></div>\n";
echo "<table cellpadding='0' cellspacing='1' width='400' class='tbl-border center'>\n<tr>\n";
echo "<td colspan='2' class='tbl2'><strong>".$locale['u044']."</strong></td>\n";
echo "</tr>\n".$user_fields_output[1];
echo "</table>\n";
}
if (array_key_exists(2, $user_fields_output) && $user_fields_output[2]) {
echo "<div style='margin:5px'></div>\n";
echo "<table cellpadding='0' cellspacing='1' width='400' class='tbl-border center'>\n<tr>\n";
echo "<td colspan='2' class='tbl2'><strong>".$locale['u045']."</strong></td>\n";
echo "</tr>\n".$user_fields_output[2];
echo "</table>\n";
}
if (array_key_exists(4, $user_fields_output) && $user_fields_output[4]) {
echo "<div style='margin:5px'></div>\n";
echo "<table cellpadding='0' cellspacing='1' width='400' class='tbl-border center'>\n<tr>\n";
echo "<td colspan='2' class='tbl2'><strong>".$locale['u047']."</strong></td>\n";
echo "</tr>\n".$user_fields_output[4];
echo "</table>\n";
}
if (iADMIN && checkrights("M")) {
echo "<div style='margin:5px'></div>\n";
echo "<table cellpadding='0' cellspacing='1' width='400' class='tbl-border center'>\n<tr>\n";
echo "<td colspan='2' class='tbl2'><strong>".$locale['u048']."</strong></td>\n";
echo "</tr>\n<tr>\n";
echo "<td width='1%' class='tbl1' style='white-space:nowrap'>".$locale['u049']."</td>\n";
echo "<td align='right' class='tbl1'>".$user_data['user_ip']."</td>\n";
echo "</tr>\n</table>\n";
}
if ($user_data['user_groups']) {
echo "<div style='margin:5px'></div>\n";
echo "<table cellpadding='0' cellspacing='1' width='400' class='center tbl-border'>\n<tr>\n";
echo "<td class='tbl2'><strong>".$locale['401']."</strong></td>\n";
echo "</tr>\n<tr>\n";
echo "<td class='tbl1'>\n";
$user_groups = (strpos($user_data['user_groups'], ".") == 0 ? explode(".", substr($user_data['user_groups'], 1)) : explode(".", $user_data['user_groups']));
for ($i = 0; $i < count($user_groups); $i++) {
echo "<div style='float:left'><a href='".FUSION_SELF."?group_id=".$user_groups[$i]."'>".getgroupname($user_groups[$i])."</a></div><div style='float:right'>".getgroupname($user_groups[$i], true)."</div><div style='float:none;clear:both'></div>\n";
}
echo "</td>\n</tr>\n</table>\n";
}
if (iADMIN && checkrights("M") && $user_data['user_id'] != $userdata['user_id']) {
$user_groups_opts = "";
if ($user_data['user_level'] < 102) {
echo "<div style='margin:5px'></div>\n";
echo "<form name='admin_form' method='post' action='".FUSION_SELF."?lookup=".$user_data['user_id']."'>\n";
echo "<table cellpadding='0' cellspacing='0' width='400' class='center tbl-border'>\n<tr>\n";
echo "<td class='tbl2' colspan='2'><strong>".$locale['402']."</strong></td>\n";
echo "</tr>\n<tr>\n";
echo "<td class='tbl1'><!--profile_admin_options-->\n";
echo "<a href='".ADMIN."members.php".$aidlink."&step=edit&user_id=".$user_data['user_id']."'>".$locale['410']."</a> ::\n";
echo "<a href='".ADMIN."members.php".$aidlink."&step=ban&act=on&user_id=".$user_data['user_id']."&status=1' onclick=\"return confirm('".$locale['413']."');\">".$locale['411']."</a> ::\n";
echo "<a href='".ADMIN."members.php".$aidlink."&step=delete&status=0&user_id=".$user_data['user_id']."' onclick=\"return confirm('".$locale['414']."');\">".$locale['412']."</a></td>\n";
$result = dbquery("SELECT * FROM ".DB_USER_GROUPS." ORDER BY group_id ASC");
if (dbrows($result)) {
while ($data2 = dbarray($result)) {
if (!preg_match("(^\.{$data2['group_id']}|\.{$data2['group_id']}\.|\.{$data2['group_id']}$)", $user_data['user_groups'])) {
$user_groups_opts .= "<option value='".$data2['group_id']."'>".$data2['group_name']."</option>\n";
}
}
if (iADMIN && checkrights("UG") && $user_groups_opts) {
echo "<td align='right' class='tbl1'>".$locale['415']."\n";
echo "<select name='user_group' class='textbox' style='width:100px'>\n".$user_groups_opts."</select>\n";
echo "<input type='submit' name='add_to_group' value='".$locale['416']."' class='button' onclick=\"return confirm('".$locale['417']."');\" /></td>\n";
}
}
echo "</tr>\n</table>\n</form>\n";
}
}
} else {
$result = dbquery("SELECT * FROM ".DB_USER_GROUPS." WHERE group_id='".$_GET['group_id']."'");
if (dbrows($result)) {
$data = dbarray($result);
$result = dbquery("SELECT * FROM ".DB_USERS." WHERE user_groups REGEXP('^\\\.{$_GET['group_id']}$|\\\.{$_GET['group_id']}\\\.|\\\.{$_GET['group_id']}$') ORDER BY user_level DESC, user_name");
opentable($locale['420']);
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
echo "<td align='center' colspan='2' class='tbl1'><strong>".$data['group_name']."</strong> (".sprintf((dbrows($result) == 1 ? $locale['421'] : $locale['422']), dbrows($result)).")</td>\n";
echo "</tr>\n<tr>\n";
echo "<td class='tbl2'><strong>".$locale['423']."</strong></td>\n";
echo "<td align='center' width='1%' class='tbl2' style='white-space:nowrap'><strong>".$locale['424']."</strong></td>\n";
echo "</tr>\n";
while ($data = dbarray($result)) {
$cell_color = ($i % 2 == 0 ? "tbl1" : "tbl2"); $i++;
echo "<tr>\n<td class='$cell_color'>\n<a href='profile.php?lookup=".$data['user_id']."'>".$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 {
redirect("index.php");
}
}
closetable();
if (file_exists(INFUSIONS."cautions/locale/".$settings['locale'].".php")) {
include INFUSIONS."cautions/locale/".$settings['locale'].".php";
} else {
include INFUSIONS."cautions/locale/Polish.php";
$cautions_conf = dbarray(dbquery("SELECT group_id from ".$db_prefix."cautions_config"));
}
echo "<div style='margin:5px'></div>\n";
echo "<table cellpadding='0' cellspacing='1' width='400' class='tbl-border center'>\n<tr>\n";
echo "<td colspan='2' class='tbl2'><strong>Ostrzeżenia</strong></td>\n";
echo "</tr>\n<tr>\n";
$caution_r = dbquery("SELECT * from ".$db_prefix."cautions WHERE user_id=".$_GET['lookup']);
$c_count = mysql_numrows($caution_r);
echo "<td colspan='2' class='tbl1'>";
echo "<table cellpadding='0' cellspacing='0' width='100%'>";
echo "<tr>\n<td class='tbl' width='50%' align='right'>".$locale['C_014']."</td>\n<td class='tbl' colspan='2'><font style='font-size:13; color:red'><b>\n";
echo $c_count."</b></font></td>\n</tr>\n";
while ($caution = dbarray($caution_r))
{
$author = dbarray(dbquery("SELECT user_name from ".$db_prefix."users WHERE user_id=".$caution['who']));
echo "<tr>\n<td class='tbl' valign='top' align='right'><font style='font-size:9'>".$locale['C_021']."</font>".$author['user_name']."";
if ((checkgroup($cautions_conf['group_id']) && $cautions_conf['group_id']!=0) || iSUPERADMIN)
{
echo" <br>[ <a href='".INFUSIONS."cautions/cautions.php?action=del&userid=".$caution['user_id']."&id=".$caution['id' ]."'>
<font style='font-size:9; color:red'>".$locale['C_015']."</font></a> <font style='font-size:9'> | </font><a href='".INFUSIONS."cautions/cautions.php?action=edit&userid=".$caution['user_id']."&id=".$caution['id']."&username=".$data[ 'user_name']."'>
<font style='font-size:9; color:red'>".$locale['C_016']."</font></a> <font style='font-size:9'></font> ]
"; }
echo"</td>\n<td class='tbl' colspan='2'>\n";
echo "<font style='font-size:9'> | ".$caution['why']."</font><br> | ".showdate("forumdate", $caution['datestamp'])."</td>\n</tr>\n";
}
echo "</table>";
echo "</td>\n";
echo "</tr>\n</table>\n";
require_once THEMES."templates/footer.php";
?>
Edytowane przez Pieka dnia 25.06.2011 16:20:23
|
|
|
|
krystian1988 |
Dodany dnia 25.06.2011 16:19:16
|
Zaawansowany
Postów: 1187 Pomógł: 100
v7.02.07 Data rejestracji: 07.05.2009 17:37
|
Zamień na :
<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2008 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: profile.php
| Author: Nick Jones (Digitanium)
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at http://www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once "maincore.php";
require_once THEMES."templates/header.php";
include LOCALE.LOCALESET."view_profile.php";
include LOCALE.LOCALESET."user_fields.php";
if (!isset($_GET['group_id']) || !isnum($_GET['group_id'])) {
if (!isset($_GET['lookup']) || !isnum($_GET['lookup'])) { redirect("index.php"); }
$result = dbquery("SELECT * FROM ".DB_USERS." WHERE user_id='".$_GET['lookup']."'");
if (dbrows($result)) { $user_data = dbarray($result); } else { redirect("index.php"); }
if ($user_data['user_status'] > "0") { redirect("index.php"); }
if (iADMIN && checkrights("UG") && $user_data['user_id'] != $userdata['user_id']) {
if ((isset($_POST['add_to_group'])) && (isset($_POST['user_group']) && isnum($_POST['user_group']))) {
if (!preg_match("(^\.{$_POST['user_group']}$|\.{$_POST['user_group']}\.|\.{$_POST['user_group']}$)", $user_data['user_groups'])) {
$result = dbquery("UPDATE ".DB_USERS." SET user_groups='".$user_data['user_groups'].".".$_POST['user_group']."' WHERE user_id='".$user_data['user_id']."'");
}
redirect(FUSION_SELF."?lookup=".$user_data['user_id']);
}
}
add_to_title($locale['global_200'].$locale['400'].$locale['global_201'].$user_data['user_name']);
if (file_exists(INFUSIONS."cautions/locale/".$settings['locale'].".php")) {
include INFUSIONS."cautions/locale/".$settings['locale'].".php";
} else {
include INFUSIONS."cautions/locale/Polish.php";
$cautions_conf = dbarray(dbquery("SELECT group_id from ".$db_prefix."cautions_config"));
}
$cautions_conf = dbarray(dbquery("SELECT group_id from ".$db_prefix."cautions_config"));
echo "<table cellpadding='0' cellspacing='1' width='400' class='tbl-border center'>\n<tr>\n";
echo "<td colspan='2' class='tbl2'><strong>".$locale['C_000']."</strong></td>\n";
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
$caution_r = dbquery("SELECT * from ".$db_prefix."cautions WHERE user_id=".$_GET['lookup']);
$c_count = mysql_numrows($caution_r);
echo "<table cellpadding='0' cellspacing='0' width='100%'>";
echo "</tr>\n<tr>\n";
while ($caution = dbarray($caution_r))
{
//dotyczace innego//
$result = dbquery("DELETE FROM ".$db_prefix."online WHERE online_lastactive<".(time()-60)."");
$facount = dbquery("SELECT count(post_id) FROM ".$db_prefix."posts");
$topics = dbquery("SELECT count(thread_id) FROM ".$db_prefix."threads");
$result = dbquery("SELECT user_id,user_name FROM ".$db_prefix."users ORDER BY user_joined DESC");
$total = dbrows($result);
$data = dbarray($result);//koniec//
$author = dbarray(dbquery("SELECT user_name from ".$db_prefix."users WHERE user_id=".$caution['who']));
echo "<tr>\n<td class='tbl' valign='top' align='right'><font style='font-size:9'>".$locale['C_021']."</font><a href='".BASEDIR."profile.php?lookup=".$caution['user_id']."' class='side'><b>".$author['user_name']."</a>";
if ((checkgroup($cautions_conf['group_id']) && $cautions_conf['group_id']!=0) || iSUPERADMIN)
{
echo" [ <a href='".INFUSIONS."cautions/cautions.php?action=del&userid=".$caution['user_id']."&id=".$caution['id' ]."'>
<font style='font-size:9; color:red'>".$locale['C_015']."</font></a> <font style='font-size:9'> | </font><a href='".INFUSIONS."cautions/cautions.php?action=edit&userid=".$caution['user_id']."&id=".$caution['id']."'>
<font style='font-size:9; color:red'>".$locale['C_016']."</font></a> <font style='font-size:9'></font> ]
"; }
echo"</td>\n<td class='tbl' colspan='2'>\n";
echo "<font style='font-size:9'> | ".$caution['why']."</font><br> | ".showdate("forumdate", $caution['datestamp'])."</td>\n</tr>\n";
}
echo "</table>";
opentable($locale['400']);
echo "<table cellpadding='0' cellspacing='1' width='400' class='tbl-border center'>\n<tr>\n";
if ($user_data['user_avatar'] && file_exists(IMAGES."avatars/".$user_data['user_avatar'])) {
echo "<td rowspan='5' width='1%' class='tbl profile_user_avatar'><!--profile_user_avatar--><img src='".IMAGES."avatars/".$user_data['user_avatar']."' alt='' /></td>\n";
}
echo "<td width='1%' class='tbl1' style='white-space:nowrap'>".$locale['u001']."</td>\n";
echo "<td align='right' class='tbl1 profile_user_name'><!--profile_user_name-->".$user_data['user_name']."</td>\n";
echo "</tr>\n<tr>\n";
echo "<td width='1%' class='tbl1' style='white-space:nowrap'></td>\n";
echo "<td align='right' class='tbl1 profile_user_level'><!--profile_user_level-->".getuserlevel($user_data['user_level'])."</td>\n";
echo "</tr>\n";
if ($user_data['user_hide_email'] != "1" || iADMIN) {
echo "<tr>\n";
echo "<td width='1%' class='tbl1' style='white-space:nowrap'>".$locale['u005']."</td>\n";
echo "<td align='right' class='tbl1'>".hide_email($user_data['user_email'])."</td>\n";
echo "</tr>\n";
}
echo "<tr>\n";
echo "<td width='1%' class='tbl1' style='white-space:nowrap'>".$locale['u040']."</td>\n";
echo "<td align='right' class='tbl1'>".showdate("longdate", $user_data['user_joined'])."</td>\n";
echo "</tr>\n<tr>\n";
echo "<td width='1%' class='tbl1' style='white-space:nowrap'>".$locale['u041']."</td>\n";
echo "<td align='right' class='tbl1'>".($user_data['user_lastvisit'] ? showdate("longdate", $user_data['user_lastvisit']) : $locale['u042'])."</td>\n";
echo "</tr>\n";
if (iMEMBER && $userdata['user_id'] != $user_data['user_id']) {
echo "<td colspan='".($user_data['user_avatar'] && file_exists(IMAGES."avatars/".$user_data['user_avatar']) ? "3" : "2")."' class='tbl2' style='text-align:center;white-space:nowrap'><a href='messages.php?msg_send=".$user_data['user_id']."' title='".$locale['u043']."'>".$locale['u043']."</a></td>\n";
echo "</tr>\n";
}
echo "</table>\n";
echo "<div style='margin:5px'></div>\n";
$profile_method = "display"; $i = 0; $user_fields_output = array("", "", "", ""); $ob_active = false;
$result2 = dbquery("SELECT * FROM ".DB_USER_FIELDS." ORDER BY field_group, field_order");
if (dbrows($result2)) {
while($data2 = dbarray($result2)) {
if ($i != $data2['field_group']) {
if ($ob_active) {
$user_fields_output[$i] = ob_get_contents();
ob_end_clean();
$ob_active = false;
}
$i = $data2['field_group'];
}
if (!$ob_active) {
ob_start();
$ob_active = true;
}
if (file_exists(LOCALE.LOCALESET."user_fields/".$data2['field_name'].".php")) {
include LOCALE.LOCALESET."user_fields/".$data2['field_name'].".php";
}
if (file_exists(INCLUDES."user_fields/".$data2['field_name']."_include.php")) {
include INCLUDES."user_fields/".$data2['field_name']."_include.php";
}
}
}
if ($ob_active) {
$user_fields_output[$i] = ob_get_contents();
ob_end_clean();
}
if (array_key_exists(1, $user_fields_output) && $user_fields_output[1]) {
echo "<div style='margin:5px'></div>\n";
echo "<table cellpadding='0' cellspacing='1' width='400' class='tbl-border center'>\n<tr>\n";
echo "<td colspan='2' class='tbl2'><strong>".$locale['u044']."</strong></td>\n";
echo "</tr>\n".$user_fields_output[1];
echo "</table>\n";
}
if (array_key_exists(2, $user_fields_output) && $user_fields_output[2]) {
echo "<div style='margin:5px'></div>\n";
echo "<table cellpadding='0' cellspacing='1' width='400' class='tbl-border center'>\n<tr>\n";
echo "<td colspan='2' class='tbl2'><strong>".$locale['u045']."</strong></td>\n";
echo "</tr>\n".$user_fields_output[2];
echo "</table>\n";
}
if (array_key_exists(4, $user_fields_output) && $user_fields_output[4]) {
echo "<div style='margin:5px'></div>\n";
echo "<table cellpadding='0' cellspacing='1' width='400' class='tbl-border center'>\n<tr>\n";
echo "<td colspan='2' class='tbl2'><strong>".$locale['u047']."</strong></td>\n";
echo "</tr>\n".$user_fields_output[4];
echo "</table>\n";
}
if (iADMIN && checkrights("M")) {
echo "<div style='margin:5px'></div>\n";
echo "<table cellpadding='0' cellspacing='1' width='400' class='tbl-border center'>\n<tr>\n";
echo "<td colspan='2' class='tbl2'><strong>".$locale['u048']."</strong></td>\n";
echo "</tr>\n<tr>\n";
echo "<td width='1%' class='tbl1' style='white-space:nowrap'>".$locale['u049']."</td>\n";
echo "<td align='right' class='tbl1'>".$user_data['user_ip']."</td>\n";
echo "</tr>\n</table>\n";
}
if ($user_data['user_groups']) {
echo "<div style='margin:5px'></div>\n";
echo "<table cellpadding='0' cellspacing='1' width='400' class='center tbl-border'>\n<tr>\n";
echo "<td class='tbl2'><strong>".$locale['401']."</strong></td>\n";
echo "</tr>\n<tr>\n";
echo "<td class='tbl1'>\n";
$user_groups = (strpos($user_data['user_groups'], ".") == 0 ? explode(".", substr($user_data['user_groups'], 1)) : explode(".", $user_data['user_groups']));
for ($i = 0; $i < count($user_groups); $i++) {
echo "<div style='float:left'><a href='".FUSION_SELF."?group_id=".$user_groups[$i]."'>".getgroupname($user_groups[$i])."</a></div><div style='float:right'>".getgroupname($user_groups[$i], true)."</div><div style='float:none;clear:both'></div>\n";
}
echo "</td>\n</tr>\n</table>\n";
}
if (iADMIN && checkrights("M") && $user_data['user_id'] != $userdata['user_id']) {
$user_groups_opts = "";
if ($user_data['user_level'] < 102) {
echo "<div style='margin:5px'></div>\n";
echo "<form name='admin_form' method='post' action='".FUSION_SELF."?lookup=".$user_data['user_id']."'>\n";
echo "<table cellpadding='0' cellspacing='0' width='400' class='center tbl-border'>\n<tr>\n";
echo "<td class='tbl2' colspan='2'><strong>".$locale['402']."</strong></td>\n";
echo "</tr>\n<tr>\n";
echo "<td class='tbl1'><!--profile_admin_options-->\n";
echo "<a href='".ADMIN."members.php".$aidlink."&step=edit&user_id=".$user_data['user_id']."'>".$locale['410']."</a> ::\n";
echo "<a href='".ADMIN."members.php".$aidlink."&step=ban&act=on&user_id=".$user_data['user_id']."&status=1' onclick=\"return confirm('".$locale['413']."');\">".$locale['411']."</a> ::\n";
echo "<a href='".ADMIN."members.php".$aidlink."&step=delete&status=0&user_id=".$user_data['user_id']."' onclick=\"return confirm('".$locale['414']."');\">".$locale['412']."</a></td>\n";
$result = dbquery("SELECT * FROM ".DB_USER_GROUPS." ORDER BY group_id ASC");
if (dbrows($result)) {
while ($data2 = dbarray($result)) {
if (!preg_match("(^\.{$data2['group_id']}|\.{$data2['group_id']}\.|\.{$data2['group_id']}$)", $user_data['user_groups'])) {
$user_groups_opts .= "<option value='".$data2['group_id']."'>".$data2['group_name']."</option>\n";
}
}
if (iADMIN && checkrights("UG") && $user_groups_opts) {
echo "<td align='right' class='tbl1'>".$locale['415']."\n";
echo "<select name='user_group' class='textbox' style='width:100px'>\n".$user_groups_opts."</select>\n";
echo "<input type='submit' name='add_to_group' value='".$locale['416']."' class='button' onclick=\"return confirm('".$locale['417']."');\" /></td>\n";
}
}
echo "</tr>\n</table>\n</form>\n";
}
}
} else {
$result = dbquery("SELECT * FROM ".DB_USER_GROUPS." WHERE group_id='".$_GET['group_id']."'");
if (dbrows($result)) {
$data = dbarray($result);
$result = dbquery("SELECT * FROM ".DB_USERS." WHERE user_groups REGEXP('^\\\.{$_GET['group_id']}$|\\\.{$_GET['group_id']}\\\.|\\\.{$_GET['group_id']}$') ORDER BY user_level DESC, user_name");
opentable($locale['420']);
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
echo "<td align='center' colspan='2' class='tbl1'><strong>".$data['group_name']."</strong> (".sprintf((dbrows($result) == 1 ? $locale['421'] : $locale['422']), dbrows($result)).")</td>\n";
echo "</tr>\n<tr>\n";
echo "<td class='tbl2'><strong>".$locale['423']."</strong></td>\n";
echo "<td align='center' width='1%' class='tbl2' style='white-space:nowrap'><strong>".$locale['424']."</strong></td>\n";
echo "</tr>\n";
while ($data = dbarray($result)) {
$cell_color = ($i % 2 == 0 ? "tbl1" : "tbl2"); $i++;
echo "<tr>\n<td class='$cell_color'>\n<a href='profile.php?lookup=".$data['user_id']."'>".$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 {
redirect("index.php");
}
}
closetable();
require_once THEMES."templates/footer.php";
?>
BRAK STOPKI = BRAK POMOCY NA SUPPORCIE.PRZECZYTAJ:
Regulamin Supportu Nie pomagam na PW!!!
|
|
|
|
konto usuniete |
Dodany dnia 25.06.2011 16:19:41
|
Bywalec
Postów: 457
Data rejestracji: 04.11.2009 00:54
ZBANOWANY: Dożywotnio
|
Niestety, sypnęło błędami:
Notice: Undefined variable: cautions_conf in /home/viget45/domains/***/public_html/profile.php on line 224
Notice: Undefined variable: cautions_conf in /home/viget45/domains/***/public_html/profile.php on line 224
Notice: Undefined index: user_name in /home/viget45/domains/***/public_html/profile.php on line 22
Edytowane przez hoopak dnia 04.08.2011 23:08:13
|
|
|
|
Konto ukryte |
Dodany dnia 25.06.2011 16:24:07
|
Początkujący
Postów: 151
Data rejestracji: 29.08.2009 15:26
ZBANOWANY: Dożywotnio
|
Sprawdź to:
<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2008 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: profile.php
| Author: Nick Jones (Digitanium)
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at http://www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once "maincore.php";
require_once THEMES."templates/header.php";
include LOCALE.LOCALESET."view_profile.php";
include LOCALE.LOCALESET."user_fields.php";
if (!isset($_GET['group_id']) || !isnum($_GET['group_id'])) {
if (!isset($_GET['lookup']) || !isnum($_GET['lookup'])) { redirect("index.php"); }
$result = dbquery("SELECT * FROM ".DB_USERS." WHERE user_id='".$_GET['lookup']."'");
if (dbrows($result)) { $user_data = dbarray($result); } else { redirect("index.php"); }
if ($user_data['user_status'] > "0") { redirect("index.php"); }
if (iADMIN && checkrights("UG") && $user_data['user_id'] != $userdata['user_id']) {
if ((isset($_POST['add_to_group'])) && (isset($_POST['user_group']) && isnum($_POST['user_group']))) {
if (!preg_match("(^\.{$_POST['user_group']}$|\.{$_POST['user_group']}\.|\.{$_POST['user_group']}$)", $user_data['user_groups'])) {
$result = dbquery("UPDATE ".DB_USERS." SET user_groups='".$user_data['user_groups'].".".$_POST['user_group']."' WHERE user_id='".$user_data['user_id']."'");
}
redirect(FUSION_SELF."?lookup=".$user_data['user_id']);
}
}
add_to_title($locale['global_200'].$locale['400'].$locale['global_201'].$user_data['user_name']);
opentable($locale['400']);
echo "<table cellpadding='0' cellspacing='1' width='400' class='tbl-border center'>\n<tr>\n";
if ($user_data['user_avatar'] && file_exists(IMAGES."avatars/".$user_data['user_avatar'])) {
echo "<td rowspan='5' width='1%' class='tbl profile_user_avatar'><!--profile_user_avatar--><img src='".IMAGES."avatars/".$user_data['user_avatar']."' alt='' /></td>\n";
}
echo "<td width='1%' class='tbl1' style='white-space:nowrap'>".$locale['u001']."</td>\n";
echo "<td align='right' class='tbl1 profile_user_name'><!--profile_user_name-->".$user_data['user_name']."</td>\n";
echo "</tr>\n<tr>\n";
echo "<td width='1%' class='tbl1' style='white-space:nowrap'></td>\n";
echo "<td align='right' class='tbl1 profile_user_level'><!--profile_user_level-->".getuserlevel($user_data['user_level'])."</td>\n";
echo "</tr>\n";
if ($user_data['user_hide_email'] != "1" || iADMIN) {
echo "<tr>\n";
echo "<td width='1%' class='tbl1' style='white-space:nowrap'>".$locale['u005']."</td>\n";
echo "<td align='right' class='tbl1'>".hide_email($user_data['user_email'])."</td>\n";
echo "</tr>\n";
}
echo "<tr>\n";
echo "<td width='1%' class='tbl1' style='white-space:nowrap'>".$locale['u040']."</td>\n";
echo "<td align='right' class='tbl1'>".showdate("longdate", $user_data['user_joined'])."</td>\n";
echo "</tr>\n<tr>\n";
echo "<td width='1%' class='tbl1' style='white-space:nowrap'>".$locale['u041']."</td>\n";
echo "<td align='right' class='tbl1'>".($user_data['user_lastvisit'] ? showdate("longdate", $user_data['user_lastvisit']) : $locale['u042'])."</td>\n";
echo "</tr>\n";
if (iMEMBER && $userdata['user_id'] != $user_data['user_id']) {
echo "<td colspan='".($user_data['user_avatar'] && file_exists(IMAGES."avatars/".$user_data['user_avatar']) ? "3" : "2")."' class='tbl2' style='text-align:center;white-space:nowrap'><a href='messages.php?msg_send=".$user_data['user_id']."' title='".$locale['u043']."'>".$locale['u043']."</a></td>\n";
echo "</tr>\n";
}
echo "</table>\n";
echo "<div style='margin:5px'></div>\n";
$profile_method = "display"; $i = 0; $user_fields_output = array("", "", "", ""); $ob_active = false;
$result2 = dbquery("SELECT * FROM ".DB_USER_FIELDS." ORDER BY field_group, field_order");
if (dbrows($result2)) {
while($data2 = dbarray($result2)) {
if ($i != $data2['field_group']) {
if ($ob_active) {
$user_fields_output[$i] = ob_get_contents();
ob_end_clean();
$ob_active = false;
}
$i = $data2['field_group'];
}
if (!$ob_active) {
ob_start();
$ob_active = true;
}
if (file_exists(LOCALE.LOCALESET."user_fields/".$data2['field_name'].".php")) {
include LOCALE.LOCALESET."user_fields/".$data2['field_name'].".php";
}
if (file_exists(INCLUDES."user_fields/".$data2['field_name']."_include.php")) {
include INCLUDES."user_fields/".$data2['field_name']."_include.php";
}
}
}
if ($ob_active) {
$user_fields_output[$i] = ob_get_contents();
ob_end_clean();
}
if (array_key_exists(1, $user_fields_output) && $user_fields_output[1]) {
echo "<div style='margin:5px'></div>\n";
echo "<table cellpadding='0' cellspacing='1' width='400' class='tbl-border center'>\n<tr>\n";
echo "<td colspan='2' class='tbl2'><strong>".$locale['u044']."</strong></td>\n";
echo "</tr>\n".$user_fields_output[1];
echo "</table>\n";
}
if (array_key_exists(2, $user_fields_output) && $user_fields_output[2]) {
echo "<div style='margin:5px'></div>\n";
echo "<table cellpadding='0' cellspacing='1' width='400' class='tbl-border center'>\n<tr>\n";
echo "<td colspan='2' class='tbl2'><strong>".$locale['u045']."</strong></td>\n";
echo "</tr>\n".$user_fields_output[2];
echo "</table>\n";
}
if (array_key_exists(4, $user_fields_output) && $user_fields_output[4]) {
echo "<div style='margin:5px'></div>\n";
echo "<table cellpadding='0' cellspacing='1' width='400' class='tbl-border center'>\n<tr>\n";
echo "<td colspan='2' class='tbl2'><strong>".$locale['u047']."</strong></td>\n";
echo "</tr>\n".$user_fields_output[4];
echo "</table>\n";
}
if (iADMIN && checkrights("M")) {
echo "<div style='margin:5px'></div>\n";
echo "<table cellpadding='0' cellspacing='1' width='400' class='tbl-border center'>\n<tr>\n";
echo "<td colspan='2' class='tbl2'><strong>".$locale['u048']."</strong></td>\n";
echo "</tr>\n<tr>\n";
echo "<td width='1%' class='tbl1' style='white-space:nowrap'>".$locale['u049']."</td>\n";
echo "<td align='right' class='tbl1'>".$user_data['user_ip']."</td>\n";
echo "</tr>\n</table>\n";
}
if ($user_data['user_groups']) {
echo "<div style='margin:5px'></div>\n";
echo "<table cellpadding='0' cellspacing='1' width='400' class='center tbl-border'>\n<tr>\n";
echo "<td class='tbl2'><strong>".$locale['401']."</strong></td>\n";
echo "</tr>\n<tr>\n";
echo "<td class='tbl1'>\n";
$user_groups = (strpos($user_data['user_groups'], ".") == 0 ? explode(".", substr($user_data['user_groups'], 1)) : explode(".", $user_data['user_groups']));
for ($i = 0; $i < count($user_groups); $i++) {
echo "<div style='float:left'><a href='".FUSION_SELF."?group_id=".$user_groups[$i]."'>".getgroupname($user_groups[$i])."</a></div><div style='float:right'>".getgroupname($user_groups[$i], true)."</div><div style='float:none;clear:both'></div>\n";
}
echo "</td>\n</tr>\n</table>\n";
}
if (iADMIN && checkrights("M") && $user_data['user_id'] != $userdata['user_id']) {
$user_groups_opts = "";
if ($user_data['user_level'] < 102) {
echo "<div style='margin:5px'></div>\n";
echo "<form name='admin_form' method='post' action='".FUSION_SELF."?lookup=".$user_data['user_id']."'>\n";
echo "<table cellpadding='0' cellspacing='0' width='400' class='center tbl-border'>\n<tr>\n";
echo "<td class='tbl2' colspan='2'><strong>".$locale['402']."</strong></td>\n";
echo "</tr>\n<tr>\n";
echo "<td class='tbl1'><!--profile_admin_options-->\n";
echo "<a href='".ADMIN."members.php".$aidlink."&step=edit&user_id=".$user_data['user_id']."'>".$locale['410']."</a> ::\n";
echo "<a href='".ADMIN."members.php".$aidlink."&step=ban&act=on&user_id=".$user_data['user_id']."&status=1' onclick=\"return confirm('".$locale['413']."');\">".$locale['411']."</a> ::\n";
echo "<a href='".ADMIN."members.php".$aidlink."&step=delete&status=0&user_id=".$user_data['user_id']."' onclick=\"return confirm('".$locale['414']."');\">".$locale['412']."</a></td>\n";
$result = dbquery("SELECT * FROM ".DB_USER_GROUPS." ORDER BY group_id ASC");
if (dbrows($result)) {
while ($data2 = dbarray($result)) {
if (!preg_match("(^\.{$data2['group_id']}|\.{$data2['group_id']}\.|\.{$data2['group_id']}$)", $user_data['user_groups'])) {
$user_groups_opts .= "<option value='".$data2['group_id']."'>".$data2['group_name']."</option>\n";
}
}
if (iADMIN && checkrights("UG") && $user_groups_opts) {
echo "<td align='right' class='tbl1'>".$locale['415']."\n";
echo "<select name='user_group' class='textbox' style='width:100px'>\n".$user_groups_opts."</select>\n";
echo "<input type='submit' name='add_to_group' value='".$locale['416']."' class='button' onclick=\"return confirm('".$locale['417']."');\" /></td>\n";
}
}
echo "</tr>\n</table>\n</form>\n";
}
}
} else {
$result = dbquery("SELECT * FROM ".DB_USER_GROUPS." WHERE group_id='".$_GET['group_id']."'");
if (dbrows($result)) {
$data = dbarray($result);
$result = dbquery("SELECT * FROM ".DB_USERS." WHERE user_groups REGEXP('^\\\.{$_GET['group_id']}$|\\\.{$_GET['group_id']}\\\.|\\\.{$_GET['group_id']}$') ORDER BY user_level DESC, user_name");
opentable($locale['420']);
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
echo "<td align='center' colspan='2' class='tbl1'><strong>".$data['group_name']."</strong> (".sprintf((dbrows($result) == 1 ? $locale['421'] : $locale['422']), dbrows($result)).")</td>\n";
echo "</tr>\n<tr>\n";
echo "<td class='tbl2'><strong>".$locale['423']."</strong></td>\n";
echo "<td align='center' width='1%' class='tbl2' style='white-space:nowrap'><strong>".$locale['424']."</strong></td>\n";
echo "</tr>\n";
while ($data = dbarray($result)) {
$cell_color = ($i % 2 == 0 ? "tbl1" : "tbl2"); $i++;
echo "<tr>\n<td class='$cell_color'>\n<a href='profile.php?lookup=".$data['user_id']."'>".$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 {
redirect("index.php");
}
}
closetable();
if (file_exists(INFUSIONS."cautions/locale/".$settings['locale'].".php")) {
include INFUSIONS."cautions/locale/".$settings['locale'].".php";
} else {
include INFUSIONS."cautions/locale/Polish.php";
}
echo "<div style='margin:5px'></div>\n";
echo "<table cellpadding='0' cellspacing='1' width='400' class='tbl-border center'>\n<tr>\n";
echo "<td colspan='2' class='tbl2'><strong>Ostrzeżenia</strong></td>\n";
echo "</tr>\n<tr>\n";
$cautions_conf = dbarray(dbquery("SELECT group_id from ".$db_prefix."cautions_config"));
$caution_r = dbquery("SELECT * from ".$db_prefix."cautions WHERE user_id=".$_GET['lookup']);
$c_count = mysql_numrows($caution_r);
echo "<td colspan='2' class='tbl1'>";
echo "<table cellpadding='0' cellspacing='0' width='100%'>";
echo "<tr>\n<td class='tbl' width='50%' align='right'>".$locale['C_014']."</td>\n<td class='tbl' colspan='2'><font style='font-size:13; color:red'><b>\n";
echo $c_count."</b></font></td>\n</tr>\n";
while ($caution = dbarray($caution_r))
{
$author = dbarray(dbquery("SELECT user_name from ".$db_prefix."users WHERE user_id=".$caution['who']));
echo "<tr>\n<td class='tbl' valign='top' align='right'><font style='font-size:9'>".$locale['C_021']."</font>".$author['user_name']."";
if ((checkgroup($cautions_conf['group_id']) && $cautions_conf['group_id']!=0) || iSUPERADMIN)
{
echo" <br>[ <a href='".INFUSIONS."cautions/cautions.php?action=del&userid=".$caution['user_id']."&id=".$caution['id' ]."'>
<font style='font-size:9; color:red'>".$locale['C_015']."</font></a> <font style='font-size:9'> | </font><a href='".INFUSIONS."cautions/cautions.php?action=edit&userid=".$caution['user_id']."&id=".$caution['id']."&username=".$data[ 'user_name']."'>
<font style='font-size:9; color:red'>".$locale['C_016']."</font></a> <font style='font-size:9'></font> ]
"; }
echo"</td>\n<td class='tbl' colspan='2'>\n";
echo "<font style='font-size:9'> | ".$caution['why']."</font><br> | ".showdate("forumdate", $caution['datestamp'])."</td>\n</tr>\n";
}
echo "</table>";
echo "</td>\n";
echo "</tr>\n</table>\n";
require_once THEMES."templates/footer.php";
?>
Edytowane przez Pieka dnia 25.06.2011 16:41:53
|
|
|
|
Konto ukryte |
Dodany dnia 25.06.2011 16:32:13
|
Początkujący
Postów: 151
Data rejestracji: 29.08.2009 15:26
ZBANOWANY: Dożywotnio
|
A brak user_name to błąd tego że jest "data" a nie "user_data"
Linia 228 zamień:
".$data['user_name']."
na:
".$user_data['user_name']."
A linie 213 na:
$caution_r = dbquery("SELECT * from ".$db_prefix."cautions WHERE user_id='".$_GET['lookup']."'");
I sprawdz czy działają grupy
Edytowane przez Konto ukryte dnia 25.06.2011 16:54:25
|
|
|
|
konto usuniete |
Dodany dnia 25.06.2011 16:38:58
|
Bywalec
Postów: 457
Data rejestracji: 04.11.2009 00:54
ZBANOWANY: Dożywotnio
|
Dziękuję, pomogło:)
Wiadomość doklejona:
Jeszcze mam dwa pytania:
1)Kidy dodaję ostrzeżenie, użytkownik otrzymuj PW dwa razy, co może być przyczyną?
2)Kiedy użytkownik przekracza ilość ostrzeżeń, po której nie może już pisać na forum widzi ostrzeżenie, której treść ustaliłem w panelu administracyjnym. Tylko, że nie wiele tam można wpisać, urywa tekst.Gdzie w kodzie ( i którym) znajdę część odpowiedzialną za wyświetlanie tej informacji?
Wiadomość doklejona:
Kojne mam pytania:
Dodając użytkownikowi ostrzeżenie, otrzymuje dwa (i dwa pw)jedno ostrzeżenie jest z dopiskiem powodu ostrzeżenia, a drugie nie (wyświetlające się w profilu).
Kiedy chcę edytować i zapisać ostrzeżenie mam coś takiego:
Something is wrong in your syntax obok 'datestamp='1309024013' WHERE id='28'' w linii 1
I pytanie jak wcześniejszej, gdzie tkwi błąd?
Edytowane przez konto usuniete dnia 25.06.2011 19:48:34
|
|
|
|
Dzonson |
Dodany dnia 17.07.2011 15:15:35
|
Początkujący
Postów: 236 Pomógł: 3 Ostrzeżeń: 2
v7.02.07 Data rejestracji: 16.11.2010 18:13
|
A można dostac jakąś instrukcje instalacji wtyczki?
Edytowane przez Drecha dnia 17.07.2011 15:18:08
|
|
|
|
Konto ukryte |
Dodany dnia 17.07.2011 17:34:05
|
Początkujący
Postów: 151
Data rejestracji: 29.08.2009 15:26
ZBANOWANY: Dożywotnio
|
Podmienić pliki, uruchomić plik instalacyjny.
Edytowane przez Drecha dnia 17.07.2011 17:35:52
|
|
|
|
Dzonson |
Dodany dnia 18.07.2011 17:55:19
|
Początkujący
Postów: 236 Pomógł: 3 Ostrzeżeń: 2
v7.02.07 Data rejestracji: 16.11.2010 18:13
|
Zrobiłem jak mówiłeś ale wywala coś takiego:
Table 'test_webb_cba_pl.fusion4j797_cautions' doesn't exist
Edytowane przez Pieka dnia 29.07.2011 21:17:41
|
|
|
|
Konto ukryte |
Dodany dnia 18.07.2011 17:57:01
|
Początkujący
Postów: 151
Data rejestracji: 29.08.2009 15:26
ZBANOWANY: Dożywotnio
|
Gdzie ci to wyświetla? |
|
|
|
Dzonson |
Dodany dnia 18.07.2011 18:49:34
|
Początkujący
Postów: 236 Pomógł: 3 Ostrzeżeń: 2
v7.02.07 Data rejestracji: 16.11.2010 18:13
|
Wyświetla mi to jak wejdę w profil usera.
Edytowane przez khaman dnia 18.07.2011 19:45:22
|
|
|
|
Konto ukryte |
Dodany dnia 18.07.2011 19:01:38
|
Początkujący
Postów: 151
Data rejestracji: 29.08.2009 15:26
ZBANOWANY: Dożywotnio
|
Daj sobie:
$cautions_conf = dbarray(dbquery("SELECT group_id from ".$db_prefix."cautions_config"));
po:
if (file_exists(INFUSIONS."cautions/locale/".$settings['locale'].".php")) {
include INFUSIONS."cautions/locale/".$settings['locale'].".php";
} else {
include INFUSIONS."cautions/locale/Polish.php";
}
Edytowane przez Pieka dnia 29.07.2011 21:17:58
|
|
|
|
Dzonson |
Dodany dnia 29.07.2011 19:12:07
|
Początkujący
Postów: 236 Pomógł: 3 Ostrzeżeń: 2
v7.02.07 Data rejestracji: 16.11.2010 18:13
|
Witam ponownie znów pojawiły się błędy:
public_html/maincore.php
mysql_num_rows(): supplied argument is not a valid MySQL result resource Linia: 228
forum/viewthread.php
Use of undefined constant DB_AWARD - assumed 'DB_AWARD' Linia: 280
forum/viewthread.php
include(../infusions/awards/infusion_db.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory Linia: 279
Wszystko jest związane z modyfikacją ostrzeżenia.
Na dodatek na forum w poście pojawia się coś takiego:
Table 'gtacity_sql.DB_AWARD' doesn't exist
Edytowane przez Pieka dnia 29.07.2011 21:18:36
|
|
|
|
Konto ukryte |
Dodany dnia 29.07.2011 19:23:52
|
Początkujący
Postów: 151
Data rejestracji: 29.08.2009 15:26
ZBANOWANY: Dożywotnio
|
Ile razy mam ci powtarzać że to nie jest związane z wtyczką ostrzeżeń. |
|
|
|
Dzonson |
Dodany dnia 29.07.2011 19:37:02
|
Początkujący
Postów: 236 Pomógł: 3 Ostrzeżeń: 2
v7.02.07 Data rejestracji: 16.11.2010 18:13
|
Pod rangą jest wyświetlany błąd (prawdopodobnie dotyczy bazy danych):
Table 'xxxxxxxx.DB_AWARD' doesn't exist
Co muszę z tym zrobić?
Edytowane przez Pieka dnia 29.07.2011 21:19:33
|
|
|
|
Konto ukryte |
Dodany dnia 29.07.2011 19:52:45
|
Początkujący
Postów: 151
Data rejestracji: 29.08.2009 15:26
ZBANOWANY: Dożywotnio
|
A mój błąd. Usuń ten kod:
include INFUSIONS."awards/infusion_db.php";
$sqlaward = dbquery("SELECT * FROM ".DB_AWARD." WHERE award_user='".$data['user_id']."'");
if (dbrows($sqlaward)) {
echo "<!--forum_thread_user_info--><span class='small'><strong>Nagrody</span><br />\n";
while($award = dbarray($sqlaward)) {
echo "<span>";
echo "<img src='".INFUSIONS."awards/images/awards/".$award['award_img']."' class='tTip' title='".$award['award_info']."'>\n";
echo "</span>";
}
}
Edytowane przez Konto ukryte dnia 29.07.2011 20:45:35
|
|
|
|
Dzonson |
Dodany dnia 29.07.2011 20:10:21
|
Początkujący
Postów: 236 Pomógł: 3 Ostrzeżeń: 2
v7.02.07 Data rejestracji: 16.11.2010 18:13
|
Ok spoko każdemu się zdarza, ok zrobiłem tak jak trzeba jest już ok.
Edytowane przez Dzonson dnia 29.07.2011 20:14:29
|
|
|
|
cristo |
Dodany dnia 04.08.2011 11:55:29
|
Przedszkolak
Postów: 84 Ostrzeżeń: 1
v7.02.03 Data rejestracji: 02.08.2008 12:41
|
Witam moje spostrzeżenia na temat tej wtyczki:
1. Jestem SuperAdminem o id=956 po dodaniu komuś ostrzeżenia ja dostaje PW, że dostałem ostrzeżenie, a nie osoba ostrzegana w dodatku PW jest od użytkownika o id=1 (SuperAdmin), a nie od tego kto je dał.
2. Na drugim serwisie gdzie to ja jestem jedynym SuperAdminem o id=1 sytuacja jest taka sama. Obie wersje PF 7.02.03
3. PW przychodzi dopiero po drugim ostrzeżeniu.
4. Kiedy chcę edytować ostrzeżenie z poziomu profilu to widzę takie coś:
Zmiana treści ostrzeżenia dla:(i właśnie tu na czerwono jest użytkownik ale nie ten którego edytuje tylko jest to ostatni użytkownik który się zarejestrował). Mało tego jak zmienię treść to wywala błąd:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'datestamp='1312451455' WHERE id='7'' at line 1
i dostaję PW, że ostrzeżenie zostało zmienione (w rzeczywistości nie zostało)
5. Mam ustawione po 3 ostrzeżenia dla Shouta i Forum, a blokada pisania działa dopiero po 4 ostrzeżeniach więc tu się potwierdza to że 1 ostrzeżenia nie liczy ale je wyświetla.
Teraz powiedzcie mi co źle robię, albo gdzie jest błąd ?
EDIT:
6. Przydało by się aby po wejściu w profil usera była możliwość dodania tam od razu ostrzeżenia.
Edytowane przez cristo dnia 04.08.2011 12:00:14
|
|
|