File manager - Edit - /home/custbahd/public_html/admin/home.php
Back
<?php // We need to use sessions, so you should always start sessions using the below code. session_start(); $DATABASE_HOST = 'localhost'; $DATABASE_USER = 'custbahd_customassistname'; $DATABASE_PASS = 'Rwatangabo1son'; $DATABASE_NAME = 'custbahd_customassist'; $con = mysqli_connect($DATABASE_HOST, $DATABASE_USER, $DATABASE_PASS, $DATABASE_NAME); if (mysqli_connect_errno()) { exit('Failed to connect to MySQL: ' . mysqli_connect_error()); } // We don't have the password or email info stored in sessions so instead we can get the results from the database. $stmt = $con->prepare('SELECT username, email, image FROM cadmin ORDER BY id = ? DESC LIMIT 1'); // In this case we can use the account ID to get the account info. $stmt->bind_param('i', $_SESSION['id']); $stmt->execute(); $stmt->bind_result($username, $email, $image); $stmt->fetch(); $stmt->close(); ?> <?php include('header.php'); ?> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Admin Panel @copy;</title> <link rel="icon" type="ico/png" href="image/calogo.png"> <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.1/css/all.css"> <link rel="stylesheet" type="text/css" href="css/heartbeat1.css"> <style type="text/css"> body { background: white; } header { height: 70px; width: 100%; border: 0; } header h1 { font-size: 25px; font-weight: bold; text-align: center; margin: 0; background: linear-gradient(14deg, red, purple, dodgerblue); -webkit-background-clip: text; -webkit-text-fill-color: transparent; } h2{ margin: 0; padding: 25px 0; font-size: 22px; text-align: center; color: grey; } header a { float: right; padding: 0 20px; text-decoration: none; text-align: center; color: white; font-weight: bold; background: linear-gradient(14deg, red, purple, dodgerblue); -webkit-background-clip: text; -webkit-text-fill-color: transparent; } header a:hover { color: #eaebed; } /*menu button*/ #menu-btn { font-size: 30px; color: white; width: 36px; height: 36px; border: 0px solid purple; border-radius: 50px; cursor: pointer; outline: none; background: linear-gradient(30deg, purple, pink, dodgerblue); transition: 0.5s; } #menu-btn:hover{ font-size: 31px; color: white; } /*menu*/ .overlay { height: 62%; width: 0; position: fixed; z-index: 1; top: 33%; left: 8%; border: 0px solid; border-radius: 15px; background-color: rgb(0,0,0); background-color: rgba(0,0,0, 0.9); overflow-x: hidden; max-width: 950px; transition: 0.5s; } .overlay-content { position: relative; width: 100%; text-align: center; margin-top: 10px; } .overlay a { padding: 8px; text-decoration: none; font-size: 20px; color: #818181; display: block; transition: 0.3s; } .overlay a:hover, .overlay a:focus { color: #f1f1f1; } .overlay .closebtn { position: absolute; top: 10px; right: 15px; font-size: 20px; width: 15px; height: 15px; background: red; border: 1px solid; border-radius: 20px; box-shadow: 0px 0px 5px 1px red; outline: none; } @media screen and (max-height: 450px) { .overlay a {font-size: 20px} .overlay .closebtn { font-size: 40px; top: 15px; right: 35px; } } /*Menu form*/ input[type="text"]{ margin-top: 25px; width: 40%; border: 0px solid; color: white; border-bottom: 1px solid white; background: none; outline: none; transition: 0.5s; } input[type="text"]:hover { width: 60%; border-bottom: 1px solid red; } input[type="number"]{ margin-top: 25px; color: white; width: 40%; border: 0px solid; border-bottom: 1px solid white; background: none; outline: none; } input[type="number"]:hover { border-bottom: 1px solid red; } input[type="submit"]{ color: silver; margin-top: 15px; width: 50px; height: 50px; border: 1px solid white; border-radius: 50px; background: none; outline: none; box-shadow: 0px 0px 4px 0px; transition: 0.5s; } input[type="submit"]:hover { color: red; border: 1px solid red; } /*Dp*/ #dp { width: 50px; height: 50px; border: 0px solid; border-radius: 50px; } /*View*/ .navbar { overflow: hidden; float: right; background: none; } .subnav { overflow: hidden; } .subnavbtn { font-size: 20px; text-align: center; color: black; border: 0px solid skyblue; border-radius: 50px; background: none; outline: none; transition: 1s; } .subnavbtn:hover { color: purple; } .subnav-content { display: none; position: absolute; text-align: center; color: white; font-size: 10px; right: 3%; width: 90%; height: 400px; min-height: 120px; border: 1px solid skyblue; border-radius: 15px; background-color: rgb(0,0,0); background-color: rgba(0,0,0, 0.8); box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); z-index: 1; } .subnav-content img{ float: left; padding: 10px; border-radius: 200px; } .subnav:hover .subnav-content { display: block; } .view_header{ font-size: 14px; padding: 20px; border: 0px solid; border-top-right-radius: 15px; border-top-left-radius: 15px; background-color: rgb(0,0,0); background-color: rgba(0,0,0, 0.8); } #worker { margin-top: 10px; } /*Categories*/ .categories { width: 85%; min-height: 600px; background-color: #ffffff; box-shadow: 0 0 9px 0 rgba(0, 0, 0, 0.3); border: 0px solid; border-radius: 15px; } .cat { float: left; font-weight: bold; font-size: 20px; text-align: center; color: white; width: 20%; height: 50px; padding: 50px 50px; cursor: pointer; box-shadow: 0px 0px 2px 0px white; transition: 1s; } .cat:hover { border-radius: 0px; box-shadow: 0px 0px 5px 0px; } /*Details*/ .details { float: left; margin-top: 15px; margin-left: 10px; font-weight: bold; color: ; width: 30%; height: 80px; border: 0px solid; border-radius: 10px; background: silver; border-bottom-right-radius: 10px; box-shadow: 0px 0px 4px 0px deepskyblue; transition: 0.5s; } .details span{ font-size: 8px; color: black; } .details:hover{ color: red; box-shadow: 0px 0px 4px 0px red; } .title { font-weight: bold; font-size: 10px; text-align: center; color: deepskyblue; width: : 100%; height: 15px; padding: 5px; border-top-right-radius: 10px; border-top-left-radius: 10px; background: black; transition: 1s; } .title:hover{ color: red; box-shadow: 0px 0px 4px 0px red; } /*Grid*/ #outer-grid { display: grid; grid-template-rows: 2fr 2fr; grid-template-columns: 1fr 1fr; grid-gap: 5px; padding: 25px; } #outer-grid > div { font-size: 4vw; padding: 20px; border-radius:10px; box-shadow: 0 0 2px 0; } .footer { background: linear-gradient(14deg, red, purple, dodgerblue); -webkit-background-clip: text; -webkit-text-fill-color: transparent; } </style> </head> <body> <header> <h1>Custom Assist Admin</h1> <div> <a href="logout.php"><i class="fa fa-power-off"></i> <br> Logout</a> </div> <!--Menu--> <div class="heartbeat1"><button id="menu-btn" onclick="openNav()" class="dropdown"> + </button> </div> <div id="myNav" class="overlay"> <div class="overlay-content"> <button class="closebtn" onclick="closeNav()"></button> <!--Details--> <div class="top"> <h2>Store Client Details </h2> </div> <form action="insert.php" method="POST"> <input type="text" name="clientname" placeholder="Client Name" Required> <br/> <input type="number" name="clientcontact" placeholder="Contact" Required> <br> <input type="text" name="businessname" placeholder="Client's Business Name" Required> <br/> <input type="text" name="businesstype" placeholder="Type of Business" Required> <br> <input type="text" name="clientorder" placeholder="Client order" Required> <br> <input type="submit" name="submit" value="Store"> </form> </div> </div> <script> function openNav() { document.getElementById("myNav").style.width = "86%"; } function closeNav() { document.getElementById("myNav").style.width = "0%"; } </script> </header> <br> <br> <div align="center"> <div class="categories"> <!--View--> <div class="navbar"> <div class="subnav"> <button class="subnavbtn"><i class="fa fa-eye"></i></button> <div class="subnav-content"> <div class="view_header">Administrators </div> <?php require_once('db.php'); $result = $conn->prepare("SELECT * FROM cadmin ORDER BY id ASC"); $result->execute(); for($i=0; $row = $result->fetch(); $i++){ $id=$row['id']; ?> <?php if($row['image'] != ""): ?> <a href="#delete<?php echo $id;?>" data-toggle="modal"> <img src="pics/<?php echo $row['image']; ?>" width="100px" height="100px"> </a> <?php else: ?> <a href="#delete<?php echo $id;?>" data-toggle="modal" > <img src="image/default.png" width="100px" height="100px"> </a> <b><?php echo $username; ?></b> <?php endif; ?> <hr> <?php } ?> </div> </div> </div> <div class="content"> <!--Categories--> <table cellpadding="0" cellspacing="0" border="0" class="table table-striped table-bordered" id="example"> <tbody> <?php require_once('db.php'); $result = $conn->prepare("SELECT * FROM cadmin where id=$id "); $result->execute(); for($i=0; $row = $result->fetch(); $i++){ $id=$row['id']; ?> <tr> <td style="text-align:center; margin-top:10px; word-break:break-all; width:450px; line-height:100px;"> <?php if($row['image'] != ""): ?> <a href="#delete<?php echo $id;?>" data-toggle="modal"> <img src="pics/<?php echo $row['image']; ?>" width="100px" height="100px"> </a> <?php else: ?> <a href="#delete<?php echo $id;?>" data-toggle="modal" > <img src="image/default.png" width="100px" height="100px"> </a> <?php endif; ?> </td> </tr> <!-- Modal --> <div id="delete<?php echo $id;?>" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-body"> <div class="alert alert-danger"> <?php if($row['image'] != ""): ?> <img src="pics/<?php echo $row['image']; ?>" width="100px" height="100px"> <?php else: ?> <img src="image/default.png" width="100px" height="100px"> <br> <br> <br> <br> <?php endif; ?> <form action="edit_PDO.php<?php echo '?id='.$id; ?>" method="post" enctype="multipart/form-data"> <div style="color:blue; margin-left:150px; font-size:30px;"> <input type="file" name="image" style="margin-top:-115px;"> </div> </div> <hr> <div align="center" > <button class="btn btn-inverse" data-dismiss="modal" aria-hidden="true">No</button> <button type="submit" name="submit" class="btn btn-danger">Yes</button> </form> </div> </div> </div> <?php } ?> </tbody> </table> <br> <?=$_SESSION['name']?> <div> <a href="profile.php">Profile</a> </div> <hr> <!--Grid--> <div id="outer-grid"> <div onclick="openBusiness()" style="color:dodgerblue">Business</div> <div onclick="openFashion()" style="color:red">Fashion</div> <div onclick="openSchool()" style="color:orange">Schools</div> <div onclick="openHome()" style="color:blue">Homes</div> <div onclick="openDigital()" style="color:deepskyblue">Digital Marketing</div> <div onclick="openWebs()" style="color:purple">Websites</div> </div> <!--Business--> <div id="BusinessNav" class="overlay"> <div class="overlay-content"> <button class="closebtn" onclick="closeBusiness()"></button> <!--Details--> <div class="top"> <h2> Business Details </h2> </div> <div class="details"> <div class="title">Logos</div> <span>2D: 100,000/= </span> <br> <span> 3D: 150,000/=</span></div> <div class="details"> <div class="title">Business Cards</div> <span>100 cards: 25,000/= </span> <br> <span> Double sided: 30,000/=</span> </div> <div class="details"> <div class="title">Flyers</div> <span> A5: 500/= each </span> <br> <span> A4: 1,000/= each </span> <br> <span> A3: 2,000/= each</span> </div> <div class="details"> <div class="title">Posters</div> <span> A3: 2,000/= each </span> <br> <span> A2: 5,000/= each </span> <br> <span> A1: 10,000/= each</span> </div> <div class="details"> <div class="title">Stickers</div> <span> Small: 2,000/= each </span> <br> <span> Medium: 5,000/= each </span> <br> <span> A1: 30,000/= each</span> </div> <div class="details"> <div class="title">Brochures</div> <span> Design: 50,000/= </span> <br> <span> Brochure: 15,000/= </span> </div> <div class="details"> </div> <div class="details"> </div> <div class="details"> </div> </div> </div> <script> function openBusiness() { document.getElementById("BusinessNav").style.width = "86%"; } function closeBusiness() { document.getElementById("BusinessNav").style.width = "0%"; } </script> <!--Fashion--> <div id="FashionNav" class="overlay"> <div class="overlay-content"> <button class="closebtn" onclick="closeFashion()"></button> <!--Details--> <div class="top"> <h2> Fashion Details </h2> </div> <div class="details"> <div class="title">Caps</div> <span>Normal: 20,000/= </span> <br> <span> Hoodies: 20,000/=</span></div> <div class="details"> <div class="title">T-Shirts</div> <span>R-Neck: 25,000/= </span> <br> <span> V-Neck: 35,000/=</span> <br> <span> Polo: 35,000/=</span> </div> <div class="details"> <div class="title">Sweaters</div> <span> Sublimation: 40,000/= </span> <br> <span> Screen: 50,000/= </span> </div> <div class="details"> <div class="title">Jumpers</div> <span> Sublimation: 50,000/= </span> <br> <span> Screen: 60,000/= </span> </div> <div class="details"> <div class="title">Shorts</div> <span> Sublimation: 40,000/= </span> <br> <span> Screen: 50,000/= </span> </div> <div class="details"> <div class="title"> </div> <span> Design: 50,000/= </span> </div> </div> </div> <script> function openFashion() { document.getElementById("FashionNav").style.width = "86%"; } function closeFashion() { document.getElementById("FashionNav").style.width = "0%"; } </script> <!--Schools--> <div id="SchoolNav" class="overlay"> <div class="overlay-content"> <button class="closebtn" onclick="closeSchool()"></button> <!--Details--> <div class="top"> <h2> School Details </h2> </div> <div class="details"> <div class="title">Badges</div> <span> 2D: 100,000/= </span> <br> <span> 3D: 150,000/=</span></div> <div class="details"> <div class="title">Uniforms</div> <span>Pair: 25,000/= </span> <br> <span> Single: 20,000/=</span> <br> <span> Sweater: 35,000/=</span> </div> <div class="details"> <div class="title">Sportswear</div> <span> Pair: 25,000/= </span> <br> <span> Single: 20,000/= </span> </div> <div class="details"> <div class="title">Tags</div> <span> Prefect: 10,000/= </span> <br> <span> Office: 20,000/= </span> </div> <div class="details"> <div class="title">Calenders</div> <span> Table: 15,000/= </span> <br> <span> Wall: 25,000/= </span> </div> <div class="details"> <div class="title">Books</div> <span> Small: 15,000/= </span> <br> <span> Large: 25,000/= </span> </div> <div class="details"> <div class="title">Questionnaires</div> <span> Small: 10,000/= </span> <br> <span> Large: 15,000/= </span> </div> </div> </div> <script> function openSchool() { document.getElementById("SchoolNav").style.width = "86%"; } function closeSchool() { document.getElementById("SchoolNav").style.width = "0%"; } </script> <!--Homes--> <div id="HomeNav" class="overlay"> <div class="overlay-content"> <button class="closebtn" onclick="closeHome()"></button> <!--Details--> <div class="top"> <h2> Home Details </h2> </div> <div class="details"> <div class="title">Poster</div> <span>Small: 100,000/= </span> <br> <span> Large: 350,000/=</span></div> <div class="details"> <div class="title">Road lane</div> <span>Small: 80,000/= </span> <br> <span> Large: 150,000/=</span> </div> <div class="details"> <div class="title">Plot Address</div> <span> Small: 80,000/= </span> <br> <span> Large: 150,000/= </span> </div> <div class="details"> <div class="title">Cups</div> <span> Picture: 25,000/= </span> <br> <span> Words: 20,000/= </span> </div> <div class="details"> <div class="title">Plates</div> <span> Picture: 25,000/= </span> <br> <span> Words: 20,000/= </span> </div> <div class="details"> <div class="title">Bottles</div> <span> Picture: 25,000/= </span> <br> <span> Words: 20,000/= </span> </div> <div class="details"> <div class="title">Cups</div> <span> Picture: 25,000/= </span> <br> <span> Words: 20,000/= </span> </div> <div class="details"> <div class="title">Stickers</div> <span> Small: 2,000/= each </span> <br> <span> Medium: 5,000/= each </span> <br> <span> A1: 30,000/= each</span> </div> </div> </div> <script> function openHome() { document.getElementById("HomeNav").style.width = "86%"; } function closeHome() { document.getElementById("HomeNav").style.width = "0%"; } </script> <!--Digital Marketing--> <div id="DigitalNav" class="overlay"> <div class="overlay-content"> <button class="closebtn" onclick="closeDigital()"></button> <!--Details--> <div class="top"> <h2> Digital Marketing Details </h2> </div> <div class="details"> <div class="title">Likes/Following</div> <span>320,000/=</span></div> <div class="details"> <div class="title">Like/Views</div> <span> 300,000/= </span> </div> <div class="details"> <div class="title">Content Design</div> <span> 15,000/= </span> </div> <div class="details"> <div class="title">Management</div> <span> 200,000/= <br> per month </span> </div> </div> </div> <script> function openDigital() { document.getElementById("DigitalNav").style.width = "86%"; } function closeDigital() { document.getElementById("DigitalNav").style.width = "0%"; } </script> <!--Websites--> <div id="WebsNav" class="overlay"> <div class="overlay-content"> <button class="closebtn" onclick="closeWebs()"></button> <!--Details--> <div class="top"> <h2> Website Details </h2> </div> <div class="details"> <div class="title">Blogs</div> <span>300,000/=</span></div> <div class="details"> <div class="title">Static</div> <span>450,000/=</span> </div> <div class="details"> <div class="title">Dynamic</div> <span> 750,000/=</span> </div> <div class="details"> <div class="title">Maintenence</div> <span> 200,000/= <br> per month </span> </div> <div class="details"> <div class="title">Upgrading</div> <span> 200,000/=</span> </div> <div class="details"> <div class="title">Content</div> <span> 15,000/=</span> </div> </div> </div> <script> function openWebs() { document.getElementById("WebsNav").style.width = "86%"; } function closeWebs() { document.getElementById("WebsNav").style.width = "0%"; } </script> </div> </div> </div> <br> <div class="footer" align="center"> <div> <p class="copyright">Custom Assist Inc. © <script>document.write(new Date().getFullYear());</script></p> </div> <br> <p style="text-align: center;width: 100%;color: orange;font-size: 12px;margin-top: -20px;margin-bottom: 20px;">Powered by <a href="https://wa.me/message/E6ATX65IPYJHK1" class="flicker-5" style="color: black;">Custom Webs</a></p> </div> </body> </html>
| ver. 1.4 |
Github
|
.
| PHP 8.1.33 | Generation time: 1.1 |
proxy
|
phpinfo
|
Settings