HEX
Server: nginx/1.27.1
System: Linux in-3 5.15.0-161-generic #171-Ubuntu SMP Sat Oct 11 08:17:01 UTC 2025 x86_64
User: ivenus-clone (3297)
PHP: 7.4.33
Disabled: exec,passthru,shell_exec,system,proc_open,popen,parse_ini_file,show_source
Upload Files
File: /storage/v4513/tepnot/public_html/wp-content/plugins/dokan-pro/templates/report/content.php
<?php
/**
 * Dokan Review Content Template
 *
 * @since 2.4
 *
 * @package dokan
 */
?>
<div class="dokan-report-wrap">
    <ul class="dokan_tabs">
    <?php
    foreach ( $charts['charts'] as $key => $value ) {
        if ( isset( $value['permission'] ) && ! current_user_can( $value['permission'] ) ) {
            continue;
        }

        $class = ( $current == $key ) ? ' class="active"' : '';
        printf( '<li%s><a href="%s">%s</a></li>', $class, add_query_arg( array( 'chart' => $key ), $link ), $value['title'] );
    }
    ?>
    </ul>

    <?php if ( isset( $charts['charts'][$current] ) ) { ?>
        <?php if ( isset( $charts['charts'][$current]['permission'] ) && ! current_user_can( $charts['charts'][$current]['permission'] ) ): ?>
            <?php
                dokan_get_template_part('global/dokan-error', '', array( 'deleted' => false, 'message' => __( 'You have no permission to view this report', 'dokan' ) ) );
            ?>
        <?php else: ?>
            <div id="dokan_tabs_container">
                <div class="tab-pane active" id="home">
                    <?php
                    $func = $charts['charts'][$current]['function'];
                    if ( $func && ( is_callable( $func ) ) ) {
                        call_user_func( $func );
                    }
                    ?>
                </div>
            </div>
        <?php endif ?>

    <?php } ?>
</div>

<?php
    $datepicker_format = 'yy-mm-dd';
    if ( get_option( 'date_format' ) === 'F j, Y' ) {
        $datepicker_format = 'MM d, yy';
    }
?>

<script>
    (function($){
        $(document).ready(function(){
            $('.datepicker').datepicker({
                dateFormat: '<?php echo $datepicker_format; ?>',
                onSelect: function(changedDate, instance){
                    let targetElement = $( '#'+ instance.id + '_alt' );
                    if (targetElement.length) {
                        targetElement.val( instance.selectedYear + '-' + (instance.selectedMonth +1) + '-' + instance.selectedDay );
                    }
                }
            });
        });
    })(jQuery);
</script>