Skip to content

Commit

Permalink
'localised' modanswer routine
Browse files Browse the repository at this point in the history
git-svn-id: file:///Users/Shitiz/Downloads/lssvn/trunk/unstable@445 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
jcleeland committed Jul 2, 2003
1 parent 9f640a3 commit d0e505b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions admin/database.php
Expand Up @@ -243,10 +243,10 @@
}
switch ($_POST['ansaction'])
{
case "Fix Sort":
case _AL_FIXSORT:
fixsortorder($_POST['qid']);
break;
case "Add":
case _AL_ADD:
if (!$_POST['code'] || !$_POST['answer'])
{
echo "<script type=\"text/javascript\">\n<!--\n alert(\"Could not add answer. You must include both a Code AND an Answer\")\n //-->\n</script>\n";
Expand All @@ -267,7 +267,7 @@
}
}
break;
case "Save":
case _AL_SAVE:
if (!$_POST['code'] || !$_POST['answer'])
{
echo "<script type=\"text/javascript\">\n<!--\n alert(\"Could not save changes. You must include both a Code AND an Answer\")\n //-->\n</script>\n";
Expand Down Expand Up @@ -303,7 +303,7 @@
}
}
break;
case "Del":
case _AL_DEL:
$ccquery = "SELECT * FROM conditions WHERE cqid={$_POST['qid']} AND value='{$_POST['oldcode']}'";
$ccresult = mysql_query($ccquery) or die ("Couldn't get list of cqids for this answer<br />$ccquery<br />".mysql_error());
$cccount=mysql_num_rows($ccresult);
Expand All @@ -320,7 +320,7 @@
}
fixsortorder($qid);
break;
case "Up":
case _AL_UP:
$newsortorder=sprintf("%05d", $_POST['sortorder']-1);
$replacesortorder=$newsortorder;
$newreplacesortorder=sprintf("%05d", $_POST['sortorder']);
Expand All @@ -331,7 +331,7 @@
$cdquery = "UPDATE answers SET sortorder='$newreplacesortorder' WHERE qid=$qid AND sortorder='PEND'";
$cdresult=mysql_query($cdquery) or die(mysql_error());
break;
case "Dn":
case _AL_DN:
$newsortorder=sprintf("%05d", $_POST['sortorder']+1);
$replacesortorder=$newsortorder;
$newreplacesortorder=sprintf("%05d", $_POST['sortorder']);
Expand Down

0 comments on commit d0e505b

Please sign in to comment.