HEX
Server: Apache
System: Linux vps8051.dx3webs.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: paiskincare (10000)
PHP: 5.6.40-52+ubuntu20.04.1+deb.sury.org+1
Disabled: opcache_get_status
Upload Files
File: /var/www/vhosts/paiskincare.com/httpdocs/pai_chimp911.php
<?php
/**
 * Desktop Data
 * Version 2.4
 * By Steven300
 * @copyright Portions Copyright 2004-2008 Zen Cart Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 */
 
require('includes/application_top.php');
 
//***************Settings*********************

//Turn on url_reporting
//1 for yes, 0 for no 
$url_reporting = 1;

//Clear old whos_online data on each refresh
//1 for yes, 0 for no
$clear_whosonline = 1;
//Set time (clear data older than 180 seconds)
//Ignored if $clear_whosonline is set to 0
$clear_time = 180;

//Set language ID if using multiple languages
//Leave as 1 for normal
$language_id = 1;

//Array of order statuses to be displayed
//Enter the order status IDs separated by a ;
//E.g. '1;2;3;4';
//Use * to show all
$display_status = '1;2;3;5;0;13';


//Array of order statuses to be highlighted
//(Only highlighted when count is larger than 0)
//Enter the order status IDs separated by a ;
//Leave as '1;2'; for normal
$highlight_status = '1;2';

//Display buttons
//1 for yes, 0 for no
$show_home_button = 1;
$show_refresh_button = 0;
$show_admin_button = 1;
$show_download_button = 0;

//Name of admin folder
//Used for admin button
$admin_folder = "monkey75";

//*********************************************

?>

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<meta http-equiv="refresh" content="180">
<title><?php echo 'Pai UK Admin'; ?></title>
<style type="text/css"><!--
a {
color : #080381;
text-decoration : none;
}
a:hover {
color : blue;
text-decoration : none;
}
a:link {
color: blue;
text-decoration : none;
}
a:visited {
color: blue;
text-decoration : none;
}
a:active {
color: blue;
text-decoration : none;
}
a:hover {
color: blue;
text-decoration : none;
}
.heading {
font-family : Verdana, Arial, Helvetica, sans-serif;
font-size : 20px;
font-weight : bold;
line-height : 1.5;
color : #d3dbff;
}
.main {
font-family : Verdana, Arial, Helvetica, sans-serif;
font-size : 17px;
font-weight : bold;
line-height : 1.5;
color : #ffffff;
}
.sub {
font-family : Verdana, Arial, Helvetica, sans-serif;
font-size : 12px;
font-weight : bold;
line-height : 1.5;
color : #dddddd;
}
.text {
font-family : Verdana, Arial, Helvetica, sans-serif;
font-size : 11px;
font-weight : bold;
line-height : 1.5;
color : #000000;
}
.menuBoxHeading {
font-family : Verdana, Arial, Helvetica, sans-serif;
font-size : 12px;
color : #ffffff;
font-weight : bold;
background-color : #7187bb;
border-color : #7187bb;
border-style : solid;
border-width : 1px;
}
.infoBox {
font-family : Verdana, Arial, Helvetica, sans-serif;
font-size : 10px;
color : #080381;
background-color : #f2f4ff;
border-color : #7187bb;
border-style : solid;
border-width : 1px;
}
.smallText {
font-family : Verdana, Arial, sans-serif;
font-size : 10px;
}
img {
border-style: none;
}
--></style>

</head>

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF">

<table border="5" width="146" height="" cellspacing="2" cellpadding="2">
                          <tr> 
                            <td valign="top">
<?php

//Reset $orders_contents variable
$orders_contents = '';

//Get filename
$currentfile = $_SERVER["SCRIPT_NAME"]; 

//Remove mod from whos_online data
$remove_mod = "delete from " . DESKTOP_DATA_TABLE_WHOS_ONLINE . " where last_page_url = '" . $currentfile . "'";
$db->Execute($remove_mod);

if ( $clear_whosonline == 1 ) {

//Remove old whos_online data
$xx_mins_ago = ( time() - $clear_time );
$clean_online = "delete from " . DESKTOP_DATA_TABLE_WHOS_ONLINE . " where time_last_click < '" . $xx_mins_ago . "'";
$db->Execute($clean_online);

}

//Select remaining visitors
$whos_online_visitors_sql = "select * from " . DESKTOP_DATA_TABLE_WHOS_ONLINE . " wo where wo.session_id != ''";
$whos_online_visitors_query = $db->Execute($whos_online_visitors_sql);

//Select remaining robots
$whos_online_robots_sql = "select * from " . DESKTOP_DATA_TABLE_WHOS_ONLINE . " wo where wo.session_id = ''";
$whos_online_robots_query = $db->Execute($whos_online_robots_sql);


//Globalise variables
$url = '';
$number_on_shopping_cart_page = 0;
$number_on_account_create_page = 0;
$number_on_checkout_page = 0;
$number_on_other_page = 0;
$icons = '';
$icon_count = 0;
$content4 = '';

//While there are visitors
while(!$whos_online_visitors_query->EOF) {

//Get visitor's last page url
$url = $whos_online_visitors_query->fields['last_page_url'];

//Detect page
if (eregi('shopping_cart', $url)) {

$number_on_shopping_cart_page ++;

} else if ( (eregi('account', $url)) || (eregi('login', $url)) ) {

$number_on_account_create_page ++;

} else if (eregi('checkout', $url)) {

$number_on_checkout_page ++;

} else {

$number_on_other_page ++;

}

//Move to next visitor
$whos_online_visitors_query->MoveNext();

} //End of while-loop

while ( $number_on_checkout_page > 0 ) {

if ( $icon_count < 6 ) {
$icons = $icons . '<img src="images/desktop_data/dd_icon_green.JPG" height="10" title="Checkout" alt="Checkout">';
$icon_count ++;
}

$number_on_checkout_page --;

}

while ( $number_on_account_create_page > 0 ) {

if ( $icon_count < 6 ) {
$icons = $icons . '<img src="images/desktop_data/dd_icon_yellow.JPG" height="10" title="Login/Account" alt="Login/Account">';
$icon_count ++;
}

$number_on_account_create_page --;

}

while ( $number_on_shopping_cart_page > 0 ) {

if ( $icon_count < 6 ) {
$icons = $icons . '<img src="images/desktop_data/dd_icon_pink.JPG" height="10" title="Shopping Cart" alt="Shopping Cart">';
$icon_count ++;
}

$number_on_shopping_cart_page --;

}

while ( $number_on_other_page > 0 ) {

if ( $icon_count < 6 ) {
$icons = $icons . '<img src="images/desktop_data/dd_icon_red.JPG" height="10" title="Browsing" alt="Browsing">';
$icon_count ++;
}

$number_on_other_page --;

}

//Select number of customers
$customers_sql = "select count(*) as count from " . DESKTOP_DATA_TABLE_CUSTOMERS . " c";
$customers = $db->Execute($customers_sql);

//Select each defined order status
$orders_status_sql = "select os.orders_status_name, os.orders_status_id from " . DESKTOP_DATA_TABLE_ORDERS_STATUS . " os where os.language_id = '" . $language_id . "'";
$orders_status_query = $db->Execute($orders_status_sql);

//For each defined order status
while ( !$orders_status_query->EOF ) {

//If order status is to be displayed
if(($display_status == '*') || in_array($orders_status_query->fields['orders_status_id'],explode(';', $display_status))) {

    //Select number of orders
    $orders_pending_sql = "select count(*) as count from " . DESKTOP_DATA_TABLE_ORDERS . " o where o.orders_status = '" . $orders_status_query->fields['orders_status_id'] . "'";
    $orders_pending = $db->Execute($orders_pending_sql);
    
	//Prepare display data
	//If larger than 0 and set to highlight, then highlight
	if ( ( $orders_pending->fields['count'] > 0 ) && ( in_array($orders_status_query->fields['orders_status_id'],explode(';', $highlight_status)) ) ) {
      $orders_contents .= '<strong style="color: #e33;">' . $orders_status_query->fields['orders_status_name'] . ': ' . $orders_pending->fields['count'] . '</strong><br />';
    } else {
      $orders_contents .= $orders_status_query->fields['orders_status_name'] . ': ' . $orders_pending->fields['count'] . '<br />';
    }
	
} //End of if order_status_display statement

	//Go to next defined order status
	$orders_status_query->MoveNext();
	}

$orders_contents = substr($orders_contents, 0, -4);

//Number of customers
$content1 = DD_CUSTOMERS . $customers->fields['count'];

if ( $url_reporting == 1 ) {
//Number of visitors/robots
$content2 = DD_VISITORS . $whos_online_visitors_query->RecordCount() . ' ' . $icons . '<br />' . DD_ROBOTS . $whos_online_robots_query->RecordCount();
} else {
//Number of visitors/robots
$content2 = DD_VISITORS . $whos_online_visitors_query->RecordCount() . '<br />' . DD_ROBOTS . $whos_online_robots_query->RecordCount();
}

//Number of orders
$content3 = $orders_contents;

//Home button
if ($show_home_button == 1) {
$content4 .= "<a href=\"index.php\" target=\"_blank\"><img src=\"images/desktop_data/dd_home.png\" height='15' width='15' title='Home' alt='Home'></a>" . "&nbsp;&nbsp;&nbsp;";
}
//Refresh button
if ($show_refresh_button == 1) {
$content4 .= "<a href=javascript:location.reload(true)><img src=\"images/desktop_data/dd_refresh.gif\" height='15' width='15' title='Refresh' alt='Refresh'></a>" . "&nbsp;&nbsp;&nbsp;";
}
//Admin button
if ($show_admin_button == 1) {
$content4 .= "<a href=\"$admin_folder/\" target=\"_blank\"><img src=\"images/desktop_data/dd_admin.png\" height='16' width='15' title='Admin' alt='Admin'></a>" . "&nbsp;&nbsp;&nbsp;";
}
//Download button
if ($show_download_button == 1) {
$content4 .= "<a href=\"http://www.zen-cart.com/index.php?main_page=product_contrib_info&products_id=1121\" target=\"_blank\"><img src=\"images/desktop_data/dd_download.png\" height='14' width='15' title='Download' alt='Download'></a>";
}

//Display data                    
?>
<div class="menuBoxHeading"><? echo DD_HEADING ?></div>
<div class="infoBox"><?php echo $content1; ?></div>
<div class="infoBox"><?php echo $content2; ?></div>
<div class="infoBox"><?php echo $content3; ?></div>

<? if ( ($show_home_button == 1) || ($show_refresh_button == 1) || ($show_admin_button == 1) || ($show_download_button == 1) ) { ?>
<div align="center"><div class="infoBox"><?php echo $content4; ?></div>
<?
}
?>

</div>

</td></tr></table>
</body>
</html>

<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>