Автор: Пользователь скрыл имя, 26 Марта 2011 в 14:15, лабораторная работа
Am creat fişierele pentru Тарифы, Договоры, Квитанции şi Отчет in excel.
Kvitansii.AddItem StrD
End If
Next
If Mes2.Caption <> "" Then
New_mes = Mes2.Caption + 1
If New_mes > 12 Then
New_mes = New_mes - 12
New_yeas = CInt(God2.Caption) + 1
Else
New_yeas = CInt(God2.Caption)
End If
BeginPlataMes.Text = New_mes
BeginPlataGod.Text = New_yeas
Else
BeginPlataMes.Text = ""
BeginPlataGod.Text = ""
End If
End Sub
Private Sub Rachet_Click()
N = 0
While Worksheets("Тарифы").Cells(2 + N, 1).Value <> ""
N = N + 1
Wend
Tarif.Text = ""
For i = 1 To N
If CInt(MesPlata.Text)
= CInt(Worksheets("Тарифы").
Tarif.Text
= CLng(Worksheets("Тарифы").
Exit For
End If
Next
End Sub
Private Sub RachetSymma_Click()
If BeginPlataMes.Text = "" Or BeginPlataGod.Text = "" Then
MsgBox ("Внесите информацию о дате начала оплаты")
Exit Sub
End If
If OptionButton1.Value = True Then
Number = 1
ElseIf OptionButton2.Value = True Then
Number = 2
ElseIf OptionButton3.Value = True Then
Number = 3
ElseIf OptionButton4.Value = True Then
Number = 4
ElseIf OptionButton5.Value = True Then
Number = 5
ElseIf OptionButton6.Value = True Then
Number = 6
ElseIf OptionButton7.Value = True Then
Number = 7
ElseIf OptionButton8.Value = True Then
Number = 8
ElseIf OptionButton9.Value = True Then
Number = 9
ElseIf OptionButton10.Value = True Then
Number = 10
Else
MsgBox ("Не указан интервал оплаты")
Exit Sub
End If
a = Number * CLng(Tarif.Text)
NewSymma.Text = CStr(a)
New_mes = BeginPlataMes.Text + Number - 1
If New_mes > 12 Then
New_mes = New_mes - 12
New_yeas = CInt(BeginPlataGod.Text) + 1
Else
New_yeas = CInt(BeginPlataGod.Text)
End If
FinMes.Caption = New_mes
FinGod.Caption = New_yeas
End Sub
Private Sub
Tarif_Change()
End Sub
Private Sub UserForm_Activate()
N = 0
While Worksheets("Договоры").Cells(2 + N, 2).Value <> ""
N = N + 1
Wend
People.Clear
For i = 1 To N
People.AddItem Worksheets("Договоры").Cells(1 + i, 2).Value
Next
Mes = DatePart("m", Date)
yeas = DatePart("yyyy", Date)
MesPlata.Text = Mes
GodPlata.Text = yeas
N2 = 0
While Worksheets("Тарифы").Cells(2 + N2, 1).Value <> ""
N2 = N2 + 1
Wend
For i = 1 To N2
If CInt(MesPlata.Text)
= CInt(Worksheets("Тарифы").
Tarif.Text
= CLng(Worksheets("Тарифы").
Exit For
End If
Next
End Sub
Forma pentru “Подтверждение оплаты”:
Cod:
Private Sub OK_Click()
If Stroki.ListIndex = -1 Then
MsgBox ("Не выбрана квитанция")
Exit Sub
End If
Worksheets("Квитанции").Cells(
N = 0
While Worksheets("Квитанции").Cells(
N = N + 1
Wend
Stroki.Clear
For i = 1 To N
If Worksheets("Квитанции").Cells(
Stroki.AddItem (i + 4)
End If
Next
SymKvit.Caption = ""
Mes.Caption = ""
God.Caption = ""
End Sub
Private Sub People_Click()
NumDog.Caption = Worksheets("Договоры").Cells(2 + People.ListIndex, 1).Value
Mes.Caption = ""
God.Caption = ""
SymKvit.Caption = ""
N = 0
While Worksheets("Квитанции").Cells(
N = N + 1
Wend
Stroki.Clear
For i = 1 To N
If Worksheets("Квитанции").Cells(
Stroki.AddItem (i + 4)
End If
Next
End Sub
Private Sub Stroki_Click()
Mes.Caption
= Worksheets("Квитанции").Cells(
God.Caption
= Worksheets("Квитанции").Cells(
SymKvit.Caption
= Worksheets("Квитанции").Cells(
End Sub
Private Sub UserForm_Activate()
N = 0
While Worksheets("Договоры").Cells(2 + N, 2).Value <> ""
N = N + 1
Wend
People.Clear
For i = 1 To N
People.AddItem Worksheets("Договоры").Cells(1 + i, 2).Value
Next
End Sub
6. Creem saitul unde va fi afişată
informaţia despre achitări: http://f4-preview.awardspace.
Unde sunt urmatoarele fişiere cu codul:
index.html
<html>
<head>
<title>Оплата опучентя</title>
<meta http-equiv="Content-Type" content="text/html" charset="windows-1251">
<STYLE TYPE="text/css">
A{text-decoration:none;font-
A:hover {text-decoration:underline;
</style>
</head>
<body>
<a href="stud.php">Раздел для студентов</a>
<br><a
href="admin.html">
</body>
</html>
admin.html
<html>
<head>
<title>Авторизация</title>
<meta http-equiv="Content-Type" content="text/html" charset="windows-1251">
</head>
<body>
<form action="obr.php" method="post">
Логин:<input type='text'name='n1'><br><br>
Пароль:<input
type='password'name='n2'><br><
<input name='n3' type='submit' value='OK'>
</form>
</body>
</html>
obr.php
<html>
<head>
<title>Проверка пароля и логина</title>
<meta http-equiv="Content-Type" content="text/html" charset="windows-1251">
<style TYPE="text/css">
A { text-decoration:none;font-
A:hover {text-decoration:underline;
background-color:#CCFFCC}
</style>
</head>
<body>
<?php
if (isset($_POST['n3']))
{
if ($_POST['n1']== "sm" && $_POST ['n2'] == "230")
{ echo "Авторизация прошла успешно !!!";
echo "<br> <a href='perevod.html'>
Перевод информации об оплатах в базу данных </a>";
}
else
{ die('Неверныи пароль <br><a href = "index.html"><br>
Вернуться на стартовую страницу</a>');}
}
else
{ echo '<a
href ="index.html">Вернутся на
?>
</body>
</html>
perevod.html
<html>
<head>
<title>Отправка на сайт файла</title>
<meta http-equiv="Content-Type" content="text/html" charset="windows-1251">
</head>
<body>
<h1>Отправка на сайт файла</h1>
<form action="upload.php" method="post" enctype="multipart/form-data">
Имя файла:<input type="file" name="filename" size=40><br><br>
<input type="submit" value="загрузить"><br>
</form>
</body>
</html>
Информация о работе Evidenţa achitării contractelor de studii