示例#1
0
 protected function setOptions()
 {
     parent::setOptions();
     $this->setOption('user', TFUser::getInstance()->getId());
     $this->setOption('permissions', TFUser::getInstance()->getPermissionIds(false));
     if (defined('_DEBUG_')) {
         $this->setOption('debug', _DEBUG_);
     }
     $inputs = array($_GET, $_POST);
     foreach ($inputs as $input) {
         foreach ($input as $key => $var) {
             $this->setOption($key, $var);
         }
     }
 }
示例#2
0
 /**
  * re-creates the user instance
  * @access public
  * @static
  */
 public static function regenerate()
 {
     $_SESSION['TFUser'] = self::$_instance = new TFUserM(array('id' => self::$_id, 'debug' => self::isDebug()));
 }
示例#3
0
<?php if ($this->model->getAdmin()==TFUser::getInstance()->getId()):?>
	<?php if ($this->model->getRestricted()==false):?>
		<a href='<?php echo $this->bPath;?>forum/restrict/<?php echo $this->model->getId();?>'>Restrict Forum</a> |
	<?php endif;?>
	<?php if ($this->model->getClosed()==false):?>
		<a href='<?php echo $this->bPath;?>forum/close/<?php echo $this->model->getId();?>'>Close Forum</a> |
	<?php endif;?>
	<?php if ($this->model->getRestricted() || $this->model->getClosed()):?>
		<a href='<?php echo $this->bPath;?>forum/free/<?php echo $this->model->getId();?>'>Free Forum</a>
	<?php endif;?>
<?endif;?>
<a href='<?php echo $this->bPath;?>message/new/forum/<?php echo $this->model->getId();?>'>add a message</a>
<?php
while ($msg = $this->model->getMessage()):?>
<div class='msg-container' style = 'margin-left:<?php echo ($msg->getDepth()*30);?>px'>
	<h3><a href='<?php echo $this->bPath;?>message/view/<?php echo $msg->getId();?>'>
		<?php echo $msg->getTitle();?></a></h3>
		<ul class='message'>
			<li>User: <a href="<?php echo $this->bPath;?>user/open/<?php echo $msg->getUserId();?>"><?php echo $msg->getUserName();?></a></li>
			<li>On <?php echo $msg->getTime();?></li>
			<li class='body'><?php echo $msg->getMessage();?></li>
			<li>
				<a href='<?php echo $this->bPath;?>message/new/forum/<?php echo $this->model->getId();?>/parent/<?php echo $msg->getId();?>'>
					post a response</a>
			</li>
		</ul>
</div>
<?php endwhile;?>
<a href='<?php echo $this->bPath;?>message/new/forum/<?php echo $this->model->getId();?>'>add a message</a>
示例#4
0
<?php

echo 'Success!';
echo TFUser::getInstance()->getName() . " is Logged in!";
?>
<hr/>
<a href = '<?php 
echo $this->bPath;
?>
forum/open/22'>go to forum page</a>
示例#5
0
 /**
  * retrieves relevant data for new user form
  */
 protected function newUser()
 {
     $userLevel = $this->retrieveUserTopLevel(TFUser::getInstance()->getId(), $this->isDebug());
     $this->_allowed_permissions = $this->retrieveAllowedPermissions($userLevel, $this->isDebug());
 }