コード例 #1
0
ファイル: submit.php プロジェクト: severnaya99/Sg-2010
             $xoopsMailer->setBody($body);
             $xoopsMailer->send();
         }
     } else {
         echo 'error';
     }
     redirect_header("index.php", 2, _WFS_THANKS);
     break;
 case "edit":
     include_once XOOPS_ROOT_PATH . "/modules/" . $xoopsModule->dirname() . "/class/wfscategory.php";
     include_once XOOPS_ROOT_PATH . "/modules/" . $xoopsModule->dirname() . "/class/wfsarticle.php";
     $story = new WfsArticle('articleid');
     $subject = $story->title();
     $message = $story->mainText();
     $summary = $story->summary("Edit");
     $url = $story->url();
     $urlname = $story->urlname();
     //$story->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->setGroupid($groupid);
     //$story->setNosmiley($nosmiley);
     //$story->setPublished(0);
     //$story->setExpired(0);
     //$story->setNotifyPub($notifypub);
     //$story->setType('user');
     $xt = new WfsCategory($xoopsDB->prefix("wfs_article "), 14);
コード例 #2
0
ファイル: article.php プロジェクト: severnaya99/Sg-2010
 }
 if ($page == -2) {
     $page = 0;
 }
 $articletag['maintext'] = $article->maintextWithFile("S", $page);
 if ($article->ishtml != '0' && $article->htmlpage()) {
     $maintextfile = XOOPS_ROOT_PATH . '/' . $wfsConfig['htmlpath'] . '/' . $article->htmlpage;
     if (file_exists($maintextfile) && false !== ($fp = fopen($maintextfile, 'r'))) {
         $articletag['maintext'] = fread($fp, filesize($maintextfile));
         fclose($fp);
     }
 }
 // Setup URL link for article
 $articletag['urllink'] = '&nbsp';
 if ($article->url && !$article->urlname) {
     $articletag['urllink'] = "<a href='http://" . $article->url() . "' target='_blank'>Url Link: " . $article->url() . "</a><br />";
 } elseif ($article->urlname) {
     $articletag['urllink'] = "<a href='http://" . $article->url() . "' target='_blank'>Url Link: " . $article->urlname() . "</a><br />";
 }
 //Downloads links
 $workdir = XOOPS_ROOT_PATH . "/" . $wfsConfig['filesbasepath'];
 $articletag['downloadlink'] = "<table width='100%' cellspacing = 0 cellpadding = '2'>";
 if ($article->getFilesCount() > 0) {
     foreach ($article->files as $file) {
         if (checkAccess($file->groupid)) {
             $filename = $file->getFileRealName();
             $mimetype = new mimetype();
             $mimeshow = $mimetype->getType(XOOPS_ROOT_PATH . "/" . $wfsConfig['filesbasepath'] . "/" . $filename);
             $icon = get_icon($workdir . "/" . $filename);
             if (is_file(XOOPS_ROOT_PATH . "/" . $wfsConfig['filesbasepath'] . "/" . $filename)) {
                 $size = Prettysize(filesize(XOOPS_ROOT_PATH . "/" . $wfsConfig['filesbasepath'] . "/" . $filename));