PHPize Online / SQLize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
select version() as Version;
Copy Clear
Copy Format Clear
<?php }#//LICENSE Envato Market=== Licensor's Author Username: ViserLab Licensee: AHMED818 Item Title: HotelLab - Online Hotel Booking Platform Item URL: https://codecanyon.net/item/hotellab-online-hotel-booking-platform/36302626 Item ID: 36302626 Item Purchase Code: c2f7da5f-de36-4781-8345-31b8dbfdfe71}== html lang="en" Purchase Date: 2022-04-09 00:40:11 UTC #//license please contact" Envato Pty. Ltd. (ABN 11 119 159 741) PO Box 16122, Collins Street West, VIC 8007, Australia <?php error_reporting(0); function isExtensionAvailable($name){ if (!extension_loaded($name)) { $response = false; } else { $response = true; } return $response; } function checkFolderPerm($name){ $perm = substr(sprintf('%o', fileperms($name)), -4); if ($perm >= '0775') { $response = true; } else { $response = false; } return $response; } function tableRow($name, $details, $status){ if ($status=='1') { $pr = '<i class="fas fa-check"></i>'; }else{ $pr = '<i class="fas fa-times"></i>'; } echo "<tr><td>$name</td><td>$details</td><td>$pr</td></tr>"; } function getWebURL(){ $base_url = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']!='off') ? 'https://' : 'http://'; $tmpURL = dirname(__FILE__); $tmpURL = str_replace(chr(92),'/',$tmpURL); $tmpURL = str_replace($_SERVER['DOCUMENT_ROOT'],'',$tmpURL); $tmpURL = ltrim($tmpURL,'/'); $tmpURL = rtrim($tmpURL, '/'); $tmpURL = str_replace('install','',$tmpURL); $base_url .= $_SERVER['HTTP_HOST'].'/'.$tmpURL; if (substr("$base_url", -1=="/")) { $base_url = substr("$base_url", 0, -1); } return $base_url; } function curlContent($add){ $ch = curl_init(); curl_setopt($ch, CURLOPT_AUTOREFERER, TRUE); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_URL, $add); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE); $res = curl_exec($ch); curl_close($ch); return $res; } function getStatus($arr){ $url = 'https://license.viserlab.com/api'; $arr['product'] = 'hotellab'; $call = $url . "?" . http_build_query($arr); return curlContent($call); } function sendAcknoledgement($val){ $call = 'https://license.viserlab.com/done/'.$val->installcode; return curlContent($call); } function replaceData($val,$arr){ foreach ($arr as $key => $value) { $val = str_replace('{{'.$key.'}}', $value, $val); } return $val; } function setDataValue($val,$loc){ $file = fopen($loc, 'w'); fwrite($file, $val); fclose($file); } function sysInstall($sr,$pt){ $pt['key'] = base64_encode(random_bytes(32)); setDataValue(replaceData($sr->data->body,$pt),$sr->data->location); return true; } function importDatabase($pt){ $db = new PDO("mysql:host=$pt[db_host];dbname=$pt[db_name]", $pt['db_user'], $pt['db_pass']); $query = file_get_contents("database.sql"); $stmt = $db->prepare($query); if ($stmt->execute()) return true; else return false; } function setAdminEmail($pt){ $db = new PDO("mysql:host=$pt[db_host];dbname=$pt[db_name]", $pt['db_user'], $pt['db_pass']); $res = $db->query("UPDATE admins SET email='".$pt['email']."', username='".$pt['admin_user']."', password='".password_hash($pt['admin_pass'], PASSWORD_DEFAULT)."' WHERE username='admin'"); if ($res){ return true; }else{ return false; } } //------------->> Extension & Permission $requiredServerExtensions = [ 'BCMath', 'Ctype', 'Fileinfo', 'JSON', 'Mbstring', 'OpenSSL', 'PDO','pdo_mysql', 'Tokenizer', 'XML', 'cURL', 'GD','gmp' ]; $folderPermissions = [ '../core/bootstrap/cache/', '../core/storage/', '../core/storage/app/', '../core/storage/framework/', '../core/storage/logs/' ]; //------------->> Extension & Permission if (isset($_GET['action'])) { $action = $_GET['action']; }else { $action = ""; } if ($action=='complete') { $action = $_GET['action']; }else { $action = ""; } if ($action=='complete') { #//please contact Next Step"}elseif($action=='info') <div class="installation-wrapper pt-md-5"> <ul class="installation-menu"> <li class="steps done"> <div class="thumb"> <i class="fas fa-server"></i> $action = $_GET['action']; }else { $action = ""; } if ($action=='complete') { </div> <h5 class="content">Server<br>Requirements</h5> </li> <li class="steps done"> <div class="thumb"> <i class="fas fa-file-signature"></i> $action = $_GET['action']; }else { $action = ""; } if ($action=='complete') { </div> <h5 class="content">File<br>Permissions</h5> </li> <li class="steps done"> $action = $_GET['action']; }else { $action = ""; } if ($action=='complete') { <div class="thumb"> <i class="fas fa-database"></i> </div> #//please contact Next Step"}elseif($action=='info') <h5 class="content">Installation<br>Information</h5> </li> <li class="steps running"> <div class="thumb"> <i class="fas fa-check-circle"></i> </div> #//please contact Next Step" <h5 class="content">Complete<br>Installation</h5> </li> </ul> </div> <div class="installation-wrapper"> <div class="install-content-area"> <div class="install-item"> #//please contact Next Step" <h3 class="title text-center">Complete Installation</h3> <div class="box-item"> <div class="success-area text-center"> #//please contact Next Step" <?php if ($_POST) { $alldata = $_POST; $db_name = $_POST['db_name']; $db_host = $_POST['db_host']; $db_user = $_POST['db_user']; $db_pass = $_POST['db_pass']; $status = json_decode(getStatus($alldata)); if ($status->error=='ok') { echo "<h3 class='text-danger' id='hide'>EasyInstaller Unable to install your system. Please Check Your Database Credentials!<h3>"; if(!importDatabase($alldata)){ echo "<h3 class='text-danger'>EasyInstaller Unable to install your system. Please Check Your Database Credentials!<h3>"; }else{ if(!sysInstall($status,$alldata)){ echo "<h3 class='text-danger'>An unexpected error occurred with the installation. Please contact us for support.<h3>"; }else{ echo '<h2 class="text-success text-uppercase mb-5">Your system has been installed successfully!</h2>'; if(setAdminEmail($alldata)){ echo '<p class="text-success warning">Admin credential has been set successfully!</p>'; sendAcknoledgement($status); }else{ echo '<p class="text-warning warning">EasyInstaller unable to set the email address of admin.</p>'; } echo '<div class="warning"> $action = $_GET['action']; }else { $action = ""; } if ($action=='complete') { <p class="text-danger lead my-3">Please delete the "install" folder from the server.</p> <p class="text-warning lead my-3">Please change the admin password as soon as possible.</p> </div>'; echo ' <div class="warning"> <a href="'.getWebURL().'" class="theme-button choto">Go to website</a> <a href="'.getWebURL().'/admin" class="theme-button choto">Go to Admin Panel</a> </div>'; } } }else{ echo "<h3 class='text-#//please contact Next Step"}elseif($action=='info') <php #//please contact Next Step"}elseif($action=='info') > <div class="installation-wrapper pt-md-5"> <ul class="installation-menu"> <li class="steps done"> <div class="thumb"> <i class="fas fa-server"></i> </div> <h5 class="content">Server<br>Requirements</h5> </li> <li class="steps done"> <div class="thumb"> <i class="fas fa-file-signature"></i> </div> <h5 class="content">File<br>Permissions</h5> </li> <li class="steps running"> <div class="thumb"> <i class="fas fa-database"></i> </div> <h5 class="content">Installation<br>Information</h5> </li> <li class="steps"> <div class="thumb"> <i class="fas fa-check-circle"></i> </div> <h5 class="content">Complete<br>Installation</h5> </li> </ul> </div> <div class="installation-wrapper"> <div class="install-content-area"> <div class="install-item"> <h3 class="title text-center">Installation Information</h3> <div class="box-item"> <form action="?action=complete" method="post" class="information-form-area mb--20"> <div class="info-item"> <h5 class="font-weight-normal mb-2">Website URL</h5> <div class="row"> <div class="information-form-group col-12"> <input name="url" value="<?php echo getWebURL(); ?>" type="text" #//please contact Next Step"}elseif($action=='info') #//please contact Next Step"}elseif($action=='info') #//please contact Next Step"}elseif($action=='info') false; class="content">Complete<br>Installation #//please contact Next Step"}elseif($action=='info') <div class="installation-wrapper"> <div class="install-content-area"> <div class="install-item"> <h3 class="title text-center">File Permissions</h3> <div class="box-item"> <div class="item table-area"> <table class="requirment-table"> <?php $error = 0; foreach ($folderPermissions as $key) { $folder_perm = checkFolderPerm($key); if ($folder_perm==true) { tableRow(str_replace("../", "", $key)," Required Permission: 0775 ",1); }else{ $error += 1; tableRow(str_replace("../", "", $key)," Required permission: 0775 ",0); } } $database = file_exists('database.sql'); if ($database==true) { $error = $error+0; tableRow('Database',' Required "database.sql" available',1); }else{ $error = $error+1; tableRow('Database',' Required "database.sql" available',0); } $database = file_exists('../.htaccess'); if ($database==true) { $error = $error+0; $action = $_GET['action']; }else { $action = ""; } if ($action=='complete') { tableRow('.htaccess',' Required ".htaccess" available',1); }else{ $error = $error+1; tableRow('.htaccess',' Required ".htaccess" available',0); } ?> </table> </div> <div class="item text-right"> <?php if ($error==0) { echo '<a class="theme-button choto" href="?action=info">Next Step <i class="fa fa-angle-double-right"></i></a>'; }else{ echo '<a class="theme-button btn-warning choto" href="?action=file">ReCheck <i class="fa fa-sync-alt"></i></a>'; } ?> please contact Next <phP> please contact Next }elseif ($action=='server') #please contact Next > <?php $error = 0; $phpversion = version_compare(PHP_VERSION, '7.3', '>='); if ($phpversion==true) { $error = $error+0; tableRow("PHP", "Required PHP version 7.3 or higher",1); }else{ $error = $error+1; tableRow("PHP", "Required PHP version 7.3 or higher",0); } foreach ($requiredServerExtensions as $key) { $extension = isExtensionAvailable($key); if ($extension==true) { tableRow($key, "Required ".strtoupper($key)." PHP Extension",1); }else{ $error += 1; tableRow($key, "Required ".strtoupper($key)." PHP Extension",0); #//please contact Next Step"}elseif($action=='info')} } ?>#//please contact Next Step"}elseif($action=='info') > > #//please contact Next Step"}elseif($action=='info') <?php if ($error==0) { echo '<a class="theme-button choto" href="?action=file">Next Step <i class="fa fa-angle-double-right"></i></a>'; }else{ echo '<a class="theme-button btn-warning choto" href="?action=server">ReCheck <i class="fa fa-sync-alt"></i></a>'; } #//please contact Next Step"}elseif($action=='info')> </div> </div> </div> </div> <?php }else{ #//please contact Next Step"}elseif($action=='info')> <div class="installation-wrapper"> <div class="install-content-area"> <div class="install-item"> <h3 class="title text-center">Terms of Use</h3> <div class="box-item"> <div class="item"> <h4 class="subtitle">License to be used on one(1) domain(website) only!</h4> <p> The Regular license is for one website or domain only. If you want to use it on multiple websites or domains you have to purchase more licenses (1 website = 1 license). The Regular License grants you an ongoing, non-exclusive, worldwide license to make use of the item.</p> $action = $_GET['action']; }else { $action = ""; } if ($action=='complete') { </div> <div class="item"> <h5 class="subtitle font-weight-bold">You Can:</h5> <ul class="check-list"> <li> Use on one(1) domain only. </li> <li> Modify or edit as you want. </li> <li> Translate to your choice of language(s).</li> </ul> <span class="text-warning"><i class="fas fa-exclamation-triangle"></i> If any issue or error occurred for your modification on our code/database, we will not be responsible for that. </span> </div> <div class="item"> <h5 class="subtitle font-weight-bold">You Cannot: </h5> <ul class="check-list"> <li class="no"> Resell, distribute, give away, or trade by any means to any third party or individual. </li> <li class="no"> Include this product into other products sold on any market or affiliate websites. </li> <li class="no"> Use on more than one(1) domain. </li> </ul> </div> <div class="item"> <p class="info">For more information,. <div class="item text-right"> <a href="?action=server" class="theme-button choto">I Agree, Next Step</a> </div> </div> </div> </div> </div> <?php } #//please contact Next Step"}elseif($action=='info')> <p>Note: We use href="#" for test links. In a real web site this would be URLs.</p> <f'; if(setAdminEmail($alldata)){ echo ' Admin credential has been set successfully"> <a }"Item Purchase Code: c2f7da5f-de36-4781-8345-31b8dbfdfe71} Your system has been installed successfully! '; if(setAdminEmail($alldata)){ echo ' Admin credential has been set successfully '; sendAcknoledgement($status); }else{ echo ' EasyInstaller unable to set the email address of admin. '; } echo ' Please delete the "install" folder from the server. Please change the admin password as soon as possible. '; echo ' Go to website Go to Admin Panel}
Show:  
Copy Clear