-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadd_notes.php
More file actions
50 lines (47 loc) · 1.17 KB
/
add_notes.php
File metadata and controls
50 lines (47 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?php
include "cUrls.php";
function add_common()
{
$element = $_GET['element_id1'];
$id = $_GET['introduced_id1'];
$text = $_GET['text'];
$data = [
'add' => [
0 => [
'element_id' => $id,
'element_type' => $element,
'note_type' => '4',
'text' => $text,
],
],
];
Send_amo('notes',$data);
}
function add_call()
{
$ss = $_GET['element_id2'];
$element = $_GET['introduced_id2'];
$notes['add'] = [
[
'element_id' => $element,
'element_type' => $ss,
'note_type' => 10,
'params' => [
'UNIQ' => '676sdfs7fsdf',
'LINK' => 'www.testweb.ru/test_call.mp3',
'PHONE' => '84950000001',
'DURATION' => 0,
'SRC' => 'asterisk',
'call_status' => '3' //статус
]
]
];
Send_amo('notes',$notes);
}
if (isset($_GET['buttom_1'])) {
add_common();
}
if (isset($_GET['buttom_2'])) {
add_call();
}
header("Location:notes.php");