Fixed calls to old billing module

This commit is contained in:
Frank Harris 2025-11-24 09:42:03 -05:00
parent 6f4515dbec
commit b4f0e1edfe
6 changed files with 15 additions and 368 deletions

View file

@ -340,34 +340,6 @@ echo "<table id='servermonitor' class='tablesorter' data-sortlist='[[0,0],[3,1]]
//set the display of how long server has until expired
//default is it never expires
$expiration_dates = "This Server Will NEVER Expire";
//get all orders thare are active or invoiced
$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);
if($results && isset($results[0]['status']))
{
$status = (int)$results[0]['status'];
$expire_date = $results[0]['finish_date'];
//there is an end date
if($status > 0 && !empty($expire_date))
{
$expiration_dates = "<font color='green'>" . read_expire($expire_date) . "</font>";
}
// 0 its expire, invoice printed
elseif($status == 0 && !empty($expire_date))
{
$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))
{
$expiration_dates = "<font color='yellow'>". read_expire($expire_date) . "</font><a href='home.php?m=billing&p=cart'> Invoice</a>";
}
// -2 its suspended, invoice still available
elseif($status == -2 && !empty($expire_date))
{
$expiration_dates = "<font color='red'> SUSPENDED </font><a href='home.php?m=billing&p=cart'> Invoice</a>";
}
}//end has result
if( !isset($server_home['mod_id']) )
@ -527,10 +499,7 @@ echo "<table id='servermonitor' class='tablesorter' data-sortlist='[[0,0],[3,1]]
$order = 3;
$address = "<span style='color:darkred;font-weight:bold;'>Agent Offline</span>";
}
$user = $db->getUserById($server_home['user_id_main']);
$query = "SELECT * FROM OGP_DB_PREFIXbilling_orders WHERE home_id = " . $db->realEscapeSingle($server_home['home_id']) . " AND status > 0" ;
//DISABLE SHOWING EXPIRATION DATES
//$expiration_dates = "";
$user = $db->getUserById($server_home['user_id_main']);
// Template
@ -623,5 +592,3 @@ echo "<div>Put the log file here</div>";
?>