1 |
2
|
Manuela
|
<?php
|
2 |
|
|
/**
|
3 |
|
|
*
|
4 |
|
|
* @category modules
|
5 |
|
|
* @package menu_link
|
6 |
|
|
* @author WebsiteBaker Project
|
7 |
|
|
* @copyright Ryan Djurovich
|
8 |
|
|
* @copyright WebsiteBaker Org. e.V.
|
9 |
|
|
* @link http://websitebaker.org/
|
10 |
|
|
* @license http://www.gnu.org/licenses/gpl.html
|
11 |
|
|
* @platform WebsiteBaker 2.8.3
|
12 |
|
|
* @requirements PHP 5.3.6 and higher
|
13 |
|
|
* @version $Id$
|
14 |
|
|
* @filesource $HeadURL$
|
15 |
|
|
* @lastmodified $Date$
|
16 |
|
|
*
|
17 |
|
|
*/
|
18 |
|
|
|
19 |
|
|
/* -------------------------------------------------------- */
|
20 |
|
|
// Must include code to stop this file being accessed directly
|
21 |
|
|
if(defined('WB_PATH') == false) { die('Illegale file access /'.basename(__DIR__).'/'.basename(__FILE__).''); }
|
22 |
|
|
/* -------------------------------------------------------- */
|
23 |
|
|
|
24 |
|
|
// Insert new row into database
|
25 |
|
|
$sql = 'INSERT INTO `'.TABLE_PREFIX.'mod_menu_link` SET '
|
26 |
|
|
. '`page_id` = '.$database->escapeString($page_id).', '
|
27 |
|
|
. '`section_id` = '.$database->escapeString($section_id).', '
|
28 |
|
|
. '`target_page_id` = 0, '
|
29 |
|
|
. '`redirect_type` = \'301\', '
|
30 |
|
|
. '`anchor` = 0, '
|
31 |
|
|
. '`extern` = \'\' ';
|
32 |
|
|
$database->query($sql);
|