function Check(&$Context)
 {
     if ($this->UserID == 0 && !$Context->Configuration['PUBLIC_BROWSING'] || $this->UserID > 0 && !$this->User->PERMISSION_SIGN_IN) {
         if ($this->UserID > 0 && !$this->User->PERMISSION_SIGN_IN) {
             $this->End($Context->Authenticator);
         }
         header('location: ' . AppendUrlParameters($Context->Configuration['SAFE_REDIRECT'], 'ReturnUrl=' . GetRequestUri()));
         die;
     }
 }
 /**
  * Ensure that there is an active session.
  *
  * If there isn't an active session, send the user to the SignIn Url
  *
  * @param Context $Context
  */
 function Check(&$Context)
 {
     if ($this->UserID == 0 && !$Context->Configuration['PUBLIC_BROWSING'] || $this->UserID > 0 && !$this->User->PERMISSION_SIGN_IN) {
         if ($this->UserID > 0 && !$this->User->PERMISSION_SIGN_IN) {
             $this->End($Context->Authenticator);
         }
         $Url = AppendUrlParameters($Context->Configuration['SAFE_REDIRECT'], 'ReturnUrl=' . urlencode(GetRequestUri()));
         Redirect($Url);
     }
 }
 function Check(&$Context)
 {
     //		if (($this->UserID == 0 && !$Context->Configuration['PUBLIC_BROWSING']) || ($this->UserID > 0 && !$this->User->PERMISSION_SIGN_IN)) {
     if ($this->UserID == 0 && $Context->SelfUrl == 'index.php' && ForceIncomingInt('CategoryID', 0) == 0 || $this->UserID > 0 && !$this->User->PERMISSION_SIGN_IN) {
         if ($this->UserID > 0 && !$this->User->PERMISSION_SIGN_IN) {
             $this->End($Context->Authenticator);
         }
         $Url = AppendUrlParameters($Context->Configuration['SAFE_REDIRECT'], 'ReturnUrl=' . urlencode(GetRequestUri()));
         Redirect($Url);
     }
 }
Example #4
0
 function CommentLinks_GoSignIn($Context)
 {
     header('Location: ' . AppendUrlParameters($Context->Configuration['SAFE_REDIRECT'], 'ReturnUrl=' . GetRequestUri()));
     $Context->unload();
     exit(0);
 }
Example #5
0
<?php

// Note: This file is included from the library/Vanilla/Vanilla.Control.Menu.php class.
$this->CallDelegate('PreHeadRender');
echo '
	<div id="Header">
		<div id="Session">
';
if ($this->Context->Session->UserID > 0) {
    echo str_replace('//1', $this->Context->Session->User->Name, $this->Context->GetDefinition('SignedInAsX')) . ' (<a href="' . FormatStringForDisplay(AppendUrlParameters($this->Context->Configuration['SIGNOUT_URL'], 'FormPostBackKey=' . $this->Context->Session->GetCsrfValidationKey())) . '">' . $this->Context->GetDefinition('SignOut') . '</a>)';
} else {
    echo $this->Context->GetDefinition('NotSignedIn') . ' (<a href="' . FormatStringForDisplay(AppendUrlParameters($this->Context->Configuration['SIGNIN_URL'], 'ReturnUrl=' . urlencode(GetRequestUri(0)))) . '">' . $this->Context->GetDefinition('SignIn') . '</a> or
		<a href="' . FormatStringForDisplay(AppendUrlParameters($this->Context->Configuration['REGISTRATION_URL'], 'ReturnUrl=' . urlencode(GetRequestUri(0)))) . '">' . $this->Context->GetDefinition('Register') . '</a>)';
}
echo '
	</div>
	<a name="pgtop"></a>
	<h1>
		' . $this->Context->Configuration['BANNER_TITLE'] . '
	</h1>
	<ul>
';
while (list($Key, $Tab) = each($this->Tabs)) {
    echo '<li' . $this->TabClass($this->CurrentTab, $Tab['Value']) . '><a href="' . $Tab['Url'] . '" ' . $Tab['Attributes'] . '>' . $Tab['Text'] . '</a></li>';
}
echo '
	</ul>
</div>
';
$this->CallDelegate('PreBodyRender');
echo '<div id="Body">';
Example #6
0
  </head>
  <body' . $BodyId . ' ' . $this->Context->BodyAttributes . '>';
?>
<div id="wrapper">
  <div id="header" class="clearfix">
    <h1><a class="logo" href="/" title="link to the home page"> </a></h1>

    <div class="right">

      <div id="user_account">
        <p>
          <?php 
if ($this->Context->Session->UserID > 0) {
    echo str_replace('//1', $this->Context->Session->User->Name, $this->Context->GetDefinition('SignedInAsX')) . ' (<a href="' . $this->Context->Configuration['SIGNOUT_URL'] . '">' . $this->Context->GetDefinition('SignOut') . '</a>)';
} else {
    echo $this->Context->GetDefinition('NotSignedIn') . ' (<a href="' . AppendUrlParameters($this->Context->Configuration['SIGNIN_URL'], 'ReturnUrl=http://www.opencongress.org' . $_SERVER['REQUEST_URI']) . '">' . $this->Context->GetDefinition('SignIn') . '</a>)';
}
?>
      </p>
    </div>
    <div id="search">
    <form action="/forum/search.php" id="SearchSimple" method="get">
        <div class="search">
          <label for="search-field">Search</label>
        <input type="hidden" value="Search" name="PostBackAction"/>
        <input name="Keywords" autocomplete="off" id="txtKeywords" class="search-field" type="text" value="Search Forums" onfocus="this.value = '';" onblur="if (this.value == ''){this.value = 'Search Forums'};"/>
        <input type="image" src="/stylesheets/img/search_submit.gif" name="submit" id="search_submit" value="Search" />
          		
              <ul>
              <li id="SimpleSearchRadios">Search:<input type="radio" class="SearchRadio" checked="checked" value="Topics" id="Radio_Topics" name="Type"/>
      			<label class="Radio" for="Radio_Topics">Topics</label>
Example #7
0
<?php

// Note: This file is included from the library/Vanilla/Vanilla.Control.Menu.php class.
echo '<div id="Session">';
if ($this->Context->Session->UserID > 0) {
    echo str_replace('//1', $this->Context->Session->User->Name, $this->Context->GetDefinition('SignedInAsX')) . ' (<a href="' . $this->Context->Configuration['SIGNOUT_URL'] . '">' . $this->Context->GetDefinition('SignOut') . '</a>)';
} else {
    echo $this->Context->GetDefinition('NotSignedIn') . ' (<a href="' . AppendUrlParameters($this->Context->Configuration['SIGNIN_URL'], 'ReturnUrl=' . GetRequestUri()) . '">' . $this->Context->GetDefinition('SignIn') . '</a>)';
}
echo '</div>';
$this->CallDelegate('PreHeadRender');
echo '<div id="Header">
			<a name="pgtop"></a>
			<h1>
				' . $this->Context->Configuration['BANNER_TITLE'] . '
			</h1>
			
			<ul>';
while (list($Key, $Tab) = each($this->Tabs)) {
    echo '<li' . $this->TabClass($this->CurrentTab, $Tab['Value']) . '><a href="' . $Tab['Url'] . '" ' . $Tab['Attributes'] . '>' . $Tab['Text'] . '</a></li>';
}
echo '</ul>
   </div>';
$this->CallDelegate('PreBodyRender');
echo '<div id="Body">';
Example #8
0
<?php

// Note: This file is included from the library/Vanilla/Vanilla.Control.Menu.php class.
echo '<div id="Session">';
if ($this->Context->Session->UserID > 0) {
    echo str_replace('//1', $this->Context->Session->User->Name, $this->Context->GetDefinition('SignedInAsX')) . ' (<a href="' . FormatStringForDisplay(AppendUrlParameters($this->Context->Configuration['SIGNOUT_URL'], 'FormPostBackKey=' . $this->Context->Session->GetCsrfValidationKey())) . '">' . $this->Context->GetDefinition('SignOut') . '</a>)';
} else {
    echo $this->Context->GetDefinition('NotSignedIn') . ' (<a href="' . FormatStringForDisplay(AppendUrlParameters($this->Context->Configuration['SIGNIN_URL'], 'ReturnUrl=' . urlencode(GetRequestUri(0)))) . '">' . $this->Context->GetDefinition('SignIn') . '</a>)';
}
echo '</div>';
$this->CallDelegate('PreHeadRender');
echo '<div id="Header">
			<a name="pgtop"></a>
			<h1>
				' . $this->Context->Configuration['BANNER_TITLE'] . '
			</h1>

			<ul>';
while (list($Key, $Tab) = each($this->Tabs)) {
    echo '<li' . $this->TabClass($this->CurrentTab, $Tab['Value']) . '><a href="' . $Tab['Url'] . '" ' . $Tab['Attributes'] . '>' . $Tab['Text'] . '</a></li>';
}
echo '</ul>
	</div>';
$this->CallDelegate('PreBodyRender');
echo '<div id="Body">';