Esempio n. 1
0
     echo "</td>";
     //we need to have a column dedicated to nulls -di
     echo $tdWithClassLeft;
     if ($result[$i]['notnull'] == 0) {
         if ($result[$i]['dflt_value'] === "NULL") {
             echo "<input type='checkbox' name='" . $j . ":" . $i . "_null' id='row_" . $j . "_field_" . $i . "_null' checked='checked' onclick='disableText(this, \"row_" . $j . "_field_" . $i . "_value\");'/>";
         } else {
             echo "<input type='checkbox' name='" . $j . ":" . $i . "_null' id='row_" . $j . "_field_" . $i . "_null' onclick='disableText(this, \"row_" . $j . "_field_" . $i . "_value\");'/>";
         }
     }
     echo "</td>";
     echo $tdWithClassLeft;
     if ($result[$i]['dflt_value'] === "NULL") {
         $dflt_value = "";
     } else {
         $dflt_value = htmlencode(deQuoteSQL($result[$i]['dflt_value']));
     }
     if ($typeAffinity == "INTEGER" || $typeAffinity == "REAL" || $typeAffinity == "NUMERIC") {
         echo "<input type='text' id='row_" . $j . "_field_" . $i . "_value' name='" . $j . ":" . $i . "' value='" . $dflt_value . "' onblur='changeIgnore(this, \"row_" . $j . "_ignore\");' onclick='notNull(\"row_" . $j . "_field_" . $i . "_null\");'/>";
     } else {
         echo "<textarea id='row_" . $j . "_field_" . $i . "_value' name='" . $j . ":" . $i . "' rows='5' cols='60' onclick='notNull(\"row_" . $j . "_field_" . $i . "_null\");' onblur='changeIgnore(this, \"row_" . $j . "_ignore\");'>" . $dflt_value . "</textarea>";
     }
     echo "</td>";
     echo "</tr>";
 }
 echo "<tr>";
 echo "<td class='tdheader' style='text-align:right;' colspan='5'>";
 echo "<input type='submit' value='" . $lang['insert'] . "' class='btn'/>";
 echo "</td>";
 echo "</tr>";
 echo "</table><br/>";
Esempio n. 2
0
         //we need to have a column dedicated to nulls -di
         echo $tdWithClassLeft;
         if ($result[$i]['notnull'] == 0) {
             if ($result[$i]['dflt_value'] === NULL) {
                 echo "<input type='checkbox' name='" . $j . ":" . $field_html . "_null' id='row_" . $j . "_field_" . $i . "_null' checked='checked' onclick='disableText(this, \"row_" . $j . "_field_" . $i . "_value\");'/>";
             } else {
                 echo "<input type='checkbox' name='" . $j . ":" . $field_html . "_null' id='row_" . $j . "_field_" . $i . "_null' onclick='disableText(this, \"row_" . $j . "_field_" . $i . "_value\");'/>";
             }
         }
         echo "</td>";
         echo $tdWithClassLeft;
         $type = strtolower($type);
         if ($scalarField) {
             echo "<input type='text' id='row_" . $j . "_field_" . $i . "_value' name='" . $j . ":" . $field_html . "' value='" . htmlencode(deQuoteSQL($result[$i]['dflt_value'])) . "' onblur='changeIgnore(this, \"row_" . $j . "_ignore\");' onclick='notNull(\"row_" . $j . "_field_" . $i . "_null\");'/>";
         } else {
             echo "<textarea id='row_" . $j . "_field_" . $i . "_value' name='" . $j . ":" . $field_html . "' rows='5' cols='60' onclick='notNull(\"row_" . $j . "_field_" . $i . "_null\");' onblur='changeIgnore(this, \"row_" . $j . "_ignore\");'>" . htmlencode(deQuoteSQL($result[$i]['dflt_value'])) . "</textarea>";
         }
         echo "</td>";
         echo "</tr>";
     }
     echo "<tr>";
     echo "<td class='tdheader' style='text-align:right;' colspan='5'>";
     echo "<input type='submit' value='" . $lang['insert'] . "' class='btn'/>";
     echo "</td>";
     echo "</tr>";
     echo "</table><br/>";
 }
 $fieldStr = substr($fieldStr, 1);
 echo "<input type='hidden' name='fields' value='" . htmlencode($fieldStr) . "'/>";
 echo "</form>";
 break;
                 echo "<input type='checkbox' name='" . $j . ":" . $field . "_null' id='" . $j . ":" . $field . "_null' checked='checked' onclick='disableText(this, \"" . $j . ":" . $field . "\");'/>";
             } else {
                 echo "<input type='checkbox' name='" . $j . ":" . $field . "_null' id='" . $j . ":" . $field . "_null' onclick='disableText(this, \"" . $j . ":" . $field . "\");'/>";
             }
         }
         echo "</td>";
         echo $tdWithClassLeft;
         // 22 August 2011: gkf fixed bug #55. The form is now prepopulated with the default values
         //                 so that the insert proceeds normally.
         // 22 August 2011: gkf fixed bug #53. The form now displays more of the text.
         // 19 October 2011: di fixed the bug caused by the previous fix where the null column does not exist anymore
         $type = strtolower($type);
         if ($scalarField) {
             echo "<input type='text' id='" . $j . ":" . $field . "' name='" . $j . ":" . $field . "' value='" . deQuoteSQL($result[$i][4]) . "' onblur='changeIgnore(this, \"" . $j . "_ignore\");' onclick='notNull(\"" . $j . ":" . $field . "_null\");'/>";
         } else {
             echo "<textarea id='" . $j . ":" . $field . "' name='" . $j . ":" . $field . "' rows='5' cols='60' onclick='notNull(\"" . $j . ":" . $field . "_null\");' onblur='changeIgnore(this, \"" . $j . "_ignore\");'>" . deQuoteSQL($result[$i][4]) . "</textarea>";
         }
         echo "</td>";
         echo "</tr>";
     }
     echo "<tr>";
     echo "<td class='tdheader' style='text-align:right;' colspan='5'>";
     echo "<input type='submit' value='Insert' class='btn'/>";
     echo "</td>";
     echo "</tr>";
     echo "</table><br/>";
 }
 $fieldStr = substr($fieldStr, 1);
 echo "<input type='hidden' name='fields' value='" . $fieldStr . "'/>";
 echo "</form>";
 break;
Esempio n. 4
0
         echo "<option value=''></option>";
         $functions = unserialize(FUNCTIONS);
         for ($z = 0; $z < sizeof($functions); $z++) {
             echo "<option value='" . $functions[$z] . "'>" . $functions[$z] . "</option>";
         }
         echo "</select>";
         echo "</td>";
         echo $tdWithClassLeft;
         // 22 August 2011: gkf fixed bug #55. The form is now prepopulated with the default values
         //                 so that the insert proceeds normally.
         // 22 August 2011: gkf fixed bug #53. The form now displays more of the text.
         $type = strtolower($type);
         if ($scalarField) {
             echo "<input type='text' name='" . $j . ":" . $field . "' value='" . deQuoteSQL($result[$i][4]) . "' onblur='changeIgnore(this, \"" . $j . "_ignore\")'/>";
         } else {
             echo "<textarea name='" . $j . ":" . $field . "' rows='5' cols='60' onblur='changeIgnore(this, \"" . $j . "_ignore\")'>" . deQuoteSQL($result[$i][4]) . "</textarea>";
         }
         echo "</td>";
         echo "</tr>";
     }
     echo "<tr>";
     echo "<td class='tdheader' style='text-align:right;' colspan='5'>";
     echo "<input type='submit' value='Insert' class='btn'/>";
     echo "</td>";
     echo "</tr>";
     echo "</table><br/>";
 }
 $fieldStr = substr($fieldStr, 1);
 echo "<input type='hidden' name='fields' value='" . $fieldStr . "'/>";
 echo "</form>";
 break;