コード例 #1
0
ファイル: index.php プロジェクト: nbtscommunity/phpfnlib
                //$links[] = ("Close your browser to log out");
            }
        }
        print "</p>";
        print "<p>" . join(' ', $links) . "</p>";
        print "<form action='" . pqurlencode($_SERVER['PHP_SELF']) . "' method='get'><p><label>Search&#xA0;<input type='text' name='search' size='10' /></label></p></form>";
    } elseif ($action == 'reply') {
        if (get_magic_quotes_gpc()) {
            $_GET['to'] = stripslashes($_GET['to']);
        }
        print replyform($page['body'], $_GET['to']);
    } elseif ($action == 'edit') {
        if ($version != $Current) {
            print "<p><em><strong>Warning:</strong> You're not editing the most recent version\n\t\t\t\tof this page.   If you make changes here, you'll save over\n\t\t\t\tsomething that was written since the page you're reading. Be\n\t\t\t\tnice and go to the <a\n\t\t\t\thref='" . rawurlencode($pagename) . ";{$Current}?edit'>current\n\t\t\t\tversion</a> and edit\n\t\t\t\tthat.</em></p><p><em>If you've already typed something, make\n\t\t\t\ta copy, don't hit save, go find where you're supposed to put\n\t\t\t\tit, and then save it there!</em></p>";
        }
        print editform($page['body'], $page['header'], rcs_dereference_version($WIKI_PAGEDIR . "{$pagename}", $version));
        if ($version != $Current) {
            print "<p><em><strong>Warning</strong>, this isn't the current\n\t\t\t\tversion of the page!</em></p>";
        }
    } else {
        die("Error. Unknown Action");
    }
} else {
    http_404();
    print errmsg();
    exit;
}
function wiki_load($pagename, $version = 'Current')
{
    global $WIKI_PAGEDIR;
    if (succeeds($page = rcs_load($WIKI_PAGEDIR . "{$pagename}", $version))) {
コード例 #2
0
ファイル: event.php プロジェクト: u0mo5/app
<?php

include_once "connect.php";
$action = $_GET['action'];
$id = (int) $_GET['id'];
switch ($action) {
    case 'add':
        addform();
        break;
    case 'edit':
        editform($id);
        break;
}
function addform()
{
    $date = $_GET['date'];
    $enddate = $_GET['end'];
    if ($date == $enddate) {
        $enddate = '';
    }
    if (empty($enddate)) {
        $display = 'style="display:none"';
        $enddate = $date;
        $chk = '';
    } else {
        $display = 'style=""';
        $enddate = $date;
        $chk = 'checked';
    }
    $enddate = empty($_GET['end']) ? $date : $_GET['end'];
    ?>
コード例 #3
0
ファイル: edittrail.php プロジェクト: pilif/linktrail
function lang_answer($trailinfo)
{
    global $HTTP_POST_VARS, $mytrail;
    $trailinfo = unserialize(base64_decode($trailinfo));
    if ($HTTP_POST_VARS['yes']) {
        if ($trailinfo['trail_id'] != -1) {
            edit($mytrail, $trailinfo['description'], $trailinfo['title'], true, $trailinfo['act_as_admin']);
        } else {
            create($trailinfo['kat'], $trailinfo['title'], $trailinfo['description'], true);
        }
    } else {
        if ($trailinfo['trail_id'] != -1) {
            editform($trailinfo);
        } else {
            addform($trailinfo);
        }
    }
}