Robie sobie właśnie stronke, i mam problem z przekazaniem zmiennej $language, którą przypisuje przy kliknięciu na np. Język Polski. Oto jak to wygląda:
index2.php
<?php $acms_root_path = "./"; $acms_last_path = "http://192.168.120.1/~www/"; include($acms_root_path . "include/startinclude.inc"); if ($mode=='polski') { $language="polski"; $_SESSION['lang'] = $language; metastart("Witamy na oficjalnej stronie Internetowej - www.djmassive.com"); require($acms_root_path . 'templates/index_site.tpl'); exit; } if ($mode=='english') { $language='english'; metastart("Welcome to official web site - www.djmassive.com"); require($acms_root_path . 'templates/index_site.tpl'); exit; } ?>
Strona index_site.tpl wyświetla się idealnie, i widzi zmienną $language.
index_site.tpl
<?php include($acms_root_path . "language/" . $language . ".php"); echo "<base target='I1'> <head> <script language='JavaScript' fptype='dynamicanimation'> <!-- function dynAnimation() {} function clickSwapImg() {} //--> </script> <script language='JavaScript1.2' fptype='dynamicanimation' src='file:///C:/Program%20Files/Microsoft%20Office/Office10/fpclass/animate.js'></script> </head> <div align='center'> <center> <table border='2' cellpadding='0' cellspacing='0' style='border-collapse: collapse' bordercolor='#111111' width='740' id='AutoNumber4' bgcolor='#FFFFFF' height='396'> <tr> <td width='100%' height='396'> <table border='0' cellpadding='0' cellspacing='0' style='border-collapse: collapse' bordercolor='#111111' width='100%' id='AutoNumber5'> <tr> <td width='100%'> <img border='0' src='images/main_1.gif' width='740' height='33'></td> </tr> <tr> <td width='100%'> <a onmouseover='document['fpAnimswapImgFP1'].imgRolln=document['fpAnimswapImgFP1'].src;document['fpAnimswapImgFP1'].src=document['fpAnimswapImgFP1'].lowsrc;' onmouseout='document['fpAnimswapImgFP1'].src=document['fpAnimswapImgFP1'].imgRolln' title='Home' target='_top' href='index.php'> <img border='0' src='images/".$language."/home0.gif' id='fpAnimswapImgFP1' name='fpAnimswapImgFP1' dynamicanimation='fpAnimswapImgFP1' lowsrc='images/".$language."/home1.gif' width='98' height='33'></a><a target='I1' onmouseover='document['fpAnimswapImgFP2'].imgRolln=document['fpAnimswapImgFP2'].src;document['fpAnimswapImgFP2'].src=document['fpAnimswapImgFP2'].lowsrc;' onmouseout='document['fpAnimswapImgFP2'].src=document['fpAnimswapImgFP2'].imgRolln' title='".$about."' href='aboutme.php'><img border='0' src='images/".$language."/aboutme0.gif' id='fpAnimswapImgFP2' name='fpAnimswapImgFP2' dynamicanimation='fpAnimswapImgFP2' lowsrc='images/".$language."/aboutme1.gif' width='59' height='33'></a><a onmouseover='document['fpAnimswapImgFP3'].imgRolln=document['fpAnimswapImgFP3'].src;document['fpAnimswapImgFP3'].src=document['fpAnimswapImgFP3'].lowsrc;' onmouseout='document['fpAnimswapImgFP3'].src=document['fpAnimswapImgFP3'].imgRolln' title='".$production."' href='releases.php'><img border='0' src='images/".$language."/releases0.gif' id='fpAnimswapImgFP3' name='fpAnimswapImgFP3' dynamicanimation='fpAnimswapImgFP3' lowsrc='images/".$language."/releases1.gif' width='57' height='33'></a><a onmouseover='document['fpAnimswapImgFP4'].imgRolln=document['fpAnimswapImgFP4'].src;document['fpAnimswapImgFP4'].src=document['fpAnimswapImgFP4'].lowsrc;' onmouseout='document['fpAnimswapImgFP4'].src=document['fpAnimswapImgFP4'].imgRolln' title='".$ontour."' href='on-tour.php'><img border='0' src='images/".$language."/ontour0.gif' id='fpAnimswapImgFP4' name='fpAnimswapImgFP4' dynamicanimation='fpAnimswapImgFP4' lowsrc='images/".$language."/ontour1.gif' width='52' height='33'></a><a onmouseover='document['fpAnimswapImgFP5'].imgRolln=document['fpAnimswapImgFP5'].src;document['fpAnimswapImgFP5'].src=document['fpAnimswapImgFP5'].lowsrc;' onmouseout='document['fpAnimswapImgFP5'].src=document['fpAnimswapImgFP5'].imgRolln' title='".$download."' href='download.php'><img border='0' src='images/".$language."/download0.gif' id='fpAnimswapImgFP5' name='fpAnimswapImgFP5' dynamicanimation='fpAnimswapImgFP5' lowsrc='images/".$language."/download1.gif' width='57' height='33'></a><a onmouseover='document['fpAnimswapImgFP6'].imgRolln=document['fpAnimswapImgFP6'].src;document['fpAnimswapImgFP6'].src=document['fpAnimswapImgFP6'].lowsrc;' onmouseout='document['fpAnimswapImgFP6'].src=document['fpAnimswapImgFP6'].imgRolln' title='".$guest."' href='http://djmassive.com/modules/guestbook/index.php'><img border='0' src='images/".$language."/gb0.gif' id='fpAnimswapImgFP6' name='fpAnimswapImgFP6' dynamicanimation='fpAnimswapImgFP6' lowsrc='images/".$language."/gb1.gif' width='72' height='33'></a><a onmouseover='document['fpAnimswapImgFP7'].imgRolln=document['fpAnimswapImgFP7'].src;document['fpAnimswapImgFP7'].src=document['fpAnimswapImgFP7'].lowsrc;' onmouseout='document['fpAnimswapImgFP7'].src=document['fpAnimswapImgFP7'].imgRolln' title='".$forum."' href='http://community.djmassive.com' target='_blank'><img border='0' src='images/".$language."/forum0.gif' id='fpAnimswapImgFP7' name='fpAnimswapImgFP7' dynamicanimation='fpAnimswapImgFP7' lowsrc='images/".$language."/forum1.gif' width='42' height='33'></a><a onmouseover='document['fpAnimswapImgFP8'].imgRolln=document['fpAnimswapImgFP8'].src;document['fpAnimswapImgFP8'].src=document['fpAnimswapImgFP8'].lowsrc;' onmouseout='document['fpAnimswapImgFP8'].src=document['fpAnimswapImgFP8'].imgRolln' title='".$booking."' href='booking.php'><img border='0' src='images/".$language."/booking0.gif' id='fpAnimswapImgFP8' name='fpAnimswapImgFP8' dynamicanimation='fpAnimswapImgFP8' lowsrc='images/".$language."/booking1.gif' width='52' height='33'></a><a onmouseover='document['fpAnimswapImgFP9'].imgRolln=document['fpAnimswapImgFP9'].src;document['fpAnimswapImgFP9'].src=document['fpAnimswapImgFP9'].lowsrc;' onmouseout='document['fpAnimswapImgFP9'].src=document['fpAnimswapImgFP9'].imgRolln' title='".$links."' href='friends.php'><img border='0' src='images/".$language."/friends0.gif' id='fpAnimswapImgFP9' name='fpAnimswapImgFP9' dynamicanimation='fpAnimswapImgFP9' lowsrc='images/".$language."/friends1.gif' width='59' height='33'></a><a onmouseover='document['fpAnimswapImgFP10'].imgRolln=document['fpAnimswapImgFP10'].src;document['fpAnimswapImgFP10'].src=document['fpAnimswapImgFP10'].lowsrc;' onmouseout='document['fpAnimswapImgFP10'].src=document['fpAnimswapImgFP10'].imgRolln' title='".$contact."' href='contact.php'><img border='0' src='images/".$language."/contact0.gif' id='fpAnimswapImgFP10' name='fpAnimswapImgFP10' dynamicanimation='fpAnimswapImgFP10' lowsrc='images/".$language."/contact1.gif' width='154' height='33'></a><img border='0' src='images/".$language."/end.gif' width='38' height='33'></td> </tr> <tr> <td width='100%'> <img border='0' src='images/main_2.jpg' width='266' height='119'><img border='0' src='images/main_3.jpg' width='158' height='119'><img border='0' src='images/main_4.jpg' width='316' height='119'></td> </tr> <tr> <td width='100%'> <img border='0' src='images/main_5.gif' width='266' height='69'><img border='0' src='images/main_6.gif' width='474' height='69'></td> </tr> <tr> <td width='100%'> <table border='0' cellpadding='0' cellspacing='0' style='border-collapse: collapse' bordercolor='#111111' width='100%' id='AutoNumber6' height='1'> <tr> <td width='35%' height='1'> <table border='0' cellpadding='0' cellspacing='0' style='border-collapse: collapse' bordercolor='#111111' width='100%' id='AutoNumber7' bgcolor='#5F7B2A'> <tr> <td width='100%' bgcolor='#5F7B2A'> <object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,42,0' id='Movie1' width='240' height='164' align='absmiddle'> <param name='movie' value='images/tvflash.swf'> <param name='quality' value='High'> <param name='bgcolor' value='FFFFFF'> <param name='_cx' value='6350'> <param name='_cy' value='4339'> <param name='FlashVars' value> <param name='Src' value='images/tvflash.swf'> <param name='WMode' value='Window'> <param name='Play' value='-1'> <param name='Loop' value='-1'> <param name='SAlign' value> <param name='Menu' value='0'> <param name='Base' value> <param name='AllowScriptAccess' value='always'> <param name='Scale' value='ShowAll'> <param name='DeviceFont' value='0'> <param name='EmbedMovie' value='0'> <param name='SWRemote' value> <param name='MovieData' value> <param name='SeamlessTabbing' value='1'> <embed name='Movie1' src='images/tvflash.swf' quality='high' bgcolor='#FFFFFF' swLiveConnect='true' width='266' height='181' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'></embed></object> </td> </tr> <tr> <td width='100%' bgcolor='#5F7B2A'> <iframe src='subskrypcja.php?mode=formularz&language=".$language."' height='95' width='270' name='subscribe' align='texttop' border='0' frameborder='0' target='_blank' scrolling='no'></iframe> </td> </tr> </table> </td> <td width='65%' height='1' bgcolor='#5F7B2A'> <iframe src='home.php' height='246' width='470' name='I1' align='texttop' border='0' frameborder='0' target='_blank'></iframe></td> </tr> </table> </td> </tr> </table> </td> </tr> </table> </center> </div> ?>
problem powstaje przy pierwszej iframe, czyli:
<iframe src='subskrypcja.php?mode=formularz&language=".$language."' height='95' width='270' name='subscribe' align='texttop' border='0' frameborder='0' target='_blank' scrolling='no'></iframe>
w ten sposób udało mi się przesłać do pliku subskrypcja zmienną language, ale...
<?php /*************************************************************************** * subscribe.tpl * ------------------- * begin : 11.09.2005 * copyright : (C) 2005 Miskiewicz Grzegorz * email : awcms@djmassive.com * ***************************************************************************/ include('include/startinclude.inc'); if ($mode=='formularz') { include("language/$language.php"); // tutaj pobiera mi ładnie echo "<div align='center'> <center> <table border='0' cellpadding='0' cellspacing='0' width='250' height='65' style='border-collapse: collapse' bordercolor='#111111'> <tr> <td width='100%'> <form method='POST' action='subskrypcja.php?mode=dodaj'> <p align='justify' class='tekst_small_5' style='margin-top: 0; margin-bottom: 0'>".$subscribe_info."</p> <p align='center' style='margin-bottom: 0; margin-top:10'> <input type='text' name='submail' size='38' style='font-family: Tahoma; font-size: 8pt'></p> <p align='center' style='margin-top: 10; margin-bottom: 0'> <input type='submit' value='dodaj' name='submit1' style='font-family: Tahoma; font-size: 8pt; font-variant: small-caps'> <input type='submit' value='wypisz' name='submit' style='font-family: Tahoma; font-size: 8pt; font-variant: small-caps'></p> </form> </td> </tr> </table> </center> </div>"; } if ($mode=='dodaj') { include("language/$language.php"); //ale tutaj już nie :( $check="SELECT email FROM subskrypcja"; $dane="INSERT INTO subskrypcja VALUES ('$submail','$data')"; if (($submail==$row['email']) || ($submail=='')) { $sad="0"; } else $sad="500"; } if ($sad=="500") { } if ($submit=='wypisz') { $check="SELECT * FROM subskrypcja"; if ($submail==$row['email']) { $sid="500"; } else $sid="0"; } if ($sid=="500") { $mail=$submail; $dane="DELETE FROM subskrypcja WHERE email='$mail'"; echo "<p class='n2' align='center'>Adres: $mail został pomyślnie usunięty z bazy danych. Nie będziesz już od nas
otrzymywał maili informacyjnych.</p>"; } ?>
jak to mam zrobić
