<?xml version="1.0" encoding="utf-8"?>
<!-- generator="FeedCreator 1.8.0-nukeFEED (http://nukeSEO.com)" -->
<rss version="2.0">
    <channel>
        <title>Popular - Code Authors</title>
        <description></description>
        <link>http://www.code-authors.com/</link>
        <lastBuildDate>Fri, 18 May 2012 05:02:21 -0500</lastBuildDate>
        <generator>FeedCreator 1.8.0-nukeFEED (http://nukeSEO.com)</generator>
        <item>
            <title>Google Analytics</title>
            <link>http://www.code-authors.com/ftopicp-4485.html#4485</link>
            <description><![CDATA[Thank you sir.  I'll have to look into that.  I am sure they must have communicated the change somehow.  I will admit, I haven't reviewed my stats in a long time.  If no time to do anything about them, why look at them... lol.]]></description>
            <author> no_email@example.com (montego)</author>
            <guid isPermaLink="false">http://www.code-authors.com/ftopicp-4485.html#4485</guid>
        </item>
        <item>
            <title>phpBB 3 user handler class</title>
            <link>http://www.code-authors.com/ftopicp-4536.html#4536</link>
            <description><![CDATA[http://www.phpclasses.org/browse/package/4826.html
<br />

<br />
<span style="font-weight:bold;">phpbb.class.php</span>
<br />
<table style=" width:90%; align:center; border-spacing:1px; padding:3px; border:0px;" class="bodyline"><td class="helpline"><span class="genmed thick">Code:<script type="text/javascript" src="modules/Forums/includes/select_expand_bbcodes.js"></script><script type="text/javascript"><!--   var id = 'SXBB' + (1000 + Math.floor(Math.random() * 5000));   SXBB[id] = new _SXBB(id);   SXBB[id].T['select'] = 'Select';   SXBB[id].T['expand'] = 'Expand';   SXBB[id].T['contract'] = 'Contract';   SXBB[id].writeCmd();//--></script>      </span></td>   </tr>   <tr>     <td class="code"><script type="text/javascript"><!--   SXBB[id].writeDiv();//--></script>
<br />

<br />
/*
<br />
PHPBB Forum manipulation Class
<br />
By Felix Manea &#40;felix.manea@gmail.com&#41;
<br />
www.ever.ro
<br />
Licensed under LGPL
<br />
NOTE&#58; You are required to leave this header intact.
<br />
*/
<br />
class phpbb&#123;
<br />
&nbsp; &nbsp; //various table fields
<br />
&nbsp; &nbsp; var $table_fields = array&#40;&#41;;
<br />

<br />
&nbsp; &nbsp; //constructor
<br />
&nbsp; &nbsp; public function __construct&#40;$path&#41;&#123;
<br />
&nbsp; &nbsp; global $phpbb_root_path, $phpEx, $db, $config, $user, $auth, $cache, $template;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; define&#40;'IN_PHPBB', true&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $phpbb_root_path = $path;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $phpEx = 'php';
<br />
&nbsp; &nbsp; &#125;
<br />
&nbsp; &nbsp; 
<br />
&nbsp; &nbsp; //user_login
<br />
&nbsp; &nbsp; public function user_login&#40;$phpbb_vars&#41;&#123;
<br />
&nbsp; &nbsp; global $phpbb_root_path, $phpEx, $db, $config, $user, $auth, $cache, $template;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //prezumtia de fail
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $phpbb_result = &quot;FAIL&quot;;
<br />

<br />
&nbsp; &nbsp; &nbsp; &nbsp; //general info
<br />
&nbsp; &nbsp; &nbsp; &nbsp; if&#40;!defined&#40;&quot;IN_LOGIN&quot;&#41;&#41; define&#40;&quot;IN_LOGIN&quot;, true&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; require_once&#40;$phpbb_root_path.'common.php'&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; 
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //session management
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $user-&gt;session_begin&#40;&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $auth-&gt;acl&#40;$user-&gt;data&#41;;
<br />

<br />
&nbsp; &nbsp; &nbsp; &nbsp; //validate and authenticate
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $validation = login_db&#40;$phpbb_vars&#91;&quot;username&quot;&#93;, $phpbb_vars&#91;&quot;password&quot;&#93;&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; if&#40;$validation&#91;'status'&#93; == 3 &amp;&amp; $auth-&gt;login&#40;$phpbb_vars&#91;&quot;username&quot;&#93;, $phpbb_vars&#91;&quot;password&quot;&#93;&#41;&#41; $phpbb_result = &quot;SUCCESS&quot;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; 
<br />
&nbsp; &nbsp; &nbsp; &nbsp; return $phpbb_result;
<br />
&nbsp; &nbsp; &#125;
<br />
&nbsp; &nbsp; 
<br />
&nbsp; &nbsp; //user_logout
<br />
&nbsp; &nbsp; public function user_logout&#40;&#41;&#123;
<br />
&nbsp; &nbsp; global $phpbb_root_path, $phpEx, $db, $config, $user, $auth, $cache, $template;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //prezumtia de fail
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $phpbb_result = &quot;FAIL&quot;;
<br />

<br />
&nbsp; &nbsp; &nbsp; &nbsp; //general info
<br />
&nbsp; &nbsp; &nbsp; &nbsp; if&#40;!defined&#40;&quot;IN_LOGIN&quot;&#41;&#41; define&#40;&quot;IN_LOGIN&quot;, true&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; require_once&#40;$phpbb_root_path.'common.php'&#41;;
<br />

<br />
&nbsp; &nbsp; &nbsp; &nbsp; //session management
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $user-&gt;session_begin&#40;&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $auth-&gt;acl&#40;$user-&gt;data&#41;;
<br />

<br />
&nbsp; &nbsp; &nbsp; &nbsp; //destroy session if needed
<br />
&nbsp; &nbsp; &nbsp; &nbsp; if&#40;$user-&gt;data&#91;'user_id'&#93; != ANONYMOUS&#41;&#123;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $user-&gt;session_kill&#40;&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $user-&gt;session_begin&#40;&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $phpbb_result = &quot;SUCCESS&quot;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &#125;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; 
<br />
&nbsp; &nbsp; &nbsp; &nbsp; return $phpbb_result;
<br />
&nbsp; &nbsp; &#125;
<br />
&nbsp; &nbsp; 
<br />
&nbsp; &nbsp; //user_loggedin
<br />
&nbsp; &nbsp; function user_loggedin&#40;&#41;&#123;
<br />
&nbsp; &nbsp; global $phpbb_root_path, $phpEx, $db, $config, $user, $auth, $cache, $template;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //fail presumtion
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $phpbb_result = &quot;FAIL&quot;;
<br />

<br />
&nbsp; &nbsp; &nbsp; &nbsp; //general info
<br />
&nbsp; &nbsp; &nbsp; &nbsp; require_once&#40;$phpbb_root_path.'common.php'&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; 
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //session management
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $user-&gt;session_begin&#40;&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; 
<br />
&nbsp; &nbsp; &nbsp; &nbsp; if&#40;is_array&#40;$user-&gt;data&#41; &amp;&amp; isset&#40;$user-&gt;data&#91;&quot;user_id&quot;&#93;&#41; &amp;&amp; $user-&gt;data&#91;&quot;user_id&quot;&#93; &gt; 0&#41; $phpbb_result = &quot;SUCCESS&quot;;
<br />

<br />
&nbsp; &nbsp; &nbsp; &nbsp; return $phpbb_result;
<br />
&nbsp; &nbsp; &#125;
<br />
&nbsp; &nbsp; 
<br />
&nbsp; &nbsp; //user_add
<br />
&nbsp; &nbsp; public function user_add&#40;$phpbb_vars&#41;&#123;
<br />
&nbsp; &nbsp; global $phpbb_root_path, $phpEx, $db, $config, $user, $auth, $cache, $template;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //fail presumtion
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $phpbb_result = &quot;FAIL&quot;;
<br />

<br />
&nbsp; &nbsp; &nbsp; &nbsp; //general info
<br />
&nbsp; &nbsp; &nbsp; &nbsp; require_once&#40;$phpbb_root_path.'common.php'&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; 
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //session management
<br />
&nbsp; &nbsp; $user-&gt;session_begin&#40;&#41;;
<br />
&nbsp; &nbsp; $auth-&gt;acl&#40;$user-&gt;data&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; 
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //functii user
<br />
&nbsp; &nbsp; require_once&#40;$phpbb_root_path .&quot;includes/functions_user.php&quot;&#41;;
<br />

<br />
&nbsp; &nbsp; &nbsp; &nbsp; //default user info
<br />
&nbsp; &nbsp; $user_row = array&#40;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;username&quot; =&gt; $phpbb_vars&#91;&quot;username&quot;&#93;,
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;user_password&quot; =&gt; md5&#40;$phpbb_vars&#91;&quot;password&quot;&#93;&#41;,
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;user_email&quot; =&gt; $phpbb_vars&#91;&quot;email&quot;&#93;,
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;group_id&quot; =&gt; $phpbb_vars&#91;&quot;group_id&quot;&#93;,
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;user_timezone&quot; =&gt; &quot;2.00&quot;,
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;user_dst&quot; =&gt; 0,
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;user_lang&quot; =&gt; &quot;ro&quot;,
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;user_type&quot; =&gt; &quot;0&quot;,
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;user_actkey&quot; =&gt; &quot;&quot;,
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;user_dateformat&quot; =&gt; &quot;D M d, Y g&#58;i a&quot;,
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;user_style&quot; =&gt; &quot;1&quot;,
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;user_regdate&quot; =&gt; time&#40;&#41;,
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;user_colour&quot; =&gt; &quot;9E8DA7&quot;,
<br />
&nbsp; &nbsp; &#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; 
<br />
&nbsp; &nbsp; //register user
<br />
&nbsp; &nbsp; if&#40;$phpbb_user_id = user_add&#40;$user_row&#41;&#41; $phpbb_result = &quot;SUCCESS&quot;;
<br />

<br />
&nbsp; &nbsp; &nbsp; &nbsp; return $phpbb_result;
<br />
&nbsp; &nbsp; &#125;
<br />
&nbsp; &nbsp; 
<br />
&nbsp; &nbsp; //user_delete
<br />
&nbsp; &nbsp; public function user_delete&#40;$phpbb_vars&#41;&#123;
<br />
&nbsp; &nbsp; global $phpbb_root_path, $phpEx, $db, $config, $user, $auth, $cache, $template;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //fail presumtion
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $phpbb_result = &quot;FAIL&quot;;
<br />

<br />
&nbsp; &nbsp; &nbsp; &nbsp; //general info
<br />
&nbsp; &nbsp; &nbsp; &nbsp; require_once&#40;$phpbb_root_path.'common.php'&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; 
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //session management
<br />
&nbsp; &nbsp; $user-&gt;session_begin&#40;&#41;;
<br />
&nbsp; &nbsp; $auth-&gt;acl&#40;$user-&gt;data&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; 
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //user functions
<br />
&nbsp; &nbsp; require_once&#40;$phpbb_root_path .&quot;includes/functions_user.php&quot;&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; 
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //get user_id if possible
<br />
&nbsp; &nbsp; &nbsp; &nbsp; if&#40;!isset&#40;$phpbb_vars&#91;&quot;user_id&quot;&#93;&#41;&#41;&#123;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $phpbb_vars&#91;&quot;user_id&quot;&#93; = false;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if&#40;!isset&#40;$phpbb_vars&#91;&quot;username&quot;&#93;&#41;&#41; return $phpbb_result;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; user_get_id_name&#40;$phpbb_vars&#91;&quot;user_id&quot;&#93;, $phpbb_vars&#91;&quot;username&quot;&#93;&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if&#40;!isset&#40;$phpbb_vars&#91;&quot;user_id&quot;&#93;&#91;0&#93;&#41;&#41; return $phpbb_result;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $phpbb_vars&#91;&quot;user_id&quot;&#93; = $phpbb_vars&#91;&quot;user_id&quot;&#93;&#91;0&#93;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &#125;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; 
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //delete user &#40;always returns false&#41;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; user_delete&#40;&quot;remove&quot;, $phpbb_vars&#91;&quot;user_id&quot;&#93;&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $phpbb_result = &quot;SUCCESS&quot;;
<br />

<br />
&nbsp; &nbsp; &nbsp; &nbsp; return $phpbb_result;
<br />
&nbsp; &nbsp; &#125;
<br />
&nbsp; &nbsp; 
<br />
&nbsp; &nbsp; //user_update
<br />
&nbsp; &nbsp; public function user_update&#40;$phpbb_vars&#41;&#123;
<br />
&nbsp; &nbsp; global $phpbb_root_path, $phpEx, $db, $config, $user, $auth, $cache, $template;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //fail presumtion
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $phpbb_result = &quot;FAIL&quot;;
<br />

<br />
&nbsp; &nbsp; &nbsp; &nbsp; //general info
<br />
&nbsp; &nbsp; &nbsp; &nbsp; require_once&#40;$phpbb_root_path.'common.php'&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; 
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //session management
<br />
&nbsp; &nbsp; $user-&gt;session_begin&#40;&#41;;
<br />
&nbsp; &nbsp; $auth-&gt;acl&#40;$user-&gt;data&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; 
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //user functions
<br />
&nbsp; &nbsp; require_once&#40;$phpbb_root_path .&quot;includes/functions_user.php&quot;&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; 
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //get user_id if possible
<br />
&nbsp; &nbsp; &nbsp; &nbsp; if&#40;!isset&#40;$phpbb_vars&#91;&quot;user_id&quot;&#93;&#41;&#41;&#123;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $phpbb_vars&#91;&quot;user_id&quot;&#93; = false;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if&#40;!isset&#40;$phpbb_vars&#91;&quot;username&quot;&#93;&#41;&#41; return $phpbb_result;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; user_get_id_name&#40;$phpbb_vars&#91;&quot;user_id&quot;&#93;, $phpbb_vars&#91;&quot;username&quot;&#93;&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if&#40;!isset&#40;$phpbb_vars&#91;&quot;user_id&quot;&#93;&#91;0&#93;&#41;&#41; return $phpbb_result;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $phpbb_vars&#91;&quot;user_id&quot;&#93; = $phpbb_vars&#91;&quot;user_id&quot;&#93;&#91;0&#93;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &#125;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; 
<br />
&nbsp; &nbsp; &nbsp; &nbsp; 
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $this-&gt;get_table_fields&#40;USERS_TABLE&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $ignore_fields = array&#40;&quot;username&quot;, &quot;user_id&quot;&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; 
<br />
&nbsp; &nbsp; &nbsp; &nbsp; if&#40;isset&#40;$phpbb_vars&#91;&quot;user_password&quot;&#93;&#41;&#41; $phpbb_vars&#91;&quot;user_password&quot;&#93; = md5&#40;$phpbb_vars&#91;&quot;user_password&quot;&#93;&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; if&#40;isset&#40;$phpbb_vars&#91;&quot;user_newpasswd&quot;&#93;&#41;&#41; $phpbb_vars&#91;&quot;user_newpasswd&quot;&#93; = md5&#40;$phpbb_vars&#91;&quot;user_newpasswd&quot;&#93;&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $sql = &quot;&quot;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //generate sql
<br />
&nbsp; &nbsp; &nbsp; &nbsp; for&#40;$i = 0;$i &lt;count&gt;table_fields&#91;USERS_TABLE&#93;&#41;; $i++&#41;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if&#40;isset&#40;$phpbb_vars&#91;$this-&gt;table_fields&#91;USERS_TABLE&#93;&#91;$i&#93;&#93;&#41; &amp;&amp; !in_array&#40;$this-&gt;table_fields&#91;USERS_TABLE&#93;&#91;$i&#93;, $ignore_fields&#41;&#41;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $sql .= &quot;, &quot;.$this-&gt;table_fields&#91;USERS_TABLE&#93;&#91;$i&#93;.&quot; = '&quot;.$db-&gt;sql_escape&#40;$phpbb_vars&#91;$this-&gt;table_fields&#91;USERS_TABLE&#93;&#91;$i&#93;&#93;&#41;.&quot;'&quot;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
<br />
&nbsp; &nbsp; &nbsp; &nbsp; if&#40;strlen&#40;$sql&#41; != 0&#41;&#123;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $db-&gt;sql_query&#40;&quot;UPDATE &quot;.USERS_TABLE.&quot; SET &quot;.substr&#40;$sql, 2&#41;&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $phpbb_result = &quot;SUCCESS&quot;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &#125;
<br />

<br />
&nbsp; &nbsp; &nbsp; &nbsp; return $phpbb_result;
<br />
&nbsp; &nbsp; &#125;
<br />
&nbsp; &nbsp; 
<br />
&nbsp; &nbsp; //user_change_password
<br />
&nbsp; &nbsp; public function user_change_password&#40;$phpbb_vars&#41;&#123;
<br />
&nbsp; &nbsp; global $phpbb_root_path, $phpEx, $db, $config, $user, $auth, $cache, $template;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //fail presumtion
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $phpbb_result = &quot;FAIL&quot;;
<br />

<br />
&nbsp; &nbsp; &nbsp; &nbsp; //general info
<br />
&nbsp; &nbsp; &nbsp; &nbsp; require_once&#40;$phpbb_root_path.'common.php'&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; 
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //session management
<br />
&nbsp; &nbsp; $user-&gt;session_begin&#40;&#41;;
<br />
&nbsp; &nbsp; $auth-&gt;acl&#40;$user-&gt;data&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; 
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //user functions
<br />
&nbsp; &nbsp; require_once&#40;$phpbb_root_path .&quot;includes/functions_user.php&quot;&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; 
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //get user_id if possible
<br />
&nbsp; &nbsp; &nbsp; &nbsp; if&#40;!isset&#40;$phpbb_vars&#91;&quot;user_id&quot;&#93;&#41;&#41;&#123;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $phpbb_vars&#91;&quot;user_id&quot;&#93; = false;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if&#40;!isset&#40;$phpbb_vars&#91;&quot;username&quot;&#93;&#41;&#41; return $phpbb_result;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; user_get_id_name&#40;$phpbb_vars&#91;&quot;user_id&quot;&#93;, $phpbb_vars&#91;&quot;username&quot;&#93;&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if&#40;!isset&#40;$phpbb_vars&#91;&quot;user_id&quot;&#93;&#91;0&#93;&#41;&#41; return $phpbb_result;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $phpbb_vars&#91;&quot;user_id&quot;&#93; = $phpbb_vars&#91;&quot;user_id&quot;&#93;&#91;0&#93;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &#125;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; 
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $db-&gt;sql_query&#40;&quot;UPDATE &quot;.USERS_TABLE.&quot; SET user_password = '&quot;.md5&#40;$phpbb_vars&#91;&quot;password&quot;&#93;&#41;.&quot;' WHERE user_id = '&quot;.$phpbb_vars&#91;&quot;user_id&quot;&#93;.&quot;'&quot;&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $phpbb_result = &quot;SUCCESS&quot;;
<br />

<br />
&nbsp; &nbsp; &nbsp; &nbsp; return $phpbb_result;
<br />
&nbsp; &nbsp; &#125;
<br />
&nbsp; &nbsp; 
<br />
&nbsp; &nbsp; private function get_table_fields&#40;$table&#41;&#123;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //if already got table fields once
<br />
&nbsp; &nbsp; &nbsp; &nbsp; if&#40;isset&#40;$this-&gt;table_fields&#91;$table&#93;&#41;&#41; return true;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; 
<br />
&nbsp; &nbsp; global $phpbb_root_path, $phpEx, $db, $config, $user, $auth, $cache, $template;
<br />

<br />
&nbsp; &nbsp; &nbsp; &nbsp; //general info
<br />
&nbsp; &nbsp; &nbsp; &nbsp; require_once&#40;$phpbb_root_path.'common.php'&#41;;
<br />

<br />
&nbsp; &nbsp; &nbsp; &nbsp; //get table fields
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $this-&gt;table_fields&#91;$table&#93; = array&#40;&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; if&#40;!$result = $db-&gt;sql_query&#40;&quot;SHOW FIELDS FROM &quot;.$table&#41;&#41; return false;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; while&#40;$row = $db-&gt;sql_fetchrow&#40;$result&#41;&#41; $this-&gt;table_fields&#91;$table&#93;&#91;&#93; = $row&#91;&quot;Field&quot;&#93;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $db-&gt;sql_freeresult&#40;$result&#41;;
<br />

<br />
&nbsp; &nbsp; &nbsp; &nbsp; return true;
<br />
&nbsp; &nbsp; &#125;
<br />
&#125;
<br />
<script type="text/javascript"><!--   document.write('<\/div>');//--></script>      </td></tr></table>
<br />

<br />

<br />
<span style="font-weight:bold;">example useage</span>
<br />
example.php
<br />

<br />
<table style=" width:90%; align:center; border-spacing:1px; padding:3px; border:0px;" class="bodyline"><td class="helpline"><span class="genmed thick">Code:<script type="text/javascript" src="modules/Forums/includes/select_expand_bbcodes.js"></script><script type="text/javascript"><!--   var id = 'SXBB' + (1000 + Math.floor(Math.random() * 5000));   SXBB[id] = new _SXBB(id);   SXBB[id].T['select'] = 'Select';   SXBB[id].T['expand'] = 'Expand';   SXBB[id].T['contract'] = 'Contract';   SXBB[id].writeCmd();//--></script>      </span></td>   </tr>   <tr>     <td class="code"><script type="text/javascript"><!--   SXBB[id].writeDiv();//--></script>
<br />
/*
<br />
PHPBB Forum manipulation Class
<br />
By Felix Manea &#40;felix.manea@gmail.com&#41;
<br />
www.ever.ro
<br />
Licensed under LGPL
<br />
NOTE&#58; You are required to leave this header intact.
<br />
*/
<br />
//bag clasa
<br />
require_once&#40;&quot;phpbb.class.php&quot;&#41;;
<br />

<br />
$phpbb_action = @$_REQUEST&#91;&quot;op&quot;&#93;;
<br />
$phpbb = new phpbb&#40;&quot;&quot;&#41;;
<br />

<br />
switch&#40;$phpbb_action&#41;&#123;
<br />
&nbsp; &nbsp; case &quot;login&quot;&#58;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //DATE TEST
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $phpbb_vars = array&#40;&quot;username&quot; =&gt; &quot;test&quot;, &quot;password&quot; =&gt; &quot;123123&quot;&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //END DATE TEST
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $phpbb_result = $phpbb-&gt;user_login&#40;$phpbb_vars&#41;;
<br />
&nbsp; &nbsp; break;
<br />
&nbsp; &nbsp; case &quot;logout&quot;&#58;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $phpbb_result = $phpbb-&gt;user_logout&#40;&#41;;
<br />
&nbsp; &nbsp; break;
<br />
&nbsp; &nbsp; case &quot;loggedin&quot;&#58;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $phpbb_result = $phpbb-&gt;user_loggedin&#40;&#41;;
<br />
&nbsp; &nbsp; break;
<br />
&nbsp; &nbsp; case &quot;user_add&quot;&#58;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //DATE TEST
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $phpbb_vars = array&#40;&quot;username&quot; =&gt; &quot;test&quot;, &quot;password&quot; =&gt; &quot;123&quot;, &quot;email&quot; =&gt; &quot;test@test.com&quot;, &quot;group_id&quot; =&gt; &quot;2&quot;&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //END DATE TEST
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $phpbb_result = $phpbb-&gt;user_add&#40;$phpbb_vars&#41;;
<br />
&nbsp; &nbsp; break;
<br />
&nbsp; &nbsp; case &quot;user_delete&quot;&#58;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //DATE TEST
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $phpbb_vars = array&#40;/*&quot;user_id&quot; =&gt; &quot;53&quot;, */&quot;username&quot; =&gt; &quot;test&quot;&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //END DATE TEST
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $phpbb_result = $phpbb-&gt;user_delete&#40;$phpbb_vars&#41;;
<br />
&nbsp; &nbsp; break;
<br />
&nbsp; &nbsp; case &quot;user_update&quot;&#58;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //DATE TEST
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $phpbb_vars = array&#40;/*&quot;user_id&quot; =&gt; &quot;53&quot;, */&quot;username&quot; =&gt; &quot;test&quot;, &quot;user_email&quot; =&gt; &quot;1@2.com&quot;, &quot;user_yim&quot; =&gt; &quot;my_yim&quot;, &quot;user_website&quot; =&gt; &quot;http&#58;//www.ever.ro&quot;&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //END DATE TEST
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $phpbb_result = $phpbb-&gt;user_update&#40;$phpbb_vars&#41;;
<br />
&nbsp; &nbsp; break;
<br />
&nbsp; &nbsp; case &quot;change_password&quot;&#58;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //DATE TEST
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $phpbb_vars = array&#40;/*&quot;user_id&quot; =&gt; &quot;53&quot;, */&quot;username&quot; =&gt; &quot;test&quot;, &quot;password&quot; =&gt; &quot;123123&quot;&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //END DATE TEST
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $phpbb_result = $phpbb-&gt;user_change_password&#40;$phpbb_vars&#41;;
<br />
&nbsp; &nbsp; break;
<br />
&#125;
<br />

<br />

<br />
if&#40;isset&#40;$phpbb_result&#41;&#41; echo $phpbb_result.&quot;&lt;br&gt;&lt;br&gt;&quot;;
<br />
?&gt;
<br />
&lt;a&gt;loggedin&lt;/a&gt;&lt;br&gt;
<br />
&lt;a&gt;login&lt;/a&gt;&lt;br&gt;
<br />
&lt;a&gt;logout&lt;/a&gt;&lt;br&gt;
<br />
&lt;a&gt;user_add&lt;/a&gt;&lt;br&gt;
<br />
&lt;a&gt;user_delete&lt;/a&gt;&lt;br&gt;
<br />
&lt;a&gt;user_update&lt;/a&gt;&lt;br&gt;
<br />
&lt;a&gt;change_password&lt;/a&gt;&lt;br&gt;<script type="text/javascript"><!--   document.write('<\/div>');//--></script>      </td></tr></table>]]></description>
            <author> no_email@example.com (Guardian)</author>
            <guid isPermaLink="false">http://www.code-authors.com/ftopicp-4536.html#4536</guid>
        </item>
        <item>
            <title>News in home links</title>
            <link>http://www.code-authors.com/ftopicp-5034.html#5034</link>
            <description><![CDATA[Interesting... I had tried $sid as a global and it didn't work.  Thank you for this!!!!]]></description>
            <author> no_email@example.com (montego)</author>
            <guid isPermaLink="false">http://www.code-authors.com/ftopicp-5034.html#5034</guid>
        </item>
        <item>
            <title>CA Messenger Alpha testing</title>
            <link>http://www.code-authors.com/ftopicp-5236.html#5236</link>
            <description><![CDATA[It has been WAY too long since I did any further work on this, so I'm hoping to pick it up again soon whan my current project is finished.
<br />
Since I started with this project I have change some of my working methodology; using a custom form writing and input type validation Class and also a CSS driven 'feedback' notifications system for error, information,success messages etc so I want to include all this functionality as part of my general retrofitting it to all other scripts.]]></description>
            <author> no_email@example.com (Guardian)</author>
            <guid isPermaLink="false">http://www.code-authors.com/ftopicp-5236.html#5236</guid>
        </item>
        <item>
            <title>Web development using Ubuntu</title>
            <link>http://www.code-authors.com/ftopicp-4680.html#4680</link>
            <description><![CDATA[Go to this handy site for the Deb package.
<br />
http://www.getdeb.net/app/FileZilla
<br />

<br />
Click the link for your version of Ubuntu, 32/64 bit system
<br />
For Hardy 32bit the link is
<br />
http://www.getdeb.net/release/3298
<br />

<br />
Make sure you have no other Filezilla installed, if you have, remove it using the package manager.
<br />

<br />
Next grab the <span style="font-weight:bold;">filezilla-common</span> package, once downloaded you should be prompted to 'open with' <span style="font-weight:bold;">GDebi Package Installer</span>.
<br />
The Deb should install itself.
<br />

<br />
Next grab the <span style="font-weight:bold;">filezilla</span> package proper and again open with GDebi Package Installer.
<br />

<br />
Set up your menu link to the command <span style="font-weight:bold;">filezilla</span> if it hasn't already been done.
<br />
Lastly, fire up Filezilla, hit Help and About then give yourself a pat on the back <img src="http://www.code-authors.com/modules/Forums/images/smiles/icon_smile.gif" alt="Smile" border="0" />]]></description>
            <author> no_email@example.com (Guardian)</author>
            <guid isPermaLink="false">http://www.code-authors.com/ftopicp-4680.html#4680</guid>
        </item>
        <item>
            <title>Happy New Year brings a great utility</title>
            <link>http://www.code-authors.com/ftopicp-4655.html#4655</link>
            <description><![CDATA[Well I finally got some tunes added and the player (top right of your screen) is only visible when logged in.
<br />
I had a nice module (FlamPlayer) which was really good for this sort of thing but it is a little overkill for my simple needs so I'm now using a simple flash image to load an xml playlist.]]></description>
            <author> no_email@example.com (Guardian)</author>
            <guid isPermaLink="false">http://www.code-authors.com/ftopicp-4655.html#4655</guid>
        </item>
        <item>
            <title>Migrating to Ubuntu</title>
            <link>http://www.code-authors.com/ftopicp-4671.html#4671</link>
            <description><![CDATA[I did something very naughty today.
<br />
I had some stuff I wanted to get of my Windyblows hard drive, so I plugged it in  <img src="http://www.code-authors.com/modules/Forums/images/smiles/icon_rolleyes.gif" alt="Rolling Eyes" border="0" /> 
<br />
Wasn't sure if it would boot without me having to select a bootable drive from BIOS so I unplugged my Ubuntu drive to save the hassle.
<br />
Oh boy, do I wish I hadn't even bothered!!
<br />
Booted up into Windyblows and ....
<br />
Found new hardware.. Hitachi xxx hard drive
<br />
 - erm yes, thats the drive you just booted into
<br />

<br />
CPU Config has changed...
<br />
 - erm, you what? You are having a laugh!
<br />

<br />
New Hardware detected.. USB Keyboard...
<br />
 - well it isn't new, it was plugged in the last time I used Windyblows
<br />

<br />
New hardware detected.. USB Mouse...
<br />
 - cool, I needed a new mouse. Oh wait, it looks just like the last one.
<br />

<br />
Start Menu manager needs to close..
<br />
 - now I just know you are taking the p*ss, you haven't even booted up properly yet
<br />

<br />
I timed it at over 4 minutes to boot.
<br />
When I came to shotdown it said Windows.Search cannot close - didn't even know it was open lol.
<br />
Several minutes to shut down and I wish I had not bothered letting it out for some fresh air.]]></description>
            <author> no_email@example.com (Guardian)</author>
            <guid isPermaLink="false">http://www.code-authors.com/ftopicp-4671.html#4671</guid>
        </item>
        <item>
            <title>I problem with banning</title>
            <link>http://www.code-authors.com/ftopicp-3124.html#3124</link>
            <description><![CDATA[Kev,
<br />
I have not forgotten about you!!
<br />
I'm trying to get work completed on the next version which will include an whitelist so the script doesn't block IP's already blacklisted in the third party blacklists.
<br />
As you know, we have no control over the thrid party blacklists the scripts uses so hopefully this will cure the banning problem.]]></description>
            <author> no_email@example.com (Guardian)</author>
            <guid isPermaLink="false">http://www.code-authors.com/ftopicp-3124.html#3124</guid>
        </item>
        <item>
            <title>User Malfunction...</title>
            <link>http://www.code-authors.com/ftopicp-2771.html#2771</link>
            <description><![CDATA[Wohoo!! code-authors rules.
<br />
Which reminds me, I notcied some kind of php error at the bottom of the forums page trying to read an rss file from hackersdomain.com during my last post. Just thought I should let you know.
<br />

<br />
Some final thoughts are:
<br />
Is this going to be an "add-on" to Sentinel? It should....
<br />
Sentinel is great by itself, but as SpamStopper as an optional add-on, it would kick @$$. (I know you're working on more hooks into Sentinel, which is why I ask)
<br />

<br />
Well, thats really it.
<br />

<br />
Keep up the Great Work!]]></description>
            <author> no_email@example.com (Anonymous)</author>
            <guid isPermaLink="false">http://www.code-authors.com/ftopicp-2771.html#2771</guid>
        </item>
        <item>
            <title>PHP Debugger</title>
            <link>http://www.code-authors.com/ftopicp-5413.html#5413</link>
            <description><![CDATA[Thanks Palbin.
<br />
It'll be another 3 weeks or so before I can unpack my dev box and access the internet without going through an overly protective firewall, so I'll run some tests then. The debugger is getting pretty old now, so I may take the opportunity for a major revision.]]></description>
            <author> no_email@example.com (Guardian)</author>
            <guid isPermaLink="false">http://www.code-authors.com/ftopicp-5413.html#5413</guid>
        </item>
    </channel>
</rss>

