Sie sind auf Seite 1von 6

<?php require_once('Connections/sekret_cnx.php'); ?> <?php // Load the common classes require_once('includes/common/KT_common.php'); // Load the tNG classes require_once('includes/tng/tNG.inc.

php'); // Load the KT_back class require_once('includes/nxt/KT_back.php'); // Make a transaction dispatcher instance $tNGs = new tNG_dispatcher(""); // Make unified connection variable $conn_sekret_cnx = new KT_connection($sekret_cnx, $database_sekret_cnx); // Start trigger $formValidation = new tNG_FormValidation(); $tNGs->prepareValidation($formValidation); // End trigger if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDe finedValue = "") { $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_st ring($theValue) : mysql_escape_string($theValue); switch ($theType) { case "text": $theValue = ($theValue break; case "long": case "int": $theValue = ($theValue break; case "double": $theValue = ($theValue break; case "date": $theValue = ($theValue break; case "defined": $theValue = ($theValue break; } return $theValue; } } $colname_Recordset1 = "-1"; if (isset($_POST['id_venues'])) { $colname_Recordset1 = $_POST['id_venues']; } mysql_select_db($database_sekret_cnx, $sekret_cnx); $query_Recordset1 = sprintf("SELECT id_venues FROM sd_venues WHERE id_venues = % s", GetSQLValueString($colname_Recordset1, "int"));

!= "") ? "'" . $theValue . "'" : "NULL";

!= "") ? intval($theValue) : "NULL"; != "") ? "'" . doubleval($theValue) . "'" : "NULL"; != "") ? "'" . $theValue . "'" : "NULL"; != "") ? $theDefinedValue : $theNotDefinedValue;

$Recordset1 = mysql_query($query_Recordset1, $sekret_cnx) or die(mysql_error()); $row_Recordset1 = mysql_fetch_assoc($Recordset1); $totalRows_Recordset1 = mysql_num_rows($Recordset1); // Make an insert transaction instance $ins_sd_venues_party = new tNG_multipleInsert($conn_sekret_cnx); $tNGs->addTransaction($ins_sd_venues_party); // Register triggers $ins_sd_venues_party->registerTrigger("STARTER", "Trigger_Default_Starter", 1, " POST", "KT_Insert1"); $ins_sd_venues_party->registerTrigger("BEFORE", "Trigger_Default_FormValidation" , 10, $formValidation); $ins_sd_venues_party->registerTrigger("END", "Trigger_Default_Redirect", 99, "in cludes/nxt/back.php"); // Add columns $ins_sd_venues_party->setTable("sd_venues_party"); $ins_sd_venues_party->setPrimaryKey("id_party", "NUMERIC_TYPE"); // Make an update transaction instance $upd_sd_venues_party = new tNG_multipleUpdate($conn_sekret_cnx); $tNGs->addTransaction($upd_sd_venues_party); // Register triggers $upd_sd_venues_party->registerTrigger("STARTER", "Trigger_Default_Starter", 1, " POST", "KT_Update1"); $upd_sd_venues_party->registerTrigger("BEFORE", "Trigger_Default_FormValidation" , 10, $formValidation); $upd_sd_venues_party->registerTrigger("END", "Trigger_Default_Redirect", 99, "in cludes/nxt/back.php"); // Add columns $upd_sd_venues_party->setTable("sd_venues_party"); $upd_sd_venues_party->addColumn("id_venues", "NUMERIC_TYPE", "POST", "id_venues" ); $upd_sd_venues_party->addColumn("party_date", "DATE_TYPE", "POST", "party_date") ; $upd_sd_venues_party->addColumn("total_guest_list", "NUMERIC_TYPE", "POST", "tot al_guest_list"); $upd_sd_venues_party->addColumn("total_venue", "NUMERIC_TYPE", "POST", "total_ve nue"); $upd_sd_venues_party->addColumn("invitation_sent", "NUMERIC_TYPE", "POST", "invi tation_sent"); $upd_sd_venues_party->addColumn("vip_guests", "NUMERIC_TYPE", "POST", "vip_guest s"); $upd_sd_venues_party->addColumn("paid_guests", "NUMERIC_TYPE", "POST", "paid_gue sts"); $upd_sd_venues_party->addColumn("lock_party", "NUMERIC_TYPE", "POST", "lock_part y"); $upd_sd_venues_party->setPrimaryKey("id_party", "NUMERIC_TYPE", "GET", "id_party "); // Make an instance of the transaction object $del_sd_venues_party = new tNG_multipleDelete($conn_sekret_cnx); $tNGs->addTransaction($del_sd_venues_party); // Register triggers $del_sd_venues_party->registerTrigger("STARTER", "Trigger_Default_Starter", 1, " POST", "KT_Delete1"); $del_sd_venues_party->registerTrigger("END", "Trigger_Default_Redirect", 99, "in cludes/nxt/back.php"); // Add columns $del_sd_venues_party->setTable("sd_venues_party"); $del_sd_venues_party->setPrimaryKey("id_party", "NUMERIC_TYPE", "GET", "id_party

"); // Execute all the registered transactions $tNGs->executeTransactions(); // Get the transaction recordset $rssd_venues_party = $tNGs->getRecordset("sd_venues_party"); $row_rssd_venues_party = mysql_fetch_assoc($rssd_venues_party); $totalRows_rssd_venues_party = mysql_num_rows($rssd_venues_party); ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3. org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Document sans titre</title> <link href="includes/skins/mxkollection3.css" rel="stylesheet" type="text/css" m edia="all" /> <script src="includes/common/js/base.js" type="text/javascript"></script> <script src="includes/common/js/utility.js" type="text/javascript"></script> <script src="includes/skins/style.js" type="text/javascript"></script> <?php echo $tNGs->displayValidationRules();?> <script src="includes/nxt/scripts/form.js" type="text/javascript"></script> <script src="includes/nxt/scripts/form.js.php" type="text/javascript"></script> <script type="text/javascript"> $NXT_FORM_SETTINGS = { duplicate_buttons: true, show_as_grid: true, merge_down_value: true } </script> </head> <body> <?php echo $tNGs->getErrorMsg(); ?> <div class="KT_tng"> <h1> <?php // Show IF Conditional region1 if (@$_GET['id_party'] == "") { ?> <?php echo NXT_getResource("Insert_FH"); ?> <?php // else Conditional region1 } else { ?> <?php echo NXT_getResource("Update_FH"); ?> <?php } // endif Conditional region1 ?> Sd_venues_party </h1> <div class="KT_tngform"> <form method="post" id="form1" action="<?php echo KT_escapeAttribute(KT_getF ullUri()); ?>"> <?php $cnt1 = 0; ?> <?php do { ?> <?php $cnt1++; ?> <?php // Show IF Conditional region1 if (@$totalRows_rssd_venues_party > 1) {

?> <h2><?php echo NXT_getResource("Record_FH"); ?> <?php echo $cnt1; ?></ h2> <?php } // endif Conditional region1 ?> <table cellpadding="2" cellspacing="0" class="KT_tngtable"> <?php // Show IF Conditional show_party_date_on_update_only if (@$_GET['id_party'] != "") { ?> <tr> <td class="KT_th"><label for="party_date_<?php echo $cnt1; ?>">Par ty_date:</label></td> <td><input type="text" name="party_date_<?php echo $cnt1; ?>" id=" party_date_<?php echo $cnt1; ?>" value="<?php echo KT_formatDate($row_rssd_venue s_party['party_date']); ?>" size="10" maxlength="22" /> <?php echo $tNGs->displayFieldHint("party_date");?> <?php echo $tNGs->displayFieldError("sd_venues_party", "party_date", $cnt1); ?> </td> </tr> <?php } // endif Conditional show_party_date_on_update_only ?> <?php // Show IF Conditional show_total_guest_list_on_update_only if (@$_GET['id_party'] != "") { ?> <tr> <td class="KT_th"><label for="total_guest_list_<?php echo $cnt1; ? >">Total_guest_list:</label></td> <td><input type="text" name="total_guest_list_<?php echo $cnt1; ?> " id="total_guest_list_<?php echo $cnt1; ?>" value="<?php echo KT_escapeAttribut e($row_rssd_venues_party['total_guest_list']); ?>" size="7" /> <?php echo $tNGs->displayFieldHint("total_guest_list");?> <?ph p echo $tNGs->displayFieldError("sd_venues_party", "total_guest_list", $cnt1); ? > </td> </tr> <?php } // endif Conditional show_total_guest_list_on_update_only ?> <?php // Show IF Conditional show_total_venue_on_update_only if (@$_GET['id_party'] != "") { ?> <tr> <td class="KT_th"><label for="total_venue_<?php echo $cnt1; ?>">To tal_venue:</label></td> <td><input type="text" name="total_venue_<?php echo $cnt1; ?>" id= "total_venue_<?php echo $cnt1; ?>" value="<?php echo KT_escapeAttribute($row_rss d_venues_party['total_venue']); ?>" size="7" /> <?php echo $tNGs->displayFieldHint("total_venue");?> <?php ech o $tNGs->displayFieldError("sd_venues_party", "total_venue", $cnt1); ?> </td> </tr> <?php } // endif Conditional show_total_venue_on_update_only ?> <?php // Show IF Conditional show_invitation_sent_on_update_only if (@$_GET['id_party'] != "") { ?>

<tr> <td class="KT_th"><label for="invitation_sent_<?php echo $cnt1; ?> ">Invitation_sent:</label></td> <td><input type="text" name="invitation_sent_<?php echo $cnt1; ?>" id="invitation_sent_<?php echo $cnt1; ?>" value="<?php echo KT_escapeAttribute( $row_rssd_venues_party['invitation_sent']); ?>" size="7" /> <?php echo $tNGs->displayFieldHint("invitation_sent");?> <?php echo $tNGs->displayFieldError("sd_venues_party", "invitation_sent", $cnt1); ?> </td> </tr> <?php } // endif Conditional show_invitation_sent_on_update_only ?> <?php // Show IF Conditional show_vip_guests_on_update_only if (@$_GET['id_party'] != "") { ?> <tr> <td class="KT_th"><label for="vip_guests_<?php echo $cnt1; ?>">Vip _guests:</label></td> <td><input type="text" name="vip_guests_<?php echo $cnt1; ?>" id=" vip_guests_<?php echo $cnt1; ?>" value="<?php echo KT_escapeAttribute($row_rssd_ venues_party['vip_guests']); ?>" size="7" /> <?php echo $tNGs->displayFieldHint("vip_guests");?> <?php echo $tNGs->displayFieldError("sd_venues_party", "vip_guests", $cnt1); ?> </td> </tr> <?php } // endif Conditional show_vip_guests_on_update_only ?> <?php // Show IF Conditional show_paid_guests_on_update_only if (@$_GET['id_party'] != "") { ?> <tr> <td class="KT_th"><label for="paid_guests_<?php echo $cnt1; ?>">Pa id_guests:</label></td> <td><input type="text" name="paid_guests_<?php echo $cnt1; ?>" id= "paid_guests_<?php echo $cnt1; ?>" value="<?php echo KT_escapeAttribute($row_rss d_venues_party['paid_guests']); ?>" size="7" /> <?php echo $tNGs->displayFieldHint("paid_guests");?> <?php ech o $tNGs->displayFieldError("sd_venues_party", "paid_guests", $cnt1); ?> </td> </tr> <?php } // endif Conditional show_paid_guests_on_update_only ?> <?php // Show IF Conditional show_lock_party_on_update_only if (@$_GET['id_party'] != "") { ?> <tr> <td class="KT_th"><label for="lock_party_<?php echo $cnt1; ?>_1">L ock_party:</label></td> <td><div> <input <?php if (!(strcmp(KT_escapeAttribute($row_rssd_venues_pa rty['lock_party']),"1"))) {echo "CHECKED";} ?> type="radio" name="lock_party_<?p hp echo $cnt1; ?>" id="lock_party_<?php echo $cnt1; ?>_1" value="1" /> <label for="lock_party_<?php echo $cnt1; ?>_1">Yes</label> </div> <div> <input <?php if (!(strcmp(KT_escapeAttribute($row_rssd_venue

s_party['lock_party']),"0"))) {echo "CHECKED";} ?> type="radio" name="lock_party _<?php echo $cnt1; ?>" id="lock_party_<?php echo $cnt1; ?>_2" value="0" /> <label for="lock_party_<?php echo $cnt1; ?>_2">No</label> </div> <?php echo $tNGs->displayFieldError("sd_venues_party", "lock_par ty", $cnt1); ?> </td> </tr> <?php } // endif Conditional show_lock_party_on_update_only ?> </table> <input type="hidden" name="kt_pk_sd_venues_party_<?php echo $cnt1; ?>" c lass="id_field" value="<?php echo KT_escapeAttribute($row_rssd_venues_party['kt_ pk_sd_venues_party']); ?>" /> <input type="hidden" name="id_venues_<?php echo $cnt1; ?>" id="id_venues _<?php echo $cnt1; ?>" value="<?php echo KT_escapeAttribute($row_rssd_venues_par ty['id_venues']); ?>" /> <?php } while ($row_rssd_venues_party = mysql_fetch_assoc($rssd_venues_p arty)); ?> <div class="KT_bottombuttons"> <div> <?php // Show IF Conditional region1 if (@$_GET['id_party'] == "") { ?> <input type="submit" name="KT_Insert1" id="KT_Insert1" value="<?php echo NXT_getResource("Insert_FB"); ?>" /> <?php // else Conditional region1 } else { ?> <div class="KT_operations"> <input type="submit" name="KT_Insert1" value="<?php echo NXT_getRe source("Insert as new_FB"); ?>" onclick="nxt_form_insertasnew(this, 'id_party')" /> </div> <input type="submit" name="KT_Update1" value="<?php echo NXT_getReso urce("Update_FB"); ?>" /> <input type="submit" name="KT_Delete1" value="<?php echo NXT_getReso urce("Delete_FB"); ?>" onclick="return confirm('<?php echo NXT_getResource("Are you sure?"); ?>');" /> <?php } // endif Conditional region1 ?> <input type="button" name="KT_Cancel1" value="<?php echo NXT_getResour ce("Cancel_FB"); ?>" onclick="return UNI_navigateCancel(event, 'includes/nxt/bac k.php')" /> </div> </div> </form> </div> <br class="clearfixplain" /> </div> <p>&nbsp;</p> </body> </html> <?php mysql_free_result($Recordset1); ?>

Das könnte Ihnen auch gefallen