From ca1e43d8aae23e9005e8ccc1263c5390f82bee28 Mon Sep 17 00:00:00 2001 From: DumiduM Date: Sun, 24 Jun 2018 11:42:36 +0530 Subject: [PATCH] admit home done --- 4.php | 7 +- addcrop.php | 173 +++++++++++++++++ admin.php | 333 ++++++++++++++++++++++++++++++++ adminhome.php | 514 ++++++++++++++++++++++++++++++++++++++++++++++++++ css/style.css | 21 +++ getTable.php | 99 ++++++++++ getc.php | 5 + home.php | 96 ++++++++-- img/tile2.jpg | Bin 0 -> 26974 bytes 9 files changed, 1233 insertions(+), 15 deletions(-) create mode 100644 addcrop.php create mode 100644 admin.php create mode 100644 adminhome.php create mode 100644 getTable.php create mode 100644 getc.php create mode 100644 img/tile2.jpg diff --git a/4.php b/4.php index 080918f..82918e1 100644 --- a/4.php +++ b/4.php @@ -370,14 +370,17 @@ function custom_echo($x, $length) -
+
query($sql) === TRUE) { //echo ""; diff --git a/addcrop.php b/addcrop.php new file mode 100644 index 0000000..2ae0d1b --- /dev/null +++ b/addcrop.php @@ -0,0 +1,173 @@ + + + + + SVG Map + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ dfdfdfdf +
+ + + + \ No newline at end of file diff --git a/admin.php b/admin.php new file mode 100644 index 0000000..1574d4a --- /dev/null +++ b/admin.php @@ -0,0 +1,333 @@ + +alert('error2');"; + } + else{ + $name = $_SESSION['login_user']; + // echo ""; + } + + $Schedule_check="0"; +?> + + + + + + + + +
+ + +


+ + + + +
+ + + + + + + + e-Farmer + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + +
+
+ + + + diff --git a/adminhome.php b/adminhome.php new file mode 100644 index 0000000..f5004d6 --- /dev/null +++ b/adminhome.php @@ -0,0 +1,514 @@ +alert('error2');"; + } + else{ + $name = $_SESSION['login_user']; + // echo ""; + } + + $Schedule_check="0"; + ?> + + + + +
+ + +
+ + + + + + e-Farmer + + + + + + + + + + + + + +
+
+ +
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+ +
+
+
+
+
+ +
+
+
+ +
+ + + + + + + + + + + + + + + +
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ + +
+
+
+
+
+
+ +
+
+
+
+
+ + \ No newline at end of file diff --git a/css/style.css b/css/style.css index 5e25b76..9242433 100644 --- a/css/style.css +++ b/css/style.css @@ -116,3 +116,24 @@ img.background{ padding: 2px 16px; } + + + +.mapdiv{ + width:100%; + margin: auto; +} + +.mapdiv path { + fill: #036057; + stroke: #073833; + stroke-width:2px; + transition: fill 2.0s; +} + +.mapdiv :hover { + fill:#16ba8b; +} +.mapdiv{ + width: 50%; +} \ No newline at end of file diff --git a/getTable.php b/getTable.php new file mode 100644 index 0000000..a0c62c3 --- /dev/null +++ b/getTable.php @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + SB Admin - Start Bootstrap Template + + + + + + + + + + + + + +
+
+

+ + + + + + + + + + + + + + + +
YALA
UplandLowland
+ + + +
+
+ +
+
+ + + + + + + + + + + + + + + +
MAHA
UplandLowland
+ + + +
+
+ + + \ No newline at end of file diff --git a/getc.php b/getc.php new file mode 100644 index 0000000..636027b --- /dev/null +++ b/getc.php @@ -0,0 +1,5 @@ + diff --git a/home.php b/home.php index 69dd3cb..49979ef 100644 --- a/home.php +++ b/home.php @@ -10,13 +10,7 @@ // echo ""; } - $Schedule_check="0"; - - - - // $sql = "SELECT c.name,fc.dateSc,s.info,s.stepID FROM crop c,steps s,variety v,farmercrop fc,farmer f WHERE f.farmerID LIKE '$_SESSION['login_user']' AND c.cropID=v.cropID AND v.varietyID=s.varietyID AND f.farmerID=fc.farmerID"; - - + $Schedule_check="0"; ?> @@ -340,11 +334,19 @@ query($getuserID_SQL); + if ($result2->num_rows > 0) {; + // + while($row = $result2->fetch_assoc()) { + $_SESSION['farmerID'] = $row["farmerID"]; + $farmerID = $_SESSION['farmerID']; + // echo "$row['farmerID']"; + }} + $sql = "SELECT c.name FROM crop c,variety v,farmercrop fc,farmer f WHERE f.name = '$name' AND f.farmerID=fc.farmerID AND v.cropID=c.cropID AND fc.verityID=v.varietyID"; $result = $conn->query($sql); if ($result->num_rows > 0) { - echo "string"; - $sql2 = "SELECT DISTINCT s.info, fc.dateSc FROM crop c,steps s,variety v,farmercrop fc,farmer f WHERE fc.farmerID = '$name' AND s.stepID = fc.currentStepID AND f.farmerID=fc.farmerID AND v.cropID=c.cropID"; + $sql2 = "SELECT DISTINCT fc.scheduleID,s.info, fc.dateSc FROM crop c,steps s,variety v,farmercrop fc,farmer f WHERE fc.farmerID = '2' AND s.stepID = fc.currentStepID AND f.farmerID=fc.farmerID AND v.cropID=c.cropID"; $result2 = $conn->query($sql2); if ($result2->num_rows > 0) { while($row = $result2->fetch_assoc()) { @@ -354,10 +356,30 @@ } foreach($result_array as $key=>$value){ ?> +
- +
+

-
+ + + + "> + + + + + + +
+ +
+ @@ -374,13 +396,59 @@ if ($result->num_rows == 0){?>
-
Add new Crop
+
Start Cultivating !
+ + $(document).ready(function(){ + $('#myModal').modal('modal'); + }); + "; + } + ?> + + + + + +
+ + +
+ + + + + + +