Advertisement
Guest User

data

a guest
Apr 10th, 2014
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 5.60 KB | None | 0 0
  1. <?php
  2. include('lock.php');
  3. ?>
  4.  
  5. <html>
  6. <head>
  7.     <title>Settings</title>
  8. </head>
  9. <style>
  10.     ul {
  11.         text-align: left;
  12.         display: inline;
  13.         margin: 0;
  14.         padding: 15px 4px 17px 0;
  15.         list-style: none;
  16.         -webkit-box-shadow: 0px 2px 7px 0px rgba(50, 50, 50, 0.75);
  17.         -moz-box-shadow:    0px 2px 7px 0px rgba(50, 50, 50, 0.75);
  18.         box-shadow:         0px 2px 7px 0px rgba(50, 50, 50, 0.75);
  19.     }
  20.     ul li {
  21.         font: bold 12px/18px Throw My Hands Up in the Air;
  22.         font-size: 15px;
  23.         display: inline-block;
  24.         margin-right: -4px;
  25.         position: relative;
  26.         padding: 15px 20px;
  27.         background: #D00000;
  28.         cursor: pointer;
  29.         -webkit-transition: all 0.2s;
  30.         -moz-transition: all 0.2s;
  31.         -ms-transition: all 0.2s;
  32.         -o-transition: all 0.2s;
  33.         transition: all 0.2s;
  34.     }
  35.     ul li:hover {
  36.         background: #555;
  37.         color: #fff;
  38.     }
  39.     ul li ul {
  40.         padding: 0;
  41.         position: absolute;
  42.         top: 48px;
  43.         left: 0;
  44.         width: 150px;
  45.         -webkit-box-shadow: none;
  46.         -moz-box-shadow: none;
  47.         box-shadow: none;
  48.         display: none;
  49.         opacity: 0;
  50.         visibility: hidden;
  51.         -webkit-transiton: opacity 0.2s;
  52.         -moz-transition: opacity 0.2s;
  53.         -ms-transition: opacity 0.2s;
  54.         -o-transition: opacity 0.2s;
  55.         -transition: opacity 0.2s;
  56.     }
  57.     ul li ul li {
  58.         background: #555;
  59.         display: block;
  60.         color: #fff;
  61.         text-shadow: 0 -1px 0 #000;
  62.     }
  63.     ul li ul li:hover { background: #666; }
  64.     ul li:hover ul {
  65.         display: block;
  66.         opacity: 1;
  67.         visibility: visible;
  68.     }
  69.  
  70.     #header{
  71.         background-color: #D00000;
  72.         text-align: center;
  73.         position: fixed;
  74.         top: 0%;
  75.         left: 0%;
  76.         right: 0%;
  77.         height: 8%;
  78.         -webkit-box-shadow: 0px 3px 12px 0px rgba(50, 50, 50, 0.75);
  79.         -moz-box-shadow:    0px 3px 12px 0px rgba(50, 50, 50, 0.75);
  80.         box-shadow:         0px 3px 12px 0px rgba(50, 50, 50, 0.75);
  81.     }
  82.  
  83.     #left_box{
  84.         background-color: #ffffff;
  85.         position: fixed;
  86.         width: 20%;
  87.         top: 10%;
  88.         left: 0%;
  89.         height: 100%;
  90.     }
  91.  
  92.     a{
  93.         font-size: 15px;
  94.     }
  95.  
  96.     .box
  97.     {
  98.         width: 80%;
  99.         padding:10px;
  100.         border:2px solid gray;
  101.         position: fixed;
  102.         top: 12%;
  103.         left: 15%;
  104.         height: 50%;
  105.         font-family: Arial;
  106.     }
  107.  
  108.     label{
  109.         font-family: Arial;
  110.     }
  111.  
  112.     #display_float{
  113.         float: right;
  114.     }
  115.  
  116.     input[type=text], textarea {
  117.         width: 160px;
  118.         -webkit-transition: all 0.30s ease-in-out;
  119.         -moz-transition: all 0.30s ease-in-out;
  120.         -ms-transition: all 0.30s ease-in-out;
  121.         -o-transition: all 0.30s ease-in-out;
  122.         outline: none;
  123.         padding: 3px 0px 3px 3px;
  124.         margin: 5px 1px 3px 0px;
  125.         border: 1px solid #DDDDDD;
  126.     }
  127.  
  128.     input[type=text]:focus, textarea:focus {
  129.         box-shadow: 0 0 5px rgba(81, 203, 238, 1);
  130.         padding: 3px 0px 3px 3px;
  131.         margin: 5px 1px 3px 0px;
  132.         border: 1px solid rgba(81, 203, 238, 1);
  133.     }
  134.  
  135. </style>
  136. <body>
  137.  
  138. <div id="left_box"><br>
  139.     &nbsp;&nbsp;<img src="Images/general_setting.png" height="18" width="18"><a href="general_settings.php" style="text-decoration: none; color: #000000; font-family: Arial";> General</a><br><br>
  140.     &nbsp;&nbsp;<img src="Images/photo_setting.png" height="18" width="18"><a href="photo_settings.php" style="text-decoration: none; color: #000000; font-family: Arial";> Photos</a><br><br>
  141. </div>
  142.  
  143. <div class="box">
  144.     <h1 style="font-family: consolas">Change your name</h1><hr>
  145.     <div id="change_name">
  146.         <label><strong>Your current name: </strong></label>
  147.         <?php
  148.         include('change_setting_db.php');
  149.  
  150.         while($row = mysqli_fetch_array($result))
  151.         {
  152.             echo $row['first_name']." ".$row['last_name'];
  153.         }
  154.         ?><br><br>
  155.  
  156.         <form>
  157.         <label><strong>First name: </strong></label>
  158.         <input type="text" name="first_name">
  159.         <label><strong>Last name: </strong></label>
  160.         <input type="text" name="last_name">
  161.         </form>
  162.  
  163.         <?php
  164.         $con=mysqli_connect("localhost","root","Bhawanku", "members");
  165.         // Check connection
  166.         if (mysqli_connect_errno())
  167.         {
  168.             echo "Failed to connect to MySQL: " . mysqli_connect_error();
  169.         }
  170.  
  171.         $result = mysqli_query($con,"SELECT * FROM admin");
  172.  
  173.         while($row = mysqli_fetch_array($result))
  174.         {
  175.  
  176.         }
  177.  
  178.         mysqli_query($con,"UPDATE admin SET first_name='$_POST[first_name]' AND  last_name='$_POST[last_name]' WHERE id='$row[id]' ");
  179.  
  180.         mysqli_close($con);
  181.         ?>
  182.     </div>
  183.  
  184. </div>
  185. <div id="header">
  186.     <ul><a href="home.php" style="text-decoration: none; color: #000000;"><li>Home</li></a>
  187.         <li>Notification</li>
  188.         <li>
  189.             Profile
  190.             <ul>
  191.                 <li>All members</li>
  192.                 <a href="profile.php" style="text-decoration: none; color: #ffffff"><li>My profile</li></a>
  193.             </ul>
  194.         </li>
  195.         <li>
  196.             Settings
  197.             <ul>
  198.                 <a href="setting.php" style="text-decoration: none; color: #ffffff"><li>Account settings</li></a>
  199.                 <a href="logout.php" style="text-decoration: none; color: #ffffff"><li>Logout</li></a>
  200.                 <li>About</li>
  201.             </ul>
  202.         </li>
  203.     </ul>
  204. </div>
  205. </body>
  206. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement