$content = $common->direct_replace($db_object, $msg, $array);
        $replace["Approved"] = $content;
        $returncontent = $common->direct_replace($db_object, $returncontent, $replace);
        echo $returncontent;
    }
}
$obj = new approval();
if ($resubmit) {
    $action = "resubmit";
}
if ($submit) {
    $action = "onapproval";
}
switch ($action) {
    case null:
        $obj->show_form($db_object, $common, $default, $_GET, $error_msg);
        break;
    case resubmit:
        $obj->resubmit($db_object, $common, $default, $_POST, $user_id, $error_msg);
        $err = $error_msg['cResubmitted'];
        $string = "alert('{$err}');";
        ?>
<script language="javascript">
	<?php 
        echo $string;
        ?>
</script>
<?php 
        $obj->show_form($db_object, $common, $default, $_POST, $error_msg);
        break;
    case onapproval:
if($fApprove)
{
	$action="approve";
}

switch($action)
{
	case "alert":
	
	$obj->show_approval($db_object,$common,$user_id);
	
	break;
	
	case "show":
	
	$obj->show_form($db_object,$common,$plan_id);
	
	break;
	
	case "save":
	
	$obj->make_changes($db_object,$common,$_POST,$error_msg);
	
	break;
	
	case "approve":
	
$obj->approve($db_object,$common,$_POST,$default,$error_msg);
	
	break;