define('sugarEntry', true); } include_once 'modules/Configurator/Configurator.php'; require_once 'custom/sms/sms.php'; include_once 'sugar_version.php'; if (!defined("MSG_UNVERIFIED")) { define("MSG_UNVERIFIED", "Невозможно подключить ваш аккаунт. Пожалуйста, повторите попытку или свяжитесь с провайдером для проверки."); } $sms = new sms(); $parent_link = "<a href='index.php?module=Administration&action=index'>Administration</a><span class='pointer'>»</span>"; if (isset($_GET['option'])) { switch ($_GET['option']) { case "smsUsage": require_once "custom/sms/sms.php"; $sms = new sms(); $usages = $sms->get_credit_usages(); arsort($usages); if (sizeof($usages)) { echo "<div class='moduleTitle'><h2>{$parent_link}SMS Credit Usages</h2></div>"; echo "<div class='dashletPanelMenu'>"; echo "<div class='hd'><div class='tl'></div><div class='hd-center'></div><div class='tr'></div></div>"; echo "<div class='bd'><div class='ml'></div><div class='bd-center'><div class='screen'>"; echo "<table border='0' cellspacing='1' cellpadding='0' class='list view' width='100%'>"; echo "<tr><th>Date</th><td scope='col'>Description</td><td scope='col'>Amount</td></tr>"; foreach ($usages as $val) { echo "<tr><td>" . date("M d, Y", strtotime($val['date'])) . "</td>"; echo "<td>{$val['description']}</td>"; echo "<td>{$val['amount']}</td></tr>"; } echo "</table>"; echo "</div><div class='mr'></div></div></div>";