Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Jun 2002
Posts: 111
Member
Member
Offline
Joined: Jun 2002
Posts: 111
Did some tweaking in the file:

This one does work now:

Code
#!/usr/bin/perl

# Shop Mod 1.0
# Released 7/14/2003 (Original released 7/14/2003)
# Adapted with permission by Allen Ayres
# Original Version by Omegatron
#
# You may not distribute this program in any manner, modified or otherwise,
# without the express, written consent from Allen Ayres. Assistance can be found at www.ubbdev.com
#

#---------------------------------- OPTIONS ----------------------------------#
#
# url : URL to the store at cafeshops
# members_only: Allow unregistered users to shop? (0 = yes, 1 = no)
#

my %opt = (
url => "https://vault1.secured-url.com/securespace/acatalog/index.html",
members_only => 1,
);

#--------------------------------------------------------------------------------#

BEGIN {
($0 =~ m!(.*)(\|/)[^/\]+!) && unshift(@INC, $1, "$1$2Modules");
$| = 1;
};

use lib("./Modules", ".");

use strict;
use Fcntl ':flock';
use CGI qw(:standard);
use UBBCGI qw(:cgi);
use UBBCGI::Carp qw(fatalsToBrowser set_message);

BEGIN {
do "Digest/MD5.pm";
if (!$Digest::MD5::VERSION) {
require Digest::Perl::MD5;
import Digest::Perl::MD5 'md5_hex';
} else {
import Digest::MD5 'md5_hex';
}
};

use constant SEVENSEVENSEVEN => 0777;
use constant SIXSIXSIX => 0666;

use vars qw(
$filehandle @alltheforums $poll $PNTF $pntf_cookie_data $default_style
@allthecategories @memberslist_array %ProfileNumber %in %GotTime $vars_groups
%vars_version_information %vars_style_reference %vars_wordlets_criterr
%forum_recentmeta %forum_topics %todays_active_topics

%vars_ci %vars_config $vars_graemlins %vars_misc %vars_mods %vars_cats
%vars_registration %vars_forums %vars_styles %vars_display %vars_style
%vars_email %vars_time %vars_search %vars_pntf %vars_pm

%vars_wordlets %vars_wordlets_err $hf %vars_wordlets_img
%template_html %template_match $standard_title_table

$user_permissions $username $password %forum_thread_data
$forum_threads $alpha_threads $session_login_dt $last_login_j $session_login_j
$pubname $user_number @ubber @login @session $user_topic_view

$ThisHTML $HeaderClean %FILE_CACHE %member_profile $Hiddens $direct_to $LoginWording
$MainButtonsLine $ContactLine $TBT $TBB $Header $Footer $EmailHeader
$show_logout $show_logout_noreg $instant_jscript $title_wording

$ULTIMATEBB $CONTROLPANEL $trademark $trade $InfopopCopyright
$version $version_number $masterCharset $release_j $exact_path
$memlistopen %ULTIMATEBB %GENERIC_GLOBALS $backend $frontend
$MainButtonsLine $ErrorString $common_header_javascript
$board_time_format $board_date_format $vers @checkTheProfile

@datafile $thisline @linearray $bulb $cat $cats $line $ProfileNumber
@theprofile $name $desc $time $id $DataLine @datafile2 $count @itemarray
@catarray @user_profile $postedby $url $last $this @tenfile $done @updated
@tendata @ourarray $free $l $editlink $deletelink $vers $Count @profile
$indexurl %vars_wordlets_links $siteurl $sitetitle $caturl %opt $on $off $change_url
$special_case @special_case @cats

%vars_wordlets_shop $q $function $action $options $shopurl
);

require "vars_config.cgi";
require "ubb_lib.cgi";

&InitImportantStuff;

&RequireCode("$vars_config{CGIPath}/ubb_lib_files.cgi");
&RequireCode("$vars_config{CGIPath}/ubb_lib_filehandler.cgi");
&RequireCode("$vars_config{CGIPath}/ubb_lib_filehandle.cgi");
&RequireVars("$vars_config{CGIPath}/vars_template_match.cgi");
&RequireCode("$vars_config{VariablesPath}/vars_display.cgi");
&RequireCode("$vars_config{VariablesPath}/vars_wordlets.cgi");
&RequireCode("$vars_config{VariablesPath}/vars_wordlets_err.cgi");
&RequireCode("$vars_config{VariablesPath}/vars_wordlets_shop.cgi");
&RequireCode("$vars_config{VariablesPath}/vars_wordlets_mods.cgi");
&RequireCode("$vars_config{VariablesPath}/vars_wordlets_calendar.cgi");

$filehandle = new UBB::FileHandler(%vars_config, "global");

$vers = "1.1 Beta";

&LoadTemplate("public_common");
%vars_style = &LoadStyleTemplate("summary_page");
&set_page_elements;

@ubber = cookie("ubber$vars_config{Cookie_Number}");
if ($ubber[0] ne '') { $username = $ubber[0]; }
if ($ubber[1] ne '') { $password = $ubber[1]; }
if ($ubber[2] ne '') { $pubname = $ubber[2]; }
if ($ubber[3] ne '') { $user_topic_view = $ubber[3]; }
if ($ubber[4] ne '') { $user_number = $ubber[4]; }

if (@ubber) {
@checkTheProfile = &verify_id_num_2($username, $password, $user_number);
unless ($checkTheProfile[4] =~ /Write/) {
print header(
-charset => "$masterCharset",
-type => "text/html"
);
&StandardHTML("User not approved");
}
} elsif ($opt{members_only}) {
&StandardHTML(qq!$vars_wordlets_err{not_logged_in}

<a href="$vars_config{CGIURL}/ultimatebb.cgi?ubb=login" target="_blank">$vars_wordlets{login_now}</a> $vars_wordlets{or} <a href="$vars_config{CGIURL}/ultimatebb.cgi?ubb=agree" target="_blank">$vars_wordlets{register_title}</a>!);
}

if ($@) {
print ("Content-type: text/htmlnn");
print "Error including required files: $@n";
print "Make sure these files exist, permissions are set properly, and paths are set correctly.";
exit;
}
######################################################################################################

$show_logout = qq~
<script language="Javascript" type="text/javascript">
<!--
var user_cookie = getCookie('ubber$vars_config{Cookie_Number}');
if(('' == user_cookie) &#0124;&#0124; (null == user_cookie)) {
document.writeln('$vars_wordlets{not_logged_in}' , ' <a href="$vars_config{CGIURL}/ultimatebb.cgi?ubb=login">$vars_wordlets{login_now}</a> $vars_wordlets{or} <a href="$vars_config{CGIURL}/ultimatebb.cgi?ubb=agree">$vars_wordlets{register_link}</a>')
} else {
var user_array=user_cookie.split("&");
user_array[2] = unescape(user_array[2]);
document.writeln('$vars_wordlets{hello} ', user_array[2]);
document.writeln('[ <a title="$vars_wordlets{logout_acronym}" href="$vars_config{CGIURL}/ultimatebb.cgi?ubb=logoff">$vars_wordlets{logout}</a> ]');
} // end else
//-->
</script>
~;

######################################################################################################

##create q
my $q = CGI->new();

NAVIGATION: {
my %options = (
main => &ShowMain,

);
my $action = $q->param('action') &#0124;&#0124; 'main';
my $function = $options{$action} &#0124;&#0124; undef;

$function ? $function->() : display_error("No such function: $action");
}

exit;


###########################################################################################

sub ShowMain{

&StartPage;

print qq(




$TBT
<tr bgcolor="$vars_style{TableColorStrip}">
<td valign="bottom" align="left"><font color="$vars_style{TableStripTextColor}" size="1" face="$vars_style{FontFace}"><b>» $show_logout </b></font></td>
<td valign="bottom" align="right"><font color="$vars_style{TableStripTextColor}" size="1" face="$vars_style{FontFace}"><b><a href="$ULTIMATEBB">$vars_config{BBName}</a> » $vars_wordlets_shop{shop_name}</b></font></td>
</tr>
<tr>
<td bgcolor="$vars_style{AltColumnColor1}" colspan="2">
<iframe src="$opt{url}" width="100%" height="400">
</iframe>
</td>
</tr>
<tr bgcolor="$vars_style{AltColumnColor2}">
<td align="center" colspan="2">
<b><small>$vars_wordlets_shop{shop_mod} $vers - <a href="https://ubbdev.com" target="_blank">UBBDev.com</a></small></b>
</td>
</tr>
$TBB






);

&EndPage;
} #end


#############################################################################

sub StartPage{
&LoadTemplate("public_common");
&InitImportantStuff;
$MainButtonsLine = &MainButtonOptions;
&init_public_common;
&set_page_elements;

print ("Content-type: text/htmlnn");
print <<HEAD;
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
$Header
<center>

$standard_title_table
</center>


HEAD

} #end

#############################################################################

sub EndPage{
print qq($Footer);
} #end

#############################################################################


sub ShowError {
my $ErrorString = shift;
&StartPage;
print "
<center><b>Error:</b>
$ErrorString";
&EndPage;
} #end

#############################################################################

1;

Sponsored Links
Entire Thread
Subject Posted By Posted
[6.4 - 6.5 - 6.7] [finished] Shop.cgi 1.0 and 2.0 AllenAyres 07/15/2003 5:19 AM
Re: [6.4 - 6.5 - 6.7] [finished] Shop.cgi 1.0 and 2.0 twslex 08/02/2005 1:57 PM
Re: [6.4 - 6.5 - 6.7] [finished] Shop.cgi 1.0 and 2.0 AllenAyres 08/02/2005 8:21 PM
Re: [6.4 - 6.5 - 6.7] [finished] Shop.cgi 1.0 and 2.0 twslex 08/02/2005 8:28 PM
Re: [6.4 - 6.5 - 6.7] [finished] Shop.cgi 1.0 and 2.0 AllenAyres 08/03/2005 5:05 AM
Re: [6.4 - 6.5 - 6.7] [finished] Shop.cgi 1.0 and 2.0 twslex 08/03/2005 9:42 AM
Re: [6.4 - 6.5 - 6.7] [finished] Shop.cgi 1.0 and 2.0 twslex 08/03/2005 9:50 AM
Re: [6.4 - 6.5 - 6.7] [finished] Shop.cgi 1.0 and 2.0 AllenAyres 08/03/2005 8:30 PM
Re: [6.4 - 6.5 - 6.7] [finished] Shop.cgi 1.0 and 2.0 AllenAyres 08/06/2005 4:05 AM

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
hatter
hatter
USA
Posts: 69
Joined: January 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240506)