Exemple #1
0
 private function CancelClient($client)
 {
     global $dbh, $postvar, $getvar, $instance;
     if (!$postvar['submitreason']) {
         $reason_array['WARNTEXT'] = 'Why are you cancelling this account? Leave blank if you do not wish to provide a reason or just want to see what the client does when their account gets cancelled.';
         $reason_array['ACTION'] = 'cancelling';
         $reason_array['ACTIONBUTT'] = 'Cancel Client';
         $clientview_array['BOX'] = "";
         $clientview_array['CONTENT'] = style::replaceVar("tpl/admin/clients/reason.tpl", $reason_array);
         return $clientview_array;
     } else {
         $command = server::cancel($client['id'], $postvar['reason']);
         if ($command == true) {
             //Cancelled
             main::done();
         } else {
             main::errors($command);
         }
     }
 }