<?php


function spaces($num = 0)
{
    $s = " ";
	for ($i = 0; $i < $num; $i++){
        $s .= "&nbsp";
    }
	
    return $s;
}

function text_bold($text)
{
    return "<b>".$text."</b>";
}


function set_post_not_set_numeric($post_name, $value, $overriding_list='')
{
    if(isset($overriding_list) && strlen($overriding_list) > 0){
        if(list_updated($overriding_list)){
            $_POST[$post_name]  = $value;
            return;
        }
    }
    if(!(isset($_POST[$post_name]) && $_POST[$post_name] > 0)){
        $_POST[$post_name]  = $value;
    }
}

function isset_post_numeric($post_name)
{
    if(isset($_POST[$post_name]) && $_POST[$post_name] > 0){
        return true;
    }
    else{
        return false;
    }
}

function isset_post_string($post_name)
{
    if(isset($_POST[$post_name]) && strlen($_POST[$post_name]) > 0){
        return true;
    }
    else{
        return false;
    }
}

function set_post_not_set_string($post_name, $value, $overriding_list='')
{
    if(isset($overriding_list) && strlen($overriding_list) > 0){
        if(list_updated($overriding_list)){
            $_POST[$post_name]  = $value;
            return;
        }
    }
    
    if(!(isset($_POST[$post_name]) && strlen($_POST[$post_name]) > 0)){
        $_POST[$post_name]  = $value;
    }
}


function isset_numeric_post($post_name)
{
    if(isset($_POST[$post_name]) && $_POST[$post_name] > 0){
        return true;
    }
    else{
        return false;
    }
}

function isset_string_post($post_name)
{
    if(isset($_POST[$post_name]) && strlen($_POST[$post_name]) > 0){
        return true;
    }
    else{
        return false;
    }
}

function set_post_not_set_date($post_name, $value, $overriding_list='')
{
    if(isset($overriding_list) && strlen($overriding_list) > 0){
        if(list_updated_date($overriding_list)){
            $_POST[$post_name]  = $value;
            return;
        }
    }
    
    if(!(isset($_POST[$post_name]) && strlen($_POST[$post_name]) > 0)){
        $_POST[$post_name]  = $value;
    }
}


