-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.php
54 lines (48 loc) · 1.74 KB
/
index.php
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
<?php
/******************************************************************************************
This file is a part of SIMPLE WEB STATICSTICS GENERATOR FROM APRX LOG FILE
It's very simple and small APRX statictics generator in PHP. It's parted to smaller files and they will work independent from each other (but you always need chgif.php).
This script may have a lot of bugs, problems and it's written in very non-efficient way without a lot of good programming rules. But it works for me.
Author: Peter SQ8VPS, sq8vps[--at--]gmail.com & Alfredo IZ7BOJ
You can modify this program, but please give a credit to original author. Program is free for non-commercial use only.
(C) Peter SQ8VPS & Alfredo IZ7BOJ 2017-2018
Version 1.2.1beta
*******************************************************************************************/
include 'config.php';
include 'common.php';
logexists();
if((!isset($_SESSION['if'])) or (isset($_SESSION['if']) and ($_SESSION['if'] == ""))) //if interface was not selected
{
if(($static_if == 1) && ($static_call != ""))
{
session_start();
$callsign = strtoupper($static_call); //uppercase the static callsign
$_SESSION['call'] = $callsign;
$callsignraw = $callsign;
while(strlen($callsignraw) < 9)
{
$callsignraw .= " "; //add spaces to raw callsign
}
$_SESSION['if'] = $callsignraw;
if($static_lang == "en")
{
$_SESSION['lang'] = "en";
} else if($static_lang == "pl")
{
$_SESSION['lang'] == "pl";
} else
{
$_SESSION['lang'] = "en";
}
header('Refresh: 0; url=summary.php');
}
else
{
header('Refresh: 0; url=chgif.php?chgif=1');
}
die();
} else { //else if inteface selected
header('Refresh: 0; url=summary.php');
die();
}
?>