add permision

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    add permision

    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
    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&amp;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&amp;sid=$sid\"><img src=\"images/admn.gif\" alt=\"*\"/>";
      echo "owner CP</a><br/>";
      echo "<a href=\"index.php?action=main&amp;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&amp;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&amp;sid=$sid\">";
      echo "UGroups</a><br/>";
        echo "<a href=\"index.php?action=ownercp&amp;sid=$sid\"><img src=\"images/admn.gif\" alt=\"*\"/>";
      echo "owner CP</a><br/>";
      echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
      echo "Home</a>";
      echo "</p>";
        echo "</body>";
    }
    ownerproc.php
    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&amp;sid=$sid\">";
      echo "UGroups</a><br/>";
          echo "<a href=\"index.php?action=ownercp&amp;sid=$sid\"><img src=\"images/admn.gif\" alt=\"*\"/>";
      echo "owner CP</a><br/>";
      echo "<a href=\"index.php?action=main&amp;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&amp;sid=$sid\">";
      echo "Add Permission</a><br/>";
          echo "<a href=\"index.php?action=ownercp&amp;sid=$sid\"><img src=\"images/admn.gif\" alt=\"*\"/>";
      echo "owner CP</a><br/>";
      echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
      echo "Home</a>";
    
          echo "</p></body>";
    }
    ________________
    Jacques
    jacques@gw-designs.co.za
    http://coding.biz.tm
    Come join and lets make it a place to learn all the noobies how to code
    __________________

    NEVER FORGET TO CLICK THE TANX BUTTON IF U LIKE WHAT IM SHARING OR HELPING WITH

    #2
    who can help me with this prob i can add the group but i cant add the group to a permision

    it looks like this

    Forum: Forum Cat
    UGroups:


    there where UGroup are no option to selct but i did add it to the ugroup list
    ________________
    Jacques
    jacques@gw-designs.co.za
    http://coding.biz.tm
    Come join and lets make it a place to learn all the noobies how to code
    __________________

    NEVER FORGET TO CLICK THE TANX BUTTON IF U LIKE WHAT IM SHARING OR HELPING WITH

    Comment

    Working...
    X