Exemple #1
0
  				$news->setExpired($article['expired']);
  				$news->setHostname($article['hostname']);
  				$news->setNohtml($article['nohtml']);
  				$news->setNosmiley($article['nosmiley']);
  				$news->setHometext($text_lastversion['hometext']);
  				$news->setBodytext($text_lastversion['bodytext'].$links.$forum);
  				$news->Setkeywords('');
  				$news->Setdescription('');
  				$news->counter=$article['counter'];
  				$news->setTopicId($news_topicid);
  				$news->setIhome($article['ihome']);
  				$news->setNotifyPub($article['notifypub']);
  				$news->story_type=$article['story_type'];
  				$news->setTopicdisplay($article['topicdisplay']);
  				$news->setTopicalign($article['topicalign']);
  				$news->setComments($article['comments']);
  				$news->rating=$article['rating'];
  				$news->votes=$votes['cpt'];
  				$approved = $article['published']>0 ? true : false;
  				$news->approved=$approved;
  				$news->store($approved);
  				echo '<br>&nbsp;&nbsp;This story was imported : '.$news->title();
  				$news_newsid=$news->storyid();	// ********************

  				// The files
				$result4 = $db->query('SELECT * FROM '.$ams_files.' WHERE storyid='.$ams_newsid);
				while ( $file = $db->fetchArray($result4) ) {
					$sfile = new nw_sFiles();
  					$sfile->setFileRealName($file['filerealname']);
  					$sfile->setStoryid($news_newsid);
  					$sfile->date=$file['date'];