<table width="100%" cellspacing="0" bgcolor="#000080">
			<tr>
				<td bgcolor="#FFFFFF">

<?php 
if ($arti_id == "") {
    $article_last = new Article();
    $article_last->SetDatabase($database);
    $article_last->SelectLastArticleByUserAndMenuName($guardian->GetUserId(), "Cursos");
    $arti_id = $article_last->GetId();
}
if ($arti_id != "") {
    $article_tmp = new Article();
    $article_tmp->SetDatabase($database);
    $article_tmp->SetId($arti_id);
    $article_tmp->SelectById();
    ?>
				
				
					<table width="100%" cellspacing="1" bgcolor="#000080">
						<tr>
							<td bgcolor="#DDDDDD" align="center" width="100%">

<?php 
    echo $article_tmp->GetTitle();
    ?>

							</td>
						</tr>
						<tr>
Example #2
0
            $article->SetDate($date->GetDate());
            $article->SetUser($arti_user_id);
            $article->SetSubject($arti_subj_id);
            if ($article->Update()) {
                $message_position = 5;
                $message = $screen_module_name . " alterado com sucesso.";
            } else {
                $message_position = 5;
                $message = "Problemas na operação.";
            }
        }
    }
    if ($action == 4) {
        $article = new Article();
        $article->SetDatabase($database);
        $article->SetId($arti_id);
        if ($article->Delete()) {
            $message_position = 5;
            $message = $screen_module_name . " excluído com sucesso.";
            $arti_id = "";
            $arti_title = "";
            $arti_date = "";
            $arti_user_id = "";
            $arti_subj_id = "";
        } else {
            $message_position = 5;
            $message = "Problemas na operação.";
        }
    }
}
?>