- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 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
common.php:
....
class Page {
var $title;
var $style;
var $header;
var $content;
var $footer;
function setTitle($v) {
$this->title=$v;
}
function setStyle($v) {
$this->style=$v;
}
function setHeader($v) {
$this->header=$v;
}
function setContent($v) {
$this->content=$v;
}
function setFooter($v) {
$this->footer=$v;
}
function getTitle() {
echo $this->title;
}
function getStyle() {
echo $this->style;
}
function getHeader() {
echo $this->header;
}
function getContent() {
echo $this->content;
}
function getFooter() {
echo $this->footer;
}
...
}
...
site.php:
...
require('../../app/common.php');
....
$p = new Page;
$header ='<div id="title"><h2><a href="http://debtangel.mobi/bankruptcy/" >Divorce</a></h2></div>'.$location.'<p>Call Today <a href="tel:8777328134">1-877-732-8134</a></p>';
$p->setHeader($header);
$style = <<<EOT
body { background-color:white; color: black; font-family:Arial, Helvetica, sans-serif; }
a { text-decoration: none;}
img { border:none; }...
.....
EOT;
$p->setStyle($style);
$footer = <<<EOT
<p>Call <a href="tel:8777328134">1-877-732-8134</a></p><hr />
.....EOT;
$p->setFooter($footer);
.......
index.php:
require_once ('site.php');
$p->getTitle();
$p->getStyle();
$p->getHeader()
и т.д.
denis 09.10.2010 11:36 # 0
daemon_master 09.10.2010 15:31 # +1
Lure Of Chaos 09.10.2010 19:53 # −1