WebsiteBaker 2.13.8 is now available!
R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WBhttps://forum.websitebaker.org/index.php/topic,32355.0.html
// Work-out if the page parent (if selected) has a seperate template or language to the default$query_parent = $database->query("SELECT template, language FROM ".TABLE_PREFIX."pages WHERE page_id = '$parent'");if($query_parent->numRows() > 0) { $fetch_parent = $query_parent->fetchRow(); $template = $fetch_parent['template']; $language = $fetch_parent['language'];} else { $template = ''; $language = DEFAULT_LANGUAGE;}// Insert page into pages table$query = "INSERT INTO ".TABLE_PREFIX."pages (page_title,menu_title,parent,template,target,position,visibility,searching,menu,language,admin_groups,viewing_groups,modified_when,modified_by) VALUES ('$title','$title','$parent','$template','_top','$position','$visibility','1','1','$language','$admin_groups','$viewing_groups','".time()."','".$admin->get_user_id()."')";$database->query($query);if($database->is_error()) { $admin->print_error($database->get_error());}
// Work-out if the page parent (if selected) has a seperate template or language to the default$query_parent = $database->query("SELECT template, language, menu FROM ".TABLE_PREFIX."pages WHERE page_id = '$parent'");if($query_parent->numRows() > 0) { $fetch_parent = $query_parent->fetchRow(); $template = $fetch_parent['template']; $language = $fetch_parent['language']; $menu = $fetch_parent['menu']; //GWB} else { $template = ''; $language = DEFAULT_LANGUAGE; $menu = 1; //GWB}// Insert page into pages table$query = "INSERT INTO ".TABLE_PREFIX."pages (page_title,menu_title,parent,template,target,position,visibility,searching,menu,language,admin_groups,viewing_groups,modified_when,modified_by) VALUES ('$title','$title','$parent','$template','_top','$position','$visibility','1','$menu','$language','$admin_groups','$viewing_groups','".time()."','".$admin->get_user_id()."')";$database->query($query);if($database->is_error()) { $admin->print_error($database->get_error());}