コード例 #1
0
    echo "<td class='list'><a href='profile.php?id=".$arr['id']."'>".$arr['login']."</a></td>\n";
    echo "<td class='list'>".$arr['fname']."</td>\n";
    echo "<td class='list'>".get_cur_media($arr['now_playing_type'])."</td>\n";
    echo "<td class='list'>".$now_playing_content."</td>\n";
    echo "<td class='list'>".get_last_time($arr['now_playing_start'])."</td>\n";
    echo "<td class='list'><b>".check_keep_alive_txt($arr['keep_alive'])."</b></td>\n";
    //echo "<td class='list'>".get_video_out($arr['video_out'], $arr['id'])."</b></td>\n";
    //echo "<td class='list' nowrap>".$arr['version']."</td>\n";
    echo "<td class='list' nowrap>";
    if (check_access(array(3)) && !Config::getSafe('deny_change_user_status', false)){
        echo "<a href='users.php?id=".$arr['id']."&search=".@$_GET['search']."&action=cut_off'>".get_user_color($arr['id'])."</a>";
    }else{
        echo "<b>".get_user_color($arr['id'])."</b>";
    }

    if (check_access(array(3)) && !check_keep_alive($arr['keep_alive']) && !Config::getSafe('deny_delete_user', false)){
        echo "&nbsp;&nbsp;";
        echo "<a href='#' onclick='if(confirm(\""._('Do you really want to delete this record?')."\")){document.location=\"users.php?del=1&id=".$arr['id']."&page=".@$_GET['page']."&search=".@$_GET['search']."\"}'>del</a>";
    }

    echo "</td>\n";
    echo "<td class='list'>".$arr['last_change_status']."</td>\n";
    echo "</tr>\n";
}
echo "</table>\n";
echo "<table width='600' align='center' border=0>\n";
echo "<tr>\n";
echo "<td width='100%' align='center'>\n";
echo page_bar();
echo "</td>\n";
echo "</tr>\n";
コード例 #2
0
ファイル: users.php プロジェクト: Eugen1985/stalker_portal
echo "<td class='list'><b>Tariff</b></td>\n";
echo "<td class='list'><b>" . _('Type') . "</b></td>\n";
echo "<td class='list' width='250'><b>" . _('Media') . "</b></td>\n";
echo "<td class='list'><b>" . _('Time from<br>last playback') . "</b></td>\n";
echo "<td class='list'><b>&nbsp;</b></td>\n";
echo "<td class='list'><b>&nbsp;</b></td>\n";
echo "<td class='list'><b>" . _('Last change<br>of status') . "</b></td>\n";
echo "</tr>\n";
$i = 0 + $MAX_PAGE_ITEMS * $page;
while ($arr = $users->next()) {
    $i++;
    $now_playing_content = htmlspecialchars($arr['now_playing_content']);
    if ($arr['now_playing_type'] == 2 && $arr['storage_name']) {
        $now_playing_content = '[' . $arr['storage_name'] . '] ' . $now_playing_content;
    }
    $status = check_keep_alive($arr['keep_alive']);
    echo "<tr>";
    //echo "<td class='list'>".$arr['id']."</td>\n";
    echo "<td class='list'>" . $i . "</td>\n";
    //echo "<td class='list'><a href='userlog.php?id=".$arr['id']."'>".$arr['mac']."</a></td>\n";
    echo "<td class='list'><a href='profile.php?id=" . $arr['id'] . "'>" . $arr['mac'] . "</a></td>\n";
    echo "<td class='list'><a href='events.php?mac=" . $arr['mac'] . "'>" . $arr['ip'] . "</a></td>\n";
    echo "<td class='list'><a href='profile.php?id=" . $arr['id'] . "'>" . $arr['login'] . "</a></td>\n";
    echo "<td class='list'>" . $arr['ls'] . "</td>\n";
    echo "<td class='list'>" . $arr['fname'] . "</td>\n";
    echo "<td class='list'>" . $arr['tariff_plan_name'] . "</td>\n";
    echo "<td class='list'>" . (!$status && Config::getSafe('hide_media_info_for_offline_stb', false) ? '--' : get_cur_media($arr['now_playing_type'])) . "</td>\n";
    echo "<td class='list'>" . (!$status && Config::getSafe('hide_media_info_for_offline_stb', false) ? '' : $now_playing_content) . "</td>\n";
    echo "<td class='list'>" . get_last_time($arr['now_playing_start']) . "</td>\n";
    echo "<td class='list'><b>" . ($status ? '<font color="Green">online</font>' : '<font color="Red">offline</font>') . "</b></td>\n";
    echo "<td class='list' nowrap>";
コード例 #3
0
ファイル: func.php プロジェクト: Eugen1985/stalker_portal
function check_keep_alive_txt($time)
{
    if (check_keep_alive($time)) {
        return '<font color="Green">online</font>';
    } else {
        return '<font color="Red">offline</font>';
    }
}