cyates
05-28-2008, 02:32 PM
Hi Guys
ok im in a rut ..
I'll give $100 to the person who solves my problem & its extremely urgent
Ok heres the scenario ..
I have an admin area where i can add / edit delete db entries
i have a link that when clicked i can input text into a text field and that then creates a folder based on the text
Now.. here is my problem
I then want to be able to create a page based on a template and insert it into the folder ( the foldername is selected from a dropdown menu )
and returns $store = $_POST['store']
so it would be www.mydomain.com/$store/
now i have successfully created a site based on a template ( see example here - http://www.servicedofficesin.co.uk ) this shows the folders & filenames etc etc
but the template for the new site seems to be having a lot of problems
it will create the page with the desired filename & in teh correct folder
but the php in the template is messed up
for example variable names get deleted
so i would have :
= '';
etc
i have included my entire template page below that i want the created pages to be based on & below that is the code for teh page to create the page etc
if anyone has any questions please pm me
thanks in advance
<?php include('storetemplatephpinc.php');
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="keywords" content="<?php echo $row_GetStoreDetails['mkeywords'];?>" />
<meta name="description" content="<?php echo $row_GetStoreDetails['store'];?>"/>
<meta name="robots" content="index,follow,all" />
<meta name="revisit-after" content="1 day" />
<title><?php echo $row_GetStoreDetails['store'];?></title>
<link href="../style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table width="900" height="341" border="0" align="center" cellpadding="5" cellspacing="5" bgcolor="#FFFFFF">
<tr>
<td height="90" colspan="3" valign="top"><img src="../img/logo.jpg" width="392" height="80" align="left" />
<table width="162" border="0" align="right" cellpadding="0" cellspacing="0">
<tr>
<td width="162" valign="top"><!-- AddThis Button BEGIN -->
<script type="text/javascript">addthis_pub = 'cyates';</script>
<span class="storelistings">Social Bookmark The Page</span><a href="http://www.addthis.com/bookmark.php" onmouseover="return addthis_open(this, '', '[URL]', '[TITLE]')" onmouseout="addthis_close()" onclick="return addthis_sendto()"><br />
<img src="http://s9.addthis.com/button1-bm.gif" width="125" height="16" border="0" alt="" /></a>
<script type="text/javascript" src="http://s7.addthis.com/js/152/addthis_widget.js"></script></td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="3" bgcolor="#666699"><a href="http://www.findvouchercodes.com" class="topmenu">Home</a> | <a href="../newdiscounts.php" class="topmenu">New Discounts</a> | <a href="../popularvouchercodes.php" class="topmenu">Most Popular Voucher Codes </a> | <a href="../vouchercodelist.php" class="topmenu">View Voucher Codes By Store</a> </td>
</tr>
<tr>
<td height="29" colspan="3" valign="top" bgcolor="#E9E9EF"><div class="viewstorebyletter">View Store By Letter : <a href="../vouchercodelist.php?letter=09" class="codesbyletter">0-9</a> <a href="../vouchercodelist.php?letter=a" class="codesbyletter">A</a> <a href="../vouchercodelist.php?letter=b" class="codesbyletter">B</a> <a href="../vouchercodelist.php?letter=c" class="codesbyletter">C</a> <a href="../vouchercodelist.php?letter=d" class="codesbyletter">D</a> <a href="../vouchercodelist.php?letter=e" class="codesbyletter">E</a> <a href="../vouchercodelist.php?letter=f" class="codesbyletter">F</a> <a href="../vouchercodelist.php?letter=g" class="codesbyletter">G</a> <a href="../vouchercodelist.php?letter=h" class="codesbyletter">H</a> <a href="../vouchercodelist.php?letter=i" class="codesbyletter">I</a> <a href="../vouchercodelist.php?letter=j" class="codesbyletter">J</a> <a href="../vouchercodelist.php?letter=k" class="codesbyletter">K</a> <a href="../vouchercodelist.php?letter=l" class="codesbyletter">L</a> <a href="../vouchercodelist.php?letter=m" class="codesbyletter">M</a> <a href="../vouchercodelist.php?letter=n" class="codesbyletter">N</a> <a href="../vouchercodelist.php?letter=o" class="codesbyletter">O</a> <a href="../vouchercodelist.php?letter=p" class="codesbyletter">P</a> <a href="../vouchercodelist.php?letter=q" class="codesbyletter">Q</a> <a href="../vouchercodelist.php?letter=r" class="codesbyletter">R</a> <a href="../vouchercodelist.php?letter=s" class="codesbyletter">S</a> <a href="../vouchercodelist.php?letter=t" class="codesbyletter">T</a> <a href="../vouchercodelist.php?letter=u" class="codesbyletter">U</a> <a href="../vouchercodelist.php?letter=v" class="codesbyletter">V</a> <a href="../vouchercodelist.php?letter=w" class="codesbyletter">W</a> <a href="../vouchercodelist.php?letter=x" class="codesbyletter">X</a> <a href="../vouchercodelist.php?letter=y" class="codesbyletter">Y</a> <a href="../vouchercodelist.php?letter=z" class="codesbyletter">Z</a></div>
</td>
</tr>
<tr>
<td width="200" valign="top"><?php include('../leftmenu.php');?></td>
<td valign="top" class="centercolumnborder"><table width="480" border="1" align="center" cellpadding="2" cellspacing="0" bordercolor="#666699" bgcolor="#E9E9EF">
<tr>
<td valign="middle"><form id="addemail" name="addemail" method="post" action="../addtoemail.php">
<span class="normaltxt"><strong><span class="msg"><u><font color="#000000">Get Instant Notification Of New Discounts</font></u><br />
<br />
</span>Full Name :</strong>
<input name="name" type="text" class="normaltxt" id="name" />
</span>
<span class="normaltxt"> <strong>Email Address :</strong></span>
<input name="emailaddress" type="text" class="normaltxt" id="emailaddress" />
<input type="image" name="imageField" src="../img/addme.jpg" />
</form> </td>
</tr>
</table>
<br />
<table width="480" align="center" cellpadding="2" cellspacing="0">
<tr>
<td valign="middle"><h1><a href="http://www.findvouchercodes.com" class="vouchercodetitle"><?php echo $row_GetStoreDetails['store'];?> voucher codes</a></h1>
<p class="normaltxt"> We provide you with <a href="http://www.findvouchercodes.com" class="normaltxt"><strong><?php echo $row_GetStoreDetails['store'];?> voucher codes</strong></a>, <a href="http://www.findvouchercodes.com" class="normaltxt"><strong><?php echo $row_GetStoreDetails['store'];?> promotional codes</strong></a>, <a href="http://www.findvouchercodes.com" class="normaltxt"><strong><?php echo $row_GetStoreDetails['store'];?> discount codes</strong></a> and money off vouchers that will save you money on your online purchases.<br />
<br /><?php echo $row_GetStoreDetails['text'];?>
<br />
</p>
</td>
</tr>
</table>
<br />
<table width="480" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2" valign="middle" bgcolor="#666699" class="catheader"><?php echo $row_GetStoreDetails['store'];?> Voucher Codes</td>
</tr>
<?php do { ?> <?php
// Title URL String Re-Write
$oldtitle = $row_storecodes['title'];
$newtitle = str_replace(' ','-',$oldtitle);
$oldstore = $row_GetStoreDetails['store'];
$newstore = str_replace(' ','-',$oldstore);
?><tr><?php
$vctitlepage = $row_storecodes['title'].".php";
$coderewrite = str_replace('-',' ',$row_storecodes['title'])
;
?>
<td width="324" height="26" valign="middle" bgcolor="#E8E8EE"><font class="vouchertxt"><strong><a href="<?php echo $vctitlepage;?>" class="vouchertxt"><?php echo $coderewrite; ?></a></strong></font></td>
<td width="148" valign="middle" bgcolor="#E8E8EE" class="vouchertxt"><a href="<?php echo $vctitlepage;?>"><img src="../img/viewcodedetails.jpg" width="143" height="26" border="0" align="absmiddle" /></a></td>
</tr>
<tr>
<td colspan="2" valign="middle" class="copytxt"> </td>
</tr>
<?php } while ($row_storecodes = mysql_fetch_assoc($storecodes)); ?>
</table>
<p class="viewstorebyletter"> </p></td>
<td width="160" valign="top"><div align="center" class="rightmenu_a">Selected Retailers </div>
<div>
<div align="center">
<?php do { ?>
<a href="../showstore.php?store=<?php echo $row_SelectedRetailers['store'];?>&storeid=<?php echo $row_SelectedRetailers['storeid'];?>"><img src="<?php echo $row_SelectedRetailers['logo'];?>" alt="<?php echo $row_SelectedRetailers['alt'];?>" border="0" /></a><br />
<?php } while ($row_SelectedRetailers = mysql_fetch_assoc($SelectedRetailers)); ?></div>
</div>
</td>
</tr>
<tr>
<td height="38" colspan="3"><div align="center" class="copytxt"><strong>© Copyright <a href="http://www.findvouchercodes.com" class="copytxt">Find Voucher Codes</a> <?php echo date('Y');?></strong></div></td>
</tr>
</table>
</body>
</html>
<?php
mysql_free_result($GetStoreDetails);
mysql_free_result($SelectedRetailers);
mysql_free_result($StoreVoucherCodes);
mysql_free_result($IndexPageNewsItems);
?>
ok im in a rut ..
I'll give $100 to the person who solves my problem & its extremely urgent
Ok heres the scenario ..
I have an admin area where i can add / edit delete db entries
i have a link that when clicked i can input text into a text field and that then creates a folder based on the text
Now.. here is my problem
I then want to be able to create a page based on a template and insert it into the folder ( the foldername is selected from a dropdown menu )
and returns $store = $_POST['store']
so it would be www.mydomain.com/$store/
now i have successfully created a site based on a template ( see example here - http://www.servicedofficesin.co.uk ) this shows the folders & filenames etc etc
but the template for the new site seems to be having a lot of problems
it will create the page with the desired filename & in teh correct folder
but the php in the template is messed up
for example variable names get deleted
so i would have :
= '';
etc
i have included my entire template page below that i want the created pages to be based on & below that is the code for teh page to create the page etc
if anyone has any questions please pm me
thanks in advance
<?php include('storetemplatephpinc.php');
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="keywords" content="<?php echo $row_GetStoreDetails['mkeywords'];?>" />
<meta name="description" content="<?php echo $row_GetStoreDetails['store'];?>"/>
<meta name="robots" content="index,follow,all" />
<meta name="revisit-after" content="1 day" />
<title><?php echo $row_GetStoreDetails['store'];?></title>
<link href="../style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table width="900" height="341" border="0" align="center" cellpadding="5" cellspacing="5" bgcolor="#FFFFFF">
<tr>
<td height="90" colspan="3" valign="top"><img src="../img/logo.jpg" width="392" height="80" align="left" />
<table width="162" border="0" align="right" cellpadding="0" cellspacing="0">
<tr>
<td width="162" valign="top"><!-- AddThis Button BEGIN -->
<script type="text/javascript">addthis_pub = 'cyates';</script>
<span class="storelistings">Social Bookmark The Page</span><a href="http://www.addthis.com/bookmark.php" onmouseover="return addthis_open(this, '', '[URL]', '[TITLE]')" onmouseout="addthis_close()" onclick="return addthis_sendto()"><br />
<img src="http://s9.addthis.com/button1-bm.gif" width="125" height="16" border="0" alt="" /></a>
<script type="text/javascript" src="http://s7.addthis.com/js/152/addthis_widget.js"></script></td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="3" bgcolor="#666699"><a href="http://www.findvouchercodes.com" class="topmenu">Home</a> | <a href="../newdiscounts.php" class="topmenu">New Discounts</a> | <a href="../popularvouchercodes.php" class="topmenu">Most Popular Voucher Codes </a> | <a href="../vouchercodelist.php" class="topmenu">View Voucher Codes By Store</a> </td>
</tr>
<tr>
<td height="29" colspan="3" valign="top" bgcolor="#E9E9EF"><div class="viewstorebyletter">View Store By Letter : <a href="../vouchercodelist.php?letter=09" class="codesbyletter">0-9</a> <a href="../vouchercodelist.php?letter=a" class="codesbyletter">A</a> <a href="../vouchercodelist.php?letter=b" class="codesbyletter">B</a> <a href="../vouchercodelist.php?letter=c" class="codesbyletter">C</a> <a href="../vouchercodelist.php?letter=d" class="codesbyletter">D</a> <a href="../vouchercodelist.php?letter=e" class="codesbyletter">E</a> <a href="../vouchercodelist.php?letter=f" class="codesbyletter">F</a> <a href="../vouchercodelist.php?letter=g" class="codesbyletter">G</a> <a href="../vouchercodelist.php?letter=h" class="codesbyletter">H</a> <a href="../vouchercodelist.php?letter=i" class="codesbyletter">I</a> <a href="../vouchercodelist.php?letter=j" class="codesbyletter">J</a> <a href="../vouchercodelist.php?letter=k" class="codesbyletter">K</a> <a href="../vouchercodelist.php?letter=l" class="codesbyletter">L</a> <a href="../vouchercodelist.php?letter=m" class="codesbyletter">M</a> <a href="../vouchercodelist.php?letter=n" class="codesbyletter">N</a> <a href="../vouchercodelist.php?letter=o" class="codesbyletter">O</a> <a href="../vouchercodelist.php?letter=p" class="codesbyletter">P</a> <a href="../vouchercodelist.php?letter=q" class="codesbyletter">Q</a> <a href="../vouchercodelist.php?letter=r" class="codesbyletter">R</a> <a href="../vouchercodelist.php?letter=s" class="codesbyletter">S</a> <a href="../vouchercodelist.php?letter=t" class="codesbyletter">T</a> <a href="../vouchercodelist.php?letter=u" class="codesbyletter">U</a> <a href="../vouchercodelist.php?letter=v" class="codesbyletter">V</a> <a href="../vouchercodelist.php?letter=w" class="codesbyletter">W</a> <a href="../vouchercodelist.php?letter=x" class="codesbyletter">X</a> <a href="../vouchercodelist.php?letter=y" class="codesbyletter">Y</a> <a href="../vouchercodelist.php?letter=z" class="codesbyletter">Z</a></div>
</td>
</tr>
<tr>
<td width="200" valign="top"><?php include('../leftmenu.php');?></td>
<td valign="top" class="centercolumnborder"><table width="480" border="1" align="center" cellpadding="2" cellspacing="0" bordercolor="#666699" bgcolor="#E9E9EF">
<tr>
<td valign="middle"><form id="addemail" name="addemail" method="post" action="../addtoemail.php">
<span class="normaltxt"><strong><span class="msg"><u><font color="#000000">Get Instant Notification Of New Discounts</font></u><br />
<br />
</span>Full Name :</strong>
<input name="name" type="text" class="normaltxt" id="name" />
</span>
<span class="normaltxt"> <strong>Email Address :</strong></span>
<input name="emailaddress" type="text" class="normaltxt" id="emailaddress" />
<input type="image" name="imageField" src="../img/addme.jpg" />
</form> </td>
</tr>
</table>
<br />
<table width="480" align="center" cellpadding="2" cellspacing="0">
<tr>
<td valign="middle"><h1><a href="http://www.findvouchercodes.com" class="vouchercodetitle"><?php echo $row_GetStoreDetails['store'];?> voucher codes</a></h1>
<p class="normaltxt"> We provide you with <a href="http://www.findvouchercodes.com" class="normaltxt"><strong><?php echo $row_GetStoreDetails['store'];?> voucher codes</strong></a>, <a href="http://www.findvouchercodes.com" class="normaltxt"><strong><?php echo $row_GetStoreDetails['store'];?> promotional codes</strong></a>, <a href="http://www.findvouchercodes.com" class="normaltxt"><strong><?php echo $row_GetStoreDetails['store'];?> discount codes</strong></a> and money off vouchers that will save you money on your online purchases.<br />
<br /><?php echo $row_GetStoreDetails['text'];?>
<br />
</p>
</td>
</tr>
</table>
<br />
<table width="480" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2" valign="middle" bgcolor="#666699" class="catheader"><?php echo $row_GetStoreDetails['store'];?> Voucher Codes</td>
</tr>
<?php do { ?> <?php
// Title URL String Re-Write
$oldtitle = $row_storecodes['title'];
$newtitle = str_replace(' ','-',$oldtitle);
$oldstore = $row_GetStoreDetails['store'];
$newstore = str_replace(' ','-',$oldstore);
?><tr><?php
$vctitlepage = $row_storecodes['title'].".php";
$coderewrite = str_replace('-',' ',$row_storecodes['title'])
;
?>
<td width="324" height="26" valign="middle" bgcolor="#E8E8EE"><font class="vouchertxt"><strong><a href="<?php echo $vctitlepage;?>" class="vouchertxt"><?php echo $coderewrite; ?></a></strong></font></td>
<td width="148" valign="middle" bgcolor="#E8E8EE" class="vouchertxt"><a href="<?php echo $vctitlepage;?>"><img src="../img/viewcodedetails.jpg" width="143" height="26" border="0" align="absmiddle" /></a></td>
</tr>
<tr>
<td colspan="2" valign="middle" class="copytxt"> </td>
</tr>
<?php } while ($row_storecodes = mysql_fetch_assoc($storecodes)); ?>
</table>
<p class="viewstorebyletter"> </p></td>
<td width="160" valign="top"><div align="center" class="rightmenu_a">Selected Retailers </div>
<div>
<div align="center">
<?php do { ?>
<a href="../showstore.php?store=<?php echo $row_SelectedRetailers['store'];?>&storeid=<?php echo $row_SelectedRetailers['storeid'];?>"><img src="<?php echo $row_SelectedRetailers['logo'];?>" alt="<?php echo $row_SelectedRetailers['alt'];?>" border="0" /></a><br />
<?php } while ($row_SelectedRetailers = mysql_fetch_assoc($SelectedRetailers)); ?></div>
</div>
</td>
</tr>
<tr>
<td height="38" colspan="3"><div align="center" class="copytxt"><strong>© Copyright <a href="http://www.findvouchercodes.com" class="copytxt">Find Voucher Codes</a> <?php echo date('Y');?></strong></div></td>
</tr>
</table>
</body>
</html>
<?php
mysql_free_result($GetStoreDetails);
mysql_free_result($SelectedRetailers);
mysql_free_result($StoreVoucherCodes);
mysql_free_result($IndexPageNewsItems);
?>