PDF Footnotes -PDF

@return void
512987
public function footnotes()
    {
        foreach ($this->printedfootnotes as $element) {
            if (($this->GetY() + $element->getFootnoteHeight($this)) > $this->getPageHeight()) {
                $this->AddPage();
            }

            $element->renderFootnote($this);

            if ($this->GetY() > $this->getPageHeight()) {
                $this->AddPage();
            }
        }
    }
255587
public function output()
    {
        $orientation = $this->_Pdf->orientation() === 'landscape' ? 'L' : 'P';
        $format = $this->_Pdf->pageSize();
        if (is_string($format)
            && $orientation === 'L'
            && strpos($format, '-L') === false
        ) {
            $format .= '-' . $orientation;
        }

        $options = [
            'mode' => $this->_Pdf->encoding(),
            'format' => $format,
            'orientation' => $orientation,
            'tempDir' => TMP,
        ];
        $options = array_merge($options, (array)$this->getConfig('options'));

        $Mpdf = $this->_createInstance($options);
        $Mpdf->WriteHTML($this->_Pdf->html());

        return $Mpdf->Output('', Destination::STRING_RETURN);
    }
793196
function renderFootnoteStyleField( $args ) {
		unset( $args['label_for'], $args['class'] );
		$this->renderRadioButtons(
			[
				'id' => 'pdf_footnotes_style',
				'name' => 'pressbooks_theme_options_' . $this->getSlug(),
				'option' => 'pdf_footnotes_style',
				'value' => getset( $this->options, 'pdf_footnotes_style' ),
				'choices' => $args,
			]
		);
	}
6603
public function Footer()
    {
        $this->SetY(-15);
        $this->billetSetFont('footer');
        $this->Cell(88.5, 5, $this->PageNo() . " / $this->AliasNbPages");
        $this->Cell(88.5, 5, date('Y-m-d H:i:s O'), 0, 0, 'R');
    }
16301
static function convertWordFootnotes() {

		if ( ! current_user_can( 'edit_posts' ) || ! check_ajax_referer( 'pb-footnote-convert', false, false ) ) {
			static::ajaxFailure( __( 'Invalid permissions.', 'pressbooks' ) );
			return;
		}

		$html = urldecode( stripslashes( $_POST['content'] ) );

		/**
		 * Regular expression tip:
		 * (?: ), in contrast to ( ), is used to avoid capturing text.
		 *
		 * A $pattern must capture:
		 *  [0] => ... full capture ...
		 *  [1] => #_ftnref130
		 *  [2] => 130
		 *  [3] => ... the text we want to move ...
		 *
		 * Known MS Word variations:
		 *  href="#_ftn123" (-> #_ftnref123)
		 *  href="#_edn123" (-> #_ednref123)
		 *  href="/Users/foo/Documents/bar/9781426766497.doc#_ftn123" (-> .doc#_ftnref123)
		 *  href="/Users/foo/Documents/bar/9781426766497.docx#_edn123" (-> .docx#_ednref123)
		 *
		 * Known Libre Office variations:
		 *  href="#sdfootnote123sym" (-> #sdfootnote123anc)
		 */
		$patterns = [
			'~<a[\s]+[^>]*?href[\s]?=[\s"\']+(#_ftnref([0-9]+))["\']+.*?>(?:[^<]+|.*?)?</a>(.*?)</div>~si', // MS Word
			'~<a[\s]+[^>]*?href[\s]?=[\s"\']+.*?[\.doc|\.docx](#_ftnref([0-9]+))["\']+.*?>(?:[^<]+|.*?)?</a>(.*?)</div>~si', // MS Word
			'~<a[\s]+[^>]*?href[\s]?=[\s"\']+(#_ednref([0-9]+))["\']+.*?>(?:[^<]+|.*?)?</a>(.*?)</div>~si', // MS Word
			'~<a[\s]+[^>]*?href[\s]?=[\s"\']+.*?[\.doc|\.docx](#_ednref([0-9]+))["\']+.*?>(?:[^<]+|.*?)?</a>(.*?)</div>~si', // MS Word
			'~<a[\s]+[^>]*?href[\s]?=[\s"\']+(#sdfootnote([0-9]+)anc)["\']+.*?>(?:[^<]+|.*?)?</a>(.*?)</div>~si', // Libre Office
		];

		/**
		 * A $replacer must be in the same position as a corresponding $pattern above,
		 * use __REPLACE_ME__ to substitute for what we don't know yet.
		 */
		$replacers = [
			'~<a[\s]+[^>]*?href[\s]?=[\s"\']+(?:#_ftn__REPLACE_ME__)["\']+.*?>(?:[^<]+|.*?)?</a>~si', // MS Word
			'~<a[\s]+[^>]*?href[\s]?=[\s"\']+.*?[\.doc|\.docx](?:#_ftn__REPLACE_ME__)["\']+.*?>(?:[^<]+|.*?)?</a>~si', // MS Word
			'~<a[\s]+[^>]*?href[\s]?=[\s"\']+(?:#_edn__REPLACE_ME__)["\']+.*?>(?:[^<]+|.*?)?</a>~si', // MS Word
			'~<a[\s]+[^>]*?href[\s]?=[\s"\']+.*?[\.doc|\.docx](?:#_edn__REPLACE_ME__)["\']+.*?>(?:[^<]+|.*?)?</a>~si', // MS Word
			'~<a[\s]+[^>]*?href[\s]?=[\s"\']+(?:#sdfootnote__REPLACE_ME__sym)["\']+.*?>(?:[^<]+|.*?)?</a>~si', // Libre Office
		];

		$footnotes = [];
		$find = [];
		$replace = [];

		foreach ( $patterns as $i => $pattern ) {

			preg_match_all( $pattern, $html, $footnotes, PREG_SET_ORDER );

			foreach ( $footnotes as $footnote ) {

				$tmp = wp_kses(
					$footnote[3], [
						'b' => [],
						'em' => [],
						'i' => [],
						'strong' => [],
					]
				);
				$tmp = \Pressbooks\Sanitize\remove_control_characters( $tmp );
				$tmp = trim( preg_replace( '/\s+/', ' ', $tmp ) ); // Normalize white spaces

				$find[] = str_replace( '__REPLACE_ME__', preg_quote( $footnote[2] ), $replacers[ $i ] );
				$replace[] = '[footnote]' . $tmp . '[/footnote]';
			}

			// Remove originals when done
			$find[] = $pattern;
			$replace[] = '&hellip;</div>';
		}

		// Twerk it
		$html = preg_replace( $find, $replace, $html );

		// Important, complex regular expressions have been known to, literally, crash PHP.
		// When testing, make sure this function exits as expected.

		// Send back JSON
		header( 'Content-Type: application/json' );
		$json = wp_json_encode(
			[
				'content' => $html,
			]
		);
		echo $json;

		wp_die();
	}
122232
protected function footerSettings()
    {
        $this->setPrintFooter(
            Config::get('laravel-tcpdf::footer_on')
        );

        $this->setFooterFont(array(
            Config::get('laravel-tcpdf::footer_font'),
            '',
            Config::get('laravel-tcpdf::footer_font_size')
        ));

        $this->setFooterMargin(
            Config::get('laravel-tcpdf::footer_margin')
        );
    }
11397
function _storeFooter()
    {
        $record  = 0x0015;               // Record identifier

        $str      = $this->_footer;       // Footer string
        $cch      = strlen($str);         // Length of footer string
        if ($this->_BIFF_version == 0x0600) {
            $encoding = 0x0;                  // TODO: Unicode support
            $length   = 3 + $cch;             // Bytes to follow
        } else {
            $length  = 1 + $cch;
        }

        $header    = pack("vv", $record, $length);
        if ($this->_BIFF_version == 0x0600) {
            $data      = pack("vC",  $cch, $encoding);
        } else {
            $data      = pack("C",  $cch);
        }

        $this->_prepend($header . $data . $str);
    }
639628
def build_pdf
      @push_down = 0
      @push_items_table = 0
      @pdf.fill_color '000000'
      build_header
      build_provider_box
      build_purchaser_box
      build_payment_method_box
      build_info_box
      build_items
      build_total
      build_stamp
      build_logo
      build_note
      build_footer
    end
273187
public function render($renderer)
    {
        // checkFootnote
        $newelements      = [];
        $lastelement      = [];
        $footnote_element = [];
        // Element counter
        $cE = count($this->elements);
        //-- collapse duplicate elements
        for ($i = 0; $i < $cE; $i++) {
            $element = $this->elements[$i];
            if ($element instanceof ReportBaseElement) {
                if ($element instanceof ReportBaseText) {
                    if (!empty($footnote_element)) {
                        ksort($footnote_element);
                        foreach ($footnote_element as $links) {
                            $newelements[] = $links;
                        }
                        $footnote_element = [];
                    }
                    if (empty($lastelement)) {
                        $lastelement = $element;
                    } else {
                        // Checking if the Text has the same style
                        if ($element->getStyleName() == $lastelement->getStyleName()) {
                            $lastelement->addText(str_replace("\n", '<br>', $element->getValue()));
                        } elseif (!empty($lastelement)) {
                            $newelements[] = $lastelement;
                            $lastelement   = $element;
                        }
                    }
                } elseif ($element instanceof ReportBaseFootnote) {
                    // Check if the Footnote has been set with it’s link number
                    $renderer->checkFootnote($element);
                    // Save first the last element if any
                    if (!empty($lastelement)) {
                        $newelements[] = $lastelement;
                        $lastelement   = [];
                    }
                    // Save the Footnote with it’s link number as key for sorting later
                    $footnote_element[$element->num] = $element;
                } elseif (!($element instanceof ReportBaseFootnote) || trim($element->getValue()) != '') {
                    // Do not keep empty footnotes
                    if (!empty($footnote_element)) {
                        ksort($footnote_element);
                        foreach ($footnote_element as $links) {
                            $newelements[] = $links;
                        }
                        $footnote_element = [];
                    }
                    if (!empty($lastelement)) {
                        $newelements[] = $lastelement;
                        $lastelement   = [];
                    }
                    $newelements[] = $element;
                }
            } else {
                if (!empty($lastelement)) {
                    $newelements[] = $lastelement;
                    $lastelement   = [];
                }
                if (!empty($footnote_element)) {
                    ksort($footnote_element);
                    foreach ($footnote_element as $links) {
                        $newelements[] = $links;
                    }
                    $footnote_element = [];
                }
                $newelements[] = $element;
            }
        }
        if (!empty($lastelement)) {
            $newelements[] = $lastelement;
        }
        if (!empty($footnote_element)) {
            ksort($footnote_element);
            foreach ($footnote_element as $links) {
                $newelements[] = $links;
            }
        }
        $this->elements = $newelements;
        unset($footnote_element, $lastelement, $newelements);

        $cP = 0; // Class Padding

        // Used with line breaks and cell height calculation within this box only
        $renderer->largestFontHeight = 0;

        // If current position (left)
        if ($this->left === ReportBaseElement::CURRENT_POSITION) {
            $cX = $renderer->getX();
        } else {
            $cX = $this->left;
            $renderer->setX($cX);
        }
        // If current position (top)
        if ($this->top === ReportBaseElement::CURRENT_POSITION) {
            $this->top = $renderer->getY();
        } else {
            $renderer->setY($this->top);
        }

        // Check the width if set to page wide OR set by xml to larger then page width (margin)
        if ($this->width == 0 || $this->width > $renderer->getRemainingWidth()) {
            $this->width = $renderer->getRemainingWidth();
        }
        // Setup the CellPadding
        if ($this->padding) {
            $cP = $renderer->cPadding;
        }

        // For padding, we have to use less wrap width
        $cW = $this->width - ($cP * 2);

        //-- calculate the text box height
        // Number of lines, will be converted to height
        $cHT = 0;
        // Element height (exept text)
        $eH = 0;
        // Footnote height (in points)
        $fH = 0;
        $w  = 0;
        //-- $lw is an array
        // 0 => last line width
        // 1 => 1 if text was wrapped, 0 if text did not wrap
        // 2 => number of LF
        $lw = [];
        // Element counter
        $cE = count($this->elements);
        for ($i = 0; $i < $cE; $i++) {
            if (is_object($this->elements[$i])) {
                $ew = $this->elements[$i]->setWrapWidth($cW - $w - 2, $cW);
                if ($ew == $cW) {
                    $w = 0;
                }
                $lw = $this->elements[$i]->getWidth($renderer);
                // Text is already gets the # LF
                $cHT += $lw[2];
                if ($lw[1] == 1) {
                    $w = $lw[0];
                } elseif ($lw[1] == 2) {
                    $w = 0;
                } else {
                    $w += $lw[0];
                }
                if ($w > $cW) {
                    $w = $lw[0];
                }
                // For anything else but text (images), get the height
                $eH += $this->elements[$i]->getHeight($renderer);
            } else {
                $fH += abs($renderer->getFootnotesHeight($cW));
            }
        }

        // Add up what’s the final height
        $cH = $this->height;
        // If any element exist
        if ($cE > 0) {
            // Check if this is text or some other element, like images
            if ($eH == 0) {
                // Number of LF but at least one line
                $cHT = ($cHT + 1) * $renderer->cellHeightRatio;
                // Calculate the cell hight with the largest font size used
                $cHT *= $renderer->largestFontHeight;
                if ($cH < $cHT) {
                    $cH = $cHT;
                }
            } else {
                // This is any other element
                if ($cH < $eH) {
                    $cH = $eH;
                }
                // Add Footnote height to the rest of the height
                $cH += $fH;
            }
        }

        unset($lw, $cHT, $fH, $w);

        // Finaly, check the last cells height
        if ($cH < $renderer->lastCellHeight) {
            $cH = $renderer->lastCellHeight;
        }
        // Update max Y incase of a pagebreak
        // We don't want to over write any images or other stuff
        $renderer->addMaxY($this->top + $cH);

        // Start to print HTML
        echo '<div style="position:absolute;top:', $this->top, 'pt;';
        // LTR (left) or RTL (right)
        echo $renderer->alignRTL, ':', $cX, 'pt;';
        // Background color
        if ($this->fill) {
            if (!empty($this->bgcolor)) {
                echo ' background-color:', $this->bgcolor, ';';
            }
        }
        // Print padding only when it’s set
        if ($this->padding) {
            // Use Cell around padding to support RTL also
            echo 'padding:', $cP, 'pt;';
        }
        // Border setup
        if ($this->border) {
            echo ' border:solid black 1pt;';
            echo 'width:', ($this->width - 1 - ($cP * 2)), 'pt;height:', $cH - 1, 'pt;';
        } else {
            echo 'width:', ($this->width - ($cP * 2)), 'pt;height:', $cH, 'pt;';
        }
        echo '">';

        // Do a little "margin" trick before print
        // to get the correct current position => "."
        $cXT = $renderer->getX();
        $cYT = $renderer->getY();
        $renderer->setXy(0, 0);

        // Print the text elements
        foreach ($this->elements as $element) {
            if ($element instanceof ReportBaseElement) {
                $element->render($renderer, $cX, false);
            } elseif ($element === 'footnotetexts') {
                $renderer->footnotes();
            } elseif ($element === 'addpage') {
                $renderer->addPage();
            }
        }
        echo "</div>\n";

        // Reset "margins"
        $renderer->setXy($cXT, $cYT);
        // This will be mostly used to trick the multiple images last height
        if ($this->reseth) {
            $cH = 0;
        }
        // New line and some clean up
        if (!$this->newline) {
            $renderer->setXy($cX + $this->width, $this->top);
            $renderer->lastCellHeight = $cH;
        } else {
            $renderer->setXy(0, $this->top + $cH + ($cP * 2));
            $renderer->lastCellHeight = 0;
        }
    }
342777
public function output()
    {
        $defaults = [
            'fontCache' => TMP,
            'tempDir' => TMP,
        ];
        $options = (array)$this->getConfig('options') + $defaults;

        $DomPDF = $this->_createInstance($options);
        $DomPDF->setPaper($this->_Pdf->pageSize(), $this->_Pdf->orientation());
        $DomPDF = $this->_render($this->_Pdf, $DomPDF);

        return $this->_output($DomPDF);
    }
459375
function admin_footer()
	{
		// vars
		$version = apply_filters('acf/get_info', 'version');
		$dir = apply_filters('acf/get_info', 'dir');
		$path = apply_filters('acf/get_info', 'path');
		$show_tab = isset($_GET['info']);
		$tab = isset($_GET['info']) ? $_GET['info'] : 'changelog';
		
		?>
<script type="text/html" id="tmpl-acf-column-2">
<div class="acf-column-2">
	<div class="wp-box">
		<div class="inner">
			<h2><?php _e("Advanced Custom Fields",'acf'); ?> <?php echo $version; ?></h2>

			<h3><?php _e("Changelog",'acf'); ?></h3>
			<p><?php printf(__('See what\'s new in %1$sversion %2$s%3$s','acf'),'<a href="'.admin_url('edit.php?post_type=acf&info=changelog').'">',$version,'</a>'); ?></p>
			
			<h3><?php _e("Resources",'acf'); ?></h3>
			<ul>
				<li><a href="http://www.advancedcustomfields.com/resources/#getting-started" target="_blank"><?php _e("Getting Started",'acf'); ?></a></li>
				<li><a href="http://www.advancedcustomfields.com/resources/#field-types" target="_blank"><?php _e("Field Types",'acf'); ?></a></li>
				<li><a href="http://www.advancedcustomfields.com/resources/#functions" target="_blank"><?php _e("Functions",'acf'); ?></a></li>
				<li><a href="http://www.advancedcustomfields.com/resources/#actions" target="_blank"><?php _e("Actions",'acf'); ?></a></li>
				<li><a href="http://www.advancedcustomfields.com/resources/#filters" target="_blank"><?php _e("Filters",'acf'); ?></a></li>
				<li><a href="http://www.advancedcustomfields.com/resources/#how-to" target="_blank"><?php _e("'How to' guides",'acf'); ?></a></li>
				<li><a href="http://www.advancedcustomfields.com/resources/#tutorials" target="_blank"><?php _e("Tutorials",'acf'); ?></a></li>
			</ul>
		</div>
		<div class="footer footer-blue">
			<ul class="hl">
				<li><?php _e("Created by",'acf'); ?> Elliot Condon</li>
			</ul>
		</div>
	</div>
</div>
</script>
<script type="text/html" id="tmpl-acf-about">
<!-- acf-about -->
<div id="acf-about" class="acf-content">
	
	<!-- acf-content-title -->
	<div class="acf-content-title">
		<h1><?php _e("Welcome to Advanced Custom Fields",'acf'); ?> <?php echo $version; ?></h1>
		<h2><?php _e("Thank you for updating to the latest version!",'acf'); ?> <br /><?php printf(__('ACF %s is more polished and enjoyable than ever before. We hope you like it.','acf'),$version); ?></h2>
	</div>
	<!-- / acf-content-title -->
	
	<!-- acf-content-body -->
	<div class="acf-content-body">
		<h2 class="nav-tab-wrapper">
			<a class="acf-tab-toggle nav-tab <?php if( $tab == 'whats-new' ){ echo 'nav-tab-active'; } ?>" href="<?php echo admin_url('edit.php?post_type=acf&info=whats-new'); ?>"><?php _e("What’s New",'acf'); ?></a>
			<a class="acf-tab-toggle nav-tab <?php if( $tab == 'changelog' ){ echo 'nav-tab-active'; } ?>" href="<?php echo admin_url('edit.php?post_type=acf&info=changelog'); ?>"><?php _e("Changelog",'acf'); ?></a>
			<?php if( $tab == 'download-add-ons' ): ?>
			<a class="acf-tab-toggle nav-tab nav-tab-active" href="<?php echo admin_url('edit.php?post_type=acf&info=download-add-ons'); ?>"><?php _e("Download Add-ons",'acf'); ?></a>
			<?php endif; ?>
		</h2>

<?php if( $tab == 'whats-new' ): 
		
		$activation_codes = array(
			'repeater' => get_option('acf_repeater_ac', ''),
			'gallery' => get_option('acf_gallery_ac', ''),
			'options_page' => get_option('acf_options_page_ac', ''),
			'flexible_content' => get_option('acf_flexible_content_ac', '')
		);
		
		$active = array(
			'repeater' => class_exists('acf_field_repeater'),
			'gallery' => class_exists('acf_field_gallery'),
			'options_page' => class_exists('acf_options_page_plugin'),
			'flexible_content' => class_exists('acf_field_flexible_content')
		);
		
		$update_required = false;
		$update_complete = true;
		
		foreach( $activation_codes as $k => $v )
		{
			if( $v )
			{
				$update_required = true;
				
				if( !$active[ $k ] )
				{
					$update_complete = false;
				}
			}
		}
		
		
		?>

		<table id="acf-add-ons-table" class="alignright">
			<tr>
				<td><img src="<?php echo $dir; ?>images/add-ons/repeater-field-thumb.jpg" /></td>
				<td><img src="<?php echo $dir; ?>images/add-ons/gallery-field-thumb.jpg" /></td>
			</tr>
			<tr>
				<td><img src="<?php echo $dir; ?>images/add-ons/options-page-thumb.jpg" /></td>
				<td><img src="<?php echo $dir; ?>images/add-ons/flexible-content-field-thumb.jpg" /></td>
			</tr>
		</table>
		
		<div style="margin-right: 300px;">
	
			<h3><?php _e("Add-ons",'acf'); ?></h3>
			
			<h4><?php _e("Activation codes have grown into plugins!",'acf'); ?></h4>
			<p><?php _e("Add-ons are now activated by downloading and installing individual plugins. Although these plugins will not be hosted on the wordpress.org repository, each Add-on will continue to receive updates in the usual way.",'acf'); ?></p>
			
			
			<?php if( $update_required ): ?>
				<?php if( $update_complete ): ?>
				<div class="acf-alert acf-alert-success">
					<p><?php _e("All previous Add-ons have been successfully installed",'acf'); ?></p>
				</div>
				<?php else: ?>
				<div class="acf-alert acf-alert-success">
					<p><?php _e("This website uses premium Add-ons which need to be downloaded",'acf'); ?> <a href="<?php echo admin_url('edit.php?post_type=acf&info=download-add-ons'); ?>" class="acf-button" style="display: inline-block;"><?php _e("Download your activated Add-ons",'acf'); ?></a></p>
				</div>
				<?php endif; ?>
			<?php else: ?>
			<div class="acf-alert acf-alert-success">
				<p><?php _e("This website does not use premium Add-ons and will not be affected by this change.",'acf'); ?></p>
			</div>
			<?php endif; ?>
			
		</div>
		
		<div class="clear"></div>
		
		<hr />
		
		<h3><?php _e("Easier Development",'acf'); ?></h3>
		
		<h4><?php _e("New Field Types",'acf'); ?></h4>
		<ul>
			<li><?php _e("Taxonomy Field",'acf'); ?></li>
			<li><?php _e("User Field",'acf'); ?></li>
			<li><?php _e("Email Field",'acf'); ?></li>
			<li><?php _e("Password Field",'acf'); ?></li>
		</ul>
		<h4><?php _e("Custom Field Types",'acf'); ?></h4>
		<p><?php _e("Creating your own field type has never been easier! Unfortunately, version 3 field types are not compatible with version 4.",'acf'); ?><br />
		<?php printf(__('Migrating your field types is easy, please %sfollow this tutorial%s to learn more.','acf'),'<a href="http://www.advancedcustomfields.com/docs/tutorials/creating-a-new-field-type/" target="_blank">','</a>'); ?></p>
		
		<h4><?php _e("Actions &amp; Filters",'acf'); ?></h4>
		<p><?php printf(__('All actions & filters have received a major facelift to make customizing ACF even easier! Please %sread this guide%s to find the updated naming convention.','acf'),'<a href="http://www.advancedcustomfields.com/resources/getting-started/migrating-from-v3-to-v4/" target="_blank">','</a>'); ?></p>
		
		<h4><?php _e("Preview draft is now working!",'acf'); ?></h4>
		<p><?php _e("This bug has been squashed along with many other little critters!",'acf'); ?> <a class="acf-tab-toggle" href="<?php echo admin_url('edit.php?post_type=acf&info=changelog'); ?>" data-tab="2"><?php _e("See the full changelog",'acf'); ?></a></p>
		
		<hr />
		
		<h3><?php _e("Important",'acf'); ?></h3>
		
		<h4><?php _e("Database Changes",'acf'); ?></h4>
		<p><?php _e("Absolutely <strong>no</strong> changes have been made to the database between versions 3 and 4. This means you can roll back to version 3 without any issues.",'acf'); ?></p>
		
		<h4><?php _e("Potential Issues",'acf'); ?></h4>
		<p><?php printf(__('Due to the sizable changes surounding Add-ons, field types and action/filters, your website may not operate correctly. It is important that you read the full %sMigrating from v3 to v4%s guide to view the full list of changes.','acf'),'<a href="http://www.advancedcustomfields.com/resources/getting-started/migrating-from-v3-to-v4/" target="_blank">','</a>'); ?></p>
		
		<div class="acf-alert acf-alert-error">
			<p><strong><?php _e("Really Important!",'acf'); ?></strong> <?php printf(__('If you updated the ACF plugin without prior knowledge of such changes, please roll back to the latest %sversion 3%s of this plugin.','acf'),'<a href="http://wordpress.org/extend/plugins/advanced-custom-fields/developers/">','</a>'); ?></p>
		</div>
		
		<hr />
		
		<h3><?php _e("Thank You",'acf'); ?></h3>
		<p><?php _e("A <strong>BIG</strong> thank you to everyone who has helped test the version 4 beta and for all the support I have received.",'acf'); ?></p>
		<p><?php _e("Without you all, this release would not have been possible!",'acf'); ?></p>

<?php elseif( $tab == 'changelog' ): ?>
		
		<h3><?php _e("Changelog for",'acf'); ?> <?php echo $version; ?></h3>
		<?php
		
		$items = file_get_contents( $path . 'readme.txt' );
		$items = explode('= ' . $version . ' =', $items);
		
		$items = end( $items );
		$items = current( explode("\n\n", $items) );
		$items = array_filter( array_map('trim', explode("*", $items)) );
		
		?>
		<ul class="acf-changelog">
		<?php foreach( $items as $item ): 
			
			$item = explode('http', $item);
				
		?>
			<li><?php echo $item[0]; ?><?php if( isset($item[1]) ): ?><a href="http<?php echo $item[1]; ?>" target="_blank"><?php _e("Learn more",'acf'); ?></a><?php endif; ?></li>
		<?php endforeach; ?>
		</ul>

<?php elseif( $tab == 'download-add-ons' ): ?>
		
		<h3><?php _e("Overview",'acf'); ?></h3>
		
		<p><?php _e("Previously, all Add-ons were unlocked via an activation code (purchased from the ACF Add-ons store). New to v4, all Add-ons act as separate plugins which need to be individually downloaded, installed and updated.",'acf'); ?></p>
		
		<p><?php _e("This page will assist you in downloading and installing each available Add-on.",'acf'); ?></p>
		
		<h3><?php _e("Available Add-ons",'acf'); ?></h3>
		
		<p><?php _e("The following Add-ons have been detected as activated on this website.",'acf'); ?></p>
		
		<?php 
		
		$ac_repeater = get_option('acf_repeater_ac', '');
		$ac_options_page = get_option('acf_options_page_ac', '');
		$ac_flexible_content = get_option('acf_flexible_content_ac', '');
		$ac_gallery = get_option('acf_gallery_ac', '');
		
		?>
		<table class="widefat" id="acf-download-add-ons-table">
			<thead>
			<tr>
				<th colspan="2"><?php _e("Name",'acf'); ?></th>
				<th><?php _e("Activation Code",'acf'); ?></th>
				<th><?php _e("Download",'acf'); ?></th>
			</tr>
			</thead>
			<tbody>
			<?php if( $ac_repeater ): ?>
			<tr>
				<td class="td-image"><img src="<?php echo $dir; ?>images/add-ons/repeater-field-thumb.jpg" style="width:50px" /></td>
				<th class="td-name"><?php _e("Repeater Field",'acf'); ?></th>
				<td class="td-code">XXXX-XXXX-XXXX-<?php echo substr($ac_repeater,-4); ?></td>
				<td class="td-download"><a class="button" href="http://download.advancedcustomfields.com/<?php echo $ac_repeater; ?>/trunk"><?php _e("Download",'acf'); ?></a></td>
			</tr>
			<?php endif; ?>
			<?php if( $ac_gallery ): ?>
			<tr>
				<td><img src="<?php echo $dir; ?>images/add-ons/gallery-field-thumb.jpg" /></td>
				<th><?php _e("Gallery Field",'acf'); ?></th>
				<td>XXXX-XXXX-XXXX-<?php echo substr($ac_gallery,-4); ?></td>
				<td><a class="button" href="http://download.advancedcustomfields.com/<?php echo $ac_gallery; ?>/trunk"><?php _e("Download",'acf'); ?></a></td>
			</tr>	
			<?php endif; ?>
			<?php if( $ac_options_page ): ?>
			<tr>
				<td><img src="<?php echo $dir; ?>images/add-ons/options-page-thumb.jpg" /></td>
				<th><?php _e("Options Page",'acf'); ?></th>
				<td>XXXX-XXXX-XXXX-<?php echo substr($ac_options_page,-4); ?></td>
				<td><a class="button" href="http://download.advancedcustomfields.com/<?php echo $ac_options_page; ?>/trunk"><?php _e("Download",'acf'); ?></a></td>
			</tr>
			<?php endif; ?>
			<?php if($ac_flexible_content): ?>
			<tr>
				<td><img src="<?php echo $dir; ?>images/add-ons/flexible-content-field-thumb.jpg" /></td>
				<th><?php _e("Flexible Content",'acf'); ?></th>
				<td>XXXX-XXXX-XXXX-<?php echo substr($ac_flexible_content,-4); ?></td>
				<td><a class="button" href="http://download.advancedcustomfields.com/<?php echo $ac_flexible_content; ?>/trunk"><?php _e("Download",'acf'); ?></a></td>
			</tr>
			<?php endif; ?>
			</tbody>
		</table>
		
		
		
		<h3><?php _e("Installation",'acf'); ?></h3>
		
		<p><?php _e("For each Add-on available, please perform the following:",'acf'); ?></p>
		<ol>
			<li><?php _e("Download the Add-on plugin (.zip file) to your desktop",'acf'); ?></li>
			<li><?php printf(__('Navigate to %sPlugins > Add New > Upload%s','acf'),'<a target="_blank" href="'.admin_url('plugin-install.php?tab=upload').'">','</a>'); ?></li>
			<li><?php _e("Use the uploader to browse, select and install your Add-on (.zip file)",'acf'); ?></li>
			<li><?php _e("Once the plugin has been uploaded and installed, click the 'Activate Plugin' link",'acf'); ?></li>
			<li><?php _e("The Add-on is now installed and activated!",'acf'); ?></li>
		</ol>
		
		
<?php endif; ?>

		
	</div>
	<!-- / acf-content-body -->
	
	
	<!-- acf-content-footer -->
	<div class="acf-content-footer">
		<ul class="hl clearfix">
			<li><a class="acf-button acf-button-big" href="<?php echo admin_url('edit.php?post_type=acf'); ?>"><?php _e("Awesome. Let's get to work",'acf'); ?></a></li>
		</ul>
	</div>
	<!-- / acf-content-footer -->
	
	
	
</div>
<!-- / acf-about -->
</script>
<script type="text/javascript">
(function($){
	
	// wrap
	$('#wpbody .wrap').attr('id', 'acf-field-group-wrap');
	
	
	// wrap column main
	$('#acf-field-group-wrap').wrapInner('<div class="acf-columns-2" />');
	
	
	// add column main
	$('#posts-filter').addClass('acf-column-1');
	
	
	// add column side
	$('#posts-filter').after( $('#tmpl-acf-column-2').html() );
	
	
	<?php if( $show_tab ): ?>
	// add about copy
	$('#wpbody-content').prepend( $('#tmpl-acf-about').html() );
	$('#acf-field-group-wrap').hide();
	$('#screen-meta-links').hide();
	<?php endif; ?>
	
})(jQuery);
</script>
		<?php
	}
206019
public function footer()
    {
        foreach ($this->footerElements as $element) {
            if ($element instanceof ReportBaseElement) {
                $element->render($this);
            } elseif ($element === 'footnotetexts') {
                $this->footnotes();
            } elseif ($element === 'addpage') {
                $this->newPage();
            }
        }
    }
476133
public function checkForDetailPageEnd() // PDF

    {
        //if ( $this->inOverflow )
        //return;

        if (!$this->page_detail_started) {
            return;
        }

        $this->draw_mode = "CALCULATE";
        $this->newReportPageLineByStyle("RMB1", $this->mid_page_reportbody_styles, false);
        $this->newReportPageLineByStyle("HMP1", $this->bottom_page_page_styles, true);
        $this->draw_mode = "DRAW";
        $this->newReportPageLineByStyle("RMB1", $this->mid_page_reportbody_styles, false);
        $this->newReportPageLineByStyle("HMP1", $this->bottom_page_page_styles, true);
        $this->page_detail_started = false;
    }
1235088
private function runPageHeader()
    {
        foreach ($this->pageHeaderElements as $element) {
            if ($element instanceof ReportBaseElement) {
                $element->render($this);
            } elseif ($element === 'footnotetexts') {
                $this->footnotes();
            } elseif ($element === 'addpage') {
                $this->addPage();
            }
        }
    }
685360
def add_page_footer
      @pdf.repeat :all do
        @pdf.bounding_box([0, @pdf.bounds.bottom], width: 540, height: @format[:footer_size]) do
          @pdf.move_down 50
          @pdf.stroke_color '999999'
          @pdf.stroke_horizontal_rule
          @pdf.move_down 10
          @pdf.font_size(8) do
            @pdf.text "<color rgb='999999'>This invoice has been generated by Maestrano Pty Ltd on behalf of the #{MnoEnterprise.app_name} platform (the \"Service\").</color>", inline_format: true
            @pdf.text "<color rgb='999999'>All charges in this invoice are in #{@data[:invoice_currency_name]} (#{@data[:invoice_currency]}). Credit card payments will be processed by Maestrano Pty Ltd.</color>", inline_format: true
            @pdf.text " ", inline_format: true
            @pdf.text "<color rgb='999999'>Maestrano Pty Ltd | Suite 504, 46 Market Street, Sydney, NSW 2000, Australia | ABN: 80 152 564 424</color>", inline_format: true
          end
        end
      end
    end
1027587
public function footer($FOOT_TEXT = 'Home', $FOOT_LINK = '/')
    {
        $size = memory_get_usage(true);
        $unit = ['b', 'kb', 'mb', 'gb', 'tb', 'pb'];
        $MEMORYUSED = @round($size / pow(1024, ($i = floor(log($size, 1024)))), 2).' '.$unit[$i];
        $this->set('MEMORYUSED', $MEMORYUSED);
        $this->set('LOADTIME', number_format($this->timer_diff(), 5));
        $this->set('FOOT_TEXT', $FOOT_TEXT);
        $this->set('FOOT_LINK', $FOOT_LINK);
        global $QUERYCOUNT;
        global $DB;
        $this->set('QUERYCOUNT', $QUERYCOUNT + intval(count($DB->QUERIES)));
        $this->set('RECORDCOUNT', intval($DB->RECORDCOUNT));
        if (isset($_SESSION['DEBUG']) && $_SESSION['DEBUG'] > 5) {
            $this->set('FOOTERDEBUG', \Metaclassing\Utility::dumper($DB));
        }

        return $this->parse(INCLUDEDIR.'/footer.template.html');
    }
200599
public function header()
    {
        foreach ($this->headerElements as $element) {
            if ($element instanceof ReportBaseElement) {
                $element->render($this);
            } elseif ($element === 'footnotetexts') {
                $this->footnotes();
            } elseif ($element === 'addpage') {
                $this->newPage();
            }
        }

        foreach ($this->pageHeaderElements as $element) {
            if ($element instanceof ReportBaseElement) {
                $element->render($this);
            } elseif ($element === 'footnotetexts') {
                $this->footnotes();
            } elseif ($element === 'addpage') {
                $this->newPage();
            }
        }
    }