It looks to be a Before Show event for the grid or form, correct?
header_events.php should be the only place you add custom code. The newer
versions of CCS do not need the global because it is created automatically
when adding an event. I don't see anything obviously wrong except for the
missing closing bracket, although it can possibly be simplified slightly:
// -------------------------
if (CCGetUserID()){
$header->loggeduser->SetValue("You are logged in as ".CCGetUserID());
$header->login->Visible = False;
}else {
$header->loggeduser->SetValue("You are not logged in");
$header->login->Visible = True;
$header->Logout->Visible = False;
}
// -------------------------
It looks that you are going to be showing only the user's ID so you'll need
a lookup to get their name.
Be sure that the case matches all your labels as it IS case sensitive. For
Booleans, I always use 0 and 1 so I am not sure of the False and True are
case sensitive or not. They might be.
DonP
"timlauer" <
timlauer@forum.codecharge> wrote in message
news:5470d50deee19a@news.codecharge.com...
>
> Hi there,
>
>
> I had the scripts working for 3 years,
> after upgrading from CCS 2.3.81 to CCS 3.2 none of my old files are
> working
> anymore.
> I created all new. The only function left is to show the logged user. The
> code
> below shows the manual section I
> did copy over.
> My development system is IIS5 mit PHP5.21 and Mysql 5.0.37
> My Production system is Apache auf Linux mit PHP 5.22 and Mysql 5.0.37
>
> I get the following error message.
> Parse error: syntax error, unexpected $end in
> C:\Inetpub\wwwroot\header_events.php on line 39
> This is the line after the end of the script.
> I am not a PHP developer so I any way just to display the logged user is
> fine.
>
>
>
> Section from the header.php
>
> // -------------------------
> global $header;
> if(CCGetSession("user_id")<>""){
> $header->loggeduser->SetValue("You are logged in as
> ".CCGetSession("user_id"));
> $header->login->Visible=false;
> }else {
> $header->loggeduser->SetValue("You are not logged in");
> $header->login->Visible = true;
> $header->Logout->Visible = false;
> // -------------------------
>
>
>
> Section from the header_events
>
> // -------------------------
> global $header;
> if(CCGetSession("user_id")<>""){
> $header->loggeduser->SetValue("You are logged in as
> ".CCGetSession("user_id"));
> $header->login->Visible=false;
> }else {
> $header->loggeduser->SetValue("You are not logged in");
> $header->login->Visible = true;
> $header->Logout->Visible = false;
> // -------------------------
>
>
> ---------------------------------------
> Sent from YesSoftware forum
>
http://forums.yessoftware.com/
>