Пример #1
0
 function invoice($type, $id)
 {
     // get partials
     $output = $this->partials;
     // check url
     if ($type == 'subscription') {
         if ($data = $this->shop->get_sub_payment($id)) {
             if ($data['email'] == $this->session->userdata('email') || $this->session->userdata('session_admin')) {
                 // load libs etc
                 $this->load->plugin('pdf');
                 // populate data
                 $data['ref'] = 'I-' . date('Y', strtotime($data['dateCreated'])) . $id;
                 // get invoice template
                 $html = $this->load->view('invoice', $data, TRUE);
                 // create pdf
                 create_pdf($html, 'I-' . date('Y') . $id);
             } else {
                 show_error('You do not have permission to view this invoice.');
             }
         } else {
             show_error('Not a valid invoice.');
         }
     } else {
         show_404();
     }
 }
 public function generatePassword()
 {
     $res = $this->student->getRecords("", "");
     $i = 0;
     foreach ($res['student_id'] as $student_id) {
         $students[$i]['name'] = $res['name'][$i];
         $students[$i]['student_id'] = $student_id;
         $students[$i]['college'] = $res['college_code'][$i];
         $pass = substr(MD5(uniqid(rand(), true)), 0, 8);
         $students[$i]['pass'] = $pass;
         $salt = substr(MD5(uniqid(rand(), true)), 0, 6);
         $hashedPass = MD5($pass . $salt);
         $data = array('password' => $hashedPass, 'salt' => $salt);
         $this->student->update($data, $student_id);
         $i++;
     }
     $this->load->helper(array('dompdf', 'file'));
     $this->load->helper('file');
     $college = $students[0]['college'];
     $rows[] = "UNIVERSITY OF THE PHILIPPINES MANILA";
     $rows[] = "STUDENT EVALUATION OF TEACHERS";
     $rows[] = " ";
     $rows[] = " ";
     $rows[] = "COLLEGE: " . strtoupper($college);
     $rows[] = " ";
     foreach ($students as $student) {
         if ($student['college'] != $college) {
             $college = $student['college'];
             $rows[] = " ";
             $rows[] = "College: " . $college;
             $rows[] = " ";
         }
         $rows[] = $student['name'];
         $rows[] = "Username: "******"Password: "******"______________________________________________________________________________________";
     }
     $this->SET_model->updateSETStatus(array('accounts_generated' => '1'));
     $pdf_data = create_pdf($rows, 'students_passwords', true);
 }
 function export_stitching()
 {
     $this->data['result'] = $this->Ads_analytics_model->getAllStichingReports(0, 0, true);
     //echo '<pre>'; print_r($this->data['result']); exit;
     if ($this->uri->segment(3) == 'pdf') {
         $content = $this->load->view('templates/stitching_pdf_content', $this->data, true);
         //-- create pdf --//
         create_pdf($content, 'In Stream Stitching Report');
     } elseif ($this->uri->segment(3) == 'csv') {
         $heading = array('Creative', 'Duration', 'UserCount', 'DateTime');
         //$content =  $this->load->view('templates/pdf_content',$this->data,true);
         $dataRpt = array();
         $num = 0;
         foreach ($this->data['result'] as $p) {
             //$dataRpt[$num]['id']       = $p->id;
             $dataRpt[$num]['Commercial'] = isset($p->ad_title) ? $p->ad_title : $p->Commercial;
             $dataRpt[$num]['Duration'] = $p->Duration;
             $dataRpt[$num]['UserCount'] = $p->UserCount;
             $dataRpt[$num]['StartTime'] = $p->StartTime;
             $num++;
         }
         query_to_csv($dataRpt, $heading);
         //echo query_to_csv($content);
         //exit;
     }
 }
    function perform($page, $actionName)
    {
        // Auslesen der Daten
        global $registrationhandleraddress;
        global $registrationsenderaddress;
        global $infomailaddress;
        // function to correct the date format
        function korr_datum($datum1)
        {
            $datum = $datum1['Y'];
            if (strlen($datum1['M']) < 2) {
                $datum .= "-0" . $datum1['M'];
            } else {
                $datum .= "-" . $datum1['M'];
            }
            if (strlen($datum1['d']) < 2) {
                $datum .= "-0" . $datum1['d'];
            } else {
                $datum .= "-" . $datum1['d'];
            }
            return $datum;
        }
        $values = $page->controller->exportValues();
        $mdb2 =& MDB2::singleton();
        if (PEAR::isError($mdb2)) {
            die("Error while connecting : " . $mdb2->getMessage());
        }
        $sql1 = 'INSERT INTO participants SET firstname = ?, lastname = ?, preferred_name = ?, title = ?, street = ?,
		postcode = ?, city = ?, country = ?, countrytext = ?, phone = ?, mobile = ?, email = ?, dateofbirth = ?, 
		maritalstatus = ?, gender = ?, passport_name = ?, passport_no = ?, passport_dateofissue = ?, 
		passport_dateofexpire = ?, nationality = ?, nationalitytext = ?, invitation_letter = ?, 
		emergency_firstname = ?, emergency_lastname = ?, emergency_phone = ?, sj_reason = ?, 
		special_job = ?, part_type = ?, jobwish_2 = ?, status = ?';
        $sth = $mdb2->prepare($sql1, $typen, MDB2_PREPARE_RESULT);
        if (PEAR::isError($mdb2)) {
            die("Error while preparing : " . $mdb2->getMessage());
        }
        $daten = array(utf8_decode($values['firstname']), utf8_decode($values['lastname']), utf8_decode($values['preferredname']), utf8_decode($values['title']), utf8_decode($values['street']), $values['plzort']['postcode'], utf8_decode($values['plzort']['city']), $values['countrygroup']['country'], $values['countrygroup']['othercountry'], $values['phone'], $values['handy'], $values['email'], korr_datum($values['dateofbirth']), $values['maritalstatus'], $values['gender'], utf8_decode($values['passportname']), utf8_decode($values['passportno']));
        $daten[] = korr_datum($values['dateofissue']);
        $daten[] = korr_datum($values['dateofexpire']);
        $daten[] = $values['nationgroup']['nationality'];
        $daten[] = utf8_decode($values['nationgroup']['othernation']);
        $daten[] = $page->controller->exportValue('seite1', 'invitationletter');
        $daten[] = utf8_decode($values['emergency_firstname']);
        $daten[] = utf8_decode($values['emergency_lastname']);
        $daten[] = $values['emergency_phone'];
        $daten[] = utf8_decode($values['staff_text']);
        $daten[] = $values['parttype'];
        $daten[] = '5';
        // part type == 5 means staff
        $daten[] = $values['exhib_acco'];
        $daten[] = '1';
        // status field
        $affRow = $sth->execute($daten);
        if (PEAR::isError($affRow)) {
            die("Error while executing : " . $affRow->getMessage());
        }
        $last_id = $mdb2->lastInsertID('participants', 'id');
        if (PEAR::isError($last_id)) {
            die('failed... Fehler:' . $last_id->getMessage());
            //  echo ($mdb2->getMessage().' - '.$mdb2->getUserinfo());
        }
        $sth->Free();
        $sql1 = "SELECT fee, name FROM countries WHERE id=" . $values['countrygroup']['country'];
        $erg =& $mdb2->query($sql1);
        if (PEAR::isError($erg)) {
            die($erg->getMessage());
        }
        while ($row = $erg->fetchRow()) {
            $preis = $row[0];
            $land_name = $row[1];
        }
        $erg->Free();
        $zufall = rand(100, 999);
        $pdffile = 'pdfs/' . $zufall . '_' . $last_id . '_' . date("Ymd") . '.pdf';
        // now let's create a PDF file
        create_pdf($values, $last_id, $pdffile, $preis, $land_name);
        $text = T_("Dear") . " " . $values["firstname"] . "\n\n";
        $text .= T_("we are so excited that you have just registered for Mission-net in Oldenburg, 2009. We are looking forward to meeting you and 6000 others from all over Europe.");
        $text .= "\n \n";
        $text .= "You are in for a great time with great worship, speakers, and of course the chance to meet like minded people from all over Europe.";
        $text .= "\n \n";
        $text .= htmlentities(T_("We have a National Coordinator in your country who this message has also been sent to. Nearer the time they will be in contact with you to give you more information on others from your country that will be attending this exciting event, as well as practical details of things like travel and what you need to bring."));
        $text .= "\n \n";
        $text .= htmlentities(T_("In order for your registration to be processed please ensure that the congress fee is sent to the Bank (see details attached if not paid by credit card) and you send us the signed registration form. On receipt of payment, we will send you another confirmation e-mail that the money has received which will also be sent to the National Coordinator in your country."));
        $text .= "\n \n";
        $text .= T_("Please ensure that this happens so that we can process your registration as quickly as possible.");
        $text .= "\n \n";
        $text .= T_("Please find attached all necessary documents again in the PDF format.") . "\n";
        $text .= T_("You may download this PDF file right here:") . " ";
        $text .= "https://register.mission-net.org/" . $pdffile;
        $text .= "\n \n";
        $text .= "Thanks again for registering for Mission-Net, and we trust that this event will be an exciting new step in your journey in the Christian faith.";
        $text .= "\n \n \n";
        $text .= "Many Blessings";
        $text .= "\n \n";
        $text .= "Mission-Net Congress Management Team";
        $text .= "\n \n";
        $text .= "Mission-Net 2009 -- Alte Neckarelzer Str. 2 -- D-74821 Mosbach";
        $text .= "\n";
        $text .= $infomailaddress;
        $html = "Dear " . $values["firstname"] . "<br><br>\n";
        $html .= htmlentities(T_("we are so excited that you have just registered for Mission-net in Oldenburg, 2009. We are looking forward to meeting you and 6000 others from all over Europe."));
        $html .= "\n<br><br>\n";
        $html .= htmlentities(T_("You are in for a great time with great worship, speakers, and of course the chance to meet like minded people from all over Europe."));
        $html .= "\n<br><br>\n";
        $html .= htmlentities(T_("We have a National Coordinator in your country who this message has also been sent to. Nearer the time they will be in contact with you to give you more information on others from your country that will be attending this exciting event, as well as practical details of things like travel and what you need to bring."));
        $html .= "\n<br><br>\n";
        $html .= htmlentities(T_("In order for your registration to be processed please ensure that the congress fee is sent to the Bank (see details attached if not paid by credit card) and you send us the signed registration form. On receipt of payment, we will send you another confirmation e-mail that the money has received which will also be sent to the National Coordinator in your country."));
        $html .= "\n<br><br>\n";
        $html .= "Please ensure that this happens so that we can process your registration as quickly as possible.";
        $html .= "\n<br><br>\n";
        $html .= "Please find attached all necessary documents again in the PDF format.<br>";
        $html .= "You may download this PDF file right here:" . " ";
        $html .= "<a href='https://register.mission-net.org/" . $pdffile . "'>PDF Document</a>";
        $html .= "\n<br><br>\n";
        $html .= htmlentities(T_("Thanks again for registering for Mission-Net, and we trust that this event will be an exciting new step in your journey in the Christian faith"));
        $html .= "\n<br><br><br>\n";
        $html .= "Many Blessings";
        $html .= "\n<br><br>\n";
        $html .= "Mission-Net Congress Management Team";
        $html .= "\n<br><br>\n";
        $html .= "Mission-Net 2009 -- Alte Neckarelzer Str. 2 -- D-74821 Mosbach";
        $html .= "\n<br>";
        $html .= $infomailaddress;
        $crlf = "\n";
        //######## Mail to registrant ##################
        //##############################################
        $mime = new Mail_mime($crlf);
        $mime->setTXTBody($text);
        $mime->setHTMLBody($html);
        if (file_exists($pdffile)) {
            $mime->addAttachment($pdffile, 'application/pdf');
        }
        $message = $mime->get();
        $betreff = htmlentities(T_('Mission Net registration 2009')) . ' ' . $values['lastname'] . ', ' . $values['firstname'] . ', ' . $values["nationality"];
        $headers = array('From' => $registrationsenderaddress, 'To' => $registrationhandleraddress, 'Subject' => $betreff);
        $hdrs = $mime->headers($headers);
        $empfaenger = $values["email"];
        // create the mail object using the Mail::factory method
        $mail_message =& Mail::factory('mail');
        $mail_message->send($empfaenger, $hdrs, $message);
        if (PEAR::isError($mail_message)) {
            die($mail_message->getMessage());
        }
        //######## Mail to mission-net #################
        //##############################################
        foreach ($daten as &$dval) {
            $text .= "\n" . $dval;
            $html .= "\n<br>" . $dval;
        }
        $om_mime = new Mail_mime($crlf);
        $om_mime->setTXTBody($text);
        $om_mime->setHTMLBody($html);
        if (file_exists($pdffile)) {
            $om_mime->addAttachment($pdffile, 'application/pdf');
        }
        $om_message = $om_mime->get();
        $om_betreff = $values['firstname'] . ' ' . $values['lastname'] . ' hat sich angemeldet. No.: ' . $last_id;
        $om_headers = array('From' => $registrationsenderaddress, 'To' => $registrationhandleraddress, 'Subject' => $om_betreff);
        $om_hdrs = $om_mime->headers($om_headers);
        $om_mail_message =& Mail::factory('mail');
        $om_mail_message->send($registrationhandleraddress, $om_hdrs, $om_message);
        if (PEAR::isError($om_mail_message)) {
            die($om_mail_message->getMessage());
        }
        //#### here comes the resulting screen after the registration #
        //#############################################################
        ?>
     <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
        <html>
        <head>
          <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
          <title>
	 <?php 
        echo htmlentities(T_("Mission Net Online Registration"));
        ?>
	 </title>
        </head>
        <body>
        <table><tr>
         <td>
         <img src="images/MN_Logo_kleiner.png" alt="Mission-Net Logo">
         </td><td>
         <font size="-2">
	 <?php 
        echo htmlentities(T_("Germany")) . "<br>" . htmlentities(T_("8. April to 13. April 2009")) . "<br>Oldenburg</font>";
        ?>
         </td>
         </tr>
        </table>
	<h2>
	<?php 
        echo htmlentities(T_("Confirmation of registration for Mission-Net 2009"));
        echo '</h2>';
        $format = htmlentities(T_("Dear")) . " %1\$s";
        printf($format, $values["firstname"]);
        echo ", <br><br>\n";
        echo htmlentities(T_('we are so excited that you have just registered for Mission-net in Oldenburg, 2009. We are looking forward to meeting you and 6000 others from all over Europe.'));
        echo "\n<br><br>\n";
        echo htmlentities(T_('You are in for a great time with great worship, speakers, and of course the chance to meet like minded people from all over Europe.'));
        echo "\n<br><br>\n";
        echo htmlentities(T_("We have a National Coordinator in your country who this message has also been sent to. Nearer the time they will be in contact with you to give you more information on others from your country that will be attending this exciting event, as well as practical details of things like travel and what you need to bring."));
        echo "\n<br><br><br>\n";
        echo htmlentities(T_("In order for your registration to be processed please ensure that the congress fee is paid. On receipt of payment, we will send you another confirmation e-mail that the money has received which will also be sent to the National Coordinator in your country."));
        echo "\n<br><br>\n";
        echo htmlentities(T_("Please ensure that this happens so that we can process your registration as quickly as possible."));
        echo "\n<br><br>\n";
        echo htmlentities(T_("Thanks again for registering for Mission-Net and we trust that this event will be an exciting new step in your journey in the Christian faith."));
        echo "\n<br><br>\n";
        echo htmlentities(T_("Many Blessings"));
        echo "\n<br><br>\n";
        echo htmlentities(T_("Mission-Net Congress Management Team"));
        echo "\n<br><br>\n";
        echo "<b>" . htmlentities(T_("Payment Instructions")) . "</b><br>\n";
        echo htmlentities(T_("There are two ways of paying for Mission-Net 2009:")) . "<br>\n";
        echo "<ol><li>" . htmlentities(T_("Wire transfer of money to our bank account")) . "</li>\n";
        echo "<li>" . htmlentities(T_("Credit Card Payment")) . "</li></ol><br>\n";
        echo "<b>" . htmlentities(T_("Wire transfer:")) . "</b><br>\n";
        echo htmlentities(T_("Please transfer the sum of")) . " " . $preis . " " . T_("Euro") . "<br>\n";
        echo htmlentities(T_("to")) . "<br>" . T_("OM Europa / Mission-Net") . "<br>\n";
        echo htmlentities(T_("Account no:")) . " 5010802" . "<br>\n";
        global $iban;
        global $swiftcode;
        global $bank;
        echo $iban . "<br>\n";
        echo $swiftcode . "<br>\n";
        echo T_("Address of bank:") . $bank . "<br>\n";
        echo htmlentities(T_("and use this reference:")) . "<b> M09-" . $last_id . "</b><br>\n";
        echo "<br><b>" . htmlentities(T_("Credit Card Payment:")) . "</b><br>\n";
        echo htmlentities(T_("If you prefer to pay by credit or debit card, we have to add a supplement of 10 Euro for the transaction.")) . "<br>\n";
        $gsumme = $preis + 10;
        echo htmlentities(T_("Please transfer the sum of")) . " " . $preis . " Euro + " . T_("10 Euro") . " = " . money_format('%i', $gsumme) . " " . htmlentities(T_("Euro")) . "<br>\n";
        echo htmlentities(T_("by clicking this link:"));
        ?>
<form method="post" action="https://www.paypal.com/cgi-bin/webscr" target="neu">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="*****@*****.**">
<input type="hidden" name="item_name" value="Mission-Net event">
<input type="hidden" name="quantity" value="1">
<input type="hidden" name="bn"  value="ButtonFactory.PayPal.002">
<input type="hidden" name="currency_code" value="EUR">
<input type="hidden" name="on0" value="<?php 
        echo $values['lastname'] . ', ' . $values['firstname'];
        ?>
">
<input type="hidden" name="os0" value="">
<input type="hidden" name="on1" value="Reference No: <?php 
        echo 'M09-' . $last_id;
        ?>
 ">
<input type="hidden" name="os1" value="">
<br>
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_paynow_LG.gif">
</form>
<?php 
        echo htmlentities(T_("Note:")) . " " . htmlentities(T_("Your registration is only valid as soon as we received your payment.")) . "<br>\n";
        echo htmlentities(T_("You have to pay within 2 weeks of completing your registration (this is now), otherwise the system will delete your registration automatically")) . "<br>\n";
        session_destroy();
    }
Пример #5
0
 public function pdf_report($id)
 {
     $this->load->helper('dompdf');
     //  Load helper
     $data = file_get_contents(site_url('sarfas/view_gl/' . $id));
     // Pass the url of html report
     create_pdf($data);
     //Create pdf
 }
Пример #6
0
										<td align="right">'.$job_data->due.'</td>
									</tr>
								</table>
							</td>
						</tr>
						<tr>
							<td colspan="2">
							<span style="font-size:9px;">
								I/We have checked all content,color,material in the sample print.
								It is acceptable to me/us.
							</span>
							</td>
						</tr>
						<tr>
							<td colspan="2" align="right">
								Signature : __________________________
							</td>
						</tr>
					</table>';
				$content .= '</td>
				
			</tr>';
			if($j == 0) {
				$content .= ' <tr><td colspan="2"><br><hr><br></td></tr>';
			}
		} 
		$content .= '</table>
';
//echo $content;
create_pdf($content,'A5');
Пример #7
0
			<tr><td align="center" colspan="2">Job Name : <strong>'.$job_data->jobname.'</strong></td></tr></table>';

$content .='<table align="center" border="2" width="100%" style="border:1px solid;"><tr>';
$sr=1;
foreach($cutting_info as $cutting) {
	$content .= '<td>
				<table align="center" border="2" width="100%" style="border:1px solid;">
				<tr><td align="right">Material : </td><td>'.$cutting['c_material'].'</td></tr>
				<tr><td align="right">Machine : </td><td>'.$cutting['c_machine'].'</td></tr>
				<tr><td align="right">Size : </td><td>'.$cutting['c_size'].'</td></tr>
				<tr><td align="right">Print : </td><td>'.$cutting['c_print'].'</td></tr>
				<tr><td align="right">Cutting Details : </td><td>'.$cutting['c_sizeinfo'].'</td></tr>
				<tr><td align="right">Quantity : </td><td><strong>'.$cutting['c_qty'].'</strong></td></tr>
				<tr><td align="right">Corner Cut : </td><td>'.$cutting['c_corner'].'</td></tr>
				<tr><td align="right">Lamination Details : </td><td>'.$cutting['c_lamination'].' '.$cutting['c_laminationinfo'] .'</td></tr>
				<tr><td align="right">Binding Details : </td><td>'.$cutting['c_binding'].' '.$cutting['c_bindinginfo'].'</td></tr>
				<tr><td align="right">Packing Details : </td><td>'.$cutting['c_packing'].'</td></tr>
				<tr><td align="right">Paper : </td><td>'.$cutting['c_checking'].'</td></tr>
				<tr><td align="right">Description : </td><td>'.$cutting['c_details'].'</td></tr>
				</table>
				</td>';
				if($sr > 1 && ($sr % 2) ==0) {
					$content .= '</tr><tr>';
				}
				$sr++;
}
$content .= '</tr></table>';
//echo $content;
create_pdf($content);

Пример #8
0
 function export()
 {
     $type = $this->uri->segment(3);
     $cid = $this->uri->segment(4);
     $this->data['result'] = $this->webtv_model->epgList($cid, $this->uid);
     switch ($type) {
         case 'pdf':
             $content = $this->load->view('templates/epg_pdf', $this->data, true);
             create_pdf($content, 'EPG Report');
             break;
         case 'csv':
             $heading = array('Sl.No.', 'Playlist Id', 'Title', 'Content Id', 'Start Time', 'End Time', 'Status');
             //$content =  $this->load->view('templates/pdf_content',$this->data,true);
             $dataRpt = array();
             $num = 0;
             $i = 0;
             foreach ($this->data['result'] as $p) {
                 $i++;
                 $dataRpt[$num]['title'] = $i;
                 $dataRpt[$num]['content_provider'] = $p->playlist_id;
                 $dataRpt[$num]['platform'] = $p->title;
                 $dataRpt[$num]['browser'] = $p->content_id;
                 $dataRpt[$num]['location'] = $this->dateFormat($p->start_date);
                 $dataRpt[$num]['date'] = $this->dateFormat($p->end_date);
                 $dataRpt[$num]['hits'] = $p->status;
                 $num++;
             }
             query_to_csv($dataRpt, $heading, '');
             break;
         case 'xml':
             echo 'xml';
             break;
     }
 }
Пример #9
0
                     $error_message = "Database query failed (" . __FILE__ . ":" . __LINE__ . "): " . mysql_error() . "<BR>Query: '{$ipp_admin_query}'<BR>";
                     $system_message = $system_message . $error_message;
                     IPP_LOG($system_message, $_SESSION['egps_username'], 'ERROR');
                 } else {
                     if (mysql_num_rows($ipp_admin_result) <= 0) {
                         $system_message = $system_message . "There doesn't appear to be a school based IPP administrator for this school. The student has been moved but there was nobody at the receiving school notified (You might want to phone and let them know).<BR>";
                     } else {
                         while ($ipp_admin_row = mysql_fetch_array($ipp_admin_result)) {
                             mail_notification($ipp_admin_row['egps_username'], "This email has been sent to you to notify you that " . $student_row['first_name'] . " " . $student_row['last_name'] . "'s IPP has been moved to your school by " . username_to_common($_SESSION['egps_username']) . ". Please contact them for more information.\n\nYou should update the supervisor information and add the appropriate support members for your school to this students IPP (and remove anybody who should no longer be a support member).");
                             $system_message = $system_message . $ipp_admin_row['egps_username'] . " ";
                         }
                         $system_message .= " received an emailed notification that this student's IPP was forwarded to their school<BR>";
                     }
                 }
                 //take a snapshot...
                 $pdf = create_pdf($student_id);
                 //we add the entry.
                 $insert_query = "INSERT INTO snapshot(student_id,date,file,filename) VALUES (" . mysql_real_escape_string($student_id) . ",NOW(),'" . mysql_real_escape_string($pdf->Output("ignored", 'S')) . "','IPP-" . $student_row['first_name'] . " " . $student_row['last_name'] . " " . date("F-d-Y") . ".pdf')";
                 $insert_result = mysql_query($insert_query);
                 if (!$insert_result) {
                     $error_message = "Snapshot not taken because the database query failed (" . __FILE__ . ":" . __LINE__ . "): " . mysql_error() . "<BR>Query: '" . substr($insert_query, 0, 100) . "[truncated]'<BR>";
                     $system_message = $system_message . $error_message;
                     IPP_LOG($system_message, $_SESSION['egps_username'], 'ERROR');
                 } else {
                     $system_message = $system_message . "<BR>A current snapshot was successfully taken of the IPP<BR>";
                 }
                 unset($_POST['move_start_date']);
             }
         }
     }
 }
Пример #10
0
    public function ajax_view_customer($id, $print = 0)
    {
        $this->load->model('customer_model');
        $c_info = $this->customer_model->get_customer_details('id', $id);
        $html = "";
        //print_r($print);
        if ($print == 1) {
            $cname = $c_info->companyname ? $c_info->companyname : $c_info->name;
            $html .= '<table width="40%" align="center" border="0">
					<tr>
						<td>
							<strong>Name : ' . $cname . '</strong>
							<p>
								' . $c_info->add1 . ',<br>
								' . $c_info->add2 . ',<br>
								' . $c_info->city . ',<br>
								' . $c_info->state . ',<br>
								' . $c_info->pin . '<br>
								Mobile : ' . $c_info->mobile . '<br>
								Email Id : ' . $c_info->emailid . '<br>
							</p>
						</td>
					</tr>
					</table>';
            $pdf = create_pdf($html, 'A5');
            echo $pdf;
            die;
        } else {
            $html .= '<table width="90%" border="1">
					<tr>
						<td align="right">Company Name : </td>
						<td>' . $c_info->companyname . '</td>
						<td align="right">	Mobile : </td>
						<td>' . $c_info->mobile . '</td>
					</tr>
					<tr>
						<td align="right">Contact Person Name : </td>
						<td>' . $c_info->name . '</td>
						<td align="right">	Mobile : </td>
						<td>' . $c_info->officecontact . '</td>
					</tr>
					<tr>
						<td align="right">Email Id : </td>
						<td>' . $c_info->emailid . '</td>
						<td align="right">	Other Email Id : </td>
						<td>' . $c_info->emailid2 . '</td>
					</tr>
					<tr>
						<td colspan="4">
							<center>Address</center>
							<p>
								' . $c_info->add1 . '<br>
								' . $c_info->add2 . '<br>
								' . $c_info->city . '<br>
								' . $c_info->state . '<br>
								' . $c_info->pin . '<br>
							</p>
						</td>
					</tr>
					</table>';
            echo $html;
            die;
        }
    }
Пример #11
0
<?php
$content .= "<center><strong><p>To, ".$customer_details->companyname."</p>";
$content .= "<p>Contact Person : ".$customer_details->name."</p>";
$content .= "<p>Address : ".$customer_details->add1."</p><p>".$customer_details->add2."</p>";
$content .= "<p>         ".$customer_details->city." ".$customer_details->state." ".$customer_details->pin."</p>";
$content .= "<p>Mobile : ".$customer_details->mobile."</p></center>";
$content .= "
			<div style='margin-left:45%'>
			<p>From : Cybera Print Art</p>
			<p>G/3, Samudra Annexe,Nr. Klassic Gold Hotel,</p>
			<p>Off C.G. Road, Navrangpura Ahmedabad - 009</p>
			<p>Call : 079-26565720 / 26465720 | 9898309897</p>
			<p>Email : cybera.printart@gmail.com</p>
			<p>Website : www.cybera.in | www.cyberaprint.com </p>
			</div></strong>
		</center>";

create_pdf($content,'A6-L');
Пример #12
0
 function export()
 {
     $search = $this->session->userdata('search_form');
     //echo $this->uri->segment(4);die;
     //-- sorting input --//
     $sort_i = $this->uri->segment(5);
     $sort_by = $this->uri->segment(6);
     $type = $this->uri->segment(8);
     if ($this->uri->segment(9) == 'country') {
         $country = $this->uri->segment(10);
     } else {
         $id = $this->uri->segment(10);
     }
     $sort = $this->sort_input($sort_i, $sort_by);
     //-----//
     //-- result --//
     $this->data['result'] = $this->Analytics_model->getReport(array('code' => $country, 'id' => $id, 'type' => $type, 'search' => $search), $sort, $sort_by);
     //echo '<pre>';print_r($this->data['result']);die;
     if ($type == 'content') {
         if ($this->uri->segment(4) == 'pdf') {
             $content = $this->load->view('templates/pdf_content', $this->data, true);
             //-- create pdf --//
             create_pdf($content, 'Content Base Report');
         } elseif ($this->uri->segment(4) == 'csv') {
             $heading = array('Name', 'Content Provider', 'Platform', 'Browser', 'Location', 'Date', 'Total Hits', 'Total time watched');
             //$content =  $this->load->view('templates/pdf_content',$this->data,true);
             $dataRpt = array();
             $num = 0;
             foreach ($this->data['result'] as $p) {
                 $dataRpt[$num]['title'] = $p->title;
                 $dataRpt[$num]['content_provider'] = $p->content_provider;
                 $dataRpt[$num]['platform'] = $p->platform;
                 $dataRpt[$num]['browser'] = $p->browser;
                 $dataRpt[$num]['location'] = $p->country;
                 $dataRpt[$num]['date'] = $p->created;
                 $dataRpt[$num]['hits'] = $p->total_hits;
                 $dataRpt[$num]['watched time'] = time_from_seconds($p->total_watched_time);
                 $num++;
             }
             query_to_csv($dataRpt, $heading);
             //echo query_to_csv($content);
             //exit;
         }
     }
     if ($type == 'usercontent') {
         if ($this->uri->segment(4) == 'pdf') {
             $content = $this->load->view('templates/pdf_usercontent', $this->data, true);
             //-- create pdf --//
             create_pdf($content, 'User Content Report');
         } elseif ($this->uri->segment(4) == 'csv') {
             $heading = array('Name', 'Content Provider', 'Platform', 'Browser', 'Location', 'Date', 'Total Hits', 'Total time watched');
             //$content =  $this->load->view('templates/pdf_content',$this->data,true);
             //print_r($this->data['result']);die;
             $dataRpt = array();
             $num = 0;
             foreach ($this->data['result'] as $p) {
                 $dataRpt[$num]['title'] = $p->title;
                 $dataRpt[$num]['content_provider'] = $p->content_provider;
                 $dataRpt[$num]['platform'] = $p->platform;
                 $dataRpt[$num]['browser'] = $p->browser;
                 $dataRpt[$num]['location'] = $p->country;
                 $dataRpt[$num]['date'] = $p->created;
                 $dataRpt[$num]['hits'] = $p->total_hits;
                 $dataRpt[$num]['watched time'] = time_from_seconds($p->total_watched_time);
                 $num++;
             }
             query_to_csv($dataRpt, $heading);
             //echo query_to_csv($content);
             //exit;
         }
     }
     if ($type == 'user') {
         if ($this->uri->segment(4) == 'pdf') {
             $user = $this->load->view('templates/pdf_user', $this->data, true);
             //-- create pdf --//
             create_pdf($user, 'User Based Report');
         } elseif ($this->uri->segment(4) == 'csv') {
             $heading = array('Name', 'Total Hits', 'Total time watched', 'Browser', 'IP', 'Date');
             //$content =  $this->load->view('templates/pdf_content',$this->data,true);
             $dataRpt = array();
             $num = 0;
             foreach ($this->data['result'] as $p) {
                 $dataRpt[$num]['name'] = $p->name != '' ? $p->name : 'guest';
                 $dataRpt[$num]['hits'] = $p->total_hits;
                 $dataRpt[$num]['watched time'] = time_from_seconds($p->total_watched_time);
                 $dataRpt[$num]['browser'] = $p->browser;
                 $dataRpt[$num]['ip'] = $p->ip;
                 $dataRpt[$num]['date'] = date("d/m/Y H:i:s", strtotime($p->created));
                 $num++;
             }
             query_to_csv($dataRpt, $heading);
             //echo query_to_csv($content);
             //exit;
         }
     }
     if ($type == 'useragent') {
         if ($this->uri->segment(4) == 'pdf') {
             $content = $this->load->view('templates/pdf_device', $this->data, true);
             //-- create pdf --//
             create_pdf($content, 'Device Base Report');
         } elseif ($this->uri->segment(4) == 'csv') {
             $heading = array('Platform', 'Browser', 'Total Hits', 'Total time watched');
             //$content =  $this->load->view('templates/pdf_content',$this->data,true);
             $dataRpt = array();
             $num = 0;
             foreach ($this->data['result'] as $p) {
                 $dataRpt[$num]['platform'] = $p->platform;
                 $dataRpt[$num]['browser'] = $p->browser;
                 $dataRpt[$num]['hits'] = $p->total_hits;
                 $dataRpt[$num]['watched time'] = time_from_seconds($p->total_watched_time);
                 $num++;
             }
             query_to_csv($dataRpt, $heading);
             //echo query_to_csv($content);
             //exit;
         }
     }
     if ($type == 'region') {
         if ($this->uri->segment(4) == 'pdf') {
             $geomap = $this->load->view('templates/pdf_geomap', $this->data, true);
             //-- create pdf --//
             create_pdf($geomap, 'Region Based Report');
         } elseif ($this->uri->segment(4) == 'csv') {
             $heading = array('Country', 'Region', 'Total Hits', 'Total time watched');
             //$content =  $this->load->view('templates/pdf_content',$this->data,true);
             $dataRpt = array();
             $num = 0;
             foreach ($this->data['result'] as $p) {
                 $dataRpt[$num]['country'] = $p->country;
                 $dataRpt[$num]['state'] = $p->state;
                 $dataRpt[$num]['hits'] = $p->total_hits;
                 $dataRpt[$num]['watched time'] = time_from_seconds($p->total_watched_time);
                 $num++;
             }
             query_to_csv($dataRpt, $heading);
             //echo query_to_csv($content);
             //exit;
         }
     }
     if ($type == 'country') {
         $this->data['c'] = 1;
         if ($this->uri->segment(4) == 'pdf') {
             $geomap = $this->load->view('templates/pdf_geomap', $this->data, true);
             //-- create pdf --//
             create_pdf($geomap, 'Country Based Report');
         } elseif ($this->uri->segment(4) == 'csv') {
             $heading = array('Location', 'Country', 'Total Hits', 'Total time watched');
             //$content =  $this->load->view('templates/pdf_content',$this->data,true);
             $dataRpt = array();
             $num = 0;
             foreach ($this->data['result'] as $p) {
                 $dataRpt[$num]['Location'] = $p->city != '' ? $p->city : 'Unknown';
                 $dataRpt[$num]['country'] = $p->country;
                 $dataRpt[$num]['hits'] = $p->total_hits;
                 $dataRpt[$num]['watched time'] = time_from_seconds($p->total_watched_time);
                 $num++;
             }
             query_to_csv($dataRpt, $heading);
             //echo query_to_csv($content);
             //exit;
         }
     }
 }
    function perform($page, $actionName)
    {
        // Auslesen der Daten
        global $infomailaddress;
        global $registrationsenderaddress;
        global $registrationhandleraddress;
        // function to correct the date format
        function korr_datum($datum1)
        {
            $datum = $datum1['Y'];
            if (strlen($datum1['M']) < 2) {
                $datum .= "-0" . $datum1['M'];
            } else {
                $datum .= "-" . $datum1['M'];
            }
            if (strlen($datum1['d']) < 2) {
                $datum .= "-0" . $datum1['d'];
            } else {
                $datum .= "-" . $datum1['d'];
            }
            return $datum;
        }
        $values = $page->controller->exportValues();
        $mdb2 =& MDB2::singleton();
        if (PEAR::isError($mdb2)) {
            die("Error while connecting : " . $mdb2->getMessage());
        }
        $sql1 = 'INSERT INTO participants SET firstname = ?, lastname = ?, preferred_name = ?, title = ?, street = ?,
		postcode = ?, city = ?, country = ?, countrytext = ?, phone = ?, mobile = ?, email = ?, 
		dateofbirth = ?, maritalstatus = ?, gender = ?,
		passport_name = ?, passport_no = ?, passport_dateofissue = ?, passport_dateofexpire = ?,
		nationality = ?, nationalitytext = ?, invitation_letter = ?, vegeterian = ?, medication = ?, what_medication = ?, 
		medication_reason = ?, disabilities = ?, allergies = ?, emergency_firstname = ?,
		emergency_lastname = ?, emergency_phone = ?, groupleader_name = ?, groupleader_email = ?,
		church_name = ?, church_deno = ?, church_address = ?, ref_person_church_task = ?, ref_person_lastname = ?, 
                ref_person_firstname = ?, ref_person_phone = ?, ref_person_email = ?,
		other_conf= ?, leadership_exp = ?, german_skill = ?, english_skill = ?,
		mother_tongue = ?, IN2_team_1 = ?, IN2_team_2 = ?, part_type = ?, why_trip = ?, learn_trip= ?, 
		outreach_organisation = ?, musical_ability = ?, outreach_ability = ?, story = ?, 
		why_mission = ?, jobwish_1 = ?, jobwish_2 = ?, jobwish_comment = ?, special_job = ?, 
		sj_reason = ?, status = ?, arrival_date =?, departure_date = ?, remarks =?';
        $sth = $mdb2->prepare($sql1, $typen, MDB2_PREPARE_RESULT);
        $daten = array(utf8_decode($values['firstname']), utf8_decode($values['lastname']), utf8_decode($values['preferredname']), utf8_decode($values['title']), utf8_decode($values['street']), $values['plzort']['postcode'], utf8_decode($values['plzort']['city']), $values['countrygroup']['country'], $values['countrygroup']['othercountry'], $values['phone'], $values['handy'], $values['email'], korr_datum($values['dateofbirth']), $values['maritalstatus'], $values['gender'], utf8_decode($values['passportname']), utf8_decode($values['passportno']));
        $daten[] = korr_datum($values['dateofissue']);
        $daten[] = korr_datum($values['dateofexpire']);
        $daten[] = $values['nationgroup']['nationality'];
        $daten[] = $values['nationgroup']['othernation'];
        $daten[] = $page->controller->exportValue('seite1', 'invitationletter');
        $daten[] = $page->controller->exportValue('seite3', 'vegetarian');
        $daten[] = $page->controller->exportValue('seite3', 'medication');
        $daten[] = utf8_decode($values['what_medication']);
        $daten[] = utf8_decode($values['medication_reason']);
        $daten[] = utf8_decode($values['disabilities']);
        $daten[] = utf8_decode($values['allergies']);
        $daten[] = utf8_decode($values['emergency_firstname']);
        $daten[] = utf8_decode($values['emergency_lastname']);
        $daten[] = $values['emergency_phone'];
        $daten[] = utf8_decode($page->controller->exportValue('seite2', 'gl_name'));
        $daten[] = utf8_decode($page->controller->exportValue('seite2', 'gl_email'));
        $daten[] = utf8_decode($page->controller->exportValue('seite3', 'church_name'));
        $daten[] = utf8_decode($page->controller->exportValue('seite3', 'denomination'));
        $daten[] = utf8_decode($page->controller->exportValue('seite3', 'church_address'));
        $daten[] = $page->controller->exportValue('seite3', 'ref_function');
        $daten[] = utf8_decode($page->controller->exportValue('seite3', 'ref_firstname'));
        $daten[] = utf8_decode($page->controller->exportValue('seite3', 'ref_lastname'));
        $daten[] = $page->controller->exportValue('seite3', 'ref_phone');
        $daten[] = $page->controller->exportValue('seite3', 'email');
        $daten[] = utf8_decode($page->controller->exportValue('seite2', 'other_conf'));
        $daten[] = utf8_decode($page->controller->exportValue('seite2', 'leader_exp'));
        $daten[] = $page->controller->exportValue('seite2', 'german_skill');
        $daten[] = $page->controller->exportValue('seite2', 'english_skill');
        $daten[] = $page->controller->exportValue('seite2', 'mother_tongue');
        $daten[] = $page->controller->exportValue('seite3', 'IN2_wish_1');
        $daten[] = $page->controller->exportValue('seite3', 'IN2_wish_2');
        $daten[] = $values['parttype'];
        $daten[] = utf8_decode($page->controller->exportValue('seite3', 'why_IN2'));
        $daten[] = utf8_decode($page->controller->exportValue('seite3', 'learn_IN2'));
        $daten[] = utf8_decode($page->controller->exportValue('seite2', 'story'));
        $daten[] = utf8_decode($page->controller->exportValue('seite2', 'why_mission'));
        $daten[] = utf8_decode($page->controller->exportValue('seite3', 'outreach_org'));
        $daten[] = utf8_decode($page->controller->exportValue('seite3', 'musical_ability'));
        $daten[] = utf8_decode($page->controller->exportValue('seite3', 'outreach_ability'));
        $daten[] = $page->controller->exportValue('seite4', 'st_wish_1');
        $daten[] = $page->controller->exportValue('seite4', 'st_wish_2');
        $daten[] = utf8_decode($page->controller->exportValue('seite4', 'st_comment'));
        $daten[] = $page->controller->exportValue('seite4', 'counsellor');
        $daten[] = utf8_decode($page->controller->exportValue('seite4', 'counsellor_reason'));
        $daten[] = '1';
        // status field
        $daten[] = $page->controller->exportValue('seite4', 'arr_date');
        $daten[] = $page->controller->exportValue('seite4', 'dep_date');
        $daten[] = utf8_decode($page->controller->exportValue('seite4', 'bemerkung'));
        $affRow = $sth->execute($daten);
        $last_id = $mdb2->lastInsertID('participants', 'id');
        if (PEAR::isError($affRow)) {
            die('failed... Fehler:' . $affRow->getMessage());
            echo $mdb2->getMessage() . ' - ' . $mdb2->getUserinfo();
        }
        $sth->Free();
        if ($values['parttype'] == '2') {
            $sql1 = "SELECT service_team_fee, name FROM countries WHERE id=" . $values['countrygroup']['country'];
        } else {
            $sql1 = "SELECT fee, name FROM countries WHERE id=" . $values['countrygroup']['country'];
        }
        $erg =& $mdb2->query($sql1);
        if (PEAR::isError($erg)) {
            die($erg->getMessage());
        }
        while ($row = $erg->fetchRow()) {
            $preis = $row[0];
            $land_name = $row[1];
        }
        $erg->Free();
        $zufall = rand(100, 999);
        $pdffile = 'pdfs/' . $zufall . '_' . $last_id . '_' . date("Ymd") . '.pdf';
        // now let's create a PDF file
        create_pdf($values, $last_id, $pdffile, $preis, $land_name);
        $text = T_("Dear") . " " . $values["firstname"] . "\n\n";
        $text .= T_("we are so excited that you have just registered for Mission-net in Oldenburg, 2009. We are looking forward to meeting you and 6000 others from all over Europe.");
        $text .= "\n \n";
        $text .= htmlentities(T_("You are in for a great time with great worship, speakers, and of course the chance to meet like minded people from all over Europe."));
        $text .= "\n \n";
        $text .= htmlentities(T_("We have a National Coordinator in your country who this message has also been sent to. Nearer the time they will be in contact with you to give you more information on others from your country that will be attending this exciting event, as well as practical details of things like travel and what you need to bring."));
        $text .= "\n \n";
        $text .= htmlentities(T_("In order for your registration to be processed please ensure that the congress fee is sent to the Bank (see details attached if not paid by credit card) and you send us the signed registration form, if you are under 18 years. On receipt of payment, we will send you another confirmation e-mail that the money has received which will also be sent to the National Coordinator in your country."));
        $text .= "\n \n";
        $text .= T_("Please ensure that this happens so that we can process your registration as quickly as possible.");
        $text .= "\n \n";
        $text .= T_("Please find attached all necessary documents again in the PDF format.") . "\n";
        $text .= T_("You may download this PDF file right here:") . " ";
        $text .= "https://register.mission-net.org/" . $pdffile;
        $text .= "\n \n";
        $text .= htmlentities(T_("Thanks again for registering for Mission-Net, and we trust that this event will be an exciting new step in your journey in the Christian faith."));
        $text .= "\n \n \n";
        $text .= htmlentities(T_("Many Blessings"));
        $text .= "\n \n";
        $text .= htmlentities(T_("Mission-Net Congress Management Team"));
        $text .= "\n \n";
        $text .= htmlentities(T_("Mission-Net 2009 -- Alte Neckarelzer Str. 2 -- D-74821 Mosbach"));
        $text .= "\n";
        $text .= $infomailaddress;
        $html = htmlentities(T_("Dear")) . " " . $values["firstname"] . "<br><br>\n";
        $html .= htmlentities(T_("we are so excited that you have just registered for Mission-net in Oldenburg, 2009. We are looking forward to meeting you and 6000 others from all over Europe."));
        $html .= "\n<br><br>\n";
        $html .= htmlentities(T_("You are in for a great time with great worship, speakers, and of course the chance to meet like minded people from all over Europe."));
        $html .= "\n<br><br>\n";
        $html .= htmlentities(T_("We have a National Coordinator in your country who this message has also been sent to. Nearer the time they will be in contact with you to give you more information on others from your country that will be attending this exciting event, as well as practical details of things like travel and what you need to bring."));
        $html .= "\n<br><br>\n";
        $html .= htmlentities(T_("In order for your registration to be processed please ensure that the congress fee is sent to the Bank (see details attached if not paid by credit card) and you send us the signed registration form, if you are under 18 years. On receipt of payment, we will send you another confirmation e-mail that the money has received which will also be sent to the National Coordinator in your country."));
        $html .= "\n<br><br>\n";
        $html .= htmlentities(T_("Please ensure that this happens so that we can process your registration as quickly as possible."));
        $html .= "\n<br><br>\n";
        $html .= htmlentities(T_("Please find attached all necessary documents again in the PDF format.")) . "<br>";
        $html .= htmlentities(T_("You may download this PDF file right here:")) . " ";
        $html .= "<a href='https://register.mission-net.org/" . $pdffile . "'>" . htmlentities(T_("PDF Document")) . "</a>";
        $html .= "\n<br><br>\n";
        $html .= htmlentities(T_("Thanks again for registering for Mission-Net, and we trust that this event will be an exciting new step in your journey in the Christian faith"));
        $html .= "\n<br><br><br>\n";
        $html .= htmlentities(T_("Many Blessings"));
        $html .= "\n<br><br>\n";
        $html .= htmlentities(T_("Mission-Net Congress Management Team"));
        $html .= "\n<br><br>\n";
        $html .= htmlentities(T_("Mission-Net 2009 -- Alte Neckarelzer Str. 2 -- D-74821 Mosbach"));
        $html .= "\n<br>";
        $html .= $infomailaddress;
        $crlf = "\n";
        //######## Mail to registrant ##################
        //##############################################
        $mime = new Mail_mime($crlf);
        $mime->setTXTBody($text);
        $mime->setHTMLBody($html);
        if (file_exists($pdffile)) {
            $mime->addAttachment($pdffile, 'application/pdf');
        }
        $message = $mime->get();
        $betreff = htmlentities(T_('Mission Net registration 2009')) . ' ' . $values['lastname'] . ', ' . $values['firstname'] . ', ' . $values["nationality"] . ' ' . $last_id;
        $headers = array('From' => $registrationsenderaddress, 'To' => $registrationhandleraddress, 'Cc' => '*****@*****.**', 'Subject' => $betreff);
        $hdrs = $mime->headers($headers);
        $empfaenger = $values["email"];
        // create the mail object using the Mail::factory method
        $mail_message =& Mail::factory('mail');
        $mail_message->send($empfaenger, $hdrs, $message);
        if (PEAR::isError($mail_message)) {
            die($mail_message->getMessage());
        }
        //######## Mail to mission-net #################
        //##############################################
        $sql = "SELECT p.id, firstname, lastname, preferred_name, title, street, postcode, city, c.name as country, countrytext, phone, mobile,";
        $sql .= " email, t.type as part_type, dateofbirth, m.status as maritalstatus, gender, passport_name, passport_no, ";
        $sql .= "passport_dateofissue, passport_dateofexpire, n.name as nationality, nationalitytext, IF(invitation_letter=0,'No', 'Yes') as ";
        $sql .= "invitation_letter_required, IF(vegeterian=0,'No','Yes') as vegetarian, IF(medication=0,'No','Yes') as medication, ";
        $sql .= "what_medication, disabilities, allergies, dietary, emergency_firstname, emergency_lastname, emergency_phone, ";
        $sql .= "church_name, church_deno, church_address, groupleader_name, ref_person_firstname, ref_person_lastname, ";
        $sql .= "ref_person_phone, ref_person_email, ref_person_church_task, groupleader_email, other_conf, team_conf, ";
        $sql .= "leadership_exp, gl.level_desc as german_skill, el.level_desc as english_skill, l.name as mothertongue, ";
        $sql .= "p.IN2_team_1, p.IN2_team_2, why_trip, learn_trip, story, why_mission, outreach_organisation, ";
        $sql .= "musical_ability, p.outreach_ability, w1.work_area as jobwish_1, w2.work_area as jobwish_2, jobwish_comment, ";
        $sql .= "special_job, sj_reason, p.arrival_date, p.departure_date, p.remarks, p.status, p.appdate";
        $sql .= ' FROM participants p, countries c, marital_status m, part_type t, countries n, ';
        $sql .= 'languages l, work_area_list w1, work_area_list w2, english_level el, english_level gl';
        $sql .= ' where p.id = ' . $last_id . ' and c.id = p.country and m.id = p.maritalstatus and t.id = p.part_type ';
        $sql .= 'and n.id=p.nationality and l.id=p.mother_tongue and ';
        $sql .= 'w1.id=p.jobwish_1 and w2.id=p.jobwish_2 and el.id=p.english_skill and gl.id=german_skill';
        $row = $mdb2->queryRow($sql);
        if (PEAR::isError($row)) {
            die($row->getMessage());
        }
        foreach ($row as $k => $wert) {
            $text .= "\n" . $k . " : " . $wert;
            $html .= "\n<br>" . $k . " : " . $wert;
        }
        $text .= "\nPreis: " . $preis;
        $html .= "\n<br>Preis: " . $preis;
        $sql = "SELECT p.country as LandID, n.email AS nat_email FROM participants p, national_motivators n";
        $sql .= ' WHERE p.id = ' . $last_id . ' and n.countryid = p.country';
        $erg =& $mdb2->query($sql);
        if (PEAR::isError($erg)) {
            die($erg->getMessage());
        }
        $cc_empf = '';
        while ($row = $erg->fetchRow()) {
            if ($cc_empf == '') {
                $cc_empf .= $row[1];
            } else {
                $cc_empf .= ', ' . $row[1];
            }
            $landid = $row[0];
        }
        $erg->free();
        $om_mime = new Mail_mime($crlf);
        $om_mime->setTXTBody($text);
        $om_mime->setHTMLBody($html);
        if (file_exists($pdffile)) {
            $om_mime->addAttachment($pdffile, 'application/pdf');
        }
        $om_message = $om_mime->get();
        $om_betreff = $values['firstname'] . ' ' . $values['lastname'] . ' hat sich angemeldet. No.: ' . $last_id;
        $om_headers = array('From' => $registrationsenderaddress, 'To' => $registrationhandleraddress, 'Cc' => $cc_empf, 'Subject' => $om_betreff);
        $om_hdrs = $om_mime->headers($om_headers);
        $om_mail_message =& Mail::factory('mail');
        $om_mail_message->send($registrationhandleraddress, $om_hdrs, $om_message);
        if (PEAR::isError($om_mail_message)) {
            die($om_mail_message->getMessage());
        }
        //#### here comes the resulting screen after the registration #
        //#############################################################
        ?>
     <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
        <html>
        <head>
          <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
          <title>
	 <?php 
        echo htmlentities(T_("Mission Net Online Registration"));
        ?>
	 </title>
        </head>
        <body>
        <table><tr>
         <td>
         <img src="images/MN_Logo_kleiner.png" alt="Mission-Net Logo">
         </td><td>
         <font size="-2">
	 <?php 
        echo htmlentities(T_("Germany")) . "<br>" . htmlentities(T_("8. April to 13. April 2009")) . "<br>Oldenburg</font>";
        ?>
         </td>
         </tr>
        </table>
	<h2>
	<?php 
        echo htmlentities(T_("Confirmation of registration for Mission-Net 2009"));
        echo '</h2>';
        $format = htmlentities(T_("Hello")) . " %1\$s";
        printf($format, $values["firstname"]);
        echo ", <br><br>\n";
        echo htmlentities(T_('we are so excited that you have just registered for Mission-net in Oldenburg, 2009. We are looking forward to meeting you and 6000 others from all over Europe.'));
        echo "\n<br><br>\n";
        echo htmlentities(T_('You are in for a great time with great worship, speakers, and of course the chance to meet like minded people from all over Europe.'));
        echo "\n<br><br>\n";
        echo htmlentities(T_("We have a National Coordinator in your country who this message has also been sent to. Nearer the time they will be in contact with you to give you more information on others from your country that will be attending this exciting event, as well as practical details of things like travel and what you need to bring."));
        echo "\n<br><br><br>\n";
        echo htmlentities(T_("In order for your registration to be processed please ensure that the congress fee is paid. If you are under 18 years old, you are also required to send in the PDF form sent with the confirmation e-mail, signed by your parents and you. On receipt of payment, we will send you another confirmation e-mail that the money has received which will also be sent to the National Coordinator in your country."));
        echo "\n<br><br>\n";
        echo htmlentities(T_("Please ensure that this happens so that we can process your registration as quickly as possible."));
        echo "\n<br><br>\n";
        echo htmlentities(T_("Thanks again for registering for Mission-Net and we trust that this event will be an exciting new step in your journey in the Christian faith."));
        echo "\n<br><br>\n";
        echo htmlentities(T_("Many Blessings"));
        echo "\n<br><br>\n";
        echo htmlentities(T_("Mission-Net Congress Management Team"));
        echo "\n<br><br>\n";
        echo "<b>" . htmlentities(T_("Payment Instructions")) . "</b><br>\n";
        echo htmlentities(T_("There are two ways of paying for Mission-Net 2009:")) . "<br>\n";
        echo "<ol><li>" . htmlentities(T_("Wire transfer of money to our bank account")) . "</li>\n";
        echo "<li>" . htmlentities(T_("Credit Card Payment")) . "</li></ol><br>\n";
        echo "<b>" . htmlentities(T_("Wire transfer:")) . "</b><br>\n";
        echo htmlentities(T_("Please transfer the sum of")) . " " . $preis . " " . T_("Euro") . "<br>\n";
        echo htmlentities(T_("to")) . "<br>" . T_("OM Europa / Mission-Net") . "<br>\n";
        echo htmlentities(T_("Account no:")) . " 5010802" . "<br>\n";
        global $iban;
        global $bank;
        global $swiftcode;
        echo $iban . "<br>\n";
        echo $swiftcode . "<br>\n";
        echo T_("Address of bank:") . " " . $bank . "<br>\n";
        if ($landid == 3) {
            echo htmlentities(T_("Participants from Switzerland might use the following Swiss account to avoid banking fees:")) . "<br>\n";
            echo htmlentities(T_("Account no:")) . " 91-479018-6" . "<br>\n";
            global $swiss_iban;
            global $swiss_bank;
            global $swiss_swiftcode;
            echo $swiss_iban . "<br>\n";
            echo $swiss_swiftcode . "<br>\n";
            echo T_("Address of bank:") . $swiss_bank . "<br>\n";
        }
        echo htmlentities(T_("and use this reference:")) . "<b> M09-" . $last_id . "</b><br>\n";
        echo "<br><b>" . htmlentities(T_("Credit Card Payment:")) . "</b><br>\n";
        echo htmlentities(T_("If you prefer to pay by credit or debit card, we have to add a supplement of 10 Euro for the transaction.")) . "<br>\n";
        $gsumme = $preis + 10;
        echo htmlentities(T_("Please transfer the sum of")) . " " . $preis . " Euro + " . T_("10 Euro") . " = " . money_format('%i', $gsumme) . " " . htmlentities(T_("Euro")) . "<br>\n";
        echo htmlentities(T_("by clicking this link:"));
        ?>
<form method="post" action="https://www.paypal.com/cgi-bin/webscr" target="neu">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="*****@*****.**">
<input type="hidden" name="item_name" value="Mission-Net event">
<input type="hidden" name="quantity" value="1">
<input type="hidden" name="bn"  value="ButtonFactory.PayPal.002">
<input type="hidden" name="currency_code" value="EUR">
<input type="hidden" name="on0" value="<?php 
        echo $values['lastname'] . ', ' . $values['firstname'];
        ?>
">
<input type="hidden" name="os0" value="">
<input type="hidden" name="on1" value="Reference No: <?php 
        echo 'M09-' . $last_id;
        ?>
 ">
<input type="hidden" name="os1" value="">
<br>
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_paynow_LG.gif">
</form>
<?php 
        //	echo "<a href='http://www.paypal.com?func=missionnet09'>http://www.paypal.com?func=missionnet09</a><br>";
        echo htmlentities(T_("Note:")) . " " . htmlentities(T_("Your registration is only valid as soon as we received your payment and if you are under 18 years the signed PDF form.")) . "<br>\n";
        echo htmlentities(T_("You have to pay within 2 weeks after completing your online registration (this is now), otherwise the system will delete your registration automatically")) . "<br>\n";
        echo htmlentities(T_("Please note that we will only process payments we receive until 30th March that are in our account.")) . "<br>\n";
        session_destroy();
    }
Пример #14
0
<?php

session_start();
create_pdf();
// function get_params(){ //This function initialises all variables passed from db_search file
// create_pdf();
// }
// function Header() {
// 	$this->Image('img/cloud.png');
// 	$this->SetFont('Arial','B',15);
// 	$this->Cell(80);
// 	$this->Cell(30,10,'Title',1,0,C);
// 	$this->Ln(20);
// }
// function Footer()
// {
//    // Position at 1.5 cm from bottom
//    $this->SetY(-15);
//    // Arial italic 8
//    $this->SetFont('Arial','I',8);
//    // Page number
//    $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');
// }
function create_pdf()
{
    define('FPDF_FONTPATH', 'font/');
    require 'fpdf.php';
    $unique_id = $_GET['unq'];
    $invoid = $_POST['invoid'];
    // post the form in page 2
    $invonm = $_POST['invonm'];
 public function updatePDFStudentStatus()
 {
     $data = $this->session->userdata('logged_in');
     $this->load->model('student');
     $student = $this->student->getRecords($data['user_college_code'], "");
     //for pdf
     $rows[] = "UNIVERSITY OF THE PHILIPPINES MANILA";
     $rows[] = "STUDENT EVALUATION OF TEACHERS";
     $rows[] = " ";
     $rows[] = " ";
     $rows[] = strtoupper($data['user_college_name']);
     $rows[] = "The following students still have classes to be evaluated:";
     $rows[] = " ";
     if ($student) {
         $i = 0;
         foreach ($student['student_id'] as $student_id) {
             if ($results = $this->student->getUnevaluatedClasses($student_id)) {
                 $rows[] = " ";
                 $rows[] = ucwords(strtolower($student['name'][$i]));
                 $unevalStudents[]['classes'] = "";
                 for ($j = 0; $j < count($results['subject']); $j++) {
                     $rows[] = $results['subject'][$j] . " (" . $results['section'][$j] . ") - " . $results['instructor'][$j];
                 }
             }
             $i++;
         }
     }
     $this->load->helper(array('dompdf', 'file'));
     $this->load->helper('file');
     $pdf_data = create_pdf($rows, '', false);
     write_file('./reports/students_with_unevaluated_classes_' . $data['user_college_code'] . '.pdf', $pdf_data);
     redirect('clerk/evaluationmanagement/studentstatus', 'refresh');
 }