Ejemplo n.º 1
0
function template_manage_cats()
{
    global $scripturl, $txt, $context;
    echo '
	<table border="0" width="80%" cellspacing="0" align="center" cellpadding="4" class="tborder">
		<tr class="titlebg">
			<td>' . $txt['smflinks_managecats'] . '</td>
		</tr>
		<tr class="windowbg">
			<td>

		<table cellspacing="0" cellpadding="10" border="0" align="center" width="90%" class="tborder">
			<tr>
				<td class="titlebg">' . $txt['smflinks_ctitle'] . '</td>
				<td class="titlebg">' . $txt['smflinks_description'] . '</td>
				<td class="titlebg">' . $txt['smflinks_totallinks'] . '</td>
				<td class="titlebg">' . $txt['smflinks_options'] . '</td>
			</tr>
		';
    foreach ($context['links_cats'] as $row) {
        $totallinks = GetLinkTotals($row['ID_CAT']);
        echo '<tr>';
        echo '<td class="windowbg2"><a href="' . $scripturl . '?action=links;cat=' . $row['ID_CAT'] . '">' . parse_bbc($row['title']) . '</a></td>';
        echo '<td class="windowbg2">' . parse_bbc($row['description']) . '</td>';
        echo '<td class="windowbg2">' . $totallinks . '</td>';
        // Show Edit Delete and Order category
        echo '<td class="windowbg2"><a href="' . $scripturl . '?action=links;sa=catperm;cat=' . $row['ID_CAT'] . ';sesc=' . $context['session_id'] . '">' . $txt['smflinks_txt_perm'] . '</a>&nbsp;<a href="' . $scripturl . '?action=links;sa=catup;cat=' . $row['ID_CAT'] . ';a=admin;sesc==' . $context['session_id'] . '">' . $txt['smflinks_txtup'] . '</a>&nbsp;<a href="' . $scripturl . '?action=links;sa=catdown;cat=' . $row['ID_CAT'] . ';a=admin;sesc==' . $context['session_id'] . '">' . $txt['smflinks_txtdown'] . '</a></span>&nbsp;<a href="' . $scripturl . '?action=links;sa=editcat;cat=' . $row['ID_CAT'] . ';a=admin;sesc==' . $context['session_id'] . '">' . $txt['smflinks_txtedit'] . '</a>&nbsp;<a href="' . $scripturl . '?action=links;sa=deletecat;cat=' . $row['ID_CAT'] . ';a=admin;sesc==' . $context['session_id'] . '">' . $txt['smflinks_txtdel'] . '</a></td>';
        echo '</tr>';
    }
    echo '<tr><td class="windowbg2" colspan="4" align="center">
			<a href="' . $scripturl . '?action=links;sa=addcat;a=admin">' . $txt['smflinks_addcat'] . '</a>

		</td></tr>
		</table>
		</tr>
		<tr>
		<td class="windowbg">
		<strong>Has SMF Links helped you?</strong> Then support the developers:<br />
    <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
	<input type="hidden" name="cmd" value="_xclick">
	<input type="hidden" name="business" value="*****@*****.**">
	<input type="hidden" name="item_name" value="SMF Links">
	<input type="hidden" name="no_shipping" value="1">
	<input type="hidden" name="no_note" value="1">
	<input type="hidden" name="currency_code" value="USD">
	<input type="hidden" name="tax" value="0">
	<input type="hidden" name="bn" value="PP-DonationsBF">
	<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-butcc-donate.gif" border="0" name="submit" alt="Make payments with PayPal - it is fast, free and secure!">
	<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1" />
</form>
<br />
			<table>
				<tr>
				<td>
				<a href="https://chitika.com/publishers/apply.php?refid=vbgamer46"><img src="http://www.smfhacks.com/chitika250x250.png" border="0"></a>
				</td>
				<td>
								<a href="http://www.kqzyfj.com/click-3289266-10408495" target="_top">
<img src="http://www.tqlkg.com/image-3289266-10408495" width="120" height="60" alt="" border="0"/></a>

				</td>
				</table>
	</td>
	</tr>
	</table>';
    LinksCopyright();
}
Ejemplo n.º 2
0
function ShowSubCats($cat, $g_manage)
{
    global $txt, $db_prefix, $scripturl, $subcats_linktree, $context;
    // List all the catagories
    $dbresult = db_query("\n\tSELECT \n\t\tID_CAT, title, roworder, description, image \n\tFROM {$db_prefix}links_cat \n\tWHERE ID_PARENT = {$cat} ORDER BY roworder ASC", __FILE__, __LINE__);
    if (db_affected_rows() != 0) {
        echo '
			<table cellspacing="0" cellpadding="10" border="0" align="center" width="90%" class="tborder">
				<tr>
					<td class="titlebg" colspan="2">', $txt['smflinks_ctitle'], '</td>
					<td class="titlebg">', $txt['smflinks_description'], '</td>
					<td class="titlebg">', $txt['smflinks_totallinks'], '</td>
					', $g_manage ? '<td class="titlebg">' . $txt['smflinks_options'] . '</td>' : '', '
				</tr>
			';
        while ($row = mysql_fetch_assoc($dbresult)) {
            $totallinks = GetLinkTotals($row['ID_CAT']);
            echo '<tr>';
            if (empty($row['image'])) {
                echo '<td colspan="2" class="windowbg2"><a href="' . $scripturl . '?action=links;cat=' . $row['ID_CAT'] . '">' . parse_bbc($row['title']) . '</a></td><td class="windowbg2">' . parse_bbc($row['description']) . '</td>';
            } else {
                echo '
						<td class="windowbg2"><a href="' . $scripturl . '?action=links;cat=' . $row['ID_CAT'] . '"><img src="' . $row['image'] . '" border="0" alt="" /></a></td>
						<td class="windowbg2"><a href="' . $scripturl . '?action=links;cat=' . $row['ID_CAT'] . '">' . parse_bbc($row['title']) . '</a></td><td class="windowbg2">' . parse_bbc($row['description']) . '</td>
					';
            }
            echo '<td class="windowbg2">', $totallinks, '</td>';
            // Show Edit Delete and Order category
            if ($g_manage) {
                echo '<td class="windowbg2"><a href="' . $scripturl . '?action=links;sa=catup;cat=' . $row['ID_CAT'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '">' . $txt['smflinks_txtup'] . '</a>&nbsp;<a href="' . $scripturl . '?action=links;sa=catdown;cat=' . $row['ID_CAT'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '">' . $txt['smflinks_txtdown'] . '</a></span>&nbsp;<a href="' . $scripturl . '?action=links;sa=catperm;cat=' . $row['ID_CAT'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '">' . $txt['smflinks_txt_perm'] . '</a>&nbsp;<a href="' . $scripturl . '?action=links;sa=editcat;cat=' . $row['ID_CAT'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '">' . $txt['smflinks_txtedit'] . '</a>&nbsp;<a href="' . $scripturl . '?action=links;sa=deletecat;cat=' . $row['ID_CAT'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '">' . $txt['smflinks_txtdel'] . '</a></td>';
            }
            echo '</tr>';
            if (!empty($subcats_linktree)) {
                echo '
						<tr class="titlebg">
							<td colspan="', $g_manage ? '5' : '4', '">&nbsp;<span class="smalltext">', $subcats_linktree != '' ? $txt['smflinks_sub_cats'] . $subcats_linktree : '', '</span></td>
						</tr>
					';
            }
        }
        echo '
		</table>
		<br /><br />';
        mysql_free_result($dbresult);
    }
}
Ejemplo n.º 3
0
function template_manage_cats()
{
    global $scripturl, $txt, $context;
    echo '
	<div class="cat_bar">
		<h3 class="catbg">
        ', $txt['smflinks_managecats'], '
        </h3>
  </div>
	<table border="0" width="100%" cellspacing="0" align="center" cellpadding="4" class="tborder">
		<tr class="windowbg">
			<td>

		<table cellspacing="0" cellpadding="10" border="0" align="center" width="90%" class="tborder">
			<tr>
				<td class="titlebg">' . $txt['smflinks_ctitle'] . '</td>
				<td class="titlebg">' . $txt['smflinks_description'] . '</td>
				<td class="titlebg">' . $txt['smflinks_totallinks'] . '</td>
				<td class="titlebg">' . $txt['smflinks_options'] . '</td>
			</tr>
		';
    $styleClass = 'windowbg';
    foreach ($context['links_cats'] as $row) {
        $totallinks = GetLinkTotals($row['ID_CAT']);
        echo '<tr>';
        echo '<td class="windowbg2"><a href="' . $scripturl . '?action=links;cat=' . $row['ID_CAT'] . '">' . parse_bbc($row['title']) . '</a></td>';
        echo '<td class="windowbg2">' . parse_bbc($row['description']) . '</td>';
        echo '<td class="windowbg2">' . $totallinks . '</td>';
        // Show Edit Delete and Order category
        echo '<td class="windowbg2"><a href="' . $scripturl . '?action=links;sa=catperm;cat=' . $row['ID_CAT'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '">' . $txt['smflinks_txt_perm'] . '</a>&nbsp;<a href="' . $scripturl . '?action=links;sa=catup;cat=' . $row['ID_CAT'] . ';a=admin;' . $context['session_var'] . '=' . $context['session_id'] . '">' . $txt['smflinks_txtup'] . '</a>&nbsp;<a href="' . $scripturl . '?action=links;sa=catdown;cat=' . $row['ID_CAT'] . ';a=admin;' . $context['session_var'] . '=' . $context['session_id'] . '">' . $txt['smflinks_txtdown'] . '</a></span>&nbsp;<a href="' . $scripturl . '?action=links;sa=editcat;cat=' . $row['ID_CAT'] . ';a=admin;' . $context['session_var'] . '=' . $context['session_id'] . '">' . $txt['smflinks_txtedit'] . '</a>&nbsp;<a href="' . $scripturl . '?action=links;sa=deletecat;cat=' . $row['ID_CAT'] . ';a=admin;' . $context['session_var'] . '=' . $context['session_id'] . '">' . $txt['smflinks_txtdel'] . '</a></td>';
        echo '</tr>';
        if ($styleClass == 'windowbg') {
            $styleClass = 'windowbg2';
        } else {
            $styleClass = 'windowbg';
        }
    }
    echo '<tr><td class="windowbg2" colspan="4" align="center">
			<a href="' . $scripturl . '?action=links;sa=addcat;a=admin">' . $txt['smflinks_addcat'] . '</a>

		</td></tr>
		</table>
		</tr>
		
	</table>';
}