/**
* Form Prep
*
* Formats text so that it can be safely placed in a form field in the event it has HTML tags.
*
* @access public
* @param string
* @return string
*/
if ( ! function_exists('form_prep'))
{
function form_prep($str = '', $field_name = '')
{
static $prepped_fields = array();
// if the field name is an array we do this recursively
if (is_array($str))
{
foreach ($str as $key => $val)
{
$str[$key] = form_prep($val);
}
return $str;
}
if ($str === '')
{
return '';
}
// we've already prepped a field with this name
// @todo need to figure out a way to namespace this so
// that we know the *exact* field and not just one with
// the same name
if (isset($prepped_fields[$field_name]))
{
return $str;
}
// In case htmlspecialchars misses these.
$str = str_replace(array("'", '"'), array("'", """), $str);
// $str = htmlspecialchars($str);
if ($field_name != '')
{
$prepped_fields[$field_name] = $str;
}
return $str;
}
}
function form_select( $name, $options, $value, $title, $current='' ){
$out = '';
$out .= '';
return $out;
}
function ranger($from, $to){
$ar = array();
for($i=$from;$i<=$to;$i++){
$ar[$i] = $i;
}
return $ar;
}
?>
Warning: file_put_contents(/var/log/mobtop/cabinet.log): Failed to open stream: No such file or directory in /var/www/mobtop/system/libraries/Exceptions.php on line 122