Revision 1576
Added by darkviper almost 13 years ago
view.php | ||
---|---|---|
4 | 4 |
* @category modules |
5 | 5 |
* @package wysiwyg |
6 | 6 |
* @author WebsiteBaker Project |
7 |
* @copyright 2009-2011, Website Baker Org. e.V.
|
|
7 |
* @copyright 2009-2012, Website Baker Org. e.V.
|
|
8 | 8 |
* @link http://www.websitebaker2.org/ |
9 | 9 |
* @license http://www.gnu.org/licenses/gpl.html |
10 | 10 |
* @platform WebsiteBaker 2.8.x |
... | ... | |
14 | 14 |
* @lastmodified $Date$ |
15 | 15 |
* |
16 | 16 |
*/ |
17 |
// Must include code to stop this file being access directly |
|
18 | 17 |
/* -------------------------------------------------------- */ |
19 |
if(defined('WB_PATH') == false)
|
|
20 |
{ |
|
21 |
// Stop this file being access directly
|
|
22 |
die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
|
|
18 |
// Must include code to stop this file being accessed directly
|
|
19 |
if(!defined('WB_PATH')) {
|
|
20 |
require_once(dirname(dirname(__FILE__)).'/framework/globalExceptionHandler.php');
|
|
21 |
throw new IllegalFileException();
|
|
23 | 22 |
} |
24 | 23 |
/* -------------------------------------------------------- */ |
24 |
$MEDIA_URL = WB_URL.MEDIA_DIRECTORY; |
|
25 | 25 |
// Get content |
26 |
$get_content = $database->query("SELECT content FROM ".TABLE_PREFIX."mod_wysiwyg WHERE section_id = '$section_id'"); |
|
27 |
$fetch_content = $get_content->fetchRow(); |
|
28 |
$content = ($fetch_content['content']); |
|
29 |
|
|
26 |
$content = ''; |
|
27 |
$sql = 'SELECT `content` FROM `'.TABLE_PREFIX.'mod_wysiwyg` WHERE `section_id`='.(int)$section_id; |
|
28 |
if( ($content = $database->get_one($sql)) ) { |
|
29 |
$content = str_replace('{SYSVAR:MEDIA_REL}',$MEDIA_REL, $content ); |
|
30 |
} |
|
30 | 31 |
echo $content; |
Also available in: Unified diff
wysiwyg module changed to domain independend image links