Example #1
0
 /**
  * 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));
 }
Example #2
0
/**
* @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) . ' &raquo; ' . $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&amp;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");
}
Example #3
0
        $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);
Example #4
0
    $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);
Example #5
0
			$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&amp;storyid='.$article->getVar('storyid'),
				'guid' => $mydirurl.'/index.php?page=article&amp;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");


?>
Example #6
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 = $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);
?>
Example #7
0
             }
             $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 . '&amp;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);
Example #8
0
         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;
Example #9
0
//$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');
Example #10
0
    $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');
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'] . "&nbsp;" . $chtitle . "&nbsp;&nbsp;<a href='category.php?op=editgenre&amp;genreid=" . $ele['genreid'] . "'><img src='../images/edit.gif' align='middle' /></a>&nbsp;<a href='category.php?op=deletegenre&amp;genreid=" . $ele['genreid'] . "&amp;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, '&nbsp;');
    $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');
}
Example #12
0
     // 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());
         }
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');
}
Example #14
0
} 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);
Example #15
0
                    $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;
Example #16
0
                $updated = wani_iso8601_date($new['time']);
                $published = wani_iso8601_date($new['time']);
            }
            $title = wani_utf8_encode(wani_make_html_title($new['title']));
            $link = $new['link'];
            $description = '';
            if (isset($new['description'])) {
                $description = $new['description'];
                $description = wani_make_html_summary($description, $ATOM_DESC_MAX);
                $description = wani_utf8_encode($description);
            }
            $mid = '';
            $aid = '';
            if (isset($new['mod_id'])) {
                $mid = $new['mod_id'];
            }
            if (isset($new['id'])) {
                $aid = $new['id'];
            }
            $year = date('Y');
            if (empty($mid) && empty($aid)) {
                $atom_id = "tag:{$site_tag},{$year}://1" . time();
            } else {
                $atom_id = "tag:{$site_tag},{$year}://1.{$mid}.{$aid}";
            }
            $tpl->append('entrys', array('author_name' => $site_author, 'updated' => wani_utf8_encode($updated), 'published' => wani_utf8_encode($published), 'author_uri' => '', 'author_email' => '', 'title' => $title, 'summary' => $description, 'category' => '', 'content' => $description, 'link' => $link, 'id' => $atom_id));
        }
    }
}
$tpl->display("file:{$template}");
exit;
Example #17
0
    $tpl->assign('channel_lastbuild', XoopsLocale::formatTimestamp(time(), 'rss'));
    $tpl->assign('channel_webmaster', $xoops->getConfig('adminmail'));
    $tpl->assign('channel_editor', $xoops->getConfig('adminmail'));
    if ($categoryid != -1) {
        $channel_category .= " > " . $categoryObj->getVar('name');
    }
    $tpl->assign('channel_category', htmlspecialchars($channel_category));
    $tpl->assign('channel_generator', $publisher->getModule()->getVar('name'));
    $tpl->assign('channel_language', XoopsLocale::getLangCode());
    $tpl->assign('image_url', \XoopsBaseConfig::get('url') . '/images/logo.gif');
    $dimention = getimagesize(\XoopsBaseConfig::get('root-path') . '/images/logo.gif');
    if (empty($dimention[0])) {
        $width = 140;
        $height = 140;
    } else {
        $width = $dimention[0] > 140 ? 140 : $dimention[0];
        $dimention[1] = $dimention[1] * $width / $dimention[0];
        $height = $dimention[1] > 140 ? $dimention[1] * $dimention[0] / 140 : $dimention[1];
    }
    $tpl->assign('image_width', $width);
    $tpl->assign('image_height', $height);
    $sarray = $publisher->getItemHandler()->getAllPublished(10, 0, $categoryid);
    if (is_array($sarray)) {
        $count = $sarray;
        /* @var $item PublisherItem */
        foreach ($sarray as $item) {
            $tpl->append('items', array('title' => htmlspecialchars($item->title(), ENT_QUOTES), 'link' => $item->getItemUrl(), 'guid' => $item->getItemUrl(), 'pubdate' => XoopsLocale::formatTimestamp($item->getVar('datesub'), 'rss'), 'description' => htmlspecialchars($item->getBlockSummary(300, true), ENT_QUOTES)));
        }
    }
}
$tpl->display('module:publisher/publisher_rss.tpl');
Example #18
0
        $tpl->assign('channel_editor', $xoopsConfig['adminmail']);
        $tpl->assign('channel_category', 'New Contents of Mylinks');
        $tpl->assign('channel_generator', XOOPS_VERSION);
        $tpl->assign('channel_language', _LANGCODE);
        $tpl->assign('image_url', XOOPS_URL . "/{$logo}");
        $tpl->assign('channel_pubdate', wani_utf8_encode(date("r")));
        $tpl->assign('channel_copyright', 'wanisys');
        $dimention = getimagesize(XOOPS_ROOT_PATH . "/{$logo}");
        $width = empty($dimention[0]) ? 88 : $dimention[0] > 144 ? 144 : $dimention[0];
        $height = empty($dimention[1]) ? 31 : $dimention[1] > 400 ? 400 : $dimention[1];
        $tpl->assign('image_width', $width);
        $tpl->assign('image_height', $height);
        foreach ($new_array as $new) {
            $title = wani_utf8_encode(wani_make_html_title($new['title']));
            $link = $new['link'];
            $pubdate = '';
            if (isset($new['time'])) {
                $pubdate = wani_utf8_encode(date("r", $new['time']));
            }
            $description = '';
            if (isset($new['description'])) {
                $description = $new['description'];
                $description = wani_make_html_summary($description, $RSS_DESC_MAX);
                $description = wani_utf8_encode($description);
            }
            $tpl->append('items', array('title' => $title, 'link' => $link, 'guid' => $link, 'pubdate' => $pubdate, 'description' => $description));
        }
    }
}
$tpl->display("file:{$template}");
exit;
Example #19
0
        require_once XOOPS_ROOT_PATH . '/class/pagenav.php';
        $pagenav = new XoopsPageNav($itemsCount, $limit, $start, 'start', http_build_query($additionnalParameters));
        $xoopsTpl->assign('pagenav', $pagenav->renderNav());
    }
    $criteria->setStart($start);
    $criteria->setLimit($limit);
    $products = array();
    $products = $oledrion_handlers->h_oledrion_products->getObjects($criteria);
    $javascriptSearch = array("'", '"');
    $javascriptReplace = array(' ', ' ');
    if (count($products) > 0) {
        foreach ($products as $product) {
            $productData = $product->toArray();
            $productData['product_title_javascript'] = str_replace($javascriptSearch, $javascriptReplace, $product->getVar('product_title', 'n'));
            //$productData['product_title_javascript'] = $product->getVar('product_title', 'n');
            $xoopsTpl->append('products', $productData);
        }
    }
}
oledrion_utils::loadLanguageFile('modinfo.php');
oledrion_utils::loadLanguageFile('main.php');
$categoriesSelect = $mytree->makeSelBox('product_cid', 'cat_title', '-', $selectedCategory, '---', 0, "class='selectLists'");
$xoopsTpl->assign('callerName', $callerName);
$xoopsTpl->assign('sart', $start);
$xoopsTpl->assign('theme_set', xoops_getcss($xoopsConfig['theme_set']));
$xoopsTpl->assign('xoopsConfig', $xoopsConfig);
$xoopsTpl->assign('mutipleSelect', $mutipleSelect);
$xoopsTpl->assign('searchVendorSelected', $searchVendorSelected);
$xoopsTpl->assign('baseurl', OLEDRION_URL . 'admin/' . basename(__FILE__));
// URL de ce script
$xoopsTpl->assign('searchVendor', $vendors);
Example #20
0
    $tblAuthors = $h_oledrion_manufacturer->getObjects(new Criteria('manu_id', '(' . implode(',', $tbl_tmp) . ')', 'IN'), true);
    foreach ($products as $item) {
        $tbl_tmp = array();
        $tbl_tmp = $item->toArray();
        $tbl_tmp['product_category'] = isset($tbl_categories[$item->getVar('product_cid')]) ? $tbl_categories[$item->getVar('product_cid')]->toArray() : null;
        $tbl_tmp['product_price_ttc'] = oledrion_utils::getTTC($item->getVar('product_price'), $vatArray[$item->getVar('product_vat_id')]->getVar('vat_rate'), false, 's');
        $tbl_tmp['product_discount_price_ttc'] = oledrion_utils::getTTC($item->getVar('product_discount_price'), $vatArray[$item->getVar('product_vat_id')]->getVar('vat_rate'), false, 's');
        $tbl_join = array();
        foreach ($tblManufacturersPerProduct[$item->getVar('product_id')] as $author) {
            $auteur = $tblAuthors[$author->getVar('pm_manu_id')];
            $tbl_join[] = $auteur->getVar('manu_commercialname') . ' ' . $auteur->getVar('manu_name');
        }
        if (count($tbl_join) > 0) {
            $tbl_tmp['product_joined_manufacturers'] = implode(', ', $tbl_join);
        }
        $Tpl->append('products', $tbl_tmp);
    }
}
$content1 = utf8_encode($Tpl->fetch('db:oledrion_pdf_catalog.html'));
if (oledrion_utils::getModuleOption('use_price')) {
    $content2 = utf8_encode($Tpl->fetch('db:oledrion_purchaseorder.html'));
} else {
    $content2 = '';
}
// ****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
// ****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
// ****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
$doc_title = _OLEDRION_CATALOG;
$doc_subject = _OLEDRION_CATALOG;
$doc_keywords = "Instant Zero";
require_once OLEDRION_PATH . 'pdf/config/lang/' . _LANGCODE . '.php';
Example #21
0
    if (is_array($sarray)) {
        $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', 'News');
        $tpl->assign('channel_generator', 'SmartSection');
        $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 $item) {
            $tpl->append('items', array('title' => xoops_utf8_encode(htmlspecialchars($item->title(), ENT_QUOTES)), 'link' => $item->getItemUrl(), 'guid' => $item->getItemUrl(), 'pubdate' => formatTimestamp($item->getVar('datesub'), 'rss'), 'description' => xoops_utf8_encode(htmlspecialchars($item->summary(), ENT_QUOTES))));
        }
    }
}
$tpl->display('db:system_rss.html');
Example #22
0
$product_user = null;
$user_handler = $member_handler =& xoops_gethandler('user');
$product_user = $user_handler->get($product->getVar('product_submitter'), true);
$xoopsTpl->assign('product_submitter', $product_user);
// Product manufacturer
$tbl_auteurs = $tbl_translators = $tbl_tmp = $tbl_tmp2 = $tbl_join1 = $tbl_join2 = array();
$criteria = new Criteria('pm_product_id', $product->getVar('product_id'), '=');
$tbl_tmp = $h_myshop_productsmanu->getObjects($criteria, true);
foreach ($tbl_tmp as $id => $item) {
    $tbl_tmp2[] = $item->getVar('pm_manu_id');
}
if (count($tbl_tmp2) > 0) {
    $tbl_product_manufacturers = array();
    $tbl_auteurs = $h_myshop_manufacturer->getObjects(new Criteria('manu_id', '(' . implode(',', $tbl_tmp2) . ')', 'IN'), true);
    foreach ($tbl_auteurs as $item) {
        $xoopsTpl->append('product_manufacturers', $item->toArray());
        $tbl_join1[] = "<a href='" . $item->getLink() . "' title='" . myshop_utils::makeHrefTitle($item->getVar('manu_commercialname') . ' ' . $item->getVar('manu_name')) . "'>" . $item->getVar('manu_commercialname') . ' ' . $item->getVar('manu_name') . "</a>";
    }
}
if (count($tbl_join1) > 0) {
    $xoopsTpl->assign('product_joined_manufacturers', implode(', ', $tbl_join1));
}
if (count($tbl_join2) > 0) {
    $xoopsTpl->assign('product_joined_stores', implode(', ', $tbl_join2));
}
// Related products
$tbl_tmp = $tbl_tmp2 = array();
$criteria = new Criteria('related_product_id', $product->getVar('product_id'), '=');
$tbl_tmp = $h_myshop_related->getObjects($criteria);
if (count($tbl_tmp) > 0) {
    foreach ($tbl_tmp as $item) {
Example #23
0
        $tpl->assign('channel_desc', xoops_utf8_encode(htmlspecialchars($xoopsConfig['slogan'], ENT_QUOTES)));
        $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', 'News');
        $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) {
            //$tpl->append('items', array('title' => xoops_utf8_encode(htmlspecialchars($story->title(), ENT_QUOTES)), '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($myts->undoHtmlSpecialChars($story->hometext(), ENT_QUOTES))));
            $tpl->append('items', array('title' => xoops_utf8_encode(htmlspecialchars($story->title(), ENT_QUOTES)), '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(htmlspecialchars($story->hometext(), ENT_QUOTES))));
        }
    }
}
$tpl->display('db:system_rss.html');
Example #24
0
 $xoopsOption['template_main'] = 'xcgal_slideshow.html';
 include XOOPS_ROOT_PATH . "/header.php";
 $xoopsTpl->assign('xoops_module_header', $xcgal_module_header);
 $xoopsTpl->assign('speed', (int) $_GET['slideshow']);
 $i = 0;
 $j = 0;
 $pid = $_GET['pid'];
 $start_img = '';
 $pic_data = get_pic_data($_GET['album'], $pic_count, $album_name, -1, -1, false);
 foreach ($pic_data as $picture) {
     if ($xoopsModuleConfig['make_intermediate'] && max($picture['pwidth'], $picture['pheight']) > $xoopsModuleConfig['picture_width']) {
         $picture_url = get_pic_url($picture, 'normal');
     } else {
         $picture_url = get_pic_url($picture, 'fullsize');
     }
     $xoopsTpl->append('pics', array('pic_url' => $picture_url, 'i' => $i));
     if ($picture['pid'] == $pid) {
         $j = $i;
         $start_img = $picture_url;
     }
     $i++;
 }
 $xoopsTpl->assign('j', $j);
 $xoopsTpl->assign('album', isset($_GET['album']) ? $_GET['album'] : '');
 $xoopsTpl->assign('cat', isset($_GET['cat']) ? $_GET['cat'] : '');
 $xoopsTpl->assign('tab_width', $xoopsModuleConfig['picture_width']);
 $xoopsTpl->assign('cell_height', $xoopsModuleConfig['picture_width'] + 100);
 $xoopsTpl->assign('start_img', $start_img);
 $xoopsTpl->assign('lang_stop_slideshow', _MD_DIS_STOP_SLIDE);
 user_save_profile();
 $xoopsTpl->assign('gallery', $xoopsModule->getVar('name'));