Forum » '.aktForumCats($aktForumRow['kat']).' » '.$aktForumRow['name'].' » '; $hmenu .= ''.$aktTopicRow['name'].''.$extented_forum_menu_sufix; $dppk_time = time(); $time = time(); if (!isset($_SESSION['klicktime'])) { $_SESSION['klicktime'] = 0; } $topic = ''; $txt = ''; $xnn = ''; if (isset($_POST['txt'])) { $txt = trim(escape($_POST['txt'], 'textarea')); } if (isset($_POST['Gname'])) { $xnn = trim(escape_nickname($_POST['Gname'])); } if (($_SESSION['klicktime'] + 15) > $dppk_time OR empty($txt) OR !empty($_POST['priview']) OR (empty($_POST['Gname']) AND !loggedin())) { $design = new design ( $title , $hmenu, 1); $design->header(); $name = ''; if ( !loggedin() ) { $name = ''.$lang['name'].''; $name .= ''; } $tpl = new tpl ('forum/newpost'); $xtext = ''; if ( $menu->getA(3) == 'z' ) { $row = db_fetch_object(db_query("SELECT txt,erst FROM prefix_posts WHERE id = ".$menu->getE(3))); $xtext = '[quote='.escape_nickname($row->erst).']'."\n".$row->txt."\n[/quote]"; } if ( $menu->getA(3) == 'f' ) { $r = db_fetch_assoc(db_query("SELECT id,text,title FROM prefix_faqs WHERE id = ".$menu->getE(3))); $xtext = 'FAQ Artikel: [url=index.php?faqs-s'.$r['id'].'#FAQ'.$r['id'].']'.$r['title'].'[/url]'."\n".unescape($r['text']); } if (isset($_POST['priview'])) { $tpl->set_out('txt', FE_Vote2HTML(1,bbcode($txt),TRUE), 0); } if (empty($txt)) { $txt = $xtext; } $tpl = new tpl ('forum/newpost'); $ar = array ( 'txt' => escape_for_fields(unescape($txt)), 'tid' => $tid, 'name' => $name, 'SMILIES' => getsmilies() ); $tpl->set_ar_out($ar,1); $erg = db_query('SELECT id, erst, txt FROM `prefix_posts` WHERE tid = "'.$tid.'" ORDER BY time DESC LIMIT 0,5'); while ($row = db_fetch_assoc($erg)) { $row['txt'] = bbcode($row['txt']); //Forumex - begin $row['txt'] = FE_Vote2HTML($row['id'],$row['txt'],TRUE); //Forumex - end $tpl->set_ar_out($row, 2); } $tpl->out(3); } else { # save post $_SESSION['klicktime'] = $dppk_time; $design = new design ( $title , $hmenu, 1); $design->header(); if (loggedin()) { $uid = $_SESSION['authid']; $erst = escape($_SESSION['authname'],'string'); db_query("UPDATE `prefix_user` set posts = posts+1 WHERE id = ".$uid); } else { $erst = $xnn; $uid = 0; } # topic alert ausfuehren. $topic_alerts_abf = "SELECT prefix_topics.name as topic, prefix_user.email as email, prefix_user.name as user, prefix_user.id as uid FROM prefix_topic_alerts LEFT JOIN prefix_topics ON prefix_topics.id = prefix_topic_alerts.tid LEFT JOIN prefix_user ON prefix_user.id = prefix_topic_alerts.uid WHERE prefix_topic_alerts.tid = ".$tid; $topic_alerts_erg = db_query($topic_alerts_abf); while ($topic_alerts_row = db_fetch_assoc($topic_alerts_erg)) { if ($uid == $topic_alerts_row['uid']) continue; $page = $_SERVER["HTTP_HOST"].$_SERVER["SCRIPT_NAME"]; $text = sprintf ($lang['topicalertmessage'], $topic_alerts_row['user'], $topic_alerts_row['topic'], $page, $tid); icmail ($topic_alerts_row['email'], 'neue Antwort im Thema: "'.$topic_alerts_row['topic'].'"', $text); debug ($topic_alerts_row['email']); } db_query("DELETE FROM prefix_topic_alerts WHERE tid = ".$tid); # topic alert insert wenn gewaehlt. if (!empty($_POST['topic_alert']) AND $_POST['topic_alert'] == 'yes' AND loggedin()) { if (0 == db_result(db_query("SELECT COUNT(*) FROM prefix_topic_alerts WHERE uid = ".$_SESSION['authid']." AND tid = ".$tid),0)) { db_query("INSERT INTO prefix_topic_alerts (tid,uid) VALUES (".$tid.", ".$_SESSION['authid'].")"); } } # topic alert ende #Datei hochladen wenn gewählt $urlw=''; if ( loggedin() AND is_writeable ( 'include/downs/forumloads' ) ) { $finsert = true; $uinsert = true; $url = ( empty($_POST['url']) ? '' : escape($_POST['url'],'string') ); if ( !empty ($_FILES['file']['name']) ) { $uinsert = false; $type = $_FILES['file']['type']; $fname = escape($_FILES['file']['name'],'string'); $fname = str_replace(' ','',$fname); if ( $type == 'application/zip' OR $type == 'application/rar' OR $type == 'application/x-rar-compressed' OR $type == 'application/x-zip-compressed' OR $type == 'application/x-rar' OR $type == 'application/x-zip' OR $type == 'application/octet-stream' ) { if ( $_FILES['file']['size'] <= 2097000 ) { # 2 mb (2 097 152) if ( !file_exists( 'include/downs/forumloads/'.$fname ) ) { if ( move_uploaded_file($_FILES['file']['tmp_name'], 'include/downs/forumloads/'.$fname) ) { $uinsert = true; $url = 'include/downs/forumloads/'.$fname; } } else { $exists = true; } } } } else { if ( empty($url) ) { $finsert = false; } } if ( $finsert AND $uinsert ) { $urlw=$url; $pid = db_last_id(); db_query ("INSERT INTO `prefix_posts` (tid,fid,erst,erstid,time,txt,url) VALUES ( ".$tid.", ".$fid.", '".$erst."', ".$uid.", ".$time.", '".$txt."','".$urlw."')"); db_query("UPDATE `prefix_topics` SET last_post_id = ".$pid.", rep = rep + 1 WHERE id = ".$tid); db_query("UPDATE `prefix_forums` SET posts = posts + 1, last_post_id = ".$pid." WHERE id = ".$fid ); //Forumex - begin FE_CreateVote($pid,$txt); //Forumex - end $page = ceil ( ($aktTopicRow['rep']+1) / $allgAr['Fpanz'] ); # toipc als gelesen markieren $_SESSION['forumSEE'][$fid][$tid] = time(); wd ( array ( $lang['backtotopic'] => 'index.php?forum-showposts-'.$tid.'-p'.$page.'#'.$pid, $lang['backtotopicoverview'] => 'index.php?forum-showtopics-'.$fid ) , $lang['createpostsuccessful'] , 3 ); } elseif (!$finsert AND $uinsert){ $pid = db_last_id(); db_query ("INSERT INTO `prefix_posts` (tid,fid,erst,erstid,time,txt,url) VALUES ( ".$tid.", ".$fid.", '".$erst."', ".$uid.", ".$time.", '".$txt."','')"); db_query("UPDATE `prefix_topics` SET last_post_id = ".$pid.", rep = rep + 1 WHERE id = ".$tid); db_query("UPDATE `prefix_forums` SET posts = posts + 1, last_post_id = ".$pid." WHERE id = ".$fid ); $page = ceil ( ($aktTopicRow['rep']+1) / $allgAr['Fpanz'] ); # toipc als gelesen markieren $_SESSION['forumSEE'][$fid][$tid] = time(); wd ( array ( $lang['backtotopic'] => 'index.php?forum-showposts-'.$tid.'-p'.$page.'#'.$pid, $lang['backtotopicoverview'] => 'index.php?forum-showtopics-'.$fid ) , $lang['createpostsuccessful'] , 3 ); } else { ?> Es ist ein Fehler aufgetreten!

- Folgende Felder sind Pflicht:
- - Link oder Upload Datei

- Wenn eine Datei hochgeladen wird:
- - Die Datei darf NICHT grösser als 2 MBytes sein.
- - Die Datei darf nur die Endungen: .zip oder .rar haben.

Grund für den Abbruch: Die Datei existiert bereits und kann nicht überschrieben werden.
'; } } } } $design->footer(); ?>