Version Description
Upgrade to fix some minor bug fixes.
Download this release
Release Info
Developer | fpcorso |
Plugin | Quiz And Survey Master (Formerly Quiz Master Next) |
Version | 0.5.2 |
Comparing to | |
See all releases |
Code changes from version 0.5.1 to 0.5.2
- includes/mlw_main_page (1).php +0 -314
- includes/mlw_main_page.php +39 -22
- includes/mlw_quiz.php +13 -10
- includes/mlw_quiz_install.php +1 -1
- mlw_quizmaster2.php +2 -2
- readme.txt +7 -1
includes/mlw_main_page (1).php
DELETED
@@ -1,314 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
Generates the support for Quiz Master Next
|
4 |
-
*/
|
5 |
-
/*
|
6 |
-
Copyright 2013, My Local Webstop (email : fpcorso@mylocalwebstop.com)
|
7 |
-
*/
|
8 |
-
|
9 |
-
|
10 |
-
function mlw_generate_main_page()
|
11 |
-
{
|
12 |
-
$mlw_quiz_version = get_option('mlw_quiz_master_version');
|
13 |
-
add_meta_box("wpss_mrts", 'Quiz Master Next', "quiz_wpss_mrt_meta_box", "quiz_wpss");
|
14 |
-
add_meta_box("wpss_mrts", 'In This Update', "quiz_wpss_mrt_meta_box2", "quiz_wpss2");
|
15 |
-
add_meta_box("wpss_mrts", 'Support', "quiz_wpss_mrt_meta_box3", "quiz_wpss3");
|
16 |
-
add_meta_box("wpss_mrts", 'Contribution', "quiz_wpss_mrt_meta_box4", "quiz_wpss4");
|
17 |
-
add_meta_box("wpss_mrts", 'News From My Local Webstop', "quiz_wpss_mrt_meta_box5", "quiz_wpss5");
|
18 |
-
add_meta_box("wpss_mrts", 'Brainstorm Idea', "quiz_wpss_mrt_meta_box6", "quiz_wpss6");
|
19 |
-
?>
|
20 |
-
<!-- css -->
|
21 |
-
<link type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/themes/redmond/jquery-ui.css" rel="stylesheet" />
|
22 |
-
<!-- jquery scripts -->
|
23 |
-
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.0/jquery.min.js"></script>
|
24 |
-
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
|
25 |
-
<script type="text/javascript">
|
26 |
-
var $j = jQuery.noConflict();
|
27 |
-
// increase the default animation speed to exaggerate the effect
|
28 |
-
$j.fx.speeds._default = 1000;
|
29 |
-
$j(function() {
|
30 |
-
$j('#dialog').dialog({
|
31 |
-
autoOpen: false,
|
32 |
-
show: 'blind',
|
33 |
-
hide: 'explode',
|
34 |
-
buttons: {
|
35 |
-
Ok: function() {
|
36 |
-
$j(this).dialog('close');
|
37 |
-
}
|
38 |
-
}
|
39 |
-
});
|
40 |
-
|
41 |
-
$j('#opener').click(function() {
|
42 |
-
$j('#dialog').dialog('open');
|
43 |
-
return false;
|
44 |
-
} );
|
45 |
-
});
|
46 |
-
</script>
|
47 |
-
<style type="text/css">
|
48 |
-
div.quiz_email_support {
|
49 |
-
text-align: left;
|
50 |
-
}
|
51 |
-
div.quiz_email_support input[type='text'] {
|
52 |
-
border-color:#000000;
|
53 |
-
color:#3300CC;
|
54 |
-
cursor:hand;
|
55 |
-
}
|
56 |
-
textarea{
|
57 |
-
border-color:#000000;
|
58 |
-
color:#3300CC;
|
59 |
-
cursor:hand;
|
60 |
-
}
|
61 |
-
div.donation {
|
62 |
-
border-width: 1px;
|
63 |
-
border-style: solid;
|
64 |
-
padding: 0 0.6em;
|
65 |
-
margin: 5px 0 15px;
|
66 |
-
-moz-border-radius: 3px;
|
67 |
-
-khtml-border-radius: 3px;
|
68 |
-
-webkit-border-radius: 3px;
|
69 |
-
border-radius: 3px;
|
70 |
-
background-color: #ffffe0;
|
71 |
-
border-color: #e6db55;
|
72 |
-
text-align: center;
|
73 |
-
}
|
74 |
-
donation.p { margin: 0.5em 0;
|
75 |
-
line-height: 1;
|
76 |
-
padding: 2px;
|
77 |
-
}
|
78 |
-
p em {
|
79 |
-
padding-left: 1em;
|
80 |
-
color: #555;
|
81 |
-
font-weight: bold;
|
82 |
-
}
|
83 |
-
</style>
|
84 |
-
<div class="wrap">
|
85 |
-
<h2>Quiz Master Next Support <a id="opener" href="">(?)</a></h2>
|
86 |
-
|
87 |
-
<h3>Version <?php echo $mlw_quiz_version; ?></h3>
|
88 |
-
<p>Thank you for trying out my new plugin. I hope you find it beneficial to your website. Please consider rating this plugin <a href="http://wordpress.org/support/view/plugin-reviews/quiz-master-next">here</a>.</p>
|
89 |
-
|
90 |
-
<div style="float:left; width:60%;" class="inner-sidebar1">
|
91 |
-
<?php do_meta_boxes('quiz_wpss3','advanced',''); ?>
|
92 |
-
</div>
|
93 |
-
|
94 |
-
<div style="float:right; width:36%; " class="inner-sidebar1">
|
95 |
-
<?php do_meta_boxes('quiz_wpss2','advanced',''); ?>
|
96 |
-
</div>
|
97 |
-
|
98 |
-
<div style="float:right; width:36%; " class="inner-sidebar1">
|
99 |
-
<?php do_meta_boxes('quiz_wpss5','advanced',''); ?>
|
100 |
-
</div>
|
101 |
-
|
102 |
-
<!--<div style="clear:both"></div>-->
|
103 |
-
|
104 |
-
<div style="float:left; width:60%; " class="inner-sidebar1">
|
105 |
-
<?php do_meta_boxes('quiz_wpss4','advanced',''); ?>
|
106 |
-
</div>
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
<div id="dialog" title="Help">
|
111 |
-
<h3><b>Help</b></h3>
|
112 |
-
<p>This page is the main admin page for the Quiz Master Next.</p>
|
113 |
-
<p>The first widget lists all the statistics collected so far.</p>
|
114 |
-
<p>The second widget lists all the new features added in this update.</p>
|
115 |
-
<p>The third widget contains a contact form for emailing the developer.</p>
|
116 |
-
<p>The fourth widget shows news from My Local Webstop regarding our plugins</p>
|
117 |
-
<p>The last widget is our donation widget.</p>
|
118 |
-
</div>
|
119 |
-
|
120 |
-
</div>
|
121 |
-
<?php
|
122 |
-
}
|
123 |
-
|
124 |
-
function quiz_wpss_mrt_meta_box()
|
125 |
-
{
|
126 |
-
global $wpdb;
|
127 |
-
$sql = "SELECT SUM(quiz_views) AS QuizViews FROM " . $wpdb->prefix . "mlw_quizzes";
|
128 |
-
$mlw_quiz_views = $wpdb->get_results($sql);
|
129 |
-
|
130 |
-
foreach($mlw_quiz_views as $mlw_eaches) {
|
131 |
-
$mlw_quiz_views = $mlw_eaches->QuizViews;
|
132 |
-
break;
|
133 |
-
}
|
134 |
-
|
135 |
-
$sql = "SELECT SUM(quiz_taken) AS QuizTaken FROM " . $wpdb->prefix . "mlw_quizzes";
|
136 |
-
$mlw_quiz_taken = $wpdb->get_results($sql);
|
137 |
-
|
138 |
-
foreach($mlw_quiz_taken as $mlw_eaches) {
|
139 |
-
$mlw_quiz_taken = $mlw_eaches->QuizTaken;
|
140 |
-
break;
|
141 |
-
}
|
142 |
-
?>
|
143 |
-
<div>
|
144 |
-
<table width='100%'>
|
145 |
-
<tr>
|
146 |
-
<td align='left'>Total Times All Quizzes Have Been Viewed</td>
|
147 |
-
<td align='right'><?php echo $mlw_quiz_views; ?></td>
|
148 |
-
</tr>
|
149 |
-
<tr>
|
150 |
-
<td align='left'>Total Times All Quizzes Have Been Taken</td>
|
151 |
-
<td align='right'><?php echo $mlw_quiz_taken; ?></td>
|
152 |
-
</tr>
|
153 |
-
</table>
|
154 |
-
</div>
|
155 |
-
<?php
|
156 |
-
}
|
157 |
-
|
158 |
-
function quiz_wpss_mrt_meta_box2()
|
159 |
-
{
|
160 |
-
?>
|
161 |
-
<div>
|
162 |
-
<table width='100%'>
|
163 |
-
<tr>
|
164 |
-
<td align='left'>0.5 (September 18, 2013)</td>
|
165 |
-
</tr>
|
166 |
-
<tr>
|
167 |
-
<td align='left'>* Created New Tools Page And Moved Audit Trail To It</td>
|
168 |
-
</tr>
|
169 |
-
<tr>
|
170 |
-
<td align='left'>* Added Ability For Comment Section At End Of Quiz</td>
|
171 |
-
</tr>
|
172 |
-
<tr>
|
173 |
-
<td align='left'>* Added Ability To Have Hints</td>
|
174 |
-
</tr>
|
175 |
-
<tr>
|
176 |
-
<td align='left'>* Added Option To Have Comment Boxes On Questions</td>
|
177 |
-
</tr>
|
178 |
-
<tr>
|
179 |
-
<td align='left'>* Added More Statistics To Main Page</td>
|
180 |
-
</tr>
|
181 |
-
</table>
|
182 |
-
</div>
|
183 |
-
<?php
|
184 |
-
}
|
185 |
-
|
186 |
-
function quiz_wpss_mrt_meta_box3()
|
187 |
-
{
|
188 |
-
/*
|
189 |
-
Copyright 2013, My Local Webstop
|
190 |
-
Please do not re-use this email script without contacting me.
|
191 |
-
*/
|
192 |
-
$quiz_master_email_success = $_POST["action"];
|
193 |
-
$user_name = $_POST["username"];
|
194 |
-
$user_email = $_POST["email"];
|
195 |
-
$user_message = $_POST["message"];
|
196 |
-
$quiz_master_email_message = "";
|
197 |
-
if ($quiz_master_email_success == 'update' and $user_email != "" and $user_message != "")
|
198 |
-
{
|
199 |
-
wp_mail('fpcorso@mylocalwebstop.com' ,'Support From Quiz Master Next Plugin','Message from ' . $user_name . ' at ' . $user_email . " It says: " . "\n" . $user_message . "\n" . "Version ".$mlw_quiz_version);
|
200 |
-
$quiz_master_email_message = "<h3>Message Sent</h3>";
|
201 |
-
}
|
202 |
-
else if ($quiz_master_email_success == 'update' and $user_email == "")
|
203 |
-
{
|
204 |
-
$quiz_master_email_message = "<h3>Please Enter Email</h3>";
|
205 |
-
}
|
206 |
-
else if ($quiz_master_email_success == 'update' and $user_message == "")
|
207 |
-
{
|
208 |
-
$quiz_master_email_message = "<h3>Please Enter In Your Message</h3>";
|
209 |
-
}
|
210 |
-
?>
|
211 |
-
<div class='quiz_email_support'>
|
212 |
-
<form action="<?php echo $PHP_SELF; ?>" method='post'>
|
213 |
-
<input type='hidden' name='action' value='update' />
|
214 |
-
<table width='100%'>
|
215 |
-
<tr>
|
216 |
-
<td>If there is something you would like to suggest to add or even if you just want
|
217 |
-
to let me know if you like the plugin or not, feel free to use the email form below.</td>
|
218 |
-
</tr>
|
219 |
-
<tr>
|
220 |
-
<td><?php echo $quiz_master_email_message; ?></td>
|
221 |
-
</tr>
|
222 |
-
<tr>
|
223 |
-
<td align='left'><p>Name: <input type='text' name='username'/></p></td>
|
224 |
-
</tr>
|
225 |
-
<tr>
|
226 |
-
<td align='left'><p>Email: <input type='text' name='email'/></p></td>
|
227 |
-
</tr>
|
228 |
-
<tr>
|
229 |
-
<td align='left'><p>Message: </p></td>
|
230 |
-
</tr>
|
231 |
-
<tr>
|
232 |
-
<td align='left'><p><TEXTAREA NAME="message" COLS=40 ROWS=6></TEXTAREA></p></td>
|
233 |
-
</tr>
|
234 |
-
<tr>
|
235 |
-
<td align='left'><input type='submit' value='Send Email' /></td>
|
236 |
-
</tr>
|
237 |
-
<tr>
|
238 |
-
<td align='left'></td>
|
239 |
-
</tr>
|
240 |
-
</table>
|
241 |
-
</form>
|
242 |
-
</div>
|
243 |
-
<?php
|
244 |
-
}
|
245 |
-
|
246 |
-
function quiz_wpss_mrt_meta_box4()
|
247 |
-
{
|
248 |
-
?>
|
249 |
-
<div>
|
250 |
-
<table width='100%'>
|
251 |
-
<tr>
|
252 |
-
<td align='left'>
|
253 |
-
I have spent a lot of time in development for this plugin. If you like it, please help by donating today.
|
254 |
-
</td>
|
255 |
-
</tr>
|
256 |
-
<tr>
|
257 |
-
<td> </td>
|
258 |
-
</tr>
|
259 |
-
<tr>
|
260 |
-
<td></td>
|
261 |
-
</tr>
|
262 |
-
<tr>
|
263 |
-
<td> </td>
|
264 |
-
</tr>
|
265 |
-
<tr>
|
266 |
-
<td>
|
267 |
-
<div class="donation">
|
268 |
-
<p>
|
269 |
-
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
|
270 |
-
<input type="hidden" name="cmd" value="_donations">
|
271 |
-
<input type="hidden" name="business" value="fpcorso@gmail.com">
|
272 |
-
<input type="hidden" name="lc" value="US">
|
273 |
-
<input type="hidden" name="no_note" value="0">
|
274 |
-
<input type="hidden" name="currency_code" value="USD">
|
275 |
-
<input type="hidden" name="bn" value="PP-DonationsBF:btn_donateCC_LG.gif:NonHostedGuest">
|
276 |
-
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
|
277 |
-
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
|
278 |
-
</form>
|
279 |
-
|
280 |
-
</p>
|
281 |
-
</div>
|
282 |
-
</td>
|
283 |
-
</tr>
|
284 |
-
</table>
|
285 |
-
</div>
|
286 |
-
<?php
|
287 |
-
}
|
288 |
-
function quiz_wpss_mrt_meta_box5()
|
289 |
-
{
|
290 |
-
?>
|
291 |
-
<div>
|
292 |
-
<table width='100%'>
|
293 |
-
<tr>
|
294 |
-
<td align='left'><?php include("http://www.mylocalwebstop.com/mlw_news.html"); ?></td>
|
295 |
-
</tr>
|
296 |
-
</table>
|
297 |
-
</div>
|
298 |
-
<?php
|
299 |
-
}
|
300 |
-
function quiz_wpss_mrt_meta_box6()
|
301 |
-
{
|
302 |
-
?>
|
303 |
-
<div>
|
304 |
-
<table width='100%'>
|
305 |
-
<tr>
|
306 |
-
<td align='left'>
|
307 |
-
Box Six
|
308 |
-
</td>
|
309 |
-
</tr>
|
310 |
-
</table>
|
311 |
-
</div>
|
312 |
-
<?php
|
313 |
-
}
|
314 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/mlw_main_page.php
CHANGED
@@ -9,6 +9,31 @@ Copyright 2013, My Local Webstop (email : fpcorso@mylocalwebstop.com)
|
|
9 |
|
10 |
function mlw_generate_main_page()
|
11 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
$mlw_quiz_version = get_option('mlw_quiz_master_version');
|
13 |
add_meta_box("wpss_mrts", 'Quiz Master Next', "quiz_wpss_mrt_meta_box", "quiz_wpss");
|
14 |
add_meta_box("wpss_mrts", 'In This Update', "quiz_wpss_mrt_meta_box2", "quiz_wpss2");
|
@@ -161,10 +186,7 @@ function quiz_wpss_mrt_meta_box2()
|
|
161 |
<div>
|
162 |
<table width='100%'>
|
163 |
<tr>
|
164 |
-
<td align='left'>0.5.
|
165 |
-
</tr>
|
166 |
-
<tr>
|
167 |
-
<td align='left'>* Added More Statistics To Quiz Dashboard</td>
|
168 |
</tr>
|
169 |
<tr>
|
170 |
<td align='left'>* Bug Fixes</td>
|
@@ -180,27 +202,22 @@ function quiz_wpss_mrt_meta_box3()
|
|
180 |
Copyright 2013, My Local Webstop
|
181 |
Please do not re-use this email script without contacting me.
|
182 |
*/
|
183 |
-
$quiz_master_email_success = $_POST["action"];
|
184 |
-
$user_name = $_POST["username"];
|
185 |
-
$user_email = $_POST["email"];
|
186 |
-
$user_message = $_POST["message"];
|
187 |
$quiz_master_email_message = "";
|
188 |
-
if
|
189 |
-
{
|
190 |
-
wp_mail('fpcorso@mylocalwebstop.com' ,'Support From Quiz Master Next Plugin','Message from ' . $user_name . ' at ' . $user_email . " It says: " . "\n" . $user_message . "\n" . "Version ".$mlw_quiz_version);
|
191 |
-
$quiz_master_email_message = "<h3>Message Sent</h3>";
|
192 |
-
}
|
193 |
-
else if ($quiz_master_email_success == 'update' and $user_email == "")
|
194 |
{
|
195 |
-
$
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
$
|
|
|
|
|
|
|
|
|
200 |
}
|
201 |
?>
|
202 |
<div class='quiz_email_support'>
|
203 |
-
<form action="<?php echo $PHP_SELF;
|
204 |
<input type='hidden' name='action' value='update' />
|
205 |
<table width='100%'>
|
206 |
<tr>
|
@@ -211,10 +228,10 @@ function quiz_wpss_mrt_meta_box3()
|
|
211 |
<td><?php echo $quiz_master_email_message; ?></td>
|
212 |
</tr>
|
213 |
<tr>
|
214 |
-
<td align='left'><p>Name: <input type='text' name='username'/></p></td>
|
215 |
</tr>
|
216 |
<tr>
|
217 |
-
<td align='left'><p>Email: <input type='text' name='email'/></p></td>
|
218 |
</tr>
|
219 |
<tr>
|
220 |
<td align='left'><p>Message: </p></td>
|
9 |
|
10 |
function mlw_generate_main_page()
|
11 |
{
|
12 |
+
echo "
|
13 |
+
<script>
|
14 |
+
function mlw_validateForm()
|
15 |
+
{
|
16 |
+
var x=document.forms['emailForm']['email'].value;
|
17 |
+
if (x==null || x=='')
|
18 |
+
{
|
19 |
+
alert('Email must be filled out');
|
20 |
+
return false;
|
21 |
+
};
|
22 |
+
var x=document.forms['emailForm']['username'].value;
|
23 |
+
if (x==null || x=='')
|
24 |
+
{
|
25 |
+
alert('Name must be filled out');
|
26 |
+
return false;
|
27 |
+
};
|
28 |
+
var x=document.forms['emailForm']['message'].value;
|
29 |
+
if (x==null || x=='')
|
30 |
+
{
|
31 |
+
alert('There must be a message to send!');
|
32 |
+
return false;
|
33 |
+
};
|
34 |
+
}
|
35 |
+
</script>
|
36 |
+
";
|
37 |
$mlw_quiz_version = get_option('mlw_quiz_master_version');
|
38 |
add_meta_box("wpss_mrts", 'Quiz Master Next', "quiz_wpss_mrt_meta_box", "quiz_wpss");
|
39 |
add_meta_box("wpss_mrts", 'In This Update', "quiz_wpss_mrt_meta_box2", "quiz_wpss2");
|
186 |
<div>
|
187 |
<table width='100%'>
|
188 |
<tr>
|
189 |
+
<td align='left'>0.5.2 (September 29, 2013)</td>
|
|
|
|
|
|
|
190 |
</tr>
|
191 |
<tr>
|
192 |
<td align='left'>* Bug Fixes</td>
|
202 |
Copyright 2013, My Local Webstop
|
203 |
Please do not re-use this email script without contacting me.
|
204 |
*/
|
|
|
|
|
|
|
|
|
205 |
$quiz_master_email_message = "";
|
206 |
+
if(isset($_POST["action"]))
|
|
|
|
|
|
|
|
|
|
|
207 |
{
|
208 |
+
$quiz_master_email_success = $_POST["action"];
|
209 |
+
$user_name = $_POST["username"];
|
210 |
+
$user_email = $_POST["email"];
|
211 |
+
$user_message = $_POST["message"];
|
212 |
+
if ($quiz_master_email_success == 'update' and $user_email != "" and $user_message != "")
|
213 |
+
{
|
214 |
+
wp_mail('fpcorso@mylocalwebstop.com' ,'Support From Quiz Master Next Plugin','Message from ' . $user_name . ' at ' . $user_email . " It says: " . "\n" . $user_message . "\n" . "Version ".$mlw_quiz_version);
|
215 |
+
$quiz_master_email_message = "<h3>Message Sent</h3>";
|
216 |
+
}
|
217 |
}
|
218 |
?>
|
219 |
<div class='quiz_email_support'>
|
220 |
+
<form action="<?php echo $_SERVER['PHP_SELF']; ?>?page=mlw_quiz_support" method='post' name='emailForm' onsubmit='return mlw_validateForm()'>
|
221 |
<input type='hidden' name='action' value='update' />
|
222 |
<table width='100%'>
|
223 |
<tr>
|
228 |
<td><?php echo $quiz_master_email_message; ?></td>
|
229 |
</tr>
|
230 |
<tr>
|
231 |
+
<td align='left'><p>Name: <input type='text' name='username' value='' /></p></td>
|
232 |
</tr>
|
233 |
<tr>
|
234 |
+
<td align='left'><p>Email: <input type='text' name='email' value='' /></p></td>
|
235 |
</tr>
|
236 |
<tr>
|
237 |
<td align='left'><p>Message: </p></td>
|
includes/mlw_quiz.php
CHANGED
@@ -68,7 +68,7 @@ function mlw_quiz_shortcode($atts)
|
|
68 |
if (field.defaultValue == field.value) field.value = '';
|
69 |
}
|
70 |
|
71 |
-
function
|
72 |
{
|
73 |
";
|
74 |
if ($mlw_quiz_options->user_name == 1)
|
@@ -112,14 +112,17 @@ function mlw_quiz_shortcode($atts)
|
|
112 |
}";
|
113 |
}
|
114 |
$mlw_display .= "
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
|
|
|
|
|
|
123 |
}
|
124 |
</script>";
|
125 |
|
@@ -129,7 +132,7 @@ function mlw_quiz_shortcode($atts)
|
|
129 |
$mlw_message_before = str_replace( "%QUIZ_NAME%" , $mlw_quiz_options->quiz_name, $mlw_message_before);
|
130 |
$mlw_display .= "<p>".$mlw_message_before."</p>";
|
131 |
$mlw_display .= "<br />";
|
132 |
-
$mlw_display .= "<form name='quizForm' action='" . $PHP_SELF . "' method='post' onsubmit='return
|
133 |
$mlw_display .= "<table>";
|
134 |
$mlw_display .= "<thead>";
|
135 |
|
68 |
if (field.defaultValue == field.value) field.value = '';
|
69 |
}
|
70 |
|
71 |
+
function mlw_validateForm()
|
72 |
{
|
73 |
";
|
74 |
if ($mlw_quiz_options->user_name == 1)
|
112 |
}";
|
113 |
}
|
114 |
$mlw_display .= "
|
115 |
+
if (document.forms['quizForm']['mlwUserEmail'].defaultValue != document.forms['quizForm']['mlwUserEmail'].value)
|
116 |
+
{
|
117 |
+
var x=document.forms['quizForm']['mlwUserEmail'].value;
|
118 |
+
var atpos=x.indexOf('@');
|
119 |
+
var dotpos=x.lastIndexOf('.');
|
120 |
+
if (atpos<1 || dotpos<atpos+2 || dotpos+2>=x.length)
|
121 |
+
{
|
122 |
+
alert('Not a valid e-mail address');
|
123 |
+
return false;
|
124 |
+
}
|
125 |
+
}
|
126 |
}
|
127 |
</script>";
|
128 |
|
132 |
$mlw_message_before = str_replace( "%QUIZ_NAME%" , $mlw_quiz_options->quiz_name, $mlw_message_before);
|
133 |
$mlw_display .= "<p>".$mlw_message_before."</p>";
|
134 |
$mlw_display .= "<br />";
|
135 |
+
$mlw_display .= "<form name='quizForm' action='" . $PHP_SELF . "' method='post' onsubmit='return mlw_validateForm()' >";
|
136 |
$mlw_display .= "<table>";
|
137 |
$mlw_display .= "<thead>";
|
138 |
|
includes/mlw_quiz_install.php
CHANGED
@@ -252,7 +252,7 @@ function mlw_quiz_activate()
|
|
252 |
require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
|
253 |
dbDelta($sql);
|
254 |
}
|
255 |
-
$data = "0.5.
|
256 |
if ( ! get_option('mlw_quiz_master_version'))
|
257 |
{
|
258 |
add_option('mlw_quiz_master_version' , $data);
|
252 |
require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
|
253 |
dbDelta($sql);
|
254 |
}
|
255 |
+
$data = "0.5.2";
|
256 |
if ( ! get_option('mlw_quiz_master_version'))
|
257 |
{
|
258 |
add_option('mlw_quiz_master_version' , $data);
|
mlw_quizmaster2.php
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
|
3 |
/*
|
4 |
Plugin Name: Quiz Master Next
|
5 |
-
Description:
|
6 |
-
Version: 0.5.
|
7 |
Author: Frank Corso
|
8 |
Author URI: http://www.mylocalwebstop.com/
|
9 |
Plugin URI: http://www.mylocalwebstop.com/
|
2 |
|
3 |
/*
|
4 |
Plugin Name: Quiz Master Next
|
5 |
+
Description: Use this plugin to add multiple quizzes, tests, or surveys to your website.
|
6 |
+
Version: 0.5.2
|
7 |
Author: Frank Corso
|
8 |
Author URI: http://www.mylocalwebstop.com/
|
9 |
Plugin URI: http://www.mylocalwebstop.com/
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: fpcorso
|
|
3 |
Tags: quiz, test, score, survey
|
4 |
Requires at least: 3.0.1
|
5 |
Tested up to: 3.6.1
|
6 |
-
Stable tag: 0.5.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -50,6 +50,9 @@ Feel free to use the support option on the main page of the plugin.
|
|
50 |
|
51 |
== Changelog ==
|
52 |
|
|
|
|
|
|
|
53 |
= 0.5.1 (September 22, 2013) =
|
54 |
* Added More Statistics To Quiz Dashboard
|
55 |
* Bug Fixes
|
@@ -91,6 +94,9 @@ Feel free to use the support option on the main page of the plugin.
|
|
91 |
|
92 |
== Upgrade Notice ==
|
93 |
|
|
|
|
|
|
|
94 |
= 0.5.1 =
|
95 |
Upgrade to fix some minor bug fixes.
|
96 |
|
3 |
Tags: quiz, test, score, survey
|
4 |
Requires at least: 3.0.1
|
5 |
Tested up to: 3.6.1
|
6 |
+
Stable tag: 0.5.2
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
50 |
|
51 |
== Changelog ==
|
52 |
|
53 |
+
= 0.5.2 (September 29, 2013) =
|
54 |
+
* Bug Fixes
|
55 |
+
|
56 |
= 0.5.1 (September 22, 2013) =
|
57 |
* Added More Statistics To Quiz Dashboard
|
58 |
* Bug Fixes
|
94 |
|
95 |
== Upgrade Notice ==
|
96 |
|
97 |
+
= 0.5.2 =
|
98 |
+
Upgrade to fix some minor bug fixes.
|
99 |
+
|
100 |
= 0.5.1 =
|
101 |
Upgrade to fix some minor bug fixes.
|
102 |
|