Viewing File: /usr/local/cpanel/base/frontend/jupiter/xovi/index.html.tt

[%
#                                      Copyright 2025 WebPros International, LLC
#                                                           All rights reserved.
# copyright@cpanel.net                                         http://cpanel.net
# This code is subject to the cPanel license. Unauthorized copying is prohibited.
 %]

[%
USE Master;
USE JSON;
USE CPBranding;
USE EcosystemFeatures;

SET dprefix = "../";
SET CPANEL.CPVAR.dprefix = dprefix.repeat(1);

SET TEMPLATE_NAME = "index.html.tt";
SET HOME_PATH     = cp_security_token _ '/frontend/' _  CPANEL.CPDATA.RS;
SET ROUTER_PATH   = HOME_PATH _ '/xovi';
SET PROTOCOL      = 'http';
SET FEATURE       = 'xovi';
IF CPANEL.ENV.HTTPS == 'on';
    SET PROTOCOL  = 'https';
END;
SET HOME_URL      = PROTOCOL _ '://' _ CPANEL.ENV.SERVER_NAME _  ':' _ CPANEL.ENV.SERVER_PORT _ '/' _ cp_security_token;

SET has_feature = CPANEL.feature(FEATURE);


# if the plugin's UI is installed
SET is_setup = EcosystemFeatures.is_plugin_added_to_features(FEATURE);

# list of commonly used variables
SET domains = execute_or_die('DomainInfo', 'list_domains', {}).data;

# See: http://documentation.cpanel.net/display/DD/cPanel+API+2+Functions+-+CustInfo%3A%3Acontactemails
Api2.pre_exec("CustInfo", "contactemails");
SET contact_emails = Api2.exec("CustInfo" , "contactemails" , {});
Api2.post_exec("CustInfo", "contactemails");
SET primary_contact_email = '';
IF contact_emails.size();
    FOREACH contact_email IN contact_emails;
        IF contact_email.name == "email";
            primary_contact_email = contact_email.value;
        END;
    END;
END;

SET locale_tag = locale.get_language_tag();  # es_419
SET language_tag = locale_tag.split('_').0;  # es
SET WINDOW_KEY = "xoviPlugin";

links_code = PROCESS links_block;
init_code = PROCESS init_block;
js_code = PROCESS js_block;
meta_code = PROCESS meta_block;
%]
[% WRAPPER '_assets/master.html.tt'
    page_title = 'Search Engine Optimization'
    app_key = 'cpanel-xovi-plugin'
    include_cjt = 0
    is_jupiter_style = 1
    include_legacy_stylesheets = 0
    include_legacy_scripts = 0
    use_master_bootstrap = 0
    page_styles = links_code
    page_js_first = init_code
    page_js = js_code
    meta = meta_code
-%]
<div class="body-content">
    [% IF has_feature && is_setup %]
    <script>
    /** Use in the template expansion of some linked resources **/
    // const calculateBasePath = (keepSegments) => {
    //     const path = window.location.pathname
    //     const segments = path.split('/')
    //     const keep = segments.slice(0, keepSegments + 1)
    //     return keep.join('/') + '/'
    // }
    </script>

    <div id="app"></div><div data-tf-live="01KBFCKZF0YQEMTBEA734774G6"></div><script crossorigin="crossorigin" src="./assets/index-C1fZpgLq.js" type="module"></script><script src="//embed.typeform.com/next/embed.js"></script>
    [% ELSE %]
    <div class="body-content">
        <div class="alert alert-danger">
            <span class="glyphicon glyphicon-remove-sign" aria-hidden="true"></span>
            <div class="alert-message">
                [% locale.maketext('[output,strong,Error:] This feature, “[_1]”, is not enabled on your account. Please contact your hosting provider for access.', 'Search Engine Optimization') %]
            </div>
        </div>
    </div>
    <meta http-equiv="refresh" content="0;url='../../index.html'" />
    [% END %]
</div>
[% END %]
[% BLOCK links_block %]
    <link crossorigin="crossorigin" href="./assets/index-Dy0h-d_G.css" rel="stylesheet" />

    <style>
        <!-- fix any leaky css from between the spa and panel -->
        /* Correction for the page title and subtitle    */
        h1.page-header {
            display: inline-block !important;
            border-bottom: 0;
            font-weight: lighter;
            font-family: "Open Sans",sans-serif;
            line-height: 1.1;
            color: inherit;
            font-size: 2em;
            margin-bottom: 0.67em;
        }

        h1.page-header .page-title-section {
            vertical-align: top;
            font-size: 20px;
        }

        h1.page-header .page-title-section .page-title {
            display: block;
            font-size: 30px;
            text-transform: capitalize;
        }

        h1.page-header .page-title-section #pageSubHeading {
            display: block;
            font-size: 65%;
            font-weight: 400;
            line-height: 1;
            color: #999;
        }
    </style>
[% END %]
[% BLOCK init_block %]
    <script>
        window.PAGE = {
            ...window.PAGE,
            deprefix: [% dprefix.json() %],
            [% WINDOW_KEY %]: {
                isSandbox:    [% CPANEL.is_sandbox ? 'true' :'false' %],
                isCpanel:     true,
                languageTag:  [% language_tag.json() %],
                localeTag:    [% locale_tag.json() %],
                sessionToken: [% cp_security_token.json() %],
                basePath:     [% ROUTER_PATH.json() %],
                user:         [% CPANEL.authuser.json() %],
                homeUrl:      [% HOME_URL.json() %],
                homeDir:      [% CPANEL.homedir.json() || '""'%],
                companyId:    [% get_company_id() %],
                contactEmail: [% primary_contact_email.json() %],
                trackingId:   [% CPANEL.CPDATA.UUID.json() %]
            }
        }
    </script>
[% END %]
[% BLOCK js_block %]
    
[% END %]
[% BLOCK meta_block %]
    <meta charset="UTF-8" />
<meta content="width=device-width, initial-scale=1.0" name="viewport" />

[% END %]
Back to Directory File Manager