|
#
# linkster.php
#
# *******************************************************
# * *
# * Linkster 1.0 - a PHP/MySQL link indexing script *
# * *
# * [ March 21, 2001 ] *
# * *
# *******************************************************
#
# Copyright 2001 Steve Gliebe. All rights reserved.
#
# Linkster 1.0 is distributed by Dream Dolphin Studio (http://dreamdolphin.com) as freeware.
# It may be used and modified for your own use as long as this copyright/usage note remains
# intact and unchanged in each place it appears. You may not sell or distribute the code of
# Linkster 1.0, in whole or part, without the expressed written consent of Steve Gliebe and
# Dream Dolphin Studio.
#
# By using Linkster 1.0 you agree to indemnify Steve Gliebe and Dream Dolphin Studio from
# any liability.
#
# Being freeware, support for this script is not offered by Steve Gliebe or Dream Dolphin
# Studio. Installation is offered for a small fee by Dream Dolphin Studio as well as custom
# programming, web design, and graphic design services. Visit http://dreamdolphin.com for
# more information.
#
require("common.php");
######### CLICK COUNT #########
if ($QUERY_STRING && $LID && $URL) {
mysql_query("UPDATE $link_table SET Clicks = Clicks+1 WHERE ID = $LID"); // add 1 to click count
header("Location: $URL"); // send user to website
}
######### PRINT HEADER/MENU #########
if ($public_add == "yes" || $QUERY_STRING) {
echo "\n\n";
echo " \n";
echo " \n";
echo " \n";
}
if ($public_add == "yes" && $action != "add_link") {
echo " Link eintrage\n";
}
if ($mode == "flat" && $action == "add_link") {
echo " Zur Linkliste\n";
}
if ($mode == "leveled" && $QUERY_STRING) {
echo " Zurück zur Auswahl\n";
}
if ($public_add == "yes" || $QUERY_STRING) {
echo " | \n";
echo " \n";
echo " \n";
echo "\n";
}
######### FLAT MODE #########
if ($mode == "flat" && !$QUERY_STRING) {
$query = "SELECT $link_table.ID AS LID, Clicks, Website, URL, $link_table.Description AS LDescription, $cat_table.ID AS CID, Category, $cat_table.Description AS CDescription FROM $cat_table, $link_table WHERE $cat_table.ID = $link_table.Cat_ID ORDER BY $cat_order, $links_order";
print_table ($query, $PHP_SELF, $tbl_border, $tbl_cellpadding, $tbl_cellspacing, $tbl_width, $tbl_align, $row1_color, $row2_color, $row3_color, $Category, $CDescription, $LID, $URL, $Website, $LDescription, $Clicks, $show_clicks, $show_credit, $credit_html, $new_window, $cat_table, $link_table);
}
######### LEVELED MODE #########
if ($mode == "leveled" && !$LID && !$URL) {
// print categories
if (!$QUERY_STRING) {
$query = "SELECT * FROM $cat_table ORDER BY $cat_order";
$result = mysql_query($query) or die("Error: No data exists. \n |