Archived
1
0
Disbranĉigi 0
Ĉi tiu deponejo arĥiviĝis je 2024-01-28. Vi povas vidi kaj elŝuti dosierojn, sed ne povas puŝi nek raporti problemojn nek tirpeti.
blagoblag/p/new/private/post_create.php

34 lines
1023 B
PHP
Raw Permalink Normal View History

2019-02-18 23:24:07 -06:00
<?php
/* This file is free software: you can redistribute it and/or modify
it under the terms of version 3 of the GNU Affero General Public
License as published by the Free Software Foundation.
This file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details. */
$depth = "../../../";
include "../../../res/lib/load.php";
$title = scrub($_POST['title']);
$desc = scrub($_POST['desc']);
$text = scrub($_POST['text']);
// -------------------------------------
2019-02-23 01:15:14 -06:00
auth_enforce(user_logged_in(),
array("contributor", "wizard", "archmage"), "make posts");
2019-02-18 23:24:07 -06:00
input_enforce(array($title, $desc, $text),
array("Title", "Summary", "Text"),
array("title", "tweet", "ne_string"));
// -------------------------------------
2019-02-23 01:15:14 -06:00
post_create($title, user_logged_in(), $desc, $text);
2019-02-18 23:24:07 -06:00
2019-02-23 01:15:14 -06:00
root_redirect($GLOBALS['post_prefix_title'] . $title);
2019-02-18 23:24:07 -06:00
?>