-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflirt_send.php
61 lines (54 loc) · 2.33 KB
/
flirt_send.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
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
51
52
53
54
55
56
57
58
59
60
61
<?php
/******************************************************************************
Etano
===============================================================================
File: flirt_send.php
$Revision$
Software by: DateMill (http://www.datemill.com)
Copyright by: DateMill (http://www.datemill.com)
Support at: http://www.datemill.com/forum
*******************************************************************************
* See the "docs/licenses/etano.txt" file for license. *
******************************************************************************/
require 'includes/common.inc.php';
require _BASEPATH_.'/includes/user_functions.inc.php';
require _BASEPATH_.'/skins_site/'.get_my_skin().'/lang/mailbox.inc.php';
$tpl=new phemplate(_BASEPATH_.'/skins_site/'.get_my_skin().'/','remove_nonjs');
$output=array();
if (isset($_SESSION['topass']['input'])) {
$output=$_SESSION['topass']['input'];
$output['_user_other']=get_user_by_userid($output['fk_user_id']);
$_GET['ft']=$output['ft'];
} elseif (!empty($_GET['to_id'])) {
$output['fk_user_id']=(int)$_GET['to_id'];
$output['_user_other']=get_user_by_userid($output['fk_user_id']);
} else {
trigger_error($GLOBALS['_lang'][120],E_USER_ERROR);
}
if (!isset($output['return']) && isset($_GET['return'])) {
$output['return']=sanitize_and_format_gpc($_GET,'return',TYPE_STRING,$__field2format[FIELD_TEXTFIELD] | FORMAT_RUENCODE,'');
}
$flirt_type=sanitize_and_format_gpc($_GET,'ft',TYPE_INT,0,0);
if ($flirt_type==FLIRT_INIT) {
check_login_member('flirt_send');
} else {
check_login_member('flirt_reply');
}
$flirts=array();
$query="SELECT `flirt_id`,`flirt_text` FROM `{$dbtable_prefix}flirts` WHERE `flirt_type`=$flirt_type";
if (!($res=@mysql_query($query))) {trigger_error(mysql_error(),E_USER_ERROR);}
while ($rsrow=mysql_fetch_row($res)) {
$flirts[$rsrow[0]]=$rsrow[1];
}
$tpl->set_file('content','flirt_send.html');
$tpl->set_var('flirts',vector2radios($flirts,'flirt_id',0,array(),'class="flirts_list"'));
$tpl->set_var('output',$output);
$tpl->process('content','content');
$tplvars['title']=$GLOBALS['_lang'][121];
$tplvars['page_title']=$GLOBALS['_lang'][121];
$tplvars['page']='flirt_send';
$tplvars['css']='flirt_send.css';
if (is_file('flirt_send_left.php')) {
include 'flirt_send_left.php';
}
include 'frame.php';