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: japanese.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.'/japanese.php'; |
||
36 | |||
37 | // For end users |
||
38 | $valid_pfd_charset = 'SJIS'; |
||
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'=>5, |
||
50 | 'width'=>0, |
||
51 | 'height'=>0 |
||
52 | ); |
||
53 | |||
54 | $pdf_config['font']['slogan'] = array( |
||
55 | 'family'=>'SJIS-hw', |
||
56 | 'style'=>'bi', |
||
57 | 'size'=>8 |
||
58 | ); |
||
59 | |||
60 | $pdf_config['font']['title'] = array( |
||
61 | 'family'=>'SJIS-hw', |
||
62 | 'style'=>'biu', |
||
63 | 'size'=>12 |
||
64 | ); |
||
65 | |||
66 | $pdf_config['font']['subject'] = array( |
||
67 | 'family'=>'SJIS-hw', |
||
68 | 'style'=>'b', |
||
69 | 'size'=>11 |
||
70 | ); |
||
71 | |||
72 | $pdf_config['font']['author'] = array( |
||
73 | 'family'=>'SJIS-hw', |
||
74 | 'style'=>'', |
||
75 | 'size'=>10 |
||
76 | ); |
||
77 | |||
78 | $pdf_config['font']['subtitle'] = array( |
||
79 | 'family'=>'SJIS-hw', |
||
80 | 'style'=>'b', |
||
81 | 'size'=>11 |
||
82 | ); |
||
83 | |||
84 | $pdf_config['font']['subsubtitle'] = array( |
||
85 | 'family'=>'SJIS-hw', |
||
86 | 'style'=>'b', |
||
87 | 'size'=>10 |
||
88 | ); |
||
89 | |||
90 | $pdf_config['font']['content'] = array( |
||
91 | 'family'=>'SJIS-hw', |
||
92 | 'style'=>'', |
||
93 | 'size'=>10 |
||
94 | ); |
||
95 | |||
96 | $pdf_config['font']['footer'] = array( |
||
97 | 'family'=>'SJIS-hw', |
||
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', 'Forum'); |
||
113 | define('NEWS_PDF_TOPIC', 'Topic'); |
||
114 | define('NEWS_PDF_SUBJECT', '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 | View Code Duplication | class PDF_language extends PDF_Japanese |
|
0 ignored issues
–
show
This class seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
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->AddSJIShwFont(); |
||
0 ignored issues
–
show
The method
AddSJIShwFont() 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. ![]() |
|||
127 | } |
||
128 | |||
129 | function Error($msg) |
||
0 ignored issues
–
show
|
|||
130 | { |
||
131 | global $pdf_config; |
||
132 | if($pdf_config['action_on_error']){ |
||
133 | //Fatal error |
||
134 | die('<B>FPDF error: </B>'.$msg); |
||
135 | } |
||
136 | } |
||
137 | |||
138 | function encoding(&$text, $in_charset) |
||
0 ignored issues
–
show
|
|||
139 | { |
||
140 | $out_charset = $GLOBALS['valid_pfd_charset']; |
||
141 | if (empty($in_charset) || empty($out_charset) || !strcasecmp($out_charset, $in_charset)) return; |
||
142 | |||
143 | if(is_array($text) && count($text)>0){ |
||
144 | foreach($text as $key=>$val){ |
||
145 | $this->_encoding($text[$key], $in_charset, $out_charset); |
||
146 | } |
||
147 | }else{ |
||
148 | $this->_encoding($text, $in_charset, $out_charset); |
||
149 | } |
||
150 | } |
||
151 | |||
152 | function _encoding(&$text, $in_charset, $out_charset) |
||
0 ignored issues
–
show
|
|||
153 | { |
||
154 | $xconv_handler = @xoops_getmodulehandler('xconv', 'xconv', true); |
||
155 | if($xconv_handler && |
||
156 | $converted_text = @$xconv_handler->convert_encoding($text, $out_charset, $in_charset) |
||
157 | ){ |
||
158 | $text = $converted_text; |
||
159 | |||
160 | return; |
||
161 | } |
||
162 | if(XOOPS_USE_MULTIBYTES && function_exists('mb_convert_encoding')) $converted_text = @mb_convert_encoding($text, $out_charset, $in_charset); |
||
163 | else |
||
164 | if(function_exists('iconv')) $converted_text = @iconv($in_charset, $out_charset . '//TRANSLIT', $text); |
||
165 | $text = empty($converted_text)?$text:$converted_text; |
||
166 | } |
||
167 | } |
||
168 |
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.