Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

On Air Panel for v9

Asked Modified Viewed 2,134 times
J
jjwichter
J
  • Member, joined since
  • Contributed 97 posts on the community forums.
  • Started 29 threads in the forums
  • Started this discussions
asked
Member

How would I make it work? Right now is shows up blank.

<?php
/*-------------------------------------------------------+
| PHPFusion Content Management System
| Copyright © 2002 - 2008 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: onair_panel.php
| Version: 1.2
| Author: Domi
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
if (!defined("IN_FUSION")) { die("Access Denied"); }

if (file_exists(INFUSIONS."onair_panel/locale/".$settings['locale'].".php")) {
   include INFUSIONS."onair_panel/locale/".$settings['locale'].".php";
} else {
   include INFUSIONS."onair_panel/locale/English.php";
}
opentable($locale['onair011']);

add_to_head("<link rel='stylesheet' type='text/css' href='".INFUSIONS."onair_panel/onair.css' />");
add_to_head("<script type='text/javascript' src='".INFUSIONS."onair_panel/onair.js'></script>");

echo "
<script type='text/javascript'>
function addLoadEvent(func) {
   // Save current onload functions
   var oldonload = window.onload;

   // If this is the first function then assign it to window.onload
   // else assign it along with the current functions
   if (typeof window.onload != 'function') {
      window.onload = func;
   }
   else {
      window.onload = function() {
         oldonload();
         func();
      };
   }
}

addLoadEvent(enable_onair);
</script>";

echo '
<div id="onair" align="center"><div id="onair_scroll_left"><b>&laquo;</b></div><div id="onair_container">   <div id="onair_scroll">';
//$result=dbquery("SELECT user_name,user_id,user_lastvisit,user_avatar FROM ".$db_prefix."users WHERE user_level < 103 ORDER BY user_lastvisit  DESC LIMIT 40"); //This one will hide super admins!
$result=dbquery("SELECT user_name,user_id,user_lastvisit,user_avatar FROM ".$db_prefix."users ORDER BY user_lastvisit  DESC LIMIT 40");
while($data=dbarray($result)){

if (file_exists(INFUSIONS."varcade/index.php"))
{

$resultgamer =dbquery("SELECT * FROM ".$db_prefix."varcade_activeusr where player ='".$data['user_id']."' ");
$gdata=dbarray($resultgamer);
}
else
{
$gdata ="0";
}
if (file_exists(INFUSIONS."the_kroax/kroax.php"))
{
$resultvideo =dbquery("SELECT * FROM ".$db_prefix."kroax_activeusr where member ='".$data['user_id']."' ");
$vdata=dbarray($resultvideo);
}
else
 {
$vdata = "0";
}
if (!$data['user_avatar']) {
$image = "<img src='".INFUSIONS."onair_panel/images/noav.gif' width='60' height='60' border='0' title='".$data['user_name']."' alt='".$data['user_name']."' />\n";
      } else {
$image = "<img src='".IMAGES."avatars/".$data['user_avatar']."' width='60' height='60' border='0' title='".$data['user_name']."' alt='".$data['user_name']."' />\n";
      }
      $lastseen = time() - $data['user_lastvisit'];
      $iW=sprintf("%2d",floor($lastseen/604800));
      $iD=sprintf("%2d",floor($lastseen/(60*60*24)));
      $iH=sprintf("%02d",floor((($lastseen%604800)%86400)/3600));
      $iM=sprintf("%02d",floor(((($lastseen%604800)%86400)%3600)/60));
      $iS=sprintf("%02d",floor((((($lastseen%604800)%86400)%3600)%60)));
      if ($lastseen < 60){
         $lastseen= $locale['onair001'];
      } elseif ($lastseen < 360){
         $lastseen= $locale['onair002'];
      } elseif ($iW > 0){
         if ($iW == 1) { $text = $locale['onair003']; } else { $text = $locale['onair004']; }
         $lastseen = $iW." ".$text;
      } elseif ($iD > 0){
         if ($iD == 1) { $text = $locale['onair005']; } else { $text = $locale['onair006']; }
         $lastseen = $iD." ".$text;
      } else {
         $lastseen = -$iH.":".$iM.":".$iS;
      }
$lastseen2 = time() - $data['user_lastvisit'];
if($data['user_id'] == $gdata['player'])
{
$lastseen2 = '<span style="white-space: nowrap;"><img src="'.INFUSIONS.'onair_panel/images/games.jpg" height="13" width="13" title="'.$locale['onair007'].'" alt="'.$locale['onair007'].'" /></span>';
 }
elseif ($data['user_id'] == $vdata['member'])
{
$lastseen2 = '<span style="white-space: nowrap;"><img src="'.INFUSIONS.'onair_panel/images/videos.jpg" height="13" width="13" title="'.$locale['onair009'].'" alt="'.$locale['onair009'].'" /></span>';
}
elseif ($lastseen2 < 120)
{
$lastseen2 = '<span style="white-space: nowrap;"><img src="'.INFUSIONS.'onair_panel/images/user_online.gif" height="13" width="13" title="'.$locale['onair008'].'" alt="'.$locale['onair008'].'" /></span>';
}
else
 {
   $lastseen2 = '<span style="white-space: nowrap;"><img src="'.INFUSIONS.'onair_panel/images/user_offline.gif" height="13" width="13" title="'.$locale['onair010'].'" alt="'.$locale['onair010'].'" /></span>';
}
echo '<div>'.trimlink($data['user_name'], 8).'  '.$lastseen2.'<br /><a href="'.BASEDIR.'profile.php?lookup='.$data['user_id'].'">'.$image.'</a><br />'.$lastseen.'</div>';
}
echo "<div style='display:none;'>OnAir panel by <a href='http://www.venue.nu'>Venue</a></div>";
echo '</div></div><div id="onair_scroll_right"><b>&raquo;</b></div></div>';

closetable();
?>
0 replies
There are no post found.

Labels

None yet

Statistics

  • Views 0 views
  • Posts 0 posts
  • Votes 0 votes
  • Topic users 1 member

1 participant

J
J
  • Member, joined since
  • Contributed 97 posts on the community forums.
  • Started 29 threads in the forums
  • Started this discussions

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet