Пример #1
0
     }
 }
 $story = new WfsArticle();
 $story->setTitle($subject);
 $story->setMainText($message);
 $story->setSummary($summary);
 $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 {
Пример #2
0
	themecenterposts($p_subject, $p_message);

	include 'include/storyform.inc.php';
	include XOOPS_ROOT_PATH.'/footer.php';
	break;

// --- post ---
case "post":

	$nosmiley  = isset($nosmiley) ? intval($nosmiley) : 0;

	$article->setTitle($subject);
	$article->setMainText($message);
	$article->setSummary($summary);
	$article->setCategoryid($id);
	$article->setGroupid($groupid);
	$article->setNosmiley($nosmiley);
	$article->setUrl($url);
	$article->setUrlname($urlname);

// no change
//	$article->setNotifyPub($notifypub);
//	$article->setUid($uid);
//	$article->setNohtml($nohtml_db);
//	$article->setHtmlpage("");
//	$article->setIshtml(0);
//	$article->setWeight(100);
//	$article->setPublished(0);
//	$article->setExpired(0);
//	$article->setType('user');
//	$article->setApproved($approve);