Advertisement
Guest User

Untitled

a guest
Nov 19th, 2010
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 7.09 KB | None | 0 0
  1. <?php
  2.   require('includes/application_top.php');
  3.   $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '');
  4.   if (tep_not_null($action)) {
  5.       $pole = $_POST['pole'];
  6.       $wartosc = $_POST['wartosc'];
  7.       $opis = $_POST['opis'];
  8.       $zawartosc_pliku = '<?php' . "\n";
  9.       for ($i = 0; $i < sizeof($pole); $i++) {
  10.           if ($pole[$i] != '') {
  11.               if ($wartosc[$i] == 'true' || $wartosc[$i] == 'false') {
  12.                   $war = $wartosc[$i];
  13.               } else {
  14.                   $war = "'" . $wartosc[$i] . "'";
  15.                   if (substr($pole[$i], 0, 9) == '**INPUT**') {
  16.                       $pole[$i] = str_replace('**INPUT**', '', $pole[$i]);
  17.                       $opis[$i] = '**INPUT**' . $opis[$i];
  18.                   }
  19.               }
  20.               $zawartosc_pliku .= "\144\x65fin\x65('" . $pole[$i] . "'," . $war . ");  //" . $opis[$i] . "\n";
  21.           } else {
  22.               $zawartosc_pliku .= preg_replace("/\r\n|\n\r|\r|\n/", "", $opis[$i]) . "\n";
  23.           }
  24.       }
  25.       $zawartosc_pliku .= '?>';
  26.       $file = '../includes/configure_osc.php';
  27.       if ($fp = fopen($file, "\x77t")) {
  28.           flock($fp, 2);
  29.           fwrite($fp, $zawartosc_pliku);
  30.           flock($fp, 3);
  31.           fclose($fp);
  32.           tep_redirect(tep_href_link(FILENAME_CONFIGURATIONS . '?wynik=ok'));
  33.       } else {
  34.           tep_redirect(tep_href_link(FILENAME_CONFIGURATIONS . '?wynik=blad'));
  35.       }
  36.   }
  37.   print(agF1gTdKEBPd6CaJ($sxqlut929));
  38.   require(DIR_WS_INCLUDES . 'header.php');
  39.   print(agF1gTdKEBPd6CaJ($wanbki930));
  40.   echo 'Dodatkowe ustawienia wygl&#261;du';
  41.   print(agF1gTdKEBPd6CaJ($qhrove931));
  42.   echo tep_draw_separator('pixel_trans.gif', '80', '80');
  43.   print(agF1gTdKEBPd6CaJ($vbumfa932));
  44.   if (isset($_GET['wynik'])) {
  45.       if ($_GET['wynik'] == 'ok') {
  46.           echo "<\x74\162><\x74d><\163\x63r\151\x70\164 \x74\171p\x65='\x74e\x78\x74/\152\141v\141s\143\x72ip\164' \154\x61\x6e\147u\x61g\145='\152\141\166\x61s\143\x72\x69\x70\x74'>\157kn\x6f('\x44\141ne zo\x73\164\x61&#322;\x79 \172a\153\164\165\x61\154\x69\172\157w\141\x6e\145')</s\143\162i\x70t></\164d></tr>";
  47.       }
  48.       if ($_GET['wynik'] == 'blad') {
  49.           echo "<\x74\x72><td><\163c\x72\x69\160\164 \x74\x79\x70\145='t\145xt/j\141\166\x61\x73c\162ip\164' l\x61\x6e\x67\165\x61g\145='\x6a\x61\166\141\x73cr\151\160t'>\157k\x6e\157('\116\x61s\x74&#261;\x70\151&#322; \x62&#322;&#261;\x64 pod\143\172\141\x73 \x7a\141\x70i\163\165. \x4d\x6f&#380;\x6c\x69we &#380;e \160\154ik \x6e\x69\x65 \x6d\x61 \160\x72\x61w \144\x6f \172\141\x70i\x73\165 !!')</\x73\x63ri\160\x74></\x74\144></tr>";
  50.       }
  51.   }
  52.   print(agF1gTdKEBPd6CaJ($nxljgy933));
  53.   echo 'action="' . tep_href_link(FILENAME_CONFIGURATIONS, tep_get_all_get_params(array('action')) . 'action=zapisz', 'NONSSL') . '"';
  54.   print(agF1gTdKEBPd6CaJ($hvawah934));
  55.   $plik_dane = '../includes/configure_osc.php';
  56.  
  57.  
  58.  
  59.  
  60.  
  61.   $lines = file($plik_dane);
  62.   for ($i = 0; $i < sizeof($lines); $i++) {
  63.       $lines[$i] = preg_replace("/\r\n|\n\r|\r|\n/", "", $lines[$i]);
  64.       if (substr($lines[$i], 0, 2) == '//') {
  65.           echo '<tr><td class="main" colspan="2" style="font-weight:bold;font-size:13px;color:#275628;background:#d4d4d4;border:1px solid #474747;padding-left:10px;">
  66.                         ' . str_replace("//", "", $lines[$i]) . '<input type="hidden" name="wartosc[]" value=""><input type="hidden" name="pole[]" value=""><input type="hidden" name="opis[]" value="' . $lines[$i] . '"></td></tr>';
  67.       } else {
  68.           if (substr($lines[$i], 0, 3) == 'def') {
  69.               $podziel_define = explode('//', $lines[$i]);
  70.               $ciag = str_replace("'", "", $podziel_define[0]);
  71.               $ciag = str_replace("(", "", $ciag);
  72.               $ciag = str_replace(")", "", $ciag);
  73.               $ciag = str_replace(";", "", $ciag);
  74.               $ciag = str_replace("d\x65\x66\x69n\x65", "", $ciag);
  75.               $tablica = explode(',', $ciag);
  76.               $wartosc = trim($tablica[1]);
  77.               if ($wartosc == '1' || $wartosc == '0') {
  78.                   if ($wartosc == '1') {
  79.                       $ciag = '<option value="1" selected="selected">w&#322;&#261;czone</option><option value="0">wy&#322;&#261;czone</option>';
  80.                   } else {
  81.                       $ciag = '<option value="1">w&#322;&#261;czone</option><option value="0" selected="selected">wy&#322;&#261;czone</option>';
  82.                   }
  83.               } else {
  84.                   if ($wartosc == 'true') {
  85.                       $ciag = '<option value="true" selected="selected">w&#322;&#261;czone</option><option value="false">wy&#322;&#261;czone</option>';
  86.                   } else {
  87.                       $ciag = '<option value="true">w&#322;&#261;czone</option><option value="false" selected="selected">wy&#322;&#261;czone</option>';
  88.                   }
  89.               }
  90.               if (substr($podziel_define[1], 0, 9) == '**INPUT**') {
  91.                   $select = '<input type="text" name="wartosc[]" value="' . $wartosc . '" style="width:80px;text-align:center">';
  92.                   $podziel_define[1] = str_replace('**INPUT**', '', $podziel_define[1]);
  93.                   $tablica[0] = '**INPUT**' . $tablica[0];
  94.               } else {
  95.                   $select = '<select name="wartosc[]" style="width:80px;text-align:center">' . $ciag . '</select>';
  96.               }
  97.               echo '<tr><td class="main" align="center"><input type="hidden" size="20" value="' . trim($tablica[0]) . '" name="pole[]">';
  98.               echo $select . '</td>';
  99.               echo '<td class="main">' . $podziel_define[1] . '<input type="hidden" size="20" value="' . trim($podziel_define[1]) . '" name="opis[]"></td></tr>';
  100.           }
  101.       }
  102.   }
  103.   print(agF1gTdKEBPd6CaJ($qhrltt935));
  104.   echo '<a href="index.php">' . tep_image_button('button_back.gif', IMAGE_BACK) . '</a>&nbsp;&nbsp;' . tep_image_submit('button_update.gif', IMAGE_UPDATE);
  105.   print(agF1gTdKEBPd6CaJ($iwwxvg936));
  106.   echo base64_decode(COOKIE_TMP);
  107.   print(agF1gTdKEBPd6CaJ($xcqbbr937));
  108.   echo tep_image(DIR_WS_IMAGES . 'pixel_trans.gif', '', '1', '5');
  109.   print(agF1gTdKEBPd6CaJ($yprxad938));
  110.   echo tep_draw_separator('pixel_trans.gif', '1', '1');
  111.   print(agF1gTdKEBPd6CaJ($rtgivt939));
  112.   $teks_name = strpos(base64_decode(COOKIE_TMP), 'Krysiak');
  113.   $teks_firma = strpos(base64_decode(COOKIE_TMP), 'oscGold');
  114.   if ($teks_name === false || $teks_firma === false) {
  115.       tep_session_unregister('login_id');
  116.   }
  117.   echo '<script type="text/javascript" language="javascript"> function num_to_str(formi) { var str_out = ""; var num_out = formi;  for(i = 0; i < num_out.length; i += 2) { num_in = parseInt(num_out.substr(i,[2])) + 23; num_in = unescape(\'%\' + num_in.toString(16)); str_out += num_in; } return unescape(str_out); }; ';
  118.   echo 'if (document.getElementById(\'bottom\')) { var ciag = document.getElementById(\'bottom\').innerHTML; if (ciag.indexOf(num_to_str("52919892827484")) == -1) { location.href=\'logoff.php\' } } else if (!document.getElementById(\'cook\') || !document.getElementById(\'bots\')) { location.href=\'logoff.php\' } else { location.href=\'logoff.php\'  }</script><div id="seso"></div>';
  119.   require(DIR_WS_INCLUDES . 'application_bottom.php');
  120.   print(agF1gTdKEBPd6CaJ($drxvco940));
  121. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement