-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsections.inc
More file actions
39 lines (34 loc) · 1.22 KB
/
sections.inc
File metadata and controls
39 lines (34 loc) · 1.22 KB
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
<?php
class sections {
private $sectionId;
private $pageId;
private $sectionPath;
private $sectionContent;
private $sectionConfig;
private $sectionStyle;
private $howManyWidgetsFound;
private $widgetsData;
private $singleWidgetData;
private $widget;
private $database;
function __construct($asectionId, $apageId, $asectionPath, $asectionContent,
$asectionConfig, $asectionStyle) {
$this->sectionId = $asectionId;
$this->pageId = $apageId;
$this->sectionPath = $asectionPath;
$this->sectionContent = $asectionContent;
$this->sectionConfig = $asectionConfig;
$this->sectionStyle = $asectionStyle;
$this->database = new database();
include($_SERVER['DOCUMENT_ROOT']."/CMS2".$this->sectionPath); //renderWidgets()
}
function renderWidgets($awidgetsData) {
$howManyWidgetsFound = $awidgetsData->num_rows;
for($i=0; $i<$howManyWidgetsFound; $i++) {
$singleWidgetData = $awidgetsData->fetch_assoc();
$this->widget[i] = new widgets($singleWidgetData['WidgetID'], $singleWidgetData['PageID'], $singleWidgetData['SectionID'],
$singleWidgetData['Path'], $singleWidgetData['Content'], $singleWidgetData['Config'], $singleWidgetData['Style']);
}
}
}
?>