diff --git a/do.php b/do.php index 8b928ab..d644674 100755 --- a/do.php +++ b/do.php @@ -333,29 +333,32 @@ elseif (ig('down') || ig('downf') || //check if the vistor is new in this page before updating kleeja counter if (! preg_match('/,' . $ii . ',/i', $usrcp->kleeja_get_cookie('oldvistor')) && ! isset($_SERVER['HTTP_RANGE'])) { - //updates number of uploads .. - $update_query = [ - 'UPDATE' => "{$dbprefix}files", - 'SET' => 'uploads=uploads+1, last_down=' . time(), - 'WHERE' => $is_id_filename ? "name='" . $filename . "'" : 'id=' . $id, - ]; - - is_array($plugin_run_result = Plugins::getInstance()->run('qr_update_no_uploads_down', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook - $SQL->build($update_query); - - // - //Define as old vistor - //if this vistor has other views then add this view too - //old vistor just for 1 day - // - if ($usrcp->kleeja_get_cookie('oldvistor')) + if ($usrcp->group_id() != 1) { - $usrcp->kleeja_set_cookie('oldvistor', $usrcp->kleeja_get_cookie('oldvistor') . $ii . ',', time() + 86400); - } - else - { - //first time - $usrcp->kleeja_set_cookie('oldvistor', ',' . $ii . ',', time() + 86400); + //updates number of uploads .. + $update_query = [ + 'UPDATE' => "{$dbprefix}files", + 'SET' => 'uploads=uploads+1, last_down=' . time(), + 'WHERE' => $is_id_filename ? "name='" . $filename . "'" : 'id=' . $id, + ]; + + is_array($plugin_run_result = Plugins::getInstance()->run('qr_update_no_uploads_down', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook + $SQL->build($update_query); + + // + //Define as old vistor + //if this vistor has other views then add this view too + //old vistor just for 1 day + // + if ($usrcp->kleeja_get_cookie('oldvistor')) + { + $usrcp->kleeja_set_cookie('oldvistor', $usrcp->kleeja_get_cookie('oldvistor') . $ii . ',', time() + 86400); + } + else + { + //first time + $usrcp->kleeja_set_cookie('oldvistor', ',' . $ii . ',', time() + 86400); + } } } }