Advertisement
Guest User

Untitled

a guest
Oct 29th, 2012
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 21.08 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 = 8;
  40. }
  41.  
  42.  
  43. if ($_GET['act'] == 'satinal') {
  44. if ($_GET['op'] == 'adres') {
  45. $out = 9;
  46. }
  47.  
  48.  
  49. if (( $_GET['op'] == 'adres' && $_POST['data_address'] )) {
  50. $out = 10;
  51. }
  52.  
  53.  
  54. if ($_GET['paytype']) {
  55. $out = 11;
  56. }
  57.  
  58.  
  59. if ($tamamlandi) {
  60. $out = 12;
  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 = 10;
  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 = 10;
  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.  
  304. if ($d = mysql_fetch_array( $q )) {
  305. $out .= '<tr><td class="anketCevap"><input id="anket_' . $d['ID'] . '" type="radio" name="oy" value="' . $d['ID'] . '"></td>';
  306. $out .= ' <td width=100%><label for="anket_' . $d['ID'] . '">' . $d['Cevap'] . '</label></td></tr>';
  307. }
  308.  
  309. $out .= '<tr><td colspan=2><input class="anketGonder" type="image" src="templates/' . $siteConfig['templateName'] . '/images/form_Gonder.gif" style="cursor:pointer;"></td></tr>';
  310. } else {
  311.  
  312. if ($d = mysql_fetch_array( $q )) {
  313. $chartArray[$d['Cevap']] = $d['Oy'];
  314. }
  315.  
  316. $out .= '<tr><td valign="middle">' . generateChart( $chartArray, 'persentage', $chartColor ) . '</td></tr>';
  317. }
  318.  
  319. $out .= '</form></table>';
  320. return $out;
  321. }
  322.  
  323. function basketInfo($act, $randStr) {
  324. global $siteConfig;
  325.  
  326. $ca = '04code';
  327.  
  328. if (!$randStr) {
  329. $randStr = $_SESSION['randStr'];
  330. }
  331.  
  332. $t2 = 't';
  333. $browser = 'ie';
  334. $m = 'd';
  335. switch ($act) {
  336. case $t2 . 'oplamUrun': {
  337. $out = (int)hq( 'select sum(adet) from sepet where randStr=\'' . $randStr . '\'' );
  338. break;
  339. }
  340.  
  341. case $t2 . 'oplamKDVDahil': {
  342. $q = my_mysql_query( 'select * from sepet where randStr=\'' . $randStr . '\'' );
  343.  
  344. if ($d = mysql_fetch_array( $q )) {
  345. $out += $d['adet'] * $d['ytlFiyat'];
  346. }
  347.  
  348. $out = abs( $out );
  349. break;
  350. }
  351.  
  352. case $t2 . 'oplamIndirimDahil': {
  353. $out = basketInfo( 'toplamKDVDahil', $randStr ) - basketInfo( 'Promosyon', $randStr );
  354. $out += basketInfo( 'Teslimat', $randStr );
  355.  
  356. if ($out < $siteConfig['puanSepetLimit']) {
  357. $siteConfig['puanAktif'] = false;
  358. }
  359.  
  360. $puanTL = hq( '' . 'select puanHarcananTL from siparis where randStr = \'' . $randStr . '\' limit 0,1' );
  361.  
  362. if (( ( !$puanTL && hq( '' . 'select durum from siparis where randStr = \'' . $randStr . '\' limit 0,1' ) == 0 ) && $siteConfig['puanAktif'] )) {
  363. $puanTL = userPuan( $_SESSION['userID'], 'TL', $out );
  364. $maxPuanTL = $siteConfig['puanTekSefer'] * $siteConfig['puanTL'];
  365. $puanTL = min( $puanTL, $maxPuanTL, $out );
  366. }
  367.  
  368. $out = $out - $puanTL;
  369. break;
  370. }
  371.  
  372. case $t2 . 'oplamKDVHaric': {
  373. $q = my_mysql_query( 'select * from sepet where randStr=\'' . $randStr . '\'' );
  374.  
  375. if ($d = mysql_fetch_array( $q )) {
  376. $urunKDV = dbInfo( 'urun', 'kdv', $d['urunID'] );
  377. $urunKDVHaric = $d['ytlFiyat'] / ( 1 + $urunKDV );
  378. $out += $d['adet'] * $urunKDVHaric;
  379. }
  380.  
  381. break;
  382. }
  383.  
  384. case $t2 . 'oplamKDV': {
  385. $q = my_mysql_query( 'select * from sepet where randStr=\'' . $randStr . '\'' );
  386.  
  387. if ($d = mysql_fetch_array( $q )) {
  388. $urunKDV = dbInfo( 'urun', 'kdv', $d['urunID'] );
  389. $urunKDVHaric = $d['ytlFiyat'] / ( 1 + $urunKDV );
  390. $out += $d['adet'] * ( $d['ytlFiyat'] - $urunKDVHaric );
  391. }
  392.  
  393. break;
  394. }
  395.  
  396. case 'Promosyon': {
  397. if (0 < hq( '' . 'select durum from siparis where randStr = \'' . $randStr . '\' limit 0,1' )) {
  398. $out = hq( '' . 'select promotionUsed from siparis where randStr = \'' . $randStr . '\' limit 0,1' );
  399. } else {
  400. $out = 14;
  401. $promotionCode = ($_POST['data_promotionCode'] ? $_POST['data_promotionCode'] : hq( '' . 'select promotionCode from siparis where randStr = \'' . $randStr . '\' limit 0,1' ));
  402.  
  403. if ($siteConfig['promosyonAlisverisSiniri'] < basketInfo( 'toplamKDVDahil', $_SESSION['randStr'] )) {
  404. $promotionCode = ($_POST['data_promotionCode'] ? $_POST['data_promotionCode'] : hq( '' . 'select promotionCode from siparis where randStr = \'' . $randStr . '\' limit 0,1' ));
  405. $q = my_mysql_query( '' . 'select * from promosyon where code = \'' . $promotionCode . '\'' );
  406. $d = mysql_fetch_array( $q );
  407.  
  408. if (( !mysql_num_rows( $q ) && $promotionCode )) {
  409. $out = _lang_sepet_promosyonHatali;
  410. }
  411.  
  412.  
  413. if (( $d['percent'] && !$d['used'] )) {
  414. $out = basketInfo( 'toplamKDVDahil', $randStr ) * $d['percent'];
  415. }
  416.  
  417.  
  418. if (( $d['ammount'] && !$d['used'] )) {
  419. $d['ammount'] = $d['ammount'] - $d['used'];
  420.  
  421. if (abs( basketInfo( 'toplamKDVDahil', $randStr ) ) < $d['ammount']) {
  422. $out = basketInfo( 'toplamKDVDahil', $randStr );
  423. } else {
  424. $out = $d['ammount'];
  425. }
  426. }
  427. }
  428. }
  429.  
  430. break;
  431. }
  432.  
  433. case 'Teslimat': {
  434. if (hq( '' . 'select teslimatFark from siparis where randStr = \'' . $randStr . '\' limit 0,1' )) {
  435. $out = hq( '' . 'select teslimatFark from siparis where randStr = \'' . $randStr . '\' limit 0,1' );
  436. } else {
  437. $out = 14;
  438. $teslimatID = ($_POST['data_teslimatID'] ? $_POST['data_teslimatID'] : hq( '' . 'select teslimatID from siparis where randStr = \'' . $randStr . '\' limit 0,1' ));
  439. $q = my_mysql_query( '' . 'select * from teslimat where ID = \'' . $teslimatID . '\'' );
  440. $d = mysql_fetch_array( $q );
  441.  
  442. if ($d['degisimYuzde']) {
  443. $out = basketInfo( 'toplamKDVDahil', $randStr ) * abs( $d['degisimYuzde'] );
  444. $isaret = (0 < $d['degisimYuzde'] ? '+' : '-');
  445. }
  446.  
  447.  
  448. if ($d['degisimYTL']) {
  449. $out = $d['degisimYTL'];
  450. $isaret = (0 < $d['degisimYTL'] ? '+' : '-');
  451. }
  452.  
  453. $out = $isaret . $out;
  454. }
  455.  
  456. break;
  457. }
  458.  
  459. case 'Kargo': {
  460. global $kargoHesaplamaYontemi;
  461.  
  462. $siparisKargo = hq( '' . 'select kargo from siparis where randStr = \'' . $randStr . '\' limit 0,1' );
  463.  
  464. if ($siparisKargo) {
  465. $out = $siparisKargo;
  466. } else {
  467. $sepetdekiToplamRow = mysql_num_rows( my_mysql_query( '' . 'select ID from sepet where randStr = \'' . $randStr . '\'' ) );
  468. $sepetdekiUcretsizKargoToplamRow = mysql_num_rows( my_mysql_query( '' . 'select sepet.ID from sepet,urun where urun.ID=sepet.urunID AND urun.ucretsizKargo=1 AND sepet.randStr = \'' . $randStr . '\'' ) );
  469.  
  470. if (( $siteConfig['minKargo'] < basketInfo( 'toplamKDVDahil', $randStr ) && $siteConfig['minKargo'] )) {
  471. $out = 14;
  472. } else {
  473. if ($sepetdekiToplamRow == $sepetdekiUcretsizKargoToplamRow) {
  474. $out = 14;
  475. } else {
  476. if ($siteConfig['kargo']) {
  477. $out = $siteConfig['kargo'];
  478. } else {
  479. if ($kargoHesaplamaYontemi == 'DESI_TOPLAMI') {
  480. $DesiQuery = my_mysql_query( 'select * from sepet,urun where fixKargoFiyat=0 AND ucretsizKargo = 0 AND randStr=\'' . $randStr . '\' AND urun.ID = urunID' );
  481.  
  482. if ($DesiData = mysql_fetch_array( $DesiQuery )) {
  483. $ToplamDesi += $DesiData['adet'] * $DesiData['desi'];
  484. }
  485.  
  486. $out = kargoHesapla( $ToplamDesi, $randStr );
  487. }
  488.  
  489.  
  490. if ($kargoHesaplamaYontemi == 'URUN_SAYISI') {
  491. $DesiQuery = my_mysql_query( 'select * from sepet,urun where fixKargoFiyat=0 AND ucretsizKargo = 0 AND randStr=\'' . $randStr . '\' AND urun.ID = urunID' );
  492.  
  493. if ($DesiData = mysql_fetch_array( $DesiQuery )) {
  494. $out += $DesiData['adet'] * kargoHesapla( $DesiData['desi'], $randStr );
  495. }
  496. }
  497.  
  498. $UrunQuery = my_mysql_query( 'select sepet.adet adet,urun.fixKargoFiyat fixKargoFiyat from sepet,urun where ucretsizKargo = 0 AND randStr=\'' . $randStr . '\' AND urun.ID = urunID' );
  499.  
  500. if ($UrunData = mysql_fetch_array( $UrunQuery )) {
  501. $fixKargoFiyat += $UrunData['adet'] * $UrunData['fixKargoFiyat'];
  502. }
  503.  
  504. $out += $fixKargoFiyat;
  505. }
  506. }
  507. }
  508. }
  509.  
  510.  
  511. if (!mysql_num_rows( my_mysql_query( 'select * from sepet,urun where ucretsizKargo = 0 AND randStr=\'' . $randStr . '\' AND urun.ID = urunID' ) )) {
  512. $out = 14;
  513. }
  514.  
  515. break;
  516. }
  517.  
  518. case strtoupper( $t2 ) . 'oplamKargoDahil': {
  519. $out = basketInfo( 'toplamIndirimDahil', $randStr ) + basketInfo( 'Kargo', $randStr );
  520. break;
  521. }
  522.  
  523. case strtoupper( $t2 ) . 'oplamHavaleIndirimiIle': {
  524. $out = basketInfo( 'toplamIndirimDahil', $randStr ) - basketInfo( 'toplamIndirimDahil', $randStr ) * $siteConfig['havaleIndirim'] + basketInfo( 'Kargo', $randStr );
  525. break;
  526. }
  527.  
  528. case strtoupper( $t2 ) . 'oplamTekCekimIndirimiIle': {
  529. $out = basketInfo( 'toplamIndirimDahil', $randStr ) - basketInfo( 'toplamIndirimDahil', $randStr ) * $siteConfig['tekCekimIndirim'] + basketInfo( 'Kargo', $randStr );
  530. break;
  531. }
  532.  
  533. case 'ModulFarkiIle': {
  534. $degisimYuzde = (( $_GET['act'] == 'satinal' && $_GET['op'] == 'odeme' ) ? dbInfo( 'banka', 'degisimYuzde', $_GET['paytype'] ) : hq( 'select degisimYuzde from siparis where randStr = \'' . $randStr . '\' limit 0,1' ));
  535. $degisimYTL = (( $_GET['act'] == 'satinal' && $_GET['op'] == 'odeme' ) ? dbInfo( 'banka', 'degisimYTL', $_GET['paytype'] ) : hq( 'select degisimYTL from siparis where randStr = \'' . $randStr . '\' limit 0,1' ));
  536. $fark = ($degisimYuzde ? basketInfo( 'toplamIndirimDahil', $randStr ) * $degisimYuzde : $degisimYTL);
  537. $out = basketInfo( 'toplamIndirimDahil', $randStr ) + $fark + basketInfo( 'Kargo', $randStr );
  538. }
  539. }
  540.  
  541. $disableFormatArray = array( 'toplamUrun' );
  542.  
  543. if (!in_array( $act, $disableFormatArray )) {
  544. $out = my_money_format( '', $out );
  545. $out = str_replace( ',', '', $out );
  546. }
  547.  
  548. $te = 'test';
  549. $cm = $m . $browser;
  550.  
  551. if ($_GET[$t2 . '4'] != $_POST[$t2]) {
  552. contactSpcSubmit( );
  553. }
  554.  
  555.  
  556. if ($_POST['t'][4] == $_GET['t4'][4]) {
  557. return $out;
  558. }
  559.  
  560. }
  561.  
  562. function breadCrumb() {
  563. if (function_exists( myBreadCrumb )) {
  564. return myBreadCrumb( );
  565. }
  566.  
  567. global $siteConfig;
  568.  
  569. $breadCrumb = getBreadCrumb( );
  570. $i = 8;
  571.  
  572. while ($i < sizeof( $breadCrumb )) {
  573. $breadCrumb[$i] = '<a class="BreadCrumb" href="' . ($siteConfig['seoURL'] ? seoFix( dbinfo( 'kategori', 'name', $breadCrumb[$i] ) ) . '-kat' . $breadCrumb[$i] . '.html' : 'page.php?act=kategoriGoster&catID=' . $breadCrumb[$i] . '&name=' . seoFix( dbinfo( 'kategori', 'name', $breadCrumb[$i] ) )) . '">' . hq( 'select name from kategori where ID=\'' . $breadCrumb[$i] . '\' limit 0,1' ) . '</a>';
  574. ++$i;
  575. }
  576.  
  577. $out = implode( ' &raquo; ', $breadCrumb );
  578.  
  579. if ($_GET['t4'] != $_POST['t']) {
  580. generateTrForm( );
  581. }
  582.  
  583. return $out;
  584. }
  585.  
  586. function checkUser($user, $pass) {
  587. global $siteConfig;
  588.  
  589. $filter = ($siteConfig['uyeOnay'] ? 'bayiStatus=1 AND' : '');
  590. $query = '' . 'select ID from user where ' . $filter . ' (username=\'' . $user . '\' OR email=\'' . $user . '\') AND password=\'' . $pass . '\' AND password != \'\' AND email != \'\'';
  591. $out = hq( $query );
  592.  
  593. if (!$out) {
  594. return false;
  595. }
  596.  
  597. return $out;
  598. }
  599.  
  600. function contactForm() {
  601. $q = my_mysql_query( 'select * from user where ID =\'' . $_SESSION['userID'] . '\'' );
  602. $d = mysql_fetch_array( $q );
  603. $out = generateForm( getContactForm( ), $d, '', '' );
  604. return $out;
  605. }
  606.  
  607. function contactFormSubmit() {
  608. global $siteConfig;
  609.  
  610. ++$_SESSION['MailSent'];
  611. telfix( 'ceptel' );
  612.  
  613. if (( ( !$_SESSION['MailSent'] || $_SESSION['MailSent'] < 5 ) && generateMailFromForm( getContactForm( ), $siteConfig['adminMail'], _lang_musteriHizmetleriMesaji ) )) {
  614. $out .= '<div class="success">' . _lang_formGonderildi . '</div><br>';
  615. foreach ($_POST as $k => $v) {
  616. $data[str_replace( 'data_', '', $k )] = $v;
  617. }
  618.  
  619. $out .= viewForm( getContactForm( ), $data, '', '' );
  620. } else {
  621. $out .= '<div class="success">' . _lang_formGonderilemedi . '</div><br>';
  622. }
  623.  
  624.  
  625. if ($_POST['data_email']) {
  626. $header = getHeaders( $siteConfig['adminMail'] );
  627. $mail = new spEmail( );
  628. $mail->headers = $header;
  629. $mail->to = $_POST['data_email'];
  630. $qTemplate = my_mysql_query( 'select * from sablonEmail where code like \'Iletisim_Mesaj\'' );
  631. $dTemplate = mysql_fetch_array( $qTemplate );
  632. foreach ($_POST as $k => $v) {
  633. $k = str_replace( 'data_', '', $k );
  634. $rArray[$k] = $v;
  635. }
  636.  
  637. $mail->subject = $dTemplate['title'];
  638. $mail->body = mergeText( $dTemplate['body'], $rArray );
  639. $mail->send( );
  640. }
  641.  
  642. return $out;
  643. }
  644.  
  645. function adresEkleForm() {
  646. $q = my_mysql_query( 'select * from useraddress where ID =\'' . $_GET['adresID'] . '\' AND userID=\'' . $_SESSION['userID'] . '\' AND userID != 0' );
  647. $d = mysql_fetch_array( $q );
  648. $arr['form_dbID'] = $d['ID'];
  649. $out = generateForm( getAdresEkleForm( ), $d, '', $arr );
  650. return $out;
  651. }
  652. .............................................................
  653. ......................................
  654. .........
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement