-
Notifications
You must be signed in to change notification settings - Fork 0
/
classes.php
120 lines (95 loc) · 5.1 KB
/
classes.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
<?php
/**
* Author : Jeevan
* Url : https://jeevanism.com
* Project : https://www.bhimonlineclassroom.in
* Period : March 2020 - May 2020
* File : To display the list of Video Classes - subject wise
*/
include('./_head.php'); // include header markup
/**get the filed classes find page classes by ID
* and get all pages below and display field value of classes
*/
// Retrieve a "q" GET variable, sanitize and output
// Example request URL: domain.com/path/to/page/?q=TEST
$sub = $input->get('sub'); // GET value for subject
$sub = $sanitizer->text($sub); // sanitize input as 1-line text
$cl=$input->get('cl'); // GET value for class
$subjPage = $pages->get(1035); // get page for subjects list
$subjPagefield = $fields->get('class'); // get the field value ' class ' for subject
$all_options = $subjPagefield->type->getOptions($subjPagefield); // get all values for the subject field
?>
<section>
<div class="container">
<div class="row">
<div class="col-lg-8 col-md-12 col-sm-12">
<div class="alert alert-primary" role="alert"> Classes >> <strong><?php echo $sub ;?></strong> </div>
</div>
<div class="col-lg-4 col-md-12 col-sm-12">
<div class=" text-right alert alert-primary" role="alert"> <a href="<?php echo $homepagelink;?>" class="alert-link">Go back to previous Page</a></div>
</div>
</div>
</div>
</section>
<section>
<div class="container">
<div class="col-lg-12 col-md-12 col-sm-12">
<div data-aos="zoom-in" class="aos-init aos-animate">
<div class="alert alert-warning" role="alert">
<h5>
<span class="blinking">Instruction:</span> Click or Tap on the Class, then select the Medium </h5></div>
</div>
</div>
</div></section>
<section>
<div class="container">
<div class="bs-example">
<div class="accordion" id="accordionExample">
<?php
/*loop the acccordion with cards contents*/
$k=1; // use the counter to iterate the collapsed and heading ID elements for accordionExample
foreach($subjPage->children() as $classes) { // get the child pages and loop
$cl= $classes->class->title;
?>
<div class="card">
<!--Card <?php echo $k;?> -->
<div class="card-header shadow p-2 mb-2 bg-white rounded" id="<?php echo 'heading'.$k;?>">
<h2 class="mb-0 classeshead collapsed" data-toggle="collapse" data-target="#<?php echo 'collapse'.$k;?>" aria-expanded="false"><i class="fa fa-plus-circle" aria-hidden="true"></i> <?php echo $classes->class->title;?>
</h2>
</div>
<div id="<?php echo 'collapse'.$k;?>" class="collapse" aria-labelledby="<?php echo 'collapse'.$k;?>" data-parent="#accordionExample" style="">
<div class="card-body bg-grey">
<div class="row">
<div class="col-lg-6 col-sm-12 col-md-12 ">
<div class="card cardeffect card-subj shadow p-3 mb-5 bg-white rounded ">
<a href="<?php echo $chaptersListLink.'?med=english&sub='.$sub.'&cl='.$cl;?>"> <img class="card-img-top" src="<?php echo $config->urls->templates?>images/english.png" alt="Card image cap"></a>
<div class="card-body">
<h3 class="card-title">
<a href="<?php echo $chaptersListLink.'?med=english&sub='.$sub.'&cl='.$cl;?>">English MEDIUM</a>
</h3>
</div>
</div>
</div>
<div class="col-lg-6 col-sm-12 col-md-12 ">
<div class="card cardeffect card-subj shadow p-3 mb-5 bg-white rounded ">
<a href="<?php echo $chaptersListLink.'?med=malayalam&sub='.$sub.'&cl='.$cl;?>"> <img class="card-img-top" src="<?php echo $config->urls->templates?>images/malayalam.png" alt="Card image cap"></a>
<div class="card-body">
<h3 class="card-title">
<a href="<?php echo $chaptersListLink.'?med=malayalam&sub='.$sub.'&cl='.$cl;?>">Malayalam MEDIUM</a>
</h3>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php
$k++;
}
?>
</div>
</div>
</div>
</section>
<?php include('./_foot.php'); // include footer markup ?>