-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcwebsitespage.php
More file actions
65 lines (56 loc) · 1.78 KB
/
cwebsitespage.php
File metadata and controls
65 lines (56 loc) · 1.78 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
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
<?php
class cwebsitespage extends cpage {
private $websiteNum;
private $site_title;
private $companyType;
private $link;
private $website;
private $description;
private $descItems;
private $image;
public function getDescription() { return $this->description; }
public function getDescItems() { return $this->descItems; }
public function getWebsite() { return $this->website; }
public function getImage() { return $this->image; }
public function __construct() {
parent::__construct($title);
if (isset($_GET['website'])) {
$this->websiteNum = $_GET['website'];
}
$websitedata = ccontrol::getWebsiteInfo($this->websiteNum);
$this->site_title = $websitedata->site_title;
$this->companyType = $websitedata->companyType;
$this->link = $websitedata->link;
$this->website = $websitedata->website;
$this->description = $websitedata->description;
$this->descItems = $websitedata->descItems;
$this->image = $websitedata->image;
}
public function __destruct() {
// clean up here
}
public function render() {
parent::render();
}
public function getWebsites() {
if (file_exists('features.xml'))
{
$postNum = 0;
$xml = simplexml_load_file('features.xml');
foreach ($xml->item as $item) {
if ($postNum++ == $this->websiteNum) {
$this->title = $item->title;
$this->companyType = $item->companyType;
$this->link = htmlentities($item->link);
$this->image = htmlentities($item->image);
$this->website = htmlentities($item->website);
foreach ($item->descItem as $descItem) {
$this->descItems = $this->descItems . '<li>' . $descItem . '</li>';
}
$this->description = $item->description;
}
}
}
}
}
?>