';
}
// Html Footer
echo $endHtml;
}
function EzBlockSMFArticlesEzBlock($parameters = array(), $rows = 4, $articles = 4, $category = 0, $type = 'recent', $startHtml = '', $endHtml = '')
{
global $txt, $smcFunc, $modSettings, $scripturl;
$rows = (int) $rows;
$articles = (int) $articles;
$category = (int) $category;
if (!isset($modSettings['smfarticles_setarticlesperpage']))
{
echo $txt['ezp_articles_block_noinstall'];
return;
}
// Pass all the parematers
foreach($parameters as $myparam)
{
if ($myparam['parameter_name'] == 'type')
$type = $myparam['data'];
if ($myparam['parameter_name'] == 'rows')
$rows = (int) $myparam['data'];
if ($myparam['parameter_name'] == 'articles')
$articles = (int) $myparam['data'];
}
// Check if articles system is installed
// Load the language files
if (loadlanguage('Articles') == false)
loadLanguage('Articles','english');
// Html Header
echo $startHtml;
$maxrowlevel = $rows;
echo '
';
//Check what type it is
$query = ' ';
switch($type)
{
case 'recent':
$query = "SELECT a.ID_ARTICLE, a.title, a.date, a.rating, a.totalratings, m.real_name, a.ID_MEMBER, a.description, a.views, a.commenttotal
FROM {db_prefix}articles AS a
LEFT JOIN {db_prefix}members AS m ON (a.ID_MEMBER = m.ID_MEMBER)
WHERE a.approved = 1 ORDER BY a.ID_ARTICLE DESC LIMIT $articles";
break;
case 'viewed':
$query = "SELECT a.ID_ARTICLE, a.title, a.date, a.rating, a.totalratings, m.real_name, a.ID_MEMBER, a.description, a.views, a.commenttotal
FROM {db_prefix}articles AS a
LEFT JOIN {db_prefix}members AS m ON (a.ID_MEMBER = m.ID_MEMBER)
WHERE a.approved = 1 ORDER BY a.views DESC LIMIT $articles";
break;
case 'mostcomments':
$query = "SELECT a.ID_ARTICLE, a.title, a.date, a.rating, a.totalratings, m.real_name, a.ID_MEMBER, a.description, a.views, a.commenttotal
FROM {db_prefix}articles AS a
LEFT JOIN {db_prefix}members AS m ON (a.ID_MEMBER = m.ID_MEMBER)
WHERE a.approved = 1 ORDER BY p.commenttotal DESC LIMIT $articles";
break;
case 'toprated':
$query = "SELECT a.ID_ARTICLE, a.title, a.date, a.rating, a.totalratings, m.real_name,
a.ID_MEMBER, a.description, a.views, a.commenttotal,
(a.rating / a.totalratings ) AS ratingaverage
FROM {db_prefix}articles AS a
LEFT JOIN {db_prefix}members AS m ON (a.ID_MEMBER = m.ID_MEMBER)
WHERE a.approved = 1 ORDER BY ratingaverage DESC LIMIT $articles ";
break;
}
// Execute the SQL query
$dbresult = $smcFunc['db_query']('', $query);
$rowlevel = 0;
while($row = $smcFunc['db_fetch_assoc']($dbresult))
{
if ($rowlevel == 0)
echo '
';
echo '
', $row['title'], ' ';
echo '';
if (!empty($modSettings['smfarticles_disp_rating']))
{
echo $txt['smfarticles_crating'],' ' , EzGetStarsByPrecent(($row['totalratings'] != 0) ? ($row['rating'] / ($row['totalratings']* 5) * 100) : 0),' ';
}
if (!empty($modSettings['smfarticles_disp_totalcomment']))
echo $txt['smfarticles_txt_comments'], ' ', $row['commenttotal'], ' ';
if (!empty($modSettings['smfarticles_disp_views']))
echo $txt['smfarticles_cviews'], ' ', $row['views'], ' ';
// Check if it was a guest article
if (!empty($modSettings['smfarticles_disp_membername']))
if ($row['real_name'] != '')
echo $txt['ezp_gallery_text_by'],' ', $row['real_name'], ' ';
else
echo $txt['ezp_gallery_text_by'],' ', $txt['smfarticles_txtguest'], ' ';
if (!empty($modSettings['smfarticles_disp_date']))
echo $txt['smfarticles_cdate'],' ', timeformat($row['date']), ' ';
echo '
';
if ($rowlevel < ($maxrowlevel-1))
$rowlevel++;
else
{
echo '
';
// Html Footer
echo $endHtml;
}
function EzBlockDownloadsBlock($parameters = array(), $rows = 4, $type = 'recent', $files = 4, $category = 0, $startHtml = '', $endHtml = '')
{
global $txt, $smcFunc, $scripturl, $modSettings, $scripturl, $boardurl;
$rows = (int) $rows;
$files = (int) $files;
$category = (int) $category;
// Pass all the parameters
foreach($parameters as $myparam)
{
if ($myparam['parameter_name'] == 'type')
$type = $myparam['data'];
if ($myparam['parameter_name'] == 'rows')
$rows = (int) $myparam['data'];
if ($myparam['parameter_name'] == 'files')
$files = (int) $myparam['data'];
if ($myparam['parameter_name'] == 'category')
$category = (int) $myparam['data'];
}
// Check if downloads system is installed
if (!isset($modSettings['down_set_files_per_page']))
{
echo $txt['ezp_downloads_block_noinstall'];
return;
}
// Html Header
echo $startHtml;
$isPro = false;
if(isset($modSettings['down_set_t_image']))
$isPro = true;
// Load the language files
if (loadlanguage('Downloads') == false)
loadLanguage('Downloads','english');
if (empty($modSettings['down_url']))
$modSettings['down_url'] = $boardurl . '/downloads/';
$maxrowlevel = $rows;
echo '
';
//Check what type it is
$selectPro = '';
$selectProJoin = '';
if ($isPro == true)
{
$selectPro = " f.ID_PICTURE, f.thumbfilename, ";
$selectProJoin = " LEFT JOIN {db_prefix}down_file_pic AS f ON (f.ID_PICTURE = p.ID_PICTURE) ";
}
$query = ' ';
switch($type)
{
case 'recent':
$query = "SELECT p.ID_FILE, p.commenttotal, $selectPro p.totalratings, p.rating, p.filesize, p.views, p.title, p.ID_MEMBER, m.real_name, p.date, p.description, p.totaldownloads
FROM {db_prefix}down_file as p
LEFT JOIN {db_prefix}members AS m ON (m.ID_MEMBER = p.ID_MEMBER)
$selectProJoin
WHERE p.approved = 1 ORDER BY p.ID_FILE DESC LIMIT $files";
break;
case 'viewed':
$query = "SELECT p.ID_FILE, p.commenttotal, $selectPro p.totalratings, p.rating, p.filesize, p.views, p.title, p.ID_MEMBER, m.real_name, p.date, p.description, p.totaldownloads
FROM {db_prefix}down_file as p
LEFT JOIN {db_prefix}members AS m ON (m.ID_MEMBER = p.ID_MEMBER)
$selectProJoin
WHERE p.approved = 1 ORDER BY p.views DESC LIMIT $files";
break;
case 'mostcomments':
$query = "SELECT p.ID_FILE, p.commenttotal, $selectPro p.totalratings, p.rating, p.filesize, p.views, p.title, p.ID_MEMBER, m.real_name, p.date, p.description, p.totaldownloads
FROM {db_prefix}down_file as p
LEFT JOIN {db_prefix}members AS m ON (m.ID_MEMBER = p.ID_MEMBER)
$selectProJoin
WHERE p.approved = 1 ORDER BY p.commenttotal DESC LIMIT $files";
break;
case 'toprated':
$query = "SELECT p.ID_FILE, (p.rating / p.totalratings ) AS ratingaverage, p.commenttotal, $selectPro p.totalratings, p.rating, p.filesize, p.views, p.title, p.ID_MEMBER, m.real_name, p.date, p.description, p.totaldownloads
FROM {db_prefix}down_file as p
LEFT JOIN {db_prefix}members AS m ON (m.ID_MEMBER = p.ID_MEMBER)
$selectProJoin
WHERE p.approved = 1 ORDER BY ratingaverage DESC LIMIT $files ";
break;
case 'downloads':
$query = "SELECT p.ID_FILE, p.commenttotal, $selectPro p.totalratings, p.rating, p.filesize, p.views, p.title, p.ID_MEMBER, m.real_name, p.date, p.description, p.totaldownloads
FROM {db_prefix}down_file as p
LEFT JOIN {db_prefix}members AS m ON (m.ID_MEMBER = p.ID_MEMBER)
$selectProJoin
WHERE p.approved = 1 ORDER BY p.totaldownloads DESC LIMIT $files";
break;
}
// Execute the SQL query
$dbresult = $smcFunc['db_query']('', $query);
$rowlevel = 0;
while($row = $smcFunc['db_fetch_assoc']($dbresult))
{
if ($rowlevel == 0)
echo '
';
// Html Footer
echo $endHtml;
}
}
function EzBlockGalleryRandomImage($parameters = array(), $category = 0, $numimages = 1, $startHtml = '', $endHtml = '')
{
global $txt, $smcFunc, $context, $user_info, $modSettings, $scripturl, $boardurl;
$galleryPro = false;
if (!$context['user']['is_guest'])
$groupsdata = implode(',',$user_info['groups']);
else
$groupsdata = -1;
if (isset($modSettings['gallery_set_count_child']))
$galleryPro = true;
echo $startHtml;
// Set the category
$category = (int) $category;
$numimages = (int) $numimages;
$rows = 4;
// Pass all the parameters
foreach($parameters as $myparam)
{
if ($myparam['parameter_name'] == 'category')
$category = (int) $myparam['data'];
if ($myparam['parameter_name'] == 'images')
$numimages = (int) $myparam['data'];
if ($myparam['parameter_name'] == 'rows')
$rows = (int) $myparam['data'];
}
// Check if gallery is installed
if (!isset($modSettings['gallery_max_filesize']))
{
echo $txt['ezp_gallery_block_noinstall'];
}
else
{
if (empty($modSettings['gallery_url']))
$modSettings['gallery_url'] = $boardurl . '/gallery/';
// Load the Gallery language files
if (loadlanguage('Gallery') == false)
loadLanguage('Gallery','english');
$rowlevel = 0;
$maxrowlevel = $rows;
if ($galleryPro == false)
$request = $smcFunc['db_query']('', "
SELECT
thumbfilename,ID_PICTURE,filename
FROM {db_prefix}gallery_pic
WHERE " . ($category == 0 ? '' : ' ID_CAT = ' . $category . ' AND ') . " approved = 1 ORDER BY RAND() LIMIT $numimages");
else
$request = $smcFunc['db_query']('', "
SELECT
p.thumbfilename, p.ID_PICTURE, p.filename
FROM {db_prefix}gallery_pic as p
LEFT JOIN {db_prefix}members AS m ON (p.ID_MEMBER = m.ID_MEMBER)
LEFT JOIN {db_prefix}gallery_usersettings AS s ON (s.ID_MEMBER = m.ID_MEMBER)
LEFT JOIN {db_prefix}gallery_catperm AS c ON (c.ID_GROUP IN ($groupsdata) AND c.ID_CAT = p.ID_CAT)
WHERE ((s.private =0 OR s.private IS NULL ) AND (s.password = '' OR s.password IS NULL ) AND p.USER_ID_CAT !=0 AND p.approved =1) OR (p.approved =1 AND p.USER_ID_CAT =0 AND (c.view IS NULL OR c.view =1))
" . ($category != 0 ? ' AND p.ID_CAT = ' . $category : '' ) . "
GROUP by p.ID_PICTURE, p.thumbfilename, p.ID_PICTURE, p.filename ORDER BY RAND() LIMIT " . $numimages);
echo '
';
}
echo $endHtml;
}
function EzBlockLinksBlock($parameters = array(), $rows = 1, $links = 10, $category = 0, $type = 'recent', $startHtml = '', $endHtml = '')
{
global $txt, $smcFunc, $scripturl, $modSettings;
$rows = (int) $rows;
$links = (int) $links;
$category = (int) $category;
if (!isset($modSettings['smflinks_setlinksperpage']))
{
echo $txt['ezp_links_block_noinstall'];
return;
}
// Pass all the parematers
foreach($parameters as $myparam)
{
if ($myparam['parameter_name'] == 'links')
$links = (int) $myparam['data'];
}
// Check if links is installed
$dbresult = $smcFunc['db_query']('', "
SELECT
l.ID_LINK,l.title,l.date, l.pagerank, l.alexa, l.rating, m.real_name, l.ID_MEMBER, l.description,l.hits
FROM {db_prefix}links AS l
LEFT JOIN {db_prefix}members AS m ON (l.ID_MEMBER = m.ID_MEMBER)
WHERE l.approved = 1 ORDER BY l.ID_LINK DESC
LIMIT $links");
while ($row = $smcFunc['db_fetch_assoc']($dbresult))
{
echo '' . $row['title'] . ' ';
}
$smcFunc['db_free_result']($dbresult);
// Html Header
echo $startHtml;
// Html Footer
echo $endHtml;
}
function EzBlockStoreBlock($parameters = array(), $rows = 4, $products = 4, $type = 'recent', $category = 0, $startHtml = '', $endHtml = '')
{
global $smcFunc, $scripturl, $txt, $modSettings, $boardurl, $context;
$rows = (int) $rows;
// Check if store is installed
if (!isset($modSettings['store_set_items_per_page']))
{
echo $txt['ezp_store_block_noinstall'] ;
return;
}
// Pass all the parematers
foreach($parameters as $myparam)
{
if ($myparam['parameter_name'] == 'type')
$type = $myparam['data'];
if ($myparam['parameter_name'] == 'rows')
$rows = (int) $myparam['data'];
if ($myparam['parameter_name'] == 'products')
$products = (int) $myparam['data'];
}
if (empty($modSettings['store_url']))
$modSettings['store_url'] = $boardurl . '/store/';
// Html Header
echo $startHtml;
// Load the language files
if (loadlanguage('Store') == false)
loadLanguage('Store', 'english');
$g_manage = allowedTo('smfstore_manage');
$maxrowlevel = $rows ;
echo '
';
// Check what type it is
$query = ' ';
switch($type)
{
case 'recent':
$query = "SELECT i.ID_ITEM, i.commenttotal, i.totalratings, i.rating,
i.primaryID_PICTURE, i.productname, p.thumbfilename, i.price,i.currency,
i.qtyinstock, i.needsstock, i.date, i.views
FROM {db_prefix}store_item as i LEFT JOIN {db_prefix}store_item_pic as p ON (i.primaryID_PICTURE = p.ID_PICTURE)
WHERE i.hideproduct = 0 ORDER BY i.ID_ITEM DESC LIMIT $products";
break;
case 'viewed':
$query = "SELECT i.ID_ITEM, i.commenttotal, i.totalratings, i.rating,
i.primaryID_PICTURE, i.productname, p.thumbfilename, i.price,i.currency,
i.qtyinstock, i.needsstock, i.date, i.views
FROM {db_prefix}store_item as i LEFT JOIN {db_prefix}store_item_pic as p ON (i.primaryID_PICTURE = p.ID_PICTURE)
WHERE i.hideproduct = 0 ORDER BY i.views DESC LIMIT $products";
break;
case 'mostcomments':
$query = "SELECT i.ID_ITEM, i.commenttotal, i.totalratings, i.rating,
i.primaryID_PICTURE, i.productname, p.thumbfilename, i.price,i.currency,
i.qtyinstock, i.needsstock, i.date, i.views
FROM {db_prefix}store_item as i LEFT JOIN {db_prefix}store_item_pic as p ON (i.primaryID_PICTURE = p.ID_PICTURE)
WHERE i.hideproduct = 0 ORDER BY i.commenttotal DESC LIMIT $products";
break;
case 'toprated':
$query = "SELECT i.ID_ITEM, i.commenttotal, i.totalratings, i.rating,
(i.rating / i.totalratings ) AS ratingaverage,
i.primaryID_PICTURE, i.productname, p.thumbfilename, i.price,i.currency,
i.qtyinstock, i.needsstock, i.date, i.views
FROM {db_prefix}store_item as i LEFT JOIN {db_prefix}store_item_pic as p ON (i.primaryID_PICTURE = p.ID_PICTURE)
WHERE i.hideproduct = 0 ORDER BY ratingaverage DESC LIMIT $products";
break;
case 'random':
$query = "SELECT i.ID_ITEM, i.commenttotal, i.totalratings, i.rating,
i.primaryID_PICTURE, i.productname, p.thumbfilename, i.price,i.currency,
i.qtyinstock, i.needsstock, i.date, i.views
FROM {db_prefix}store_item as i LEFT JOIN {db_prefix}store_item_pic as p ON (i.primaryID_PICTURE = p.ID_PICTURE)
WHERE i.hideproduct = 0 ORDER BY RAND() DESC LIMIT $products";
break;
case 'mostpurchased':
break;
}
// Execute the SQL query
$dbresult = $smcFunc['db_query']('', $query);
$rowlevel = 0;
while($row = $smcFunc['db_fetch_assoc']($dbresult))
{
if($rowlevel == 0)
echo '
';
// Free the Mysql Resoruces
$smcFunc['db_free_result']($dbresult);
// Html Footer
echo $endHtml;
}
function EzBlockClassifiedsBlock($parameters = array(), $rows = 4, $listings = 4, $type = 'recent', $category = 0, $format = 'vertical', $startHtml = '', $endHtml = '')
{
global $smcFunc, $scripturl, $txt, $modSettings, $boardurl, $user_info, $context, $sourcedir, $boarddir;
$rows = (int) $rows;
$listings = (int) $listings;
$category = (int) $category;
// Check if classifieds is installed
if (!isset($modSettings['class_set_listings_per_page']))
{
echo $txt['ezp_classifieds_block_noinstall'];
return;
}
// Pass all the parameters
foreach($parameters as $myparam)
{
if ($myparam['parameter_name'] == 'type')
$type = $myparam['data'];
if ($myparam['parameter_name'] == 'rows')
$rows = (int) $myparam['data'];
if ($myparam['parameter_name'] == 'listings')
$listings = (int) $myparam['data'];
}
// Html Header
echo $startHtml;
// Load the language files
if (loadlanguage('classifieds') == false)
loadLanguage('classifieds', 'english');
$g_manage = allowedTo('smfclassifieds_manage');
$groupsdata = implode(',',$user_info['groups']);
if (empty($modSettings['class_url']))
$modSettings['class_url'] = $boardurl . '/classifieds/';
if (empty($modSettings['class_path']))
$modSettings['class_path'] = $boarddir . '/classifieds/';
$maxrowlevel = $rows;
echo '
';
// Check what type it is
$query = ' ';
switch($type)
{
case 'recent':
$query = "SELECT i.ID_LISTING, i.commenttotal,
i.primaryID_PICTURE, i.title, p.thumbfilename, p.remotefilename, i.currentbid,i.currency,
i.datelisted, i.views, i.is_auction, i.totalbids, i.ID_CAT, c.noprice, i.expiredate
FROM {db_prefix}class_listing as i
LEFT JOIN {db_prefix}class_listing_pic as p ON (i.primaryID_PICTURE = p.ID_PICTURE)
LEFT JOIN {db_prefix}class_cat as c ON (i.ID_CAT = c.ID_CAT)
LEFT JOIN {db_prefix}class_catperm AS r ON (r.ID_GROUP IN ($groupsdata) AND r.ID_CAT = i.ID_CAT)
WHERE i.removed = 0 AND i.approved = 1 AND (r.view IS NULL OR r.view =1) GROUP BY i.ID_LISTING, i.commenttotal,
i.primaryID_PICTURE, i.title, p.thumbfilename, p.remotefilename, i.currentbid,i.currency,
i.datelisted, i.views, i.is_auction, i.totalbids, i.ID_CAT, c.noprice, i.expiredate ORDER BY i.ID_LISTING DESC LIMIT $listings";
break;
case 'viewed':
$query = "SELECT i.ID_LISTING, i.commenttotal,
i.primaryID_PICTURE, i.title, p.thumbfilename, p.remotefilename, i.currentbid,i.currency,
i.datelisted, i.views, i.is_auction, i.totalbids, i.ID_CAT, c.noprice, i.expiredate
FROM {db_prefix}class_listing as i
LEFT JOIN {db_prefix}class_listing_pic as p ON (i.primaryID_PICTURE = p.ID_PICTURE)
LEFT JOIN {db_prefix}class_cat as c ON (i.ID_CAT = c.ID_CAT)
LEFT JOIN {db_prefix}class_catperm AS r ON (r.ID_GROUP IN ($groupsdata) AND r.ID_CAT = i.ID_CAT)
WHERE i.removed = 0 AND i.approved = 1 AND (r.view IS NULL OR r.view =1) GROUP BY i.ID_LISTING, i.commenttotal,
i.primaryID_PICTURE, i.title, p.thumbfilename, p.remotefilename, i.currentbid,i.currency,
i.datelisted, i.views, i.is_auction, i.totalbids, i.ID_CAT, c.noprice, i.expiredate ORDER BY i.views DESC LIMIT $listings";
break;
case 'random':
$query = "SELECT i.ID_LISTING, i.commenttotal,
i.primaryID_PICTURE, i.title, p.thumbfilename, p.remotefilename, i.currentbid,i.currency,
i.datelisted, i.views, i.is_auction, i.totalbids, i.ID_CAT, c.noprice, i.expiredate
FROM {db_prefix}class_listing as i
LEFT JOIN {db_prefix}class_listing_pic as p ON (i.primaryID_PICTURE = p.ID_PICTURE)
LEFT JOIN {db_prefix}class_cat as c ON (i.ID_CAT = c.ID_CAT)
LEFT JOIN {db_prefix}class_catperm AS r ON (r.ID_GROUP IN ($groupsdata) AND r.ID_CAT = i.ID_CAT)
WHERE i.removed = 0 AND i.approved = 1 AND (r.view IS NULL OR r.view =1) GROUP BY i.ID_LISTING, i.commenttotal,
i.primaryID_PICTURE, i.title, p.thumbfilename, p.remotefilename, i.currentbid,i.currency,
i.datelisted, i.views, i.is_auction, i.totalbids, i.ID_CAT, c.noprice, i.expiredate ORDER BY RAND() DESC LIMIT $listings";
break;
case 'mostcomments':
$query = "SELECT i.ID_LISTING, i.commenttotal,
i.primaryID_PICTURE, i.title, p.thumbfilename, p.remotefilename, i.currentbid,i.currency,
i.datelisted, i.views, i.is_auction, i.totalbids, i.ID_CAT, c.noprice, i.expiredate
FROM {db_prefix}class_listing as i
LEFT JOIN {db_prefix}class_listing_pic as p ON (i.primaryID_PICTURE = p.ID_PICTURE)
LEFT JOIN {db_prefix}class_cat as c ON (i.ID_CAT = c.ID_CAT)
LEFT JOIN {db_prefix}class_catperm AS r ON (r.ID_GROUP IN ($groupsdata) AND r.ID_CAT = i.ID_CAT)
WHERE i.removed = 0 AND i.approved = 1 AND (r.view IS NULL OR r.view =1) GROUP BY i.ID_LISTING, i.commenttotal,
i.primaryID_PICTURE, i.title, p.thumbfilename, p.remotefilename, i.currentbid,i.currency,
i.datelisted, i.views, i.is_auction, i.totalbids, i.ID_CAT, c.noprice, i.expiredate ORDER BY i.commenttotal DESC LIMIT $listings";
break;
case 'featured':
$query = "SELECT i.ID_LISTING, i.commenttotal,
i.primaryID_PICTURE, i.title, p.thumbfilename, p.remotefilename, i.currentbid,i.currency,
i.datelisted, i.views, i.is_auction, i.totalbids, i.ID_CAT, c.noprice, i.expiredate
FROM {db_prefix}class_listing as i
LEFT JOIN {db_prefix}class_listing_pic as p ON (i.primaryID_PICTURE = p.ID_PICTURE)
LEFT JOIN {db_prefix}class_cat as c ON (i.ID_CAT = c.ID_CAT)
LEFT JOIN {db_prefix}class_catperm AS r ON (r.ID_GROUP IN ($groupsdata) AND r.ID_CAT = i.ID_CAT)
WHERE i.removed = 0 AND i.approved = 1 AND i.featuredlisting = 1 AND (r.view IS NULL OR r.view =1) GROUP BY i.ID_LISTING, i.commenttotal,
i.primaryID_PICTURE, i.title, p.thumbfilename, p.remotefilename, i.currentbid,i.currency,
i.datelisted, i.views, i.is_auction, i.totalbids, i.ID_CAT, c.noprice, i.expiredate ORDER BY i.ID_LISTING DESC LIMIT $listings";
break;
}
// Execute the SQL query
$dbresult = $smcFunc['db_query']('', $query);
$rowlevel = 0;
while($row = $smcFunc['db_fetch_assoc']($dbresult))
{
if ($rowlevel == 0)
echo '