php 8 fix to solve php loading
This commit is contained in:
parent
35e426c158
commit
6f4515dbec
2 changed files with 26 additions and 32 deletions
|
|
@ -338,7 +338,7 @@ function ogpHome()
|
||||||
{
|
{
|
||||||
$servercount=$servercount + 1;
|
$servercount=$servercount + 1;
|
||||||
}
|
}
|
||||||
if ((!isAdmin) && ($servercount == 0))
|
if ((!$isAdmin) && ($servercount == 0))
|
||||||
{
|
{
|
||||||
$view->refresh("home.php?m=billing&p=shop",2);
|
$view->refresh("home.php?m=billing&p=shop",2);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -341,37 +341,33 @@ echo "<table id='servermonitor' class='tablesorter' data-sortlist='[[0,0],[3,1]]
|
||||||
//default is it never expires
|
//default is it never expires
|
||||||
$expiration_dates = "This Server Will NEVER Expire";
|
$expiration_dates = "This Server Will NEVER Expire";
|
||||||
//get all orders thare are active or invoiced
|
//get all orders thare are active or invoiced
|
||||||
$query = "SELECT * FROM ogp_billing_orders WHERE home_id = " . $server_home['home_id'] . " AND status >= -2" ;
|
$query = "SELECT * FROM OGP_DB_PREFIXbilling_orders WHERE home_id = " . $db->realEscapeSingle($server_home['home_id']) . " AND status >= -2 ORDER BY order_id DESC LIMIT 1" ;
|
||||||
$results = $db->resultQuery($query);
|
$results = $db->resultQuery($query);
|
||||||
if(!is_null($results[0]['status']))
|
if($results && isset($results[0]['status']))
|
||||||
{
|
{
|
||||||
//there is an end date
|
$status = (int)$results[0]['status'];
|
||||||
if($results[0]['status'] > 0)
|
$expire_date = $results[0]['finish_date'];
|
||||||
{
|
//there is an end date
|
||||||
$expire_date = $results[0]['finish_date'];
|
if($status > 0 && !empty($expire_date))
|
||||||
$expiration_dates = "<font color='green'>" . read_expire($expire_date) . "</font>";
|
{
|
||||||
}
|
$expiration_dates = "<font color='green'>" . read_expire($expire_date) . "</font>";
|
||||||
|
}
|
||||||
// 0 its expire, invoice printed
|
// 0 its expire, invoice printed
|
||||||
if($results[0]['status'] == 0)
|
elseif($status == 0 && !empty($expire_date))
|
||||||
{
|
{
|
||||||
$expire_date = $results[0]['finish_date'];
|
$expiration_dates = "<font color='yellow'>". read_expire($expire_date) . "</font><a href='home.php?m=billing&p=cart'> Invoice</a>";
|
||||||
$expiration_dates = "<font color='yellow'>". read_expire($expire_date) . "</font><a href='home.php?m=billing&p=cart'> Invoice</a>";
|
}
|
||||||
}
|
// -1 its expire, invoice printed
|
||||||
|
elseif($status == -1 && !empty($expire_date))
|
||||||
// -1 its expire, invoice printed
|
{
|
||||||
if($results[0]['status'] == -1)
|
$expiration_dates = "<font color='yellow'>". read_expire($expire_date) . "</font><a href='home.php?m=billing&p=cart'> Invoice</a>";
|
||||||
{
|
}
|
||||||
$expire_date = $results[0]['finish_date'];
|
// -2 its suspended, invoice still available
|
||||||
$expiration_dates = "<font color='yellow'>". read_expire($expire_date) . "</font><a href='home.php?m=billing&p=cart'> Invoice</a>";
|
elseif($status == -2 && !empty($expire_date))
|
||||||
}
|
{
|
||||||
// -2 its suspended, invoice still available
|
$expiration_dates = "<font color='red'> SUSPENDED </font><a href='home.php?m=billing&p=cart'> Invoice</a>";
|
||||||
if($results[0]['status'] == -2)
|
}
|
||||||
{
|
}//end has result
|
||||||
$expire_date = $results[0]['finish_date'];
|
|
||||||
$expiration_dates = "<font color='red'> SUSPENDED </font><a href='home.php?m=billing&p=cart'> Invoice</a>";
|
|
||||||
}
|
|
||||||
|
|
||||||
}//end isnull
|
|
||||||
|
|
||||||
|
|
||||||
if( !isset($server_home['mod_id']) )
|
if( !isset($server_home['mod_id']) )
|
||||||
|
|
@ -532,7 +528,7 @@ echo "<table id='servermonitor' class='tablesorter' data-sortlist='[[0,0],[3,1]]
|
||||||
$address = "<span style='color:darkred;font-weight:bold;'>Agent Offline</span>";
|
$address = "<span style='color:darkred;font-weight:bold;'>Agent Offline</span>";
|
||||||
}
|
}
|
||||||
$user = $db->getUserById($server_home['user_id_main']);
|
$user = $db->getUserById($server_home['user_id_main']);
|
||||||
$query = "SELECT * FROM ogp_billing_orders WHERE home_id = " . $server_home['home_id'] . " AND status > 0" ;
|
$query = "SELECT * FROM OGP_DB_PREFIXbilling_orders WHERE home_id = " . $db->realEscapeSingle($server_home['home_id']) . " AND status > 0" ;
|
||||||
//DISABLE SHOWING EXPIRATION DATES
|
//DISABLE SHOWING EXPIRATION DATES
|
||||||
//$expiration_dates = "";
|
//$expiration_dates = "";
|
||||||
|
|
||||||
|
|
@ -629,5 +625,3 @@ echo "<div>Put the log file here</div>";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue