918 lines
41 KiB
HTML
918 lines
41 KiB
HTML
|
|
<h3>ClipBucket V2.7 Dashboard</h3>
|
|
<div class="row">
|
|
<div class="col-md-6">
|
|
<div class="tabbable">
|
|
<ul class="nav nav-tabs" id="myTab">
|
|
<li class="active">
|
|
<a data-toggle="tab" href="#wactivity">
|
|
<h5>Statistics</h5>
|
|
</a>
|
|
</li>
|
|
<li class="">
|
|
<a data-toggle="tab" href="#nusers">
|
|
<h5>New Users</h5>
|
|
</a>
|
|
</li>
|
|
<li class="">
|
|
<a data-toggle="tab" href="#mvideos">
|
|
<h5>Most Viewed Videos</h5>
|
|
</a>
|
|
</li>
|
|
<li class="">
|
|
<a data-toggle="tab" href="#fobjects">
|
|
<h5>Flagged Objects</h5>
|
|
</a>
|
|
</li>
|
|
|
|
</ul>
|
|
<div class="tab-content">
|
|
<div id="wactivity" class="tab-pane active">
|
|
<div class="widget-box">
|
|
<div class="widget-header">
|
|
<h5><i class="glyphicon glyphicon-stats"></i>Site Stats</h5>
|
|
<div class="widget-toolbar">
|
|
<a href="#" data-action="collapse">
|
|
<i class="icon-chevron-down"></i>
|
|
</a>
|
|
<a href="#" data-action="close">
|
|
<i class="icon-remove"></i>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
<div class="widget-body">
|
|
<div class="tabbable tabs-left">
|
|
<ul class="nav nav-tabs" id="myTab">
|
|
<li class="active">
|
|
<a data-toggle="tab" href="#tweek">
|
|
This Week
|
|
</a>
|
|
</li>
|
|
<li class="">
|
|
<a data-toggle="tab" href="#tmonth">
|
|
This Month
|
|
</a>
|
|
</li>
|
|
<li class="">
|
|
<a data-toggle="tab" href="#today">
|
|
Today
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
<div class="tab-content">
|
|
<div id="tweek" class="tab-pane active">
|
|
<div id="weekly_chart_id" class="flot_chart1"><img class="loading-image" src="./styles/cb_2014/images/ajax-loader.gif"/></div>
|
|
</div>
|
|
<div id="tmonth" class="tab-pane">
|
|
<div id="monthly_chart_id" class="flot_chart1"><img class="loading-image" src="./styles/cb_2014/images/ajax-loader.gif"/></div>
|
|
</div>
|
|
<div id="today" class="tab-pane">
|
|
<div id="daily_chart_id" class="flot_chart1">
|
|
<img class="loading-image" src="./styles/cb_2014/images/ajax-loader.gif"/></div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="widget-main">
|
|
|
|
<hr>
|
|
<table class="table table-stripped table-bordered">
|
|
<tr>
|
|
<td>
|
|
<div class="stats_subitem_d">Total Videos : <strong>{get_videos|number_format count_only=yes}</strong> </div>
|
|
</td>
|
|
<td>
|
|
<div class="stats_subitem_d">Total Groups : <strong>{get_groups count_only=yes}</strong> </div>
|
|
</td>
|
|
<td>
|
|
<div class="stats_subitem_d">Total Collection : <strong>{get_collections count_only=yes}</strong> </div>
|
|
</td>
|
|
<td>
|
|
<div class="stats_subitem_d">Total Users : <strong>{get_users count_only=yes}</strong> </div>
|
|
</td>
|
|
<td>
|
|
<div class="stats_subitem_d">Total Photos : <strong>{get_photos count_only=yes}</strong> </div>
|
|
</td>
|
|
</table>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="nusers" class="tab-pane">
|
|
<div class="widget-box">
|
|
<div class="widget-header">
|
|
<h5><i class="glyphicon glyphicon-user"></i>New Users</h5>
|
|
<div class="widget-toolbar">
|
|
<a href="#" data-action="collapse">
|
|
<i class="icon-chevron-down"></i>
|
|
</a>
|
|
<a href="#" data-action="close">
|
|
<i class="icon-remove"></i>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
<div class="widget-body">
|
|
<div class="tabbable tabs-left">
|
|
<ul class="nav nav-tabs" id="myTab">
|
|
<li class="active">
|
|
<a data-toggle="tab" href="#tuweek">
|
|
This Week
|
|
|
|
</a>
|
|
</li>
|
|
<li class="">
|
|
<a data-toggle="tab" href="#tumonth">
|
|
|
|
This Month
|
|
</a>
|
|
</li>
|
|
<li class="">
|
|
<a data-toggle="tab" href="#utoday">
|
|
|
|
Today
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
<div class="tab-content">
|
|
<div id="tuweek" class="tab-pane active">
|
|
<div id="users_weekly_chart_id" class="flot_chart1"><img class="loading-image" src="./styles/cb_2014/images/ajax-loader.gif"/></div>
|
|
</div>
|
|
<div id="tumonth" class="tab-pane">
|
|
<div id="users_monthly_chart_id" class="flot_chart1"><img class="loading-image" src="./styles/cb_2014/images/ajax-loader.gif"/></div>
|
|
</div>
|
|
<div id="utoday" class="tab-pane">
|
|
<div id="daily_users_chart_id" class="flot_chart1"><img class="loading-image" src="./styles/cb_2014/images/ajax-loader.gif"/></div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="widget-main">
|
|
{if $users}
|
|
{foreach from=$users item=u}
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<div class="row">
|
|
<div class="col-md-2">
|
|
|
|
<a href="view_user.php?uid={$u.userid}"> <img src="{$userquery->getUserThumb($u,'small')}" class="img-thumbnail oneUserImage" />
|
|
</a>
|
|
</div>
|
|
<div class="col-md-10">
|
|
<a href="view_user.php?uid={$u.userid}" target="_blank">{$u.username} </a>({$u.email})
|
|
<button id="dropdownMenu1" class="btn btn-primary btn-xs dropdown-toggle pull-right" data-toggle="dropdown">
|
|
<i class="glyphicon glyphicon-cog"></i><i class="icon-angle-down icon-on-right"></i>
|
|
</button>
|
|
<ul class="dropdown-menu pull-right" aria-labelledby="dropdownMenu1" role="menu">
|
|
<li><a role="menuitem" tabindex="-1"
|
|
href="" class="">Add link</a></li>
|
|
<li><a role="menuitem" tabindex="-1"
|
|
href=""target="_blank">Add link 2</a>
|
|
</li>
|
|
</ul>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{/foreach}
|
|
{/if}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
<div id="mvideos" class="tab-pane">
|
|
<div class="widget-box">
|
|
<div class="widget-header">
|
|
<h5><i class="glyphicon glyphicon-eye-open"></i>Most Viewed Videos & Stats</h5>
|
|
<div class="widget-toolbar">
|
|
<a href="#" data-action="collapse">
|
|
<i class="icon-chevron-down"></i>
|
|
</a>
|
|
<a href="#" data-action="close">
|
|
<i class="icon-remove"></i>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
<div class="widget-body">
|
|
<div class="tabbable tabs-left">
|
|
<ul class="nav nav-tabs" id="myTab">
|
|
<li class="active">
|
|
<a data-toggle="tab" href="#tvweek">
|
|
This Week
|
|
|
|
</a>
|
|
</li>
|
|
<li class="">
|
|
<a data-toggle="tab" href="#tvmonth">
|
|
|
|
This Month
|
|
</a>
|
|
</li>
|
|
<li class="">
|
|
<a data-toggle="tab" href="#vtoday">
|
|
|
|
Today
|
|
</a>
|
|
</li>
|
|
</li>
|
|
</ul>
|
|
<div class="tab-content">
|
|
<div id="tvweek" class="tab-pane active">
|
|
<div id="videos_weekly_chart_id" class="flot_chart1"><img class="loading-image" src="./styles/cb_2014/images/ajax-loader.gif"/></div>
|
|
</div>
|
|
<div id="tvmonth" class="tab-pane">
|
|
<div id="videos_monthly_chart_id" class="flot_chart1"><img class="loading-image" src="./styles/cb_2014/images/ajax-loader.gif"/></div>
|
|
</div>
|
|
<div id="vtoday" class="tab-pane">
|
|
<div id="videos_daily_chart_id" class="flot_chart1"><img class="loading-image" src="./styles/cb_2014/images/ajax-loader.gif"/></div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<div class="widget-main">
|
|
{if $videos}
|
|
{foreach from=$videos item=video}
|
|
<div class="row">
|
|
<div class="col-md-3">
|
|
<img src="{getThumb vdetails=$video}" width="130" height="80" id="thumbs_{$video.videoid}" title=""/>
|
|
</div>
|
|
<div class="col-md-9">
|
|
<a href="">
|
|
{$video.title|truncate:45} </a>
|
|
<strong class="btn btn-primary btn-xs pull-right"> {lang code='views'} : {$video.views|format_number}</strong>
|
|
</div>
|
|
</div>
|
|
<hr>
|
|
{/foreach}
|
|
{/if}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
<div id="fobjects" class="tab-pane">
|
|
<div class="widget-box">
|
|
<div class="widget-header">
|
|
<h5><i class="glyphicon glyphicon-flag"></i>Flagged Objects</h5>
|
|
<div class="widget-toolbar">
|
|
<a href="#" data-action="collapse">
|
|
<i class="icon-chevron-down"></i>
|
|
</a>
|
|
|
|
<a href="#" data-action="close">
|
|
<i class="icon-remove"></i>
|
|
</a>
|
|
</div>
|
|
|
|
<div class="widget-toolbar no-border">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="widget-body">
|
|
|
|
<div class="tabbable tabs-left">
|
|
<ul class="nav nav-tabs" id="myTab">
|
|
<li class="active">
|
|
<a data-toggle="tab" href="#fvideos">Videos</a>
|
|
</li>
|
|
|
|
<li class="photos">
|
|
<a data-toggle="tab" href="#fphotos">Photos</a>
|
|
</li>
|
|
|
|
<li class="users">
|
|
<a data-toggle="tab" href="#fusers">Users</a>
|
|
</li>
|
|
</ul>
|
|
<div class="tab-content">
|
|
<div id="fvideos" class="tab-pane active">
|
|
{section name=list loop=$flagedVideos}
|
|
<div class="row">
|
|
<div class="col-md-3">
|
|
<img src="{getThumb vdetails=$flagedVideos[list]}" width="85" height="70" id="thumbs_{$flagedVideos[list].videoid}" title=""/>
|
|
</div>
|
|
<div class="col-md-6">
|
|
{$flagedVideos[list].title|truncate:50}
|
|
</div>
|
|
<div class="col-md-2">
|
|
<strong class="btn btn-primary btn-xs pull-right"> Flags:{$flagedVideos[list].total_flags}</strong>
|
|
</div>
|
|
<div class="col-md-7">
|
|
<label class="label label-danger">Uploaded {$flagedVideos[list].date_added|niceTime}</label>
|
|
<label class="label label-default"> {lang code='views'} : {$flagedVideos.views|number_format}</label>
|
|
|
|
</div>
|
|
</div>
|
|
{/section}
|
|
</div>
|
|
<div id="fphotos" class="tab-pane">
|
|
{section name=list loop=$flagedPhotos}
|
|
<div class="row">
|
|
<div class="col-md-3">
|
|
<img src="{getThumb vdetails=$flagedPhotos[list]}" width="85" height="70" id="thumbs_{$flagedPhotos[list].photoid}" title=""/>
|
|
</div>
|
|
<div class="col-md-6">
|
|
{$flagedphotos[list].title|truncate:50}
|
|
</div>
|
|
<div class="col-md-2">
|
|
<strong class="btn btn-primary btn-xs pull-right"> Flags:{$flagedPhotos[list].total_flags}</strong>
|
|
</div>
|
|
<div class="col-md-7">
|
|
<label class="label label-danger">Uploaded {$flagedPhotos[list].date_added|niceTime}</label>
|
|
<label class="label label-default"> {lang code='views'} : {$flagedPhotos.views|number_format}</label>
|
|
|
|
</div>
|
|
</div>
|
|
{/section}
|
|
</div>
|
|
|
|
<div id="fusers" class="tab-pane">
|
|
{foreach from=$flagedUsers item=u}
|
|
<div class="row">
|
|
<div class="col-md-3">
|
|
<a href="view_user.php?uid={$u.userid}"> <img src="{$userquery->getUserThumb($u,'small')}" class="img-thumbnail oneUserImage" />
|
|
</a>
|
|
</div>
|
|
<div class="col-md-6">
|
|
({$u.email}) {$u.username}
|
|
</div>
|
|
|
|
<div class="col-md-7">
|
|
<label class="label label-danger">Last Active {$u.last_active|niceTime}</label>
|
|
<label class="label label-primary"> {lang code='Flags'} : {$u.flag_type}</label>
|
|
|
|
</div>
|
|
</div>
|
|
{/foreach}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- /widget-main -->
|
|
</div><!-- /widget-body -->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-md-6">
|
|
<div class="widget-box">
|
|
<div class="widget-header header-color-red">
|
|
<h5><i class="glyphicon glyphicon-book"></i>ClipBucket News</h5>
|
|
<div class="widget-toolbar">
|
|
<a href="#" data-action="collapse">
|
|
<i class="icon-chevron-down"></i>
|
|
</a>
|
|
|
|
<a href="#" data-action="close">
|
|
<i class="icon-remove"></i>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="widget-body">
|
|
<div class="widget-main">
|
|
<div class="alert alert-info">
|
|
<p class="alert-info"><b>Words from ClipBucket!</b></p>
|
|
<hr>
|
|
<small><b>Head's Up its Clipbucket</b></small>
|
|
<li>What lies head?</li>
|
|
<p>
|
|
* Easy ClipBucket integeration with other applications<br>
|
|
* Make more secured, fast and optimized<br>
|
|
* HTML5 ready with mobile support<br>
|
|
* Full documentation of our source code
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<hr>
|
|
<div class="tabbable tabs-left">
|
|
<ul class="nav nav-tabs" id="myTab">
|
|
<li class="active">
|
|
<a data-toggle="tab" href="#todolist">
|
|
<h5><i class="glyphicon glyphicon-list-alt"></i> ToDo List</h5>
|
|
</a>
|
|
</li>
|
|
<li class="">
|
|
<a data-toggle="tab" href="#pnotes">
|
|
<h5><i class="glyphicon glyphicon-pencil"></i> Personal Notes</h5>
|
|
</a>
|
|
</li>
|
|
<li class="">
|
|
<a data-toggle="tab" href="#rcomments">
|
|
<h5><i class="glyphicon glyphicon-comment"></i> Recent Comments</h5>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
<div class="tab-content">
|
|
<div id="todolist" class="tab-pane active">
|
|
<div class="widget-box">
|
|
<div class="widget-header header-color-blue">
|
|
<h5>ToDo List</h5>
|
|
<div class="widget-toolbar">
|
|
<a href="#" data-action="collapse">
|
|
<i class="icon-chevron-down"></i>
|
|
</a>
|
|
<a href="#" data-action="close">
|
|
<i class="icon-remove"></i>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
<div class="widget-body">
|
|
<div class="widget-main">
|
|
<p class="xedit"><b>This is task 1 and some one has to do it</b></p>
|
|
<p class="xedit"><b>This is task 2 and some one has to do it</b></p>
|
|
<p class="xedit"><b>This is task 3 and some one has to do it</b></p>
|
|
<p class="xedit"><b>This is task 4 and some one has to do it</b></p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="pnotes" class="tab-pane">
|
|
<div class="widget-box">
|
|
<div class="widget-header header-color-blue">
|
|
<h5>Personal Note</h5>
|
|
<div class="widget-toolbar">
|
|
<a href="#" data-action="collapse">
|
|
<i class="icon-chevron-down"></i>
|
|
</a>
|
|
|
|
<a href="#" data-action="close">
|
|
<i class="icon-remove"></i>
|
|
</a>
|
|
</div>
|
|
<div class="widget-body">
|
|
<div class="widget-main">
|
|
|
|
<form method="post">
|
|
<textarea name="note" id="note" style="width:90%; height:50px; margin:5px; border:1px solid #999"></textarea>
|
|
<input type="button" class="btn btn-primary btn-xs" id="add_sticky" onclick="add_note('#note')" value="Add A Note" />
|
|
</form>
|
|
|
|
<ul id="stickies">
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
<div id="rcomments" class="tab-pane">
|
|
<div class="widget-box">
|
|
<div class="widget-header header-color-blue">
|
|
<h5>Recent Comments</h5>
|
|
<div class="widget-toolbar">
|
|
<a href="#" data-action="collapse">
|
|
<i class="icon-chevron-down"></i>
|
|
</a>
|
|
<a href="#" data-action="close">
|
|
<i class="icon-remove"></i>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
<div class="widget-body">
|
|
<div class="widget-main">
|
|
<div class="widget-box transparent">
|
|
<div class="widget-header widget-header-small">
|
|
</div>
|
|
<div class="widget-body">
|
|
<div class="widget-body">
|
|
<div class="widget-main no-padding">
|
|
<div class="slimScrollDiv">
|
|
{if $comments}
|
|
{foreach from=$comments item=comment}
|
|
<div class="itemdiv dialogdiv">
|
|
{foreach from=$users item=u}
|
|
<div class="user">
|
|
<img alt="Alexa's Avatar" src="{$userquery->getUserThumb($u,'small')}">
|
|
</div>
|
|
{/foreach}
|
|
<div class="body">
|
|
<div class="time">
|
|
<i class="icon-time"></i>
|
|
<span class="green">{$comment.date_added|date_format}</span>
|
|
</div>
|
|
<div class="name">
|
|
<a href="#">{$comment.anonym_name}</a>
|
|
</div>
|
|
<div class="text">{$comment.comment}</div>
|
|
<div class="tools">
|
|
<a href="#" class="btn btn-minier btn-info">
|
|
<i class="icon-only icon-share-alt"></i>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{/foreach}
|
|
{/if}
|
|
</div>
|
|
</div><!-- /widget-main -->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="well">
|
|
<h3>Who We Are</h3>
|
|
<p>ClipBucket is developed by <strong><a href="http://arslanhassan.com">Arslan Hassan</a></strong> and <strong><a href="http://clip-bucket.com/fawaz-tahir">Fawaz Tahir</a></strong>, we started with a small website application with only functionality of serving videos to the community later on we decided to add every possible social networking feature to make social communities more interactive. We didn't have any milestones, no road map, no charts, no nothing. Only thing we had was a vision as of our captain <strong><a href="http://clip-bucket.com/jahanzeb-hassan">Jahanzeb Hassan</a></strong> and plenty of hard work. </p>
|
|
<p>We also have two more members named <a href="http://clip-bucket.com/ruman-malik">Ruman Malik</a> and <a href="http://clip-bucket.com/zomail-tahir">Zomail Tahir</a> who manage sales and support department.</p>
|
|
<p><strong>ClipBucket team gives special thanks to</strong><br />
|
|
<br />
|
|
* Frank White for helping us knowing the basics of professional application development<br />
|
|
* Christian Russemen for keep our community active<br />
|
|
* BigStack for his great forum support
|
|
<br />
|
|
* You for using ClipBucket.</p>
|
|
<h3>Where in the world we belong to?</h3>
|
|
<p>We belong to <a href="http://clip-bucket.com/pakistan">Islamic Republic of Pakistan</a> :) you may have seen many negative news about Pakistan on television but there are still <a href="http://clip-bucket.com/pakistan#the_truth">some facts</a> you should know about. Its a great country for us and we will always love it.<br />
|
|
<strong>Pakistan Zindabad </strong></p>
|
|
</div>
|
|
|
|
|
|
|
|
<style type="text/css">
|
|
.flot_chart1{
|
|
height: 200px;
|
|
width: 400px;
|
|
}
|
|
</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 //
|
|
|
|
|
|
|
|
//users 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();
|
|
}
|
|
});
|
|
|
|
//users 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>
|
|
|
|
|
|
|