#!/usr/bin/perl # DCLinks 2000 Version 1.1 # June 06 2000 # # Revision History # DCLinks 2000 1.1 - 06/06/2000 # - added new filelock # - added dropdown menu # # DCLinks 2000 1.0 Release on 06 Jan 2000 # - Major upgrade # DCLinks 1998 Release on 16 November 1997 # # DCLinks 2000 Version 1.000 # dclinks.setup # Jan 20 2000 # # ########## YOU MUST KEEP THIS COPYRIGHTS NOTICE INTACT ############### # Copyright ©1997-2000 DCScripts All Rights Reserved # As part of the installation process, you will be asked # to accept the terms of this Agreement. This Agreement is # a legal contract, which specifies the terms of the license # and warranty limitation between you and DCScripts and DCLinks. # You should carefully read the following terms and conditions before # installing or using this software. Unless you have a different license # agreement obtained from DCScripts, installation or use of this software # indicates your acceptance of the license and warranty limitation terms # contained in this Agreement. If you do not agree to the terms of this # Agreement, promptly delete and destroy all copies of the Software. # # Versions of the Software # -------------------------------------------------------------------------- # You may install as many copies of DCLinks Script for free # on personal and non-profit sites. Otherwise, a single license # of DCLinks is $35 (USD). # # License to Redistribute # -------------------------------------------------------------------------- # Distributing the software and/or documentation with other products # (commercial or otherwise) or by other than electronic means without # DCScripts's prior written permission is forbidden. # # All rights to the DCLinks software and documentation not expressly # granted under this Agreement are reserved to DCScripts. # # Disclaimer of Warranty # THIS SOFTWARE AND ACCOMPANYING DOCUMENTATION ARE PROVIDED "AS IS" AND # WITHOUT WARRANTIES AS TO PERFORMANCE OF MERCHANTABILITY OR ANY OTHER # WARRANTIES WHETHER EXPRESSED OR IMPLIED. BECAUSE OF THE VARIOUS HARDWARE # AND SOFTWARE ENVIRONMENTS INTO WHICH DCLINKS MAY BE USED, NO WARRANTY OF # FITNESS FOR A PARTICULAR PURPOSE IS OFFERED. THE USER MUST ASSUME THE # ENTIRE RISK OF USING THIS PROGRAM. ANY LIABILITY OF DCSCRIPTS WILL BE # LIMITED EXCLUSIVELY TO PRODUCT REPLACEMENT OR REFUND OF PURCHASE PRICE. # IN NO CASE SHALL DCSCRIPTS BE LIABLE FOR ANY INCIDENTAL, SPECIAL OR # CONSEQUENTIAL DAMAGES OR LOSS, INCLUDING, WITHOUT LIMITATION, LOST PROFITS # OR THE INABILITY TO USE EQUIPMENT OR ACCESS DATA, WHETHER SUCH DAMAGES ARE # BASED UPON A BREACH OF EXPRESS OR IMPLIED WARRANTIES, BREACH OF CONTRACT, # NEGLIGENCE, STRICT TORT, OR ANY OTHER LEGAL THEORY. THIS IS TRUE EVEN IF # DCSCRIPTS IS ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. IN NO CASE WILL # DCSCRIPT'S LIABILITY EXCEED THE AMOUNT OF THE LICENSE FEE ACTUALLY PAID # BY LICENSEE TO DCSCRIPTS. # ########################################################################### use Encode; $cgidir = "."; # NO NEED TO EDIT BELOW THIS LINE IF YOU ARE USING # THE DEFAULT SETUP require "$cgidir/dclinks.setup"; require "$cgidir/cgi-lib.pl"; require "$cgidir/dclinkslib.pl"; # OK Let's read in formdata ReadParse(); $r_in = \%in; # Cookie name $in{'cookie_name'} = "DCProtectSessionID"; # OK, before we do anything, let's check the user's session ID # If it exists then read in user data $r_in->{'userdata'} = get_session(); $j = -1; foreach (@link_fields) { $j++; $field_id{$_} = $j; } # Create files if not found check_datafile($datafile,[]); check_datafile($counter,[]); if ($in{'action'} eq 'set_sort_index') { set_sort_index($in{'field'}); exit; } elsif ($in{'action'} eq 'redirect') { update_view( $in{"id"} ); print "Location: $in{'URL'}\n\n"; exit; } # Send HTTP header to the server print_header(); # Format Comment input so that it will fit nicely in the database $in{'Description'} = form_to_text($in{'Description'}); # Depending on Form input: # 1) Display add to links form # 2) Add Link information to the database # 3) Display Links #$header = $title; $cat1 = $in{'category'}; $cat1 =~ s/\s/+/g; $menu = qq~ Página Principal | Añadir Enlace | Buscar Enlace ~; if ($r_in->{'userdata'}->{'Group'} eq 'admin') { $menu .= qq~ | Administración Directorio | Salir ~; } #ATENCIÓN AHORA SÓLO SE PERMITE AÑADIR ENLACES DESDE EL PANEL DE ADMINISTRACION DE LA SECCION DIRECTORIO $r_data = readdata($datafile); #if ($in{'action'} eq "add_form") { # print_header_end(); # $sub_header = "Por favor, rellene el siguiente formulario para añadir su página."; # add_form(); #} if ($in{'action'} eq "add_search") { print_header_end(); add_search(); } elsif ($in{'action'} eq "search_links") { print_header_end(); search_links(); } #elsif ($in{'action'} eq "add_links") { # if (incomplete_form()) { # print_header_end(); # $sub_header = "ERROR! Formulario incompleto."; # add_form(); # } # elsif (duplicate_url()) { # print_header_end(); # $sub_header = "ERROR! URL ya registrada en el directorio !!."; # add_form(); # } # else { # print_header_end(); # add_links(); # $sub_header = "Su enlace ha sido añadido a nuestra base de datos."; # $html_output = qq~ #
| Directorio | ||
| $cat1
($category_num{"$cat1"})
$Category_desc{$cat1} |
~;
$cat = $Category_list[2*$j+1];
$cat1 = $cat;
$cat =~ tr/ /+/;
if ($category_num{"$cat1"} eq "" ) {
$category_num{"$cat1"} = "0";
}
if ($Category_desc{$cat1}) {
$html_output .= qq~
$cat1
($category_num{"$cat1"})
$Category_desc{$cat1} |
~;
}
else {
$html_output .= qq~
~; } $html_output .= " |
| Page $pages |
| Listado ordenado por $sorted_by_trans{$sort_by_field} Ordenar por : Nombre | Novedades | Más vistos | País |
|
$link[$field_id{"ID"}]~;
if ($r_in->{'userdata'}->{'Group'} eq 'admin') {
$html_output .= qq~
D E ~; } $html_output .= qq~ |
$link[$field_id{"Name"}] http://$link[$field_id{"Homepage"}] |
||||
|
$link[$field_id{"Description"}]
| |||||
| $ldate $ltime | $link[$field_id{"Views"}] Vistas | $votes Votos | Puntuación: $score | Califica este web | |
| Page $pages |
| Pág. $pages |
| Enlaces encontrados: $num_links Listado ordenado por $sorted_by_trans{$sort_by_field} Ordenar por : Nombre | Novedades | Más vistos | País |
|
$link[$field_id{"ID"}]~;
if ($r_in->{'userdata'}->{'Group'} eq 'admin') {
$html_output .= qq~
B M ~; } $html_output .= qq~ |
$link[$field_id{"Name"}] http://$link[$field_id{"Homepage"}] $link[$field_id{"Country"}] |
||||
|
$link[$field_id{"Description"}]
$link[$field_id{"EMail"}] |
|||||
| $ldate $ltime | $link[$field_id{"Views"}] Vistas | $votes Votos | Puntuación: $score | Califica este web | |
| Pág. $pages |