%@ LANGUAGE = PerlScript %>

|
This is intended to be an upscale boutique of Diablo II goods. last updated October 29, 2000, document version 1.0.
|
||||
Contents
WelcomeWelcome to the e-Muppeteer Market Hall. Questions and suggestions can be directed to Eric Frost at frost@cnsnet.com. Generally the idea is that items in the Market Hall are currently on eBay or another auction site and can be bid on. Click on the image to be re-directed to the auction. Items in Reserve are probably for sale (even if someone's using it, you know everyone has their price). Click on the image to send an e-mail to the owner requesting that it be made available for auction, generally starting at $1, or arrange a direct purchase (usually starting around $3 or $4). See the resources for information on listing your items. Market Hall<% #**************************************************************** #* Script Name: Market Lister #* #* Description: Reads the list of specially named jpegs and #* presents a list of currently on sale items. #* #* Created By: Eric Frost #* #* Date: 10/21/00 #* 10/29/00 #* #**************************************************************** @classes = ("nothing", "rare", "unique", "set", "magic or normal", "miscellaneous"); $classcount = 0; use DirHandle; $d = new DirHandle "E:\\Inetpub\\wwwroot\\www.e-muppeteer.com\\items"; if (defined $d) { $d->read; #. $d->read; #.. while(defined($_ = $d->read)) { $line = $_; $fileref = $line; $fileref =~ s/\'/%27/g; $fileref =~ s/\~/%7E/g; @mysplit = split(/\./,$line); #take the jpg part off $line2 = $mysplit[0]; @mysplit2 = split(/~/,$line2); # this makes all the various fields $class = $mysplit2[0]; $nada = $mysplit2[1]; $status = $mysplit2[2]; $name = $mysplit2[3]; $ebay = $mysplit2[4]; $email = $mysplit2[5]; $mule = $mysplit2[6]; $name =~ s/_/ /g; if ($status eq "on_sale"){ if ($class > $classcount){ $classcount = $class; $Response->write("
Reserve
<%
#****************************************************************
#* Script Name: Market Lister
#*
#* Description: Reads the list of specially named jpegs and
#* presents a list of currently on sale items.
#*
#* Created By: Eric Frost
#*
#* Date: 10/21/00
#* 10/29/00
#*
#****************************************************************
@classes = ("nothing", "rare", "unique", "set", "magic or normal", "miscellaneous");
$classcount = 0;
use DirHandle;
$d = new DirHandle "E:\\Inetpub\\wwwroot\\www.e-muppeteer.com\\items";
if (defined $d) {
$d->read; #.
$d->read; #..
while(defined($_ = $d->read)) {
$line = $_;
$fileref = $line;
$fileref =~ s/\'/%27/g;
$fileref =~ s/\~/%7E/g;
@mysplit = split(/\./,$line); #take the jpg part off
$line2 = "$mysplit[0].$mysplit[1]"; #WORK ON THIS! I have to know how many elements are in the string and combine it back because the e-mail address can have a variable number of dots.
@mysplit2 = split(/~/,$line2); # this makes all the various fields
$class = $mysplit2[0];
$nada = $mysplit2[1];
$status = $mysplit2[2];
$name = $mysplit2[3];
$ebay = $mysplit2[4];
$email = $mysplit2[5];
@mysplit3 = split(/@/,$line);
@mysplit4 = split(/~/,$mysplit3[1]);
@mysplit5 = split(/\./,$mysplit4[1]);
$mewl = $mysplit5[0];
$name =~ s/_/ /g;
if ($status eq "reserve"){
if ($class > $classcount){
$classcount = $class;
$Response->write(" |
| ");
$Response->write(" write($ebay);
$Response->write("\">");
$Response->write(" |
If you would like to list your items on this page, all you need to do is e-mail me a specially named, cropped screen-shot of your item.
There are several fields of information which are separated by tilde's. Here is an example.
3~0~on_sale~Acanna's_Deathwand_-_War Staff~475346517~frost@cnsnet.com.jpg
The first field is Item Type which is designated by a number. 1 - Rare, 2 - Unique, 3 - Set, 4 - Regular and Magic, 5 - Miscellaneous.
The second field is Reserved, just put in a zero. (Basically if this site grows really large, this would be a sub-category.)
The third field designates whether the item is "on_sale" at eBay or on "reserve".
The fourth field is the item name (remember to use underscores).
The fifth field will be used only if the third field designated this item is "on_sale", otherwise it is ignored. This is the eBay auction number.
The sixth field is a contact e-mail address. This is only used if the item is on "reserve" and is used to set up a mailto: link for people to express interest or make an offer.
The seventh and final field is your own personal tracking field you can use to help remember where the item is located in case you have items spread across several characters.
Here are some examples.

I intend to get a javascript form on here with an upload button to do this for you automatically... probably this weekend.
You are running a web server and would like to implement this on your own site? Contact me and we can discuss consulting arrangements ranging from $20 for the script source to installing complete server.
1.0 (10/29/2000) added reserve section, implemented categories and e-mail links.
0.91 (10/24/2000) changed naming scheme for images.
0.9 (10/21/2000) initial implementation.
Copyright (c) 2000, Elfcorp.com, Inc.
All rights reserved.