Advertisement
pushrbx

Untitled

Jan 27th, 2015
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.08 KB | None | 0 0
  1. <?php
  2. // ez a fajl a medres browser-hez van.
  3. mb_http_output('UTF-8');
  4.  
  5. if (count(array_intersect(array_keys($_REQUEST), array("action", "password", "format"))) == 0
  6.     || $_REQUEST["password"] != "ultraregularpassword"
  7.     || $_REQUEST["action"] != "load_config"
  8.     || $_SERVER['HTTP_USER_AGENT'] != "MedResbrowser v1.0 (Mdrsbrwsr 1.0; Windows NT 6.3; .NET CLR 4.0.30319; rv:1.0) like Gecko sajtospiritos") {
  9.     header("HTTP/1.0 404 Not Found");
  10.     return;
  11. }
  12. header('Content-type: text/xml');
  13.  
  14. // fontos, h a <?xml elott ne legyen semmilyen mas karakter mert kulonben a bongeszo
  15. // az ervenytelen konfiguracio miatt osszeomlik.
  16. echo '<?xml version="1.0" encoding="utf-8" ?>
  17. <objects xmlns="http://www.springframework.net">
  18.     <description>Hálózat adminisztrátor által állítható böngésző specifikus beállítások.</description>
  19.     <object id="fallbackUrl" type="string">
  20.         <constructor-arg index="0" value="http://portal.medres.hu/" />
  21.     </object>
  22.  
  23.     <object id="adminConfig" type="MedresBrowser.Common.ConfigObject, MedresBrowser" singleton="true">
  24.         <property name="UrlRules">
  25.             <list element-type="string">
  26.                 <value>portal\.medres\.hu</value>
  27.                 <value>medres\.hu</value>
  28.                 <value>www\.medres\.hu</value>
  29.                 <value>localhost</value>
  30.             </list>
  31.         </property>
  32.         <property name="FallbackUrl" value="http://portal.medres.hu" />
  33.         <property name="FileTypeAssociations">
  34.             <dictionary key-type="string" value-type="string">
  35.                 <entry key="application/pdf" value="Adobe Reader" />
  36.                 <entry key="application/zip" value="7-zip" />
  37.                 <entry key="application/vnd.openxmlformats-officedocument.wordprocessingml.document" value="Word 2013" />
  38.             </dictionary>
  39.         </property>
  40.         <property name="FallbackTypeAssociations">
  41.             <dictionary key-type="string" value-type="string">
  42.                 <entry key="application/pdf" value="C:\" />
  43.                 <entry key="application/zip" value="C:\" />
  44.                 <entry key="application/vnd.openxmlformats-officedocument.wordprocessingml.document" value="c:\Program Files\Microsoft Office\Office15\WINWORD.exe" />
  45.             </dictionary>
  46.         </property>
  47.     </object>
  48. </objects>
  49. ';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement