Ejemplo n.º 1
0
 $story->setUid($uid);
 $story->setCategoryid($id);
 $story->setNohtml($nohtml_db);
 $nosmiley = isset($nosmiley) ? intval($nosmiley) : 0;
 $notifypub = isset($notifypub) ? intval($notifypub) : 0;
 $story->setHtmlpage("");
 $story->setIshtml(0);
 $story->setWeight(100);
 //$story->setGroupid($groupid);
 $story->setGroupid($groupid);
 $story->setNosmiley($nosmiley);
 $story->setPublished(0);
 $story->setExpired(0);
 $story->setNotifyPub($notifypub);
 echo $story->articleid;
 $story->setType('user');
 $upload = new uploadfile($HTTP_POST_VARS['filename']);
 $distfilename = $upload->doUploadToRandumFile(XOOPS_ROOT_PATH . "/" . $wfsConfig['filesbasepath']);
 if ($distfilename) {
     $article = new WfsArticle($story->articleid);
     $file = new WfsFiles();
     $file->setByUploadFile($HTTP_POST_VARS['filename']);
     if (empty($HTTP_POST_VARS['downloadfilename'])) {
         $file->setFileShowName($HTTP_POST_VARS['filename']);
     } else {
         $file->setFileShowName($HTTP_POST_VARS['$downloadfilename']);
     }
     $article->addFile($HTTP_POST_VARS['filename']);
 }
 if ($wfsConfig['autoapprove'] == 1) {
     $approve = 1;