コード例 #1
0
ファイル: admin_items.php プロジェクト: jonycookie/projectm2
        $newgradearr = explode("\t", $_SCONFIG['checkgrade']);
        for ($i = 0; $i < 5; $i++) {
            if (!empty($newgradearr[$i])) {
                $gradearr[$i + 1] = $newgradearr[$i];
            }
        }
    }
    //分类
    $catstr = '';
    $ptype = postget('type');
    if (!empty($ptype)) {
        $catstr .= '<tr>
		<th><input class="radio" type="radio" name="theop" value="move">' . $alang['mass_transfer_classification'] . '</th>
		<td>
		<select name="catid">';
        $clistarr = getcategory($ptype);
        foreach ($clistarr as $key => $value) {
            $catstr .= '<option value="' . $value['catid'] . '">' . $value['pre'] . $value['name'] . '</option>';
        }
        $catstr .= '</select>
		</td>
		</tr>';
    }
    $formhash = formhash();
    print <<<END
\t<form method="post" name="thevalueform" action="{$theurl}" onsubmit="return confirm('{$alang['information_operations_to_determine']}');">
\t<input type="hidden" name="formhash" value="{$formhash}">
\t<table cellspacing="0" cellpadding="0" width="100%"  class="maintable">
\t<tr>
\t<th>{$alang['information_with_a_few_conditions']}</th>
\t<td><strong>{$count}</strong></td>
コード例 #2
0
<?php

/**
 *      [Discuz!] (C)2001-2099 Comsenz Inc.
 *      This is NOT a freeware, use is subject to license terms
 *
 *      $Id: portalcp_article.php 7701 2010-04-12 06:01:33Z zhengqingpeng $
 */
if (!defined('IN_DISCUZ')) {
    exit('Access Denied');
}
$op = $_GET['op'] == 'push' ? 'push' : 'list';
require_once libfile('function/portalcp');
$category = getcategory();
if (!checkperm('allowmanagearticle')) {
    $permission = getallowcategory($_G['uid']);
    if (empty($permission)) {
        showmessage('portal_nopermission');
    }
    $permissioncategory = getpermissioncategory($category, array_keys($permission));
} else {
    $permissioncategory = $category;
}
if ($op == 'push') {
    $_GET['id'] = intval($_GET['id']);
    $_GET['idtype'] = in_array($_GET['idtype'], array('tid', 'blogid')) ? $_GET['idtype'] : '';
    if (empty($_GET['idtype'])) {
        showmessage('article_push_invalid_object');
    }
    $havepush = DB::result_first("SELECT COUNT(*) FROM " . DB::table('portal_article_title') . " WHERE id='{$_GET['id']}' AND idtype='{$_GET['idtype']}'");
    if ($havepush) {
コード例 #3
0
function showcats($fields)
{
    $tempcats = "";
    if ($fields['category1_id'] != "0") {
        $tempcats .= urldecode(getcategory($fields['category1_id'])) . ", ";
    }
    if ($fields['category2_id'] != "0") {
        $tempcats .= urldecode(getcategory($fields['category2_id'])) . ", ";
    }
    if ($fields['category3_id'] != "0") {
        $tempcats .= urldecode(getcategory($fields['category3_id'])) . ", ";
    }
    if ($fields['category4_id'] != "0") {
        $tempcats .= urldecode(getcategory($fields['category4_id'])) . ", ";
    }
    //trim the string
    $tempcats = str_replace("&", "&amp;", trim(substr($tempcats, 0, strrpos($tempcats, ","))));
    $tunecats = str_replace(",", "", $tempcats);
    if ($tempcats != "") {
        echo "    <dc:subject>" . $tempcats . "</dc:subject>\n";
        echo "    <itunes:keywords>" . $tunecats . "</itunes:keywords>\n";
    }
}
コード例 #4
0
 echo "    <title>{$fields['title']}</title>\n";
 //link
 echo "    <link>{$settings['url']}/index.php?id={$fields['id']}</link>\n";
 //categories
 $tempcats = "";
 if ($fields['category1_id'] != "0") {
     $tempcats .= urldecode(getcategory($fields['category1_id'])) . ", ";
 }
 if ($fields['category2_id'] != "0") {
     $tempcats .= urldecode(getcategory($fields['category2_id'])) . ", ";
 }
 if ($fields['category3_id'] != "0") {
     $tempcats .= urldecode(getcategory($fields['category3_id'])) . ", ";
 }
 if ($fields['category4_id'] != "0") {
     $tempcats .= urldecode(getcategory($fields['category4_id'])) . ", ";
 }
 //trim the string
 $tempcats = trim(htmlentities(substr($tempcats, 0, strrpos($tempcats, ",")), ENT_QUOTES, "UTF-8"));
 if ($tempcats != "") {
     echo "    <dc:subject>{$tempcats}</dc:subject>\n";
 }
 //author
 echo "    <dc:creator>\n" . getfullname($fields['author_id']) . "\n</dc:creator>\n";
 //description
 echo "    <description>\n";
 echo html_entity_decode(trim(strip_tags($fields['message_html'])), ENT_QUOTES);
 echo "\n    </description>\n";
 //bodytext
 echo "    <content:encoded>\n" . trim(htmlspecialchars($fields['message_html'], ENT_QUOTES));
 //hyperlinks
コード例 #5
0
<?php

include_once 'function.php';
is_admin();
if (isset($_POST['submit'])) {
    addproduct();
    //echo "dsf";
}
$allproduct = getproduct();
$x = getcategory();
?>
<html>
<head>
<link rel="stylesheet" href="css/styles.css">
  <link rel="stylesheet" href="css/style1.css">
  	<!-- TinyMCE -->
<script src="js/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="js/setup.js" type="text/javascript"></script/>
    <script src="js/tiny-mce/jquery.tinymce.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {
	
            setupTinyMCE();

        });
		
    </script>
	
    <!-- /TinyMCE -->
  <script>
    $(function(){
コード例 #6
0
<?php

/*
	[SupeSite] (C) 2007-2009 Comsenz Inc.
	$Id: admin_blocks_spaceitem.inc.php 13493 2009-11-11 06:15:33Z zhaofei $
*/
if (!defined('IN_SUPESITE_ADMINCP')) {
    exit('Access Denied');
}
if (!in_array($type, $_SGLOBAL['type']) && in_array($type, $_SCONFIG['closechannels'])) {
    showmessage('block_type_error');
}
$catlistarr = getcategory($type);
if (!isset($theblcokvalue['setitemid'])) {
    $theblcokvalue['setitemid'] = '';
}
if ($theblcokvalue['setitemid'] == '1') {
    $divsetitemid1display = '';
    $divsetitemid2display = 'none';
} else {
    $divsetitemid1display = 'none';
    $divsetitemid2display = '';
}
//multi
if (!isset($theblcokvalue['showmultipage'])) {
    $theblcokvalue['showmultipage'] = 0;
}
if ($theblcokvalue['showmultipage'] == '1') {
    $divshowmulti1display = 'none';
    $divshowmulti2display = '';
} else {
コード例 #7
0
<?php

include_once 'function.php';
is_admin();
if (isset($_POST['submit'])) {
    addcategory();
}
$allcategory = getcategory();
?>
<html>
    <head>
	<head>
<link rel="stylesheet" href="css/styles.css">
  <link rel="stylesheet" href="css/style1.css">
</head>
        <script type="text/javascript">
            function deletecategory(catid) {
                var r=confirm("Are you sure you want to delete this category");
                if (r==true) {
                    window.location.href='delete_category.php?id='+catid;
                }
            }
        </script>
		<!-- TinyMCE -->
<script src="js/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="js/setup.js" type="text/javascript"></script/>
    <script src="js/tiny-mce/jquery.tinymce.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {
	
            setupTinyMCE();
コード例 #8
0
ファイル: tpl.func.php プロジェクト: pan289091315/Discuz
/**
 * 顯示該模型下允許使用的分類
 *
 * @param string $type 模型
 */
function showfieldform($type)
{
    global $_G, $group;
    $categorylist = getcategory($type);
    foreach ($categorylist as $cid => $cate) {
        $catarr[$cate['upid']][$cid] = $cid;
    }
    $arr = getchilds($catarr, 0);
    echo '<tr><td class="td27" colspan="2" style="border:none;"><div class="fieldform" id="fieldform_' . $type . '"><div style="border-bottom: 1px dotted #DEEFFB; height:20px; line-height:20px;">' . lang('group_' . $type) . '</div>' . showcatelist($arr, $categorylist, 0, $group[$type . '_field'], $type) . '</div>';
    echo '<style>.fieldform{padding-left:20px;} .fieldform li {padding:5px 0 5px 0;}</style>';
    echo '</td></tr>';
}
コード例 #9
0
ファイル: category.php プロジェクト: thunderclap560/php

    <div class="content">
        <div class="header">
            <div class="stats">
</div>

            <h1 class="page-title">Dashboard</h1>
                    <ul class="breadcrumb">
            <li><a href="<?php 
echo $app_path;
?>
">Home</a> </li>
            <li class="active">
        	<?php 
$category = getcategory($category_id);
echo $category['level_name'];
?>
</li>
        </ul>

        </div>
        <div class="main-content">
            
<div class="row">
    <div class="col-sm-6 col-md-6 " style="width:100%">
        <div class="panel panel-default">
            <div class="panel-heading no-collapse"> <h4 style="color:#F00">Danh sách thành viên</h4>
                <span class="label label-warning"> 
                    <form action="." method="get"><input type="hidden" name="add_product" value="add_product"/>
                   <a href="<?php 
コード例 #10
0
/*
	[SupeSite] (C) 2007-2009 Comsenz Inc.
	$Id: admin_blocks_spaceitem.inc.php 11951 2009-04-16 01:34:12Z zhaolei $
*/

if(!defined('IN_SUPESITE_ADMINCP')) {
	exit('Access Denied');
}

@include_once S_ROOT.'/data/system/click.cache.php';

$clickgroupids = array_keys($_SGLOBAL['clickgroup']['postitems']);

if(empty($_GET['name'])) $_GET['name'] = 'news';
$catlistarr = getcategory($_GET['name']);

if(!isset($theblcokvalue['setitemid'])) $theblcokvalue['setitemid'] = '';
if($theblcokvalue['setitemid'] == '1') {
	$divsetitemid1display = '';
	$divsetitemid2display = 'none';
} else {
	$divsetitemid1display = 'none';
	$divsetitemid2display = '';
}

$blockarr = array();
$blockarr['where'][] = array(
	'setitemid' => array(
		'type' =>'radio',
		'alang' => 'block_'.$blocktype.'_title_setitemid',
コード例 #11
0
ファイル: 1c_integ.php プロジェクト: Apxe/Rubin_final
function import_saving_tovars(){
	global $par;
	$sql = 'SELECT * FROM `import_obj` WHERE 1';
	$res = mysql_query($sql);
	while( $line = mysql_fetch_array($res,MYSQL_ASSOC)){
		$code = $line['code'];
		$code_arr = explode('#',$code);
		$parent_id = 0;
		$elem = array();
		$categid = getcategory($line['group']);
		foreach($code_arr as $simle_code){
			$element = search_parent_element_code($simle_code,$parent_id,$categid); // insert or select
			$parent_id = $element['id'];
			$elem = $element;
		};		
		if($element['id']>0){
			/// update
			if(!empty($line['picture'])){
				$oldname = $_SERVER['DOCUMENT_ROOT'].'/upload/'.$line['picture'];
				//debug($oldname);
				if(is_file($_SERVER['DOCUMENT_ROOT'].'/upload/'.$line['picture'])){		
					debug($oldname);			
					$newname = $_SERVER['DOCUMENT_ROOT'].'/fotos/products/product_'.$element['id'].'.jpg';
					copy($oldname, $newfile);
				}
			}
			/// save picture
			$update_sql = "UPDATE ".$par->objectstable." SET `title`='".myaddslashes($line['title'])."', `parentid`=".$elem['parentid'].",`width`=".intval($line['width']).", `height`=".intval($line['height']).", `form`='".myaddslashes($line['form'])."', ";
			$update_sql .= "`design`=".intval($line['design']).", `color`='".myaddslashes($line['color'])."',`categid`=".$categid." WHERE `id`=".$element['id'];
			mysql_query($update_sql);
		}
		
	}
}
コード例 #12
0
                 if ($arrnum <= 0) {
                     break;
                 }
             }
         }
         if ($arrnum <= 0) {
             break;
         }
     }
 } elseif ($channel['type'] == 'model') {
     $itemsql = '';
     if (!empty($makecache['pro']['id'])) {
         $itemsql = ' AND itemid < \'' . $makecache['pro']['id'] . '\' ';
     }
     if (empty($catarr)) {
         $catarr = getcategory();
     }
     $catvalue = $catarr[$value];
     $listcount = $_SGLOBAL['db']->result($_SGLOBAL['db']->query('SELECT COUNT(*) FROM ' . tname($value . 'items') . ' WHERE 1 ' . $itemsql), 0);
     if ($listcount) {
         $query = $_SGLOBAL['db']->query('SELECT * FROM ' . tname($value . 'items') . ' WHERE 1 ' . $itemsql . ' ORDER BY itemid DESC');
         while ($item = $_SGLOBAL['db']->fetch_array($query)) {
             if ($arrnum <= 0) {
                 break;
             }
             $proarr['id'] = $item['itemid'];
             $elearr[] = 'action/model/name/' . $value . '/itemid/' . $item['itemid'];
             $arrnum--;
             if ($arrnum <= 0) {
                 break;
             }
コード例 #13
0
ファイル: addCategory.php プロジェクト: sandyliao80/oswaimai
}
if (isset($_GET['did'])) {
    $ssql = "SELECT `dinid` FROM `wm_dininfo` where `shopid`='{$sid}' and `dintype`='{$_GET['did']}' limit 0,1";
    $ts = $db->query($ssql)->fetch();
    if (empty($ts)) {
        $dsql = "delete from `wm_dincategory` where `shopid`='{$sid}' and `id`='{$_GET['did']}'";
        if ($db->query($dsql)) {
            echo "<font color='red'>删除成功</font>";
        } else {
            echo "<font color='red'>删除失败</font>";
        }
    } else {
        echo "<font color='red'>此类型已关联,无法进行删除</font>";
    }
}
$arr = getcategory($db, $sid, 0);
?>
<html>
<head>
<link rel="stylesheet" href="./css/main.css" type="text/css" />
</head>
<body>
  <table  width="30%" border=0 cellpadding=2 cellspacing=1 bordercolor="#799AE1" class=tableBorder>
    <tbody>
      <tr>
        <th align=center colspan=4 style="height: 23px">餐品类别|添加</th>
      </tr>
      <tr align="center" bgcolor="#799AE1">
        <td width="35%"  align="center" class=txlHeaderBackgroundAlternate>类别名称</td>
        <td colspan="2"  align="center" class=txlHeaderBackgroundAlternate>操作</td>
      </tr>  
コード例 #14
0
ファイル: exec.scrapper.php プロジェクト: BillTheBest/1.6.x
function GetCatzFromOpenDNS($sitename)
{
    echo "Testing {$sitename}\n";
    $uri = "http://domain.opendns.com/{$sitename}";
    $curl = new ccurl($uri);
    if (!$curl->get()) {
        echo "Unable to get {$uri}\n";
        return;
    }
    $categories = getcategory($curl->data);
    if (count($categories) == 0) {
        echo "Not found {$ligne["sitename"]} is not an array\n";
        return array();
    }
    return $categories;
}
コード例 #15
0
ファイル: admin_robots.php プロジェクト: superman1982/ng-cms
        echo label(array('type' => 'table-start', 'class' => 'listpage'));
        echo '<tr><td>' . $multipage . '</td></tr>';
        echo label(array('type' => 'table-end'));
    }
}
$output = '';
$s_url = S_URL;
//THE VALUE SHOW
if (is_array($thevalue) && $thevalue) {
    $savepicarr = array('0' => $alang['robot_savepic_0'], '1' => $alang['robot_savepic_1']);
    $saveflasharr = array('0' => $alang['robot_saveflash_0'], '1' => $alang['robot_saveflash_1']);
    $messagepagetypearr = array('page' => $alang['robot_messagepagetype_page'], 'next' => $alang['robot_messagepagetype_next']);
    $subjectallowrepeatarr = array('1' => $alang['robot_subjectallowrepeat_1'], '0' => $alang['robot_subjectallowrepeat_0']);
    //获取资讯分类
    $clistarr = getcategory('news');
    $allcatarr = getcategory();
    $catselectstr = '<select name="import">';
    $catselectstr .= '<option value="0">-------</option>';
    foreach ($allcatarr as $key => $cvalue) {
        if (empty($channels['types'][$key])) {
            continue;
        }
        $catselectstr .= '<optgroup label="' . $channels['types'][$key]['name'] . '">';
        foreach ($cvalue as $value) {
            $checkstr = $thevalue['importcatid'] == $value['catid'] ? ' selected' : '';
            $catselectstr .= '<option value="' . $key . '_' . $value['catid'] . '"' . $checkstr . '>' . $value['pre'] . $value['name'] . '</option>';
        }
        $catselectstr .= '</optgroup>';
    }
    $catselectstr .= '</select>';
    $autotype = array(1 => '', 2 => '');
コード例 #16
0
function postingcat($content)
{
    //returns a category belonging to a posting (works within postings-loop)
    global $currentcat;
    $att = getattributes($content);
    $tempname = getcategory($currentcat);
    $templinkname = killentities($tempname);
    if (isset($att['link']) and $att['link'] == "true") {
        $return = "<a href=\"index.php?cat={$templinkname}\" \n           title=\"All postings of category {$tempname}\">{$tempname}</a>";
    } else {
        $return = $tempname;
    }
    return $return;
}
コード例 #17
0
ファイル: search1.php プロジェクト: superman1982/ng-cms
<?php

/*
    [SupeSite] (C) 2007-2009 Comsenz Inc.
    $Id: batch.search.php 13489 2009-11-10 02:34:44Z zhaofei $
*/
include_once './common.php';
include_once S_ROOT . './language/batch.lang.php';
//权限
if (!checkperm('allowsearch')) {
    showmessage('no_permission');
}
$perpage = 30;
$urlplus = $wheresql = $message = $multipage = '';
$wherearr = $iarr = array();
$allcatarr = getcategory('', '|----', 0);
//echo $_POST['searchcate'];
empty($_GET['page']) ? $page = 1 : ($page = intval($_GET['page']));
$start = ($page - 1) * $perpage;
$searchcate = postget('searchcate');
//搜索类别,所属分类
if (!empty($searchcate)) {
    //313是“工具货架”,在toolitems表里对应的catid是311和291
    if ($searchcate == 313) {
        $wherearr[] = "(catid=311 or catid=291)";
    } else {
        $wherearr[] = 'catid=' . $searchcate;
    }
}
$searchtime = postget('searchtime');
//发布时间
コード例 #18
0
    if ($thevalue = $_SGLOBAL['db']->fetch_array($query)) {
    }
} elseif ($_GET['op'] == 'add') {
    //ONE ADD
    $thevalue = array('itemid' => 0);
} elseif ($_GET['op'] == 'viewmessage') {
    //ONE DELETE
    $query = $_SGLOBAL['db']->query('SELECT * FROM ' . tname('robotitems') . ' WHERE itemid=\'' . $_GET['itemid'] . '\'');
    if ($showvalue = $_SGLOBAL['db']->fetch_array($query)) {
        $query = $_SGLOBAL['db']->query('SELECT * FROM ' . tname('robotmessages') . ' WHERE itemid=\'' . $_GET['itemid'] . '\' ORDER BY msgid');
        $showvalue['message'] = array();
        while ($rmsg = $_SGLOBAL['db']->fetch_array($query)) {
            $showvalue['message'][] = $rmsg;
        }
        $robotarr = getrobot();
        $catarr = getcategory('news');
    } else {
        showmessage('robotmessage_none_exists');
    }
}
//MENU
echo '
<table summary="" id="pagehead" cellpadding="0" cellspacing="0" border="0" width="100%">
	<tr>
		<td><h1>' . $alang['rototmessage_title'] . '</h1></td>
		<td class="actions">
			<table summary="" cellpadding="0" cellspacing="0" border="0" align="right">
				<tr>
					<td' . $view0class . '><a href="' . $theurl . '" class="view">' . $alang['robotmessage_view_list_0'] . '</a></td>
					<td' . $view1class . '><a href="' . $theurl . '&isimport=1" class="view">' . $alang['robotmessage_view_list_1'] . '</a></td>
				</tr>
コード例 #19
0
ファイル: university.php プロジェクト: k0hei000/connect_new
    ?>
">
                                            <?php 
    $a = getuser($review['user_id']);
    echo $a['username'];
    ?>
   
                                        </a>
                                    </h3>
                                    <h2 class="text-center" style="background-color:#191970" style="padding:5px">
                                        <a style="color:white" href="user.php?id=<?php 
    echo $review['category_id'];
    ?>
">
                                            <?php 
    $b = getcategory($review['category_id']);
    echo $b['categoryname'];
    ?>
                                        </a>
                                    </h2>
                                    <p><?php 
    echo $review['body'];
    ?>
</p>
                                </div>
                            </div>
                         </div>
                     <?php 
}
?>
                </div>
コード例 #20
0
ファイル: cp_news.php プロジェクト: superman1982/ng-cms
    }
    if ($do == 'pass') {
        $query = $_SGLOBAL['db']->query('SELECT * FROM ' . tname('spaceitems') . ' i LEFT JOIN ' . tname('spacenews') . " n USING (itemid) WHERE i.itemid='{$itemid}'");
    } else {
        $query = $_SGLOBAL['db']->query('SELECT * FROM ' . tname('postitems') . ' i LEFT JOIN ' . tname('postmessages') . " m USING (itemid) WHERE i.itemid='{$itemid}'");
    }
    if (!($item = $_SGLOBAL['db']->fetch_array($query))) {
        showmessage('no_item', 'cp.php?ac=news&op=list');
    }
    $checkedarr = explode(',', $item['othercatid']);
    $id = $do == 'pass' ? $item['itemid'] : (empty($item['oitemid']) ? $item['itemid'] : $item['oitemid']);
    $item['tagname'] = gettagname($id, '0');
    //TAG
    $type = $item['type'];
}
$catarr = getcategory($type);
$mpurlstr = str_replace(array(' ', 'AND', '\''), array('', '&', ''), $wheresql);
#Modify by chenguoren
$thevalue['allowmax'] = 100;
$thevalue[allowtype] = '';
$thevalue['noinsert'] = 0;
$thevalue['hash'] = smd5($_SGLOBAL['supe_uid'] . '/' . $_SGLOBAL['timestamp'] . random(6));
//setcookie('attachhash', $thevalue['hash']);
#End
if ($op == 'add') {
    if (empty($item)) {
        $mktitlestyle = '';
        $item = array('subject' => '', 'catid' => $catid, 'message' => '', 'tagname' => '', 'newsauthor' => '', 'newsfrom' => '', 'newsfromurl' => '');
    }
} elseif ($op == 'edit') {
    if ($itemid && ($item['uid'] != $_SGLOBAL['supe_uid'] || empty($_SGLOBAL['supe_uid']))) {
コード例 #21
0
\t</tr>
\t<tr>
\t\t<th>{$alang['index_domain']}</th>
\t\t<td><input type="input"  name="index_domain" value="{$_SCONFIG['index_domain']}" size="30"></td>
\t</tr>
\t</table>
\t<div class="buttons">
\t<input type="hidden" name="indexsubmit" value="true" />
\t<input type="submit" name="submit" id="submit" value="{$alang['save_setup_submit']}" class="submit">
\t<input type="reset" name="indexreset" value="{$alang['common_reset']}">
\t</div>
\t</form>
\t
END;
} elseif ($op == 'makeall') {
    $clistarr = getcategory('news');
    $categorylistarr = array('0' => array('pre' => '', 'name' => $alang['make_all_news']));
    foreach ($clistarr as $key => $value) {
        $categorylistarr[$key] = $value;
    }
    $thevalue = array('perlisthtml' => '20', 'pre_html' => '');
    $formhash = formhash();
    print <<<END
\t<form method="post" name="theform" id="theform" action="{$theurl}">
\t<input type="hidden" name="formhash" value="{$formhash}">
\t<table cellspacing="0" cellpadding="0" width="100%" class="maintable">
\t<tr>
\t\t<th>{$alang['news_cat']}</th>
\t\t<td>
\t\t\t<select name="catid">
END;
コード例 #22
0
function postingcat($content)
{
    //returns a category belonging to a posting (works within postings-loop)
    global $currentcat;
    $att = getattributes($content);
    $tempname = getcategory($currentcat);
    $tempname2 = htmlentities(urldecode($tempname), ENT_QUOTES, "UTF-8");
    if (isset($att['link']) and $att['link']) {
        $return = "<a href=\"index.php?cat={$tempname}\" \n           title=\"All postings of category {$tempname2}\">{$tempname2}</a>";
    } else {
        $return = $tempname2;
    }
    return $return;
}