[Problem] Pause error, admin_forumauth.php, line 114

This mod will make it posible to specify permissions to all "special pages, like MEMBERLIST, PROFILE VIEW and so on.
The permissions support USERGROUP, making this tool very powerfull

Moderator: Moderators

Forum rules
The content in this forum is dated Dec. 21 2005 and can be used as Archive only. This Forum is LOCKED and READ ONLY !

[Problem] Pause error, admin_forumauth.php, line 114

Postby CombatGold1 on Sat 16. Aug, 2003 00:30

Here is my Line 114, with the pause error.
Code: Select all
// Start program proper
//
if( isset($HTTP_POST_VARS['submit']) )
{
   $sql = '';

   if(isset($forum_id))
   {
      if(isset($HTTP_POST_VARS['simpleauth']))
      {
         $simple_ary = $simple_auth_ary[$HTTP_POST_VARS['simpleauth']];

         for($i = 0; $i < count($simple_ary); $i++)
         {
            $sql .= ( ( $sql != '' ) ? ', ' : '' ) . $forum_auth_fields[$i] . ' = ' . $simple_ary[$i];
         }

         sql = "UPDATE " . FORUMS_TABLE . " SET $sql WHERE forum_id = '$forum_id'";           <<---- ERROR HERE
      }
      else
      {
         for($i = 0; $i < count($forum_auth_fields); $i++)
         {
            $value = $HTTP_POST_VARS[$forum_auth_fields[$i]];

            if ( $forum_auth_fields[$i] == 'auth_vote' )
            {
               if ( $HTTP_POST_VARS['auth_vote'] == AUTH_ALL )
               {
                  $value = AUTH_REG;
               }
            }

            $sql .= ( ( $sql != '' ) ? ', ' : '' ) .$forum_auth_fields[$i] . ' = ' . $value;
         }

         $sql = "UPDATE " . FORUMS_TABLE . " SET $sql WHERE forum_id = '$forum_id'";
      }

      if ( $sql != '' )
      {
         if ( !$db->sql_query($sql) )
         {
            message_die(GENERAL_ERROR, 'Could not update auth table', '', __LINE__, __FILE__, $sql);
         }
      }

      $forum_sql = '';
      $adv = 0;
   }

   $template->assign_vars(array(
      'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid("admin_forumauth.$phpEx?" . POST_FORUM_URL . "=$forum_id") . '">')
   );
   $message = $lang['Forum_auth_updated'] . '<br /><br />' . sprintf($lang['Click_return_forumauth'],  '<a href="' . append_sid("admin_forumauth.$phpEx") . '">', "</a>");
   message_die(GENERAL_MESSAGE, $message);

} // End of submit
User avatar
CombatGold1
Poster
Poster
 
Posts: 6
Joined: Mon 09. Jun, 2003 17:09
Location: Cardiff, South Wales.

Postby CombatGold1 on Sat 16. Aug, 2003 00:35

MY BAD

sql = "UPDATE " . FORUMS_TABLE . " SET $sql WHERE forum_id = '$forum_id'";

should be

$sql = "UPDATE " . FORUMS_TABLE . " SET $sql WHERE forum_id = '$forum_id'";

i cut off the $ by actident at the start, sorry
User avatar
CombatGold1
Poster
Poster
 
Posts: 6
Joined: Mon 09. Jun, 2003 17:09
Location: Cardiff, South Wales.


Return to Extra permission [2.0.6/EM]

Who is online

Users browsing this forum: No registered users and 1 guest

cron