예제 #1
0
 function set_alt($data, $entit = true)
 {
     if ($entit) {
         $data = str_entit($data);
     }
     $this->alt = (string) $data;
     return true;
 }
예제 #2
0
    }
    if ($_POST['comments_allow'] <= 0) {
        $ca_y = '';
        $ca_n = 'checked="checked"';
    }
    if ($_POST['published'] < 0) {
        $p_y = '';
        $p_n = 'checked="checked"';
    }
    if (isset($_POST['now'])) {
        $date_disabled = 'disabled="disabled"';
        $date_now = 'checked="checked"';
    }
} else {
    $current_cat_id = array(1);
    $ft->assign('NOTE_PREVIEW', false);
}
$ft->define('form_noteadd', 'form_noteadd.tpl');
$ft->assign(array('ONLY_IN_CAT_Y' => $oic_y, 'ONLY_IN_CAT_N' => $oic_n, 'COMMENTS_ALLOW_Y' => $ca_y, 'COMMENTS_ALLOW_N' => $ca_n, 'PUBLISHED_Y' => $p_y, 'PUBLISHED_N' => $p_n, 'DATE' => $date, 'AUTHOR' => isset($_POST['author']) ? str_entit($_POST['author']) : $_SESSION['login'], 'DATE_DISABLED' => $date_disabled, 'DATE_NOW' => $date_now));
unset($oic_y, $oic_n, $ca_y, $ca_n, $p_y, $p_n);
//wyswietlamy jakis komunikat ?
if (isset($_GET['msg']) && is_numeric($_GET['msg'])) {
    $monit[] = $i18n['add_note'][$_GET['msg']];
}
if (count($monit)) {
    tpl_message($monit);
}
//lista kategorii
$cats = db_get_categories();
tpl_categories('CATEGORIES', $cats, 0, $current_cat_id);
$ft->parse('ROWS', '.form_noteadd');