Puika1 Posted June 18, 2009 Report Share Posted June 18, 2009 kādam nau scriptiņš vai kā to var izdarīt,piem ja neesi foruma ielogojies (IPB) tad php lapelē rāda lūdzu ielogojies,piemēram nerāda saturu pirms neielogojies Quote Link to comment Share on other sites More sharing options...
marcis Posted June 18, 2009 Report Share Posted June 18, 2009 if(!ir_ielogojies){ die('ej ielogojies...'); } Kā uzzināt vai viņš ir ielogojies... Te jau 100+ tēmas par to ir bijušas. Quote Link to comment Share on other sites More sharing options...
Puika1 Posted June 18, 2009 Author Report Share Posted June 18, 2009 if(!ir_ielogojies){ die('ej ielogojies...'); } šitasi tikai jāieliek php failā un viss? Quote Link to comment Share on other sites More sharing options...
marcis Posted June 18, 2009 Report Share Posted June 18, 2009 Protams, ar pareizu IF nosacījumu. Quote Link to comment Share on other sites More sharing options...
Puika1 Posted June 18, 2009 Author Report Share Posted June 18, 2009 kāds pareiz IF nosacījums varētu izskatīties? Quote Link to comment Share on other sites More sharing options...
marcis Posted June 18, 2009 Report Share Posted June 18, 2009 Neliec man sevi citēt vēlreiz. Meklē tapat forumā. Quote Link to comment Share on other sites More sharing options...
Kemito Posted June 18, 2009 Report Share Posted June 18, 2009 Nu pārtaisi login kuru, ja ielogojies redirektē uz tavu izvelēto lapu, bet pirms nav SESSIJA ['ID'] nelaiž klāt nekam, ja ielogojas sākas SESSIJA ID :) Vismaz es tā darīju un domāju, ka tā varētu būt pareizi :P Quote Link to comment Share on other sites More sharing options...
Puika1 Posted June 19, 2009 Author Report Share Posted June 19, 2009 nezinu kapēc bet nesapratu Quote Link to comment Share on other sites More sharing options...
NoBrains` Posted June 19, 2009 Report Share Posted June 19, 2009 tākā šī sadaļa ir priekš iesācējiem, lūgums, visiem kas zin kā to izdarīt... lūdzu, paskaidrojiet nedaudz sīkāk. Quote Link to comment Share on other sites More sharing options...
kechums Posted June 19, 2009 Report Share Posted June 19, 2009 marcis taču jums uzrakstīja pareizu shēmu 2. postā. Izmantot var to, kas ir pieejams sesijā vai cepumā. if($_COOKIE['member_id'] < 1) { die('ej ielogoties'); } Quote Link to comment Share on other sites More sharing options...
Puika1 Posted June 20, 2009 Author Report Share Posted June 20, 2009 labi kautko jau sapratu bet ka man izdarit lai rada saturu,kad esmu ielogojies man rada baltu lapu ka izlogojies man rada ej ielogoties Quote Link to comment Share on other sites More sharing options...
kechums Posted June 20, 2009 Report Share Posted June 20, 2009 Papildini to kodu ar else. if($_COOKIE['member_id'] < 1) { die('ej ielogoties'); } else { echo "malacis, tu esi ielogojies"; te taalaak naaks viss tavs saturs } Quote Link to comment Share on other sites More sharing options...
Puika1 Posted June 20, 2009 Author Report Share Posted June 20, 2009 vel projām mazliet nesaprotu te taalaak naaks viss tavs saturs tur man iekļaut visu index lapu? Quote Link to comment Share on other sites More sharing options...
kechums Posted June 20, 2009 Report Share Posted June 20, 2009 Ievietojot šo kodu pašā faila augšā būs tā, ka situācijā, ja tu esi ielogojies, rādīsies viss tavs lapas saturs, ja nebūsi ielogojies, tad šis nosacījums piepildīsies un saturs nerādīsies, tikai teksts 'ej ielogoties'. if($_COOKIE['member_id'] < 1) { die('ej ielogoties'); } Quote Link to comment Share on other sites More sharing options...
Puika1 Posted June 20, 2009 Author Report Share Posted June 20, 2009 ka vienmēr liels paldies jums viss sanācaa ;) 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.