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 | // ------------------------------------------------------------------------ // |
||
3 | // -- XoopsHP Module -- Xoops e-Learning System // |
||
4 | // Copyright (c) 2005 SUDOW-SOKEN // |
||
5 | // <http://www.mailpark.co.jp/> // |
||
6 | // ------------------------------------------------------------------------ // |
||
7 | // Based on XoopsHP1.01 by Yoshi, aka HowardGee. // |
||
8 | // ------------------------------------------------------------------------ // |
||
9 | // This program is free software; you can redistribute it and/or modify // |
||
10 | // it under the terms of the GNU General Public License as published by // |
||
11 | // the Free Software Foundation; either version 2 of the License, or // |
||
12 | // (at your option) any later version. // |
||
13 | // // |
||
14 | // You may not change or alter any portion of this comment or credits // |
||
15 | // of supporting developers from this source code or any supporting // |
||
16 | // source code which is considered copyrighted (c) material of the // |
||
17 | // original comment or credit authors. // |
||
18 | // // |
||
19 | // This program is distributed in the hope that it will be useful, // |
||
20 | // but WITHOUT ANY WARRANTY; without even the implied warranty of // |
||
21 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // |
||
22 | // GNU General Public License for more details. // |
||
23 | // // |
||
24 | // You should have received a copy of the GNU General Public License // |
||
25 | // along with this program; if not, write to the Free Software // |
||
26 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // |
||
27 | // ------------------------------------------------------------------------ // |
||
28 | define('_AM_SECCONF', 'Course/Quiz Configuration'); |
||
29 | define('_MD_THEFOLLOWING', 'The following are quizzes assigned in this course.'); |
||
30 | define('_MD_RETURN2INDEX', 'Top'); |
||
31 | define('_MD_RETURN2QUIZ', 'Quiz Index'); |
||
32 | define('_MD_RESULTLIST', 'Result List'); |
||
33 | define('_MD_RESULT_SIMPLE', 'Simple List'); |
||
34 | define('_MD_RESULT_DETAIL', 'Detailed List'); |
||
35 | define('_MD_NEXTPAGE', 'Next Page'); |
||
36 | define('_MD_PREVPAGE', 'Previous Page'); |
||
37 | define('_MD_CURACTIVESEC', 'Current Active Courses'); |
||
38 | define('_MD_CLICK2EDIT', 'Click to Edit'); |
||
39 | define('_MD_ADDARTICLE', 'Add Quiz'); |
||
40 | define('_MD_TITLEC', 'Title:'); |
||
41 | define('_MD_CONTENTC', 'Quiz File:'); |
||
42 | define('_MD_FILE_MAX', 'Max size (byte):'); |
||
43 | define('_MD_DOADDARTICLE', 'Add Quiz!'); |
||
44 | define('_MD_LAST20ART', 'List Quizzes by Course'); |
||
45 | define('_MD_EDIT', 'Edit'); |
||
46 | define('_MD_EDITARTICLE', 'Edit Quiz'); |
||
47 | define('_MD_EDITARTID', 'Edit Quiz ID:'); |
||
48 | define('_MD_FILE2REPLACE', 'File to replace the content:'); |
||
49 | define('_MD_GO', 'Go!'); |
||
50 | define('_MD_ADDNEWSEC', 'Add a New Course'); |
||
51 | // kazuo sudow |
||
0 ignored issues
–
show
|
|||
52 | // define("_MD_SECNAMEC","Course:"); |
||
53 | define('_MD_SECNAMEC', 'Course:(Sort)'); |
||
54 | define('_MD_MAXCHAR', '(40 characters Max.)'); |
||
55 | define('_MD_SECDESC', 'Description:'); |
||
56 | define('_MD_EXDESC', '(Brief course description.)'); |
||
57 | define('_MD_SECQNUM', 'Total:'); |
||
58 | define('_MD_SECDNUM', 'Done:'); |
||
59 | define('_MD_GOADDSECTION', 'Add Course!'); |
||
60 | define('_MD_SAVECHANGES', 'Save Changes'); |
||
61 | define('_MD_DELETE', 'Delete'); |
||
62 | define('_MD_READONLY', "<font color='red'>Read Only</font>"); |
||
63 | define('_MD_EDITTHISSEC', 'Edit Course: %s'); // %s is a section name |
||
64 | define('_MD_THISSECHAS', 'This Course has %s quizzes assigned'); |
||
65 | define('_MD_RUSUREDELSEC', 'Are you sure you want to delete course?'); |
||
66 | define('_MD_THISDELETESALL', 'This will delete ALL its quizzes!'); |
||
67 | define('_MD_YES', 'Yes'); |
||
68 | define('_MD_NO', 'No'); |
||
69 | define('_MD_ALL', 'All'); |
||
70 | define('_MD_DELETETHISART', 'Delete Quiz: %s'); // %s is a section name |
||
71 | define('_MD_RUSUREDELART', 'Are you sure you want to delete this quiz and all its scores?'); |
||
72 | define('_MD_RUSUREDELREC', 'Are you sure you want to delete this record?'); |
||
73 | define('_MD_DBUPDATED', 'Database Updated Successfully!'); |
||
74 | define('_MD_ERRORSECNAME', 'You must select a course name!'); |
||
75 | define('_MD_ERRORARTNAME', 'You must enter a quiz title!'); |
||
76 | define('_MD_ERRORARTCONT', 'The content of the quiz is empty!'); |
||
77 | define('_MD_DBNOTUPDATED', 'Error adding quiz to the database.<br/>Did you select a course? Please go back and correct the form.'); |
||
78 | define('_MD_ERRORQUIZFILE', 'Error adding quiz to the database.<br/>The quiz file seems to be mal-formatted. Try exporting the quiz with the CGI option checked.'); |
||
79 | define('_MD_ALERTGUEST', 'You are not logged in. Scores of guest users are not recorded nor sent by email.'); |
||
80 | |||
81 | define('_MD_LT_ID', 'ID'); |
||
82 | define('_MD_LT_TITLE', 'Title:(Sort)'); |
||
83 | // kazuo sudow append |
||
84 | define('_MD_LT_TITLE2', 'Title'); |
||
85 | define('_MD_LT_COURSE', 'Course'); |
||
86 | define('_MD_LT_OWNER', 'Owner'); |
||
87 | define('_MD_LT_POSTED', 'Posted'); |
||
88 | define('_MD_LT_ACTION', 'Action'); |
||
89 | define('_MD_LT_DISPLAY', 'Display'); |
||
90 | define('_MD_LT_DISPLAY_ON', 'Show'); |
||
91 | define('_MD_LT_DISPLAY_OFF', 'Hide'); |
||
92 | define('_MD_LT_HIDDEN', 'Hidden'); |
||
93 | define('_MD_LT_EXPIRE', 'Expiration'); |
||
94 | define('_MD_LT_EXPIRED', 'Expired'); |
||
95 | define('_MD_LT_SET_EXPIRE', 'Set expiration'); |
||
96 | define('_MD_LT_CURRENT_TIME', 'Current Time'); |
||
97 | define('_MD_LT_RESULTS', 'Results'); |
||
98 | define('_MD_LT_DETAILS', 'Details'); |
||
99 | define('_MD_LT_SCORE', 'Score(%)'); |
||
100 | define('_MD_LT_STUDENT', 'Student'); |
||
101 | // kazuo sudow append |
||
102 | define('_MD_LT_GUEST', 'Guest'); |
||
103 | define('_MD_LT_DATE', 'Date & Time'); |
||
104 | define('_MD_LT_MYMAX', 'My Max'); |
||
105 | define('_MD_LT_SITEMAX', 'Site Max'); |
||
106 | define('_MD_LT_SITEAVG', 'Site Avg'); |
||
107 | define('_MD_LT_LOW', 'Lowest'); |
||
108 | define('_MD_LT_AVRG', 'Average'); |
||
109 | define('_MD_LT_PORTFOLIO', 'Portfolio'); |
||
110 | |||
111 | define('_XD_FB_USERNAME', 'Real name'); |
||
112 | define('_XD_FB_ID', 'Name typed'); |
||
113 | define('_XD_FB_UNAME', 'Xoops ID'); |
||
114 | define('_XD_FB_QTITLE', 'Quiz title'); |
||
115 | define('_XD_FB_SCORE', 'Score'); |
||
116 | define('_XD_FB_START', 'Started'); |
||
117 | define('_XD_FB_END', 'Finished'); |
||
118 | define('_XD_FB_FINISHED_BY', 'Finished by'); |
||
119 | define('_XD_FB_TIMESTAMP', 'Time Stamp'); |
||
120 | define('_XD_FB_HOST', 'Host'); |
||
121 | define('_XD_FB_IP', 'IP Address'); |
||
122 | define('_XD_FB_CMT', 'Comment'); |
||
123 | define('_XD_FB_OK', 'Your result has been sent to you and your instructor by email.'); |
||
124 | define('_XD_FB_GUEST', "<font color='red'>Your result has not been recorded nor sent because you are a guest.</font>"); |
||
125 | define('_XD_FB_NG', "<font color='red'>Error: Your result has not been sent for some reason. Maybe try again?</font>"); |
||
126 | define('_XD_FB_CLSBTN', 'Close'); |
||
127 | |||
128 | define('_AM_MSG_ACCESS_ERROR', 'Permission error!'); |
||
129 | define('_AM_MSG_UPDATE_FAILED', 'Update Failed!'); |
||
130 | define('_AM_MSG_UPDATE_SUCCEEDED', 'Update has been successful.'); |
||
131 | |||
132 | //*****************************// |
||
133 | //* DO NOT EDIT BELOW *// |
||
134 | //*****************************// |
||
135 | // Name of credit site link |
||
136 | define('_MD_CREDITSITE', 'http://sourceforge.jp/projects/xoopshp/'); |
||
137 | |||
138 | //*****************************// |
||
139 | //* DO NOT EDIT BELOW *// |
||
140 | //*****************************// |
||
141 | define('_XD_FB_CODE4RESULTS_MARKER', 'CODE FOR HANDLING SENDING OF RESULTS'); |
||
142 | define('_XD_FB_CODE4RESULTS_INSERT', '//-->'); |
||
143 | define('_XD_FB_CODE4RESULTS', " |
||
144 | //CODE FOR HANDLING SENDING OF RESULTS |
||
145 | |||
146 | var UserName = ''; |
||
147 | var StartTime = (new Date()).toLocaleString(); |
||
148 | |||
149 | var ResultForm = '<html><body><form name=\"Results\" action=\"http://www.u-gakugei.ac.jp/~awaji/formmail.cgi\" method=\"post\" enctype=\"x-www-form-encoded\">'; |
||
150 | ResultForm += '<input type=\"hidden\" name=\"recipient\" value=\"[email protected]\"></input>'; |
||
151 | ResultForm += '<input type=\"hidden\" name=\"subject\" value=\"test without cgi\"></input>'; |
||
152 | ResultForm += '<input type=\"hidden\" name=\"Exercise\" value=\"test without cgi\"></input>'; |
||
153 | ResultForm += '<input type=\"hidden\" name=\"realname\" value=\"\"></input>'; |
||
154 | ResultForm += '<input type=\"hidden\" name=\"Score\" value=\"\"></input>'; |
||
155 | ResultForm += '<input type=\"hidden\" name=\"Start_Time\" value=\"\"></input>'; |
||
156 | ResultForm += '<input type=\"hidden\" name=\"End_Time\" value=\"\"></input>'; |
||
157 | ResultForm += '<input type=\"hidden\" name=\"title\" value=\"Thanks!\"></input>'; |
||
158 | ResultForm += '<input type=\"hidden\" name=\"bgcolor\" value=\"#ffffff\"></input>'; |
||
159 | ResultForm += '<input type=\"hidden\" name=\"text_color\" value=\"#000033\"></input>'; |
||
160 | ResultForm += '<input type=\"hidden\" name=\"sort\" value=\"order:realname,Exercise,Score,Start_Time,End_Time\"></input>'; |
||
161 | ResultForm += '</form></body></html>'; |
||
162 | |||
163 | function GetUserName(){ |
||
164 | UserName = prompt('Please enter your ID:',''); |
||
165 | UserName += ''; |
||
166 | if ((UserName.substring(0,4) == 'null')||(UserName.length < 1)){ |
||
167 | UserName = prompt('Please enter your ID:',''); |
||
168 | UserName += ''; |
||
169 | if ((UserName.substring(0,4) == 'null')||(UserName.length < 1)){ |
||
170 | history.back(); |
||
171 | } |
||
172 | } |
||
173 | } |
||
174 | |||
175 | function SendResults(Score){ |
||
176 | var today = new Date; |
||
177 | var NewName = '' + today.getTime(); |
||
178 | var NewWin = window.open('', NewName, 'toolbar=no,location=no,directories=no,status=no, menubar=no,scrollbars=yes,resizable=no,,width=400,height=300'); |
||
179 | |||
180 | //If user has prevented popups, no way to proceed -- exit |
||
181 | if (NewWin == null){ |
||
182 | return; |
||
183 | } |
||
184 | |||
185 | NewWin.document.clear(); |
||
186 | NewWin.document.open(); |
||
187 | NewWin.document.write(ResultForm); |
||
188 | NewWin.document.close(); |
||
189 | NewWin.document.Results.Score.value = Score + '%'; |
||
190 | NewWin.document.Results.realname.value = UserName; |
||
191 | NewWin.document.Results.End_Time.value = (new Date()).toLocaleString(); |
||
192 | NewWin.document.Results.Start_Time.value = StartTime; |
||
193 | NewWin.document.Results.submit(); |
||
194 | } |
||
195 | "); |
||
196 | // StrVars for insertion of GetUserName function |
||
197 | define('_XD_FB_CODE4STARTUP_INSERT', "function StartUp\(\)\{"); |
||
198 | define('_XD_FB_CODE4STARTUP', "\x09GetUserName();"); |
||
199 | |||
200 | // StrVars for incertion of Timeout function |
||
201 | define('_XD_FB_CODE4SEND_INSERT', |
||
202 | "\x09if \(\(All(Correct|Done) \=\= true\)\|\|\((Finished|TimeOver) \=\= true\)\)\{|\x09\x09TimeOver \= true;(\r\n|\r|\n)\x09\x09Locked \= true;(\r\n|\r|\n)\x09\x09(\r\n|\r|\n)"); |
||
203 | define('_XD_FB_CODE4SEND', "\x09\x09setTimeout('SendResults(' + Score + ')', 50);"); |
||
204 |
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.
The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.
This check looks for comments that seem to be mostly valid code and reports them.