Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Kvailas klausimas dėl profile.php
Parašė Zidezzon· 2008 Rugs. 1 19:09:10
#1
Sveiki reik kad pagelbetumet viena dalyka su profile.php failu. Kai as paspaudziu ant nuorodos pvz
http://www.kalvarija.gan.lt/prof...?lookup=1, tai man redirektina atgal į index.php kame čia bėda?Gal galit pataisyti? Štai profile.php failas:
<?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 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($lookup) || !isNum($lookup)) {
redirect("index.php");
} else {
$result = dbquery("SELECT * FROM ".DB_USERS." WHERE user_id='$lookup'");
if (dbrows($result)) { $data = dbarray($result); } else { redirect("index.php"); }
}
if (!isset($group_id) && !isset($_GET['view'])) {
if (isset($_POST['rate'])) {
if (isNum($_POST['rating']) && !dbcount("(*)","user_ratings","rate_user = '".$userdata['user_id']."' AND rate_subject = '$lookup'") && iMEMBER) {
$result = dbquery("INSERT INTO ".DB_USER_RATINGS." (rate_user,rate_subject,rate_opt,rate_date,rate_ip) VALUES ('".$userdata['user_id']."','$lookup','".$_POST['rating']."','".time()."','".$_SERVER['REMOTE_ADDR']."');");
if ($result) redirect(FUSION_SELF."?lookup=$lookup");
} else {
redirect("http://www.google.lt");
}
}
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";
$v = 0;
$result = dbquery("SELECT * FROM ".DB_USER_RATINGS." WHERE rate_subject = '$lookup'");
while ($datax = dbarray($result)) $v = $v+$datax['rate_opt'];
$res = $v;
$vert = (dbrows($result) != 0 ? round($res/dbrows($result),2) : "Nëra");
$rdata = dbarray(dbquery("SELECT * FROM ".DB_USER_RATINGS." WHERE rate_subject = '$lookup' ORDER BY rate_date DESC LIMIT 1"));
echo "Vartotojo ávertinimas: $vert<br>\n";
if (iMEMBER) {
if (!dbcount("(*)","user_ratings","rate_user = '".$userdata['user_id']."' AND rate_subject = '$lookup'")) {
echo " <form method='post' action='".FUSION_SELF."?lookup=$lookup'>\n<select name='rating' class='textbox'>\n";
for ($i = 1; $i < 11; $i++) echo "<option value='$i'>$i</option>\n";
echo "</select> <input name='rate' type='submit' value='Ávertinti' class='textbox'>\n</form>\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";
?>
Redagavo bad_user· 2008 Rugs. 1 22:09:56
Parašė ramon· 2008 Rugs. 1 19:09:44
#2
Štai ir pristatau, naujają klubų sistemą :) Kaip Games.lt :]:]:]
Parašė Zidezzon· 2008 Rugs. 1 19:09:26
#3
Tai padesi ar ne?
Parašė iNeT· 2008 Rugs. 1 19:09:01
#4
Ble stabilus lopas jau cia. :]:]:] :[:[:[
Parašė Zidezzon· 2008 Rugs. 1 19:09:09
#5
Neflodink, lope tu :[
Parašė Qrmiz· 2008 Rugs. 1 19:09:15
#6
Tema buvo perkelta ir siūlau pakeisti pavadinimą jos :)
dar klausimas - o nieko tam profile.php nekeitei ?
Parašė Zidezzon· 2008 Rugs. 1 19:09:57
#7
Bandziau pritaikyt v6 SoBig ivertitinmo moda v7 :(
Parašė ramon· 2008 Rugs. 1 19:09:47
#8
Ueikite visi: ir mazi ir dideli!!! :]:]:]
Parašė MAnjack· 2008 Rugs. 1 20:09:27
#9
Užėjau. Ką man daryt? :?
Parašė ramon· 2008 Rugs. 1 20:09:54
#10
Svaigt kad esi mazas arba didelis :]:]:]
Parašė Jaunelis· 2008 Rugs. 1 20:09:01
#11
Zidezzon parašė:
Neflodink, lope tu :[
Wa čia tai tu jau klysti tu esi lopas ir visu pirma susižinok ka reiškai floodinty...
Parašė Zidezzon· 2008 Rugs. 1 20:09:13
#12
Tyek tu iš viso! Kelias tonas sveriantis prasmirdes lavonas...
P.s. Padesit?
Parašė ramon· 2008 Rugs. 1 20:09:13
#13
Nerekaukit abu!
P.s. kodel turetume?
:]:]:]
Parašė Zidezzon· 2008 Rugs. 1 20:09:24
#14
Atiduosiu Jaunelio acc
Parašė ramon· 2008 Rugs. 1 20:09:46
#15
Dievie tu mano.... Reikalingas tipo mums tas kazkoks
Jaunelio acc? :]:]:]
Parašė Zidezzon· 2008 Rugs. 1 20:09:15
#16
Atiduosiu savo su visom asmeninem zinutem ir grupem :)
Parašė ramon· 2008 Rugs. 1 20:09:43
#17
Tu apie koki acc kalbi ? :] Kartais ne porno ? :]:]:]
Parašė Zidezzon· 2008 Rugs. 1 20:09:42
#18
As savo atiduosiu jei man padesit:
Asmenines zinutes
Gautos: 17
ozzWANTED: 3 žin
mXt: 2 žin
liutas286: 5 žin
ramon: 4 žin
blogai:3 žin
Parašė ramon· 2008 Rugs. 1 20:09:05
#19
Haha :] shiuksle :]:]:]
Parašė iNeT· 2008 Rugs. 1 20:09:09
#20
Vartotojų grupės
Idiotas, Floderis, Neskaito taisyklių
:D
Parašė ramon· 2008 Rugs. 1 21:09:28
#21
WerHaSs ko nenori pasidziaugt tuom kad ir tu esi
Idiotu grupei? :]:]:]
Parašė Zidezzon· 2008 Rugs. 1 21:09:12
#22
As galiu prideti dar ir daugiau grupiu :s
Parašė ramon· 2008 Rugs. 1 21:09:50
#23
Taip taip, tai pridek sau td "Pirdunai" :]:]:]
Parašė Zidezzon· 2008 Rugs. 1 21:09:12
#24
Ginčas baigtas lamos namo. Db padekite :( Sunku labai?
Parašė bad_user· 2008 Rugs. 1 21:09:20
#25
Aš tai tikrai nepadėsiu ir kitiem nepatariu prasidėti su trioxalu ;)
Parašė Toonis· 2008 Rugs. 1 22:09:09
#26
Ueikite visi: ir mazi ir dideli!!!
:]:]:]