Exemple #1
0
function GetParentLink($ID_CAT)
{
    global $smcFunc, $context, $scripturl;
    if ($ID_CAT == 0) {
        return;
    }
    $dbresult1 = $smcFunc['db_query']('', '
		SELECT ID_PARENT,title
		FROM {db_prefix}links_cat
		WHERE ID_CAT = {int:this_cat}
		LIMIT 1', array('this_cat' => $ID_CAT));
    $row1 = $smcFunc['db_fetch_assoc']($dbresult1);
    $smcFunc['db_free_result']($dbresult1);
    GetParentLink($row1['ID_PARENT']);
    $context['linktree'][] = array('url' => $scripturl . '?action=links;cat=' . $ID_CAT, 'name' => $row1['title']);
}
Exemple #2
0
function GetParentLink($ID_CAT)
{
    global $db_prefix, $context, $scripturl;
    if ($ID_CAT == 0) {
        return;
    }
    $dbresult1 = db_query("\n\t\tSELECT\n\t\t\tID_PARENT, title\n\t\tFROM {$db_prefix}links_cat\n\t\tWHERE ID_CAT = {$ID_CAT} LIMIT 1", __FILE__, __LINE__);
    $row1 = mysql_fetch_assoc($dbresult1);
    mysql_free_result($dbresult1);
    GetParentLink($row1['ID_PARENT']);
    $context['linktree'][] = array('url' => $scripturl . '?action=links;cat=' . $ID_CAT, 'name' => $row1['title']);
}
Exemple #3
0
function GetParentLink($ID_CAT)
{
    global $smcFunc, $context, $scripturl;
    if (empty($ID_CAT)) {
        return;
    }
    $dbresult1 = $smcFunc['db_query']('', '
		SELECT ID_PARENT,title
		FROM {db_prefix}links_cat
		WHERE ID_CAT = {int:this_cat}
		LIMIT 1', array('this_cat' => $ID_CAT));
    if ($smcFunc['db_num_rows']($dbresult1) == 0) {
        fatal_error($txt['smflinks_nocatselected'], false);
    } else {
        $row1 = $smcFunc['db_fetch_assoc']($dbresult1);
    }
    $smcFunc['db_free_result']($dbresult1);
    GetParentLink($row1['ID_PARENT']);
    $context['linktree'][] = array('url' => $scripturl . '?action=links;cat=' . $ID_CAT, 'name' => $row1['title']);
}