private function _displayTm4b() { include_once dirname(__FILE__) . '/classes/Tm4bSms.php'; $testsms_txt = 'Send'; $this->_html .= ' <fieldset><legend><img src="' . $this->_path . 'informations.gif" alt="" title="" /> ' . $this->l('Information') . '</legend> <form action="' . $_SERVER['REQUEST_URI'] . '" method="post"> <label>' . $this->l('Send test SMS:') . '</label> <div class="margin-form"><input onclick="this.value=\'\'" type="text" style="margin-bottom:10px;" name="test_number" size="30" value="' . ((isset($_POST) and isset($_POST['test_number'])) ? $_POST['test_number'] : $this->l('Enter your phone number')) . '"> <input class="button" name="btnTestSms" value="' . $testsms_txt . '" type="submit" style="margin-bottom:10px;" /><br />' . $this->l('ex: 33642424242') . '</div>'; if (!empty($this->_user) and !empty($this->_password)) { $sms = new Tm4bSms($this->_user, $this->_password, $this->_route, $this->_originator); $credits = $sms->CheckCredits(); $color = $credits < self::__TM4B_LOWBALANCE__ ? '#900' : '#080'; $this->_html .= '<label>' . $this->l('SMS credits:') . '</label> <div class="margin-form" style="color:#000000; font-size:12px;">' . $this->l('You have') . ' <span style="font-weight: bold; color: ' . $color . ';">' . $credits . '</span> ' . $this->l('credits') . '</div>'; } $this->_html .= ' </form> </fieldset><br />'; }
private function _displayTm4b() { require_once dirname(__FILE__) . '/classes/Tm4bSms.php'; $testsms_txt = 'Send'; $this->_html .= ' <fieldset><legend><img src="' . $this->_path . 'informations.gif" alt="" title="" /> ' . $this->l('Information') . '</legend> <form action="' . Tools::htmlentitiesUTF8($_SERVER['REQUEST_URI']) . '" method="post"> <label>' . $this->l('Send test SMS:') . '</label> <div class="margin-form"><input onclick="this.value=\'\'" type="text" style="margin-bottom:10px;" name="test_number" size="30" value="' . Tools::getValue('test_number', $this->l('Enter your phone number')) . '"> <input class="button" name="btnTestSms" value="' . $testsms_txt . '" type="submit" style="margin-bottom:10px;" /><br />' . $this->l('ex: 33642424242') . '</div>'; if (!empty($this->_user) and !empty($this->_password)) { $sms = new Tm4bSms($this->_user, $this->_password, $this->_route, $this->_originator); $credits = $sms->CheckCredits(); $color = $credits < self::__TM4B_LOWBALANCE__ ? '#900' : '#080'; $this->_html .= '<label>' . $this->l('SMS credits:') . '</label> <div class="margin-form" style="color:#000000; font-size:12px;">' . $this->l('You have') . ' <span style="font-weight: bold; color: ' . $color . ';">' . $credits . '</span> ' . $this->l('credits') . '</div>'; } $this->_html .= ' </form> </fieldset><br /> <fieldset> <legend><img src="' . $this->_path . 'informations.gif" alt="" title="" /> ' . $this->l('Information about CRON tab') . '</legend> <label>' . $this->l('URL for cron task configuration:') . '</label> <b>http://' . Tools::getShopDomain() . __PS_BASE_URI__ . 'modules/' . $this->name . '/cron.php?token=' . $this->token . '</b> </fieldset><br />'; }