[MOD] Pomógł
|
wlodekp |
Dodany dnia 09.12.2007 12:47:14
|
Weteran
Postów: 3101 Pomógł: 29
Data rejestracji: 21.05.2005 22:27
|
To co chcesz wypacza idee modu pomógł.
I jeśli chcesz tak, to niestety samemu musisz dojść.
Na marginesie dodam, że Autor z wiadomych przyczyn już nie supportuje tego tematu i nie będzie!
|
|
|
|
Wścibski Gość |
Dodany dnia 24.11.2024 20:44:36
|
Pan Kontekstualny
Postów: n^x
Data rejestracji: Zawsze
|
|
IP: localhost |
|
|
Marcus Fenix |
Dodany dnia 09.12.2007 12:57:44
|
Początkujący
Postów: 159
Data rejestracji: 13.07.2007 12:25
|
Chodzi mi o to ze jest np na forum jakis poradnik i osoba ktorej on pomogł daje punkt dla autora. i tyle
Marc!us
|
|
|
|
wlodekp |
Dodany dnia 09.12.2007 13:29:11
|
Weteran
Postów: 3101 Pomógł: 29
Data rejestracji: 21.05.2005 22:27
|
Wykładnikiem popularności takiego tematu jest ilość wejść pobrań.
Poradnik to jak książka ma służyć dużej bezimiennej rzeszy z założenia, a jego trafność wyżej napisałem jak.
I powiem Ci sam często na wielu forach tak robię sprawdzam, czy trafiłem.
Mam tematy na forach angielskojęzycznych np ponad tysiąc wejść i dwie odpowiedzi, ale z założenia ich nie oczekuję tylko cieszę się z wejść, które tu są odzwierciedleniem trafności pomocy.
Oczywiście idąc za naszym regulaminem, przy sensownie nazwanym konkretnym temacie to działa także w tą stronę.
I tyle.
|
|
|
|
kris2005a |
Dodany dnia 04.04.2008 17:14:42
|
Przedszkolak
Postów: 58
Data rejestracji: 23.01.2008 16:11
|
Fajny MOD ale mam mały kłopot, które z lini w Modzie są pogrubiane? Jakoś trudno odczytać czy są pisane normalnie czy też są pogrubione.
|
|
|
|
markes01 |
Dodany dnia 04.04.2008 17:35:21
|
Początkujący
Postów: 219 Pomógł: 1
Data rejestracji: 16.03.2007 13:34
|
Wreszcie ..... Mod wspaniały ..
|
|
|
|
DORBITB |
Dodany dnia 13.04.2008 21:22:03
|
Początkujący
Postów: 117 Pomógł: 1 Ostrzeżeń: 5
v7.02.04 Data rejestracji: 18.04.2006 20:55
|
Czy mozna zrobic tak zeby bylo to w komentarzach np jakis user napisal artykul i ktos mu pisze komentarz, a autor artykulu moze wcisnac w komenatrz jakis Dziekuje=Pomogl. To samo jak na forum tylko ze w komentarzach prosze bardzo Slawekneo bo to on pisal ten mod albo kogos innego kto by umial. |
|
|
|
veto |
Dodany dnia 15.04.2008 16:45:54
|
Przedszkolak
Postów: 60 Pomógł: 2 Ostrzeżeń: 1
Data rejestracji: 24.07.2007 17:36
|
A jak go przerobić, żeby możliwośc dodania punktu za pkmoc była możliwa dla każdego i tak samo jak jest jednorazowo za kazdego posta, ale chodzi wlasnie o to żeby każdy mogł każdemu za jakiegoś posta dać pkta. |
|
|
|
spolprog |
Dodany dnia 19.04.2008 17:00:46
|
Przedszkolak
Postów: 14
Data rejestracji: 09.01.2006 20:04
|
Czy jest jakaś wersja tego modu pod EF ? Bo mam znaczne zmiany w kodzie w pliku viewthread u siebie i nie wiem gdzie wrzucić te linijki ...
Edytowane przez Milka dnia 19.04.2008 17:14:18
|
|
|
|
kefirek |
Dodany dnia 19.04.2008 17:47:25
|
Zaawansowany
Postów: 1191 Pomógł: 418 Ostrzeżeń: 1
v6.00.xxx Data rejestracji: 06.04.2008 21:59
|
Czy jest jakaś wersja tego modu pod EF ? Bo mam znaczne zmiany w kodzie w pliku viewthread u siebie i nie wiem gdzie wrzucić te linijki ...
Ja mam EP i dodałem tak:
<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright Š 2002 - 2006 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 INCLUDES."forum_functions_include.php";
require_once BASEDIR."subheader.php";
include LOCALE.LOCALESET."forum/main.php";
//include pd_warning functions
include INFUSIONS."pd_warning/warning.inc.php";
$posts_per_page = 20;
if (!FUSION_QUERY || !isset($forum_id) || !isNum($forum_id) || !isset($thread_id) || !isNum($thread_id)) fallback("index.php");
$result = dbquery(
"SELECT f.*, f2.forum_name AS forum_cat_name
FROM ".$db_prefix."forums f
LEFT JOIN ".$db_prefix."forums f2 ON f.forum_cat=f2.forum_id
WHERE f.forum_id='".$forum_id."'"
);
if (dbrows($result)) {
$fdata = dbarray($result);
if (!checkgroup($fdata['forum_access']) || !$fdata['forum_cat']) fallback("index.php");
} else {
fallback("index.php");
}
$can_post = checkgroup($fdata['forum_posting']);
if (iMEMBER) { include INCLUDES."mtr_functions_include.php"; $mtr = mtr_get_data("",$thread_id);}
$forum_mods = explode(".", $fdata['forum_moderators']);
if (iMEMBER && in_array($userdata['user_id'], $forum_mods)) { define("iMOD", true); } else { define("iMOD", false); }
$result = dbquery("SELECT * FROM ".$db_prefix."threads WHERE thread_id='".$thread_id."' AND forum_id='".$fdata['forum_id']."'");
if (dbrows($result)) { $tdata = dbarray($result); } else { fallback("index.php"); }
$caption = $fdata['forum_cat_name']." | <a href='viewforum.php?forum_id=".$fdata['forum_id']."'>".$fdata['forum_name']."</a>";
$result = dbquery("UPDATE ".$db_prefix."threads SET thread_views=thread_views+1 WHERE thread_id='$thread_id'");
if (iMEMBER && $can_post && !$tdata['thread_locked'] && isset($_POST['postquickreply'])) {
$flood = false;
$message = stripinput(censorwords($_POST['message']));
if ($message != "") {
$result = dbquery("SELECT MAX(post_datestamp) AS last_post FROM ".$db_prefix."posts WHERE post_author='".$userdata['user_id']."'");
if (dbrows($result) > 0) {
$data = dbarray($result);
if ((time() - $data['last_post']) < $settings['flood_interval']) {
$flood = true;
$result = dbquery("INSERT INTO ".$db_prefix."flood_control (flood_ip, flood_timestamp) VALUES ('".USER_IP."', '".time()."')");
if (dbcount("(flood_ip)", "flood_control", "flood_ip='".USER_IP."'") > 4) {
$result = dbquery("UPDATE ".$db_prefix."users SET user_status='1' WHERE user_id='".$userdata['user_id']."'");
}
fallback("viewforum.php?forum_id=$forum_id");
}
}
if (!$flood) {
$sig = ($userdata['user_sig'] ? '1' :'0');
$smileys = isset($_POST['disable_smileys']) ? "0" : "1";
$subject = "RE: ".$tdata['thread_subject'];
$result = dbquery("UPDATE ".$db_prefix."forums SET forum_lastpost='".time()."', forum_lastuser='".$userdata['user_id']."' WHERE forum_id='$forum_id'");
$result = dbquery("UPDATE ".$db_prefix."threads SET thread_lastpost='".time()."', thread_lastuser='".$userdata['user_id']."' WHERE thread_id='$thread_id'");
$result = dbquery("INSERT INTO ".$db_prefix."posts (forum_id, thread_id, post_subject, post_message, post_showsig, post_smileys, post_author, post_datestamp, post_ip, post_edituser, post_edittime) VALUES ('$forum_id', '$thread_id', '$subject', '$message', '$sig', '$smileys', '".$userdata['user_id']."', '".time()."', '".USER_IP."', '0', '0')");
$newpost_id = mysql_insert_id();
$result = dbquery("UPDATE ".$db_prefix."users SET user_posts=user_posts+1 WHERE user_id='".$userdata['user_id']."'");
redirect("postify.php?post=reply&error=0&forum_id=$forum_id&thread_id=$thread_id&post_id=$newpost_id");
}
}
}
/*-----------CODE Anfang-----------*/
//letzten log-out anzeigen "0 = aus" "1 = an"
$view = "1";
//Prywatne Wiadomości counter
$msg_count = dbcount("(message_id)", "messages", "message_to='".$userdata['user_id']."' AND message_read='0'AND message_folder='0'");
$msg_all = dbcount("(message_id)", "messages", "message_to='".$userdata['user_id']."' AND message_folder='0'");
//1. Tabelle + Login Code
echo "<table cellpadding='0' cellspacing='0' width='100%' class='tbl-border'>
<tr>
<td>
<table border='0' cellpadding='0' cellspacing='1' width='100%'>
<tr class='tbl1'>
<td style='padding: 7px 4px 7px 4px; '>
<img src='".INFUSIONS."forum_navi/rolle.gif'> <a href='".BASEDIR."forum/index.php'><u>".$settings['sitename']."</u></a> > <u>".$fcdata['forum_name']."</u> > <a href='viewforum.php?forum_id=".$fdata['forum_id']."'><u>".$fdata['forum_name']."</u></a><br>";
if ($rows != 0) {
$result = dbquery(
"SELECT * FROM ".$db_prefix."posts
LEFT JOIN ".$db_prefix."users ON ".$db_prefix."posts.post_author=".$db_prefix."users.user_id
WHERE thread_id='$thread_id' ORDER BY post_datestamp LIMIT 1"
);
$numrows = dbrows($result);
while ($data = dbarray($result)) {
$post_subject=$data['post_subject']; }}
echo " <img src='".INFUSIONS."forum_navi/rolle.gif'> <font size='2'><b>$post_subject<b></font>
</td>
<td width='310'>";
if (iMEMBER) {
echo "<b> Witam, <a href='".BASEDIR."profile.php?lookup=".$userdata['user_id']."'><b>".$userdata['user_name']."</b></a>.</b><br>";
if ($view == 1) {
echo " Dzisiaj Jest: ".($lastvisited != 0 ? showdate("%d.%m.%Y godz %H:%M", $lastvisited) : $locale['u049'])."<br>"; }
echo " <a href='".BASEDIR."messages.php'><u>Prywatne Wiadomości</u></a>: Nie Czytane: $msg_count, Wszystkie: $msg_all.";
} else {
//Login_Code
echo "<table cellpadding='0' cellspacing='0' width='310'>
".(isset($loginerror) ? $loginerror : "")."
<form name='loginform' method='post' action='".FUSION_SELF."'>
<tr><td> ".$locale['061']."</td>
<td><input type='text' name='user_name' class='textbox' style='width:100px'></td>
<td><input type='checkbox' name='remember_me' value='y' title='".$locale['063']."' style='vertical-align:middle;'>Zapamiętaj</td></tr>
<tr><td> ".$locale['062']."</td>
<td><input type='password' name='user_pass' class='textbox' style='width:100px'></td>
<td> <input type='submit' name='login' value='Zaloguj' class='button'></td></tr>
</form></table>\n";
}
echo "</td></tr></table></td></tr></table>\n";
//2. Tabelle mit Hyper-Links
echo "<table cellpadding='0' cellspacing='0' width='100%' class='tbl-border'>
<tr>
<td>
<table border='0' cellpadding='0' cellspacing='1' width='100%'>
<tr class='tbl1'>";
if (iMEMBER) {
echo " <td style='padding: 6px 4px 6px 4px; ' align='center'>
<div align='center'><a href='".BASEDIR."edit_profile.php'><b>Profil</b></a></div></td>";
} else {
echo "<td style='padding: 6px 4px 6px 4px; ' align='center'>
<div align='center'><a href='".BASEDIR."register.php'><b>Zarejestruj</b></a></div>
</td>";
}
echo "
<td align='center'>
<div align='center'><a href='".BASEDIR."/administration/index.php'><b>Panel Admina</b></a></div>
</td>";
echo "<td style='padding: 6px 4px 6px 4px; ' align='center'>
<div align='center'><a href='".BASEDIR."faq.php'><b>FAQ</b></a></div>
</td>
<td align='center'>
<div align='center'><a href='".BASEDIR."forum/viewthread.php?forum_id=7&thread_id=64'><b>Podgląd Forum</b></a></div>
</td>";
if (iMEMBER) {
echo "<td align='center'>
<div align='center'><a href='".BASEDIR."members.php'><b>Użytkownicy</b></a></div>
</td>
<td align='center'>
<div align='center'><a href='".BASEDIR."setuser.php?logout=yes'><b>Wyloguj</b></a></div>
</td>"; }
echo "</tr></table></td></tr></table>\n";
tablebreak();
//original code beginnt hier
/*-----------CODE ENDE-----------*/
opentable($locale['500']);
echo "<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td class='smallalt'><a href='index.php'>".$settings['sitename']."</a> | $caption</td>\n";
if (iMEMBER && $can_post) {
echo "<td align='right'>\n";
if (!$tdata['thread_locked']) {
echo "<a href='post.php?action=reply&forum_id=$forum_id&thread_id=$thread_id'><img src='".THEME."forum/reply.gif' alt='".$locale['565']."' style='border:0px;'></a>\n";
}
echo "<a href='post.php?action=newthread&forum_id=$forum_id'><img src='".THEME."forum/newthread.gif' alt='".$locale['566']."' style='border:0px;'></a></td>\n";
}
echo "</tr>
</table>\n";
$rows = dbcount("(thread_id)", "posts", "thread_id='$thread_id'");
if (isset($pid) && isNum($pid)) {
$reply_count = dbcount("(post_id)", "posts", "thread_id='".$tdata['thread_id']."' AND post_id<='".$pid."'");
if ($reply_count > $posts_per_page) $rowstart = ((ceil($reply_count / $posts_per_page)-1)*$posts_per_page);
}
if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0;
if ($rows > $posts_per_page) {
echo "<div align='center' style='margin-top:5px;margin-bottom:5px;'>
".makePageNav($rowstart,$posts_per_page,$rows,3,FUSION_SELF."?forum_id=$forum_id&thread_id=$thread_id&")."
</div>\n";
}
echo "<table cellpadding='0' cellspacing='1' width='100%' class='tbl-border'>\n";
if ($rows != 0) {
$result = dbquery(
"SELECT p.*, fa.attach_id, fa.attach_name, fa.attach_ext, fa.attach_size, u.*, u2.user_name AS edit_name FROM ".$db_prefix."posts p
LEFT JOIN ".$db_prefix."forum_attachments fa USING(post_id)
LEFT JOIN ".$db_prefix."users u ON p.post_author = u.user_id
LEFT JOIN ".$db_prefix."users u2 ON p.post_edituser = u2.user_id AND post_edituser > '0'
WHERE p.thread_id='$thread_id' ORDER BY post_datestamp LIMIT $rowstart,$posts_per_page"
);
$numrows = dbrows($result);
while ($data = dbarray($result)) {
$message = $data['post_message'];
if ($data['post_showsig']) { $message = $message."\n\n<hr>".$data['user_sig']; }
if ($data['post_smileys']) { $message = parsesmileys($message); }
$message = parseubb($message);
$message = nl2br($message);
if ($data['post_edittime'] != "0") {
$edituser = "<a href='../profile.php?lookup=".$data['post_edituser']."'>".$data['edit_name']."</a>";
$edittime = showdate("forumdate", $data['post_edittime']);
}
$is_mod = in_array($data['user_id'], $forum_mods) && $data['user_level'] < "102" ? true : false;
echo "<tr>
<td width='145' class='tbl2'>".$locale['501']."</td>
<td class='tbl2'><a name='post_".$data['post_id']."' id='post_".$data['post_id']."'></a>".$data['post_subject']."</td>
</tr>
<tr>
<td valign='top' rowspan='3' width='145' class='tbl1'>
<a href='../profile.php?lookup=".$data['user_id']."'>".$data['user_name']."</a><br>
<span class='alt'>".($is_mod ? $locale['userf1'] : getuserlevel($data['user_level']))."</span><br><br>\n";
if ($data['user_avatar'] != "") {
echo "<img src='".IMAGES."avatars/".$data['user_avatar']."' alt='".$locale['567']."'><br><br>\n";
$height = "185";
} else {
$height = "70";
}
include(INFUSIONS."rank_system/forum.php");
echo "<span class='alt'>".$locale['502']."</span> ".$data['user_posts']."<br>\n";
if ($data['user_location']) echo "<span class='alt'>".$locale['503']."</span> ".$data['user_location']."<br>\n";
echo "<b><a href='view_post_helping_user.php?action=view_help&user_id=".$data['user_id']."'>Pomógł:</a></b> ".$data['user_help_point']." ";
echo "<br><br><span class='alt'>".$locale['504']."</span> ".showdate("%d.%m.%y", $data['user_joined']);
//pd_warning
$user_points = show_warning_points($data[user_id]);
echo "<br /><br /><small><a style='cursor:help;' onClick=\"h1171915583();\">".$locale['PDWA200']."</a></small><br />
<a href='".INFUSIONS."pd_warning/warning.php?postid=".$data[post_id]."' title='".$user_points." ".($user_points==1 ? $locale['PDWA201'] : $locale['PDWA202'])."'>".show_warning_symbols($user_points)."</a>";
echo "</td>
<br><br><b>";
if ($data['post_help'] != 0) {
echo"<span style='font-size:9'><center>Ten post został uznany za pomocny przez autora tematu</center></span>";
}
echo"</b></td>
<td>
<table cellspacing='0' cellpadding='0' width='100%'>
<tr>
<td class='tbl1'>".$locale['505'].showdate("forumdate", $data['post_datestamp'])."</td>
<td align='right' class='tbl1'>\n";
if (iMEMBER && $can_post) {
if (!$tdata['thread_locked']) {
if ($tdata['thread_author'] == $userdata['user_id'] && $tdata['thread_help'] < 2 && $data['post_author'] != $userdata['user_id'] && $data['post_help'] == 0) {
echo "<a href='post.php?action=help&forum_id=$forum_id&thread_id=".$data['thread_id']."&post_id=".$data['post_id']."'><b>Pomógł mi</b></a>";
}
if ($userdata['user_id'] == $data['post_author'] || iMOD || iSUPERADMIN) {
echo "<a href='post.php?action=edit&forum_id=$forum_id&thread_id=".$data['thread_id']."&post_id=".$data['post_id']."'><img src='".THEME."forum/edit.gif' alt='".$locale['568']."' style='border:0px;'></a>\n";
}
echo "<a href='post.php?action=reply&forum_id=$forum_id&thread_id=".$data['thread_id']."&post_id=".$data['post_id'].""e=".$data['post_id']."'><img src='".THEME."forum/quote.gif' alt='".$locale['569']."' style='border:0px;'></a>\n";
if (iMOD || iSUPERADMIN && $data['post_ip'] != "0.0.0.0" && file_exists(THEME."forum/ip.gif")) echo "<img src='".THEME."forum/ip.gif' alt='".$locale['570']."' title='".$data['post_ip']."' style='border:0px;'>\n";
} else {
if (iMOD || iSUPERADMIN) {
echo "<a href='post.php?action=edit&forum_id=$forum_id&thread_id=".$data['thread_id']."&post_id=".$data['post_id']."'><img src='".THEME."forum/edit.gif' alt='".$locale['568']."' style='border:0px;'></a>\n";
if ($data['post_ip'] != "0.0.0.0" && file_exists(THEME."forum/ip.gif")) echo "<img src='".THEME."forum/ip.gif' alt='".$locale['570']."' title='".$data['post_ip']."' style='border:0px;'>\n";
}
}
}
echo "</td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign='top' height='$height' class='tbl1'>
$message";
if ($data['attach_id']) {
if (in_array($data['attach_ext'], $imagetypes) && @getimagesize(FORUM."attachments/".$data['attach_name'])) {
echo "<hr>\n".$data['user_name'].$locale['506']."<br><br>\n<img src='".FORUM."attachments/".$data['attach_name']."'>";
} else {
echo "<hr>\n".$data['user_name'].$locale['507']."<br>\n<a href='".FUSION_SELF."?forum_id=$forum_id&thread_id=$thread_id&getfile=".$data['post_id']."'>".$data['attach_name']."</a>";
}
}
if ($data['post_edittime'] != "0") {
echo "<hr>\n".$locale['508'].$edituser.$locale['509']."$edittime";
}
echo "</td>
</tr>
<tr>
<td class='tbl1'>\n";
if ($data['user_aim']) {
echo "<a href='aim:goim?screenname=".str_replace(" ", "+", $data['user_aim'])."' target='_blank'><img src='".THEME."forum/aim.gif' alt='".$data['user_aim']."' style='border:0px;'></a> ";
}
if ($data['user_icq']) {
echo "<a href='http://icq.com/people/about_me.php?uin=".$data['user_icq']."' target='_blank'><img src='".THEME."forum/icq.gif' alt='".$data['user_icq']."' style='border:0px;'></a> ";
}
if ($data['user_msn']) {
echo "<a href='mailto:$data[user_msn]'><img src='".THEME."forum/msn.gif' alt='".$data['user_msn']."' style='border:0px;'></a> ";
}
if ($data['user_yahoo']) {
echo "<a href='http://uk.profiles.yahoo.com/$data[user_yahoo]' target='_blank'><img src='".THEME."forum/yahoo.gif' alt='".$data['user_yahoo']."' style='border:0px;'></a> ";
}
if ($data['user_web']) {
if (!strstr($data['user_web'], "http://")) { $urlprefix = "http://"; } else { $urlprefix = ""; }
echo "<a href='".$urlprefix."".$data['user_web']."' target='_blank'><img src='".THEME."forum/web.gif' alt='".$data['user_web']."' style='border:0px;'></a> ";
}
if (iMEMBER && $data['user_id'] != $userdata['user_id']) echo "<a href='".BASEDIR."messages.php?msg_send=".$data['user_id']."'><img src='".THEME."forum/pm.gif' alt='".$locale['571']."' style='border:0px;'></a>\n";
echo "</td>
</tr>\n";
}
}
echo "</table>\n";
if ($rows > $posts_per_page) {
echo "<div align='center' style='margin-top:5px;'>
".makePageNav($rowstart,$posts_per_page,$rows,3,FUSION_SELF."?forum_id=$forum_id&thread_id=$thread_id&")."
</div>\n";
}
echo "<table cellpadding='0' cellspacing='0' width='100%' style='margin-top:5px;'>\n<tr>\n";
$forum_list = ""; $current_cat = "";
$result = dbquery(
"SELECT f.forum_id, f.forum_name, f2.forum_name AS forum_cat_name
FROM ".$db_prefix."forums f
INNER JOIN ".$db_prefix."forums f2 ON f.forum_cat=f2.forum_id
WHERE ".groupaccess('f.forum_access')." AND f.forum_cat!='0' ORDER BY f2.forum_order ASC, f.forum_order ASC"
);
while ($data = dbarray($result)) {
if ($data['forum_cat_name'] != $current_cat) {
if ($current_cat != "") $forum_list .= "</optgroup>\n";
$current_cat = $data['forum_cat_name'];
$forum_list .= "<optgroup label='".$data['forum_cat_name']."'>\n";
}
$sel = ($data['forum_id'] == $fdata['forum_id'] ? " selected" : "");
$forum_list .= "<option value='".$data['forum_id']."'$sel>".$data['forum_name']."</option>\n";
}
$forum_list .= "</optgroup>\n";
echo "<td align='left' class='tbl'>".$locale['540']."<br>
<select name='jump_id' class='textbox' onChange=\"jumpForum(this.options[this.selectedIndex].value);\">
$forum_list</select></td>\n";
if (iMEMBER && $can_post) {
if (iMOD || iSUPERADMIN) {
echo "<td align='right' class='tbl'>
<form name='modopts' method='post' action='options.php?forum_id=$forum_id&thread_id=$thread_id'>
".$locale['520']."<br>
<select name='step' class='textbox'>
<option value='none'> </option>
<option value='renew'>".$locale['527']."</option>
<option value='delete'>".$locale['521']."</option>\n";
if (!$tdata['thread_locked']) {
echo "<option value='lock'>".$locale['522']."</option>\n";
} else {
echo "<option value='unlock'>".$locale['523']."</option>\n";
}
if (!$tdata['thread_sticky']) {
echo "<option value='sticky'>".$locale['524']."</option>\n";
} else {
echo "<option value='nonsticky'>".$locale['525']."</option>\n";
}
echo "<option value='move'>".$locale['526']."</option>\n";
echo "</select>
<input type='submit' name='go' value='".$locale['528']."' class='button'>
</form>
</td>
</tr>\n";
}
}
echo "</table>\n";
if (iMEMBER) {
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
if ($settings['thread_notify']) {
echo "<td valign='top' class='tbl'>";
if (dbcount("(thread_id)", "thread_notify", "thread_id='$thread_id' AND notify_user='".$userdata['user_id']."'")) {
$result = dbquery("UPDATE ".$db_prefix."thread_notify SET notify_datestamp='".time()."', notify_status='1' WHERE thread_id='$thread_id' AND notify_user='".$userdata['user_id']."'");
$notify_link = "<a href='postify.php?post=off&forum_id=$forum_id&thread_id=$thread_id'>".$locale['515']."</a>";
} else {
$notify_link = "<a href='postify.php?post=on&forum_id=$forum_id&thread_id=$thread_id'>".$locale['516']."</a>";
}
echo "$notify_link</td>\n";
}
if ($can_post) {
echo "<td align='right' class='tbl'>";
if (!$tdata['thread_locked']) {
echo "<a href='post.php?action=reply&forum_id=$forum_id&thread_id=$thread_id'><img src='".THEME."forum/reply.gif' alt='".$locale['565']."' style='border:0px;'></a>\n";
}
echo "<a href='post.php?action=newthread&forum_id=$forum_id'><img src='".THEME."forum/newthread.gif' alt='".$locale['566']."' style='border:0px;'></a>\n";
echo "</td>\n";
}
echo "</tr>\n</table>\n";
}
closetable();
tablebreak();
if (iMEMBER && $can_post && !$tdata['thread_locked']) {
opentable($locale['512']);
echo "<form name='inputform' method='post' action='".FUSION_SELF."?forum_id=$forum_id&thread_id=$thread_id'>
<table align='center' cellpadding='0' cellspacing='1' class='tbl-border'>
<tr>
<td align='center' class='tbl1'><textarea name='message' cols='80' rows='7' class='textbox'></textarea><br>
<input type='button' value='b' class='button' style='font-weight:bold;width:25px;' onClick=\"addText('message', '', '');\">
<input type='button' value='i' class='button' style='font-style:italic;width:25px;' onClick=\"addText('message', '', '');\">
<input type='button' value='u' class='button' style='text-decoration:underline;width:25px;' onClick=\"addText('message', '', '');\">
<input type='button' value='url' class='button' style='width:30px;' onClick=\"addText('message', '[url]', '[/url]');\">
<input type='button' value='mail' class='button' style='width:35px;' onClick=\"addText('message', '[mail]', '[/mail]');\">
<input type='button' value='img' class='button' style='width:30px;' onClick=\"addText('message', '[img]', '[/img]');\">
<input type='button' value='center' class='button' style='width:45px;' onClick=\"addText('message', '', ' ');\">
<input type='button' value='small' class='button' style='width:40px;' onClick=\"addText('message', '', '');\">
<input type='button' value='code' class='button' style='width:40px;' onClick=\"addText('message', '', ' ');\">
<input type='button' value='quote' class='button' style='width:45px;' onClick=\"addText('message', '', ' ');\"></td>
</tr>
<tr>
<td align='center' class='tbl2'>".displaysmileys("message")."<br>
<input type='checkbox' name='disable_smileys' value='1'>".$locale['513']."</td>
</tr>
<tr>
<td align='center' class='tbl1'><input type='submit' name='postquickreply' value='".$locale['514']."' class='button'></td>
</tr>
</table>
</form>\n";
closetable();
}
echo "<script type='text/javascript'>
function jumpForum(forumid) {
document.location.href='".FORUM."viewforum.php?forum_id='+forumid;
}
</script>\n";
require_once BASEDIR."footer.php";
?> Kliknij i zaczekaj na załadowanie kodu ...
Edytowane przez Pieka dnia 02.11.2008 15:05:05
|
|
|
|
spolprog |
Dodany dnia 19.04.2008 18:41:18
|
Przedszkolak
Postów: 14
Data rejestracji: 09.01.2006 20:04
|
To gdzie te linijki wkleiłbyś w moim viewthread ?
<?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 INCLUDES."forum_functions_include.php";
require_once BASEDIR."subheader.php";
include LOCALE.LOCALESET."user_fields.php";
if (isset($_COOKIE['ep_posts'])) {
$readed = explode(".", $_COOKIE['ep_posts']);
} else { $readed = array();}
$readed_posts="";
if (file_exists(THEME."forum/delete.gif")) { $delete_gif = THEME."forum/delete.gif"; } else { $delete_gif = "images/delete.gif"; }
$ile = dbquery("SELECT count(post_id) FROM ".$db_prefix."posts");
$table = "panels_forum";
require_once BASEDIR."side_left.php";
include LOCALE.LOCALESET."forum/main.php";
//cautions
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"));
// ------------
$posts_per_page = 20;
if (!FUSION_QUERY || !isset($forum_id) || !isNum($forum_id) || !isset($thread_id) || !isNum($thread_id)) fallback("index.php");
$result = dbquery("SELECT posts FROM ".$db_prefix."forumrang");
$posts=dbarray($result);
$post1 = $posts['posts'];
$posts=dbarray($result);
$post2 = $posts['posts'];
$posts=dbarray($result);
$post3 = $posts['posts'];
$posts=dbarray($result);
$post4 = $posts['posts'];
$posts=dbarray($result);
$post5 = $posts['posts'];
$posts=dbarray($result);
$post6= $posts['posts'];
$posts=dbarray($result);
$post7 = $posts['posts'];
$posts=dbarray($result);
$post8 = $posts['posts'];
$posts=dbarray($result);
$post9 = $posts['posts'];
$result = dbquery(
"SELECT f.*, f2.forum_name AS forum_cat_name
FROM ".$db_prefix."forums f
LEFT JOIN ".$db_prefix."forums f2 ON f.forum_cat=f2.forum_id
WHERE f.forum_id='".$forum_id."'"
);
if (dbrows($result)) {
$fdata = dbarray($result);
if (!checkgroup($fdata['forum_access']) || !$fdata['forum_cat']) fallback("index.php");
} else {
fallback("index.php");
}
$can_post = checkgroup($fdata['forum_posting']);
$forum_mods = explode(".", $fdata['forum_moderators']);
if (iMEMBER && in_array($userdata['user_id'], $forum_mods)) { define("iMOD", true); } else { define("iMOD", false); }
$result = dbquery("SELECT * FROM ".$db_prefix."threads WHERE thread_id='".$thread_id."' AND forum_id='".$fdata['forum_id']."'");
if (dbrows($result)) { $tdata = dbarray($result); } else { fallback("index.php"); }
$caption = $fdata['forum_cat_name']." | <a href='viewforum.php?forum_id=".$fdata['forum_id']."'>".$fdata['forum_name']."</a>";
$result = dbquery("UPDATE ".$db_prefix."threads SET thread_views=thread_views+1 WHERE thread_id='$thread_id'");
if (iMEMBER && $can_post && !$tdata['thread_locked'] && isset($_POST['postquickreply'])) {
$flood = false;
$message = stripinput(censorwords($_POST['message']));
if ($message != "") {
$result = dbquery("SELECT MAX(post_datestamp) AS last_post FROM ".$db_prefix."posts WHERE post_author='".$userdata['user_id']."'");
if (dbrows($result) > 0) {
$data = dbarray($result);
if ((time() - $data['last_post']) < $settings['flood_interval']) {
$flood = true;
$result = dbquery("INSERT INTO ".$db_prefix."flood_control (flood_ip, flood_timestamp) VALUES ('".USER_IP."', '".time()."')");
if (dbcount("(flood_ip)", "flood_control", "flood_ip='".USER_IP."'") > 4) {
$result = dbquery("UPDATE ".$db_prefix."users SET user_status='1' WHERE user_id='".$userdata['user_id']."'");
}
fallback("viewforum.php?forum_id=$forum_id");
}
}
if (!$flood) {
if ($tdata['thread_lastuser']!=$userdata['user_id'])
{
if (EPS)
{
$przydzial = dbarray(dbquery("SELECT point_ammount from ".DB_PREFIX."eps_points WHERE point_id='1'"));
$result = dbquery("UPDATE ".DB_PREFIX."users SET points_normal=points_normal+".($przydzial['point_ammount'])." WHERE user_id='".$userdata['user_id']."'");
}
$sig = ($userdata['user_sig'] ? '1' :'0');
$smileys = isset($_POST['disable_smileys']) ? "0" : "1";
$subject = "RE: ".$tdata['thread_subject'];
$result = dbquery("UPDATE ".$db_prefix."forums SET forum_lastpost='".time()."', forum_lastuser='".$userdata['user_id']."' WHERE forum_id='$forum_id'");
$result = dbquery("UPDATE ".$db_prefix."threads SET thread_lastpost='".time()."', thread_lastuser='".$userdata['user_id']."' WHERE thread_id='$thread_id'");
$result = dbquery("INSERT INTO ".$db_prefix."posts (forum_id, thread_id, post_subject, post_message, post_showsig, post_smileys, post_author, post_datestamp, post_ip, post_edituser, post_edittime) VALUES ('$forum_id', '$thread_id', '$subject', '$message', '$sig', '$smileys', '".$userdata['user_id']."', '".time()."', '".USER_IP."', '0', '0')");
$newpost_id = mysql_insert_id();
$result = dbquery("UPDATE ".$db_prefix."users SET user_posts=user_posts+1 WHERE user_id='".$userdata['user_id']."'");
} else {
$sig = ($userdata['user_sig'] ? '1' :'0');
$smileys = isset($_POST['disable_smileys']) ? "0" : "1";
$lastpost = dbarray(dbquery("SELECT post_id, post_message from ".$db_prefix."posts WHERE thread_id='$thread_id' ORDER BY post_datestamp DESC limit 1"));
$message2 = $lastpost['post_message']."\n \n".$locale['600']."\n \n".$message;
$result = dbquery("UPDATE ".$db_prefix."forums SET forum_lastpost='".time()."', forum_lastuser='".$userdata['user_id']."' WHERE forum_id='$forum_id'");
$result = dbquery("UPDATE ".$db_prefix."threads SET thread_lastpost='".time()."', thread_lastuser='".$userdata['user_id']."' WHERE thread_id='$thread_id'");
$result = dbquery("UPDATE ".$db_prefix."posts SET post_message='$message2', post_showsig='$sig', post_smileys='$smileys', post_datestamp='".time()."' WHERE post_id='".$lastpost['post_id']."'");
$newpost_id = $lastpost['post_id'];
}
// aktualizacja na stronie g³ównej forum liczby topiców,postow oraz pola last_user
$thread_count = dbcount("(*)", "threads", "forum_id='".$forum_id."'");
$posts_count = dbcount("(*)", "posts", "forum_id='".$forum_id."'");
$result = dbquery("UPDATE ".$db_prefix."forums SET forum_topic_count='".$thread_count."', forum_post_count='".$posts_count."', forum_lastuser_text='".$userdata['user_name']."' WHERE forum_id='".$forum_id."'");
// aktualizacja tabeli threads (thread_replies) - tylko odpowiedz w temacie
$posts_count = dbcount("(*)", "posts", "thread_id='".$thread_id."'");
$result = dbquery("UPDATE ".$db_prefix."threads SET thread_replies='".($posts_count-1)."' WHERE thread_id='".$thread_id."'");
if ($settings['thread_notify'] && isset($_POST['notify_me'])) {
if (!dbcount("(thread_id)", "thread_notify", "thread_id='$thread_id' AND notify_user='".$userdata['user_id']."'")) {
$result = dbquery("INSERT INTO ".$db_prefix."thread_notify (thread_id, notify_datestamp, notify_user, notify_status) VALUES('$thread_id', '".time()."', '".$userdata['user_id']."', '1')");
}
}
redirect("postify.php?post=reply&error=0&forum_id=$forum_id&thread_id=$thread_id&post_id=$newpost_id");
}
}
}
opentable($locale['500']);
echo "<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td class='smallalt'><a href='index.php'>".$settings['sitename']."</a> | $caption</td>\n";
if (iMEMBER && $can_post) {
echo "<td align='right'>\n";
if (!$tdata['thread_locked']) {
echo "<a href='post.php?action=reply&forum_id=$forum_id&thread_id=$thread_id'><img src='".THEME."forum/reply.gif' alt='".$locale['565']."' style='border:0px;'></a>\n";
}
echo "<a href='post.php?action=newthread&forum_id=$forum_id'><img src='".THEME."forum/newthread.gif' alt='".$locale['566']."' style='border:0px;'></a></td>\n";
}
echo "</tr>
</table>\n";
$rows = dbcount("(thread_id)", "posts", "thread_id='$thread_id'");
if (isset($pid) && isNum($pid)) {
$reply_count = dbcount("(post_id)", "posts", "thread_id='".$tdata['thread_id']."' AND post_id<='".$pid."'");
if ($reply_count > $posts_per_page) $rowstart = ((ceil($reply_count / $posts_per_page)-1)*$posts_per_page);
}
if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0;
if ($rows > $posts_per_page) {
echo "<div align='center' style='margin-top:5px;margin-bottom:5px;'>
".makePageNav($rowstart,$posts_per_page,$rows,3,FUSION_SELF."?forum_id=$forum_id&thread_id=$thread_id&")."
</div>\n";
}
echo "<table cellpadding='0' cellspacing='1' width='100%' class='tbl-border'>\n";
if ($rows != 0) {
$result = dbquery(
"SELECT p.*, fa.attach_id, fa.attach_name, fa.attach_ext, fa.attach_size, u.*, u2.user_name AS edit_name FROM ".$db_prefix."posts p
LEFT JOIN ".$db_prefix."forum_attachments fa USING(post_id)
LEFT JOIN ".$db_prefix."users u ON p.post_author = u.user_id
LEFT JOIN ".$db_prefix."users u2 ON p.post_edituser = u2.user_id AND post_edituser > '0'
WHERE p.thread_id='$thread_id' ORDER BY post_datestamp LIMIT $rowstart,$posts_per_page"
);
$numrows = dbrows($result);
$i = 0;
while ($data = dbarray($result)) {
$i++;
$message = $data['post_message'];
if ($data['post_showsig']) { $message = $message."\n\n<hr>".$data['user_sig']; }
if ($data['post_smileys']) { $message = parsesmileys($message); }
$message = parseubb($message);
$message = nl2br($message);
if ($data['post_edittime'] != "0") {
$edituser = "<a href='../profile.php?lookup=".$data['post_edituser']."'>".$data['edit_name']."</a>";
$edittime = showdate("forumdate", $data['post_edittime']);
}
$is_mod = in_array($data['user_id'], $forum_mods) && $data['user_level'] < "102" ? true : false;
echo "<tr>
<td width='145' class='tbl2'>".$locale['501']."</td>
<td class='tbl2'>";
if (iMEMBER)
{
$new=1;
if ($data['post_datestamp'] > $lastvisited)
{
if (in_array($data['post_id'], $readed)) $new=0; else $readed_posts .= ".".$data['post_id'];
} else $new=0;
if ($new) echo "<span style='color:yellow;'>".$locale['ep_004']."</span>"; else echo "";
}
echo" <a name='post_".$data['post_id']."' id='post_".$data['post_id']."'></a>".$data['post_subject']." </td>
</tr>
<tr>
<td valign='top' rowspan='3' width='145' class='tbl1'>
<a href='../profile.php?lookup=".$data['user_id']."' style='color:#".$data['user_color']."'>".$data['user_prefix'].$data['user_name']."</a>";
if (($data['user_id']!=$userdata['user_id']) && ($userdata['user_level'] == '103' || checkgroup($cautions_conf['group_id'])) && $userdata['user_level']>=$data['user_level'])
echo " - <a href='".INFUSIONS."cautions/cautions.php?action=add&userid=".$data['user_id']."&username=".$data['user_name']."&forum_id=".$_GET['forum_id']."&thread_id=".$_GET['thread_id']."'>".$locale['C_017']."</a>";
echo"<br><span class='alt'>".($is_mod ? $locale['userf1'] : getuserlevel($data['user_level']))."</span><br>\n";
if ($data['user_level'] >= 103) {
echo "<img src='".INFUSIONS."rank_system/img/best.gif'>
<img src='".INFUSIONS."rank_system/img/best.gif'>
<img src='".INFUSIONS."rank_system/img/best.gif'>
<img src='".INFUSIONS."rank_system/img/best.gif'>
<img src='".INFUSIONS."rank_system/img/best.gif'>
<br>";
} else {
if (EPS) $usr_posts = show_points($data['user_id']); else $usr_posts = $dadta['user_posts'];
if ($usr_posts <= $post1 ) {
echo "<img src='".INFUSIONS."rank_system/img/non.gif'>
<img src='".INFUSIONS."rank_system/img/non.gif'>
<img src='".INFUSIONS."rank_system/img/non.gif'>
<img src='".INFUSIONS."rank_system/img/non.gif'>
<img src='".INFUSIONS."rank_system/img/non.gif'>
<br>";
}
else if ($usr_posts <= $post2) {
echo "<img src='".INFUSIONS."rank_system/img/half.gif'>
<img src='".INFUSIONS."rank_system/img/non.gif'>
<img src='".INFUSIONS."rank_system/img/non.gif'>
<img src='".INFUSIONS."rank_system/img/non.gif'>
<img src='".INFUSIONS."rank_system/img/non.gif'>
<br>";
}
else if ($usr_posts <= $post3) {
echo "<img src='".INFUSIONS."rank_system/img/full.gif'>
<img src='".INFUSIONS."rank_system/img/non.gif'>
<img src='".INFUSIONS."rank_system/img/non.gif'>
<img src='".INFUSIONS."rank_system/img/non.gif'>
<img src='".INFUSIONS."rank_system/img/non.gif'>
<br>";
}
else if ($usr_posts <= $post4) {
echo "<img src='".INFUSIONS."rank_system/img/full.gif'>
<img src='".INFUSIONS."rank_system/img/half.gif'>
<img src='".INFUSIONS."rank_system/img/non.gif'>
<img src='".INFUSIONS."rank_system/img/non.gif'>
<img src='".INFUSIONS."rank_system/img/non.gif'>
<br>";
}
else if ($usr_posts <= $post5) {
echo "<img src='".INFUSIONS."rank_system/img/full.gif'>
<img src='".INFUSIONS."rank_system/img/full.gif'>
<img src='".INFUSIONS."rank_system/img/non.gif'>
<img src='".INFUSIONS."rank_system/img/non.gif'>
<img src='".INFUSIONS."rank_system/img/non.gif'>
<br>";
}
else if ($usr_posts <= $post6) {
echo "<img src='".INFUSIONS."rank_system/img/full.gif'>
<img src='".INFUSIONS."rank_system/img/full.gif'>
<img src='".INFUSIONS."rank_system/img/half.gif'>
<img src='".INFUSIONS."rank_system/img/non.gif'>
<img src='".INFUSIONS."rank_system/img/non.gif'>
<br>";
}
else if ($usr_posts <= $post7) {
echo "<img src='".INFUSIONS."rank_system/img/full.gif'>
<img src='".INFUSIONS."rank_system/img/full.gif'>
<img src='".INFUSIONS."rank_system/img/full.gif'>
<img src='".INFUSIONS."rank_system/img/non.gif'>
<img src='".INFUSIONS."rank_system/img/non.gif'>
<br>";
}
else if ($usr_posts <= $post8) {
echo "<img src='".INFUSIONS."rank_system/img/full.gif'>
<img src='".INFUSIONS."rank_system/img/full.gif'>
<img src='".INFUSIONS."rank_system/img/full.gif'>
<img src='".INFUSIONS."rank_system/img/half.gif'>
<img src='".INFUSIONS."rank_system/img/non.gif'>
<br>";
}
else if ($usr_posts <= $post9) {
echo "<img src='".INFUSIONS."rank_system/img/full.gif'>
<img src='".INFUSIONS."rank_system/img/full.gif'>
<img src='".INFUSIONS."rank_system/img/full.gif'>
<img src='".INFUSIONS."rank_system/img/full.gif'>
<img src='".INFUSIONS."rank_system/img/full.gif'>
<br>";
} else {
echo "<img src='".INFUSIONS."rank_system/img/best.gif'>
<img src='".INFUSIONS."rank_system/img/best.gif'>
<img src='".INFUSIONS."rank_system/img/best.gif'>
<img src='".INFUSIONS."rank_system/img/best.gif'>
<img src='".INFUSIONS."rank_system/img/best.gif'><br>";
}
}
echo "\n";
$height = "185";
echo genshadow($data['user_avatar'], '');
$caution_r = dbquery("SELECT * from ".$db_prefix."cautions WHERE user_id=".$data['user_id']);
$c_count = mysql_numrows($caution_r);
if ($c_count > 0) echo "<span class='alt'>".$locale['C_014']."</span>".$c_count."<br>";
if (iMEMBER) {
echo "<br><span class='shoutboxdate'>".$locale['502']." ".$data['user_posts']."<br>";
if (EPS) echo " ".$locale['eps560']." ".check_rang($data['user_id'])."<br>".$locale['eps561']." ".show_points($data['user_id'])."<br>";
echo "".$locale['u044']."<br>";
echo ($data['user_lastvisit'] != 0 ? showdate("shortdate", $data['user_lastvisit']) : $locale['u049'])."<br></span>";
}
echo "</td>
<td>
<table cellspacing='0' cellpadding='0' width='100%'>
<tr>
<td class='tbl1'>".$locale['505'].showdate("forumdate", $data['post_datestamp'])."</td>
<td align='right' class='tbl1'>\n";
if (iMEMBER && $can_post) {
if (!$tdata['thread_locked']) {
if ($userdata['user_id'] == $data['post_author'] || iMOD || iSUPERADMIN) {
echo "<a href='post.php?action=edit&forum_id=$forum_id&thread_id=".$data['thread_id']."&post_id=".$data['post_id']."'><img src='".THEME."forum/edit.gif' border='0' alt'Edit' title='Edit'></a>\n";
}
echo "<a href='post.php?action=reply&forum_id=$forum_id&thread_id=".$data['thread_id']."&post_id=".$data['post_id'].""e=".$data['post_id']."'><img src='".THEME."forum/quote.gif' alt='".$locale['569']."' title='Quote' style='border:0px;'></a>\n";
if (iMOD || iSUPERADMIN && $data['post_ip'] != "0.0.0.0" && file_exists(THEME."forum/ip.gif")) {
echo "<img src='".THEME."forum/ip.gif' alt='".$data['post_ip']."' title='".$data['post_ip']."' border='0'>\n";
}
if ($i == $numrows-1) $last_author=$data['post_author'];
if ($userdata['user_id'] == $data['post_author'] || iMOD || iSUPERADMIN) {
if ($i == $numrows) echo "<a href='post.php?action=delete&post_author=".$data['post_author']."&forum_id=$forum_id&thread_id=".$data['thread_id']."&post_id=".$data['post_id'].(isset($last_author) ? "&last=".$last_author : "")."'><img src='".$delete_gif."' border='0' alt'Delete' title='Delete'></a>\n";
else echo "<a href='post.php?action=delete&post_author=".$data['post_author']."&forum_id=$forum_id&thread_id=".$data['thread_id']."&post_id=".$data['post_id']."'><img src='".$delete_gif."' border='0' alt'Delete' title='Delete'></a>\n";
}
}
}
echo "</td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign='top' height='$height' class='tbl1'>
$message";
if ($data['attach_id']) {
if (in_array($data['attach_ext'], $imagetypes) && @getimagesize(FORUM."attachments/".$data['attach_name'])) {
echo "<hr>\n".$data['user_name'].$locale['506']."<br><br>\n<img src='".FORUM."attachments/".$data['attach_name']."'>";
} else {
echo "<hr>\n".$data['user_name'].$locale['507']."<br>\n<a href='".FUSION_SELF."?forum_id=$forum_id&thread_id=$thread_id&getfile=".$data['post_id']."'>".$data['attach_name']."</a>";
}
}
if ($data['post_edittime'] != "0") {
echo "<hr>\n".$locale['508'].$edituser.$locale['509']."$edittime";
}
echo "</td>
</tr>
<tr>
<td class='tbl1'>\n";
if ($data['user_aim'] && file_exists(THEME."forum/aim.gif") && $settings['locale']!='Polish') {
echo "<a href='aim:goim?screenname=".str_replace(" ", "+", $data['user_aim'])."' target='_blank'><img src='".THEME."forum/aim.gif' alt='".$data['user_aim']."' style='border:0px;'></a> ";
}
if ($data['user_icq']) {
echo "<a href='http://web.icq.com/wwp?Uin=".$data['user_icq']."' target='_blank'><img src='".THEME."forum/icq.gif' alt='".$data['user_icq']."' style='border:0px;'></a> ";
}
if ($data['user_yahoo']) {
echo "<a href='http://ludzie.tlen.pl/$data[user_yahoo]'><img src='".THEME."forum/yahoo.gif' alt='".$data['user_yahoo']."' style='border:0px;'></a> ";
}
if ($data['user_msn']) {
echo "<a href='gg:$data[user_msn]' target='_blank'><img src='".THEME."forum/msn.gif' alt='".$data['user_msn']."' style='border:0px;'></a> ";
}
if ($data['user_web']) {
if (!strstr($data['user_web'], "http://")) { $urlprefix = "http://"; } else { $urlprefix = ""; }
echo "<a href='".$urlprefix."".$data['user_web']."' target='_blank'><img src='".THEME."forum/web.gif' alt='".$data['user_web']."' style='border:0px;'></a> ";
}
echo "<a href='".BASEDIR."messages.php?msg_send=".$data['user_id']."'><img src='".THEME."forum/pm.gif' alt='".$locale['571']."' style='border:0px;'></a>
</td>
</tr>\n";
}
}
echo "</table>\n";
if ($rows > $posts_per_page) {
echo "<div align='center' style='margin-top:5px;'>
".makePageNav($rowstart,$posts_per_page,$rows,3,FUSION_SELF."?forum_id=$forum_id&thread_id=$thread_id&")."
</div>\n";
}
echo "<table cellpadding='0' cellspacing='0' width='100%' style='margin-top:5px;'>\n<tr>\n";
$forum_list = ""; $current_cat = "";
$result = dbquery(
"SELECT f.forum_id, f.forum_name, f2.forum_name AS forum_cat_name
FROM ".$db_prefix."forums f
INNER JOIN ".$db_prefix."forums f2 ON f.forum_cat=f2.forum_id
WHERE ".groupaccess('f.forum_access')." AND f.forum_cat!='0' ORDER BY f2.forum_order ASC, f.forum_order ASC"
);
while ($data = dbarray($result)) {
if ($data['forum_cat_name'] != $current_cat) {
if ($current_cat != "") $forum_list .= "</optgroup>\n";
$current_cat = $data['forum_cat_name'];
$forum_list .= "<optgroup label='".$data['forum_cat_name']."'>\n";
}
$sel = ($data['forum_id'] == $fdata['forum_id'] ? " selected" : "");
$forum_list .= "<option value='".$data['forum_id']."'$sel>".$data['forum_name']."</option>\n";
}
$forum_list .= "</optgroup>\n";
echo "<td align='left' class='tbl'>".$locale['540']."<br>
<select name='jump_id' class='textbox' onChange=\"jumpForum(this.options[this.selectedIndex].value);\">
$forum_list</select></td>\n";
if (iMEMBER && $can_post) {
if (iMOD || iSUPERADMIN) {
echo "<td align='right' class='tbl'>
<form name='modopts' method='post' action='options.php?forum_id=$forum_id&thread_id=$thread_id'>
".$locale['520']."<br>
<select name='step' class='textbox'>
<option value='none'> </option>
<option value='renew'>".$locale['527']."</option>
<option value='delete'>".$locale['521']."</option>\n";
if (!$tdata['thread_locked']) {
echo "<option value='lock'>".$locale['522']."</option>\n";
} else {
echo "<option value='unlock'>".$locale['523']."</option>\n";
}
if (!$tdata['thread_sticky']) {
echo "<option value='sticky'>".$locale['524']."</option>\n";
} else {
echo "<option value='nonsticky'>".$locale['525']."</option>\n";
}
echo "<option value='move'>".$locale['526']."</option>\n";
echo "</select>
<input type='submit' name='go' value='".$locale['528']."' class='button'>
</form>
</td>
</tr>\n";
}
}
echo "</table>\n";
if (iMEMBER) {
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
if ($settings['thread_notify']) {
echo "<td valign='top' class='tbl'>";
if (dbcount("(thread_id)", "thread_notify", "thread_id='$thread_id' AND notify_user='".$userdata['user_id']."'")) {
$result = dbquery("UPDATE ".$db_prefix."thread_notify SET notify_datestamp='".time()."', notify_status='1' WHERE thread_id='$thread_id' AND notify_user='".$userdata['user_id']."'");
$notify_link = "<a href='postify.php?post=off&forum_id=$forum_id&thread_id=$thread_id'>".$locale['515']."</a>";
} else {
$notify_link = "<a href='postify.php?post=on&forum_id=$forum_id&thread_id=$thread_id'>".$locale['516']."</a>";
}
echo "$notify_link</td>\n";
}
if ($can_post) {
echo "<td align='right' class='tbl'>";
if (!$tdata['thread_locked']) {
echo "<a href='post.php?action=reply&forum_id=$forum_id&thread_id=$thread_id'><img src='".THEME."forum/reply.gif' alt='".$locale['565']."' style='border:0px;'></a>\n";
}
echo "<a href='post.php?action=newthread&forum_id=$forum_id'><img src='".THEME."forum/newthread.gif' alt='".$locale['566']."' style='border:0px;'></a>\n";
echo "</td>\n";
}
echo "</tr>\n</table>\n";
}
closetable();
tablebreak();
if (iMEMBER && $can_post && !$tdata['thread_locked']) {
opentable($locale['512']);
echo "<form name='inputform' method='post' action='".FUSION_SELF."?forum_id=$forum_id&thread_id=$thread_id'>
<table align='center' cellpadding='0' cellspacing='1' class='tbl-border'>
<tr>
<td align='center' class='tbl1'><textarea name='message' cols='80' rows='7' class='textbox'></textarea><br>
<input type='button' value='b' class='button' style='font-weight:bold;width:25px;' onClick=\"addText('message', '[b]', '[/b]');\">
<input type='button' value='i' class='button' style='font-style:italic;width:25px;' onClick=\"addText('message', '[i]', '[/i]');\">
<input type='button' value='s' class='button' style='font-style:italic;width:25px;' onClick=\"addText('message', '[s]', '[/s]');\">
<input type='button' value='u' class='button' style='text-decoration:underline;width:25px;' onClick=\"addText('message', '[u]', '[/u]');\">
<input type='button' value='url' class='button' style='width:30px;' onClick=\"addText('message', '[url]', '[/url]');\">
<input type='button' value='mail' class='button' style='width:35px;' onClick=\"addText('message', '[mail]', '[/mail]');\">
<input type='button' value='img' class='button' style='width:30px;' onClick=\"addText('message', '[img]', '[/img]');\">
<input type='button' value='center' class='button' style='width:45px;' onClick=\"addText('message', '[center]', '[/center]');\">
<input type='button' value='small' class='button' style='width:40px;' onClick=\"addText('message', '[small]', '[/small]');\">
<input type='button' value='code' class='button' style='width:40px;' onClick=\"addText('message', '[chili=php]', '[/chili]');\">
<input type='button' value='quote' class='button' style='width:45px;' onClick=\"addText('message', '[quote]', '[/quote]');\">
<input type='button' value='hide' class='button' style='width:45px;' onClick=\"addText('message', '[hide]', '[/hide]');\"></td>
</tr>
<tr>
<td align='center' class='tbl2'>".displaysmileys("message")."<br>
<input type='checkbox' name='disable_smileys' value='1'>".$locale['513']."</td>
</tr>
<tr>
<td align='center' class='tbl1'><input type='submit' name='postquickreply' value='".$locale['514']."' class='button'></td>
</tr>
</table>
</form>\n";
closetable();
}
echo "<script type='text/javascript'>
function jumpForum(forumid) {
document.location.href='".FORUM."viewforum.php?forum_id='+forumid;
}
</script>\n";
$posts1 = implode(".", $readed);
$posts1 .= $readed_posts;
setcookie("ep_posts", $posts1, (time() + 3600*3), "/", "", "0");
require_once BASEDIR."side_right.php";
require_once BASEDIR."footer.php";
?>
Edytowane przez jantom dnia 22.02.2009 15:27:19
|
|
|
|
kefirek |
Dodany dnia 19.04.2008 21:21:45
|
Zaawansowany
Postów: 1191 Pomógł: 418 Ostrzeżeń: 1
v6.00.xxx Data rejestracji: 06.04.2008 21:59
|
U ciebie kolego spolprog to powinno wyglądać tak
Dodaj to co pogrubione albo skopiuj cały kod i zamień:
<?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 INCLUDES."forum_functions_include.php";
require_once BASEDIR."subheader.php";
include LOCALE.LOCALESET."user_fields.php";
if (isset($_COOKIE['ep_posts'])) {
$readed = explode(".", $_COOKIE['ep_posts']);
} else { $readed = array();}
$readed_posts="";
if (file_exists(THEME."forum/delete.gif")) { $delete_gif = THEME."forum/delete.gif"; } else { $delete_gif = "images/delete.gif"; }
$ile = dbquery("SELECT count(post_id) FROM ".$db_prefix."posts");
$table = "panels_forum";
require_once BASEDIR."side_left.php";
include LOCALE.LOCALESET."forum/main.php";
//cautions
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"));
// ------------
$posts_per_page = 20;
if (!FUSION_QUERY || !isset($forum_id) || !isNum($forum_id) || !isset($thread_id) || !isNum($thread_id)) fallback("index.php");
$result = dbquery("SELECT posts FROM ".$db_prefix."forumrang");
$posts=dbarray($result);
$post1 = $posts['posts'];
$posts=dbarray($result);
$post2 = $posts['posts'];
$posts=dbarray($result);
$post3 = $posts['posts'];
$posts=dbarray($result);
$post4 = $posts['posts'];
$posts=dbarray($result);
$post5 = $posts['posts'];
$posts=dbarray($result);
$post6= $posts['posts'];
$posts=dbarray($result);
$post7 = $posts['posts'];
$posts=dbarray($result);
$post8 = $posts['posts'];
$posts=dbarray($result);
$post9 = $posts['posts'];
$result = dbquery(
"SELECT f.*, f2.forum_name AS forum_cat_name
FROM ".$db_prefix."forums f
LEFT JOIN ".$db_prefix."forums f2 ON f.forum_cat=f2.forum_id
WHERE f.forum_id='".$forum_id."'"
);
if (dbrows($result)) {
$fdata = dbarray($result);
if (!checkgroup($fdata['forum_access']) || !$fdata['forum_cat']) fallback("index.php");
} else {
fallback("index.php");
}
$can_post = checkgroup($fdata['forum_posting']);
$forum_mods = explode(".", $fdata['forum_moderators']);
if (iMEMBER && in_array($userdata['user_id'], $forum_mods)) { define("iMOD", true); } else { define("iMOD", false); }
$result = dbquery("SELECT * FROM ".$db_prefix."threads WHERE thread_id='".$thread_id."' AND forum_id='".$fdata['forum_id']."'");
if (dbrows($result)) { $tdata = dbarray($result); } else { fallback("index.php"); }
$caption = $fdata['forum_cat_name']." | <a href='viewforum.php?forum_id=".$fdata['forum_id']."'>".$fdata['forum_name']."</a>";
$result = dbquery("UPDATE ".$db_prefix."threads SET thread_views=thread_views+1 WHERE thread_id='$thread_id'");
if (iMEMBER && $can_post && !$tdata['thread_locked'] && isset($_POST['postquickreply'])) {
$flood = false;
$message = stripinput(censorwords($_POST['message']));
if ($message != "") {
$result = dbquery("SELECT MAX(post_datestamp) AS last_post FROM ".$db_prefix."posts WHERE post_author='".$userdata['user_id']."'");
if (dbrows($result) > 0) {
$data = dbarray($result);
if ((time() - $data['last_post']) < $settings['flood_interval']) {
$flood = true;
$result = dbquery("INSERT INTO ".$db_prefix."flood_control (flood_ip, flood_timestamp) VALUES ('".USER_IP."', '".time()."')");
if (dbcount("(flood_ip)", "flood_control", "flood_ip='".USER_IP."'") > 4) {
$result = dbquery("UPDATE ".$db_prefix."users SET user_status='1' WHERE user_id='".$userdata['user_id']."'");
}
fallback("viewforum.php?forum_id=$forum_id");
}
}
if (!$flood) {
if ($tdata['thread_lastuser']!=$userdata['user_id'])
{
if (EPS)
{
$przydzial = dbarray(dbquery("SELECT point_ammount from ".DB_PREFIX."eps_points WHERE point_id='1'"));
$result = dbquery("UPDATE ".DB_PREFIX."users SET points_normal=points_normal+".($przydzial['point_ammount'])." WHERE user_id='".$userdata['user_id']."'");
}
$sig = ($userdata['user_sig'] ? '1' :'0');
$smileys = isset($_POST['disable_smileys']) ? "0" : "1";
$subject = "RE: ".$tdata['thread_subject'];
$result = dbquery("UPDATE ".$db_prefix."forums SET forum_lastpost='".time()."', forum_lastuser='".$userdata['user_id']."' WHERE forum_id='$forum_id'");
$result = dbquery("UPDATE ".$db_prefix."threads SET thread_lastpost='".time()."', thread_lastuser='".$userdata['user_id']."' WHERE thread_id='$thread_id'");
$result = dbquery("INSERT INTO ".$db_prefix."posts (forum_id, thread_id, post_subject, post_message, post_showsig, post_smileys, post_author, post_datestamp, post_ip, post_edituser, post_edittime) VALUES ('$forum_id', '$thread_id', '$subject', '$message', '$sig', '$smileys', '".$userdata['user_id']."', '".time()."', '".USER_IP."', '0', '0')");
$newpost_id = mysql_insert_id();
$result = dbquery("UPDATE ".$db_prefix."users SET user_posts=user_posts+1 WHERE user_id='".$userdata['user_id']."'");
} else {
$sig = ($userdata['user_sig'] ? '1' :'0');
$smileys = isset($_POST['disable_smileys']) ? "0" : "1";
$lastpost = dbarray(dbquery("SELECT post_id, post_message from ".$db_prefix."posts WHERE thread_id='$thread_id' ORDER BY post_datestamp DESC limit 1"));
$message2 = $lastpost['post_message']."\n \n".$locale['600']."\n \n".$message;
$result = dbquery("UPDATE ".$db_prefix."forums SET forum_lastpost='".time()."', forum_lastuser='".$userdata['user_id']."' WHERE forum_id='$forum_id'");
$result = dbquery("UPDATE ".$db_prefix."threads SET thread_lastpost='".time()."', thread_lastuser='".$userdata['user_id']."' WHERE thread_id='$thread_id'");
$result = dbquery("UPDATE ".$db_prefix."posts SET post_message='$message2', post_showsig='$sig', post_smileys='$smileys', post_datestamp='".time()."' WHERE post_id='".$lastpost['post_id']."'");
$newpost_id = $lastpost['post_id'];
}
// aktualizacja na stronie g3ównej forum liczby topiców,postow oraz pola last_user
$thread_count = dbcount("(*)", "threads", "forum_id='".$forum_id."'");
$posts_count = dbcount("(*)", "posts", "forum_id='".$forum_id."'");
$result = dbquery("UPDATE ".$db_prefix."forums SET forum_topic_count='".$thread_count."', forum_post_count='".$posts_count."', forum_lastuser_text='".$userdata['user_name']."' WHERE forum_id='".$forum_id."'");
// aktualizacja tabeli threads (thread_replies) - tylko odpowiedz w temacie
$posts_count = dbcount("(*)", "posts", "thread_id='".$thread_id."'");
$result = dbquery("UPDATE ".$db_prefix."threads SET thread_replies='".($posts_count-1)."' WHERE thread_id='".$thread_id."'");
if ($settings['thread_notify'] && isset($_POST['notify_me'])) {
if (!dbcount("(thread_id)", "thread_notify", "thread_id='$thread_id' AND notify_user='".$userdata['user_id']."'")) {
$result = dbquery("INSERT INTO ".$db_prefix."thread_notify (thread_id, notify_datestamp, notify_user, notify_status) VALUES('$thread_id', '".time()."', '".$userdata['user_id']."', '1')");
}
}
redirect("postify.php?post=reply&error=0&forum_id=$forum_id&thread_id=$thread_id&post_id=$newpost_id");
}
}
}
opentable($locale['500']);
echo "<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td class='smallalt'><a href='index.php'>".$settings['sitename']."</a> | $caption</td>\n";
if (iMEMBER && $can_post) {
echo "<td align='right'>\n";
if (!$tdata['thread_locked']) {
echo "<a href='post.php?action=reply&forum_id=$forum_id&thread_id=$thread_id'><img src='".THEME."forum/reply.gif' alt='".$locale['565']."' style='border:0px;'></a>\n";
}
echo "<a href='post.php?action=newthread&forum_id=$forum_id'><img src='".THEME."forum/newthread.gif' alt='".$locale['566']."' style='border:0px;'></a></td>\n";
}
echo "</tr>
</table>\n";
$rows = dbcount("(thread_id)", "posts", "thread_id='$thread_id'");
if (isset($pid) && isNum($pid)) {
$reply_count = dbcount("(post_id)", "posts", "thread_id='".$tdata['thread_id']."' AND post_id<='".$pid."'");
if ($reply_count > $posts_per_page) $rowstart = ((ceil($reply_count / $posts_per_page)-1)*$posts_per_page);
}
if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0;
if ($rows > $posts_per_page) {
echo "<div align='center' style='margin-top:5px;margin-bottom:5px;'>
".makePageNav($rowstart,$posts_per_page,$rows,3,FUSION_SELF."?forum_id=$forum_id&thread_id=$thread_id&")."
</div>\n";
}
echo "<table cellpadding='0' cellspacing='1' width='100%' class='tbl-border'>\n";
if ($rows != 0) {
$result = dbquery(
"SELECT p.*, fa.attach_id, fa.attach_name, fa.attach_ext, fa.attach_size, u.*, u2.user_name AS edit_name FROM ".$db_prefix."posts p
LEFT JOIN ".$db_prefix."forum_attachments fa USING(post_id)
LEFT JOIN ".$db_prefix."users u ON p.post_author = u.user_id
LEFT JOIN ".$db_prefix."users u2 ON p.post_edituser = u2.user_id AND post_edituser > '0'
WHERE p.thread_id='$thread_id' ORDER BY post_datestamp LIMIT $rowstart,$posts_per_page"
);
$numrows = dbrows($result);
$i = 0;
while ($data = dbarray($result)) {
$i++;
$message = $data['post_message'];
if ($data['post_showsig']) { $message = $message."\n\n<hr>".$data['user_sig']; }
if ($data['post_smileys']) { $message = parsesmileys($message); }
$message = parseubb($message);
$message = nl2br($message);
if ($data['post_edittime'] != "0") {
$edituser = "<a href='../profile.php?lookup=".$data['post_edituser']."'>".$data['edit_name']."</a>";
$edittime = showdate("forumdate", $data['post_edittime']);
}
$is_mod = in_array($data['user_id'], $forum_mods) && $data['user_level'] < "102" ? true : false;
echo "<tr>
<td width='145' class='tbl2'>".$locale['501']."</td>
<td class='tbl2'>";
if (iMEMBER)
{
$new=1;
if ($data['post_datestamp'] > $lastvisited)
{
if (in_array($data['post_id'], $readed)) $new=0; else $readed_posts .= ".".$data['post_id'];
} else $new=0;
if ($new) echo "<span style='color:yellow;'>".$locale['ep_004']."</span>"; else echo "";
}
echo" <a name='post_".$data['post_id']."' id='post_".$data['post_id']."'></a>".$data['post_subject']." </td>
</tr>
<tr>
<td valign='top' rowspan='3' width='145' class='tbl1'>
<a href='../profile.php?lookup=".$data['user_id']."' style='color:#".$data['user_color']."'>".$data['user_prefix'].$data['user_name']."</a>";
if (($data['user_id']!=$userdata['user_id']) && ($userdata['user_level'] == '103' || checkgroup($cautions_conf['group_id'])) && $userdata['user_level']>=$data['user_level'])
echo " - <a href='".INFUSIONS."cautions/cautions.php?action=add&userid=".$data['user_id']."&username=".$data['user_name']."&forum_id=".$_GET['forum_id']."&thread_id=".$_GET['thread_id']."'>".$locale['C_017']."</a>";
echo"<br><span class='alt'>".($is_mod ? $locale['userf1'] : getuserlevel($data['user_level']))."</span><br>\n";
if ($data['user_level'] >= 103) {
echo "<img src='".INFUSIONS."rank_system/img/best.gif'>
<img src='".INFUSIONS."rank_system/img/best.gif'>
<img src='".INFUSIONS."rank_system/img/best.gif'>
<img src='".INFUSIONS."rank_system/img/best.gif'>
<img src='".INFUSIONS."rank_system/img/best.gif'>
<br>";
} else {
if (EPS) $usr_posts = show_points($data['user_id']); else $usr_posts = $dadta['user_posts'];
if ($usr_posts <= $post1 ) {
echo "<img src='".INFUSIONS."rank_system/img/non.gif'>
<img src='".INFUSIONS."rank_system/img/non.gif'>
<img src='".INFUSIONS."rank_system/img/non.gif'>
<img src='".INFUSIONS."rank_system/img/non.gif'>
<img src='".INFUSIONS."rank_system/img/non.gif'>
<br>";
}
else if ($usr_posts <= $post2) {
echo "<img src='".INFUSIONS."rank_system/img/half.gif'>
<img src='".INFUSIONS."rank_system/img/non.gif'>
<img src='".INFUSIONS."rank_system/img/non.gif'>
<img src='".INFUSIONS."rank_system/img/non.gif'>
<img src='".INFUSIONS."rank_system/img/non.gif'>
<br>";
}
else if ($usr_posts <= $post3) {
echo "<img src='".INFUSIONS."rank_system/img/full.gif'>
<img src='".INFUSIONS."rank_system/img/non.gif'>
<img src='".INFUSIONS."rank_system/img/non.gif'>
<img src='".INFUSIONS."rank_system/img/non.gif'>
<img src='".INFUSIONS."rank_system/img/non.gif'>
<br>";
}
else if ($usr_posts <= $post4) {
echo "<img src='".INFUSIONS."rank_system/img/full.gif'>
<img src='".INFUSIONS."rank_system/img/half.gif'>
<img src='".INFUSIONS."rank_system/img/non.gif'>
<img src='".INFUSIONS."rank_system/img/non.gif'>
<img src='".INFUSIONS."rank_system/img/non.gif'>
<br>";
}
else if ($usr_posts <= $post5) {
echo "<img src='".INFUSIONS."rank_system/img/full.gif'>
<img src='".INFUSIONS."rank_system/img/full.gif'>
<img src='".INFUSIONS."rank_system/img/non.gif'>
<img src='".INFUSIONS."rank_system/img/non.gif'>
<img src='".INFUSIONS."rank_system/img/non.gif'>
<br>";
}
else if ($usr_posts <= $post6) {
echo "<img src='".INFUSIONS."rank_system/img/full.gif'>
<img src='".INFUSIONS."rank_system/img/full.gif'>
<img src='".INFUSIONS."rank_system/img/half.gif'>
<img src='".INFUSIONS."rank_system/img/non.gif'>
<img src='".INFUSIONS."rank_system/img/non.gif'>
<br>";
}
else if ($usr_posts <= $post7) {
echo "<img src='".INFUSIONS."rank_system/img/full.gif'>
<img src='".INFUSIONS."rank_system/img/full.gif'>
<img src='".INFUSIONS."rank_system/img/full.gif'>
<img src='".INFUSIONS."rank_system/img/non.gif'>
<img src='".INFUSIONS."rank_system/img/non.gif'>
<br>";
}
else if ($usr_posts <= $post8) {
echo "<img src='".INFUSIONS."rank_system/img/full.gif'>
<img src='".INFUSIONS."rank_system/img/full.gif'>
<img src='".INFUSIONS."rank_system/img/full.gif'>
<img src='".INFUSIONS."rank_system/img/half.gif'>
<img src='".INFUSIONS."rank_system/img/non.gif'>
<br>";
}
else if ($usr_posts <= $post9) {
echo "<img src='".INFUSIONS."rank_system/img/full.gif'>
<img src='".INFUSIONS."rank_system/img/full.gif'>
<img src='".INFUSIONS."rank_system/img/full.gif'>
<img src='".INFUSIONS."rank_system/img/full.gif'>
<img src='".INFUSIONS."rank_system/img/full.gif'>
<br>";
} else {
echo "<img src='".INFUSIONS."rank_system/img/best.gif'>
<img src='".INFUSIONS."rank_system/img/best.gif'>
<img src='".INFUSIONS."rank_system/img/best.gif'>
<img src='".INFUSIONS."rank_system/img/best.gif'>
<img src='".INFUSIONS."rank_system/img/best.gif'><br>";
}
}
echo "\n";
$height = "185";
echo genshadow($data['user_avatar'], '');
$caution_r = dbquery("SELECT * from ".$db_prefix."cautions WHERE user_id=".$data['user_id']);
$c_count = mysql_numrows($caution_r);
if ($c_count > 0) echo "<span class='alt'>".$locale['C_014']."</span>".$c_count."<br>";
if (iMEMBER) {
echo "<br><span class='shoutboxdate'>".$locale['502']." ".$data['user_posts']."<br>";
if (EPS) echo " ".$locale['eps560']." ".check_rang($data['user_id'])."<br>".$locale['eps561']." ".show_points($data['user_id'])."<br>";
echo "".$locale['u044']."<br>";
echo ($data['user_lastvisit'] != 0 ? showdate("shortdate", $data['user_lastvisit']) : $locale['u049'])."<br></span>";
}
echo "<b><a href='view_post_helping_user.php?action=view_help&user_id=".$data['user_id']."'>Pomógł:</a></b> ".$data['user_help_point']." ";
echo "
<br>";
if ($data['post_help'] != 0) {
echo"<span style='font-size:9'><center><font color='lime'>Post został uznany za pomocny</font></center></span>";
}
echo"</b></td>
<td>
<table cellspacing='0' cellpadding='0' width='100%'>
<tr>
<td class='tbl1'>".$locale['505'].showdate("forumdate", $data['post_datestamp'])."</td>
<td align='right' class='tbl1'>\n";
if (iMEMBER && $can_post) {
if (!$tdata['thread_locked']) {
if ($tdata['thread_author'] == $userdata['user_id'] && $tdata['thread_help'] < 2 && $data['post_author'] != $userdata['user_id'] && $data['post_help'] == 0) {
echo "<a href='post.php?action=help&forum_id=$forum_id&thread_id=".$data['thread_id']."&post_id=".$data['post_id']."'><b>Pomógł mi</b></a>";
}
if ($userdata['user_id'] == $data['post_author'] || iMOD || iSUPERADMIN) {
echo "<a href='post.php?action=edit&forum_id=$forum_id&thread_id=".$data['thread_id']."&post_id=".$data['post_id']."'><img src='".THEME."forum/edit.gif' border='0' alt'Edit' title='Edit'></a>\n";
}
echo "<a href='post.php?action=reply&forum_id=$forum_id&thread_id=".$data['thread_id']."&post_id=".$data['post_id'].""e=".$data['post_id']."'><img src='".THEME."forum/quote.gif' alt='".$locale['569']."' title='Quote' style='border:0px;'></a>\n";
if (iMOD || iSUPERADMIN && $data['post_ip'] != "0.0.0.0" && file_exists(THEME."forum/ip.gif")) {
echo "<img src='".THEME."forum/ip.gif' alt='".$data['post_ip']."' title='".$data['post_ip']."' border='0'>\n";
}
if ($i == $numrows-1) $last_author=$data['post_author'];
if ($userdata['user_id'] == $data['post_author'] || iMOD || iSUPERADMIN) {
if ($i == $numrows) echo "<a href='post.php?action=delete&post_author=".$data['post_author']."&forum_id=$forum_id&thread_id=".$data['thread_id']."&post_id=".$data['post_id'].(isset($last_author) ? "&last=".$last_author : "")."'><img src='".$delete_gif."' border='0' alt'Delete' title='Delete'></a>\n";
else echo "<a href='post.php?action=delete&post_author=".$data['post_author']."&forum_id=$forum_id&thread_id=".$data['thread_id']."&post_id=".$data['post_id']."'><img src='".$delete_gif."' border='0' alt'Delete' title='Delete'></a>\n";
}
}
}
echo "</td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign='top' height='$height' class='tbl1'>
$message";
if ($data['attach_id']) {
if (in_array($data['attach_ext'], $imagetypes) && @getimagesize(FORUM."attachments/".$data['attach_name'])) {
echo "<hr>\n".$data['user_name'].$locale['506']."<br><br>\n<img src='".FORUM."attachments/".$data['attach_name']."'>";
} else {
echo "<hr>\n".$data['user_name'].$locale['507']."<br>\n<a href='".FUSION_SELF."?forum_id=$forum_id&thread_id=$thread_id&getfile=".$data['post_id']."'>".$data['attach_name']."</a>";
}
}
if ($data['post_edittime'] != "0") {
echo "<hr>\n".$locale['508'].$edituser.$locale['509']."$edittime";
}
echo "</td>
</tr>
<tr>
<td class='tbl1'>\n";
if ($data['user_aim'] && file_exists(THEME."forum/aim.gif") && $settings['locale']!='Polish') {
echo "<a href='aim:goim?screenname=".str_replace(" ", "+", $data['user_aim'])."' target='_blank'><img src='".THEME."forum/aim.gif' alt='".$data['user_aim']."' style='border:0px;'></a> ";
}
if ($data['user_icq']) {
echo "<a href='http://web.icq.com/wwp?Uin=".$data['user_icq']."' target='_blank'><img src='".THEME."forum/icq.gif' alt='".$data['user_icq']."' style='border:0px;'></a> ";
}
if ($data['user_yahoo']) {
echo "<a href='http://ludzie.tlen.pl/$data[user_yahoo]'><img src='".THEME."forum/yahoo.gif' alt='".$data['user_yahoo']."' style='border:0px;'></a> ";
}
if ($data['user_msn']) {
echo "<a href='gg:$data[user_msn]' target='_blank'><img src='".THEME."forum/msn.gif' alt='".$data['user_msn']."' style='border:0px;'></a> ";
}
if ($data['user_web']) {
if (!strstr($data['user_web'], "http://")) { $urlprefix = "http://"; } else { $urlprefix = ""; }
echo "<a href='".$urlprefix."".$data['user_web']."' target='_blank'><img src='".THEME."forum/web.gif' alt='".$data['user_web']."' style='border:0px;'></a> ";
}
echo "<a href='".BASEDIR."messages.php?msg_send=".$data['user_id']."'><img src='".THEME."forum/pm.gif' alt='".$locale['571']."' style='border:0px;'></a>
</td>
</tr>\n";
}
}
echo "</table>\n";
if ($rows > $posts_per_page) {
echo "<div align='center' style='margin-top:5px;'>
".makePageNav($rowstart,$posts_per_page,$rows,3,FUSION_SELF."?forum_id=$forum_id&thread_id=$thread_id&")."
</div>\n";
}
echo "<table cellpadding='0' cellspacing='0' width='100%' style='margin-top:5px;'>\n<tr>\n";
$forum_list = ""; $current_cat = "";
$result = dbquery(
"SELECT f.forum_id, f.forum_name, f2.forum_name AS forum_cat_name
FROM ".$db_prefix."forums f
INNER JOIN ".$db_prefix."forums f2 ON f.forum_cat=f2.forum_id
WHERE ".groupaccess('f.forum_access')." AND f.forum_cat!='0' ORDER BY f2.forum_order ASC, f.forum_order ASC"
);
while ($data = dbarray($result)) {
if ($data['forum_cat_name'] != $current_cat) {
if ($current_cat != "") $forum_list .= "</optgroup>\n";
$current_cat = $data['forum_cat_name'];
$forum_list .= "<optgroup label='".$data['forum_cat_name']."'>\n";
}
$sel = ($data['forum_id'] == $fdata['forum_id'] ? " selected" : "");
$forum_list .= "<option value='".$data['forum_id']."'$sel>".$data['forum_name']."</option>\n";
}
$forum_list .= "</optgroup>\n";
echo "<td align='left' class='tbl'>".$locale['540']."<br>
<select name='jump_id' class='textbox' onChange=\"jumpForum(this.options[this.selectedIndex].value);\">
$forum_list</select></td>\n";
if (iMEMBER && $can_post) {
if (iMOD || iSUPERADMIN) {
echo "<td align='right' class='tbl'>
<form name='modopts' method='post' action='options.php?forum_id=$forum_id&thread_id=$thread_id'>
".$locale['520']."<br>
<select name='step' class='textbox'>
<option value='none'> </option>
<option value='renew'>".$locale['527']."</option>
<option value='delete'>".$locale['521']."</option>\n";
if (!$tdata['thread_locked']) {
echo "<option value='lock'>".$locale['522']."</option>\n";
} else {
echo "<option value='unlock'>".$locale['523']."</option>\n";
}
if (!$tdata['thread_sticky']) {
echo "<option value='sticky'>".$locale['524']."</option>\n";
} else {
echo "<option value='nonsticky'>".$locale['525']."</option>\n";
}
echo "<option value='move'>".$locale['526']."</option>\n";
echo "</select>
<input type='submit' name='go' value='".$locale['528']."' class='button'>
</form>
</td>
</tr>\n";
}
}
echo "</table>\n";
if (iMEMBER) {
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
if ($settings['thread_notify']) {
echo "<td valign='top' class='tbl'>";
if (dbcount("(thread_id)", "thread_notify", "thread_id='$thread_id' AND notify_user='".$userdata['user_id']."'")) {
$result = dbquery("UPDATE ".$db_prefix."thread_notify SET notify_datestamp='".time()."', notify_status='1' WHERE thread_id='$thread_id' AND notify_user='".$userdata['user_id']."'");
$notify_link = "<a href='postify.php?post=off&forum_id=$forum_id&thread_id=$thread_id'>".$locale['515']."</a>";
} else {
$notify_link = "<a href='postify.php?post=on&forum_id=$forum_id&thread_id=$thread_id'>".$locale['516']."</a>";
}
echo "$notify_link</td>\n";
}
if ($can_post) {
echo "<td align='right' class='tbl'>";
if (!$tdata['thread_locked']) {
echo "<a href='post.php?action=reply&forum_id=$forum_id&thread_id=$thread_id'><img src='".THEME."forum/reply.gif' alt='".$locale['565']."' style='border:0px;'></a>\n";
}
echo "<a href='post.php?action=newthread&forum_id=$forum_id'><img src='".THEME."forum/newthread.gif' alt='".$locale['566']."' style='border:0px;'></a>\n";
echo "</td>\n";
}
echo "</tr>\n</table>\n";
}
closetable();
tablebreak();
if (iMEMBER && $can_post && !$tdata['thread_locked']) {
opentable($locale['512']);
echo "<form name='inputform' method='post' action='".FUSION_SELF."?forum_id=$forum_id&thread_id=$thread_id'>
<table align='center' cellpadding='0' cellspacing='1' class='tbl-border'>
<tr>
<td align='center' class='tbl1'><textarea name='message' cols='80' rows='7' class='textbox'></textarea><br>
<input type='button' value='b' class='button' style='font-weight:bold;width:25px;' onClick=\"addText('message', '', '');\">
<input type='button' value='i' class='button' style='font-style:italic;width:25px;' onClick=\"addText('message', '', '');\">
<input type='button' value='s' class='button' style='font-style:italic;width:25px;' onClick=\"addText('message', '[s]', '[/s]');\">
<input type='button' value='u' class='button' style='text-decoration:underline;width:25px;' onClick=\"addText('message', '', '');\">
<input type='button' value='url' class='button' style='width:30px;' onClick=\"addText('message', '[url]', '[/url]');\">
<input type='button' value='mail' class='button' style='width:35px;' onClick=\"addText('message', '[mail]', '[/mail]');\">
<input type='button' value='img' class='button' style='width:30px;' onClick=\"addText('message', '[img]', '[/img]');\">
<input type='button' value='center' class='button' style='width:45px;' onClick=\"addText('message', '
', '
');\">
<input type='button' value='small' class='button' style='width:40px;' onClick=\"addText('message', '', '');\">
<input type='button' value='code' class='button' style='width:40px;' onClick=\"addText('message', '', '
');\">
<input type='button' value='quote' class='button' style='width:45px;' onClick=\"addText('message', '
', '
');\">
<input type='button' value='hide' class='button' style='width:45px;' onClick=\"addText('message', '');\"></td>
</tr>
<tr>
<td align='center' class='tbl2'>".displaysmileys("message")."<br>
<input type='checkbox' name='disable_smileys' value='1'>".$locale['513']."</td>
</tr>
<tr>
<td align='center' class='tbl1'><input type='submit' name='postquickreply' value='".$locale['514']."' class='button'></td>
</tr>
</table>
</form>\n";
closetable();
}
echo "<script type='text/javascript'>
function jumpForum(forumid) {
document.location.href='".FORUM."viewforum.php?forum_id='+forumid;
}
</script>\n";
$posts1 = implode(".", $readed);
$posts1 .= $readed_posts;
setcookie("ep_posts", $posts1, (time() + 3600*3), "/", "", "0");
require_once BASEDIR."side_right.php";
require_once BASEDIR."footer.php";
?> Kliknij i zaczekaj na załadowanie kodu ...
Edytowane przez Pieka dnia 02.11.2008 15:03:19
|
|
|
|
spolprog |
Dodany dnia 19.04.2008 22:46:16
|
Przedszkolak
Postów: 14
Data rejestracji: 09.01.2006 20:04
|
Ok działa wielkie dzięki za pomoc.
Edytowane przez Pieka dnia 19.04.2008 22:46:59
|
|
|
|
VirtualPS |
Dodany dnia 02.11.2008 13:37:58
|
Przedszkolak
Postów: 41 Ostrzeżeń: 4
Data rejestracji: 02.11.2008 12:26
ZBANOWANY: Dożywotnio
|
Hej a pomógłby mi ktoś i poświęcił trochę czasu na to aby wpakować do moich plików te linijki? Bo próbuję, próbuję i za chiny nie mogę dobrze ustawić ;[
post.php
<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2006 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 BASEDIR."subheader.php";
require_once BASEDIR."side_left.php";
include LOCALE.LOCALESET."forum/post.php";
require_once INCLUDES."forum_functions_include.php";
if (!FUSION_QUERY || !isset($forum_id) || !isNum($forum_id)) fallback("index.php");
$result = dbquery(
"SELECT f.*, f2.forum_name AS forum_cat_name
FROM ".$db_prefix."forums f
LEFT JOIN ".$db_prefix."forums f2 ON f.forum_cat=f2.forum_id
WHERE f.forum_id='".$forum_id."'"
);
if (dbrows($result)) {
$fdata = dbarray($result);
if (!checkgroup($fdata['forum_access']) || !$fdata['forum_cat']) fallback("index.php");
} else {
fallback("index.php");
}
if (!checkgroup($fdata['forum_posting'])) fallback("index.php");
$forum_mods = explode(".", $fdata['forum_moderators']);
if (iMEMBER && in_array($userdata['user_id'], $forum_mods)) { define("iMOD", true); } else { define("iMOD", false); }
$caption = $fdata['forum_cat_name']." | ".$fdata['forum_name'];
if ($action == "newthread") {
include "postnewthread.php";
} elseif ($action == "reply") {
if (!isset($thread_id) || !isNum($thread_id)) fallback("index.php");
$result = dbquery("SELECT * FROM ".$db_prefix."threads WHERE thread_id='".$thread_id."' AND forum_id='".$fdata['forum_id']."'");
if (dbrows($result)) { $tdata = dbarray($result); } else { fallback("index.php"); }
if (!$tdata['thread_locked']) { include "postreply.php"; } else { fallback("index.php"); }
} elseif ($action == "edit") {
if (!isset($thread_id) || !isNum($thread_id) || !isset($post_id) || !isNum($post_id)) { fallback("index.php"); exit; }
$result = dbquery("SELECT * FROM ".$db_prefix."threads WHERE thread_id='".$thread_id."' AND forum_id='".$fdata['forum_id']."'");
if (dbrows($result)) { $tdata = dbarray($result); } else { fallback("index.php"); }
$result = dbquery("SELECT * FROM ".$db_prefix."posts WHERE post_id='".$post_id."' AND thread_id='".$tdata['thread_id']."' AND forum_id='".$fdata['forum_id']."'");
if (dbrows($result)) { $pdata = dbarray($result); } else { fallback("index.php"); }
if ($userdata['user_id'] != $pdata['post_author'] && !iMOD && !iSUPERADMIN) fallback("index.php");
if (!$tdata['thread_locked']) {
include "postedit.php";
} else {
if (iMOD || iSUPERADMIN) { include "postedit.php"; } else { fallback("index.php"); }
}
} else {
header("Location: index.php");
}
require_once BASEDIR."side_right.php";
require_once BASEDIR."footer.php";
?> Kliknij i zaczekaj na załadowanie kodu ...
postify.php
<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2006 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 BASEDIR."subheader.php";
require_once BASEDIR."side_left.php";
include LOCALE.LOCALESET."forum/post.php";
if (!FUSION_QUERY || !isset($forum_id) || !isNum($forum_id)) fallback("index.php");
if (!isset($error) || !isNum($error) || $error == 0 || $error > 4) { $errorb = ""; }
else if ($error == 1) { $errorb = $locale['440a']; }
else if ($error == 2) { $errorb = $locale['440b']; }
else if ($error == 3) { $errorb = $locale['441']; }
else if ($error == 4) { $errorb = $locale['450']; }
if (($post == "on" || $post == "off") && $settings['thread_notify']) {
$output = false;
if (!isset($thread_id) || !isNum($thread_id)) fallback("index.php");
$result = dbquery(
"SELECT tt.*, tf.* FROM ".$db_prefix."threads tt
INNER JOIN ".$db_prefix."forums tf ON tt.forum_id=tf.forum_id
WHERE tt.thread_id='$thread_id'"
);
if (dbrows($result)) {
$data = dbarray($result);
if (checkgroup($data['forum_access'])) {
$output = true;
opentable($locale['451']);
echo "<center><br>\n";
if ($post == "on" && !dbcount("(thread_id)", "thread_notify", "thread_id='$thread_id' AND notify_user='".$userdata['user_id']."'")) {
$result = dbquery("INSERT INTO ".$db_prefix."thread_notify (thread_id, notify_datestamp, notify_user, notify_status) VALUES('$thread_id', '".time()."', '".$userdata['user_id']."', '1')");
echo $locale['452']."<br><br>\n";
} else if ($post == "off") {
$result = dbquery("DELETE FROM ".$db_prefix."thread_notify WHERE thread_id='$thread_id' AND notify_user='".$userdata['user_id']."'");
echo $locale['453']."<br><br>\n";
}
echo "<a href='viewthread.php?forum_id=$forum_id&thread_id=$thread_id'>".$locale['447']."</a> |
<a href='viewforum.php?forum_id=$forum_id'>".$locale['448']."</a> |
<a href='index.php'>".$locale['449']."</a><br><br>
</center>\n";
closetable();
}
}
if (!$output) fallback("index.php");
} else if ($post == "new") {
opentable($locale['401']);
echo "<div align='center'>\n";
if ($errorb) {
echo "<br>$errorb<br><br>\n";
} else {
echo "<br>".$locale['442']."<br><br>\n";
}
if ($error < 3) {
if (!isset($thread_id) || !isNum($thread_id)) fallback("index.php");
echo "<a href='viewthread.php?forum_id=$forum_id&thread_id=$thread_id'>".$locale['447']."</a> |\n";
}
echo "<a href='viewforum.php?forum_id=$forum_id'>".$locale['448']."</a> |
<a href='index.php'>".$locale['449']."</a><br><br></div>\n";
closetable();
} else if ($post == "reply") {
if (!isset($thread_id) || !isNum($thread_id)) fallback("index.php");
opentable($locale['403']);
echo "<center><br>\n";
if ($errorb) {
echo "$errorb<br><br>\n";
} else {
echo $locale['443']."<br><br>\n";
}
if ($error < "2") {
if (!isset($post_id) || !isNum($post_id)) fallback("index.php");
if ($settings['thread_notify']) {
$result = dbquery(
"SELECT tn.*, tu.user_id,user_name,user_email FROM ".$db_prefix."thread_notify tn
LEFT JOIN ".$db_prefix."users tu ON tn.notify_user=tu.user_id
WHERE thread_id='$thread_id' AND notify_user!='".$userdata['user_id']."' AND notify_status='1'
");
if (dbrows($result)) {
require_once INCLUDES."sendmail_include.php";
$data2 = dbarray(dbquery("SELECT thread_subject FROM ".$db_prefix."threads WHERE thread_id='$thread_id'"));
$link = $settings['siteurl']."forum/viewthread.php?forum_id=$forum_id&thread_id=$thread_id&pid=$post_id#post_$post_id";
while ($data = dbarray($result)) {
$message_el1 = array("{USERNAME}", "{THREAD_SUBJECT}", "{THREAD_URL}");
$message_el2 = array($data['user_name'], $data2['thread_subject'], $link);
$message_subject = str_replace("{THREAD_SUBJECT}", $data2['thread_subject'], $locale['550']);
$message_content = str_replace($message_el1, $message_el2, $locale['551']);
sendemail($data['user_name'],$data['user_email'],$settings['siteusername'],$settings['siteemail'],$message_subject,$message_content);
}
$result = dbquery("UPDATE ".$db_prefix."thread_notify SET notify_status='0' WHERE thread_id='$thread_id' AND notify_user!='".$userdata['user_id']."'");
}
}
echo "<a href='viewthread.php?forum_id=$forum_id&thread_id=$thread_id&pid=$post_id#post_$post_id'>".$locale['447']."</a> |\n";
} else {
$data = dbarray(dbquery("SELECT post_id FROM ".$db_prefix."posts WHERE thread_id='".$data['thread_id']."' ORDER BY post_id DESC"));
echo "<a href='viewthread.php?forum_id=$forum_id&thread_id=$thread_id&pid=".$data['post_id']."#post_".$data['post_id']."'>".$locale['447']."</a> |\n";
}
echo "<a href='viewforum.php?forum_id=$forum_id'>".$locale['448']."</a> |
<a href='index.php'>".$locale['449']."</a><br><br>
</center>\n";
closetable();
} else if ($post == "edit") {
if (!isset($thread_id) || !isNum($thread_id)) fallback("index.php");
opentable($locale['409']);
echo "<center><br>\n";
if ($errorb) {
echo "$errorb<br><br>\n";
} else {
echo $locale['446']."<br><br>\n";
}
echo "<a href='viewthread.php?forum_id=$forum_id&thread_id=$thread_id&pid=$post_id#post_$post_id'>".$locale['447']."</a> |
<a href='viewforum.php?forum_id=$forum_id'>".$locale['448']."</a> |
<a href='index.php'>".$locale['449']."</a><br><br>
</center>\n";
closetable();
}
require_once BASEDIR."side_right.php";
require_once BASEDIR."footer.php";
echo '<META HTTP-EQUIV="Refresh" CONTENT="1;URL=viewthread.php?forum_id='.$forum_id.'&thread_id='.$thread_id.'&pid='.$post_id.'#post_'.$post_id.'">';?> Kliknij i zaczekaj na załadowanie kodu ...
i vievthread.php
<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2006 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 INCLUDES."forum_functions_include.php";
require_once BASEDIR."subheader.php";
require_once BASEDIR."side_left.php";
include LOCALE.LOCALESET."forum/main.php";
//include pd_warning functions
include INFUSIONS."pd_warning/warning.inc.php";
$posts_per_page = 20;
if (!FUSION_QUERY || !isset($forum_id) || !isNum($forum_id) || !isset($thread_id) || !isNum($thread_id)) fallback("index.php");
$result = dbquery(
"SELECT f.*, f2.forum_name AS forum_cat_name
FROM ".$db_prefix."forums f
LEFT JOIN ".$db_prefix."forums f2 ON f.forum_cat=f2.forum_id
WHERE f.forum_id='".$forum_id."'"
);
if (dbrows($result)) {
$fdata = dbarray($result);
if (!checkgroup($fdata['forum_access']) || !$fdata['forum_cat']) fallback("index.php");
} else {
fallback("index.php");
}
$can_post = checkgroup($fdata['forum_posting']);
$forum_mods = explode(".", $fdata['forum_moderators']);
if (iMEMBER && in_array($userdata['user_id'], $forum_mods)) { define("iMOD", true); } else { define("iMOD", false); }
$result = dbquery("SELECT * FROM ".$db_prefix."threads WHERE thread_id='".$thread_id."' AND forum_id='".$fdata['forum_id']."'");
if (dbrows($result)) { $tdata = dbarray($result); } else { fallback("index.php"); }
$caption = $fdata['forum_cat_name']." | <a href='viewforum.php?forum_id=".$fdata['forum_id']."'>".$fdata['forum_name']."</a>";
$result = dbquery("UPDATE ".$db_prefix."threads SET thread_views=thread_views+1 WHERE thread_id='$thread_id'");
if (iMEMBER && $can_post && !$tdata['thread_locked'] && isset($_POST['postquickreply'])) {
$flood = false;
$message = stripinput(censorwords($_POST['message']));
if ($message != "") {
$result = dbquery("SELECT MAX(post_datestamp) AS last_post FROM ".$db_prefix."posts WHERE post_author='".$userdata['user_id']."'");
if (dbrows($result) > 0) {
$data = dbarray($result);
if ((time() - $data['last_post']) < $settings['flood_interval']) {
$flood = true;
$result = dbquery("INSERT INTO ".$db_prefix."flood_control (flood_ip, flood_timestamp) VALUES ('".USER_IP."', '".time()."')");
if (dbcount("(flood_ip)", "flood_control", "flood_ip='".USER_IP."'") > 4) {
$result = dbquery("UPDATE ".$db_prefix."users SET user_status='1' WHERE user_id='".$userdata['user_id']."'");
}
fallback("viewforum.php?forum_id=$forum_id");
}
}
if (!$flood) {
$sig = ($userdata['user_sig'] ? '1' :'0');
$smileys = isset($_POST['disable_smileys']) ? "0" : "1";
$subject = "RE: ".$tdata['thread_subject'];
$result = dbquery("UPDATE ".$db_prefix."forums SET forum_lastpost='".time()."', forum_lastuser='".$userdata['user_id']."' WHERE forum_id='$forum_id'");
$result = dbquery("UPDATE ".$db_prefix."threads SET thread_lastpost='".time()."', thread_lastuser='".$userdata['user_id']."' WHERE thread_id='$thread_id'");
$result = dbquery("INSERT INTO ".$db_prefix."posts (forum_id, thread_id, post_subject, post_message, post_showsig, post_smileys, post_author, post_datestamp, post_ip, post_edituser, post_edittime) VALUES ('$forum_id', '$thread_id', '$subject', '$message', '$sig', '$smileys', '".$userdata['user_id']."', '".time()."', '".USER_IP."', '0', '0')");
$newpost_id = mysql_insert_id();
$result = dbquery("UPDATE ".$db_prefix."users SET user_posts=user_posts+1 WHERE user_id='".$userdata['user_id']."'");
redirect("postify.php?post=reply&error=0&forum_id=$forum_id&thread_id=$thread_id&post_id=$newpost_id");
}
}
}
opentable($locale['500']);
echo "<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td class='smallalt'><a href='index.php'>".$settings['sitename']."</a> | $caption</td>\n";
if (iMEMBER && $can_post) {
echo "<td align='right'>\n";
if (!$tdata['thread_locked']) {
echo "<a href='post.php?action=reply&forum_id=$forum_id&thread_id=$thread_id'><img src='".THEME."forum/reply.gif' alt='".$locale['565']."' style='border:0px;'></a>\n";
}
echo "<a href='post.php?action=newthread&forum_id=$forum_id'><img src='".THEME."forum/newthread.gif' alt='".$locale['566']."' style='border:0px;'></a></td>\n";
}
echo "</tr>
</table>\n";
$rows = dbcount("(thread_id)", "posts", "thread_id='$thread_id'");
if (isset($pid) && isNum($pid)) {
$reply_count = dbcount("(post_id)", "posts", "thread_id='".$tdata['thread_id']."' AND post_id<='".$pid."'");
if ($reply_count > $posts_per_page) $rowstart = ((ceil($reply_count / $posts_per_page)-1)*$posts_per_page);
}
if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0;
if ($rows > $posts_per_page) {
echo "<div align='center' style='margin-top:5px;margin-bottom:5px;'>
".makePageNav($rowstart,$posts_per_page,$rows,3,FUSION_SELF."?forum_id=$forum_id&thread_id=$thread_id&")."
</div>\n";
}
echo "<table cellpadding='0' cellspacing='1' width='100%' class='tbl-border'>\n";
if ($rows != 0) {
$result = dbquery(
"SELECT p.*, fa.attach_id, fa.attach_name, fa.attach_ext, fa.attach_size, u.*, u2.user_name AS edit_name FROM ".$db_prefix."posts p
LEFT JOIN ".$db_prefix."forum_attachments fa USING(post_id)
LEFT JOIN ".$db_prefix."users u ON p.post_author = u.user_id
LEFT JOIN ".$db_prefix."users u2 ON p.post_edituser = u2.user_id AND post_edituser > '0'
WHERE p.thread_id='$thread_id' ORDER BY post_datestamp LIMIT $rowstart,$posts_per_page"
);
$numrows = dbrows($result);
while ($data = dbarray($result)) {
$message = $data['post_message'];
if ($data['post_showsig']) { $message = $message."\n\n<hr>".$data['user_sig']; }
if ($data['post_smileys']) { $message = parsesmileys($message); }
$message = parseubb($message);
$message = nl2br($message);
if ($data['post_edittime'] != "0") {
$edituser = "<a href='../profile.php?lookup=".$data['post_edituser']."'>".$data['edit_name']."</a>";
$edittime = showdate("forumdate", $data['post_edittime']);
}
$is_mod = in_array($data['user_id'], $forum_mods) && $data['user_level'] < "102" ? true : false;
echo "<tr>
<td width='145' class='tbl2'>".$locale['501']."</td>
<td class='tbl2'><a name='post_".$data['post_id']."' id='post_".$data['post_id']."'></a>".$data['post_subject']."</td>
</tr>
<tr>
<td valign='top' rowspan='3' width='145' class='tbl1'>
<a href='../profile.php?lookup=".$data['user_id']."'>".$data['user_name']."</a><br>
<span class='alt'>".($is_mod ? $locale['userf1'] : getuserlevel($data['user_level']))."</span><br><br>\n";
if ($data['user_avatar'] != "") {
echo "<img src='".IMAGES."avatars/".$data['user_avatar']."' alt='".$locale['567']."'><br><br>\n";
$height = "185";
} else {
$height = "70";
}
echo "<span class='alt'>".$locale['502']."</span> ".$data['user_posts']."<br>\n";
echo getRank($data['user_id']);
if ($data['user_location']) echo "<span class='alt'>".$locale['503']."</span> ".$data['user_location']."<br>\n";
echo "<span class='alt'>".$locale['504']."</span> ".showdate("%d.%m.%y", $data['user_joined']);
//pd_warning
$user_points = show_warning_points($data[user_id]);
echo "<br /><br /><small><a style='cursor:help;' onClick=\"h1171915583();\">".$locale['PDWA200']."</a></small><br />
<a href='".INFUSIONS."pd_warning/warning.php?postid=".$data[post_id]."' title='".$user_points." ".($user_points==1 ? $locale['PDWA201'] : $locale['PDWA202'])."'>".show_warning_symbols($user_points)."</a>";
echo "</td>
<td>
<table cellspacing='0' cellpadding='0' width='100%'>
<tr>
<td class='tbl1'>".$locale['505'].showdate("forumdate", $data['post_datestamp'])."</td>
<td align='right' class='tbl1'>\n";
if (iMEMBER && $can_post) {
if (!$tdata['thread_locked']) {
if ($userdata['user_id'] == $data['post_author'] || iMOD || iSUPERADMIN) {
echo "<a href='post.php?action=edit&forum_id=$forum_id&thread_id=".$data['thread_id']."&post_id=".$data['post_id']."'><img src='".THEME."forum/edit.gif' alt='".$locale['568']."' style='border:0px;'></a>\n";
}
echo "<a href='post.php?action=reply&forum_id=$forum_id&thread_id=".$data['thread_id']."&post_id=".$data['post_id']."&quote=".$data['post_id']."'><img src='".THEME."forum/quote.gif' alt='".$locale['569']."' style='border:0px;'></a>\n";
if (iMOD || iSUPERADMIN && $data['post_ip'] != "0.0.0.0" && file_exists(THEME."forum/ip.gif")) echo "<img src='".THEME."forum/ip.gif' alt='".$locale['570']."' title='".$data['post_ip']."' style='border:0px;'>\n";
} else {
if (iMOD || iSUPERADMIN) {
echo "<a href='post.php?action=edit&forum_id=$forum_id&thread_id=".$data['thread_id']."&post_id=".$data['post_id']."'><img src='".THEME."forum/edit.gif' alt='".$locale['568']."' style='border:0px;'></a>\n";
if ($data['post_ip'] != "0.0.0.0" && file_exists(THEME."forum/ip.gif")) echo "<img src='".THEME."forum/ip.gif' alt='".$locale['570']."' title='".$data['post_ip']."' style='border:0px;'>\n";
}
}
}
echo "</td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign='top' height='$height' class='tbl1'>
$message";
if ($data['attach_id']) {
if (in_array($data['attach_ext'], $imagetypes) && @getimagesize(FORUM."attachments/".$data['attach_name'])) {
echo "<hr>\n".$data['user_name'].$locale['506']."<br><br>\n<img src='".FORUM."attachments/".$data['attach_name']."'>";
} else {
echo "<hr>\n".$data['user_name'].$locale['507']."<br>\n<a href='".FUSION_SELF."?forum_id=$forum_id&thread_id=$thread_id&getfile=".$data['post_id']."'>".$data['attach_name']."</a>";
}
}
if ($data['post_edittime'] != "0") {
echo "<hr>\n".$locale['508'].$edituser.$locale['509']."$edittime";
}
echo "</td>
</tr>
<tr>
<td class='tbl1'>\n";
if ($data['user_aim']) {
echo "<a href='aim:goim?screenname=".str_replace(" ", "+", $data['user_aim'])."' target='_blank'><img src='".THEME."forum/aim.gif' alt='".$data['user_aim']."' style='border:0px;'></a> ";
}
if ($data['user_icq']) {
echo "<a href='http://icq.com/people/about_me.php?uin=".$data['user_icq']."' target='_blank'><img src='".THEME."forum/icq.gif' alt='".$data['user_icq']."' style='border:0px;'></a> ";
}
if ($data['user_msn']) {
echo "<a href='mailto:$data[user_msn]'><img src='".THEME."forum/msn.gif' alt='".$data['user_msn']."' style='border:0px;'></a> ";
}
if ($data['user_yahoo']) {
echo "<a href='http://uk.profiles.yahoo.com/$data[user_yahoo]' target='_blank'><img src='".THEME."forum/yahoo.gif' alt='".$data['user_yahoo']."' style='border:0px;'></a> ";
}
if ($data['user_web']) {
if (!strstr($data['user_web'], "http://")) { $urlprefix = "http://"; } else { $urlprefix = ""; }
echo "<a href='".$urlprefix."".$data['user_web']."' target='_blank'><img src='".THEME."forum/web.gif' alt='".$data['user_web']."' style='border:0px;'></a> ";
}
if (iMEMBER && $data['user_id'] != $userdata['user_id']) echo "<a href='".BASEDIR."messages.php?msg_send=".$data['user_id']."'><img src='".THEME."forum/pm.gif' alt='".$locale['571']."' style='border:0px;'></a>\n";
echo "</td>
</tr>\n";
}
}
echo "</table>\n";
if ($rows > $posts_per_page) {
echo "<div align='center' style='margin-top:5px;'>
".makePageNav($rowstart,$posts_per_page,$rows,3,FUSION_SELF."?forum_id=$forum_id&thread_id=$thread_id&")."
</div>\n";
}
echo "<table cellpadding='0' cellspacing='0' width='100%' style='margin-top:5px;'>\n<tr>\n";
$forum_list = ""; $current_cat = "";
$result = dbquery(
"SELECT f.forum_id, f.forum_name, f2.forum_name AS forum_cat_name
FROM ".$db_prefix."forums f
INNER JOIN ".$db_prefix."forums f2 ON f.forum_cat=f2.forum_id
WHERE ".groupaccess('f.forum_access')." AND f.forum_cat!='0' ORDER BY f2.forum_order ASC, f.forum_order ASC"
);
while ($data = dbarray($result)) {
if ($data['forum_cat_name'] != $current_cat) {
if ($current_cat != "") $forum_list .= "</optgroup>\n";
$current_cat = $data['forum_cat_name'];
$forum_list .= "<optgroup label='".$data['forum_cat_name']."'>\n";
}
$sel = ($data['forum_id'] == $fdata['forum_id'] ? " selected" : "");
$forum_list .= "<option value='".$data['forum_id']."'$sel>".$data['forum_name']."</option>\n";
}
$forum_list .= "</optgroup>\n";
echo "<td align='left' class='tbl'>".$locale['540']."<br>
<select name='jump_id' class='textbox' onChange=\"jumpForum(this.options[this.selectedIndex].value);\">
$forum_list</select></td>\n";
if (iMEMBER && $can_post) {
if (iMOD || iSUPERADMIN) {
echo "<td align='right' class='tbl'>
<form name='modopts' method='post' action='options.php?forum_id=$forum_id&thread_id=$thread_id'>
".$locale['520']."<br>
<select name='step' class='textbox'>
<option value='none'> </option>
<option value='renew'>".$locale['527']."</option>
<option value='delete'>".$locale['521']."</option>\n";
if (!$tdata['thread_locked']) {
echo "<option value='lock'>".$locale['522']."</option>\n";
} else {
echo "<option value='unlock'>".$locale['523']."</option>\n";
}
if (!$tdata['thread_sticky']) {
echo "<option value='sticky'>".$locale['524']."</option>\n";
} else {
echo "<option value='nonsticky'>".$locale['525']."</option>\n";
}
echo "<option value='move'>".$locale['526']."</option>\n";
echo "</select>
<input type='submit' name='go' value='".$locale['528']."' class='button'>
</form>
</td>
</tr>\n";
}
}
echo "</table>\n";
if (iMEMBER) {
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
if ($settings['thread_notify']) {
echo "<td valign='top' class='tbl'>";
if (dbcount("(thread_id)", "thread_notify", "thread_id='$thread_id' AND notify_user='".$userdata['user_id']."'")) {
$result = dbquery("UPDATE ".$db_prefix."thread_notify SET notify_datestamp='".time()."', notify_status='1' WHERE thread_id='$thread_id' AND notify_user='".$userdata['user_id']."'");
$notify_link = "<a href='postify.php?post=off&forum_id=$forum_id&thread_id=$thread_id'>".$locale['515']."</a>";
} else {
$notify_link = "<a href='postify.php?post=on&forum_id=$forum_id&thread_id=$thread_id'>".$locale['516']."</a>";
}
echo "$notify_link</td>\n";
}
if ($can_post) {
echo "<td align='right' class='tbl'>";
if (!$tdata['thread_locked']) {
echo "<a href='post.php?action=reply&forum_id=$forum_id&thread_id=$thread_id'><img src='".THEME."forum/reply.gif' alt='".$locale['565']."' style='border:0px;'></a>\n";
}
echo "<a href='post.php?action=newthread&forum_id=$forum_id'><img src='".THEME."forum/newthread.gif' alt='".$locale['566']."' style='border:0px;'></a>\n";
echo "</td>\n";
}
echo "</tr>\n</table>\n";
}
closetable();
tablebreak();
if (iMEMBER && $can_post && !$tdata['thread_locked']) {
opentable($locale['512']);
echo "<form name='inputform' method='post' action='".FUSION_SELF."?forum_id=$forum_id&thread_id=$thread_id'>
<table align='center' cellpadding='0' cellspacing='1' class='tbl-border'>
<tr>
<td align='center' class='tbl1'><textarea name='message' cols='80' rows='7' class='textbox'></textarea><br>
<input type='button' value='b' class='button' style='font-weight:bold;width:25px;' onClick=\"addText('message', '[b]', '[/b]');\">
<input type='button' value='i' class='button' style='font-style:italic;width:25px;' onClick=\"addText('message', '[i]', '[/i]');\">
<input type='button' value='u' class='button' style='text-decoration:underline;width:25px;' onClick=\"addText('message', '[u]', '[/u]');\">
<input type='button' value='url' class='button' style='width:30px;' onClick=\"addText('message', '[url]', '[/url]');\">
<input type='button' value='mail' class='button' style='width:35px;' onClick=\"addText('message', '[mail]', '[/mail]');\">
<input type='button' value='img' class='button' style='width:30px;' onClick=\"addText('message', '[img]', '[/img]');\">
<input type='button' value='center' class='button' style='width:45px;' onClick=\"addText('message', '[center]', '[/center]');\">
<input type='button' value='small' class='button' style='width:40px;' onClick=\"addText('message', '[small]', '[/small]');\">
<input type='button' value='code' class='button' style='width:40px;' onClick=\"addText('message', '[chili=php]', '[/chili]');\">
<input type='button' value='quote' class='button' style='width:45px;' onClick=\"addText('message', '[quote]', '[/quote]');\"></td>
</tr>
<tr>
<td align='center' class='tbl2'>".displaysmileys("message")."<br>
<input type='checkbox' name='disable_smileys' value='1'>".$locale['513']."</td>
</tr>
<tr>
<td align='center' class='tbl1'><input type='submit' name='postquickreply' value='".$locale['514']."' class='button'></td>
</tr>
</table>
</form>\n";
closetable();
}
echo "<script type='text/javascript'>
function jumpForum(forumid) {
document.location.href='".FORUM."viewforum.php?forum_id='+forumid;
}
</script>\n";
require_once BASEDIR."side_right.php";
require_once BASEDIR."footer.php";
?>
Bardzo bym prosił o podanie już gotowców.
Dziekuję Michał :)
Jak coś to link do strony: www.phonesoftware...
Edit: Odwołuję, poradziłem sobie jakoś ^^ efekty widać na mojej stronce
Edytowane przez jantom dnia 22.02.2009 15:28:03
|
|
|
|
dawid2121 |
Dodany dnia 08.11.2008 21:18:44
|
Przedszkolak
Postów: 3
Data rejestracji: 14.10.2008 19:24
|
Witam,
Ja mam takie pytanie jak zmienić kod aby userzy dawali 1 punkt czyli pomogła,a nie ta osoba co założyła temat?Podobne komendy jak jest IPB.
I który plik zmienić??
|
|
|
|
Kinimodek |
Dodany dnia 20.11.2008 15:12:26
|
Początkujący
Postów: 180 Pomógł: 3 Ostrzeżeń: 2
Data rejestracji: 29.10.2008 21:32
|
Hmm... A czy ta wersja pójdzie pod 7.00.1?
Edytowane przez Pieka dnia 20.11.2008 15:20:45
|Tworzenie layout'ów, cięcie layout'ów, kodowanie layout'ów|
|
|
|
|
Sagitarius |
Dodany dnia 17.02.2009 00:47:40
|
Przedszkolak
Postów: 60 Ostrzeżeń: 1
Data rejestracji: 16.04.2006 17:11
|
Może ktoś pomyśli o takiej modyfikacji tylko odnośnie komentarzy :> ? |
|
|
|
zezol |
Dodany dnia 17.02.2009 01:30:23
|
Bywalec
Postów: 593 Pomógł: 34
Data rejestracji: 09.12.2006 22:16
|
Komentarzy? To nie ma większego sensu... Z komentarzy chcesz forum zrobić czy jak .
|
|
|
|
Sagitarius |
Dodany dnia 22.02.2009 01:24:13
|
Przedszkolak
Postów: 60 Ostrzeżeń: 1
Data rejestracji: 16.04.2006 17:11
|
Prowadze portal pisarski. Dlatego ta funkcja była by dla mnie przydatna w zwiazku z tym, że najważniejszym ogniwem całej strony są komentarze użytkowników pod artykułami.
Pozdrawiam. |
|
|
|
Chemikpil |
Dodany dnia 22.02.2009 01:27:03
|
Bywalec
Postów: 999 Pomógł: 54
Data rejestracji: 04.05.2008 21:46
|
A ty masz PF czy EF, bo coś mi się wydaje ze raczej to drugie.
|
|
|