Guest User

Untitled

a guest
Apr 21st, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.28 KB | None | 0 0
  1. funtion get_header($module, $id = NULL) {
  2. $check = "select * from module where name = '" . $module . "'";
  3. $app = @mysql_fetch_array(mysql_query($check));
  4. if ($app['name'] != '') {
  5.  
  6. if ($module == 'view') {
  7.  $sql = "select page,title,description,keywords,real_name,user,adult,thumbnail from `dvflex`.`files` where page = '" . $id . "'";
  8. $res = @mysql_fetch_array(mysql_query($sql));
  9.  $title = $app['moto'] . $res['title'] . $app['prefix'] . $res['user']; // Ex: [Now watching/Now viewing:] [My latest music video/My review] [By/From] [Username]
  10.  }
  11.  else if ($module == 'chan') {
  12.  $sql = "select name from `dvflex`.`channel` where name = '" . $id . "'";
  13.  $res = @mysql_fetch_array(mysql_query($sql));
  14.  $title = $app['moto'] . $app['prefix'] . $res['name']; // [Viewing] [Channel/Group] [Blargh]
  15.  }
  16.  else if ($module == 'user') {
  17.  $sql = "select user from `dvflex`.`profile` where user = '" . $id . "'";
  18. $res = @mysql_fetch_array(mysql_query($sql));
  19. if (substr($res['user'], -1) != 's') $sname = $res['user'] . "'s";
  20. else $sname = $res['user'] . "'";
  21. $title = $app['moto'] .  $sname . $app['prefix']; // Ex: if name = Alex - Viewing Alex's Profile else - Viewing Ales' Profile
  22. }
  23.  
  24. }
  25. else {
  26. $app = '404';
  27. }
  28. if ($app != '404') {
  29. $header = <<< EOF
  30. <title>
  31. {$title}
  32. </title>
  33. EOF;
  34. }
  35. }
Add Comment
Please, Sign In to add comment