#!/usr/bin/perl ########################################################## # *** login.cgi 1.3 *** # # This script is a part of the following program: # # ---- YOURcom 1.3 ---- # # Script Copyright (c) YOURsoft 2002 and on. # All rights reserved. http://www.yoursoft-tm.com # # Selling the code for this program without prior written consent is # expressly forbidden. Obtain permission before redistributing this # program over the Internet or in any other medium. In all cases # copyright and header must remain intact. # # By using this code you agree to indemnify YOURsoft from any # liability that might arise from it's use. # # Batteries not included # # Questions, suggestions, comments: www.yoursoft-tm.com # ########################################################## ################### DO NOT EDIT BELOW #################### require 'load.cgi'; open(GOR,$template_up); @gor = ; close(GOR); open(DOL,$template_down); @dol = ; close(DOL); if ($ENV{'REQUEST_METHOD'} eq 'POST') { read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $name =~ tr/+/ /; $name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $FORM{$name} = $value;} if ($FORM{'code'} eq "get") {&show_code;} else {&show_data;} } else { print "Content-type: text/html\n\n"; print qq~ @gor

$izrazi{welcome_user}
$izrazi{please_insert}

$izrazi{id}

$izrazi{pass}


$izrazi{forgot_pass}

@dol ~; } sub show_code { $id = $FORM{'id'}; $banners = "banners.txt"; $textads = "textads.txt"; if (-e $banners) { open(BANNERS, $banners); @banner = ; close(BANNERS); } else {$banners = "NE";} if (-e $textads) { open(TA, $textads); @textad = ; close(TA);} else {$textads = "NE";} print "Content-type: text/html\n\n"; print qq~ @gor

$izrazi{html_generator}

$izrazi{get_code}

$izrazi{here_are}

$izrazi{to_use}


~; if ($banners ne "NE") { $y=1; foreach $ban (@banner){ chomp $ban; ($src, $height, $width, $alt) = split(/%%/,$ban); print "

$izrazi{banner} $y
\"$alt\"

\n"; if ($use_sef_links == 1) { print "

$izrazi{code_ban} $y:

\n"; } else { print "

$izrazi{code_ban} $y:

\n"; } $y++;} print "
\n"; } if ($textads ne "NE") { $zz=1; foreach $ad (@textad){ chomp $ad; ($text, $font, $fsize) = split(/%%/,$ad); print "

$izrazi{textad} $zz:

$text

\n"; if ($use_sef_links == 1) { print "

$izrazi{code_textad} $zz:

\n"; } else { print "

$izrazi{code_textad} $zz:

\n"; } $zz++;} } print qq~

 

$izrazi{exit}

$izrazi{click2exit}

 

@dol ~; exit; } sub show_data { $id = $FORM{'id'}; $pass = $FORM{'pass'}; $log = "counts/$id.txt"; $data_file = "userdata/$id.txt"; if (-e $data_file) { open(DATA, $data_file); $info = ; close(DATA); } else {&error; exit;} if ($optional_field == 1) { ($id,$earned,$ime,$email,$ulica,$posta,$kraj,$state,$drzava,$tel,$url,$geslo,$opt1) = split("%%",$info); } else {($id,$earned,$ime,$email,$ulica,$posta,$kraj,$state,$drzava,$tel,$url,$geslo) = split("%%",$info);} if($pass eq $geslo) {&check_log;} else {&error; exit;} } sub check_log { if (-e "$log") {&show_count;} else { open(CREATE,">$log"); print CREATE "0"; close(CREATE); &show_count;} } sub show_count { open(LOG,$log); $count=; close(LOG); print "Content-type: text/html\n\n"; print qq~ @gor

$izrazi{uip}

$izrazi{yai}

$izrazi{id} $id
$izrazi{clicks} $count
$izrazi{com} ($currency): $earned

~; if ($optional_field ==1) {print qq~ ~; } print qq~
$izrazi{fullname}
$izrazi{address}
$izrazi{city}
$izrazi{state}
$izrazi{zip}
$izrazi{country}
$izrazi{phone}
$izrazi{email}
$optional_field_txt
$izrazi{site_url}
$izrazi{pass}

 

$izrazi{get_html}

$izrazi{here_code}

 

$izrazi{exit}

$izrazi{click2exit}

 

@dol ~; } sub error { print "Content-type: text/html\n\n"; print qq~ @gor

$izrazi{error}

$izrazi{wrong_user}
$izrazi{return_user}

 

@dol ~; }