426 lines
13 KiB
HTML
426 lines
13 KiB
HTML
<meta charset="UTF-8">
|
|
<title>ClipBucket v2.7</title>
|
|
<link rel="stylesheet" href="{$theme_url}/bootstrap/css/bootstrap.min.css">
|
|
<link rel="stylesheet" href="{$theme_url}/assets/css/font-awesome.min.css" />
|
|
<link rel="stylesheet" href="{$theme_url}/css/styles.css" />
|
|
|
|
<!--[if IE 7]>
|
|
<link rel="stylesheet" href="{$theme_url}/assets/css/font-awesome-ie7.min.css" />
|
|
<![endif]-->
|
|
|
|
<!-- page specific plugin styles -->
|
|
|
|
<!-- fonts -->
|
|
|
|
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:400,300" />
|
|
|
|
<!-- ace styles -->
|
|
|
|
<link rel="stylesheet" href="{$theme_url}/assets/css/ace.min.css" />
|
|
<link rel="stylesheet" href="{$theme_url}/assets/css/ace-rtl.min.css" />
|
|
<link rel="stylesheet" href="{$theme_url}/assets/css/ace-skins.min.css" />
|
|
|
|
<!--[if lte IE 8]>
|
|
<link rel="stylesheet" href="{$theme_url}/assets/css/ace-ie.min.css" />
|
|
<![endif]-->
|
|
|
|
<!-- inline styles related to this page -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ace settings handler -->
|
|
|
|
<script src="{$theme_url}/assets/js/ace-extra.min.js"></script>
|
|
<script src="{$baseurl}/js/clipbucket.js"></script>
|
|
|
|
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
|
|
|
<!--[if lt IE 9]>
|
|
<script src="assets/js/html5shiv.js"></script>
|
|
<script src="assets/js/respond.min.js"></script>
|
|
<![endif]-->
|
|
<script type="text/javascript" src="{$theme_url}/../../../../js/functions.js"></script>
|
|
<script type="text/javascript" src="{$theme_url}/../../../../js/admin_functions.js"></script>
|
|
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
|
|
<!-- for bootstrap wysiwyg -->
|
|
<link rel="stylesheet" href="{$theme_url}/css/summernote.css" />
|
|
|
|
|
|
<script src="{$theme_url}/js/editor.js"></script>
|
|
|
|
<!-- for bootstrap wysiwyg -->
|
|
|
|
<!-- for popovers -->
|
|
<script>
|
|
$(function (){
|
|
$(".popoverButton").popover();
|
|
});
|
|
|
|
</script>
|
|
|
|
<!-- bootstrap x-editable -->
|
|
<link href="//cdnjs.cloudflare.com/ajax/libs/x-editable/1.5.0/bootstrap3-editable/css/bootstrap-editable.css" rel="stylesheet"/>
|
|
<script src="//cdnjs.cloudflare.com/ajax/libs/x-editable/1.5.0/bootstrap3-editable/js/bootstrap-editable.min.js"></script>
|
|
<script type="text/javascript">
|
|
$(document).ready(function() {
|
|
$('.xedit').editable({
|
|
mode: 'inline'
|
|
});
|
|
});
|
|
</script>
|
|
<script>
|
|
$(document).ready(function(){
|
|
$(".drop").on({
|
|
click: function(e){
|
|
var ele = $(this).parent().nextAll("#content").get(0);
|
|
$(ele).toggle();
|
|
}
|
|
});
|
|
});
|
|
|
|
|
|
</script>
|
|
|
|
<script>
|
|
$(document).ready(function() {
|
|
$('#desc').summernote();
|
|
});
|
|
</script>
|
|
|
|
|
|
|
|
<style type="text/css">
|
|
.flot_chart{
|
|
height: 200px;
|
|
width: 800px;
|
|
}
|
|
</style>
|
|
|
|
<script type="text/javascript">
|
|
|
|
$(function() {
|
|
|
|
var options = {
|
|
|
|
series: {
|
|
bars: {
|
|
show: true,
|
|
steps: true,
|
|
barWidth: 0.6,
|
|
align: "center"
|
|
},
|
|
points: { show: true },
|
|
lines: { show: true }
|
|
},
|
|
xaxis: {
|
|
mode: "categories",
|
|
tickLength: 0
|
|
},
|
|
grid: { hoverable: true, clickable: true }
|
|
|
|
};
|
|
|
|
// $.plot("#placeholder", data, options);
|
|
|
|
var iteration = 0;
|
|
|
|
function fetchData() {
|
|
|
|
//++iteration;
|
|
// Daily videos Data //
|
|
|
|
function onVideosDataReceveDaily(series_daily){
|
|
|
|
data = series_daily;
|
|
//$.plot("#placeholder", data, options);
|
|
$.plot("#videos_daily_chart_id", data, options);
|
|
tooltip("#videos_daily_chart_id","#enableTooltipDaily");
|
|
}
|
|
|
|
$.ajax({
|
|
url: "charts/reports/videos_daily_reports.php",
|
|
type: "POST",
|
|
data:"videos=videos",
|
|
dataType: "json",
|
|
success: onVideosDataReceveDaily ,
|
|
error: function() {
|
|
$("#videos_daily_chart_id").html("error");
|
|
alert('error');
|
|
},
|
|
complete: function(){
|
|
$('#videos_daily_chart_id .loading-image').hide();
|
|
}
|
|
});
|
|
|
|
// !Daily videos Data //
|
|
|
|
// Daily users Data //
|
|
|
|
function onUserDataReceveDaily(series_daily){
|
|
|
|
data = series_daily;
|
|
//$.plot("#placeholder", data, options);
|
|
$.plot("#daily_users_chart_id", data, options);
|
|
tooltip("#daily_users_chart_id","#enableTooltipDaily");
|
|
}
|
|
|
|
$.ajax({
|
|
url: "charts/reports/users_daily_reports.php",
|
|
type: "POST",
|
|
data:"videos=videos",
|
|
dataType: "json",
|
|
success: onUserDataReceveDaily ,
|
|
error: function() {
|
|
$("#daily_users_chart_id").html("error");
|
|
alert('error');
|
|
},
|
|
complete: function(){
|
|
$('#daily_users_chart_id .loading-image').hide();
|
|
}
|
|
});
|
|
|
|
// !Daily users Data //
|
|
|
|
// Daily Data //
|
|
|
|
function onDataReceveDaily(series_daily){
|
|
|
|
data = series_daily;
|
|
//$.plot("#placeholder", data, options);
|
|
$.plot("#daily_chart_id", data, options);
|
|
tooltip("#daily_chart_id","#enableTooltipDaily");
|
|
}
|
|
|
|
$.ajax({
|
|
url: "charts/reports/daily_activity_reports.php",
|
|
type: "POST",
|
|
data:"videos=videos",
|
|
dataType: "json",
|
|
success: onDataReceveDaily ,
|
|
error: function() {
|
|
$("#daily_chart_id").html("error");
|
|
alert('error');
|
|
},
|
|
complete: function(){
|
|
$('#daily_chart_id .loading-image').hide();
|
|
}
|
|
});
|
|
|
|
// !Daily Data //
|
|
|
|
|
|
//users Week Data //
|
|
|
|
function onUsersDataReceivedWeekly(series_weekly) {
|
|
|
|
data = series_weekly ;
|
|
|
|
$.plot("#users_weekly_chart_id", data, options);
|
|
tooltip("#users_weekly_chart_id","#enableTooltipWeekly");
|
|
}
|
|
|
|
$.ajax({
|
|
url: "charts/reports/users_week_activity.php",
|
|
type: "POST",
|
|
data:"videos=videos",
|
|
dataType: "json",
|
|
success: onUsersDataReceivedWeekly ,
|
|
error: function() {
|
|
$("#users_weekly_chart_id").html("error");
|
|
alert('error');
|
|
},
|
|
complete: function(){
|
|
$('#users_weekly_chart_id .loading-image').hide();
|
|
}
|
|
});
|
|
//users Week Data //
|
|
|
|
//videos Week Data //
|
|
|
|
function onVideosDataReceivedWeekly(series_weekly) {
|
|
|
|
data = series_weekly ;
|
|
|
|
$.plot("#videos_weekly_chart_id", data, options);
|
|
tooltip("#videos_weekly_chart_id","#enableTooltipWeekly");
|
|
}
|
|
|
|
$.ajax({
|
|
url: "charts/reports/videos_weekly_reports.php",
|
|
type: "POST",
|
|
data:"videos=videos",
|
|
dataType: "json",
|
|
success: onVideosDataReceivedWeekly ,
|
|
error: function() {
|
|
$("#videos_weekly_chart_id").html("error");
|
|
alert('error');
|
|
},
|
|
complete: function(){
|
|
$('#videos_weekly_chart_id .loading-image').hide();
|
|
}
|
|
});
|
|
//videos Week Data //
|
|
|
|
|
|
// Week Data //
|
|
|
|
function onDataReceivedWeekly(series_weekly) {
|
|
|
|
data = series_weekly ;
|
|
|
|
$.plot("#weekly_chart_id", data, options);
|
|
tooltip("#weekly_chart_id","#enableTooltipWeekly");
|
|
}
|
|
|
|
$.ajax({
|
|
url: "charts/reports/weekly_activity_reports.php",
|
|
type: "POST",
|
|
data:"videos=videos",
|
|
dataType: "json",
|
|
success: onDataReceivedWeekly ,
|
|
error: function() {
|
|
$("#weekly_chart_id").html("error");
|
|
alert('error');
|
|
},
|
|
complete: function(){
|
|
$('#weekly_chart_id .loading-image').hide();
|
|
}
|
|
});
|
|
// !Week Data //
|
|
//users Monthly Data //
|
|
|
|
function onUsersDataReceveMonthly(series_monthly){
|
|
|
|
data = series_monthly;
|
|
//$.plot("#placeholder", data, options);
|
|
$.plot("#users_monthly_chart_id", data, options);
|
|
tooltip("#users_monthly_chart_id","#enableTooltipMonthly");
|
|
}
|
|
|
|
$.ajax({
|
|
url: "charts/reports/users_monthly_reports.php",
|
|
type: "POST",
|
|
data:"videos=videos",
|
|
dataType: "json",
|
|
success: onUsersDataReceveMonthly ,
|
|
error: function() {
|
|
$("#users_monthly_chart_id").html("error");
|
|
alert('error');
|
|
},
|
|
complete: function(){
|
|
$('#users_monthly_chart_id .loading-image').hide();
|
|
}
|
|
});
|
|
|
|
//users Monthly Data //
|
|
|
|
// Monthly Data //
|
|
|
|
function onDataReceveMonthly(series_monthly){
|
|
|
|
data = series_monthly;
|
|
//$.plot("#placeholder", data, options);
|
|
$.plot("#monthly_chart_id", data, options);
|
|
tooltip("#monthly_chart_id","#enableTooltipMonthly");
|
|
}
|
|
|
|
$.ajax({
|
|
url: "charts/reports/monthly_activity_reports.php",
|
|
type: "POST",
|
|
data:"videos=videos",
|
|
dataType: "json",
|
|
success: onDataReceveMonthly ,
|
|
error: function() {
|
|
$("#monthly_chart_id").html("error");
|
|
alert('error');
|
|
},
|
|
complete: function(){
|
|
$('#monthly_chart_id .loading-image').hide();
|
|
}
|
|
});
|
|
|
|
// !Monthly Data //
|
|
|
|
//videos Monthly Data //
|
|
|
|
function onVideosDataReceveMonthly(series_monthly){
|
|
|
|
data = series_monthly;
|
|
//$.plot("#placeholder", data, options);
|
|
$.plot("#videos_monthly_chart_id", data, options);
|
|
tooltip("#videos_monthly_chart_id","#enableTooltipMonthly");
|
|
}
|
|
|
|
$.ajax({
|
|
url: "charts/reports/videos_monthly_reports.php",
|
|
type: "POST",
|
|
data:"videos=videos",
|
|
dataType: "json",
|
|
success: onVideosDataReceveMonthly ,
|
|
error: function() {
|
|
$("#videos_monthly_chart_id").html("error");
|
|
alert('error');
|
|
},
|
|
complete: function(){
|
|
$('#videos_monthly_chart_id .loading-image').hide();
|
|
}
|
|
});
|
|
|
|
//videos !Monthly Data //
|
|
|
|
/*if (iteration < 5) {
|
|
setTimeout(fetchData, 10000);
|
|
} else {
|
|
data = [];
|
|
alreadyFetched = {};
|
|
}*/
|
|
}
|
|
fetchData();
|
|
//setTimeout(fetchData, 10000);
|
|
|
|
function showTooltip(x, y, contents) {
|
|
$('<div id="tooltip">' + contents + '</div>').css( {
|
|
position: 'absolute',
|
|
display: 'none',
|
|
top: y + 5,
|
|
left: x + 5,
|
|
border: '1px solid #fdd',
|
|
padding: '2px',
|
|
'background-color': '#fee',
|
|
opacity: 0.80
|
|
}).appendTo("body").fadeIn(200);
|
|
}
|
|
|
|
var previousPoint = null;
|
|
function tooltip(chart_id,tooltip_id){
|
|
|
|
$(chart_id).bind("plothover", function (event, pos, item) {
|
|
$("#x").text(pos.x.toFixed(2));
|
|
$("#y").text(pos.y.toFixed(2));
|
|
|
|
if ($(tooltip_id).is(':checked')) {
|
|
if (item) {
|
|
if (previousPoint != item.dataIndex) {
|
|
previousPoint = item.dataIndex;
|
|
|
|
$("#tooltip").remove();
|
|
var x = item.datapoint[0].toFixed(2),
|
|
y = item.datapoint[1].toFixed(2);
|
|
|
|
showTooltip(item.pageX, item.pageY,
|
|
item.series.label + " = " + y);
|
|
}
|
|
}
|
|
else {
|
|
$("#tooltip").remove();
|
|
previousPoint = null;
|
|
}
|
|
}
|
|
});
|
|
}
|
|
});
|
|
</script>
|
|
|