disable creating of new support-ticket if there are no customers

This commit is contained in:
Michael Kaufmann (d00p)
2010-01-30 16:00:35 +00:00
parent db04ee9606
commit 0bf05d8bea
2 changed files with 11 additions and 1 deletions

View File

@@ -37,6 +37,11 @@ elseif(isset($_GET['id']))
if($page == 'tickets'
&& $userinfo['customers'] != '0')
{
// Let's see how many customers we have
$countcustomers = $db->query_first("SELECT COUNT(`customerid`) as `countcustomers` FROM `" . TABLE_PANEL_CUSTOMERS . "` " . ($userinfo['customers_see_all'] ? '' : " WHERE `adminid` = '" . (int)$userinfo['adminid'] . "' ") . "");
$countcustomers = (int)$countcustomers['countcustomers'];
if($action == '')
{
$log->logAction(ADM_ACTION, LOG_NOTICE, "viewed admin_tickets");