-
Notifications
You must be signed in to change notification settings - Fork 0
/
move.php
143 lines (130 loc) · 5.16 KB
/
move.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<?php
ob_start();
session_start();
if (!isset($_SESSION["memID"]) && !isset($_SESSION["password"])) {
header("location:index");
}
?>
<html>
<!-- navigation bar -->
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Pera Cricket</a>
</div>
<div>
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav">
<li><a href="/"><span class="glyphicon glyphicon-home"></span> Home</a></li>
<li><a href="view"><span class="glyphicon glyphicon-plus"></span> View Match Details</a></li>
<li><a href="player"><span class="glyphicon glyphicon-user"></span> View Player Details</a></li>
<li><a href="rankings"><span class="glyphicon glyphicon-star"></span> View Rankings</a></li>
<li><a href="records"><span class="glyphicon glyphicon-star-empty"></span> View Records</a></li>
</ul>
</div>
</div>
</div>
</nav>
<br><br><br>
<!-- searching area -->
<div class='container'><br>
<div class='row'>
<div class='col-md-9'>
<div class='container'>
<div class="row">
<form action="move" method="post">
<div class='col-md-4'>
<input class='form-control' type='text' name='search_name'>
</div>
<div class="col-md-2">
<input class="form-control" type="submit" name="searchN" value="Search by Name">
</div>
</form>
</div>
<h2></h2>
</div>
</div>
</div>
<?php
if (isset($_GET['moved'])) {
echo "<div class='container'>
<div class='row'>
<div class='col-md-3'></div>
<div class='col-md-6'>
<div class='alert alert-success' alert-dismissable>
<a href='move' class='close' data-dismiss='alert arial-label='close'>×</a>
<strong>" . $_GET['moved'] . "</strong>
</div><br>
</div>
<div class='col-md-3'></div>
</div>
</div>";
}
require "connect.php";
$itr1 = 0;
if (isset($_POST['searchN'])) {
echo "<div class='container'><table class='table table-striped'><thead><tr><th>Firstname</th><th>Lastname</th></tr></thead><tbody>";
$seach_by_name_query = "SELECT * FROM `player_informations` WHERE Firstname='" . $_POST['search_name'] . "'";
if ($is_seach_by_name_query_run = mysqli_query($connect, $seach_by_name_query)) {
while ($seach_by_name_query_execute = mysqli_fetch_assoc($is_seach_by_name_query_run)) {
echo "<tr>";
echo "<td>" . $seach_by_name_query_execute['Firstname'] . "</td>";
echo "<td>" . $seach_by_name_query_execute['Lastname'] . "</td>";
if ($seach_by_name_query_execute['Pics'] != NULL) {
echo "<td><img src = '" . $seach_by_name_query_execute['Pics'] . "' style = 'height:50px;width:50px'></td>";
} else {
echo "<td><img src = 'logo.jpg' style = 'height:50px;width:50px'></td>";
}
echo "<td> <a type='button' class='btn btn-info' href='move_direct?moved_reg_no=" . $seach_by_name_query_execute['Reg_no'] . "'>Move To Old Pera</a></td>";
$itr1++;
echo "</tr>";
}
}
$seach_by_lname_query = "SELECT * FROM `player_informations` WHERE Lastname='" . $_POST['search_name'] . "'";
if ($is_seach_by_lname_query_run = mysqli_query($connect, $seach_by_lname_query)) {
while ($seach_by_lname_query_execute = mysqli_fetch_assoc($is_seach_by_lname_query_run)) {
echo "<tr>";
echo "<td>" . $seach_by_lname_query_execute['Firstname'] . "</td>";
echo "<td>" . $seach_by_lname_query_execute['Lastname'] . "</td>";
if ($seach_by_lname_query_execute['Pics'] != NULL) {
echo "<td><img src = '" . $seach_by_lname_query_execute['Pics'] . "' style = 'height:50px;width:50px'></td>";
} else {
echo "<td><img src = 'logo.jpg' style = 'height:50px;width:50px'></td>";
}
echo "<td> <a type='button' class='btn btn-info' href='move_direct?moved_reg_no=" . $seach_by_lname_query_execute['Reg_no'] . "'>Move To Old Pera</a>/td>";
$itr1++;
echo "</tr>";
}
}
echo "</table></div>";
}
?>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>
<?php
if (isset($_POST['player'])) {
echo $player_query0_execute['Firstname'] . " Information";
} else {
echo "MOVE";
}
?>
</title>
<link type="image/jpg" rel="icon" href="logo.jpg" />
<link rel="stylesheet" href="./css/global.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
</body>
</html>`