95,25 → 95,29 |
$cont = file_get_contents(__DIR__.'/examples/example_js.html'); |
$cont = str_replace('<url>', OIDplus::webpath(null,OIDplus::PATH_ABSOLUTE_CANONICAL).'ajax.php', $cont); |
$cont = str_replace('<token>', $token, $cont); |
$out['text'] .= '<pre>'.htmlentities($cont).'</pre>'; |
$out['text'] .= '<pre id="example_js">'.htmlentities($cont).'</pre>'; |
$out['text'] .= '<p><input type="button" value="'._L('Copy to clipboard').'" onClick="copyToClipboard(example_js)"></p>'; |
|
$out['text'] .= '<h2>'._L('Example for adding OID 2.999.123 using PHP (located at a foreign server)').'</h2>'; |
$cont = file_get_contents(__DIR__.'/examples/example_php.phps'); |
$cont = str_replace('<url>', OIDplus::webpath(null,OIDplus::PATH_ABSOLUTE_CANONICAL).'ajax.php', $cont); |
$cont = str_replace('<token>', $token, $cont); |
$out['text'] .= '<pre>'.preg_replace("@<br.*>@ismU","",highlight_string($cont,true)).'</pre>'; |
$out['text'] .= '<pre id="example_php">'.preg_replace("@<br.*>@ismU","",highlight_string($cont,true)).'</pre>'; |
$out['text'] .= '<p><input type="button" value="'._L('Copy to clipboard').'" onClick="copyToClipboard(example_php)"></p>'; |
|
$out['text'] .= '<h2>'._L('Example for adding OID 2.999.123 using Python').'</h2>'; |
$cont = file_get_contents(__DIR__.'/examples/example_python.py'); |
$cont = str_replace('<url>', OIDplus::webpath(null,OIDplus::PATH_ABSOLUTE_CANONICAL).'ajax.php', $cont); |
$cont = str_replace('<token>', $token, $cont); |
$out['text'] .= '<pre>'.htmlentities($cont).'</pre>'; |
$out['text'] .= '<pre id="example_python">'.htmlentities($cont).'</pre>'; |
$out['text'] .= '<p><input type="button" value="'._L('Copy to clipboard').'" onClick="copyToClipboard(example_python)"></p>'; |
|
$out['text'] .= '<h2>'._L('Example for adding OID 2.999.123 using VBScript').'</h2>'; |
$cont = file_get_contents(__DIR__.'/examples/example_vbs.vbs'); |
$cont = str_replace('<url>', OIDplus::webpath(null,OIDplus::PATH_ABSOLUTE_CANONICAL).'ajax.php', $cont); |
$cont = str_replace('<token>', $token, $cont); |
$out['text'] .= '<pre>'.htmlentities($cont).'</pre>'; |
$out['text'] .= '<pre id="example_vbs">'.htmlentities($cont).'</pre>'; |
$out['text'] .= '<p><input type="button" value="'._L('Copy to clipboard').'" onClick="copyToClipboard(example_vbs)"></p>'; |
} |
} |
|