Smart Image Processor PHP 2 Support Product Page

Not redirecting or resizing

Asked 08 Aug 2012 03:05:34
1
has this question
08 Aug 2012 03:05:34 Chuck Borrelli posted:
This is very frustrating... I put everything in the proper order per other posts, and it worked in DW CS5

BUT in DW 6 on Mountain lion, the same page does not work (afer I load it up):

It is not even redirecting to the eventmaster.php page


<?php require_once('../Connections/Varalli.php'); ?>
<?php require_once('../ScriptLibrary/incPureUpload.php'); ?>
<?php require_once('../ScriptLibrary/cGraphicMediator.php'); ?>

<?php
// Pure PHP Upload 2.1.12
$ppu = new pureFileUpload();
$ppu->path = "../varupload";
$ppu->extensions = "GIF,JPG,JPEG,BMP,PNG";
$ppu->formName = "addEvent";
$ppu->storeType = "file";
$ppu->sizeLimit = "1500";
$ppu->nameConflict = "over";
$ppu->nameToLower = false;
$ppu->requireUpload = false;
$ppu->minWidth = "";
$ppu->minHeight = "";
$ppu->maxWidth = "";
$ppu->maxHeight = "";
$ppu->saveWidth = "";
$ppu->saveHeight = "";
$ppu->timeout = "600";
$ppu->progressBar = "";
$ppu->progressWidth = "300";
$ppu->progressHeight = "100";
$ppu->redirectURL = "";
$ppu->checkVersion("2.1.12");
$ppu->doUpload();

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
// Smart Image Processor PHP 2.0.9
if (isset($_GET['GP_upload'])) {
$imageResize = new cGraphicMediator("upload", $ppu, "");
$imageResize->setComponent("Auto");
$imageResize->setMatteColor("#FFFFFF");
$imageResize->resizeEx(200, 200, true, false);
$imageResize->overwrite = true;
$imageResize->save();
$imageResize->process();
$sipp2GoTo = "eventmaster.php";
if (isset($_SERVER['QUERY_STRING'])) {
  $sipp2GoTo .= (strpos($sipp2GoTo, '?')) ? "&" : "?";
  $sipp2GoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $sipp2GoTo));
}
?>
<?
if (isset($editFormAction)) {
  if (isset($_SERVER['QUERY_STRING'])) {
	 if (!preg_match("/GP_upload=true/i", $_SERVER['QUERY_STRING'])) { 
  	  $editFormAction .= "&GP_upload=true";
		}
  } else {
    $editFormAction .= "?GP_upload=true";
  }
}

if (isset($editFormAction)) {
  if (isset($_SERVER['QUERY_STRING'])) {
	  if (!preg_match("/GP_upload=true/i", $_SERVER['QUERY_STRING'])) { 
  	  $editFormAction .= "&GP_upload=true";
		}
  } else {
    $editFormAction .= "?GP_upload=true";
  }
}

$colname_event_rs = "26";
if (isset($_GET['i'])) {
  $colname_event_rs = $_GET['i'];
}
mysql_select_db($database_Varalli, $Varalli);
$query_event_rs = sprintf("SELECT * FROM EventPages WHERE id = %s", GetSQLValueString($colname_event_rs, "int"));
$event_rs = mysql_query($query_event_rs, $Varalli) or die(mysql_error());
$row_event_rs = mysql_fetch_assoc($event_rs);
$totalRows_event_rs = mysql_num_rows($event_rs);
?>
<?php
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
  $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}

if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "addEvent")) {
  $updateSQL = sprintf("UPDATE EventPages SET eventName=%s, ppTemplate=%s, docTitle=%s, pageTitle=%s, bodyContent=%s, pgBgColor=%s, bodyBorderColor=%s, bodyBorderThickness=%s, isActive=%s, fpTitle=%s, fbImage=IFNULL(%s,fbImage), fbDesc=%s WHERE id=%s",
                       GetSQLValueString($_POST['eventName'], "text"),
                       GetSQLValueString($_POST['ppTemplate'], "text"),
                       GetSQLValueString($_POST['docTitle'], "text"),
                       GetSQLValueString($_POST['pageTitle'], "text"),
                       GetSQLValueString($_POST['bodyContent'], "text"),
                       GetSQLValueString($_POST['pgBgColor'], "text"),
                       GetSQLValueString($_POST['bodyBorderColor'], "text"),
                       GetSQLValueString($_POST['bodyBorderThickness'], "text"),
                       GetSQLValueString(isset($_POST['isActive']) ? "true" : "", "defined","'Y'","'N'"),
                       GetSQLValueString($_POST['fpTitle'], "text"),
                       GetSQLValueString($_POST['fbImage'], "text"),
                       GetSQLValueString($_POST['fbDesc'], "text"),
                       GetSQLValueString($_POST['id'], "int"));

  mysql_select_db($database_Varalli, $Varalli);
  $Result1 = mysql_query($updateSQL, $Varalli) or die(mysql_error());
}
?>

Replies

Replied 08 Aug 2012 06:37:32
08 Aug 2012 06:37:32 Teodor Kuduschiev replied:
Hello Chuck,

Please tell us what exactly "does not work" in CS6 on Mountain Lion?
Replied 08 Aug 2012 10:23:16
08 Aug 2012 10:23:16 Chuck Borrelli replied:
Once the uploaded edit page is on the internet, and you visit it, it uploads an image, but will not resize image. Also, the redirect is on SIPP, and it does not work.

I built the page with Mountain Lion and DW6..

I did a similar page last week on Lion and DW5, and it worked well.
Replied 08 Aug 2012 13:22:04
08 Aug 2012 13:22:04 Teodor Kuduschiev replied:
Can you please send me the working and the non-working pages to my email in a zip archive.

My email:

Reply to this topic