function checkformulaperm($formula) { $formula = preg_replace('/(\\{([\\d\\.\\-]+?)\\})/', "'\\1'", $formula); return checkformulasyntax($formula, array('+', '-', '*', '/', '(', ')', '<', '=', '>', '!', 'and', 'or', ' ', '{', '}', "'"), array('regdate', 'regday', 'regip', 'lastip', 'buyercredit', 'sellercredit', 'digestposts', 'posts', 'threads', 'oltime', 'extcredits[1-8]', 'field[\\d]+')); }
function checkformulacredits($formula) { return checkformulasyntax($formula, array('+', '-', '*', '/', ' '), array('extcredits[1-8]', 'digestposts', 'posts', 'threads', 'oltime', 'friends', 'doings', 'polls', 'blogs', 'albums', 'sharings')); }