Skip to content

Commit

Permalink
Added new str_replace for templates - {TEMPLATEURL} - which is replac…
Browse files Browse the repository at this point in the history
…ed by the URL of the template directory being used (for insertion of graphics etc in templates)

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/trunk/unstable@305 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
jcleeland committed May 25, 2003
1 parent fd917b3 commit a4af603
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions index.php
Expand Up @@ -147,7 +147,11 @@ function templatereplace($line)
global $help, $totalquestions;
global $completed, $surveyurl, $surveyurldescrip;
global $notanswered, $privacy, $sid;
global $publicurl, $templatedir;

if ($templatedir) {$templateurl="$publicurl/templates/$templatedir/";}
else {$templateurl="$publicurl/templates/default/";}

$clearall = "\t\t\t\t\t<div class='clearall'><a href='{$_SERVER['PHP_SELF']}?sid=$sid&move=clearall' onClick='return confirm(\"Are you sure you want to clear all your responses?\")'>[Exit and Clear Survey]</a></div>\n";


Expand Down Expand Up @@ -180,6 +184,7 @@ function templatereplace($line)
$line=str_replace("{URL}", "<a href='$surveyurl'>$surveyurldescrip</a>", $line);
$line=str_replace("{PRIVACY}", $privacy, $line);
$line=str_replace("{CLEARALL}", $clearall, $line);
$line=str_replace("{TEMPLATEURL}", $templateurl, $line);
return $line;
}

Expand Down

0 comments on commit a4af603

Please sign in to comment.