Ir para conteúdo
Fórum Script Brasil

Danilo Pupo

Membros
  • Total de itens

    1
  • Registro em

  • Última visita

Sobre Danilo Pupo

Danilo Pupo's Achievements

0

Reputação

  1. Gente Por favor me ajudem criei um site no Dreamweaver Cs4 pela ferramenta develox toobox (não sei se escrevi direito)e no servidor local funciona lindamente belo,porem ao mandar pro meu servidor de hospedagem da erro não consigo de geito nenhum fazer funcionar...na verdade eu peguei o script pronto de um blog e instalei e apenas fui adaptando coisas nele,ai fiz um sistema de Elenco pois o Site é de um Clube de futebol e esse sistema de elenco fiz no Dreamweaver e ele não roda o Cadastro e nem o Editar...vou postar os erros pra vocês verem ... Warning: mysql_select_db() expects parameter 2 to be resource, object given in /home/u243671848/public_html/admin/includes/common/lib/db/KT_Connection.class.phpon line 71Warning: mysql_error() expects parameter 1 to be resource, object given in /home/u243671848/public_html/admin/includes/common/lib/db/KT_Connection.class.php on line 105 segue abaixo os arquivos cadastrar_jogador.php e o Arquivo Editar_jogador.php Por favor me ajudemmmm <?php require_once('../includes/Config.php'); ?> <?php //MX Widgets3 include require_once('../includes/wdg/WDG.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 $u243671848_urso= new KT_connection($u243671848_urso, $u243671848_urso); // Start trigger $formValidation = new tNG_FormValidation(); $tNGs->prepareValidation($formValidation); // End trigger //start Trigger_FileDelete trigger //remove this line if you want to edit the code by hand function Trigger_FileDelete(&$tNG) { $deleteObj = new tNG_FileDelete($tNG); $deleteObj->setFolder("imagem/"); $deleteObj->setDbFieldName("foto_atleta"); return $deleteObj->Execute(); } //end Trigger_FileDelete trigger //start Trigger_ImageUpload trigger //remove this line if you want to edit the code by hand function Trigger_ImageUpload(&$tNG) { $uploadObj = new tNG_ImageUpload($tNG); $uploadObj->setFormFieldName("foto_atleta"); $uploadObj->setDbFieldName("foto_atleta"); $uploadObj->setFolder("imagem/"); $uploadObj->setResize("true", 180, 211); $uploadObj->setMaxSize(1500); $uploadObj->setAllowedExtensions("gif, jpg, jpe, jpeg, png"); $uploadObj->setRename("auto"); return $uploadObj->Execute(); } //end Trigger_ImageUpload trigger // Make an insert transaction instance $ins_elenco = new tNG_multipleInsert($u243671848_urso); $tNGs->addTransaction($ins_elenco); // Register triggers $ins_elenco->registerTrigger("STARTER", "Trigger_Default_Starter", 1, "POST", "KT_Insert1"); $ins_elenco->registerTrigger("BEFORE", "Trigger_Default_FormValidation", 10, $formValidation); $ins_elenco->registerTrigger("END", "Trigger_Default_Redirect", 99, "includes/nxt/back.php"); $ins_elenco->registerTrigger("AFTER", "Trigger_ImageUpload", 97); // Add columns $ins_elenco->setTable("elenco"); $ins_elenco->addColumn("nome_atleta", "STRING_TYPE", "POST", "nome_atleta"); $ins_elenco->addColumn("nascimento", "STRING_TYPE", "POST", "nascimento"); $ins_elenco->addColumn("ondeatual", "STRING_TYPE", "POST", "ondeatual"); $ins_elenco->addColumn("foto_atleta", "FILE_TYPE", "FILES", "foto_atleta"); $ins_elenco->addColumn("historia", "STRING_TYPE", "POST", "historia"); $ins_elenco->setPrimaryKey("id", "NUMERIC_TYPE"); // Make an update transaction instance $upd_elenco = new tNG_multipleUpdate($u243671848_urso); $tNGs->addTransaction($upd_elenco); // Register triggers $upd_elenco->registerTrigger("STARTER", "Trigger_Default_Starter", 1, "POST", "KT_Update1"); $upd_elenco->registerTrigger("BEFORE", "Trigger_Default_FormValidation", 10, $formValidation); $upd_elenco->registerTrigger("END", "Trigger_Default_Redirect", 99, "includes/nxt/back.php"); $upd_elenco->registerTrigger("AFTER", "Trigger_ImageUpload", 97); // Add columns $upd_elenco->setTable("elenco"); $upd_elenco->addColumn("nome_atleta", "STRING_TYPE", "POST", "nome_atleta"); $upd_elenco->addColumn("nascimento", "STRING_TYPE", "POST", "nascimento"); $upd_elenco->addColumn("ondeatual", "STRING_TYPE", "POST", "ondeatual"); $upd_elenco->addColumn("foto_atleta", "FILE_TYPE", "FILES", "foto_atleta"); $upd_elenco->addColumn("historia", "STRING_TYPE", "POST", "historia"); $upd_elenco->setPrimaryKey("id", "NUMERIC_TYPE", "GET", "id"); // Make an instance of the transaction object $del_elenco = new tNG_multipleDelete($u243671848_urso); $tNGs->addTransaction($del_elenco); // Register triggers $del_elenco->registerTrigger("STARTER", "Trigger_Default_Starter", 1, "POST", "KT_Delete1"); $del_elenco->registerTrigger("END", "Trigger_Default_Redirect", 99, "includes/nxt/back.php"); $del_elenco->registerTrigger("AFTER", "Trigger_FileDelete", 98); // Add columns $del_elenco->setTable("elenco"); $del_elenco->setPrimaryKey("id", "NUMERIC_TYPE", "GET", "id"); // Execute all the registered transactions $tNGs->executeTransactions(); // Get the transaction recordset $rselenco = $tNGs->getRecordset("elenco"); ?> <!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" xmlns:wdg="http://ns.adobe.com/addt"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <link href="../includes/skins/mxkollection3.css" rel="stylesheet" type="text/css" media="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: false, show_as_grid: true, merge_down_value: true } </script> <script type="text/javascript" src="../includes/common/js/sigslot_core.js"></script> <script type="text/javascript" src="../includes/wdg/classes/MXWidgets.js"></script> <script type="text/javascript" src="../includes/wdg/classes/MXWidgets.js.php"></script> <script type="text/javascript" src="../includes/wdg/classes/Calendar.js"></script> <script type="text/javascript" src="../includes/wdg/classes/SmartDate.js"></script> <script type="text/javascript" src="../includes/wdg/calendar/calendar_stripped.js"></script> <script type="text/javascript" src="../includes/wdg/calendar/calendar-setup_stripped.js"></script> <script src="../includes/resources/calendar.js"></script> </head> <body> <?php echo $tNGs->getErrorMsg(); ?> <div class="KT_tng"> <h1> <?php // Show IF Conditional region1 if (@$_GET['id'] == "") { ?> <?php echo NXT_getResource("Insert_FH"); ?> <?php // else Conditional region1 } else { ?> <?php echo NXT_getResource("Update_FH"); ?> <?php } // endif Conditional region1 ?> Elenco </h1> <div class="KT_tngform"> <form method="post" id="form1" action="<?php echo KT_escapeAttribute(KT_getFullUri()); ?>" enctype="multipart/form-data"> <?php $cnt1 = 0; ?> <?php do { ?> <?php $cnt1++; ?> <?php // Show IF Conditional region1 if (@$totalRows_rselenco > 1) { ?> <h2><?php echo NXT_getResource("Record_FH"); ?> <?php echo $cnt1; ?></h2> <?php } // endif Conditional region1 ?> <table cellpadding="2" cellspacing="0" class="KT_tngtable"> <tr> <td class="KT_th"><label for="nome_atleta_<?php echo $cnt1; ?>">Nome do Atleta:</label></td> <td><input type="text" name="nome_atleta_<?php echo $cnt1; ?>" id="nome_atleta_<?php echo $cnt1; ?>" value="<?php echo KT_escapeAttribute($row_rselenco['nome_atleta']); ?>" size="32" maxlength="50" /> <?php echo $tNGs->displayFieldHint("nome_atleta");?> <?php echo $tNGs->displayFieldError("elenco", "nome_atleta", $cnt1); ?></td> </tr> <tr> <td class="KT_th"><label for="nascimento_<?php echo $cnt1; ?>">Nascimento:</label></td> <td><input name="nascimento_<?php echo $cnt1; ?>" id="nascimento_<?php echo $cnt1; ?>" value="<?php echo KT_escapeAttribute($row_rselenco['nascimento']); ?>" size="20" maxlength="20" wdg:mondayfirst="false" wdg:subtype="Calendar" wdg:mask="<?php echo $KT_screen_date_format; ?>" wdg:type="widget" wdg:singleclick="false" wdg:restricttomask="no" wdg:readonly="true" /> <?php echo $tNGs->displayFieldHint("nascimento");?> <?php echo $tNGs->displayFieldError("elenco", "nascimento", $cnt1); ?></td> </tr> <tr> <td class="KT_th"><label for="ondeatual_<?php echo $cnt1; ?>">Posição:</label></td> <td><input type="text" name="ondeatual_<?php echo $cnt1; ?>" id="ondeatual_<?php echo $cnt1; ?>" value="<?php echo KT_escapeAttribute($row_rselenco['ondeatual']); ?>" size="30" maxlength="30" /> <?php echo $tNGs->displayFieldHint("ondeatual");?> <?php echo $tNGs->displayFieldError("elenco", "ondeatual", $cnt1); ?></td> </tr> <tr> <td class="KT_th"><label for="foto_atleta_<?php echo $cnt1; ?>">Foto do Atleta:</label></td> <td><input type="file" name="foto_atleta_<?php echo $cnt1; ?>" id="foto_atleta_<?php echo $cnt1; ?>" size="32" /> <?php echo $tNGs->displayFieldError("elenco", "foto_atleta", $cnt1); ?></td> </tr> <tr> <td class="KT_th"><label for="historia_<?php echo $cnt1; ?>">Curriculum:</label></td> <td><textarea name="historia_<?php echo $cnt1; ?>" id="historia_<?php echo $cnt1; ?>" cols="50" rows="5"><?php echo KT_escapeAttribute($row_rselenco['historia']); ?></textarea> <?php echo $tNGs->displayFieldHint("historia");?> <?php echo $tNGs->displayFieldError("elenco", "historia", $cnt1); ?></td> </tr> </table> <input type="hidden" name="kt_pk_elenco_<?php echo $cnt1; ?>" class="id_field" value="<?php echo KT_escapeAttribute($row_rselenco['kt_pk_elenco']); ?>" /> <?php } while ($row_rselenco = mysql_fetch_assoc($rselenco)); ?> <div class="KT_bottombuttons"> <div> <?php // Show IF Conditional region1 if (@$_GET['id'] == "") { ?> <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_getResource("Insert as new_FB"); ?>" onclick="nxt_form_insertasnew(this, 'id')" /> </div> <input type="submit" name="KT_Update1" value="<?php echo NXT_getResource("Update_FB"); ?>" /> <input type="submit" name="KT_Delete1" value="<?php echo NXT_getResource("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_getResource("Cancel_FB"); ?>" onclick="return UNI_navigateCancel(event, 'includes/nxt/back.php')" /> </div> </div> </form> </div> <br class="clearfixplain" /> </div> <p>&nbsp;</p> </body> </html><?php require_once('../includes/Config.php'); ?> <?php // Load the common classes require_once('../includes/common/KT_common.php'); // Load the required classes require_once('../includes/tfi/TFI.php'); require_once('../includes/tso/TSO.php'); require_once('../includes/nav/NAV.php'); // Make unified connection variable $conn_cornkick = new KT_connection($cornkick, $database_cornkick); if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { if (PHP_VERSION < 6) { $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; } $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? doubleval($theValue) : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } } // Filter $tfi_listelenco2 = new TFI_TableFilter($conn_cornkick, "tfi_listelenco2"); $tfi_listelenco2->addColumn("elenco.nome_atleta", "STRING_TYPE", "nome_atleta", "%"); $tfi_listelenco2->addColumn("elenco.nascimento", "STRING_TYPE", "nascimento", "%"); $tfi_listelenco2->addColumn("elenco.ondeatual", "STRING_TYPE", "ondeatual", "%"); $tfi_listelenco2->addColumn("elenco.foto_atleta", "FILE_TYPE", "foto_atleta", "%"); $tfi_listelenco2->addColumn("elenco.historia", "STRING_TYPE", "historia", "%"); $tfi_listelenco2->Execute(); // Sorter $tso_listelenco2 = new TSO_TableSorter("rselenco1", "tso_listelenco2"); $tso_listelenco2->addColumn("elenco.nome_atleta"); $tso_listelenco2->addColumn("elenco.nascimento"); $tso_listelenco2->addColumn("elenco.ondeatual"); $tso_listelenco2->addColumn("elenco.foto_atleta"); $tso_listelenco2->addColumn("elenco.historia"); $tso_listelenco2->setDefault("elenco.nome_atleta"); $tso_listelenco2->Execute(); // Navigation $nav_listelenco2 = new NAV_Regular("nav_listelenco2", "rselenco1", "", $_SERVER['PHP_SELF'], 5); //NeXTenesio3 Special List Recordset $maxRows_rselenco1 = $_SESSION['max_rows_nav_listelenco2']; $pageNum_rselenco1 = 0; if (isset($_GET['pageNum_rselenco1'])) { $pageNum_rselenco1 = $_GET['pageNum_rselenco1']; } $startRow_rselenco1 = $pageNum_rselenco1 * $maxRows_rselenco1; // Defining List Recordset variable $NXTFilter_rselenco1 = "1=1"; if (isset($_SESSION['filter_tfi_listelenco2'])) { $NXTFilter_rselenco1 = $_SESSION['filter_tfi_listelenco2']; } // Defining List Recordset variable $NXTSort_rselenco1 = "elenco.nome_atleta"; if (isset($_SESSION['sorter_tso_listelenco2'])) { $NXTSort_rselenco1 = $_SESSION['sorter_tso_listelenco2']; } $query_rselenco1 = "SELECT elenco.nome_atleta, elenco.nascimento, elenco.ondeatual, elenco.foto_atleta, elenco.historia, elenco.id FROM elenco WHERE {$NXTFilter_rselenco1} ORDER BY {$NXTSort_rselenco1}"; $query_limit_rselenco1 = sprintf("%s LIMIT %d, %d", $query_rselenco1, $startRow_rselenco1, $maxRows_rselenco1); $rselenco1 = mysql_query($query_limit_rselenco1) or die(mysql_error()); $row_rselenco1 = mysql_fetch_assoc($rselenco1); if (isset($_GET['totalRows_rselenco1'])) { $totalRows_rselenco1 = $_GET['totalRows_rselenco1']; } else { $all_rselenco1 = mysql_query($query_rselenco1); $totalRows_rselenco1 = mysql_num_rows($all_rselenco1); } $totalPages_rselenco1 = ceil($totalRows_rselenco1/$maxRows_rselenco1)-1; //End NeXTenesio3 Special List Recordset $nav_listelenco2->checkBoundries(); ?> <!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>Untitled Document</title> <link href="includes/skins/mxkollection3.css" rel="stylesheet" type="text/css" media="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> <script src="includes/nxt/scripts/list.js" type="text/javascript"></script> <script src="includes/nxt/scripts/list.js.php" type="text/javascript"></script> <script type="text/javascript"> $NXT_LIST_SETTINGS = { duplicate_buttons: false, duplicate_navigation: true, row_effects: true, show_as_buttons: true, record_counter: true } </script> <style type="text/css"> /* Dynamic List row settings */ .KT_col_nome_atleta {width:140px; overflow:hidden;} .KT_col_nascimento {width:140px; overflow:hidden;} .KT_col_ondeatual {width:140px; overflow:hidden;} .KT_col_foto_atleta {width:140px; overflow:hidden;} .KT_col_historia {width:140px; overflow:hidden;} </style> </head> <body> <div class="KT_tng" id="listelenco2"> <h1> Elenco <?php $nav_listelenco2->Prepare(); require("../includes/nav/NAV_Text_Statistics.inc.php"); ?> </h1> <div class="KT_tnglist"> <form action="<?php echo KT_escapeAttribute(KT_getFullUri()); ?>" method="post" id="form1"> <div class="KT_options"> <a href="<?php echo $nav_listelenco2->getShowAllLink(); ?>"><?php echo NXT_getResource("Show"); ?> <?php // Show IF Conditional region1 if (@$_GET['show_all_nav_listelenco2'] == 1) { ?> <?php echo $_SESSION['default_max_rows_nav_listelenco2']; ?> <?php // else Conditional region1 } else { ?> <?php echo NXT_getResource("all"); ?> <?php } // endif Conditional region1 ?> <?php echo NXT_getResource("records"); ?></a> &nbsp; &nbsp; <?php // Show IF Conditional region2 if (@$_SESSION['has_filter_tfi_listelenco2'] == 1) { ?> <a href="<?php echo $tfi_listelenco2->getResetFilterLink(); ?>"><?php echo NXT_getResource("Reset filter"); ?></a> <?php // else Conditional region2 } else { ?> <a href="<?php echo $tfi_listelenco2->getShowFilterLink(); ?>"><?php echo NXT_getResource("Show filter"); ?></a> <?php } // endif Conditional region2 ?> </div> <table cellpadding="2" cellspacing="0" class="KT_tngtable"> <thead> <tr class="KT_row_order"> <th> <input type="checkbox" name="KT_selAll" id="KT_selAll"/> </th> <th id="nome_atleta" class="KT_sorter KT_col_nome_atleta <?php echo $tso_listelenco2->getSortIcon('elenco.nome_atleta'); ?>"> <a href="<?php echo $tso_listelenco2->getSortLink('elenco.nome_atleta'); ?>">Nome do Atleta</a></th> <th id="nascimento" class="KT_sorter KT_col_nascimento <?php echo $tso_listelenco2->getSortIcon('elenco.nascimento'); ?>"> <a href="<?php echo $tso_listelenco2->getSortLink('elenco.nascimento'); ?>">Nascimento</a></th> <th id="ondeatual" class="KT_sorter KT_col_ondeatual <?php echo $tso_listelenco2->getSortIcon('elenco.ondeatual'); ?>"> <a href="<?php echo $tso_listelenco2->getSortLink('elenco.ondeatual'); ?>">Posição</a></th> <th id="foto_atleta" class="KT_sorter KT_col_foto_atleta <?php echo $tso_listelenco2->getSortIcon('elenco.foto_atleta'); ?>"> <a href="<?php echo $tso_listelenco2->getSortLink('elenco.foto_atleta'); ?>">Foto do Atleta</a></th> <th id="historia" class="KT_sorter KT_col_historia <?php echo $tso_listelenco2->getSortIcon('elenco.historia'); ?>"> <a href="<?php echo $tso_listelenco2->getSortLink('elenco.historia'); ?>">Curriculum</a></th> <th>&nbsp;</th> </tr> <?php // Show IF Conditional region3 if (@$_SESSION['has_filter_tfi_listelenco2'] == 1) { ?> <tr class="KT_row_filter"> <td>&nbsp;</td> <td><input type="text" name="tfi_listelenco2_nome_atleta" id="tfi_listelenco2_nome_atleta" value="<?php echo KT_escapeAttribute(@$_SESSION['tfi_listelenco2_nome_atleta']); ?>" size="20" maxlength="50" /></td> <td><input type="text" name="tfi_listelenco2_nascimento" id="tfi_listelenco2_nascimento" value="<?php echo KT_escapeAttribute(@$_SESSION['tfi_listelenco2_nascimento']); ?>" size="20" maxlength="20" /></td> <td><input type="text" name="tfi_listelenco2_ondeatual" id="tfi_listelenco2_ondeatual" value="<?php echo KT_escapeAttribute(@$_SESSION['tfi_listelenco2_ondeatual']); ?>" size="20" maxlength="30" /></td> <td><input type="text" name="tfi_listelenco2_foto_atleta" id="tfi_listelenco2_foto_atleta" value="<?php echo KT_escapeAttribute(@$_SESSION['tfi_listelenco2_foto_atleta']); ?>" size="20" maxlength="50" /></td> <td><input type="text" name="tfi_listelenco2_historia" id="tfi_listelenco2_historia" value="<?php echo KT_escapeAttribute(@$_SESSION['tfi_listelenco2_historia']); ?>" size="20" maxlength="100" /></td> <td><input type="submit" name="tfi_listelenco2" value="<?php echo NXT_getResource("Filter"); ?>" /></td> </tr> <?php } // endif Conditional region3 ?> </thead> <tbody> <?php if ($totalRows_rselenco1 == 0) { // Show if recordset empty ?> <tr> <td colspan="7"><?php echo NXT_getResource("The table is empty or the filter you've selected is too restrictive."); ?></td> </tr> <?php } // Show if recordset empty ?> <?php if ($totalRows_rselenco1 > 0) { // Show if recordset not empty ?> <?php do { ?> <tr class="<?php echo @$cnt1++%2==0 ? "" : "KT_even"; ?>"> <td><input type="checkbox" name="kt_pk_elenco" class="id_checkbox" value="<?php echo $row_rselenco1['id']; ?>" /> <input type="hidden" name="id" class="id_field" value="<?php echo $row_rselenco1['id']; ?>" /></td> <td><div class="KT_col_nome_atleta"><?php echo KT_FormatForList($row_rselenco1['nome_atleta'], 20); ?></div></td> <td><div class="KT_col_nascimento"><?php echo KT_FormatForList($row_rselenco1['nascimento'], 20); ?></div></td> <td><div class="KT_col_ondeatual"><?php echo KT_FormatForList($row_rselenco1['ondeatual'], 20); ?></div></td> <td><div class="KT_col_foto_atleta"><?php echo KT_FormatForList($row_rselenco1['foto_atleta'], 20); ?></div></td> <td><div class="KT_col_historia"><?php echo KT_FormatForList($row_rselenco1['historia'], 20); ?></div></td> <td><a class="KT_edit_link" href="cadastrar_jogador.php?id=<?php echo $row_rselenco1['id']; ?>&amp;KT_back=1"><?php echo NXT_getResource("edit_one"); ?></a> <a class="KT_delete_link" href="#delete"><?php echo NXT_getResource("delete_one"); ?></a></td> </tr> <?php } while ($row_rselenco1 = mysql_fetch_assoc($rselenco1)); ?> <?php } // Show if recordset not empty ?> </tbody> </table> <div class="KT_bottomnav"> <div> <?php $nav_listelenco2->Prepare(); require("..includes/nav/NAV_Text_Navigation.inc.php"); ?> </div> </div> <div class="KT_bottombuttons"> <div class="KT_operations"> <a class="KT_edit_op_link" href="#" onclick="nxt_list_edit_link_form(this); return false;"><?php echo NXT_getResource("edit_all"); ?></a> <a class="KT_delete_op_link" href="#" onclick="nxt_list_delete_link_form(this); return false;"><?php echo NXT_getResource("delete_all"); ?></a></div> <span>&nbsp;</span> <select name="no_new" id="no_new"> <option value="1">1</option> <option value="3">3</option> <option value="6">6</option> </select> <a class="KT_additem_op_link" href="cadastrar_jogador.php?KT_back=1" onclick="return nxt_list_additem(this)"><?php echo NXT_getResource("add new"); ?></a></div> </form> </div> <br class="clearfixplain" /> </div> <p>&nbsp;</p> </body> </html> <?php mysql_free_result($rselenco1); ?> <?php require_once('../includes/Config.php'); ?> <?php // Load the common classes require_once('../includes/common/KT_common.php'); // Load the required classes require_once('../includes/tfi/TFI.php'); require_once('../includes/tso/TSO.php'); require_once('../includes/nav/NAV.php'); // Make unified connection variable $conn_cornkick = new KT_connection($cornkick, $database_cornkick); if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { if (PHP_VERSION < 6) { $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; } $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? doubleval($theValue) : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } } // Filter $tfi_listelenco2 = new TFI_TableFilter($conn_cornkick, "tfi_listelenco2"); $tfi_listelenco2->addColumn("elenco.nome_atleta", "STRING_TYPE", "nome_atleta", "%"); $tfi_listelenco2->addColumn("elenco.nascimento", "STRING_TYPE", "nascimento", "%"); $tfi_listelenco2->addColumn("elenco.ondeatual", "STRING_TYPE", "ondeatual", "%"); $tfi_listelenco2->addColumn("elenco.foto_atleta", "FILE_TYPE", "foto_atleta", "%"); $tfi_listelenco2->addColumn("elenco.historia", "STRING_TYPE", "historia", "%"); $tfi_listelenco2->Execute(); // Sorter $tso_listelenco2 = new TSO_TableSorter("rselenco1", "tso_listelenco2"); $tso_listelenco2->addColumn("elenco.nome_atleta"); $tso_listelenco2->addColumn("elenco.nascimento"); $tso_listelenco2->addColumn("elenco.ondeatual"); $tso_listelenco2->addColumn("elenco.foto_atleta"); $tso_listelenco2->addColumn("elenco.historia"); $tso_listelenco2->setDefault("elenco.nome_atleta"); $tso_listelenco2->Execute(); // Navigation $nav_listelenco2 = new NAV_Regular("nav_listelenco2", "rselenco1", "", $_SERVER['PHP_SELF'], 5); //NeXTenesio3 Special List Recordset $maxRows_rselenco1 = $_SESSION['max_rows_nav_listelenco2']; $pageNum_rselenco1 = 0; if (isset($_GET['pageNum_rselenco1'])) { $pageNum_rselenco1 = $_GET['pageNum_rselenco1']; } $startRow_rselenco1 = $pageNum_rselenco1 * $maxRows_rselenco1; // Defining List Recordset variable $NXTFilter_rselenco1 = "1=1"; if (isset($_SESSION['filter_tfi_listelenco2'])) { $NXTFilter_rselenco1 = $_SESSION['filter_tfi_listelenco2']; } // Defining List Recordset variable $NXTSort_rselenco1 = "elenco.nome_atleta"; if (isset($_SESSION['sorter_tso_listelenco2'])) { $NXTSort_rselenco1 = $_SESSION['sorter_tso_listelenco2']; } $query_rselenco1 = "SELECT elenco.nome_atleta, elenco.nascimento, elenco.ondeatual, elenco.foto_atleta, elenco.historia, elenco.id FROM elenco WHERE {$NXTFilter_rselenco1} ORDER BY {$NXTSort_rselenco1}"; $query_limit_rselenco1 = sprintf("%s LIMIT %d, %d", $query_rselenco1, $startRow_rselenco1, $maxRows_rselenco1); $rselenco1 = mysql_query($query_limit_rselenco1) or die(mysql_error()); $row_rselenco1 = mysql_fetch_assoc($rselenco1); if (isset($_GET['totalRows_rselenco1'])) { $totalRows_rselenco1 = $_GET['totalRows_rselenco1']; } else { $all_rselenco1 = mysql_query($query_rselenco1); $totalRows_rselenco1 = mysql_num_rows($all_rselenco1); } $totalPages_rselenco1 = ceil($totalRows_rselenco1/$maxRows_rselenco1)-1; //End NeXTenesio3 Special List Recordset $nav_listelenco2->checkBoundries(); ?> <!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>Untitled Document</title> <link href="includes/skins/mxkollection3.css" rel="stylesheet" type="text/css" media="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> <script src="includes/nxt/scripts/list.js" type="text/javascript"></script> <script src="includes/nxt/scripts/list.js.php" type="text/javascript"></script> <script type="text/javascript"> $NXT_LIST_SETTINGS = { duplicate_buttons: false, duplicate_navigation: true, row_effects: true, show_as_buttons: true, record_counter: true } </script> <style type="text/css"> /* Dynamic List row settings */ .KT_col_nome_atleta {width:140px; overflow:hidden;} .KT_col_nascimento {width:140px; overflow:hidden;} .KT_col_ondeatual {width:140px; overflow:hidden;} .KT_col_foto_atleta {width:140px; overflow:hidden;} .KT_col_historia {width:140px; overflow:hidden;} </style> </head> <body> <div class="KT_tng" id="listelenco2"> <h1> Elenco <?php $nav_listelenco2->Prepare(); require("../includes/nav/NAV_Text_Statistics.inc.php"); ?> </h1> <div class="KT_tnglist"> <form action="<?php echo KT_escapeAttribute(KT_getFullUri()); ?>" method="post" id="form1"> <div class="KT_options"> <a href="<?php echo $nav_listelenco2->getShowAllLink(); ?>"><?php echo NXT_getResource("Show"); ?> <?php // Show IF Conditional region1 if (@$_GET['show_all_nav_listelenco2'] == 1) { ?> <?php echo $_SESSION['default_max_rows_nav_listelenco2']; ?> <?php // else Conditional region1 } else { ?> <?php echo NXT_getResource("all"); ?> <?php } // endif Conditional region1 ?> <?php echo NXT_getResource("records"); ?></a> &nbsp; &nbsp; <?php // Show IF Conditional region2 if (@$_SESSION['has_filter_tfi_listelenco2'] == 1) { ?> <a href="<?php echo $tfi_listelenco2->getResetFilterLink(); ?>"><?php echo NXT_getResource("Reset filter"); ?></a> <?php // else Conditional region2 } else { ?> <a href="<?php echo $tfi_listelenco2->getShowFilterLink(); ?>"><?php echo NXT_getResource("Show filter"); ?></a> <?php } // endif Conditional region2 ?> </div> <table cellpadding="2" cellspacing="0" class="KT_tngtable"> <thead> <tr class="KT_row_order"> <th> <input type="checkbox" name="KT_selAll" id="KT_selAll"/> </th> <th id="nome_atleta" class="KT_sorter KT_col_nome_atleta <?php echo $tso_listelenco2->getSortIcon('elenco.nome_atleta'); ?>"> <a href="<?php echo $tso_listelenco2->getSortLink('elenco.nome_atleta'); ?>">Nome do Atleta</a></th> <th id="nascimento" class="KT_sorter KT_col_nascimento <?php echo $tso_listelenco2->getSortIcon('elenco.nascimento'); ?>"> <a href="<?php echo $tso_listelenco2->getSortLink('elenco.nascimento'); ?>">Nascimento</a></th> <th id="ondeatual" class="KT_sorter KT_col_ondeatual <?php echo $tso_listelenco2->getSortIcon('elenco.ondeatual'); ?>"> <a href="<?php echo $tso_listelenco2->getSortLink('elenco.ondeatual'); ?>">Posição</a></th> <th id="foto_atleta" class="KT_sorter KT_col_foto_atleta <?php echo $tso_listelenco2->getSortIcon('elenco.foto_atleta'); ?>"> <a href="<?php echo $tso_listelenco2->getSortLink('elenco.foto_atleta'); ?>">Foto do Atleta</a></th> <th id="historia" class="KT_sorter KT_col_historia <?php echo $tso_listelenco2->getSortIcon('elenco.historia'); ?>"> <a href="<?php echo $tso_listelenco2->getSortLink('elenco.historia'); ?>">Curriculum</a></th> <th>&nbsp;</th> </tr> <?php // Show IF Conditional region3 if (@$_SESSION['has_filter_tfi_listelenco2'] == 1) { ?> <tr class="KT_row_filter"> <td>&nbsp;</td> <td><input type="text" name="tfi_listelenco2_nome_atleta" id="tfi_listelenco2_nome_atleta" value="<?php echo KT_escapeAttribute(@$_SESSION['tfi_listelenco2_nome_atleta']); ?>" size="20" maxlength="50" /></td> <td><input type="text" name="tfi_listelenco2_nascimento" id="tfi_listelenco2_nascimento" value="<?php echo KT_escapeAttribute(@$_SESSION['tfi_listelenco2_nascimento']); ?>" size="20" maxlength="20" /></td> <td><input type="text" name="tfi_listelenco2_ondeatual" id="tfi_listelenco2_ondeatual" value="<?php echo KT_escapeAttribute(@$_SESSION['tfi_listelenco2_ondeatual']); ?>" size="20" maxlength="30" /></td> <td><input type="text" name="tfi_listelenco2_foto_atleta" id="tfi_listelenco2_foto_atleta" value="<?php echo KT_escapeAttribute(@$_SESSION['tfi_listelenco2_foto_atleta']); ?>" size="20" maxlength="50" /></td> <td><input type="text" name="tfi_listelenco2_historia" id="tfi_listelenco2_historia" value="<?php echo KT_escapeAttribute(@$_SESSION['tfi_listelenco2_historia']); ?>" size="20" maxlength="100" /></td> <td><input type="submit" name="tfi_listelenco2" value="<?php echo NXT_getResource("Filter"); ?>" /></td> </tr> <?php } // endif Conditional region3 ?> </thead> <tbody> <?php if ($totalRows_rselenco1 == 0) { // Show if recordset empty ?> <tr> <td colspan="7"><?php echo NXT_getResource("The table is empty or the filter you've selected is too restrictive."); ?></td> </tr> <?php } // Show if recordset empty ?> <?php if ($totalRows_rselenco1 > 0) { // Show if recordset not empty ?> <?php do { ?> <tr class="<?php echo @$cnt1++%2==0 ? "" : "KT_even"; ?>"> <td><input type="checkbox" name="kt_pk_elenco" class="id_checkbox" value="<?php echo $row_rselenco1['id']; ?>" /> <input type="hidden" name="id" class="id_field" value="<?php echo $row_rselenco1['id']; ?>" /></td> <td><div class="KT_col_nome_atleta"><?php echo KT_FormatForList($row_rselenco1['nome_atleta'], 20); ?></div></td> <td><div class="KT_col_nascimento"><?php echo KT_FormatForList($row_rselenco1['nascimento'], 20); ?></div></td> <td><div class="KT_col_ondeatual"><?php echo KT_FormatForList($row_rselenco1['ondeatual'], 20); ?></div></td> <td><div class="KT_col_foto_atleta"><?php echo KT_FormatForList($row_rselenco1['foto_atleta'], 20); ?></div></td> <td><div class="KT_col_historia"><?php echo KT_FormatForList($row_rselenco1['historia'], 20); ?></div></td> <td><a class="KT_edit_link" href="cadastrar_jogador.php?id=<?php echo $row_rselenco1['id']; ?>&amp;KT_back=1"><?php echo NXT_getResource("edit_one"); ?></a> <a class="KT_delete_link" href="#delete"><?php echo NXT_getResource("delete_one"); ?></a></td> </tr> <?php } while ($row_rselenco1 = mysql_fetch_assoc($rselenco1)); ?> <?php } // Show if recordset not empty ?> </tbody> </table> <div class="KT_bottomnav"> <div> <?php $nav_listelenco2->Prepare(); require("..includes/nav/NAV_Text_Navigation.inc.php"); ?> </div> </div> <div class="KT_bottombuttons"> <div class="KT_operations"> <a class="KT_edit_op_link" href="#" onclick="nxt_list_edit_link_form(this); return false;"><?php echo NXT_getResource("edit_all"); ?></a> <a class="KT_delete_op_link" href="#" onclick="nxt_list_delete_link_form(this); return false;"><?php echo NXT_getResource("delete_all"); ?></a></div> <span>&nbsp;</span> <select name="no_new" id="no_new"> <option value="1">1</option> <option value="3">3</option> <option value="6">6</option> </select> <a class="KT_additem_op_link" href="cadastrar_jogador.php?KT_back=1" onclick="return nxt_list_additem(this)"><?php echo NXT_getResource("add new"); ?></a></div> </form> </div> <br class="clearfixplain" /> </div> <p>&nbsp;</p> </body> </html> <?php mysql_free_result($rselenco1); ?>
×
×
  • Criar Novo...