hey guys im having a problem here when ive added a group i want to add the perm but when go to the file it dnt show the group
here are my addgrp and add perm files
ownercp.php
ownerproc.php
here are my addgrp and add perm files
ownercp.php
Code:
else if($action=="addperm") { $pstyle = gettheme($sid); echo xhtmlhead("$stitle",$pstyle); boxstart("Add Perm"); echo "<p align=\"center\">"; echo "<b>Add permission</b>"; $forums = mysql_query("SELECT id, name FROM ibwf_forums ORDER BY position, id, name"); echo "<form action=\"ownerproc.php?action=addperm&sid=$sid\" method=\"post\">"; echo "<br/><br/>Forum: <select name=\"fid\">"; while ($forum=mysql_fetch_array($forums)) { echo "<option value=\"$forum[0]\">$forum[1]</option>"; } echo "</select>"; $forums = mysql_query("SELECT id, name FROM ibwf_groups ORDER BY name, id"); echo "<br/>UGroups: <select name=\"gid\">"; while ($forum=mysql_fetch_array($forums)) { echo "<option value=\"$forum[0]\">$forum[1]</option>"; } echo "</select>"; echo "<input type=\"submit\" value=\"Submit\"/>"; echo "</form>"; echo "<br/><br/><a href=\"index.php?action=ownercp&sid=$sid\"><img src=\"images/admn.gif\" alt=\"*\"/>"; echo "owner CP</a><br/>"; echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>"; echo "Home</a>"; echo "</p>"; echo "</body>"; } else if($action=="addgrp") {boxstart("Goup"); $pstyle = gettheme($sid); echo xhtmlhead("$stitle",$pstyle); echo "<p align=\"center\">"; echo "<b>Add Group</b><br/><br/>"; echo "<form action=\"ownerproc.php?action=addgrp&sid=$sid\" method=\"post\">"; echo "Name:<input name=\"ugname\" maxlength=\"30\"/><br/>"; echo "Auto Assign:<select name=\"ugaa\">"; echo "<option value=\"1\">Yes</option>"; echo "<option value=\"0\">No</option>"; echo "</select><br/>"; echo "<br/><small><b>For Auto Assign Only</b></small><br/>"; echo "Allow:<select name=\"allus\">"; echo "<option value=\"0\">Normal Users</option>"; echo "<option value=\"1\">Mods</option>"; echo "<option value=\"2\">Owners</option>"; echo "</select><br/>"; echo "Min. Age:"; echo "<input name=\"mage\" format=\"*N\" maxlength=\"3\" size=\"3\"/>"; echo "<br/>Min. Posts:"; echo "<input name=\"mpst\" format=\"*N\" maxlength=\"3\" size=\"3\"/>"; echo "<br/>Min. Plusses:"; echo "<input name=\"mpls\" format=\"*N\" maxlength=\"3\" size=\"3\"/><br/>"; echo "<input type=\"submit\" value=\"Add\"/>"; echo "</form>"; echo "<br/><br/><a href=\"ownercp.php?action=ugroups&sid=$sid\">"; echo "UGroups</a><br/>"; echo "<a href=\"index.php?action=ownercp&sid=$sid\"><img src=\"images/admn.gif\" alt=\"*\"/>"; echo "owner CP</a><br/>"; echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>"; echo "Home</a>"; echo "</p>"; echo "</body>"; }
Code:
///////////////add group else if($action=="addgrp") {$pstyle = gettheme($sid); echo xhtmlhead("$stitle",$pstyle); boxstart("addgrp"); $frname = $_POST["ugname"]; $ugaa = $_POST["ugaa"]; $allus = $_POST["allus"]; $mage = $_POST["mage"]; $mpst = $_POST["mpst"]; $mpls = $_POST["mpls"]; echo "<p align=\"center\">"; echo $ugname; echo "<br/>"; $res = mysql_query("INSERT INTO ibwf_groups SET name='".$ugname."', autoass='".$ugaa."', userst='".$allus."', mage='".$mage."', posts='".$mpst."', plusses='".$mpls."'"); if($res) { echo "<img src=\"images/ok.gif\" alt=\"O\"/>User group added successfully"; }else{ echo "<img src=\"images/notok.gif\" alt=\"X\"/>Error adding User group"; } echo "<br/><br/><a href=\"ownercp.php?action=ugroups&sid=$sid\">"; echo "UGroups</a><br/>"; echo "<a href=\"index.php?action=ownercp&sid=$sid\"><img src=\"images/admn.gif\" alt=\"*\"/>"; echo "owner CP</a><br/>"; echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>"; echo "Home</a>"; echo "</p></body>"; } else if($action=="addperm") {$pstyle = gettheme($sid); echo xhtmlhead("$stitle",$pstyle); boxstart("addperm"); $fid = $_POST["fid"]; $gid = $_POST["gid"]; echo "<p align=\"center\">"; echo "<br/>"; $res = mysql_query("INSERT INTO ibwf_acc SET fid='".$fid."', gid='".$gid."'"); if($res) { echo "<img src=\"images/ok.gif\" alt=\"O\"/>Permission added successfully"; }else{ echo "<img src=\"images/notok.gif\" alt=\"X\"/>Error adding permission "; } echo "<br/><br/><a href=\"ownercp.php?action=addperm&sid=$sid\">"; echo "Add Permission</a><br/>"; echo "<a href=\"index.php?action=ownercp&sid=$sid\"><img src=\"images/admn.gif\" alt=\"*\"/>"; echo "owner CP</a><br/>"; echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>"; echo "Home</a>"; echo "</p></body>"; }
Comment