Jump to content

Archived

This topic is now archived and is closed to further replies.

Ciggy

Adding a something for a dif rank.

Recommended Posts

This is for a DJ request system i use for my radio website. I want in the bar.php when a News Reporter is logged in instead of having the radio links it has a link to my cutenews. Here is the code of the bar.php:



[code=php:0]<STYLE type="text/css">

<!--

BODY {

background-color: FFC55E;

scrollbar-face-color: FFC55E;

scrollbar-highlight-color: FFC55E;

scrollbar-3dlight-color: FFC55E;

scrollbar-darkshadow-color: F2B03B;

scrollbar-shadow-color: FFC55E;

scrollbar-arrow-color: 000000;

scrollbar-track-color: FFC55E;

}

-->

</STYLE>

<?

require('config.php');

if($userData[user] =="" || $userData[pass] ==""){

  Echo"Username: Not Logged In - Click <a href='login.php'>here</a> to login.

  <hr width='100%' height='1' color='#000000' shade='no'>";

}else{

  if($userData[rank] =="0"){

    $linksVar ="You are no longer staff at $websiteName, Sorry.";

  }else{

    $linksVar ="<br> &nbsp;<a href='requests.php'>Request Line</a> |

                <a href='info.php'>Radio Info</a> |

                <a href='rules.php'>DJ Rules</a> |

                <a href='cps.php'>Control Panels</a> |

                <a href='message.php'>DJ Says</a> ";

  }



  Echo"User: <b>$userData[user]</b> Rank: <b>$userData[rank]</b>$linksVar

  <hr width='100%' height='1' color='#000000' shade='no'>";

}

?>

<body bgcolor=#A6C4D1 leftmargin=0 topmargin=5 marginwidth=0 marginheight=0>[/code]



I wanted to add something like this:



[code=php:0]}else{

  if($userData[rank] =="NR"){

    $linksVar ="<br> &nbsp;Please visit <a href='/news'>here</a> and

login with the same username and password to add/edit/manage the news.";[/code]



This obviously does notwork since that is why I am asking can someone please help.

Share this post


Link to post
Share on other sites
[code]
<STYLE type="text/css">

<!--

BODY {

background-color: FFC55E;

scrollbar-face-color: FFC55E;

scrollbar-highlight-color: FFC55E;

scrollbar-3dlight-color: FFC55E;

scrollbar-darkshadow-color: F2B03B;

scrollbar-shadow-color: FFC55E;

scrollbar-arrow-color: 000000;

scrollbar-track-color: FFC55E;

}

-->

</STYLE>

<?php

require('config.php');

if($userData[user] =="" || $userData[pass] ==""){

  Echo"Username: Not Logged In - Click <a href='login.php'>here</a> to login.

  <hr width='100%' height='1' color='#000000' shade='no'>";

}else{

  if($userData[rank] =="0"){

    $linksVar ="You are no longer staff at $websiteName, Sorry.";

  }else{

    $linksVar ="<br> &nbsp;<a href='requests.php'>Request Line</a> |

                <a href='info.php'>Radio Info</a> |

                <a href='rules.php'>DJ Rules</a> |

                <a href='cps.php'>Control Panels</a> |

                <a href='message.php'>DJ Says</a> ";

  }



  Echo"User: <b>$userData[user]</b> Rank: <b>$userData[rank]</b>$linksVar

  <hr width='100%' height='1' color='#000000' shade='no'>";

}elseif

  ($userData[rank] =="NR"){

    $linksVar ="<br> &nbsp;Please visit <a href='/news'>here</a> and

login with the same username and password to add/edit/manage the news.";
}
?>
[/code]

Share this post


Link to post
Share on other sites
Parse error: syntax error, unexpected T_ELSEIF in /home/lobby/public_html/lyt07v1/bar.php on line 65

Share this post


Link to post
Share on other sites
try this way for a min

[code]
<STYLE type="text/css">

<!--

BODY {

background-color: FFC55E;

scrollbar-face-color: FFC55E;

scrollbar-highlight-color: FFC55E;

scrollbar-3dlight-color: FFC55E;

scrollbar-darkshadow-color: F2B03B;

scrollbar-shadow-color: FFC55E;

scrollbar-arrow-color: 000000;

scrollbar-track-color: FFC55E;

}

-->

</STYLE>

<?php

require('config.php');

if($userData[user] =="" || $userData[pass] ==""){

  Echo"Username: Not Logged In - Click <a href='login.php'>here</a> to login.

  <hr width='100%' height='1' color='#000000' shade='no'>";

}else{

  if($userData[rank] =="0"){

    $linksVar ="You are no longer staff at $websiteName, Sorry.";

  }else{

    $linksVar ="<br> &nbsp;<a href='requests.php'>Request Line</a> |

                <a href='info.php'>Radio Info</a> |

                <a href='rules.php'>DJ Rules</a> |

                <a href='cps.php'>Control Panels</a> |

                <a href='message.php'>DJ Says</a> ";

  }



  Echo"User: <b>$userData[user]</b> Rank: <b>$userData[rank]</b>$linksVar

  <hr width='100%' height='1' color='#000000' shade='no'>";

if ($userData[rank] =="NR"){

    $linksVar ="<br> &nbsp;Please visit <a href='/news'>here</a> and

login with the same username and password to add/edit/manage the news.";
}
?>
[/code]

Share this post


Link to post
Share on other sites
Parse error: syntax error, unexpected $end in /home/lobby/public_html/lyt07v1/bar.php on line 71

Share this post


Link to post
Share on other sites
[code]
<STYLE type="text/css">

<!--

BODY {

background-color: FFC55E;

scrollbar-face-color: FFC55E;

scrollbar-highlight-color: FFC55E;

scrollbar-3dlight-color: FFC55E;

scrollbar-darkshadow-color: F2B03B;

scrollbar-shadow-color: FFC55E;

scrollbar-arrow-color: 000000;

scrollbar-track-color: FFC55E;

}

-->

</STYLE>

<?php

require('config.php');

if($userData[user] =="" || $userData[pass] ==""){

  Echo"Username: Not Logged In - Click <a href='login.php'>here</a> to login.

  <hr width='100%' height='1' color='#000000' shade='no'>";

}else{

  if($userData[rank] =="0"){

    $linksVar ="You are no longer staff at $websiteName, Sorry.";

  }else{

    $linksVar ="<br> &nbsp;<a href='requests.php'>Request Line</a> |

                <a href='info.php'>Radio Info</a> |

                <a href='rules.php'>DJ Rules</a> |

                <a href='cps.php'>Control Panels</a> |

                <a href='message.php'>DJ Says</a> ";

}

  Echo"User: <b>$userData[user]</b> Rank: <b>$userData[rank]</b>$linksVar

  <hr width='100%' height='1' color='#000000' shade='no'>";
}

if ($userData[rank] =="NR"){

    $linksVar ="<br> &nbsp;Please visit <a href='/news'>here</a> and

login with the same username and password to add/edit/manage the news.";
}
?>

[/code]

Share this post


Link to post
Share on other sites
No errors but it did not work the normal DJ links are still displayed. Also if you want to try another way the only people I want to see the DJ links are HDJ, DJ, TDJ, Admin Hope that helps also thank you for working with me!

Share this post


Link to post
Share on other sites
[code]
<STYLE type="text/css">

<!--

BODY {

background-color: FFC55E;

scrollbar-face-color: FFC55E;

scrollbar-highlight-color: FFC55E;

scrollbar-3dlight-color: FFC55E;

scrollbar-darkshadow-color: F2B03B;

scrollbar-shadow-color: FFC55E;

scrollbar-arrow-color: 000000;

scrollbar-track-color: FFC55E;

}

-->

</STYLE>

<?php

require('config.php');

if($userData[user] =="" || $userData[pass] ==""){

  Echo"Username: Not Logged In - Click <a href='login.php'>here</a> to login.

  <hr width='100%' height='1' color='#000000' shade='no'>";

}else{

  if($userData[rank] =="0"){

    $linksVar ="You are no longer staff at $websiteName, Sorry.";

  }else{

    $linksVar ="<br> &nbsp;<a href='requests.php'>Request Line</a> |

                <a href='info.php'>Radio Info</a> |

                <a href='rules.php'>DJ Rules</a> |

                <a href='cps.php'>Control Panels</a> |

                <a href='message.php'>DJ Says</a> ";

}

  Echo"User: <b>$userData[user]</b> Rank: <b>$userData[rank]</b>$linksVar

  <hr width='100%' height='1' color='#000000' shade='no'>";

}else{

if ($userData[rank] =="NR"){

    $linksVar ="<br> &nbsp;Please visit <a href='/news'>here</a> and

login with the same username and password to add/edit/manage the news.";

echo $linkvar;
}
}
?>

[/code]

Share this post


Link to post
Share on other sites
Parse error: syntax error, unexpected T_ELSE in /home/lobby/public_html/lyt07v1/bar.php on line 63

Share this post


Link to post
Share on other sites
[code]
<STYLE type="text/css">

<!--

BODY {

background-color: FFC55E;

scrollbar-face-color: FFC55E;

scrollbar-highlight-color: FFC55E;

scrollbar-3dlight-color: FFC55E;

scrollbar-darkshadow-color: F2B03B;

scrollbar-shadow-color: FFC55E;

scrollbar-arrow-color: 000000;

scrollbar-track-color: FFC55E;

}

-->

</STYLE>

<?php

require('config.php');

if($userData[user] =="" || $userData[pass] ==""){

  Echo"Username: Not Logged In - Click <a href='login.php'>here</a> to login.

  <hr width='100%' height='1' color='#000000' shade='no'>";

}else{


if ($userData[rank] =="NR"){

    $linksVar ="<br> &nbsp;Please visit <a href='/news'>here</a> and

login with the same username and password to add/edit/manage the news.";

echo $linkVar;
exit;

}else if($userData[rank] =="0"){

    $linksVar ="You are no longer staff at $websiteName, Sorry.";

  }else{

    $linksVar ="<br> &nbsp;<a href='requests.php'>Request Line</a> |

                <a href='info.php'>Radio Info</a> |

                <a href='rules.php'>DJ Rules</a> |

                <a href='cps.php'>Control Panels</a> |

                <a href='message.php'>DJ Says</a> ";

}

  Echo"User: <b>$userData[user]</b> Rank: <b>$userData[rank]</b>$linksVar

  <hr width='100%' height='1' color='#000000' shade='no'>";

}


?>
[/code]

Share this post


Link to post
Share on other sites
[code]
<STYLE type="text/css">

<!--

BODY {

background-color: FFC55E;

scrollbar-face-color: FFC55E;

scrollbar-highlight-color: FFC55E;

scrollbar-3dlight-color: FFC55E;

scrollbar-darkshadow-color: F2B03B;

scrollbar-shadow-color: FFC55E;

scrollbar-arrow-color: 000000;

scrollbar-track-color: FFC55E;

}

-->

</STYLE>

<?php

require('config.php');

if($userData[user] =="" || $userData[pass] ==""){

  Echo"Username: Not Logged In - Click <a href='login.php'>here</a> to login.

  <hr width='100%' height='1' color='#000000' shade='no'>";

}else{


if ($userData[rank] =="NR"){

    $linksVar ="<br> &nbsp;Please visit <a href='/news'>here</a> and

login with the same username and password to add/edit/manage the news.";

echo $linksVar;
exit;

}else if($userData[rank] =="0"){

    $linksVar ="You are no longer staff at $websiteName, Sorry.";

  }else{

    $linksVar ="<br> &nbsp;<a href='requests.php'>Request Line</a> |

                <a href='info.php'>Radio Info</a> |

                <a href='rules.php'>DJ Rules</a> |

                <a href='cps.php'>Control Panels</a> |

                <a href='message.php'>DJ Says</a> ";

}

  Echo"User: <b>$userData[user]</b> Rank: <b>$userData[rank]</b>$linksVar

  <hr width='100%' height='1' color='#000000' shade='no'>";

}


?>
[/code]

Share this post


Link to post
Share on other sites
Works perfectly thank you very much for working with me! Once again thank you.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.