close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Problem with Administrative Back-End (Data Assist Tool)

Thread began 3/26/2010 8:44 pm by Gabriel Tiviroli | Last modified 10/05/2010 7:09 am by Gabriel Tiviroli | 4383 views | 7 replies

Gabriel Tiviroli

More information about the errors.

I'm not sure if the attachments are up, two additional post I give you: php code and another: a database.

<?php require_once("../Connections/voznoticias.php"); ?>
<?php require_once("../WA_DataAssist/WA_AppBuilder_PHP.php"); ?>
<?php require_once("../webassist/file_manipulation/helperphp.php"); ?>
<?php require_once('../Connections/voznoticias.php'); ?>
<?php
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;
}
}
?>
<?php
$maxRows_WADADynListcategorias = 1000;
$pageNum_WADADynListcategorias = 0;
if (isset($_GET['pageNum_WADADynListcategorias'])) {
$pageNum_WADADynListcategorias = $_GET['pageNum_WADADynListcategorias'];
}
$startRow_WADADynListcategorias = $pageNum_WADADynListcategorias * $maxRows_WADADynListcategorias;

mysql_select_db($database_voznoticias, $voznoticias);
$query_WADADynListcategorias = "SELECT categoriaid, nombre_categoria FROM categorias ORDER BY categoriaid";
$query_limit_WADADynListcategorias = sprintf("%s LIMIT %d, %d", $query_WADADynListcategorias, $startRow_WADADynListcategorias, $maxRows_WADADynListcategorias);
$WADADynListcategorias = mysql_query($query_limit_WADADynListcategorias, $voznoticias) or die(mysql_error());
$row_WADADynListcategorias = mysql_fetch_assoc($WADADynListcategorias);

if (isset($_GET['totalRows_WADADynListcategorias'])) {
$totalRows_WADADynListcategorias = $_GET['totalRows_WADADynListcategorias'];
} else {
$all_WADADynListcategorias = mysql_query($query_WADADynListcategorias);
$totalRows_WADADynListcategorias = mysql_num_rows($all_WADADynListcategorias);
}
$totalPages_WADADynListcategorias = ceil($totalRows_WADADynListcategorias/$maxRows_WADADynListcategorias)-1;
?>
<?php
$maxRows_WADADynListimportancia = 1000;
$pageNum_WADADynListimportancia = 0;
if (isset($_GET['pageNum_WADADynListimportancia'])) {
$pageNum_WADADynListimportancia = $_GET['pageNum_WADADynListimportancia'];
}
$startRow_WADADynListimportancia = $pageNum_WADADynListimportancia * $maxRows_WADADynListimportancia;

mysql_select_db($database_voznoticias, $voznoticias);
$query_WADADynListimportancia = "SELECT importanciaid, importancia_valor1 FROM importancia ORDER BY importanciaid";
$query_limit_WADADynListimportancia = sprintf("%s LIMIT %d, %d", $query_WADADynListimportancia, $startRow_WADADynListimportancia, $maxRows_WADADynListimportancia);
$WADADynListimportancia = mysql_query($query_limit_WADADynListimportancia, $voznoticias) or die(mysql_error());
$row_WADADynListimportancia = mysql_fetch_assoc($WADADynListimportancia);

if (isset($_GET['totalRows_WADADynListimportancia'])) {
$totalRows_WADADynListimportancia = $_GET['totalRows_WADADynListimportancia'];
} else {
$all_WADADynListimportancia = mysql_query($query_WADADynListimportancia);
$totalRows_WADADynListimportancia = mysql_num_rows($all_WADADynListimportancia);
}
$totalPages_WADADynListimportancia = ceil($totalRows_WADADynListimportancia/$maxRows_WADADynListimportancia)-1;
?>
<?php
$maxRows_WADADynListpaneles = 1000;
$pageNum_WADADynListpaneles = 0;
if (isset($_GET['pageNum_WADADynListpaneles'])) {
$pageNum_WADADynListpaneles = $_GET['pageNum_WADADynListpaneles'];
}
$startRow_WADADynListpaneles = $pageNum_WADADynListpaneles * $maxRows_WADADynListpaneles;

mysql_select_db($database_voznoticias, $voznoticias);
$query_WADADynListpaneles = "SELECT panelid, panel1 FROM paneles ORDER BY panelid";
$query_limit_WADADynListpaneles = sprintf("%s LIMIT %d, %d", $query_WADADynListpaneles, $startRow_WADADynListpaneles, $maxRows_WADADynListpaneles);
$WADADynListpaneles = mysql_query($query_limit_WADADynListpaneles, $voznoticias) or die(mysql_error());
$row_WADADynListpaneles = mysql_fetch_assoc($WADADynListpaneles);

if (isset($_GET['totalRows_WADADynListpaneles'])) {
$totalRows_WADADynListpaneles = $_GET['totalRows_WADADynListpaneles'];
} else {
$all_WADADynListpaneles = mysql_query($query_WADADynListpaneles);
$totalRows_WADADynListpaneles = mysql_num_rows($all_WADADynListpaneles);
}
$totalPages_WADADynListpaneles = ceil($totalRows_WADADynListpaneles/$maxRows_WADADynListpaneles)-1;?>
<?php
// WA_UploadResult1 Params Start
$WA_UploadResult1_Params = array();
// WA_UploadResult1_1 Start
$WA_UploadResult1_Params["WA_UploadResult1_1"] = array(
'UploadFolder' => "../images/fotosnoticias/lg/",
'FileName' => "[FileName]",
'DefaultFileName' => "",
'ResizeType' => "0",
'ResizeWidth' => "120",
'ResizeHeight' => "120",
'ResizeFillColor' => "#FFFFFF" );
// WA_UploadResult1_1 End
// WA_UploadResult1 Params End?>
<?php
// WA_UploadResult2 Params Start
$WA_UploadResult2_Params = array();
// WA_UploadResult2_1 Start
$WA_UploadResult2_Params["WA_UploadResult2_1"] = array(
'UploadFolder' => "../images/fotosnoticias/tn/",
'FileName' => "[FileName]",
'DefaultFileName' => "",
'ResizeType' => "0",
'ResizeWidth' => "120",
'ResizeHeight' => "120",
'ResizeFillColor' => "#FFFFFF" );
// WA_UploadResult2_1 End
// WA_UploadResult2_2 Start
$WA_UploadResult2_Params["WA_UploadResult2_2"] = array(
'UploadFolder' => "../images/fotosnoticias/tn/tnlistados/",
'FileName' => "[FileName]",
'DefaultFileName' => "",
'ResizeType' => "1",
'ResizeWidth' => "180",
'ResizeHeight' => "90",
'ResizeFillColor' => "#FFFFFF" );
// WA_UploadResult2_2 End
// WA_UploadResult2 Params End
?>
<?php
WA_DFP_SetupUploadStatusStruct("WA_UploadResult1");
if(isset($_POST["Insert_x"])){
WA_DFP_UploadFiles("WA_UploadResult1", "imagen_grande", "0", "", "JPG:90", $WA_UploadResult1_Params);
}?>
<?php
WA_DFP_SetupUploadStatusStruct("WA_UploadResult2");
if(isset($_POST["Insert_x"])){
WA_DFP_UploadFiles("WA_UploadResult2", "imagen_chica", "0", "", "JPG:90", $WA_UploadResult2_Params);
}
?>
<?php
// WA Application Builder Insert
if (isset($_POST["Insert_x"])) // Trigger
{
$WA_connection = $voznoticias;
$WA_table = "noticias";
$WA_sessionName = "WADA_Insert_noticias";
$WA_redirectURL = "noticias_Detail.php";
$WA_keepQueryString = false;
$WA_indexField = "noticiaid";
$WA_fieldNamesStr = "titulo|fecha|hora|piedefoto|resumen|desarrollo|imagen_grande|imagen_chica|categoriaid|importanciaid|panel";
$WA_fieldValuesStr = "".((isset($_POST["titulo"]))?$_POST["titulo"]:"") ."" . "|" . "".((isset($_POST["fecha"]))?$_POST["fecha"]:"") ."" . "|" . "".((isset($_POST["hora"]))?$_POST["hora"]:"") ."" . "|" . "".((isset($_POST["piedefoto"]))?$_POST["piedefoto"]:"") ."" . "|" . "".((isset($_POST["resumen"]))?$_POST["resumen"]:"") ."" . "|" . "".((isset($_POST["desarrollo"]))?$_POST["desarrollo"]:"") ."" . "|" . "".$WA_DFP_UploadStatus["WA_UploadResult1"]["serverFileName"] ."" . "|" . "".$WA_DFP_UploadStatus["WA_UploadResult1"]["serverFileName"] ."" . "|" . "".((isset($_POST["categoriaid"]))?$_POST["categoriaid"]:"") ."" . "|" . "".((isset($_POST["importanciaid"]))?$_POST["importanciaid"]:"") ."" . "|" . "".((isset($_POST["panel"]))?$_POST["panel"]:"") ."";
$WA_columnTypesStr = "none,none,NULL|none,none,NULL|none,none,NULL|none,none,NULL|none,none,NULL";
$WA_fieldNames = explode("|", $WA_fieldNamesStr);
$WA_fieldValues = explode("|", $WA_fieldValuesStr);
$WA_columns = explode("|", $WA_columnTypesStr);
$WA_connectionDB = $database_voznoticias;
mysql_select_db($WA_connectionDB, $WA_connection);
if (!session_id()) session_start();
$insertParamsObj = WA_AB_generateInsertParams($WA_fieldNames, $WA_columns, $WA_fieldValues, -1);
$WA_Sql = "INSERT INTO `" . $WA_table . "` (" . $insertParamsObj->WA_tableValues . ") VALUES (" . $insertParamsObj->WA_dbValues . ")";
$MM_editCmd = mysql_query($WA_Sql, $WA_connection) or die(mysql_error());
$_SESSION[$WA_sessionName] = mysql_insert_id();
if ($WA_redirectURL != "") {
if ($WA_keepQueryString && $WA_redirectURL != "" && isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] !== "" && sizeof($_POST) > 0) {
$WA_redirectURL .= ((strpos($WA_redirectURL, '?') === false)?"?":"&").$_SERVER["QUERY_STRING"];
}
header("Location: ".$WA_redirectURL);
}
}
?>

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...