Subversion Repositories oidplus

Compare Revisions

Regard whitespace Rev 801 → Rev 802

/trunk/plugins/viathinksoft/raPages/910_automated_ajax_calls/OIDplusPageRaAutomatedAJAXCalls.class.php
98,25 → 98,25
 
$out['text'] .= '<h2>'._L('Example for adding OID 2.999.123 using JavaScript').'</h2>';
$cont = file_get_contents(__DIR__.'/examples/example_js.html');
$cont = str_replace('<url>', webpath(null,OIDplus::PATH_ABSOLUTE_CANONICAL).'ajax.php', $cont);
$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'] .= '<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>', webpath(null,OIDplus::PATH_ABSOLUTE_CANONICAL).'ajax.php', $cont);
$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'] .= '<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>', webpath(null,OIDplus::PATH_ABSOLUTE_CANONICAL).'ajax.php', $cont);
$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'] .= '<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>', webpath(null,OIDplus::PATH_ABSOLUTE_CANONICAL).'ajax.php', $cont);
$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>';
}