|
|
addTransaction($logoutTransaction); // Register triggers $logoutTransaction->registerTrigger("STARTER", "Trigger_Default_Starter", 1, "GET", "KT_logout_now"); $logoutTransaction->registerTrigger("END", "Trigger_Default_Redirect", 99, "index.php"); // Add columns // End of logout transaction instance // Make a login transaction instance $loginTransaction = new tNG_login($conn_database); $tNGs->addTransaction($loginTransaction); // Register triggers $loginTransaction->registerTrigger("STARTER", "Trigger_Default_Starter", 1, "POST", "kt_login1"); $loginTransaction->registerTrigger("END", "Trigger_Default_Redirect", 99, "{kt_login_redirect}"); // Add columns $loginTransaction->addColumn("kt_login_user", "STRING_TYPE", "POST", "kt_login_user"); $loginTransaction->addColumn("kt_login_password", "STRING_TYPE", "POST", "kt_login_password"); // End of login transaction instance // Execute all the registered transactions $tNGs->executeTransactions(); // Get the transaction recordset $rscustom = $tNGs->getRecordset("custom"); $row_rscustom = mysql_fetch_assoc($rscustom); $totalRows_rscustom = mysql_num_rows($rscustom); // Show Dynamic Thumbnail $objDynamicThumb1 = new tNG_DynamicThumbnail("", "KT_thumbnail1"); $objDynamicThumb1->setFolder("gallery/accessori/"); $objDynamicThumb1->setRenameRule("{rsAccessorio.immagine_accessori}"); $objDynamicThumb1->setResize(320, 0, true); $objDynamicThumb1->setWatermark(false); // Show Dynamic Thumbnail $objDynamicThumb2 = new tNG_DynamicThumbnail("", "KT_thumbnail2"); $objDynamicThumb2->setFolder("gallery/accessori/"); $objDynamicThumb2->setRenameRule("{rsAccessorio.disegno_accessori}"); $objDynamicThumb2->setResize(320, 0, true); $objDynamicThumb2->setWatermark(false); $colname_rsLingua = "1"; if (isset($_SESSION['idLanguage'])) { $colname_rsLingua = $_SESSION['idLanguage']; } mysql_select_db($database_database, $database); $query_rsLingua = sprintf("SELECT sitelabels_static.*, sitelabels.* FROM sitelabels_static JOIN sitelabels on sitelabels_static.key_label = sitelabels.id WHERE sitelabels_static.language_label = %s", GetSQLValueString($colname_rsLingua, "int")); $rsLingua = mysql_query($query_rsLingua, $database) or die(mysql_error()); $row_rsLingua = mysql_fetch_assoc($rsLingua); $totalRows_rsLingua = mysql_num_rows($rsLingua); $colname_rsAccessorio = "-1"; if (isset($_GET['id_accessori'])) { $colname_rsAccessorio = $_GET['id_accessori']; } $colname2_rsAccessorio = "1"; if (isset($_SESSION['idLanguage'])) { $colname2_rsAccessorio = $_SESSION['idLanguage']; } mysql_select_db($database_database, $database); $query_rsAccessorio = sprintf("SELECT accessori_details.*, accessori.* FROM accessori_details JOIN accessori ON accessori.id_accessori = accessori_details.idaccessori_details WHERE idaccessori_details = %s AND language_details = %s", GetSQLValueString($colname_rsAccessorio, "int"),GetSQLValueString($colname2_rsAccessorio, "int")); $rsAccessorio = mysql_query($query_rsAccessorio, $database) or die(mysql_error()); $row_rsAccessorio = mysql_fetch_assoc($rsAccessorio); $totalRows_rsAccessorio = mysql_num_rows($rsAccessorio); // Trasformare resultSet in Array $labels = array(); for( $i = 0; $i < $totalRows_rsLingua; $i++ ) { // Array $labels[$row_rsLingua['labelname']] = $row_rsLingua['value_label']; // Go on $row_rsLingua = mysql_fetch_assoc($rsLingua); } ?>