0) { $sql="SELECT a.comments FROM ".$xoopsDB->prefix("xcgal_albums")." as a, ".$xoopsDB->prefix("xcgal_pictures")." as p WHERE a.aid=p.aid AND p.pid=".$com_itemid.""; $result = $xoopsDB->query($sql); $CURRENT_ALBUM_DATA = $xoopsDB->fetchArray($result); } if (USER_CAN_POST_COMMENTS && $CURRENT_ALBUM_DATA['comments'] == 'YES'){ if ($com_itemid > 0) { // Get link title $sql = "SELECT title FROM " . $xoopsDB->prefix('xcgal_pictures') . " WHERE pid=" . $com_itemid . ""; $result = $xoopsDB->query($sql); $row = $xoopsDB->fetchArray($result); $com_replytitle = $row['title']; include XOOPS_ROOT_PATH.'/include/comment_new.php'; } } else redirect_header('index.php',2,"You aren't allowed to post comments for this pic."); ?>