close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

moving store files to root

Thread began 9/11/2010 3:45 am by rmountain411063 | Last modified 9/13/2010 1:59 pm by rmountain411063 | 640 views | 4 replies

rmountain411063

empty delimiter errors

I'll post the code here as the images above are too small

empty delimiter error from line 6: if (strpos(strtolower($WA_thisFile), strtolower($assumedRoot)) === 0) {

and line 10: if (strpos(strtolower($WA_thisFile), strtolower($assumedRoot)) === 0) {


<?php
$WA_localRoot = "" .$WAGLOBAL_localRoot ."";
$WA_remoteRoot = "" .$WAGLOBAL_remoteRoot. "";
$WA_curURL = strtolower((isset($_SERVER["PHP_SELF"]))?$_SERVER["PHP_SELF"]:"");
$assumedRoot = $WA_remoteRoot;
if (strpos($WA_curURL,strtolower($WA_localRoot)) === 0 && (strlen($WA_localRoot) >= strlen($WA_remoteRoot) || strpos($WA_curURL,strtolower($WA_localRoot)) === 0)) {
$assumedRoot = $WA_localRoot;
}
$WA_thisFile = $_SERVER['PHP_SELF'];
if (strpos(strtolower($WA_thisFile), strtolower($assumedRoot)) === 0) {
$WA_thisFile = substr($WA_thisFile, strlen($assumedRoot));
}
else {
$WA_thisFile = substr($WA_thisFile, 1);
}
$WA_ddsArray = explode("/", $WA_thisFile);
$WA_dotDotSlash = "";
for ($n=0; $n<sizeof($WA_ddsArray)-1; $n++) {
$WA_dotDotSlash .= "../";
}
?><?php
// MenuWriter connection includes
require_once($WA_dotDotSlash . "Connections/PowerStoreConnection.php");

// end connection includes
// MenuWriter ignore connection includes
if (1 == 0) {
?><?php require_once('../../Connections/PowerStoreConnection.php'); ?><?php } // End MenuWriter ignore connection includes ?>
<?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
function recursiveNesting($catID) {
$retVal = "";
mysql_select_db($GLOBALS['database_PowerStoreConnection'], $GLOBALS['PowerStoreConnection']);
$query_menuwriter_categories1 = sprintf("SELECT CategoryName, CategoryID, CategoryParent FROM ps3_categories WHERE CategoryParent=%s", GetSQLValueString($catID, "int"));
$menuwriter_categories1 = mysql_query($query_menuwriter_categories1, $GLOBALS['PowerStoreConnection']) or die(mysql_error());
$row_menuwriter_categories1 = mysql_fetch_assoc($menuwriter_categories1);
$totalRows_menuwriter_categories1 = mysql_num_rows($menuwriter_categories1);

if ($totalRows_menuwriter_categories1 > 0) {

$retVal .= '<ul class="level-2">';

do {
$retVal .= ' <li><a href="'.($GLOBALS['assumedRoot']).'Products_Results.php?Search=1&ProductCategoryID[]='.$row_menuwriter_categories1["CategoryID"].'">'.$row_menuwriter_categories1["CategoryName"].'</a>';

$retVal .= recursiveNesting($row_menuwriter_categories1["CategoryID"]) . '</li>';
} while ($row_menuwriter_categories1 = mysql_fetch_assoc($menuwriter_categories1));

$retVal .= '</ul>';
}
mysql_free_result($menuwriter_categories1);
return $retVal;
}
?>
<ul class="level-0" id="cssmw_home">
<li><span><a href="<?php echo($assumedRoot); ?>index.php">Home</a></span></li>
<li class="parent"><span><a href="<?php echo($assumedRoot); ?>Products_Results.php">Products</a></span>
<?php
mysql_select_db($database_PowerStoreConnection, $PowerStoreConnection);
$query_menuwriter_categories = "SELECT CategoryName, CategoryID FROM ps3_categories WHERE CategoryParent = 0";
$menuwriter_categories = mysql_query($query_menuwriter_categories, $PowerStoreConnection) or die(mysql_error());
$row_menuwriter_categories = mysql_fetch_assoc($menuwriter_categories);
$totalRows_menuwriter_categories = mysql_num_rows($menuwriter_categories);
?>
<ul class="level-1">
<li><a href="<?php echo($assumedRoot); ?>Products_Search.php">Search</a></li>
<li><a href="<?php echo($assumedRoot); ?>Products_Results.php?Search=0">Show All Products</a></li>
<?php if ($totalRows_menuwriter_categories > 0) { // Show if recordset not empty ?>
<?php do { ?>
<li class="parent"><a href="<?php echo($assumedRoot); ?>Products_Results.php?Search=1&ProductCategoryID[]=<?php echo $row_menuwriter_categories["CategoryID"]; ?>"><?php echo $row_menuwriter_categories["CategoryName"]; ?></a>
<?php echo(recursiveNesting($row_menuwriter_categories["CategoryID"])) ?>
</li>
<?php } while ($row_menuwriter_categories = mysql_fetch_assoc($menuwriter_categories)); ?>
<?php } // Show if recordset not empty ?>
</ul>
<?php
mysql_free_result($menuwriter_categories);
?>
</li>
<li class="parent"><span><a href="<?php echo($assumedRoot); ?>Support.php">Support</a></span>
<ul class="level-1">
<li><a href="<?php echo($assumedRoot); ?>Ordering.php">Ordering</a></li>
<li><a href="<?php echo($assumedRoot); ?>Shipping.php">Shipping</a></li>
<li><a href="<?php echo($assumedRoot); ?>Returns.php">Returns</a></li>
<li><a href="<?php echo($assumedRoot); ?>orders_History.php">Order History</a></li>
</ul>
</li>
<li><span><a href="<?php echo($assumedRoot); ?>AboutUs.php">About Us</a></span></li>
<li><span><a href="<?php echo($assumedRoot); ?>contactus.php">Contact Us</a></span></li>
</ul>

<script type="text/javascript">if(window.attachEvent) { window.attachEvent("onload", function() { cssmw_home.intializeMenu('cssmw_home',{select_current: 1, orientation: 1}); }); } else if(window.addEventListener) { window.addEventListener("load", function() { cssmw_home.intializeMenu('cssmw_home',{select_current: 1, orientation: 1}); }, true); }</script>



error also on line 134 from the index.php file

if ((strpos($WA_curURL,strtolower($WA_localRoot)) !== false && strpos($WA_curURL,strtolower($WA_localRoot)) == 0) && (strlen($WA_localRoot) >= strlen($WA_remoteRoot) || strpos($WA_curURL,strtolower($WA_localRoot)) === 0)) {
$assumedRoot = $WA_localRoot;

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...