• » webSPELL.org - Free Content Management System
  • Language switch: English German
  • login



    » lost password?   » register now
  • About webSPELL

    webSPELL is a free Content Management System which was especially developed for the needs of esport related communities. Since a short while we are also offering an optimized and enhanced webSPELL version for the special requirements of non-profit organisations. The purpose of both systems is to offer a professional and free opportunity to create and administrate your own website in an easy and optimized way.

    » Learn more about webSPELL     » Download webSPELL now!
  • Advertisement

    Follow us

  • Sort:     printview
    Author
    Message
    webSPELL newbie
    9 Posts
    19.06.2012, 22:37 email offline quote 

    I'm getting this error on my Comments.php every time I type a comment:

    Query failed:
    errorno=1064
    error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM ws_iY5_ WHERE ='19'' at line 1
    query=SELECT FROM ws_iY5_ WHERE ='19'

    Any toughts?
    Code:
    1.
    2.
    3.
    4.
    5.
    6.
    7.
    8.
    9.
    10.
    11.
    12.
    13.
    14.
    15.
    16.
    17.
    18.
    19.
    20.
    21.
    22.
    23.
    24.
    25.
    26.
    27.
    28.
    29.
    30.
    31.
    32.
    33.
    34.
    35.
    36.
    37.
    38.
    39.
    40.
    41.
    42.
    43.
    44.
    45.
    46.
    47.
    48.
    49.
    50.
    51.
    52.
    53.
    54.
    55.
    56.
    57.
    58.
    59.
    60.
    61.
    62.
    63.
    64.
    65.
    66.
    67.
    68.
    69.
    70.
    71.
    72.
    73.
    74.
    75.
    76.
    77.
    78.
    79.
    80.
    81.
    82.
    83.
    84.
    85.
    86.
    87.
    88.
    89.
    90.
    91.
    92.
    93.
    94.
    95.
    96.
    97.
    98.
    99.
    100.
    101.
    102.
    103.
    104.
    105.
    106.
    107.
    108.
    109.
    110.
    111.
    112.
    113.
    114.
    115.
    116.
    117.
    118.
    119.
    120.
    121.
    122.
    123.
    124.
    125.
    126.
    127.
    128.
    129.
    130.
    131.
    132.
    133.
    134.
    135.
    136.
    137.
    138.
    139.
    140.
    141.
    142.
    143.
    144.
    145.
    146.
    147.
    148.
    149.
    150.
    151.
    152.
    153.
    154.
    155.
    156.
    157.
    158.
    159.
    160.
    161.
    162.
    163.
    164.
    165.
    166.
    167.
    168.
    169.
    170.
    171.
    172.
    173.
    174.
    175.
    176.
    177.
    178.
    179.
    180.
    181.
    182.
    183.
    184.
    185.
    186.
    187.
    188.
    189.
    190.
    191.
    192.
    193.
    194.
    195.
    196.
    197.
    198.
    199.
    200.
    201.
    202.
    203.
    204.
    205.
    206.
    207.
    208.
    209.
    210.
    211.
    212.
    213.
    214.
    215.
    216.
    217.
    218.
    219.
    220.
    221.
    222.
    223.
    224.
    225.
    226.
    227.
    228.
    229.
    230.
    231.
    232.
    233.
    234.
    235.
    236.
    237.
    238.
    239.
    240.
    241.
    242.
    243.
    244.
    245.
    246.
    247.
    248.
    249.
    250.
    251.
    252.
    253.
    254.
    255.
    256.
    257.
    258.
    259.
    260.
    261.
    262.
    263.
    264.
    265.
    266.
    267.
    268.
    269.
    270.
    271.
    272.
    273.
    274.
    275.
    276.
    277.
    278.
    279.
    280.
    281.
    282.
    283.
    284.
    285.
    286.
    287.
    288.
    289.
    290.
    291.
    292.
    293.
    294.
    295.
    296.
    297.
    298.
    299.
    300.
    301.
    302.
    303.
    304.
    305.
    306.
    307.
    308.
    309.
    310.
    311.
    312.
    313.
    314.
    315.
    316.
    317.
    318.
    319.
    320.
    321.
    322.
    323.
    324.
    325.
    326.
    327.
    328.
    329.
    330.
    331.
    332.
    333.
    334.
    335.
    336.
    337.
    338.
    339.
    340.
    341.
    342.
    343.
    344.
    345.
    346.
    347.
    348.
    349.
    350.
    351.
    352.
    353.
    354.
    355.
    356.
    357.
    358.
    359.
    360.
    361.
    362.
    363.
    364.
    365.
    366.
    367.
    368.
    369.
    370.
    371.
    372.
    373.
    374.
    375.
    376.
    377.
    378.
    379.
    380.
    381.
    382.
    383.
    384.
    385.
    386.
    387.
    388.
    389.
    390.
    391.
    392.
    393.
    394.
    395.
    396.
    397.
    398.
    399.
    400.
    401.
    402.
    403.
    404.
    405.
    406.
    407.
    408.
    409.
    410.
    411.
    412.
    413.
    414.
    415.
    416.
    417.
    418.
    419.
    420.
    421.
    422.
    423.
    424.
    425.
    426.
    427.
    428.
    429.
    430.
    431.
    432.
    433.
    434.
    435.
    436.
    437.
    438.
    439.
    440.
    441.
    442.
    443.
    444.
    445.
    446.
    447.
    448.
    449.
    450.
    451.
    452.
    453.
    454.
    455.
    456.
    457.
    458.
    459.
    460.
    461.
    462.
    463.
    464.
    465.
    466.
    467.
    468.
    469.
    470.
    471.
    472.
    473.
    474.
    475.
    476.
    477.
    478.
    479.
    480.
    481.
    482.
    483.
    484.
    485.
    486.
    487.
    488.
    489.
    490.
    491.
    492.
    493.
    494.
    495.
    496.
    497.
    498.
    499.
    500.
    501.
    502.
    503.
    504.
    505.
    506.
    507.
    508.
    509.
    510.
    511.
    512.
    513.
    514.
    515.
    516.
    517.
    518.
    519.
    520.
    521.
    522.
    523.
    524.
    525.
    526.
    527.
    528.
    529.
    530.
    531.
    532.
    533.
    534.
    535.
    536.
    537.
    538.
    539.
    540.
    541.
    542.
    543.
    544.
    545.
    546.
    547.
    548.
    549.
    550.
    551.
    552.
    553.
    554.
    555.
    556.
    557.
    558.
    559.
    560.
    561.
    562.
    563.
    564.
    565.
    566.
    567.
    568.
    569.
    570.
    571.
    572.
    573.
    574.
    575.
    576.
    577.
    578.
    579.
    580.
    581.
    582.
    583.
    584.
    585.
    586.
    587.
    588.
    589.
    590.
    591.
    592.
    593.
    594.
    595.
    596.
    597.
    598.
    599.
    600.
    601.
    602.
    603.
    604.
    605.
    606.
    607.
    608.
    609.
    610.
    611.
    612.
    613.
    614.
    615.
    616.
    617.
    618.
    619.
    620.
    621.
    622.
    623.
    624.
    625.
    626.
    627.
    628.
    629.
    630.
    631.
    632.
    633.
    634.
    635.
    636.
    637.
    638.
    639.
    640.
    641.
    642.
    643.
    644.
    645.
    646.
    647.
    648.
    649.
    650.
    651.
    652.
    653.
    654.
    655.
    656.
    657.
    658.
    659.
    660.
    661.
    662.
    663.
    664.
    665.
    666.
    667.
    668.
    669.
    670.
    671.
    672.
    673.
    674.
    675.
    676.
    677.
    678.
    679.
    680.
    681.
    682.
    683.
    684.
    685.
    686.
    687.
    688.
    689.
    690.
    691.
    692.
    693.
    694.
    695.
    696.
    697.
    698.
    699.
    700.
    701.
    702.
    703.
    704.
    705.
    706.
    707.
    708.
    709.
    710.
    711.
    712.
    713.
    714.
    715.
    716.
    717.
    718.
    719.
    720.
    721.
    722.
    723.
    724.
    725.
    726.
    727.
    728.
    729.
    730.
    731.
    732.
    733.
    <?php

    /*

    ##########################################################################

    #                                                                        #

    #           Version 4       /                        /   /               #

    #          -----------__---/__---__------__----__---/---/-               #

    #           | /| /  /___) /   ) (_ `   /   ) /___) /   /                 #

    #          _|/_|/__(___ _(___/_(__)___/___/_(___ _/___/___               #

    #                       Free Content / Management System                 #

    #                                   /                                    #

    #                                                                        #

    #                                                                        #

    #   Copyright 2005-2011 by webspell.org                                  #

    #                                                                        #

    #   visit webSPELL.org, webspell.info to get webSPELL for free           #

    #   - Script runs under the GNU GENERAL PUBLIC LICENSE                   #

    #   - It's NOT allowed to remove this copyright-tag                      #

    #   -- http://www.fsf.org/licensing/licenses/gpl.html                    #

    #                                                                        #

    #   Code based on WebSPELL Clanpackage (Michael Gruber - webspell.at),   #

    #   Far Development by Development Team - webspell.org                   #

    #                                                                        #

    #   visit webspell.org                                                   #

    #                                                                        #

    ##########################################################################

    */

    $bg1 = BG_1;

    function checkCommentsAllow($type, $parentID){

         global $userID;

         $moduls = array();

         $moduls['ne'] = array("news","newsID","comments");

         $moduls['ar'] = array("articles","articlesID","comments");

         $moduls['ga'] = array("gallery_pictures","picID","comments");

         $moduls['cw'] = array("clanwars","cwID","comments");

         $moduls['de'] = array("demos","demoID","comments");

         $moduls['po'] = array("poll","pollID","comments");

         $allowed = 0;

         $modul = $moduls[$type];

         $get = safe_query("SELECT ".$modul[2]." FROM ".PREFIX.$modul[0]." WHERE ".$modul[1]."='".$parentID."'");

         if(mysql_num_rows($get)){

              $data = mysql_fetch_assoc($get);

              switch($data[$modul[2]]){

                   case 0: $allowed = 0; break;

                   case 1: if($userID) $allowed = 1; break;

                   case 2: $allowed = 1; break;

                   default: $allowed=0;

              }

         }

         return $allowed;

    }

    if(isset($_POST['savevisitorcomment'])) {

         include("_mysql.php");

         include("_settings.php");

         include("_functions.php");



         $name = $_POST['name'];

         $mail = $_POST['mail'];

         $url = $_POST['url'];

         $parentID = (int)$_POST['parentID'];

         $type = $_POST['type'];

         $message = $_POST['message'];

         $ip = $GLOBALS['ip'];

         $CAPCLASS = new Captcha;



         setcookie("visitor_info", $name."--||--".$mail."--||--".$url, time()+(3600*24*365));

         $query = safe_query("SELECT nickname, username FROM ".PREFIX."user ORDER BY nickname");

         while($ds=mysql_fetch_array($query)) {

              $nicks[] = $ds['nickname'];

              $nicks[] = $ds['username'];

         }

         $_SESSION['comments_message'] = $message;



         if(in_array(trim($name), $nicks)) header("Location: ".$_POST['referer']."&error=nickname#addcomment");

         elseif(!($CAPCLASS->check_captcha($_POST['captcha'], $_POST['captcha_hash']))) header("Location: ".$_POST['referer']."&error=captcha#addcomment");

         elseif(checkCommentsAllow($type,$parentID) == false ) header("Location: ".$_POST['referer']);

         else {

              $date=time();

              safe_query("INSERT INTO ".PREFIX."comments ( parentID, type, nickname, date, comment, url, email, ip )

                          values( '".$parentID."', '".$type."', '".$name."', '".$date."', '".$message."', '".$url."', '".$mail."', '".$ip."' ) ");

              unset($_SESSION['comments_message']);

              header("Location: ".$_POST['referer']);

         }

    }

    elseif(isset($_POST['saveusercomment'])) {

         include("_mysql.php");

         include("_settings.php");

         include("_functions.php");

         $_language->read_module('comments');

         if(!$userID) die($_language->module['access_denied']);



         $parentID = $_POST['parentID'];

         $type = $_POST['type'];

         $message = $_POST['message'];

         if(checkCommentsAllow($type,$parentID)){

              $date=time();

              safe_query("INSERT INTO ".PREFIX."comments ( parentID, type, userID, date, comment ) values( '".$parentID."', '".$type."', '".$userID."', '".$date."', '".$message."' ) ");

         }

         header("Location: ".$_POST['referer']);

    }

    elseif(isset($_GET['delete'])) {

         include("_mysql.php");

         include("_settings.php");

         include("_functions.php");

         $_language->read_module('comments');

         if(!isanyadmin($userID)) die($_language->module['access_denied']);

         foreach($_POST['commentID'] as $id) {

              safe_query("DELETE FROM ".PREFIX."comments WHERE commentID='".$id."'");

         }

         header("Location: ".$_POST['referer']);

    }

    elseif(isset($_GET['editcomment'])) {

         $id=$_GET['id'];

         $referer=$_GET['ref'];

         $_language->read_module('comments');

         $_language->read_module('bbcode', true);

         if(isfeedbackadmin($userID) or iscommentposter($userID,$id)) {

              if(!empty($id)) {

                   $dt = safe_query("SELECT * FROM ".PREFIX."comments WHERE commentID='".$id."'");

                   if(mysql_num_rows($dt)) {

                        $ds = mysql_fetch_array($dt);

                        $poster='<a href="index.php?site=profile&amp;id='.$ds['userID'].'"><b>'.getnickname($ds['userID']).'</b></a>';

                        $message=getinput($ds['comment']);

                        $message=preg_replace("#\n\[br\]\[br\]\[hr]\*\*(.+)#si", '', $message);

                        $message=preg_replace("#\n\[br\]\[br\]\*\*(.+)#si", '', $message);



                        eval ("\$addbbcode = \"".gettemplate("addbbcode")."\";");



                        eval("\$comments_edit = \"".gettemplate("comments_edit")."\";");

                        echo $comments_edit;

                   }

                   else {

                        redirect($referer, $_language->module['no_database_entry'], 2);

                   }

              }

              else {

                   redirect($referer, $_language->module['no_commentid'], 2);

              }

         }

         else {

              redirect($referer, $_language->module['access_denied'], 2);

         }

    }

    elseif(isset($_POST['saveeditcomment'])) {

         include("_mysql.php");

         include("_settings.php");

         include("_functions.php");



         if(!isfeedbackadmin($userID) and !iscommentposter($userID,$_POST['commentID'])) die('No access');



         $message=$_POST['message'];

         $author=$_POST['authorID'];

         $referer=urldecode($_POST['referer']);



         // check if any admin edited the post

         if(safe_query("UPDATE ".PREFIX."comments SET comment='".$message."' WHERE commentID='".$_POST['commentID']."'")) {

              header("Location: ".$referer);

         }

    }

    else {



         $_language->read_module('comments');

         $_language->read_module('bbcode', true);



         if(isset($_GET['commentspage'])) $commentspage = (int)$_GET['commentspage'];

         else $commentspage = 1;

         if(isset($_GET['sorttype']) AND strtoupper($_GET['sorttype']=="ASC")) $sorttype = 'ASC';

         else $sorttype='DESC';



         if(!isset($parentID) AND isset($_GET['parentID'])) $parentID = (int)$_GET['parentID'];

         if(!isset($type) AND isset($_GET['type'])) $type = mb_substr($_GET['type'], 0, 2);



         $alle=safe_query("SELECT commentID FROM ".PREFIX."comments WHERE parentID='$parentID' AND type='$type'");

         $gesamt=mysql_num_rows($alle);

         $commentspages=ceil($gesamt/$maxfeedback);



         if($commentspages>1) $page_link = makepagelink("$referer&amp;sorttype=$sorttype", $commentspage, $commentspages, 'comments');

         else $page_link='';



         if ($commentspage == "1") {

              $ergebnis = safe_query("SELECT * FROM ".PREFIX."comments WHERE parentID='$parentID' AND type='$type' ORDER BY date $sorttype LIMIT 0,$maxfeedback");

              if($sorttype=="DESC") $n=$gesamt;

              else $n=1;

         }     else {

              $start=($commentspage-1)*$maxfeedback;

              $ergebnis = safe_query("SELECT * FROM ".PREFIX."comments WHERE parentID='$parentID' AND type='$type' ORDER BY date $sorttype LIMIT $start,$maxfeedback");

              if($sorttype=="DESC") $n = $gesamt-($commentspage-1)*$maxfeedback;

              else $n = ($commentspage-1)*$maxfeedback+1;

         }

         if($gesamt) {



              eval ("\$title_comments = \"".gettemplate("title_comments")."\";");

              echo $title_comments;



              if($sorttype=="ASC") {

                   $sorter='<a href="'.$referer.'&amp;commentspage='.$commentspage.'&amp;sorttype=DESC">'.$_language->module['sort'].'</a> <img src="images/icons/asc.gif" width="9" height="7" border="0" alt="'.$_language->module['sort_desc'].'" />&nbsp;&nbsp;&nbsp;';

              } else {

                   $sorter='<a href="'.$referer.'&amp;commentspage='.$commentspage.'&amp;sorttype=ASC">'.$_language->module['sort'].'</a> <img src="images/icons/desc.gif" width="9" height="7" border="0" alt="'.$_language->module['sort_asc'].'" />&nbsp;&nbsp;&nbsp;';

              }



              eval ("\$comments_head = \"".gettemplate("comments_head")."\";");

              echo $comments_head;



              while($ds=mysql_fetch_array($ergebnis)) {

                   $n%2 ? $bg1=BG_1 : $bg1=BG_3;



                   $date=date("d.m.Y - H:i", $ds['date']);



                   if($ds['userID']) {

                        $ip='';

                        $poster='<a class="titlelink" href="index.php?site=profile&amp;id='.$ds['userID'].'"><b>'.strip_tags(getnickname($ds['userID'])).'</b></a>';

                        if(isclanmember($ds['userID'])) $member=$_language->module['clanmember_icon'];

                        else $member='';



                        $quotemessage = addslashes(getinput($ds['comment']));

                        $quotemessage = str_replace(array("\r\n","\r","\n"),array('\r\n','\r','\n'),$quotemessage);

                        $quotenickname = addslashes(getinput(getnickname($ds['userID'])));

                        $quote=str_replace(Array('%nickname%', '%message%'), Array($quotenickname, $quotemessage), $_language->module['quote_link']);



                        $country=''.getcountry($ds['userID']).'';

                        $country=flags($country);

                        

                        if ($email = getemail($ds['userID']) AND !getemailhide($ds['userID'])) $email = str_replace('%email%', mail_protect($email), $_language->module['email_link']);

                        else $email='';

                        $gethomepage = gethomepage($ds['userID']);

                        if ($gethomepage != "" && $gethomepage != "http://" && $gethomepage != "http:///" && $gethomepage != "n/a") $hp = '<a href="http://'.$gethomepage.'" target="_blank"><img src="images/icons/hp.gif" border="0" width="14" height="14" alt="'.$_language->module['homepage'].'" /></a>';

                        else $hp='';

                        

                        if(isonline($ds['userID'])=="offline") $statuspic='<img src="images/icons/offline.gif" width="7" height="7" alt="offline" />';

                        else $statuspic='<img src="images/icons/online.gif" width="7" height="7" alt="online" />';



                        $avatar='<img src="images/avatars/'.getavatar($ds['userID']).'" align="left" alt="Avatar" />';



                        if($loggedin && $ds['userID'] != $userID) {

                             $pm='<a href="index.php?site=messenger&amp;action=touser&amp;touser='.$ds['userID'].'"><img src="images/icons/pm.gif" border="0" width="12" height="13" alt="'.$_language->module['send_message'].'" /></a>';

                             if(isignored($userID, $ds['userID'])) $buddy='<a href="buddys.php?action=readd&amp;id='.$ds['userID'].'&amp;userID='.$userID.'"><img src="images/icons/buddy_readd.gif" width="16" height="16" border="0" alt="'.$_language->module['readd_buddy'].'" /></a>';

                             elseif(isbuddy($userID, $ds['userID'])) $buddy='<a href="buddys.php?action=ignore&amp;id='.$ds['userID'].'&amp;userID='.$userID.'"><img src="images/icons/buddy_ignore.gif" width="16" height="16" border="0" alt="'.$_language->module['ignore_user'].'" /></a>';

                             elseif($userID==$ds['userID']) $buddy='';

                             else $buddy='<a href="buddys.php?action=add&amp;id='.$ds['userID'].'&amp;userID='.$userID.'"><img src="images/icons/buddy_add.gif" width="16" height="16" border="0" alt="'.$_language->module['add_buddy'].'" /></a>';

                        } else {

                             $pm='';

                             $buddy='';

                        }

                   }

                   else {

                        $member='';

                        $avatar='<img src="images/avatars/noavatar.gif" align="left" alt="Avatar" />';

                        $country='';

                        $pm='';

                        $buddy='';

                        $statuspic='';

                        $ds['nickname'] = strip_tags($ds['nickname']);

                        $ds['nickname'] = htmlspecialchars($ds['nickname']);

                        $poster = strip_tags($ds['nickname']);



                        $ds['email'] = strip_tags($ds['email']);

                        $ds['email'] = htmlspecialchars($ds['email']);

                        if($ds['email'])  $email = str_replace('%email%', mail_protect($ds['email']), $_language->module['email_link']);

                        else $email='';



                        $ds['url'] = strip_tags($ds['url']);

                        $ds['url'] = htmlspecialchars($ds['url']);

                        if(!stristr($ds['url'],'http://')) $ds['url'] = "http://".$ds['url'];

                        if($ds['url']!="http://" && $ds['url']!="") $hp = '<a href="'.$ds['url'].'" target="_blank"><img src="images/icons/hp.gif" border="0" width="14" height="14" alt="'.$_language->module['homepage'].'" /></a>';

                        else $hp='';

                        $ip = 'IP: ';

                        if(isfeedbackadmin($userID)) $ip.=$ds['ip'];

                        else $ip.='saved';



                        $quotemessage = addslashes(getinput($ds['comment']));

                        $quotenickname = addslashes(getinput($ds['nickname']));

                        $quote=str_replace(Array('%nickname%', '%message%'), Array($quotenickname, $quotemessage), $_language->module['quote_link']);

                   }



                   $content = cleartext($ds['comment']);

                   $content = toggle($content, $ds['commentID']);



                   if(isfeedbackadmin($userID) or iscommentposter($userID,$ds['commentID'])) {

                        $edit = '<a href="index.php?site=comments&amp;editcomment=true&amp;id='.$ds['commentID'].'&amp;ref='.urlencode($referer).'" title="'.$_language->module['edit_comment'].'"><img src="images/icons/edit.gif" border="0" alt="'.$_language->module['edit_comment'].'" /></a>';

                   } else $edit='';



                   if(isfeedbackadmin($userID)) $actions='<input class="input" type="checkbox" name="commentID[]" value="'.$ds['commentID'].'" />';

                   else $actions='';



                   eval ("\$comments = \"".gettemplate("comments")."\";");

                   echo $comments;



                   unset($member);

                   unset($quote);

                   unset($country);

                   unset($email);

                   unset($hp);

                   unset($avatar);

                   unset($pm);

                   unset($buddy);

                   unset($ip);

                   unset($edit);



                   if(isfeedbackadmin($userID)) {

                        $submit='<input type="hidden" name="referer" value="'.$referer.'" />

            <input class="input" type="checkbox" name="ALL" value="ALL" onclick="SelectAll(this.form);" /> '.$_language->module['select_all'].'

            <input type="submit" value="'.$_language->module['delete_selected'].'" />';

                   }     else $submit='';



                   if($sorttype=="DESC") $n--;

                   else $n++;

              }



              eval ("\$comments_foot = \"".gettemplate("comments_foot")."\";");

              echo $comments_foot;



         }



         if($comments_allowed) {

              if($loggedin) {

          

                    eval ("\$addbbcode = \"".gettemplate("addbbcode")."\";");

                   eval ("\$comments_add_user = \"".gettemplate("comments_add_user")."\";");

                   echo $comments_add_user;

              }

              elseif($comments_allowed == 2) {

        

                   $ip = getenv('REMOTE_ADDR');

                   

                   if (isset($_COOKIE['visitor_info'])) {

                        $visitor = explode("--||--", $_COOKIE['visitor_info']);

                        $name = getforminput(stripslashes($visitor[0]));

                        $mail = getforminput(stripslashes($visitor[1]));

                        $url = getforminput(stripslashes($visitor[2]));

                   }

                   else{

                        $url = "http://";

                        $name = "";

                        $mail = "";

                   }

                   

                   if(isset($_GET['error'])) $err = $_GET['error'];

                   else $err = "";

                   if($err=="nickname"){

                        $error = $_language->module['error_nickname'];

                        $name = "";

                   }

                   elseif($err=="captcha") $error = $_language->module['error_captcha'];

                   else $error = '';

                   

                   if(isset($_SESSION['comments_message'])){

                        $message = getforminput($_SESSION['comments_message']);

                        unset($_SESSION['comments_message']);

                   }

                   else{

                        $message = "";

                   }

                   

                   $CAPCLASS = new Captcha;

                   $captcha = $CAPCLASS->create_captcha();

                   $hash = $CAPCLASS->get_hash();

                   $CAPCLASS->clear_oldcaptcha();



                    eval ("\$addbbcode = \"".gettemplate("addbbcode")."\";");

                   eval ("\$comments_add_visitor = \"".gettemplate("comments_add_visitor")."\";");

                   echo $comments_add_visitor;

              }

              else echo $_language->module['no_access'];

         }

         else echo $_language->module['comments_disabled'];

    }



    ?>

    website: www.forsakn.com/?site=cup_matches&match=2&cupID=2
    version: 4.2.3
    webSPELL newbie
    80 Posts
    19.06.2012, 22:41 email offline quote 

    you've forgot the table. this errormessage shows you your prefix only, but a precise table is not defined.

    Search in your comments.php for a query, where the prefix stands alone without any table.
    webSPELL newbie
    9 Posts
    19.06.2012, 23:22 email offline quote 

    dlite wrote:

    you've forgot the table. this errormessage shows you your prefix only, but a precise table is not defined.

    Search in your comments.php for a query, where the prefix stands alone without any table.


    I'm new to php code.
    I've posted my comments.php code in order for you guys to tell me what to change.
    I don't know what to do! :/
    Administrator
    Member of webSPELL e.V.
    3068 Posts
    20.06.2012, 10:28 offline quote 

    Code:
    1.
    $get = safe_query("SELECT ".$modul[2]." FROM ".PREFIX.$modul[0]." WHERE ".$modul[1]."='".$parentID."'");


    That is the line in question. I guess you get that error only when you try to add a comment on a "cup_match".

    You'll need to add a module like this:

    Code:
    1.
    2.
    3.
    4.
    5.
    6.
    7.
    8.
    9.
    10.
    11.
         $moduls['ne'] = array("news","newsID","comments");

         $moduls['ar'] = array("articles","articlesID","comments");

         $moduls['ga'] = array("gallery_pictures","picID","comments");

         $moduls['cw'] = array("clanwars","cwID","comments");

         $moduls['de'] = array("demos","demoID","comments");

         $moduls['po'] = array("poll","pollID","comments");
    Sort:     printview


    To start or to reply to a topic you have to be registered and logged in!

    register now
    login
  • » Support

    » Topics
    19.05.2013 - 03:55 - 8 Replies
    » Mein Forum
    Mein Forum
    Last post: Lordy4007
    Board: DE - Fragen zur Seite
    19.05.2013 - 03:55
    18.05.2013 - 19:58 - 36 Replies
    » Exklusiv Webseite zur Mie...
    Exklusiv Webseite zur Miete
    Last post: liQweb
    Board: DE - Biete
    18.05.2013 - 19:58
    18.05.2013 - 16:29 - 2 Replies
    » forum anzeige erweitern
    forum anzeige erweitern
    Last post: Swordfish3000
    Board: DE - Allgemeiner Support
    18.05.2013 - 16:29
    18.05.2013 - 14:00 - 0 Replies
    » [S] Tester für neuen Foru...
    [S] Tester für neuen ForumMod
    Last post: Argu
    Board: DE - Anfragen
    18.05.2013 - 14:00
    18.05.2013 - 12:21 - 1 Replies
    » Query failed
    Query failed
    Last post: LoRd
    Board: DE - Allgemeiner Support
    18.05.2013 - 12:21
    18.05.2013 - 09:36 - 3 Replies
    » benötige hilfe bei paar k...
    benötige hilfe bei paar kleinigkeiten
    Last post: immostar
    Board: DE - Technischer Support
    18.05.2013 - 09:36
    18.05.2013 - 03:33 - 4 Replies
    » [SELL] Gaming Website
    [SELL] Gaming Website
    Last post: hornyst
    Board: EN - Offers
    18.05.2013 - 03:33
    18.05.2013 - 00:32 - 6 Replies
    » Hide BBCODE Echo
    Hide BBCODE Echo
    Last post: dado2106
    Board: EN - Technical support
    18.05.2013 - 00:32
    17.05.2013 - 21:42 - 0 Replies
    » website help
    website help
    Last post: envy0024
    Board: EN - Technical support
    17.05.2013 - 21:42
    17.05.2013 - 21:03 - 1 Replies
    » Need Coder!
    Need Coder!
    Last post: iG.ShAdOw
    Board: EN - Requests
    17.05.2013 - 21:03
    17.05.2013 - 20:44 - 9 Replies
    » Query failed!
    Query failed!
    Last post: LoRd
    Board: DE - Allgemeiner Support
    17.05.2013 - 20:44
    17.05.2013 - 18:08 - 0 Replies
    » [4 SALE] Layouts (Gaming,...
    [4 SALE] Layouts (Gaming, Portfolio and more)
    Last post: Freestyler92
    Board: EN - Offers
    17.05.2013 - 18:08
    17.05.2013 - 18:06 - 0 Replies
    » Design Ausverkauf - alles...
    Design Ausverkauf - alles unter 70€
    Last post: Freestyler92
    Board: DE - Biete
    17.05.2013 - 18:06
    17.05.2013 - 10:56 - 6 Replies
    » [Biete] Template Designs
    [Biete] Template Designs
    Last post: Marceld
    Board: DE - Biete
    17.05.2013 - 10:56
    17.05.2013 - 10:41 - 7 Replies
    » register captcha
    register captcha
    Last post: nappel.ger
    Board: DE - Allgemeiner Support
    17.05.2013 - 10:41
    17.05.2013 - 09:56 - 3 Replies
    » Suche Designer GGL:Geld
    Suche Designer GGL:Geld
    Last post: Freestyler92
    Board: DE - Suche
    17.05.2013 - 09:56
    17.05.2013 - 00:13 - 0 Replies
    » News
    News
    Last post: dado2106
    Board: EN - Modifications
    17.05.2013 - 00:13
    16.05.2013 - 15:04 - 2 Replies
    » [V] mehrere Webspell Temp...
    [V] mehrere Webspell Templates und Designs
    Last post: Dynamic-Webmedia
    Board: DE - Biete
    16.05.2013 - 15:04
    16.05.2013 - 13:09 - 2 Replies
    » Content laden
    Content laden
    Last post: Helgon
    Board: DE - Anfragen
    16.05.2013 - 13:09
    16.05.2013 - 13:07 - 18 Replies
    » [B] Web, Print und Logode...
    [B] Web, Print und Logodesign
    Last post: Helgon
    Board: DE - Suche
    16.05.2013 - 13:07
    » Partners
    Bilderkiste.org Image Hosting
    k3rmit.org
    PascalMh.de


    » Blog
    28.03.2013 - derchris
    » Those damn spammers