-
Notifications
You must be signed in to change notification settings - Fork 120
/
Copy pathprograms.pl
112 lines (89 loc) · 2.79 KB
/
programs.pl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
#!/usr/bin/perl
# index.pl
use CGI;
use CGI::Carp qw/fatalsToBrowser warningsToBrowser/;
use CGI::Session ( '-ip_match' );
use DBI;
require "xpl/config.pl";
$session = CGI::Session->load();
$q = new CGI;
$cook = $q->param('cook');
$db_name = 'DBI:mysql:' . $config{MysqlDB};
$dbh = DBI->connect($db_name, $config{MysqlUser}, $config{MysqlPass}) || die "Could not connect to database: $DBI::errstr";
$sth = $dbh->prepare( "SELECT * FROM affiliates WHERE cook = ?" );
$sth->execute( $cook );
$sth->bind_columns( \$id, \$name, \$password, \$affid, \$email, \$cook );
$sth->fetch();
if($session->is_expired)
{
print $q->header(-cache_control=>"no-cache, no-store, must-revalidate");
print "Your has session expired. Please login again.";
print "<br/><a href='login.pl>Login</a>";
}
elsif($session->is_empty)
{
#print $q->header(-cache_control=>"no-cache, no-store, must-revalidate");
print "Status: 301 Moved\nLocation: login.pl\n\n";
}
else
{
print $q->header(-cache_control=>"no-cache, no-store, must-revalidate");
indexalltab();
}
sub indexalltab
{
print <<THEHTMLINDEX;
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<HTML xmlns="http://www.w3.org/1999/xhtml" lang="fr"><HEAD><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<TITLE>$config{NetName} - User Information</TITLE>
<LINK rel="stylesheet" type="text/css" href="style/style3.css" media="all">
</HEAD><BODY>
<DIV id="top_nav">
<DIV class="content">
<UL>
<LI><A href="index.pl?cook=$cook" title="Home" class="Home">Home</A></LI>
<LI><A href="tools.pl?cook=$cook" title="tools">Tools</A></LI>
<LI><A href="stats.pl?cook=$cook" title="Report">Report</A></LI>
<LI><A href="programs.pl?cook=$cook" title="Account">Account</A></LI>
<LI><A href="help.pl?cook=$cook" title="Support">Support</A></LI>
<LI><A href="#" title=""></A></LI>
<LI><A href="login.pl?action=logout" title="Log Out">Log Out</A></LI>
</UL>
</DIV>
</DIV>
<center>
<br><br><br>
<b>
<h2>[ Account Summary ]</h2>
<br>
<DIV id="main">
<DIV class="content">
<DIV id="pages">
<DIV id="home">
<DIV>
</DIV>
<br><br>
<h3>Contact Information</h3><br>
<font color=black>Username:</font> $name <br>
<font color=black>AffID:</font> $affid <br>
<font color=black>Email:</font> $email <br><br>
<br><br>
</DIV>
</DIV>
</DIV>
</DIV>
<br>
if you have questions or program request, contact us at <a href="mailto:$config{NetEmail}"> $config{NetEmail}</a>
<br><br>
</center>
<DIV id="footer">
<DIV class="content">
<DIV class="copyright">
<P><BR>
</DIV>
</DIV>
</DIV>
</body>
</html>
THEHTMLINDEX
}