- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
$query =
'SELECT * ' .
'FROM `requests` ' .
'WHERE `requests`.`uid` = \'' . mysql_escape_string($uid) . '\' ' .
'AND `requests`.`status` = 0 ' .
'';
$requests = $this->execQuery($query);
if ( !$requests) {
$this->lastError = 'Error getting user\'s data. ';
return false;
} else {
$questions = $this->findAllQuestions();
foreach ($requests as $n => $request) {
$requests[$n]['quiz'] = unserialize(
unserialize($request['quiz'])
);
foreach ($requests[$n]['quiz'] as $qid => $answer) {
$currentQuestion = &$requests[$n]['quiz'][$qid];
$currentQuestion = array();
$currentQuestion['qid'] = $qid;
if (is_array($questions[$qid]['answers'])) {
$currentQuestion['question'] = $questions[$qid]['question'];
$currentQuestion['aid'] = $answer;
$currentQuestion['answer'] = $questions[$qid]['answers'][$answer]['answer'];;
} else {
$currentQuestion['question'] = $questions[$qid]['question'];
$currentQuestion['aid'] = null;
$currentQuestion['answer'] = $answer;
}
}
}
}
return $requests;
}
Holden 07.10.2009 11:10 # +4
guest 07.10.2009 11:22 # 0
$questions = $this->findAllQuestions();
foreach ($requests as $n => $request) {
....
мего юзер лог какой-то )))
bildja 10.10.2009 12:30 # +1
guest 11.10.2009 10:52 # +1
werd 11.10.2009 22:57 # 0
454 24.08.2021 21:36 # 0