Esempio n. 1
0
        $mysql = "select skill_name from {$skills} where skill_id='{$skill_id}'";
        $arr = $db_object->get_a_line($mysql);
        $skill_name = $arr["skill_name"];
        $path = $common->path;
        $xFile = $path . "/templates/learning/admin_approvalform.html";
        $returncontent = $common->return_file_content($db_object, $xFile);
        $array["user_name"] = $user_name;
        $array["skill"] = $skill_name;
        $msg = $error_msg["cDevApproved"];
        $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}');";
        ?>
	function changedate_display($date)
	{
	list($year,$month,$date)=explode("-",$date);

	//$newdate="";

	$newdate=$month.'/'.$date.'/'.$year;


	return ($newdate);

	}
	
}

$obj=new approval();

if($fSave)
{
	$action="save";
	
}
if($fApprove)
{
	$action="approve";
}

switch($action)
{
	case "alert":