layout editor

free web hosting
Free Web Hosting, No Ads > Have your say > General Talk

layout editor

welbis
Create a file with your content and no layout, rename the $inccontent varliable to point to this page.
In this file ensure that the edit file is included at 'filename'.php?page=secure&a=sitelayout

Create setup.php to connect to db (edit login) and the table called 'section' (below)
Create the edit file: sitelayout.php (below).


If you use this, Please link back to my site at
www.jesus-freaks.co.uk, as this system took me a lot of time to make

Name the following file index.php Navigate to this file.

CODE


<?PHP

/* Check User Session (if you require sessions for your login script - do it here, if not delete these 2 lines */

session_start();  // Start Session



/*---------------------------*/

//include global file, establishes connection to database

include 'setup.php';

$inccontent = "contentfunction.php";

$sectionarea = $_GET['page'];

$title = "YOUR TITLE HERE";

/*--------------------------*/

//includes required for content file



/*--------------------------*/



//aliases required for content file

$a = $_GET['a'];

$b = $_GET['b'];

$c = $_GET['c'];

$id = $_GET['id'];

$cat = $_GET['cat'];

$p = $_GET['p'];

$num = $_GET['num'];

$secure = $_GET['secure'];

$logout = $_GET['logout'];

$register = $_GET['register'];

$lostpw = $_GET['lostpw'];

$limit = $_GET['limit'];

$user = $_GET['user'];

$phpself = $_SERVER['PHP_SELF'];





/*-- Assign Shown sections --*/

?>



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">



<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="content-type"

content="text/html; charset=ISO-8859-1" />



<link rel="icon" href="favicon.ico" />

<link rel="shortcut icon" href="favicon.ico" />



<title>

echo $title.' - '.$sectionarea; ?></title>

<style type="text/css">

/*<![CDATA[*/



<?

$section = 1;

$section = mysql_query("SELECT * FROM section WHERE id='$section'");

while($yes=mysql_fetch_array($section)) {



$top = $yes['top'];



}





$section = 0;

$section = mysql_query("SELECT * FROM section WHERE id='$section'");

while($yes=mysql_fetch_array($section)) {



$bg = $yes['bgcolor'];



}

?>



body {

background-color: #<? echo "$bg"; ?>;

margin:<? echo "$top"; ?>;

padding:0px; /* Need to set body margin and padding to get consistency between browsers. */

  padding-top: 0px;

  padding-bottom: 0px;

text-align:center; /* Hack for IE5/Win */

height:100%;

}



td,body {

  font-family: Arial, Helvetica, sans-serif;

  font-size: 12px;

}



a:link {color: #444488;  font-family: arial, helvetica, sans-serif; font-weight: bold; font-size: 13px; text-decoration: underline; background-color : transparent; }    

a:visited {color: #444477;  font-family: arial, helvetica, sans-serif; font-weight: bold; font-size: 13px; text-decoration: underline; background-color : transparent; }  

a:active {color: #000000;  font-family: arial, helvetica, sans-serif; font-weight: bold; font-size: 13px; text-decoration: none; background-color : transparent; }    

a:hover { font-family:arial, helvetica, sans-serif; font-weight: bold; font-size: 13px;color: #662323; cursor: hand; }            





div#container {



<?

$section = 1;

$section = mysql_query("SELECT * FROM section WHERE id='$section'");

while($yes=mysql_fetch_array($section)) {



$cwidth = $yes['width'];

$height = $yes['height'];

$bg = $yes['bgcolor'];

$left = $yes['left'];

$top = $yes['top'];



$bordercolor = $yes['border_color'];

$borderstyle = $yes['border_style'];

$borderwidth = $yes['border_width'];

}

?>

min-width: 650px;

width: <? echo "$cwidth"; ?>;

height: <? echo "$height"; ?>;

background-color: #<? echo "$bg"; ?>;



margin:0px auto; /* Right and left margin widths set to "auto" */

text-align:left; /* Counteract to IE5/Win Hack */

padding:1px;





 border-color: #<? echo "$bordercolor"; ?>;

 border-style: <? echo "$borderstyle"; ?>;

 border-width: <? echo "$borderwidth"; ?>;





}





 div#header {

<?

$section = 2;

$section = mysql_query("SELECT * FROM section WHERE id='$section'");

while($yes=mysql_fetch_array($section)) {

$display_2 = $yes['display'];

$text_2 = $yes['content'];

$width = $yes['width'];

$height = $yes['height'];

$bg = $yes['bgcolor'];

$left = $yes['left'];

$top = $yes['top'];



$bordercolor = $yes['border_color'];

$borderstyle = $yes['border_style'];

$borderwidth = $yes['border_width'];

$borderbottom = $yes['border_bottom'];

}

?>

position: relative;

min-width: 700px;

width:<? echo "$width"; ?>;

height:<? echo "$height"; ?>;

background-color: #<? echo "$bg"; ?>;

left:<? echo "$left"; ?>;

top: <? echo "$top"; ?>;



 border-color: #<? echo "$bordercolor"; ?>;

 border-style: <? echo "$borderstyle"; ?>;

 border-width: <? echo "$borderwidth"; ?>;

 border-bottom-width: <? echo "$borderbottom"; ?>;



<!--background:url("") no-repeat; -->





}



font.nav-top {

font:  9pt verdana;

color:  #FFFFCC;



}



 div#nav-top {

position: relative;

<?

$section = 3;

$section = mysql_query("SELECT * FROM section WHERE id='$section'");

while($yes=mysql_fetch_array($section)) {



$display_3 = $yes['display'];



$text_3 = $yes['content'];

$content_3 = $yes['show_content'];

$nav_3 = $yes['show_nav'];



$width = $yes['width'];

$height = $yes['height'];

$bg = $yes['bgcolor'];

$left = $yes['left'];

$top = $yes['top'];



$bordercolor = $yes['border_color'];

$borderstyle = $yes['border_style'];

$borderwidth = $yes['border_width'];

$borderbottom = $yes['border_bottom'];

}

?>

min-width: 650px;

width:<? echo "$width"; ?>;

height:<? echo "$height"; ?>;

background-color: #<? echo "$bg"; ?>;

left:<? echo "$left"; ?>;

top: <? echo "$top"; ?>;







 border-color: #<? echo "$bordercolor"; ?>;

 border-style: <? echo "$borderstyle"; ?>;

 border-width: <? echo "$borderwidth"; ?>;

 border-bottom-width: <? echo "$borderbottom"; ?>;

}



div#footer {



<?

$section = 7;

$section = mysql_query("SELECT * FROM section WHERE id='$section'");

while($yes=mysql_fetch_array($section)) {



$display_7 = $yes['display'];

$text_7 = $yes['content'];

$width = $yes['width'];

$height = $yes['height'];

$bg = $yes['bgcolor'];

$left = $yes['left'];

$top = $yes['top'];



$bordercolor = $yes['border_color'];

$borderstyle = $yes['border_style'];

$borderwidth = $yes['border_width'];

$borderbottom = $yes['border_bottom'];

}

?>



 position: relative;

min-width: 650px;

width:<? echo "$width"; ?>;

height:<? echo "$height"; ?>;

background-color: #<? echo "$bg"; ?>;

left:<? echo "$left"; ?>;

top: <? echo "$top"; ?>;



 border-color: #<? echo "$bordercolor"; ?>;

 border-style: <? echo "$borderstyle"; ?>;

 border-width: <? echo "$borderwidth"; ?>;

 border-bottom-width: <? echo "$borderbottom"; ?>;



 line-height: 15pt;

text-align: right;



 }



<?

////set distance from navtop for nav / middle / right.



$section = 4;

$section = mysql_query("SELECT * FROM section WHERE id='$section'");

while($yes=mysql_fetch_array($section)) {



$top = $yes['top'];

}

?>

div#main {

position: relative;

}



.main {

position: relative;

width: 100%;

top: <? echo "$top"; ?>;

left:0px;

right: 0px;

}



font.left {

font:  9pt verdana;

color:  #111133;



}







td.left{



<?

$section = 4;

$section = mysql_query("SELECT * FROM section WHERE id='$section'");

while($yes=mysql_fetch_array($section)) {

$display_4 = $yes['display'];

$text_4 = $yes['content'];

$content_4 = $yes['show_content'];

$nav_4 = $yes['show_nav'];



$width = $yes['width'];

$height = $yes['height'];

$bg = $yes['bgcolor'];

$left = $yes['left'];



$bordercolor = $yes['border_color'];

$borderstyle = $yes['border_style'];

$borderwidth = $yes['border_width'];

}

?>



width:<? echo "$width"; ?>;

height:<? echo "$height"; ?>;

background-color: #<? echo "$bg"; ?>;

vertical-align:top;



background:url("") repeat-y;



 border-color: #<? echo "$bordercolor"; ?>;

 border-style: <? echo "$borderstyle"; ?>;

 border-width: <? echo "$borderwidth"; ?>;

}

.left{

width:100%;

vertical-align:top;



padding-left: <? echo "$left"; ?>;

}



td.right{



<?

$section = 6;

$section = mysql_query("SELECT * FROM section WHERE id='$section'");

while($yes=mysql_fetch_array($section)) {

$display_6 = $yes['display'];

$text_6 = $yes['content'];

$content_6 = $yes['show_content'];

$nav_6 = $yes['show_nav'];



$width = $yes['width'];

$height = $yes['height'];

$bg = $yes['bgcolor'];

$top = $yes['top'];



$bordercolor = $yes['border_color'];

$borderstyle = $yes['border_style'];

$borderwidth = $yes['border_width'];

}

?>



width:<? echo "$width"; ?>;

height:<? echo "$height"; ?>;

background-color: #<? echo "$bg"; ?>;

vertical-align:top;

padding: <? echo "$top"; ?>;



background:url("") repeat-y;



 border-color: #<? echo "$bordercolor"; ?>;

 border-style: <? echo "$borderstyle"; ?>;

 border-width: <? echo "$borderwidth"; ?>;

}

.right{

width:100%;

vertical-align:top;



}



td.middle {



<?

$section = 5;

$section = mysql_query("SELECT * FROM section WHERE id='$section'");

while($yes=mysql_fetch_array($section)) {

$display_5 = $yes['display'];

$text_5 = $yes['content'];

$content_5 = $yes['show_content'];

$nav_5 = $yes['show_nav'];



$width = $yes['width'];

$height = $yes['height'];

$bg = $yes['bgcolor'];

$left = $yes['left'];

$top = $yes['top'];



$bordercolor = $yes['border_color'];

$borderstyle = $yes['border_style'];

$borderwidth = $yes['border_width'];

}

?>



position: relative;

width:<? echo "$width"; ?>;

height:<? echo "$height"; ?>;

background-color: #<? echo "$bg"; ?>;

vertical-align: top;

padding: <? echo "$top"; ?>;





 border-color: #<? echo "$bordercolor"; ?>;

 border-style: <? echo "$borderstyle"; ?>;

 border-width: <? echo "$borderwidth"; ?>;

}

.middle{

width:100%;

vertical-align:top;





}







/*]]>*/

</style>

</head>

<body>



 

<div id="container">





 

<?

IF ($display_2 == 1) {

   

print '     <div id="header">'."n";

?>

    <!--Title-->

 <center>

<?

print $text_2;

?>

 </center>

    <!--Title-->

<?

print '     </div>'."n";

}



IF ($display_3 == 1) {

print '    <div id="nav-top">'."n";

print $text_3;

IF ($nav_3 == 1) {

print "        <!--Navigation-->n";

}

?>



        <font class="nav-top">





  </font>



<?

print '    </div>'."n";

}

?>

     

<!--Members Links-->



<div id="main">





<table class="main">

  <!--DWLayoutTable-->

   <tr>

 



<?

IF ($display_4 == 1) {



 

print'         <td class="left">'."n";

print'           <table class="left">'."n";

print '      <tr><td>'."n";

print $text_4;



IF ($nav_4 == 1) {

print "        <!--Navigation-->n";

}

?>

<!----->

<?

if ($content_4 == 1) {

/*---------------------------*/

//include content

include $inccontent;

/*--------------------------*/

}

?>





<?

print '      </td></tr>'."n";

print '       </table>'."n";

print '     </td>'."n";

}



   

IF ($display_5 == 1) {



 

print'         <td class="middle">'."n";

print'           <table class="middle">'."n";

print '      <tr><td>'."n";

print $text_5;

?>  

<!--middle-->



<?



if ($content_5 == 1) {

/*---------------------------*/

//include content

include $inccontent;

/*--------------------------*/

}

?>



<!--middle-->    



<?

print '      </td></tr>'."n";

print '          </table>'."n";

print '     </td>'."n";

}





if ($display_6 == 1) {



print '        <td class="right">'."n";

print'         <table class="right">'."n";

print '      <tr><td>'."n";



print $text_6;



IF ($nav_6 == 1) {

print "        <!--Navigation-->n";

}

?>

<!---->

<?

if ($content_6 == 1) {

/*---------------------------*/

//include content

include $inccontent;

/*--------------------------*/

}

print '      </td></tr>'."n";

print '      </table>'."n";

print '          </td>     '."n";

}



?>

</tr>

 

</table>

</div>

<?

if ($display_7 == 1) {

print '   <div id="footer"> '."n";



?>

   <font class="yellow">

<?print $text_7;?>

   </font>

<?

print '   </div>'."n";

}

?>

   </div>





</body>

</html>



Create the following table in phpmyadmin:
CODE


CREATE TABLE `section` (

 `id` tinyint(2) NOT NULL default '0',

 `section` varchar(10) NOT NULL default '',

 `display` enum('0','1') NOT NULL default '1',

 `show_content` enum('0','1') NOT NULL default '0',

 `show_nav` enum('0','1') NOT NULL default '0',

 `bgcolor` varchar(7) NOT NULL default 'FFFFFF',

 `height` varchar(5) NOT NULL default 'auto',

 `width` varchar(5) NOT NULL default 'auto',

 `left` varchar(5) NOT NULL default '',

 `top` varchar(5) default NULL,

 `border_width` char(3) NOT NULL default '1px',

 `border_bottom` varchar(5) default NULL,

 `border_color` varchar(6) NOT NULL default '000000',

 `border_style` varchar(10) NOT NULL default 'solid',

 `include` varchar(5) default NULL

) TYPE=MyISAM;



--

-- Dumping data for table `section`

--





INSERT INTO `section` VALUES (1, 'container', '0', '0', '0', 'bdc7ce', 'auto', '80%', '', '20px', '1px', NULL, '000000', 'solid', '');

INSERT INTO `section` VALUES (2, 'header', '0', '0', '0', 'FCFCFC', '75px', '100%', '0%', '0px', '0px', '1px', '000000', 'solid', '');

INSERT INTO `section` VALUES (3, 'nav top', '1', '0', '1', 'bdc7ce', '25px', '100%', '0%', '0px', '0px', '0px', '000000', 'solid', '');

INSERT INTO `section` VALUES (4, 'left', '1', '0', '0', 'FFFFFF', '560px', '82px', '', '2px', '1px', NULL, '000000', 'solid', '');

INSERT INTO `section` VALUES (5, 'middle', '1', '1', '0', 'FFFFFF', 'auto', ' auto', '', '6px', '1px', NULL, '000000', 'solid', '');

INSERT INTO `section` VALUES (6, 'right', '1', '0', '0', 'FFFFFF', '100px', '82px', '', '2px', '1px', NULL, '000000', 'solid', '');

INSERT INTO `section` VALUES (7, 'footer', '1', '0', '0', 'bdc7ce', '20px', '100%', '0%', '2px', '0px', '1px', '000000', 'solid', '');

INSERT INTO `section` VALUES (0, 'body', '1', '0', '0', '999999', 'auto', 'auto', '', NULL, '', NULL, '', '', NULL);



Create setup.php to connect to db and edit values
CODE


//set database connection variables

$hostname='localhost';

$uname='';

$password='';

$database='';



//establish database connection

$connect = mysql_connect($hostname,$uname,$password);






Create the edit file..

 

 

 


Reply

welbis
CODE


<?

/*---------------------------*/

//either include in the filename or include setup.php, ensure established connection to database





$submit = $_GET['submit'];

$update = $_GET['update'];

$confirm = $_GET['confirm'];



$display_ = $_POST['display'];



if(isset($display_)) {

$display_ = 1;

} else {

$display_ = 0;

}



$bg_ = $_POST['bg'];

$width_ = $_POST['width'];

$height_ = $_POST['height'];

$left_ = $_POST['left'];

$padding_ = $_POST['padding'];



$border_width_ = $_POST['border_width'];

$border_bottom_ = $_POST['border_bottom'];

////

//features//



$contentarea_ = $_POST['contentarea'];

$navarea_ = $_POST['navarea'];



//Spacing///



$spacing1_ = $_POST['spacing1'];

$spacing2_ = $_POST['spacing2'];

$spacing3_ = $_POST['spacing3'];

$spacing4_ = $_POST['spacing4'];



$bgbody_ = $_POST['bgbody'];

$bg1_ = $_POST['bg1'];

$bg2_ = $_POST['bg2'];

$bg3_ = $_POST['bg3'];

$bg4_ = $_POST['bg4'];

$bg5_ = $_POST['bg5'];

$bg6_ = $_POST['bg6'];

$bg7_ = $_POST['bg7'];



$backupfilename_ = $_POST['backupfilename'];

$resetname_ = $_POST['resetname'];

////

$edit = mysql_query("SELECT * FROM section WHERE section='container'");

while($row=mysql_fetch_array($edit)) {



$bg = $row["bgcolor"];

$width = $row['width'];

$height = $row['height'];

$left = $row['left'];

$padding = $row['top'];

$border_width = $row['border_width'];

$border_bottom = $row['border_bottom'];

}





$editlayout_1 = <<<HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">



<form name="editlayout_1" method="post" action="?page=secure&a=sitelayout&submit=2&update=1">

 <table width="100%" border="0" cellpadding="4" cellspacing="0">

   <tr>

     <td width="22%">Container Setup</td>

     <td width="78%"><!----></td>

   </tr>



   <tr>

     <td width="22%">Background</td>

     <td width="78%"><input name="bg" type="text" id="bg" value="$bg"></td>

   </tr>

   <tr>

     <td width="22%">width</td>

     <td width="78%"><input name="width" type="text" id="width" value="$width"></td>

   </tr>

   <tr>

     <td width="22%">height</td>

     <td width="78%"><input name="height" type="text" id="height" value="$height"></td>

   </tr>

   <tr>

     <td width="22%">Align</td>

<td width="78%">

<select name="exportformat" size="1">





 <option value='1' selected>Center</option>  

       <option value='2'>Left</option>

 <option value='3' >Right</option>



</td>

   </tr>

   <tr>

     <td width="22%">Padding</td>

     <td width="78%"><input name="padding" type="text" id="padding" value="$padding"></td>

   </tr>

   <tr>

     <td width="22%">Border Width</td>

     <td width="78%"><input name="border_width" type="text" id="border_width" value="$border_width"></td>

   </tr>

   <tr>

     <td align="left" valign="top">&nbsp;</td>

     <td><input type="submit" name="Submit" value="Save Changes!"></td>

   </tr>

 </table>

</form>

<br>

HTML;





$edit = mysql_query("SELECT * FROM section WHERE section='header'");

while($row=mysql_fetch_array($edit)) {



$display = $row['display'];

if($display == 1) {

$value = "value="1" CHECKED";

} else {

$value = "value="0" UNCHECKED";

}



$bg = $row["bgcolor"];

$width = $row['width'];

$height = $row['height'];



$padding = $row['top'];

$border_width = $row['border_width'];

$border_bottom = $row['border_bottom'];

}





$editlayout_2 = <<<HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">



<form name="editlayout_2" method="post" action="?page=secure&a=sitelayout&submit=3&update=1">

 <table width="100%" border="0" cellpadding="4" cellspacing="0">

   <tr>

     <td width="22%">Header Setup</td>

     <td width="78%"><!----></td>

   </tr>



<tr>

     <td>Display Header</td><td><input type="checkbox" name="display" $value></td>

</tr>

   <tr>

     <td width="22%">Background</td>

     <td width="78%"><input name="bg" type="text" id="bg" value="$bg"></td>

   </tr>

   <tr>

     <td width="22%">width</td>

     <td width="78%"><input name="width" type="text" id="width" value="$width"></td>

   </tr>

   <tr>

     <td width="22%">height</td>

     <td width="78%"><input name="height" type="text" id="height" value="$height"></td>

   </tr>

   <tr>

     <td width="22%">Padding</td>

     <td width="78%"><input name="padding" type="text" id="padding" value="$padding"></td>

   </tr>

   <tr>

     <td width="22%">Border Width</td>

     <td width="78%"><input name="border_width" type="text" id="border_width" value="$border_width"></td>

   </tr>

   <tr>

     <td width="22%">Bottom Border Width</td>

     <td width="78%"><input name="border_bottom" type="text" id="border_bottom" value="$border_bottom"></td>

   </tr>

   <tr>

     <td align="left" valign="top">&nbsp;</td>

     <td><input type="submit" name="Submit" value="Save Changes!"></td>

   </tr>

 </table>

</form>

<br>

HTML;





$edit = mysql_query("SELECT * FROM section WHERE section='nav top'");

while($row=mysql_fetch_array($edit)) {



$display = $row['display'];

if($display == 1) {

$value = "value="1" CHECKED";

} else {

$value = "value="0" UNCHECKED";

}



$bg = $row["bgcolor"];

$width = $row['width'];

$height = $row['height'];



$padding = $row['top'];

$border_width = $row['border_width'];

$border_bottom = $row['border_bottom'];



}



$editlayout_3 = <<<HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">





<form name="editlayout_3" method="post" action="?page=secure&a=sitelayout&submit=4&update=1">

 <table width="100%" border="0" cellpadding="4" cellspacing="0">

   <tr>

     <td width="22%">Top Setup</td>

     <td width="78%"><!----></td>

   </tr>

<tr>

     <td>Display Top</td><td><input type="checkbox" name="display" $value></td>

    <tr>

     <td width="22%">Background</td>

     <td width="78%"><input name="bg" type="text" id="bg" value="$bg"></td>

   </tr>

   <tr>

     <td width="22%">width</td>

     <td width="78%"><input name="width" type="text" id="width" value="$width"></td>

   </tr>

   <tr>

     <td width="22%">height</td>

     <td width="78%"><input name="height" type="text" id="height" value="$height"></td>

   </tr>

   <tr>

     <td width="22%">Padding</td>

     <td width="78%"><input name="padding" type="text" id="padding" value="$padding"></td>

   </tr>

   <tr>

     <td width="22%">Border Width</td>

     <td width="78%"><input name="border_width" type="text" id="border_width" value="$border_width"></td>

   </tr>

   <tr>

     <td width="22%">Bottom Border Width</td>

     <td width="78%"><input name="border_bottom" type="text" id="border_bottom" value="$border_bottom"></td>

   </tr>

   <tr>

    <td align="left" valign="top">&nbsp;</td>

     <td><input type="submit" name="Submit" value="Save Changes!"></td>

   </tr>

 </table>

</form>

<br>

HTML;



$edit = mysql_query("SELECT * FROM section WHERE section='left'");

while($row=mysql_fetch_array($edit)) {



$display = $row['display'];

if($display == 1) {

$value = "value="1" CHECKED";

} else {

$value = "value="0" UNCHECKED";

}



$bg = $row["bgcolor"];

$width = $row['width'];

$height = $row['height'];



$left = $row['left'];

$padding = $row['top'];

$border_width = $row['border_width'];

$border_bottom = $row['border_bottom'];

}



$editlayout_4 = <<<HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">







<form name="editlayout_4" method="post" action="?page=secure&a=sitelayout&submit=5&update=1">

 <table width="100%" border="0" cellpadding="4" cellspacing="0">





   <tr>

     <td width="22%">Left Setup</td>

     <td width="78%"><!----></td>

   </tr>

<tr>

     <td>Display Left</td><td><input type="checkbox" name="display" $value></td>

   <tr>

     <td width="22%">Background</td>

     <td width="78%"><input name="bg" type="text" id="bg" value="$bg"></td>

   </tr>

   <tr>

     <td width="22%">width</td>

     <td width="78%"><input name="width" type="text" id="width" value="$width"></td>

   </tr>

   <tr>

     <td width="22%">height</td>

     <td width="78%"><input name="height" type="text" id="height" value="$height"></td>

   </tr>

   <tr>

     <td width="22%">Top Padding</td>

     <td width="78%"><input name="padding" type="text" id="padding" value="$padding"></td>

   </tr>

   <tr>

     <td width="22%">Border Width</td>

     <td width="78%"><input name="border_width" type="text" id="border_width" value="$border_width"></td>

   </tr>

   <tr>

     <td align="left" valign="top">&nbsp;</td>

     <td><input type="submit" name="Submit" value="Save Changes!"></td>

   </tr>

 </table>

</form>

<br>

HTML;





$edit = mysql_query("SELECT * FROM section WHERE section='middle'");

while($row=mysql_fetch_array($edit)) {



$display = $row['display'];

if($display == 1) {

$value = "value="1" CHECKED";

} else {

$value = "value="0" UNCHECKED";

}



$bg = $row["bgcolor"];

$width = $row['width'];

$height = $row['height'];



$padding = $row['top'];

$border_width = $row['border_width'];

$border_bottom = $row['border_bottom'];

}



$editlayout_5 = <<<HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">





<form name="editlayout_5" method="post" action="?page=secure&a=sitelayout&submit=6&update=1">

 <table width="100%" border="0" cellpadding="4" cellspacing="0">





   <tr>

     <td width="22%">Middle Setup</td>

     <td width="78%"><!----></td>

   </tr>



<tr>

     <td>Display Middle</td><td><input type="checkbox" name="display" $value></td>

   <tr>

     <td width="22%">Background</td>

     <td width="78%"><input name="bg" type="text" id="bg" value="$bg"></td>

   </tr>

   <tr>

     <td width="22%">width</td>

     <td width="78%"><input name="width" type="text" id="width" value="$width"></td>

   </tr>

   <tr>

     <td width="22%">height</td>

     <td width="78%"><input name="height" type="text" id="height" value="$height"></td>

   </tr>

   <tr>

     <td width="22%">Left padding</td>

     <td width="78%"><input name="padding" type="text" id="padding" value="$padding"></td>

   </tr>

   <tr>

     <td width="22%">Border Width</td>

     <td width="78%"><input name="border_width" type="text" id="border_width" value="$border_width"></td>

   </tr>

   <tr>

     <td align="left" valign="top">&nbsp;</td>

     <td><input type="submit" name="Submit" value="Save Changes!"></td>

   </tr>

 </table>

</form>

<br>

HTML;





$edit = mysql_query("SELECT * FROM section WHERE section='right'");

while($row=mysql_fetch_array($edit)) {



$display = $row['display'];

if($display == 1) {

$value = "value="1" CHECKED";

} else {

$value = "value="0" UNCHECKED";

}



$bg = $row["bgcolor"];

$width = $row['width'];

$height = $row['height'];



$padding = $row['top'];





$border_width = $row['border_width'];

$border_bottom = $row['border_bottom'];

}



$editlayout_6 = <<<HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">



<form name="editlayout_6" method="post" action="?page=secure&a=sitelayout&submit=7&update=1">

 <table width="100%" border="0" cellpadding="4" cellspacing="0">





   <tr>

     <td width="22%">Right Setup</td>

     <td width="78%"><!----></td>

   </tr>



<tr>

     <td>Display Right</td><td><input type="checkbox" name="display" $value></td>

   <tr>

     <td width="22%">Background</td>

     <td width="78%"><input name="bg" type="text" id="bg" value="$bg"></td>

   </tr>

   <tr>

     <td width="22%">width</td>

     <td width="78%"><input name="width" type="text" id="width" value="$width"></td>

   </tr>

   <tr>

     <td width="22%">height</td>

     <td width="78%"><input name="height" type="text" id="height" value="$height"></td>

   </tr>

   <tr>

     <td width="22%">Left Padding</td>

     <td width="78%"><input name="padding" type="text" id="padding" value="$padding"></td>

  </tr>

   <tr>

     <td width="22%">Border Width</td>

     <td width="78%"><input name="border_width" type="text" id="border_width" value="$border_width"></td>

   </tr>

   <tr>

     <td align="left" valign="top">&nbsp;</td>

     <td><input type="submit" name="Submit" value="Save Changes!"></td>

   </tr>

 </table>

</form>

<br>

HTML;





$edit = mysql_query("SELECT * FROM section WHERE section='footer'");

while($row=mysql_fetch_array($edit)) {



$display = $row['display'];

if($display == 1) {

$value = "value="1" CHECKED";

} else {

$value = "value="0" UNCHECKED";

}





$bg = $row["bgcolor"];

$width = $row['width'];

$height = $row['height'];



$padding = $row['top'];

$border_width = $row['border_width'];

$border_bottom = $row['border_bottom'];

}



$editlayout_7 = <<<HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">



<form name="editlayout_7" method="post" action="?page=secure&a=sitelayout&submit=8&update=1">

 <table width="100%" border="0" cellpadding="4" cellspacing="0">





   <tr>

     <td width="22%">Footer Setup</td>

     <td width="78%"><!----></td>

   </tr>



<tr>

     <td>Display footer</td><td><input type="checkbox" name="display" $value></td>

   <tr>

     <td width="22%">Background</td>

     <td width="78%"><input name="bg" type="text" id="bg" value="$bg"></td>

   </tr>

   <tr>

     <td width="22%">width</td>

     <td width="78%"><input name="width" type="text" id="width" value="$width"></td>

   </tr>

   <tr>

     <td width="22%">height</td>

     <td width="78%"><input name="height" type="text" id="height" value="$height"></td>

   </tr>

   <tr>

     <td width="22%">Padding</td>

     <td width="78%"><input name="padding" type="text" id="padding" value="$padding"></td>

   </tr>

   <tr>

     <td width="22%">Border Width</td>

     <td width="78%"><input name="border_width" type="text" id="border_width" value="$border_width"></td>

   </tr>

   <tr>

     <td width="22%">Bottom Border Width</td>

     <td width="78%"><input name="border_bottom" type="text" id="border_bottom" value="$border_bottom"></td>

   </tr>

   <tr>

     <td align="left" valign="top">&nbsp;</td>

     <td><input type="submit" name="Submit" value="Save Changes!"></td>

   </tr>

 </table>

</form>

<br>

HTML;



$editfeature = <<<HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">





<form name="editfeature" method="post" action="?page=secure&a=sitelayout&submit=9&update=1">

 <table width="100%" border="0" cellpadding="4" cellspacing="0">





   <tr>

     <td width="22%">Feature Setup</td>

     <td width="78%"><!----></td>

   </tr>

   <tr>

     <td width="22%">Content Area</td>

</td>

<td>



<select name="contentarea" size="1">





 <option value='1' selected >Middle Column</option>  

       <option value='2'>Left Column</option>

 <option value='3' >Right Column</option>

</td>

   <tr>

   <tr>

     <td width="22%">Navigation Area</td>

</td>

<td>



<select name="navarea" size="1">





 <option value='1' selected >Top Nav bar</option>  

       <option value='2'>Left Nav bar</option>

 <option value='3' >Right Nav bar</option>

</td>

   <tr>





     <td align="left" valign="top">&nbsp;</td>

     <td><input type="submit" name="Submit" value="Save Changes!"></td>

   </tr>

 </table>

</form>

<br>

HTML;



$edit = mysql_query("SELECT top FROM section WHERE section='container'");

while($row=mysql_fetch_array($edit)) {



$spacing1 = $row['top'];

}

$edit = mysql_query("SELECT top FROM section WHERE section='nav top'");

while($row=mysql_fetch_array($edit)) {



$spacing2 = $row['top'];

}

$edit = mysql_query("SELECT top FROM section WHERE section='left'");

while($row=mysql_fetch_array($edit)) {



$spacing3 = $row['top'];

}

$edit = mysql_query("SELECT top FROM section WHERE section='footer'");

while($row=mysql_fetch_array($edit)) {



$spacing4 = $row['top'];

}



$editspacing = <<<HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">







<form name="spacing1" method="post" action="?page=secure&a=sitelayout&submit=spacing&update=1">

 <table width="100%" border="0" cellpadding="4" cellspacing="0">





   <tr>

     <td width="22%">Verticle Spacings</td>

     <td width="78%"><!----></td>

   </tr>

   <tr>

     <td width="22%">Screen spacing</td>

     <td width="78%"><input name="spacing1" type="text" id="bg" value="$spacing1"></td>

   </tr>

   <tr>

     <td width="22%">Top bar to header</td>

     <td width="78%"><input name="spacing2" type="text" id="width" value="$spacing2"></td>

   </tr>

   <tr>

     <td width="22%">Middle to above table</td>

     <td width="78%"><input name="spacing3" type="text" id="height" value="$spacing3"></td>

   </tr>

   <tr>

     <td width="22%">footer to middle</td>

     <td width="78%"><input name="spacing4" type="text" id="top" value="$spacing4"></td>

   </tr>

   <tr>



     <td align="left" valign="top">&nbsp;</td>

     <td><input type="submit" name="Submit" value="Save Changes!"></td>

   </tr>

 </table>

</form>

<br>

HTML;



$edit = mysql_query("SELECT bgcolor FROM section WHERE section='body'");

while($row=mysql_fetch_array($edit)) {



$bgbody = $row['bgcolor'];

}

$edit = mysql_query("SELECT bgcolor FROM section WHERE section='container'");

while($row=mysql_fetch_array($edit)) {



$bg1 = $row['bgcolor'];

}

$edit = mysql_query("SELECT bgcolor FROM section WHERE section='header'");

while($row=mysql_fetch_array($edit)) {



$bg2 = $row['bgcolor'];

}

$edit = mysql_query("SELECT bgcolor FROM section WHERE section='nav top'");

while($row=mysql_fetch_array($edit)) {



$bg3 = $row['bgcolor'];

}

$edit = mysql_query("SELECT bgcolor FROM section WHERE section='left'");

while($row=mysql_fetch_array($edit)) {



$bg4 = $row['bgcolor'];

}

$edit = mysql_query("SELECT bgcolor FROM section WHERE section='middle'");

while($row=mysql_fetch_array($edit)) {



$bg5 = $row['bgcolor'];

}

$edit = mysql_query("SELECT bgcolor FROM section WHERE section='right'");

while($row=mysql_fetch_array($edit)) {



$bg6 = $row['bgcolor'];

}

$edit = mysql_query("SELECT bgcolor FROM section WHERE section='footer'");

while($row=mysql_fetch_array($edit)) {



$bg7 = $row['bgcolor'];

}



$editcolour = <<<HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">







<form name="colour" method="post" action="?page=secure&a=sitelayout&submit=colour&update=1">

 <table width="100%" border="0" cellpadding="4" cellspacing="0">





   <tr>

     <td width="22%">Adjust Colour Scheme</td>

     <td width="78%"><!----></td>

   </tr>

   <tr>

     <td width="22%">Body</td>

     <td width="78%"><input name="bgbody" type="text" id="bgbody" value="$bgbody"></td>

   </tr>

   <tr>

     <td width="22%">Container</td>

     <td width="78%"><input name="bg1" type="text" id="bg1" value="$bg1"></td>

   </tr>

   <tr>

     <td width="22%">Header</td>

     <td width="78%"><input name="bg2" type="text" id="bg2" value="$bg2"></td>

   </tr>

   <tr>

     <td width="22%">Top Nav</td>

     <td width="78%"><input name="bg3" type="text" id="bg3" value="$bg3"></td>

   </tr>

   <tr>

     <td width="22%">Left</td>

     <td width="78%"><input name="bg4" type="text" id="bg4" value="$bg4"></td>

   </tr>

   <tr>

     <td width="22%">Middle</td>

     <td width="78%"><input name="bg5" type="text" id="bg5" value="$bg5"></td>

   </tr>

   <tr>

     <td width="22%">Right</td>

     <td width="78%"><input name="bg6" type="text" id="bg6" value="$bg6"></td>

   </tr>

   <tr>

     <td width="22%">Footer</td>

     <td width="78%"><input name="bg7" type="text" id="bg7" value="$bg7"></td>

   </tr>

   <tr>



     <td align="left" valign="top">&nbsp;</td>

     <td><input type="submit" name="Submit" value="Save Changes!"></td>

   </tr>

 </table>

</form>

<br>

HTML;





$backupform = <<<HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">







<form name="backupform" method="post" action="?page=secure&a=sitelayout&submit=backup&update=1">

 <table width="100%" border="0" cellpadding="4" cellspacing="0">





   <tr>

     <td width="22%">Backup Current Settings</td>

     <td width="78%"><!----></td>

   </tr>

   <tr>

     <td width="22%">Filename</td>

     <td width="78%"><input name="backupfilename" type="text" id="backupfilename" value="$backupfilename"></td>

   </tr>

   <tr>

     <td width="22%">Export</td>

<td width="78%">

<select name="exportformat" size="1">





 <option value='1' selected >To Browser</option>  

       <option value='2'>To HDD DIR</option>

 <option value='3' >To FTP</option>



</td>

   </tr>

   <tr>

     <td align="left" valign="top">&nbsp;</td>

     <td><input type="submit" name="Submit" value="Save Changes!"></td>

   </tr>

 </table>

</form>

<br>

HTML;



$resetform = <<<HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">







<form name="resetform" method="post" action="?page=secure&a=sitelayout&submit=reset&update=1">

 <table width="100%" border="0" cellpadding="4" cellspacing="0">





   <tr>

     <td width="22%">Reset Settings</td>

     <td width="78%"><!----></td>

   </tr>

   <tr>

     <td width="22%">Filename</td>

     <td width="78%"><input name="backupname" type="text" id="bg" value="$resetname"></td>

   </tr>

   <tr>

     <td width="22%">Date</td>

     <td width="78%"><input name="resetdate" type="text" id="width" value="$resetdate"></td>

   </tr>

   <tr>

     <td width="22%">Import</td>

     <td width="78%">

<select name="importformat" size="1">





 <option value='1' selected >From Browser</option>  

       <option value='2'>From HDD DIR</option>

 <option value='3' >From FTP</option>



</td>

   </tr>

   <tr>

     <td align="left" valign="top">&nbsp;</td>

     <td><input type="submit" name="Submit" value="Save Changes!"></td>

   </tr>

 </table>

</form>

<br>

HTML;



?><br><hr><?

//////////

if(isset($submit)) {

///



if($submit == 1) {



print $editlayout_1;

}



if($submit == 2) {



If(isset($update)) {



mysql_query("UPDATE section SET display='{$display_}',bgcolor='{$bg_}',width='{$width_}',height='{$height_}',top='{$padding_}',border_width='{$border_width_}' WHERE section='container'");



print 'Container Successfully Edited<br>';

}



print $editlayout_2;



}

if($submit == 3) {



If(isset($update)) {



mysql_query("UPDATE section SET display='{$display_}',bgcolor='{$bg_}',width='{$width_}',height='{$height_}',top='{$padding_}',border_width='{$border_width_}',border_bottom='{$border_bottom_}' WHERE section='header'");

print 'Header Successfully Edited<br>';

}



print $editlayout_3;



}

if($submit == 4) {



If(isset($update)) {

mysql_query("UPDATE section SET display='{$display_}',bgcolor='{$bg_}',width='{$width_}',height='{$height_}',top='{$padding_}',border_width='{$border_width_}',border_bottom='{$border_bottom_}' WHERE section='nav top'");

print 'Nav Top Successfully Edited<br>';

}



print $editlayout_4;

}

if($submit == 5) {



If(isset($update)) {

mysql_query("UPDATE section SET display='{$display_}',bgcolor='{$bg_}',height='{$height_}',width='{$width_}',top='{$padding_}',border_width='{$border_width_}' WHERE section='left'");

print 'left Successfully Edited<br>';

}



print $editlayout_5;

}

if($submit == 6) {



If(isset($update)) {

mysql_query("UPDATE section SET display='{$display_}',bgcolor='{$bg_}',width='{$width_}',height='{$height_}',top='{$padding_}',border_width='{$border_width_}' WHERE section='middle'");

print 'Middle Successfully Edited<br>';

}



print $editlayout_6;

}

if($submit == 7) {



If(isset($update)) {

mysql_query("UPDATE section SET display='{$display_}',bgcolor='{$bg_}',width='{$width_}',height='{$height_}',top='{$padding_}',border_width='{$border_width_}' WHERE section='right'");

print 'Right Successfully Edited<br>';

}



print $editlayout_7;

}

if($submit == 8) {



If(isset($update)) {

mysql_query("UPDATE section SET display='{$display_}',bgcolor='{$bg_}',width='{$width_}',height='{$height_}',top='{$padding_}',border_width='{$border_width_}',border_bottom='{$border_bottom_}' WHERE section='footer'");

print 'Footer Successfully Edited<br>';

}



print $editfeature;

}

if($submit == 9) {



If(isset($update)) {

///



if($contentarea_ == 1) {

mysql_query("UPDATE section SET show_content='1' WHERE section='middle'");

mysql_query("UPDATE section SET show_content='0' WHERE section='left'");

mysql_query("UPDATE section SET show_content='0' WHERE section='right'");



print 'Content section assigned: Middle <br>';

mysql_query("UPDATE section SET display='1' WHERE section='middle'");

}

if($contentarea_ == 2) {

mysql_query("UPDATE section SET show_content='0' WHERE section='middle'");

mysql_query("UPDATE section SET show_content='1' WHERE section='left'");

mysql_query("UPDATE section SET show_content='0' WHERE section='right'");



print 'Content section assigned: Left <br>';

mysql_query("UPDATE section SET display='1' WHERE section='left'");

}

if($contentarea_ == 3) {

mysql_query("UPDATE section SET show_content='0' WHERE section='middle'");

mysql_query("UPDATE section SET show_content='0' WHERE section='left'");

mysql_query("UPDATE section SET show_content='1' WHERE section='right'");



print 'Content section assigned: Right <br>';

mysql_query("UPDATE section SET display='1' WHERE section='right'");

}

if($navarea_ == 1) {

mysql_query("UPDATE section SET show_nav='1' WHERE section='nav top'");

mysql_query("UPDATE section SET show_nav='0' WHERE section='left'");

mysql_query("UPDATE section SET show_nav='0' WHERE section='right'");



print 'Nav section assigned: Top <br>';

}

if($navarea_ == 2) {

mysql_query("UPDATE section SET show_nav='0' WHERE section='nav top'");

mysql_query("UPDATE section SET show_nav='1' WHERE section='left'");

mysql_query("UPDATE section SET show_nav='0' WHERE section='right'");



print 'Nav section assigned: Left <br>';

}

if($navarea_ == 3) {

mysql_query("UPDATE section SET show_nav='0' WHERE section='nav top'");

mysql_query("UPDATE section SET show_nav='0' WHERE section='left'");

mysql_query("UPDATE section SET show_nav='1' WHERE section='right'");



print 'Nav section assigned: Right <br>';

}



////

}

}



if($submit == colour) {



If(isset($update)) {



mysql_query("UPDATE section SET bgcolor='{$bgbody_}' WHERE section='body'");

mysql_query("UPDATE section SET bgcolor='{$bg1_}' WHERE section='container'");

mysql_query("UPDATE section SET bgcolor='{$bg2_}' WHERE section='header'");

mysql_query("UPDATE section SET bgcolor='{$bg3_}' WHERE section='nav top'");

mysql_query("UPDATE section SET bgcolor='{$bg4_}' WHERE section='left'");

mysql_query("UPDATE section SET bgcolor='{$bg5_}' WHERE section='middle'");

mysql_query("UPDATE section SET bgcolor='{$bg6_}' WHERE section='right'");

mysql_query("UPDATE section SET bgcolor='{$bg7_}' WHERE section='footer'");



print 'Updated Colour Scheme<br>';

} else {

print $editcolour;

}

}

if($submit == border) {



print "updating borders...";

}

if($submit == spacing) {



If(isset($update)) {

mysql_query("UPDATE section SET top='{$spacing1_}' WHERE section='container'");

mysql_query("UPDATE section SET top='{$spacing2_}' WHERE section='nav top'");

mysql_query("UPDATE section SET top='{$spacing3_}' WHERE section='left'");

mysql_query("UPDATE section SET top='{$spacing4_}' WHERE section='footer'");



print 'Verticle Spacings Successfully Edited<br>';

} else {

print $editspacing;

}



}



if($submit == 13) {



///

If(isset($update)) {







print 'saved data to...<br>';

}

}





if($submit == upload) {

if ($_POST["action"]=="upload"){

       $file=$HTTP_POST_FILES["file"];

       $tmp_name=$file["tmp_name"];

  $new_name=$_SERVER["DOCUMENT_ROOT"].'/upload/'.$file["name"];

       move_uploaded_file($tmp_name, $new_name);

}

?>

<form enctype="multipart/form-data" action="?page=secure&a=sitelayout&submit=upload" method="post">

Choose a file:

<input type="file" name="file" />

<input type="hidden" name="MAX_FILE_SIZE" value="1048576" /><br />

<input type="hidden" name="action" value="upload" />

<input type="submit" name="submit" value="Upload!" />

</form>

<?

}



if($submit == reset) {



if($confirm == 1) {

print $resetform;

} else {

?>

Really reset?

<a href="?page=secure&a=sitelayout&submit=reset&confirm=1">Yes</a> || <a href="?">No</a><br><br>

<a href="?page=secure&a=sitelayout&submit=backup">backup first?</a><br>

<?

}

If(isset($update)) {



print "Failed backup";

print 'Reset data from $resetname_<br>';

}



}

if($submit == backup) {



print $backupform;



If(isset($update)) {



////////

define("AUTO_QUOTE",get_magic_quotes_gpc());



# configuration

$db_name = "$dbname";

$file = $backupfilename_; # blank to output to the screen

$create_tables = true; # add "CREATE TABLE" syntax at the begining of the script

$database = "$dbname";





function _dump_table($table_name){

  $sql = mysql_query("select * from ". $table_name);

  $dump = "";

  while($row = mysql_fetch_assoc($sql)){

    $keys = array_keys($row);

    $val = array_values($row);

    $len = count($keys);

    $dump .= "INSERT INTO ".$table_name." (";

    for($i=0;$i < $len;$i++){

        $comma = ($i+1 != $len)?",":"";

        $keys[$i] = (AUTO_QUOTE == 1)?addslashes($keys[$i]):$keys[$i];

        $dump .= $keys[$i]. $comma;

    }

    $dump .= ") VALUES(";

    for($i=0;$i < $len;$i++){

        $comma = ($i+1 != $len)?"',":"'";

        $val[$i] = (AUTO_QUOTE == 1)?addslashes($val[$i]):$val[$i];

        $dump .= "'".$val[$i]. $comma;

    }

    $dump .= ");n";

  }

  return $dump;

}

function _create_table($table_name){

 $sql = mysql_query("SHOW FIELDS FROM " . $table_name);

 $dump = "CREATE TABLE " .$table_name ."(";

 $i = 0;

 while($row = mysql_fetch_assoc($sql)){

    $attrib = array_values($row);

    $keys = array_keys($row);

    $len = count($attrib);

    for($n=0;$n < $len;$n++){

        $attrib[$n] = ($attrib[$n] == "PRI")?"PRIMARY KEY":$attrib[$n];

        $attrib[$n] = ($attrib[$n] == "YES")?$keys[$n]:$attrib[$n];

        $dump .= $attrib[$n] . " ";

    }

    $dump .= ($i+1 != $len)?",":"";

    $i++;

 }

 $dump .= ");n";

 return $dump;

}

function _get_tables($db){

  $sql = mysql_query("SHOW TABLES FROM ".$db);

  $i=0;

  while($row = mysql_fetch_assoc($sql)){

     list($tables[$i++]) = array_values($row);

  }

  return $tables;

}

function _comments(){

   $c = "nn";

   return $c;

}



#header("Content-type: text/plainrn");



$tables = _get_tables($database);



$add_table = "";

if($create_tables == true){

  foreach($tables as $tab){

     $addtable .= _create_table($tab);

  }

  $add_table .= "nn";

}

if(!empty($file)){

  $fp = fopen($file,"w");

  fwrite($fp,$addtable);

  foreach($tables as $tab){

     fwrite($fp,_dump_table($tab));

  }

  fwrite($fp,_comments());

  fclose($fp);

  echo "MySQL database saved into file ".$file;

}else{

  echo $addtable;

  foreach($tables as $tab){

     echo _dump_table($tab);

  }

  echo _comments();

}



////

}

}

?>

<hr>

<a href="?page=secure&a=sitelayout">Edit Layout Menu</a><br>

<?



////

} else {

///////////

?>



Sections:<br>



<a href="?page=secure&a=sitelayout&submit=1">Edit Container</a> <br>

<a href="?page=secure&a=sitelayout&submit=2">Edit Header</a><br>

<a href="?page=secure&a=sitelayout&submit=3">Edit Top</a> <br>

<a href="?page=secure&a=sitelayout&submit=4">Edit Left</a> <br>

<a href="?page=secure&a=sitelayout&submit=5">Edit Middle</a> <br>

<a href="?page=secure&a=sitelayout&submit=6">Edit right</a> <br>

<a href="?page=secure&a=sitelayout&submit=7">Edit footer</a> <br>



<hr>

Settings:<br>

<a href="?page=secure&a=sitelayout&submit=8">Assign Sections</a> <br>

<a href="?page=secure&a=sitelayout&submit=colour">Edit Colours</a> <br>

<a href="?page=secure&a=sitelayout&submit=spacing">Edit Spacing</a> <br>

<br><br>

<a href="?page=secure&a=sitelayout&submit=upload">Upload file</a><br>

<a href="?page=secure&a=sit

 

 

 


Reply

kisiek
it's work smile.gif

Reply

welbis
lol, is that 'its a lot of work' or 'it works'

Reply

brad
lol it didn't work for me tho:(

Reply

welbis
brad, pm me what didnt work about it and ill try and fix it.

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Similar Topics

Keywords : layout editor

  1. I Need Myspace Layout Ideas =/ - (0)
  2. PHP Editor - (5)
    any of you guys know a good PHP editor .. more of like FP and Dreamweaver style ?...
  3. Free PHP Editor - (30)
    Free PHP Editor www.mpsoftware.dk !...
  4. need a custom layout - (3)
    Hey, i need a table code to make a layout similar looking to Vbullitin's portal layout, html/css,
    doesint matter, i would be very thankfull /biggrin.gif' border='0' style='vertical-align:middle'
    alt='biggrin.gif' /> and e.x of what type of a layout i wan't: http://www.kaasie.com/ again i
    would be very thankfull if anyone can. p.s. just simple, no need any grphics, or text, and the
    borders can show, just the very basic code, thanks...
  5. FREE XHTML 1.1 Editor! - (20)
    You heard me right - There's a FREE XHTML 1.1 editor at this link:
    http://xstandard.com/default.asp . :shock: After reading about XStandard Lite , I wasted no
    time in downloading it to my computer. That was some months ago and I haven't yet got around to
    testing it out! I guess I just like to manually code my sites... /laugh.gif' border='0'
    style='vertical-align:middle' alt='laugh.gif' /> ...
  6. wysiwyg text editor tut needed - (0)
    i'd really love a tutorial that lets me highlight text in a text area, and click a button that puts
    bold / italic / underline / code tags etc around it. Or just somewhere to start to look and
    understand it. Just like phpbb does it really i guess. I know php only - if its not possible
    in php, what do i do it in? I'm making a very complex php cms - and i need to make my posting
    interface more professional. What i'm looking for is either 1) a template tutorial on how to
    do it. I.e. the methods used to bold text - which i can then adapt to work with urls a...
  7. front page layout issue - (0)
    The link to terms of service splits on some pages to terms of, and service in the middle of the nav
    bar at the top. I use firefox v1.0...
  8. I need simple html editor script - (3)
    I need it because i think it is easy to edit my pages. And with login, for admin. Pls, help me!
    ThanX!...
  9. layout problem css - (4)
    Hii my website has an mysql driven layout that feeds into css and creates the tables in one
    script. This then calls the content - which is also all called from mysql trhough php.
    Everytime the content prints a table within the css it mucks up the rest of the layout script - even
    if its closed properly (i tried it with a simple table: CODE <table> <tr>
    <td>blah</td> </tr> </table> ) i.e. if there are 3 tables,
    a left nav bar, a middle bit with the content, and a right nav bar - and then a footer at ...
  10. The New Free Nuke Hosting Layout!!! - (4)
    The new FNH layout looks very cool and very profesianal (how do you write it?). Great work to
    those(or that) person(s) who created the theme. Why don't you do the same with the Forum. That
    would be super. Free Nuke Hosting is the best. There is no doubt about it. And anyone who says
    that FNH is not the best has to play Army men games for A whole year....
  11. PHPbb parts into my site layout? - (4)
    is it possible to like add a thing on my site anywhere to show how many users are signed up on my
    phpBB forums. I would like on my site on the right bottom to show Total Members: then the number of
    how many members registered. Is there anyway if its too much trouble just to access the mysql
    database and show the number of users from there? if so id please like a script to do that or some
    help on it....
  12. How do you change a html layout to a php theme?? - (7)
    can anyone teach me??...
  13. PHP editor!? - (31)
    I am interested in what type of editor are you using for PHP!?? i am using TextPad and its great!...
  14. how can i setup a new layout 4 my forum? - (4)
    ive downloaded a template 4 phpnuke , but now when i go to my forum my forum is white , and i cant
    read the text ... but when i upload a new theme 4 my forum , the pictures wont be displayed ....
    :cry:...



Looking for layout, editor

*RANDOM STUFF*





*SIMILAR VIDEOS*
Searching Video's for layout, editor

*MORE FROM TRAP17.COM*
advertisement



layout editor



 

 

 

 

ADD REPLY / Got an Opinion! a humble request :-) RAPID SEARCH! Free Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE