-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathview_api.php
More file actions
52 lines (30 loc) · 780 Bytes
/
view_api.php
File metadata and controls
52 lines (30 loc) · 780 Bytes
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
<?php
$actual_link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
?>
<?php
$url = $actual_link ;
$url_components = parse_url($url);
parse_str($url_components['query'], $params);
include "connection.php";
$q="SELECT * FROM article where id=".$params['id']."" ;
$r=mysqli_query($con, $q);
$row=mysqli_fetch_assoc($r);
if($row["id"][0] >= 1) {
} else {
header("location: ../errors/infound.php");
}
?>
<?php
include "connection.php";
$im = "SELECT * FROM article where id=".$params['id']."" ;
$records = mysqli_query($con,$im);
start:
$i=0;
while($result = mysqli_fetch_assoc($records)){
$frame = $result['ifram'];
header("Location: ../screens/$frame");
if ($i==4) {
goto start;
}
$i++;
}