Beispiel #1
0
                $new_story->setVar('published', $story['published']);
                $new_story->setVar('expired', $story['expired']);
                $new_story->setVar('hostname', $story['hostname']);
                $new_story->setVar('html', $html);
                $new_story->setVar('br', 1);
                $new_story->setVar('smiley', $smiley);
                $new_story->setVar('xcode', 1);
                $new_story->setVar('hometext', $story['hometext']);
                $new_story->setVar('bodytext', $story['bodytext']);
                $new_story->setVar('counter', $story['counter']);
                $new_story->setVar('topicid', $story['topicid']);
                $new_story->setVar('ihome', $ihome);
                $new_story->setVar('type', $type);
                $new_story->setVar('topicimg', $topicimg);
                $new_story->setVar('comments', $story['comments']);
                if ($new_story->store()) {
                    echo '<br />Story "' . htmlspecialchars($story['title']) . '" was successfully converted : ' . $new_story->getVar('storyid');
                } else {
                    echo '<br /><b>Failed to convert : ' . htmlspecialchars($story['title']) . '</b>';
                }
            }
            echo '<br /><a href="index.php">' . _BACK . '</a>';
        }
        break;
}
$credit = _AM_CREDIT;
$translater = _AM_TRANSLATER;
$assing_global = array('ADMENU7' => constant($constpref . '_ADMENU7'), 'ADMENU2' => constant($constpref . '_ADMENU2'), 'ADMENU4' => constant($constpref . '_ADMENU4'), 'ADMENU5' => constant($constpref . '_ADMENU5'), 'imagelocation' => sprintf(_AM_IMGNAEXLOC, str_replace(XOOPS_ROOT_PATH, XOOPS_URL, $xoopsModuleConfig['topicon_path'])), 'imagebase' => basename(str_replace(XOOPS_ROOT_PATH, XOOPS_URL, $xoopsModuleConfig['topicon_path'])), 'imagedirname' => dirname(str_replace(XOOPS_ROOT_PATH, XOOPS_URL, $xoopsModuleConfig['topicon_path'])), 'credit' => $myts->previewTarea($credit, 0, 1, 0, 0, 0), 'translater' => $myts->previewTarea($translater, 0, 1, 0, 0, 0), 'admin_title' => sprintf(_AM_CONFIG, $xoopsModule->name()), 'xoops_url' => XOOPS_URL, 'template_path' => $mytrustdirpath . "/admin/templates", 'mydirurl' => $mydirurl);
$tpl->assign($assing_global);
if (!empty($asssigns)) {
    $tpl->assign($asssigns);
Beispiel #2
0
			$story->setVar('published', $time);
		}

		// Routines set end date published
		if ( $story->getVar('autoexpdate') == 1 ){
			$expdate = mktime( $autoexp['hour'], $autoexp['min'], $autoexp['sec'], $autoexp['month'], $autoexp['day'], $autoexp['year'] );
			if ( !empty( $autoexpdate ) ) $offset = $xoopsUser -> timezone() - $xoopsConfig['server_TZ'];
			$expdate = $expdate - ( $offset * 3600 );
			$story->setVar('expired', $expdate);
		} else {
			$story->setVar('expired', 0);
		}
		$is_new = false;
	}
	//If an error occurs when inserting DB
	if(!$story->store()) {
		die(_MD_THANKS_BUT_ERROR);
	}

	// relation
	if( $gperm->group_perm(7) && $bulletin_use_relations ){
		$story->relation->storyid = $story->getVar('storyid');
		$story->relation->cleanup();
		$story->relation->store($relations);
	}

	if( $is_new ){
		// Event notification process
		$notification_handler =& xoops_gethandler('notification');
		$tags = array();
		$tags['STORY_NAME'] = $myts->stripSlashesGPC($story->getVar('title', 'n'));