Jump to content


Photo

Adding a something for a dif rank.


  • Please log in to reply
13 replies to this topic

#1 Ciggy

Ciggy
  • Members
  • PipPip
  • Member
  • 13 posts

Posted 19 October 2006 - 12:05 AM

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:



<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>



I wanted to add something like this:



}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.";



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


#2 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 19 October 2006 - 12:15 AM

<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.";
}
?>


Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#3 Ciggy

Ciggy
  • Members
  • PipPip
  • Member
  • 13 posts

Posted 19 October 2006 - 12:20 AM

Parse error: syntax error, unexpected T_ELSEIF in /home/lobby/public_html/lyt07v1/bar.php on line 65


#4 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 19 October 2006 - 12:23 AM

try this way for a min

<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.";
}
?>

Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#5 Ciggy

Ciggy
  • Members
  • PipPip
  • Member
  • 13 posts

Posted 19 October 2006 - 12:27 AM

Parse error: syntax error, unexpected $end in /home/lobby/public_html/lyt07v1/bar.php on line 71

#6 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 19 October 2006 - 12:31 AM

<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.";
}
?>


Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#7 Ciggy

Ciggy
  • Members
  • PipPip
  • Member
  • 13 posts

Posted 19 October 2006 - 12:40 AM

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!

#8 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 19 October 2006 - 12:46 AM

<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;
}
 }
?>


Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#9 Ciggy

Ciggy
  • Members
  • PipPip
  • Member
  • 13 posts

Posted 19 October 2006 - 12:48 AM

Parse error: syntax error, unexpected T_ELSE in /home/lobby/public_html/lyt07v1/bar.php on line 63

#10 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 19 October 2006 - 12:51 AM

<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'>";

}

 
?>

Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#11 Ciggy

Ciggy
  • Members
  • PipPip
  • Member
  • 13 posts

Posted 19 October 2006 - 12:54 AM

Page displays blank.

#12 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 19 October 2006 - 12:56 AM

<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'>";

}

 
?>

Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#13 Ciggy

Ciggy
  • Members
  • PipPip
  • Member
  • 13 posts

Posted 19 October 2006 - 01:01 AM

Works perfectly thank you very much for working with me! Once again thank you.

#14 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 19 October 2006 - 01:03 AM

can i have your url pleae i wnat to listen lol.

good luck m8.
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users