Code: Selecteer alles
#-----[ OPEN ]------------------------------------------
#
viewtopic.php
#
#-----[ FIND ]------------------------------------------
#
$sql = "UPDATE " . TOPICS_TABLE . "
SET topic_views = topic_views + 1
WHERE topic_id = $topic_id";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Could not update topic views.", '', __LINE__, __FILE__, $sql);
}
#
#-----[ REPLACE WITH ]------------------------------------------
#
if (!($postrow[0]['user_id'] == $userdata['user_id'])) {
$sql = "UPDATE " . TOPICS_TABLE . "
SET topic_views = topic_views + 1
WHERE topic_id = $topic_id";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Could not update topic views.", '', __LINE__, __FILE__, $sql);
}
}
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
Code: Selecteer alles
//
// Update view count for this article
//
if (!($postrow[0]['user_id'] == $userdata['user_id'])) {
$sql = "UPDATE " . CMS_ARTICLES_TABLE . "
SET article_views = article_views + 1
WHERE article_id = $article_id";
if( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Could not update article stats.", '', __LINE__, __FILE__, $sql);
}
}