/usr/share/php/xajax/tests/suite/transport.php is in php-xajax 0.5-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | <?php
require_once("./options.inc.php");
require_once('./testScriptPlugin.inc.php');
$objResponse = new xajaxResponse();
function testForm($strText, $formData, $arrArray) {
global $objResponse;
$data = "Text:\n" . $strText;
$data .= "\n\nFormData:\n" . print_r($formData, true);
$data .= "\n\nArray:\n" .print_r($arrArray, true);
$objResponse->alert($data);
$objResponse->assign("status", "innerHTML", "<pre>".$data."</pre>");
return $objResponse;
}
$testForm = $xajax->register(XAJAX_FUNCTION, "testForm");
$testForm->useSingleQuote();
$testForm->addParameter(XAJAX_INPUT_VALUE, "textField1");
$testForm->addParameter(XAJAX_FORM_VALUES, "testForm1");
$testForm->addParameter(XAJAX_JS_VALUE, "getTestArray()");
$xajax->processRequest();
echo '<' . '?xml version=1.0' . ' encoding=' . $xajax->getConfiguration('characterEncoding') . ' ?' . '>' . "\n";
ob_start();
?>
<script type="text/javascript">
/* <![CDATA[ */
function getTestArray()
{
var text = xajax.$('textField1').value;
var testArray = new Array();
testArray[0] = text;
testArray[1] = text;
testArray[2] = new Array();
testArray[2][0] = text;
testArray[2][1] = text;
testArray[3] = new Array();
testArray[3][0] = text;
testArray[3][1] = text;
testArray[3][2] = new Array();
testArray[3][2][0] = text;
testArray[3][2][1] = text;
return testArray;
}
/* ]]> */
</script>
<?
$objTestScriptPlugin->printHeader($xajax, "Character Encoding Test | xajax Tests", ob_get_clean());
ob_start();
?>
<h2>Text Test Form</h2>
<p><a href="http://www.i18nguy.com/unicode-example.html" target="_blank">Here are some Unicode examples</a> you can paste into the text box below.</p>
<p>You can see <a href="http://www.unicode.org/iuc/iuc10/languages.html" target="_blank">more examples and a list of standard encoding schemes here</a>.</p>
<form id="testForm1" onsubmit="return false;">
<p><input type="text" value="Enter test text here" id="textField1" name="textField1" size="60" /></p>
<p><input type="submit" value="Submit Text" onclick="<?php $testForm->printScript() ?>;" /></p>
</form>
<?
$objTestScriptPlugin->printControlPanel(ob_get_clean());
$objTestScriptPlugin->printStatusPanel();
$objTestScriptPlugin->printLogPanel();
$objTestScriptPlugin->printDescriptionPanel();
$objTestScriptPlugin->printFooter();
|