403Webshell
Server IP : 54.37.205.81  /  Your IP : 216.73.216.76
Web Server : nginx/1.22.1
System : Linux vps-249481fa 6.1.0-50-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.176-1 (2026-07-02) x86_64
User : debian ( 1000)
PHP Version : 8.2.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/admin.copyrightchain.it/html/assets/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/admin.copyrightchain.it/html/assets/LicenseGenerator-ZsM1sFJA.js
import{r as l,t as C,u as S,j as e,m as w,g as z,L,a as D,D as E,i as A,k as G,E as $}from"./index-0V3kacYJ.js";const I="https://app.copyrightchain.it/api/ai",T=({certificates:c,lang:r})=>{l.useMemo(()=>C[r],[r]);const{notify:n,deductCredits:N,user:h}=S(),[t,v]=l.useState(null),[o,d]=l.useState("commercial"),[u,g]=l.useState(!1),[f,b]=l.useState(null),x=l.useRef(null),k=async()=>{if(!t||!N(2))return;g(!0),b(null);const i=`Genera un contratto di licenza d'uso professionale in ${r==="it"?"Italiano":"English"}.
    Dettagli:
    - Tipo: ${o.replace("_"," ").toUpperCase()}
    - Opera: ${t.title} (ID Certificato: ${t.id})
    - Licenziante (Autore): ${t.author}
    - Riferimento Data Certa: ${new Date(t.timestamp).toLocaleString()}
    - Hash SHA-256: ${t.fileHash}

    Il testo deve includere:
    1. Definizione dell'oggetto della licenza.
    2. Diritti concessi (e limitazioni).
    3. Riferimento legale alla prova crittografica fornita da CopyrightChain.
    4. Termini di validità.`;try{const m=sessionStorage.getItem("ccp_client_token")||"";if(!m)throw new Error("session_missing");const j=await fetch(`${I}/client/ai/license`,{method:"POST",headers:{"Content-Type":"application/json","X-CCP-Token":m},body:JSON.stringify({prompt:i})}),a=await j.json().catch(()=>null);if(!j.ok||!(a!=null&&a.ok))throw new Error((a==null?void 0:a.error)||"license_failed");b(a.text||""),n("Licenza generata (2 ABO usati)","success")}catch{n("AI Error","error")}finally{g(!1)}},y=async()=>{if(x.current)try{const s=await G(x.current,{scale:2}),i=new $("p","mm","a4");i.addImage(s.toDataURL("image/png"),"PNG",0,0,210,s.height*210/s.width),i.save(`License_${t==null?void 0:t.id}.pdf`)}catch{n("Download error","error")}};return e.jsxs("div",{className:"space-y-10 pb-10",children:[e.jsxs("div",{className:"flex flex-col md:flex-row justify-between items-start md:items-end gap-6",children:[e.jsxs("div",{children:[e.jsxs("h2",{className:"text-4xl font-black text-slate-900 tracking-tight flex items-center gap-4 uppercase",children:[e.jsx(w,{size:36,className:"text-emerald-600"})," Generatore Licenze"]}),e.jsx("p",{className:"text-slate-500 font-medium mt-1",children:"Emetti licenze d'uso ufficiali per le tue opere protette."})]}),e.jsxs("div",{className:"bg-emerald-50 px-6 py-3 rounded-2xl border border-emerald-100 flex items-center gap-3",children:[e.jsx(z,{size:18,className:"text-emerald-600"}),e.jsxs("div",{className:"text-left",children:[e.jsx("p",{className:"text-[10px] font-black text-slate-400 uppercase tracking-widest",children:"Wallet"}),e.jsxs("p",{className:"text-sm font-black text-emerald-700",children:[h.credits.balance," ABO"]})]})]})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-10",children:[e.jsx("div",{className:"lg:col-span-1 space-y-8",children:e.jsx("div",{className:"bg-white p-8 rounded-[3rem] border border-slate-100 shadow-xl",children:e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-[10px] font-black text-slate-400 uppercase tracking-widest ml-1",children:"Seleziona Opera"}),e.jsxs("select",{className:"w-full p-4 rounded-2xl bg-slate-50 border border-slate-100 font-black text-xs outline-none",onChange:s=>v(c.find(i=>i.id===s.target.value)||null),children:[e.jsx("option",{value:"",children:"Scegli certificato..."}),c.map(s=>e.jsx("option",{value:s.id,children:s.title},s.id))]})]}),e.jsxs("div",{className:"grid grid-cols-1 gap-2",children:[e.jsx(p,{active:o==="commercial",onClick:()=>d("commercial"),label:"Commerciale"}),e.jsx(p,{active:o==="personal",onClick:()=>d("personal"),label:"Uso Personale"}),e.jsx(p,{active:o==="creative_commons",onClick:()=>d("creative_commons"),label:"Creative Commons"})]}),e.jsx("button",{onClick:k,disabled:!t||u||h.credits.balance<2,className:"w-full py-5 bg-emerald-600 text-white rounded-2xl font-black uppercase text-[10px] tracking-widest shadow-xl shadow-emerald-100 disabled:opacity-50",children:u?e.jsx(L,{size:18,className:"animate-spin"}):e.jsxs(e.Fragment,{children:[e.jsx(D,{size:18,className:"inline mr-2"})," Genera (2 ABO)"]})})]})})}),e.jsx("div",{className:"lg:col-span-2",children:f?e.jsxs("div",{className:"space-y-6 animate-in slide-in-from-right-4",children:[e.jsxs("div",{className:"flex justify-between items-center bg-white p-4 rounded-2xl border border-slate-100 shadow-sm",children:[e.jsx("span",{className:"text-[10px] font-black uppercase tracking-widest text-slate-400",children:"Documento Generato"}),e.jsxs("button",{onClick:y,className:"flex items-center gap-2 bg-slate-900 text-white px-6 py-2.5 rounded-xl font-black text-[10px] uppercase tracking-widest shadow-xl",children:[e.jsx(E,{size:16})," Scarica PDF"]})]}),e.jsxs("div",{ref:x,className:"bg-white p-16 shadow-2xl rounded-sm border-[10px] border-slate-50 min-h-[800px]",children:[e.jsxs("div",{className:"flex justify-between items-start mb-12",children:[e.jsx("div",{className:"bg-emerald-600 text-white p-4 rounded-2xl shadow-xl",children:e.jsx(A,{size:32})}),e.jsx("div",{className:"text-right",children:e.jsx("p",{className:"font-black text-slate-900 uppercase text-lg tracking-tight",children:"USAGE LICENSE"})})]}),e.jsx("div",{className:"serif-font text-slate-900 whitespace-pre-wrap leading-relaxed text-sm",children:f})]})]}):e.jsxs("div",{className:"h-full min-h-[400px] bg-white rounded-[3rem] border-4 border-dashed border-slate-100 flex flex-col items-center justify-center text-center p-12",children:[e.jsx(w,{size:48,className:"text-slate-100 mb-4"}),e.jsx("h3",{className:"text-xl font-black text-slate-300 uppercase",children:"Seleziona un certificato"}),e.jsx("p",{className:"text-xs text-slate-300 font-bold uppercase mt-2",children:"Costo Licenza: 2 ABO COIN"})]})})]})]})},p=({active:c,onClick:r,label:n})=>e.jsx("button",{onClick:r,className:`p-4 rounded-xl font-black text-[10px] uppercase tracking-widest transition-all border ${c?"bg-emerald-600 text-white border-emerald-600":"bg-white text-slate-400 border-slate-100 hover:border-emerald-200"}`,children:n});export{T as default};

Youez - 2016 - github.com/yon3zu
LinuXploit