Eric Balsa sent in some code that exemplifies his former colleagues' approach to "simplistic design." If it's not immediately apparent why this method makes anything easier ... understand that this is actually a PHP include file. Make sense now?
include "../../../db.inc/db.inc.php"; //ED: Added line breaks ... $result = mysql_query("SELECT a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2, v2, w2, x2, y2, z2, a3, b3, c3, d3, e3, f3, g3, h3, i3, j3, k3, l3, m3, n3, o3, p3, q3, r3, s3, t3, u3, v3, w3, x3, y3, z3, a4, b4, c4, d4, e4, f4, g4, h4, i4, j4, k4, l4, m4, n4, o4, p4, q4, r4, s4, t4, u4, v4, w4, x4, y4, z4, a5, b5, c5, d5, e5, f5, g5, h5, i5, j5, k5, l5, m5, n5, o5, p5, q5, r5, s5, t5, u5, v5, w5, x5, y5, z5, a6, b6, c6, d6, e6, f6, g6, h6, i6, j6, k6, l6, m6, n6, o6, p6, q6, r6, s6, t6, u6, v6, w6, x6, y6, z6, a7, b7, c7, d7, e7, f7, g7, h7, i7, j7, k7, l7, m7, n7, o7, p7, q7, r7, s7, t7, u7, v7, w7, x7, y7, z7, a8, b8, c8, d8, e8, f8, g8, h8, i8, j8, k8, l8, m8, n8, o8, p8, q8, r8, s8, t8, u8, v8, w8, x8, y8, z8, a9, b9, c9, d9, e9, f9, g9, h9, i9, j9, j9, casenum, contype FROM gct WHERE casenum = '$aid'"); while(list($a,$b,$c,$d,$e,$f,$g,$h,$i,$j,$k,$l, $m,$n,$o,$p,$q,$r,$s,$t,$u,$v,$w,$x,$y,$z,$a2,$b2,$c2,$d2,$e2,$f2,$g2, $h2,$i2,$j2,$k2,$l2,$m2,$n2,$o2,$p2,$q2,$r2,$s2,$t2,$u2,$v2,$w2,$x2,$y2,$z2, $a3,$b3,$c3,$d3,$e3,$f3,$g3,$h3,$i3,$j3,$k3,$l3,$m3,$n3,$o3,$p3,$q3,$r3,$s3, $t3,$u3,$v3,$w3,$x3,$y3,$z3,$a4,$b4,$c4,$d4,$e4,$f4,$g4,$h4,$i4,$j4,$k4,$l4, $m4,$n4,$o4,$p4,$q4,$r4,$s4,$t4,$u4,$v4,$w4,$x4,$y4,$z4,$a5,$b5,$c5,$d5,$e5, $f5,$g5,$h5,$i5,$j5,$k5,$l5,$m5,$n5,$o5,$p5,$q5,$r5,$s5,$t5,$u5,$v5,$w5,$x5, $y5,$z5,$a6,$b6,$c6,$d6,$e6,$f6,$g6,$h6,$i6,$j6,$k6,$l6,$m6,$n6,$o6,$p6,$q6, $r6,$s6,$t6,$u6,$v6,$w6,$x6,$y6,$z6,$a7,$b7,$c7,$d7,$e7,$f7,$g7,$h7,$i7,$j7, $k7,$l7,$m7,$n7,$o7,$p7,$q7,$r7,$s7,$t7,$u7,$v7,$w7,$x7,$y7,$z7,$a8,$b8,$c8, $d8,$e8,$f8,$g8,$h8,$i8,$j8,$k8,$l8,$m8,$n8,$o8,$p8,$q8,$r8,$s8,$t8,$u8,$v8, $w8,$x8,$y8,$z8,$a9,$b9,$c9,$d9,$e9,$f9,$g9,$h9,$i9,$j9,$j9,$casenum,$contype) = mysql_fetch_row($result)) { $xa=$a; $xb=$b; $xc=$c; $xd=$d; $xe=$e; $xf=$f; $xg=$g; //ED: Snipped 215 lines with this pattern ... $x{var}=${var}; $xg9=$g9; $xh9=$h9; $xi9=$i9; $xj9=$j9; $xk9=$k9; $xcontype=$contype; } //////////////CHECK FOR CHECKED BOXES AND SET VARS/////////////// if($xa == "on") $_a = "checked"; if($xb == "on") $_b = "checked"; if($xc == "on") $_c = "checked"; if($xd == "on") $_d = "checked"; if($xe == "on") $_e = "checked"; if($xf == "on") $_f = "checked"; if($xg == "on") $_g = "checked"; if($xh == "on") $_h = "checked"; if($xi == "on") $_i = "checked"; if($xj == "on") $_j = "checked"; if($xk == "on") $_k = "checked"; if($xl == "on") $_l = "checked"; if($xm == "on") $_m = "checked"; //ED: Snipped 415 lines of with this pattern ... if($xf9== "on") $_f9 = "checked"; if($xg9== "on") $_g9 = "checked"; if($xh9== "on") $_h9 = "checked"; if($xi9== "on") $_i9 = "checked"; if($xj9== "on") $_j9 = "checked"; if($xk9== "on") $_k9 = "checked";
[Advertisement]
BuildMaster allows you to create a self-service release management platform that allows different teams to manage their applications. Explore how!