Advertisement
Guest User

Untitled

a guest
Jun 15th, 2012
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.37 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 main() {
  15. include( 'settings.php' );
  16. include( 'language.php' );
  17. $date = date( 'Y-m-d' );
  18. $memid = mysql_real_escape_string( $_SESSION['memid'] );
  19. $sms_general_select = mysql_fetch_array( mysql_query( 'select * from general_sms' ) );
  20. $rs0 = mysql_fetch_array( mysql_query( 'select * from zw_websetting' ) );
  21. $productid = mysql_real_escape_string( $_REQUEST['productid'] );
  22. $product_rating = mysql_real_escape_string( $_REQUEST['send'] );
  23. $list = mysql_real_escape_string( $_REQUEST['list'] );
  24. global $memid;
  25.  
  26. $_SESSION['cartproid'] = $productid;
  27. $_SESSION['cartproid123'] = $productid;
  28. $_SESSION['cartpro'] = $productid;
  29. $product_id = mysql_fetch_array( mysql_query( '' . 'select * from products where id=\'' . $productid . '\'' ) );
  30. $query_str = '' . 'select * from products PR, category MC, subcategory SC, sub_cat SS where PR.id=\'' . $productid . '\' and PR.status=\'active\' and PR.main_cat=MC.categoryid';
  31.  
  32. if ($product_id['sub_cat'] != '') {
  33. $query_str .= ' and PR.sub_cat=SC.subcategoryid';
  34. }
  35.  
  36.  
  37. if ($product_id['sub_subcat'] != '') {
  38. $query_str .= ' and PR.sub_subcat=SS.subcategoryid';
  39. }
  40.  
  41. $product_fetch = mysql_fetch_array( mysql_query( $query_str ) );
  42. $merchant_id = $product_fetch['user_id'];
  43. $cat_id = $product_fetch['categoryid'];
  44. $product_code = $product_fetch['product_code'];
  45. $productid = $product_fetch['id'];
  46. $viewed_product = $product_fetch['viewed_product'];
  47. $view_product = $viewed_product + 1;
  48. $related_product = $product_fetch['related_product'];
  49. $len = strlen( $related_product );
  50. $related_product = substr( $related_product, 0, $len - 1 );
  51. $query = mysql_query( '' . 'update products set viewed_product=\'' . $view_product . '\' where id=\'' . $productid . '\'' );
  52. $delete = mysql_query( '' . 'delete from viewed_product where prod_id=' . $productid . ' and user_id=' . $memid );
  53. $vieweds = mysql_query( '' . 'insert into viewed_product set prod_id=' . $productid . ' , user_id=' . $memid );
  54. $product_image = mysql_fetch_array( mysql_query( '' . 'select * from products_image where product_code=\'' . $product_code . '\' ' ) );
  55. $product_image_small = mysql_query( '' . 'select * from products_image where product_code=\'' . $product_code . '\' and type=\'small\'' );
  56. $mem_fetch = mysql_fetch_array( mysql_query( '' . 'select * from job_seeker where id=\'' . $merchant_id . '\'' ) );
  57. $memidname = $mem_fetch['uname'];
  58. $mem_select = mysql_fetch_array( mysql_query( '' . 'select * from job_seeker where id=\'' . $memid . '\'' ) );
  59. $pay_fetch_select = mysql_query( '' . 'select * from payment where merchant_id=\'' . $merchant_id . '\' and pay_status=\'active\'' );
  60. $check_plan = mysql_fetch_array( mysql_query( '' . 'select * from plans where id=\'' . $mem_select['memid'] . '\'' ) );
  61. $brand_select = mysql_fetch_array( mysql_query( '' . 'select * from brand where status=\'active\' and brandid=\'' . $product_fetch['brand'] . '\'' ) );
  62. $payment_modes = $check_plan['payment_modes'];
  63. $exp_payments = explode( '|', $payment_modes );
  64.  
  65. if ($_REQUEST['send'] != '') {
  66. include( 'logincheck.php' );
  67. $self = basename( $_SERVER['REQUEST_URI'] );
  68. $self = str_replace( 'send', 'null', $self );
  69. $get_rate_number = mysql_num_rows( mysql_query( '' . 'select * from orders OT, order_details OD where OT.memid=\'' . $merchant_id . '\' and OT.orderid=OD.orderid and OT.p_status=\'Received\'' ) );
  70.  
  71. if ($get_rate_number == 0) {
  72. echo '' . '<script>window.location=\'' . $self . '&rate=not_purs\'</script>';
  73. exit( );
  74. }
  75.  
  76. $get_rate_num = mysql_num_rows( mysql_query( '' . 'select * from product_feedback where merchant_id=\'' . $merchant_id . '\' and product_id=\'' . $productid . '\'' ) );
  77.  
  78. if ($get_rate_num != 0) {
  79. echo '' . '<script>window.location=\'' . $self . '&rate=done_already\'</script>';
  80. exit( );
  81. }
  82.  
  83. $insert_rating = mysql_query( '' . 'insert into product_feedback set
  84. mem_id = \'' . $memid . '\',
  85. merchant_id = \'' . $merchant_id . '\',
  86. product_id = \'' . $productid . '\',
  87. product_rating =\'' . $product_rating . '\',
  88. added_date=\'' . $date . '\'' );
  89. echo '' . '<script>window.location=\'' . $self . '\'</script>';
  90. }
  91.  
  92. $tot_ratings = mysql_num_rows( mysql_query( '' . 'select * from product_feedback where product_id=\'' . $productid . '\'' ) );
  93. $i = 1;
  94.  
  95. while ($i <= 5) {
  96. $star = mysql_num_rows( mysql_query( '' . 'select * from product_feedback where product_id=\'' . $productid . '\' and product_rating=\'' . $i . '\'' ) );
  97. $val_array[] = $star;
  98. ++$i;
  99. }
  100.  
  101. $star_ratings = max( $val_array );
  102. $m = 1;
  103.  
  104. while ($m <= 5) {
  105. $star = mysql_num_rows( mysql_query( '' . 'select * from product_feedback where product_id=\'' . $productid . '\' and product_rating=\'' . $m . '\'' ) );
  106.  
  107. if (( ( $star_ratings == $star && $star != 0 ) && $star_ratings != 0 )) {
  108. $image_path = $m . 'star.jpg';
  109. $rate = $m;
  110. } else {
  111. if (( $star == 0 && $star_ratings == 0 )) {
  112. $image_path = '0star.jpg';
  113. $rate = 0;
  114. }
  115. }
  116.  
  117. ++$m;
  118. }
  119.  
  120. echo '<s';
  121. echo 'cript src="js/select_image.js" language="javascript"></script>
  122. <link rel="stylesheet" type="text/css" href="Contact-Pop/css/contact-pop.css" />
  123. ';
  124. echo '<s';
  125. echo 'cript type="text/javascript" src="Contact-Pop/js/popOverForm.js" ></script>
  126. ';
  127. echo '<s';
  128. echo 'cript type="text/javascript" src="Contact-Pop/js/jquery-1.3.2.min.js"></script>
  129. ';
  130. echo '<s';
  131. echo 'cript type="text/javascript" src="Contact-Pop/js/email-pop.js"></script>
  132. ';
  133. echo '<s';
  134. echo 'cript type="text/javascript" src="Contact-Pop/js/sms-pop.js"></script>
  135. </script>
  136.  
  137. ';
  138. echo '<s';
  139. echo 'cript src="js/get_activity_id.js"></script>
  140. ';
  141. echo '<s';
  142. echo 'cript src="js/jquery.js"></script>
  143. ';
  144. echo '<s';
  145. echo 'cript src="js/jquery.min.js"></script>
  146.  
  147. ';
  148. echo '<S';
  149. echo 'CRIPT type=text/javascript src="js/jquery.all.min.js"></SCRIPT>
  150. ';
  151. echo '<S';
  152. echo 'CRIPT type=text/javascript src="js/jquery.jqzoom-core-pack.js"></SCRIPT>
  153. ';
  154. echo '<S';
  155. echo 'CRIPT type=text/javascript src="js/zeescript.js"></SCRIPT>
  156. ';
  157. echo '<s';
  158. echo 'cript type="text/javascript">
  159.  
  160. $(document).ready(function(){
  161. $("#image_over").mouseover(function(){
  162. $("#bigger_image").hide();
  163. $("#bigger_imagess").show();
  164. });
  165. $("#image_over").mouseout(function(){
  166. $("#bigger_image").show();
  167. $("#bigger_imagess").hide();
  168. });
  169. });
  170. </script>
  171.  
  172. ';
  173. echo '<s';
  174. echo 'tyle type="text/css">
  175. .tdpdg{ padding:3px 5px 3px 5px;}
  176. .tdpdg3{ padding:3px 5px 3px 18px;}
  177. .tblhdg{background-color:#E7F1FA; color:#333333; font-size:16px; font-weight:bold; padding-left:10px;}
  178. .inr{font-size:24px; font-family:\'Times New Roman\', Times, serif; }
  179. .phone{padding-left:25px; padding-top:5px; padding-bottom:3px; background:url(images/phone.png) no-repeat left bottom;}
  180. .rating{
  181. w';
  182. echo 'idth:80px;
  183. height:16px;
  184. margin:5px 0 5px 0;
  185. padding:0;
  186. list-style:none;
  187. clear:both;
  188. position:relative;
  189. background: url(images/star-matrix.gif) no-repeat 0 0;
  190. }
  191. ul.rating li {
  192. cursor: pointer;
  193.  
  194. float:left;
  195.  
  196. text-indent:-999em;
  197. }
  198. ul.rating li a {
  199. position:absolute;
  200. left:0;
  201. top:0;
  202. width:16px;
  203. height:16px;
  204. text-decoration:none;
  205. z-index: 200;
  206. }
  207. ul.rating li.one a {left:0}
  208. ul.r';
  209. echo 'ating li.two a {left:16px;}
  210. ul.rating li.three a {left:32px;}
  211. ul.rating li.four a {left:48px;}
  212. ul.rating li.five a {left:64px;}
  213.  
  214. .nostar {background-position:0 0}
  215. .onestar {background-position:0 -16px}
  216. .twostar {background-position:0 -32px}
  217. .threestar {background-position:0 -48px}
  218. .fourstar {background-position:0 -64px}
  219. .fivestar {background-position:0 -80px}
  220.  
  221. ul.rating li a:hover {
  222. z';
  223. echo '-index:2;
  224. width:80px;
  225. height:16px;
  226. overflow:hidden;
  227. left:0;
  228. background: url(images/star-matrix.gif) no-repeat 0 0
  229. }
  230. ul.rating li.one a:hover {background-position:0 -96px;}
  231. ul.rating li.two a:hover {background-position:0 -112px;}
  232. ul.rating li.three a:hover {background-position:0 -128px}
  233. ul.rating li.four a:hover {background-position:0 -144px}
  234. ul.rating li.five a:hover {background-positio';
  235. .....................................................
  236. .............................
  237. .................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement