364 , , : , , , , , , . , , , .
:
364150
(304)
(123)
(23)
(113)
(4)
(4814)
(5227)
(2616)
(3423)
(4214)
(1518)
(68)
- (2836)
(8269)
(50)
(50)
(762)
(2)
(5275)
(30)
(1222)
(43)
(20403)
(465)
(19)
(108)
(173)
(96)
(899)
(54)
(34)
(476)
(106)
(62792)
(3562)
, (6444)
(2165)
(21320)
(766)
(64)
(3145)
(60)
(17)
(588)
(1000)
(106)
(48)
(3)
(1167)
(8485)
(537)
: (2044)
(11657)
(532)
(21)
(7985)
(3721)
, (10549)
(88)
(58)
(36)
(2257)
(12491)
(91)
(797)
(1338)
(24)
, (214)
(1141)
(3)
(8)
(21697)
(7850)
(3801)
(682)
, (2881)
(475)
(1)
, (7100)
(8694)
, (4121)
(443)
(952)
(2967)
(23)
(748)
(4876)
(95)
(107)
(7)
(2004)
(15)
(663)
(240)
(39)
(25)
(624)
(16)
(2652)
(136)
(90)
(406)
(95)
(24)
(3463)
(4482)
(7216)
(4592)
(5386)
(3)
(2244)
(23)
(29)
(35)
(4517)
(20645)
- (666)
(119)
(2573)
(889)
(288)
(148)
, (1140)

: web-

: web-
: ,
: 11:47:36 25 2010
: 84 : 2 : 0 : 0 :    

1. o po oa

1.1 apapa oao pp po oa

1.2 p aa paa

1.3 O o a opao-ooo opa

1.4 O o opa

1.5 O oo pop pop a

2. poa a popoa o

3. poa paa a o p

3.1 O popaoo a op

3.2 Popoa aoa opao

4. op a a -oa

4.1 O popaoo a paa oa

4.2 O pp opo popa

4.3 a poo -oa

o

p opao pap

oa


ao opa pa a po. poo aoo-oo pop opa a . oa poa op pa oo op aoapoa aoaoa opa . ֳ apoa po opa o a aoaoa opa , oᒺ a a. apa poo oo aaop, opaa, p ao pa opa. opo pa opa oa opoa opa , oooo aoo op a a. o oo p op a pa, opo opa, o p.

ao a oo a, poo p oo a p Internet, oa opa o oao oa po opa aa a. a Internet a 䒺o ao o ; oa apo p p, ao a oap, a op opa, a ; opa op oa, paa aa a p p. ao o aao p, aa paa oap p Internet, a a Internet a, oo aa o oaa oap, ao, a aoo oap. a a ao opo aao o a o opa.

³oo o oo, o aoo pooo po a o oa a paa oap. aa a aao a oo oa a o pa aoa.

aa: poa web-oa o oa a paa oap.


1. o po oa

1.1 apapa oao pp po oa

po oa, o popo -oao, a oap. pa a o po o oap, ao a a; poo opa: oaa, paa oap; o oaa a ao.

a a oo ao oap o oap a aoa, aa a a. ao opa po oaa a 볺. oo poo aa a.

a popa po oo o o oa oap a a, a ao opa po ao a ao oap. O oa p opa po ao a ao oap.

ao oap a :

op o;

oap;

oaa;

aa ao;

oap;

ao oap a :

op o;

oap;

ao;

aa ao;

oap;

ao paa a apaop oa a a opa po ao a ao, oaa a ao.

a aoo o op aa opaa a.


1.2 p aa paa

aa, paoa -oa. Pooo a p: , oa apaopo, a , o opaa:

1. aa, o opaa:

ppa opaa;

p opa po oap;

ao oap;

o oap a pp;

2. aa, oa apaopo:

oa opa po oap;

p aa;

op paa a po;

op ao a po;

1.3 O o a opao-ooo opa

a 1 p o

oo aop opa oa p aoa ao
poa aaa DOC1 o o p ao oap a a
aa aoa DOC2 aa o p ao

a 2 pp o opa oo

ppa o o a po opa aop pa opa
aa oaaa - poa aaa DOC1
Apa oaaa - poa aaa DOC1
P oaaa - poa aaa DOC1
op aao 1 poa aaa DOC1
aa 0000/00/00 poa aaa DOC1
ʳ oap 1 poa aaa DOC1
aa oap - poa aaa DOC1
ֳa oap 000,00 poa aaa DOC1
aa aoa - aa aoa DOC2
Apa aoa - aa aoa DOC2
P aoa - aa aoa DOC2
ʳ oap 1 aa aoa DOC2
aa oap - aa aoa DOC2
ֳa oap 000,00 aa aoa DOC2

opa po a a pa a opo opa oa popa. opao-ooo opa.

1.4 O o opa

a 3 p o

oo aop opa oa p aoa a
aoa aaa DOC3 o o p a oap a
ao DOC4 o 1 pa /
paa DOC5 o 1 pa /

a 4 pp o opa oo

ppa o o a po opa aop pa opa
aa aoa - aoa aaa DOC3
Apa aoa - aoa aaa DOC3
P aoa - aoa aaa DOC3
op aao 1 aoa aaa DOC3
aa 0000/00/00 aoa aaa DOC3
ʳ oap 1 aoa aaa DOC3
aa oap - aoa aaa DOC3
ֳa oap 000,00 aoa aaa DOC3
aa 0000/00/00 ao DOC4
ʳ oap 1 ao DOC4
aa oap - ao DOC4
ֳa oap 000,00 ao DOC4
aa 0000/00/00 paa DOC5
ʳ oap 1 paa DOC5
aa oap - paa DOC5
ֳa oap 000,00 paa DOC5

1.5 O oo pop pop a

opaa oo pa:

ppa opaa;

p opa po oap;

aa;

ao oap;

o oap a pp;

aa;

Ppa opaa oa ao o o a op ppa. opa o p opa po a a a oap: , , o oap, oa o oap o . ao oap oa ao o o op a a a a pp, o pa .

apaopa opo pa:

1. a-po: oa a apo.

2. a:

oa opa po oap;

p aa;

op paa a po;

op ao a po;

3. aa.

oa opa po ao ao a oo a 볺. ֳ a oa o oa aoa aaa, op p paa oap.

op paa oa op oap paoaoo a po: a, o, a o, apo. ap paoaoo oap ooo aa opao a opo:


V = K*C,

V ap oap ooo aa, K oap, C a a o oap;

aaa ap paoaoo oap:

V = sum(Vi),

oo a apo oap ooo aa paoa a po.

op oaa aao po , a opo o a a po oap, o ao oaa. ap oaoo oap ooo aa opao a opo:

Vj = Kj*Cj,

Vj ap oap ooo aa, Kj oap, Cj a a o oap;

aaa ap oaoo oap:

V = sum(Vj),

oo a apo oap ooo aa oa a po.

ʳ oap a a oo o oo opo oa:

p ao:


i=Ks+Kn,

ʳ oap ooo aa ao a a, Ks oap ooo aa a a, Kn oap ooo aa, o ao.

p ao:

i=Ks+Kz,

Ks oap ooo aa a a, Kz oap ooo aa, o ao.


2. poa a popoa o

p opo oᒺ apap a .

Oᒺ o p po oa, o a ao. Oᒺa ao po oa a : oaa, ao, oap, poa aaa, aoa aaa. o oᒺ a o apap o ao oᒺa. apapa oᒺa oaa : aa oaaa, apa oaaa, p oaaa. apapa oᒺa ao : aa aoa, apa aoa, p aoa. apapa oᒺa oap : aa oap, a oap, opa po oap, oo. apapa oᒺa poa aaa : op aao, oaa, oap, aa, oap. apapa oᒺa aoa aaa : op aao, ao, oap, aa, oap.

ao opo o a pa a, o ooo oa, o oop, a ao oo oᒺa. a oo o o (a) a pooo opaa a opaa aoo o.

ϳ opaa po oo o a a po o, p o o po (1), po (2), po opao (3) op.

pa opaa opa paa, o o o a o o o oop p. ϳ 1 op opa a: 볺, oap, aaa. a opa po oaa a ao o o oop, o o o a 볺. aa ao o oop, o o a aaa oa o o.

pa opaa opa paa, o o ao 1 op o po o ooao p . o oo oao o a o o: 볺 o 볺a, a o oap, a aaa o op o.

3 opa paa, o o ao 1 a 2 opa, a ao o a -oo o, o o o poo a aao o.

ϳ opaa o po op a. a: o-o-ooo, o-o-aao, aao-o-aao. ao a :

o-o-aao: 볺 aaa ( op oa o o 볺a a aaa);

aao-o-aao: a aaa ( op aoo op o a , o o: o o o oap).

ao pa apo a oa ooo 볺, app a a opo op op a Aopa o: o, o, apo, a, o 볺a.

a 5 Sklad.db a

/ aa o aa apa a oa o
1 Id_t ˳ auto increment -
2 Marka apa oa varchar 30
3 Price ֳa oa float -
4 Count ʳ oap int 3
5 Foto apa varchar 250
6 Info o po oap blob -

a 6 Klient.db 볺

/ aa o aa apa a oa o
1 Id_k ˳ auto increment -
2 Name_k aa 볺a varchar 100
3 Adress_k Apa 볺a varchar 100
4 Rekviz_k P 볺a varchar 100

a 7 Nakladna.db aaa

/ aa o aa apa a oa o
1 Id_doc ˳ auto increment -
2 Data aa opa date -
3 Tup_doc aao varchar 20
4 Id_klient o 볺a int 12

a 8 Vmist.db aao

/ aa o aa apa a oa o
1 Id_vmist ˳ auto increment -
2 Id_tovar o oap int 11
3 Id_document o aao int 11
4 Count_tovar ʳ oap int 11

a 9 Authorize.db Aopa

/ aa o aa apa a oa o
1 Id_autho ˳ auto increment -
2 Id_kl o 볺a int 11
3 Log o varchar 10
4 Pass apo varchar 10
5 Status a opaa varchar 10

a oo oa a a o oo o.


˲

o 볺a
aa 볺a
Apa 볺a
P 볺a
AAA
op o
o 볺a
aa
o
̲
o
o o
o oap
ʳ oap
A
o oap
aa oap
ap oap
ʳ oap
opa po oap
oo
AOPAֲ
o aopa
o
apo
a
o 볺a

Po 1 ooa o


3. poa paa a o p

3.1 O popaoo a op

op a a o opao mySQL. p oa , o aa op o op po, a ao a o oa ooo phpMyAdmin, a o p a po po p opaa. ao a p oa , o aao aa, o o-poap aa o, o aa aa PHP + mySQL a o.

o p apap mySQL, o op opaa, a popoa.

1. pa a aao aopa.

2. opo a aaopoop aa.

3. ϳpa GROUP BY a ORDER BY.

4. ϳpa po (COUNT(), AVG(), SUM(), MAX() MIN()).

5. oa pa opaop select, where.

6. Popo o a a p a a oo a.

7. Opo a a.

8. o a a a aoa.

9. oa pa p aop o, opa ISO-8859-1 (Latin1), big5, ujis, syis.

10. a p pao aop o. op opa poo o - ao.

11. a oao o o.

12. aao p o: ()ao a a 1, 2, 3, 4, 8 a, FLOAT, DOUBLE, CHAR, VARCHAR, TEXT, BLOB, DATE, TIME, DATETIME, TIMESTAMP, YEAR, SET, ENUM.

13. opa aopa.

3.2 Popoa aoa opao

opo ooo phpMyAdmin opo a.

oa opo Laptop, oo o a o oa o Ļ.

Po 2 op

a opo a klient. oo o a o oa o a laptop a aao o a a ao o o.

Po 3 op a klient

ϳ oo oo o ao a, ao o apap.


Po 4 o o a 볺

oo, o aa o o a o, oo pa o pa a opa. oo, o aa o o a pa, o o , o . o o ao a aoo o, o ao aoo o, o /a ao o o, o o oa aa o ooo ao, o o oa oa aa a o a aoa, o ooo ao o oo aop, a ao oa aa oap o o a.

ϳ ao o aao o . o opo oa o o a, o aao o .

Aaoo opo a nakladna, sklad, vmist, authorize.


4. op a a -oa

4.1 O popaoo a paa oa

oao popo a op a apapa:

1. poop AMD Athlon 64 3000+ Box S754.

2. apa aa ASRock K8Upgrade-NF3 Soket 754.

3. o a 512Mb DDR400 PC-3200.

4. op Western Digital 1600JB 160 Gb 8Mb.

5. O p DVD-RW NEC.

6. ³oaap Radeon 9600 AGP8x 128 Mb 128-bit.

7. oop 17LG TFT.

opa popa a p popo oa:

1. Opaa a Microsoft Windows XP Professional 2002 SP2.

2. pap Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1.

3. oa popaa PHP 5.1.2.

4. -pp p-2 2006-10-04.

5. oo Notepad ++ v4.0.2.

4.2 O pp opo popa

P p:

p a oap a a (. Po 5);

o oap a o (. Po 6).

P opaa:

ppa opaa (. Po 7);

opaa aa (. Po 8);

ao oap (. Po 9);

oaa oap (. Po 10);

p op (. Po 11);

P apaopa:

aa (. Po 12);

paa opa po oap (. Po 13);

p aa (. Po 13.1);

a po (. Po 13.2);

Po 5 p oap a a

Po 6 o oap o

Po 7 ppa

Po 8 opaa aa


Po 9 ao oap

Po 10 oaa oap

Po 11 p op

Po 12 aa

Po 13 paa opa po oap


Po 13.1 opa p aa

Po 13.2 opa p

a popa po a a a:

1. index.php oaoa opa, opaa a po o: ASUS;

2. apple.php opa, opaa a po o: APPLE;

3. msi.php opa, opaa a po o: MSI;

4. toshiba.php opa, opaa a po o: TOSHIBA;

5. search.php opa, opaa pa o;

6. register.html opa, a op ppa;

7. register.php opa o, opo ppa a;

8. authorize.php opa, a op opaa;

9. user.php o opo opa a po opa;

10. admin.php o opo apaopo a;

11. tovaradd.php op opa po oap;

12. tovarchange.php o, o opo po oap a;

13. connect.php o 䒺a o ppa ;

14. disconnect.php o 䒺a ppa ;

15. view-tovar.php o, o o a po oap;

16. add-tovar.php o, o opo po oap a;

17. vidom.php o, o opaa opa po aa.

4.3 a poo -oa

app ooo opaa:

Po 14 ppa ooo opaa

a o a o a apo o aopa:

Po 15 aopa ooo opaa

ϳ oo oao opa ao oap:


Po 15 ao oap ASUS F3Ka

a aoo a oap o opa:

Po 16 ao oap

Po 17 ao oap ASUS A7U

ϳ opa po ao op:

Po 18 p aooo oap

p oao opa oaa. o oaa oap ASUS X51:


Po 17 oaa oap ASUS 51

a po ao op:

Po 18 p oaoo oap

O, oa opa a p pa oa aa, o a popa po opo pa a ao oa a oa op -oa oa.


o

ϳ a poo a po poo o opo web-oao o oa a paa oap. o opao PHPMyAdmin, o o popaa PHP.

popa po p aoa a po p, o opa o a p oa. oo poo opo a, a oo oo.

popa paoao aoaa po opa po a, opa a aa. ao o a opa p po pa opa a apaopo ao popao po.

p opao pap

1. o .. PP 5. paa papao web-ao. .: -pp, 2005. 960 .: .

2. opo .., oap A.. PP 5. .: -pp, 2005. 1120 .: .

3. o . ., o . ., o .. PP 5 a ppa. .: -pp, 2005. 576 .: .

4. poo, aap. Opaa ao opao ooo opa poo. , a oa, 1984.

5. . opa opao poo a po pp. , a, 1991.

6. ap O.. opaa opa a. opa oo. . a p Aa 2003.


oa

po html-opo a php-p:

ndex.php:

<?

session_start();

unset($_SESSION['password']);

// oa apo

unset($_SESSION['login']);

// oa o

?>

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=Windows-1251">

<meta name="Description" content="po o">

<meta name="keywords" content="o, laptop, asus, aplle, msi, toshiba">

<title>a oo</title>

<link rel="stylesheet" type="text/css" href="styles.css">

</head>

<body>

<div id="page">

<div id="logo"><center><img alt="LAPSHOP" border="0" src="image/sklad.gif"></center></div>

<div id="authorize">

<!---------------------------- aopa --------------------------->

<form method="post" action="authorize.php">

<table class="table">

<tr>

<td><b>&nbsp;o:&nbsp;</b></td>

<td><b>&nbsp;apo:&nbsp;</b></td>

<td>&nbsp;</td>

</tr>

<tr>

<td><input type="text" size="15" maxlength="25" name="login"></td>

<td><input type="password" size="15" maxlength="25" name="password"></td>

<td><input type="submit" value="o" name="button"></td>

</tr>

<tr><td><b>&nbsp;>><a class="link" href="register.html">PPA</a><<&nbsp;</b></td></tr></table>

</form>

</div>

<div id="search">

<!-------------------------------- o ------------------------------------->

<form method="post" action="search.php">

<table class="table">

<tr><td>&nbsp;<td></tr>

<tr>

<td><b>&nbsp;O OO O &nbsp;</b></td>

<td><input name="laptop1" value="asus" type="hidden"></td>

<td><b>&nbsp;o:&nbsp;</b></td>

<td><input type="text" size="10" maxlength="15" name="price1"></td>

<td><b>&nbsp;o:&nbsp;</b></td>

<td><input type="text" size="10" maxlength="15" name="price2"></td>

<td>&nbsp;</td>

<td><input type="submit" value="a" name="button"></td>

</tr>

</table>

</form>

</div>

<div id="orangeline">

<div id="navcontainer">

<ul id="navlist">

<!-- -->

<li id="active">&nbsp;aao oapo&nbsp;>>&nbsp;</li>

<li id="active"><a href="index.php">Asus</a></li>

<li><a href="apple.php">Apple</a></li>

<li><a href="msi.php">MSI</a></li>

<li><a href="toshiba.php">Toshiba</a></li>

</ul>

</div>

</div>

<!----------------------------- oap ------------------------------------->

<?

// o

include ("function/connect.php");

$sql = "SELECT marka, info, count, price FROM sklad where marka like(\"asus%\")";

$sql1 = "SELECT foto FROM sklad where marka like(\"asus%\")";

// - p

include ("function/view-tovar.php");

viewt ($sql, $sql1);

//

include ("function/disconnect.php");

?>

<div id="greyline"></div>

<div id="orangeline"><center>Designed by <a class="link" href="mailto:sanok_87@bk.ru">Oleksandr</a> , Copyright &copy; 2008</center></div>

</div>

</body>

</html>

Register.php

<?

if (!isset($_POST['button1'])){

echo " oa!";

} else {

?>

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=Windows-1251">

<meta name="Description" content="po o">

<meta name="keywords" content="o, laptop, asus, aplle, msi, toshiba">

<title>a oo</title>

<link rel="stylesheet" type="text/css" href="styles.css">

</head>

<body>

<div id="page">

<div id="logo"><center><img alt="LAPSHOP" border="0" src="image/sklad.gif"></center></div>

<div id="greyline"></div>

<div id="orangeline"></div>

<?

if (($name_k!='') and ($adress_k!='') and ($log!='') and ($pass1!='') and ($pass2!='') and ($pass1==$pass2)) {

// o

include ("function/connect.php");

// ppa a

/*$sql="select name_k from klient";

$query=mysql_query($sql);

$num = mysql_num_rows($query);

for($i=0;$i<$num; $i++)

{

if ($name_k == mysql_result($query,$i))

}*/

// a po 볺

$sql1="insert into klient (name_k, rekviz_k, adress_k) values (\"$name_k\", \"$rekviz_k\", \"$adress_k\")";

mysql_query($sql1);

// a po o a apo

$sql2="select id_k from klient where name_k=\"$name_k\" and adress_k=\"$adress_k\"";

$query2=mysql_query($sql2);

$num2 = mysql_num_rows($query2);

for($i=0;$i<$num2; $i++)

{

$id = mysql_result($query2,$i);

}

$sql3="insert into authorize (log, pass, id_kl, status) values (\"$log\", \"$pass1\", \"$id\", \"$status\")";

mysql_query($sql3);

//

include ("function/disconnect.php");

echo "a a o opa! p o aopa!";

echo "<br><input type=\"button\" name=\"button\" value=\"<< a a\" OnClick=\"document.location.href='index.php'\">&nbsp;";

} else {

echo " p a!";

echo "<br><input type=\"button\" name=\"button\" value=\"<< aa\" OnClick=\"history.back()\">&nbsp;";

}

?>

<div id="greyline"></div>

<div id="orangeline"><center>Designed by <a class="link" href="mailto:sanok_87@bk.ru">Oleksandr</a> , Copyright &copy; 2008</center></div>

</div>

</body>

</html>

<?

}

?>

User.php

<?

session_start();

// o

include ("function/connect.php");

if (isset($_POST['button'])){

// pa oa a opo, a ppa

$sql = "SELECT log FROM authorize WHERE log='" .$_POST['login']."' AND pass='".$_POST['password']."'";

$query = mysql_query($sql); // opa apo

$num = mysql_num_rows($query); // o po o a apo

if (!$num==0){

$_SESSION['user_login']=$_POST['login'];

// ppp p login

if ($_SESSION['user_login']==$_POST['login'])

{

// poopa aao ooa

function viewcart ($s1)

{

$names[] = 'name_k';

$names[] = 'id_doc';

$names[] = 'tup_doc';

$names[] = 'data';

$names[] = 'marka';

$names[] = 'price';

$names[] = 'count_tovar';

$query1 = mysql_query($s1) or die('Could not to execute query!');

$num = mysql_num_rows($query1);

if ($num==0){

echo "<div id=\"tovar\"><font color=\"#000\">a !</font></div>";

echo "<br><input type=\"button\" name=\"button\" value=\"<< aa\" OnClick=\"history.back()\">&nbsp;";

}

else {

echo "<div id=\"tovar\">";

echo "<table class=\"tovartable\" border=\"1\" bordercolor=\"#444\" cellspacing=\"0\" cellpadding=\"5\">";

echo "<tr align=\"center\"><td></td>

<td>op aao</td>

<td>aaa</td>

<td>aa</td>

<td>oap</td>

<td>a</td>

<td>oo</td></tr>";

// oopaa a o

for($i=0;$i<$num; $i++)

{

echo "<tr>";

foreach($names as $value1)

{

$val1 = mysql_result($query1,$i,$value1);

echo "<td>$val1</td>";

}

echo "</tr>";

}

echo "</table>";

echo "</div>";

}

}

?>

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=Windows-1251">

<meta name="Description" content="po o">

<meta name="keywords" content="o, laptop, asus, aplle, msi, toshiba">

<title>a oo</title>

<link rel="stylesheet" type="text/css" href="styles.css">

</head>

<body>

<div id="page">

<div id="logo"><center><img alt="LAPSHOP" border="0" src="image/sklad.gif"></center></div>

<div id="greyline"></div>

<div id="orangeline"></div>

<?

if ($button==' op')

{

if (($data=='') or ($count_tovar==0))

{

echo " p a!";

echo "<br><input type=\"button\" name=\"button\" value=\"<< aa\" OnClick=\"history.back()\">&nbsp;";

}

else {

// pa oo paoo oapa a a

$sql4="select count from sklad where id_t=\"$id_tovar\"";

$query4=mysql_query($sql4);

$num4 = mysql_num_rows($query4);

for($i=0;$i<$num4; $i++)

{

$kil = mysql_result($query4,$i);

}

if ($kil>=$count_tovar) {

// oo oapa a a

$kil = $kil-$count_tovar;

$sql5="update sklad set count=\"$kil\" where id_t=\"$id_tovar\"";

mysql_query($sql5);

// a a aa

$sql1="insert into nakladna (data, tup_doc, id_klient) values (\"$data\", \"$tup_doc\", \"$id_klient\")";

mysql_query($sql1);

//pa o o aao

$sql2="select id_doc from nakladna where data=\"$data\" and tup_doc=\"$tup_doc\" and id_klient=\"$id_klient\"";

$query2=mysql_query($sql2);

$num2 = mysql_num_rows($query2);

for($i=0;$i<$num2; $i++)

{

$id_document = mysql_result($query2,$i);

}

// a a aao

$sql3="insert into vmist (id_tovar, id_document, count_tovar) values (\"$id_tovar\", \"$id_document\", \"$count_tovar\")";

mysql_query($sql3);

echo "a o oa opa!<br>";

//opa opa oa apo oa aao oa oapa

include ("function/add-tovar.php");

} else {

echo "aoo oa oapa a a!<br>";

echo "<br><input type=\"button\" name=\"button\" value=\"<< aa\" OnClick=\"history.back()\">&nbsp;";

}

}

} elseif ($button=='poop op') {

$sql6="select DISTINCT name_k, id_doc, tup_doc, data, marka, price, count_tovar from klient, sklad, nakladna, vmist

where klient.id_k=nakladna.id_klient and nakladna.id_doc=vmist.id_document and sklad.id_t=vmist.id_tovar and id_k=\"$id_klient\" and tup_doc=\"$tup_doc\" order by id_doc";

viewcart($sql6);

echo "<input type=\"button\" name=\"button\" value=\"<< aa\" OnClick=\"history.back()\">&nbsp;";

} else if ($button=='opa') {

if (($data=='') or ($count_tovar==0) or ($price==0) or ($marka==''))

{

echo " p a!";

echo "<br><input type=\"button\" name=\"button\" value=\"<< aa\" OnClick=\"history.back()\">&nbsp;";

}

else {

// pop ao oap

$sql7="select id_t, count from sklad where marka=\"$marka\" and price=\"$price\"";

$query7=mysql_query($sql7);

$num7 = mysql_num_rows($query7);

for($i=0;$i<$num7; $i++)

{

$id_tovar = mysql_result($query7,$i, 'id_t');

$kil1 = mysql_result($query7,$i, 'count');

}

if ($num7==0) {

// aa a a a

$sql8="insert into sklad (marka, price, count) values (\"$marka\", \"$price\", \"$count_tovar\")";

mysql_query($sql8);

// pa o oo oapa

$sql13="select id_t from sklad where marka=\"$marka\"";

$query13=mysql_query($sql13);

$num13 = mysql_num_rows($query13);

for($i=0;$i<$num13; $i++)

{

$id_tovar = mysql_result($query13,$i);

}

} else {

// oo oapa a a

$kil1 = $kil1+$count_tovar;

$sql9="update sklad set count=\"$kil1\" where id_t=\"$id_tovar\"";

mysql_query($sql9);

}

// a a aa

$sql10="insert into nakladna (data, tup_doc, id_klient) values (\"$data\", \"$tup_doc\", \"$id_klient\")";

mysql_query($sql10);

//pa o o aao

$sql11="select id_doc from nakladna where data=\"$data\" and tup_doc=\"$tup_doc\" and id_klient=\"$id_klient\"";

$query11=mysql_query($sql11);

$num11 = mysql_num_rows($query11);

for($i=0;$i<$num11; $i++)

{

$id_document = mysql_result($query11,$i);

}

// a a aao

$sql12="insert into vmist (id_tovar, id_document, count_tovar) values (\"$id_tovar\", \"$id_document\", \"$count_tovar\")";

mysql_query($sql12);

echo "a o oa opa!<br>";

//opa opa oa apo oa aao oa oapa

include ("function/add-tovar.php");

}

}

?>

<div id="greyline"></div>

<div id="orangeline"><center>Designed by <a class="link" href="mailto:sanok_87@bk.ru">Oleksandr</a> , Copyright &copy; 2008</center></div>

</div>

</body>

</html>

<?

} else echo " oa!";

} else echo " pa o apo!";

} else {

echo " oa!";

}

?>

Admin.php

<?

session_start();

// o

include ("function/connect.php");

if (isset($_POST['button'])){

// pa oa a opo, a ppa

$sql = "SELECT log FROM authorize WHERE log='" .$_POST['login']."' AND pass='".$_POST['password']."'";

$query = mysql_query($sql); // opa apo

$num = mysql_num_rows($query); // o po o a apo

if (!$num==0){

$_SESSION['user_login']=$_POST['login'];

// ppp p login

if ($_SESSION['user_login']==$_POST['login'])

{

function view ($s1)

{

$names[] = 'marka';

$names[] = 'price';

$names[] = 'count';

$query1 = mysql_query($s1) or die('Could not to execute query!');

$num = mysql_num_rows($query1);

if ($num==0){

echo "<div id=\"tovar\"><font color=\"#000\">a !</font></div>";

echo "<br><input type=\"button\" name=\"button\" value=\"<< aa\" OnClick=\"history.back()\">&nbsp;";

}

else {

echo "<div id=\"tovar\">";

echo "<table class=\"tovartable\" border=\"1\" bordercolor=\"#444\" cellspacing=\"0\" cellpadding=\"5\">";

echo "<tr align=\"center\"><td>oap</td>

<td>a</td>

<td>oo</td></tr>";

// oopaa a o

for($i=0;$i<$num; $i++)

{

echo "<tr>";

foreach($names as $value1)

{

$val1 = mysql_result($query1,$i,$value1);

echo "<td>$val1</td>";

}

echo "</tr>";

}

echo "</table>";

echo "</div>";

}

}

?>

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=Windows-1251">

<meta name="Description" content="po o">

<meta name="keywords" content="o, laptop, asus, aplle, msi, toshiba">

<title>a oo</title>

<link rel="stylesheet" type="text/css" href="styles.css">

</head>

<body>

<div id="page">

<div id="logo"><center><img alt="LAPSHOP" border="0" src="image/sklad.gif"></center></div>

<div id="greyline"></div>

<div id="orangeline"></div>

<?

if ($button=='oa')

{

if ($info=='')

{

echo " p a!";

echo "<br><input type=\"button\" name=\"button\" value=\"<< aa\" OnClick=\"history.back()\">&nbsp;";

}

else {

// apa aa a a

$uploaddir = 'image/';

// opa apa

// a pop

$destination = $uploaddir.$_FILES['foto']['name'];

// aa oa

@move_uploaded_file($_FILES['foto']['tmp_name'], $destination);

$foto=$destination;

$sql="update sklad set foto=\"$foto\", info=\"$info\" where id_t=\"$id_tovar\"";

mysql_query($sql);

echo "aao!";

}

}

if ($button=='O')

{

if (($dat1=='') or ($dat2==''))

{

echo " p a!";

echo "<br><input type=\"button\" name=\"button\" value=\"<< aa\" OnClick=\"history.back()\">&nbsp;";

}

else {

if ($tup=='O o aaa')

{

$sql1="select marka, price, count from sklad, vmist, nakladna where sklad.id_t=vmist.id_tovar and vmist.id_document=nakladna.id_doc and tup_doc='Paoa aaa'";

view($sql1);

} else {

}

}

}

?>

<div id="greyline"></div>

<div id="orangeline"><center>Designed by <a class="link" href="mailto:sanok_87@bk.ru">Oleksandr</a> , Copyright &copy; 2008</center></div>

</div>

</body>

</html>

<?

} else echo " oa!";

} else echo " pa o apo!";

} else {

echo " oa!";

}

?>

Connect.php

<?

@mysql_connect("localhost","laptop","1987") or die("Could not connect to server!");

@mysql_select_db("laptop") or die("Could not select database!");

?>

Disconnect.php

<?

@mysql_close() or die ('Could not close database!');

?>

View-tovar.php

<?

function viewt ($sql, $sql1)

{

$names[] = 'marka';

$names[] = 'info';

$names[] = 'count';

$names[] = 'price';

$names1[] = 'foto';

$query = mysql_query($sql) or die('Could not to execute query!');

$query1 = mysql_query($sql1) or die('Could not to execute query1!');

$num = mysql_num_rows($query);

if ($num==0){

echo "<div id=\"tovar\"><font color=\"#000\">a oapo a a!</font></div>";

}

else {

echo "<div id=\"tovar\">";

echo "<table class=\"tovartable\" border=\"1\" bordercolor=\"#444\" cellspacing=\"0\" cellpadding=\"5\">";

// oopaa a o

for($i=0;$i<$num; $i++)

{

echo "<tr>";

foreach($names1 as $value1)

{

$val1 = mysql_result($query1,$i,$value1);

if ($val1=='image/')

echo "<td><b> oo</b></td>";

else

echo "<td><img alt=\"laptop\" border=\"0\" src=$val1></td>";

}

foreach($names as $value)

{

$val = mysql_result($query,$i,$value);

echo "<td>$val</td>";

}

echo "</tr>";

}

echo "</table>";

echo "</div>";

}

}

?>

Add-tovar.php

<?

//opa opa oa apo oa aao oa oapa

echo "<form method=\"post\" action=\"tovaradd.php\">";

echo "<input name=\"id_document\" value=\"$id_document\" type=\"hidden\">";

echo "<input name=\"login\" value='".$_POST['login']."' type=\"hidden\">";

echo "<input name=\"password\" value='".$_POST['password']."' type=\"hidden\">";

echo "<input name=\"tup_doc\" value=\"$tup_doc\" type=\"hidden\">";

echo "<center><br><br>

<input type=\"submit\" name=\"button\" value=\"oa oap opa >>\"></center></form>";

echo "<form method=\"post\" action=\"authorize.php\">

<input name=\"login\" value='".$_POST['login']."' type=\"hidden\">

<input name=\"password\" value='".$_POST['password']."' type=\"hidden\">

<center><input type=\"submit\" name=\"button\" value=\"<< oa opa\"></center></form>";

?>

Vidom.php

<?

session_start();

// o

include ("function/connect.php");

if (isset($_POST['button'])){

// pa oa a opo, a ppa

$sql = "SELECT log FROM authorize WHERE log='" .$_POST['login']."' AND pass='".$_POST['password']."'";

$query = mysql_query($sql); // opa apo

$num = mysql_num_rows($query); // o po o a apo

if (!$num==0){

$_SESSION['user_login']=$_POST['login'];

// ppp p login

if ($_SESSION['user_login']==$_POST['login'])

{

function view ($s1, $str, $dat1, $dat2)

{

$names[] = 'id_t';

$names[] = 'marka';

$names[] = 'data';

$names[] = 'price';

$names[] = 'count';

$query1 = mysql_query($s1) or die('Could not to execute query!');

$num = mysql_num_rows($query1);

if ($num==0){

echo "<div><font color=\"#000\">a !</font></div>";

echo "<br><input type=\"button\" name=\"button\" value=\"<< aa\" OnClick=\"history.back()\">&nbsp;";

}

else {

echo "<center><h1>$str</h1><h2>a po</h2><h3>o $dat1 o $dat2</h3></center><br><br><br>";

echo "<table align=\"center\" border=\"1\" bordercolor=\"#444\" cellspacing=\"0\" cellpadding=\"5\">";

echo "<tr align=\"center\"><td></td>

<td>oap</td>

<td>aa</td>

<td>a, p.</td>

<td>oo, .</td></tr>";

// oopaa a o

$kol = 0;

$sum = 0;

for($i=0;$i<$num; $i++)

{

echo "<tr>";

$kol = $kol + mysql_result($query1,$i,'count');

$sum = $sum + mysql_result($query1,$i,'price');

foreach($names as $value1)

{

$val1 = mysql_result($query1,$i,$value1);

echo "<td>$val1</td>";

}

echo "</tr>";

}

echo "<tr><td colspan='3'>o</td><td>$sum</td><td>$kol</td></tr></table>";

echo "<br><br><br><center>aa: ".date('d m Y')."<br><br>o _________________________</center></div>";

}

}

?>

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=Windows-1251">

<meta name="Description" content="po o">

<meta name="keywords" content="o, laptop, asus, aplle, msi, toshiba">

<title>a oo</title>

</head>

<body background: #fff>

<div id="page">

<?

if ($button=='O')

{

if (($dat1=='') or ($dat2==''))

{

echo " p a!";

echo "<br><input type=\"button\" name=\"button\" value=\"<< aa\" OnClick=\"history.back()\">&nbsp;";

}

else {

if ($tup=='O o aaa')

{

$sql1="select id_t, marka, price, count, data from sklad, vmist, nakladna where sklad.id_t=vmist.id_tovar and vmist.id_document=nakladna.id_doc and tup_doc='Paoa aaa' order by id_t";

view($sql1, $tup, $dat1, $dat2);

} else {

$sql1="select id_t, marka, price, count, data from sklad, vmist, nakladna where sklad.id_t=vmist.id_tovar and vmist.id_document=nakladna.id_doc and tup_doc='poa aaa' order by id_t";

view($sql1, $tup, $dat1, $dat2);

}

}

}

?>

</div>

</body>

</html>

<?

} else echo " oa!";

} else echo " pa o apo!";

} else {

echo " oa!";

}

?>

a aa oa ao :


Po 19 paa a

Po 20 oaa a

Po 21 poa aaa


Po 22 aoa aaa

/
:
? : letsdoit777.blogspot.com
07:32:18 19 2016
9000 " "? : business1777.blogspot.com ! C !
19:45:59 28 2015

, : web-



, ?

, .
, .
, .
, .
, .



(151294)
(1844)
Copyright 2005-2016 BestReferat.ru bestreferat@mail.ru

@Mail.ru