@@ -155,6 +155,7 @@ discard block |
||
155 | 155 | * Find element in HTML Dom |
156 | 156 | * |
157 | 157 | * @param string $content - content to be searched through |
158 | + * @param integer $nth |
|
158 | 159 | * @return object |
159 | 160 | */ |
160 | 161 | private function find($content, $selector, $nth = null) |
@@ -204,6 +205,7 @@ discard block |
||
204 | 205 | * Check whether errors have been returned |
205 | 206 | * |
206 | 207 | * @param string $content - response body of a request |
208 | + * @param string $selector |
|
207 | 209 | * @return boolean - false if an element described by the selector exists |
208 | 210 | */ |
209 | 211 | private function check($content, $selector) |
@@ -107,7 +107,7 @@ |
||
107 | 107 | * @param string $number - number of the recipient (9 digits without leading zero for national numbers e.g. 501234567; two leading zeros followed by prefix for international numbers e.g. 004912345678901; no spaces or special chars) |
108 | 108 | * @param string $text - content of the SMS |
109 | 109 | */ |
110 | - // TODO: check number for validaty |
|
110 | + // TODO: check number for validaty |
|
111 | 111 | public function send($number, $text) |
112 | 112 | { |
113 | 113 | if (strlen($text) <= 0 || strlen($text) > $this->max_length) { |
@@ -137,8 +137,8 @@ |
||
137 | 137 | '/amg/ptk/map/messagebox/formhandlers/MessageFormHandler.token' => $this->token, |
138 | 138 | '_D:/amg/ptk/map/messagebox/formhandlers/MessageFormHandler.token' => '', |
139 | 139 | 'enabled' => true, |
140 | - '/amg/ptk/map/messagebox/formhandlers/MessageFormHandler.create.x' => rand(0,50), |
|
141 | - '/amg/ptk/map/messagebox/formhandlers/MessageFormHandler.create.y' => rand(0,25), |
|
140 | + '/amg/ptk/map/messagebox/formhandlers/MessageFormHandler.create.x' => rand(0, 50), |
|
141 | + '/amg/ptk/map/messagebox/formhandlers/MessageFormHandler.create.y' => rand(0, 25), |
|
142 | 142 | '/amg/ptk/map/messagebox/formhandlers/MessageFormHandler.create' => 'Wyślij', |
143 | 143 | '_D:/amg/ptk/map/messagebox/formhandlers/MessageFormHandler.create' => '', |
144 | 144 | '_DARGS' => '/gear/mapmessagebox/smsform.jsp' |
@@ -27,9 +27,13 @@ |
||
27 | 27 | $send = $sms->send($number, $text); |
28 | 28 | if ($send['check']) { |
29 | 29 | echo "SMS was successfully sent."; |
30 | - if (is_int($send['free'])) echo ' This month ' . $send['free'] . ' free SMS left.'; |
|
31 | - else if (empty($send['free'])) echo ' This month ' . $sms->get_free() . ' free SMS left.'; |
|
32 | - else 'Unknown how many free SMS left this month.'; |
|
30 | + if (is_int($send['free'])) { |
|
31 | + echo ' This month ' . $send['free'] . ' free SMS left.'; |
|
32 | + } else if (empty($send['free'])) { |
|
33 | + echo ' This month ' . $sms->get_free() . ' free SMS left.'; |
|
34 | + } else { |
|
35 | + 'Unknown how many free SMS left this month.'; |
|
36 | + } |
|
33 | 37 | } else { |
34 | 38 | echo "SMS was not sent."; |
35 | 39 | } |