Check-in [ed9e534869]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Remove additional exit codes potentially resulting in internal errors.
Timelines: family | ancestors | descendants | both | develop
Files: files | file ages | folders
SHA1:ed9e534869c94b56ba3244480b0d2fbb44e62950
User & Date: tux 2014-09-15 10:27:41
Context
2014-09-15
10:38
index.cgi: Add sanitization function to functions. index.cgi: Add comments. Leaf check-in: c74a7b455a user: tux tags: develop
10:27
Remove additional exit codes potentially resulting in internal errors. check-in: ed9e534869 user: tux tags: develop
10:27
Remove exit codes, resulting in internal errors. check-in: ea758fe3d3 user: tux tags: develop
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to index.cgi.

111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
...
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
case " $(POST) " in
	*\ save\ *)
		if [ "$(POST save)" == "category" ]; then
			# We're just creating a new category, let's get it over with quick
			category="$(POST category)"
			sql="INSERT INTO categories VALUES( NULL, \"$category\");"
			redir="Location: ${script}?category"
			exit 0
		elif [ "$(POST save)" == "member" ]; then
			name="$(POST name | sanitize)"
			phone="$(POST phone | sanitize)"
			email="$(POST email | sanitize)"
			memid="$(POST memid)"
			if [ "$memid" == "NULL" ]; then
				# We're adding a new member
................................................................................
				sql="INSERT INTO members VALUES( NULL, \"$name\", \"$phone\", \"$email\");"
				redir="Location: ${script}?member"
			else
				# We're updating an existing member
				sql="UPDATE members SET name=\"$name\", phone=\"$phone\", email=\"$email\" WHERE id == $memid"
				redir="Location: ${script}?member&id=$memid"
			fi
			exit 0
		elif [ "$(POST save)" == "project" ]; then
			title="$(POST title | sanitize)"
			desc="$(POST desc | sanitize)"
			p="$(POST p)"
			producer="$(POST producer)"
			editor="$(POST editor)"
			category=$(POST category)







<







 







<







111
112
113
114
115
116
117

118
119
120
121
122
123
124
...
125
126
127
128
129
130
131

132
133
134
135
136
137
138
case " $(POST) " in
	*\ save\ *)
		if [ "$(POST save)" == "category" ]; then
			# We're just creating a new category, let's get it over with quick
			category="$(POST category)"
			sql="INSERT INTO categories VALUES( NULL, \"$category\");"
			redir="Location: ${script}?category"

		elif [ "$(POST save)" == "member" ]; then
			name="$(POST name | sanitize)"
			phone="$(POST phone | sanitize)"
			email="$(POST email | sanitize)"
			memid="$(POST memid)"
			if [ "$memid" == "NULL" ]; then
				# We're adding a new member
................................................................................
				sql="INSERT INTO members VALUES( NULL, \"$name\", \"$phone\", \"$email\");"
				redir="Location: ${script}?member"
			else
				# We're updating an existing member
				sql="UPDATE members SET name=\"$name\", phone=\"$phone\", email=\"$email\" WHERE id == $memid"
				redir="Location: ${script}?member&id=$memid"
			fi

		elif [ "$(POST save)" == "project" ]; then
			title="$(POST title | sanitize)"
			desc="$(POST desc | sanitize)"
			p="$(POST p)"
			producer="$(POST producer)"
			editor="$(POST editor)"
			category=$(POST category)