forked from science-ation/science-ation
Oops, guess i should test before committing -- this fixes the syntax error, as well as allows more weird chars to be properly set and saved as division/category titles
This commit is contained in:
parent
e7222337f7
commit
4ddbffe4bb
@ -49,7 +49,7 @@
|
|||||||
mysql_query("UPDATE projectcategories SET ".
|
mysql_query("UPDATE projectcategories SET ".
|
||||||
"id='".intval($_POST['id'])."', ".
|
"id='".intval($_POST['id'])."', ".
|
||||||
"category='".mysql_real_escape_string($_POST['category'])."', ".
|
"category='".mysql_real_escape_string($_POST['category'])."', ".
|
||||||
"category_shortform='".mysql_real_escape_string(($_POST['category_shortform'])."', ".
|
"category_shortform='".mysql_real_escape_string($_POST['category_shortform'])."', ".
|
||||||
"mingrade='".intval($_POST['mingrade'])."', ".
|
"mingrade='".intval($_POST['mingrade'])."', ".
|
||||||
"maxgrade='".intval($_POST['maxgrade'])."' ".
|
"maxgrade='".intval($_POST['maxgrade'])."' ".
|
||||||
"WHERE id='".intval($_POST['saveid'])."'");
|
"WHERE id='".intval($_POST['saveid'])."'");
|
||||||
@ -70,7 +70,7 @@
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
mysql_query("INSERT INTO projectcategories (id,category,category_shortform,mingrade,maxgrade,conferences_id) VALUES ( ".
|
mysql_query("INSERT INTO projectcategories (id,category,category_shortform,mingrade,maxgrade,conferences_id) VALUES ( ".
|
||||||
"'".intval($_POST['id']."', ".
|
"'".intval($_POST['id'])."', ".
|
||||||
"'".mysql_real_escape_string($_POST['category'])."', ".
|
"'".mysql_real_escape_string($_POST['category'])."', ".
|
||||||
"'".mysql_real_escape_string($_POST['category_shortform'])."', ".
|
"'".mysql_real_escape_string($_POST['category_shortform'])."', ".
|
||||||
"'".intval($_POST['mingrade'])."', ".
|
"'".intval($_POST['mingrade'])."', ".
|
||||||
@ -121,8 +121,8 @@
|
|||||||
}
|
}
|
||||||
echo "<tr>";
|
echo "<tr>";
|
||||||
echo " <td><input type=\"text\" size=\"3\" name=\"id\" value=\"$categoryr->id\"></td>";
|
echo " <td><input type=\"text\" size=\"3\" name=\"id\" value=\"$categoryr->id\"></td>";
|
||||||
echo " <td><input type=\"text\" size=\"20\" name=\"category\" value=\"$categoryr->category\"></td>";
|
echo " <td><input type=\"text\" size=\"20\" name=\"category\" value=\"".htmlentities($categoryr->category)."\"></td>";
|
||||||
echo " <td><input type=\"text\" size=\"5\" name=\"category_shortform\" value=\"$categoryr->category_shortform\"></td>";
|
echo " <td><input type=\"text\" size=\"5\" name=\"category_shortform\" value=\"".htmlentities($categoryr->category_shortform)."\"></td>";
|
||||||
echo " <td><input type=\"text\" size=\"3\" name=\"mingrade\" value=\"$categoryr->mingrade\"></td>";
|
echo " <td><input type=\"text\" size=\"3\" name=\"mingrade\" value=\"$categoryr->mingrade\"></td>";
|
||||||
echo " <td><input type=\"text\" size=\"3\" name=\"maxgrade\" value=\"$categoryr->maxgrade\"></td>";
|
echo " <td><input type=\"text\" size=\"3\" name=\"maxgrade\" value=\"$categoryr->maxgrade\"></td>";
|
||||||
echo " <td><input type=\"submit\" value=\"".i18n($buttontext)."\"></td>";
|
echo " <td><input type=\"submit\" value=\"".i18n($buttontext)."\"></td>";
|
||||||
|
@ -146,8 +146,8 @@ if($_GET['action']=="edit" || $_GET['action']=="new") {
|
|||||||
}
|
}
|
||||||
echo "<tr>";
|
echo "<tr>";
|
||||||
echo " <td><input type=\"text\" size=\"3\" name=\"id\" value=\"$divisionr->id\" /></td>";
|
echo " <td><input type=\"text\" size=\"3\" name=\"id\" value=\"$divisionr->id\" /></td>";
|
||||||
echo " <td><input type=\"text\" size=\"40\" name=\"division\" value=\"$divisionr->division\" /></td>";
|
echo " <td><input type=\"text\" size=\"40\" name=\"division\" value=\"".htmlentities($divisionr->division)."\" /></td>";
|
||||||
echo " <td align=\"center\"><input type=\"text\" size=\"5\" name=\"division_shortform\" value=\"$divisionr->division_shortform\" /></td>";
|
echo " <td align=\"center\"><input type=\"text\" size=\"5\" name=\"division_shortform\" value=\"".htmlentities($divisionr->division_shortform)."\" /></td>";
|
||||||
|
|
||||||
//###### Feature Specific - filtering divisions by category
|
//###### Feature Specific - filtering divisions by category
|
||||||
if($config['filterdivisionbycategory']=="yes"){
|
if($config['filterdivisionbycategory']=="yes"){
|
||||||
|
@ -126,7 +126,7 @@
|
|||||||
echo "</select>";
|
echo "</select>";
|
||||||
echo "</td>";
|
echo "</td>";
|
||||||
echo " <td><input type=\"text\" size=\"3\" name=\"id\" value=\"$divisionr->id\"></td>";
|
echo " <td><input type=\"text\" size=\"3\" name=\"id\" value=\"$divisionr->id\"></td>";
|
||||||
echo " <td><input type=\"text\" size=\"30\" name=\"subdivision\" value=\"$divisionr->subdivision\"></td>";
|
echo " <td><input type=\"text\" size=\"30\" name=\"subdivision\" value=\"".htmlentities($divisionr->subdivision)."\"></td>";
|
||||||
echo " <td><input type=\"submit\" value=\"".i18n($buttontext)."\"></td>";
|
echo " <td><input type=\"submit\" value=\"".i18n($buttontext)."\"></td>";
|
||||||
echo "</tr>";
|
echo "</tr>";
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user