コード例 #1
0
ファイル: art.php プロジェクト: BGCX067/f3site-svn-to-git
        }
        #Get text
        $res = $db->query('SELECT page,text,opt FROM ' . PRE . 'artstxt WHERE ID=' . $id . ' ORDER BY page');
        $full = $res->fetchAll(3);
        $res = null;
        if (!$full) {
            $full = array(array(1, '', 1));
        }
    } else {
        $art = array('pages' => 1, 'name' => '', 'access' => 1, 'priority' => 2, 'dsc' => '', 'author' => $user['login'], 'cat' => $lastCat);
        $full = array(array(1, '', 1));
    }
}
#Checkbox
foreach ($full as $key => &$val) {
    $full[$key] = array('page' => $val[0], 'txt' => $val[1], 'br' => $val[2] & 1, 'emo' => $val[2] & 2, 'code' => $val[2] & 4);
    if ($full[$key]['code']) {
        $full[$key]['txt'] = preg_replace_callback(array('#<(pre)([^>]*)>(.*?)</pre>#si', '#<(code)([^>]*)>(.*?)</code>#si'), create_function('$x', 'return "<$x[1]$x[2]>".htmlspecialchars_decode($x[3],0)."</$x[1]>";'), $full[$key]['txt']);
    }
}
#Editor JS
if (isset($cfg['wysiwyg']) && is_dir('plugins/editor')) {
    $view->script('plugins/editor/loader.js');
} else {
    $view->script(LANG_DIR . 'edit.js');
    $view->script('cache/emots.js');
    $view->script('lib/editor.js');
}
#Template
$view->add('edit_art', array('art' => &$art, 'id' => $id, 'full' => &$full, 'cats' => Slaves(1, $art['cat']), 'author' => authors()));
コード例 #2
0
    echo "<tr><td align=right>" . $t->translate("New e-mail") . " (100):</td><td><input type=\"TEXT\" name=\"email\" size=40 maxlength=100>\n";
    echo "</td></tr>\n";
    echo "<tr><td>&nbsp;</td>\n";
    echo "<td><input type=\"submit\" value=\"" . $t->translate("Change") . "\">";
    echo "</td></tr>\n";
    echo "</form>\n";
    echo "</table>\n";
    echo "<BR>\n";
    // Delete author
    $bs->box_strip($t->translate("Delete author"));
    echo "<form action=\"" . $sess->url("{$PHP_SELF}") . "\" method=\"POST\" name=\"del\">\n";
    echo "<input type=\"hidden\" name=\"mode\" value=\"4\">";
    echo "<table border=0 cellspacing=0 cellpadding=3 width=100%>\n";
    echo "<tr><td align=right width=30%>" . $t->translate("Author") . ":</td><td width=70%>\n";
    echo "<select name=\"author_id\" size=\"5\">\n";
    authors("");
    // We select the first one to avoid having a blank line
    echo "</select></td></tr>\n";
    echo "</td></tr>\n";
    echo "<tr><td>&nbsp;</td>\n";
    echo "<td><input type=\"button\" value=\"" . $t->translate("Delete") . "\" onclick=\"test = confirm('" . $t->translate("Delete entry?") . "'); if (test==true) document.del.submit();\">";
    echo "</td></tr>\n";
    echo "</form>\n";
    echo "</table>\n";
    $bx->box_body_end();
    $bx->box_end();
}
?>

<!-- end content -->