OSDN Git Service

Added karma system and small bug fix. :P
authorKazuki Przyborowski <kazuki.przyborowski@gmail.com>
Sat, 15 Nov 2008 04:19:06 +0000 (04:19 +0000)
committerKazuki Przyborowski <kazuki.przyborowski@gmail.com>
Sat, 15 Nov 2008 04:19:06 +0000 (04:19 +0000)
git-svn-id: svn://svn.code.sf.net/p/intdb/svn/trunk@187 2b68903e-0b30-0410-9a39-a2e4f3c5be39

inc/categories.php
inc/forums.php
inc/groupsetup.php
inc/members.php
inc/pm.php
inc/replys.php
inc/topics.php
inc/versioninfo.php
setup/mkconfig.php
setup/mktable.php

index c9ac84b..09044c9 100644 (file)
@@ -11,7 +11,7 @@
     Copyright 2004-2008 Cool Dude 2k - http://idb.berlios.de/
     Copyright 2004-2008 Game Maker 2k - http://intdb.sourceforge.net/
 
-    $FileInfo: categories.php - Last Update: 11/14/2008 SVN 186 - Author: cooldude2k $
+    $FileInfo: categories.php - Last Update: 11/14/2008 SVN 187 - Author: cooldude2k $
 */
 $File3Name = basename($_SERVER['SCRIPT_NAME']);
 if ($File3Name=="categories.php"||$File3Name=="/categories.php") {
@@ -33,9 +33,13 @@ $SubShowForums=mysql_result($preresult,0,"SubShowForums");
 $CategoryDescription=mysql_result($preresult,0,"Description");
 $CategoryType = strtolower($CategoryType); $SubShowForums = strtolower($SubShowForums);
 $CategoryPostCountView=mysql_result($preresult,0,"PostCountView");
+$CategoryKarmaCountView=mysql_result($preresult,0,"KarmaCountView");
 if($MyPostCountChk==null) { $MyPostCountChk = 0; }
+if($MyKarmaCount==null) { $MyKarmaCount = 0; }
 if($GroupInfo['HasAdminCP']!="yes"||$GroupInfo['HasModCP']!="yes") {
 if($CategoryPostCountView!=0&&$MyPostCountChk<$CategoryPostCountView) {
+redirect("location",$basedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false)); }
+if($CategoryKarmaCountView!=0&&$MyKarmaCount<$CategoryKarmaCountView) {
 redirect("location",$basedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false)); } }
 if(!isset($CatPermissionInfo['CanViewCategory'][$CategoryID])) {
        $CatPermissionInfo['CanViewCategory'][$CategoryID] = "no"; }
index 02cb314..466c7a7 100644 (file)
@@ -11,7 +11,7 @@
     Copyright 2004-2008 Cool Dude 2k - http://idb.berlios.de/
     Copyright 2004-2008 Game Maker 2k - http://intdb.sourceforge.net/
 
-    $FileInfo: forums.php - Last Update: 11/14/2008 SVN 186 - Author: cooldude2k $
+    $FileInfo: forums.php - Last Update: 11/14/2008 SVN 187 - Author: cooldude2k $
 */
 $File3Name = basename($_SERVER['SCRIPT_NAME']);
 if ($File3Name=="forums.php"||$File3Name=="/forums.php") {
@@ -30,9 +30,13 @@ $SubShowForums=mysql_result($preresult,$prei,"SubShowForums");
 $CategoryDescription=mysql_result($preresult,$prei,"Description");
 $CategoryType = strtolower($CategoryType); $SubShowForums = strtolower($SubShowForums);
 $CategoryPostCountView=mysql_result($preresult,0,"PostCountView");
+$CategoryKarmaCountView=mysql_result($preresult,0,"KarmaCountView");
 if($MyPostCountChk==null) { $MyPostCountChk = 0; }
+if($MyKarmaCount==null) { $MyKarmaCount = 0; }
 if($GroupInfo['HasAdminCP']!="yes"||$GroupInfo['HasModCP']!="yes") {
 if($CategoryPostCountView!=0&&$MyPostCountChk<$CategoryPostCountView) {
+redirect("location",$basedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false)); }
+if($CategoryKarmaCountView!=0&&$MyKarmaCount<$CategoryKarmaCountView) {
 redirect("location",$basedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false)); } }
 if(isset($CatPermissionInfo['CanViewCategory'][$CategoryID])&&
        $CatPermissionInfo['CanViewCategory'][$CategoryID]=="yes") {
index 18cb815..ca53b51 100644 (file)
     Copyright 2004-2008 Cool Dude 2k - http://idb.berlios.de/
     Copyright 2004-2008 Game Maker 2k - http://intdb.sourceforge.net/
 
-    $FileInfo: groupsetup.php - Last Update: 11/14/2008 SVN 186 - Author: cooldude2k $
+    $FileInfo: groupsetup.php - Last Update: 11/14/2008 SVN 187 - Author: cooldude2k $
 */
 $File3Name = basename($_SERVER['SCRIPT_NAME']);
 if ($File3Name=="groupsetup.php"||$File3Name=="/groupsetup.php") {
        require('index.php');
        exit(); }
 // Check to make sure MemberInfo is right
-$MyPostCountChk = null;
+$MyPostCountChk = null; $MyKarmaCount = null;
 if(!isset($_SESSION['UserID'])) { $_SESSION['UserID'] = 0; }
 if($_SESSION['UserID']!=0&&$_SESSION['UserID']!=null) { $BanError = null;
 $kgbquerychkusr = query("SELECT * FROM `".$Settings['sqltable']."members` WHERE `Name`='%s' AND `Password`='%s' AND `id`=%i LIMIT 1", array($_SESSION['MemberName'],$_SESSION['UserPass'],$_SESSION['UserID'])); 
@@ -32,6 +32,8 @@ $ChkUsrPass=mysql_result($resultchkusr,0,"Password");
 $ChkUsrTimeZone=mysql_result($resultchkusr,0,"TimeZone");
 $ChkUsrTheme=mysql_result($resultchkusr,0,"UseTheme");
 $MyPostCountChk=mysql_result($resultchkusr,0,"PostCount");
+$MyKarmaCount=mysql_result($resultchkusr,0,"Karma");
+$MyKarmaUpdate=mysql_result($resultchkusr,0,"KarmaUpdate");
 $MyRepliesPerPage=mysql_result($resultchkusr,0,"RepliesPerPage");
 $Settings['max_posts'] = $MyRepliesPerPage;
 $MyTopicsPerPage=mysql_result($resultchkusr,0,"TopicsPerPage");
@@ -121,6 +123,16 @@ $GroupInfo['PromoteTo']=mysql_result($gruresult,0,"PromoteTo");
 $GroupInfo['PromotePosts']=mysql_result($gruresult,0,"PromotePosts");
 if(!is_numeric($GroupInfo['PromotePosts'])) { 
        $GroupInfo['PromotePosts'] = 0; $GroupInfo['PromoteTo'] = 0; }
+$GroupInfo['PromoteKarma']=mysql_result($gruresult,0,"PromoteKarma");
+if(!is_numeric($GroupInfo['PromoteKarma'])) { 
+       $GroupInfo['PromoteKarma'] = 0; $GroupInfo['PromoteTo'] = 0; }
+//Update karma and group upgrade on post count or karma count.
+if($_SESSION['UserID']!=0) {
+$NewKarmaUpdate = GMTimeGet("Ymd",$_SESSION['UserTimeZone'],0,$_SESSION['UserDST']);
+if($MyKarmaUpdate<$NewKarmaUpdate&&$MyPostCountChk>0) { 
+       $MyKarmaCount = $MyKarmaCount + 1;
+       $querykarmaup = query("UPDATE `".$Settings['sqltable']."members` SET `Karma`=%i,`KarmaUpdate`=%i WHERE `id`=%i", array($MyKarmaCount,$NewKarmaUpdate,$_SESSION['UserID']));
+       mysql_query($querykarmaup); }
 if($GroupInfo['PromoteTo']!=0&&$MyPostCountChk>=$GroupInfo['PromotePosts']) {
        $sql_group_check = mysql_query(query("SELECT * FROM `".$Settings['sqltable']."groups` WHERE `id`=%i LIMIT 1", array($GroupInfo['PromoteTo'])));
        $group_check = mysql_num_rows($sql_group_check);
@@ -128,6 +140,13 @@ if($GroupInfo['PromoteTo']!=0&&$MyPostCountChk>=$GroupInfo['PromotePosts']) {
        if($group_check > 0) {
        $queryupgrade = query("UPDATE `".$Settings['sqltable']."members` SET `GroupID`=%i WHERE `id`=%i", array($GroupInfo['PromoteTo'],$_SESSION['UserID']));
        mysql_query($queryupgrade); } }
+if($GroupInfo['PromotePosts']==0&&$GroupInfo['PromoteTo']!=0&&$MyKarmaCount>=$GroupInfo['PromoteKarma']) {
+       $sql_group_check = mysql_query(query("SELECT * FROM `".$Settings['sqltable']."groups` WHERE `id`=%i LIMIT 1", array($GroupInfo['PromoteTo'])));
+       $group_check = mysql_num_rows($sql_group_check);
+       @mysql_free_result($sql_group_check);
+       if($group_check > 0) {
+       $queryupgrade = query("UPDATE `".$Settings['sqltable']."members` SET `GroupID`=%i WHERE `id`=%i", array($GroupInfo['PromoteTo'],$_SESSION['UserID']));
+       mysql_query($queryupgrade); } } }
 $GroupInfo['HasModCP']=mysql_result($gruresult,0,"HasModCP");
 if($GroupInfo['HasModCP']!="yes"&&$GroupInfo['HasModCP']!="no") {
        $GroupInfo['HasModCP'] = "no"; }
index c1bdeeb..ff1cb4d 100644 (file)
@@ -11,7 +11,7 @@
     Copyright 2004-2008 Cool Dude 2k - http://idb.berlios.de/
     Copyright 2004-2008 Game Maker 2k - http://intdb.sourceforge.net/
 
-    $FileInfo: members.php - Last Update: 11/14/2008 SVN 186 - Author: cooldude2k $
+    $FileInfo: members.php - Last Update: 11/14/2008 SVN 187 - Author: cooldude2k $
 */
 $File3Name = basename($_SERVER['SCRIPT_NAME']);
 if ($File3Name=="members.php"||$File3Name=="/members.php") {
@@ -38,7 +38,9 @@ if($_GET['orderby']=="id") { $orderlist = "order by `ID`"; }
 if($_GET['orderby']=="name") { $orderlist = "order by `Name`"; }
 if($_GET['orderby']=="joined") { $orderlist = "order by `Joined`"; }
 if($_GET['orderby']=="active") { $orderlist = "order by `LastActive`"; }
+if($_GET['orderby']=="post") { $orderlist = "order by `PostCount`"; }
 if($_GET['orderby']=="posts") { $orderlist = "order by `PostCount`"; }
+if($_GET['orderby']=="karma") { $orderlist = "order by `Karma`"; }
 if($_GET['orderby']=="offset") { $orderlist = "order by `TimeZone`"; } }
 if($_GET['ordertype']==null) { 
        if($_GET['sorttype']!=null) { 
@@ -152,7 +154,8 @@ echo $pstring;
 <th class="TableRow2" style="width: 5%;">ID</th>
 <th class="TableRow2" style="width: 28%;">Name</th>
 <th class="TableRow2" style="width: 10%;">Group</th>
-<th class="TableRow2" style="width: 10%;">Posts</th>
+<th class="TableRow2" style="width: 5%;">Posts</th>
+<th class="TableRow2" style="width: 5%;">Karma</th>
 <th class="TableRow2" style="width: 20%;">Joined</th>
 <th class="TableRow2" style="width: 20%;">Last Active</th>
 <th class="TableRow2" style="width: 7%;">Website</th>
@@ -173,6 +176,7 @@ $MemList['LastActive']=GMTimeChange("F j Y, g:i a",$MemList['LastActive'],$_SESS
 $MemList['Website']=mysql_result($result,$i,"Website");
 $MemList['Gender']=mysql_result($result,$i,"Gender");
 $MemList['PostCount']=mysql_result($result,$i,"PostCount");
+$MemList['Karma']=mysql_result($result,$i,"Karma");
 $MemList['TimeZone']=mysql_result($result,$i,"TimeZone");
 $MemList['DST']=mysql_result($result,$i,"DST");
 $MemList['IP']=mysql_result($result,$i,"IP");
@@ -188,6 +192,7 @@ if($MemList['Group']!=$Settings['GuestGroup']) {
 <td class="TableRow3">&nbsp;<a href="<?php echo url_maker($exfile['member'],$Settings['file_ext'],"act=view&id=".$MemList['ID'],$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); ?>"><?php echo $MemList['Name']; ?></a></td>
 <td class="TableRow3" style="text-align: center;"><a href="<?php echo url_maker($exfile['member'],$Settings['file_ext'],"act=list&gid=".$MemList['GroupID']."&page=".$_GET['page'],$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); ?>"><?php echo $MemList['Group']; ?></a></td>
 <td class="TableRow3" style="text-align: center;"><?php echo $MemList['PostCount']; ?></td>
+<td class="TableRow3" style="text-align: center;"><?php echo $MemList['Karma']; ?></td>
 <td class="TableRow3" style="text-align: center;"><?php echo $MemList['Joined']; ?></td>
 <td class="TableRow3" style="text-align: center;"><?php echo $MemList['LastActive']; ?></td>
 <td class="TableRow3" style="text-align: center;"><a href="<?php echo $MemList['Website']; ?>" onclick="window.open(this.href);return false;">Website</a></td>
@@ -225,6 +230,7 @@ $ViewMem['LastActive']=GMTimeChange("M j Y, g:i a",$ViewMem['LastActive'],$_SESS
 $ViewMem['Website']=mysql_result($result,$i,"Website");
 $ViewMem['Gender']=mysql_result($result,$i,"Gender");
 $ViewMem['PostCount']=mysql_result($result,$i,"PostCount");
+$ViewMem['Karma']=mysql_result($result,$i,"Karma");
 $ViewMem['TimeZone']=mysql_result($result,$i,"TimeZone");
 $ViewMem['DST']=mysql_result($result,$i,"DST");
 $ViewMem['IP']=mysql_result($result,$i,"IP");
@@ -289,6 +295,7 @@ Title: <?php echo $ViewMem['Title']; ?></div>
 &nbsp;User Time: <?php echo GMTimeGet("M j Y, g:i a",$ViewMem['TimeZone'],0,$ViewMem['DST']); ?><br />
 &nbsp;User Website: <a href="<?php echo $ViewMem['Website']; ?>" onclick="window.open(this.href);return false;">Website</a><br />
 &nbsp;Post Count: <?php echo $ViewMem['PostCount']; ?><br />
+&nbsp;Karma: <?php echo $ViewMem['Karma']; ?><br />
 &nbsp;Interests: <?php echo $ViewMem['Interests']; ?><br />
 </td>
 </tr>
@@ -837,7 +844,7 @@ if(!is_numeric($_POST['MinOffSet'])) { $_POST['MinOffSet'] = "00"; }
 if($_POST['MinOffSet']>59) { $_POST['MinOffSet'] = "59"; }
 if($_POST['MinOffSet']<0) { $_POST['MinOffSet'] = "00"; }
 $_POST['YourOffSet'] = $_POST['YourOffSet'].":".$_POST['MinOffSet'];
-$query = query("INSERT INTO `".$Settings['sqltable']."members` VALUES (".$yourid.",'%s','%s','%s','%s','%s','%s',%i,'%s','%s',%i,%i,'0','0','0','0','%s','%s','%s','%s','%s','%s',%i,10,10,10,'%s','%s','%s','%s','%s')", array($Name,$NewPassword,"iDBH",$_POST['Email'],$yourgroup,$ValidateStats,"0",$_POST['Interests'],$_POST['Title'],$_POST['Joined'],$_POST['LastActive'],$NewSignature,'Your Notes',$Avatar,"100x100",$Website,$_POST['YourGender'],$_POST['PostCount'],$_POST['YourOffSet'],$_POST['DST'],$Settings['DefaultTheme'],$_POST['UserIP'],$HashSalt));
+$query = query("INSERT INTO `".$Settings['sqltable']."members` VALUES (".$yourid.",'%s','%s','%s','%s','%s','%s',%i,'%s','%s',%i,%i,'0','0','0','0','%s','%s','%s','%s','%s','%s',%i,0,0,10,10,10,'%s','%s','%s','%s','%s')", array($Name,$NewPassword,"iDBH",$_POST['Email'],$yourgroup,$ValidateStats,"0",$_POST['Interests'],$_POST['Title'],$_POST['Joined'],$_POST['LastActive'],$NewSignature,'Your Notes',$Avatar,"100x100",$Website,$_POST['YourGender'],$_POST['PostCount'],$_POST['YourOffSet'],$_POST['DST'],$Settings['DefaultTheme'],$_POST['UserIP'],$HashSalt));
 mysql_query($query);
 $querylogr = query("SELECT * FROM `".$Settings['sqltable']."members` WHERE `Name`='%s' AND `Password`='%s' LIMIT 1", array($Name,$NewPassword));
 $resultlogr=mysql_query($querylogr);
index e41304e..dc9abda 100644 (file)
@@ -11,7 +11,7 @@
     Copyright 2004-2008 Cool Dude 2k - http://idb.berlios.de/
     Copyright 2004-2008 Game Maker 2k - http://intdb.sourceforge.net/
 
-    $FileInfo: pm.php - Last Update: 10/11/2008 SVN 175 - Author: cooldude2k $
+    $FileInfo: pm.php - Last Update: 11/14/2008 SVN 187 - Author: cooldude2k $
 */
 $File3Name = basename($_SERVER['SCRIPT_NAME']);
 if ($File3Name=="pm.php"||$File3Name=="/pm.php") {
@@ -373,6 +373,7 @@ $AvatarSize1=explode("x", $User1AvatarSize);
 $AvatarSize1W=$AvatarSize1[0]; $AvatarSize1H=$AvatarSize1[1];
 $User1Website=mysql_result($reresult,$rei,"Website");
 $User1PostCount=mysql_result($reresult,$rei,"PostCount");
+$User1Karma=mysql_result($reresult,$rei,"Karma");
 $User1IP=mysql_result($reresult,$rei,"IP");
 ++$rei; } @mysql_free_result($reresult);
 ++$is; } @mysql_free_result($result);
@@ -425,6 +426,7 @@ if($User1ID!="-1") { echo $User1ID; }
 if($User1ID=="-1") { echo 0; }
 ?><br />
 Posts: <?php echo $User1PostCount; ?><br />
+Karma: <?php echo $User1Karma; ?><br />
 Joined: <?php echo $User1Joined; ?><br /><br />
 </td>
 <td class="TableRow3" style="vertical-align: middle;">
index 49aa124..77222f3 100644 (file)
@@ -11,7 +11,7 @@
     Copyright 2004-2008 Cool Dude 2k - http://idb.berlios.de/
     Copyright 2004-2008 Game Maker 2k - http://intdb.sourceforge.net/
 
-    $FileInfo: replys.php - Last Update: 11/14/2008 SVN 186 - Author: cooldude2k $
+    $FileInfo: replys.php - Last Update: 11/14/2008 SVN 187 - Author: cooldude2k $
 */
 $File3Name = basename($_SERVER['SCRIPT_NAME']);
 if ($File3Name=="replys.php"||$File3Name=="/replys.php") {
@@ -42,18 +42,23 @@ $ViewTimes=mysql_result($preresult,0,"NumViews");
 if($GroupInfo['HasAdminCP']!="yes"||$GroupInfo['HasModCP']!="yes") {
 $forumcheck = query("SELECT * FROM `".$Settings['sqltable']."forums` WHERE `id`=%i  LIMIT 1", array($TopicForumID));
 $fmckresult=mysql_query($forumcheck);
-$fmcknum=mysql_num_rows($fmckresult);
-$ForumPostCountView=mysql_result($fmcknum,0,"PostCountView");
-@mysql_free_result($fmcknum);
+$ForumPostCountView=mysql_result($fmckresult,0,"PostCountView");
+$ForumKarmaCountView=mysql_result($fmckresult,0,"KarmaCountView");
+@mysql_free_result($fmckresult);
 $catcheck = query("SELECT * FROM `".$Settings['sqltable']."categories` WHERE `id`=%i  LIMIT 1", array($TopicCatID));
 $catresult=mysql_query($catcheck);
-$catnum=mysql_num_rows($catresult);
-$CategoryPostCountView=mysql_result($catnum,0,"PostCountView");
-@mysql_free_result($catnum);
+$CategoryPostCountView=mysql_result($catresult,0,"PostCountView");
+$CategoryKarmaCountView=mysql_result($catresult,0,"KarmaCountView");
+@mysql_free_result($catresult);
 if($MyPostCountChk==null) { $MyPostCountChk = 0; }
+if($MyKarmaCount==null) { $MyKarmaCount = 0; }
 if($ForumPostCountView!=0&&$MyPostCountChk<$ForumPostCountView) {
 redirect("location",$basedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false)); }
 if($CategoryPostCountView!=0&&$MyPostCountChk<$CategoryPostCountView) {
+redirect("location",$basedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false)); }
+if($ForumKarmaCountView!=0&&$MyKarmaCount<$ForumKarmaCountView) {
+redirect("location",$basedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false)); }
+if($CategoryKarmaCountView!=0&&$MyKarmaCount<$CategoryKarmaCountView) {
 redirect("location",$basedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false)); } }
 if(!isset($CatPermissionInfo['CanViewCategory'][$TopicCatID])) {
        $CatPermissionInfo['CanViewCategory'][$TopicCatID] = "no"; }
@@ -219,6 +224,7 @@ $AvatarSize1=explode("x", $User1AvatarSize);
 $AvatarSize1W=$AvatarSize1[0]; $AvatarSize1H=$AvatarSize1[1];
 $User1Website=mysql_result($reresult,$rei,"Website");
 $User1PostCount=mysql_result($reresult,$rei,"PostCount");
+$User1Karma=mysql_result($reresult,$rei,"Karma");
 $User1IP=mysql_result($reresult,$rei,"IP");
 ++$rei; } @mysql_free_result($reresult);
 if($User1Name=="Guest") { $User1Name=$GuestName;
@@ -291,6 +297,7 @@ if($User1ID!="-1") { echo $User1ID; }
 if($User1ID=="-1") { echo 0; }
 ?><br />
 Posts: <?php echo $User1PostCount; ?><br />
+Karma: <?php echo $User1Karma; ?><br />
 Joined: <?php echo $User1Joined; ?><br /><br />
 </td>
 <td class="TableRow3" style="vertical-align: middle;">
@@ -406,6 +413,10 @@ if($GroupInfo['HasAdminCP']!="yes"||$GroupInfo['HasModCP']!="yes") {
 if($ForumPostCountView!=0&&$MyPostCountChk<$ForumPostCountView) {
 redirect("location",$basedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false)); }
 if($CategoryPostCountView!=0&&$MyPostCountChk<$CategoryPostCountView) {
+redirect("location",$basedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false)); }
+if($ForumKarmaCountView!=0&&$MyKarmaCount<$ForumKarmaCountView) {
+redirect("location",$basedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false)); }
+if($CategoryKarmaCountView!=0&&$MyKarmaCount<$CategoryKarmaCountView) {
 redirect("location",$basedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false)); } }
 if($PermissionInfo['CanMakeReplys'][$TopicForumID]=="no") { redirect("location",$basedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false));
 ob_clean(); @header("Content-Type: text/plain; charset=".$Settings['charset']);
@@ -453,18 +464,22 @@ if($GroupInfo['HasAdminCP']!="yes"||$GroupInfo['HasModCP']!="yes") {
 if($_GET['post']!=null) {
 $rforumcheck = query("SELECT * FROM `".$Settings['sqltable']."forums` WHERE `id`=%i  LIMIT 1", array($QuoteReplyFID));
 $rfmckresult=mysql_query($rforumcheck);
-$rfmcknum=mysql_num_rows($rfmckresult);
-$rForumPostCountView=mysql_result($rfmcknum,0,"PostCountView");
-@mysql_free_result($rfmcknum);
+$rForumPostCountView=mysql_result($rfmckresult,0,"PostCountView");
+$rForumKarmaCountView=mysql_result($rfmckresult,0,"KarmaCountView");
+@mysql_free_result($rfmckresult);
 $rcatcheck = query("SELECT * FROM `".$Settings['sqltable']."categories` WHERE `id`=%i  LIMIT 1", array($QuoteReplyCID));
 $rcatresult=mysql_query($rcatcheck);
-$rcatnum=mysql_num_rows($rcatresult);
-$rCategoryPostCountView=mysql_result($catnum,0,"PostCountView");
-@mysql_free_result($rcatnum);
+$rCategoryPostCountView=mysql_result($rcatresult,0,"PostCountView");
+$rCategoryKarmaCountView=mysql_result($rcatresult,0,"KarmaCountView");
+@mysql_free_result($rcatresult);
 if($MyPostCountChk==null) { $MyPostCountChk = 0; }
 if($rForumPostCountView!=0&&$MyPostCountChk<$rForumPostCountView) {
 $QuoteReply = null; $QuoteDescription = null; }
 if($rCategoryPostCountView!=0&&$MyPostCountChk<$rCategoryPostCountView) {
+$QuoteReply = null; $QuoteDescription = null; }
+if($rForumKarmaCountView!=0&&$MyKarmaCount<$rForumKarmaCountView) {
+$QuoteReply = null; $QuoteDescription = null; }
+if($rCategoryKarmaCountView!=0&&$MyKarmaCount<$rCategoryKarmaCountView) {
 $QuoteReply = null; $QuoteDescription = null; } } }
 if($_GET['post']==null) { $QuoteReply = null; $QuoteDescription = null; }
 ?>
@@ -547,6 +562,10 @@ if($GroupInfo['HasAdminCP']!="yes"||$GroupInfo['HasModCP']!="yes") {
 if($ForumPostCountView!=0&&$MyPostCountChk<$ForumPostCountView) {
 redirect("location",$basedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false)); }
 if($CategoryPostCountView!=0&&$MyPostCountChk<$CategoryPostCountView) {
+redirect("location",$basedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false)); }
+if($ForumKarmaCountView!=0&&$MyKarmaCount<$ForumKarmaCountView) {
+redirect("location",$basedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false)); }
+if($CategoryKarmaCountView!=0&&$MyKarmaCount<$CategoryKarmaCountView) {
 redirect("location",$basedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false)); } }
 if($PermissionInfo['CanMakeReplys'][$TopicForumID]=="no") { redirect("location",$basedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false));
 ob_clean(); @header("Content-Type: text/plain; charset=".$Settings['charset']);
index 7ee9e17..ec49290 100644 (file)
@@ -11,7 +11,7 @@
     Copyright 2004-2008 Cool Dude 2k - http://idb.berlios.de/
     Copyright 2004-2008 Game Maker 2k - http://intdb.sourceforge.net/
 
-    $FileInfo: topics.php - Last Update: 11/14/2008 SVN 186 - Author: cooldude2k $
+    $FileInfo: topics.php - Last Update: 11/14/2008 SVN 187 - Author: cooldude2k $
 */
 $File3Name = basename($_SERVER['SCRIPT_NAME']);
 if ($File3Name=="topics.php"||$File3Name=="/topics.php") {
@@ -38,6 +38,7 @@ $NumberTopics=mysql_result($preresult,0,"NumTopics");
 $PostCountAdd=mysql_result($preresult,0,"PostCountAdd");
 $CanHaveTopics=mysql_result($preresult,0,"CanHaveTopics");
 $ForumPostCountView=mysql_result($preresult,0,"PostCountView");
+$ForumKarmaCountView=mysql_result($preresult,0,"KarmaCountView");
 @mysql_free_result($preresult);
 $ForumType = strtolower($ForumType); $CanHaveTopics = strtolower($CanHaveTopics);
 if($CanHaveTopics=="yes"&&$ForumType=="subforum") { 
@@ -46,13 +47,18 @@ if($_GET['act']=="create"||$_GET['act']=="maketopic"||
 if($GroupInfo['HasAdminCP']!="yes"||$GroupInfo['HasModCP']!="yes") {
 $catcheck = query("SELECT * FROM `".$Settings['sqltable']."categories` WHERE `id`=%i  LIMIT 1", array($ForumCatID));
 $catresult=mysql_query($catcheck);
-$catnum=mysql_num_rows($catresult);
-$CategoryPostCountView=mysql_result($catnum,0,"PostCountView");
-@mysql_free_result($catnum);
+$CategoryPostCountView=mysql_result($catresult,0,"PostCountView");
+$CategoryKarmaCountView=mysql_result($catresult,0,"KarmaCountView");
+@mysql_free_result($catresult);
 if($MyPostCountChk==null) { $MyPostCountChk = 0; }
+if($MyKarmaCount==null) { $MyKarmaCount = 0; }
 if($ForumPostCountView!=0&&$MyPostCountChk<$ForumPostCountView) {
 redirect("location",$basedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false)); }
 if($CategoryPostCountView!=0&&$MyPostCountChk<$CategoryPostCountView) {
+redirect("location",$basedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false)); }
+if($ForumKarmaCountView!=0&&$MyKarmaCount<$ForumKarmaCountView) {
+redirect("location",$basedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false)); }
+if($CategoryKarmaCountView!=0&&$MyKarmaCount<$CategoryKarmaCountView) {
 redirect("location",$basedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false)); } }
 if(!isset($CatPermissionInfo['CanViewCategory'][$ForumCatID])) {
        $CatPermissionInfo['CanViewCategory'][$ForumCatID] = "no"; }
@@ -305,6 +311,10 @@ if($GroupInfo['HasAdminCP']!="yes"||$GroupInfo['HasModCP']!="yes") {
 if($ForumPostCountView!=0&&$MyPostCountChk<$ForumPostCountView) {
 redirect("location",$basedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false)); }
 if($CategoryPostCountView!=0&&$MyPostCountChk<$CategoryPostCountView) {
+redirect("location",$basedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false)); }
+if($ForumKarmaCountView!=0&&$MyKarmaCount<$ForumKarmaCountView) {
+redirect("location",$basedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false)); }
+if($CategoryKarmaCountView!=0&&$MyKarmaCount<$CategoryKarmaCountView) {
 redirect("location",$basedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false)); } }
 if($PermissionInfo['CanMakeTopics'][$ForumID]=="no"||$CanHaveTopics=="no") { redirect("location",$basedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false));
 ob_clean(); @header("Content-Type: text/plain; charset=".$Settings['charset']);
index 83a89c4..79d7a64 100644 (file)
@@ -11,7 +11,7 @@
     Copyright 2004-2008 Cool Dude 2k - http://idb.berlios.de/
     Copyright 2004-2008 Game Maker 2k - http://intdb.sourceforge.net/
 
-    $FileInfo: versioninfo.php - Last Update: 11/14/2008 SVN 186 - Author: cooldude2k $
+    $FileInfo: versioninfo.php - Last Update: 11/14/2008 SVN 187 - Author: cooldude2k $
 */
 $File3Name = basename($_SERVER['SCRIPT_NAME']);
 if ($File3Name=="versioninfo.php"||$File3Name=="/versioninfo.php") {
@@ -27,7 +27,7 @@ function version_info($proname,$subver,$ver,$supver,$reltype,$svnver,$showsvn) {
        return $return_var; }
 // Version number and date stuff. :P
 $VER1[0] = 0; $VER1[1] = 2; $VER1[2] = 3; $VERFull[1] = $VER1[0].".".$VER1[1].".".$VER1[2];
-$VER2[0] = "Pre-Alpha"; $VER2[1] = "PA"; $VER2[2] = "SVN"; $SubVerN = 186; $RName = "iDB"; $SFName = "IntDB";
+$VER2[0] = "Pre-Alpha"; $VER2[1] = "PA"; $VER2[2] = "SVN"; $SubVerN = 187; $RName = "iDB"; $SFName = "IntDB";
 $SVNDay[0] = 11; $SVNDay[1] = 14; $SVNDay[2] = 2008; $SVNDay[3] = $SVNDay[0]."/".$SVNDay[1]."/".$SVNDay[2];
 $VerInfo['iDB_Ver'] = version_info($RName,$VER1[0],$VER1[1],$VER1[2],$VER2[1],$SubVerN,false);
 $VerInfo['iDB_Ver_SVN'] = version_info($RName,$VER1[0],$VER1[1],$VER1[2],$VER2[1],$SubVerN,true);
index bdfb81a..403dddf 100644 (file)
@@ -12,7 +12,7 @@
     Copyright 2004-2008 Game Maker 2k - http://intdb.sourceforge.net/
     iDB Installer made by Game Maker 2k - http://idb.berlios.net/
 
-    $FileInfo: mkconfig.php - Last Update: 11/14/2008 SVN 186 - Author: cooldude2k $
+    $FileInfo: mkconfig.php - Last Update: 11/14/2008 SVN 187 - Author: cooldude2k $
 */
 $File3Name = basename($_SERVER['SCRIPT_NAME']);
 if ($File3Name=="mkconfig.php"||$File3Name=="/mkconfig.php") {
@@ -94,7 +94,7 @@ require($SetupDir['setup'].'mktable.php');
 /*
 $query = query("INSERT INTO `".$_POST['tableprefix']."tagboard` VALUES (1,-1,'".$iDB_Author."',".$YourDate.",'Welcome to Your New Tag Board. ^_^','127.0.0.1'), array(null)); 
 */
-$query = query("INSERT INTO `".$_POST['tableprefix']."categories` VALUES (1,1,'Main','yes','category','yes',0,0,'The Main Category.')", array(null));
+$query = query("INSERT INTO `".$_POST['tableprefix']."categories` VALUES (1,1,'Main','yes','category','yes',0,0,0,'The Main Category.')", array(null));
 mysql_query($query);
 if(!is_numeric($_POST['YourOffSet'])) { $_POST['YourOffSet'] = "0"; }
 if($_POST['YourOffSet']>12) { $_POST['YourOffSet'] = "12"; }
@@ -117,7 +117,7 @@ $EventYear = GMTimeChange("Y",$YourDate,0,0,"off");
 $EventYearEnd = GMTimeChange("Y",$YourDateEnd,0,0,"off");
 $query = query("INSERT INTO `".$_POST['tableprefix']."events` VALUES (1, -1, '".$iDB_Author."', 'Opening', 'This is the day the Board was made. ^_^', %i, %i, %i, %i, %i, %i, %i, %i)", array($YourDate,$YourDateEnd,$EventMonth,$EventMonthEnd,$EventDay,$EventDayEnd,$EventYear,$EventYearEnd));
 mysql_query($query);
-$query = query("INSERT INTO `".$_POST['tableprefix']."forums` VALUES (1,1,1,'Test/Spam','yes','forum',0,'http://',0,0,'A Test Board.','off',0,'yes',1,1)", array(null));
+$query = query("INSERT INTO `".$_POST['tableprefix']."forums` VALUES (1,1,1,'Test/Spam','yes','forum',0,'http://',0,0,0,'A Test Board.','off',0,'yes',1,1)", array(null));
 mysql_query($query);
 $query = query("INSERT INTO `".$_POST['tableprefix']."topics` VALUES (1,1,1,-1,'".$iDB_Author."',%i,%i,'Welcome','Install was successful',0,0,1,1)", array($YourDate,$YourDate));
 mysql_query($query);
@@ -142,9 +142,9 @@ if($csrand==3) { $gpass .= chr(rand(97,122)); }
 ++$i; } $GuestPassword = b64e_hmac($gpass,$YourDate,$GSalt,"sha1");
 $url_this_dir = "http://".$_SERVER['HTTP_HOST'].$this_dir."index.php?act=view";
 $YourIP = $_SERVER['REMOTE_ADDR'];
-$query = query("INSERT INTO `".$_POST['tableprefix']."members` VALUES (-1,'Guest','%s','iDBH','%s',4,'no',0,'Guest Account','Guest',%i,%i,'0','0','0','0','[B]Test[/B] :)','Your Notes','http://','100x100','%s','UnKnow',1,10,10,10,'%s','%s','iDB','127.0.0.1','%s')", array($GuestPassword,$GEmail,$YourDate,$YourDate,$YourWebsite,$AdminTime,$AdminDST,$GSalt));
+$query = query("INSERT INTO `".$_POST['tableprefix']."members` VALUES (-1,'Guest','%s','iDBH','%s',4,'no',0,'Guest Account','Guest',%i,%i,'0','0','0','0','[B]Test[/B] :)','Your Notes','http://','100x100','%s','UnKnow',1,0,0,10,10,10,'%s','%s','iDB','127.0.0.1','%s')", array($GuestPassword,$GEmail,$YourDate,$YourDate,$YourWebsite,$AdminTime,$AdminDST,$GSalt));
 mysql_query($query);
-$query = query("INSERT INTO `".$_POST['tableprefix']."members` VALUES (1,'%s','%s','iDBH','%s',1,'yes',0,'%s','Admin',%i,%i,'0','0','0','0','%s','Your Notes','%s','100x100','%s','UnKnow',0,10,10,10,'%s','%s','iDB','%s','%s')", array($_POST['AdminUser'],$NewPassword,$Email,$Interests,$YourDate,$YourDate,$NewSignature,$Avatar,$YourWebsite,$AdminTime,$AdminDST,$UserIP,$YourSalt));
+$query = query("INSERT INTO `".$_POST['tableprefix']."members` VALUES (1,'%s','%s','iDBH','%s',1,'yes',0,'%s','Admin',%i,%i,'0','0','0','0','%s','Your Notes','%s','100x100','%s','UnKnow',0,0,0,10,10,10,'%s','%s','iDB','%s','%s')", array($_POST['AdminUser'],$NewPassword,$Email,$Interests,$YourDate,$YourDate,$NewSignature,$Avatar,$YourWebsite,$AdminTime,$AdminDST,$UserIP,$YourSalt));
 mysql_query($query);
 $query = query("INSERT INTO `".$_POST['tableprefix']."messenger` VALUES (1,-1,1,'".$iDB_Author."','Test','Hello Welcome to your board.\r\nThis is a Test PM. :P ','Hello Welcome',%i,0)", array($YourDate));
 mysql_query($query);
index a299cb3..c36e999 100644 (file)
@@ -12,7 +12,7 @@
     Copyright 2004-2008 Game Maker 2k - http://intdb.sourceforge.net/
     iDB Installer made by Game Maker 2k - http://idb.berlios.net/
 
-    $FileInfo: mktable.php - Last Update: 11/14/2008 SVN 186 - Author: cooldude2k $
+    $FileInfo: mktable.php - Last Update: 11/14/2008 SVN 187 - Author: cooldude2k $
 */
 $File3Name = basename($_SERVER['SCRIPT_NAME']);
 if ($File3Name=="mktable.php"||$File3Name=="/mktable.php") {
@@ -20,13 +20,13 @@ if ($File3Name=="mktable.php"||$File3Name=="/mktable.php") {
        exit(); }
 if(!isset($SetupDir['setup'])) { $SetupDir['setup'] = "setup/"; }
 if(!isset($SetupDir['convert'])) { $SetupDir['convert'] = "setup/convert/"; }
-$query=query("CREATE TABLE `".$_POST['tableprefix']."categories` ( `id` int(15) NOT NULL auto_increment, `OrderID` int(15) NOT NULL default '0', `Name` varchar(150) NOT NULL default '', `ShowCategory` varchar(5) NOT NULL default '', `CategoryType` varchar(15) NOT NULL default '', `SubShowForums` varchar(5) NOT NULL default '', `InSubCategory` int(15) NOT NULL default '0', `PostCountView` int(15) NOT NULL default '0', `Description` text NOT NULL, PRIMARY KEY  (`id`)) TYPE=`MyISAM` ;", array(null));
+$query=query("CREATE TABLE `".$_POST['tableprefix']."categories` ( `id` int(15) NOT NULL auto_increment, `OrderID` int(15) NOT NULL default '0', `Name` varchar(150) NOT NULL default '', `ShowCategory` varchar(5) NOT NULL default '', `CategoryType` varchar(15) NOT NULL default '', `SubShowForums` varchar(5) NOT NULL default '', `InSubCategory` int(15) NOT NULL default '0', `PostCountView` int(15) NOT NULL default '0', `KarmaCountView` int(15) NOT NULL default '0', `Description` text NOT NULL, PRIMARY KEY  (`id`)) TYPE=`MyISAM` ;", array(null));
 mysql_query($query);
-$query=query("CREATE TABLE `".$_POST['tableprefix']."forums` ( `id` int(15) NOT NULL auto_increment, `CategoryID` int(15) NOT NULL default '0', `OrderID` int(15) NOT NULL default '0', `Name` varchar(150) NOT NULL default '', `ShowForum` varchar(5) NOT NULL default '', `ForumType` varchar(15) NOT NULL default '', `InSubForum` int(15) NOT NULL default '0', `RedirectURL` text NOT NULL, `Redirects` int(15) NOT NULL default '0', `NumViews` int(15) NOT NULL default '0', `Description` text NOT NULL, `PostCountAdd` varchar(15) NOT NULL default '', `PostCountView` int(15) NOT NULL default '0', `CanHaveTopics` varchar(5) NOT NULL default '', `NumPosts` int(15) NOT NULL default '0', `NumTopics` int(15) NOT NULL default '0', PRIMARY KEY  (`id`)) TYPE=`MyISAM` ;", array(null));
+$query=query("CREATE TABLE `".$_POST['tableprefix']."forums` ( `id` int(15) NOT NULL auto_increment, `CategoryID` int(15) NOT NULL default '0', `OrderID` int(15) NOT NULL default '0', `Name` varchar(150) NOT NULL default '', `ShowForum` varchar(5) NOT NULL default '', `ForumType` varchar(15) NOT NULL default '', `InSubForum` int(15) NOT NULL default '0', `RedirectURL` text NOT NULL, `Redirects` int(15) NOT NULL default '0', `NumViews` int(15) NOT NULL default '0', `Description` text NOT NULL, `PostCountAdd` varchar(15) NOT NULL default '', `PostCountView` int(15) NOT NULL default '0', `KarmaCountView` int(15) NOT NULL default '0', `CanHaveTopics` varchar(5) NOT NULL default '', `NumPosts` int(15) NOT NULL default '0', `NumTopics` int(15) NOT NULL default '0', PRIMARY KEY  (`id`)) TYPE=`MyISAM` ;", array(null));
 mysql_query($query);
 $query=query("CREATE TABLE `".$_POST['tableprefix']."events` ( `id` int(15) NOT NULL auto_increment, `UserID` int(15) NOT NULL default '0', `GuestName` varchar(150) NOT NULL default '', `EventName` varchar(150) NOT NULL default '', `EventText` text NOT NULL, `TimeStamp` int(15) NOT NULL default '0', `TimeStampEnd` int(15) NOT NULL default '0', `EventMonth` int(5) NOT NULL default '0', `EventMonthEnd` int(5) NOT NULL default '0', `EventDay` int(5) NOT NULL default '0', `EventDayEnd` int(5) NOT NULL default '0', `EventYear` int(5) NOT NULL default '0', `EventYearEnd` int(5) NOT NULL default '0', PRIMARY KEY  (`id`)) TYPE=`MyISAM` ;", array(null));
 mysql_query($query);
-$query=query("CREATE TABLE `".$_POST['tableprefix']."members` ( `id` int(15) NOT NULL auto_increment, `Name` varchar(150) NOT NULL default '', `Password` varchar(150) NOT NULL default '', `HashType` varchar(50) NOT NULL default '', `Email` varchar(150) NOT NULL default '', `GroupID` int(15) NOT NULL default '0', `Validated` varchar(20) NOT NULL default '', `WarnLevel` int(10) NOT NULL default '0', `Interests` varchar(150) NOT NULL default '', `Title` varchar(150) NOT NULL default '', `Joined` int(15) NOT NULL default '0', `LastActive` int(15) NOT NULL default '0', `BanTime` int(15) NOT NULL default '0', `BirthDay` int(5) NOT NULL default '0', `BirthMonth` int(5) NOT NULL default '0', `BirthYear` int(5) NOT NULL default '0', `Signature` text NOT NULL, `Notes` text NOT NULL, `Avatar` varchar(150) NOT NULL default '', `AvatarSize` varchar(10) NOT NULL default '', `Website` varchar(150) NOT NULL default '', `Gender` varchar(15) NOT NULL default '', `PostCount` int(15) NOT NULL default '0', `RepliesPerPage` int(5) NOT NULL default '0', `TopicsPerPage` int(5) NOT NULL default '0', `MessagesPerPage` int(5) NOT NULL default '0', `TimeZone` varchar(5) NOT NULL default '0', `DST` varchar(5) NOT NULL default '0', `UseTheme` varchar(5) NOT NULL default '0', `IP` varchar(20) NOT NULL default '', `Salt` varchar(50) NOT NULL default '', PRIMARY KEY  (`id`)) TYPE=`MyISAM` ;", array(null));
+$query=query("CREATE TABLE `".$_POST['tableprefix']."members` ( `id` int(15) NOT NULL auto_increment, `Name` varchar(150) NOT NULL default '', `Password` varchar(150) NOT NULL default '', `HashType` varchar(50) NOT NULL default '', `Email` varchar(150) NOT NULL default '', `GroupID` int(15) NOT NULL default '0', `Validated` varchar(20) NOT NULL default '', `WarnLevel` int(10) NOT NULL default '0', `Interests` varchar(150) NOT NULL default '', `Title` varchar(150) NOT NULL default '', `Joined` int(15) NOT NULL default '0', `LastActive` int(15) NOT NULL default '0', `BanTime` int(15) NOT NULL default '0', `BirthDay` int(5) NOT NULL default '0', `BirthMonth` int(5) NOT NULL default '0', `BirthYear` int(5) NOT NULL default '0', `Signature` text NOT NULL, `Notes` text NOT NULL, `Avatar` varchar(150) NOT NULL default '', `AvatarSize` varchar(10) NOT NULL default '', `Website` varchar(150) NOT NULL default '', `Gender` varchar(15) NOT NULL default '', `PostCount` int(15) NOT NULL default '0', `Karma` int(15) NOT NULL default '0', `KarmaUpdate` int(15) NOT NULL default '0', `RepliesPerPage` int(5) NOT NULL default '0', `TopicsPerPage` int(5) NOT NULL default '0', `MessagesPerPage` int(5) NOT NULL default '0', `TimeZone` varchar(5) NOT NULL default '0', `DST` varchar(5) NOT NULL default '0', `UseTheme` varchar(5) NOT NULL default '0', `IP` varchar(20) NOT NULL default '', `Salt` varchar(50) NOT NULL default '', PRIMARY KEY  (`id`)) TYPE=`MyISAM` ;", array(null));
 mysql_query($query);
 $query=query("CREATE TABLE `".$_POST['tableprefix']."messenger` ( `id` int(15) NOT NULL auto_increment, `SenderID` int(15) NOT NULL default '0', `PMSentID` int(15) NOT NULL default '0', `GuestName` varchar(150) NOT NULL default '', `MessageTitle` varchar(150) NOT NULL default '', `MessageText` text NOT NULL, `Description` text NOT NULL, `DateSend` int(15) NOT NULL default '0', `Read` int(5) NOT NULL default '0', PRIMARY KEY  (`id`)) TYPE=`MyISAM` ;", array(null));
 mysql_query($query);
@@ -41,7 +41,7 @@ $query=query("CREATE TABLE `".$_POST['tableprefix']."topics` ( `id` int(15) NOT
 mysql_query($query);
 $query=query("CREATE TABLE `".$_POST['tableprefix']."sessions` ( `SessionID` varchar(255) NOT NULL default '', `SessID` varchar(255) NOT NULL default '', `LastUpdated` int(15) NOT NULL default '0', `DataValue` text NOT NULL, PRIMARY KEY (`SessionID`)) TYPE=`MyISAM` ;", array(null));
 mysql_query($query);
-$query=query("CREATE TABLE `".$_POST['tableprefix']."groups` ( `id` int(15) NOT NULL auto_increment, `Name` varchar(150) NOT NULL default '', `PermissionID` int(15) NOT NULL default '0', `NamePrefix` varchar(150) NOT NULL default '', `NameSuffix` varchar(150) NOT NULL default '', `CanViewBoard` varchar(5) NOT NULL default '', `CanEditProfile` varchar(5) NOT NULL default '', `CanAddEvents` varchar(5) NOT NULL default '', `CanPM` varchar(5) NOT NULL default '', `CanSearch` varchar(5) NOT NULL default '', `PromoteTo` int(15) NOT NULL default '0', `PromotePosts` int(15) NOT NULL default '0', `HasModCP` varchar(5) NOT NULL default '', `HasAdminCP` varchar(5) NOT NULL default '', `ViewDBInfo` varchar(5) NOT NULL default '', PRIMARY KEY  (`id`)) TYPE=`MyISAM` ;", array(null));
+$query=query("CREATE TABLE `".$_POST['tableprefix']."groups` ( `id` int(15) NOT NULL auto_increment, `Name` varchar(150) NOT NULL default '', `PermissionID` int(15) NOT NULL default '0', `NamePrefix` varchar(150) NOT NULL default '', `NameSuffix` varchar(150) NOT NULL default '', `CanViewBoard` varchar(5) NOT NULL default '', `CanEditProfile` varchar(5) NOT NULL default '', `CanAddEvents` varchar(5) NOT NULL default '', `CanPM` varchar(5) NOT NULL default '', `CanSearch` varchar(5) NOT NULL default '', `PromoteTo` int(15) NOT NULL default '0', `PromotePosts` int(15) NOT NULL default '0', `PromoteKarma` int(15) NOT NULL default '0', `HasModCP` varchar(5) NOT NULL default '', `HasAdminCP` varchar(5) NOT NULL default '', `ViewDBInfo` varchar(5) NOT NULL default '', PRIMARY KEY  (`id`)) TYPE=`MyISAM` ;", array(null));
 mysql_query($query);
 $query=query("CREATE TABLE `".$_POST['tableprefix']."permissions` ( `id` int(15) NOT NULL auto_increment, `PermissionID` int(15) NOT NULL default '0', `Name` varchar(150) NOT NULL default '', `ForumID` int(15) NOT NULL default '0', `CanViewForum` varchar(5) NOT NULL default '', `CanMakeTopics` varchar(5) NOT NULL default '', `CanMakeReplys` varchar(5) NOT NULL default '', `CanMakeReplysCT` varchar(5) NOT NULL default '', `CanEditTopics` varchar(5) NOT NULL default '', `CanEditTopicsCT` varchar(5) NOT NULL default '', `CanEditReplys` varchar(5) NOT NULL default '', `CanEditReplysCT` varchar(5) NOT NULL default '', `CanDeleteTopics` varchar(5) NOT NULL default '', `CanDeleteTopicsCT` varchar(5) NOT NULL default '', `CanDeleteReplys` varchar(5) NOT NULL default '', `CanDeleteReplysCT` varchar(5) NOT NULL default '', `CanCloseTopics` varchar(5) NOT NULL default '', `CanPinTopics` varchar(5) NOT NULL default '', `CanDohtml` varchar(5) NOT NULL default '', `CanUseBBags` varchar(5) NOT NULL default '', `CanModForum` varchar(5) NOT NULL default '', PRIMARY KEY  (`id`)) TYPE=`MyISAM` ;", array(null));
 mysql_query($query);
@@ -51,7 +51,7 @@ $query=query("CREATE TABLE `".$_POST['tableprefix']."wordfilter` ( `id` int(15)
 mysql_query($query);
 $query=query("CREATE TABLE `".$_POST['tableprefix']."restrictedwords` ( `id` int(15) NOT NULL auto_increment, `Word` text NOT NULL, `RestrictedUserName` varchar(5) NOT NULL default '', `RestrictedTopicName` varchar(5) NOT NULL default '', `RestrictedEventName` varchar(5) NOT NULL default '', `RestrictedMessageName` varchar(5) NOT NULL default '', `CaseInsensitive` varchar(5) NOT NULL default '', `WholeWord` varchar(5) NOT NULL default '', PRIMARY KEY  (`id`)) TYPE=`MyISAM` ;", array(null));
 mysql_query($query);
-$query = query("INSERT INTO `".$_POST['tableprefix']."groups` VALUES (1, 'Admin', 1, '', '', 'yes', 'yes', 'yes', 'yes', 'yes', 'none', 0, 'yes', 'yes', 'yes'), (2, 'Moderator', 2, '', '', 'yes', 'yes', 'yes', 'yes', 'yes', 'none', 0, 'yes', 'no', 'no'), (3, 'Member', 3, '', '', 'yes', 'yes', 'yes', 'yes', 'yes', 'none', 0, 'no', 'no', 'no'), (4, 'Guest', 4, '', '', 'yes', 'no', 'no', 'no', 'no', 'none', 0, 'no', 'no', 'no'), (5, 'Banned', 5, '', '', 'no', 'no', 'no', 'no', 'no', 'none', 0, 'no', 'no', 'no'), (6, 'Validate', 6, '', '', 'yes', 'yes', 'no', 'no', 'yes', 'none', 0, 'no', 'no', 'no');", array(null)); 
+$query = query("INSERT INTO `".$_POST['tableprefix']."groups` VALUES (1, 'Admin', 1, '', '', 'yes', 'yes', 'yes', 'yes', 'yes', 0, 0, 0, 'yes', 'yes', 'yes'), (2, 'Moderator', 2, '', '', 'yes', 'yes', 'yes', 'yes', 'yes', 0, 0, 0, 'yes', 'no', 'no'), (3, 'Member', 3, '', '', 'yes', 'yes', 'yes', 'yes', 'yes', 0, 0, 0, 'no', 'no', 'no'), (4, 'Guest', 4, '', '', 'yes', 'no', 'no', 'no', 'no', 0, 0, 0, 'no', 'no', 'no'), (5, 'Banned', 5, '', '', 'no', 'no', 'no', 'no', 'no', 0, 0, 0, 'no', 'no', 'no'), (6, 'Validate', 6, '', '', 'yes', 'yes', 'no', 'no', 'yes', 0, 0, 0, 'no', 'no', 'no');", array(null)); 
 mysql_query($query);
 $query = query("INSERT INTO `".$_POST['tableprefix']."permissions` VALUES (1, 1, 'Admin', 1, 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes'), (2, 2, 'Moderator', 1, 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes'), (3, 3, 'Member', 1, 'yes', 'yes', 'yes', 'no', 'yes', 'no', 'yes', 'no', 'yes', 'no', 'yes', 'no', 'no', 'no', 'no', 'yes', 'no'), (4, 4, 'Guest', 1, 'yes', 'no', 'no', 'no', 'no', 'no', 'no', 'no', 'no', 'no', 'no', 'no', 'no', 'no', 'no', 'no', 'no'), (5, 5, 'Banned', 1, 'no', 'no', 'no', 'no', 'no', 'no', 'no', 'no', 'no', 'no', 'no', 'no', 'no', 'no', 'no', 'no', 'no'), (6, 6, 'Validate', 1, 'yes', 'no', 'no', 'no', 'no', 'no', 'no', 'no', 'no', 'no', 'no', 'no', 'no', 'no', 'no', 'no', 'no');", array(null)); 
 mysql_query($query);