<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[PunBB Forums — How do i...]]></title>
		<link>https://punbb.informer.com/forums/topic/10631/how-do-i/</link>
		<atom:link href="https://punbb.informer.com/forums/feed/rss/topic/10631/" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in How do i....]]></description>
		<lastBuildDate>Thu, 23 Feb 2006 17:32:10 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: How do i...]]></title>
			<link>https://punbb.informer.com/forums/post/63083/#p63083</link>
			<description><![CDATA[<p>thx m8 <img src="https://punbb.informer.com/forums/img/smilies/big_smile.png" width="15" height="15" alt="big_smile" /></p>]]></description>
			<author><![CDATA[null@example.com (efeeze)]]></author>
			<pubDate>Thu, 23 Feb 2006 17:32:10 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/63083/#p63083</guid>
		</item>
		<item>
			<title><![CDATA[Re: How do i...]]></title>
			<link>https://punbb.informer.com/forums/post/63050/#p63050</link>
			<description><![CDATA[<p>Simplest way would be to modify the query like this</p><div class="codebox"><pre><code>$query = &#039;SELECT password, group_id, b.id FROM `users` AS u LEFT JOIN `bans` AS b ON u.username = b.username WHERE u.username = \&#039;&#039;.$user.&#039;\&#039;&#039;;</code></pre></div><p>and then add a check into the code lower down</p><div class="codebox"><pre><code>    if($pass == $corpass)
    {
        if ($array[&#039;id&#039;])
            die(&#039;banned&#039;);
        elseif(in_array($array[&#039;group_id&#039;],$validids))
            die(&#039;valid&#039;);
        else 
            die(&#039;invalid&#039;);
    }</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Nibbler(cpg))]]></author>
			<pubDate>Thu, 23 Feb 2006 05:03:40 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/63050/#p63050</guid>
		</item>
		<item>
			<title><![CDATA[How do i...]]></title>
			<link>https://punbb.informer.com/forums/post/63045/#p63045</link>
			<description><![CDATA[<div class="codebox"><pre><code>&lt;?php
    //this file must be in the same directory as the config.php file along with your other forum files.
    include &#039;include/functions.php&#039;;
    include &#039;config.php&#039;;
    
    $user = trim($_GET[&#039;u&#039;]);
    $pass = pun_hash(trim($_GET[&#039;p&#039;]));
    //this is the only thing you need to edit. Each Member group has its own id, admin = 1, mod = 2, 3 = guest, 4 = member. Ok, so basically you put each group id into this array that you want to be able to use the bot.
    $validids = array(1,2,4);
    
    $dbc = mysql_connect($db_host, $db_username, $db_password);
    
    if(!$dbc)
        die(&#039;error connecting&#039;);
        
    $selectdb = mysql_select_db($db_name,$dbc);
    
    if(!$selectdb)
        die(&#039;error selecting&#039;);
    
      $query = &#039;SELECT * FROM `users` WHERE username = \&#039;&#039;.$user.&#039;\&#039;&#039;;
    
    $result = mysql_query($query) or die(&#039;query error&#039;);
    
    $array = mysql_fetch_array($result);
    
    $corpass = $array[&#039;password&#039;];
    if($pass == $corpass)
    {
        if(in_array($array[&#039;group_id&#039;],$validids))
            die(&#039;valid&#039;);
        else 
            die(&#039;invalid&#039;);
    }

    die(&#039;invalid&#039;);   
?&gt;</code></pre></div><p>This returns whether a certain name &amp; password exists on my forums<br />It shows &quot;valid&quot; if they exist<br />&quot;invalid&quot; if they dont.</p><p>How would i get it to show banned if a user is banned?<br />anyone help?</p>]]></description>
			<author><![CDATA[null@example.com (efeeze)]]></author>
			<pubDate>Thu, 23 Feb 2006 02:40:18 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/63045/#p63045</guid>
		</item>
	</channel>
</rss>
