Rev 876 | Rev 1050 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 876 | Rev 984 | ||
---|---|---|---|
Line 99... | Line 99... | ||
99 | 99 | ||
100 | $out['text'] .= '<h2>'._L('Example for adding OID 2.999.123 using JavaScript').'</h2>'; |
100 | $out['text'] .= '<h2>'._L('Example for adding OID 2.999.123 using JavaScript').'</h2>'; |
101 | $cont = file_get_contents(__DIR__.'/examples/example_js.html'); |
101 | $cont = file_get_contents(__DIR__.'/examples/example_js.html'); |
102 | $cont = str_replace('<url>', OIDplus::webpath(null,OIDplus::PATH_ABSOLUTE_CANONICAL).'ajax.php', $cont); |
102 | $cont = str_replace('<url>', OIDplus::webpath(null,OIDplus::PATH_ABSOLUTE_CANONICAL).'ajax.php', $cont); |
103 | $cont = str_replace('<token>', $token, $cont); |
103 | $cont = str_replace('<token>', $token, $cont); |
104 | $out['text'] .= '<pre>'.htmlentities($cont).'</pre>'; |
104 | $out['text'] .= '<pre id="example_js">'.htmlentities($cont).'</pre>'; |
- | 105 | $out['text'] .= '<p><input type="button" value="'._L('Copy to clipboard').'" onClick="copyToClipboard(example_js)"></p>'; |
|
105 | 106 | ||
106 | $out['text'] .= '<h2>'._L('Example for adding OID 2.999.123 using PHP (located at a foreign server)').'</h2>'; |
107 | $out['text'] .= '<h2>'._L('Example for adding OID 2.999.123 using PHP (located at a foreign server)').'</h2>'; |
107 | $cont = file_get_contents(__DIR__.'/examples/example_php.phps'); |
108 | $cont = file_get_contents(__DIR__.'/examples/example_php.phps'); |
108 | $cont = str_replace('<url>', OIDplus::webpath(null,OIDplus::PATH_ABSOLUTE_CANONICAL).'ajax.php', $cont); |
109 | $cont = str_replace('<url>', OIDplus::webpath(null,OIDplus::PATH_ABSOLUTE_CANONICAL).'ajax.php', $cont); |
109 | $cont = str_replace('<token>', $token, $cont); |
110 | $cont = str_replace('<token>', $token, $cont); |
110 | $out['text'] .= '<pre>'.preg_replace("@<br.*>@ismU","",highlight_string($cont,true)).'</pre>'; |
111 | $out['text'] .= '<pre id="example_php">'.preg_replace("@<br.*>@ismU","",highlight_string($cont,true)).'</pre>'; |
- | 112 | $out['text'] .= '<p><input type="button" value="'._L('Copy to clipboard').'" onClick="copyToClipboard(example_php)"></p>'; |
|
111 | 113 | ||
112 | $out['text'] .= '<h2>'._L('Example for adding OID 2.999.123 using Python').'</h2>'; |
114 | $out['text'] .= '<h2>'._L('Example for adding OID 2.999.123 using Python').'</h2>'; |
113 | $cont = file_get_contents(__DIR__.'/examples/example_python.py'); |
115 | $cont = file_get_contents(__DIR__.'/examples/example_python.py'); |
114 | $cont = str_replace('<url>', OIDplus::webpath(null,OIDplus::PATH_ABSOLUTE_CANONICAL).'ajax.php', $cont); |
116 | $cont = str_replace('<url>', OIDplus::webpath(null,OIDplus::PATH_ABSOLUTE_CANONICAL).'ajax.php', $cont); |
115 | $cont = str_replace('<token>', $token, $cont); |
117 | $cont = str_replace('<token>', $token, $cont); |
116 | $out['text'] .= '<pre>'.htmlentities($cont).'</pre>'; |
118 | $out['text'] .= '<pre id="example_python">'.htmlentities($cont).'</pre>'; |
- | 119 | $out['text'] .= '<p><input type="button" value="'._L('Copy to clipboard').'" onClick="copyToClipboard(example_python)"></p>'; |
|
117 | 120 | ||
118 | $out['text'] .= '<h2>'._L('Example for adding OID 2.999.123 using VBScript').'</h2>'; |
121 | $out['text'] .= '<h2>'._L('Example for adding OID 2.999.123 using VBScript').'</h2>'; |
119 | $cont = file_get_contents(__DIR__.'/examples/example_vbs.vbs'); |
122 | $cont = file_get_contents(__DIR__.'/examples/example_vbs.vbs'); |
120 | $cont = str_replace('<url>', OIDplus::webpath(null,OIDplus::PATH_ABSOLUTE_CANONICAL).'ajax.php', $cont); |
123 | $cont = str_replace('<url>', OIDplus::webpath(null,OIDplus::PATH_ABSOLUTE_CANONICAL).'ajax.php', $cont); |
121 | $cont = str_replace('<token>', $token, $cont); |
124 | $cont = str_replace('<token>', $token, $cont); |
122 | $out['text'] .= '<pre>'.htmlentities($cont).'</pre>'; |
125 | $out['text'] .= '<pre id="example_vbs">'.htmlentities($cont).'</pre>'; |
- | 126 | $out['text'] .= '<p><input type="button" value="'._L('Copy to clipboard').'" onClick="copyToClipboard(example_vbs)"></p>'; |
|
123 | } |
127 | } |
124 | } |
128 | } |
125 | 129 | ||
126 | public function tree(&$json, $ra_email=null, $nonjs=false, $req_goto='') { |
130 | public function tree(&$json, $ra_email=null, $nonjs=false, $req_goto='') { |
127 | if (!$ra_email) return false; |
131 | if (!$ra_email) return false; |