#!/usr/bin/perl
###################################################################################
# #
# PerlDesk - Customer Help Desk Software #
# #
###################################################################################
# #
# Author: John Bennett #
# Email: j.bennett@perldesk.com #
# Web: http://www.perldesk.com #
# Filename: pdesk.cgi #
# Details: The installation file #
# Release: 1.5.5 #
# #
###################################################################################
# Please direct bug reports,suggestions or feedback to the perldesk forums. #
# www.perldesk.com/board #
# #
# PerlDesk is free for both commercial and non-commercial use providing that the #
# copyright headers remain intact and the links remain on the html pages. #
# Re-distribution of this script without prior consent is strictly prohibited. #
# #
###################################################################################
# Please see the README/INSTALL files if you have any problems with this software #
###################################################################################
use CGI qw(:standard);
use DBI;
require "include/conf.pl";
$dbh = DBI->connect("DBI:mysql:$dbname:$dbhost","$dbuser","$dbpass") or die_nice("Could not connect to the help desk database");
$q = CGI->new();
print "Content-type:text/html\n\n";
template("$connect") if $connect;
eval { &navigate(); };
if ($@)
{
print $@;
}
sub navigate {
if (defined $q->param('action'))
{
my $action = $q->param('action');
&install2 if $action eq "install2";
&install3 if $action eq "install3";
&install4 if $action eq "install4";
}
else {
&install2;
}
}
sub install2 {
my $html = qq|
|;
template("$html");
}
sub install3 {
my $data = $q->param('data');
my $imgbase = $q->param('imgbase');
my $baseurl = $q->param('baseurl');
my $title = $q->param('title');
my $sendmail = $q->param('sendmail');
my $tracking = $q->param('pretrack');
my $language = $q->param('language');
my $adminem = $q->param('adminemail');
$progress .= "";
template("$progress");
}
sub install4
{
$html = qq|
| Installation
Complete |
| Please
access your administration panel using the details below. |
| |
|
| By
using perldesk you agree to do so under the terms of the license, which
require the links back to perldesk to remain in the templates, you can remove
them for a fee of \$70 USD - For information, please email John Bennett
|
| |
|
|
| |
| Admin
Login |
Username:
admin
Password: demo |
| |
| You
MUST delete this install.cgi file before accessing the administration
panel for security reasons. |
|;
template("$html");
}
sub template
{
my @web = "@_";
print qq|PerlDesk Installation
|;
exit;
}