?
<?php
$USR_IS_ADMIN = false;
$USR_AUTH = false;
if($sf_user->hasAttribute('ADMIN'))
{
$USR_IS_ADMIN = true;
}
$id = $sf_user->getAttribute('profile_id');
if($sf_user->hasAttribute('profile_id') > 0)
{
$profile = RcProfileTablePeer::getById($id);
$activated = $profile->getActivated();
if($activated == 1)
{
//echo "activated".$activated;
$USR_AUTH = true;
}
else
{
//echo "NOT activated".$activated;
$USR_AUTH = false;
}
}
?>
<?php if(!$USR_AUTH) : ?>
//show a specific menu here
<?php endif;?>
<?php if($USR_AUTH):?>
//show a different menu here pertaining to logged in user
<?php endif;?>
내 업데이트] factories.yml 파일 :
이 확인 어디에 사용자가 로그인 한 경우 _header.php<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<?php include_http_metas() ?>
<?php include_metas() ?>
<?php include_title() ?>
<link rel="shortcut icon" href="/favicon.ico" />
<?php use_stylesheet('rainbow.css'); ?>
<?php use_javascript('rainbow.js'); ?>
<?php include_stylesheets(); ?>
<?php include_javascripts(); ?>
</head>
<body onload='ax_startup();'>
<center>
<?php
echo "<div id='div_main_container_rc'>";
?>
<div id='div_header_container_rc'>
<?php include_component('profile','header'); ?>
</div>
<?php
echo "<div id='div_content_container_rc'>";
echo $sf_content;
echo "</div>";
echo "<div id='div_footer'>";
?>
//show a footer menu here
</div>
</div>
</center>
</body>
</html>
다음 rclayout.php : 내가 먼저 호출되는 코드를
prod:
logger:
class: sfNoLogger
param:
level: err
loggers: ~
test:
storage:
class: sfSessionTestStorage
param:
session_path: %SF_TEST_CACHE_DIR%/sessions
response:
class: sfWebResponse
param:
send_http_headers: false
mailer:
param:
delivery_strategy: none
dev:
mailer:
param:
delivery_strategy: none
all:
routing:
class: sfPatternRouting
param:
generate_shortest_url: true
extra_parameters_as_query_string: true
view_cache_manager:
class: sfViewCacheManager
param:
cache_key_use_vary_headers: true
cache_key_use_host_name: true
user:
param:
timeout: 300
내가이 어떻게 할 것입니다 시작해야
? 내가 세션이 어떻게하면 내가 php.ini 파일을 구성 할 장소로 설정된 볼 수 해달라고? 아니면 세션에서이 작업을 수행합니까?
도와주세요? 는
대단히 고맙습니다 내 공장 파일을 참조하십시오. 난 그냥 코드를 추가 할 수 또는 어떻게 내가 제발 구성합니까? 내가 이해하는 것에서, 사용자는 공장입니다. 그래서 어떻게 클래스에 어떤 이름을 주어야하는지 압니까? 감사합니다 –
내 업데이트 답변보기, 내가 조금 명확하게 ... –
내 업데이트 된 공장 파일을 참조 해 주셔서 감사합니다 ..나는 이것을 300으로 만들었으므로 30/15 분을 기다려야 만하지는 않습니다 ... 타임 아웃 후에 무슨 일이 일어날 지 설명 할 수 있습니까? 내 웹 사이트가 열려 있고 사용자가 로그인했지만 아무 일도 일어나지 않습니까 ?? 내가 아직 로그인 한 상태에서 웹 사이트에서 계속 진행할 수 있습니까 ?? thanks –