<?php
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
# Or, point your browser to
Sie müssen registriert sein, um Links zu sehen.
#
#======================================================
# DESCRIPTION: OScam Info for oscam 1.0+
# REQUIREMENTS: php, webserver + curl/mod_curl
# REQUIREMENTS: channel picons update need OSCam 1.20 #6645 or higher
# AUTHOR: S@tgate Crew / OUBA
# CREATED: 10.10.2010 20:32:11
#======================================================
$VERSION = "1.0";
require("config.global.php");
require("lang/".LANGUAGE.".inc.php");
require("class.auth.php");
$isCurl = (in_array('curl', get_loaded_extensions()))?true:false;
$auth = new auth();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>OScamInfoPHP <?php echo $VERSION;?></title>
<link rel="stylesheet" type="text/css" href="themes/<?php echo OSCAM_STYLE;?>/easyui.css">
<link rel="stylesheet" type="text/css" href="themes/icon.css">
<link rel="stylesheet" type="text/css" href="themes/style.css">
<link rel="icon" href="favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<style type="text/css">
#content{
width:<?php echo floor($auth->sizeFaktor*775);?>px;
margin-left:-<?php echo floor($auth->sizeFaktor*775/2)+16;?>px;
}
</style>
<script type="text/javascript" src="js/jquery-1.6.min.js"></script>
<script type="text/javascript" src="js/jquery.easyui.min.js"></script>
<script type="text/javascript" src="js/datagrid-detailview.js"></script>
<script type="text/javascript" src="js/jquery.flot.js"></script>
<script type="text/javascript" src="js/jquery.flot.pie.js"></script>
<script type="text/javascript" src="js/jquery.appear-1.1.1.min.js"></script>
<!--[if IE]><script type="text/javascript" src="js/excanvas.min.js"></script><![endif]-->
<script type="text/javascript" src="js/dateformat.js"></script>
<script type="text/javascript" src="js/action.js"></script>
<script type="text/javascript" src="lang/easyui-lang-<?php echo LANGUAGE;?>.js"></script>
<script type="text/javascript">
var theRefresh = null;
var derTitel = "<?php echo ECM_HISTORY;?>";
var aktuellerTab = null;
var initTabs = new Array();
var rZeit = <?php echo REFRESH_SECS;?>;
var zeitSchema = "<?php echo TIME_SCHEME;?>";
var nativid = [];
var loadingVersion = "<?php echo DETECTING_VERSION;?>";
var langIntervals = {
hour: "<?php echo LNG_HOUR;?>",
hours: "<?php echo LNG_HOURS;?>",
min: "<?php echo LNG_MIN;?>",
mins: "<?php echo LNG_MINS;?>",
sec: "<?php echo LNG_SEC;?>",
secs: "<?php echo LNG_SECS;?>",
request: "<?php echo LNG_REQUEST;?>"
};
var statTitles = {
dgc: "<?php echo CW_DATA_CLIENTS;?>",
dg: "<?php echo CW_DATA_STATS;?>"
};
function tooltipOn(obj){
var tip = $(obj).attr('title');
$(obj).attr('title','');
tipArr = tip.split("|");
$(obj).append('<div id="tooltip"><div class="tipHeader"></div><div class="tipBody">' + tipArr[0] + '</div><div class="tipFooter">' + tipArr[1] + '</div></div>');
$('#tooltip').fadeIn('500');
$('#tooltip').fadeTo('10',0.9);
var $someElement = $("#tooltip");
offset = $someElement.offset();
ofY = 15;
ofX = 15;
if(offset.top>525){
ofY = -150;
ofX = 15;
}
$(document).mousemove(function(e) {
$someElement.offset({ top: e.pageY+ofY, left: e.pageX+ofX });
}).mouseout(function () {
$(this).unbind("mousemove");
});
}
function tooltipOff(obj){
$(obj).attr('title',$('.tipBody').html()+"|"+$('.tipFooter').html());
$(obj).children('div#tooltip').remove();
}
$(function(){
$('#aa').tabs({
tools:[{
text:'<?php $auth->getOscams();?>',
id:'serverLabel',
iconCls:'icon-smartcard',
handler: function(){
$('#selReader').window('open');
}
},{
text:'<?php echo LNG_PROFILE;?>',
iconCls:'icon-settings',
handler: function(){
$('#dlgu').window('open');
$('input[name="loginpass"]').val(' ').val('');
$('input[name="loginpass_wdh"]').val(' ').val('');
}
},{
text:'logout',
iconCls:'icon-cancel',
handler: function(){
self.location.href="index.php?logoff";
}
}
],
onSelect:function(){
var pp = $('#aa').tabs('getSelected');
aktuellerTab = pp.panel('options').bodyCls;
autoRefresh(aktuellerTab);
if($.inArray(aktuellerTab, initTabs) > -1) return;
initTabs.push(aktuellerTab);
mydatagrid('<?php echo SEARCH_FOR;?>');
}
});
$('#selreaders').combobox({
formatter:function(row){
var imageFile = 'images/smartcard1.png';
return '<img class="item-img" src="'+imageFile+'"/><span class="item-text">'+row.text+'</span>';
}
});
$('input[name="loginpass"]').bind('blur', function() {
boolType = (this.value=="")?false:true;
$('input[name="loginpass_wdh"]').validatebox({required: boolType});
});
});
function saveProfile(){
$('#fmu').form('submit',{
url: 'ajax.php?type=saveprofile',
onSubmit: function(){
return $(this).form('validate');
},
success: function(result){
var result = eval('('+result+')');
if (result.success){
$.messager.alert('OK!',result.msg,'info',function(){$('#dlgu').window('close');});
}
else {
$.messager.alert('Error',result.msg,'error');
}
}
});
}
$.extend($.fn.validatebox.defaults.rules, {
equals: {
validator: function(value,param){
return value == $(param[0]).val();
},
message: '<?php echo LNG_PROFILE_PASS_NOMATCH;?>'
}
});
</script>
</head>
<body>
<?php if($auth->isAuth()):?>
<?php if(!MODERN_STYLE):?>
<div id="content" class="head"><div>OScamInfoPHP Ver. <?php echo $VERSION;?> by <a href="mailto

aramite@gmx.net">paramite</a> || <a href="http://www.streamboard.tv/wbb2/thread.php?threadid=32717" target="_blank">Streamboard support thread</a></div></div>
<?php endif;?>
<div id="content" <?php if(MODERN_STYLE):?>class="contentmodern"<?php endif;?>>
<?php if(defined("CUSTOM_NOTICE") && CUSTOM_NOTICE!=""):?>
<div class="easyui-panel" title="<?php echo CUSTOM_NOTICE_TITLE;?>" collapsible="true" style="width:<?php echo floor($auth->sizeFaktor*775);?>px;height:auto;padding:10px">
<?php echo CUSTOM_NOTICE;?>
</div>
<div style="width:<?php echo floor($auth->sizeFaktor*775);?>px;height:5px"></div>
<?php endif;?>
<?php if($isCurl):?>
<div id="dlgu" title="<?php echo LNG_PROFILE;?>" class="easyui-dialog" style="width:450px;height:175px;padding:10px 20px" closed="true" buttons="#dlgu-buttons">
<form id="fmu" method="post">
<div class="fitem">
<label><?php echo LNG_ADM_LOGINNAME;?>:</label>
<input name="loginname" class="easyui-validatebox" required="true" value="<?php echo $_SESSION["oscaminfo_auth"]["username"];?>">
</div>
<div class="fitem">
<label><?php echo LNG_PROFILE_PASS;?>:</label>
<input id="lp" name="loginpass" type="password" class="easyui-validatebox">
</div>
<div class="fitem">
<label><?php echo LNG_PROFILE_PASS_REPEAT;?>:</label>
<input name="loginpass_wdh" type="password" class="easyui-validatebox" validType="equals['#lp']">
</div>
</form>
</div>
<div id="dlgu-buttons" style="margin-top:-20px">
<a href="#" class="easyui-linkbutton" iconCls="icon-ok" onclick="saveProfile()"><?php echo ADM_SAVE;?></a>
<a href="#" class="easyui-linkbutton" iconCls="icon-cancel" onclick="$('#dlgu').window('close');"><?php echo ADM_CANCEL;?></a>
</div>
<div id="d2"
class="easyui-dialog"
title="<?php echo SEARCH_TITLE;?>"
style="width:170px;height:80px;padding:10px;overflow:hidden"
closed="true"
modal="true"
resizable="false">
<input id="ss"></input>
</div>
<div id="thecake"
class="easyui-dialog"
title=""
style="z-index:100;width:600px;height:565px;padding:10px;overflow:hidden"
closed="true"
modal="true"
resizable="false">
<div id="cakegraph" class="graph"></div>
</div>
<div id="entitlements"
class="easyui-dialog"
title=""
style="z-index:100;width:400px;height:200px;padding:10px;overflow:hidden"
closed="true"
modal="true"
resizable="false">
<div id="entload" class="pagination-loading"><?php echo LOAD_DATA;?></div>
<div id="entdone"></div>
</div>
<div id="cw_stats"
class="easyui-dialog"
style="z-index:110;width:600px;height:600px;padding:5px;overflow:hidden"
closed="true"
modal="true"
resizable="false">
<div id="entload_cw" class="pagination-loading"><?php echo LOAD_DATA;?></div>
<div id="entdone_cw"></div>
</div>
<div id="selReader" class="easyui-dialog" closed="true" modal="true" title="<?php echo CHOOSE_SERVER;?>" style="padding:10px;width:250px;height:100px;">
<?php $auth->getOscams(false);?>
</div>
<div id="aa" class="easyui-tabs" style="width:<?php echo floor($auth->sizeFaktor*775);?>px;height:600px;">
<?php if($auth->isTab("clients")):?>
<div title="<?php echo LNG_OSCAMCLIENTS;?>" iconCls="icon-clients" bodyCls="#dgc">
<table id="dgc" class="easyui-datagrid" style="width:<?php echo floor($auth->sizeFaktor*751);?>px;font-size:30px"
url="ajax.php?type=json&data=clients"
rownumbers="false"
fit="true"
fitColumns="true"
border="false"
singleSelect="true"
pageSize="<?php echo ENTRIES_PER_PAGE_DEFAULT;?>"
pageList="[<?php echo ENTRIES_PER_PAGE;?>]"
<?php $auth->sortable();?>
pagination="true"
scrollbarSize="0"
>
<thead>
<tr>
<th field="identname" width="<?php echo floor($auth->sizeFaktor*90);?>" sortable="true"><?php echo LNG_CLIENT;?></th>
<th field="country" width="<?php echo floor($auth->sizeFaktor*20);?>" sortable="true"><?php echo LNG_CTY;?></th>
<th field="protocol" width="<?php echo floor($auth->sizeFaktor*130);?>" sortable="true"><?php echo LNG_PROTOCOL;?></th>
<th field="request" width="<?php echo floor($auth->sizeFaktor*170);?> "sortable="true"><?php echo LNG_LAST_USED_SHARE;?></th>
<th field="ecmtime" width="<?php echo floor($auth->sizeFaktor*50);?>" sortable="true"><?php echo LNG_ECM;?></th>
<th field="loggedin" width="<?php echo floor($auth->sizeFaktor*125);?>" sortable="true" formatter="formatDateTime"><?php echo LNG_LOGGED_IN;?></th>
<th field="lastactivity" width="<?php echo floor($auth->sizeFaktor*89);?>" sortable="true" formatter="formatInterval"><?php echo LNG_LAST_ACTIVITY;?></th>
<th field="connection" width="<?php echo floor($auth->sizeFaktor*70);?>" sortable="true"><?php echo LNG_CONNECTION;?></th>
</tr>
</thead>
</table>
</div>
<?php endif;?>
<?php if($auth->isTab("readers")):?>
<div title="<?php echo LNG_OSCAMREADER;?>" iconCls="icon-smartcard" bodyCls="#dg">
<table id="dg" class="easyui-datagrid" style="width:<?php echo floor($auth->sizeFaktor*751);?>px;font-size:30px"
url="ajax.php?type=json&data=reader"
rownumbers="false"
fit="true"
fitColumns="true"
border="false"
singleSelect="true"
pageSize="<?php echo ENTRIES_PER_PAGE_DEFAULT;?>"
pageList="[<?php echo ENTRIES_PER_PAGE;?>]"
<?php $auth->sortable(false);?>
pagination="true"
scrollbarSize="0"
>
<thead>
<tr>
<th field="identname" width="<?php echo floor($auth->sizeFaktor*180);?>" sortable="true"><?php echo LNG_READER;?></th>
<th field="country" width="<?php echo floor($auth->sizeFaktor*20);?>" sortable="true"><?php echo LNG_CTY;?></th>
<th field="protocol" width="<?php echo floor($auth->sizeFaktor*130);?>" sortable="true"><?php echo LNG_PROTOCOL;?></th>
<th field="request" width="<?php echo floor($auth->sizeFaktor*165);?>" sortable="true"><?php echo LNG_LAST_USED_SHARE;?></th>
<th field="ecmtime" width="<?php echo floor($auth->sizeFaktor*50);?>" sortable="true"><?php echo LNG_ECM;?></th>
<th field="loggedin" width="<?php echo floor($auth->sizeFaktor*115);?>" sortable="true" formatter="formatDateTime"><?php echo LNG_LOGGED_IN;?></th>
<th field="connection" width="<?php echo floor($auth->sizeFaktor*82);?>" sortable="true"><?php echo LNG_CONNECTION;?></th>
</tr>
</thead>
</table>
</div>
<?php endif;?>
<?php if($auth->isTab("pairs")):?>
<div title="<?php echo LNG_OSCAMPAIRS;?>" iconCls="icon-groups" bodyCls="#dgg">
<table id="dgg" class="easyui-datagrid" style="width:<?php echo floor($auth->sizeFaktor*751);?>px;font-size:30px"
url="ajax.php?type=json&data=pairs"
rownumbers="false"
fit="true"
border="false"
singleSelect="true"
pageSize="<?php echo ENTRIES_PER_PAGE_DEFAULT;?>"
pageList="[<?php echo ENTRIES_PER_PAGE;?>]"
pagination="true">
<thead>
<tr>
<th field="readername" width="<?php echo floor($auth->sizeFaktor*375);?>" sortable="true"><?php echo LNG_READER;?></th>
<th field="clientname" width="<?php echo floor($auth->sizeFaktor*375);?>" sortable="true"><?php echo LNG_CLIENT;?></th>
</tr>
</thead>
</table>
</div>
<?php endif;?>
<?php if($auth->isTab("log")):?>
<div title="<?php echo LNG_OSCAMLOG;?>" iconCls="icon-log" bodyCls="#dgl">
<table id="dgl" class="easyui-datagrid" style="width:<?php echo floor($auth->sizeFaktor*751);?>px;font-size:30px"
url="ajax.php?type=json&data=log"
rownumbers="false"
fit="true"
border="false"
singleSelect="true"
pageSize="<?php echo ENTRIES_PER_PAGE_DEFAULT;?>"
pageList="[<?php echo ENTRIES_PER_PAGE;?>]"
nowrap="false"
pagination="true">
<thead>
<tr>
<th field="logoutput" width="<?php echo floor($auth->sizeFaktor*731);?>" sortable="true"><?php echo LNG_LOGOUT;?></th>
</tr>
</thead>
</table>
</div>
<?php endif;?>
</div>
<?php if(MODERN_STYLE):?>
<div class="easyui-panel" collapsible="true" noheader="true" style="width:<?php echo floor($auth->sizeFaktor*775);?>px;height:auto;border-top:0px !important;">
<div class="head modernhead tabs-header">OScamInfoPHP Ver. <?php echo $VERSION;?> by S@tgate</div>
</div>
<?php endif;?>
<?php else:?>
<span class="reader_error" style="font-weight:bold"><?php echo NO_CURL;?></span>
<?php endif;?>
</div>
<?php else:?>
<SCRIPT TYPE="text/javascript">
<!--
function submitenter(myfield,e){
var keycode;
if (window.event){
keycode = window.event.keyCode;
}
else if (e){
keycode = e.which;
}
else{
return true;
}
if (keycode == 13){
myfield.submit();
return false;
}
else{
return true;
}
}
//-->
</SCRIPT>
<div id="w"
class="easyui-window"
title="<?php echo $auth->errortext;?>"
closable="false"
resizable="false"
maximizable="false";
minimizable="false";
collapsible="false";
style="width:300px;height:150px;padding:5px;overflow:hidden">
<div title="Admin" alt="Admin" onClick="self.location='admin/'" style="width:16px;height:16px;top:6px;left:270px;position:absolute;cursor

ointer" class="icon-settings"></div>
<div class="easyui-layout" fit="true">
<div region="center" border="false" style="padding:10px;background:#fff;border:1px solid #ccc;overflow:hidden">
<form id="ff" action="index.php" method="post" style="overflow:hidden" onKeyPress="return submitenter(this,event)">
<table>
<tr>
<td style="color:#15428b"><?php echo LOGIN_USER;?>:</td>
<td><input name="user" type="text" style="width:140px"></input></td>
</tr>
<tr>
<td style="color:#15428b"><?php echo LOGIN_PASS;?>:</td>
<td><input name="pass" type="password" style="width:140px"></input></td>
</tr>
</table>
<input name="fullscreen" type="hidden">
<script>
document.getElementById('ff').fullscreen.value=screen.width-30;
</script>
</form>
</div>
<div region="south" border="false" style="text-align:right;height:30px;margin-top:5px">
<a class="easyui-linkbutton" iconCls="icon-ok" href="javascript:void(0)" onclick="document.getElementById('ff').submit()">Login</a>
</div>
</div>
<?php endif;?>
</body>
</html>