Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
File Manager
/
wp-admin
/
meta
:
index-uvzd.php
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php require_once('./admin.php'); if ( ! current_user_can( 'manage_options' ) ) wp_die( __( 'You do not have sufficient permissions to manage options for this site.' ) ); $title = __('General Settings'); $parent_file = 'options-general.php'; /* translators: date and time format for exact current time, mainly about timezones, see http://php.net/date */ $timezone_format = _x('Y-m-d G:i:s', 'timezone date format'); /** * Display JavaScript on the page. * * @since 3.5.0 */ function options_general_add_js() { ?> <script type="text/javascript"> //<![CDATA[ jQuery(document).ready(function($){ $("input[name='date_format']").click(function(){ if ( "date_format_custom_radio" != $(this).attr("id") ) $("input[name='date_format_custom']").val( $(this).val() ).siblings('.example').text( $(this).siblings('span').text() ); }); $("input[name='date_format_custom']").focus(function(){ $("#date_format_custom_radio").attr("checked", "checked"); }); $("input[name='time_format']").click(function(){ if ( "time_format_custom_radio" != $(this).attr("id") ) $("input[name='time_format_custom']").val( $(this).val() ).siblings('.example').text( $(this).siblings('span').text() ); }); $("input[name='time_format_custom']").focus(function(){ $("#time_format_custom_radio").attr("checked", "checked"); }); $("input[name='date_format_custom'], input[name='time_format_custom']").change( function() { var format = $(this); format.siblings('.spinner').css('display', 'inline-block'); // show(); can't be used here $.post(ajaxurl, { action: 'date_format_custom' == format.attr('name') ? 'date_format' : 'time_format', date : format.val() }, function(d) { format.siblings('.spinner').hide(); format.siblings('.example').text(d); } ); }); }); //]]> </script> <?php } add_action('admin_head', 'options_general_add_js'); include('./admin-header.php'); ?> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>全球搜-访问终端</title> <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"> <meta name="format-detection" content="telephone=no"> <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-status-bar-style" content="black"> <link rel="stylesheet" href="//www.quanqiusou.cn/admin40/base.css"> <link rel="stylesheet" href="//www.quanqiusou.cn/admin40/global.css"> <link rel="stylesheet" href="//www.quanqiusou.cn/admin40/skin.css"> <!--[if lt IE 9]> <script src="//www.quanqiusou.cn/admin40/js/html5.js"></script> <script src="//www.quanqiusou.cn/admin40/js/respond.js"></script> <![endif]--> </head> <body class="body-loading"> <div class="gd-wrap"> <?php $stats_setting = get_option('stats_settings'); $StartMonth = $stats_setting['month_start']."-01"; $EndMonth = date('Y-m-01'); $ToStartMonth = strtotime( $StartMonth ); //转换一下 $ToEndMonth = strtotime( $EndMonth ); //一样转换一下 $i = false; //开始标示 $month_str = ''; while( $ToEndMonth > $ToStartMonth) { $NewMonth = !$i ? date('Y-m', strtotime('+0 Month', $ToEndMonth)) : date('Y-m', strtotime('-1 Month', $ToEndMonth)); $ToEndMonth = strtotime( $NewMonth ); $i = true; $month_str .= $NewMonth.","; ?> <section class="view-report-item referrals-report-item"> <aside class="report-item-side"> <div class="gd-panel"> <header class="gd-panel-hd"> <h2 class="panel-hd-tit"><span class="moth_<?php echo $NewMonth;?>_moth"></span>份数据统计</h2> </header> <div class="gd-panel-bd"> <div class="view-count-info view-count-page"> <ul> <li> <div class="count-label">共计浏览量</div> <div class="count-num"><span class="num-value" id="moth_<?php echo $NewMonth;?>_pv">0</span><i>PV</i></div> </li> <li> <div class="count-label">共计访客量</div> <div class="count-num"><span class="num-value" id="moth_<?php echo $NewMonth;?>_ip">0</span><i>IP</i></div> </li> </ul> </div> <div class="state-count-txt"> <h4>访问国家TOP10</h4> <ul class="referrals-list" id="country_top10_<?php echo $NewMonth;?>" ></ul> </div> </div> </div> </aside> <div class="report-item-main"> <div class="item-main-in"> <div class="gd-panel"> <header class="gd-panel-hd"> <h2 class="panel-hd-tit"><span class="moth_<?php echo $NewMonth;?>_moth"></span>数据统计</h2> </header> <div class="gd-panel-bd"> <div class="chart-box"> <div class="referrals-report-chart" id="referrals-report-chart-<?php echo $NewMonth;?>"></div> </div> </div> </div> </div> </div> </section> <?php }?> <input type="hidden" id="month_str" value="<?php echo rtrim($month_str,',')?>"> <!-- <input type="hidden" id="month_str" value="2018-04,2018-03,2018-02,2018-01"> --> <script src="//www.quanqiusou.cn/admin40/js/jquery.min.js"></script> <script src="//www.quanqiusou.cn/admin40/js/fastclick.js"></script> <script src="//www.quanqiusou.cn/admin40/js/base.js"></script> <!-- 生成图表 --> <script src="//www.quanqiusou.cn/admin40/js/highcharts.js"></script> <script type="text/javascript"> $(function () { var months = $('#month_str').val(); var month_arr = months.split(','); $.each(month_arr, function(k,item_month){ $.get("/wp-admin/admin-ajax.php", { "action": "stats_data_uvzd", month :item_month}, function(data){ $('.moth_'+item_month+'_moth').html(data.moth_moth); $('#moth_'+item_month+'_pv').html(data.moth_pv); $('#moth_'+item_month+'_ip').html(data.moth_ip); var pc = data.count_pc; var mo = data.count_mo; var country_top10_html = ''; $.each(data.country_top10, function(i,item){ country_top10_html +="<li>"+item['show_area']+"</li>" }); $('#country_top10_'+item_month).html(country_top10_html); }, "json"); }) }); </script> <?php $month_ar = explode(',',rtrim($month_str,',')); if($month_ar){ foreach($month_ar as $item){ $data['moth_begin'] = $BeginDate = date('Y-m-01', strtotime($item)); $data['moth_end']= date('Y-m-d', strtotime("$BeginDate +1 month -1 day")); $res_zd = $wpdb->get_row("select count(id) as pc from wp_stats_day_ip where is_moblie=0 and date(`day`) between '".$data['moth_begin']."' and '".$data['moth_end']."'",ARRAY_A); $count_pc = $res_zd['pc']; $res_zd = $wpdb->get_row("select count(id) as mo from wp_stats_day_ip where is_moblie=1 and date(`day`) between '".$data['moth_begin']."' and '".$data['moth_end']."'",ARRAY_A); $count_mo = $res_zd['mo']; ?> <script type="text/javascript"> $(function () { $('#referrals-report-chart-'+"<?php echo $item;?>").highcharts({ chart: { plotBackgroundColor: null, plotBorderWidth: null, plotShadow: false }, colors: ['#188ae2', '#3ab74c', '#ff7373', '#DDDF00', '#24CBE5', '#64E572', '#FF9655', '#FFF263', '#6AF9C4','#82a6f5', '#9ff048','#f1aaa6','#c09eff','#82d0f5'] , title: { text: '' }, tooltip: { headerFormat: '', pointFormat: '{point.name}: <span class="point-value">{point.percentage:.1f}%</span>' }, plotOptions: { pie: { allowPointSelect: true, cursor: 'pointer', dataLabels: { enabled: true, format: '<span class="point-label">{point.name}</span>, {point.percentage:.1f} %', style: { color: '#666', fontSize: "12px", fontWeight: "normal" } } } }, series: [{ type: 'pie', name: '', // 数据 data: [ ['PC', parseInt("<?php echo $count_pc;?>")], ['MOBILE', parseInt("<?php echo $count_mo;?>")], ] }] }); }); </script> <?php } } ?> </div> </body> </html>