Guest User

Untitled

a guest
Jul 23rd, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1. if (strpos($_SERVER['REQUEST_URI'], "online") >= 0) {
  2. $left_col_class = "gkPageContent";
  3. }
  4. elseif(strpos($_SERVER['REQUEST_URI'], "student-login") >= 0) {
  5. $left_col_class = "showme";
  6. echo "this is not sanjay";
  7. }
  8. elseif(strpos($_SERVER['REQUEST_URI'], "my-account/orders") >= 0) {
  9. $left_col_class = "showme";
  10. }
  11. elseif(strpos($_SERVER['REQUEST_URI'], "my-account/my-courses") >= 0) {
  12. $left_col_class = "showme";
  13. }
  14. elseif(strpos($_SERVER['REQUEST_URI'], "my-account/fourm") >= 0) {
  15. $left_col_class = "showme";
  16. }
  17. elseif(strpos($_SERVER['REQUEST_URI'], "student-login") >= 0) {
  18. $left_col_class = "showme";
  19. }
  20. elseif (strpos($_SERVER['REQUEST_URI'], "student-login") >= 0) {
  21. $left_col_class = "showme";
  22. }
  23. else{
  24. echo "dam thing";
  25. }
  26.  
  27. echo $left_col_class;
  28.  
  29. $lookup = array(
  30. 'online' => 'gkPageContent',
  31. 'student-login' => 'showme',
  32. 'my-account/orders' => 'showme',
  33. 'my-account/my-courses' => 'showme',
  34. 'my-account/fourm' => 'showme' // check your spelling
  35. );
  36.  
  37. if (isset($lookup[$_SERVER['REQUEST_URI']])) {
  38. $left_col_class = $lookup[$_SERVER['REQUEST_URI']];
  39. } else {
  40. $left_col_class = $default_fallback_value; // ..."darn thing" would be unhelpful, me thinks
  41. }
Add Comment
Please, Sign In to add comment