PHP Code

chatmasta

New member
Jan 7, 2007
2,613
68
0
NYC
I think everyone agrees that the PHP code box is painful to look at. It would look nicer if the background of it were simply white instead of gray.

[high=php]
function is_dash($str) {
return ($str == '-');
}

function getValue($field) {
return (!empty($_POST[$field])) ? $_POST[$field] : '';
}

function getLink($path) {
return WWW . $path;
}

function getHeader() {
require_once(ROOT . 'includes' . DS . 'header.php');
}

function getFooter() {
require_once(ROOT . 'includes' . DS . 'footer.php');
}

function dieFooter() {
getFooter();
die;
}

function getTpl($file, $data) {
$tpl = $data;
include(ROOT . 'includes' . DS . 'tpl' . DS . $file . '.tpl');
}

function loadFunc($functions) {
require_once(ROOT . 'includes' . DS . 'functions' . DS . $functions . '.php');
}

function loadClass($class) {
require_once(ROOT . 'lib' . DS . $class . 'inc.php');
}

function dbConnect() {
if(!defined('DB_CONNECTED')) {
mysql_pconnect(DB_HOST, DB_USER, DB_PASS) or die(mysql_error());
mysql_select_db(DB_NAME) or die(mysql_error());
define('DB_CONNECTED', true);
}
}

function dbSafe($str) {
return mysql_real_escape_string($str);
}
[/high]

Gross.
 


I've made several posts/comments about it. Apparently the effort involved in fixing it is comparable to the creation of the Panama Canal.