
Pradinukas

Reputacija:
0
Pranešimai: 45
Įstojo: 2009-08-02
|
Sveiki.
Kaip padaryti,kad ?is kodas man atvaizduot kiek narys yra para?s i? viso komentar naujienose GeSHi: PHPecho"<b>Komentar:</b><span style='color:red'>".number_format(dbcount ("(comment_id)", "comments", "comment_name='".$data['user_id']."'"))."</span>";
Parsed in 0.026 seconds, using GeSHi 1.0.8.10
Nes ? kod dedu comments_include faila ir kai ten idedu prie nario ra?o,kad jis yra para?s 0 komentar?
http://topwarez.lt |

Pradinukas

Reputacija:
0
Pranešimai: 45
Įstojo: 2009-08-02
|
Em1sas1, NETINKA
Man reikia,kad rodyt po nario avataro, kiek narys i? viso yra para?s komentar:
?tai comments_include failas
Code
/*---------------------------------------------------+
| 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
+----------------------------------------------------+
| Comments system developed by CrappoMan
| email: simonpatterson@dsl.pipex.com
+----------------------------------------------------*/
if (!defined(\"IN_FUSION\")) { header(\"Location:../index.php\"); exit; }
include LOCALE.LOCALESET.\"comments.php\";
function showcomments($ctype,$cdb,$ccol,$cid,$clink) {
global $settings,$locale,$userdata,$aidlink;
if (isset($_POST['post_comment'])) {
if (dbrows(dbquery(\"SELECT $ccol FROM \".DB_PREFIX.\"$cdb WHERE $ccol='$cid'\"))==0) {
fallback(BASEDIR.\"index.php\");
}
if (iMEMBER) {
$comment_name = $userdata['user_id'];
} elseif ($settings['guestposts'] == \"1\") {
$comment_name = trim(stripinput($_POST['comment_name']));
$comment_name = preg_replace(\"(^[0-9]*)\", \"\", $comment_name);
if (isNum($comment_name)) $comment_name=\"\";
}
$comment_message = trim(stripinput(censorwords($_POST['comment_message'])));
$comment_smileys = isset($_POST['disable_smileys']) ? \"0\" : \"1\";
if ($comment_name != \"\" && $comment_message != \"\") {
$result = dbquery(\"INSERT INTO \".DB_PREFIX.\"comments VALUES('', '$cid', '$ctype', '$comment_name', '$comment_message', '$comment_smileys', '\".time().\"', '\".USER_IP.\"')\");
paygold($userdata['user_name'],$userdata['user_id'],1);
}
redirect($clink);
}
tablebreak();
opentable($locale['c100']);
$result = dbquery(
\"SELECT tcm.*,user_name,user_avatar FROM \".DB_PREFIX.\"comments tcm
LEFT JOIN \".DB_PREFIX.\"users tcu ON tcm.comment_name=tcu.user_id
WHERE comment_item_id='$cid' AND comment_type='$ctype'
ORDER BY comment_datestamp ASC\"
);
if (dbrows($result) != 0) {
$i = 0;
echo \"\n\";
while ($data = dbarray($result)) {
if ($data['user_avatar'] != \"\") {
$avatar = \" \";
} else {
$avatar = \"
}
echo \"| \".$avatar.\" | \n\n\".$locale['041'].showdate(\"longdate\", $data['comment_datestamp']).\" \n\";
echo $comment_message.\" | \n \n\";
$i++;
}
if (checkrights(\"C\")) echo \"\n| \".$locale['c106'].\" | \n \n\";
echo \" \n\";
} else {
echo $locale['c101'].\"\n\";
}
closetable();
tablebreak();
opentable($locale['c102']);
if (iMEMBER || $settings['guestposts'] == \"1\") {
echo \"\n\";
} else {
echo $locale['c105'].\"\n\";
}
closetable();
}
?>
Redagavo irmux112 2010-03-19 17:46
http://topwarez.lt |