Project

General

Profile

« Previous | Next » 

Revision 85

Added by ryan about 19 years ago

Moved Wrapper module

View differences:

trunk/wb/modules/wrapper/save.php
1
<?php
2

  
3
// $Id$
4

  
5
/*
6

  
7
 Website Baker Project <http://www.websitebaker.org/>
8
 Copyright (C) 2004-2005, Ryan Djurovich
9

  
10
 Website Baker is free software; you can redistribute it and/or modify
11
 it under the terms of the GNU General Public License as published by
12
 the Free Software Foundation; either version 2 of the License, or
13
 (at your option) any later version.
14

  
15
 Website Baker is distributed in the hope that it will be useful,
16
 but WITHOUT ANY WARRANTY; without even the implied warranty of
17
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
 GNU General Public License for more details.
19

  
20
 You should have received a copy of the GNU General Public License
21
 along with Website Baker; if not, write to the Free Software
22
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
23

  
24
*/
25

  
26
require('../../config.php');
27

  
28
// Include WB admin wrapper script
29
$update_when_modified = true; // Tells script to update when this page was last updated
30
require(WB_PATH.'/modules/admin.php');
31

  
32
// Update the mod_wrapper table with the contents
33
if(isset($_POST['url'])) {
34
	$url = $admin->add_slashes($_POST['url']);
35
	$height = $_POST['height'];
36
	if(!is_numeric($height)) {
37
		$height = 400;
38
	}
39
	$database = new database();
40
	$query = "UPDATE ".TABLE_PREFIX."mod_wrapper SET url = '$url', height = '$height' WHERE section_id = '$section_id'";
41
	$database->query($query);	
42
}
43

  
44
// Check if there is a database error, otherwise say successful
45
if($database->is_error()) {
46
	$admin->print_error($database->get_error(), $js_back);
47
} else {
48
	$admin->print_success($MESSAGE['PAGES']['SAVED'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
49
}
50

  
51
// Print admin footer
52
$admin->print_footer();
53

  
54
?>
55 0

  
trunk/wb/modules/wrapper/install.php
1
<?php
2

  
3
// $Id: install.php,v 1.1.1.1 2005/01/30 10:32:23 rdjurovich Exp $
4

  
5
/*
6

  
7
 Website Baker Project <http://www.websitebaker.org/>
8
 Copyright (C) 2004-2005, Ryan Djurovich
9

  
10
 Website Baker is free software; you can redistribute it and/or modify
11
 it under the terms of the GNU General Public License as published by
12
 the Free Software Foundation; either version 2 of the License, or
13
 (at your option) any later version.
14

  
15
 Website Baker is distributed in the hope that it will be useful,
16
 but WITHOUT ANY WARRANTY; without even the implied warranty of
17
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
 GNU General Public License for more details.
19

  
20
 You should have received a copy of the GNU General Public License
21
 along with Website Baker; if not, write to the Free Software
22
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
23

  
24
*/
25

  
26
if(defined('WB_URL')) {
27
	
28
	// Create table
29
	$database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_wrapper`");
30
	$mod_wrapper = 'CREATE TABLE `'.TABLE_PREFIX.'mod_wrapper` ('
31
						  . ' `section_id` INT NOT NULL,'
32
						  . ' `page_id` INT NOT NULL,'
33
	                 . ' `url` TEXT NOT NULL ,'
34
						  . ' `height` INT NOT NULL,'
35
	                 . ' PRIMARY KEY ( `section_id` ) )'
36
	                 . ' ';
37
	$database->query($mod_wrapper);
38
	
39
}
40

  
41
?>
42 0

  
trunk/wb/modules/wrapper/modify.php
1
<?php
2

  
3
// $Id$
4

  
5
/*
6

  
7
 Website Baker Project <http://www.websitebaker.org/>
8
 Copyright (C) 2004-2005, Ryan Djurovich
9

  
10
 Website Baker is free software; you can redistribute it and/or modify
11
 it under the terms of the GNU General Public License as published by
12
 the Free Software Foundation; either version 2 of the License, or
13
 (at your option) any later version.
14

  
15
 Website Baker is distributed in the hope that it will be useful,
16
 but WITHOUT ANY WARRANTY; without even the implied warranty of
17
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
 GNU General Public License for more details.
19

  
20
 You should have received a copy of the GNU General Public License
21
 along with Website Baker; if not, write to the Free Software
22
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
23

  
24
*/
25

  
26
// Setup template object
27
$template = new Template(WB_PATH.'/modules/wrapper');
28
$template->set_file('page', 'modify.html');
29
$template->set_block('page', 'main_block', 'main');
30

  
31
// Get page content
32
$query = "SELECT url,height FROM ".TABLE_PREFIX."mod_wrapper WHERE section_id = '$section_id'";
33
$get_settings = $database->query($query);
34
$settings = $get_settings->fetchRow();
35
$url = $admin->strip_slashes_dummy($settings['url']);
36
$height = $settings['height'];
37

  
38
// Insert vars
39
$template->set_var(array(
40
								'PAGE_ID' => $page_id,
41
								'SECTION_ID' => $section_id,
42
								'WB_URL' => WB_URL,
43
								'URL' => $url,
44
								'HEIGHT' => $height,
45
								'TEXT_URL' => $TEXT['URL'],
46
								'TEXT_HEIGHT' => $TEXT['HEIGHT'],
47
								'TEXT_SAVE' => $TEXT['SAVE'],
48
								'TEXT_CANCEL' => $TEXT['CANCEL']
49
								)
50
						);
51

  
52
// Parse template object
53
$template->parse('main', 'main_block', false);
54
$template->pparse('output', 'page');
55

  
56
?>
57 0

  
trunk/wb/modules/wrapper/modify.html
1
<!-- BEGIN main_block -->
2

  
3
<form action="{WB_URL}/modules/wrapper/save.php" method="post">
4

  
5
<input type="hidden" name="page_id" value="{PAGE_ID}" />
6
<input type="hidden" name="section_id" value="{SECTION_ID}" />
7

  
8
<table cellpadding="0" cellspacing="0" border="0" width="100%">
9
<tr>
10
	<td align="left" width="50">
11
		{TEXT_URL}:
12
	</td>
13
	<td>
14
		<input type="text" name="url" value="{URL}" style="width: 100%;" />
15
	</td>
16
</tr>
17
<tr>
18
	<td align="left" width="50">
19
		{TEXT_HEIGHT}:
20
	</td>
21
	<td>
22
		<input type="text" name="height" value="{HEIGHT}" maxlength="4" style="width: 100%;" />
23
	</td>
24
</tr>
25
</table>
26

  
27
<table cellpadding="0" cellspacing="0" border="0" width="100%">
28
<tr>
29
	<td align="left">
30
		<input type="submit" value="{TEXT_SAVE}" style="width: 200px; margin-top: 5px;" />
31
	</td>
32
	<td align="right">
33
		</form>
34
		<input type="button" value="{TEXT_CANCEL}" onclick="javascript: window.location = 'index.php';" style="width: 100px; margin-top: 5px;" />
35
	</td>
36
</tr>
37
</table>
38

  
39
</form>
40

  
41
<!-- END main_block -->
42 0

  
trunk/wb/modules/wrapper/view.php
1
<?php
2

  
3
// $Id$
4

  
5
/*
6

  
7
 Website Baker Project <http://www.websitebaker.org/>
8
 Copyright (C) 2004-2005, Ryan Djurovich
9

  
10
 Website Baker is free software; you can redistribute it and/or modify
11
 it under the terms of the GNU General Public License as published by
12
 the Free Software Foundation; either version 2 of the License, or
13
 (at your option) any later version.
14

  
15
 Website Baker is distributed in the hope that it will be useful,
16
 but WITHOUT ANY WARRANTY; without even the implied warranty of
17
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
 GNU General Public License for more details.
19

  
20
 You should have received a copy of the GNU General Public License
21
 along with Website Baker; if not, write to the Free Software
22
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
23

  
24
*/
25

  
26
// Get url
27
$get_settings = $database->query("SELECT url,height FROM ".TABLE_PREFIX."mod_wrapper WHERE section_id = '$section_id'");
28
$fetch_settings = $get_settings->fetchRow();
29
$url = $this->strip_slashes_dummy($fetch_settings['url']);
30

  
31
?>
32
<iframe src="<?php echo $url; ?>" width="100%" height="<?php echo $fetch_settings['height']; ?>px" frameborder="0" scrolling="auto">
33
Your browser does not support inline frames.<br />
34
Click on the link below to visit the website that was meant to be shown here...<br />
35
<a href="<?php echo $url; ?>" target="_blank"><?php echo $url; ?></a>
36
</iframe>
37 0

  
trunk/wb/modules/wrapper/add.php
1
<?php
2

  
3
// $Id: add.php,v 1.1.1.1 2005/01/30 10:32:23 rdjurovich Exp $
4

  
5
/*
6

  
7
 Website Baker Project <http://www.websitebaker.org/>
8
 Copyright (C) 2004-2005, Ryan Djurovich
9

  
10
 Website Baker is free software; you can redistribute it and/or modify
11
 it under the terms of the GNU General Public License as published by
12
 the Free Software Foundation; either version 2 of the License, or
13
 (at your option) any later version.
14

  
15
 Website Baker is distributed in the hope that it will be useful,
16
 but WITHOUT ANY WARRANTY; without even the implied warranty of
17
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
 GNU General Public License for more details.
19

  
20
 You should have received a copy of the GNU General Public License
21
 along with Website Baker; if not, write to the Free Software
22
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
23

  
24
*/
25

  
26
// Insert an extra row into the database
27
$database->query("INSERT INTO ".TABLE_PREFIX."mod_wrapper (page_id,section_id,height) VALUES ('$page_id','$section_id','400')");
28

  
29
?>
30 0

  
trunk/wb/modules/wrapper/index.php
1
<?php
2

  
3
// $Id: index.php,v 1.1.1.1 2005/01/30 10:32:23 rdjurovich Exp $
4

  
5
/*
6

  
7
 Website Baker Project <http://www.websitebaker.org/>
8
 Copyright (C) 2004-2005, Ryan Djurovich
9

  
10
 Website Baker is free software; you can redistribute it and/or modify
11
 it under the terms of the GNU General Public License as published by
12
 the Free Software Foundation; either version 2 of the License, or
13
 (at your option) any later version.
14

  
15
 Website Baker is distributed in the hope that it will be useful,
16
 but WITHOUT ANY WARRANTY; without even the implied warranty of
17
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
 GNU General Public License for more details.
19

  
20
 You should have received a copy of the GNU General Public License
21
 along with Website Baker; if not, write to the Free Software
22
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
23

  
24
*/
25

  
26
header('Location: ../index.php');
27

  
28
?>
29 0

  
trunk/wb/modules/wrapper/delete.php
1
<?php
2

  
3
// $Id: delete.php,v 1.1.1.1 2005/01/30 10:32:23 rdjurovich Exp $
4

  
5
/*
6

  
7
 Website Baker Project <http://www.websitebaker.org/>
8
 Copyright (C) 2004-2005, Ryan Djurovich
9

  
10
 Website Baker is free software; you can redistribute it and/or modify
11
 it under the terms of the GNU General Public License as published by
12
 the Free Software Foundation; either version 2 of the License, or
13
 (at your option) any later version.
14

  
15
 Website Baker is distributed in the hope that it will be useful,
16
 but WITHOUT ANY WARRANTY; without even the implied warranty of
17
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
 GNU General Public License for more details.
19

  
20
 You should have received a copy of the GNU General Public License
21
 along with Website Baker; if not, write to the Free Software
22
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
23

  
24
*/
25

  
26
// Delete page from mod_wrapper
27
$database->query("DELETE FROM ".TABLE_PREFIX."mod_wrapper WHERE section_id = '$section_id'");
28

  
29
?>
30 0

  
trunk/wb/modules/wrapper/info.php
1
<?php
2

  
3
// $Id: info.php,v 1.3 2005/04/08 09:58:31 rdjurovich Exp $
4

  
5
/*
6

  
7
 Website Baker Project <http://www.websitebaker.org/>
8
 Copyright (C) 2004-2005, Ryan Djurovich
9

  
10
 Website Baker is free software; you can redistribute it and/or modify
11
 it under the terms of the GNU General Public License as published by
12
 the Free Software Foundation; either version 2 of the License, or
13
 (at your option) any later version.
14

  
15
 Website Baker is distributed in the hope that it will be useful,
16
 but WITHOUT ANY WARRANTY; without even the implied warranty of
17
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
 GNU General Public License for more details.
19

  
20
 You should have received a copy of the GNU General Public License
21
 along with Website Baker; if not, write to the Free Software
22
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
23

  
24
*/
25

  
26
$module_directory = 'wrapper';
27
$module_name = 'Wrapper';
28
$module_type = 'page';
29
$module_version = '2.5';
30
$module_designed_for = '2.x';
31
$module_author = 'Ryan Djurovich';
32
$module_description = 'This module allows you to wrap your site around another using an inline frame';
33

  
34
?>
35 0

  
addons/modules/wrapper/view.php
1
<?php
2

  
3
// $Id$
4

  
5
/*
6

  
7
 Website Baker Project <http://www.websitebaker.org/>
8
 Copyright (C) 2004-2005, Ryan Djurovich
9

  
10
 Website Baker is free software; you can redistribute it and/or modify
11
 it under the terms of the GNU General Public License as published by
12
 the Free Software Foundation; either version 2 of the License, or
13
 (at your option) any later version.
14

  
15
 Website Baker is distributed in the hope that it will be useful,
16
 but WITHOUT ANY WARRANTY; without even the implied warranty of
17
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
 GNU General Public License for more details.
19

  
20
 You should have received a copy of the GNU General Public License
21
 along with Website Baker; if not, write to the Free Software
22
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
23

  
24
*/
25

  
26
// Get url
27
$get_settings = $database->query("SELECT url,height FROM ".TABLE_PREFIX."mod_wrapper WHERE section_id = '$section_id'");
28
$fetch_settings = $get_settings->fetchRow();
29
$url = $this->strip_slashes_dummy($fetch_settings['url']);
30

  
31
?>
32
<iframe src="<?php echo $url; ?>" width="100%" height="<?php echo $fetch_settings['height']; ?>px" frameborder="0" scrolling="auto">
33
Your browser does not support inline frames.<br />
34
Click on the link below to visit the website that was meant to be shown here...<br />
35
<a href="<?php echo $url; ?>" target="_blank"><?php echo $url; ?></a>
36
</iframe>
0 37

  
addons/modules/wrapper/modify.php
1
<?php
2

  
3
// $Id$
4

  
5
/*
6

  
7
 Website Baker Project <http://www.websitebaker.org/>
8
 Copyright (C) 2004-2005, Ryan Djurovich
9

  
10
 Website Baker is free software; you can redistribute it and/or modify
11
 it under the terms of the GNU General Public License as published by
12
 the Free Software Foundation; either version 2 of the License, or
13
 (at your option) any later version.
14

  
15
 Website Baker is distributed in the hope that it will be useful,
16
 but WITHOUT ANY WARRANTY; without even the implied warranty of
17
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
 GNU General Public License for more details.
19

  
20
 You should have received a copy of the GNU General Public License
21
 along with Website Baker; if not, write to the Free Software
22
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
23

  
24
*/
25

  
26
// Setup template object
27
$template = new Template(WB_PATH.'/modules/wrapper');
28
$template->set_file('page', 'modify.html');
29
$template->set_block('page', 'main_block', 'main');
30

  
31
// Get page content
32
$query = "SELECT url,height FROM ".TABLE_PREFIX."mod_wrapper WHERE section_id = '$section_id'";
33
$get_settings = $database->query($query);
34
$settings = $get_settings->fetchRow();
35
$url = $admin->strip_slashes_dummy($settings['url']);
36
$height = $settings['height'];
37

  
38
// Insert vars
39
$template->set_var(array(
40
								'PAGE_ID' => $page_id,
41
								'SECTION_ID' => $section_id,
42
								'WB_URL' => WB_URL,
43
								'URL' => $url,
44
								'HEIGHT' => $height,
45
								'TEXT_URL' => $TEXT['URL'],
46
								'TEXT_HEIGHT' => $TEXT['HEIGHT'],
47
								'TEXT_SAVE' => $TEXT['SAVE'],
48
								'TEXT_CANCEL' => $TEXT['CANCEL']
49
								)
50
						);
51

  
52
// Parse template object
53
$template->parse('main', 'main_block', false);
54
$template->pparse('output', 'page');
55

  
56
?>
0 57

  
addons/modules/wrapper/save.php
1
<?php
2

  
3
// $Id$
4

  
5
/*
6

  
7
 Website Baker Project <http://www.websitebaker.org/>
8
 Copyright (C) 2004-2005, Ryan Djurovich
9

  
10
 Website Baker is free software; you can redistribute it and/or modify
11
 it under the terms of the GNU General Public License as published by
12
 the Free Software Foundation; either version 2 of the License, or
13
 (at your option) any later version.
14

  
15
 Website Baker is distributed in the hope that it will be useful,
16
 but WITHOUT ANY WARRANTY; without even the implied warranty of
17
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
 GNU General Public License for more details.
19

  
20
 You should have received a copy of the GNU General Public License
21
 along with Website Baker; if not, write to the Free Software
22
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
23

  
24
*/
25

  
26
require('../../config.php');
27

  
28
// Include WB admin wrapper script
29
$update_when_modified = true; // Tells script to update when this page was last updated
30
require(WB_PATH.'/modules/admin.php');
31

  
32
// Update the mod_wrapper table with the contents
33
if(isset($_POST['url'])) {
34
	$url = $admin->add_slashes($_POST['url']);
35
	$height = $_POST['height'];
36
	if(!is_numeric($height)) {
37
		$height = 400;
38
	}
39
	$database = new database();
40
	$query = "UPDATE ".TABLE_PREFIX."mod_wrapper SET url = '$url', height = '$height' WHERE section_id = '$section_id'";
41
	$database->query($query);	
42
}
43

  
44
// Check if there is a database error, otherwise say successful
45
if($database->is_error()) {
46
	$admin->print_error($database->get_error(), $js_back);
47
} else {
48
	$admin->print_success($MESSAGE['PAGES']['SAVED'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
49
}
50

  
51
// Print admin footer
52
$admin->print_footer();
53

  
54
?>
0 55

  
addons/modules/wrapper/info.php
1
<?php
2

  
3
// $Id: info.php,v 1.3 2005/04/08 09:58:31 rdjurovich Exp $
4

  
5
/*
6

  
7
 Website Baker Project <http://www.websitebaker.org/>
8
 Copyright (C) 2004-2005, Ryan Djurovich
9

  
10
 Website Baker is free software; you can redistribute it and/or modify
11
 it under the terms of the GNU General Public License as published by
12
 the Free Software Foundation; either version 2 of the License, or
13
 (at your option) any later version.
14

  
15
 Website Baker is distributed in the hope that it will be useful,
16
 but WITHOUT ANY WARRANTY; without even the implied warranty of
17
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
 GNU General Public License for more details.
19

  
20
 You should have received a copy of the GNU General Public License
21
 along with Website Baker; if not, write to the Free Software
22
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
23

  
24
*/
25

  
26
$module_directory = 'wrapper';
27
$module_name = 'Wrapper';
28
$module_type = 'page';
29
$module_version = '2.5';
30
$module_designed_for = '2.x';
31
$module_author = 'Ryan Djurovich';
32
$module_description = 'This module allows you to wrap your site around another using an inline frame';
33

  
34
?>
0 35

  
addons/modules/wrapper/delete.php
1
<?php
2

  
3
// $Id: delete.php,v 1.1.1.1 2005/01/30 10:32:23 rdjurovich Exp $
4

  
5
/*
6

  
7
 Website Baker Project <http://www.websitebaker.org/>
8
 Copyright (C) 2004-2005, Ryan Djurovich
9

  
10
 Website Baker is free software; you can redistribute it and/or modify
11
 it under the terms of the GNU General Public License as published by
12
 the Free Software Foundation; either version 2 of the License, or
13
 (at your option) any later version.
14

  
15
 Website Baker is distributed in the hope that it will be useful,
16
 but WITHOUT ANY WARRANTY; without even the implied warranty of
17
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
 GNU General Public License for more details.
19

  
20
 You should have received a copy of the GNU General Public License
21
 along with Website Baker; if not, write to the Free Software
22
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
23

  
24
*/
25

  
26
// Delete page from mod_wrapper
27
$database->query("DELETE FROM ".TABLE_PREFIX."mod_wrapper WHERE section_id = '$section_id'");
28

  
29
?>
0 30

  
addons/modules/wrapper/modify.html
1
<!-- BEGIN main_block -->
2

  
3
<form action="{WB_URL}/modules/wrapper/save.php" method="post">
4

  
5
<input type="hidden" name="page_id" value="{PAGE_ID}" />
6
<input type="hidden" name="section_id" value="{SECTION_ID}" />
7

  
8
<table cellpadding="0" cellspacing="0" border="0" width="100%">
9
<tr>
10
	<td align="left" width="50">
11
		{TEXT_URL}:
12
	</td>
13
	<td>
14
		<input type="text" name="url" value="{URL}" style="width: 100%;" />
15
	</td>
16
</tr>
17
<tr>
18
	<td align="left" width="50">
19
		{TEXT_HEIGHT}:
20
	</td>
21
	<td>
22
		<input type="text" name="height" value="{HEIGHT}" maxlength="4" style="width: 100%;" />
23
	</td>
24
</tr>
25
</table>
26

  
27
<table cellpadding="0" cellspacing="0" border="0" width="100%">
28
<tr>
29
	<td align="left">
30
		<input type="submit" value="{TEXT_SAVE}" style="width: 200px; margin-top: 5px;" />
31
	</td>
32
	<td align="right">
33
		</form>
34
		<input type="button" value="{TEXT_CANCEL}" onclick="javascript: window.location = 'index.php';" style="width: 100px; margin-top: 5px;" />
35
	</td>
36
</tr>
37
</table>
38

  
39
</form>
40

  
41
<!-- END main_block -->
0 42

  
addons/modules/wrapper/install.php
1
<?php
2

  
3
// $Id: install.php,v 1.1.1.1 2005/01/30 10:32:23 rdjurovich Exp $
4

  
5
/*
6

  
7
 Website Baker Project <http://www.websitebaker.org/>
8
 Copyright (C) 2004-2005, Ryan Djurovich
9

  
10
 Website Baker is free software; you can redistribute it and/or modify
11
 it under the terms of the GNU General Public License as published by
12
 the Free Software Foundation; either version 2 of the License, or
13
 (at your option) any later version.
14

  
15
 Website Baker is distributed in the hope that it will be useful,
16
 but WITHOUT ANY WARRANTY; without even the implied warranty of
17
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
 GNU General Public License for more details.
19

  
20
 You should have received a copy of the GNU General Public License
21
 along with Website Baker; if not, write to the Free Software
22
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
23

  
24
*/
25

  
26
if(defined('WB_URL')) {
27
	
28
	// Create table
29
	$database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_wrapper`");
30
	$mod_wrapper = 'CREATE TABLE `'.TABLE_PREFIX.'mod_wrapper` ('
31
						  . ' `section_id` INT NOT NULL,'
32
						  . ' `page_id` INT NOT NULL,'
33
	                 . ' `url` TEXT NOT NULL ,'
34
						  . ' `height` INT NOT NULL,'
35
	                 . ' PRIMARY KEY ( `section_id` ) )'
36
	                 . ' ';
37
	$database->query($mod_wrapper);
38
	
39
}
40

  
41
?>
0 42

  
addons/modules/wrapper/index.php
1
<?php
2

  
3
// $Id: index.php,v 1.1.1.1 2005/01/30 10:32:23 rdjurovich Exp $
4

  
5
/*
6

  
7
 Website Baker Project <http://www.websitebaker.org/>
8
 Copyright (C) 2004-2005, Ryan Djurovich
9

  
10
 Website Baker is free software; you can redistribute it and/or modify
11
 it under the terms of the GNU General Public License as published by
12
 the Free Software Foundation; either version 2 of the License, or
13
 (at your option) any later version.
14

  
15
 Website Baker is distributed in the hope that it will be useful,
16
 but WITHOUT ANY WARRANTY; without even the implied warranty of
17
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
 GNU General Public License for more details.
19

  
20
 You should have received a copy of the GNU General Public License
21
 along with Website Baker; if not, write to the Free Software
22
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
23

  
24
*/
25

  
26
header('Location: ../index.php');
27

  
28
?>
0 29

  
addons/modules/wrapper/add.php
1
<?php
2

  
3
// $Id: add.php,v 1.1.1.1 2005/01/30 10:32:23 rdjurovich Exp $
4

  
5
/*
6

  
7
 Website Baker Project <http://www.websitebaker.org/>
8
 Copyright (C) 2004-2005, Ryan Djurovich
9

  
10
 Website Baker is free software; you can redistribute it and/or modify
11
 it under the terms of the GNU General Public License as published by
12
 the Free Software Foundation; either version 2 of the License, or
13
 (at your option) any later version.
14

  
15
 Website Baker is distributed in the hope that it will be useful,
16
 but WITHOUT ANY WARRANTY; without even the implied warranty of
17
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
 GNU General Public License for more details.
19

  
20
 You should have received a copy of the GNU General Public License
21
 along with Website Baker; if not, write to the Free Software
22
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
23

  
24
*/
25

  
26
// Insert an extra row into the database
27
$database->query("INSERT INTO ".TABLE_PREFIX."mod_wrapper (page_id,section_id,height) VALUES ('$page_id','$section_id','400')");
28

  
29
?>
0 30

  

Also available in: Unified diff