DwZone Forum DwZone Forum
Welcome to the DwZone-it Forum
 
  FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups  
    RegisterRegister -->   LoginLogin  
Other extensions  
DwZone Forum Index -> Other extensions
.
Moderators: AdministratorsModerators 
Hint: For improved responsiveness, use Internet Explorer 4 (or above) with Javascript enabled, choose 'Dynamic' from the View dropdown and hit 'Set Options' to save your changes.
New Topic Search for
 View     Per page     Messages Since 
Messages 1 to 10 of 82 (Total: 81) First |  Prev |  Next |  Last  
 Subject Author Date  
    Drag d_r_o_p Sort Table (php)  
View this persons public profile  Daniel   23:10 9 Feb 2020  
 
Hi Gianluigi, the Drag and d_r_o_p sort table is not working, I have this page:

<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
?>
<?php
@session_start();
if (!isset($_SESSION["subcatID"])) {
header('Location: fotos-subgalerias.php');
}
?>
<?php
$catID = $_SESSION['catID'];
$subcatID = $_SESSION['subcatID'];
?>
<?php require_once('../Connections/upload_connect.php'); ?>
<?php require_once( "../webassist/caching/CachedResize_Image.php" ); ?><?php
//*****************
// dwzDragd_r_o_pSort
//*****************
require_once('../Connections/upload_connect.php');
require_once('../dwzDragd_r_o_pSort/Dragd_r_o_p.php');
?>
<?php
if (!function_exists("GetSQLiValueString")) {
function GetSQLiValueString($theConnection, $theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}

$theValue = function_exists("mysqli_real_escape_string") ? mysqli_real_escape_string($theConnection, $theValue) : mysqli_escape_string($theConnection, $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;
}
}
?>
<?php
//**************************
// ProfRecWiz - MySqli
// http://www.dwzone-it.com
// Version: 1.0.18
//**************************
mysqli_select_db($upload_connect, $database_upload_connect);
$mysqli_subcategoria1_query = "SELECT categoria.*, subcategoria.*, fotos.*, subcategoria.subcatID FROM ((categoria LEFT JOIN subcategoria ON categoria.categoriaID = subcategoria.subcatCATID) ) LEFT JOIN fotos ON subcategoria.subcatID = fotos.fotosSUBCATID WHERE (((subcategoria.subcatID)=" .GetSQLiValueString($upload_connect, isset($_SESSION['subcatID'])?$_SESSION['subcatID']:-1, 'int') ."))";
$subcategoria1 = mysqli_query($upload_connect, $mysqli_subcategoria1_query) or die(mysqli_error($upload_connect));
$row_subcategoria1 = mysqli_fetch_assoc($subcategoria1);
$totalRows_subcategoria1 = mysqli_num_rows($subcategoria1);
//**************************
// ProfRecWiz - MySqli
//**************************
?><?php
//**************************
// Drag-d_r_o_p Sort
// http://www.DwZone-it.com
// Version: 1.2.1
//**************************
$dwzSort = new dwzDragd_r_o_pSort();
$dwzSort->Init();
$dwzSort->SetConnString($hostname_upload_connect, $database_upload_connect, $username_upload_connect, $password_upload_connect);
$dwzSort->SetDbTable("fotos@_@upload_connect");
$dwzSort->SetSortField("fotosORD");
$dwzSort->SetUniqueKeyField("fotosID");
$dwzSort->SetKeyNumeric("true");
$dwzSort->SetRecordset("subcategoria1");
$dwzSort->SetRecSortField("fotosORD");
$dwzSort->SetRecUniqueKeyField("fotosID");
$dwzSort->SethasHeader("true");
$dwzSort->SethasFooter("false");
$dwzSort->IdClientTable("table_galeria");
$dwzSort->SetDragClassName("Dragd_r_o_pCell");
$dwzSort->SetDragActiveClassName("Dragd_r_o_pCell_Active");
$dwzSort->SetSortOn("On Change");
$dwzSort->SetFormName("Update_Cool_Default");
$dwzSort->SetDebug("false");
$dwzSort->e_x_e_cute();
?>
<!doctype html>
<html>
<head>
<?php
//*****************
// dwzDragd_r_o_pSort
//*****************
echo "<script language='JavaScript' src='../dwzDragd_r_o_pSort/Dragd_r_o_p.js' type='text/javascript'></script>";
?><meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="../css/bootstrap.min.css">
<link rel="stylesheet" href="../css/lightbox.min.css">
<title>Galería <?php echo dwzGetRecValue('subcategoria1','categoriaNOM'); ?> | <?php echo dwzGetRecValue('subcategoria1','subcatNOM'); ?></title>
<style>
#dwzDragDiv {
display: none;
position: absolute;
background-color: #75A9C8;
border: 1px dashed #003399;
filter:progid:DXImageTransform.Microsoft.Alpha(opacity=85);
}
.Dragd_r_o_pCell {
background-image: url(/images/Dragd_r_o_p.gif);
background-position: center center;
background-repeat: no-repeat;
background-color: #cecece;
margin: 1px;
border: 1px solid #FFFFFF;
padding: 1 1 1 1;
cursor: move;
}
.Dragd_r_o_pCell_Active {
background-image: url(/images/Dragd_r_o_pActive.gif);
background-position: center center;
background-repeat: no-repeat;
background-color: #ADD8E6;
margin: 1px;
border: 1px solid #FFFFFF;
padding: 1 1 1 1;
cursor: move;
}
</style>
</head>

<body>
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="fotos-galerias.php">Crear Galerías</a></li>
<li class="breadcrumb-item"><a href="fotos-subgalerias.php">Galería <?php echo dwzGetRecValue('subcategoria1','categoriaNOM'); ?></a></li>
<li class="breadcrumb-item active" aria-current="page"><?php echo dwzGetRecValue('subcategoria1','subcatNOM'); ?></li>
</ol>
</nav>
<section id="actualizar" style="margin: 50px auto;">
<div class="container">
<div class="row">
<div class="col-md-12">
<h2 class="text-center">Galería <?php echo dwzGetRecValue('subcategoria1','subcatNOM'); ?></h2>
<hr>
</div>
</div>
<form enctype="multipart/form-data" class="w-100" id="insert_fotos_form_galeria" name="insert_fotos_form_galeria" method="post" action="<?php echo (htmlentities($_SERVER["PHP_SELF"], ENT_QUOTES)); ?>">
<div class="row">
<div class="col-md-6">


</div>
<div class="col-md-6">
<label for="descripcion">Descripción de fotos</label>
<div class="form-group">
<input class="form-control form-control-lg" name="insert_fotosDES" type="text" id="insert_fotosDES" value="">
<input name="insert_SUBCATID" type="hidden" id="insert_SUBCATID" value="<?php echo dwzGetRecValue('subcategoria1','subcatID'); ?>">
<input name="insert_Order" type="hidden" id="insert_Order" value="">
</div>
</div>
</div>
</form>
</div>
</section>
<hr>
<?php
if ("".(dwzGetRecValue('subcategoria1','fotosID')) ."" >= "1") { // WebAssist Show If
?>
<section>
<div class="container">
<div class="row" style="margin-bottom: 25px">
<div class="col-md-12">
<table id="table_galeria" width="100%" border="1" style="text-align:center">
<tbody>
<tr>
<th></th>
<th>Foto</th>
<th>Imagen</th>
<th>Rotar</th>
<th colspan="2">Acciones</th>
</tr>
<?php
//*****************************
// ProfRecWiz
// Repeat Region
// Before Selection Instance
//*****************************
$dwz_loop = 0;
$dwzLoopName = "Repeat1";
$dwzMaxRec = "-1";
do{
$dwz_loop += 1;
//End Repeat region
?>
<form enctype="multipart/form-data" class="Cool_Default" id="Update_Cool_Default" name="Update_Cool_Default" method="post" action="<?php echo $dwzSort->GetFormAction(); ?>">
<tr style="font-weight:800; ">
<td class="Dragd_r_o_pCell" style="width: 50px"><?php
//*****************
// dwzDragd_r_o_pSort
//*****************
echo $dwzSort->ActiveCellCode();
?>
<img src='../images/Trasparent.gif' alt='Click to drag and change the order' width='25' height="1" border='0' >
<input name="update_Order" type="hidden" id="update_Order" value="<?php
//**************************
// Drag-d_r_o_p Sort
//**************************
$dwzSortValue = new dwzDragd_r_o_pSort();
$dwzSortFieldName = "update_Order";
$dwzSortValue->SetConnString($hostname_upload_connect, $database_upload_connect, $username_upload_connect, $password_upload_connect);
$dwzSortValue->SetDbTable("fotos@_@upload_connect");
$dwzSortValue->SetSortField("fotosORD");
$dwzSortValue->SetDefaultValue(dwzGetRecValue('subcategoria1','fotosORD'));
echo $dwzSortValue->GetSortOrderValue();
?>">
</td>
<td>
<a href="../media/galeries/<?php echo dwzGetRecValue('subcategoria1','categoriaID'); ?>/<?php echo dwzGetRecValue('subcategoria1','subcatID'); ?>/<?php echo dwzGetRecValue('subcategoria1','fotosADD'); ?>" data-lightbox="<?php echo dwzGetRecValue('subcategoria1','fotosADD'); ?>" data-title="<?php echo dwzGetRecValue('subcategoria1','fotosADD'); ?>">
<?php
if(TRUE){ // Begin Cached Resized Image: ImageCacheInstance_1472070939815
ob_start();
?>
<img src="../media/galeries/<?php echo dwzGetRecValue('subcategoria1','categoriaID'); ?>/<?php echo dwzGetRecValue('subcategoria1','subcatID'); ?>/<?php echo dwzGetRecValue('subcategoria1','fotosADD'); ?>" width="100" height="100" alt=""/>
<?php
echo(getCachedResizedImageHTML(ob_get_clean(), "../media/galeries/cache", "fit", "#FFFFFF", false));
} // End Cached Resized Image: ImageCacheInstance_1472070939815
?>
</a>
</td>
<td style="padding:0 5px">
<input id="nombre_foto_upd" name="nombre_foto_upd" type="text" value="<?php echo dwzGetRecValue('subcategoria1','fotosDES'); ?>" class="form-control form-control-lg" placeholder="Descripción Foto">
</td>
<td class="text-center" style="margin:auto; padding:0 5px">
<input class="form-control form-control-lg" type="text" name="rotate_image" id="rotate_image" value="">
</td>
<td>
<input name="Update_submit" type="image" id="Update_submit" src="../images/check.png">
<input type="hidden" name="fotos_id" id="fotos_id" value="<?php echo dwzGetRecValue('subcategoria1','fotosID'); ?>">
</td>
<td>
<input name="Delete_submit" type="image" id="Delete_submit" src="../images/btn-delete-large.png">
<input type="hidden" name="fotos_imagen" id="fotos_imagen" value="<?php echo dwzGetRecValue('subcategoria1','fotosADD'); ?>">
</td>
</tr><?php
//*****************
// dwzDragd_r_o_pSort
//*****************
echo $dwzSort->BottomPageCode();
?>
</form>
<?php
//*****************************
// ProfRecWiz
// Repeat Region
// After Selection Instance
//*****************************
$dwzLoopName = "Repeat1";
if($dwzMaxRec != "" && $dwzMaxRec != "-1"){
if(intval($dwz_loop) >= intval($dwzMaxRec)){
break;
}
}
}while($row_subcategoria1 = mysqli_fetch_assoc($subcategoria1));
//End Repeat region
?>
</tbody>
</table>
</div>
</div>
</div>
</section>
<?php } ?>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="../js/jquery-3.4.1.min.js"></script>
<script src="../js/popper.min.js"></script>
<script src="../js/bootstrap.min.js"></script>
<script src="../js/lightbox.min.js"></script>
</body>
</html>
<?php
//**************************
// ProfRecWiz - MySqli
//**************************
mysqli_free_result($subcategoria1);
//**************************
// ProfRecWiz - MySqli
//**************************
?>
<?php
//**************************
// ProfRecWiz
//**************************
function dwzGetRecValue($rec, $field){
if(isset($GLOBALS['row_'.$rec])){
return $GLOBALS['row_'.$rec][$field];
}else{
return $rec .'.' .$field;
}
}
//**************************
// ProfRecWiz
//**************************
?>
 
Reply to this current thread  View this persons public profile  Send Private Message
   Re: Drag d_r_o_p Sort Table (php)  
View this persons public profile  Gianluigi   11:13 10 Feb 2020  
   Date Format error  
View this persons public profile  Daniel   19:25 19 Sep 2017  
   Scheduler event interface  
View this persons public profile  Daniel   13:19 8 Sep 2017  
   Re: Scheduler event interface  
View this persons public profile  Gianluigi   13:56 8 Sep 2017  
   Scheduler error on load events  
View this persons public profile  Daniel   9:37 8 Sep 2017  
   Re: Scheduler error on load events  
View this persons public profile  Gianluigi   10:11 8 Sep 2017  
   Re: Scheduler error on load events  
View this persons public profile  Daniel   13:17 8 Sep 2017  
   No Extensions Showing  
View this persons public profile  Martin Cotterill   2:21 28 Aug 2017  
   Re: No Extensions Showing  
View this persons public profile  Gianluigi   9:49 28 Aug 2017  
Last Visit: Friday 29 Mar, 2024 0:56 am First |  Prev |  Next |  Last  
 Login
Username:  Password:    
Read Message Read Message   Unread message Unread message
Read message [popular] Read message [popular]   Unread message [popular] Unread message [popular]
Read message [locked] Read message [locked]   Unread message [locked] Unread message [locked]
All times are GMT-1

Jump to: