-
Notifications
You must be signed in to change notification settings - Fork 6
/
chat_wr.php
25 lines (24 loc) · 922 Bytes
/
chat_wr.php
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
<?php
/**
* @package chat_wr.php
* @author John Doe <[email protected]>
* @since 2010-07-28
* @version 2010-07-28
*/
@session_start();
require_once($_SESSION['fip']); //7/28/10
extract ($_GET);
/*
chat_messages : // id message when chat_room_id user_id from
*/
$now = mysql_format_date(time() - (get_variable('delta_mins')*60));
$query = sprintf("INSERT INTO `$GLOBALS[mysql_prefix]chat_messages` (`when`, `message`, `chat_room_id`, `user_id`, `from`)
VALUES (%s,%s,%s,%s,%s)",
quote_smart($now),
quote_smart($frm_message),
quote_smart($frm_room),
quote_smart($frm_user),
quote_smart($frm_from));
$result = mysql_query($query) or do_error($query,'mysql_query() failed',mysql_error(), basename( __FILE__), __LINE__);
print mysql_insert_id();
?>