CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Show link if GroupID = "Value"

Print topic Send  topic

Author Message
roders

Posts: 127
Posted: 05/01/2006, 4:39 AM

Hi all,
I would like to kno if there's a way for a link to appear only if the GroupID is an admin. I've done some research and found this
CCGetGroupID()
so i tried it by doing this
if (CCGetGroupID() == "2")
{
$this->add_task->Show();
}

but the link still appears.
Can u help me with this please.
Thx.
_________________
roders
View profile  Send private message
Damian Hupfeld
Posted: 05/01/2006, 5:48 AM

Set the properties on the Link to Visible: Dynamic and then do something
like this:

$loggedin = CCGetSession(UserLogin);
if ($loggedin !== "")
{
$Link1->Visible = true;
}
else if ($loggedin == "")
{
$Link1->Visible = false;
}

Damian

"roders" <roders@forum.codecharge> wrote in message
news:54455f35dca5d2@news.codecharge.com...
> Hi all,
> I would like to kno if there's a way for a link to appear only if the
> GroupID
> is an admin. I've done some research and found this
> CCGetGroupID()
> so i tried it by doing this
> if (CCGetGroupID() == "2")
> {
> $this->add_task->Show();
> }
>
> but the link still appears.
> Can u help me with this please.
> Thx.
> _________________
> roders
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

roders

Posts: 127
Posted: 05/01/2006, 7:24 AM

nope. this aint working. I've tried different variants but its still not working.


_________________
roders
View profile  Send private message
roders

Posts: 127
Posted: 05/01/2006, 9:15 AM

Guys sorry to insist but i really need ur help with that.'

_________________
roders
View profile  Send private message
peterr


Posts: 5971
Posted: 05/01/2006, 10:17 AM

$Link1->Visible = false; must work if you set the "Visible" property correctly. Or try $Link1->SetValue("");
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
Damian Hupfeld
Posted: 05/01/2006, 3:37 PM

Roders,

I tested that piece of code before I posted it.
Did you follow ALL of the instruction?

Damian

"roders" <roders@forum.codecharge> wrote in message
news:54456342e5c7fd@news.codecharge.com...
> Guys sorry to insist but i really need ur help with that.'
>
> _________________
> roders
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

WKempees
Posted: 05/01/2006, 3:43 PM

Let him specify where he put this code.
Which event point?


"Damian Hupfeld" <damian.hupfeld@itng.com.au> schreef in bericht
news:e362jf$54v$1@news.codecharge.com...
> Roders,
>
> I tested that piece of code before I posted it.
> Did you follow ALL of the instruction?
>
> Damian
>
> "roders" <roders@forum.codecharge> wrote in message
>news:54456342e5c7fd@news.codecharge.com...
>> Guys sorry to insist but i really need ur help with that.'
>>
>> _________________
>> roders
>> ---------------------------------------
>> Sent from YesSoftware forum
>> http://forums.codecharge.com/
>>
>
>

roders

Posts: 127
Posted: 05/02/2006, 1:07 AM

The piece of code that u sent where will this go??
_________________
roders
View profile  Send private message
roders

Posts: 127
Posted: 05/02/2006, 1:43 AM

You're code says $Link1 but wat does $Link1 represent and should i change to the name of my link???
I've inserted your code as a before show event on the link itself but its not working.
_________________
roders
View profile  Send private message
Damian Hupfeld
Posted: 05/02/2006, 3:15 AM

Roders,

I think if you stepped back and looked at my code and thought about what it
said and then looked at your situation you would work out in about
60seconds. If you close your eyes and expect it all to just magically work
for you well... good luck.

I wrote that code and tested it as a response to your question... but you
are smart enough to work out how it works for you.

Damian



"roders" <roders@forum.codecharge> wrote in message
news:544571baed420c@news.codecharge.com...
> You're code says $Link1 but wat does $Link1 represent and should i change
> to the
> name of my link???
> I've inserted your code as a before show event on the link itself but its
> not
> working.
> _________________
> roders
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

roders

Posts: 127
Posted: 05/02/2006, 4:49 AM

I still can't figure it out. But i manage to cheat, i set a {AddTask} between my <a>and</a> went in my beforeshow form event and added some codes $Tpl etc..
_________________
roders
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.