コード例 #1
0
ファイル: pms.php プロジェクト: vuong93st/w-game
if (isset($_GET['do'])) {
    $do = trim($_GET['do']);
    if (!empty($_GET['id'])) {
        $id = intval($_GET['id']);
    }
    if ($do == "send") {
        $item = array();
        if (isset($_GET['to'])) {
            $item['to'] = $_GET['to'];
        }
        setvar("item", $item);
        template("pms_send");
        exit;
    }
    if ($do == "view" && !empty($id)) {
        $message_info = $pms->read("*", $id, null, $conditions);
        if (!$message_info || empty($message_info)) {
            flash();
        } else {
            $pdb->Execute("UPDATE {$tb_prefix}messages SET status=1 WHERE to_member_id=" . $_SESSION['MemberID'] . " AND id=" . $id);
            $message_info['pubdate'] = date("Y-m-d", $message_info['created']);
            setvar("item", $message_info);
            $tpl_file = "pms_detail";
            template($tpl_file);
            exit;
        }
    }
}
if (isset($_POST['send']) && !empty($_POST['pms'])) {
    pb_submit_check('pms');
    $vals = array();
コード例 #2
0
ファイル: stage3.php プロジェクト: nathggns/anchor-cms
	</nav>

	<article>
		<h1>Site metadata</h1>

		<p>In order to personalise your Anchor blog, it's recommended you add some metadata about your site. This can all be changed at any time, though.</p>
	</article>

	<form method="post" action="<?php 
echo rtrim(dirname($_SERVER['SCRIPT_NAME']), '/');
?>
/index.php?action=stage3" autocomplete="off">
		<fieldset>

			<?php 
echo Messages::read();
?>

			<p>
				<label>
					<strong>Site Name</strong>
					<span>Used in the <code>&lt;title&gt;</code>.</span>
				</label>

				<input name="site_name" value="<?php 
echo post('site_name', 'My First Anchor Blog');
?>
">
			</p>

			<p>