Thanks guys, the fix cache key didn't work.
When I open the functions_general.php file in microsoft expression, on the design page, i.e. what you see in browser has the following:
/si", ' ', $clean_it); } // remove any double-spaces created by cleanups: while (strstr($clean_it, ' ')) $clean_it = str_replace(' ', ' ', $clean_it); // remove other html code to prevent problems on display of text $clean_it = strip_tags($clean_it); return $clean_it; } //// // find module directory // include template specific immediate /modules files // new_products, products_new_listing, featured_products, featured_products_listing, product_listing, specials_index, upcoming, // products_all_listing, products_discount_prices, also_purchased_products function zen_get_module_directory($check_file, $dir_only = 'false') { global $template_dir; $zv_filename = $check_file; if (!strstr($zv_filename, '.php')) $zv_filename .= '.php'; if (file_exists(DIR_WS_MODULES . $template_dir . '/' . $zv_filename)) { $template_dir_select = $template_dir . '/'; } else { $template_dir_select = ''; } if ($dir_only == 'true') { return $template_dir_select; } else { return $template_dir_select . $zv_filename; } } //// // find template or default file function zen_get_file_directory($check_directory, $check_file, $dir_only = 'false') { global $template_dir; $zv_filename = $check_file; if (!strstr($zv_filename, '.php')) $zv_filename .= '.php'; if (file_exists($check_directory . $template_dir . '/' . $zv_filename)) { $zv_directory = $check_directory . $template_dir . '/'; } else { $zv_directory = $check_directory; } if ($dir_only == 'true') { return $zv_directory; } else { return $zv_directory . $zv_filename; } } // check to see if database stored GET terms are in the URL as $_GET parameters function zen_check_url_get_terms() { global $db; $zp_sql = "select * from " . TABLE_GET_TERMS_TO_FILTER; $zp_filter_terms = $db->Execute($zp_sql); $zp_result = false; while (!$zp_filter_terms->EOF) { if (isset($_GET[$zp_filter_terms->fields['get_term_name']]) && zen_not_null($_GET[$zp_filter_terms->fields['get_term_name']])) $zp_result = true; $zp_filter_terms->MoveNext(); } return $zp_result; } // replacement for fmod to manage values < 1 function fmod_round($x, $y) { $x = strval($x); $y = strval($y); $zc_round = ($x1000)/($y1000); $zc_round_ceil = (int)($zc_round); $multiplier = $zc_round_ceil * $y; $results = abs(round($x - $multiplier, 6)); return $results; } //// // return truncated paragraph function zen_truncate_paragraph($paragraph, $size = 100, $word = ' ') { $zv_paragraph = ""; $word = explode(" ", $paragraph); $zv_total = count($word); if ($zv_total > $size) { for ($x=0; $x < $size; $x++) { $zv_paragraph = $zv_paragraph . $word[$x] . " "; } $zv_paragraph = trim($zv_paragraph); } else { $zv_paragraph = trim($paragraph); } return $zv_paragraph; } /** * return an array with zones defined for the specified country / function zen_get_country_zones($country_id) { global $db; $zones_array = array(); $zones = $db->Execute("select zone_id, zone_name from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country_id . "' order by zone_name"); while (!$zones->EOF) { $zones_array[] = array('id' => $zones->fields['zone_id'], 'text' => $zones->fields['zone_name']); $zones->MoveNext(); } return $zones_array; } /* * return an array with country names and matching zones to be used in pulldown menus / function zen_prepare_country_zones_pull_down($country_id = '') { // preset the width of the drop-down for Netscape $pre = ''; if ( (!zen_browser_detect('MSIE')) && (zen_browser_detect('Mozilla/4')) ) { for ($i=0; $i<45; $i++) $pre .= '##'; } $zones = zen_get_country_zones($country_id); if (sizeof($zones) > 0) { $zones_select = array(array('id' => '', 'text' => PLEASE_SELECT)); $zones = array_merge($zones_select, $zones); } else { $zones = array(array('id' => '', 'text' => TYPE_BELOW)); // create dummy options for Netscape to preset the height of the drop-down if ( (!zen_browser_detect('MSIE')) && (zen_browser_detect('Mozilla/4')) ) { for ($i=0; $i<9; $i++) { $zones[] = array('id' => '', 'text' => $pre); } } } return $zones; } /* * supplies javascript to dynamically update the states/provinces list when the country is changed * TABLES: zones * * return string / function zen_js_zone_list($country, $form, $field) { global $db; $countries = $db->Execute("select distinct zone_country_id from " . TABLE_ZONES . " order by zone_country_id"); $num_country = 1; $output_string = ''; while (!$countries->EOF) { if ($num_country == 1) { $output_string .= ' if (' . $country . ' == "' . $countries->fields['zone_country_id'] . '") {' . "\n"; } else { $output_string .= ' } else if (' . $country . ' == "' . $countries->fields['zone_country_id'] . '") {' . "\n"; } $states = $db->Execute("select zone_name, zone_id from " . TABLE_ZONES . " where zone_country_id = '" . $countries->fields['zone_country_id'] . "' order by zone_name"); $num_state = 1; while (!$states->EOF) { if ($num_state == '1') $output_string .= ' ' . $form . '.' . $field . '.options[0] = new Option("' . PLEASE_SELECT . '", "");' . "\n"; $output_string .= ' ' . $form . '.' . $field . '.options[' . $num_state . '] = new Option("' . $states->fields['zone_name'] . '", "' . $states->fields['zone_id'] . '");' . "\n"; $num_state++; $states->MoveNext(); } $num_country++; $countries->MoveNext(); $output_string .= ' hideStateField(' . $form . ');' . "\n" ; } $output_string .= ' } else {' . "\n" . ' ' . $form . '.' . $field . '.options[0] = new Option("' . TYPE_BELOW . '", "");' . "\n" . ' showStateField(' . $form . ');' . "\n" . ' }' . "\n"; return $output_string; } //// // compute the days between two dates function date_diff($date1, $date2) { //$date1 today, or any other day //$date2 date to check against $d1 = explode("-", $date1); $y1 = $d1[0]; $m1 = $d1[1]; $d1 = $d1[2]; $d2 = explode("-", $date2); $y2 = $d2[0]; $m2 = $d2[1]; $d2 = $d2[2]; $date1_set = mktime(0,0,0, $m1, $d1, $y1); $date2_set = mktime(0,0,0, $m2, $d2, $y2); return(round(($date2_set-$date1_set)/(6060*24))); } /** * strip out accented characters to reasonable approximations of english equivalents / function replace_accents($s) { $s = htmlentities($s); $s = preg_replace ('/&([a-zA-Z])(uml|acute|elig|grave|circ|tilde|cedil|ring|quest|slash|caron);/', '$1', $s); $s = html_entity_decode($s); return $s; } /* * function to override PHP's is_writable() which can occasionally be unreliable due to O/S and F/S differences * attempts to open the specified file for writing. Returns true if successful, false if not. * if a directory is specified, uses PHP's is_writable() anyway * * @var string * @return boolean */ function is__writeable($filepath) { if (is_dir($filepath)) return is_writable($filepath); $fp = @fopen($filepath, 'a'); if ($fp) { @fclose($fp); return true; } return false; } ///////////////////////////////////////////// //// // call additional function files // prices and quantities require(DIR_WS_FUNCTIONS . 'functions_prices.php'); // taxes require(DIR_WS_FUNCTIONS . 'functions_taxes.php'); // gv and coupons require(DIR_WS_FUNCTIONS . 'functions_gvcoupons.php'); // categories, paths, pulldowns require(DIR_WS_FUNCTIONS . 'functions_categories.php'); // customers and addresses require(DIR_WS_FUNCTIONS . 'functions_customers.php'); // lookup information require(DIR_WS_FUNCTIONS . 'functions_lookups.php'); //// ///////////////////////////////////////////// ?>
normally this is blank... however, if I delete this I get an internal 500 server error. Any thoughts?
the function itself looks OK to me.