本文整理汇总了PHP中XoopsTpl::append方法的典型用法代码示例。如果您正苦于以下问题:PHP XoopsTpl::append方法的具体用法?PHP XoopsTpl::append怎么用?PHP XoopsTpl::append使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XoopsTpl
的用法示例。
在下文中一共展示了XoopsTpl::append方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: renderNestView
/**
* Render comments in nested view
* Danger: Recursive!
*
* @param integer $comment_id Always "0" when called by client.
* @param boolean $admin_view
*/
public function renderNestView($comment_id = 0, $admin_view = false)
{
$xot = new XoopsObjectTree($this->_comments, 'id', 'pid', 'rootid');
$tree = $xot->getTree();
if (false != $this->_useIcons) {
$title = $this->_getTitleIcon($tree[$comment_id]['obj']->getVar('icon')) . ' ' . $tree[$comment_id]['obj']->getVar('title');
} else {
$title = $tree[$comment_id]['obj']->getVar('title');
}
if (false != $admin_view) {
$text = $tree[$comment_id]['obj']->getVar('text') . '<div style="text-align:right; margin-top: 2px; margin-bottom: 0px; margin-right: 2px;">' . _MD_COMMENTS_STATUS . ': ' . $this->_statusText[$tree[$comment_id]['obj']->getVar('status')] . '<br />IP: <span style="font-weight: bold;">' . $tree[$comment_id]['obj']->getVar('ip') . '</span></div>';
} else {
// skip this comment if it is not active and continue on processing its child comments instead
if (COMMENTS_ACTIVE != $tree[$comment_id]['obj']->getVar('status')) {
// if there are any child comments, display them as root comments
if (isset($tree[$comment_id]['child']) && !empty($tree[$comment_id]['child'])) {
foreach ($tree[$comment_id]['child'] as $child_id) {
$this->renderNestView($child_id, $admin_view);
}
}
return;
} else {
$text = $tree[$comment_id]['obj']->getVar('text');
}
}
$replies = array();
$this->_renderNestReplies($tree, $comment_id, $replies, 25, $admin_view);
$this->_tpl->append('comments', array('pid' => $tree[$comment_id]['obj']->getVar('pid'), 'id' => $tree[$comment_id]['obj']->getVar('id'), 'itemid' => $tree[$comment_id]['obj']->getVar('itemid'), 'rootid' => $tree[$comment_id]['obj']->getVar('rootid'), 'title' => $title, 'text' => $text, 'date_posted' => XoopsLocale::formatTimestamp($tree[$comment_id]['obj']->getVar('created'), 'm'), 'date_modified' => XoopsLocale::formatTimestamp($tree[$comment_id]['obj']->getVar('modified'), 'm'), 'poster' => $this->_getPosterArray($tree[$comment_id]['obj']->getVar('uid')), 'replies' => $replies));
}
示例2: previewPostcard
/**
* @desc Muestra una previsualización de la postal
*/
function previewPostcard()
{
global $tpl, $xoopsModule, $xoopsModuleConfig, $xoopsModuleConfig, $mc, $xoopsUser, $xoopsConfig;
include_once XOOPS_ROOT_PATH . '/class/template.php';
$tpl = new XoopsTpl();
$mc =& $xoopsModuleConfig;
include_once RMCPATH . '/class/form.class.php';
foreach ($_POST as $k => $v) {
if ($k == 'sbt' || $k == 'op') {
continue;
}
${$k} = $v;
$ele = new RMFormHidden($k, $v);
$tpl->append('hiddens', $ele->render());
}
if (!$xoopsUser) {
redirect_header(XOOPS_URL . '/user.php#register', 1, __('You must be a registered user in order to send postcards!', 'galleries'));
die;
}
$img = new GSImage($img);
if ($img->isNew()) {
redirect_header(GSfunctions::get_url(), 1, __('Specified image does not exists!', 'galleries'));
die;
}
$user = new GSUser($img->owner(), 1);
$file = $user->filesPath() . '/' . $img->image();
list($ancho, $alto) = getimagesize($file);
$tpl->assign('gs_url', GSFunctions::get_url());
$tpl->assign('img', array('id' => $img->id(), 'width' => $ancho, 'height' => $alto, 'url' => $user->filesURL() . '/' . $img->image(), 'link' => $user->userURL() . 'img/' . $img->id() . '/'));
$tpl->assign('title', $title);
$tpl->assign('message', $msg);
$tpl->assign('lang_says', sprintf(__('%s Says:', 'galleries'), $fname));
$tpl->assign('xoops_pagetitle', sprintf(__('Preview "%s" postcard', 'galleries'), $title) . ' » ' . $mc['section_title']);
$tpl->assign('lang_see', __('View picture', 'galleries'));
$tpl->assign('user_link', $user->userURL() . 'browse/' . $img->id() . '/');
$tpl->assign('lang_seeuser', __('View user pictures', 'galleries'));
$tpl->assign('preview', 1);
$tpl->assign('lang_submit', __('Send Postcard', 'galleries'));
$tpl->assign('lang_edit', __('Edit Postcard', 'galleries'));
$tpl->assign('postcard_link', base64_decode($return));
$sendlink = GSfunctions::get_url() . ($mc['urlmode'] ? 'postcard/send/img/' . $img->id() : '?postcard=send&img=' . $img->id());
$tpl->assign('captcha', RMEvents::get()->run_event('rmcommon.recaptcha.field'));
RMTemplate::get()->add_xoops_style('postcard.css', 'galleries');
$tpl->assign('send_link', $sendlink);
echo $tpl->fetch("db:gs_postcard.html");
}
示例3: formatTimestamp
$tpl->assign('channel_lastbuild', formatTimestamp(time(), 'rss'));
$tpl->assign('channel_webmaster', checkEmail($xoopsConfig['adminmail'], true));
// Fed up with spam
$tpl->assign('channel_editor', checkEmail($xoopsConfig['adminmail'], true));
// Fed up with spam
$tpl->assign('channel_category', htmlspecialchars($xt->topic_title(), ENT_QUOTES));
$tpl->assign('channel_generator', 'XOOPS');
$tpl->assign('channel_language', _LANGCODE);
$tpl->assign('image_url', XOOPS_URL . '/images/logo.gif');
$dimention = getimagesize(XOOPS_ROOT_PATH . '/images/logo.gif');
if (empty($dimention[0])) {
$width = 88;
} else {
$width = $dimention[0] > 144 ? 144 : $dimention[0];
}
if (empty($dimention[1])) {
$height = 31;
} else {
$height = $dimention[1] > 400 ? 400 : $dimention[1];
}
$tpl->assign('image_width', $width);
$tpl->assign('image_height', $height);
$count = $sarray;
foreach ($sarray as $story) {
$storytitle = htmlspecialchars($story->title(), ENT_QUOTES);
$description = htmlspecialchars($story->hometext(), ENT_QUOTES);
$tpl->append('items', array('title' => xoops_utf8_encode($storytitle), 'link' => XOOPS_URL . '/modules/news/article.php?storyid=' . $story->storyid(), 'guid' => XOOPS_URL . '/modules/news/article.php?storyid=' . $story->storyid(), 'pubdate' => formatTimestamp($story->published(), 'rss'), 'description' => xoops_utf8_encode($description)));
}
}
}
$tpl->display('db:news_rss.html', $topicid);
示例4: formatTimestamp
$tpl->assign('channel_link', XOOPS_URL . '/');
$tpl->assign('channel_desc', xoops_utf8_encode($slogan));
$tpl->assign('channel_lastbuild', formatTimestamp(time(), 'rss'));
$tpl->assign('channel_webmaster', xoops_utf8_encode($email));
$tpl->assign('channel_editor', xoops_utf8_encode($email));
$tpl->assign('channel_category', xoops_utf8_encode($categoryTitle));
$tpl->assign('channel_generator', xoops_utf8_encode(oledrion_utils::getModuleName()));
$tpl->assign('channel_language', _LANGCODE);
$tpl->assign('image_url', XOOPS_URL . '/images/logo.png');
$dimention = getimagesize(XOOPS_ROOT_PATH . '/images/logo.png');
if (empty($dimention[0])) {
$width = 88;
} else {
$width = $dimention[0] > 144 ? 144 : $dimention[0];
}
if (empty($dimention[1])) {
$height = 31;
} else {
$height = $dimention[1] > 400 ? 400 : $dimention[1];
}
$tpl->assign('image_width', $width);
$tpl->assign('image_height', $height);
$products = $h_oledrion_products->getRecentProducts(new oledrion_parameters(array('start' => 0, 'limit' => $limit, 'category' => $cat_cid)));
foreach ($products as $item) {
$title = htmlspecialchars($item->getVar('product_title'), ENT_QUOTES);
$description = htmlspecialchars(strip_tags($item->getVar('product_summary')), ENT_QUOTES);
$link = $item->getLink();
$tpl->append('items', array('title' => xoops_utf8_encode($title), 'link' => $link, 'guid' => $link, 'pubdate' => formatTimestamp($item->getVar('product_submitted'), 'rss'), 'description' => xoops_utf8_encode($description)));
}
}
$tpl->display('db:oledrion_rss.tpl', $cat_cid);
示例5: easiestml
$height = ($dimention[1] > 400) ? 400 : $dimention[1];
}
$tpl->assign('image_width', $width);
$tpl->assign('image_height', $height);
$count = $articles;
foreach ($articles as $article) {
$content4html = $article->getVar('hometext') . $article->getDividedBodytext() ;
$hometext = $article->getVar('hometext','n') ;
if( function_exists( 'easiestml' ) ) {
$content4html = easiestml( $content4html ) ;
$hometext = easiestml( $hometext ) ;
}
$tpl->append('items', array(
'title' => htmlspecialchars(bulletin_utf8_encode($article->getVar('title', 'n')), ENT_QUOTES),
'category' => htmlspecialchars(bulletin_utf8_encode($article->newstopic->topic_title), ENT_QUOTES),
'link' => $mydirurl.'/index.php?page=article&storyid='.$article->getVar('storyid'),
'guid' => $mydirurl.'/index.php?page=article&storyid='.$article->getVar('storyid'),
// 'pubdate' => formatTimestamp($article->getVar('published'), 'rss'),
'pubdate' => date( 'r' , $article->getVar('published') ) , // GIJ
'description' => bulletin_utf8_encode(htmlspecialchars(strip_tags($myts->xoopsCodeDecode($hometext)), ENT_QUOTES)),
'content' => bulletin_utf8_encode($content4html),
) ) ;
}
}
}
header ('Content-Type:text/xml; charset=utf-8');
$tpl->display("db:{$mydirname}_rss.html");
?>
示例6: htmlspecialchars
$width = 88;
} else {
$width = ($dimention[0] > 144) ? 144 : $dimention[0];
}
if (empty($dimention[1])) {
$height = 31;
} else {
$height = ($dimention[1] > 400) ? 400 : $dimention[1];
}
$tpl->assign('image_width', $width);
$tpl->assign('image_height', $height);
$count = $sarray;
foreach ($sarray as $story) {
$storytitle = $story->title();
//if we are allowing html, we need to use htmlspecialchars or any bug will break the output
$description = htmlspecialchars($story->hometext());
// DNPROSSI SEO
$seo_enabled = nw_getmoduleoption('nw_seo_enable', NW_MODULE_DIR_NAME);
if ( $seo_enabled == 1 ) {
$item_number = strtolower(str_replace(" ", "-", $storytitle));
$tpl->append('items', array('title' => xoops_utf8_encode($storytitle), 'link' => NW_MODULE_URL . '/articles.item.' . $story->storyid() . '/' . $item_number . '.html', 'guid' => NW_MODULE_URL . '/article.php?storyid=' . $story->storyid(), 'pubdate' => formatTimestamp($story->published(), 'rss'), 'description' => xoops_utf8_encode($description)));
} else {
$tpl->append('items', array('title' => xoops_utf8_encode($storytitle), 'link' => NW_MODULE_URL . '/article.php?storyid=' . $story->storyid(), 'guid' => NW_MODULE_URL . '/article.php?storyid=' . $story->storyid(), 'pubdate' => formatTimestamp($story->published(), 'rss'), 'description' => xoops_utf8_encode($description)));
}
}
}
}
$tpl->display('db:nw_news_rss.html', $topicid);
?>
示例7: count
}
$imgcount = count($images);
$max = $imgcount > 10 ? 10 : $imgcount;
for ($i = 0; $i < $max; $i++) {
if ($storetype == 'db') {
$lcode = '[img align=left id=' . $images[$i]->getVar('image_id') . ']' . $images[$i]->getVar('image_nicename') . '[/img]';
$code = '[img align=center id=' . $images[$i]->getVar('image_id') . ']' . $images[$i]->getVar('image_nicename') . '[/img]';
$rcode = '[img align=right id=' . $images[$i]->getVar('image_id') . ']' . $images[$i]->getVar('image_nicename') . '[/img]';
$src = XOOPS_URL . "/image.php?id=" . $images[$i]->getVar('image_id');
} else {
$lcode = '[img align=left]' . XOOPS_UPLOAD_URL . '/' . $images[$i]->getVar('image_name') . '[/img]';
$code = '[img align=center]' . XOOPS_UPLOAD_URL . '/' . $images[$i]->getVar('image_name') . '[/img]';
$rcode = '[img align=right]' . XOOPS_UPLOAD_URL . '/' . $images[$i]->getVar('image_name') . '[/img]';
$src = XOOPS_UPLOAD_URL . '/' . $images[$i]->getVar('image_name');
}
$xoopsTpl->append('images', array('id' => $images[$i]->getVar('image_id'), 'nicename' => $images[$i]->getVar('image_nicename'), 'mimetype' => $images[$i]->getVar('image_mimetype'), 'src' => $src, 'lxcode' => $lcode, 'xcode' => $code, 'rxcode' => $rcode));
}
if ($total > 10) {
include_once XOOPS_ROOT_PATH . '/class/pagenav.php';
$nav = new XoopsPageNav($total, 10, $start, 'start', 'target=' . $target . '&cat_id=' . $catshow);
$xoopsTpl->assign('pagenav', $nav->renderNav());
}
} else {
$xoopsTpl->assign('image_total', 0);
}
}
$xoopsTpl->assign('xsize', 600);
$xoopsTpl->assign('ysize', 400);
} else {
$xoopsTpl->assign('xsize', 400);
$xoopsTpl->assign('ysize', 180);
示例8: switch
continue;
}
$xoopsTpl->assign_by_ref('block', $bresult);
$bcontent =& $xoopsTpl->fetch('db:' . $btpl, 'blk_' . $block_arr[$i]->getVar('bid'));
$xoopsTpl->clear_assign('block');
} else {
$xoopsLogger->addBlock($block_arr[$i]->getVar('name'), true, $bcachetime);
$bcontent =& $xoopsTpl->fetch('db:' . $btpl, 'blk_' . $block_arr[$i]->getVar('bid'));
}
switch ($block_arr[$i]->getVar('side')) {
case XOOPS_SIDEBLOCK_LEFT:
if (!isset($show_lblock)) {
$xoopsTpl->assign('xoops_showlblock', 1);
$show_lblock = 1;
}
$xoopsTpl->append('xoops_lblocks', array('title' => $block_arr[$i]->getVar('title'), 'content' => $bcontent));
break;
case XOOPS_CENTERBLOCK_LEFT:
if (!isset($show_cblock)) {
$xoopsTpl->assign('xoops_showcblock', 1);
$show_cblock = 1;
}
$xoopsTpl->append('xoops_clblocks', array('title' => $block_arr[$i]->getVar('title'), 'content' => $bcontent));
break;
case XOOPS_CENTERBLOCK_RIGHT:
if (!isset($show_cblock)) {
$xoopsTpl->assign('xoops_showcblock', 1);
$show_cblock = 1;
}
$xoopsTpl->append('xoops_crblocks', array('title' => $block_arr[$i]->getVar('title'), 'content' => $bcontent));
break;
示例9: getimagesize
//$tpl->assign('channel_webmaster', $xoopsConfig['adminmail']);
//$tpl->assign('channel_editor', $xoopsConfig['adminmail']);
$tpl->assign('channel_category', encoding_set(htmlspecialchars(_BL_BLOG, ENT_QUOTES), 'UTF-8'));
$tpl->assign('channel_generator', encoding_set(htmlspecialchars($xoopsModule->name(), ENT_QUOTES), 'UTF-8'));
$tpl->assign('channel_language', _LANGCODE);
$tpl->assign('image_url', $xoopsModuleConfig['imgurl']);
$dimention = ini_get('allow_url_fopen') ? getimagesize($xoopsModuleConfig['imgurl']) : "";
if (empty($dimention[0])) {
$width = 88;
} else {
$width = $dimention[0] > 144 ? 144 : $dimention[0];
}
if (empty($dimention[1])) {
$height = 31;
} else {
$height = $dimention[1] > 400 ? 400 : $dimention[1];
}
$tpl->assign('image_width', $width);
$tpl->assign('image_height', $height);
$results = $weblog->getEntries(0, $user_id, 0, $max);
foreach ($results as $entryObject) {
$item['title'] = $myts->makeTboxData4Show(encoding_set($entryObject->getVar('title', 'e'), 'UTF-8'));
$item['link'] = sprintf('%s/modules/%s/details.php?blog_id=%d', XOOPS_URL, $xoopsModule->dirname(), $entryObject->getVar('blog_id'));
$item['guid'] = sprintf('%s/modules/%s/details.php?blog_id=%d', XOOPS_URL, $xoopsModule->dirname(), $entryObject->getVar('blog_id'));
$item['pubdate'] = date($format_timestamp, $entryObject->getVar('created')) . " " . $timezone;
$description = $entryObject->getVar('contents', 's', $entryObject->getVar('blog_id'), "rss");
$item['description'] = encoding_set(htmlspecialchars(strip_tags($description), ENT_QUOTES), 'UTF-8');
$tpl->append('items', $item);
}
header('Content-type: application/xml; charset=utf-8');
$tpl->display('db:weblog_rss.html');
示例10: XoopsPageNav
$tpages++;
}
$pactual = $page + 1;
if ($pactual > $tpages) {
$rest = $pactual - $tpages;
$pactual = $pactual - $rest + 1;
$start = ($pactual - 1) * $limit;
}
if ($tpages > 1) {
$nav = new XoopsPageNav($num, $limit, $start, 'pag', 'limit=' . $limit, 0);
$tpl->assign('itemsNavPage', $nav->renderNav(4, 1));
}
$showmax = $start + $limit;
$showmax = $showmax > $num ? $num : $showmax;
$tpl->assign('lang_showing', sprintf(_AS_DT_SHOWING, $start + 1, $showmax, $num));
$tpl->assign('limit', $limit);
$tpl->assign('pag', $pactual);
//Fin Barra de navegación
//Lista de software
$sql = "SELECT * FROM " . $db->prefix('dtrans_software');
$search ? $sql .= " WHERE name LIKE '%{$search}%'" : '';
$sql .= " LIMIT {$start},{$limit}";
$result = $db->queryF($sql);
while ($row = $db->fetchArray($result)) {
$tpl->append('items', array('id' => $row['id_soft'], 'name' => $row['name']));
}
$tpl->assign('lang_search', _AS_DT_SEARCH);
$tpl->assign('lang_listsoft', _AS_DT_LISTSOFT);
$tpl->assign('parent', $parent);
$tpl->assign('search', $search);
echo $tpl->fetch('db:admin/dtrans_listsoft.html');
示例11: genremanager
function genremanager()
{
require_once XOOPS_ROOT_PATH . '/class/template.php';
if (!isset($xoopsTpl)) {
$xoopsTpl = new XoopsTpl();
}
global $xoopsDB, $filelist, $genrelist, $genretitle, $xoopsModuleConfig, $xoopsModule, $myts;
$myts =& MyTextSanitizer::getInstance();
$mytree = new debaserTree($xoopsDB->prefix('debaser_genre'), "genreid", "subgenreid");
$count = 1;
$chcount = 0;
$countin = 0;
$result = $xoopsDB->query("SELECT * FROM " . $xoopsDB->prefix('debaser_genre') . " WHERE subgenreid = 0 ");
while ($myrow = $xoopsDB->fetchArray($result)) {
$countin++;
$title = $myts->htmlSpecialChars($myrow['genretitle']);
$arr = array();
$mytree = new debaserTree($xoopsDB->prefix('debaser_genre'), "genreid", "subgenreid");
$arr = $mytree->getdebaserChildTreeArray($myrow['genreid'], "genretitle");
$space = 0;
$chcount = 0;
$subcategories = "";
foreach ($arr as $ele) {
$chtitle = $myts->htmlSpecialChars($ele['genretitle']);
if ($space > 0) {
$subcategories .= "<br />";
}
$ele['prefix'] = str_replace(".", "-", $ele['prefix']);
$subcategories .= $ele['prefix'] . " " . $chtitle . " <a href='category.php?op=editgenre&genreid=" . $ele['genreid'] . "'><img src='../images/edit.gif' align='middle' /></a> <a href='category.php?op=deletegenre&genreid=" . $ele['genreid'] . "&genrecat=" . $ele['genretitle'] . "'><img src='../images/delete.gif' align='middle' /></a><br />";
$space++;
$chcount++;
}
$xoopsTpl->append('categories', array('id' => $myrow['genreid'], 'title' => $title, 'subcategories' => $subcategories, 'count' => $count));
$count++;
}
$genreid = isset($_POST['genreid']) ? $_POST['genreid'] : 0;
$member_handler =& xoops_gethandler('member');
$group_list =& $member_handler->getGroupList();
$gperm_handler =& xoops_gethandler('groupperm');
$groups = $gperm_handler->getGroupIds('DebaserCatPerm', $genreid, $xoopsModule->getVar('mid'));
$groups = $groups;
$nuform = new XoopsThemeForm(_AM_DEBASER_ADDNEWGENRE, "addnewgenre", "category.php");
if ($xoopsModuleConfig['usecatperm'] == 1) {
$nuform->addElement(new XoopsFormSelectGroup(_AM_DEBASER_FCATEGORY_GROUPPROMPT, "groups", true, $groups, 5, true));
}
$formgenrename = new XoopsFormText(_AM_DEBASER_GENRE, "genrenew", 50, 50);
$graph_array =& XoopsLists::getFileListAsArray(XOOPS_ROOT_PATH . "/" . $xoopsModuleConfig['catimage']);
$indeximage_select = new XoopsFormSelect('', 'imgurl');
$indeximage_select->addOption('', '----------');
$indeximage_select->addOptionArray($graph_array);
$indeximage_select->setExtra("onchange='showImgSelected(\"image\", \"imgurl\", \"" . $xoopsModuleConfig['catimage'] . "\", \"\", \"" . XOOPS_URL . "\")'");
$indeximage_tray = new XoopsFormElementTray(_AM_DEBASER_FCATEGORY_CIMAGE, ' ');
$indeximage_tray->addElement($indeximage_select);
if (!empty($imgurl)) {
$indeximage_tray->addElement(new XoopsFormLabel('', "<br /><br /><img src='" . XOOPS_URL . "/" . $xoopsModuleConfig['catimage'] . "/" . $imgurl . "' name='image' id='image' alt='' />"));
} else {
$indeximage_tray->addElement(new XoopsFormLabel('', "<br /><br /><img src='" . XOOPS_URL . "/uploads/blank.gif' name='image' id='image' alt='' />"));
}
$formgenreweight = new XoopsFormText(_AM_DEBASER_WEIGHT, 'catweight', 4, 4, '0');
$op_hidden = new XoopsFormHidden("op", "newgenresave");
$submit_button = new XoopsFormButton("", "dbsubmit", _SUBMIT, "submit");
$nuform->addElement($formgenrename);
$nuform->addElement($indeximage_tray);
$nuform->addElement($formgenreweight);
$nuform->addElement($op_hidden);
$nuform->addElement($submit_button);
$xoopsTpl->assign('addnewgenre', $nuform->render());
$subcatform = new XoopsThemeForm(_AM_DEBASER_ADDNEWSUBGENRE, "addnewsubgenre", "category.php");
$subgenre_tray = new XoopsFormElementTray(_AM_DEBASER_SUBGENRE, '');
$subgenre_tray->addElement(new XoopsFormHidden('op', 'newsubgenresave'));
$subgenrename = new XoopsFormText('', "subgenrenew", 50, 50);
$subgenre_tray->addElement($subgenrename);
$mytreechose = new debaserTree($xoopsDB->prefix("debaser_genre"), "genreid", "subgenreid");
ob_start();
$mytreechose->debaserSelBox("genretitle", "genretitle", 0, 1, "subgenrefrom");
$subgenre_tray->addElement(new XoopsFormLabel(_AM_DEBASER_GENREIN, ob_get_contents()));
ob_end_clean();
$subgenre_tray->addElement(new XoopsFormButton('', 'subgenresubmit', _SUBMIT, 'submit'));
$subcatform->addElement($subgenre_tray);
$xoopsTpl->assign('addsubcat', $subcatform->render());
$xoopsTpl->assign('adminmenu', debaseradminMenu(2, _AM_DEBASER_EDITGENRES));
$xoopsTpl->display('db:debaser_amgenremanage.html');
}
示例12: array
// Category Select form
$param = array('imgcat_id' => $imgcat_id, 'target' => null);
$form = $helper->getForm($param, 'category_imagemanager');
$xoopsTpl->assign('form_category', $form->render());
if ($imgcat_id > 0) {
$imgcount = $helper->getHandlerImages()->countByCategory($imgcat_id);
$images = $helper->getHandlerImages()->getByCategory($imgcat_id, $start, $helper->getConfig('images_pager'), true);
$category = $helper->getHandlerCategories()->get($imgcat_id);
foreach (array_keys($images) as $i) {
if ($category->getVar('imgcat_storetype') === 'db') {
$src = $helper->url("image.php?id=" . $images[$i]->getVar('image_id'));
} else {
$xoops_uploads_url = \XoopsBaseConfig::get('uploads-url');
$src = $xoops_uploads_url . '/' . $images[$i]->getVar('image_name');
}
$xoopsTpl->append('images', array('id' => $images[$i]->getVar('image_id'), 'nicename' => $images[$i]->getVar('image_nicename'), 'mimetype' => $images[$i]->getVar('image_mimetype'), 'src' => $src));
}
}
break;
case 'upload':
$category = $helper->getHandlerCategories()->get($imgcat_id);
if ($imgcat_id > 0 && is_object($category)) {
$perm_handler = $xoops->getHandlerGroupPermission();
if ($perm_handler->checkRight('imgcat_write', $imgcat_id, $groups)) {
$xoops->simpleHeader();
$xoopsTpl = new XoopsTpl();
$obj = $helper->getHandlerImages()->create();
$obj->setVar('imgcat_id', $imgcat_id);
$form = $helper->getForm(array('obj' => $obj, 'target' => null), 'image_imagemanager');
$xoopsTpl->assign('form', $form->render());
}
示例13: playermanager
function playermanager()
{
require_once XOOPS_ROOT_PATH . '/class/template.php';
if (!isset($xoopsTpl)) {
$xoopsTpl = new XoopsTpl();
}
global $xoopsDB, $genrelist;
$sql = 'SELECT name FROM ' . $xoopsDB->prefix('debaser_player') . ' ORDER BY name';
$result = $xoopsDB->query($sql);
while (list($player) = $xoopsDB->fetchRow($result)) {
$xoopsTpl->append('player', $player);
}
$nuform = new XoopsThemeForm(_AM_DEBASER_NEWPLAYER, "newplayerform", "index.php");
$formplayername = new XoopsFormText(_AM_DEBASER_NAME, "newplayername", 50, 50);
$formplayercode = new XoopsFormTextArea(_AM_DEBASER_CODE, 'newplayer', '', 15, 30);
$formplayerheight = new XoopsFormText(_AM_DEBASER_HEIGHT, 'playerheight', 4, 4);
$formplayerwidth = new XoopsFormText(_AM_DEBASER_WIDTH, 'playerwidth', 4, 4);
$formplayerautostart = new XoopsFormRadioYN(_AM_DEBASER_AUTOSTART, 'autostart', 1, _YES, _NO);
$op_hidden = new XoopsFormHidden("op", "newplayer");
$submit_button = new XoopsFormButton("", "dbsubmit", _SUBMIT, "submit");
$nuform->addElement($formplayername);
$nuform->addElement($formplayercode);
$nuform->addElement($formplayerheight);
$nuform->addElement($formplayerwidth);
$nuform->addElement($formplayerautostart);
$nuform->addElement($op_hidden);
$nuform->addElement($submit_button);
$xoopsTpl->assign('newplayer', $nuform->render());
$xoopsTpl->assign('adminmenu', debaseradminMenu(3, _AM_DEBASER_EDITPLAYERS));
$xoopsTpl->display('db:debaser_amplaymanage.html');
}
示例14: intval
} else {
$cat = intval($_GET['cat']);
}
if (function_exists('mb_http_output')) {
mb_http_output('pass');
}
header('Content-Type:text/xml; charset=utf-8');
$tpl = new XoopsTpl();
$tpl->xoops_setCaching(0);
$tpl->xoops_setCacheTime($xoopsModuleConfig['rss_cache_time'] * 60);
if (!$tpl->is_cached('db:extcal_rss.html', $cat)) {
$events = $eventHandler->getUpcommingEvent($xoopsModuleConfig['rss_nb_event'], $cat);
if (is_array($events)) {
$tpl->assign('channel_title', xoops_utf8_encode(htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES)));
$tpl->assign('channel_link', XOOPS_URL . '/');
$tpl->assign('channel_desc', xoops_utf8_encode(htmlspecialchars($xoopsConfig['slogan'], ENT_QUOTES)));
$tpl->assign('channel_lastbuild', formatTimestamp(time(), 'rss'));
$tpl->assign('channel_webmaster', $xoopsConfig['adminmail']);
$tpl->assign('channel_editor', $xoopsConfig['adminmail']);
$tpl->assign('channel_category', 'Event');
$tpl->assign('channel_generator', 'XOOPS');
$tpl->assign('channel_language', _LANGCODE);
$tpl->assign('image_url', XOOPS_URL . '/modules/extcal/images/extcal_logo.png');
$tpl->assign('image_width', 92);
$tpl->assign('image_height', 52);
foreach ($events as $event) {
$tpl->append('items', array('title' => xoops_utf8_encode(htmlspecialchars($event->getVar('event_title'), ENT_QUOTES)), 'link' => XOOPS_URL . '/modules/extcal/event.php?event=' . $event->getVar('event_id'), 'guid' => XOOPS_URL . '/modules/extcal/event.php?event=' . $event->getVar('event_id'), 'pubdate' => formatTimestamp($event->getVar('event_submitdate'), 'rss'), 'description' => xoops_utf8_encode(htmlspecialchars($event->getVar('event_desc'), ENT_QUOTES))));
}
}
}
$tpl->display('db:extcal_rss.html', $cat);
示例15: list
$image_ext = 'gif';
} else {
$width_spec = "width='{$myalbum_thumbsize}'";
$image_ext = $ext;
if ($myalbum_makethumb) {
list($width, $height, $type) = getimagesize("{$thumbs_dir}/{$lid}.{$ext}");
if ($width <= $myalbum_thumbsize) {
$width_spec = '';
}
}
}
$xcodel = "[{$url_tag}={$pdir}/{$lid}.{$ext}][{$img_tag} align=left]{$tdir}/{$lid}.{$image_ext}[/{$img_tag}][/{$url_tag}]";
$xcodec = "[{$url_tag}={$pdir}/{$lid}.{$ext}][{$img_tag}]{$tdir}/{$lid}.{$image_ext}[/{$img_tag}][/{$url_tag}]";
$xcoder = "[{$url_tag}={$pdir}/{$lid}.{$ext}][{$img_tag} align=right]{$tdir}/{$lid}.{$image_ext}[/{$img_tag}][/{$url_tag}]";
$xcodebl = "[{$img_tag} align=left]{$pdir}/{$lid}.{$ext}[/{$img_tag}]";
$xcodebc = "[{$img_tag}]{$pdir}/{$lid}.{$ext}[/{$img_tag}]";
$xcodebr = "[{$img_tag} align=right]{$pdir}/{$lid}.{$ext}[/{$img_tag}]";
$xoopsTpl->append('photos', array('lid' => $lid, 'ext' => $ext, 'res_x' => $res_x, 'res_y' => $res_y, 'nicename' => $myts->makeTboxData4Show($title), 'src' => "{$thumbs_url}/{$lid}.{$image_ext}", 'can_edit' => $global_perms & GPERM_EDITABLE && ($my_uid == $submitter || $isadmin), 'width_spec' => $width_spec, 'xcodel' => $xcodel, 'xcodec' => $xcodec, 'xcoder' => $xcoder, 'xcodebl' => $xcodebl, 'xcodebc' => $xcodebc, 'xcodebr' => $xcodebr, 'is_normal' => $is_normal, 'count' => $i++));
}
} else {
$xoopsTpl->assign('image_total', 0);
}
}
$xoopsTpl->assign('xsize', 600);
$xoopsTpl->assign('ysize', 400);
} else {
$xoopsTpl->assign('xsize', 400);
$xoopsTpl->assign('ysize', 180);
}
$xoopsTpl->display("db:{$mydirname}_imagemanager.html");
exit;