forked from woogie-s/Capstone_20-1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sub-category1.php
74 lines (61 loc) · 2.38 KB
/
sub-category1.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
<?php
$searchapp =$_GET['varapp'];
$conn= mysqli_connect('localhost','root','0000','capstone','3306');
$sql = "SELECT count(writer) FROM $searchapp WHERE category1 = '광고' or category2 = '광고' or category3= '광고'";
$result = mysqli_query($conn, $sql);
$row = mysqli_fetch_array($result);
$all_count = $row['count(writer)'];
$sql = "SELECT count(writer) FROM $searchapp WHERE category1 = '광고' or category2 = '광고' or category3 = '광고'";
$result = mysqli_query($conn, $sql);
$row = mysqli_fetch_array($result);
$g_d0 = $row['count(writer)'];
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<!-- Custom fonts for this template-->
<link
href="vendor/fontawesome-free/css/all.min.css"
rel="stylesheet"
type="text/css">
<link
href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i"
rel="stylesheet">
<!-- Custom styles for this template-->
<link href="css/sb-admin-2.min.css" rel="stylesheet">
<script>
function changeIframeUrl(url) {
document.getElementById("main_frame").src = url;
}
</script>
</head>
<body>
<!-- Project Card Example -->
<div class="card shadow mb-4">
<div class="card-header py-3">
<h6 class="m-0 font-weight-bold text-primary">[광고] 하위 카테고리</h6>
</div>
<div class="card-body">
<h4 class="small font-weight-bold">광고
<span class="float-right"><?=round($g_d0/$all_count*100)?>%</span></h4>
<div class="progress mb-4">
<div
class="progress-bar bg-danger"
role="progressbar"
style="width: <?=$g_d0/$all_count*100?>%"
aria-valuenow="25"
aria-valuemin="0"
aria-valuemax="100"></div>
</div>
</div>
</div>
</div>
</body>
</html>