| Server IP : 208.122.213.31 / Your IP : 216.73.216.185 Web Server : Apache System : Linux msd6191.mjhst.com 4.18.0-553.137.1.el8_10.x86_64 #1 SMP Wed Jun 24 11:40:24 UTC 2026 x86_64 User : WHMCS_MIA_382 ( 1001) PHP Version : 7.4.33 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/httpd/html/baberankings.com.bak/cgi-bin/ |
Upload File : |
#
################################################################################
# #
# File : PBM Screen Routines #
# Description : Contains All The Screen Handling Routines Used By Out Scripts #
# Version : 1.03 #
# Created : 22nd September 1998 by Steve #
# Last Updated : 10th October 1998 #
# #
# Copyright (c) 1998 Purely By Magic. All rights reserved. #
# WWW : http://www.geocites.com/purelybymagic/ #
# Email : purelybymagic@yahoo.co.uk #
# #
################################################################################
# #
# Version History #
# #
# 22/09/98 : 1.00 : Script Created : steve #
# 28/09/98 : 1.01 : Added LABEL type to SetInput Routine : steve #
# 03/10/98 : 1.02 : Incorporated ShowLoginScreen & ShowPasswordChange : steve #
# 10/10/98 : 1.03 : Several Changes Made For Multi-User Support : steve #
# #
################################################################################
# #
# Conditions for use of this application #
# #
# This application is free software and can be redistributed and/or modified #
# if the following conditions are met: #
# #
# a) This copyright notice and the header are neither modified or removed #
# b) The application is not sold to a third party #
# c) The application is not used for financial gain #
# #
# This application is distributed in the hope that it will be useful #
# but without any warranty. The use of this application removes any liability #
# from Purely By Magic and it's employees, that may arise from the #
# installation, implementation, modification and/or its use. #
# #
################################################################################
################################################################################
#
# Subroutine Used To Initialize The Data Screen And The Form
#
sub InitializeScreen
{
# Get The Parameters Of The Screen
my ($title, $version, $menu, $color, $width) = @_;
# If We Are In Demo Mode Then Say So
if($demo) { $title .= " (Demo Mode)"; }
# Write Out The Main HTML Header
print "<HTML>\n";
print "<HEAD><TITLE>$title</TITLE></HEAD>\n";
print "<BODY BGCOLOR=\"$color\" LINK=\"#0000FF\" ALINK=\"#0000FF\" ";
print "VLINK=\"#0000FF\">\n";
print "<CENTER>\n";
# Write Out The Form Header
print "<FORM ACTION=\"$script\" METHOD=\"POST\">\n";
# Write Out The Main Table Header
print "<TABLE WIDTH=\"600\" BORDER=\"1\" BORDERCOLOR=\"#000000\">\n";
print "<TR>\n";
# Write Out The Application Title
print "<TD ALIGN=\"CENTER\" VALIGN=\"TOP\" BGCOLOR=\"#FFFFFF\">";
print "<FONT FACE=\"Arial\" SIZE=\"2\" COLOR=\"#FF0000\">";
print "$title V", "$version Configuration Utility";
# If We Are In Multiuser Mode Then Display The Username
if($multi_user) { print " [User = $INPUT{'USER'}]"; }
# Write Out The Footer
print "</FONT>";
print "</TD>\n";
print "</TR>\n";
# Write Out Screen Name
print "<TR>\n";
print "<TD ALIGN=\"CENTER\" VALIGN=\"TOP\" BGCOLOR=\"#FFFFFF\">";
print "<FONT FACE=\"Arial\" SIZE=\"2\" COLOR=\"#0000FF\">";
print "$menu";
print "</FONT>";
print "</TD>\n";
print "</TR>\n";
# Write Out The Data Table Header
print "<TR>\n";
print "<TD VALIGN=\"TOP\" BGCOLOR=\"#C0C0C0\">";
print "<CENTER>\n";
print "<TABLE WIDTH=\"550\" CELLPADDING=\"5\">\n";
print "<TR>\n";
print "<TD></TD><TD></TD>\n";
print "</TR>\n";
}
#
################################################################################
#
# Subroutine Used To Write Out The Screen Footer
#
sub FinishScreen
{
# Write Out The Data Table Footer
print "<TR><TD COLSPAN=\"2\"><HR></TD></TR>\n";
print "</TABLE>\n";
# Write Out The Main Table Footer
print "</CENTER>\n";
print "</TD>\n";
print "</TR>\n";
print "</TABLE>\n";
# Write Out The Form Footer
print "</FORM>\n";
# Write Out The Main HTML Footer
print "</CENTER>\n";
print "</BODY>\n";
print "</HTML>\n";
}
#
################################################################################
#
# Subroutine Used To Store A Configuration Variable Value As A Hidden Field
#
sub StoreConfig
{
# Get The Variable's Name And Value
my ($name, $value) = @_;
# Write Out The Hidden Field HTML Source
print "<INPUT TYPE=\"HIDDEN\" NAME=\"$name\" VALUE=\"$value\">\n";
}
#
################################################################################
#
# Subroutine Used To Display A Header On The Data Screen
#
sub CreateHeader
{
# Get The Header Text
my ($header) = @_;
# Write Out The Header HTML Source
print "<TR><TD COLSPAN=\"2\"><HR><CENTER>";
print "<FONT FACE=\"Arial\" SIZE=\"2\"><B>$header</B></FONT>";
print "</CENTER><HR></TD></TR>\n";
}
#
################################################################################
#
# Subroutine Used To Initialize A Row Which Will Contain Input Fields
#
sub CreateRow
{
# Get The Label Associated With The Field
my ($label) = @_;
# Write Out The Row HTML Source
print "<TR>\n";
print "<TD VALIGN=\"TOP\">";
print "<FONT FACE=\"Arial\" SIZE=\"2\">$label</FONT>";
print "</TD>\n";
print "<TD VALIGN=\"TOP\">";
}
#
################################################################################
#
# Subroutine Used To Write Out A Row Footer
#
sub EndRow
{
# Write Out The Row Footer HTML Source
print "</TD>\n";
print "</TR>\n";
}
#
################################################################################
#
# Subroutine Used To Set And Display The Input Field In A Row
#
sub SetInput
{
# Get The Field Type, Name And Other Necessary Parameters
my ($type, $name, @values) = @_;
# Check To See If It Is A Lookup Field
if($type eq 'LOOKUP')
{
# If So Then Use The Select Input Field
print "<SELECT NAME=\"$name\" SIZE=\"1\">";
# Parse Each Of The Values In The Lookup
foreach $value (@values)
{
# Check To See If
my $default = " SELECTED" if($CONFIG{$name} eq $value);
print "<OPTION VALUE=\"$value\"$default>$value</OPTION>";
}
print "</SELECT>";
}
if($type eq 'QUESTION')
{
my $YES = " CHECKED" if($CONFIG{$name} eq 'YES');
my $NO = " CHECKED" if($CONFIG{$name} eq 'NO');
print "<FONT FACE=\"Arial\" SIZE=\"2\">Yes</FONT> ";
print "<INPUT TYPE=\"Radio\" NAME=\"$name\" VALUE=\"YES\"$YES>";
print "<FONT FACE=\"Arial\" SIZE=\"2\"> No</FONT> ";
print "<INPUT TYPE=\"Radio\" NAME=\"$name\" VALUE=\"NO\"$NO>"
}
if($type eq 'TEXT')
{
print "<INPUT TYPE=\"TEXT\" NAME=\"$name\" ";
print "SIZE=\"$values[0]\" VALUE=\"$CONFIG{$name}\">";
}
if($type eq 'PASSWORD')
{
print "<INPUT TYPE=\"PASSWORD\" NAME=\"$name\" ";
print "SIZE=\"$values[0]\" VALUE=\"$CONFIG{$name}\">";
}
if($type eq 'LINK')
{
print "<A HREF=\"$values[0]\"><FONT FACE=\"Arial\" SIZE=\"2\">";
print "$name";
print "</FONT></A>";
}
if($type eq 'IMAGE')
{
print "<IMG BORDER=\"$values[0]\" SRC=\"$name\">";
}
if($type eq 'BUTTON')
{
print " <INPUT TYPE=\"Submit\" NAME=\"COMMAND\" VALUE=\"$name\">";
}
if($type eq 'LABEL')
{
print " <FONT FACE=\"Arial\" SIZE=\"2\">$name</FONT>";
}
}
#
################################################################################
#
# Subroutine Used To Show The Login Screen
#
sub ShowLoginScreen
{
# Initialize The Screen
&InitializeScreen($script_name, $version, "Login", "#639463");
# Store The Screen Name
&StoreConfig("SCREEN", "LOGIN");
&StoreConfig("USER", $INPUT{'USER'});
# Create The Login Header
&CreateHeader("Enter Login Details");
# Create The Password Input Field
&CreateRow("Password");
&SetInput("PASSWORD", "PASSWORD", 20);
&EndRow();
# Create The Login Button
&CreateRow("");
&SetInput("BUTTON", "Login");
&EndRow();
# Finalize The Screen
&FinishScreen();
}
#
################################################################################
#
# Subroutine Used To Show The Password Change Screen
#
sub ShowPasswordChange
{
# Initialize The Screen
&InitializeScreen($script_name, $version, "Password Change", "#639463");
# Store The Screen Name
&StoreConfig("SCREEN", "CHANGE");
&StoreConfig("PASSWORD", $INPUT{'PASSWORD'});
&StoreConfig("USER", $INPUT{'USER'});
# Create The Login Header
&CreateHeader("Enter Password Details");
# Create The Password Input Field
&CreateRow("New Password");
&SetInput("PASSWORD", "NEW_PASSWORD_1", 20);
&EndRow();
# Create The Password Input Field
&CreateRow("New Password Again");
&SetInput("PASSWORD", "NEW_PASSWORD_2", 20);
&EndRow();
# Create The Login Button
&CreateRow("");
&SetInput("BUTTON", "Ok");
&EndRow();
# Finalize The Screen
&FinishScreen();
}
#
#################################################################################
#################################################################################
# Stop The 'require' Complaining
1;