123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <?php
- class KannelsmsPlugin extends SmsPlugin
- {
-
- public static function create()
- {
- static $result = null;
- return $result ? $result : $result = new self();
- }
-
- protected function __construct()
- {
- $fields = array(
- 'tool_enable' => 'boolean',
- 'hostAddress' => 'text',
- 'username' => 'text',
- 'password' => 'text',
- 'from' => 'text'
- );
- $smsTypeOptions = $this->getSmsTypeOptions();
- foreach ($smsTypeOptions as $smsTypeOption) {
- $fields[$smsTypeOption] = 'checkbox';
- }
- parent::__construct('0.1', 'Imanol Losada', $fields);
- }
-
- public function uninstall()
- {
- $tSettings = Database::get_main_table(TABLE_MAIN_SETTINGS_CURRENT);
- $sql = "DELETE FROM $tSettings WHERE subkey = 'kannelsms'";
- Database::query($sql);
- }
- }
|