????JFIF??x?x????'
| Server IP : 79.136.114.73 / Your IP : 216.73.217.114 Web Server : Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.29 OpenSSL/1.0.1f System : Linux b8009 3.13.0-170-generic #220-Ubuntu SMP Thu May 9 12:40:49 UTC 2019 x86_64 User : www-data ( 33) PHP Version : 5.5.9-1ubuntu4.29 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/www.supervision-online.se/login/scripts/ |
Upload File : |
<?php
$source_encoding = "ISO-8859-1";
$link = mysql_connect ("localhost", "root", "root123");
mysql_select_db ("supervision");
$LastUpdateDate = $_GET['lastUpdateDate'];
if($LastUpdateDate == ""){
$LastUpdateDate = "2010-01-01 00:00:00";
}else{
$LastUpdateDate = date("Y-m-d", strtotime($LastUpdateDate." -1 hour"));
}
$x=1;
$nbr_pos = 0;
$sql = "SELECT * FROM tblSymbolSets where companyid = ".$_GET['companyid'];
$result = mysql_query($sql);
while ($row = mysql_fetch_assoc($result)){
$found = false;
$sql = "SELECT * FROM tblUserRights where userid = ".$_GET['userid']." and symbolSetId =".$row['symbolSetId'];
$result10 = mysql_query($sql);
while ($row10 = mysql_fetch_assoc($result10)){
$found = true;
}
if($found == false){
$sql = "SELECT count(*) as pos FROM tblPositions where updatedate > '$LastUpdateDate' and symbolSetId = ".$row['symbolSetId'];
$result1 = mysql_query($sql);
while ($row1 = mysql_fetch_assoc($result1)){
$nbr_pos += $row1['pos'];
}
}
}
$temp = '<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">';
$temp .= '<dict>';
$sql = "SELECT * FROM tblSymbolSets where companyid = ".$_GET['companyid'];
$result1 = mysql_query($sql);
$SymbolSetX = 0;
while ($row1 = mysql_fetch_assoc($result1)){
$found = false;
$sql = "SELECT * FROM tblUserRights where userid = ".$_GET['userid']." and symbolSetId =".$row1['symbolSetId'];
$result10 = mysql_query($sql);
while ($row10 = mysql_fetch_assoc($result10)){
$found = true;
}
if($found == false){
$symbolSetId = $row1['symbolSetId'];
$SymbolSetX++;
$temp .= ' <key>SymbolSet'.$SymbolSetX.'</key>';
$temp .= ' <dict>';
$temp .= ' <key>IdentifyData</key>';
$temp .= ' <dict>';
$temp .= ' <key>Name</key>';
$temp .= ' <string>'.$row1['name'];
$temp .= '</string>';
$temp .= ' <key>LastUpdateDate</key>';
$temp .= ' <string>'.gmdate("Y-m-d H:i:s");
$temp .= '</string>';
$temp .= ' <key>SymbolSetId</key>';
$temp .= ' <integer>'.$row1['symbolSetId'];
$temp .= '</integer>';
$temp .= ' <key>Status1</key>';
$temp .= ' <dict>';
$temp .= ' <key>Image</key>';
$temp .= ' <string>'.$row1['status1'];
$temp .= '</string>';
$temp .= ' <key>ImageURL</key>';
$temp .= ' <string>'.$row1['status1url'];
$temp .= '</string>';
$temp .= ' </dict>';
$temp .= ' <key>Status2</key>';
$temp .= ' <dict>';
$temp .= ' <key>Image</key>';
$temp .= ' <string>'.$row1['status2'];
$temp .= '</string>';
$temp .= ' <key>ImageURL</key>';
$temp .= ' <string>'.$row1['status2url'];
$temp .= '</string>';
$temp .= ' </dict>';
$temp .= ' <key>Status3</key>';
$temp .= ' <dict>';
$temp .= ' <key>Image</key>';
$temp .= ' <string>'.$row1['status3'];
$temp .= '</string>';
$temp .= ' <key>ImageURL</key>';
$temp .= ' <string>'.$row1['status3url'];
$temp .= '</string>';
$temp .= ' </dict>';
$temp .= ' <key>Status4</key>';
$temp .= ' <dict>';
$temp .= ' <key>Image</key>';
$temp .= ' <string>'.$row1['status4'];
$temp .= '</string>';
$temp .= ' <key>ImageURL</key>';
$temp .= ' <string>'.$row1['status4url'];
$temp .= '</string>';
$temp .= ' </dict>';
$temp .= ' </dict>';
$temp .= ' <key>Questions</key>';
$temp .= ' <dict>';
$sql = "SELECT * FROM tblQuestions where tblQuestions.symbolSetId = ".$symbolSetId." order by questionId";
$result2 = mysql_query($sql);
$QuestionX = 0;
while ($row2 = mysql_fetch_assoc($result2)){
$QuestionX++;
$temp .= ' <key>Question'.$QuestionX.'</key>';
$temp .= ' <dict>';
$temp .= ' <key>QuestionId</key>';
$temp .= ' <integer>'.$row2['questionId'];
$temp .= '</integer>';
$temp .= ' <key>Text</key>';
$temp .= ' <string>'.$row2['question'];
$temp .= '</string>';
$temp .= ' <key>Info</key>';
$temp .= ' <string>'.$row2['info'];
$temp .= '</string>';
$temp .= ' <key>LabelYes</key>';
$temp .= ' <string>'.$row2['labelYes'];
$temp .= '</string>';
$temp .= ' <key>LabelNo</key>';
$temp .= ' <string>'.$row2['labelNo'];
$temp .= '</string>';
$temp .= ' <key>LabelYesGreen</key>';
$temp .= ' <string>'.$row2['labelYesGreen'];
$temp .= '</string>';
$temp .= ' <key>Forced</key>';
$temp .= ' <integer>'.$row2['forced'];
$temp .= '</integer>';
$temp .= ' <key>SubQuestions</key>';
$temp .= ' <dict>';
$sql = "SELECT * FROM tblSubQuestions where questionId = ".$row2['questionId'];
$result4 = mysql_query($sql);
$SubQuestionX = 0;
while ($row4 = mysql_fetch_assoc($result4)){
$SubQuestionX++;
$temp .= ' <key>SubQuestion'.$SubQuestionX.'</key>';
$temp .= ' <dict>';
$temp .= ' <key>SubQuestion</key>';
$temp .= ' <string>'.$row4['question'];
$temp .= '</string>';
$temp .= ' <key>SubQuestionId</key>';
$temp .= ' <integer>'.$row4['subExternalId'];
$temp .= '</integer>';
$temp .= ' </dict>';
$SubQuestionX++;
}
$temp .= ' </dict>';
$temp .= ' <key>History</key>';
$temp .= ' <dict>';
$sql = "SELECT * FROM tblHistory where questionId = ".$row2['questionId'];
$result4 = mysql_query($sql);
$HistoryX = 0;
while ($row4 = mysql_fetch_assoc($result4)){
$HistoryX++;
$temp .= ' <key>History'.$HistoryX.'</key>';
$temp .= ' <dict>';
$temp .= ' <key>History</key>';
$temp .= ' <string>'.$row4['history_value'];
$temp .= '</string>';
$temp .= ' <key>HistoryDate</key>';
$temp .= ' <string>'.$row4['date_value'];
$temp .= '</string>';
$temp .= ' </dict>';
$HistoryX++;
}
$temp .= ' </dict>';
$temp .= ' </dict>';
}
}
$temp .= ' </dict>';
}
$bytes = 7200 * $nbr_pos + strlen($temp);
header("Content-type: application/octet-stream");
header('Content-Disposition: attachment; filename="SymbolSets_'.$bytes.'.plist"');
echo(iconv($source_encoding,"UTF-8",'<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">'));
echo(iconv($source_encoding,"UTF-8",'<dict>'));
$sql = "SELECT * FROM tblSymbolSets where companyid = ".$_GET['companyid'];
$result1 = mysql_query($sql);
$SymbolSetX = 0;
while ($row1 = mysql_fetch_assoc($result1)){
$found = false;
$sql = "SELECT * FROM tblUserRights where userid = ".$_GET['userid']." and symbolSetId =".$row1['symbolSetId'];
$result10 = mysql_query($sql);
while ($row10 = mysql_fetch_assoc($result10)){
$found = true;
}
if($found == false){
$symbolSetId = $row1['symbolSetId'];
$SymbolSetX++;
echo(iconv($source_encoding,"UTF-8",' <key>SymbolSet'.$SymbolSetX.'</key>'));
echo(iconv($source_encoding,"UTF-8",' <dict>'));
echo(iconv($source_encoding,"UTF-8",' <key>IdentifyData</key>'));
echo(iconv($source_encoding,"UTF-8",' <dict>'));
echo(iconv($source_encoding,"UTF-8",' <key>Name</key>'));
echo(iconv($source_encoding,"UTF-8",' <string>'.$row1['name']));
echo(iconv($source_encoding,"UTF-8",'</string>'));
echo(iconv($source_encoding,"UTF-8",' <key>LastUpdateDate</key>'));
echo(iconv($source_encoding,"UTF-8",' <string>'.gmdate("Y-m-d H:i:s")));
echo(iconv($source_encoding,"UTF-8",'</string>'));
echo(iconv($source_encoding,"UTF-8",' <key>SymbolSetId</key>'));
echo(iconv($source_encoding,"UTF-8",' <integer>'.$row1['symbolSetId']));
echo(iconv($source_encoding,"UTF-8",'</integer>'));
echo(iconv($source_encoding,"UTF-8",' <key>Status1</key>'));
echo(iconv($source_encoding,"UTF-8",' <dict>'));
echo(iconv($source_encoding,"UTF-8",' <key>Image</key>'));
echo(iconv($source_encoding,"UTF-8",' <string>'.$row1['status1']));
echo(iconv($source_encoding,"UTF-8",'</string>'));
echo(iconv($source_encoding,"UTF-8",' <key>ImageURL</key>'));
echo(iconv($source_encoding,"UTF-8",' <string>'.$row1['status1url']));
echo(iconv($source_encoding,"UTF-8",'</string>'));
echo(iconv($source_encoding,"UTF-8",' </dict>'));
echo(iconv($source_encoding,"UTF-8",' <key>Status2</key>'));
echo(iconv($source_encoding,"UTF-8",' <dict>'));
echo(iconv($source_encoding,"UTF-8",' <key>Image</key>'));
echo(iconv($source_encoding,"UTF-8",' <string>'.$row1['status2']));
echo(iconv($source_encoding,"UTF-8",'</string>'));
echo(iconv($source_encoding,"UTF-8",' <key>ImageURL</key>'));
echo(iconv($source_encoding,"UTF-8",' <string>'.$row1['status2url']));
echo(iconv($source_encoding,"UTF-8",'</string>'));
echo(iconv($source_encoding,"UTF-8",' </dict>'));
echo(iconv($source_encoding,"UTF-8",' <key>Status3</key>'));
echo(iconv($source_encoding,"UTF-8",' <dict>'));
echo(iconv($source_encoding,"UTF-8",' <key>Image</key>'));
echo(iconv($source_encoding,"UTF-8",' <string>'.$row1['status3']));
echo(iconv($source_encoding,"UTF-8",'</string>'));
echo(iconv($source_encoding,"UTF-8",' <key>ImageURL</key>'));
echo(iconv($source_encoding,"UTF-8",' <string>'.$row1['status3url']));
echo(iconv($source_encoding,"UTF-8",'</string>'));
echo(iconv($source_encoding,"UTF-8",' </dict>'));
echo(iconv($source_encoding,"UTF-8",' <key>Status4</key>'));
echo(iconv($source_encoding,"UTF-8",' <dict>'));
echo(iconv($source_encoding,"UTF-8",' <key>Image</key>'));
echo(iconv($source_encoding,"UTF-8",' <string>'.$row1['status4']));
echo(iconv($source_encoding,"UTF-8",'</string>'));
echo(iconv($source_encoding,"UTF-8",' <key>ImageURL</key>'));
echo(iconv($source_encoding,"UTF-8",' <string>'.$row1['status4url']));
echo(iconv($source_encoding,"UTF-8",'</string>'));
echo(iconv($source_encoding,"UTF-8",' </dict>'));
echo(iconv($source_encoding,"UTF-8",' </dict>'));
echo(iconv($source_encoding,"UTF-8",' <key>Questions</key>'));
echo(iconv($source_encoding,"UTF-8",' <dict>'));
$sql = "SELECT * FROM tblQuestions where tblQuestions.symbolSetId = ".$symbolSetId." order by questionId";
$result2 = mysql_query($sql);
$QuestionX = 0;
while ($row2 = mysql_fetch_assoc($result2)){
$QuestionX++;
echo(iconv($source_encoding,"UTF-8",' <key>Question'.$QuestionX.'</key>'));
echo(iconv($source_encoding,"UTF-8",' <dict>'));
echo(iconv($source_encoding,"UTF-8",' <key>QuestionId</key>'));
echo(iconv($source_encoding,"UTF-8",' <integer>'.$row2['questionId']));
echo(iconv($source_encoding,"UTF-8",'</integer>'));
echo(iconv($source_encoding,"UTF-8",' <key>Text</key>'));
echo(iconv($source_encoding,"UTF-8",' <string>'.$row2['question']));
echo(iconv($source_encoding,"UTF-8",'</string>'));
echo(iconv($source_encoding,"UTF-8",' <key>Info</key>'));
echo(iconv($source_encoding,"UTF-8",' <string>'.$row2['info']));
echo(iconv($source_encoding,"UTF-8",'</string>'));
echo(iconv($source_encoding,"UTF-8",' <key>IsLabelYesNoRequired</key>'));
if($row2['labelYes'] == "TEXT"){
echo(iconv($source_encoding,"UTF-8",' <false/>'));
}else{
echo(iconv($source_encoding,"UTF-8",' <true/>'));
}
if($row2['labelYes'] == "TEXT"){
$min = $row2['tminValue'];
$max = $row2['tmaxValue'];
echo(iconv($source_encoding,"UTF-8",' <key>TextMinValue</key>'));
echo(iconv($source_encoding,"UTF-8",' <string>'.$min));
echo(iconv($source_encoding,"UTF-8",'</string>'));
echo(iconv($source_encoding,"UTF-8",' <key>TextMaxValue</key>'));
echo(iconv($source_encoding,"UTF-8",' <string>'.$max));
echo(iconv($source_encoding,"UTF-8",'</string>'));
}
echo(iconv($source_encoding,"UTF-8",' <key>LabelYes</key>'));
echo(iconv($source_encoding,"UTF-8",' <string>'.$row2['labelYes']));
echo(iconv($source_encoding,"UTF-8",'</string>'));
echo(iconv($source_encoding,"UTF-8",' <key>LabelNo</key>'));
echo(iconv($source_encoding,"UTF-8",' <string>'.$row2['labelNo']));
echo(iconv($source_encoding,"UTF-8",'</string>'));
echo(iconv($source_encoding,"UTF-8",' <key>LabelYesGreen</key>'));
echo(iconv($source_encoding,"UTF-8",' <string>'.$row2['labelYesGreen']));
echo(iconv($source_encoding,"UTF-8",'</string>'));
echo(iconv($source_encoding,"UTF-8",' <key>Forced</key>'));
echo(iconv($source_encoding,"UTF-8",' <integer>'.$row2['forced']));
echo(iconv($source_encoding,"UTF-8",'</integer>'));
echo(iconv($source_encoding,"UTF-8",' <key>SubQuestions</key>'));
echo(iconv($source_encoding,"UTF-8",' <dict>'));
$sql = "SELECT * FROM tblSubQuestions where questionId = ".$row2['questionId'];
$result4 = mysql_query($sql);
$SubQuestionX = 0;
while ($row4 = mysql_fetch_assoc($result4)){
$SubQuestionX++;
$subExternalId = $row4['subExternalId'];
if($subExternalId == ""){
$subExternalId = "0";
}
echo(iconv($source_encoding,"UTF-8",' <key>SubQuestion'.$SubQuestionX.'</key>'));
echo(iconv($source_encoding,"UTF-8",' <dict>'));
echo(iconv($source_encoding,"UTF-8",' <key>SubQuestion</key>'));
echo(iconv($source_encoding,"UTF-8",' <string>'.$row4['question']));
echo(iconv($source_encoding,"UTF-8",'</string>'));
echo(iconv($source_encoding,"UTF-8",' <key>SubQuestionId</key>'));
echo(iconv($source_encoding,"UTF-8",' <integer>'.$subExternalId));
echo(iconv($source_encoding,"UTF-8",'</integer>'));
echo(iconv($source_encoding,"UTF-8",' </dict>'));
}
echo(iconv($source_encoding,"UTF-8",' </dict>'));
echo(iconv($source_encoding,"UTF-8",' <key>History</key>'));
echo(iconv($source_encoding,"UTF-8",' <dict>'));
$sql = "SELECT * FROM tblHistory where questionId = ".$row2['questionId'];
$result4 = mysql_query($sql);
$HistoryX = 0;
while ($row4 = mysql_fetch_assoc($result4)){
$HistoryX++;
echo(iconv($source_encoding,"UTF-8",' <key>History'.$HistoryX.'</key>'));
echo(iconv($source_encoding,"UTF-8",' <dict>'));
echo(iconv($source_encoding,"UTF-8",' <key>History</key>'));
echo(iconv($source_encoding,"UTF-8",' <string>'.$row4['history_value']));
echo(iconv($source_encoding,"UTF-8",'</string>'));
echo(iconv($source_encoding,"UTF-8",' <key>HistoryDate</key>'));
echo(iconv($source_encoding,"UTF-8",' <string>'.$row4['date_value']));
echo(iconv($source_encoding,"UTF-8",'</string>'));
echo(iconv($source_encoding,"UTF-8",' </dict>'));
}
echo(iconv($source_encoding,"UTF-8",' </dict>'));
echo(iconv($source_encoding,"UTF-8",' </dict>'));
}
echo(iconv($source_encoding,"UTF-8",' </dict>'));
echo(iconv($source_encoding,"UTF-8",' <key>Positions</key>'));
echo(iconv($source_encoding,"UTF-8",' <dict>'));
$sql = "SELECT * FROM tblPositions where updatedate >= '$LastUpdateDate' and symbolSetId = ".$symbolSetId;
$result3 = mysql_query($sql);
$PositionsX = 0;
while ($row3 = mysql_fetch_assoc($result3)){
$PositionsX++;
echo(iconv($source_encoding,"UTF-8",' <key>Position'.$PositionsX.'</key>'));
echo(iconv($source_encoding,"UTF-8",' <dict>'));
echo(iconv($source_encoding,"UTF-8",' <key>Id</key>'));
echo(iconv($source_encoding,"UTF-8",' <integer>'.$row3['id'].'</integer>'));
echo(iconv($source_encoding,"UTF-8",' <key>PositionId</key>'));
echo(iconv($source_encoding,"UTF-8",' <integer>'.$row3['posid'].'</integer>'));
echo(iconv($source_encoding,"UTF-8",' <key>TempPositionId</key>'));
echo(iconv($source_encoding,"UTF-8",' <integer>'.$row3['tempposid'].'</integer>'));
echo(iconv($source_encoding,"UTF-8",' <key>Label</key>'));
echo(iconv($source_encoding,"UTF-8",' <string>'.$row3['label'].'</string>'));
echo(iconv($source_encoding,"UTF-8",' <key>Long</key>'));
echo(iconv($source_encoding,"UTF-8",' <real>'.$row3['pos_long'].'</real>'));
echo(iconv($source_encoding,"UTF-8",' <key>Lat</key>'));
echo(iconv($source_encoding,"UTF-8",' <real>'.$row3['pos_lat'].'</real>'));
echo(iconv($source_encoding,"UTF-8",' <key>Status</key>'));
echo(iconv($source_encoding,"UTF-8",' <integer>'.$row3['status'].'</integer>'));
echo(iconv($source_encoding,"UTF-8",' <key>Description</key>'));
echo(iconv($source_encoding,"UTF-8",' <string>'.$row3['description'].'</string>'));
echo(iconv($source_encoding,"UTF-8",' <key>Comment</key>'));
echo(iconv($source_encoding,"UTF-8",' <string>'.$row3['comment'].'</string>'));
echo(iconv($source_encoding,"UTF-8",' <key>ImagePath</key>'));
echo(iconv($source_encoding,"UTF-8",' <string>'.$row3['photopath'].'</string>'));
echo(iconv($source_encoding,"UTF-8",' <key>Answers</key>'));
echo(iconv($source_encoding,"UTF-8",' <dict>'));
$sql = "SELECT * FROM tblQuestions where tblQuestions.symbolSetId = ".$symbolSetId;
$result2 = mysql_query($sql);
$QuestionX = 0;
while ($row2 = mysql_fetch_assoc($result2)){
$QuestionX++;
$answerId = "0";
$labelYesNo = "";
$comment = "";
$subAnswer = "";
$imagePath = "";
$videoPath = "";
$soundPath = "";
$subAnswerId = "0";
$AdditionalComments = "";
//$sql = "SELECT * FROM tblAnswers where updatedate > '$LastUpdateDate' and questionId = ".$row2['questionId']." and PositionId = ".$row3['id'];
$sql = "SELECT * FROM tblAnswers where questionId = ".$row2['questionId']." and PositionId = ".$row3['id'];
$result5 = mysql_query($sql);
while ($row5 = mysql_fetch_assoc($result5)){
$labelYesNo = $row5['labelYesNo'];
$answerId = $row5['answerId'];
$comment = $row5['comment'];
$subAnswer = $row5['subAnswer'];
$subAnswerId = $row5['subAnswerId'];
$imagePath = $row5['imagePath'];
$videoPath = $row5['videoPath'];
$soundPath = $row5['soundPath'];
$AdditionalComments = $row5['AdditionalComments'];
}
if($subAnswerId == ""){
$subAnswerId = "0";
}
if($answerId == ""){
$answerId = "0";
}
$QuestionID = $row2['questionId'];
if($QuestionID == ""){
$QuestionID = "0";
}
echo(iconv($source_encoding,"UTF-8",' <key>Answer'.$QuestionX.'</key>'));
echo(iconv($source_encoding,"UTF-8",' <dict>'));
echo(iconv($source_encoding,"UTF-8",' <key>AdditionalComments</key>'));
echo(iconv($source_encoding,"UTF-8",' <string>'.$AdditionalComments));
echo(iconv($source_encoding,"UTF-8",'</string>'));
echo(iconv($source_encoding,"UTF-8",' <key>QuestionId</key>'));
echo(iconv($source_encoding,"UTF-8",' <integer>'.$QuestionID));
echo(iconv($source_encoding,"UTF-8",'</integer>'));
echo(iconv($source_encoding,"UTF-8",' <key>Answer</key>'));
echo(iconv($source_encoding,"UTF-8",' <string>'.$labelYesNo));
echo(iconv($source_encoding,"UTF-8",'</string>'));
echo(iconv($source_encoding,"UTF-8",' <key>Comment</key>'));
echo(iconv($source_encoding,"UTF-8",' <string>'.$comment));
echo(iconv($source_encoding,"UTF-8",'</string>'));
echo(iconv($source_encoding,"UTF-8",' <key>SubAnswer</key>'));
echo(iconv($source_encoding,"UTF-8",' <string>'.$subAnswer));
echo(iconv($source_encoding,"UTF-8",'</string>'));
echo(iconv($source_encoding,"UTF-8",' <key>SubAnswerId</key>'));
echo(iconv($source_encoding,"UTF-8",' <integer>'.$subAnswerId));
echo(iconv($source_encoding,"UTF-8",'</integer>'));
echo(iconv($source_encoding,"UTF-8",' <key>ImagePath</key>'));
echo(iconv($source_encoding,"UTF-8",' <string>'.$imagePath));
echo(iconv($source_encoding,"UTF-8",'</string>'));
echo(iconv($source_encoding,"UTF-8",' <key>VideoPath</key>'));
echo(iconv($source_encoding,"UTF-8",' <string>'.$videoPath));
echo(iconv($source_encoding,"UTF-8",'</string>'));
echo(iconv($source_encoding,"UTF-8",' <key>SoundPath</key>'));
echo(iconv($source_encoding,"UTF-8",' <string>'.$soundPath));
echo(iconv($source_encoding,"UTF-8",'</string>'));
echo(iconv($source_encoding,"UTF-8",' <key>History</key>'));
echo(iconv($source_encoding,"UTF-8",' <dict>'));
$sql = "SELECT * FROM tblHistory where answerId = ".$answerId;
$result6 = mysql_query($sql);
$HistoryX = 0;
while ($row6 = mysql_fetch_assoc($result6)){
$HistoryX++;
echo(iconv($source_encoding,"UTF-8",' <key>History'.$HistoryX.'</key>'));
echo(iconv($source_encoding,"UTF-8",' <dict>'));
echo(iconv($source_encoding,"UTF-8",' <key>History</key>'));
echo(iconv($source_encoding,"UTF-8",' <string>'.$row6['history_value']));
echo(iconv($source_encoding,"UTF-8",'</string>'));
echo(iconv($source_encoding,"UTF-8",' <key>HistoryDate</key>'));
echo(iconv($source_encoding,"UTF-8",' <string>'.$row6['date_value']));
echo(iconv($source_encoding,"UTF-8",'</string>'));
echo(iconv($source_encoding,"UTF-8",' </dict>'));
}
echo(iconv($source_encoding,"UTF-8",' </dict>'));
echo(iconv($source_encoding,"UTF-8",' </dict>'));
}
echo(iconv($source_encoding,"UTF-8",' </dict>'));
echo(iconv($source_encoding,"UTF-8",' <key>Comment</key>'));
echo(iconv($source_encoding,"UTF-8",' <string>'.$row3['comment'].'</string>'));
echo(iconv($source_encoding,"UTF-8",' <key>PhotoPath</key>'));
echo(iconv($source_encoding,"UTF-8",' <string>'.$row3['photopath'].'</string>'));
echo(iconv($source_encoding,"UTF-8",' <key>VideoPath</key>'));
echo(iconv($source_encoding,"UTF-8",' <string>'.$row3['videopath'].'</string>'));
echo(iconv($source_encoding,"UTF-8",' <key>SoundPath</key>'));
echo(iconv($source_encoding,"UTF-8",' <string>'.$row3['soundpath'].'</string>'));
echo(iconv($source_encoding,"UTF-8",' </dict>'));
}
echo(iconv($source_encoding,"UTF-8",' </dict>'));
echo(iconv($source_encoding,"UTF-8",'</dict>'));
}
}
echo(iconv($source_encoding,"UTF-8",'</dict>'));
echo(iconv($source_encoding,"UTF-8",'</plist>'));
?>