Viewing file: c2_accept.php (1.03 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
#this is server output. POST array contains: echo var_dump($_POST);
require_once('encodingroutines.php');
$conn = pg_connect("dbname=ax_andras_tinkers");
$text = pg_fetch_result(pg_query("SELECT text FROM msgboard_messages WHERE id=".pg_escape_string($_POST['id']).";"),0,0);
$text = mb_convert_encoding($text,"UTF-8",$_POST['encoding']);
pg_query("select set_curcfg('default');");
echo "id: ",htmlspecialchars($_POST['id']); echo "\n";
echo '<a title="undo this resolution" onclick="undo('.htmlspecialchars($_POST['id']).');">⌫ undo</a>'."\n";
if (pg_query("UPDATE msgboard_messages SET text_original=text, text='".pg_escape_string($conn,$text)."', text_in_utf8=true, text_conversion_date=CURRENT_TIMESTAMP WHERE not text_in_utf8 AND id=".pg_escape_string($conn,$_POST['id']).";")) { echo "<font color=green>accepted resolution:</font> "; }
echo htmlspecialchars(get_shortened_text($text));
//echo '<button type="button" title="undo this resolution" onclick="undo('.htmlspecialchars($_POST['id']).');">⌫</button>'; ?> <hr>
|