/** * function that includes files of classes * * @param string $StClass */ function __autoload($StClass) { handleLanguage($StClass . '.php'); require_once CLASSDIR . $StClass . '.php'; if (!class_exists($StClass, false)) { throw new Exception("Não foi possível carregar a classe: {$StClass}"); } }
<? require_once(dirname(__FILE__) . '/../../homeData.php'); handleLanguage(__FILE__); ?> <h3> <?php echo CANNED_RESPONSES; ?> <div id="cannedResponseLoading" class="loading hidden"> <img src="<?php echo TEMPLATEDIR; ?> images/loading.gif" />Carregando ... </div> </h3> <table class="tableTickets homeTable" id="cannedTable"> <thead> <th><?php echo TITLE; ?> </th> <th width="20%"><?php echo ACTIONS; ?> </th> </thead> <tbody> <? if ( $ArCannedResponses[0]['IDCannedResponse'] != ""): ?> <? foreach ($ArCannedResponses as $Alt => $ArAnswer): ?> <tr id="cannedTitleTR<?php echo $ArAnswer['IDCannedResponse'];
<?php handleLanguage('global.php'); /** * include the language files * * @param string $StFilePath */ function handleLanguage($StFilePath, $Debug = false) { $Lang = getCurrentLanguage(); $FilePath = ''; $ArFilePath = preg_split('/[\\/|\\\\]/', $StFilePath); $StFile = end($ArFilePath); if (strpos($StFilePath, 'templates') !== false && file_exists(ABSTEMPLATEDIR . 'lang/' . $Lang . '/lang.' . $StFile)) { $FilePath = ABSTEMPLATEDIR . 'lang/' . $Lang . '/lang.' . $StFile; } else { if (file_exists(LANGDIR . $Lang . '/lang.' . $StFile)) { $FilePath = LANGDIR . $Lang . '/lang.' . $StFile; } } if ($FilePath) { require_once $FilePath; } if ($Debug) { return $FilePath; } }