コード例 #1
0
ファイル: compose.php プロジェクト: scarnago/pipecode
//
// You should have received a copy of the GNU General Public License
// along with Pipecode.  If not, see <http://www.gnu.org/licenses/>.
//
include "mail.php";
if (http_post()) {
    $to = http_post_string("to", array("len" => 250, "valid" => "[a-z][A-Z][0-9]-_.<>@+ "));
    $subject = http_post_string("subject", array("len" => 250, "valid" => "[ALL]"));
    $body = http_post_string("body", array("len" => 64000, "valid" => "[ALL]"));
    $in_reply_to = http_post_string("in_reply_to", array("required" => false, "len" => 250, "valid" => "[a-z][A-Z][0-9]-_.@+-"));
    send_web_mail($to, $subject, $body, $in_reply_to);
    header("Location: /mail/");
    die;
}
$to = http_get_string("to", array("required" => false, "len" => 250, "valid" => "[a-z][A-Z][0-9]-_.<>@+ "));
$mid = http_get_int("mid", array("required" => false));
if ($mid > 0) {
    $message = db_get_rec("mail", $mid);
    $in_reply_to = $message["message_id"];
    $to = $message["mail_from"];
    $subject = $message["subject"];
    if (substr($subject, 0, 4) != "Re: ") {
        $subject = "Re: {$subject}";
    }
} else {
    $in_reply_to = "";
    $subject = "";
}
print_header("Mail", array("Inbox"), array("inbox"), array("/mail/"));
writeln('<form method="post">');
writeln('<input name="in_reply_to" type="hidden" value="' . $in_reply_to . '"/>');
コード例 #2
0
ファイル: add.php プロジェクト: scarnago/pipecode
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Pipecode 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 General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Pipecode.  If not, see <http://www.gnu.org/licenses/>.
//
include "feed.php";
if ($zid != $auth_zid) {
    die("not your page");
}
$col = http_get_int("col");
if ($col < 0 || $col > 2) {
    die("invalid col [{$col}]");
}
if (http_post()) {
    $fid = http_post_int("fid", array("required" => false));
    $uri = http_post_string("uri", array("required" => false, "len" => 100, "valid" => "[a-z][A-Z][0-9]~@#\$%&()-_=+[];:,./?"));
    if ($fid == 0) {
        if ($uri == "") {
            die("no feed uri given");
        }
        $fid = add_feed($uri);
    }
    if (!db_has_rec("feed", $fid)) {
        die("fid not found [{$fid}]");
    }
コード例 #3
0
ファイル: remove.php プロジェクト: scarnago/pipecode
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Pipecode 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 General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Pipecode.  If not, see <http://www.gnu.org/licenses/>.
//
if ($zid != $auth_zid) {
    die("not your page");
}
$fid = http_get_int("fid");
$feed = db_get_rec("feed", $fid);
if (http_post()) {
    db_del_rec("feed_user", array("zid" => $auth_zid, "fid" => $fid));
    $row = run_sql("select count(zid) as user_count from feed_user where fid = ?", array($fid));
    $count = $row[0]["user_count"];
    if ($count == 0) {
        run_sql("delete from feed_item where fid = ?", array($fid));
        run_sql("delete from feed where fid = ?", array($fid));
    }
    header("Location: edit");
    die;
}
print_header();
writeln('<form method="post">');
writeln('<h1>Remove Feed</h1>');
コード例 #4
0
ファイル: index.php プロジェクト: scarnago/pipecode
// This file is part of Pipecode.
//
// Pipecode is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Pipecode 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 General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Pipecode.  If not, see <http://www.gnu.org/licenses/>.
//
$page = http_get_int("page", array("default" => 1, "required" => false));
$description = karma_description($user_conf["karma"]);
$icon = "karma-" . strtolower($description) . "-32.png";
$rows_per_page = 10;
$row = run_sql("select count(zid) as row_count from karma_log where zid = ?", array($zid));
$row_count = (int) $row[0]["row_count"];
$pages_count = ceil($row_count / $rows_per_page);
$row_start = ($page - 1) * $rows_per_page;
print_header("Karma");
writeln('<table class="fill">');
writeln('<tr>');
writeln('<td class="left_col">');
print_left_bar("account", "karma");
writeln('</td>');
writeln('<td class="fill">');
writeln('<h1>Karma</h1>');
コード例 #5
0
ファイル: view.php プロジェクト: scarnago/pipecode
	cursor: pointer;
	line-height: 20px;
	padding: 0px;
	padding-left: 20px;
	padding-right: 2px;
	margin-right: 2px;
	vertical-align: middle;
}
.tool_button:hover {
	background-color: #aebcd4;
}
*/
//writeln('<div class="tool_button" style="background-image: url(/images/mail-compose-16.png)">Compose</div></a>');
//writeln('<div class="tool_button" style="background-image: url(/images/mail-reply-16.png)">Reply</div></a>');
//writeln('<div class="tool_button" style="background-image: url(/images/mail-forward-16.png)">Forward</div></a>');
$mail_id = http_get_int("mid");
$message = db_get_rec("mail", $mail_id);
if ($message["zid"] != $auth_zid) {
    die("not your message");
}
if (http_post("junk")) {
    $message["location"] = "Junk";
    db_set_rec("mail", $message);
    header("Location: /mail/");
    die;
}
if (http_post("delete")) {
    $message["location"] = "Trash";
    db_set_rec("mail", $message);
    header("Location: /mail/");
    die;