Changeset 835 in ExiteCMS for trunk/includes/comments_include.php


Ignore:
Timestamp:
09/23/07 23:34:47 (5 years ago)
Author:
hverton
Message:

Replaced all button images by new {buttonlink} Smarty function

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/comments_include.php

    r834 r835  
    2121function showcomments($comment_type,$cdb,$ccol,$comment_id,$clink) { 
    2222 
    23     global $settings,$locale,$userdata,$aidlink, 
     23    global $db_prefix, $settings,$locale,$userdata,$aidlink, 
    2424        $template_panels, $template_variables; 
    2525 
     
    2828    if ((iMEMBER || $settings['guestposts'] == "1") && isset($_POST['post_comment'])) { 
    2929        $flood = false; 
    30         if (dbrows(dbquery("SELECT $ccol FROM ".DB_PREFIX."$cdb WHERE $ccol='$comment_id'"))==0) { 
     30        if (dbrows(dbquery("SELECT $ccol FROM ".$db_prefix."$cdb WHERE $ccol='$comment_id'"))==0) { 
    3131            fallback(BASEDIR."index.php"); 
    3232        } 
     
    4141        $comment_smileys = isset($_POST['disable_smileys']) ? "0" : "1"; 
    4242        if ($comment_name != "" && $comment_message != "") { 
    43             $result = dbquery("SELECT MAX(comment_datestamp) AS last_comment FROM ".DB_PREFIX."comments WHERE comment_ip='".USER_IP."'"); 
     43            $result = dbquery("SELECT MAX(comment_datestamp) AS last_comment FROM ".$db_prefix."comments WHERE comment_ip='".USER_IP."'"); 
    4444            if (!iSUPERADMIN || dbrows($result) > 0) { 
    4545                $data = dbarray($result); 
     
    5252                } 
    5353            } 
    54             if (!$flood) $result = dbquery("INSERT INTO ".DB_PREFIX."comments (comment_item_id, comment_type, comment_name, comment_message, comment_smileys, comment_datestamp, comment_ip) VALUES ('$comment_id', '$comment_type', '$comment_name', '$comment_message', '$comment_smileys', '".time()."', '".USER_IP."')"); 
     54            if (!$flood) $result = dbquery("INSERT INTO ".$db_prefix."comments (comment_item_id, comment_type, comment_name, comment_message, comment_smileys, comment_datestamp, comment_ip) VALUES ('$comment_id', '$comment_type', '$comment_name', '$comment_message', '$comment_smileys', '".time()."', '".USER_IP."')"); 
    5555        } 
    5656        redirect($clink); 
     
    5858 
    5959    $result = dbquery( 
    60         "SELECT tcm.*,user_name FROM ".DB_PREFIX."comments tcm 
    61         LEFT JOIN ".DB_PREFIX."users tcu ON tcm.comment_name=tcu.user_id 
     60        "SELECT tcm.*,user_name FROM ".$db_prefix."comments tcm 
     61        LEFT JOIN ".$db_prefix."users tcu ON tcm.comment_name=tcu.user_id 
    6262        WHERE comment_item_id='$comment_id' AND comment_type='$comment_type' 
    6363        ORDER BY comment_datestamp ASC" 
Note: See TracChangeset for help on using the changeset viewer.