eAuction
  Not just another Perl script
Google
Welcome, Guest. Please Login or Register


If you use eAuction a lot and like it or if you make money from eAuction or from eAuction-related activities ...
then the project asks you for a donation in favor of the further development.



The forums are protected by
AccessControl
(written by Dieter Werner)
Click here if you want to check your IP against the most important RBLs of the net.
Click here in order to visite the AccessControl forums.


<< Visit the international e Auction Marketplace >>
Buy and sell PC and Consumer Electronic components






  HomeHelpSearchLoginRegister
 



Pages: 1 2 3 4 5 6 
Relist (Read 2862 times)
Dieter Werner
Administrator
*****
Offline

Dipl. Paranoiac ®

Posts: 1162
Germany
Gender: male
Re: Statistics
Reply #9 - 12/07/04 at 11:32:15
 
In order to display the stats of your auction ...

1. Replace sub disp_cat with the following
Code:
#-#############################################
# Sub: Display List Of Categories
# This creates directories and a list of categories
# Contributed by: Dieter Werner
#-#############################################
sub disp_cat {
   my ($key, $numitems, $row, $rowcolor);
   my $all_items = 0;
  
print <<EO_HTML;
<div align="center">
   <table bgcolor="#FFFFFF" width="770" border="0" cellspacing="0" cellpadding="0">
	<tr>
	    <td width="200" valign="top"><br>
		<table bgcolor="$config{'colortablebody'}" width="200" border="0" cellspacing="1" cellpadding="3">
		    <tr bgcolor="$config{'colortablehead'}">
			<td align="center"><b>$txt{'Category'}</b></td>
			<td align="center" nowrap><b>$txt{'Items'}</b></td>
		    </tr>
EO_HTML
  
	  foreach $key (sort keys %category) {
		oops($txt{'The category may not contain any non word characters'})
		if $key =~ /\W/;
		
		check_dir("$config{'basepath'}$key");
		$numitems = count_items(\$key) || 0;
		$all_items += $numitems;
		($row, $rowcolor) = get_row_color($row);
	 
print <<EO_HTML;
		    <tr $$rowcolor>
			<td>
			    <a href="$ENV{'SCRIPT_NAME'}?action=search&searchtype=items&searchstring=$key&lang=$form{'lang'}">
			    <b>$category{$key}</b></a>
			</td>
			<td width="50" nowrap><font size="1">  <b>$numitems</b></font></td>
		    </tr>
EO_HTML
		
	  }

print <<EO_HTML;
		    </tr>
		</table>
	    <td align="center" valign="top"><br>
		@{[disp_random('pic', 4)]}<br>
		@{[disp_random('list', 5)]}<br>
		@{[disp_stat($all_items)]}<br>
		@{[disp_runtime()]}<br>
		@{[disp_banner('tbl')]}
	    </td>
	</tr>
   </table>
</div>
<br>
EO_HTML
  
}

##############################################
# Sub: Display Statistics
# Contributed by: Dieter Werner
##############################################
sub disp_stat {
   my $items = shift;
   my $users = 0;

   opendir DIR, "$config{'basepath'}$config{'regdir'}" or oops($!);
   $users = grep /\.dat$/, readdir DIR;
   closedir DIR;

my $table = <<EO_HTML;
		    <table>
		    <tr>
				<td nowrap><font size="1"><b>$txt{'Registered Users'}:</b></font></td>
			<td nowrap><font size="1"><b>$users</b></font></td>
		    </tr>
		    <tr>
			<td nowrap><font size="1"><b>$txt{'Open Auctions'}:</b></font></td>
			<td nowrap><font size="1"><b>$items</b></font></td>
		    </tr>
		</table>
EO_HTML

} 



2. Open eConfig161.pl
3. Search the file for %txt = (
4. Add the following lines to the block
Code:
	  'Registered Users' => ['Registrierte Teilnehmer', ],
	  'Open Auctions' => ['Offene Auktionen', ],


Back to top
 
 

Multimedia file viewing and clickable links are available for registered members only!!  You need to Login or Register!!


Greetings from Germany
Dieter Werner




Advertising
View Profile | WWW   IP Logged
tcwc
eAuction Novice
*
Offline

I love Perl

Posts: 4

Re: Relist
Reply #10 - 12/11/04 at 02:02:38
 
Did anyone get this to work?  I edited the eauction.pl by deleting the sub disp_cat and replacing it with the listing above.  Also edited the econfig161.pl as directed.  Upon uploading the edited files, the auction is gone, and I get a 500 server error.  I rechecked the permissions of both files just to be sure.  Still didn't work.  Had to reupload a unedited eauction.pl to get back working.  I did the edits twice, thinking I screwed something up.  Any ideas?  Thanks for a great script!
Back to top
 
 


Advertising
View Profile   IP Logged
Dieter Werner
Administrator
*****
Offline

Dipl. Paranoiac ®

Posts: 1162
Germany
Gender: male
Re: Relist
Reply #11 - 12/11/04 at 13:44:09
 
tcwc   wrote on 12/11/04 at 02:02:38:
Did anyone get this to work?  I edited the eauction.pl by deleting the sub disp_cat and replacing it with the listing above.  Also edited the econfig161.pl as directed.  Upon uploading the edited files, the auction is gone, and I get a 500 server error.  I rechecked the permissions of both files just to be sure.  Still didn't work.  Had to reupload a unedited eauction.pl to get back working.  I did the edits twice, thinking I screwed something up.  Any ideas?  Thanks for a great script!


Unfortunately the forum software adds line breaks to the contributions ...
so check this line:
<a href="$ENV{'SCRIPT_NAME'}?action=search&searchtype=items&searchstring=$key&lang=
$form{'lang'}">


And ...
each EO_HTML needs an 'carriage return'
so set the cursor near behind the 'L' and hit the return key.

Back to top
 
 

Multimedia file viewing and clickable links are available for registered members only!!  You need to Login or Register!!


Greetings from Germany
Dieter Werner




Advertising
View Profile | WWW   IP Logged
Pages: 1 2 3 4 5 6 


If you like eAuction, please Rate it.
If you don't like eAuction, please Rate it too.


1 is being poor and 10 is being excellent


EveryScript

ip-location


AccessControl - Members Only