Advertisement
Guest User

Untitled

a guest
May 3rd, 2017
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 18.58 KB | None | 0 0
  1. <?php
  2.  
  3. function escape($data)
  4. {
  5.     if (ini_get('magic_quotes_gpc'))
  6.     {
  7.         $data = stripslashes($data);
  8.     }
  9.     return mysql_real_escape_string($data);
  10. }
  11.  
  12. function insert_get_categories($a)
  13. {
  14.     global $config,$conn;
  15.     $query = "select * from categories where parent='0' order by name asc";
  16.     $results = $conn->execute($query);
  17.     $returnthis = $results->getrows();
  18.     return $returnthis;
  19. }
  20.  
  21. function insert_get_subcategories($a)
  22. {
  23.     global $config,$conn;
  24.     $query = "select * from categories where parent='".mysql_real_escape_string($a['parent'])."' order by name asc";
  25.     $results = $conn->execute($query);
  26.     $returnthis = $results->getrows();
  27.     return $returnthis;
  28. }
  29.  
  30. function insert_get_advertisement($var)
  31. {
  32.         global $conn;
  33.         $query="SELECT code FROM advertisements WHERE AID='".mysql_real_escape_string($var[AID])."' AND active='1' limit 1";
  34.         $executequery=$conn->execute($query);
  35.         $getad = $executequery->fields[code];
  36.         echo strip_mq_gpc($getad);
  37. }
  38.  
  39. function verify_login_admin()
  40. {
  41.         global $config,$conn;
  42.         if($_SESSION['ADMINID'] != "" && is_numeric($_SESSION['ADMINID']) && $_SESSION['ADMINUSERNAME'] != "" && $_SESSION['ADMINPASSWORD'] != "")
  43.         {
  44.             $query="SELECT * FROM administrators WHERE username='".mysql_real_escape_string($_SESSION['ADMINUSERNAME'])."' AND password='".mysql_real_escape_string($_SESSION['ADMINPASSWORD'])."' AND ADMINID='".mysql_real_escape_string($_SESSION['ADMINID'])."'";
  45.             $executequery=$conn->execute($query);
  46.            
  47.             if(mysql_affected_rows()==1)
  48.             {
  49.            
  50.             }
  51.             else
  52.             {
  53.                 header("location:$config[adminurl]/index.php");
  54.                 exit;
  55.             }
  56.            
  57.         }
  58.         else
  59.         {
  60.             header("location:$config[adminurl]/index.php");
  61.             exit;
  62.         }
  63. }
  64.  
  65. function verify_email_username($usernametocheck)
  66. {
  67.     global $config,$conn;
  68.     $query = "select count(*) as total from members where username='".mysql_real_escape_string($usernametocheck)."' limit 1";
  69.     $executequery = $conn->execute($query);
  70.     $totalu = $executequery->fields[total];
  71.     if ($totalu >= 1)
  72.     {
  73.         return false;
  74.     }
  75.     else
  76.     {
  77.         return true;
  78.     }
  79. }
  80.  
  81. function verify_valid_email($emailtocheck)
  82. {
  83.        $eregicheck = "^([-!#\$%&'*+./0-9=?A-Z^_`a-z{|}~])+@([-!#\$%&'*+/0-9=?A-Z^_`a-z{|}~]+\\.)+[a-zA-Z]{2,4}\$";
  84.        return eregi($eregicheck, $emailtocheck);
  85. }
  86.  
  87. function verify_email_unique($emailtocheck)
  88. {
  89.     global $config,$conn;
  90.     $query = "select count(*) as total from members where email='".mysql_real_escape_string($emailtocheck)."' limit 1";
  91.     $executequery = $conn->execute($query);
  92.     $totalemails = $executequery->fields[total];
  93.     if ($totalemails >= 1)
  94.     {
  95.         return false;
  96.     }
  97.     else
  98.     {
  99.         return true;
  100.     }
  101. }
  102.  
  103. function mailme($sendto,$sendername,$from,$subject,$sendmailbody,$bcc="")
  104. {
  105.     global $SERVER_NAME;
  106.     $subject = nl2br($subject);
  107.     $sendmailbody = nl2br($sendmailbody);
  108.     $sendto = $sendto;
  109.     if($bcc!="")
  110.     {
  111.         $headers = "Bcc: ".$bcc."\n";
  112.     }
  113.     $headers = "MIME-Version: 1.0\n";
  114.     $headers .= "Content-type: text/html; charset=iso-utf-8\n";
  115.     $headers .= "X-Priority: 3\n";
  116.     $headers .= "X-MSMail-Priority: Normal\n";
  117.     $headers .= "X-Mailer: PHP/"."MIME-Version: 1.0\n";
  118.     $headers .= "From: " . $from . "\n";
  119.     $headers .= "Content-Type: text/html\n";
  120.     mail("$sendto","$subject","$sendmailbody","$headers");
  121. }
  122.  
  123. function generateCode($length)
  124. {
  125.     $chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPRQSTUVWXYZ0123456789";
  126.     $code = "";
  127.     $clen = strlen($chars) - 1;
  128.     while (strlen($code) < $length) {
  129.         $code .= $chars[mt_rand(0,$clen)];
  130.     }
  131.     return $code;
  132. }
  133.  
  134. function insert_answer_count($a)
  135. {
  136.         global $conn;
  137.         $query="SELECT count(*) as total FROM posts_comments WHERE PID='".mysql_real_escape_string($a[pid])."' limit 1";
  138.         $executequery=$conn->execute($query);
  139.         $total = $executequery->fields[total];
  140.         echo $total;
  141. }
  142.  
  143. function get_cat($cid)
  144. {
  145.         global $conn;
  146.         $query="SELECT name FROM categories WHERE CATID='".mysql_real_escape_string($cid)."' limit 1";
  147.         $executequery=$conn->execute($query);
  148.         $name = $executequery->fields[name];
  149.         return $name;
  150. }
  151.  
  152. function insert_get_cat($var)
  153. {
  154.         global $conn;
  155.         $query="SELECT name FROM categories WHERE CATID='".mysql_real_escape_string($var[CATID])."' limit 1";
  156.         $executequery=$conn->execute($query);
  157.         $name = $executequery->fields[name];
  158.         echo $name;
  159. }
  160.  
  161. function insert_get_stripped_phrase($a)
  162. {
  163.     $stripper = $a[details];
  164.     $stripper = str_replace("\\n", "<br>", $stripper);
  165.     $stripper = str_replace("\\r", "", $stripper);
  166.     $stripper = str_replace("\\", "", $stripper);
  167.     return $stripper;
  168. }
  169.  
  170. function insert_get_stripped_phrase2($a)
  171. {
  172.     $stripper = $a[details];
  173.     $stripper = str_replace("\\n", "\n", $stripper);
  174.     $stripper = str_replace("\\r", "\r", $stripper);
  175.     return $stripper;
  176. }
  177.  
  178. function listdays($selected)
  179. {
  180.     $days = "";
  181.     for($i=1;$i<=31;$i++)
  182.     {
  183.         if($i == $selected)
  184.         {
  185.             $days .= "<option value=\"$i\" selected>$i</option>";
  186.         }
  187.         else
  188.         {
  189.             $days .= "<option value=\"$i\">$i</option>";
  190.         }
  191.     }
  192.     return $days;
  193. }
  194.  
  195. function listmonths($selected)
  196. {
  197.     global $lang;
  198.     $months = "";
  199.     $allmonths = array("",$lang['83'],$lang['84'],$lang['85'],$lang['86'],$lang['87'],$lang['88'],$lang['89'],$lang['90'],$lang['91'],$lang['92'],$lang['93'],$lang['94']);
  200.     for($i=1;$i<=12;$i++)
  201.     {
  202.         if($i == $selected)
  203.         {
  204.             $months .= "<option value=\"$i\" selected>$allmonths[$i]</option>";
  205.         }
  206.         else
  207.         {
  208.             $months .= "<option value=\"$i\">$allmonths[$i]</option>";
  209.         }
  210.     }
  211.     return $months;
  212. }
  213.  
  214. function listyears($selected)
  215. {
  216.         $years = "";
  217.         $thisyear = date("Y");
  218.         for($i=$thisyear-100+13;$i<=$thisyear-13;$i++)
  219.         {
  220.                 if($i == $selected)
  221.                         $years .= "<option value=\"$i\" selected>$i</option>";
  222.                 else
  223.                         $years .= "<option value=\"$i\">$i</option>";
  224.         }
  225.         return $years;
  226. }
  227.  
  228. function listcountries($selected)
  229. {
  230.     $country="";
  231.     $countries = array("Afghanistan","Albania","Algeria","American Samoa","Andorra","Angola","Anguilla","Antartica","Antigua and Barbuda","Argentina","Armenia","Aruba","Ascension Island","Australia","Austria","Azerbaijan","Bahamas","Bahrain","Bangladesh","Barbados","Belarus","Belgium","Belize","Benin","Bermuda","Bhutan","Bolivia","Botswana","Bouvet Island","Brazil","Brunei Darussalam","Bulgaria","Burkina Faso","Burundi","Cambodia","Cameroon","Canada","Cape Verde Islands","Cayman Islands","Chad","Chile","China","Christmas Island","Colombia","Comoros","Cook Islands","Costa Rica","Cote d Ivoire","Croatia/Hrvatska","Cyprus","Czech Republic","Denmark","Djibouti","Dominica","Dominican Republic","East Timor","Ecuador","Egypt","El Salvador","Equatorial Guinea","Eritrea","Estonia","Ethiopia","Falkland Islands","Faroe Islands","Fiji","Finland","France","French Guiana","French Polynesia","Gabon","Gambia","Georgia","Germany","Ghana","Gibraltar","Greece","Greenland","Grenada","Guadeloupe","Guam","Guatemala","Guernsey","Guinea","Guinea-Bissau","Guyana","Haiti","Honduras","Hong Kong","Hungary","Iceland","India","Indonesia","Iran","Ireland","Isle of Man","Israel","Italy", "Jamaica", "Japan", "Jersey", "Jordan", "Kazakhstan", "Kenya", "Kiribati", "Korea", "Kuwait", "Kyrgyzstan", "Laos", "Latvia", "Lebanon", "Lesotho", "Liberia", "Libya", "Liechtenstein", "Lithuania", "Luxembourg", "Macau", "Macedonia", "Madagascar", "Malawi", "Malaysia", "Maldives", "Mali", "Malta", "Marshall Islands", "Martinique", "Mauritania", "Mauritius", "Mayotte Island", "Mexico", "Micronesia", "Moldova", "Monaco", "Mongolia", "Montserrat", "Morocco", "Mozambique", "Myanmar", "Namibia", "Nauru", "Nepal", "Netherlands", "Netherlands Antilles", "New Caledonia", "New Zealand", "Nicaragua", "Niger", "Nigeria", "Niue", "Norfolk Island", "Norway", "Oman", "Pakistan", "Palau", "Panama", "Papua New Guinea", "Paraguay", "Peru", "Philippines", "Pitcairn Island", "Poland", "Portugal", "Puerto Rico", "Qatar", "Reunion Island", "Romania", "Russian Federation", "Rwanda", "Saint Helena", "Saint Lucia", "San Marino", "Saudi Arabia", "Senegal", "Seychelles", "Sierra Leone", "Singapore", "Slovak Republic", "Slovenia", "Solomon Islands", "Somalia", "South Africa", "South Georgia", "Spain", "Sri Lanka", "Suriname", "Svalbard", "Swaziland", "Sweden", "Switzerland", "Syria", "Taiwan", "Tajikistan", "Tanzania", "Thailand", "Togo", "Tokelau", "Tonga Islands", "Trinidad and Tobago", "Tunisia", "Turkey", "Turkmenistan", "Tuvalu", "Uganda", "Ukraine", "United Kingdom", "United States", "Uruguay", "Uzbekistan", "Vanuatu", "Vatican City", "Venezuela", "Vietnam", "Western Sahara", "Western Samoa", "Yemen", "Yugoslavia", "Zambia","Zimbabwe");
  232.     for($i=0;$i<count($countries);$i++)
  233.     {
  234.         if($selected == $countries[$i])
  235.         {
  236.             $country .="<option value=\"$countries[$i]\" selected>$countries[$i]</option>";
  237.         }
  238.         else
  239.         {
  240.             $country .="<option value=\"$countries[$i]\">$countries[$i]</option>";
  241.         }
  242.     }
  243.     return $country;
  244. }
  245.  
  246. function insert_get_member_profilepicture($var)
  247. {
  248.         global $conn;
  249.         $query="SELECT profilepicture FROM members WHERE USERID='".mysql_real_escape_string($var[USERID])."' limit 1";
  250.         $executequery=$conn->execute($query);
  251.         $results = $executequery->fields[profilepicture];
  252.         if ($results == "")
  253.             return "noprofilepicture.gif";
  254.         else
  255.             return $results;
  256. }
  257.  
  258. function generatethumbs($theconvertimg,$thevideoimgnew,$thewidth,$theheight)
  259. {
  260.     global $config;
  261.     $convertimg = $theconvertimg;
  262.     $videoimgnew = $thevideoimgnew;
  263.  
  264.     $theimagesizedata = GetImageSize($convertimg);
  265.     $videoimgwidth = $theimagesizedata[0];
  266.     $videoimgheight = $theimagesizedata[1];
  267.     $videoimgformat = $theimagesizedata[2];
  268.  
  269.     $whratio = 1;
  270.     if ($videoimgwidth > $thewidth)
  271.     {
  272.         $whratio = $thewidth/$videoimgwidth;
  273.     }
  274.    
  275.     if($whratio != 1)
  276.     {
  277.         $dest_height = $whratio * $videoimgheight;
  278.         $dest_width = $thewidth;
  279.     }
  280.     else
  281.     {
  282.         $dest_height=$videoimgheight;
  283.         $dest_width=$videoimgwidth;
  284.     }
  285.    
  286.     if($dest_height > $theheight)
  287.     {
  288.         $whratio = $theheight/$dest_height;
  289.         $dest_width = $whratio * $dest_width;
  290.         $dest_height = $theheight;
  291.     }
  292.    
  293.     if($videoimgformat == 2)
  294.     {
  295.         $videoimgsource = @imagecreatefromjpeg($convertimg);
  296.         $videoimgdest = @imageCreateTrueColor($dest_width, $dest_height);
  297.         ImageCopyResampled($videoimgdest, $videoimgsource, 0, 0, 0, 0, $dest_width, $dest_height, $videoimgwidth, $videoimgheight);
  298.         imagejpeg($videoimgdest, $videoimgnew, 100);
  299.         imagedestroy($videoimgsource);
  300.         imagedestroy($videoimgdest);
  301.     }
  302.     elseif ($videoimgformat == 3)
  303.     {
  304.         $videoimgsource = imagecreatefrompng($convertimg);
  305.         $videoimgdest = imageCreateTrueColor($dest_width, $dest_height);
  306.         ImageCopyResampled($videoimgdest, $videoimgsource, 0, 0, 0, 0, $dest_width, $dest_height, $videoimgwidth, $videoimgheight);
  307.         imagepng($videoimgdest, $videoimgnew, 9);
  308.         imagedestroy($videoimgsource);
  309.         imagedestroy($videoimgdest);
  310.     }
  311.     else
  312.     {
  313.         $videoimgsource = imagecreatefromgif($convertimg);
  314.         $videoimgdest = imageCreateTrueColor($dest_width, $dest_height);
  315.         ImageCopyResampled($videoimgdest, $videoimgsource, 0, 0, 0, 0, $dest_width, $dest_height, $videoimgwidth, $videoimgheight);
  316.         imagejpeg($videoimgdest, $videoimgnew, 100);
  317.         imagedestroy($videoimgsource);
  318.         imagedestroy($videoimgdest);
  319.     }
  320. }
  321.  
  322. function insert_get_fav_status($var)
  323. {
  324.     global $conn;
  325.     $query="SELECT count(*) as total FROM posts_favorited WHERE USERID='".mysql_real_escape_string($_SESSION[USERID])."' AND PID='".intval($var[PID])."'";
  326.     $executequery=$conn->execute($query);
  327.     $total = $executequery->fields[total];
  328.     return intval($total);
  329. }
  330.  
  331. function insert_com_count($var)
  332. {
  333.     global $conn;
  334.     $query="SELECT count(*) as total FROM posts_comments WHERE PID='".intval($var[PID])."'";
  335.     $executequery=$conn->execute($query);
  336.     $total = $executequery->fields[total];
  337.     return intval($total);
  338. }
  339.  
  340. function does_post_exist($a)
  341. {
  342.     global $conn, $config;
  343.     $query="SELECT USERID FROM posts WHERE PID='".mysql_real_escape_string($a)."'";
  344.     $executequery=$conn->execute($query);
  345.     if ($executequery->recordcount()>0)
  346.         return true;
  347.     else
  348.         return false;
  349. }
  350.  
  351. function update_last_viewed($a)
  352. {
  353.         global $conn;
  354.         $query = "UPDATE posts SET last_viewed='".time()."' WHERE PID='".mysql_real_escape_string($a)."'";
  355.         $executequery=$conn->execute($query);
  356. }
  357.  
  358. function update_your_viewed ($a)
  359. {
  360.         global $conn;
  361.         $query = "UPDATE members SET yourviewed  = yourviewed  + 1 WHERE USERID='".mysql_real_escape_string($a)."'";
  362.         $executequery=$conn->execute($query);
  363. }
  364.  
  365. function update_you_viewed($a)
  366. {
  367.         global $conn;
  368.         $query = "UPDATE members SET youviewed = youviewed + 1 WHERE USERID='".mysql_real_escape_string($a)."'";
  369.         $executequery=$conn->execute($query);
  370. }
  371.  
  372. function session_verification()
  373. {
  374.     if ($_SESSION[USERID] != "")
  375.     {
  376.         if (is_numeric($_SESSION[USERID]))
  377.         {
  378.             return true;
  379.         }
  380.     }
  381.     else
  382.         return false;
  383. }
  384. function insert_get_username_from_userid($var)
  385. {
  386.         global $conn;
  387.         $query="SELECT username FROM members WHERE USERID='".mysql_real_escape_string($var[USERID])."'";
  388.         $executequery=$conn->execute($query);
  389.         $getusername = $executequery->fields[username];
  390.         return "$getusername";
  391. }
  392.  
  393. function does_profile_exist($a)
  394. {
  395.     global $conn;
  396.     global $config;
  397.     $query="SELECT username FROM members WHERE USERID='".mysql_real_escape_string($a)."'";
  398.     $executequery=$conn->execute($query);
  399.     if ($executequery->recordcount()>0)
  400.         return true;
  401.     else
  402.         return false;
  403. }
  404.  
  405. function update_viewcount_profile($a)
  406. {
  407.         global $conn;
  408.         $query = "UPDATE members SET profileviews = profileviews + 1 WHERE USERID='".mysql_real_escape_string($a)."'";
  409.         $executequery=$conn->execute($query);
  410. }
  411.  
  412. function update_viewcount_question($a)
  413. {
  414.         global $conn;
  415.         $query = "UPDATE posts SET viewcount = viewcount + 1 WHERE PID='".mysql_real_escape_string($a)."'";
  416.         $executequery=$conn->execute($query);
  417. }
  418.  
  419. function insert_get_tags($a)
  420. {
  421.         $results = $a[tags];
  422.         $results = str_replace("?", "", $results);
  423.         $returnthis = explode(" ",$results);
  424.         return $returnthis;
  425. }
  426.  
  427. function update_pviewed($SID,$PID)
  428. {
  429.         global $conn;
  430.         $query = "SELECT count(*) as total FROM members_visits WHERE PID='".mysql_real_escape_string($PID)."' AND VID='".mysql_real_escape_string($SID)."'";
  431.         $executequery = $conn->execute($query);
  432.         $total = $executequery->fields[total];
  433.         if($total >= 1)
  434.         {
  435.             $query = "UPDATE members_visits SET time='".time()."' WHERE PID='".mysql_real_escape_string($PID)."' AND VID='".mysql_real_escape_string($SID)."'";
  436.             $executequery=$conn->execute($query);
  437.         }
  438.         else
  439.         {
  440.             $query = "INSERT INTO members_visits SET time='".time()."', PID='".mysql_real_escape_string($PID)."', VID='".mysql_real_escape_string($SID)."'";
  441.             $executequery=$conn->execute($query);
  442.         }
  443. }
  444.  
  445. function insert_get_member_comments_count($var)
  446. {
  447.         global $conn;
  448.         $query="SELECT count(*) as total FROM posts_comments WHERE USERID='".mysql_real_escape_string($var[USERID])."'";
  449.         $executequery=$conn->execute($query);
  450.         $results = $executequery->fields[total];
  451.         echo "$results";
  452. }
  453.  
  454. function insert_get_posts_count($var)
  455. {
  456.         global $conn;
  457.         $query="SELECT count(*) as total FROM posts WHERE USERID='".mysql_real_escape_string($var[USERID])."'";
  458.         $executequery=$conn->execute($query);
  459.         $results = $executequery->fields[total];
  460.         echo "$results";
  461. }
  462.  
  463. function insert_get_static($var)
  464. {
  465.         global $conn;
  466.         $query="SELECT $var[sel] FROM static WHERE ID='".mysql_real_escape_string($var[ID])."'";
  467.         $executequery=$conn->execute($query);
  468.         $returnme = $executequery->fields[$var[sel]];
  469.         $returnme = strip_mq_gpc($returnme);
  470.         echo "$returnme";
  471. }
  472.  
  473. function insert_get_time_to_days_ago($a)
  474. {
  475.     global $lang;
  476.     $currenttime = time();
  477.     $timediff = $currenttime - $a[time];
  478.     $oneday = 60 * 60 * 24;
  479.     $dayspassed = floor($timediff/$oneday);
  480.     if ($dayspassed == "0")
  481.     {
  482.         $mins = floor($timediff/60);
  483.         if($mins == "0")
  484.         {
  485.             $secs = floor($timediff);
  486.             if($secs == "1")
  487.             {
  488.                 return $lang['95'];
  489.             }
  490.             else
  491.             {
  492.                 return $secs." ".$lang['96'];
  493.             }
  494.         }
  495.         elseif($mins == "1")
  496.         {
  497.             return $lang['97'];
  498.         }
  499.         elseif($mins < "60")
  500.         {
  501.             return $mins." ".$lang['98'];
  502.         }
  503.         elseif($mins == "60")
  504.         {
  505.             return $lang['99'];
  506.         }
  507.         else
  508.         {
  509.             $hours = floor($mins/60);
  510.             return "$hours ".$lang['100'];
  511.         }
  512.     }
  513.     else
  514.     {
  515.         if($dayspassed == "1")
  516.         {
  517.             return $dayspassed." ".$lang['101'];
  518.         }
  519.         else
  520.         {
  521.             return $dayspassed." ".$lang['102'];
  522.         }
  523.     }
  524. }
  525.  
  526. function seo_clean_titles($title2)
  527. {
  528.     $title2 = explode(" ", $title2);
  529.     $i = 0;
  530.     foreach($title2 as $line)
  531.     {
  532.         if($i < 15)
  533.         {
  534.             $title .= $line."-";
  535.             $i++;
  536.         }
  537.     }
  538.     $title = str_replace(array(":", ".", "^", "*", ",", ";", "~", "[", "]", "<", ">", "\\", "/", "=", "+"),"", $title);
  539.     $title = str_replace(" ", "-", $title);
  540.     $title = str_replace("|", "-", $title);
  541.     $title = str_replace("%80%99", "", $title);
  542.     echo $title;
  543. }
  544.  
  545. function insert_seo_clean_titles($a)
  546. {
  547.     $title2 = explode(" ", $a['title']);
  548.     $i = 0;
  549.     foreach($title2 as $line)
  550.     {
  551.         if($i < 15)
  552.         {
  553.             $title .= $line."-";
  554.             $i++;
  555.         }
  556.     }
  557.     $title = str_replace(array(":", ".", "^", "*", ",", ";", "~", "[", "]", "<", ">", "\\", "/", "=", "+"),"", $title);
  558.     $title = str_replace(" ", "-", $title);
  559.     $title = str_replace("|", "-", $title);
  560.     $title = str_replace("%80%99", "", $title);
  561.     return $title;
  562. }
  563.  
  564. function seo_clean_titles2($title2)
  565. {
  566.     $title2 = explode(" ", $title2);
  567.     $i = 0;
  568.     foreach($title2 as $line)
  569.     {
  570.         if($i < 15)
  571.         {
  572.             $title .= $line."-";
  573.             $i++;
  574.         }
  575.     }
  576.     $title = str_replace(array(":", ".", "^", "*", ",", ";", "~", "[", "]", "<", ">", "\\", "/", "=", "+"),"", $title);
  577.     $title = str_replace(" ", "-", $title);
  578.     $title = str_replace("|", "-", $title);
  579.     $title = str_replace("%80%99", "", $title);
  580.     return $title;
  581. }
  582.  
  583. function insert_get_top5($a)
  584. {
  585.     global $config,$conn;
  586.     $query = "select USERID, username, points from members where status='1' order by points desc limit 5";
  587.     $results = $conn->execute($query);
  588.     $returnthis = $results->getrows();
  589.     return $returnthis;
  590. }
  591.  
  592. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement