comparison admajax.php @ 977:a1da651a2e45

Add compo notes field.
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 29 Nov 2014 13:08:17 +0200
parents b0a8cb63334e
children 678b44a20e1a
comparison
equal deleted inserted replaced
976:b0a8cb63334e 977:a1da651a2e45
152 " Type: ".stGetFormOptionListFromArray($prefix."type".$id, " ", FALSE, $compoModeData, $item["ctype"], 0, 0, "updateCompoType(".$id.")"). 152 " Type: ".stGetFormOptionListFromArray($prefix."type".$id, " ", FALSE, $compoModeData, $item["ctype"], 0, 0, "updateCompoType(".$id.")").
153 " - ".$compoModeData[$item["ctype"]][1]."<br />\n". 153 " - ".$compoModeData[$item["ctype"]][1]."<br />\n".
154 " Name: ".stGetFormTextInput(40, SET_LEN_COMPO_NAME, "name", $id, $prefix, $item["name"])."<br />\n". 154 " Name: ".stGetFormTextInput(40, SET_LEN_COMPO_NAME, "name", $id, $prefix, $item["name"])."<br />\n".
155 $str1. 155 $str1.
156 " ".stGetFormTextArea(8, 60, "description", $id, $prefix, $item["description"])."<br />\n". 156 " ".stGetFormTextArea(8, 60, "description", $id, $prefix, $item["description"])."<br />\n".
157 " ".stGetFormTextArea(8, 40, "notes", $id, $prefix, $item["notes"])."\n".
157 " ".stGetFormCheckBoxInput("visible", $id, $prefix, $item["visible"], "Visible")."\n". 158 " ".stGetFormCheckBoxInput("visible", $id, $prefix, $item["visible"], "Visible")."\n".
158 $str2."\n". 159 $str2."\n".
159 " ".stGetFormButtonInput("update", $id, $prefix, "Update", "updateCompo(".$id.")")."\n". 160 " ".stGetFormButtonInput("update", $id, $prefix, "Update", "updateCompo(".$id.")")."\n".
160 " ".stGetFormButtonInput("delete", $id, $prefix, "Delete", "deleteCompo(".$id.")")."\n"; 161 " ".stGetFormButtonInput("delete", $id, $prefix, "Delete", "deleteCompo(".$id.")")."\n";
161 } 162 }
1714 } 1715 }
1715 else 1716 else
1716 if ($type == "compo" && stValidateRequestCompoData(FALSE, 0)) 1717 if ($type == "compo" && stValidateRequestCompoData(FALSE, 0))
1717 { 1718 {
1718 $sql = stPrepareSQL( 1719 $sql = stPrepareSQL(
1719 "INSERT INTO compos (name,description,visible,voting,show_authors,preview_type) VALUES (%S,%Q,0,0,0,0)", 1720 "INSERT INTO compos (name,description,notes,visible,voting,show_authors,preview_type) VALUES (%S,%Q,%Q,0,0,0,0)",
1720 "name", "description"); 1721 "name", "description", "notes");
1721 1722
1722 stExecSQLCond($sql, "OK, compo added."); 1723 stExecSQLCond($sql, "OK, compo added.");
1723 } 1724 }
1724 else 1725 else
1725 if ($type == "attendees" && stValidateRequestUserData(TRUE, FALSE)) 1726 if ($type == "attendees" && stValidateRequestUserData(TRUE, FALSE))
1838 $sql = stPrepareSQLUpdate("compos", 1839 $sql = stPrepareSQLUpdate("compos",
1839 "WHERE id=".$id, 1840 "WHERE id=".$id,
1840 array_merge(array( 1841 array_merge(array(
1841 "name" => "S", 1842 "name" => "S",
1842 "description" => "Q", 1843 "description" => "Q",
1844 "notes" => "Q",
1843 "visible" => "B", 1845 "visible" => "B",
1844 ), $cdata)); 1846 ), $cdata));
1845 1847
1846 stExecSQLCond($sql, "OK, compo updated."); 1848 stExecSQLCond($sql, "OK, compo updated.");
1847 } 1849 }