Advertisement
Guest User

Untitled

a guest
Dec 14th, 2016
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.52 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1">
  7. <title>
  8. MY SITE PLANNER | DASHBOARD
  9. </title>
  10. <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet">
  11. <link href="custom.css" rel="stylesheet" type="text/css" />
  12. </head>
  13. <body class="formbg">
  14. <div class="container-fluid pi">
  15. <div class="row">
  16. <div class="col-md-6 col-sm-6 col-xs-6">
  17. <p class="ppp">
  18. <img src="image/my-site-planner-logo.png" class="ppp" />
  19. </p>
  20. </div>
  21. <div class="col-md-6 col-sm-6 col-xs-6">
  22. <p class="up">
  23. <!-- Hi, <a href="#">user</a> -->
  24. <a href="#">Hello, <?php echo $_SESSION["name"]; ?></a>
  25. <a href="#">settings</a>
  26. <a href="#">logout</a>
  27. </p>
  28. <p id="dt">
  29. System:
  30. </p>
  31. </div>
  32. </div>
  33. </div>
  34.  
  35. <div class="container-fluid fill">
  36. <div class="row">
  37. <div class="col-md-12 col col-sm-12 col-xs-12">
  38. <div class="navbar">
  39. <ul class="nalink">
  40. <li>
  41. <a href="trans.html">ViewIncomeStatement</a>
  42. </li>
  43. <li>
  44. <a href="siteform.html">View/AddSite</a>
  45. </li>
  46. <li>
  47. <a href="vendor.html">View/AddVendor</a>
  48. </li>
  49. <li>
  50. <a href="item.html">View/AddItem</a>
  51. </li>
  52. </ul>
  53. </div>
  54. </div>
  55. </div>
  56. </div>
  57.  
  58. <div class="container-fluid">
  59. <div class="row">
  60. <div class="col-md-6 col-sm-6 col-xs-12">
  61. <h3 class="side">
  62. Summary of your site
  63. </h3>
  64. </div>
  65. <div class="col-md-6 col-sm-6 col-xs-12">
  66. <button class="btn btn-success view" name="submit" type="submit" >
  67. View Income Statement
  68. </button>
  69. </div>
  70. </div>
  71. </div>
  72.  
  73. <div class="container-fluid">
  74. <div class="row">
  75. <div class="col-md-12 col-sm-12 col-xs-12">
  76. <div class="table-responsive line">
  77. <table class="table table-bordered dem">
  78. <thead>
  79. <tr class="hd">
  80. <th width="3">Sr.</th>
  81. <th width="6">Site Name</th>
  82. <th width="6">Incomes</th>
  83. <th width="6">Expenses</th>
  84. <th width="6">Payables</th>
  85. <th width="6">Balance</th>
  86. <th width="10">Last Week Details</th>
  87. </tr>
  88. </thead>
  89. <tbody>
  90. <tr>
  91. <td>1</td>
  92. <td><a href="#">SITE A</a> </td>
  93. <td><a href="#">200000</a></td>
  94. <td><a href="#">110000</a></td>
  95. <td><a href="#">36000</a></td>
  96. <td><a href="#">79000</a></td>
  97. <td>Completed kitchen tiles work</td>
  98. </tr>
  99. <tr>
  100. <td>2</td>
  101. <td><a href="#">SITE B</a></td>
  102. <td><a href="#">500000</a></td>
  103. <td><a href="#">425000</a></td>
  104. <td><a href="#">88000</a></td>
  105. <td><a href="#">-13000</a></td>
  106. <td>completed kitchen tiles work</td>
  107. </tr>
  108. <tr>
  109. <td></td>
  110. <td>TOTAL</td>
  111. <td>700000</td>
  112. <td>555000</td>
  113. <td>124000</td>
  114. <td>66000</td>
  115. <td></td>
  116. </tr>
  117. </tbody>
  118. </table>
  119. </div>
  120. </div>
  121. </div>
  122. </div>
  123.  
  124. <div class="container-fluid">
  125. <div class="row">
  126. <div class="col-md-6 col-sm-6 col-xm-12">
  127. <h3 class="side">
  128. Your to do list
  129. </h3>
  130. </div>
  131. <div class="col-md-6 col-sm-6 col-xm-12">
  132. <button class="btn btn-success view" name="submit" type="submit">
  133. Add Item
  134. </button>
  135. </div>
  136. </div>
  137. </div>
  138.  
  139. <div class="container-fluid">
  140. <div class="row">
  141. <div class="col-md-12 col-sm-12 col-xm-12">
  142. <div class="table-responsive line">
  143. <table class="table table-bordered dem">
  144. <thead>
  145. <tr class="hd">
  146. <th width="3">Sr.</th>
  147. <th width="15">Task</th>
  148. <th width="15">Site</th>
  149. <th width="15">Added</th>
  150. <th width="20">Action</th>
  151. </tr>
  152. </thead>
  153. <tbody>
  154. <tr>
  155. <td>1</td>
  156. <td>Need to co-ordinate with shahid bhai for comment bags</td>
  157. <td>Site A</td>
  158. <td>23-02-2016</td>
  159. <td>
  160. <a href="#">Delete Task</a>&nbsp;<a href="#">Mark as complete</a>
  161. </td>
  162. </tr>
  163. <tr>
  164. <td>2</td>
  165. <td>Get registrations done</td>
  166. <td>Site B</td>
  167. <td>23-02-2016</td>
  168. <td><a href="#">Delete Task</a> &nbsp; <a href="#">Mark as complete</a></td>
  169. </tr>
  170. </tbody>
  171. </table>
  172. </div>
  173. </div>
  174. </div>
  175. </div>
  176.  
  177. <div class="container-fluid">
  178. <div class="row">
  179. <div class="col-md-6 col-sm-6 col-xm-12">
  180. <h3 class="side">
  181. Quick Navigation
  182. </h3>
  183. </div>
  184. </div>
  185. </div>
  186.  
  187. <div class="container-fluid">
  188. <div class="row">
  189. <div class="col-md-12 col-sm-12 col-xm-12">
  190. <div class="table-responsive line">
  191. <table class="table table-bordered dem">
  192. <tr class="hd">
  193. <th>
  194. <span>Select Site</span>
  195. <select name="site" class="hig">
  196. <option value="" selected="selected">Fetch site list</option>
  197. <option value="site A">site A</option>
  198. <option value="site B">site B</option>
  199. </select>
  200. <span class="dis">Select Operations</span>
  201. <select name="site" class="hig">
  202. <option value="" selected="selected">select your option</option>
  203. <option value="option 1">View Site-wise imcome statement</option>
  204. <option value="option 2">View Site-wise vendors</option>
  205. <option value="option 3">View Site-wise items list</option>
  206. <option value="option 4">List of Vendors Vs Expenses</option>
  207. <option value="option 5">List of Item Vs Expenses</option>
  208. <option value="option 6">List of Labours Vs Expenses</option>
  209. <option value="option 7">List of Service Vs Expenses</option>
  210. <option value="option 8">Payables List</option>
  211. <option value="option 9">To-do List</option>
  212. <option value="option 10">Work Done List</option>
  213. </select>
  214. <button class="btn btn-success viewl" name="submit" type="submit" >GO</button>
  215. </th>
  216. </tr>
  217. </table>
  218. </div>
  219. </div>
  220. </div>
  221. </div>
  222.  
  223.  
  224. <div class="container-fluid">
  225. <div class="row">
  226. <div class="col-md-6 col-sm-6 col-xm-12">
  227. <h3 class="side">
  228. Reporting Definations
  229. </h3>
  230. </div>
  231. </div>
  232. </div>
  233.  
  234. <div class="container-fluid">
  235. <div class="row">
  236. <div class="col-md-12 col-sm-12 col-xm-12">
  237. <div class="table-responsive line">
  238. <table class="table table-bordered dem">
  239. <tbody>
  240. <tr class="info">
  241. <td>View Site-wise imcome statement</td>
  242. <td>Show Income Statement of a particular site</td>
  243. </tr>
  244. <tr>
  245. <td>View Site-wise vendors</td>
  246. <td>Show all the vandors of a perticular site</td>
  247. </tr>
  248. <tr class="info">
  249. <td>View Site-wise items list</td>
  250. <td>Show all the Items registerd in a particular</td>
  251. </tr>
  252. <tr>
  253. <td>List of Vendors Vs Expenses</td>
  254. <td>List of all vandors registerd in a perticular site vs amount paid to them</td>
  255. </tr>
  256. <tr class="info">
  257. <td>List of Item Vs Expenses</td>
  258. <td>List of all the Items used/registerd in a perticular site and the amount utilized on them</td>
  259. </tr>
  260. <tr>
  261. <td>List of Labours Vs Expenses</td>
  262. <td>List of the labours used in a perticular site and the amount paid to them</td>
  263. </tr>
  264. <tr class="info">
  265. <td>List of Service Vs Expenses</td>
  266. <td>List of the Service used in a perticular site and the amount paid to them</td>
  267. </tr>
  268. <tr>
  269. <td>Payables List</td>
  270. <td>List of Payables in perticula site</td>
  271. </tr>
  272. <tr class="info">
  273. <td>To-do List</td>
  274. <td>To-do List of a perticular site</td>
  275. </tr>
  276. <tr>
  277. <td>Work Done List</td>
  278. <td>List of Works Done on a perticular site</td>
  279. </tr>
  280. <tr class="info">
  281. <td></td>
  282. <td></td>
  283. </tr>
  284. </tbody>
  285. </table>
  286. </div>
  287. </div>
  288. </div>
  289. </div>
  290.  
  291. <script>
  292. document.getElementById("dt").innerHTML = Date();
  293. </script>
  294.  
  295. <script src="https://code.jquery.com/jquery-2.2.0.js"></script>
  296. </body>
  297. </html>
  298.  
  299. <?php
  300. session_start();
  301. $servername = "localhost";
  302. $username = "root";
  303. $password = "";
  304. $dbname = "index";
  305.  
  306. // Create connection
  307. $conn = new mysqli($servername, $username, $password, $dbname);
  308. // Check connection
  309. if ($conn->connect_error) {
  310. die("Connection failed: " . $conn->connect_error);
  311. }
  312.  
  313.  
  314.  
  315. $email = $_POST['email'];
  316. $password = $_POST['password'];
  317.  
  318.  
  319. $sql = "INSERT INTO form ( email, password )
  320. VALUES ( '$email', '$password')";
  321.  
  322.  
  323.  
  324. if ($conn->query($sql) === TRUE) {
  325.  
  326.  
  327. header('Location: sign-up.html');
  328.  
  329. } else {
  330. echo "Error: " . $sql . "<br>" . $conn->error;
  331. }
  332.  
  333. $conn->close();
  334.  
  335.  
  336.  
  337. if($count == 1)
  338. {
  339. $_SESSION['logged'] = true;
  340. $_SESSION['username'] = $myusername;
  341. echo "Login worked";
  342. exit();
  343. }
  344. else
  345. {
  346. $_SESSION['logged']=false;
  347. echo "Login failed";
  348. exit();
  349. }
  350.  
  351. ?>
  352.  
  353. <li class='active' style='float:right;'>
  354. <?php
  355. if($_SESSION['logged'] == true)
  356. {
  357. echo $_SESSION["name"];
  358. echo '<a href="logout.php"><span>Logout</span></a></li>';
  359. }
  360. elseif($_SESSION['logged'] == false)
  361. {
  362. echo '<a href="sign-up.html"><span>Login/Register</span></a></li>';
  363. }
  364.  
  365.  
  366.  
  367. //Create connection
  368. $conn = new mysqli($servername, $username, $password, $dbname);
  369. // Check connection
  370. if ($conn->connect_error) {
  371. die("Connection failed: " . $conn->connect_error);
  372. }
  373.  
  374. $sql = "SELECT * FROM form where email = $email and password = $password";
  375. $result = $conn->query($sql);
  376.  
  377. if ($result->num_rows > 0) {
  378. // output data of each row
  379. while($row = $result->fetch_assoc()) {
  380. echo " Name: " . $row["name"]. ".<br>";
  381. }
  382. } else {
  383. echo "0 results";
  384. }
  385. $conn->close();
  386. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement