#!/usr/bin/perl # The line above MUST point to the location of Perl 5 on your server if # you are running this program on a Unix server. Windows NT users can # almost always ignore this line. ##################################################################### # # e-Classifieds(TM) Free Edition # Version 3.1 # Last Modified: 6/19/2000 # Copyright © Hagen Software Inc. All rights reserved. # # By purchasing, installing, copying, downloading, accessing or otherwise # using the SOFTWARE PRODUCT, or by viewing, copying, creating derivative # works from, appropriating, or otherwise altering all or any part of its # source code (including this notice), you agree to be bound by the terms # of the EULA that accompanied this product, as amended from time to time # by Hagen Software Inc. The EULA can also be viewed online at # "http://www.e-classifieds.net/support/license.html" # # As explained in the EULA, Hagen Software offers absolutely # no warranties on this product, which is sold and/or distributed # "as is". You, and not Hagen Software, assume all risks # associated with using this product, including but not limited # to the risk of failure of the product to install or to operate # successfully on your server, and responsibility for all content # created by users of this product. # # This product, including all source code, is copyrighted by # Hagen Software, and it is protected under both United States law # and international laws and treaties. You may not redistribute this # software, in whole or any part thereof, or use any part of the source # code contained within this software to create derivative works, # without the prior express written consent of Hagen Software. # Nor may you remove any of the copyright notices contained # either within the source code or on the HTML pages generated # by the program. Doing so constitutes a criminal offense # punishable by imprisonment. # We prosecute all violators via both civil legal actions and in # cooperation with U.S. and international criminal authorities. # YOU HAVE BEEN WARNED! # # The Hagen Software web site is located at the following URL: # http://www.hagensoftware.com # ##################################################################### # The user-configurable variables are listed below. You need to define these # before uploading the program, or it will not work properly. # Most of these variables are in the following format: # $variable = "value"; # The # symbol will not be in front of the actual variables, however, as this # is used to "comment out" lines in Perl. In other words, lines that begin with # the # symbol are ignored by Perl when it executes the program. The $ sign # is used to indicate variables in Perl, while the items in between the quotation # marks represent the assigned value of that variable. The semicolon indicates # the end of the statement. Therefore, in the example above, if you wanted to # change the value for that variable, the only thing that you should change is # the portion in between the quotation marks. For example, to change the value # of the variable $variable to "red", you would edit it as follows: # $variable = "red"; # Again, you would not put the # symbol in front of $variable. We did that # here only because this is an example that we do not want the program to # actually execute. # Two other things you should note are that if you use quotation marks as part # of the value (in other words, inside of the quotation marks that define the # value), then you must "comment them out" by putting a back slash symbol (the # "\" symbol) in front of them. For example: # $variable = "The \"red\" light"; # Also, if you use the @ symbol in any of your value statements, you must # similarly comment it out by putting a backslash symbol in front of it, # such as in the following: # $my_email_address = "me\@mydomain.com"; ################################################################# # The variables are defined below. # $script_url should be set to the full URL of this classifieds program on your # server. $script_url = "http://www.averlo.com/local-cgi/clasificados/classi.cgi"; # $master_admin_email_address should be set to your e-mail address $master_admin_email_address="webmaster\@averlo.com"; # $admin_name should be set to the name of the administrator $admin_name = "Webmaster"; # $sitename should be set to the name of your web site $sitename = "Averlo.com"; # $siteurl should be set to the full URL of your web site $siteurl = "http://www.averlo.com/"; # $slogan should be set to whatever slogan or catchphrase you use for your site $slogan = "\"Portal y Motor de Búsqueda en español!\""; # $sendmail should be set to the full server path to sendmail on your Unix server # By default, this is set to "/usr/sbin/sendmail", but on many Unix systems, it is # located at "/usr/lib/sendmail". If you don't know this, you might try typing # "whereis sendmail" or "which sendmail" from a Telnet prompt. # If you are running this program on Windows NT, you should set this to "". You # will not be able to use the e-mail routines for this program on a Windows NT # server. The commercial versions of the program include e-mail routines for # both Windows NT and Unix. $sendmail = "/usr/lib/sendmail"; # The following variable specifies the administrative password. You can # (and should) change this to whatever you want. $admin_password = "caropoli"; # The following variable specifies the special multiplier that will be # used to generate a unique password for each ad. Please change this from # the default so that other users of this program will not be able to guess # your users' passwords. Also, we recommend against setting this to a round # number such as 1000, etc. It's much better to use a random number such as # 2748, etc. $password_multiplier = "4032"; # If set equal to "on", $notify_add will cause the program to notify the administrator # by e-mail anytime that an ad is posted to the system $notify_add = "on"; # If set equal to "on", $reply_user will cause the program to send a reply e-mail # to the user who just posted an ad thanking them and reminding them of their ad # number so that they can delete their ad in the future $reply_user = "on"; # If set equal to "on", $notify_delete will cause the program to notify the # administrator by e-mail anytime someone deletes an ad $notify_delete = "on"; # If set equal to "on", $notify_delete_all will cause the program to notify the # administrator by e-mail anytime someone uses the administrative function to delete # all ads in a category. Normally, you would receive this message after deleting the # ads yourself, but this could be useful for informing you if someone obtains your # administrative password and deletes all ads in a particular category without your # knowledge or permission. $notify_delete_all = "on"; # $classdir should point to the full server path of the new directory that you created # for this program where the ads.counter file and the HTML pages for the ads will be # stored. For Unix servers, this new directory should have its permissions set to 777. # For Windows NT users, this should point to the full server path to this directory, # beginning with the drive letter and using forward slashes instead of backslashes, # such as "d:/InetPub/wwwroot/ads". $classdir = "/sites/averlo.com/public_html/clasificados"; # $htmldir should point to the full URL of the new directory that you created for # this program where the ads.counter file and the HTML pages for the ads will be # stored. You should also store the e-Classifieds logo graphic here, as the license # for this free product requires you to display this logo in order to protect our # trademark rights, intellectual property rights, and other legal rights. # Do *not* include the trailing slash ("/") at the end. $htmldir = "http://www.averlo.com/clasificados"; # The @categories array defines the ad categories that the program will use. For each # category, you need to list it in the following format: # "Long Name of Category|shortname|Description", where the long name is the name that will be displayed # at the top of pages in that category. This can contain several words and spaces. The # short name can contain only one word with no spaces, as this is used internally by the # program for keeping track of the categories. The Description will be listed underneath # this category on the front page of the classifieds. @categories = ("Adultos|adultos|Escorts, acompañantes, Peliculas, Sex shop, Sitios, Lugares", "Anuncios|anuncios|Bodas, Cumpleaños, Ventas, Eventos, Anuncios Legales", "Alquileres|alquileres|Casas, Departamentos, Salones de fiestas, otros", "Automoviles|autos|Autos, Camiones, Vans, Autos Deportivos", "Búsqueda|busqueda|de personas, datos, materia prima, cosas, ...", "Canjes y Permutas|canjes|Canjes, permutas", "Coleccionistas|coleccionistas|Antiguedades, Juguetes, Monedas, Estampillas, Historietas", "Computadoras & Software|computer|De escritorio, Portátiles, Accesorios, Software", "Cursos y Educación|cursos|Cursos, posgrados", "Empleo|empleo|Ofrecidos, Pedidos, Currículums", "Gratis y Donaciones|gratis|Gratis, donaciones, regalos", "Inmobiliarios Comercial|imcomercial|Oficinas, galpones, ...", "Inmobiliarios Residencial|imresidencial|Departamentos, casas,...", "Mascotas|mascotas|Mascotas, Animales, Suministros", "Mercadería General|mercaderia|Antiguedades, sobrantes, ...", "Oportunidades de Negocios|opnegocios|Oportunidades de Negocios, Desde Casa, Inversiones", "Personales|personales|Avisos Personales, Búsqueda de Personas, Amigos, Actividades", "Salud y Belleza|salud|Salud, gimnasia, terapia", "Servicios Profesionales|servicios|Contable, Legal, Secretarial, Domestico", "Viajes y Espectáculos|viajes|Paquetes, vuelos, conciertos"); # This subroutine defines the HTML for the pages that store the ads for each category. # Please be careful to modify only the HTML in between the "qq~" and # the "~;" code, or you will cause a syntax error that will break the program. sub print_default_html { print HTMLFILE qq~ $sitename Clasificados - $long_category_name $head_code
$upper_left_corner
left right
Opciones de Búsqueda

Buscar Avisos

Opciones de Avisos

Agregar aviso

Borrar Aviso

Otras Opciones

Admin

Home Clasificados

Tu portal en español
left right

$header

$sitename Clasificados - $long_category_name

$footer

~; } # End of user-configurable variables. You should not edit anything past this line. # The following variable defines any special HTML code that you want to place in # between the and tags on each page. This could include meta tags # or JavaScript, but in most cases, you'll probably just want to leave this set # equal to "". Be sure to put a backslash in front of any quotation marks that # appear inside of your header code, and in front of the @ symbol anywhere that # it appears. $head_code = ""; # The following variable defines the background color of all pages. $bgcolor = "#ffffff"; # The following variable defines the background graphic (if any) to be used on # all pages. $background = ""; # The following variable defines the default text color. $text_color = "#000000"; # The following variable defines the color for hypertext links. $link_color = "#000000"; # The following variable defines the color for visited links. $vlink_color = "#000000"; # The following variable defines the color for active links. $alink_color = "#000000"; # The following variable defines the HTML that will appear in the upper left hand # corner of the pages. Please begin your HTML code on the # line after the <

END_OF_HTML # The following variable defines the HTML that will appear at # the top of the main section of the pages. Please begin your HTML code on the # line after the < thin blue line END_OF_HTML # The following variable defines the HTML that will appear at # the bottom of the main section of the pages. Please begin your HTML code on the # line after the < Content copyright © 2001 $sitename. Todos los derechos reservados.
Por favor envíe sus preguntas, comentarios, o reporte de fallas a Webmaster.

Powered by e-Classifieds. Copyright © 1995-2001 Hagen Software Inc. All rights reserved. END_OF_HTML # The following subroutine (pagesetup) defines the HTML that will appear at # the beginning of every page created by this program. You should modify # only the text in between the "print qq~" and the "~;" statements. sub pagesetup { local ($title) = @_; print qq~ $title $head_code
$upper_left_corner
left right
Opciones de Búsqueda

Buscar Avisos

Opciones de Avisos

Agregar Aviso

Borrar Aviso

Otras Opciones

Admin

Home Clasificados

Tu portal en español
left right

$header
~; } # The following subroutine (pageclose) defines the HTML that will appear # at the end of every page created by this program. You should modify # only the text in between the "print qq~" and the "~;" statements. sub pageclose { print qq~

$footer

~; } ######################################################################## sub print_header { print "Content-type: text/html\n\n"; } ####################################################################### # Read and Parse Form Data # ####################################################################### # Get the input read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); # Split the name-value pairs @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); # Un-Webify plus signs and %-encoding $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $value =~ s///g; if ($allow_html != 1) { $value =~ s/<([^>]|\n)*>//g; } else { unless ($name eq 'body') { $value =~ s/<([^>]|\n)*>//g; } } $in{$name} = $value; } $current_date = &get_date; &get_required_files; if (($in{'add_item_button'} ne "") || ($ENV{'QUERY_STRING'} =~ /place_ads/)) { &print_header; &pagesetup("Post Classified Ad Form"); &generic_form_header; &add_entry_form; &pageclose; exit; } elsif ($in{'post_ad_button'} ne "") { &print_header; &post_ad; } elsif (($in{'delete_item_button'} ne "") || ($ENV{'QUERY_STRING'} =~ /delete_ads/)) { &print_header; &pagesetup("Delete Classified Ad Form"); &generic_form_header; &delete_search_form; &pageclose; exit; } elsif ($in{'delete_button'} ne "") { &print_header; &delete; } elsif (($in{'admin_button'} ne "") || ($ENV{'QUERY_STRING'} =~ /admin/)) { &print_header; &pagesetup("Admin Logon"); &generic_form_header; &delete_all_form; &pageclose; exit; } elsif ($in{'delete_all_button'} ne "") { &print_header; &delete_all; } elsif ($in{'view_ads_button'} ne "") { &view_ads; } else { &print_header; &pagesetup; &display_frontpage; &pageclose; } sub view_ads { if ($in{'category'} eq "") { &print_header; &category_error; } if (-e "$classdir/$in{'category'}.html") { # print "\n"; print "Categoría: $htmldir/$in{'category'}.html\n\n"; } else { &print_header; &no_ads_message; } exit; } sub no_ads_message { &pagesetup("No se encontraron resultados"); print qq~

No se encontraron resultados

Lo lamentamos, pero en este momento no hay avisos en esta categoría. Por favor regrese e intente en otra categoría.

~; &pageclose; } sub add_entry_form { print qq~
Información de contacto

Por favor ingrese la siguiente información de contacto. Los campos requeridos estan marcados por *.

Su Nombre*
Dirección
Ciudad
Estado/Provincia
Código Postal
Pais
Número de Teléfono
Dirección de E-mail*
URL de su web
Marque aquí si Usted quiere mostrar su dirección postal y su número de teléfono en su aviso

Su Aviso

Por favor complete la información de su aviso. Los campos requeridos están marcados por *.

~; foreach $category (@categories) { @fields = split (/\|/, $category); print qq~ ~; } print qq~

Categorías*

Por favor siga las siguientes reglas para no ser expulsado!

1)Ud. podrá colocar su aviso en una sola categoría.

2)Si no encuentra la categoría adecuada llene el campo que se encuentra al pie solicitando la categoría que corresponda a su aviso.

3)Todos sus datos llegan a nosotros inmediatamente después que Ud. coloca el aviso, si no obedece estas reglas será expulsado y su IP bloqueada.

Por favor marque la categoría en la que desea agregar su aviso.

$fields[0]

Si ninguna de las categorías es adecuada para su aviso, qué categorías le gustaría que agregaramos?
Título*
Texto de su aviso (HTML no está permitido. Presione ENTER una vez para cambiar de línea, o dos veces para comenzar un nuevo párrafo.)*

~; } sub post_ad { $counter = 0; if (($in{'name'} eq "") || ($in{'email'} eq "") || ($in{'category'} eq "") || ($in{'caption'} eq "") || ($in{'text'} eq "")) { &required_error; } @fields = split (/\|/, $in{'category'}); $long_category_name = $fields[0]; $short_category_name = $fields[1]; $in{'text'} =~ s/\n/
/g; # Lock the file for security so the file is not damaged if more than one user tries to access it at the same time. $quit = 0; while ($quit != 1) { if (-e "$classdir/$short_category_name.lock") { # The file exists, time to take a nap sleep(1); } else { # Create the lock file, thereby locking the Classified Ad file open (LOCK,">$classdir/$short_category_name.lock"); close LOCK; } # Open the data file to read the number of the last post open (ADFILE, "$classdir/ads.counter"); $old_counter = ; # chop $old_counter; # Update the Ad Number by one $old_counter++; $new_counter = $old_counter; # Rewrite the data file open (ADFILE, ">$classdir/ads.counter"); print ADFILE "$new_counter"; close(ADFILE); $password = $new_counter * $password_multiplier; # If it doesn't already exist, create the HTML file where the ads will be # stored for this category unless (-e "$classdir/$short_category_name.html") { open (HTMLFILE,"+>$classdir/$short_category_name.html"); &print_default_html; close (HTMLFILE); } # Append the user's ad and description to the ad file open(ADFILE,"$classdir/$short_category_name.html") || die $!; @main = ; close(ADFILE); open(ADFILE,">$classdir/$short_category_name.html") || die $!; foreach $main_line (@main) { if ($main_line =~ //) { print ADFILE "\n"; print ADFILE "\n"; print ADFILE qq~
$in{'caption'}
Aviso Número: $new_counter Fecha: $current_date
Contacto: $in{'name'}
~; if ($in{'display_address'} eq "on") { print ADFILE qq~ $in{'street'}
$in{'city'}, $in{'state'} $in{'zip'}
$in{'country'}~; } print ADFILE qq~
Teléfono: ~; if ($in{'display_address'} eq "on") { print ADFILE qq~ $in{'phone'}~; } print ADFILE qq~
E-mail: $in{'email'} Web Site: $in{'url'}

Descripción
$in{'text'}

\n ~; print ADFILE "\n"; } else { print ADFILE "$main_line"; } } # unlock the lock file unlink("$classdir/$short_category_name.lock"); if (($reply_user eq "on") && ($sendmail ne "")) { open( MAIL, "|$sendmail -t " ) || die "can't open sendmail: $email: $!\n"; print MAIL "To: $in{'email'}\n"; print MAIL "From: $master_admin_email_address\n"; print MAIL "Subject: $sitename Classified Ads\n"; print MAIL "Reply-to: $master_admin_email_address\n\n"; print MAIL "Muchas gracias por agregar su aviso en la categoría $long_category_name de los casificados de $sitename . Su aviso ha sido agregado y se verá de la siguiente manera:\n\n"; print MAIL "Número de aviso: $new_counter\n"; print MAIL "Tema: $in{'caption'}\n"; print MAIL "Fecha: $current_date\n"; print MAIL "Responder a: $in{'name'} at $in{'email'}\n"; print MAIL "Texto del Aviso: $in{'text'}\n"; print MAIL "URL (si corresponde): $in{'url'}\n\n"; print MAIL "Usted puede regresar en cualquier momento y borrar su aviso si es necesario. Esperamos que los Clasificados de $sitename le sean útiles y regrese pronto. A su Aviso le ha sido asignada una clave especial para editarlo. Por favor tome nota de su Número de Aviso y su Clave para su referencia en el futuro. Los necesitará si Usted alguna vez desea borrar su Aviso. El Número y Clave para su Aviso son los siguientes: Número de Aviso: $new_counter Clave: $password Tenga en cuenta que: 1) Ud. podrá colocar su aviso en una sola categoría. 2) Elija la categoría más apropiada para publicar su aviso, no publique el mismo aviso en diferentes categorias, nos damos cuenta y los borramos. 3) Si no encuentra la categoría adecuada llene el campo que se encuentra al pie solicitando la categoría que corresponda al tipo de actividad que desempeña. 4) Todos sus datos llegan a nosotros inmediatamente después que Ud. coloca el aviso, si no obedece estas reglas será expulsado, su IP bloqueada y denunciado en su servidor y/o a la empresa para la que ud. trajaba. Si Usted NO ha agregado un Aviso Clasificado en $sitename y cree que ha recibido este email por error, por favor acepte nuestras disculpas y notifíquenos inmediatamente. Como medida de seguridad, Usted está recibiendo este mensaje porque alguien ha usado su dirección email cuando agregó un aviso clasificado en los Avisos Clasificados de $sitename .\n\n"; print MAIL "Sinceramente,\n\n"; print MAIL "$admin_name, Webmaster\n"; print MAIL "$sitename\n"; print MAIL "$siteurl\n"; print MAIL "$slogan\n"; close(MAIL); } if (($master_admin_email_address ne "") && ($notify_add eq "on") && ($sendmail ne "")) { open( MAIL, "|$sendmail -t " ) || die "can't open sendmail notify: $master_admin_email_address: $!\n"; print MAIL "To: $master_admin_email_address\n"; print MAIL "From: $master_admin_email_address\n"; print MAIL "Subject: Nuevo Aviso Clasificado\n"; print MAIL "El siguiente aviso clasificado fué agregado en la categoría $long_category_name de $sitename por $in{'name'}:\n\n"; print MAIL "Número de Aviso: $new_counter\n"; print MAIL "Clave: $password\n"; print MAIL "Tema: $in{'caption'}\n"; print MAIL "Fecha: $current_date\n"; print MAIL "Responder a: $in{'name'} at $in{'email'}\n"; print MAIL "Texto del Aviso: $in{'text'}\n"; print MAIL "URL (si corresponde): $in{'url'}\n\n"; print MAIL "Recomendaron crear las siguientes categorías (estará en blanco si no hay recomendaciones): $in{'category_wanted'}"; close(MAIL); } &successful_addition_message; $quit = 1; } } # End of sub post_ad sub successful_addition_message { &pagesetup("Su Aviso ha sido agregado exitosamente!"); print qq~

Su Aviso ha sido agregado exitosamente!

A su Aviso le ha sido asignada una clave especial para editarlo. Por favor tome nota de su Número de Aviso y su Clave para su referencia en el futuro. Los necesitará si Usted alguna vez desea borrar su Aviso. El Número y Clave para su Aviso son los siguientes:
Aviso Número: $new_counter
Clave: $password

~; &pageclose; } sub required_error { &pagesetup("Campos en blanco"); print qq~

Campos en blanco

\n Lo sentimos, pero no ha ingresado información en un campo requerido. Todos los campos deben ser completados. Por favor regrese y asegúrese de haber completado todos los campos requeridos. Gracias.
~; &pageclose; exit; } sub delete_search_form { print qq~

Borrar su Aviso

Para borrar su Aviso, por favor complete todos los campos en la siguiente forma y haga click en el botón "Borrar este Aviso". Para poder borrarlo, Usted debe seleccionar la categoría en la que se encuantra el aviso e ingresar su nombre y la dirección email exactamente como aparece en su aviso. Usted también deberá ingresar el número de aviso y la clave que le fué enviada después de publicar el aviso. Si el formulario no es completado completa y adecuadamente, su aviso no será borrado.

Información del Aviso

Por favor seleccione la categoría donde se encuentra su aviso:
Número de Aviso
Clave


~; } sub delete { if (($in{'addno'} eq "") || ($in{'password'} eq "") || ($in{'category'} eq "")) { &required_error; } unless (-e "$classdir/$in{'category'}.html") { &no_ads_message; exit; } # Lock the file for security so the file is not damaged if more than one user tries to access it at the same time. $quit = 0; while ($quit != 1) { if (-e "$classdir/$in{'category'}.lock") { # The file exists, time to take a nap sleep(1); } else { # Create the lock file, thereby locking the Classified Ad file open (LOCK,">$classdir/$in{'category'}.lock"); close LOCK; } # Delete the user's ad and description from the ad file open(ADFILE,"$classdir/$in{'category'}.html") || die $!; @main = ; close(ADFILE); $ad_to_delete = "0"; $deleted_ad_found = "0"; open(ADFILE,">$classdir/$in{'category'}.html") || die $!; foreach $main_line (@main) { if ($main_line =~ //) { $ad_to_delete = "0"; } } else { print ADFILE "$main_line"; } } close(ADFILE); # unlock the lock file unlink("$classdir/$in{'category'}.lock"); if ($incorrect_password eq "1"){ &password_error; } elsif ($deleted_ad_found eq "0"){ &unsuccessful_modification_message; } else { &successful_deletion_message; if (($master_admin_email_address ne "") && ($notify_delete eq "on") && ($sendmail ne "")) { open( MAIL, "|$sendmail -t " ) || die "can't open sendmail notify: $master_admin_email_address: $!\n"; print MAIL "To: $master_admin_email_address\n"; print MAIL "From: $master_admin_email_address\n"; print MAIL "Subject: Classified Ad Deleted\n"; print MAIL "Reply-to: $in{'email'}\n\n"; print MAIL "Aviso número $in{'addno'} fué borrado de la categoría $in{'category'} de los Clasificados de $sitename por $in{'name'}.\n\n"; close(MAIL); } } $quit = 1; } # End of while ($quit != 1) exit; } sub password_error { &pagesetup("Error: clave incorrecta"); print qq~

Error: clave incorrecta

\n Lo sentimos, pero Usted no ha ingresado la clave correcta. Por favor Regrese y asegúrese de ingresar la Clave correcta. Gracias.

~; &pageclose; } sub unsuccessful_modification_message { &pagesetup("Error: Aviso no encontrado"); print qq~

Error: Aviso no encontrado

El aviso que seleccionó no fué encontrado. Por favor asegúrese haber ingresado su nombre, dirección email, y número de aviso correctamente en el formulario para borrar avisos. Muchas Gracias.~; &pageclose; } sub successful_deletion_message { &pagesetup("Exitoso: Su Aviso ha sido exitosamente borrado"); print qq~

El aviso que Usted seleccionó ha sido borrado de los Clasificados!

El siguiente Aviso fue borrado:

$deleted_ad

~; &pageclose; } sub delete_all_form { print qq~

Borrar Todos los Avisos de una Categoría

Si Usted es el Administrador, puede borrar todos los avisos en una categoría utilizando la siguiente forma. Necesitará su clave administrativa para hacerlo. Por favor seleccione la categoría que desea borrar, ingrese su clave administrativa en el siguiente formulario y presione el botón Borrar Todos los Avisos.

Información del Aviso

Por favor seleccione la Categoría que desea borrar:
Clave Administrativa


~; } sub delete_all { if ($in{'category'} eq "") { &required_error; } unless ($in{'password'} eq "$admin_password") { &admin_password_error; } unless (-e "$classdir/$in{'category'}.html") { &no_ads_message; exit; } unlink("$classdir/$in{'category'}.html"); &pagesetup("Exitoso: Todos los Avisos exitosamente borrados"); print qq~

Avisos borrados

Todos los Avisos de la Categoría $in{'category'} han sido borrados.

~; &pageclose; if (($master_admin_email_address ne "") && ($notify_delete_all eq "on") && ($sendmail ne "")) { open( MAIL, "|$sendmail -t " ) || die "can't open sendmail notify: $master_admin_email_address: $!\n"; print MAIL "To: $master_admin_email_address\n"; print MAIL "From: $master_admin_email_address\n"; print MAIL "Subject: Avisos clasificados borrados\n"; print MAIL "Esta es una simple notofocación de que todos los avisos en la categoría $in{'category'} de los Clasificados de $sitename han sido borrados. si Usted no ha realizado esta acción, entonces alguien ha obtenido su Clave Administrativa y ha borrado los avisos de su site.\n\n"; close(MAIL); } exit; } sub display_frontpage { print qq~ Bienvenido a los Avisos Clasificados de $sitename! Para ver los avisos, elija una Categoría. Las categorías que no tienen un hypervínculo no contienen avisos en ellas. Usted tambien puede elejir una de las opciones en el menú de la izquierda.

Categorías de los Avisos Clasificados

~; } sub generic_form_header { print qq~

~; } sub get_date { local ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst,$date); local (@days, @months); @days = ('Domingo','Lunes','Martes','Miércoles','Jueves', 'Viernes','Sábado'); @months = ('Enero','Febrero','Marzo','Abril','Mayo','Junio','Julio', 'Agosto','Septiembre','Octubre','Noviembre','Deciembre'); $time = time; ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($time); $year = (1900 + $year); if ($mon < 10) { $mon = "0$mon"; } if ($mday < 10) { $mday = "0$mday"; } $mon++; $date = "$mon/$mday/$year"; return $date; } sub get_required_files { unless ($footer =~ /Powered by e-Classifieds<\/a>. Copyright © 1995-2001 Hagen Software Inc. All rights reserved./) { exit; } } sub category_error { &pagesetup("Error: No ha elegido Categoría"); print qq~

Error: No ha elegido Categoría

\n Lo sentimos, pero Usted no ha seleccionado una Categoría. Por favor Regrese y asegúrese de seleccionar una Categoría. Gracias.

~; &pageclose; exit; } sub admin_password_error { &pagesetup("Error: Clave Incorrecta"); print qq~

Error: Clave Incorrecta

\n Lo sentimos, pero Usted no ha ingresado la Clave Administrativa correcta. Si Usted es el Administrador, por favor Regrese y asegúrese de ingresar la Clave Administrativa correctamente. Gracias.

~; &pageclose; exit; }