Changeset 2629581
Legend:
- Unmodified
- Added
- Removed
-
alpha-sms/tags/1.0.0/admin/partials/alpha_sms-admin-display_settings.php
r2627862 r2629581 77 77 78 78 if ($response && $response->error === 0) { 79 $balance = "<strong>Balance:</strong> BDT " . number_format((float)$response->data->balance, 2, '.', 80 ''); 79 $balance = $response->data->balance; 81 80 } elseif ($response && $response->error === 405) { 82 $balance = "<strong class='text-danger'>Authentication Failed. Please enter a valid API Key.</strong>";81 $balance = 'Authentication Failed. Please enter a valid API Key.'; 83 82 } else { 84 $balance = "<strong class='text-danger'>Unknown Error, failed to fetch balance.</strong>";83 $balance = 'Unknown Error, failed to fetch balance.'; 85 84 } 86 85 } else { 87 $balance = " <strong>Don't have an account? <a href='https://alpha.net.bd/SMS/SignUp/'>Register Now</a> (Free SMS Credit after Sign-up).</strong>";86 $balance = "empty"; 88 87 } 89 88 … … 129 128 <td> 130 129 <span id="<?php echo esc_attr( $this->plugin_name . '-balance' ); ?>"> 131 <?php echo esc_html__( $balance ) ?></span> 130 <?php if ($balance === 'empty') : ?> 131 <strong>Don't have an account? <a href='https://alpha.net.bd/SMS/SignUp/'>Register Now</a> (Free SMS Credit after Sign-up).</strong> 132 <?php elseif (is_numeric($balance)) : ?> 133 <strong>Balance:</strong> BDT <?php echo esc_html( number_format((float)$balance, 2, '.', ',') ) ?> 134 <?php else : ?> 135 <strong class="text-danger"><?php echo esc_html($balance); ?></strong> 136 <?php endif; ?> 137 </span> 132 138 </td> 133 139 </tr> -
alpha-sms/trunk/admin/partials/alpha_sms-admin-display_settings.php
r2627862 r2629581 77 77 78 78 if ($response && $response->error === 0) { 79 $balance = "<strong>Balance:</strong> BDT " . number_format((float)$response->data->balance, 2, '.', 80 ''); 79 $balance = $response->data->balance; 81 80 } elseif ($response && $response->error === 405) { 82 $balance = "<strong class='text-danger'>Authentication Failed. Please enter a valid API Key.</strong>";81 $balance = 'Authentication Failed. Please enter a valid API Key.'; 83 82 } else { 84 $balance = "<strong class='text-danger'>Unknown Error, failed to fetch balance.</strong>";83 $balance = 'Unknown Error, failed to fetch balance.'; 85 84 } 86 85 } else { 87 $balance = " <strong>Don't have an account? <a href='https://alpha.net.bd/SMS/SignUp/'>Register Now</a> (Free SMS Credit after Sign-up).</strong>";86 $balance = "empty"; 88 87 } 89 88 … … 129 128 <td> 130 129 <span id="<?php echo esc_attr( $this->plugin_name . '-balance' ); ?>"> 131 <?php echo esc_html__( $balance ) ?></span> 130 <?php if ($balance === 'empty') : ?> 131 <strong>Don't have an account? <a href='https://alpha.net.bd/SMS/SignUp/'>Register Now</a> (Free SMS Credit after Sign-up).</strong> 132 <?php elseif (is_numeric($balance)) : ?> 133 <strong>Balance:</strong> BDT <?php echo esc_html( number_format((float)$balance, 2, '.', ',') ) ?> 134 <?php else : ?> 135 <strong class="text-danger"><?php echo esc_html($balance); ?></strong> 136 <?php endif; ?> 137 </span> 132 138 </td> 133 139 </tr>
Note: See TracChangeset
for help on using the changeset viewer.