<?php
 
/**
 
 *   __ _  ___  ___ ___   ___   ___     ____ _ __ ___   ___
 
 *  / _` |/  / / __/ _ \ / _ \ /  /    / __/| '_ ` _ \ /  /
 
 * | (_| |\  \| (_| (_) | (_) |\  \   | (__ | | | | | |\  \
 
 *  \__,_|/__/ \___\___/ \___/ /__/    \___\|_| |_| |_|/__/
 
 * 
 
 * 
 
 ************************************************************************************
 
 * @ASCOOS-NAME            : ASCOOS CMS 25'                                            *
 
 * @ASCOOS-VERSION         : 25.0.0                                                    *
 
 * @ASCOOS-CATEGORY        : Block (Frontend and Administrator Side)                   *
 
 * @ASCOOS-CREATOR         : Drogidis Christos                                         *
 
 * @ASCOOS-SITE            : www.ascoos.com                                            *
 
 * @ASCOOS-LICENSE         : [Commercial] http://docs.ascoos.com/lics/ascoos/AGL.html  *
 
 * @ASCOOS-COPYRIGHT       : Copyright (c) 2007 - 2025, AlexSoft Software.             *
 
 ************************************************************************************
 
 *
 
 * @package                : Block Manager - Online Website Users
 
 * @subpackage             : installation file
 
 * @source                 : /[BLOCKS PATH]/online_users/install.php
 
 * @fileNo                 : 
 
 * @version                : 1.0.3
 
 * @created                : 2007-05-01 20:00:00 UTC+3
 
 * @updated                : 2025-01-01 00:00:00 UTC+3
 
 * @author                 : Drogidis Christos
 
 * @authorSite             : www.alexsoft.gr
 
 * @license             : AGL-F
 
 * 
 
 * @since PHP 8.2.0
 
 */
 
 
 
defined ("ALEXSOFT_RUN_CMS") or die("Prohibition of Access.");
 
 
global $objInstaller;
 
 
// Adjust the installer to work at BLOCK and give the block that will handle
 
$objInstaller->setExtension('online_users', INS_BLOCK);
 
 
// We adjust the installer so that after installation, to take us or not part of the Block configuration.
 
$objInstaller->afterSetParams(false);
 
 
// If the block is not installed then run the installation.
 
if (!$objInstaller->isInstalled()) {
 
    // We create the path of the Block.
 
    $objInstaller->createPath();
 
    
 
    // If the installation files on the Server is successful
 
    if ( $objInstaller->extractPackage() )
 
    {
 
        // We export themes in internal path "fronts". !!!! Not Change for Blocks. !!!!
 
        $objInstaller->extractThemes('fronts');
 
        
 
        // We take the position id, show called "article_details".
 
        $block_pos = $objInstaller->getPosition('NOTHING');
 
 
        // We take the sort that will apply to the position.
 
        $block_order = $objInstaller->getOrderPosition('NOTHING');
 
    
 
        // Place the Block in the database.
 
        $objInstaller->addSQL("INSERT INTO #__blocks VALUES(NULL, '".$objInstaller->name."', '".$objInstaller->name."', '0', '0', '{\"en\":\"Who is online?\",\"el\":\"????? ????? ???? ???? ??????????;\"}', '', '', '', '', ".$block_pos.", ".$block_order.", '', '0', '0', '0', '0', '{\"show_icon\":0,\"show_total\":1,\"show_guests\":1,\"show_robots\":1,\"show_blocks\":1,\"show_users\":1,\"count\":20,\"theme\":\"default\"}');");
 
        
 
        // pour the settings from the installer.
 
        $objInstaller->clear();
 
        
 
    } else {
 
        // else otherwise cancel the installation and pour the settings from the installer.
 
        $objInstaller->cancelInstallation();
 
    }
 
} else { // else pour the settings from the installer.
 
    $objInstaller->clear();
 
}
 
?>
 
 |