| Conditions | 2 |
| Paths | 2 |
| Total Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | public function __construct($title) |
||
| 8 | { |
||
| 9 | parent::__construct($title, true); |
||
| 10 | $root = $_SERVER['DOCUMENT_ROOT']; |
||
| 11 | $script_dir = dirname(__FILE__); |
||
| 12 | if(strstr($script_dir, $root) === false) |
||
| 13 | { |
||
| 14 | $this->profiles_root = dirname($_SERVER['SCRIPT_NAME']); |
||
| 15 | } |
||
| 16 | else |
||
| 17 | { |
||
| 18 | $this->profiles_root = substr($script_dir, strlen($root)); |
||
| 19 | } |
||
| 20 | $this->content['root'] = $this->profiles_root; |
||
| 21 | $this->addTemplateDir('./templates', 'Profiles'); |
||
| 22 | $this->setTemplateName('@Profiles/profile-main.html'); |
||
| 23 | } |
||
| 24 | |||
| 42 |