Advertisement
Guest User

Untitled

a guest
Jul 1st, 2012
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.77 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by deZender.Net
  5. * @ deZender (PHP5 Decoder for ionCube Encoder)
  6. *
  7. * @ Version : 1.1.5.0
  8. * @ Author : DeZender
  9. * @ Release on : 09.06.2012
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. function uyeKontrol() {
  15. if (!$_SESSION['userID']) {
  16. @header( 'location:page.php?act=login&backto=' . @urlencode( $_SERVER['QUERY_STRING'] ) );
  17. exit( '<script>window.location = \'page.php?act=login&backto=' . urlencode( $_SERVER['QUERY_STRING'] ) . '\';</script>' );
  18. }
  19.  
  20. }
  21.  
  22. function slink($act, $op = '') {
  23. global $siteConfig;
  24.  
  25. return ($siteConfig['seoURL'] ? $act . '_sp' . ($op ? '__op-' . $op : '') . '.html' : 'page.php?act=' . $act . ($op ? '&op=' . $op : ''));
  26. }
  27.  
  28. function sepetGoster() {
  29. $sepet = str_replace( '<a ', '<xa ', showBasket( false ) );
  30. $sepet = str_replace( '</a>', '</xa> ', $sepet );
  31. $out = '<div id="sepetGoster">' . generateTableBox( '', $sepet, 'SepetBlock' ) . '</div>';
  32. return $out;
  33. }
  34.  
  35. function alisverisSirasi() {
  36. global $tamamlandi;
  37.  
  38. if ($_GET['act'] == 'sepet') {
  39. $out = 4;
  40. }
  41.  
  42.  
  43. if ($_GET['act'] == 'satinal') {
  44. if ($_GET['op'] == 'adres') {
  45. $out = 5;
  46. }
  47.  
  48.  
  49. if (( $_GET['op'] == 'adres' && $_POST['data_address'] )) {
  50. $out = 6;
  51. }
  52.  
  53.  
  54. if ($_GET['paytype']) {
  55. $out = 7;
  56. }
  57.  
  58.  
  59. if ($tamamlandi) {
  60. $out = 8;
  61. }
  62. }
  63.  
  64. return $out;
  65. }
  66.  
  67. function checkLogin() {
  68. if (function_exists( myCheckLogin )) {
  69. return myCheckLogin( );
  70. }
  71.  
  72. global $siteConfig;
  73.  
  74. if (basename( $_SERVER['PHP_SELF'] ) == 'update.php') {
  75. return null;
  76. }
  77.  
  78.  
  79. if (basename( $_SERVER['PHP_SELF'] ) == 'ajaxLib.php') {
  80. return null;
  81. }
  82.  
  83.  
  84. if (basename( $_SERVER['PHP_SELF'] ) == 'eposta.php') {
  85. return null;
  86. }
  87.  
  88.  
  89. if (( basename( $_SERVER['PHP_SELF'] ) == 'page.php' && $_GET['act'] == 'register' )) {
  90. return null;
  91. }
  92.  
  93.  
  94. if (basename( $_SERVER['PHP_SELF'] ) == 'login.php') {
  95. if (( $_SESSION['loginStatus'] || !$siteConfig['sadeceUye'] )) {
  96. header( 'location:index.php' );
  97. exit( '<script>window.location = \'index.php\';</script>' );
  98. }
  99.  
  100. return null;
  101. }
  102.  
  103.  
  104. if (( !$_SESSION['loginStatus'] && $siteConfig['sadeceUye'] )) {
  105. header( 'location:login.php' );
  106. exit( '<script>window.location = \'login.php\';</script>' );
  107. }
  108.  
  109. }
  110.  
  111. function generateSlide($filter, $template = 'UrunListShow') {
  112. $q = my_mysql_query( 'select ID from urun ' . $filter );
  113. $out = '<div class="spSlides">' . '
  114. ';
  115.  
  116. if ($d = mysql_fetch_array( $q )) {
  117. $out .= '<div class="spSlide">' . getUrun( $d['ID'], $template ) . '</div>' . '
  118. ';
  119. }
  120.  
  121. $out .= '</div>';
  122. }
  123.  
  124. function loginGoster() {
  125. if (function_exists( myLoginGoster )) {
  126. return myLoginGoster( );
  127. }
  128.  
  129. global $login_message;
  130.  
  131. $login = loginScreen( $login_message, false );
  132. $out = '<div id="loginGoster">' . generateTableBox( '', $login, 'LoginBlock' ) . '</div>';
  133.  
  134. if ($login_message) {
  135. $out .= '' . '<script>$(document).ready(function() { $(\'#imgLoginGoster\').click(); });</script>';
  136. }
  137.  
  138. return $out;
  139. }
  140.  
  141. function insertToUserLog($key, $keyDetail, $value) {
  142. if ($_SESSION['userID']) {
  143. if (!( my_mysql_query( 'insert into userLog values(null,\'' . $_SESSION['userID'] . ( '' . '\',\'' . $key . '\',\'' . $keyDetail . '\',\'' . $value . '\',\'' ) . $_SERVER['REMOTE_ADDR'] . '\',now())' ))) {
  144. exit( mysql_error( ) );
  145. (bool)true;
  146. }
  147. }
  148.  
  149. }
  150.  
  151. function setStats($type) {
  152. switch ($type) {
  153. case 'updateKategori': {
  154. if (!( my_mysql_query( 'update kategori set hit=(hit + 1) where ID = \'' . $_GET['catID'] . '\'' ))) {
  155. exit( mysql_error( ) );
  156. (bool)true;
  157. }
  158. }
  159. }
  160.  
  161. }
  162.  
  163. function selfURL() {
  164. $s = ((empty( $_SERVER['HTTPS'] ) ? '' : $_SERVER['HTTPS'] == 'on') ? 's' : '');
  165. $protocol = strleft( strtolower( $_SERVER['SERVER_PROTOCOL'] ), '/' ) . $s;
  166. $port = ($_SERVER['SERVER_PORT'] == '80' ? '' : ':' . $_SERVER['SERVER_PORT']);
  167. return $protocol . '://' . $_SERVER['SERVER_NAME'] . $port . '/' . $_SERVER['REQUEST_URI'];
  168. }
  169.  
  170. function strleft($s1, $s2) {
  171. return substr( $s1, 0, strpos( $s1, $s2 ) );
  172. }
  173.  
  174. function alarmList($type) {
  175. global $currentAlarmList;
  176.  
  177. $currentAlarmList = $type;
  178. return urunList( 'select urun.* from urun,alarmListe where urunID=urun.ID AND alarmListe.userID=\'' . $_SESSION['userID'] . '\' AND sent=0 AND type=\'' . $type . '\'', 'UrunListLite', 'UrunListLiteShow' );
  179. }
  180.  
  181. function urunlerimList() {
  182. $userID = $_SESSION['userID'];
  183. $out .= urunList( 'select * from urun where userID=\'' . $userID . '\'', 'UrunListLite', 'UrunListLiteShow' );
  184. $maxUrun = hq( 'select maxUrun from user,userGroups,userGroupMembers where user.ID = userGroupMembers.userID AND user.ID = \'' . $userID . '\' AND userGroups.ID = userGroupMembers.userGroupID order by discount asc limit 0,1' );
  185. $toplamUrun = mysql_num_rows( my_mysql_query( 'select ID from urun where userID != 0 AND userID=\'' . $userID . '\'' ) );
  186.  
  187. if ($toplamUrun < $maxUrun) {
  188. $out .= '<div class="urunEkle"><form action="page.php?act=urunlerim&op=urunEkle" method="post"><input type="submit" value="' . _lang_urunEkle . '"></form></div>';
  189. }
  190.  
  191. return $out;
  192. }
  193.  
  194. function seoURL($out) {
  195. return $out;
  196. }
  197.  
  198. function jsBanner() {
  199. global $siteConfig;
  200.  
  201. $out = '<script>
  202. ';
  203. $out .= 'var lastSelectedImage = 0;
  204. var timer;
  205. var web20Images = new Array();
  206. var web20ImageLine1 = new Array();
  207. var web20ImageLine2 = new Array();
  208. var web20ImageLink = new Array();';
  209. $q = my_mysql_query( 'select * from kampanyaJSBanner order by seq limit 0,5' );
  210. $i = 6;
  211.  
  212. if ($d = mysql_fetch_array( $q )) {
  213. $out .= '' . 'web20Images[' . $i . '] = new Image();
  214. web20Images[' . $i . '].src = \'images/kampanya/' . $d['resimJS'] . ( '' . '\';
  215. web20ImageLine1[' . $i . '] = \'' ) . $d['info'] . ( '' . '\';
  216. web20ImageLine2[' . $i . '] = \'' ) . $d['info2'] . ( '' . '\'
  217. web20ImageLink[' . $i . '] = \'' ) . $d['link'] . '\'
  218. ';
  219. $title[$i] = $d['title'];
  220. $title2[$i] = $d['title2'];
  221. ++$i;
  222. }
  223.  
  224. $out .= '</script>
  225. ';
  226. $out .= '<div style="width:695px; height:229px; overflow:hidden; position:relative;">
  227. <img id="c1" src="images/white.gif">
  228. <img id="c2" src="images/white.gif">
  229. <img id="c3" src="images/white.gif">
  230. <img id="c4" src="images/white.gif">
  231. <div style="float:left; width:486px; height:229px;overflow:hidden; position:absolute;"><img src="" id="picture" /><div id="infoLine" class="infoLine"></div><div class="infoMain" id="infoMain"><div id="infoLine1"></div><div id="infoLine2"></div>
  232. </div>
  233. </div>
  234. <div style="float:right; position:relative; width:215px;">';
  235. $i = 6;
  236.  
  237. while ($i <= sizeof( $title )) {
  238. $out .= '<div class="button" id="button' . $i . '" onclick="change(' . $i . ')">
  239. <div class="line1">' . $title[$i] . '</div>
  240. <div class="line2">' . $title2[$i] . '</div>
  241. </div>';
  242. ++$i;
  243. }
  244.  
  245. $out .= '</div>
  246. </div>
  247. <script>change(1)</script>';
  248. return $out;
  249. }
  250.  
  251. function autoPaymentMerge($randStr, $body) {
  252. $q = my_mysql_query( '' . 'select * from siparis where randStr = \'' . $randStr . '\'' );
  253. $d = mysql_fetch_array( $q );
  254.  
  255. if (mysql_num_rows( $q )) {
  256. $rplArray['siparisURL'] = '{%siteAdresiFull%}page.php?act=siparistakip&email=' . $d['email'] . '&sn=' . $d['randStr'];
  257. foreach ($d as $k => $v) {
  258. $rplArray[strtoupper( $k )] = $v;
  259. $rplArray[$k] = $v;
  260. }
  261.  
  262. return (is_array( $body ) ? array_merge( $body, $rplArray ) : mergeText( $body, $rplArray ));
  263. }
  264.  
  265. return $body;
  266. }
  267.  
  268. function autoPaymentMergeArray($randStr, $body) {
  269. return autoPaymentMerge( $randStr, $body );
  270. }
  271.  
  272. function anket($chartColor) {
  273. global $siteConfig;
  274.  
  275. $anketID = hq( 'select ID from anketSoru where aktif=1 order by ID desc limit 0,1' );
  276. $oyKullanmismi = hq( 'select ID from anketIP where IP=\'' . $_SERVER['REMOTE_ADDR'] . '\' AND anketID = \'' . $anketID . '\'' );
  277.  
  278. if (( $_POST['anketID'] && $_POST['t'][2] == $_GET['t4'][2] )) {
  279. if (!$oyKullanmismi) {
  280. if (!( my_mysql_query( 'insert into anketIP values(null,\'' . $_POST['anketID'] . '\',\'' . $_SERVER['REMOTE_ADDR'] . '\')' ))) {
  281. exit( mysql_error( ) );
  282. (bool)true;
  283. }
  284.  
  285. $oy = hq( 'select Oy from anketCevap where ID=\'' . $_POST['oy'] . '\' limit 0,1' ) + 1;
  286.  
  287. if (!( my_mysql_query( '' . 'update anketCevap set Oy=\'' . $oy . '\' where ID=\'' . $_POST['oy'] . '\'' ))) {
  288. exit( mysql_error( ) );
  289. (bool)true;
  290. }
  291.  
  292. $oyKullanmismi = true;
  293. }
  294. }
  295.  
  296. $out .= '<table cellspacing="0" cellpadding="0" class="anket"><form method="post">';
  297. $anketSoru = hq( 'select Soru from anketSoru where ID=\'' . $anketID . '\' limit 0,1' );
  298. $out .= '<input type="hidden" name="anketID" value="' . $anketID . '">';
  299. $out .= '<tr><td colspan=2 class="anketSoru">' . $anketSoru . '</td></tr>';
  300. $q = my_mysql_query( '' . 'select * from anketCevap where anketID=\'' . $anketID . '\' order by Seq' );
  301.  
  302. if (!$oyKullanmismi) {
  303. if ($d = mysql_fetch_array( $q )) {
  304. $out .= '<tr><td class="anketCevap"><input id="anket_' . $d['ID'] . '" type="radio" name="oy" value="' . $d['ID'] . '"></td>';
  305. $out .= ' <td width=100%><label for="anket_' . $d['ID'] . '">' . $d['Cevap'] . '</label></td></tr>';
  306. }
  307.  
  308. $out .= '<tr><td colspan=2><input class="anketGonder" type="image" src="templates/' . $siteConfig['templateName'] . '/images/form_Gonder.gif" style="cursor:pointer;"></td></tr>';
  309. } else {
  310. if ($d = mysql_fetch_array( $q )) {
  311. $chartArray[$d['Cevap']] = $d['Oy'];
  312. }
  313.  
  314. $out .= '<tr><td valign="middle">' . generateChart( $chartArray, 'persentage', $chartColor ) . '</td></tr>';
  315. }
  316.  
  317. $out .= '</form></table>';
  318. return $out;
  319. }
  320. ..................................................
  321. .........................
  322. ..........
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement