\n'."\n"; echo '\n".'\n\n"; $row_count++; } mysql_free_result($result); } // end listing ?>
"; echo ''.html_specialchars($row["pagelayout_name"]).""; echo ($row["pagelayout_default"]) ? " (".$BL['be_admin_tmpl_default'].")" : ""; echo "'; echo ''; echo ''; echo ''; echo ''; echo "
$value) { $value = substr($value, 0, 20); $pagelayout["layout_customblocks"][$key] = $value; if($value == 'CONTENT' || $value == 'LEFT' || $value == 'RIGHT' || $value == 'HEADER' || $value == 'FOOTER') { unset($pagelayout["layout_customblocks"][$key]); } } } $pagelayout["layout_customblocks"] = implode(', ', $pagelayout["layout_customblocks"]); } else { $pagelayout["layout_customblocks"] = ''; } if($pagelayout["id"]) { // if ID <> 0 then update pagelayout $sql = "UPDATE ".DB_PREPEND."phpwcms_pagelayout SET ". "pagelayout_name='".aporeplace($pagelayout["layout_name"])."', ". "pagelayout_default=".$pagelayout["layout_default"].", ". "pagelayout_var='".aporeplace(serialize($pagelayout))."' ". "WHERE pagelayout_id=".$pagelayout["id"]; } else { // if ID = 0 then create new pagelayout $sql = "INSERT INTO ".DB_PREPEND."phpwcms_pagelayout (". "pagelayout_name, pagelayout_default, pagelayout_var) VALUES ('". aporeplace($pagelayout["layout_name"])."', ".$pagelayout["layout_default"].", '". aporeplace(serialize($pagelayout))."')"; } // update or insert data entry mysql_query($sql, $db) or die("error while updating or inserting pagelayout:
".wordwrap($sql).""); if(!$pagelayout["id"]) $pagelayout["id"] = mysql_insert_id($db); //now proof for default pagelayout and set if($pagelayout["layout_default"]) { mysql_query("UPDATE ".DB_PREPEND."phpwcms_pagelayout SET pagelayout_default=0 ". "WHERE pagelayout_id != ".$pagelayout["id"], $db); } update_cache(); headerRedirect(PHPWCMS_URL."phpwcms.php?do=admin&p=8&s=".$pagelayout["id"]); } if($pagelayout["id"]) { // read the given pagelayout from db $sql = "SELECT * FROM ".DB_PREPEND."phpwcms_pagelayout WHERE pagelayout_id=".$pagelayout["id"]." LIMIT 1"; if($result = mysql_query($sql, $db)) { if($row = mysql_fetch_array($result, MYSQL_ASSOC)) { unset($pagelayout); $pagelayout = unserialize($row["pagelayout_var"]); $pagelayout["id"] = $row["pagelayout_id"]; $pagelayout["layout_default"] = $row["pagelayout_default"]; } mysql_free_result($result); } } else { // set default pagelayout information $pagelayout = array(); $pagelayout["layout_align"] = 0; $pagelayout["layout_type"] = 0; $pagelayout["layout_border_top"] = ''; $pagelayout["layout_border_bottom"] = ''; $pagelayout["layout_border_left"] = ''; $pagelayout["layout_border_right"] = ''; $pagelayout["layout_title"] = "Pagetitle"; $pagelayout["layout_title_cat"] = 1; $pagelayout["layout_title_article"] = 1; $pagelayout["layout_bgcolor"] = ""; $pagelayout["layout_bgimage"] = ""; $pagelayout["layout_jsonload"] = ""; $pagelayout["layout_textcolor"] = ""; $pagelayout["layout_linkcolor"] = ""; $pagelayout["layout_vcolor"] = ""; $pagelayout["layout_acolor"] = ""; $pagelayout["layout_all_width"] = ""; $pagelayout["layout_all_bgcolor"] = ""; $pagelayout["layout_all_bgimage"] = ""; $pagelayout["layout_all_class"] = ""; $pagelayout["layout_content_width"] = ""; $pagelayout["layout_content_bgcolor"] = ""; $pagelayout["layout_content_bgimage"] = ""; $pagelayout["layout_content_class"] = ""; $pagelayout["layout_left_width"] = ""; $pagelayout["layout_left_bgcolor"] = ""; $pagelayout["layout_left_bgimage"] = ""; $pagelayout["layout_left_class"] = ""; $pagelayout["layout_right_width"] = ""; $pagelayout["layout_right_bgcolor"] = ""; $pagelayout["layout_right_bgimage"] = ""; $pagelayout["layout_right_class"] = ""; $pagelayout["layout_leftspace_width"] = ""; $pagelayout["layout_leftspace_bgcolor"] = ""; $pagelayout["layout_leftspace_bgimage"] = ""; $pagelayout["layout_leftspace_class"] = ""; $pagelayout["layout_rightspace_width"] = ""; $pagelayout["layout_rightspace_bgcolor"] = ""; $pagelayout["layout_rightspace_bgimage"] = ""; $pagelayout["layout_rightspace_class"] = ""; $pagelayout["layout_header_height"] = ""; $pagelayout["layout_header_bgcolor"] = ""; $pagelayout["layout_header_bgimage"] = ""; $pagelayout["layout_header_class"] = ""; $pagelayout["layout_topspace_height"] = ""; $pagelayout["layout_topspace_bgcolor"] = ""; $pagelayout["layout_topspace_bgimage"] = ""; $pagelayout["layout_topspace_class"] = ""; $pagelayout["layout_bottomspace_height"] = ""; $pagelayout["layout_bottomspace_bgcolor"] = ""; $pagelayout["layout_bottomspace_bgimage"] = ""; $pagelayout["layout_bottomspace_class"] = ""; $pagelayout["layout_footer_height"] = ""; $pagelayout["layout_footer_bgcolor"] = ""; $pagelayout["layout_footer_bgimage"] = ""; $pagelayout["layout_footer_class"] = ""; $pagelayout["layout_render"] = 0; $pagelayout["layout_title_order"] = 4; $pagelayout["layout_title_spacer"] = ' | '; $pagelayout["layout_noborder"] = 1; } ?>
" method="post" name="pagelayout" target="_self">
" size="20" maxlength="150">    >
> > >
   " size="3" maxlength="3">    " size="3" maxlength="3">    " size="3" maxlength="3">    " size="3" maxlength="3">  px   >
   " size="7" maxlength="7">    " size="20">
   " size="7" maxlength="7">    " size="7" maxlength="7">    " size="7" maxlength="7">    " size="7" maxlength="7">
  onload:  " size="20">
" size="20" maxlength="100">
   " size="20" maxlength="100">
> > > >
 
   " size="20">
  >    >    >
   " size="4" maxlength="4">    " size="7" maxlength="7">    " size="7">    " size="7">
   " size="4" maxlength="4">    " size="7" maxlength="7">    " size="7">    " size="7">
   " size="4" maxlength="4">    " size="7" maxlength="7">    " size="7">    " size="7">
]: 
   " size="4" maxlength="4">    " size="7" maxlength="7">    " size="7">    " size="7">
   " size="4" maxlength="4">    " size="7" maxlength="7">    " size="7">    " size="7">
   " size="4" maxlength="4">    " size="7" maxlength="7">    " size="7">    " size="7">
   " size="4" maxlength="4">    " size="7" maxlength="7">    " size="7">    " size="7">
   " size="4" maxlength="4">    " size="7" maxlength="7">    " size="7">    " size="7">
   " size="4" maxlength="4">    " size="7" maxlength="7">    " size="7">    " size="7">
   " size="4" maxlength="4">    " size="7" maxlength="7">    " size="7">    " size="7">
">