예제 #1
0
 $letter['user_add'] = 57748;
 $letter['user_1'] = 6;
 $letter['user_2'] = $user->uid;
 $letter['user_status_2'] = 11;
 $recipient = sbr_meta::getUserReqvs($letter['user_2']);
 if ($row['form_type'] == 1) {
     $address = (bool) trim($recipient[1]['address']);
 } else {
     $address = (bool) trim($recipient[2]['address']) || (bool) trim($recipient[2]['address_fct']) || (bool) trim($recipient[2]['address_jry']);
 }
 if (empty($address)) {
     $res['a'][] = $row['sbr_id'];
     echo "{$row['sbr_id']} - Havn't address!\n";
     continue;
 }
 $sbr->initFromId($row['sbr_id']);
 //$letter['user1_i']['form_type']==1 ? $letter['user1_i'][1]['address'] : $letter['user1_i'][2]['address']
 /*
 $pdf_f_name = "/tmp/" . uniqid().".pdf";
 $recipient = sbr_meta::getUserReqvs($letter['user_2']);
 $user = new users();
 $user->GetUserByUID($letter['user_2']);
 $user_name = ($recipient['form_type']==1 ? $recipient[1]['fio'] : $recipient[2]['full_name']);
 $address =  ($recipient['form_type']==1 ? $recipient[1]['index'] : $recipient[2]['index']).", ".
             ($recipient['form_type']==1 ? $recipient[1]['country'] : $recipient[2]['country']).", ".
             ($recipient['form_type']==1 ? $recipient[1]['city'] : $recipient[2]['city']).", ".
             ($recipient['form_type']==1 ? $recipient[1]['address'] : $recipient[2]['address']);
 $pdf = new FPDF('L', 'mm', 'A4');
 $pdf->AddFont('TimesNewRomanPSMT','','5f37f1915715e014ee2254b95c0b6cab_times.php');
 $pdf->SetFont('TimesNewRomanPSMT','',12);
 $pdf->SetTextColor(0,0,0);