XoopsModules25x /
mylinks
This project does not seem to handle request data directly as such no vulnerable execution paths were found.
include, or for example
via PHP's auto-loading mechanism.
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
| 1 | <?php |
||
| 2 | // $Id: schinese.php 8112 2011-11-06 13:41:14Z beckmi $ |
||
| 3 | // ------------------------------------------------------------------------ // |
||
| 4 | // XOOPS - PHP Content Management System // |
||
| 5 | // Copyright (c) 2000 XOOPS.org // |
||
| 6 | // <http://www.xoops.org/> // |
||
| 7 | // ------------------------------------------------------------------------ // |
||
| 8 | // This program is free software; you can redistribute it and/or modify // |
||
| 9 | // it under the terms of the GNU General Public License as published by // |
||
| 10 | // the Free Software Foundation; either version 2 of the License, or // |
||
| 11 | // (at your option) any later version. // |
||
| 12 | // // |
||
| 13 | // You may not change or alter any portion of this comment or credits // |
||
| 14 | // of supporting developers from this source code or any supporting // |
||
| 15 | // source code which is considered copyrighted (c) material of the // |
||
| 16 | // original comment or credit authors. // |
||
| 17 | // // |
||
| 18 | // This program is distributed in the hope that it will be useful, // |
||
| 19 | // but WITHOUT ANY WARRANTY; without even the implied warranty of // |
||
| 20 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // |
||
| 21 | // GNU General Public License for more details. // |
||
| 22 | // // |
||
| 23 | // You should have received a copy of the GNU General Public License // |
||
| 24 | // along with this program; if not, write to the Free Software // |
||
| 25 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // |
||
| 26 | // ------------------------------------------------------------------------ // |
||
| 27 | // Author: Kazumi Ono (AKA onokazu) // |
||
| 28 | // URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ // |
||
| 29 | // Project: The XOOPS Project // |
||
| 30 | // ------------------------------------------------------------------------- // |
||
| 31 | if (!defined('XOOPS_ROOT_PATH')) { |
||
| 32 | die('XOOPS root path not defined'); |
||
| 33 | } |
||
| 34 | |||
| 35 | require NEWS_FPDF_PATH.'/chinese.php'; |
||
| 36 | |||
| 37 | // For end users |
||
| 38 | $valid_pfd_charset = 'GB2312'; |
||
| 39 | |||
| 40 | $pdf_config['margin'] = array( |
||
| 41 | 'left'=>25, |
||
| 42 | 'top'=>25, |
||
| 43 | 'right'=>25 |
||
| 44 | ); |
||
| 45 | |||
| 46 | $pdf_config['logo'] = array( |
||
| 47 | 'path'=>'images/news_slogo.png', |
||
| 48 | 'left'=>150, |
||
| 49 | 'top'=>10, |
||
| 50 | 'width'=>0, |
||
| 51 | 'height'=>0 |
||
| 52 | ); |
||
| 53 | |||
| 54 | $pdf_config['font']['slogan'] = array( |
||
| 55 | 'family'=>'simhei', |
||
| 56 | 'style'=>'', |
||
| 57 | 'size'=>20 |
||
| 58 | ); |
||
| 59 | |||
| 60 | $pdf_config['font']['title'] = array( |
||
| 61 | 'family'=>'simhei', |
||
| 62 | 'style'=>'bu', |
||
| 63 | 'size'=>12 |
||
| 64 | ); |
||
| 65 | |||
| 66 | $pdf_config['font']['subject'] = array( |
||
| 67 | 'family'=>'simhei', |
||
| 68 | 'style'=>'b', |
||
| 69 | 'size'=>11 |
||
| 70 | ); |
||
| 71 | |||
| 72 | $pdf_config['font']['author'] = array( |
||
| 73 | 'family'=>'simsun', |
||
| 74 | 'style'=>'', |
||
| 75 | 'size'=>10 |
||
| 76 | ); |
||
| 77 | |||
| 78 | $pdf_config['font']['subtitle'] = array( |
||
| 79 | 'family'=>'simhei', |
||
| 80 | 'style'=>'b', |
||
| 81 | 'size'=>11 |
||
| 82 | ); |
||
| 83 | |||
| 84 | $pdf_config['font']['subsubtitle'] = array( |
||
| 85 | 'family'=>'simhei', |
||
| 86 | 'style'=>'b', |
||
| 87 | 'size'=>10 |
||
| 88 | ); |
||
| 89 | |||
| 90 | $pdf_config['font']['content'] = array( |
||
| 91 | 'family'=>'simsun', |
||
| 92 | 'style'=>'', |
||
| 93 | 'size'=>10 |
||
| 94 | ); |
||
| 95 | |||
| 96 | $pdf_config['font']['footer'] = array( |
||
| 97 | 'family'=>'simsun', |
||
| 98 | 'style'=>'', |
||
| 99 | 'size'=>8 |
||
| 100 | ); |
||
| 101 | |||
| 102 | $pdf_config['action_on_error'] = 0; // 0 - continue; 1 - die |
||
| 103 | $pdf_config['creator'] = 'NEWS BASED ON FPDF v1.53'; |
||
| 104 | $pdf_config['url'] = XOOPS_URL; |
||
| 105 | $pdf_config['mail'] = 'mailto:'.$xoopsConfig['adminmail']; |
||
| 106 | $pdf_config['slogan']=xoops_substr($myts->htmlspecialchars( $xoopsConfig['sitename'] ),0,30); |
||
| 107 | $pdf_config['scale'] = '0.8'; |
||
| 108 | $pdf_config['dateformat'] = _DATESTRING; |
||
| 109 | $pdf_config['footerpage'] = _MD_PDF_PAGE; |
||
| 110 | |||
| 111 | // For local support sites |
||
| 112 | define('NEWS_PDF_FORUM', '��̳'); |
||
| 113 | define('NEWS_PDF_TOPIC', '����'); |
||
| 114 | define('NEWS_PDF_SUBJECT', '����'); |
||
| 115 | define('NEWS_PDF_AUTHOR', _POSTEDBY); |
||
| 116 | define('NEWS_PDF_DATE', _MD_POSTEDON); |
||
| 117 | |||
| 118 | // For more details, refer to: http://fpdf.org |
||
| 119 | class PDF_language extends PDF_Chinese |
||
|
0 ignored issues
–
show
|
|||
| 120 | { |
||
| 121 | function PDF_language($orientation='P',$unit='mm',$format='A4') |
||
|
0 ignored issues
–
show
|
|||
| 122 | { |
||
| 123 | //Call parent constructor |
||
| 124 | $this->FPDF($orientation,$unit,$format); |
||
| 125 | //Initialization |
||
| 126 | $this->AddGBhwFont('simsun','����'); |
||
|
0 ignored issues
–
show
The method
AddGBhwFont() does not seem to exist on object<PDF_language>.
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. Loading history...
|
|||
| 127 | $this->AddGBhwFont('simhei','����'); |
||
|
0 ignored issues
–
show
The method
AddGBhwFont() does not seem to exist on object<PDF_language>.
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. Loading history...
|
|||
| 128 | $this->AddGBhwFont('simkai','����_GB2312'); |
||
|
0 ignored issues
–
show
The method
AddGBhwFont() does not seem to exist on object<PDF_language>.
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. Loading history...
|
|||
| 129 | $this->AddGBhwFont('sinfang','����_GB2312'); |
||
|
0 ignored issues
–
show
The method
AddGBhwFont() does not seem to exist on object<PDF_language>.
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. Loading history...
|
|||
| 130 | } |
||
| 131 | |||
| 132 | function Error($msg) |
||
|
0 ignored issues
–
show
|
|||
| 133 | { |
||
| 134 | global $pdf_config; |
||
| 135 | if($pdf_config['action_on_error']){ |
||
| 136 | //Fatal error |
||
| 137 | die('<B>FPDF ����: </B>'.$msg); |
||
| 138 | } |
||
| 139 | } |
||
| 140 | |||
| 141 | function encoding(&$text, $in_charset) |
||
|
0 ignored issues
–
show
|
|||
| 142 | { |
||
| 143 | $out_charset = $GLOBALS['valid_pfd_charset']; |
||
| 144 | if (empty($in_charset) || empty($out_charset) || !strcasecmp($out_charset, $in_charset)) return; |
||
| 145 | |||
| 146 | if(is_array($text) && count($text)>0){ |
||
| 147 | foreach($text as $key=>$val){ |
||
| 148 | $this->_encoding($text[$key], $in_charset, $out_charset); |
||
| 149 | } |
||
| 150 | }else{ |
||
| 151 | $this->_encoding($text, $in_charset, $out_charset); |
||
| 152 | } |
||
| 153 | } |
||
| 154 | |||
| 155 | function _encoding(&$text, $in_charset, $out_charset) |
||
|
0 ignored issues
–
show
|
|||
| 156 | { |
||
| 157 | if(function_exists('xoopschina_convert_encoding')) { |
||
| 158 | $text = xoopschina_convert_encoding($text, $in_charset, $out_charset); |
||
| 159 | |||
| 160 | return; |
||
| 161 | } |
||
| 162 | |||
| 163 | $xconv_handler = @xoops_getmodulehandler('xconv', 'xconv', true); |
||
| 164 | if($xconv_handler && |
||
| 165 | $converted_text = @$xconv_handler->convert_encoding($text, $out_charset, $in_charset) |
||
| 166 | ){ |
||
| 167 | $text = $converted_text; |
||
| 168 | |||
| 169 | return; |
||
| 170 | } |
||
| 171 | if(XOOPS_USE_MULTIBYTES && function_exists('mb_convert_encoding')) $converted_text = @mb_convert_encoding($text, $out_charset, $in_charset); |
||
| 172 | else |
||
| 173 | if(function_exists('iconv')) $converted_text = @iconv($in_charset, $out_charset . '//TRANSLIT', $text); |
||
| 174 | $text = empty($converted_text)?$text:$converted_text; |
||
| 175 | } |
||
| 176 | } |
||
| 177 |
This check looks for classes that have been defined more than once.
If you can, we would recommend to use standard object-oriented programming techniques. For example, to avoid multiple types, it might make sense to create a common interface, and then multiple, different implementations for that interface.
This also has the side-effect of providing you with better IDE auto-completion, static analysis and also better OPCode caching from PHP.