| 103 |
- |
1 |
<?php
|
|
|
2 |
class TestPlugin extends SeoPluginsController{
|
|
|
3 |
|
|
|
4 |
function index() {
|
|
|
5 |
$this->set('sectionHead', TEST_HEAD);
|
|
|
6 |
$userId = isLoggedIn();
|
|
|
7 |
|
|
|
8 |
$this->pluginRender('index');
|
|
|
9 |
}
|
|
|
10 |
|
|
|
11 |
function settings($info) {
|
|
|
12 |
$this->set('sectionHead', TEST_SET_HEAD);
|
|
|
13 |
|
|
|
14 |
$showGraph = empty($info['graph']) ? 0 : 1;
|
|
|
15 |
$this->set('showGraph', $showGraph);
|
|
|
16 |
$this->pluginRender('settings');
|
|
|
17 |
}
|
|
|
18 |
|
|
|
19 |
function show($info) {
|
|
|
20 |
$img = empty($info['tp_type']) ? "inrecords.jpg" : "records.jpg";
|
|
|
21 |
|
|
|
22 |
# example for select values from a database table
|
|
|
23 |
/*$sql = "select * from testplugin";
|
|
|
24 |
$list = $this->db->select($sql);*/
|
|
|
25 |
|
|
|
26 |
# example to insert data to database tabel
|
|
|
27 |
/*$sql = "insert into testplugin(title,description) values('test title','test description')";
|
|
|
28 |
$list = $this->db->query($sql);*/
|
|
|
29 |
|
|
|
30 |
$this->set('img', $img);
|
|
|
31 |
$this->pluginRender('show');
|
|
|
32 |
}
|
|
|
33 |
}
|