diff options
Diffstat (limited to 'src/team')
| -rw-r--r-- | src/team/clar.php | 4 | ||||
| -rw-r--r-- | src/team/header.php | 7 | ||||
| -rw-r--r-- | src/team/run.php | 11 |
3 files changed, 15 insertions, 7 deletions
diff --git a/src/team/clar.php b/src/team/clar.php index a1e3972..c763c2c 100644 --- a/src/team/clar.php +++ b/src/team/clar.php @@ -56,13 +56,13 @@ for ($i=0; $i<count($clar); $i++) { if ($clar[$i]["question"] == "") $clar[$i]["question"] = " "; echo " <td>"; // echo "<pre>" . $clar[$i]["question"] . "</pre>"; - echo " <textarea name=\"m$i\" cols=\"60\" rows=\"8\" readonly>".$clar[$i]["question"]."</textarea>\n"; + echo " <textarea name=\"m$i\" cols=\"60\" rows=\"8\" readonly>". unsanitizeText($clar[$i]["question"]) ."</textarea>\n"; echo "</td>\n"; if (trim($clar[$i]["answer"]) == "") $clar[$i]["answer"] = "Not answered yet"; echo " <td>"; // echo " <pre>" . $clar[$i]["answer"] . "</pre>"; - echo " <textarea name=\"a$i\" cols=\"60\" rows=\"8\" readonly>".$clar[$i]["answer"]."</textarea>\n"; + echo " <textarea name=\"a$i\" cols=\"60\" rows=\"8\" readonly>". unsanitizeText($clar[$i]["answer"]) ."</textarea>\n"; echo "</td>\n"; echo " </tr>\n"; } diff --git a/src/team/header.php b/src/team/header.php index ec7352a..a7e8168 100644 --- a/src/team/header.php +++ b/src/team/header.php @@ -60,10 +60,13 @@ $runtmp = $_SESSION["locr"] . $ds . "private" . $ds . "runtmp" . $ds . "run-cont "-site". $_SESSION["usertable"]["usersitenumber"] . "-user" . $_SESSION["usertable"]["usernumber"] . ".php"; $doslow=true; if(file_exists($runtmp)) { - if(($strtmp = file_get_contents($runtmp,FALSE,NULL,-1,1000000)) !== FALSE) { + if(($strtmp = file_get_contents($runtmp,FALSE,NULL,0,1000000)) !== FALSE) { $postab=strpos($strtmp,"\t"); $conf=globalconf(); - $strcolors = decryptData(substr($strtmp,$postab+1,strpos($strtmp,"\n")-$postab-1),$conf['key'],''); + if(isset($conf['doenc']) && $conf['doenc']) + $strcolors = decryptData(substr($strtmp,$postab+1,strpos($strtmp,"\n")-$postab-1),$conf['key'],''); + else + $strcolors = substr($strtmp,$postab+1,strpos($strtmp,"\n")-$postab-1); $doslow=false; $rn=explode("\t",$strcolors); $n=count($rn); diff --git a/src/team/run.php b/src/team/run.php index 077b76c..32c0d25 100644 --- a/src/team/run.php +++ b/src/team/run.php @@ -291,11 +291,13 @@ $redo = TRUE; if(!isset($_SESSION['forceredo']) || $_SESSION['forceredo']==false) { $actualdelay = 15; if(file_exists($runtmp)) { - if(isset($strtmp) || (($strtmp = file_get_contents($runtmp,FALSE,NULL,-1,1000000)) !== FALSE)) { + if(isset($strtmp) || (($strtmp = file_get_contents($runtmp,FALSE,NULL,0,1000000)) !== FALSE)) { list($d) = sscanf($strtmp,"%*s %d"); if($d > time() - $actualdelay) { $conf=globalconf(); - $strtmp = decryptData(substr($strtmp,strpos($strtmp,"\n")+1),$conf["key"],'runtmp'); + if(isset($conf['doenc']) && $conf['doenc']) + $strtmp = decryptData(substr($strtmp,strpos($strtmp,"\n")+1),$conf["key"],'runtmp'); + else $strtmp = substr($strtmp,strpos($strtmp,"\n")+1); if($strtmp !== false) $redo = FALSE; } @@ -416,7 +418,10 @@ if($redo) { "</form>\n"; } $conf=globalconf(); - $strtmp1 = "<!-- " . time() . " --> <?php exit; ?>\t" . encryptData($strcolors,$conf["key"],false) . "\n" . encryptData($strtmp,$conf["key"],false); + if(isset($conf['doenc']) && $conf['doenc']) + $strtmp1 = "<!-- " . time() . " --> <?php exit; ?>\t" . encryptData($strcolors,$conf["key"],false) . "\n" . encryptData($strtmp,$conf["key"],false); + else + $strtmp1 = "<!-- " . time() . " --> <?php exit; ?>\t" . $strcolors . "\n" . $strtmp; $randnum = session_id() . "_" . rand(); if(file_put_contents($runtmp . "_" . $randnum, $strtmp1,LOCK_EX)===FALSE) { if(!isset($_SESSION['writewarn'])) { |