Raivis.purins Posted May 22, 2009 Report Share Posted May 22, 2009 Kā pareizi uztaisīt valodas sesiju? Ja viena valoda ar ceļu uz db ir a1, kur otra ir a2. Gribu uztaisīt tā, lai pie valodas maiņas tiktu mainīti arī daži lapas nosacījumi, piemēram logucis attiecīgajā valodā. Iepriekš pateicos! Quote Link to comment Share on other sites More sharing options...
Grey_Wolf Posted May 22, 2009 Report Share Posted May 22, 2009 if(isset($_GET['val'])) { // iesetojam valodu $valoda=$_GET['val']; $_SESSION['valoda']=$valoda; } if(isset($_SESSION['valoda'])) { $valoda=$_SESSION['valoda']; } else { $valoda=1; $_SESSION['valoda']=1; } include('valodas/valoda'.$valoda.'.php') $logo='logo'.$valoda.'.jpg'; aptuveni sadi .. Kur katra valoda nodefineta ar kaadu ciparu ( vai simbolu virkni), un includojamie/mainamie faili atskjiras tieshi ar sho ciparu.... Quote Link to comment Share on other sites More sharing options...
Raivis.purins Posted May 22, 2009 Author Report Share Posted May 22, 2009 Paldies! Man te šitādu variantu piespēlēja print '<img src="/bla/bla/bla/header'.(($url[1]=='lat')?'':'_eng').'.png">'; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.