diff --git a/.Rhistory b/.Rhistory new file mode 100644 index 0000000..e69de29 diff --git a/core/fileManager.php b/core/fileManager.php index 8d14939..e60c1a9 100755 --- a/core/fileManager.php +++ b/core/fileManager.php @@ -165,7 +165,7 @@ function getstats($completed) // template name is set and is < 30 characters if(!isset($form["template-name"]) || strlen($form["template-name"]) > 30 /*|| - $form["template-name"] != preg_replace('/[^A-Za-z0-9]+/','',$form["template-name"])*/) + $form["template-name"] != preg_replace('/[^\p{L}\p{N}]+/','',$form["template-name"])*/) { $errors .= "
  • "; $errors .= "Please input a valid template name (less than 30 characters)"; @@ -221,7 +221,7 @@ function getstats($completed) // category name if(!isset($form["tabs".$i."-catlabel-input"]) || strlen($form["tabs".$i."-catlabel-input"]) > 30 || - $form["tabs".$i."-catlabel-input"] != preg_replace('/[^A-Za-z0-9\-\(\)\$\#\@\? ]+/', '', $form["tabs".$i."-catlabel-input"])) + $form["tabs".$i."-catlabel-input"] != preg_replace('/[^\p{L}\p{N}\-\(\)\$\#\@\? ]+/u', '', $form["tabs".$i."-catlabel-input"])) { $errors .= "
  • "; $errors .= "Please input a valid category label for Category " . $catnames[$i-1]; @@ -229,13 +229,13 @@ function getstats($completed) } else { - // add category label + // add category label0 $newform["cat".$catnames[$i-1]]["label"] = $form["tabs".$i."-catlabel-input"]; } // data label if(!isset($form["tabs".$i."-datalabel-input"]) || strlen($form["tabs".$i."-datalabel-input"]) > 3 || - $form["tabs".$i."-datalabel-input"] != preg_replace('/[^A-Za-z0-9]+/','',$form["tabs".$i."-datalabel-input"])) + $form["tabs".$i."-datalabel-input"] != preg_replace('/[^\p{L}\p{N}]+/u','',$form["tabs".$i."-datalabel-input"])) { $errors .= "
  • "; $errors .= "Please input a valid data label for Category " . $catnames[$i-1] . " (less than 3 alphanumeric characters)"; @@ -280,14 +280,14 @@ function getstats($completed) if(array_key_exists("cat".$catnames[$i-1].$j."-txt", $form)) { // check if has ".jpg", etc. - if( preg_match("/\.[A-Za-z]{2,4}/",$form["cat".$catnames[$i-1].$j."-txt"])) + if( preg_match("/\.[\p{L}]{2,4}/u",$form["cat".$catnames[$i-1].$j."-txt"])) { $errors .= "
  • "; $errors .= "The text input, '" . $form["cat".$catnames[$i-1].$j."-txt"]; $errors .= "' in Category " . $catnames[$i-1] . " appears to be a file name."; $errors .= "
  • "; } - else if ( preg_match("/[^A-Za-z0-9\-\(\)\$\#\@\? ]+/", $form["cat".$catnames[$i-1].$j."-txt"])) + else if ( preg_match("/[^\p{L}\p{N}\-\(\)\$\#\@\? ]+/u", $form["cat".$catnames[$i-1].$j."-txt"])) { $errors .= "
  • "; $errors .= "The text input, '" . $form["cat".$catnames[$i-1].$j."-txt"]; diff --git a/core/survey.php b/core/survey.php index cb22aba..50982aa 100644 --- a/core/survey.php +++ b/core/survey.php @@ -5,6 +5,7 @@ <?php echo $IATname; ?> IAT Survey + diff --git a/createdb.sh b/createdb.sh index 4693fe2..f3df361 100644 --- a/createdb.sh +++ b/createdb.sh @@ -7,7 +7,7 @@ if [ ${#MYSQL} -lt "5" ]; then exit 1 fi -Q1="CREATE DATABASE IF NOT EXISTS IAT555;" +Q1="CREATE DATABASE IF NOT EXISTS IAT555 CHARACTER SET utf8 COLLATE utf8_unicode_ci;" Q2="CREATE USER 'IATexp555'@'localhost' IDENTIFIED BY 'myIAT';" Q3="GRANT ALL ON IAT555.* TO 'IATexp555'@'localhost';" Q4="FLUSH PRIVILEGES;" diff --git a/experimenter.php b/experimenter.php index d030ca4..5303f34 100644 --- a/experimenter.php +++ b/experimenter.php @@ -2,7 +2,7 @@ IAT Experimenter Page - + diff --git a/index.php b/index.php index 3435015..ad7f133 100644 --- a/index.php +++ b/index.php @@ -2,6 +2,7 @@ Online IAT +