-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIniFile-sql.php
More file actions
65 lines (59 loc) · 1.83 KB
/
IniFile-sql.php
File metadata and controls
65 lines (59 loc) · 1.83 KB
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
<!DOCTYPE html>
<?php
session_start();
header('Content-Type: text/html; charset=CP1255');
ob_start();
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past
include 'DBConect.php';
?>
<html>
<head>
<meta charset="windows-1255">
<link rel="stylesheet" href="css/psos.css" type="text/css">
<?php
if (!isset($_SESSION['UWorkerNum'])){
header("Location: login.php?stat=3");
exit();
}
if($_SESSION['mng'] != 2){
header("Location: login.php");
exit();
}
$WrkId=$_SESSION['UWorkerName'];
$WrkNm=$_SESSION['UWorkerNum'];
$IniId = $_POST['IniId'];
$monthOrWeek = $_POST['monthOrWeek'];
if($monthOrWeek == "month"){
$sql = " Update IniFile set Parameter = 'StartOfPreviousMonth' Where ID = 28";
}
else if($monthOrWeek == "week" && isset($_POST['NumOfWeeks'])){
$NumOfWeeks = $_POST['NumOfWeeks'];
$sql = " Update IniFile set Parameter = 'ByDepthOfInternetOnlineDisplay' Where ID = 28";
$sql1 = " Update IniFile set NumOfWeeks = " . $NumOfWeeks . " Where ID = 1";
}
if(isset($_POST['NumberOfManualChangesInInternetOnline'])){
$NumberOfManualChangesInInternetOnline = $_POST['NumberOfManualChangesInInternetOnline'];
$sql2 = " Update IniFile set Parameter = " . $NumberOfManualChangesInInternetOnline . " Where ID = 68";
}
echo $vbCrLf . "<!--" . $sql . "-->" . $vbCrLf;
echo $vbCrLf . "<!--" . $sql1 . "-->" . $vbCrLf;
echo $vbCrLf . "<!--" . $sql2 . "-->" . $vbCrLf;
if(isset($sql)){
$sthIni = $dbh->query($sql);
}
if(isset($sql1)){
$sthIni = $dbh->query($sql1);
$_SESSION['WeeksPerPage'] = $NumOfWeeks;
}
if(isset($sql2)){
$sthIni = $dbh->query($sql2);
$_SESSION['NumberOfManualChangesIOL'] = $NumberOfManualChangesInInternetOnline;
}
$dbh = null;
$sth = null;
header("Location: Workers.php");
exit();
?>
</head>
</html>