Tuesday, June 1, 2010

Seassion code for landing page

<body>

<?php

//require_once(JPATH_SITE.DS.'administrator'.DS.'components'.DS.'com_hwdvideoshare'.DS.'libraries'.DS.'smarty'.DS.'Smarty.class.php');

//$smartyvs = new Smarty;



$session = &JFactory::getSession();

$letin = $session->get('letin');


if ($_POST['hid']!=1 && !isset($letin)) {

?>

<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/adult/css/style1.css" type="text/css" />

<div id="land_wrapper">

<div id="land_content">


code for land


>>>>>


</div>

<?php

}

else

{

$session =&JFactory::getSession();

$session->set('letin', 1);

?>


<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/adult/css/style.css" type="text/css" />

<div id="wrapper">

<div id="header">

4 comments:

  1. hmm ok there has another technique...
    just need to check, is active menu is default menu item. the code is,

    $home=false;
    $menu = &JSite::getMenu();
    if ($menu->getActive() == $menu->getDefault()) {
    $home=true;
    }

    if($home){
    ......[code for landing page].....
    }
    else{
    ......[code for common pages].....
    }

    ReplyDelete
  2. Great Posting.This post explain a session code.The code is very quality.I tested it is more useful.
    I need more sample code.Please upload it.Thanks for this article.

    Joomla developer

    ReplyDelete
  3. Thanks For Your Work

    Best Regards,
    Admin RefPTC
    RefPTC.com

    ReplyDelete