26
Okay I set up the new code. Here is what I have.
Parse error: syntax error, unexpected '}' in /home/mydomain/public_html/include/cp_functions.php on line 300
All errors (0) queries (4) blocks (0) extra (0) timers (3)
Errors
-----
Here is the code added to the cp_fuction.php
le="color: #000000"><?php $filename = XOOPS_CACHE_PATH.'/adminmenu.php'; error_reporting(E_ALL | E_STRICT); ini_set('display_errors'); $file = fopen($filename, "w"); if (!$file) { ob_start(); echo 'failed open file'; var_dump('filename', $filename, 'file', $file); $buf = ob_get_clean(); $timestamp = date('Y-m-d H:i:s'); error_log("[$timestamp]n$bufnn", 3, XOOPS_CACHE_PATH . '/debug.log'); return false; } return false; } if ( fwrite($file, $content) == -1 ) { echo 'failed write file'; return false; } fclose($file); // write index.html file in cache folder // file is delete after clear_cache (smarty) xoops_write_index_file( XOOPS_CACHE_PATH ); return true; } function xoops_write_index_file( $path = '') { if ( empty($path) ) { return false; } if (!xoopsfwrite()) { return false; } $path = substr($path, -1) == "/" ? substr($path, 0, -1) : $path; $filename = $path . '/index.html'; error_reporting(E_ALL | E_STRICT); ini_set('display_errors'); $file = fopen($filename, "w"); if (!$file) { ob_start(); echo 'failed open file'; var_dump('filename', $filename, 'file', $file); $buf = ob_get_clean(); $timestamp = date('Y-m-d H:i:s'); error_log("[$timestamp]n$bufnn", 3, XOOPS_CACHE_PATH . '/debug.log'); return false; } return false; } if ( fwrite($file, "<script>history.go(-1);</script>") == -1 ) { echo 'failed write file'; return false; } fclose($file); return true; } ?>