"'.$timeout.'" AND section="'.$_GET['section'].'" LIMIT 70'; $res = db_query($sql); if(db_num_rows($res)) { $msg = 'Beschwerde über Kommentare der letzten Stunde in Sektion '.$_GET['section'].' ('.$ret.'):\n\n'; while($c = db_fetch_assoc($res)) { $msg .= $c['login'].' : '.$c['comment'].'\n'; } $msg = addcslashes($msg,'\''); $sql = 'INSERT INTO petitions SET author='.$session['user']['acctid'].',date=NOW(),kat=7,body=\''.$msg.'\',lastact=NOW(),IP="'.$session['user']['lastip'].'"'; db_query($sql); output('`&`c`bDein Hilferuf wurde gesendet! Sobald ein Mod online kommt, wird er sich darum kümmern.`b`c`n'); $session['modcalled'] = time(); } else { output('`&An diesem Ort wurde in der letzten Stunde nichts geschrieben.'); } } addnav('Zurück',$ret); page_footer(); exit; } else if($_POST['commentlimit']) { $commentlimit = (int)$_POST['commentlimit']; if($commentlimit > 0 && !empty($_GET['section'])) { $session['user']['prefs']['commentlimit'][$_GET['section']] = $commentlimit; } $ret = calcreturnpath(urldecode($_GET['ret'])); //redirect($ret); addnav('',$ret); header('Location:'.$ret); } else if($_GET['npc_off']) { $session['disable_npc_comment'] = $session['disable_npc_comment'] ? false : true; $ret = calcreturnpath(urldecode($_GET['ret'])); addnav('',$ret); header('Location:'.$ret); } else if($_GET['vitalchange']) { $session['disablevital'] = $session['disablevital'] ? false : true; $ret = calcreturnpath(urldecode($_GET['ret'])); addnav('',$ret); header('Location:'.$ret); } else if($_GET['comment_sendmail']) { popup_header('Kommentare an EMail versenden'); // Wird in der viewcommentary gesetzt, um zu verhindern, dass sensible Sections angezeigt werden if( !isset($session['comsendmail_section']) || empty($session['comsendmail_section']) ) { output('`n`b`$Kein Bereich ausgewählt, aus dem Kommentare versendet werden sollen!`b`0`n`n'); popup_footer(); exit; } if(!is_email($session['user']['emailaddress'])) { output('`$Du hast in deinem Profil keine gültige Emailadresse angegeben!'); popup_footer(); exit; } $section = $session['comsendmail_section']; // Wie viele Kommentare / Seite? $sitecount = ($session['comsendmail_sitecount'] ? $session['comsendmail_sitecount'] : 50); $int_lasttime = 0; $int_lastid = (int)$session['comsendmail'][$section]; if($int_lastid > 0) { $arr_lastcomment = getcommentary(' commentid='.$int_lastid); $arr_lastcomment = $arr_lastcomment[0]; $int_lasttime = $session['comsendmail']['lastsent']; } // 15 Mins warten if((time() - $int_lasttime) < COMMENTMAIL_MIN_INTERVAL && $session['user']['superuser'] == 0) { output('`n`$`bDu mußt noch eine Weile warten, ehe du erneut Kommentare versenden darfst!`b`0`n'); popup_footer(); exit; } $start=(int)$_REQUEST['start']; $count = (int)$_REQUEST['count']; $fontsize = (int)$_REQUEST['fontsize']; $fontcolor = urldecode($_REQUEST['fontcolor']); $bgcolor = urldecode($_REQUEST['bgcolor']); $act = $_REQUEST['act']; // Gesamtanzahl der Beiträge zählen $sql = 'SELECT COUNT(*) AS a FROM commentary INNER JOIN accounts ON accounts.acctid = commentary.author WHERE section="'.$section.'" AND self=1'; $arr_count = db_fetch_assoc(db_query($sql)); $str_error = ''; $str_css = str_replace('[bgcolor]',$bgcolor,$str_css); $str_css = str_replace('[fontcolor]',$fontcolor,$str_css); $str_css = str_replace('[fontsize]',$fontsize,$str_css); if($arr_count['a'] == 0) { output('`n`b`$Im gewünschten Bereich sind leider keine Kommentare vorhanden!`b`0`n`n'); popup_footer(); exit; } // Wenn keine Anzahl gewählt // -> Startformular anzeigen if($count == 0) {$act = '';} if($act == 'send') { $arr_comments = getcommentary(' section="'.$section.'" AND self=1 '.($start == 1234567 && $int_lastid>0 ? ' AND commentid>'.$int_lastid : ''),($start != 1234567 ? $start : 0),$count); if(sizeof($arr_comments) == 0) { output('`b`$Gähnende Leere zu versenden, kann langweilen ; )`0`b`n'); popup_footer(); exit; } $body = '