johnme Posted December 14, 2010 Share Posted December 14, 2010 Hi any one Can Help me I create one Custom page .. pravite.php Only register users can can view this page or registered user must Dispplay message like (Hey Register view this page)How to Do please any one Help me Link to comment Share on other sites More sharing options...
johnme Posted December 14, 2010 Author Share Posted December 14, 2010 any body can help me i need this emergency Link to comment Share on other sites More sharing options...
jacky75 Posted December 14, 2010 Share Posted December 14, 2010 If I'm not wrong using the following code in your pageglobal $cookie;if (!$cookie->isLogged()) Tools::redirect('index.php');you can check if the user is logged. If you change the behaviour on the if condition, I think you could achieve your goal. Link to comment Share on other sites More sharing options...
jthosoda Posted December 14, 2010 Share Posted December 14, 2010 i do it like this, keep the cms page hidden, use {if $logged} in the blocklink module. i dont know if is that you want, but only the logged user will see the link to that particulary page Link to comment Share on other sites More sharing options...
johnme Posted December 14, 2010 Author Share Posted December 14, 2010 i do it like this, keep the cms page hidden, use {if $logged} in the blocklink module. i dont know if is that you want, but only the logged user will see the link to that particulary page IN my pravite.php page like this <?php include(dirname(__FILE__).'/config/config.inc.php'); include(dirname(__FILE__).'/header.php'); $varri = "http://localhost/mypravite/index.php"; ?> <iframe src=<?php print $varri; ?> width=100% height=800 frameborder="0"> </iframe> <?php include(dirname(__FILE__).'/footer.php'); ?> Where Could i add your code here Link to comment Share on other sites More sharing options...
jthosoda Posted December 14, 2010 Share Posted December 14, 2010 i would sugest use {if $logged} in the template file. much easier and safe. Link to comment Share on other sites More sharing options...
johnme Posted December 14, 2010 Author Share Posted December 14, 2010 If I'm not wrong using the following code in your pageglobal $cookie;if (!$cookie->isLogged()) Tools::redirect('index.php');you can check if the user is logged. If you change the behaviour on the if condition, I think you could achieve your goal. Thanks it work Great .. i have use like this mypravite.php <?php include(dirname(__FILE__).'/config/config.inc.php'); include(dirname(__FILE__).'/header.php'); global $cookie; if (!$cookie->isLogged()) Tools::redirect('index.php'); $varri = "http://mydomain.com/vip/index.php"; ?> <iframe src=<?php print $varri; ?> width=100% height=800 frameborder="0"> </iframe> <?php include(dirname(__FILE__).'/footer.php'); i have Some file rar , zip , exe Extension File in my root /public_html/prestashop/vipfiles/How to display this files in mypravite.php fileFor download it is possible please help me thanks a lot Link to comment Share on other sites More sharing options...
Recommended Posts