Guest User

Untitled

a guest
Jul 19th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.06 KB | None | 0 0
  1. <?
  2. class Query
  3. {
  4.  
  5. function get_city_love($country_id)
  6. {
  7. $query = "
  8. SELECT
  9. *
  10. FROM
  11. `сity_love`
  12. WHERE
  13. `сity_love`.`id` = '$country_id';";
  14. $query_result = mysql_query($query) or die("Query failed : " . mysql_error());
  15. $country = $query_result['city_id'];
  16. $this->Country = $country;
  17. }
  18.  
  19. function country_finish($country_id)
  20. {
  21. $query = "
  22. UPDATE
  23. `city_love`
  24. SET
  25. `city_love`.`is_finish` = 'finish'
  26. WHERE
  27. `city_love`.`id` = '$country_id';";
  28. mysql_query($query) or die("Query failed : " . mysql_error());
  29. }
  30.  
  31. function love_set_position($male, $male_meet, $to, $country_id, $i)
  32. {
  33. echo 'position'.$male.','.$male_meet.','.$to.','.$country_id.','.$i;
  34. $query = "
  35. UPDATE
  36. `love_position`
  37. SET
  38. `love_position`.`male` = '$male',
  39. `love_position`.`male_meet` = '$male_meet',
  40. `love_position`.`to` = '$to',
  41. `love_position`.`country_id` = '$country_id',
  42. `love_position`.`i` = '$i'
  43. WHERE
  44. `love_position`.`id` = '1';";
  45. mysql_query($query) or die("Query failed : " . mysql_error());
  46. }
  47.  
  48. function love_get_position()
  49. {
  50. $query = "
  51. SELECT
  52. *
  53. FROM
  54. `love_position`
  55. WHERE
  56. `love_position`.`id` = '1';";
  57. $position = mysql_query($query) or die("Query failed : " . mysql_error());
  58. $this->Position = $position;
  59. }
  60.  
  61. function insert_values_mamba_main($account,$user_name,$city,$age,$about,$user_info,$i_meet,$zodiak)
  62. {
  63. $account = mysql_real_escape_string($account);
  64. $user_name = mysql_real_escape_string($user_name);
  65. $city = mysql_real_escape_string($city);
  66. $age = mysql_real_escape_string($age);
  67. $about = mysql_real_escape_string($about);
  68. $user_info = mysql_real_escape_string($user_info);
  69. $i_meet = mysql_real_escape_string($i_meet);
  70. $zodiak = mysql_real_escape_string($zodiak);
  71. $query = "
  72. INSERT
  73. INTO
  74. `mamba_main`
  75. VALUES
  76. (default,
  77. '$account',
  78. '$user_name',
  79. '$city',
  80. '$age',
  81. '$about',
  82. '$user_info',
  83. '$i_meet',
  84. '$zodiak');";
  85. mysql_query($query) or die("Query failed : " . mysql_error());
  86. }
  87.  
  88. function insert_values_main_loveplanet($link,$about,$name,$user_info,$zodiak)
  89. {
  90. $link = mysql_real_escape_string($link);
  91. $about = iconv("UTF-8", "UTF-8", $about);
  92. $about = mysql_real_escape_string($about);
  93. $name = mysql_real_escape_string($name);
  94. $user_info = mysql_real_escape_string($user_info);
  95. $zodiak = mysql_real_escape_string($zodiak);
  96. $query = "
  97. INSERT
  98. INTO
  99. `loveplanet_main`
  100. VALUES
  101. (default,
  102. '$link',
  103. '$name',
  104. '$user_info',
  105. '$about',
  106. '$zodiak');";
  107. mysql_query($query) or die("Query failed : " . mysql_error());
  108. }
  109.  
  110. function insert_images_loveplanet($link,$big_image,$small_image)
  111. {
  112. $link = mysql_real_escape_string($link);
  113. $big_image = mysql_real_escape_string($big_image);
  114. $small_image = mysql_real_escape_string($small_image);
  115. $query = "
  116. INSERT
  117. INTO
  118. `loveplanet_images`
  119. VALUES
  120. (default,
  121. '$link',
  122. '$big_image',
  123. '$small_image');";
  124. mysql_query($query) or die("Query failed : " . mysql_error());
  125. }
  126. }
  127. ?>
Add Comment
Please, Sign In to add comment