-
Notifications
You must be signed in to change notification settings - Fork 1
/
todo.php
29 lines (27 loc) · 956 Bytes
/
todo.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<!DOCTYPE html>
<?php
include "pipe.php";
session_start();
$post_res = '';
$user_id = $_SESSION["user_id"];
$user_name = $_SESSION["user_name"];
$pipe = <<<XML
<transform id="main"><page title="Task list">
<authorize/>
<!--post/-->
<head/>
<body>
<get-table name="tasks_js" fields="id title txt" root_name="table" sql_filter_name="author" sql_filter_value="{$user_id}"/>
<article>
<h2>Create task</h2>
<form method="post" action="json.php" sql_table="requests">
<br/>
<input name="title" type="text" required="required" placeholder="task title" sql_field="title"/>
<input name="txt" type="text" required="required" placeholder="task description" sql_field="txt"/>
<input name="author" type="hidden" sql_field="author" value="{$user_id}"/>
<input type="submit" value="save"/>
</form>
</article>
</body></page></transform>
XML;
echo process_pipeline($pipe);