Advertisement
Guest User

filter.php

a guest
Jul 11th, 2016
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.19 KB | None | 0 0
  1. <style>
  2. div.upload {
  3. border-radius: 3px;
  4. background-color: #D23E3E;
  5. color: white;
  6. font-family: 'Roboto';
  7. text-align: center;
  8. }
  9. div.upload:hover {
  10.     opacity: 1;
  11. }
  12. a {
  13. color: black;
  14. }
  15. a:hover {
  16. opacity: 0.5;
  17. }
  18. input[type=submit] {
  19.     width: 12%;
  20.     background-color: #4CAF50;
  21.     color: white;
  22.     padding: 14px 20px;
  23.     margin: 8px 0;
  24.     border: none;
  25.     border-radius: 4px;
  26.     cursor: pointer;
  27. }
  28.  
  29. input[type=submit]:hover {
  30.     background-color: #45a049;
  31.  
  32.  
  33. }
  34. body {
  35.     background: url("http://1.bp.blogspot.com/-wCx3I_XW_Sg/UQ6ynBoEHPI/AAAAAAAAFKI/JqgBthHVukU/s1600/Fundo2.png");
  36. }
  37. img {
  38.     opacity: 0.5;
  39.     filter: alpha(opacity=50); /* For IE8 and earlier */
  40. }
  41.  
  42. img:hover {
  43.     opacity: 1.0;
  44.     filter: alpha(opacity=100); /* For IE8 and earlier */
  45. }
  46. </style>
  47. <head>
  48. <link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'>
  49. <title> Inserted successfully </title>
  50. </head>
  51. <div class="upload">
  52. <meta charset="UTF-8">
  53. <?php
  54.  
  55. // Inserir Value
  56. if (isset($_POST['updatefilter'])) {
  57. $filter = mysqli_real_escape_string($_POST['filter']);
  58. $matheus = mysqli_real_escape_string($_POST['matheus']);
  59. $filter2 = mysqli_real_escape_string($_POST['filter2']);
  60. $filter3 = mysqli_real_escape_string($_POST['filter3']);
  61. } else {
  62.     echo "It seems that you have not entered any value<br />";
  63.     header("Location: ./index.php");
  64. }
  65. //Config Here
  66. $servername = "localhost";
  67. $username = "root";
  68. $password = "password000015004520";
  69. $dbname = "my";
  70.  
  71. $conn = new mysqli($servername, $username, $password, $dbname);
  72. if ($conn->connect_error) {
  73.     die("Conexao failed,Sorry: " . $conn->connect_error);
  74. }
  75.  
  76. $sql = "INSERT INTO wordfilter (word, replacement, strict, addedby, bannable)
  77. VALUES ('$filter', 'Bobba', '1', 'Staff', '0'), ('$matheus', 'Bobba', '1', 'Staff', '0'),
  78. ('$filter2', 'Bobba', '1', 'Staff', '0'), ('$filter3', 'Bobba', '1', 'Staff', '0')";
  79. mysql_set_charset('utf8',$conn);
  80.  
  81.  
  82.  
  83. if ($conn->query($sql) === TRUE) {
  84.     echo "Added Successfully , yeaaah = )<BR />";
  85.         echo "Type :update filter for it to work.<BR />";
  86. } else {
  87.     echo "Error: " . $sql . "<br>" . $conn->error;
  88. }
  89.  
  90. $conn->close();
  91. ?>
  92. <!-- Updated -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement