Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
kavin-jindal committed Apr 10, 2022
1 parent df97ae4 commit b83fad5
Show file tree
Hide file tree
Showing 10 changed files with 101 additions and 38 deletions.
58 changes: 39 additions & 19 deletions KlevrBio/account.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,39 +37,59 @@
<section data-bs-version="5.1" class="team1 cid-sVOG0AriLQ" id="team1-r">

<div class="container">
<div class="row justify-content-center">
<div>
<div class="col-12">
<h3 class="mbr-section-title mbr-fonts-style align-center mb-4 display-2">
<strong>Your Profile</strong>
<h3 class="mbr-section-title mbr-fonts-style mb-4 display-2">
<strong>Account Dashboard</strong>
</h3>

</div>


<div class="col-sm-6 col-lg-4">
<div class="card-wrap">
<div class="image-wrap">
<!--<div class="image-wrap">
<img src=<?php echo $row["img"] ?>>
</div>
<div class="content-wrap">
<h5 class="mbr-section-title card-title mbr-fonts-style align-center m-0 display-5">
<strong><?php echo $row["First Name"]." ".$row["Last Name"] ?></strong>
</h5>
<h6 class="mbr-role mbr-fonts-style align-center mb-3 display-4">
<strong>@<?php echo $name ?></strong>
</h6>
<h6 class="mbr-role mbr-fonts-style align-center mb-3 display-4">
<strong><?php echo $email ?></strong>
</h6>
<p class="card-text mbr-fonts-style align-center display-7">
<?php echo $row["bio"] ?>
</p>
</div>-->
<script>
function myFunction() {
/* Get the text field */
var copyText = "http://klevrbio.rf.gd/post.php?username=" + <?php echo $row["username"] ?>;

/* Select the text field */
copyText.select();
copyText.setSelectionRange(0, 99999); /* For mobile devices */

/* Copy the text inside the text field */
navigator.clipboard.writeText(copyText.value);
document.getElementById("clip").style.visibility = "none";
}

/* Alert the copied text */


</script>
<h3><b>Username: </b> <?php echo $row["username"] ?></h3>
<br>
<h3><b>Name: </b> <?php echo $row["First Name"] . ' ' . $row["Last Name"]?></h3>
<br>
<h3><b>Email: </b> <?php echo $row["email"] ?></h3>
<br>
<h3><b>Date Joined: </b> <?php echo $row['dt'] ?></h3>
<br>

<a href="edit.php" class="btn btn-primary">Edit Portfolio</a>

<a href="post.php?username=<?php echo $username?>" class="btn btn-warning">View your Portfolio</a>
<br>
<!--
<button class="btn btn-danger" onclick="Function()" >Share your Portfolio!</button>
<br>
<p style="visibility: hidden;" id="clip">Copied to clipboard!</p>-->
</div>
</div>
</div>


</div>
</div>
Expand Down
Binary file modified KlevrBio/bk1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 10 additions & 5 deletions KlevrBio/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
$link = $_SESSION['link'];
$link2 = $_SESSION['link2'];
$link3 = $_SESSION['link3'];

$lan = $_SESSION['Languages'];
if (isset($_FILES['file'])){
$file = $_FILES['file'];
echo $file['name'];
Expand Down Expand Up @@ -53,10 +53,10 @@
$link = $_POST['link'];
$link2 = $_POST['link2'];
$link3 = $_POST['link3'];

$lan = $_POST['lan'];
// update account info

$edit = mysqli_query($conn, "UPDATE `users` SET `First Name` = '$name', `Last Name` = '$lastname', `bio` = '$bio' , `link` = '$link', `link2` = '$link2', `link3` = '$link3' WHERE `username` = '$username'");
$edit = mysqli_query($conn, "UPDATE `users` SET `First Name` = '$name', `Last Name` = '$lastname', `bio` = '$bio' , `link` = '$link', `link2` = '$link2', `link3` = '$link3', `Languages` = '$lan' WHERE `username` = '$username'");
if ($edit){
$msg = "Successfully updated the profile";

Expand All @@ -78,7 +78,8 @@
<link rel="shortcut icon" href="assets/images/sae-121x121.png" type="image/x-icon">
<meta name="description" content="">


<script src="https://kit.fontawesome.com/yourcode.js" crossorigin="anonymous"></script>

<title>Edit Account</title>
<link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="assets/bootstrap/css/bootstrap-grid.min.css">
Expand Down Expand Up @@ -123,7 +124,7 @@

<h3 class="mbr-section-title mbr-fonts-style align-center mb-0 display-2">
<br>
<strong>Edit your account</strong></h3>
<strong>Edit your Portfolio</strong></h3>

</div>

Expand All @@ -141,6 +142,10 @@
<textarea class="form-control" id="body" name="bio" rows="10" placeholder="Enter your profile bio"><?php echo $data["bio"] ?></textarea>

</div>
<div class="col-lg-12 col-md-12 col-sm-12 form-group mb-3">Languages</label>
<input type="text" class="form-control" value="<?php echo $data['Languages'] ?>" id="lan" name="lan" required>
<div id="passHel" class="form-text">For eg. C++, Java, PHP (Separate the languages using commas)</div>
</div>
<div class="col-lg-12 col-md-12 col-sm-12 form-group mb-3">Link 1</label>
<input type="text" class="form-control" value="<?php echo $data['link'] ?>" id="link" name="link" required>
</div>
Expand Down
4 changes: 2 additions & 2 deletions KlevrBio/login.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
$_SESSION['link'] = $row['link'];
$_SESSION['link2'] = $row['link2'];
$_SESSION['link3'] = $row['link3'];


$_SESSION['img'] = $row['img'];

$_SESSION['Languages'] = $row['Languages'];
header('location: index.php');
}
else{
Expand Down
30 changes: 25 additions & 5 deletions KlevrBio/logs.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,26 @@
<div class="row justify-content-center">
<div class="card col-md-12 col-lg-10">
<h1>Developer Logs</h1>
<br>
<div class="card-wrapper">
<div class="card-wrapper">
<div class="card-box align-left">
<h4 class="card-title mbr-fonts-style mbr-white mb-3 display-5">
<strong>06/04/22</strong></h4>
<p class="mbr-text mbr-fonts-style display-7">Initial version released</p>
<strong>09/04/22</strong></h4>
<p class="mbr-text mbr-fonts-style display-7">
Updated some more stuff:
<br>
-> Added an account dashboard
<br>
-> Tweaked some minor stuff in site UI
<br>
<b>-> Added a new Languages field to the Portfolio</b>
<br>

</p>

</div>
</div>
<br>
<div class="card-wrapper">
<div class="card-wrapper">
<div class="card-box align-left">
<h4 class="card-title mbr-fonts-style mbr-white mb-3 display-5">
<strong>07/04/22</strong></h4>
Expand All @@ -80,6 +89,17 @@
</div>
</div>
<br>
<br>
<div class="card-wrapper">
<div class="card-box align-left">
<h4 class="card-title mbr-fonts-style mbr-white mb-3 display-5">
<strong>06/04/22</strong></h4>
<p class="mbr-text mbr-fonts-style display-7">Initial version released</p>

</div>
</div>
<br>


<br>

Expand Down
2 changes: 1 addition & 1 deletion KlevrBio/partials/_nav.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
<a class="nav-link link text-black display-4" href="index.php">Home</a></li>
<li class="nav-item">
<a class="nav-link link text-black display-4" href="account.php">Your Account</a></li>
<a class="nav-link link text-black display-4" href="account.php">DashBoard</a></li>
<li class="nav-item">
<a class="nav-link link text-black display-4" href="logout.php">Logout</a></li>
Expand Down
4 changes: 4 additions & 0 deletions KlevrBio/partials/_tabs.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@

<ul class="nav nav-tabs">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="account.php">DashBoard</a>
</li>
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="edit.php">Edit Profile</a>
</li>

<li class="nav-item">
<a class="nav-link active" aria-current="page" href="post.php?username=<?php echo $username ?>">View your Profile</a>
</li>
Expand Down
3 changes: 3 additions & 0 deletions KlevrBio/partials/portfoot.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<center>
<p class="text-white">Made with <a href="klevrbio.rf.gd">KlevrBio</a></p> </center>
</center>
19 changes: 15 additions & 4 deletions KlevrBio/post.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
<meta name="description" content="">

<link href="https://fonts.googleapis.com/css?family=Waiting+for+the+Sunrise" rel="stylesheet" type="text/css"/>

<script src="https://kit.fontawesome.com/yourcode.js" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.7/css/all.css">
<title><?php $username ?></title>
<link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="assets/bootstrap/css/bootstrap-grid.min.css">
Expand All @@ -40,7 +41,7 @@

</head>

<body style="background-image: url('https://media.discordapp.net/attachments/825249708225462312/961286975166496798/bk1.jpg');
<body style="background-image: url('https://media.discordapp.net/attachments/825249708225462312/962306855869239336/unknown.png?width=805&height=453');
background-size: 95% 95%;
background-size: cover;">
<br>
Expand All @@ -60,7 +61,7 @@


?>
<section data-bs-version="5.1" class="team1 cid-sVOG0AriLQ" id="team1-r" style="background-image: url('https://media.discordapp.net/attachments/825249708225462312/961286975166496798/bk1.jpg?width=797&height=495');
<section data-bs-version="5.1" class="team1 cid-sVOG0AriLQ" id="team1-r" style="background-image: url('https://media.discordapp.net/attachments/825249708225462312/962306855869239336/unknown.png?width=805&height=453');
background-size: 95% 95%;
background-size: cover;">

Expand Down Expand Up @@ -95,6 +96,12 @@
<p class="card-text mbr-fonts-style align-center display-7">
<?php echo $row['bio'] ?>
</p>
<p class="card-text mbr-fonts-style align-center display-7">
<b class="fas fa-laptop"></b>
<b> Languages</b>
<br>
<?php echo $row["Languages"] ?>
</p>
<?php
function get_domain($url)
{
Expand Down Expand Up @@ -122,11 +129,15 @@ function get_domain($url)
</div>
</div>
</div>




</div>
</div>
</section>
<?php
include "partials/portfoot.php"
?>
<br>

</body>
Expand Down
4 changes: 2 additions & 2 deletions KlevrBio/signup.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
$link = $_POST["link"];
$link2 = $_POST["link2"];
$link3 = $_POST["link3"];

$lan = $_POST["lan"];

//$exists=false;

Expand Down Expand Up @@ -49,7 +49,7 @@
$exists = false;
if (($password == $cpassword) && $exists==false){
$hash = password_hash($password, PASSWORD_DEFAULT);
$sql = "INSERT INTO `users` (`username`, `First Name`, `Last Name`, `password`, `email`, `bio`, `dt`, `link`, `link2`, `link3`) VALUES ('$username', '$fname', '$lname', '$hash', '$email', '$bio', current_timestamp(), '$link', '$link2', '$link3');";
$sql = "INSERT INTO `users` (`username`, `First Name`, `Last Name`, `password`, `email`, `bio`, `dt`, `link`, `link2`, `link3`, `Languages`) VALUES ('$username', '$fname', '$lname', '$hash', '$email', '$bio', current_timestamp(), '$link', '$link2', '$link3', '$lan');";
$result = mysqli_query($conn, $sql);
if ($result){
$showAlert = true;
Expand Down

0 comments on commit b83fad5

Please sign in to comment.