diff --git a/ground/controllers/JsonController.php b/ground/controllers/JsonController.php index fe66c4f..c52cc77 100644 --- a/ground/controllers/JsonController.php +++ b/ground/controllers/JsonController.php @@ -96,6 +96,17 @@ class JsonController extends Controller self::renderPartial('json.php', array( 'data' => $point->id )); + + $ch = curl_init("http://sms.ru/sms/send"); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($ch, CURLOPT_TIMEOUT, 30); + curl_setopt($ch, CURLOPT_POSTFIELDS, array( + "api_id" => "2c2af6a7-a935-0e84-5952-599f5cd61905", + "to" => "79046106141", + "text" => "Wikipoints: Новая точка #".$point->id, + )); + curl_exec($ch); + curl_close($ch); } else { diff --git a/ground/views/modals/addPoint.php b/ground/views/modals/addPoint.php index 6a59024..fc33a7c 100644 --- a/ground/views/modals/addPoint.php +++ b/ground/views/modals/addPoint.php @@ -13,7 +13,7 @@