#! /usr/bin/perl
############################################
## ##
## Auction Weaver Lite ##
## by CGI Script Center ##
## (e-mail cgi@elitehost.com) ##
## ##
## version: 1.06 ##
## last modified: 11/08/2000 ##
## copyright (c) 2000 ##
## ##
## latest version is available from ##
## The CGI Script Center ##
## http://www.cgiscriptcenter.com ##
## ##
############################################
# COPYRIGHT NOTICE:
#
# Copyright Elite Web Design and Marketing, Inc., and Diran Alemshah 2000
# All Rights Reserved.
#
# This program may be used in accorance with the steps outlined
# in this copyright notice.
# Selling the code for this program without prior written consent
# is expressly forbidden, and at no time can this copyright notice
# be removed.
# DO NO redistribute this program over the Internet or in any other
# medium. In all cases copyright and header must remain intact.
# LICENSOR'S PROGRAM IS COPYRIGHTED AND LICENSED (NOT SOLE).
# LICENSOR DOES NOT SELL OR TRANSFER TITLE TO THE LICENSED
# PROGRAM TO YOU. YOUR LICENSE OF THE LICENSED PROGRAM WILL
# NOT COMMENCE UNTIL YOU HAVE EXECUTED THIS AGREEMENT AND AN
# AUTHORIZED REPRESENTATIVE OF LICENSOR HAS RECEIVED, APPROVED,
# AND EXECUTED A COPY OF IT AS EXECUTED BY YOU.
# 1. License Grant. Licensor hereby grants to you, and you
# accept, a nonexclusive license to use the downloaded computer
# programs, object code form only (collectively referred to as
# the "Software"), and any accompanying User Documentation,
# only as authorized in this License Agreement. The Software may be
# used on any website owned by Licensee, or if Licensee is a company
# or corporation, any website owned by Licensee company or corporation.
# You agree that you will not assign, sublicense, transfer, pledge,
# lease, rent, or share your rights under this License Agreement.
# You agree that you may not reverse assemble, reverse compile, or
# otherwise translate the Software. Upon loading the Software
# into your computer, you may make a copy of the Software for
# backup purposes. You may make one copy of any User's Manual
# provided for backup purposes. Any such copies of the Software
# or the User's Manual shall include Licensor's copyright and other
# proprietary notices. Except as authorized under this paragraph,
# no copies of the Program or any portions thereof may be made by
# you or any person under your authority or control.
#
# EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, LICENSOR
# DISCLAIMS ANY AND ALL PROMISES, REPRESENTATIONS, AND WARRANTIES
# WITH RESPECT TO THE LICENSED PROGRAM, INCLUDING ITS CONDITION,
# ITS CONFORMITY TO ANY REPRESENTATION OR DESCRIPTION, THE EXISTENCE
# OF ANY LATENT OR PATENT DEFECTS, ANY NEGLIGENCE, AND ITS
# MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE.
# 5. Limitation of Liability. Licensor's cumulative liability
# to you or any other party for any loss or damages resulting
# from any claims, demands, or actions arising out of or relating
# to this Agreement shall not exceed the license fee paid to Licensor
# for the use of the Program (Free - $0.00). In no event shall
# Licensor be liable for any indirect, incidental, consequential,
# special, or exemplary damages or lost profits, even if Licensor
# has been advised of the possibility of such damages.
# 6. Proprietary Protection. Licensor shall have sole and exclusive
# ownership of all right, title, and interest in and to the Licensed
# Program and all modifications and enhancements thereof (including
# ownership of all trade secrets and copyrights pertaining thereto),
# subject only to the rights and privileges expressly granted to you
# herein by Licensor. This Agreement does not provide you with title
# or ownership of the Licensed Program, but only a right of limited
# use. You must keep the Licensed Program free and clear of all claims,
# liens, and encumbrances.
# 7. Restrictions. You may not use, copy, modify, or distribute the
# Licensed Program (electronically or otherwise), or any copy,
# adaptation, transcription, or merged portion thereof, except as
# expressly authorized by Licensor. You may not reverse assemble,
# reverse compile, or otherwise translate the Licensed Program.
# Your rights may not be transferred, leased, assigned, or sublicensed
# except for a transfer of the Licensed Program in its entirety to
# (1) a successor in interest of your entire business who assumes
# the obligations of this Agreement or (2) any other party who is
# reasonably acceptable to Licensor, enters into a substitute
# version of this Agreement, and pays an administrative fee intended
# to cover attendant costs. No service bureau work, multiple-user
# license, or time-sharing arrangement is permitted, except as
# expressly authorized by Licensor. If you use, copy, or modify
# the Licensed Program or if you transfer possession of any copy,
# adaptation, transcription, or merged portion of the Licensed
# Program to any other party in any way not expressly authorized
# by Licensor, your license is automatically terminated.
# 8. Licensor's Right Of Entry. You hereby authorize Licensor
# to enter your premises in order to inspect the Licensed Program
# in any reasonable manner during regular business hours to verify
# your compliance with the terms hereof.
# 9. Injunctive Relief. You acknowledge that, in the event
# of your breach of any of the foregoing provisions, Licensor
# will not have an adequate remedy in money or damages. Licensor
# shall therefore be entitled to obtain an injunction against such
# breach from any court of competent jurisdiction immediately upon
# request. Licensor's right to obtain injunctive relief shall not
# limit its right to seek further remedies.
# 10. Trademark. COMMISSION CART(TM), ACCOUNT MANAGER(TM), PICLINK
# ADVERTISER(TM), BANDWIDTH PROTECTOR(TM), PC CONFIGURATOR(TM),
# Auction Weaver(TM) are all trademarks of Licensor. No right,
# license, or interest to such trademark is granted hereunder,
# and you agree that no such right, license, or interest shall
# be asserted by you with respect to such trademark.
# 11. Governing Law. This License Agreement shall be construed
# and governed in accordance with the laws of the State of California,
# USA.
# 12. Costs of Litigation. If any action is brought by either party
# to this License Agreement against the other party regarding the
# subject matter hereof, Lincensor shall be entitled
# to recover, in addition to any other relief granted, reasonable
# attorney fees and expenses of litigation.
# 13. Severability. Should any term of this License Agreement be
# declared void or unenforceable by any court of competent
# jurisdiction, such declaration shall have no effect on the
# remaining terms hereof.
# 14. No Waiver. The failure of either party to enforce any
# rights granted hereunder or to take action against the other
# party in the event of any breach hereunder shall not be deemed
# a waiver by that party as to subsequent enforcement of rights
# or subsequent actions in the event of future breaches.
# 15. Integration. THIS AGREEMENT IS THE COMPLETE AND EXCLUSIVE
# STATEMENT OF LICENSOR'S OBLIGATIONS AND RESPONSIBILITIES TO YOU
# AND SUPERSEDES ANY OTHER PROPOSAL, REPRESENTATION, OR OTHER
# COMMUNICATION BY OR ON BEHALF OF LICENSOR RELATING TO THE
# SUBJECT MATTER HEREOF
# PROGRAM DESCRIPTION:
# Whew! That was a mouthful! :) On to the configurations!
##################################################################
#CONFIGURABLE OPTIONS START HERE
#################################################################
# Here you can specify the text color, link colors,
$bodyspec = "BGCOLOR=\"#FFFFFF\" TEXT=\"#000000\" LINK=\"#000060\" VLINK=\"#800000\" ALINK=\"#FF0000\" BACKGROUND=\"\"";
# Choose your Administration Username
$adminlogin = "mitama";
# Choose your Administration Password
$adminpass = "0080859";
# Choose your Administration E-mail address
# Be sure to place a backslash before the \@ symbol.
# The backslash is required by Perl.
# Example: webmaster\@mitama.it
$from_email_address = "webmaster\@mitama.it";
# If you are using Sendmail (most Unix servers do)
# be sure to type set this variable to:
# $mailusing = 'sendmail'
# If you are using Sockets SMTP mail, set this variable to:
# $mailusing = 'sockets'
$mailusing = 'sendmail';
# If you are using Sendmail, type the full directory path
# to your Sendmail here.
# Example: $mailprog = "/usr/sbin/senmail";
# If you are using Sockets(SMTP) mail, leave this blank:
# Example: $mailprog = "";
$mailprog = "/usr/sbin/sendmail";
# Auction Weaver will check to make sure your above
# $mailprog path is correct. Every once in a while,
# the server will say the path you have given is incorrect
# when it is actually correct. If you receive an Incorrect
# Path error message on the screen, and you're SURE the path
# is corect, place a 1 between the quotes below
# Example $mailprog_ok "1";
# Otherwise, do not edit this variable.
$mailprog_ok = "";
# If you use the Sockets mail routine, you'll need to define
# an SMTP mail server path here.
# Example: $smtp_addr = "mail.yourserver.com";
$smtp_addr = "mail.mitama.it";
# the data_path is the directory path to the directory where you would like
# your Auction Weaver data files stored.
# A protected directory would be advisable.
# Example: $data_path = "/full/directory/path/to/data";
# where "data" is a directory you have created.
# Leave it empty for default settings or add your own path here.
$data_path = "/home/sites/site81/web/auction";
# Leave it empty for NO templates. If you wish to use your own e-mail templates,
# use the ones provided with the Auction Weaver .zip file. DO NOT alter the
# actual template file names, but feel free to modify the contents of each file,
# then upload those templates to the directory name you provide here.
# If you leave this path blank, Auction Weaver will include its own pre-defined
# e-mails in place of the template e-mails.
$email_templates_dir = "/home/sites/site81/web/auction/templates";
# ALTERNATING TABLE COLORS
@colors = ('#CCCC99','#FFFFFF');
# If you wish Auction Weaver to maintain an archieve of "Closed Auctions", be
# sure to keep this set to "1", which is the default setting.
# Otherwise, remove the 1 or replace it with a 0 (Zero).
# Example: $keep_closed_auctions = "";
$keep_closed_auctions = "1";
# If you would like your users to register prior to allowing them
# the ability to post a new item, leave this default setting of "1".
# If you would like to give anyone the ability to post items or bids
# without registering, remove the "1" from between the quotes or
# replace it with a "0".
# Example: $require_user_reg = "";
$require_user_reg = "1";
# If you would like to set a maximum time that any auction
# remains active, after the most recent bid, set the number
# of minutes here. For example, a user might post an item for
# bid and set a 365 day auction. You, the administrator, might
# not want any auction available that long. Here you can set
# the number of minutes after the most recent bid before the
# auction closes.
# Example - for 1 day, set 1440 minutes: $howmany = "1440";
$howmany = "";
# If you have problems with FILE LOCKING (example: Win95/98 servers)
# set this to 0 (Zero), otherwise, leave the default value of "1".
$flock = "1";
$LOCK_EX = "2";
# Place the name of your website here.
$sitename = "Aste Online";
# You shouldn't need to modify this path. If, however, your server
# does not give this information to Auction Weaver, you may have
# to set the path manually. Your server path would appears something
# like: $server_name = "www.yourserver.com";
# If you need to set this variable manually, do not use an http://
# in the $server_name variable.
$server_name = "www.mitama.it";
# Congratulations. You have completed the basic configuration
# options. You are ready to install your Auction Weaver Lite.
## Optional Configurations below ##
# If you have Auction Weaver create your DATA directory for you, it
# will set the permissions of the directory for you, in the setting
# below:
$datapermissions = "0755";
# Auction Weaver will create a directory called REGISTER for you. It
# will set the permissions of the directory for you, in the setting
# below:
$registerpermissions = '0755';
# Auction Weaver will create a directory called CLOSED for you, if
# you choose to keep closed auction informtion. It
# will set the permissions of the directory for you, in the setting
# below:
$closedpermissions = '0755';
# Auction Weaver will create individual CATEGORY directories for you.
# It will set the permissions of the directory for you, in the setting
# below:
$categorypermissions = '0755';
## DO NOT EDIT BELOW THIS LINE! ###
###################################
$|++;
use CGI;
$q = new CGI;
## END - DO NOT EDIT ABOVE THIS LINE ##
#######################################
$server_name = $ENV{'SERVER_NAME'} if ($server_name eq "");
$script_url = $ENV{'SCRIPT_NAME'};#Url of your auctionweaver.pl script
########################
# If $email_templates_dir points to a valid directory ..
# upload the following fi#les --- open each file to find the appropriate variables in a sample template
$dutch_auction_status_message = "dastatus.tlt" ;#dutch auction status message
$bid_passed_message = "bpassed.tlt";#message to be passed to the next lower bidder for normal auction
$winner_message = "wmessage.tlt";#winner message for top bidder-normal auction
$winner_message_rb = "wmessagerb.tlt";#winner message for top bidder who has bid less than reserve bid
$seller_message = "smessage.tlt";#seller messgae for normal auction
$winners_message_da = "wmessageda.tlt";#winners message for ALL dutch auction winners
$seller_message_da = "smessageda.tlt";#seller message for dutch auction
$login_message = "lmessage.tlt";#initial login info
########################
if ($ENV{'SCRIPT_FILENAME'}) {
$script_filename = $ENV{'SCRIPT_FILENAME'};
$script_filename =~ s/\\/\//g;
} elsif ($ENV{'PATH_TRANSLATED'}) {
$script_filename = $ENV{'PATH_TRANSLATED'};
$script_filename =~ s/\\/\//g;
}
@all = split(/\// , $script_filename);
$cgifile = $all[$#all];
if ($data_path eq "") {
($data_path = $script_filename) =~ s/\/$cgifile$// ;
$data_path .= "/DATA";
}
umask(000);
$datapermissions = oct($datapermissions);
$registerpermissions = oct($registerpermissions);
$closedpermissions = oct($closedpermissions);
$categorypermissions = oct($categorypermissions);
mkdir ("$data_path" , $datapermissions);
chmod ($datapermissions, "$data_path");
if ($require_user_reg == 1)
{
$register_path = $data_path."/register";
mkdir ("$register_path" , $registerpermissions);
chmod ($registerpermissions, "$register_path");
}
#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#CONFIGURABLE OPTIONS END HERE
#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
$f = 0;
$version = "1.06";
$links = <<12345;
Cerca
|| Categorie ||
Categorie Admin ||
Add Articolo
12345
$links .= <<12345 if ($require_user_reg == 1);
||
Registrati ||
Edita Utente ||
Chiudi Articolo
12345
# $links .= <<12345 if ($keep_closed_auctions == 1);
# 12345
&get_cat;
&get_numberof_items;
$flag1 = $q->param('flag1');
&first if ($flag1 eq "");
$addcat = $q->param('addcat');
&formcat if ($addcat eq "1");
@pnames = $q->param;
foreach $pp(@pnames)
{
if ($q->param($pp) eq 'Delete' && $addcat ne "")
{
&delete_cat($pp);
exit(1);
}
}
if ($addcat eq "2") {
&addcat;
&get_cat;
&get_numberof_items;
&formcat;
}
$catdir = $q->param('catdir');
## Added 105 ##
if (($catdir) && (!($catdir =~ /^cat[0-9]+$/))) {
print "Content-type: text/html\n\n";
print "$catdir is not an Auction Weaver category directory ";
exit;
}
$catdir =~ s/\.\.\\//g;
$catdir =~ s/\.\.//g;
$catdir =~ s/\///g;
## Added 105 ##
## Added 105 ##
$item = $q->param('item');
$additem = $q->param('additem');
$additemflag = $q->param('additemflag');
$preview = $q->param('preview');
$addregister = $q->param('addregister');
$register = $q->param('register');
$edit = $q->param('edit');
$editactual = $q->param('editactual');
$fromfile = $q->param('fromfile');
## Added 105 ##
&fromcheck;
$fromfile =~ s/\.\.\///g;
$fromfile =~ s/\.\.//g;
$fromfile =~ s/\///g;
## Added 105 ##
$placebid = $q->param('placebid');
$closed = $q->param('closed');
$closed1 = $q->param('closed1');
$closed2 = $q->param('closed2');
$search = $q->param('search');
$fromsearch = $q->param('fromsearch');
$adminsection = $q->param('adminsection');
$logged = $q->param('logged');
&admin_login if ($adminsection ne "");
&admin_check if ($logged ne "");
&expand_cat($catdir) if ($catdir ne "" && $item eq "" && $fromfile eq "");
&form_item if ($additem ne "" && $additemflag eq "");
&preview if ($preview ne "");
&add_item if ($additemflag ne "");
&form_register if ($register ne "" && $addregister eq "");
&add_user if ($addregister ne "");
&form_edit if ($edit ne "" && $editactual eq "");
&edit if ($editactual ne "");
&show_item if ($fromfile ne "" && $placebid eq "");
&place_bid if ($placebid ne "");
&form_closed if ($closed ne "");
&closed1 if ($closed1 ne "");
&closed2 if ($closed2 ne "");
&form_search if ($search ne "");
&search if ($fromsearch ne "");
exit(1);
sub search {
&print_header;
# print <<"12345";
#
12345
$num++;
if ($num == 2) {
$num =0;
}
}#tempif
}#actualsearchover
}#test text file if
}#foreach truefiles
}#catyboy for
print <<"12345" if ($matched > 0);
12345
print <<"12345" if ($matched == 0);
Spiacente dati non trovati
12345
&print_footer;
exit(1);
}#supysubdupy sub
sub form_search {
&print_header;
print <
EOF
&theader2;
print<
N.B. Lo staff di
Mitama non svolge nessuna funzione di intermediariato nelle compra/vendite di questa
sezione. Per tanto lo staff di Mitama non è responsabile della veridicità degli annunci
e tanto meno del corretto comportamento degli utenti in fase di transazione.