Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Shells Virtual Desktop
BMail.ag - Secure Email Service
Server.net
CPLicense.net
VPS Server
Buy VPN
Vultr
VMs for AI
HostDare
ReliableSite White-Label Dedicated Hosting for Resellers
InterServer VPS
BMail.ag - Secure Email Service
Best VPN
High-Performance Bare Metal Server Solutions
Karvl.com
Server Mania Cloud Hosting
DataWagon Hosting
AlphaVPS Hosting
Evoxt.com
Clouvider
Godlike VPS
VPS Hosting with NVMe
Residential IPs in the US & 4G Mobile Proxies in EU & US with Unlimited Bandwidth
ReliableSite White-Label Dedicated Hosting for Resellers
Shells Virtual Desktop
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

HOST-C, Chat, Updates, Stuff

14243444648

Comments

  • @host_c said: Tho.... I do think some good will come out of all this...... eventually........

    Yeah, maybe @FAT32 will even stop hating me!

  • MaxTakebaMaxTakeba Member
    edited April 19

    So @host_c can I have that /24 for free? :smile:
    Edit before I get a serious reply... I am obviously joking... I don't even have an ASN...

    Yet

  • @host_c one of my boxes is in the ip address range being decommed soon! DO I WIN!?

    Thanked by 1host_c
  • @AlteredParadox said:
    @host_c one of my boxes is in the ip address range being decommed soon! DO I WIN!?

  • host_chost_c Patron Provider, Top Host, Megathread Squad
    edited April 19

    @maverick said:

    @AlteredParadox said:
    @host_c one of my boxes is in the ip address range being decommed soon! DO I WIN!?

    :D :D :D

    That is awesome, THX @maverick

    @AlteredParadox said: @host_c one of my boxes is in the ip address range being decommed soon! DO I WIN!?

    Congratulations, your waiting time has now been doubled :D :D

    Nahh, we will fix you up niceley

    @rpqu said: So, I would assume the rational move for your business (or any LET host) is to pitch the offerings to SME/SMB and bigger corporates over the cost advantages, instead of LET quick bucks.

    Yupp, I can't say no to that, and no one should, remember, list priced stuff pays the 7USD fetishes..

    @rpqu said: Although, there's no way 2026 BF could beat 2025 BF prices unless H2 pricing went down again. How's the new laptop?

    Damn if I know, I got delayed 1 moth more, so.... we shall see in May. If I knew what 3500 EURO + VAT will buy me 2 moths of waiting time and no stuff.... well.... I would had got the CAR :D :D .

    Quote from Dell Romania:

    Vă informez că comanda XXXXXXX este momentan on hold din cauza unor restricții de stoc pentru următoarele componente:

    Motherboard
    Recovery ETA 27.03: 600 unități
    Recovery ETA 25.04: 500 unități
    Placă video (graphics card)
    Recovery ETA 25.03: 600 unități
    Recovery ETA 23.04: 500 unități
    Recovery ETA 29.04: 500 unități

    Comanda va intra în producție imediat ce stocul va permite; în prezent se află în - facility planning status.


    Need to call SUE, where the heck is she?????

    @maverick any idea??

    Thanked by 3maverick ariq01 dsbnoob
  • @host_c said:

    @maverick said:

    @AlteredParadox said:
    @host_c one of my boxes is in the ip address range being decommed soon! DO I WIN!?

    :D :D :D

    That is awesome, THX @maverick

    @AlteredParadox said: @host_c one of my boxes is in the ip address range being decommed soon! DO I WIN!?

    Congratulations, your waiting time has now been doubled :D :D

    Nahh, we will fix you up niceley

    @rpqu said: So, I would assume the rational move for your business (or any LET host) is to pitch the offerings to SME/SMB and bigger corporates over the cost advantages, instead of LET quick bucks.

    Yupp, I can't say no to that, and no one should, remember, list priced stuff pays the 7USD fetishes..

    @rpqu said: Although, there's no way 2026 BF could beat 2025 BF prices unless H2 pricing went down again. How's the new laptop?

    Damn if I know, I got delayed 1 moth more, so.... we shall see in May. If I knew what 3500 EURO + VAT will buy me 2 moths of waiting time and no stuff.... well.... I would had got the CAR :D :D .

    Quote from Dell Romania:

    Vă informez că comanda XXXXXXX este momentan on hold din cauza unor restricții de stoc pentru următoarele componente:

    Motherboard
    Recovery ETA 27.03: 600 unități
    Recovery ETA 25.04: 500 unități
    Placă video (graphics card)
    Recovery ETA 25.03: 600 unități
    Recovery ETA 23.04: 500 unități
    Recovery ETA 29.04: 500 unități

    Comanda va intra în producție imediat ce stocul va permite; în prezent se află în - facility planning status.


    Need to call SUE, where the heck is she?????

    @maverick any idea??

    Thanked by 1host_c
  • @host_c fun things?! Llama deals?!

  • host_chost_c Patron Provider, Top Host, Megathread Squad

    @AlteredParadox said: @host_c fun things?! Llama deals?!

    :D :D :D

    Next moth as promised, if I have your blessing :D :D i will use the lama TM brand for one of the promos. may I? :D :D

  • @host_c said:

    @AlteredParadox said: @host_c fun things?! Llama deals?!

    :D :D :D

    Next moth as promised, if I have your blessing :D :D i will use the lama TM brand for one of the promos. may I? :D :D

    Always! All the llama deals.

  • host_chost_c Patron Provider, Top Host, Megathread Squad

    @AlteredParadox said: Always! All the llama deals.

    Then we have a deal. I will ping you when the time comes via IPV6 IPV8 IPV9 :D :D nahh.... via IPV4.

  • braunibrauni Member

    Hey @host_c
    Any changes to the captcha on login in the last month's?
    Doesn't load for me (I've even disable adblocker) and therefore I can't login

    Thanked by 1AlteredParadox
  • host_chost_c Patron Provider, Top Host, Megathread Squad

    @brauni said:
    Hey @host_c
    Any changes to the captcha on login in the last month's?
    Doesn't load for me (I've even disable adblocker) and therefore I can't login

    None, other the a WHMCS update we did in April ( https://my.host-c.com/knowledgebase/34/HCSEC-001-APRIL-2026-PLATFORM.html )

    None complained yet. Might be some add blocker you have ????

    Thanked by 1AlteredParadox
  • host_chost_c Patron Provider, Top Host, Megathread Squad

    @brauni

    Ticket Stuart, he will be in office for a few hours tomorrow, he can have a look, tho I doubt there is much he can do if it is an isolated case, but you never know.

    Thanked by 1AlteredParadox
  • maverickmaverick Member

    @host_c said:
    @brauni

    Ticket Stuart, he will be in office for a few hours tomorrow, he can have a look, tho I doubt there is much he can do if it is an isolated case, but you never know.

  • braunibrauni Member

    Thanks, will try and gather some more info, it works on my phone (no visible captcha, but can login) but my laptop wont show me a captcha

  • host_chost_c Patron Provider, Top Host, Megathread Squad

    @brauni said:
    Thanks, will try and gather some more info, it works on my phone (no visible captcha, but can login) but my laptop wont show me a captcha

    Oh boy, Stu will love this one, I already sent him a TO-DO note to check this out, he was like.....

  • edited May 1

    I learned from the complainy dude thread that I can put in a ticket to Stuart and say “hello please make all 9 of my servers renew at the same time” so that sounds exciting.

    Thanked by 3rpqu zejjnt host_c
  • eliphaseliphas Member

    can I open a ticket to stu to create a gmail relay service so my server can send myself email alerts without policy breach? please ;)

  • host_chost_c Patron Provider, Top Host, Megathread Squad

    @rpqu said: Damn, this is good. My fat32 is 1vC XEON6240, 1G, 32G $3.2/y. Can quote ram increase to 2G?

    I hope I can manage by the end of the week, tho I doubt, to enable add-ons for all promo services.

    Now, not all Promo Services will get all the updates.

    But all will get the vCpu and RAM options in the user panel.

    Add-on drives will not be available for promotional products, yet I might take that under consideration, maybe will leave the option to add up to 1TB. - we are still debating this internally.

    I have to check the balancing on the nodes first....... it ill probably be way off as usual.

    Since we will mangle with the IP's this moth, we might also re-balance the nodes.

    Will send out the usual SPAM Mail to customers as soon as we make the necessary settings.

    So yes, a lot of stuff is coming this month.... so watch for the Spam mails sent by us.

  • @host_c said:

    @rpqu said: Damn, this is good. My fat32 is 1vC XEON6240, 1G, 32G $3.2/y. Can quote ram increase to 2G?

    I hope I can manage by the end of the week, tho I doubt, to enable add-ons for all promo services.

    Now, not all Promo Services will get all the updates.

    But all will get the vCpu and RAM options in the user panel.

    Add-on drives will not be available for promotional products, yet I might take that under consideration, maybe will leave the option to add up to 1TB. - we are still debating this internally.

    I have to check the balancing on the nodes first....... it ill probably be way off as usual.

    Since we will mangle with the IP's this moth, we might also re-balance the nodes.

    Will send out the usual SPAM Mail to customers as soon as we make the necessary settings.

    So yes, a lot of stuff is coming this month.... so watch for the Spam mails sent by us.

    Thanked by 3host_c zejjnt rpqu
  • host_chost_c Patron Provider, Top Host, Megathread Squad

    @rpqu

    Let me try. #ZAU-948353

    <3 you

    Now, I do have to thank you , you made Stuart happy today, as he said, and I quote : "nice GIF for a signature, too bad no one will actually take you serious".

    Now, after a long in house debate, he opted for the Nuke-em-All button. :D :D

    And that reminded me of...

    @AlteredParadox

    Hold your horses lamas, we need to configure this first, yet yes, you can and will be able to extend the promo products very soon.

    Thanked by 2AlteredParadox rpqu
  • @host_c said:
    @AlteredParadox

    Hold your horses lamas, we need to configure this first, yet yes, you can and will be able to extend the promo products very soon.

    Thanked by 3host_c zejjnt rpqu
  • host_chost_c Patron Provider, Top Host, Megathread Squad

  • rpqurpqu Member

    @host_c said:
    @rpqu

    Let me try. #ZAU-948353

    <3 you

    Now, I do have to thank you , you made Stuart happy today, as he said, and I quote : "nice GIF for a signature, too bad no one will actually take you serious".

    Now, after a long in house debate, he opted for the Nuke-em-All button. :D :D

    And that reminded me of...

    @AlteredParadox

    Hold your horses lamas, we need to configure this first, yet yes, you can and will be able to extend the promo products very soon.

    Glad that Stuart is happy too How's the extension/refund calculator? Should I make userscript so you don't have to calculate manually?
    _because whmcs is not complete_

  • rpqurpqu Member
    edited May 6

    @host_c I'm sorry. 32GB yet I'm using this forum

    Hosting Proration Calculator part 1
    ```
    // ==UserScript==
    // @name Hosting Proration Calculator
    // @namespace hosting-proration-calc
    // @version 2.0
    // @description Prorated extension/refund/plan-change/audit calculator for hosting support teams
    // @author rpqu + claude opus 4.6
    // @match https://YOUR-SITE-HERE.com/*
    // @grant none
    // @license GPL-3.0-or-later
    // ==/UserScript==
    /*
    Hosting Proration Calculator
    Copyright (C) 2026 rpqu
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.
    
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
    
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.
    

    */
    (function () {
    "use strict";

    // ═══════════════════════════════════════════════════════════════════════════
    // Storage & Config
    // ═══════════════════════════════════════════════════════════════════════════

    const SKEY = "hpc_cfg";
    const DEFAULTS = { feePct: 0, feeFlat: 0, cur: "$", penType: "none", penVal: 0 };

    function loadCfg() {
    try { return { ...DEFAULTS, ...JSON.parse(localStorage.getItem(SKEY)) }; }
    catch { return { ...DEFAULTS }; }
    }
    function saveCfg(c) { localStorage.setItem(SKEY, JSON.stringify(c)); }

    // ═══════════════════════════════════════════════════════════════════════════
    // Date helpers
    // ═══════════════════════════════════════════════════════════════════════════

    function addMonths(d, n) {
    const r = new Date(d.getFullYear(), d.getMonth() + n, d.getDate());
    if (r.getDate() !== d.getDate()) r.setDate(0);
    return r;
    }
    function diffDays(a, b) { return Math.round((b - a) / 864e5); }
    function addDays(d, n) { return new Date(+d + n * 864e5); }
    function toDate(s) {
    if (!s) return null;
    const p = s.split("-").map(Number);
    if (p.length !== 3 || isNaN(p[0])) return null;
    return new Date(p[0], p[1] - 1, p[2]);
    }
    function fmtISO(d) {
    if (!d) return "";
    return d.getFullYear() + "-" + String(d.getMonth()+1).padStart(2,"0") + "-" + String(d.getDate()).padStart(2,"0");
    }
    function fmtShort(d) {
    if (!d) return "?";
    return d.toLocaleDateString("en-US", { month:"short", day:"numeric", year:"numeric" });
    }
    function cycleEnd(start, cycle) {
    switch (cycle) {
    case "daily": return addDays(start, 1);
    case "weekly": return addDays(start, 7);
    case "fortnightly": return addDays(start, 14);
    case "monthly": return addMonths(start, 1);
    case "quarterly": return addMonths(start, 3);
    case "semi-annual": return addMonths(start, 6);
    case "yearly": return addMonths(start, 12);
    }
    return addMonths(start, 12);
    }

    // ═══════════════════════════════════════════════════════════════════════════
    // Math helpers
    // ═══════════════════════════════════════════════════════════════════════════

    function calcFee(amount, cfg) {
    if (amount <= 0) return 0;
    return Math.round((amount * (cfg.feePct / 100) + cfg.feeFlat) * 100) / 100;
    }
    function calcPenalty(basis, penType, penVal) {
    if (penType === "flat") return penVal;
    if (penType === "pct_remaining") return Math.round(basis * (penVal / 100) * 100) / 100;
    if (penType === "pct_total") return Math.round(basis * (penVal / 100) * 100) / 100;
    return 0;
    }

    // ═══════════════════════════════════════════════════════════════════════════
    // State for invoice generation
    // ═══════════════════════════════════════════════════════════════════════════

    const state = { lastCalc: null };

    // ═══════════════════════════════════════════════════════════════════════════
    // CSS
    // ═══════════════════════════════════════════════════════════════════════════

    const CSS = `
    :host { all: initial; font-family: system-ui, -apple-system, sans-serif; }
    *, *::before, *::after { box-sizing: border-box; }

    /* Toggle button */
    .hpc-toggle {
    position: fixed; bottom: 20px; right: 20px; z-index: 2147483647;
    width: 44px; height: 44px; border-radius: 50%;
    background: #0d6efd; color: #fff; border: none; cursor: pointer;
    font-size: 20px; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,.25); transition: transform .15s;
    }
    .hpc-toggle:hover { transform: scale(1.1); }

    /* Panel */
    .hpc-panel {
    position: fixed; bottom: 74px; right: 20px; z-index: 2147483647;
    width: 440px; max-height: 88vh; overflow-y: auto;
    background: #fff; border: 1px solid #dee2e6; border-radius: 10px;
    box-shadow: 0 4px 24px rgba(0,0,0,.18); display: none; color: #212529;
    font-size: 13px; line-height: 1.45;
    }
    .hpc-panel.open { display: block; }
    .hpc-panel::-webkit-scrollbar { width: 6px; }
    .hpc-panel::-webkit-scrollbar-thumb { background: #ced4da; border-radius: 3px; }

    /* Header */
    .hpc-hdr {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 14px; background: #0d6efd; color: #fff;
    border-radius: 10px 10px 0 0; cursor: move; user-select: none;
    }
    .hpc-hdr h3 { margin: 0; font-size: 14px; font-weight: 600; }
    .hpc-hdr button {
    background: none; border: none; color: #fff; font-size: 18px;
    cursor: pointer; padding: 0 4px; opacity: .8; line-height: 1;
    }
    .hpc-hdr button:hover { opacity: 1; }
    .hpc-body { padding: 0 14px 14px; }

    /* Settings */
    .hpc-settings { display: none; padding: 8px 0; border-bottom: 1px solid #e9ecef; }
    .hpc-settings.open { display: block; }
    .hpc-settings .s-row { display: flex; align-items: center; gap: 6px; margin-bottom: 5px; }
    .hpc-settings label { font-size: 12px; color: #6c757d; min-width: 120px; }
    .hpc-settings input {
    width: 72px; padding: 3px 6px; border: 1px solid #ced4da; border-radius: 4px;
    font-size: 12px; text-align: right;
    }
    .hpc-settings .s-btns { display: flex; gap: 6px; margin-top: 6px; }
    .hpc-settings .s-btns button, .hpc-btn-sm {
    padding: 3px 10px; font-size: 11px; border: 1px solid #ced4da; border-radius: 4px;
    background: #fff; color: #495057; cursor: pointer;
    }
    .hpc-settings .s-btns button:hover, .hpc-btn-sm:hover { background: #e9ecef; }

    /* Tabs */
    .hpc-tabs { display: flex; flex-wrap: wrap; gap: 0; margin: 10px 0 8px; }
    .hpc-tab {
    flex: 1 1 auto; min-width: 0; padding: 6px 2px; text-align: center; cursor: pointer;
    border: 1px solid #dee2e6; background: #f8f9fa; color: #495057;
    font-size: 12px; font-weight: 500; transition: all .12s; white-space: nowrap;
    }
    .hpc-tab:first-child { border-radius: 6px 0 0 6px; }
    .hpc-tab:last-child { border-radius: 0 6px 6px 0; }
    .hpc-tab.active { background: #0d6efd; color: #fff; border-color: #0d6efd; }

    /* Form */
    .hpc-section { margin-top: 10px; }
    .hpc-stitle {
    font-size: 11px; text-transform: uppercase; letter-spacing: .5px;
    color: #6c757d; margin-bottom: 6px; font-weight: 600;
    }
    .hpc-f { display: flex; align-items: center; margin-bottom: 6px; }
    .hpc-f label { min-width: 125px; font-size: 12px; color: #495057; flex-shrink: 0; }
    .hpc-f input, .hpc-f select {
    flex: 1; padding: 5px 8px; border: 1px solid #ced4da; border-radius: 5px;
    font-size: 13px; background: #fff; color: #212529; min-width: 0;
    }
    .hpc-f input[type="number"] { text-align: right; }
    .hpc-f select { cursor: pointer; }
    .hpc-f .auto {
    font-size: 11px; color: #6c757d; margin-left: 6px; white-space: nowrap; flex-shrink: 0;
    }
    .hpc-chk { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
    .hpc-chk input[type="checkbox"] { width: auto; margin: 0; flex-shrink: 0; }
    .hpc-chk label { font-size: 12px; color: #495057; cursor: pointer; }
    .hpc-note { font-size: 11px; color: #6c757d; margin: 2px 0 6px 125px; }
    .hpc-adv-btn {
    font-size: 11px; color: #6c757d; cursor: pointer; border: none;
    background: none; padding: 2px 0; margin-bottom: 4px;
    }
    .hpc-adv-btn:hover { color: #0d6efd; }
    .hpc-adv { display: none; }
    .hpc-adv.open { display: block; }

    /* Radio group */
    .hpc-radio { display: flex; gap: 12px; margin-bottom: 6px; margin-left: 125px; }
    .hpc-radio label { font-size: 12px; display: flex; align-items: center; gap: 4px; cursor: pointer; color: #495057; }
    .hpc-radio input { margin: 0; }

    /* Results */
    .hpc-res {
    margin-top: 10px; padding: 10px; background: #f8f9fa;
    border: 1px solid #e9ecef; border-radius: 6px;
    font-family: "SF Mono","Cascadia Code","Consolas",monospace;
    font-size: 11.5px; line-height: 1.6; white-space: pre-wrap;
    word-break: break-word; min-height: 36px;
    }
    .hpc-res .hl { color: #0d6efd; font-weight: 600; }
    .hpc-res .ok { color: #198754; font-weight: 600; }
    .hpc-res .w { color: #dc3545; font-weight: 600; }
    .hpc-res .d { color: #6c757d; }
    .hpc-res .s { color: #adb5bd; }
    .hpc-res-btns { display: flex; gap: 6px; justify-content: flex-end; margin-top: 6px; }
    .hpc-res-btns button {
    padding: 3px 10px; font-size: 11px; border: 1px solid #ced4da; border-radius: 4px;
    background: #fff; color: #495057; cursor: pointer;
    }
    .hpc-res-btns button:hover { background: #e9ecef; }

    .hpc-pane { display: none; }
    .hpc-pane.active { display: block; }

    /* Batch cards */
    .bc { border: 1px solid #dee2e6; border-radius: 6px; padding: 8px; margin-bottom: 8px; background: #fafbfc; }
    .bc-hdr { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
    .bc-hdr input { border: none; background: transparent; font-weight: 600; font-size: 13px; color: #212529; flex: 1; padding: 2px 0; }
    .bc-hdr button { background: none; border: none; color: #adb5bd; font-size: 16px; cursor: pointer; padding: 0 4px; }
    .bc-hdr button:hover { color: #dc3545; }
    .bc-row { display: flex; gap: 6px; margin-bottom: 4px; align-items: center; }
    .bc-row label { font-size: 11px; color: #6c757d; min-width: 32px; }
    .bc-row input { flex: 1; padding: 3px 6px; border: 1px solid #ced4da; border-radius: 4px; font-size: 12px; min-width: 0; }
    .bc-row input[type="number"] { text-align: right; }
    .bc-res { font-size: 11px; padding: 4px 0; font-family: monospace; color: #495057; }

    /* Invoice overlay */
    .hpc-overlay {
    display: none; position: fixed; inset: 0; z-index: 2147483647;
    background: rgba(0,0,0,.4); align-items: center; justify-content: center;
    }
    .hpc-overlay.open { display: flex; }
    .hpc-modal {
    background: #fff; border-radius: 10px; padding: 16px; width: 460px; max-height: 80vh;
    overflow-y: auto; box-shadow: 0 8px 32px rgba(0,0,0,.25);
    }
    .hpc-modal h4 { margin: 0 0 10px; font-size: 14px; }
    .hpc-modal textarea {
    width: 100%; height: 300px; font-family: "SF Mono","Consolas",monospace;
    font-size: 12px; padding: 10px; border: 1px solid #ced4da; border-radius: 6px;
    resize: vertical; color: #212529; line-height: 1.5;
    }
    .hpc-modal .m-btns { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; }
    .hpc-modal .m-btns button {
    padding: 6px 14px; font-size: 12px; border-radius: 5px; cursor: pointer; border: 1px solid #ced4da;
    }
    .hpc-modal .m-btns .m-primary { background: #0d6efd; color: #fff; border-color: #0d6efd; }
    .hpc-modal .m-btns .m-secondary { background: #fff; color: #495057; }

    /* FX locked badge */
    .fx-lock { display: inline-block; font-size: 10px; background: #d1e7dd; color: #0f5132; padding: 1px 6px; border-radius: 3px; margin-left: 6px; }

    /* Case context bar */
    .hpc-ctx {
    display: flex; gap: 6px; padding: 7px 14px; border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
    }
    .hpc-ctx input {
    flex: 1; padding: 4px 8px; border: 1px solid #dee2e6; border-radius: 4px;
    font-size: 12px; background: #fff; color: #212529; min-width: 0;
    }
    .hpc-ctx input::placeholder { color: #adb5bd; }

    /* Template picker row */
    .hpc-tmpl-row { display: flex; gap: 6px; margin-bottom: 8px; align-items: center; }
    .hpc-tmpl-row label { min-width: 125px; font-size: 12px; color: #6c757d; flex-shrink: 0; }
    .hpc-tmpl-row select {
    flex: 1; padding: 4px 6px; border: 1px solid #dee2e6; border-radius: 4px;
    font-size: 12px; background: #fff; color: #212529; cursor: pointer;
    }
    .hpc-tmpl-row button {
    padding: 3px 8px; font-size: 11px; border: 1px solid #ced4da; border-radius: 4px;
    background: #fff; color: #6c757d; cursor: pointer; white-space: nowrap; flex-shrink: 0;
    }
    .hpc-tmpl-row button:hover { background: #e9ecef; color: #212529; }

    /* Template list in settings */
    .hpc-tmpl-list { margin: 4px 0 6px; }
    .hpc-tmpl-item {
    display: flex; align-items: center; gap: 6px; padding: 3px 0;
    font-size: 12px; border-bottom: 1px solid #f1f3f5;
    }
    .hpc-tmpl-item span { flex: 1; color: #212529; cursor: pointer; }
    .hpc-tmpl-item span:hover { color: #0d6efd; text-decoration: underline; }
    .hpc-tmpl-item .td { font-size: 11px; color: #6c757d; }
    .hpc-tmpl-item button { background: none; border: none; color: #adb5bd; cursor: pointer; font-size: 14px; padding: 0 2px; }
    .hpc-tmpl-item button:hover { color: #dc3545; }

    /* History modal entries */
    .hpc-hist-entry {
    display: flex; align-items: flex-start; gap: 8px; padding: 8px 0;
    border-bottom: 1px solid #f1f3f5; cursor: default;
    }
    .hpc-hist-entry:last-child { border-bottom: none; }
    .hpc-hist-badge {
    font-size: 10px; font-weight: 700; padding: 2px 5px; border-radius: 3px;
    color: #fff; flex-shrink: 0; margin-top: 1px; text-transform: uppercase;
    }
    .badge-ext { background: #0d6efd; }
    .badge-ref { background: #198754; }
    .badge-plan { background: #6f42c1; }
    .badge-audit { background: #fd7e14; }
    .badge-batch { background: #0dcaf0; color: #000; }
    .badge-fx { background: #6c757d; }
    .hpc-hist-info { flex: 1; min-width: 0; }
    .hpc-hist-ts { font-size: 10px; color: #6c757d; }
    .hpc-hist-ctx { font-size: 11px; color: #495057; font-weight: 500; }
    .hpc-hist-lbl { font-size: 12px; color: #212529; margin-top: 1px; }
    .hpc-hist-restore {
    padding: 2px 8px; font-size: 11px; border: 1px solid #dee2e6; border-radius: 4px;
    background: #fff; color: #0d6efd; cursor: pointer; flex-shrink: 0;
    }
    .hpc-hist-restore:hover { background: #e7f1ff; }
    .hpc-hist-empty { font-size: 12px; color: #6c757d; padding: 12px 0; text-align: center; }

    /* Wider modal for history */
    .hpc-modal-wide { width: 500px; }
    `;

    // ═══════════════════════════════════════════════════════════════════════════
    // Cycle options HTML (reusable)
    // ═══════════════════════════════════════════════════════════════════════════

    const CYCLE_OPTS = <option value="daily">Daily</option> <option value="weekly">Weekly</option> <option value="fortnightly">Fortnightly</option> <option value="monthly">Monthly</option> <option value="quarterly">Quarterly</option> <option value="semi-annual">Semi-annual</option> <option value="yearly" selected>Yearly</option>;

    const PEN_OPTS = <option value="none">None</option> <option value="flat">Flat fee</option> <option value="pct_remaining">% of refund</option> <option value="pct_total">% of total paid</option>;

    // ═══════════════════════════════════════════════════════════════════════════
    // HTML
    // ═══════════════════════════════════════════════════════════════════════════

    const HTML = `

    Proration Calculator

    ⏳ ⚙ ×
    ${PEN_OPTS}
    Export Config Import Config
    Templates + Add
    Extend
    Refund
    Plan Δ
    Audit
    Batch
    FX
    Contract
    — load template —Save as…
    ${CYCLE_OPTS}
    ▾ Advanced
    Fill in the fields above.
    CopyDraft Invoice
    Service period
    Payment
    — load template —Save as…
    Credit = pre-existing balance (no processor fee on it)
    Cutoff
    ▾ Advanced
    Early termination penalty
    ${PEN_OPTS}
    Fill in the fields above.
    CopyDraft Credit Note
    Old plan
    — load template —Save as…
    ${CYCLE_OPTS}
    Change
    New plan
    — load template —Save as…
    ${CYCLE_OPTS}
    Cycle handling
    Continue = new plan inherits old end date. Fresh = new full cycle from change date.
    ▾ Advanced
    Fill in the fields above.
    CopyDraft Adjustment Note
    Service period
    Payment
    — load template —Save as…
    Cutoff
    Actual refund received
    ▾ Advanced
    Early termination penalty
    ${PEN_OPTS}
    Fill in the fields above.
    CopyDraft Discrepancy Report
    Common parameters
    Services + Add
    Add services and fill in the cutoff date.
    CopyDraft Credit Note
    Currency conversion
    Lock Rate
    Enter amount and rate.
    Copy

    Add Template

    ${CYCLE_OPTS}
    Cancel Save Template

    Calculation History

    Clear all
    Close

    Document

    Close Copy to Clipboard

    `;

    // ═══════════════════════════════════════════════════════════════════════════
    // Init UI (Shadow DOM)
    // ═══════════════════════════════════════════════════════════════════════════

    const host = document.createElement("div");
    document.body.appendChild(host);
    const shadow = host.attachShadow({ mode: "closed" });

    const styleEl = document.createElement("style");
    styleEl.textContent = CSS;
    shadow.appendChild(styleEl);

    const wrap = document.createElement("div");
    wrap.innerHTML = HTML;
    shadow.appendChild(wrap);

    const $ = (id) => shadow.getElementById(id);
    const $v = (id) => { const e = $(id); return e ? e.value : ""; };
    const $f = (id) => parseFloat($v(id)) || 0;
    const $d = (id) => toDate($v(id));
    const $ck = (id) => { const e = $(id); return e ? e.checked : false; };

    // ═══════════════════════════════════════════════════════════════════════════
    // Load config into UI
    // ═══════════════════════════════════════════════════════════════════════════

    let cfg = loadCfg();
    function cfgToUI() {
    $("cfgPct").value = cfg.feePct;
    $("cfgFlat").value = cfg.feeFlat;
    $("cfgCur").value = cfg.cur;
    $("cfgPenType").value = cfg.penType || "none";
    $("cfgPenVal").value = cfg.penVal || 0;
    $("cfgPenRow").style.display = cfg.penType !== "none" ? "" : "none";
    $("refPenT").value = cfg.penType || "none";
    $("refPenV").value = cfg.penVal || 0;
    $("refPenR").style.display = cfg.penType !== "none" ? "" : "none";
    $("audPenT").value = cfg.penType || "none";
    $("audPenV").value = cfg.penVal || 0;
    $("audPenR").style.display = cfg.penType !== "none" ? "" : "none";
    }
    cfgToUI();

    function readCfg() {
    cfg.feePct = parseFloat($("cfgPct").value) || 0;
    cfg.feeFlat = parseFloat($("cfgFlat").value) || 0;
    cfg.cur = $("cfgCur").value || "$";
    cfg.penType = $v("cfgPenType");
    cfg.penVal = parseFloat($("cfgPenVal").value) || 0;
    saveCfg(cfg);
    }
    function C(n) { return cfg.cur + n.toFixed(2); }

    https://justpaste.it/hwp0z

  • host_chost_c Patron Provider, Top Host, Megathread Squad

    @rpqu said: Also, have you tried the userscript?

    Gave it to Stu, he is playing with it. Yet he was not the one making the math on that, but THX,

    I would also watch out for mails from us these days......

    Thanked by 2rpqu AlteredParadox
  • rpqurpqu Member

    @host_c said:

    @rpqu said: Also, have you tried the userscript?

    Gave it to Stu, he is playing with it. Yet he was not the one making the math on that, but THX,

    I would also watch out for mails from us these days......

    Price hikes? Or addons on special deals? Either way, gotta alert @AlteredParadox

  • allthemtingsallthemtings Member, Megathread Squad

    @host_c said:

    @rpqu said: Also, have you tried the userscript?

    Gave it to Stu, he is playing with it.

    Thanked by 2rpqu host_c
  • host_chost_c Patron Provider, Top Host, Megathread Squad
    edited May 7

    @rpqu said: Price hikes? Or addons on special deals? Either way, gotta alert @AlteredParadox

    Add-ons on the Promo Services, New OS images and templates, changes to the IPV6 network setup wise, promos a bit later, I am still struggling with the above.

    We are trying to make an interactive promo order system, yet, no info for now on it, as it is still in dypers.

    After the IPV4 and IPV6 changes we will deploy RDNS ability in the user panel also, for both IPV4 and IPV6 - most probably by june end - if all goes well :D :D .

    @yoursunny

    VNC has IPV6 now, I remember you said it did not. Hope Stu also managed to make it work :D :D

    my.host-c.com, vnc system and looking glass have new IPV6 addresses also since yesterday.

  • maverickmaverick Member

    @host_c said: I would also watch out for mails from us these days......

Sign In or Register to comment.