isAdministrator() && strlen($_P['subject'])>0){ $forum->forumid=0; $forum->forumurltitle='nieuws'; if($_P['action']=='post' && $_P['nonce']==$currentUser->getNonce()){ $topictitle=$_POST['subject']; $topicurltitle=formatVar($topictitle); if(is_numeric($topicurltitle)) $topicurltitle='nr-'.$topicurltitle; if(strlen($topicurltitle)==0){ $submit=false; } //$topicurltitle='geen-titel'; $topicResult=mq('SELECT * FROM `'.DB_TABLE_NAME.'-topics` WHERE forumid="'.$forum->forumid.'" AND topicurltitle LIKE "'.$topicurltitle.'";'); $i=0; $k=''; while(mysql_fetch_object($topicResult)){ $i++; $k='-'.$i; $topicResult=mq('SELECT * FROM `'.DB_TABLE_NAME.'-topics` WHERE forumid="'.$forum->forumid.'" AND topicurltitle LIKE "'.$topicurltitle.$k.'";'); } $topicurltitle.=$k; $ip=$_SERVER['REMOTE_ADDR']; if($submit){ //echo 'INSERT INTO `'.DB_TABLE_NAME.'-topics` VALUES("","'.addslashes($topictitle).'","'.$topicurltitle.'",0,'.$currentUser->getUserid().',"'.$ip.'",0,NOW(),"");'; mq('INSERT INTO `'.DB_TABLE_NAME.'-topics` VALUES("","'.addslashes($topictitle).'","'.$topicurltitle.'",0,'.$currentUser->getUserid().',"'.$ip.'",0,"'.date('Y-m-d H:i:s').'","'.date('Y-m-d H:i:s').'","",1,0,0,0,0,"");') or die('1'.mysql_error()); $parentid=mysql_insert_id(); if($currentUser->isAdministrator) echo 'INSERT INTO `'.DB_TABLE_NAME.'-posts` VALUES ("",'.$parentid.',"'.addslashes($_POST['post']).'","'.date('Y-m-d H:i:s').'","0000-00-00",'.$currentUser->getUserid().',"'.$ip.'",0,0);'; mq('INSERT INTO `'.DB_TABLE_NAME.'-posts` VALUES ("",'.$parentid.',"'.addslashes($_POST['post']).'","'.date('Y-m-d H:i:s').'","0000-00-00",'.$currentUser->getUserid().',"'.$ip.'",0,0,"",'.$postvideos.','.$postimages.');') or die('2'.mysql_error()); //mq('INSERT INTO `'.DB_TABLE_NAME.'-posts` VALUES ("",'.$topic->topicid.',"'.addslashes($_POST['post']).'",NOW(),"0000-00-00",'.$currentUser->getUserid().',"'.$ip.'",0,0);'); curl_post_async('http://'.$_SERVER["SERVER_NAME"].'/localalltopics.php',array('cacheuserid' => 1)); cacheSidebarNews(); cacheSidebarHotlist(); header('location: http://'.$_SERVER["SERVER_NAME"].'/nieuws/'.$topicurltitle.'/'); exit; }else{ $pageBody='Ongeldige titel'; include "layout.php"; exit; } } $pageBody='
Forum > '.$forum->forumtitle.'

Nieuw nieuwsbericht aanmaken

'; }else{ //$forumResult=mq('SELECT * FROM `'.DB_TABLE_NAME.'-forums` WHERE forumurltitle LIKE "'.$_G['forum'].'";'); /*if(!$forum=mysql_fetch_object($forumResult)){ $pageBody='forum niet gevonden'; include "layout.php"; exit; }*/ // print_r($forum); if($_P['action']=='post' && strlen($_P['subject'])>0){ //echo "newtopic"; //echo "newtopic"; $topictitle=$_POST['subject']; $topicurltitle=formatVar($topictitle); if(is_numeric($topicurltitle)) $topicurltitle='nr-'.$topicurltitle; if(strlen($topicurltitle)==0) $topicurltitle='geen-titel'; $topicResult=mq('SELECT * FROM `'.DB_TABLE_NAME.'-topics` WHERE forumid="'.$forum->forumid.'" AND topicurltitle LIKE "'.$topicurltitle.'";'); $i=0; $k=''; while(mysql_fetch_object($topicResult)){ $i++; $k='-'.$i; $topicResult=mq('SELECT * FROM `'.DB_TABLE_NAME.'-topics` WHERE forumid="'.$forum->forumid.'" AND topicurltitle LIKE "'.$topicurltitle.$k.'";'); } $topicurltitle.=$k; $ip=$_SERVER['REMOTE_ADDR']; //echo 'INSERT INTO `'.DB_TABLE_NAME.'-topics` VALUES("","'.addslashes($topictitle).'","'.$topicurltitle.'",'.$forum->forumid.','.$currentUser->getUserid().',"'.$ip.'",0,NOW());'; $forum->forumid=99; $f=0; if(is_numeric($_P['label'])) $labelnr=$_P['label']; if($labelnr>0) $label=$labels[$labelnr-1]; if($labelnr<6) $category='Muziek'; else if($labelnr<9) $category='Film & TV'; else if($labelnr<10) $category='Games'; else if($labelnr<13) $category='Gadgets'; else if($labelnr<20) $category='Lifestyle'; else if($labelnr<27) $category='Random'; else if($labelnr<31) $category='Evenementen'; $f=$labelnr; /* if ($_P['label']=='Algemeen') { $f=1; } elseif ($_P['label']=='Muziek') { $f=2; } elseif ($_P['label']=='Sport') { $f=3; } elseif ($_P['label']=='Hiphop') { $f=4; } elseif ($_P['label']=='FA2') { $f=5; } elseif ($_P['label']=='Games') { $f=6; } elseif ($_P['label']=='Members Only') { $f=7; } elseif ($_P['label']=='Mode') { $f=8; } elseif ($_P['label']=='Dance') { $f=9; } elseif ($_P['label']=='Film & TV') { $f=10; } elseif ($_P['label']=='Vraag') { $f=11; } elseif ($_P['label']=='XXX') { $f=12; } elseif ($_P['label']=='Culinair') { $f=13; } elseif ($_P['label']=='Carrière') { $f=14; } elseif ($_P['label']=='Produceren') { $f=15; } elseif ($_P['label']=='Demo') { $f=16; } elseif ($_P['label']=='Art') { $f=17; } elseif ($_P['label']=='Literatuur') { $f=18; } elseif ($_P['label']=='Computers') { $f=19; } elseif ($_P['label']=='Telefonie') { $f=20; } elseif ($_P['label']=='Reizen') { $f=21; } elseif ($_P['label']=='Markt') { $f=22; }*/ $forum->forumid=$f; if(strlen($category)>1 && strlen($label)>1){ //$category=$_P['category']; //$category=str_replace('&amp;','&',$category); if($_P['label']!='XXX'){ include_once "img.php"; $_POST['post'] = trim(preg_replace_callback("#([ \n\r])(http://[^ \n\r]*?(\.jpg|\.jpeg)((\?[^ \n\r]*)?))((\#[^ \n\r]*)?)([ \n\r])#is", 'postImages', ' '.$_POST['post'].' ')); } mq('INSERT INTO `'.DB_TABLE_NAME.'-topics` VALUES("","'.addslashes($topictitle).'","'.$topicurltitle.'",'.$forum->forumid.','.$currentUser->getUserid().',"'.$ip.'",0,"'.date('Y-m-d H:i:s').'","'.date('Y-m-d H:i:s').'","",1,0,0,0,0,"","'.$category.'","'.$label.'");'); // mq('INSERT INTO `'.DB_TABLE_NAME.'-topics` VALUES("","'.addslashes($topictitle).'","'.$topicurltitle.'",'.$forum->forumid.','.$currentUser->getUserid().',"'.$ip.'",0,"'.date('Y-m-d H:i:s').'","'.date('Y-m-d H:i:s').'","",1,0,0,0,0,"","'.$category.'","'.$_P['label'].'");'); $parentid=mysql_insert_id(); mq('INSERT INTO `'.DB_TABLE_NAME.'-posts` VALUES ("",'.$parentid.',"'.addslashes($_POST['post']).'","'.date('Y-m-d H:i:s').'","0000-00-00",'.$currentUser->getUserid().',"'.$ip.'",0,0,"",'.$postvideos.','.$postimages.');'); cacheSidebarHotlist(); header('location: http://'.$_SERVER["SERVER_NAME"].'/'.formatVar($_P['label']).'/'.$parentid.'/'.$topicurltitle.'/'); exit; } } // $topicResult=mq('SELECT * FROM `'.DB_TABLE_NAME.'-topics` WHERE forumid="'.$forum->forumid.'" ORDER BY lastpost DESC;'); // $pageBody='

Nieuw topic


Categorie:

Titel:



Bericht:




'; } if($currentUser->isAdministrator()) include "layout3.php"; else include "layout.php"; ?>