how to go to the next line?

All web design discussion, including Ultimate Quiz MOD support.

Moderator: CricketMX Forum Moderators

roopeshpdit
Frequent Poster
Frequent Poster
Posts: 25
Joined: Tue Jul 10, 2007 8:46 pm

When i paste my question in the box .... it takes only the first paragraph...... i want to be like to see the content with a paragraph..... please let me know what shoudl i do?

when i paste like this:

Code: Select all

At the Commission, as in most large organisations, information and communication technologies are now an integral part of working life. Far from being confined to clerical and accounting areas, these technologies now affect all aspects of our professional life, and are an indispensable tool for the infrastructure of all organisations.
Information and communications technologies have provided us with unprecedented scope for improving and simplifying the internal administration of the Commission. The potential benefits include better service for 
it comes like this

Code: Select all

At the Commission, as in most large organisations, information and communication technologies are now an integral part of working life. Far from being confined to clerical and accounting areas, these technologies now affect all aspects of our professional life, and are an indispensable tool for the infrastructure of all organisations.


I cannnot pst the whole thing
User avatar
battye
Site Admin
Site Admin
Posts: 14391
Joined: Sun Jan 11, 2004 8:26 am
Location: Australia
Contact:

I'll have a think about this. It should require just one or two edits, so I will get back to you about this soon :)

What I'm thinking of doing is adding an str_replace where the string [newline] is replaced with <br />

This will allow you to post over multiple lines.
CricketMX.com in 2022: Still the home of bat's, rat's and other farmyard animals!

"OK, life [as you chose to define it] repeats until there are no more lessons to be learned." - nrnoble (June 12, 2005)
"the new forum looks awesome, it's getting bigger & better" - p2p-sharing-rules (11 Jan, 2008)
"Looks like CMX is not only getting bigger...but, also getting better!!" - moongirl (14 Dec, 2007)
roopeshpdit
Frequent Poster
Frequent Poster
Posts: 25
Joined: Tue Jul 10, 2007 8:46 pm

I am new to php please tell me which file to modify i will try to do it my self.
User avatar
battye
Site Admin
Site Admin
Posts: 14391
Joined: Sun Jan 11, 2004 8:26 am
Location: Australia
Contact:

Hmm, try this.

open quiz.php

find

Code: Select all

$HTTP_POST_VARS["Question_$i"]
you should find 2 instances of this

replace with

Code: Select all

str_replace('[newline]', '<br />', $HTTP_POST_VARS["Question_$i"])
This will replace every instance of the (quick and dirty) bbCode [newline] with a <br />
CricketMX.com in 2022: Still the home of bat's, rat's and other farmyard animals!

"OK, life [as you chose to define it] repeats until there are no more lessons to be learned." - nrnoble (June 12, 2005)
"the new forum looks awesome, it's getting bigger & better" - p2p-sharing-rules (11 Jan, 2008)
"Looks like CMX is not only getting bigger...but, also getting better!!" - moongirl (14 Dec, 2007)
roopeshpdit
Frequent Poster
Frequent Poster
Posts: 25
Joined: Tue Jul 10, 2007 8:46 pm

battye wrote:Hmm, try this.

open quiz.php

find

Code: Select all

$HTTP_POST_VARS["Question_$i"]
you should find 2 instances of this

replace with

Code: Select all

str_replace('[newline]', '<br />', $HTTP_POST_VARS["Question_$i"])
This will replace every instance of the (quick and dirty) bbCode [newline] with a <br />

I did the same thing as above but still did not work :(
User avatar
battye
Site Admin
Site Admin
Posts: 14391
Joined: Sun Jan 11, 2004 8:26 am
Location: Australia
Contact:

What happens? Does the [newline] part still visible?
CricketMX.com in 2022: Still the home of bat's, rat's and other farmyard animals!

"OK, life [as you chose to define it] repeats until there are no more lessons to be learned." - nrnoble (June 12, 2005)
"the new forum looks awesome, it's getting bigger & better" - p2p-sharing-rules (11 Jan, 2008)
"Looks like CMX is not only getting bigger...but, also getting better!!" - moongirl (14 Dec, 2007)
roopeshpdit
Frequent Poster
Frequent Poster
Posts: 25
Joined: Tue Jul 10, 2007 8:46 pm

Code: Select all

<br />In Southwest France in the 1940’s, playing children discovered Lascaux Grotto, a series of narrow cave chambers that contain huge prehistoric paintings of animals. Many of these beasts are as large as 16 feet (almost 5 meters). Some follow each other in solemn parades, but others swirl about, sideways and upside down. The animals are bulls, wild horses, reindeer, bison, and mammoths outlined with charcoal and painted mostly in reds, yellow, and browns. Scientific analysis reveals that the colors were derived from ocher and other iron oxides ground into a fine powder. Methods of applying color varied: some colors were brushed or smeared on rock surfaces and others were blown or sprayed. It is possible that tubes made from animal bones were used for spraying because hollow bones, some stained with pigment, have been found nearby.<br/>One of the most puzzling aspects of the paintings is their location. Other rock paintings—for example, those of Bushmen in South Africa—are either located near cave entrances or completely in the open. Cave paintings in France and Spain, however, are in recesses and caverns far removed from original cave entrances. This means that artists were forced to work in cramped spaces and without sources of natural light. It also implies that whoever made them did not want them to be easily found. Since cave dwellers normally lived close to entrances, there must have been some reason why so many generations of Lascaux cave dwellers hid their art.<br/>Scholars offer three related but different opinions about the mysterious origin and significance of these paintings. One opinion is that the paintings were a record of seasonal migrations made by herds. Because some paintings were made directly over others, obliterating them, it is probable that a painting’s value ended with the migration it pictured. Unfortunately, this explanation fails to explain the hidden locations, unless the migrations were celebrated with secret ceremonies.<br/>Another opinion is that the paintings were directly related to hunting and were an essential part of a special preparation ceremony. This opinion holds that the pictures and whatever ceremony they accompanied were an ancient method of psychologically motivating hunters. It is conceivable that before going hunting the hunters would draw or study pictures of animals and imagine a successful hunt. Considerable support exists for this opinion because several animals in the pictures are wounded by arrows and spears. This opinion also attempts to solve the overpainting by explaining that an animal’s picture had no further use after the hunt.<br/>A third opinion takes psychological motivation much further into the realm of tribal ceremonies and mystery: the belief that certain animals assumed mythical significance as ancient ancestors or protectors of a given tribe or clan. Two types of images substantiate this theory: the strange, indecipherable geometric shapes that appear near some animals, and the few drawings of men. Wherever men appear they are crudely drawn and their bodies are elongated and rigid. Some men are in a prone position and some have bird or animal heads. Advocates for this opinion point to reports from people who have experienced a trance state, a highly suggestive state of low consciousness between waking and sleeping. Uniformly, these people experienced weightlessness and the sensation that their bodies were being stretched lengthwise. Advocates also point to people who believe that the forces of nature are inhabited by spirits, particularly shamans who believe that an animal’s spirit and energy is transferred to them while in a trance. One Lascaux narrative picture, which shows a man with a birdlike head and a wounded animal, would seem to lend credence to this third opinion, but there is still much that remains unexplained. For example, where is the proof that the man in the picture is a shaman? He could as easily be a hunter wearing a headmask. Many tribal hunters, including some Native Americans, camouflaged themselves by wearing animal heads and hides.<br/>Perhaps so much time has passed that there will never be satisfactory answers to the cave images, but their mystique only adds to their importance. Certainly a great art exists, and by its existence reveals that ancient human beings were not without intelligence, skill, and sensitivity. 
As u can see <br/> is still visible. :(
User avatar
battye
Site Admin
Site Admin
Posts: 14391
Joined: Sun Jan 11, 2004 8:26 am
Location: Australia
Contact:

If you look at the source code, do you see < and &rt; ?
CricketMX.com in 2022: Still the home of bat's, rat's and other farmyard animals!

"OK, life [as you chose to define it] repeats until there are no more lessons to be learned." - nrnoble (June 12, 2005)
"the new forum looks awesome, it's getting bigger & better" - p2p-sharing-rules (11 Jan, 2008)
"Looks like CMX is not only getting bigger...but, also getting better!!" - moongirl (14 Dec, 2007)
roopeshpdit
Frequent Poster
Frequent Poster
Posts: 25
Joined: Tue Jul 10, 2007 8:46 pm

This is my sourcecode


Code: Select all

<?php
/***************************************************************************
 *                               quiz.php
 *                            -------------------
 *   begin                : Sat, May 21, 2005
 *   copyright          : (C) 2005 Battye @ CricketMX.com
 *   email                : cricketmx@hotmail.com
 *
 *   $Id: quiz.php, v2 (May 2005) battye Exp $
 *
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 ***************************************************************************/

define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
include($phpbb_root_path . 'includes/bbcode.'.$phpEx);
include($phpbb_root_path . 'includes/functions_quiz.'.$phpEx);

	$language = $board_config['default_lang'];
	
	if (!file_exists($phpbb_root_path . 'language/lang_' . $language . '/lang_quiz.' . $phpEx))
	{
		$language = 'english';
	}
	
	include($phpbb_root_path . 'language/lang_' . $language . '/lang_quiz.' . $phpEx);

$userdata = session_pagestart($user_ip, PAGE_QUIZ);
init_userprefs($userdata);

// Just to help users know what version of UQM they are using, I will add it here, it will be changed in every version mind you (it is commented out purposely)
// $quiz_version = '1.2.0';

	// Define mode and type
	$mode = htmlspecialchars($HTTP_GET_VARS['mode']);
	$type = htmlspecialchars($HTTP_POST_VARS['type']);
	
		if($type == "multiple_choice")
		{
			$quiz_type = "multiple_choice"; // Default for 1.0.x
		}
		
		if($type == "true_false")
		{
			$quiz_type = "true_false"; // New in 1.1.x
		}
		
		if($type == "input_answer")
		{
			$quiz_type = "input_answer"; // Default for Pre 0.0.x, reapplied in 1.1.x
		}

	if( isset($HTTP_GET_VARS[POST_CAT_URL]) ) // Let's list the quizzes in a certain category, and all that jazz
	{
		$category_id = intval($HTTP_GET_VARS[POST_CAT_URL]);
	
		$password_sql = "SELECT * FROM " . QUIZ_CATEGORY_TABLE . " WHERE category_id = $category_id";
		
			if(!$password_result = $db->sql_query($password_sql))
			{
			message_die(GENERAL_ERROR, 'Could not obtain category password', '', __LINE__, __FILE__, $password_sql);
			}
			
			$password_row = $db->sql_fetchrow($password_result);
			
			if( !$userdata['session_logged_in'] )
			{
				if( $password_row['category_permissions'] == ON || $password_row['category_permissions'] == OFF )
				{
				message_die(GENERAL_ERROR, $lang['Quiz_registered_category_permissions_no_access']);
				}
			}
		
		if($password_row['category_password'] !== 'd41d8cd98f00b204e9800998ecf8427e' && quiz_check_category_password($category_id) != ON)
		{
			if( isset($HTTP_POST_VARS['password']) )
			{
				if( md5($HTTP_POST_VARS['password']) != quiz_category_password($category_id) )
				{
					message_die(GENERAL_ERROR, $lang['Quiz_category_password_wrong']);
				}
				
				else
				{
				$password_data = $userdata['session_quiz_categories'] . $category_id . ',';
				$update_pw_data = "UPDATE " . SESSIONS_TABLE . " SET session_quiz_categories = '" . $password_data . "' WHERE session_id = '" . $userdata['session_id'] . "'";
				
					if(!$db->sql_query($update_pw_data))
					{
						message_die(GENERAL_ERROR, '', 'Could not update password list', __LINE__, __FILE__, $update_pw_data);
					}
					
				redirect( append_sid("quiz.$phpEx?" . POST_CAT_URL . "=$category_id", true) );
				}
			}
			
		include($phpbb_root_path . "includes/page_header.$phpEx");
		$template->set_filenames(array("quiz_pw" => 'quiz_category_password_body.tpl'));
		
			$template->assign_vars( array(
			"F_FORM" => append_sid("quiz.$phpEx?" . POST_CAT_URL . "=$category_id"),
			
			"L_SUBMIT" => $lang['Submit'],
			"L_ENTER_PASSWORD" => $lang['Quiz_password_protect_information'],
			"L_PASSWORD" => $lang['Quiz_password_protect']));
			
		$template->pparse("quiz_pw");
		include($phpbb_root_path . "includes/page_tail.$phpEx");
		}
	
	$page_title = $lang['Quiz_quizzes'] . ' :: ' . switch_to_category_name($category_id);
	include($phpbb_root_path . "includes/page_header.$phpEx");
	$template->set_filenames(array("quiz_cat" => 'quiz_category_body.tpl'));	
	
	if( isset($HTTP_POST_VARS['view_method']) )
	{
	$method = intval($HTTP_POST_VARS['view_method']);
		
		if($method == 1)
		{
			$sql_addon = "ORDER BY quiz_name ASC";
		}

		if($method == 2)
		{
			$sql_addon = "ORDER BY quiz_id ASC";
		}
		
		if($method == 3)
		{
			$sql_addon = "ORDER BY quiz_type ASC";
		}
		
		if($method == 4)
		{
			$sql_addon = "ORDER BY quiz_author ASC";
		}
	}
	
	else
	{
		$sql_addon = 'ORDER BY quiz_name ASC';
	}
		
		$sql = "SELECT * FROM " . QUIZ_GENERAL_TABLE . " WHERE quiz_category = '" . $category_id . "' " . $sql_addon;
			
		if(!$result = $db->sql_query($sql))
		{
			message_die(GENERAL_ERROR, '', 'Could not obtain quiz name data', __LINE__, __FILE__);
		}
		
		if( $db->sql_numrows($result) == 0)
		{
			$template->assign_block_vars("nothing_row", array(
			"L_NO_RESULTS" => sprintf($lang['Quiz_no_quizzes'], append_sid("quiz.$phpEx?mode=add"))
			));
		}
		
		while($row = $db->sql_fetchrow($result))
		{		
			$quiz_name = str_replace("\'", "''", $row['quiz_name']);
			$quiz_id = intval($row['quiz_id']);
			
				if( $row['quiz_author'] != -21000 )
				{
				$quiz_author = ( $row['quiz_author'] == ANONYMOUS ) ? $lang['Guest'] : "<a href=" . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . intval($row['quiz_author']) . "") . ">" . convert_id($row['quiz_author']) . "</a>";
				}
				
				else
				{
				$quiz_author = $board_config['Quiz_packs_bot'];				
				}
				
			$quiz_type = str_replace("\'", "''", $row['quiz_type']);
		
			if( intval($row['quiz_plays']) != 1 )
			{
				$quiz_plays = sprintf($lang['Quiz_number_of_plays'], $row['quiz_plays']);
			}
			
			else if( intval($row['quiz_plays']) == 1 )
			{
				$quiz_plays = $lang['Quiz_number_of_play'];
			}

		// We need to let the users know which type of quiz it is surely.
		if($quiz_type == MULTIPLE_CHOICE)
		{
			$ultimate_quiz_type = $lang['Quiz_type_multiple_choice'];
		}	
		
		if($quiz_type == TRUE_FALSE)
		{
			$ultimate_quiz_type = $lang['Quiz_type_true_false'];
		}		
		
		if($quiz_type == INPUT_ANSWER)
		{
			$ultimate_quiz_type = $lang['Quiz_type_input_answer'];
		}
		
			 $template->assign_block_vars("play_row", array(
			 "U_QUIZ_LINK" => "<a href='" . append_sid("quiz.$phpEx?mode=play&" . POST_QUIZ_URL . "=" . $quiz_id . "") . "'>$quiz_name</a>",
			 "U_AUTHOR" => $quiz_author,
			 "U_TYPE" => $ultimate_quiz_type,
			 "U_PLAYS" => $quiz_plays));
			 
		}
		
	$template->assign_vars( array(
	"U_QUIZZES" => switch_to_category_name($category_id),
	"U_SUBMIT_QUIZ" => "<a href='" . append_sid("quiz.$phpEx?mode=add") . "'>" . $lang['Submit_quiz'] . "</a>",
	"U_STATISTICS_LINK" => "<a href='" . append_sid("quiz_stats.$phpEx") . "'>" . $lang['Quiz_stats'] . "</a>",
	
	"F_FORM" => append_sid("quiz.$phpEx?" . POST_CAT_URL . "=$category_id"),
	
	"L_SUBMIT" => $lang['Submit'],
	"L_VIEW_ALPHABETICAL" => $lang['Quiz_view_alphabetical'],
	"L_VIEW_TYPE" => $lang['Quiz_view_type'],
	"L_VIEW_AUTHOR" => $lang['Quiz_view_author'],
	"L_VIEW_CHRONILOGICAL" => $lang['Quiz_view_chronilogical']));
		
	$template->pparse("quiz_cat");
	include($phpbb_root_path . "includes/page_tail.$phpEx");
	}
		
	if( $mode == 'play' || isset($HTTP_GET_VARS[POST_QUIZ_URL]) )
	{
	quiz_permissions();
	
	// September 10, 2005. Newest addition. In all probability not much will be done on this tonight. I made a function though :)
	// Actually, I might CVS it.
	$quiz_id = intval($HTTP_GET_VARS[POST_QUIZ_URL]); // Intval it now. Saves doing it every time it is called up for selection (cricket-ism).
	$quiz_type = quiz_type($quiz_id);
	
	// Let's check the stats, if the admin wants users to be able to play each quiz, once only.
	if( quiz_check_moderative_status($userdata['user_id'], $quiz_id) != ON && $userdata['user_level'] != ADMIN )
	{
		if( $board_config['Quiz_Play_Once'] == ON )
		{
			$statistics_check = "SELECT * FROM " . QUIZ_STATISTICS_TABLE . " WHERE quiz_id = $quiz_id AND user_id = " . $userdata['user_id'];
		
			if( !$statistics_check_result = $db->sql_query($statistics_check) )
			{
				message_die(GENERAL_ERROR, 'Could not get statistics data to check Quiz_Play_Once setting', '', __LINE__, __FILE__, $statistics_check);
			}
			
			if( $db->sql_numrows($statistics_check_result) == 1 || $db->sql_numrows($statistics_check_result) > 1 )
			{
				message_die(GENERAL_MESSAGE, $lang['Quiz_only_play_it_once']);
			}
		}
	}
	
	// Basically, there will be three sections (no prizes for guessing). This is the first. Hopefully they are not too large.
	$sql = "SELECT * FROM " . QUIZ_GENERAL_TABLE . " WHERE quiz_id = " . $quiz_id;
		
		if(!$result = $db->sql_query($sql))
		{
			message_die(GENERAL_ERROR, '', 'Could not obtain basic quiz data', __LINE__, __FILE__);
		}
			
	$general_quiz_data = $db->sql_fetchrow($result);
		
	// Author information
	$quiz_author_id = $general_quiz_data['quiz_author'];
	$quiz_author_name = convert_id($general_quiz_data['quiz_author']);
	$quiz_author_link = "<a href='" . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$quiz_author_id") . "'>$quiz_author_name</a>";
		
	// Miscellaneous
	$quiz_name = str_replace("\'", "''", $general_quiz_data['quiz_name']);
	$quiz_category = intval($general_quiz_data['quiz_category']);
	$quiz_enabled = $general_quiz_data['quiz_enabled'];
	
	$password_sql = "SELECT * FROM " . QUIZ_CATEGORY_TABLE . " WHERE category_id = $quiz_category";
		
		if(!$password_result = $db->sql_query($password_sql))
		{
			message_die(GENERAL_ERROR, '', 'Could not obtain category password', __LINE__, __FILE__, $password_sql);
		}
		
		$password_row = $db->sql_fetchrow($password_result);
		
		if( !$userdata['session_logged_in'] )
		{
			if( $password_row['category_permissions'] == ON || $password_row['category_permissions'] == OFF )
			{
				message_die(GENERAL_ERROR, $lang['Quiz_registered_category_permissions_no_access']);
			}		
		}
		
		if( quiz_check_category_password($quiz_category) != 1 && $password_row['category_password'] !== 'd41d8cd98f00b204e9800998ecf8427e' )
		{
		include($phpbb_root_path . "includes/page_header.$phpEx");
		$template->set_filenames(array("quiz_pw" => 'quiz_category_password_body.tpl'));
		
			$template->assign_vars( array(
			"F_FORM" => append_sid("quiz.$phpEx?mode=play&" . POST_QUIZ_URL . "=$quiz_id"),
			
			"L_SUBMIT" => $lang['Submit'],
			"L_ENTER_PASSWORD" => $lang['Quiz_password_protect_information'],
			"L_PASSWORD" => $lang['Quiz_password_protect']));
			
		$template->pparse("quiz_pw");
		include($phpbb_root_path . "includes/page_tail.$phpEx");
		}

		if($board_config['Quiz_Author_Play'] == OFF && $quiz_author_id == $userdata['user_id'])
		{
			if( quiz_check_moderative_status($userdata['user_id'], $quiz_id) == ON )
			{
			message_die(GENERAL_MESSAGE, $lang['Quiz_author_cannot_play'] . '<br />' . sprintf($lang['Quiz_author_cannot_play_give_edit_options'], '<a href="' . append_sid("quiz_cp.$phpEx?mode=edit&q=$quiz_id") . '">', '</a>', '<a href="' . append_sid("quiz_cp.$phpEx?mode=delete&q=$quiz_id") . '">', '</a>', '<a href="' . append_sid("quiz_cp.$phpEx?mode=move&q=$quiz_id") . '">', '</a>'));
			}
			
			else
			{
			message_die(GENERAL_MESSAGE, $lang['Quiz_author_cannot_play']);
			}
		}
	
		if($quiz_type == MULTIPLE_CHOICE)
		{
		$page_title = $quiz_name;
		include($phpbb_root_path . "includes/page_header.$phpEx");
		$template->set_filenames(array("play_multiple_choice" => 'quiz_play_multiple_choice_body.tpl'));	
		
			if( quiz_check_moderative_status($userdata['user_id'], $quiz_id) == ON )
			{
				$mod_langs = '<br />' . $lang['Quiz_cp_play_quiz_mod'] . '<br />' . sprintf( $lang['Quiz_cp_play_quiz_mod_do'], '<a href="' . append_sid("quiz_cp.$phpEx?mode=edit&" . POST_QUIZ_URL . "=$quiz_id") . '">', '</a>', '<a href="' . append_sid("quiz_cp.$phpEx?mode=delete&" . POST_QUIZ_URL . "=$quiz_id") . '">', '</a>', '<a href="' . append_sid("quiz_cp.$phpEx?mode=move&" . POST_QUIZ_URL . "=$quiz_id") . '">', '</a>');
			}
			
			else
			{
				$mod_langs = '';
			}

		$select_quiz_data = "SELECT * FROM " . QUIZ_MULTIPLE_CHOICE_TABLE . " WHERE quiz_id = $quiz_id";

			if(!$result_quiz_data = $db->sql_query($select_quiz_data))
			{
				message_die(GENERAL_ERROR, '', 'Could not obtain advanced quiz data', __LINE__, __FILE__);
			}
			
				while($quiz_data = $db->sql_fetchrow($result_quiz_data))
				{
				$quiz_question = smilies_pass(bbencode_second_pass($quiz_data['quiz_question'], ''));
				$quiz_question_id = $quiz_data['question_id'];
				
				$quiz_multiple_choice = array();
				$quiz_multiple_choice = explode("!*-.@.-*!", $quiz_data['quiz_alternates']);
				
				$template->assign_vars( array(
				 "U_QUIZ_NAME" => $quiz_name,
				 "U_STATISTICS" => "<a href='" . append_sid("quiz_stats.$phpEx?" . POST_QUIZ_URL . "=$quiz_id") . "'>" . $lang['Quiz_stats'] . "</a>",
				 
				 "F_FORM" => append_sid("quiz.$phpEx?mode=results"),
				 "F_ID" => $quiz_id,
				 "F_TYPE" => $quiz_type,
				 "F_TIME" => time(),
				
				 "L_MOD_LANGS" => $mod_langs,
				 "L_MULTIPLE_INFORMATION" => $lang['Quiz_multiple_information'], 
				 "L_SUBMIT" => $lang['Submit_quiz']));
				
				 $template->assign_block_vars("quiz_row", array(
				 "U_QUESTION_ID" => $quiz_question_id,
				 "U_QUESTION" => $quiz_question,
				 
				 "Q_ALTERNATE_ONE" => $quiz_multiple_choice[0],
				 "Q_ALTERNATE_TWO" => $quiz_multiple_choice[1],
				 "Q_ALTERNATE_THREE" => $quiz_multiple_choice[2],
				 "Q_ALTERNATE_FOUR" => $quiz_multiple_choice[3]));			
				}
				
		$template->pparse("play_multiple_choice");
		include($phpbb_root_path . "includes/page_tail.$phpEx");
		}
	
		if($quiz_type == INPUT_ANSWER)
		{
		$page_title = $quiz_name;
		include($phpbb_root_path . "includes/page_header.$phpEx");
		$template->set_filenames(array("play_input_answer" => 'quiz_play_input_answer_body.tpl'));	

			if( quiz_check_moderative_status($userdata['user_id'], $quiz_id) == ON )
			{
			$mod_langs = '<br />' . $lang['Quiz_cp_play_quiz_mod'] . '<br />' . sprintf( $lang['Quiz_cp_play_quiz_mod_do'], '<a href="' . append_sid("quiz_cp.$phpEx?mode=edit&" . POST_QUIZ_URL . "=$quiz_id") . '">', '</a>', '<a href="' . append_sid("quiz_cp.$phpEx?mode=delete&" . POST_QUIZ_URL . "=$quiz_id") . '">', '</a>', '<a href="' . append_sid("quiz_cp.$phpEx?mode=move&" . POST_QUIZ_URL . "=$quiz_id") . '">', '</a>');
			}
			
			else
			{
				$mod_langs = '';
			}		
		
		$select_quiz_data = "SELECT * FROM " . QUIZ_INPUT_TABLE . " WHERE quiz_id = $quiz_id";

			if(!$result_quiz_data = $db->sql_query($select_quiz_data))
			{
				message_die(GENERAL_ERROR, '', 'Could not obtain advanced quiz data', __LINE__, __FILE__);
			}
			
				while($quiz_data = $db->sql_fetchrow($result_quiz_data))
				{
				$quiz_question = smilies_pass(bbencode_second_pass($quiz_data['quiz_question'], ''));
				$quiz_question_id = $quiz_data['question_id'];
				
				// I've decided not to encode the answer, it is easier to compare it to an id, such as the game_id / quiz_id partnership in 1.0.6
		
				$template->assign_vars( array(
				 "U_QUIZ_NAME" => $quiz_name,
				 "U_STATISTICS" => "<a href='" . append_sid("quiz_stats.$phpEx?" . POST_QUIZ_URL . "=$quiz_id") . "'>" . $lang['Quiz_stats'] . "</a>",
				 
				 "F_FORM" => append_sid("quiz.$phpEx?mode=results"),
				 "F_ID" => $quiz_id,
				 "F_TYPE" => $quiz_type,
				 "F_TIME" => time(),
	
				 "L_MOD_LANGS" => $mod_langs,	
				 "L_INPUT_INFORMATION" => $lang['Quiz_input_information'], 
				 "L_SUBMIT" => $lang['Submit_quiz']));
				
				 $template->assign_block_vars("quiz_row", array(
				 "U_QUESTION_ID" => $quiz_question_id,
				 "U_QUESTION" => $quiz_question));
				 
				}
			
		$template->pparse("play_input_answer");
		include($phpbb_root_path . "includes/page_tail.$phpEx");
		}
	
		if($quiz_type == TRUE_FALSE)
		{
		$page_title = $quiz_name;
		include($phpbb_root_path . "includes/page_header.$phpEx");
		$template->set_filenames(array("play_true_false" => 'quiz_play_true_false_body.tpl'));
		
			if( quiz_check_moderative_status($userdata['user_id'], $quiz_id) == ON )
			{
				$mod_langs = '<br />' . $lang['Quiz_cp_play_quiz_mod'] . '<br />' . sprintf( $lang['Quiz_cp_play_quiz_mod_do'], '<a href="' . append_sid("quiz_cp.$phpEx?mode=edit&" . POST_QUIZ_URL . "=$quiz_id") . '">', '</a>', '<a href="' . append_sid("quiz_cp.$phpEx?mode=delete&" . POST_QUIZ_URL . "=$quiz_id") . '">', '</a>', '<a href="' . append_sid("quiz_cp.$phpEx?mode=move&" . POST_QUIZ_URL . "=$quiz_id") . '">', '</a>');
			}
			
			else
			{
				$mod_langs = '';
			}
		
		$select_quiz_data = "SELECT * FROM " . QUIZ_TRUE_FALSE_TABLE . " WHERE quiz_id = $quiz_id";

			if(!$result_quiz_data = $db->sql_query($select_quiz_data))
			{
				message_die(GENERAL_ERROR, '', 'Could not obtain advanced quiz data', __LINE__, __FILE__);
			}
			
				while($quiz_data = $db->sql_fetchrow($result_quiz_data))
				{
				$quiz_question = smilies_pass(bbencode_second_pass($quiz_data['quiz_question'], ''));
				$quiz_question_id = $quiz_data['question_id'];
				$quiz_answer = $quiz_data['quiz_answer']; 
				
				 $template->assign_vars( array(
				 "U_QUIZ_NAME" => $quiz_name,		
				 "U_STATISTICS" => "<a href='" . append_sid("quiz_stats.$phpEx?" . POST_QUIZ_URL . "=$quiz_id") . "'>" . $lang['Quiz_stats'] . "</a>",
				 
				 "F_FORM" => append_sid("quiz.$phpEx?mode=results"),
				 "F_ID" => $quiz_id,
				 "F_TYPE" => $quiz_type,
				 "F_TIME" => time(),
	
				 "L_MOD_LANGS" => $mod_langs,	
				 "L_TRUE_FALSE_INFORMATION" => $lang['Quiz_true_false_information'], 
				 "L_TRUE" => $lang['Quiz_answer_true'], 
				 "L_FALSE" => $lang['Quiz_answer_false'],
				 "L_SUBMIT" => $lang['Submit_quiz']));
				
				 $template->assign_block_vars("quiz_row", array(
				 "U_QUESTION_ID" => $quiz_question_id,
				 "U_QUESTION" => $quiz_question,
				 "U_ANSWER" => md5($quiz_answer)));
				 
				}
			
		$template->pparse("play_true_false");
		include($phpbb_root_path . "includes/page_tail.$phpEx");
		}
	}
		
	if($mode == 'add')
	{
	quiz_permissions();
	$quiz_questions_explode = explode(',', $board_config['Quiz_Min_Max_Questions']);
	
	if( $board_config['Quiz_Mod_Submit'] == ON && quiz_check_moderative_status($userdata['user_id'], '') != ON )
	{
		message_die(GENERAL_MESSAGE, $lang['Quiz_only_mod_can_submit']);
	}
	
		if(!$HTTP_POST_VARS['Questions_number'] && isset($quiz_type))
		{
			message_die(GENERAL_MESSAGE, $lang['Quiz_no_number_chosen']);
		}
		
		if(!isset($HTTP_POST_VARS['type']))
		{
		$page_title = $lang['Submit_quiz'];
		include($phpbb_root_path . "includes/page_header.$phpEx");
		$template->set_filenames(array("add_initial" => 'quiz_add_initial_body.tpl'));
		
			if( $quiz_questions_explode[0] == $quiz_questions_explode[1] )
			{
			$quiz_min_max_questions_set = sprintf($lang['Quiz_min_max_set'], $quiz_questions_explode[0]);
			$quiz_default_number = '&nbsp;<b>' . intval($quiz_questions_explode[0]) . '</b><input type="hidden" name="Questions_number" value="' . intval($quiz_questions_explode[0]) . '" />';
			}
		
			else
			{
			$quiz_min_max_questions_set = sprintf($lang['Quiz_min_max'], $quiz_questions_explode[0], $quiz_questions_explode[1]);
			$quiz_default_number = '&nbsp;<input type="text" class="post" name="Questions_number" size="5" maxlength="4" value="" />';
			}
			
		$template->assign_vars(array( 
			"U_DEFAULT" => $quiz_default_number,
		
			"F_FORM" => append_sid("quiz.$phpEx?mode=add"),
		
			"L_MIN_MAX" => $quiz_min_max_questions_set,
			"L_SETUP_OPTIONS" => $lang['Quiz_set_up_options'],
			"L_SELECT_NUMBER" => $lang['Quiz_select_number'],
			"L_TRUE_FALSE" => $lang['Submit_true_false_quiz'],
			"L_MULTIPLE_CHOICE" => $lang['Submit_multiple_choice_quiz'],
			"L_INPUT" => $lang['Submit_input_quiz'],
			"L_SUBMIT" => $lang['Submit_quiz']));
			
		$template->pparse("add_initial");
		include($phpbb_root_path . "includes/page_tail.$phpEx");
		}
	
		if($quiz_type == 'multiple_choice')
		{
		$page_title = $lang['Submit_multiple_choice_quiz'];
		include($phpbb_root_path . "includes/page_header.$phpEx");
		
		quiz_check_question_limitations();
		
		$template->set_filenames(array("multiple_choice" => "quiz_add_multiple_choice_body.tpl"));
	
			for ( $i = 0; $i < intval($HTTP_POST_VARS['Questions_number']); $i++ )
			{
			$template->assign_block_vars('question_number', array(
			 'U_UNIQUE' => $i));
			}
			
			// To make the box..
			$category_drop_down_box = '<select name="category">';
			$category_sql = "SELECT * FROM " . QUIZ_CATEGORY_TABLE . " ORDER BY category_id ASC";
			
			if(!$category_result = $db->sql_query($category_sql))
			{
			message_die(GENERAL_ERROR, '', 'Could not fetch category names!');
			}
			
			while($category_row = $db->sql_fetchrow($category_result))
			{
			$category_drop_down_box .= populate_quiz_drop_down_box($category_row['category_id'], $category_row['category_name']);
			}
			
			$category_drop_down_box .= '</select>';
		
		$template->assign_vars(array( 
			"F_FORM" => append_sid("quiz.$phpEx?mode=sql"),
			
			"U_TOTAL" => intval($HTTP_POST_VARS['Questions_number']),
			"U_CATEGORY" => $category_drop_down_box,
		
			"L_INSERT_NAME" => $lang['Quiz_insert_name'],
			"L_QUESTION" => $lang['Quiz_question'],
			"L_ALTERNATE_ANSWER" => $lang['Quiz_alternate'],
			"L_SUBMIT" => $lang['Submit_quiz']));
		
		$template->pparse("multiple_choice");
		include($phpbb_root_path . "includes/page_tail.$phpEx");
		}
	
		if($quiz_type == 'input_answer')
		{
		$page_title = $lang['Submit_input_quiz'];
		include($phpbb_root_path . "includes/page_header.$phpEx");
		
		$template->set_filenames(array("input" => "quiz_add_input_body.tpl"));
		
		quiz_check_question_limitations();
	
			for ( $i = 0; $i < intval($HTTP_POST_VARS['Questions_number']); $i++ )
			{
				 $template->assign_block_vars('question_number', array(
				 'U_UNIQUE' => $i));
			}
			
			// To make the box..
			$category_drop_down_box = '<select name="category">';
			$category_sql = "SELECT * FROM " . QUIZ_CATEGORY_TABLE . " ORDER BY category_id ASC";
			
			if(!$category_result = $db->sql_query($category_sql))
			{
				message_die(GENERAL_ERROR, '', 'Could not fetch category names!');
			}
			
			while($category_row = $db->sql_fetchrow($category_result))
			{
				$category_drop_down_box .= populate_quiz_drop_down_box($category_row['category_id'], $category_row['category_name']);
			}
			
			$category_drop_down_box .= '</select>';
		
		$template->assign_vars(array( 
			"F_FORM" => append_sid("quiz.$phpEx?mode=sql"),
			
			"U_TOTAL" => intval($HTTP_POST_VARS['Questions_number']),
			"U_CATEGORY" => $category_drop_down_box,
		
			"L_INSERT_NAME" => $lang['Quiz_insert_name'],
			"L_CORRECT_ANSWER" => $lang['Quiz_answer_correct'],
			"L_QUESTION" => $lang['Quiz_question'],
			"L_SUBMIT" => $lang['Submit_quiz']));
		
		$template->pparse("input");
		include($phpbb_root_path . "includes/page_tail.$phpEx");
		}
		
		if($quiz_type == 'true_false')
		{
		$page_title = $lang['Submit_true_false_quiz'];
		include($phpbb_root_path . "includes/page_header.$phpEx");
		
		$template->set_filenames(array("true_false" => "quiz_add_true_false_body.tpl"));
	
		quiz_check_question_limitations();
	
			for ( $i = 0; $i < intval($HTTP_POST_VARS['Questions_number']); $i++ )
			{
				 $template->assign_block_vars('question_number', array(
				 'U_UNIQUE' => $i));
			}
		
			// To make the box..
			$category_drop_down_box = '<select name="category">';
			$category_sql = "SELECT * FROM " . QUIZ_CATEGORY_TABLE . " ORDER BY category_id ASC";
			
			if(!$category_result = $db->sql_query($category_sql))
			{
				message_die(GENERAL_ERROR, '', 'Could not fetch category names!');
			}
			
			while($category_row = $db->sql_fetchrow($category_result))
			{
				$category_drop_down_box .= populate_quiz_drop_down_box($category_row['category_id'], $category_row['category_name']);
			}
			
			$category_drop_down_box .= '</select>';		
		
			$template->assign_vars(array( 
				"F_FORM" => append_sid("quiz.$phpEx?mode=sql"),
			
				"U_TOTAL" => intval($HTTP_POST_VARS['Questions_number']),
				"U_CATEGORY" => $category_drop_down_box,
			
				"L_INSERT_NAME" => $lang['Quiz_insert_name'],
				"L_TRUE" => $lang['Quiz_answer_true'],
				"L_FALSE" => $lang['Quiz_answer_false'],
				"L_QUESTION" => $lang['Quiz_question'],
				"L_SUBMIT" => $lang['Submit_quiz']));
		
		$template->pparse("true_false");
		include($phpbb_root_path . "includes/page_tail.$phpEx");
		}
	}
	
	if($mode == "sql")
	{
	// Similar to that of v1.0.x but not the same
	// This is better :-)

		if($HTTP_POST_VARS['Quiz_Type'] == "Input" || $HTTP_POST_VARS['Quiz_Type'] == "True_False")
		{
			if($HTTP_POST_VARS['Quiz_Type'] == "Input")
			{
				$table_name = QUIZ_INPUT_TABLE; // x_quiz_input_data
			}
			
			else
			{
				$table_name = QUIZ_TRUE_FALSE_TABLE; // x_quiz_true_false_data
			}

			for ( $i = 0; $i < intval($HTTP_POST_VARS['Quiz_Question']); $i++ )
			{	
				$question_sql = "INSERT INTO " . $table_name . " (quiz_id, question_id, quiz_question, quiz_answer) 	
				VALUES ( " . next_quiz_id() . ", " . ($i + 1) . ", '" . str_replace("\'", "''", bbencode_first_pass(htmlspecialchars(str_replace('[newline]', '<br />', $HTTP_POST_VARS["Question_$i"])), '')) . "', 
				'" . str_replace("\'", "''", bbencode_first_pass(htmlspecialchars($HTTP_POST_VARS["Correct_Answer_$i"]), '')) . "')";
					
				if( !$question_result = $db->sql_query($question_sql))
				{
					message_die(GENERAL_ERROR, 'Could not insert question / answer data', '', __LINE__, __FILE__, $question_sql);
				}
			}
		}
		
		if($HTTP_POST_VARS['Quiz_Type'] == "Multiple")
		{
			for ( $i = 0; $i < intval($HTTP_POST_VARS['Quiz_Question']); $i++ )
			{	
				// The answer isn't going to be Alternate_x_x now is it :roll:
				// Well not often anyway ;-)
				// Update: A few months later, I don't even know what the hell I was talking about. Better read the code to find out what exactly this section does eh?
				
				$answer = array();
				
				if($HTTP_POST_VARS["Correct_Answer_$i"] == "Alternate1_$i")
				{
					$answer[$i] = bbencode_first_pass(str_replace("\'", "''", $HTTP_POST_VARS["Alternate1_$i"]), '');
				}
				
				else if($HTTP_POST_VARS["Correct_Answer_$i"] == "Alternate2_$i")
				{
					$answer[$i] = bbencode_first_pass(str_replace("\'", "''", $HTTP_POST_VARS["Alternate2_$i"]), '');
				}
				
				else if($HTTP_POST_VARS["Correct_Answer_$i"] == "Alternate3_$i")
				{
					$answer[$i] = bbencode_first_pass(str_replace("\'", "''", $HTTP_POST_VARS["Alternate3_$i"]), '');
				}
				
				else if($HTTP_POST_VARS["Correct_Answer_$i"] == "Alternate4_$i")
				{
					$answer[$i] = bbencode_first_pass(str_replace("\'", "''", $HTTP_POST_VARS["Alternate4_$i"]), '');
				}
				
				// As much as I hate the following few lines, because it is awfully messy, I must say, it works beautifully
				// Basically this is the most effective way of doing it. You can use the | but that means that anyone that uses that screws up the quiz.
				// Sure the same thing can happen with !*-.@.-*! but what are the odds?
				
				$question_sql = "INSERT INTO " . QUIZ_MULTIPLE_CHOICE_TABLE . " 
				(quiz_id, question_id, quiz_question, quiz_alternates, quiz_answer) 	
				VALUES ( " . next_quiz_id() . ", " . ($i + 1) . ", '" . str_replace("\'", "''", bbencode_first_pass(htmlspecialchars(str_replace('[newline]', '<br />', $HTTP_POST_VARS["Question_$i"])), '')) . "',
				'" . str_replace("\'", "''", htmlspecialchars($HTTP_POST_VARS["Alternate1_$i"])) . "!*-.@.-*!" . str_replace("\'", "''", htmlspecialchars($HTTP_POST_VARS["Alternate2_$i"])) . "!*-.@.-*!" . str_replace("\'", "''", htmlspecialchars($HTTP_POST_VARS["Alternate3_$i"])) . "!*-.@.-*!" . str_replace("\'", "''", htmlspecialchars($HTTP_POST_VARS["Alternate4_$i"])) . "', 
				'" . htmlspecialchars($answer[$i]) . "')";
					
				if( !$question_result = $db->sql_query($question_sql))
				{
					message_die(GENERAL_ERROR, 'Could not insert question / answer data', '', __LINE__, __FILE__, $question_sql);
				}
			}			
		}
		
				if($HTTP_POST_VARS['Quiz_Type'] == "True_False")
				{
					$ultimate_quiz_type = TRUE_FALSE;
				}
				
				else if($HTTP_POST_VARS['Quiz_Type'] == "Multiple")
				{
					$ultimate_quiz_type = MULTIPLE_CHOICE;
				}

				else if($HTTP_POST_VARS['Quiz_Type'] == "Input")
				{
					$ultimate_quiz_type = INPUT_ANSWER;
				}
				
	$sql =  "INSERT INTO " . QUIZ_GENERAL_TABLE . " (quiz_id, quiz_name, quiz_author, quiz_category, quiz_type) VALUES (
			  " . next_quiz_id() . ",
			  '" . str_replace("\'", "''", htmlspecialchars($HTTP_POST_VARS['Quiz_Name'])) . "',
			  '" . $userdata['user_id'] . "', 
			  '" . intval($HTTP_POST_VARS['category']) . "',
			  '" . $ultimate_quiz_type . "')";

			if( !$result = $db->sql_query($sql))
			{
				message_die(GENERAL_ERROR, 'Could not insert basic quiz details', '', __LINE__, __FILE__, $sql);
			}
			
			else
			{
				message_die(GENERAL_MESSAGE, $lang['Quiz_added_successfully']);
			}
	}
	
	if($mode == "results")
	{
	$page_title = $lang['Quiz_score'];
	include($phpbb_root_path . "includes/page_header.$phpEx");
	
	$template->set_filenames(array("quiz_result" => 'quiz_result_body.tpl'));
	
	$type = htmlspecialchars($HTTP_POST_VARS['type']);
	$id = intval($HTTP_POST_VARS['id']);
	
	if( quiz_check_moderative_status($userdata['user_id'], $id) != ON && $userdata['user_level'] != ADMIN )
	{
		if( $board_config['Quiz_Play_Once'] == ON )
		{
			$statistics_check = "SELECT * FROM " . QUIZ_STATISTICS_TABLE . " WHERE quiz_id = '$id' AND user_id = '" . $userdata['user_id'] . "'";
		
			if( !$statistics_check_result = $db->sql_query($statistics_check) )
			{
				message_die(GENERAL_ERROR, 'Could not get statistics data to check Quiz_Play_Once setting', '', __LINE__, __FILE__, $statistics_check);
			}
			
			if( $db->sql_numrows($statistics_check_result) == 1 || $db->sql_numrows($statistics_check_result) > 1 )
			{
				message_die(GENERAL_MESSAGE, $lang['Quiz_only_play_it_once']);
			}
		}
	}
	
		if($type == "input_answer")
		{
			$table = QUIZ_INPUT_TABLE;
		}
	
		else if($type == "true_false")
		{
			$table = QUIZ_TRUE_FALSE_TABLE;
		}
		
		else if($type == "multiple_choice")
		{
			$table = QUIZ_MULTIPLE_CHOICE_TABLE;
		}		
		
	$number_of_questions = number_of_questions($id, $table);
	
	$time_taken_to_complete_quiz = time() - intval($HTTP_POST_VARS['f_time']);
	$seconds_taken_to_complete_quiz = $time_taken_to_complete_quiz % 60;
	$minutes_taken_to_complete_quiz = ($time_taken_to_complete_quiz - $seconds_taken_to_complete_quiz) / 60;	
	
	if( $board_config['Quiz_timeout'] != 0 )
	{
		if( $time_taken_to_complete_quiz > ($board_config['Quiz_timeout'] * $number_of_questions) )
		{
			message_die(GENERAL_MESSAGE, $lang['Quiz_user_exceed_timelimit']);
		}
	}
	
		for ( $i = 0; $i < $number_of_questions; $i++ )
		{	
			$sql = "SELECT quiz_question FROM " . $table . " WHERE question_id = " . ($i + 1) . " AND quiz_id = " . $id;
			
			if(!$result = $db->sql_query($sql))
			{
				message_die(GENERAL_ERROR, '', 'Could not get question', __LINE__, __FILE__);
			}

			$row = $db->sql_fetchrow($result);
		
		// Fixed in 1.3.0: All errors with " and inverted commas. I think htmlspecialchars is to blame for this.
		$question = smilies_pass(bbencode_second_pass($row['quiz_question'], ''));
		$user_answer = str_replace("\'", "'", str_replace('\"', '"', $HTTP_POST_VARS['uqm' . ($i + 1)])); // Changed in 1.3.1. Added letters uqm to overcome PHP bug. Thanks to Xore (MOD Team Member) for pointing this out.
		$actual_answer = str_replace('&quot;', '"', htmlspecialchars(quiz_answer(($i + 1), $id, $table)));
		
			if(strtolower($user_answer) == strtolower($actual_answer))
         {
            $correct[$i] = 1;
            $incorrect[$i] = 0;
            
            // The message consists of Question: Your Answer: Actual Answer
            $status = sprintf($lang['Quiz_answer_status'], $user_answer, '<b style="color: green;">' . $actual_answer . '</b>');
         }
         
         else if(strtolower($user_answer) != strtolower($actual_answer))
         {
            $correct[$i] = 0;
            $incorrect[$i] = 1;
            $status = sprintf($lang['Quiz_answer_status'], $user_answer, '<b style="color: red;">' . $actual_answer . '</b>');
         }
			
			if($board_config['Quiz_show_answers'] == ON)
			{
				$template->assign_block_vars("answer_row", array(
				"U_STATUS" => $status,
				"U_QUESTION" => $question));
			}
		}
		
		// Get percentage
		if ( @array_sum($correct) != 0 && @array_sum($incorrect) != 0 )
		{			
			if( @array_sum($incorrect) == @array_sum($correct) )
			{
				$percentage = '50';
			}
			
			else
			{
				$percentage = ( @array_sum($correct) / ( @array_sum($correct) + @array_sum($incorrect) ) ) * 100;
			}
		}
		
		else
		{
			if( @array_sum($incorrect) == '0' )
			{
				$percentage = '100';
			}
			
			else if( @array_sum($correct) == '0' )
			{
				$percentage = '0';
			}
		}
		
		$update_play = "UPDATE " . QUIZ_GENERAL_TABLE . " SET quiz_plays = quiz_plays + 1 WHERE quiz_id = $id";
		
		if( !$db->sql_query($update_play) )
		{
			message_die(GENERAL_ERROR, 'Could not update play counter', '', __LINE__, __FILE__, $update_play);
		}
		
		$percentage = number_format($percentage, 0);
	
		$template->assign_vars(array( 
		"U_CORRECT_SCORE" => sprintf($lang['Quiz_show_correct_score'], @array_sum($correct)),
		"U_INCORRECT_SCORE" => sprintf($lang['Quiz_show_incorrect_score'], @array_sum($incorrect)),
		"U_PERCENTAGE" => $percentage . '%',
		
		"L_TIME_TAKEN" => sprintf($lang['Quiz_user_time_taken_quiz'], $minutes_taken_to_complete_quiz, $seconds_taken_to_complete_quiz),
		"L_RETURN_INDEX" => sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a>'),
		"L_RETURN_QUIZ" => sprintf($lang['Quiz_click_return_quiz'], '<a href="' . append_sid("quiz.$phpEx") . '">', '</a>'),
		"L_ANSWERS" => $lang['Quiz_score']));
			
			$statistics_sql = "INSERT INTO " . QUIZ_STATISTICS_TABLE . " (stats_id, quiz_id, user_id, stats_correct, stats_incorrect, stats_percentage) VALUES ('" . quiz_new_stats_id() . "', '$id', '" . $userdata['user_id'] . "', '" . @array_sum($correct) . "', '" . @array_sum($incorrect) . "', '$percentage')";
			
			if(!$db->sql_query($statistics_sql))
			{
				message_die(GENERAL_ERROR, '', 'Could not insert statistical values', __LINE__, __FILE__, $statistics_sql);
			}
			
			// Let's do the cash
			if( $board_config['Quiz_CashMOD_On'] == ON )
			{
			include($phpbb_root_path . 'includes/functions_cash.'.$phpEx);
			
				// Lets get the currency.. err... name?
				$get_cash_name = "SELECT cash_name FROM " . CASH_TABLE . " WHERE cash_dbfield = '" . $board_config['Quiz_Cash_Currency'] . "'";
				
					if( !$get_cash_result = $db->sql_query($get_cash_name) )
					{
						message_die(GENERAL_ERROR, 'Unable to execute cash name query', '', __LINE__, __FILE__, $get_cash_name);
					}
			
			$actual_cash_name = $db->sql_fetchrow($get_cash_result);
			
			$cash_per_correct = $board_config['Quiz_Cash_Correct'];
			$cash_per_incorrect = $board_config['Quiz_Cash_Incorrect'];
			$cash_tax = $board_config['Quiz_Cash_Tax'];
			
			$total_cash = ( ( @array_sum($correct) * $cash_per_correct ) - ( @array_sum($incorrect) * $cash_per_incorrect ) - ( $cash_tax ) );
			
			if( $total_cash > 0 || $total_cash == 0 )
			{
			$cash_language_variable = sprintf($lang['Quiz_cash_total_result_gain'], $total_cash, $actual_cash_name['cash_name']);
			
				$cash_sql = "UPDATE " . USERS_TABLE . " SET " . $board_config['Quiz_Cash_Currency'] . " = " . $board_config['Quiz_Cash_Currency'] . " + " . intval($total_cash) . " WHERE user_id = " . $userdata['user_id'];
			}
			
			else if( $total_cash < 0 )
			{
			$total_cash = str_replace('-', '', $total_cash);
			$cash_language_variable = sprintf($lang['Quiz_cash_total_result_loss'], $total_cash, $actual_cash_name['cash_name']);
			
				$cash_sql = "UPDATE " . USERS_TABLE . " SET " . $board_config['Quiz_Cash_Currency'] . " = " . $board_config['Quiz_Cash_Currency'] . " - " . intval($total_cash) . " WHERE user_id = " . $userdata['user_id'];
			}
			
				if( !$db->sql_query($cash_sql) )
				{
					message_die(GENERAL_ERROR, 'Unable to execute cash update', '', __LINE__, __FILE__, $cash_sql);
				}
			
			$template->assign_block_vars('cash_row', array());
			$template->assign_vars(array("U_CASH" => $cash_language_variable));
			}
			
		$template->pparse("quiz_result");
		include($phpbb_root_path . "includes/page_tail.$phpEx");
	}

	
	$page_title = $lang['Quiz_quizzes'];
	include($phpbb_root_path . "includes/page_header.$phpEx");
	$template->set_filenames(array("quiz_index" => "quiz_index_body.tpl"));
	
		if( !$userdata['session_logged_in'] )
		{
			$sql_suffix = "WHERE category_permissions = 0 OR category_permissions = 1";
		}
		
		else
		{
			$sql_suffix = '';
		}
	
	$sql = "SELECT * FROM " . QUIZ_CATEGORY_TABLE . " $sql_suffix";
		
	if(!$result = $db->sql_query($sql))
	{
		message_die(GENERAL_ERROR, '', 'Could not obtain quiz category data', __LINE__, __FILE__);
	}
	
	while($row = $db->sql_fetchrow($result))
	{
	$category_id = intval($row['category_id']);
	$category_name = str_replace("\'", "''", $row['category_name']);
	$category_description = str_replace("\'", "''", $row['category_description']);
	$category_quizzes = category_quizzes($category_id);
	
	$template->assign_block_vars("quiz_row", array(
	"U_NAME" => "<a href='" .  append_sid("quiz.$phpEx?" . POST_CAT_URL . "=$category_id") . "'>$category_name</a>",
	"U_DESCRIPTION" => $category_description,
	"U_QUIZZES" => $category_quizzes . ' ' . $lang['Quiz_quizzes']));
	}

	$template->assign_vars(array( 
	"U_SUBMIT_QUIZ" => "<a href='" . append_sid("quiz.$phpEx?mode=add") . "'>" . $lang['Submit_quiz'] . "</a>",
	"U_STATISTICS_LINK" => "<a href='" . append_sid("quiz_stats.$phpEx") . "'>" . $lang['Quiz_stats'] . "</a>",
	
	"L_QUIZZES" => ( $board_config['Quiz_timeout'] == 0 ) ? $lang['Quiz_quizzes'] : sprintf($lang['Quiz_user_time_on_index'], $board_config['Quiz_timeout']),
	"L_ANSWERS" => $lang['Quiz_score']));
	
	if( $board_config['Quiz_CashMOD_On'] == ON )
	{
	// Just noticed that there are 971 line so far, can we make 1000? Yep
	$template->assign_block_vars('cash_row', array());
	$quiz_cash_correct = intval($board_config['Quiz_Cash_Correct']);
	$quiz_cash_incorrect = intval($board_config['Quiz_Cash_Incorrect']);
	$quiz_cash_tax = intval($board_config['Quiz_Cash_Tax']);
	
	$template->assign_vars( array(
	"CASH_INFORMATION" => sprintf($lang['Quiz_cash_information'], $quiz_cash_correct, $quiz_cash_incorrect, $quiz_cash_tax)));
	// I'm now depressed, that was the first time this series I haven't labelled it L_, U_, or F_. Pfft
	}
	
	$template->pparse("quiz_index");
	include($phpbb_root_path . "includes/page_tail.$phpEx");
?>
User avatar
battye
Site Admin
Site Admin
Posts: 14391
Joined: Sun Jan 11, 2004 8:26 am
Location: Australia
Contact:

Not that source code, the source code you get when you right click your browser window and click View Source Code (or View Page Source in Mozilla :))
CricketMX.com in 2022: Still the home of bat's, rat's and other farmyard animals!

"OK, life [as you chose to define it] repeats until there are no more lessons to be learned." - nrnoble (June 12, 2005)
"the new forum looks awesome, it's getting bigger & better" - p2p-sharing-rules (11 Jan, 2008)
"Looks like CMX is not only getting bigger...but, also getting better!!" - moongirl (14 Dec, 2007)
roopeshpdit
Frequent Poster
Frequent Poster
Posts: 25
Joined: Tue Jul 10, 2007 8:46 pm

Code: Select all

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">


<title>AboutQuiz.com :: Edit Quiz</title>
<!-- link rel="stylesheet" href="templates/subSilver/subSilver.css" type="text/css" -->
<style type="text/css">
<!--
/*
  The original subSilver Theme for phpBB version 2+
  Created by subBlue design
  http://www.subBlue.com

  NOTE: These CSS definitions are stored within the main page body so that you can use the phpBB2
  theme administration centre. When you have finalised your style you could cut the final CSS code
  and place it in an external file, deleting this section to save bandwidth.
*/

/* General page style. The scroll bar colours only visible in IE5.5+ */
body {
	background-color: #E5E5E5;
	scrollbar-face-color: #DEE3E7;
	scrollbar-highlight-color: #FFFFFF;
	scrollbar-shadow-color: #DEE3E7;
	scrollbar-3dlight-color: #D1D7DC;
	scrollbar-arrow-color:  #006699;
	scrollbar-track-color: #EFEFEF;
	scrollbar-darkshadow-color: #98AAB1;
}

/* General font families for common tags */
font,th,td,p { font-family: Verdana, Arial, Helvetica, sans-serif }
a:link,a:active,a:visited { color : #006699; }
a:hover		{ text-decoration: underline; color : #DD6900; }
hr	{ height: 0px; border: solid #D1D7DC 0px; border-top-width: 1px;}

/* This is the border line & background colour round the entire page */
.bodyline	{ background-color: #FFFFFF; border: 1px #98AAB1 solid; }

/* This is the outline round the main forum tables */
.forumline	{ background-color: #FFFFFF; border: 2px #006699 solid; }

/* Main table cell colours and backgrounds */
td.row1	{ background-color: #EFEFEF; }
td.row2	{ background-color: #DEE3E7; }
td.row3	{ background-color: #D1D7DC; }

/*
  This is for the table cell above the Topics, Post & Last posts on the index.php page
  By default this is the fading out gradiated silver background.
  However, you could replace this with a bitmap specific for each forum
*/
td.rowpic {
		background-color: #FFFFFF;
		background-image: url(templates/subSilver/images/cellpic2.jpg);
		background-repeat: repeat-y;
}

/* Header cells - the blue and silver gradient backgrounds */
th	{
	color: #FFA34F; font-size: 11px; font-weight : bold;
	background-color: #006699; height: 25px;
	background-image: url(templates/subSilver/images/cellpic3.gif);
}

td.cat,td.catHead,td.catSides,td.catLeft,td.catRight,td.catBottom {
			background-image: url(templates/subSilver/images/cellpic1.gif);
			background-color:#D1D7DC; border: #FFFFFF; border-style: solid; height: 28px;
}

/*
  Setting additional nice inner borders for the main table cells.
  The names indicate which sides the border will be on.
  Don't worry if you don't understand this, just ignore it :-)
*/
td.cat,td.catHead,td.catBottom {
	height: 29px;
	border-width: 0px 0px 0px 0px;
}
th.thHead,th.thSides,th.thTop,th.thLeft,th.thRight,th.thBottom,th.thCornerL,th.thCornerR {
	font-weight: bold; border: #FFFFFF; border-style: solid; height: 28px;
}
td.row3Right,td.spaceRow {
	background-color: #D1D7DC; border: #FFFFFF; border-style: solid;
}

th.thHead,td.catHead { font-size: 12px; border-width: 1px 1px 0px 1px; }
th.thSides,td.catSides,td.spaceRow	 { border-width: 0px 1px 0px 1px; }
th.thRight,td.catRight,td.row3Right	 { border-width: 0px 1px 0px 0px; }
th.thLeft,td.catLeft	  { border-width: 0px 0px 0px 1px; }
th.thBottom,td.catBottom  { border-width: 0px 1px 1px 1px; }
th.thTop	 { border-width: 1px 0px 0px 0px; }
th.thCornerL { border-width: 1px 0px 0px 1px; }
th.thCornerR { border-width: 1px 1px 0px 0px; }

/* The largest text used in the index page title and toptic title etc. */
.maintitle	{
	font-weight: bold; font-size: 22px; font-family: "Trebuchet MS",Verdana, Arial, Helvetica, sans-serif;
	text-decoration: none; line-height : 120%; color : #000000;
}

/* General text */
.gen { font-size : 12px; }
.genmed { font-size : 11px; }
.gensmall { font-size : 10px; }
.gen,.genmed,.gensmall { color : #000000; }
a.gen,a.genmed,a.gensmall { color: #006699; text-decoration: none; }
a.gen:hover,a.genmed:hover,a.gensmall:hover	{ color: #DD6900; text-decoration: underline; }

/* The register, login, search etc links at the top of the page */
.mainmenu		{ font-size : 11px; color : #000000 }
a.mainmenu		{ text-decoration: none; color : #006699;  }
a.mainmenu:hover{ text-decoration: underline; color : #DD6900; }

/* Forum category titles */
.cattitle		{ font-weight: bold; font-size: 12px ; letter-spacing: 1px; color : #006699}
a.cattitle		{ text-decoration: none; color : #006699; }
a.cattitle:hover{ text-decoration: underline; }

/* Forum title: Text and link to the forums used in: index.php */
.forumlink		{ font-weight: bold; font-size: 12px; color : #006699; }
a.forumlink 	{ text-decoration: none; color : #006699; }
a.forumlink:hover{ text-decoration: underline; color : #DD6900; }

/* Used for the navigation text, (Page 1,2,3 etc) and the navigation bar when in a forum */
.nav			{ font-weight: bold; font-size: 11px; color : #000000;}
a.nav			{ text-decoration: none; color : #006699; }
a.nav:hover		{ text-decoration: underline; }

/* titles for the topics: could specify viewed link colour too */
.topictitle,h1,h2	{ font-weight: bold; font-size: 11px; color : #000000; }
a.topictitle:link   { text-decoration: none; color : #006699; }
a.topictitle:visited { text-decoration: none; color : #5493B4; }
a.topictitle:hover	{ text-decoration: underline; color : #DD6900; }

/* Name of poster in viewmsg.php and viewtopic.php and other places */
.name			{ font-size : 11px; color : #000000;}

/* Location, number of posts, post date etc */
.postdetails		{ font-size : 10px; color : #000000; }

/* The content of the posts (body of text) */
.postbody { font-size : 12px; line-height: 18px}
a.postlink:link	{ text-decoration: none; color : #006699 }
a.postlink:visited { text-decoration: none; color : #5493B4; }
a.postlink:hover { text-decoration: underline; color : #DD6900}

/* Quote & Code blocks */
.code {
	font-family: Courier, 'Courier New', sans-serif; font-size: 11px; color: #006600;
	background-color: #FAFAFA; border: #D1D7DC; border-style: solid;
	border-left-width: 1px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px
}

.quote {
	font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; color: #444444; line-height: 125%;
	background-color: #FAFAFA; border: #D1D7DC; border-style: solid;
	border-left-width: 1px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px
}

/* Copyright and bottom info */
.copyright		{ font-size: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; color: #444444; letter-spacing: -1px;}
a.copyright		{ color: #444444; text-decoration: none;}
a.copyright:hover { color: #000000; text-decoration: underline;}

/* Form elements */
input,textarea, select {
	color : #000000;
	font: normal 11px Verdana, Arial, Helvetica, sans-serif;
	border-color : #000000;
}

/* The text input fields background colour */
input.post, textarea.post, select {
	background-color : #FFFFFF;
}

input { text-indent : 2px; }

/* The buttons used for bbCode styling in message post */
input.button {
	background-color : #EFEFEF;
	color : #000000;
	font-size: 11px; font-family: Verdana, Arial, Helvetica, sans-serif;
}

/* The main submit button option */
input.mainoption {
	background-color : #FAFAFA;
	font-weight : bold;
}

/* None-bold submit button */
input.liteoption {
	background-color : #FAFAFA;
	font-weight : normal;
}

/* This is the line in the posting page which shows the rollover
  help line. This is actually a text box, but if set to be the same
  colour as the background no one will know ;)
*/
.helpline { background-color: #DEE3E7; border-style: none; }

/* Import the fancy styles for IE only (NS4.x doesn't use the @import function) */
@import url("templates/subSilver/formIE.css");

.pm { color: #ffffff; background: #d3262a; border: 1px solid #000000; text-decoration: none}
-->
</style>
<script language="Javascript" type="text/javascript">
    <!--
       if ( 0 )
          {
          new_pm_prompt = confirm('You have no new messages. Click OK to go to your Inbox.');
             if(new_pm_prompt == true) {
                // Redirect to Inbox if OK is clicked.
                window.location = 'privmsg.php?folder=inbox';
             }
             else {
                // Close prompt if Cancel is clicked.
             }
          }
    //-->
    </script>
</head>
<body bgcolor="#E5E5E5" text="#000000" link="#006699" vlink="#5493B4">

<a name="top"></a>

<table width="100%" cellspacing="0" cellpadding="10" border="0" align="center">
	<tr>
		<td class="bodyline"><table width="100%" cellspacing="0" cellpadding="0" border="0">
			<tr>
				<td><a href="index.php"><img src="templates/subSilver/images/logo_phpBB.gif" border="0" alt="AboutQuiz.com Forum Index" vspace="1" /></a></td>
				<td align="center" width="100%" valign="middle"><span class="maintitle">AboutQuiz.com</span><br /><span class="gen">The Way to Master Quizzes<br />&nbsp; </span>
				<table cellspacing="0" cellpadding="2" border="0">

					<tr>
						<td align="center" valign="top" nowrap="nowrap"><span class="mainmenu">&nbsp;<a href="music.php" class="mainmenu"><img src="templates/subSilver/images/icon_mini_music.gif" width="12" height="13" border="0" alt="Music Online" hspace="3" />Music Online</a> &nbsp;&nbsp;<a href="faq.php" class="mainmenu"><img src="templates/subSilver/images/icon_mini_faq.gif" width="12" height="13" border="0" alt="FAQ" hspace="3" />FAQ</a>&nbsp; &nbsp;<span class="mainmenu">&nbsp;<a href="quiz.php" class="mainmenu"><img src="templates/subSilver/images/icon_mini_quiz.gif" width="12" height="13" border="0" alt="Quizzes" hspace="3" />Quizzes</a></span><a href="search.php" class="mainmenu"><img src="templates/subSilver/images/icon_mini_search.gif" width="12" height="13" border="0" alt="Search" hspace="3" />Search</a>&nbsp; &nbsp;<a href="memberlist.php" class="mainmenu"><img src="templates/subSilver/images/icon_mini_members.gif" width="12" height="13" border="0" alt="Memberlist" hspace="3" />Memberlist</a>&nbsp; &nbsp;<a href="groupcp.php" class="mainmenu"><img src="templates/subSilver/images/icon_mini_groups.gif" width="12" height="13" border="0" alt="Usergroups" hspace="3" />Usergroups</a>&nbsp;
						</span></td>
					</tr>

					<tr>
						<td height="25" align="center" valign="top" nowrap="nowrap"><span class="mainmenu">&nbsp;<a href="profile.php?mode=editprofile" class="mainmenu"><img src="templates/subSilver/images/icon_mini_profile.gif" width="12" height="13" border="0" alt="Profile" hspace="3" />Profile</a>&nbsp; &nbsp;<a href="privmsg.php?folder=inbox" class="mainmenu"><img src="templates/subSilver/images/icon_mini_message.gif" width="12" height="13" border="0" alt="You have no new messages" hspace="3" />You have no new messages</a>&nbsp; &nbsp;<a href="login.php?logout=true&sid=bddf47b67bb8a32cd4f9bc4294eba73f" class="mainmenu"><img src="templates/subSilver/images/icon_mini_login.gif" width="12" height="13" border="0" alt="Log out [ roopesh ]" hspace="3" />Log out [ roopesh ]</a>&nbsp;</span></td>
					</tr>
				</table></td>
			</tr>
		</table>

		<br />

<form method="post" action="quiz_cp.php?mode=edit&type=sql&q=1">
<input type="hidden" name="quizzes" value="16" />

	<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
		<tr>
			<th colspan="2" width="100%" class="thTop" nowrap="nowrap">&nbsp;Edit Quiz&nbsp;</th>
		</tr>

		<tr>
			<td class="row2" colspan="2" align="center" valign="middle">
				<span class="gen">You can edit the name, questions, and answers of a quiz here:<br />Check the box next to the correct answer</span>
			</td>
		</tr>

		<tr>
			<td class="row1" colspan="2" align="center" valign="middle">

				<span class="gen"><br />Insert Quiz Name <input type="text" name="name" value="Toefl(ibt) Reading 01 " /><br /><br /></span>
			</td>
		</tr>

		<tr>
			<td class="row2" width="70%" colspan="1" align="center" valign="middle">
				<span class="gen">
					Question <input type="text" name="Q_6" value="[size=24:]Lascaux Cave Paintings[/size:][newline]In Southwest France in the 1940’s, playing children discovered Lascaux Grotto, a series of narrow cave chambers that contain huge prehistoric paintings of animals. Many of these beasts are as large as 16 feet (almost 5 meters). Some follow each other in solemn parades, but [color=red:]others[/color:] swirl about, sideways and upside down. The animals are bulls, wild horses, reindeer, bison, and mammoths outlined with charcoal and painted mostly in reds, yellow, and browns. Scientific analysis reveals that the colors were derived from ocher and other iron oxides ground into a fine powder. [color=red:]Methods[/color:] of applying color varied: some colors were brushed or smeared on rock surfaces and others were blown or sprayed. It is possible that tubes made from animal bones were used for spraying because hollow bones, some stained with pigment, have been found nearby.<br/>One of the most puzzling aspects of the paintings is their location. Other rock paintings—for example, those of Bushmen in South Africa—are either located near cave entrances or completely in the open.  Cave paintings in France and Spain, however, are in recesses and caverns far removed from original cave entrances.  This means that artists were forced to work in cramped spaces and without sources of natural light.  It also implies that whoever made them did not want them to be easily found.  Since cave dwellers normally lived close to entrances, there must have been some reason why so many generations of Lascaux cave dwellers hid their art.<br/>Scholars offer three related but different opinions about the mysterious origin and significance of these paintings. One opinion is that the paintings were a record of seasonal migrations made by herds. Because some paintings were made directly over others, obliterating them, it is probable that a painting’s value ended with the migration it pictured. Unfortunately, this explanation fails to explain the hidden locations, unless the migrations were celebrated with [color=red:]secret ceremonies[/color:].<br/>Another opinion is that the paintings were directly related to hunting and were an essential part of a special preparation ceremony. This opinion holds that the pictures and whatever ceremony they [color=red:]accompanied[/color:] were an ancient method of psychologically motivating hunters. It is conceivable that before going hunting the hunters would draw or study pictures of animals and imagine a successful hunt. Considerable support exists for this opinion because several animals in the pictures are wounded by arrows and spears. This opinion also attempts to solve the overpainting by explaining that an animal’s picture had no further use after the hunt.<br/>A third opinion takes psychological motivation much further into the realm of tribal ceremonies and mystery: the belief that certain animals assumed mythical significance as ancient ancestors or protectors of a given tribe or clan. Two types of images substantiate this theory: the strange, indecipherable geometric shapes that appear near some animals, and the few drawings of men. Wherever men appear they are crudely drawn and their bodies are elongated and rigid. Some men are in a prone position and some have bird or animal heads. Advocates for this opinion point to reports from people who have experienced a trance state, a highly suggestive state of low consciousness between waking and sleeping. Uniformly, these people experienced weightlessness and the sensation that their bodies were being stretched lengthwise. Advocates also point to people who believe that the forces of nature are inhabited by spirits, particularly shamans who believe that an animal’s spirit and energy is transferred to them while in a trance. One Lascaux narrative picture, which shows a man with a birdlike head and a wounded animal, would seem to lend credence to this third opinion, but there is still much that remains unexplained. For example, where is the proof that the man in the picture is a shaman? He could as easily be a hunter wearing a headmask. Many tribal hunters, including some Native Americans, camouflaged themselves by wearing animal heads and hides.<br/>Perhaps so much time has passed that there will never be satisfactory answers to the cave images, but their mystique only adds to their importance. Certainly a great art exists, and by its existence reveals that ancient human beings were not without intelligence, skill, and sensitivity." /><br />

				</span>
			</td>

			<td class="row2" width="30%" colspan="1" align="left" valign="middle">
				<span class="gen">
					<input type="text" name="A1_6" value="Alternate Answer" /> <input type="radio" name="C_6" value="A1_6" /><br />
					<input type="text" name="A2_6" value="Alternate Answer" /> <input type="radio" name="C_6" value="A2_6" /><br />
					<input type="text" name="A3_6" value="Alternate Answer" /> <input type="radio" name="C_6" value="A3_6" /><br />

					<input type="text" name="A4_6" value="Alternate Answer" /> <input type="radio" name="C_6" value="A4_6" />
				</span>
			</td>
		</tr>
		<tr>
			<td class="row2" width="70%" colspan="1" align="center" valign="middle">
				<span class="gen">
					Question <input type="text" name="Q_5" value="Lascaux Cave Paintings In Southwest France in the 1940’s, playing children discovered Lascaux Grotto, a series of narrow cave chambers that contain huge prehistoric paintings of animals. Many of these beasts are as large as 16 feet (almost 5 meters). Some follow each other in solemn parades, but others swirl about, sideways and upside down. The animals are bulls, wild horses, reindeer, bison, and mammoths outlined with charcoal and painted mostly in reds, yellow, and browns. Scientific analysis reveals that the colors were derived from ocher and other iron oxides ground into a fine powder. Methods of applying color varied: some colors were brushed or smeared on rock surfaces and others were blown or sprayed. It is possible that tubes made from animal bones were used for spraying because hollow bones, some stained with pigment, have been found nearby. One of the most puzzling aspects of the paintings is their location. Other rock paintings—for example, those of Bushmen in South Africa—are either located near cave entrances or completely in the open. X1[color]Cave paintings in France and Spain, however, are in recesses and caverns far removed from original cave entrances.[color=red]X2[color] This means that artists were forced to work in cramped spaces and without sources of natural light. [color=red]X3[color]It also implies that whoever made them did not want them to be easily found.[color=red]X4[color] Since cave dwellers normally lived close to entrances, there must have been some reason why so many generations of Lascaux cave dwellers hid their art.Scholars offer three related but different opinions about the mysterious origin and significance of these paintings. One opinion is that the paintings were a record of seasonal migrations made by herds. Because some paintings were made directly over others, obliterating them, it is probable that a painting’s value ended with the migration it pictured. Unfortunately, this explanation fails to explain the hidden locations, unless the migrations were celebrated with [color=red]secret ceremonies.Another opinion is that the paintings were directly related to hunting and were an essential part of a special preparation ceremony. This opinion holds that the pictures and whatever ceremony they accompanied were an ancient method of psychologically motivating hunters. It is conceivable that before going hunting the hunters would draw or study pictures of animals and imagine a successful hunt. Considerable support exists for this opinion because several animals in the pictures are wounded by arrows and spears. This opinion also attempts to solve the overpainting by explaining that an animal’s picture had no further use after the hunt. A third opinion takes psychological motivation much further into the realm of tribal ceremonies and mystery: the belief that certain animals assumed mythical significance as ancient ancestors or protectors of a given tribe or clan. Two types of images substantiate this theory: the strange, indecipherable geometric shapes that appear near some animals, and the few drawings of men. Wherever men appear they are crudely drawn and their bodies are elongated and rigid. Some men are in a prone position and some have bird or animal heads. Advocates for this opinion point to reports from people who have experienced a [color=red]trance state[color], a highly suggestive state of low consciousness between waking and sleeping. Uniformly, these people experienced weightlessness and the sensation that their bodies were being stretched lengthwise. Advocates also point to people who believe that the forces of nature are inhabited by spirits, particularly shamans who believe that an animal’s spirit and energy is transferred to them while in a trance. One Lascaux narrative picture, which shows a man with a birdlike head and a wounded animal, would seem to lend credence to this third opinion, but there is still much that remains unexplained. For example, where is the proof that the man in the picture is a shaman? He could as easily be a hunter wearing a headmask. Many tribal hunters, including some Native Americans, camouflaged themselves by wearing animal heads and hides. Perhaps so much time has passed that there will never be satisfactory answers to the cave images, but their mystique only adds to their importance. Certainly a great art exists, and by its existence reveals that ancient human beings were not without intelligence, skill, and sensitivity." /><br />

				</span>
			</td>

			<td class="row2" width="30%" colspan="1" align="left" valign="middle">
				<span class="gen">
					<input type="text" name="A1_5" value="Alternate Answer" /> <input type="radio" name="C_5" value="A1_5" /><br />
					<input type="text" name="A2_5" value="Alternate Answer" /> <input type="radio" name="C_5" value="A2_5" /><br />
					<input type="text" name="A3_5" value="Alternate Answer" /> <input type="radio" name="C_5" value="A3_5" /><br />

					<input type="text" name="A4_5" value="Alternate Answer" /> <input type="radio" name="C_5" value="A4_5" />
				</span>
			</td>
		</tr>
		<tr>
			<td class="row2" width="70%" colspan="1" align="center" valign="middle">
				<span class="gen">
					Question <input type="text" name="Q_4" value="Question" /><br />

				</span>
			</td>

			<td class="row2" width="30%" colspan="1" align="left" valign="middle">
				<span class="gen">
					<input type="text" name="A1_4" value="Alternate Answer" /> <input type="radio" name="C_4" value="A1_4" /><br />
					<input type="text" name="A2_4" value="Alternate Answer" /> <input type="radio" name="C_4" value="A2_4" /><br />
					<input type="text" name="A3_4" value="Alternate Answer" /> <input type="radio" name="C_4" value="A3_4" /><br />

					<input type="text" name="A4_4" value="Alternate Answer" /> <input type="radio" name="C_4" value="A4_4" />
				</span>
			</td>
		</tr>
		<tr>
			<td class="row2" width="70%" colspan="1" align="center" valign="middle">
				<span class="gen">
					Question <input type="text" name="Q_3" value="Question" /><br />

				</span>
			</td>

			<td class="row2" width="30%" colspan="1" align="left" valign="middle">
				<span class="gen">
					<input type="text" name="A1_3" value="Alternate Answer" /> <input type="radio" name="C_3" value="A1_3" /><br />
					<input type="text" name="A2_3" value="Alternate Answer" /> <input type="radio" name="C_3" value="A2_3" /><br />
					<input type="text" name="A3_3" value="Alternate Answer" /> <input type="radio" name="C_3" value="A3_3" /><br />

					<input type="text" name="A4_3" value="Alternate Answer" /> <input type="radio" name="C_3" value="A4_3" />
				</span>
			</td>
		</tr>
		<tr>
			<td class="row2" width="70%" colspan="1" align="center" valign="middle">
				<span class="gen">
					Question <input type="text" name="Q_2" value="Question" /><br />

				</span>
			</td>

			<td class="row2" width="30%" colspan="1" align="left" valign="middle">
				<span class="gen">
					<input type="text" name="A1_2" value="Alternate Answer" /> <input type="radio" name="C_2" value="A1_2" /><br />
					<input type="text" name="A2_2" value="Alternate Answer" /> <input type="radio" name="C_2" value="A2_2" /><br />
					<input type="text" name="A3_2" value="Alternate Answer" /> <input type="radio" name="C_2" value="A3_2" /><br />

					<input type="text" name="A4_2" value="Alternate Answer" /> <input type="radio" name="C_2" value="A4_2" />
				</span>
			</td>
		</tr>
		<tr>
			<td class="row2" width="70%" colspan="1" align="center" valign="middle">
				<span class="gen">
					Question <input type="text" name="Q_1" value="Lascaux Cave Paintings In Southwest France in the 1940’s, playing children discovered Lascaux Grotto, a series of narrow cave chambers that contain huge prehistoric paintings of animals. Many of these beasts are as large as 16 feet (almost 5 meters). Some follow each other in solemn parades, but others swirl about, sideways and upside down. The animals are bulls, wild horses, reindeer, bison, and mammoths outlined with charcoal and painted mostly in reds, yellow, and browns. Scientific analysis reveals that the colors were derived from ocher and other iron oxides ground into a fine powder. Methods of applying color varied: some colors were brushed or smeared on rock surfaces and others were blown or sprayed. It is possible that tubes made from animal bones were used for spraying because hollow bones, some stained with pigment, have been found nearby. One of the most puzzling aspects of the paintings is their location. Other rock paintings—for example, those of Bushmen in South Africa—a" /><br />

				</span>
			</td>

			<td class="row2" width="30%" colspan="1" align="left" valign="middle">
				<span class="gen">
					<input type="text" name="A1_1" value="Alternate Answer" /> <input type="radio" name="C_1" value="A1_1" /><br />
					<input type="text" name="A2_1" value="Alternate Answer" /> <input type="radio" name="C_1" value="A2_1" /><br />
					<input type="text" name="A3_1" value="Alternate Answer" /> <input type="radio" name="C_1" value="A3_1" /><br />

					<input type="text" name="A4_1" value="Alternate Answer" /> <input type="radio" name="C_1" value="A4_1" />
				</span>
			</td>
		</tr>
		<tr>
			<td class="row2" width="70%" colspan="1" align="center" valign="middle">
				<span class="gen">
					Question <input type="text" name="Q_7" value="Question" /><br />

				</span>
			</td>

			<td class="row2" width="30%" colspan="1" align="left" valign="middle">
				<span class="gen">
					<input type="text" name="A1_7" value="Alternate Answer" /> <input type="radio" name="C_7" value="A1_7" /><br />
					<input type="text" name="A2_7" value="Alternate Answer" /> <input type="radio" name="C_7" value="A2_7" /><br />
					<input type="text" name="A3_7" value="Alternate Answer" /> <input type="radio" name="C_7" value="A3_7" /><br />

					<input type="text" name="A4_7" value="Alternate Answer" /> <input type="radio" name="C_7" value="A4_7" />
				</span>
			</td>
		</tr>
		<tr>
			<td class="row2" width="70%" colspan="1" align="center" valign="middle">
				<span class="gen">
					Question <input type="text" name="Q_8" value="Question" /><br />

				</span>
			</td>

			<td class="row2" width="30%" colspan="1" align="left" valign="middle">
				<span class="gen">
					<input type="text" name="A1_8" value="Alternate Answer" /> <input type="radio" name="C_8" value="A1_8" /><br />
					<input type="text" name="A2_8" value="Alternate Answer" /> <input type="radio" name="C_8" value="A2_8" /><br />
					<input type="text" name="A3_8" value="Alternate Answer" /> <input type="radio" name="C_8" value="A3_8" /><br />

					<input type="text" name="A4_8" value="Alternate Answer" /> <input type="radio" name="C_8" value="A4_8" />
				</span>
			</td>
		</tr>
		<tr>
			<td class="row2" width="70%" colspan="1" align="center" valign="middle">
				<span class="gen">
					Question <input type="text" name="Q_9" value="Question" /><br />

				</span>
			</td>

			<td class="row2" width="30%" colspan="1" align="left" valign="middle">
				<span class="gen">
					<input type="text" name="A1_9" value="Alternate Answer" /> <input type="radio" name="C_9" value="A1_9" /><br />
					<input type="text" name="A2_9" value="Alternate Answer" /> <input type="radio" name="C_9" value="A2_9" /><br />
					<input type="text" name="A3_9" value="Alternate Answer" /> <input type="radio" name="C_9" value="A3_9" /><br />

					<input type="text" name="A4_9" value="Alternate Answer" /> <input type="radio" name="C_9" value="A4_9" />
				</span>
			</td>
		</tr>
		<tr>
			<td class="row2" width="70%" colspan="1" align="center" valign="middle">
				<span class="gen">
					Question <input type="text" name="Q_10" value="Question" /><br />

				</span>
			</td>

			<td class="row2" width="30%" colspan="1" align="left" valign="middle">
				<span class="gen">
					<input type="text" name="A1_10" value="Alternate Answer" /> <input type="radio" name="C_10" value="A1_10" /><br />
					<input type="text" name="A2_10" value="Alternate Answer" /> <input type="radio" name="C_10" value="A2_10" /><br />
					<input type="text" name="A3_10" value="Alternate Answer" /> <input type="radio" name="C_10" value="A3_10" /><br />

					<input type="text" name="A4_10" value="Alternate Answer" /> <input type="radio" name="C_10" value="A4_10" />
				</span>
			</td>
		</tr>
		<tr>
			<td class="row2" width="70%" colspan="1" align="center" valign="middle">
				<span class="gen">
					Question <input type="text" name="Q_11" value="Question" /><br />

				</span>
			</td>

			<td class="row2" width="30%" colspan="1" align="left" valign="middle">
				<span class="gen">
					<input type="text" name="A1_11" value="Alternate Answer" /> <input type="radio" name="C_11" value="A1_11" /><br />
					<input type="text" name="A2_11" value="Alternate Answer" /> <input type="radio" name="C_11" value="A2_11" /><br />
					<input type="text" name="A3_11" value="Alternate Answer" /> <input type="radio" name="C_11" value="A3_11" /><br />

					<input type="text" name="A4_11" value="Alternate Answer" /> <input type="radio" name="C_11" value="A4_11" />
				</span>
			</td>
		</tr>
		<tr>
			<td class="row2" width="70%" colspan="1" align="center" valign="middle">
				<span class="gen">
					Question <input type="text" name="Q_12" value="Question" /><br />

				</span>
			</td>

			<td class="row2" width="30%" colspan="1" align="left" valign="middle">
				<span class="gen">
					<input type="text" name="A1_12" value="Alternate Answer" /> <input type="radio" name="C_12" value="A1_12" /><br />
					<input type="text" name="A2_12" value="Alternate Answer" /> <input type="radio" name="C_12" value="A2_12" /><br />
					<input type="text" name="A3_12" value="Alternate Answer" /> <input type="radio" name="C_12" value="A3_12" /><br />

					<input type="text" name="A4_12" value="Alternate Answer" /> <input type="radio" name="C_12" value="A4_12" />
				</span>
			</td>
		</tr>
		<tr>
			<td class="row2" width="70%" colspan="1" align="center" valign="middle">
				<span class="gen">
					Question <input type="text" name="Q_13" value="Question" /><br />

				</span>
			</td>

			<td class="row2" width="30%" colspan="1" align="left" valign="middle">
				<span class="gen">
					<input type="text" name="A1_13" value="Alternate Answer" /> <input type="radio" name="C_13" value="A1_13" /><br />
					<input type="text" name="A2_13" value="Alternate Answer" /> <input type="radio" name="C_13" value="A2_13" /><br />
					<input type="text" name="A3_13" value="Alternate Answer" /> <input type="radio" name="C_13" value="A3_13" /><br />

					<input type="text" name="A4_13" value="Alternate Answer" /> <input type="radio" name="C_13" value="A4_13" />
				</span>
			</td>
		</tr>
		<tr>
			<td class="row2" width="70%" colspan="1" align="center" valign="middle">
				<span class="gen">
					Question <input type="text" name="Q_14" value="Question" /><br />

				</span>
			</td>

			<td class="row2" width="30%" colspan="1" align="left" valign="middle">
				<span class="gen">
					<input type="text" name="A1_14" value="Alternate Answer" /> <input type="radio" name="C_14" value="A1_14" /><br />
					<input type="text" name="A2_14" value="Alternate Answer" /> <input type="radio" name="C_14" value="A2_14" /><br />
					<input type="text" name="A3_14" value="Alternate Answer" /> <input type="radio" name="C_14" value="A3_14" /><br />

					<input type="text" name="A4_14" value="Alternate Answer" /> <input type="radio" name="C_14" value="A4_14" />
				</span>
			</td>
		</tr>
		<tr>
			<td class="row2" width="70%" colspan="1" align="center" valign="middle">
				<span class="gen">
					Question <input type="text" name="Q_15" value="Question" /><br />

				</span>
			</td>

			<td class="row2" width="30%" colspan="1" align="left" valign="middle">
				<span class="gen">
					<input type="text" name="A1_15" value="Alternate Answer" /> <input type="radio" name="C_15" value="A1_15" /><br />
					<input type="text" name="A2_15" value="Alternate Answer" /> <input type="radio" name="C_15" value="A2_15" /><br />
					<input type="text" name="A3_15" value="Alternate Answer" /> <input type="radio" name="C_15" value="A3_15" /><br />

					<input type="text" name="A4_15" value="Alternate Answer" /> <input type="radio" name="C_15" value="A4_15" />
				</span>
			</td>
		</tr>
		<tr>
			<td class="row2" width="70%" colspan="1" align="center" valign="middle">
				<span class="gen">
					Question <input type="text" name="Q_16" value="Question" /><br />

				</span>
			</td>

			<td class="row2" width="30%" colspan="1" align="left" valign="middle">
				<span class="gen">
					<input type="text" name="A1_16" value="Alternate Answer" /> <input type="radio" name="C_16" value="A1_16" /><br />
					<input type="text" name="A2_16" value="Alternate Answer" /> <input type="radio" name="C_16" value="A2_16" /><br />
					<input type="text" name="A3_16" value="Alternate Answer" /> <input type="radio" name="C_16" value="A3_16" /><br />

					<input type="text" name="A4_16" value="Alternate Answer" /> <input type="radio" name="C_16" value="A4_16" />
				</span>
			</td>
		</tr>

		<tr>
			<th colspan="3" class="catBottom" align="center" height="28">
				<input class="liteoption" type="submit" name="submit" value="Submit" />
			</th>

		</tr>
	</table>
</form>
<br />
<table width="100%" align="center" border="0">
	<tr>
		<td border="0" align="center">
			<span class="genmed">&nbsp;<a href="http://www.cmxmods.net/quiz.php">Ultimate Quiz MOD</a> &copy; <a href="http://www.online-scrabble.com">battye</a> 2004, 2005, 2006.&nbsp;

			</span>
		</td>
	</tr>
</table>

<div align="center"><span class="copyright"><br /><a href="admin/index.php?sid=bddf47b67bb8a32cd4f9bc4294eba73f">Go to Administration Panel</a><br /><br /><br />
<!--
	We request you retain the full copyright notice below including the link to www.phpbb.com.
	This not only gives respect to the large amount of time given freely by the developers
	but also helps build interest, traffic and use of phpBB 2.0. If you cannot (for good
	reason) retain the full copyright we request you at least leave in place the
	Powered by phpBB line, with phpBB linked to www.phpbb.com. If you refuse
	to include even this then support on our forums may be affected.

	The phpBB Group : 2002
// -->
Powered by <a href="http://www.phpbb.com/" target="_phpbb" class="copyright">phpBB</a> &copy; 2001, 2005 phpBB Group<br /></span></div>

		</td>
	</tr>
</table>

</body>
</html>

This edit code
User avatar
battye
Site Admin
Site Admin
Posts: 14391
Joined: Sun Jan 11, 2004 8:26 am
Location: Australia
Contact:

Interesting, I do see it: <br/>

I think I know where the problem is (an extra instance of htmlspecialchars()) so I'll try and find the solution for you over the next 24 hours.
CricketMX.com in 2022: Still the home of bat's, rat's and other farmyard animals!

"OK, life [as you chose to define it] repeats until there are no more lessons to be learned." - nrnoble (June 12, 2005)
"the new forum looks awesome, it's getting bigger & better" - p2p-sharing-rules (11 Jan, 2008)
"Looks like CMX is not only getting bigger...but, also getting better!!" - moongirl (14 Dec, 2007)
roopeshpdit
Frequent Poster
Frequent Poster
Posts: 25
Joined: Tue Jul 10, 2007 8:46 pm

If we change the input boxes in to text boxes will that help?
User avatar
battye
Site Admin
Site Admin
Posts: 14391
Joined: Sun Jan 11, 2004 8:26 am
Location: Australia
Contact:

Was that the submit page you posted or the playing quiz page?
CricketMX.com in 2022: Still the home of bat's, rat's and other farmyard animals!

"OK, life [as you chose to define it] repeats until there are no more lessons to be learned." - nrnoble (June 12, 2005)
"the new forum looks awesome, it's getting bigger & better" - p2p-sharing-rules (11 Jan, 2008)
"Looks like CMX is not only getting bigger...but, also getting better!!" - moongirl (14 Dec, 2007)
roopeshpdit
Frequent Poster
Frequent Poster
Posts: 25
Joined: Tue Jul 10, 2007 8:46 pm

It was the submit page
Post Reply