Project

General

Profile

Statistics
| Branch: | Revision:

colonymech / docs / www / colonyscout / internal / jeditable / php / save.php @ f59acf11

History | View | Annotate | Download (684 Bytes)

1
<?php
2

    
3
require_once 'config.php';
4

    
5
$query = sprintf("INSERT INTO config (token, value)
6
                  VALUES ('%s', '%s')",
7
                  $_POST['id'], stripslashes($_POST['value']));
8

    
9
$dbh->exec($query);
10

    
11
/* sleep for a while so we can see the indicator in demo */
12
usleep(2000);
13

    
14
$renderer = $_GET['renderer'] ?  $_GET['renderer'] : $_POST['renderer'];
15
if ('textile' == $renderer) {
16
    require_once './Textile.php';
17
    $t = new Textile();
18
    /* What is echoed back will be shown in webpage after editing.*/
19
    print $t->TextileThis(stripslashes($_POST['value']));
20
} else {
21
    /* What is echoed back will be shown in webpage after editing.*/
22
    print $_POST['value']; 
23
}