Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Wyświetlanie tylko dla użytkownika
Ziom73
post
Post #1





Grupa: Zarejestrowani
Postów: 140
Pomógł: 1
Dołączył: 8.04.2009
Skąd: Polanica Zdrój | Poznań | Wrocław

Ostrzeżenie: (0%)
-----


Mam PHPLogin, i chciałbym zrobić stronę" index.php" , żeby niezalogowanych wywalało na login.php, a zalogowanym się pokazała strona.
Cytat
================================================================================
=
HOW TO INSTALL
================================================================================
=

1. Run keygen.php

2. Run install.php in your browser and enter the configuration details.

================================================================================
=
WHERE TO ASK HELP
================================================================================
=
For any help please use the forums. http://www.phplogin.net/forum/

================================================================================
=
HOW TO APPLY RESTRICTIONS
================================================================================
=
From the admin control panel, click on the "generate code" button and
select the groups that are allowed to see a certain page. Copy the code
that the wizard outputs and place it at the very start of the page.

================================================================================
=
Aby wyświetlić zawartość tylko dla zalogowanych, TYLKO DLA UŻYTKOWNIKÓW:
================================================================================
=
<?php
if ( $login->is_logged_in () ):
?>
Content here for logged in members
<?php
endif;
?>

================================================================================
==
Aby wyświetlić zawartość tylko dla niezalogowanych, TYLKO DLA GOŚĆI:
================================================================================
==
<?php
if ( ! $login->is_logged_in () ):
?>
Content here for guests
<?php
endif;
?>

================================================================================
==
Aby wyświetlić zawartość tylko dla adminów:
================================================================================
==
<?php
if ( $login->isadmin () ):
?>
Content here for the admin only
<?php
endif;
?>

================================================================================
==
THINGS TO REMEMBER
================================================================================
==

settings.php always needs to be included in your php pages (where you want
restrictions applied).
================================================================================
=
CREDITS
================================================================================
=
FAMFAMFAM (icons used) http://www.famfamfam.com/lab/icons/silk/
EZSQL http://www.justinvincent.com
Codeigniter http://www.codeigniter.com

Robię tak:
  1. <body>
  2. <center>
  3.    <?php
  4.             include ('login/settings.php');
  5.        if ( ! $login->is_logged_in () ):
  6.    ?>
  7. <?php
  8. header("Location: login/login.php");
  9. ?>
  10.       <?php
  11.        endif;
  12.       ?>
  13.  
  14.  
  15.    <?php
  16.             include ('login/settings.php');
  17.        if ( $login->is_logged_in () ):
  18.    ?>
  19. hehe
  20.    <?php
  21.        endif;
  22.    ?>
  23. </center>
  24. </body>

i nie działa ;/

Ten post edytował Ziom73 24.04.2009, 21:46:16
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 22.08.2025 - 15:34