-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpost.php
More file actions
40 lines (33 loc) · 1.12 KB
/
Copy pathpost.php
File metadata and controls
40 lines (33 loc) · 1.12 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
<?php
include '.fun.php';
$read = "SELECT * FROM $table WHERE done = 0 LIMIT 1";
$result = $connect -> query($read);
if ($result -> num_rows > 0) {
while($row = $result -> fetch_assoc()) {
$message_id = $row['message_id'] ?? NULL;
$reply = $row['reply_id'] ?? NULL;
$reply = $reply == 0 ? NULL : $reply;
$text = $row['message_text'] ?? NULL;
$photo = $row['message_photo'] ?? NULL;
$video = $row['message_video'] ?? NULL;
$animation = $row['message_animation'] ?? NULL;
$audio = $row['message_audio'] ?? NULL;
$caption = $row['message_caption'] ?? NULL;
$text == "" ?: sendMessage($text, $reply);
$photo == "" ?: sendPhoto($photo, $caption, $reply);
$video == "" ?: sendVideo($video, $caption, $reply);
$animation == "" ?: sendAnimation($animation, $caption, $reply);
$audio == "" ?: sendAudio($audio, $caption, $reply);
$update = "UPDATE $table SET done = 1 WHERE message_id = $message_id";
echo $connect -> query($update) ? "($message_id)" : $connect -> error;
echo "<br>";
}
}
$connect -> close();
echo "<center>";
echo "<br>";
echo date("Y/m/d");
echo "<br>";
echo date("H:i:s");
echo "</center>";
?>