Skip to content

Commit

Permalink
Data retrieve completed
Browse files Browse the repository at this point in the history
  • Loading branch information
pradhuman1 committed Jul 10, 2020
1 parent e9ce1a8 commit 13d83e0
Show file tree
Hide file tree
Showing 10 changed files with 264 additions and 1 deletion.
Binary file modified .DS_Store
Binary file not shown.
7 changes: 7 additions & 0 deletions data_game/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@
$admin_value = $_POST['admin_value'];
if($admin_value=='0'||$admin_value=='1'||$admin_value=='2'){
$query = "UPDATE credentials SET `admin_value`='$admin_value' WHERE `credentialsID`='$credID'";
if($admin_value=='0')
$query = "UPDATE member SET `post`='Member' WHERE `cred_id`='$credID'";
else if($admin_value=='1')
$query = "UPDATE member SET `post`='Coordinator' WHERE `cred_id`='$credID'";
else if($admin_value=='2')
$query = "UPDATE member SET `post`='Overall Coordinator' WHERE `cred_id`='$credID'";

$query_run = mysqli_query($connection,$query);
header('location:../geekhaven/makeAdmin.php');
}else{
Expand Down
2 changes: 1 addition & 1 deletion data_game/savemem.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
}else{
$query = "INSERT INTO social_handles VALUES('$social_handle_id','','','','','','','','','','')";
$query_run = mysqli_query($connection,$query);
$query = "INSERT INTO member VALUES ('$username', '', '', '', '$member_id', '0', '$social_handle_id', '$cred_id', '$mem_post', '$wing', '$sess')";
$query = "INSERT INTO member VALUES ('$username', '', '', '', '$member_id', '0', '$social_handle_id', '$cred_id', 'member', '$wing', '$sess')";
$query_run = mysqli_query($connection,$query);
$query = "INSERT INTO credentials VALUES('$cred_id','$username','$pass','0','$member_id')";
$query_run = mysqli_query($connection,$query);
Expand Down
47 changes: 47 additions & 0 deletions getData/ann.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?php
require "../database/member_info.php";
?>

<!DOCTYPE html>
<html>
<head>

</head>
<body>
<?php
$query = 'SELECT * FROM announcements';
$result = mysqli_query($connection,$query);
while($row = mysqli_fetch_assoc($result)){
$name = $row['name'];
$organizer = $row['organizer'];
$venue = $row['venue'];
$date = $row['date'];
$image = $row['image'];
$link = $row['link'];
$time = $row['time'];
$topic = $row['topic'];
$details = $row['details'];
$image = $row['image'];

?>
<div class=card>
Name : '<?php echo $name;?>'<br>

Organiser : '<?php echo $organizer;?>'<br>
Venue : '<?php echo $venue;?>'<br>

date: '<?php echo $date;?>'<br>
time: '<?php echo $time;?>'<br>
topic: '<?php echo $topic;?>'<br>
details: '<?php echo $details;?>'<br>
date: '<?php echo $date;?>'<br>

Image : <?php echo '<img src="data:image/jpeg;base64,'.base64_encode( $image ).'" style="height:100px; widht:100px;"/>'; ?><br>
Link : '<?php echo $link;?>'<br>
</div>
<hr>
<?php
}
?>
</body>
</html>
31 changes: 31 additions & 0 deletions getData/blog.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php
require "../database/member_info.php";
?>

<!DOCTYPE html>
<html>
<head>

</head>
<body>
<?php
$query = 'SELECT * FROM blogs';
$result = mysqli_query($connection,$query);
while($row = mysqli_fetch_assoc($result)){
$title = $row['blog_title'];
$des = $row['description'];
$image = $row['image'];
$link = $row['blog_link'];
?>
<div class=card>
Title : '<?php echo $title;?>'<br>
des: '<?php echo $des;?>'<br>
Image : <?php echo '<img src="data:image/jpeg;base64,'.base64_encode( $image ).'" style="height:100px; widht:100px;"/>'; ?><br>
Link : '<?php echo $link;?>'<br>
</div>
<hr>
<?php
}
?>
</body>
</html>
53 changes: 53 additions & 0 deletions getData/pastmem.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?php
require "../database/member_info.php";
?>

<!DOCTYPE html>
<html>
<head>

</head>
<body>
<?php
$query = "SELECT * FROM past_members ";
$result = mysqli_query($connection,$query);
while($row = mysqli_fetch_assoc($result)){
$name = $row['name'];
$roll_no = $row['roll_no'];
$image = $row['image'];
$des = $row['description'];
$hof = $row['hof'];
$social_id = $row['social_handles'];
$query = "SELECT * FROM social_handles WHERE `social_handles_id`='$social_id'";
$res = mysqli_query($connection,$query);
while($data = mysqli_fetch_assoc($res)){
$git = $data['github'];
$mail = $data['mail'];
$face = $data['facebook'];
$insta = $data['instagram'];
$chef = $data['codechef'];
$force = $data['codeforces'];
$linkedin = $data['linkedin'];
$rank = $data['hackerrank'];
$earth = $data['hackerearth'];
$twi = $data['twitter'];
}
$sess = $row['session'];
$post = $row['post'];
?>
<div class=card>
Name : '<?php echo $name;?>'<br>
Roll: '<?php echo $roll_no;?>'<br>
Image : <?php echo '<img src="data:image/jpeg;base64,'.base64_encode( $image ).'"/>'; ?><br>
Des : '<?php echo $des;?>'<br>
HOf : '<?php echo $hof;?>'<br>
social handles : '<?php echo $git; echo $mail; echo $face; echo $insta; echo $chef; echo $force; echo $linkedin; echo $rank; echo $earth; echo $twi;?>'<br>
Sess : '<?php echo $sess;?>'<br>
post : '<?php echo $post;?>'<br>
</div>
<hr>
<?php
}
?>
</body>
</html>
36 changes: 36 additions & 0 deletions getData/project.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?php
require "../database/member_info.php";
?>

<!DOCTYPE html>
<html>
<head>

</head>
<body>
<?php
$query = 'SELECT * FROM Projects';
$result = mysqli_query($connection,$query);
while($row = mysqli_fetch_assoc($result)){
$name = $row['project_name'];
$pro_link = $row['project_link'];
$code = $row['source_code_link'];
$des = $row['description'];
$image = $row['image'];
$blog_link = $row['blog_link'];
?>
<div class=card>
Name : '<?php echo $name;?>'<br>
project link : '<?php echo $pro_link;?>'<br>
Source Code : '<?php echo $code;?>'<br>

des: '<?php echo $des;?>'<br>
Image : <?php echo '<img src="data:image/jpeg;base64,'.base64_encode( $image ).'" style="height:100px; widht:100px;"/>'; ?><br>
Link : '<?php echo $blog_link;?>'<br>
</div>
<hr>
<?php
}
?>
</body>
</html>
33 changes: 33 additions & 0 deletions getData/wing.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php
require "../database/member_info.php";
?>

<!DOCTYPE html>
<html>
<head>

</head>
<body>
<?php
$query = 'SELECT * FROM wings';
$result = mysqli_query($connection,$query);
while($row = mysqli_fetch_assoc($result)){
$wing = $row['wing'];
$info = $row['info'];
$logo = $row['logo'];
$image = $row['image'];
$link = $row['web_link'];
?>
<div class=card>
Name : '<?php echo $wing;?>'<br>
Info: '<?php echo $info;?>'<br>
Logo: <?php echo '<img src="data:image/jpeg;base64,'.base64_encode( $logo ).'" style="height:100px; widht:100px;"/>'; ?><br>
Image : <?php echo '<img src="data:image/jpeg;base64,'.base64_encode( $image ).'"/>'; ?><br>
Link : '<?php echo $link;?>'<br>
</div>
<hr>
<?php
}
?>
</body>
</html>
54 changes: 54 additions & 0 deletions getData/wingMem.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<?php
require "../database/member_info.php";
?>

<!DOCTYPE html>
<html>
<head>

</head>
<body>
<?php
$wing_name = "foss";
$query = "SELECT * FROM member WHERE `wing`='$wing_name'";
$result = mysqli_query($connection,$query);
while($row = mysqli_fetch_assoc($result)){
$name = $row['name'];
$roll_no = $row['roll_no'];
$image = $row['image'];
$des = $row['description'];
$hof = $row['hof'];
$social_id = $row['social_handles'];
$query = "SELECT * FROM social_handles WHERE `social_handles_id`='$social_id'";
$res = mysqli_query($connection,$query);
while($data = mysqli_fetch_assoc($res)){
$git = $data['github'];
$mail = $data['mail'];
$face = $data['facebook'];
$insta = $data['instagram'];
$chef = $data['codechef'];
$force = $data['codeforces'];
$linkedin = $data['linkedin'];
$rank = $data['hackerrank'];
$earth = $data['hackerearth'];
$twi = $data['twitter'];
}
$sess = $row['session'];
$post = $row['post'];
?>
<div class=card>
Name : '<?php echo $name;?>'<br>
Roll: '<?php echo $roll_no;?>'<br>
Image : <?php echo '<img src="data:image/jpeg;base64,'.base64_encode( $image ).'"/>'; ?><br>
Des : '<?php echo $des;?>'<br>
HOf : '<?php echo $hof;?>'<br>
social handles : '<?php echo $git; echo $mail; echo $face; echo $insta; echo $chef; echo $force; echo $linkedin; echo $rank; echo $earth; echo $twi;?>'<br>
Sess : '<?php echo $sess;?>'<br>
post : '<?php echo $post;?>'<br>
</div>
<hr>
<?php
}
?>
</body>
</html>
2 changes: 2 additions & 0 deletions onstart.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@
`wing` varchar(255),
`info` varchar(255),
`logo`blob,
`image`blob,
`web_link`varchar(255),
PRIMARY KEY (wing_id)
);";

Expand Down

0 comments on commit 13d83e0

Please sign in to comment.