コード例 #1
0
ファイル: comment_new.php プロジェクト: severnaya99/Sg-2010
//  the Free Software Foundation; either version 2 of the License, or        //
//  (at your option) any later version.                                      //
//                                                                           //
//  You may not change or alter any portion of this comment or credits       //
//  of supporting developers from this source code or any supporting         //
//  source code which is considered copyrighted (c) material of the          //
//  original comment or credit authors.                                      //
//                                                                           //
//  This program is distributed in the hope that it will be useful,          //
//  but WITHOUT ANY WARRANTY; without even the implied warranty of           //
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            //
//  GNU General Public License for more details.                             //
//                                                                           //
//  You should have received a copy of the GNU General Public License        //
//  along with this program; if not, write to the Free Software              //
//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA //
//  ------------------------------------------------------------------------ //
include '../../mainfile.php';
include_once XOOPS_ROOT_PATH . '/modules/AMS/class/class.newsstory.php';
$com_itemid = isset($_GET['com_itemid']) ? intval($_GET['com_itemid']) : 0;
if ($com_itemid > 0) {
    $article = new AmsStory($com_itemid);
    $article->uname();
    $com_replytext = _POSTEDBY . '&nbsp;<b>' . $article->uname . '</b>&nbsp;' . _DATE . '&nbsp;<b>' . formatTimestamp($article->published()) . '</b><br /><br />' . $article->hometext();
    $bodytext = $article->bodytext();
    if ($bodytext != '') {
        $com_replytext .= '<br /><br />' . $bodytext . '';
    }
    $com_replytitle = $article->title();
    include XOOPS_ROOT_PATH . '/include/comment_new.php';
}
コード例 #2
0
ファイル: submit.php プロジェクト: severnaya99/Sg-2010
     if (!isset($_POST['approve'])) {
         $story->setApproved(0);
     } else {
         $story->setApproved($_POST['approve']);
     }
 } else {
     $story->setNohtml = 1;
 }
 //Display breadcrumbs
 if ($edit) {
     echo $story->getPath(true) . " > " . _EDIT . " " . $story->title();
 }
 //Display post preview
 $p_title = $story->title("Preview");
 $p_hometext = $story->hometext("Preview");
 $p_hometext .= "<br />" . $story->bodytext("Preview");
 $topversion = $story->revision == 0 && $story->revisionminor == 0 ? 1 : 0;
 $topicalign = isset($story->topicalign) ? 'align="' . $story->topicalign() . '"' : "";
 $p_hometext = $xt->topic_imgurl() != '' && $story->topicdisplay() ? '<img src="images/topics/' . $xt->topic_imgurl() . '" ' . $story->topicalign() . ' alt="" />' . $p_hometext : $p_hometext;
 //Added  in AMS 2.50 Final. replace deprecated themecenterposts function
 if (file_exists(XOOPS_ROOT_PATH . "/Frameworks/xoops22/class/xoopsformloader.php")) {
     if (!@(include_once XOOPS_ROOT_PATH . "/Frameworks/xoops22/class/xoopsformloader.php")) {
         include_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php";
     }
 } else {
     include_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php";
 }
 $pform = new XoopsThemeForm($p_title, "previewform", XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/submit.php');
 $pform->display();
 print "{$p_hometext}";
 $story->uname();