/**
  * Show a listing of all temperatures.
  */
 public function Index()
 {
     $if = new CInterceptionFilter();
     $access = $if->AdminOrForbidden();
     $next = t("The next days spotprice is released 16:00 from NordPool's ftp server. Here we show the setvalues per hour to avoid buying electricity when the price is high.");
     $get = t('Get current spotprice');
     $translate = t('Update translations');
     $this->views->SetTitle('Spotprice Controller')->AddInclude(__DIR__ . '/index.tpl.php', array('html' => $this->createTable(), 'isTemps' => $this->textfiles->getIsTemps(), 'tablespot' => $this->createSpot(), 'header' => null, 'todaysDate' => $this->todaysDate, 'todayArray' => $this->textfiles->getCurrentCommaValues(), 'tomorrowsDate' => $this->tomorrowsDate, 'tomorrowArray' => $this->textfiles->getTomCommaValues(), 'text' => $next, 'get' => $get, 'translate' => $translate));
 }
*
*    Description: taking care of account-updating process
*
*    Author: Niklas Odén
*
***********************************************************************************************/

//---------------------------------------------------------------------------------------------
//
//   Interception filter
//

if(!$frontDoor) 
	die('No direct access to pagecontroller allowed!');

$iFilter = new CInterceptionFilter();
$iFilter->FrontControllerIsVisited();
$iFilter->UserLoginStatus();

//---------------------------------------------------------------------------------------------
//
//    pagecontroller
//

$pc = new CPageController();

//---------------------------------------------------------------------------------------------
//
//    taking care of post variables
//
 /**
  * Singleton pattern. Get the instance of the latest created object or create a new one. 
  *
  * @return CBehovsboboxen The instance of this class.
  */
 public static function Instance()
 {
     return is_null(self::$instance) ? self::$instance = new static() : self::$instance;
 }
 /**
  * Check if user acronym in form matches user acronym in session.
  *
  * @param string $acronym the acronym from the form.
  */
 public function MatchAcronymToSession($acronym)
 {
     return CInterceptionFilter::Instance()->SessionUserMatches($acronym);
 }
Exemple #5
0
/*********************************************************************************************
*
*    Description: form for new message
*
*    Author: Niklas Odén
*
***********************************************************************************************/

$pc = new CPageController();

//---------------------------------------------------------------------------------------------
//	interceptionfilter
//
//

$iFilter = new CInterceptionFilter();
$iFilter->FrontControllerIsVisited();
$iFilter->UserLoginStatus();

//---------------------------------------------------------------------------------------------
//
//    error reporting on
//
error_reporting(E_ALL);

//---------------------------------------------------------------------------------------------
//
//	connecting required files
//

require_once(TP_SQLPATH . 'config.php');
*
*    Description: processing a new comment
*
*    Author: Niklas Odén
*
***********************************************************************************************/

//---------------------------------------------------------------------------------------------
//
//   Interception filter
//

if(!$frontDoor) 
	die('No direct access to pagecontroller allowed!');

$iFilter = new CInterceptionFilter();
$iFilter->FrontControllerIsVisited();
//$iFilter->UserLoginStatus();

//---------------------------------------------------------------------------------------------
//
//    taking care of post and post variables
//

$messageId = isset($_POST['messageId']) ? $_POST['messageId'] : '';
$newComment = isset($_POST['newComment']) ? $_POST['newComment'] : '';
$commentTitle = isset($_POST['commentTitle']) ? $_POST['commentTitle'] : '';
$commentSignature = isset($_POST['commentSignature']) ? $_POST['commentSignature'] : '';
$commentMail = isset($_POST['commentMail']) ? $_POST['commentMail'] : '';

//---------------------------------------------------------------------------------------------
	function __construct() {
		
		if(SESSION_TIME != 0) {
			CInterceptionFilter::SessionExpireTime();
		}
	}
Exemple #8
0
*    Description: form for new message
*
*    Author: Niklas Odén
*
***********************************************************************************************/


//---------------------------------------------------------------------------------------------
//
//   Interception filter
//

if(!$frontDoor) 
	die('No direct access to pagecontroller allowed!');

$iFilter = new CInterceptionFilter();
$iFilter->FrontControllerIsVisited();
//$iFilter->UserLoginStatus();
//$iFilter->UserGroupStatus();

//---------------------------------------------------------------------------------------------
//
//	connecting required files
//

require_once(TP_SQLPATH . 'config.php');
require_once(TP_SQLPATH . 'CSQL.php');

//---------------------------------------------------------------------------------------------
//
//   creating necessary objects
 public function Passwordservice()
 {
     $if = new CInterceptionFilter();
     $access = $if->AdminOrForbidden();
     $acronym;
     $pass1;
     $pass2;
     $name;
     $email;
     $id;
     if (isset($_POST) && $_POST) {
         $acronym = $_POST['acronym'];
         $pass1 = $_POST['pass1'];
         $pass2 = $_POST['pass2'];
         $name = $_POST['name'];
         $email = $_POST['email'];
         $id = $_POST['id'];
     } else {
         echo 'no post<br />';
     }
     $this->user->UpdateMember($acronym, $pass1, $pass2, $name, $email, $id);
 }