- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
sub getMessages{
local($mop,$pg,$all)=@_;
if(!&db_query("select insurance_faq_main.id,date_format(insurance_faq_main.date,'%d.%m.%Y'),insurance_faq_main.name,insurance_faq_main.email,insurance_faq_main.www,insurance_faq_main.city,insurance_faq_main.message,insurance_faq_main.ip,answer from insurance_faq_main, insurance_faq_ans where insurance_faq_ans.idm=insurance_faq_main.id order by id desc limit ".$pg*$mop.",$mop")) {$body .= $db_message; return -1}
$id;
@date;
@name;
@email;
@www;
@city;
@msg;
@ip;
@answer;
for(local $i=0;defined($rows->[$i]);$i++)
{
$id[$i]=$rows->[$i]->[0];
$date[$i]=$rows->[$i]->[1];
$name[$i]=$rows->[$i]->[2];
$email[$i]=$rows->[$i]->[3];
$www[$i]=$rows->[$i]->[4];
$city[$i]=$rows->[$i]->[5];
$msg[$i]=$rows->[$i]->[6];
$ip[$i]=$rows->[$i]->[7];
$answer[$i]=$rows->[$i]->[8];
}
return $i;
}