what error are you getting on localhost,was on localhost. unfortunately I was not successful, I will try to go up to my server, if I give some warning to the friend for you to take a look!
Thank you since already
can you describe please?
You MUST read the Babiato Rules before making your first post otherwise you may get permanent warning points or a permanent Ban.
Our resources on Babiato Forum are CLEAN and SAFE. So you can use them for development and testing purposes. If your are on Windows and have an antivirus that alerts you about a possible infection: Know it's a false positive because all scripts are double checked by our experts. We advise you to add Babiato to trusted sites/sources or disable your antivirus momentarily while downloading a resource. "Enjoy your presence on Babiato"
what error are you getting on localhost,was on localhost. unfortunately I was not successful, I will try to go up to my server, if I give some warning to the friend for you to take a look!
Thank you since already
I did successful installed the script, but if the localhost has internet connection, the login screen it always will pop up... If the localhost isn't connected to internet, the script works flawlessly!what error are you getting on localhost,
can you describe please?
i didn't get you which screen popups ?I did successful installed the script, but if the localhost has internet connection, the login screen it always will pop up... If the localhost isn't connected to internet, the script works flawlessly!
I did follow all the instructions provided obove... So no probs there...
I did successful installed the script, but if the localhost has internet connection, the login screen it always will pop up... If the localhost isn't connected to internet, the script works flawlessly!
I did follow all the instructions provided obove... So no probs there...
I did successful installed the script, but if the localhost has internet connection, the login screen it always will pop up... If the localhost isn't connected to internet, the script works flawlessly!
I did follow all the instructions provided obove... So no probs there...
Someone please solve the issue here. It keeps login out after you login. Please share back the solved script. Thank you
Responsive Apartment Management System
<?php
session_start();
include("../config.php");
//To-Do *Comment out the line below to solve the problem*
//include("../library/maxPower.php");
$json = array();
if(isset($_SESSION['objLogin'])){
if(isset($_POST['token']) && $_POST['token'] == 'validateDomainName'){
if(verifyItemPeriod($link)){
$result = mysqli_query($link, "select * from tbl_max_power");
if($row = mysqli_fetch_array($result)){
$data = maxPower::verifyPurchasedCode($row);
if($data['code']=='200'){
if(trim($data['domain'], '/') == trim(WEB_URL, '/')){
$json = array('action'=>'continue', 'url'=>WEB_URL);
updateCheckingDateTime($link);
} else {
dropDatabase($link, DB_DATABASE);
$json = array('action'=>'logout', 'url'=>WEB_URL);
}
} else if($data['code']=='203' || $data['code']=='204'){ //wrong purchased code and wrong item id
removeDatabaseMaxPower($link);
$json = array('action'=>'logout', 'url'=>WEB_URL);
}
} else {
$json = array('action'=>'logout', 'url'=>WEB_URL);
}
} else {
$json = array('action'=>'continue', 'url'=>WEB_URL);
}
} else {
$json = array('action'=>'logout', 'url'=>WEB_URL);
}
} else {
$json = array('action'=>'continue', 'url'=>WEB_URL);
}
echo json_encode($json);
die();
function removeDatabaseMaxPower($link){
//mysqli_query($link, "DELETE FROM tbl_max_power");
}
function dropDatabase($link, $db){
//mysqli_query($link, "DROP DATABASE ".$db);
}
function updateCheckingDateTime($link) {
mysqli_query($link, "update tbl_max_power set last_check_date='".date("Y-m-d h:i:s")."'");
}
function checkDomainNameStatus($link, $weburl, $close=false){
$result = mysqli_query($link, "select * from tbl_max_power");
if($row = mysqli_fetch_array($result)){
if(trim($row['website_url'], '/') == trim($weburl, '/')){
return true;
} else {
return false;
}
} else {
return false;
}
}
function verifyItemPeriod($link){
$result = mysqli_query($link, "select * from tbl_max_power");
if($row = mysqli_fetch_array($result)){
if(!empty($row['last_check_date'])){
$now = strtotime(date('Y-m-d H:i:s'));
$check_time = strtotime($row['last_check_date']);
$datediff = $now - $check_time;
$days = round($datediff / (60 * 60 * 24));
if((int)$days > 7){
return true;
} else {
return false;
}
} else {
return false;
}
} else {
return false;
}
}
?>
Actually i have solved the issue. After installation go to ajax folder and open maxPower.php then comment out the following code: include("../library/maxPower.php");
PHP:<?php session_start(); include("../config.php"); //To-Do *Comment out the line below to solve the problem* //include("../library/maxPower.php"); $json = array(); if(isset($_SESSION['objLogin'])){ if(isset($_POST['token']) && $_POST['token'] == 'validateDomainName'){ if(verifyItemPeriod($link)){ $result = mysqli_query($link, "select * from tbl_max_power"); if($row = mysqli_fetch_array($result)){ $data = maxPower::verifyPurchasedCode($row); if($data['code']=='200'){ if(trim($data['domain'], '/') == trim(WEB_URL, '/')){ $json = array('action'=>'continue', 'url'=>WEB_URL); updateCheckingDateTime($link); } else { dropDatabase($link, DB_DATABASE); $json = array('action'=>'logout', 'url'=>WEB_URL); } } else if($data['code']=='203' || $data['code']=='204'){ //wrong purchased code and wrong item id removeDatabaseMaxPower($link); $json = array('action'=>'logout', 'url'=>WEB_URL); } } else { $json = array('action'=>'logout', 'url'=>WEB_URL); } } else { $json = array('action'=>'continue', 'url'=>WEB_URL); } } else { $json = array('action'=>'logout', 'url'=>WEB_URL); } } else { $json = array('action'=>'continue', 'url'=>WEB_URL); } echo json_encode($json); die(); function removeDatabaseMaxPower($link){ //mysqli_query($link, "DELETE FROM tbl_max_power"); } function dropDatabase($link, $db){ //mysqli_query($link, "DROP DATABASE ".$db); } function updateCheckingDateTime($link) { mysqli_query($link, "update tbl_max_power set last_check_date='".date("Y-m-d h:i:s")."'"); } function checkDomainNameStatus($link, $weburl, $close=false){ $result = mysqli_query($link, "select * from tbl_max_power"); if($row = mysqli_fetch_array($result)){ if(trim($row['website_url'], '/') == trim($weburl, '/')){ return true; } else { return false; } } else { return false; } } function verifyItemPeriod($link){ $result = mysqli_query($link, "select * from tbl_max_power"); if($row = mysqli_fetch_array($result)){ if(!empty($row['last_check_date'])){ $now = strtotime(date('Y-m-d H:i:s')); $check_time = strtotime($row['last_check_date']); $datediff = $now - $check_time; $days = round($datediff / (60 * 60 * 24)); if((int)$days > 7){ return true; } else { return false; } } else { return false; } } else { return false; } } ?>
<?php
define('_AMSCODESECURITY', '16343942');
define('CURRENCY', '$');
define('WEB_URL', 'https://apartments.com/');
//Set the root path correctly to be able to display data on front-end
define('ROOT_PATH', '/home/projho/apartments.com/');
define('DB_HOSTNAME', 'localhost');
define('DB_USERNAME', 'sasasof');
define('DB_PASSWORD', 'sasa');
define('DB_DATABASE', 'apartment');
$link = new mysqli(DB_HOSTNAME,DB_USERNAME,DB_PASSWORD,DB_DATABASE);?>
To solve that issue, set your root location of your project correctly on the config.php file. Check the example below.
PHP:<?php define('_AMSCODESECURITY', '16343942'); define('CURRENCY', '$'); define('WEB_URL', 'https://apartments.com/'); //Set the root path correctly to be able to display data on front-end define('ROOT_PATH', '/home/projho/apartments.com/'); define('DB_HOSTNAME', 'localhost'); define('DB_USERNAME', 'sasasof'); define('DB_PASSWORD', 'sasa'); define('DB_DATABASE', 'apartment'); $link = new mysqli(DB_HOSTNAME,DB_USERNAME,DB_PASSWORD,DB_DATABASE);?>
To solve that issue, set your root location of your project correctly on the config.php file. Check the example below.
PHP:<?php define('_AMSCODESECURITY', '16343942'); define('CURRENCY', '$'); define('WEB_URL', 'https://apartments.com/'); //Set the root path correctly to be able to display data on front-end define('ROOT_PATH', '/home/projho/apartments.com/'); define('DB_HOSTNAME', 'localhost'); define('DB_USERNAME', 'sasasof'); define('DB_PASSWORD', 'sasa'); define('DB_DATABASE', 'apartment'); $link = new mysqli(DB_HOSTNAME,DB_USERNAME,DB_PASSWORD,DB_DATABASE);?>
If you have set your database connections well then you can try clear your browsing data and check again.
Mine is working perfectly here.
Emporium UMS Solutions
apartment.ciao.co.ke
We get it, advertisements are annoying!
However in order to keep our huge array of resources free of charge we need to generate income from ads so to use the site you will need to turn off your adblocker.
If you'd like to have an ad free experience you can become a Babiato Lover by donating as little as $5 per month. Click on the Donate menu tab for more info.