Advertisement
Guest User

ParseLogin

a guest
Aug 4th, 2015
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.81 KB | None | 0 0
  1. private function ParseLogin()
  2.     {
  3.         $LoginForm          = explode('[LOGIN_FORM_OFF]', $this->Template);
  4.         $LoginForm2         = explode('[/LOGIN_FORM_OFF]', $LoginForm[1]);
  5.        
  6.         $PanelAccount       = explode('[LOGIN_FORM_ON]', $LoginForm2[1]);
  7.         $PanelAccount2      = explode('[/LOGIN_FORM_ON]', $PanelAccount[1]);
  8.        
  9.         $LoginOffLink       = explode('[LOGIN_LINK_OFF]', $LoginForm[0]);
  10.         $LoginOffLink2      = explode('[/LOGIN_LINK_OFF]', $LoginOffLink[1]);
  11.        
  12.         $LoginOnLink        = explode('[LOGIN_LINK_ON]', $LoginOffLink2[1]);
  13.         $LoginOnLink2       = explode('[/LOGIN_LINK_ON]', $LoginOnLink[1]);
  14.        
  15.         if(!isset($_SESSION['id']) || $_SESSION['id'] == 0)
  16.             $LoginForm[0] = $LoginOffLink[0].$LoginOffLink2[0].$LoginOnLink[0].$LoginOnLink2[1];
  17.         else
  18.             $LoginForm[0] = $LoginOffLink[0].$LoginOnLink[0].$LoginOnLink2[0].$LoginOnLink2[1];
  19.        
  20.         $CompteInfo         = Account::GetInfo($this->bdd);
  21.        
  22.         if(isset($_SESSION['login']) && isset($_SESSION['id']))
  23.         {
  24.             $LoginForm[0] = $this->ReplaceIfExist($LoginForm[0], '[PANEL_ACCOUNTNAME]', strtolower($_SESSION['login']));
  25.             $LoginForm[0] = $this->ReplaceIfExist($LoginForm[0], '[PANEL_NOTIFNBR]', $CompteInfo->NotifNbr);
  26.             $LoginForm[0] = $this->ReplaceIfExist($LoginForm[0], '[PANEL_MPNBR]', $CompteInfo->MpNbr);
  27.             $LoginForm[0] = $this->ReplaceIfExist($LoginForm[0], '[PANEL_FRIENDNBR]', $CompteInfo->FriendNbr);
  28.             $LoginForm[0] = $this->ReplaceIfExist($LoginForm[0], '[PANEL_POINTSHIN]', $CompteInfo->Points);
  29.             $LoginForm[0] = $this->ReplaceIfExist($LoginForm[0], '[PANEL_POINTVOTE]', $CompteInfo->PointsVote);
  30.        
  31.             $PanelAccount2[0] = $this->ParseLogged($PanelAccount2[0]);
  32.         }      
  33.        
  34.         $this->Template = (isset($_SESSION['login']) && isset($_SESSION['id'])) ? $LoginForm[0].$PanelAccount[0].$PanelAccount2[0].$PanelAccount2[1] : $LoginForm[0].$LoginForm2[0].$PanelAccount[0].$PanelAccount2[1];
  35.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement