Guest User

Untitled

a guest
Jan 24th, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.84 KB | None | 0 0
  1. $(document).ready(function() {
  2. var city = $('#cp_id_626 i').text();
  3.  
  4. <?php
  5.  
  6. if ( strlen(get_post_meta( $post->ID, 'cp_id_298', true))>0 or strlen(get_post_meta( $post->ID, 'cp_street', true))>0 or strlen(get_post_meta( $post->ID, 'cp_id_185', true))>0 or strlen(get_post_meta( $post->ID, 'cp_id_371', true))>0 or strlen(get_post_meta( $post->ID, 'cp_id_446', true))>0 ):
  7.  
  8. mysql_set_charset( 'utf8' );
  9. $sql_select = "SELECT * FROM users";
  10. $result = mysql_query($sql_select);
  11.  
  12. $tmp = get_post_meta($post->ID, 'cp_id_626', true);
  13. $i = '';
  14. while($row = mysql_fetch_assoc($result))
  15. {
  16. if ( $tmp == $row['name'] )
  17. {
  18. if ( $row['facebook'] == 'Кредит на недвижимость' )
  19. {
  20. printf ("$('#mydiv11').html('" .$row['last_name']. " - ".$row['email']."');rn");
  21. if($row['img'] !="")
  22. echo ("$('#kredit').html('<img width="340" src="/db1/scripts/upload/" .$row['img']. "" alt="Свяжитесь с нами">');rn");
  23. }
  24.  
  25. if ( $row['facebook'] == 'Срочный выкуп недвижимости')
  26. {
  27. printf ("$('#mydiv12').html('" .$row['last_name']. " - ".$row['email']."');");
  28. if($row['img'] !="")
  29. {
  30. echo ("$('#srchvik').html('<img width="340" src="/db1/scripts/upload/" .$row['img']. "" alt="Свяжитесь с нами">');rn");
  31. }
  32. }
  33.  
  34. if ( $row['facebook'] == 'Страхование' )
  35. {
  36. printf ("$('#mydiv14').html('" .$row['last_name']. " - ".$row['email']."');");
  37. if($row['img'] !="")
  38. {
  39. echo ("$('#kredits').html('<img width="340" src="/db1/scripts/upload/" .$row['img']. "" alt="Свяжитесь с нами">');rn");
  40. }
  41. }
  42.  
  43. if ( $row['facebook'] == 'Автокредит' )
  44. printf ("$('#mydiv10').html('" .$row['last_name']. " - ".$row['email']."');");
  45.  
  46. if ( $row['facebook'] == 'Срочный выкуп авто' )
  47. printf ("$('#mydiv13').html('" .$row['last_name']. " - ".$row['email']."');");
  48.  
  49. if ( $row['facebook'] == 'Специалист по недвижимости' )
  50. {
  51. if ( $i > 4 )
  52. continue;
  53.  
  54. printf ("$('#mydiv{$i}').html('" .$row['last_name']. " - ".$row['email']."');rn");
  55. echo ("$('#par{$i}').css('display', 'block');rn");
  56. if($row['img'] !="")
  57. echo ("$('#mydivv{$i}').html('<img src="/db1/scripts/upload/" .$row['img']. "" width="120" height="78" alt="Свяжитесь с нами">');rn");
  58. if($row['textcomp'] !="")
  59. echo ("$('#mydivvv{$i}').html('<li>" . implode( '</li><li>', explode( "rn", $row['textcomp'] ) ) . "</li>');rn");
  60. $i++;
  61. }
  62.  
  63. }
  64. }
  65. endif;
  66. ?>
  67. });
Add Comment
Please, Sign In to add comment