Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

Usergroups in drop down

Asked Modified Viewed 2,202 times
J
jannik
J
jannik 10
  • Member, joined since
  • Contributed 80 posts on the community forums.
  • Started 26 threads in the forums
  • Started this discussions
asked
Member

Hi all¨

I have this script in admin/members.php that should show the usergroups in a drop down. Here you can select what usergroups each member is in...
It almost works.
But it wont save it, nothing happens...

Here is the code

if (isset($_REQUEST['usergroup'])) { // usergroup actions from dropdown select
   $action = explode(".",stripinput(trim($_REQUEST['perform'])));
   $data = dbarray(dbquery("SELECT user_groups FROM ".DB_USERS." WHERE user_id = '".$action[0]."'"));
   $groups = explode(".", $data['user_groups']);
   sort($groups);
   if ($action[2] == "a")
   {
      $count = (sizeof($groups))+1;
      $groups[$count] = $action[1];
   }
   elseif ($action[2] == "r")
   {
      if (is_array($groups))
      {
         for($i = 0 ;$i < sizeof($groups) ; $i++)
         {
            if ($groups[$i] == $action[1])
            {
               $groups[$i] = "";
            }
         }
      }
   }
   sort($groups);
   for($i = 0 ;$i < sizeof($groups) ; $i++)
   {
      $groups[$i] = str_replace(".", "", $groups[$i]);
      if (isNum($groups[$i]))
      {
         $group .= ".".$groups[$i];
      }
   }
   $sql = dbquery("UPDATE ".DB_USERS." SET user_groups = '".$group."' WHERE user_id = '".$action[0]."'");
   $return_path = str_replace("*", "=", $_REQUEST['return']);
   $return_path = str_replace("|", "&", $return_path);
   redirect(FUSION_SELF."?".$return_path);
} // END usergroup actions


and here is the form

echo "<td class='tbl".(isset($_GET['tbl']) ? $_GET['tbl'] : "")."'><select name='user_group' class='textbox' onChange=\"return userGroup( this.options[this.selectedIndex].value );\" style='width:110px;'>".(isset($_GET['group_list']) ? $_GET['group_list'] : "")."</select></td>\n";



Could someone please see if there should be some error... I have spend over 5 hours on this script now :-(

Thanks
0 replies

7 posts

J
jannik
J
jannik 10
  • Member, joined since
  • Contributed 80 posts on the community forums.
  • Started 26 threads in the forums
  • Started this discussions
answered
Member

Hi again.
Please tell me if Im doing something wrong, or if some code is missing for u to help me...

Any help ... and I will be very happy:D
0 replies
I
iunruh
I
iunruh 10
  • Member, joined since
  • Contributed 148 posts on the community forums.
  • Started 15 threads in the forums
answered
Member

In the line where it says:

$action = explode(".",stripinput(trim($_REQUEST['perform'])));


You don't show in the form where the field "perform" is defined. It should be a user_id, am I correct?
0 replies
J
jannik
J
jannik 10
  • Member, joined since
  • Contributed 80 posts on the community forums.
  • Started 26 threads in the forums
  • Started this discussions
answered
Member

@ TammyK ... Ok, sorry.

@SoBeNoFear ... Thanks for your help, but please specify a little, dont quite understand.

I have this code another place in the file:
'
$return_path = str_replace("=", "*", FUSION_QUERY);
$return_path = str_replace("&", "|", $return_path);
if ((isset($_GET['group_id']) ? $_GET['group_id'] : "") == 2)
{
$perform = "user".$data['user_id'];
echo "<td class='tbl".(isset($_GET['tbl']) ? $_GET['tbl'] : "")."'><a href='".FUSION_SELF.$aidlink.$a_pm."activate&amp;sortby=".(isset($_GET['sortby']) ? $_GET['sortby'] : "")."&amp;rowstart=".(isset($_GET['rowstart']) ? $_GET['rowstart'] : "")."&amp;user_id=".$data['user_id']."' onClick='return aktiverBruger();'>Aktiver</a></td>\n";
}
else
{
echo "<td class='tbl".(isset($_GET['tbl']) ? $_GET['tbl'] : "")."'><select name='user_group' class='textbox' onChange=\"return userGroup( this.options[this.selectedIndex].value );\" style='width:110px;'>".(isset($_GET['group_list']) ? $_GET['group_list'] : "")."</select></td>\n";
}
unset($group_member);
unset($group_list);
unset($attention);


It uses the perform field.... is it what u ment?
0 replies
I
iunruh
I
iunruh 10
  • Member, joined since
  • Contributed 148 posts on the community forums.
  • Started 15 threads in the forums
answered
Member

I think I figured out what's wrong.. Change:

$perform = "user".$data['user_id'];


To

$perform = $data['user_id'];


Your code in the first part of what you posts takes $_REQUEST['perform'], splits it up into sections based on where the . is, but later down the script, you use $action['0'] in your mySQL query, which would be "user".$data['user_id']
0 replies
J
jannik
J
jannik 10
  • Member, joined since
  • Contributed 80 posts on the community forums.
  • Started 26 threads in the forums
  • Started this discussions
answered
Member

Thanks alot for your help.

I have changed the code to
$perform = $data['user_id'];


But im sorry to say, that it didnt change anything.

When i choose a group from the drop down, it does nothing at all.

Internet explorer comes up with an error saying that an object was expected in line....

Dont know if that helps...?

0 replies
I
iunruh
I
iunruh 10
  • Member, joined since
  • Contributed 148 posts on the community forums.
  • Started 15 threads in the forums
answered
Member

Quote

jannik wrote:
When i choose a group from the drop down, it does nothing at all.

Internet explorer comes up with an error saying that an object was expected in line....

Dont know if that helps...?



Then it seems like your javascript is wrong, because IE only pops up errors for JS.
0 replies
J
jannik
J
jannik 10
  • Member, joined since
  • Contributed 80 posts on the community forums.
  • Started 26 threads in the forums
  • Started this discussions
answered
Member

Hmm...

Im posting the entire members.php

Can u see if there should be some error somewhere???

<?php
/*-------------------------------------------------------+
| PHPFusion Content Management System
| Copyright (C) 2002 - 2008 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: administration/members.php
| Author: Nick Jones (Digitanium)
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once "../maincore.php";
require_once THEMES."templates/admin_header.php";
include LOCALE.LOCALESET."admin/members.php";
include LOCALE.LOCALESET."user_fields.php";

$today = mktime(0,0,0, date("m"), date("d"), date("Y"));

   // Don't Display Warnings
   //$ebits = ini_get('error_reporting');
   //error_reporting($ebits ^ E_NOTICE);
   // End Warnings Display

if (!checkrights("M") || !defined("iAUTH") || $_GET['aid'] != iAUTH) { redirect("../index.php"); }

if (isset($user_id) && !isNum($user_id)) redirect("index.php");
if (isset($_POST['cancel_delete'])) redirect(FUSION_SELF.$aidlink."&amp;area=pm&sortby=$sortby&rowstart=$rowstart");

if (!isset($_GET['step'])) { $_GET['step'] = ""; }

if (isset($_REQUEST['user_id'])) { // get username display it no matter what panel is open
    $show_data = dbarray(dbquery("SELECT * FROM ".DB_USERS." DU INNER JOIN ".DB_EXTEND_USERS." DEU on DU.user_id = DEU.eu_id WHERE DU.user_id='".$user_id."'"));
//   $show_data = dbarray(dbquery("SELECT * FROM ".DB_USERS." INNER JOIN ".DB_EXTEND_USERS." on ".DB_USERS.".user_id = ".DB_EXTEND_USERS.".eu_id WHERE user_id='".$user_id."'"));
   opentable("Samlet Bruger Administration" );
   echo "<table cellspacing='0' cellpadding='0' border='0' class='tbl' width='100%'>\n";
   echo "<tr>\n";
   echo "<td width='1%' style='white-space:nowrap'><a href='members.php?aid=".$aid."' class='side'>Tilbage til Bruger Administration</a></td>\n";
   echo "<td width='100%'>&nbsp;|&nbsp;<b>".$show_data['user_name']."</b>".($show_data['eu_name'] != "" ? "&nbsp;-&nbsp;".$show_data['eu_name']."&nbsp;" : "")."[<a href='mailto:".$show_data['user_email']."' class='side'>".$show_data['user_email']."</a>]</td>";
   echo "</tr>\n";
   echo "</table>\n";
   closetable();
}

// function for open or closed panels
$openpanel['members'] = ((isset($_REQUEST['area']) ? $_REQUEST['area'] : "") == "pm" ? "on" : "off"); // Panel Members (normal)
$openpanel['extended'] = ((isset($_REQUEST['area']) ? $_REQUEST['area'] : "") == "pe" ? "on" : "off"); // Panel extended
$openpanel['invoice'] = ((isset($_REQUEST['area']) ? $_REQUEST['area'] : "") == "inv" ? "on" : "off"); // Faktura Upload
$openpanel['dagbog'] = ((isset($_REQUEST['area']) ? $_REQUEST['area'] : "") == "db" ? "on" : "off"); // Faktura Upload
$a_pm = "&amp;area=pm&amp;step="; $a_PM = "&area=pm";
$a_pe = "&amp;area=pe&amp;step="; $a_PE = "&area=pe";
$a_db = "&amp;area=db&amp;step="; $a_DB = "&area=db";
$a_inv = "&amp;area=inv&amp;step=edit"; $_GET['a_INV'] = "&area=inv";

if (isset($_REQUEST['usergroup'])) { // usergroup actions from dropdown select
   $action = explode(".",stripinput(trim($_REQUEST['perform'])));
   $data = dbarray(dbquery("SELECT user_groups FROM ".DB_USERS." WHERE user_id = '".$action[0]."'"));
   $groups = explode(".", $data['user_groups']);
   sort($groups);
   if ($action[2] == "a")
   {
      $count = (sizeof($groups))+1;
      $groups[$count] = $action[1];
   }
   elseif ($action[2] == "r")
   {
      if (is_array($groups))
      {
         for($i = 0 ;$i < sizeof($groups) ; $i++)
         {
            if ($groups[$i] == $action[1])
            {
               $groups[$i] = "";
            }
         }
      }
   }
   sort($groups);
   for($i = 0 ;$i < sizeof($groups) ; $i++)
   {
      $groups[$i] = str_replace(".", "", $groups[$i]);
      if (isNum($groups[$i]))
      {
         $group .= ".".$groups[$i];
      }
   }
   $sql = dbquery("UPDATE ".DB_USERS." SET user_groups = '".$group."' WHERE user_id = '".$action[0]."'");
   $return_path = str_replace("*", "=", $_REQUEST['return']);
   $return_path = str_replace("|", "&", $return_path);
   redirect(FUSION_SELF."?".$return_path);
} // END usergroup actions


if ($_GET['step'] == "add") { // Add new user
   if (isset($_POST['add_user'])) { // form have been submitted
      $active_status = ($_REQUEST['show_group'] == 2 ? 0 : 2);
      $add_group = ".".stripinput(trim($_REQUEST['show_group']));
      $error = "";
      
      $username = trim(eregi_replace(" +", " ", $_POST['username']));
      
      if ($username == "" || trim($_POST['password1']) == "" || trim($_POST['email']) == "") { $error .= $locale['451']."<br />\n"; }
      if (!preg_match("/^[-0-9A-Z_@\s]+$/i", $username)) { $error .= $locale['452']."<br />\n"; }
      if (preg_match("/^[0-9A-Z@]{6,20}$/i", $_POST['password1'])) {
      if ($_POST['password1'] != $_POST['password2']) { $error .= $locale['456']."<br />\n"; }
      } else {
         $error .= $locale['457']."<br />\n";
      }
   
      if (!preg_match("/^[-0-9A-Z_\.]{1,50}@([-0-9A-Z_\.]+\.){1,50}([0-9A-Z]){2,4}$/i", $_POST['email'])) {
         $error .= $locale['454']."<br />\n";
      }
      
      $result = dbquery("SELECT * FROM ".DB_USERS." WHERE user_name='$username'");
      if (dbrows($result)) { $error = $locale['453']."<br />\n"; }
      
      $result = dbquery("SELECT * FROM ".DB_USERS." WHERE user_email='".$_POST['email']."'");
      if (dbrows($result)) { $error = $locale['455']."<br />\n"; }

      $profile_method = "validate_insert"; $db_fields = ""; $db_values = "";
      $result = dbquery("SELECT * FROM ".DB_USER_FIELDS." ORDER BY field_order");
      if (dbrows($result)) {
         while($data = dbarray($result)) {
            if (file_exists(LOCALE.LOCALESET."user_fields/".$data['field_name'].".php")) {
               include LOCALE.LOCALESET."user_fields/".$data['field_name'].".php";
            }
            if (file_exists(INCLUDES."user_fields/".$data['field_name']."_include.php")) {
               include INCLUDES."user_fields/".$data['field_name']."_include.php";
            }
         }
      }
      
      $result = dbquery("INSERT INTO ".DB_USERS." (user_name, user_password, user_admin_password, user_email, user_hide_email, user_avatar, user_posts, user_threads, user_joined, user_lastvisit, user_ip, user_rights, user_groups, user_level, user_status".(isset($db_fields) ? $db_fields : "").") VALUES('$username', '".md5(md5($_POST['password1']))."', '', '".$_POST['email']."', '".intval($_POST['hide_email'])."', '', '0', '0', '".time()."', '0', '".USER_IP."', '', '2', '101', '0'".(isset($db_values) ? $db_values : "").")");
      $this_user_id = mysql_insert_id();
      $sql = dbquery("INSERT INTO ".DB_EXTEND_USERS." (eu_id, eu_name, eu_email) VALUES('".$this_user_id."', '".$username."', '".$_POST['email']."')");
      redirect(FUSION_SELF.$aidlink."&area=pm&step=edit&user_id=".$this_user_id);

      
      if ($error == "") {
      opentable($locale['480']);
         echo "<div style='text-align:center'><br />\n".$locale['481']."<br /><br />\n";
         echo "<a href='members.php".$aidlink."'>".$locale['432']."</a><br /><br />\n";
         echo "<a href='index.php".$aidlink."'>".$locale['433']."</a><br /><br />\n";
         echo "</div>\n";
         closetable();
      } else {
         opentable($locale['480']);
         echo "<div style='text-align:center'><br />\n".$locale['482']."<br /><br />\n".$error."<br />\n";
         echo "<a href='members.php".$aidlink."'>".$locale['432']."</a><br /><br />\n";
         echo "<a href='index.php".$aidlink."'>".$locale['433']."</a><br /><br />\n";
         echo "</div>\n";
         closetable();
      }
   } else {
      opentable($locale['480']);
      echo "<form name='addform' method='post' action='".FUSION_SELF.$aidlink."&amp;step=add'>\n";
      echo "<table cellpadding='0' cellspacing='0' class='center'>\n<tr>\n";
      echo "<td class='tbl'>".$locale['u001']."<span style='color:#ff0000'>*</span></td>\n";
      echo "<td class='tbl'><input type='text' name='username' maxlength='30' class='textbox' style='width:200px;' /></td>\n";
      echo "</tr>\n<tr>\n";
      echo "<td class='tbl'>".$locale['u002']."<span style='color:#ff0000'>*</span></td>\n";
      echo "<td class='tbl'><input type='password' name='password1' maxlength='20' class='textbox' style='width:200px;' /></td>\n";
      echo "</tr>\n<tr>\n";
      echo "<td class='tbl'>".$locale['u004']."<span style='color:#ff0000'>*</span></td>\n";
      echo "<td class='tbl'><input type='password' name='password2' maxlength='20' class='textbox' style='width:200px;' /></td>\n";
      echo "</tr>\n<tr>\n";
      echo "<td class='tbl'>".$locale['u005']."<span style='color:#ff0000'>*</span></td>\n";
      echo "<td class='tbl'><input type='text' name='email' maxlength='100' class='textbox' style='width:200px;' /></td>\n";
      echo "</tr>\n<tr>\n";
      echo "<td class='tbl'>".$locale['u006']."</td>\n";
      echo "<td class='tbl'><label><input type='radio' name='hide_email' value='1' />".$locale['u007']."</label> <label><input type='radio' name='hide_email' value='0' checked='checked' />".$locale['u008']."</label></td>\n";
      echo "</tr>\n<tr>\n";
      echo "<td align='center' colspan='2'><br />\n";
      echo "<input type='submit' name='add_user' value='".$locale['480']."' class='button' /></td>\n";
      echo "</tr>\n</table>\n</form>\n";
      closetable();
   }
} elseif ($_GET['step'] == "view" && isnum($_GET['user_id'])) {
   $result = dbquery("SELECT * FROM ".DB_USERS." WHERE user_id='".$_GET['user_id']."'");
   if (dbrows($result)) { $user_data = dbarray($result); } else { redirect(FUSION_SELF.$aidlink); }
   
   opentable($locale['470']." ".$data['user_name']);
   echo "<table cellpadding='0' cellspacing='1' width='400' class='tbl-border center'>\n<tr>\n";
   if ($user_data['user_avatar'] && file_exists(IMAGES."avatars/".$user_data['user_avatar'])) {
      echo "<td rowspan='5' width='1%' class='tbl'><img src='".IMAGES."avatars/".$user_data['user_avatar']."' alt='' /></td>\n";
   }
   echo "<td width='1%' class='tbl1' style='white-space:nowrap'>".$locale['u001']."</td>\n";
   echo "<td align='right' class='tbl1'>".$user_data['user_name']."</td>\n";
   echo "</tr>\n<tr>\n";
   echo "<td width='1%' class='tbl1' style='white-space:nowrap'></td>\n";
   echo "<td align='right' class='tbl1'>".getuserlevel($user_data['user_level'])."</td>\n";
   echo "</tr>\n<tr>\n";
   echo "<td width='1%' class='tbl1' style='white-space:nowrap'>".$locale['u005']."</td>\n";
   echo "<td align='right' class='tbl1'>".hide_email($user_data['user_email'])."</td>\n";
   echo "</tr>\n<tr>\n";
   echo "<td width='1%' class='tbl1' style='white-space:nowrap'>".$locale['u040']."</td>\n";
   echo "<td align='right' class='tbl1'>".showdate("longdate", $user_data['user_joined'])."</td>\n";
   echo "</tr>\n<tr>\n";
   echo "<td width='1%' class='tbl1' style='white-space:nowrap'>".$locale['u041']."</td>\n";
   echo "<td align='right' class='tbl1'>".($user_data['user_lastvisit'] ? showdate("longdate", $user_data['user_lastvisit']) : $locale['u042'])."</td>\n";
   echo "</tr>\n<tr>\n";
   echo "<td colspan='".($user_data['user_avatar'] && file_exists(IMAGES."avatars/".$user_data['user_avatar']) ? "3" : "2")."' class='tbl2' style='text-align:center;white-space:nowrap'><a href='messages.php?msg_send=".$user_data['user_id']."' title='".$locale['u043']."'>".$locale['u043']."</a></td>\n";
   echo "</tr>\n</table>\n";
   
   echo "<div style='margin:5px'></div>\n";
   
   $_GET['profile_method'] = "display"; $_GET['user_fields_output'] = ""; $i = 0; $_GET['ob_active'] = false;

   $result2 = dbquery("SELECT * FROM ".DB_USER_FIELDS." ORDER BY field_group, field_order");
   if (dbrows($result2)) {
      while($data2 = dbarray($result2)) {
         if ($i != $data2['field_group']) {
            if ($ob_active) {
               $user_fields_output[$i] = ob_get_contents();
               ob_end_clean();
               $ob_active = false;
            }
            $i = $data2['field_group'];
         }
         if (!(isset($_GET['ob_active']) ? $_GET['ob_active'] : "")) {
            ob_start();
            $_GET['ob_active'] = true;
         }
         if (file_exists(LOCALE.LOCALESET."user_fields/".$data2['field_name'].".php")) {
            include LOCALE.LOCALESET."user_fields/".$data2['field_name'].".php";
         }
         if (file_exists(INCLUDES."user_fields/".$data2['field_name']."_include.php")) {
            include INCLUDES."user_fields/".$data2['field_name']."_include.php";
         }
      }
   }
   
   if ($ob_active) {
      $user_fields_output[$i] = ob_get_contents();
      ob_end_clean();
   }
   
   if (array_key_exists(1, $user_fields_output) && $user_fields_output[1]) {
      echo "<div style='margin:5px'></div>\n";
      echo "<table cellpadding='0' cellspacing='1' width='400' class='tbl-border center'>\n<tr>\n";
      echo "<td colspan='2' class='tbl2'><strong>".$locale['u044']."</strong></td>\n";
      echo "</tr>\n".$_GET['user_fields_output'][1];      
      echo "</table>\n";
   }
   
   if (array_key_exists(2, $user_fields_output) && $user_fields_output[2]) {
      echo "<div style='margin:5px'></div>\n";
      echo "<table cellpadding='0' cellspacing='1' width='400' class='tbl-border center'>\n<tr>\n";
      echo "<td colspan='2' class='tbl2'><strong>".$locale['u045']."</strong></td>\n";
      echo "</tr>\n".$user_fields_output[2];      
      echo "</table>\n";
   }
   
   if (array_key_exists(4, $user_fields_output) && $user_fields_output[4]) {
      echo "<div style='margin:5px'></div>\n";
      echo "<table cellpadding='0' cellspacing='1' width='400' class='tbl-border center'>\n<tr>\n";
      echo "<td colspan='2' class='tbl2'><strong>".$locale['u047']."</strong></td>\n";
      echo "</tr>\n".$user_fields_output[4];      
      echo "</table>\n";
   }
   
   echo "<div style='margin:5px'></div>\n";
   echo "<table cellpadding='0' cellspacing='1' width='400' class='tbl-border center'>\n<tr>\n";
   echo "<td colspan='2' class='tbl2'><strong>".$locale['u048']."</strong></td>\n";
   echo "</tr>\n<tr>\n";      
   echo "<td width='1%' class='tbl1' style='white-space:nowrap'>".$locale['u049']."</td>\n";
   echo "<td align='right' class='tbl1'>".$user_data['user_ip']."</td>\n";
   echo "</tr>\n</table>\n";
   closetable();
}

elseif ($_GET['step'] == "edit" && isnum($_GET['user_id'])) { // Edit user
   $user_data = dbarray(dbquery("SELECT * FROM ".DB_USERS." WHERE user_id='".$_GET['user_id']."'"));
   if (!$user_data || $user_data['user_level'] >= 102) { redirect(FUSION_SELF.$aidlink); }
   if (isset($_POST['savechanges'])) { // form have been submitted
      require_once "updateuser.php";
      
      if ($error == "")   { // an error occured
         openside($locale['430'],($openpanel['members'] == "on" ? "on" : "off"));
         echo "<center><br>".$locale['431']."<br><br>\n";
         echo "<a href='members.php".$aidlink."&amp;area=pm&amp;step=edit&amp;user_id=".$user_id."'>Fortsæt redigering af: ".$user_name."</a><br><br>\n";
         echo "<a href='members.php".$aidlink."'>".$locale['432']."</a><br><br>\n";
         echo "<a href='index.php".$aidlink."'>".$locale['433']."</a><br><br>\n";
         echo "</center>\n";
         closeside();
      }
      else
      { // no error
         openside($locale['430'],($openpanel['members'] == "on" ? "on" : "off"));
         echo "<center><br>".$locale['434']."<br><br>\n".$error."<br>\n";
         echo "<a href='members.php".$aidlink."'>".$locale['432']."</a><br><br>\n";
         echo "<a href='index.php".$aidlink."'>".$locale['433']."</a><br><br>\n";
         echo "</center>\n";
         closeside();
      }
   }   else { // No form have been submitted, look up data
         require_once INCLUDES."bbcode_include.php";
      $offset_list = "";
      for ($i = -13; $i < 17; $i++) {
         if ($i > 0) { $offset = "+".$i; } else { $offset = $i; }
         $offset_list .= "<option".($offset == $data['user_offset'] ? " selected='selected'" : "").">".$offset."</option>\n";
      }

      //
      // insert extended members data

      include(INFUSIONS."extended_member_database/extended_member_include_admin.php");
      
      // insert extended members data
      //

      //
      // insert invoice upload functions
      
      include(INFUSIONS."faktura_panel/faktura_include_admin.php");
      
      // insert invoice upload functions
      //
      
      //
      // insert dagbog functions
      
      include(INFUSIONS."dagbog_panel/dagbog_include_admin.php");
      
      // insert dagbog functions
      //
      

    //Rediger bruger element START
      openside($locale['430'],($openpanel['members'] == "on" ? "on" : "false"));

      echo "<form name='inputform' method='post' action='".FUSION_SELF.$aidlink."&amp;area=pm&amp;step=edit&amp;user_id=".$_GET['user_id']."' enctype='multipart/form-data'>\n";
      echo "<table align='center' cellpadding='0' cellspacing='0'>\n";
      echo "<tr>\n";
      echo "<td class='tbl'>".$locale['u001'].":<span style='color:#ff0000'>*</span></td>\n";
      echo "<td class='tbl'><input type='text' name='user_name' value='".$user_data['user_name']."' maxlength='30' class='textbox' style='width:200px;' /></td>\n";
      echo "</tr><tr>\n";
      echo "<td class='tbl'>".$locale['u003'].":</td>\n";
      echo "<td class='tbl'><input type='password' name='user_new_password' maxlength='20' class='textbox' style='width:200px;' /></td>\n";
      echo "</tr><tr>\n";
      echo "<td class='tbl'>".$locale['u004'].":</td>\n";
      echo "<td class='tbl'><input type='password' name='user_new_password2' maxlength='20' class='textbox' style='width:200px;' /></td>\n";
      echo "</tr><tr>\n";
      echo "<td class='tbl'>".$locale['u005'].":<span style='color:#ff0000'>*</span></td>\n";
      echo "<td class='tbl'><input type='text' name='user_email' value='".$user_data['user_email']."' maxlength='100' class='textbox' style='width:200px;' /></td>\n";
    echo "</tr><tr>\n";
      echo "<td class='tbl'>".$locale['u006']."</td>\n";
      echo "<td class='tbl'><input type='radio' name='user_hide_email' value='1'".($user_data['user_hide_email'] == "1" ? " checked='checked'" : "")." />".$locale['u007']." ";
      echo "<input type='radio' name='user_hide_email' value='0'".($user_data['user_hide_email'] == "0" ? " checked='checked'" : "")." />".$locale['u008']."</td>\n";
     echo "</tr>\n";
    
           if (!$user_data['user_avatar']) {
         echo "<tr>\n";
         echo "<td valign='top' class='tbl'>".$locale['u010'].":</td>\n";
         echo "<td class='tbl'><input type='file' name='user_avatar' class='textbox' style='width:200px;' /><br />\n";
         echo "<span class='small2'>".$locale['u011']."</span><br />\n";
         echo "<span class='small2'>".sprintf($locale['u012'], parsebytesize(30720), 100, 100)."</span></td>\n";
         echo "</tr>\n";
      } else {
         echo "<tr>\n";
         echo "<td valign='top' class='tbl'>".$locale['u010'].":</td>\n";
         echo "<td class='tbl'><img src='".IMAGES."avatars/".$user_data['user_avatar']."' alt='".$locale['u010']."' /><br />\n";
         echo "<input type='checkbox' name='del_avatar' value='y' /> ".$locale['u013']."\n";
         echo "<input type='hidden' name='user_avatar' value='".$user_data['user_avatar']."' /></td>\n";
         echo "</tr>\n";
      }

      $profile_method = "input";
      $result2 = dbquery("SELECT * FROM ".DB_USER_FIELDS." WHERE field_group != '4' GROUP BY field_group");
      while($data2 = dbarray($result2)) {
         $result3 = dbquery("SELECT * FROM ".DB_USER_FIELDS." WHERE field_group='".$data2['field_group']."' ORDER BY field_order");
         if (dbrows($result3)) {
            echo "<tr>\n<td class='tbl2'></td>\n";
            echo "<td class='tbl2'><strong>";
            if ($data2['field_group'] == 1) {
               echo $locale['u044'];
            } elseif ($data2['field_group'] == 2) {
               echo $locale['u045'];
            } elseif ($data2['field_group'] == 3) {
               echo $locale['u046'];
            }
            echo "</strong></td>\n</tr>\n";
            while($data3 = dbarray($result3)) {
               if (file_exists(LOCALE.LOCALESET."user_fields/".$data3['field_name'].".php")) {
                  include LOCALE.LOCALESET."user_fields/".$data3['field_name'].".php";
               }
               if (file_exists(INCLUDES."user_fields/".$data3['field_name']."_include.php")) {
                  include INCLUDES."user_fields/".$data3['field_name']."_include.php";
               }
            }
         }
      }
    
     echo "<tr>\n<td align='center' colspan='2' class='tbl'><br />\n";
      echo "<input type='hidden' name='user_hash' value='".$user_data['user_password']."' />\n";
      echo "<input type='submit' name='savechanges' value='".$locale['440']."' class='button' /></td>\n";
      echo "</tr>\n</table>\n</form>\n";
      closeside(); // Rediger bruger element END
   }

} // END edit user

else { opentable($locale['400']);
   if ($_GET['step'] == "ban" && isnum($_GET['user_id'])) {
      if ($_GET['act'] == "on") {
         $udata = dbarray(dbquery("SELECT * FROM ".DB_USERS." WHERE user_id='".$_GET['user_id']."'"));
         if ($udata && $udata['user_level'] < 102) {
            $result = dbquery("UPDATE ".DB_USERS." SET user_status='1' WHERE user_id='".$_GET['user_id']."'");
            echo "<div style='text-align:center'>".$locale['420']."<br /><br /></div>\n";
         }
      } elseif ($_GET['act'] == "off") {
         $result = dbquery("UPDATE ".DB_USERS." SET user_status='0' WHERE user_id='".$_GET['user_id']."'");
         echo "<div style='text-align:center'>".$locale['421']."<br /><br /></div>\n";
      }
   } elseif ($_GET['step'] == "activate" && isnum($_GET['user_id']))
   { // activate actions from users list
      $result = dbquery("SELECT * FROM ".DB_USERS." WHERE user_id='$user_id'");
      if (dbrows($result) != 0)
      {
         $udata = dbarray($result);
         $expires = mktime(0,0,0, date("m"), date("d")+1, date("Y")) + ($udata['user_pre_reg_time'] * 86400);
         $result = dbquery("UPDATE ".DB_USERS." SET user_status='0', user_reg_time = '".$expires."', user_current_reg = user_current_reg + '".$udata['user_pre_reg_time']."', user_pre_reg_time = '0', user_reg_notified = '2' WHERE user_id='$user_id'");
         echo $udata['user_groups'];
         if (preg_match("(^\.3|\.3\.|\.3$)", $udata['user_groups']))
         {
            $udata['user_groups'] = str_replace(".3", ".2", $udata['user_groups']);
            $result = dbquery("UPDATE ".DB_USERS." SET user_groups = '".$udata['user_groups']."' WHERE user_id = '".$user_id."'");
         }
         if ($settings['email_verification'] == "1")
         {
            require_once INCLUDES."sendmail_include.php";
            sendemail($udata['user_name'], $udata['user_email'], $settings['siteusername'], $settings['siteemail'], $locale['425']. $settings['sitename'], str_replace("[USER_NAME]", $udata['user_name'], $locale['426']));
         }
         echo "<center>".$locale['424']."<br><br></center>\n";
         redirect(FUSION_SELF.$aidlink);
      }
   }elseif ($_GET['step'] == "delete" && isnum($_GET['user_id'])) {//delete actions from users list
      $udata = dbarray(dbquery("SELECT * FROM ".DB_USERS." WHERE user_id='".$_GET['user_id']."'"));
      if ($udata['user_level'] < 102) {
         $result = dbquery("DELETE FROM ".DB_USERS." WHERE user_id='".$_GET['user_id']."'");
         $result = dbquery("DELETE FROM ".DB_ARTICLES." WHERE article_name='".$_GET['user_id']."'");
         $result = dbquery("DELETE FROM ".DB_COMMENTS." WHERE comment_name='".$_GET['user_id']."'");
         $result = dbquery("DELETE FROM ".DB_MESSAGES." WHERE message_to='".$_GET['user_id']."' OR message_from='".$_GET['user_id']."'");
         $result = dbquery("DELETE FROM ".DB_NEWS." WHERE news_name='".$_GET['user_id']."'");
         $result = dbquery("DELETE FROM ".DB_POLL_VOTES." WHERE vote_user='".$_GET['user_id']."'");
         $result = dbquery("DELETE FROM ".DB_RATINGS." WHERE rating_user='".$_GET['user_id']."'");
         $result = dbquery("DELETE FROM ".DB_SHOUTBOX." WHERE shout_name='".$_GET['user_id']."'");
         $result = dbquery("DELETE FROM ".DB_THREADS." WHERE thread_author='".$_GET['user_id']."'");
         $result = dbquery("DELETE FROM ".DB_POSTS." WHERE post_author='".$_GET['user_id']."'");
         $result = dbquery("DELETE FROM ".DB_THREAD_NOTIFY." WHERE notify_user='".$_GET['user_id']."'");
         $result = dbquery("DELETE FROM ".DB_EXTEND_USERS." WHERE eu_id='".$_GET['user_id']."'");
         echo "<div style='text-align:center'>".$locale['422']."<br /><br /></div>\n";
      }
   }
   
   if (!isset($_GET['status']) || !isnum($_GET['status'])) { $_GET['status'] = "0"; }
   if (isset($_GET['search_text']) && preg_check("/^[-0-9A-Z_@\s]+$/i", $_GET['search_text'])) {
      $user_name = " user_name LIKE '".stripinput($_GET['search_text'])."%' AND";
      $list_link = "search_text=".stripinput($_GET['search_text']);
   } elseif (isset($_GET['sortby']) && preg_check("/^[0-9A-Z]$/", $_GET['sortby'])) {
      $user_name = ($_GET['sortby'] == "all" ? "" : " user_name LIKE '".stripinput($_GET['sortby'])."%' AND");
      $list_link = "sortby=".stripinput($_GET['sortby']);
   } else {
      $user_name = "";
      $list_link = "sortby=all";
      $_GET['sortby'] = "all";
   }
      global $locale;
      global $aidlink;
      $a_pm = "&amp;area=pm&amp;step="; $a_PM = "&area=pm";
      $a_pe = "&amp;area=pe&amp;step="; $a_PE = "&area=pe";
      $a_db = "&amp;area=db&amp;step="; $a_DB = "&area=db";
      $a_inv = "&amp;area=inv&amp;step=edit"; $a_INV = "&area=inv";
      $attention = 0;
   $result = dbquery("SELECT * FROM ".DB_USERS." WHERE".$user_name." user_status='".$_GET['status']."'AND user_level<'104'");
   $rows = dbrows($result);
   if (!isset($_GET['rowstart']) || !isnum($_GET['rowstart'])) $_GET['rowstart'] = 0;
   $result = dbquery("SELECT * FROM ".DB_USERS." WHERE".$user_name." user_status='".$_GET['status']."'AND user_level<'104' ORDER BY user_status DESC, user_name");
   echo "<div style='text-align:center;margin-bottom:10px;'>\n";
   echo "<a href='".FUSION_SELF.$aidlink."&amp;".$list_link."&amp;status=0'>".$locale['417']."</a> ::\n";
   echo "<a href='".FUSION_SELF.$aidlink."&amp;".$list_link."&amp;status=2'>".$locale['418']."</a> ::\n";
   echo "<a href='".FUSION_SELF.$aidlink."&amp;".$list_link."&amp;status=1'>".$locale['419']."</a> ::\n";
   echo "<a href='".FUSION_SELF.$aidlink."&amp;step=add'>".$locale['402']."</a>\n";
   echo "</div>\n";
   if ($rows) {
      $i = 0;
      echo "<table cellpadding='0' cellspacing='1' width='600' class='tbl-border center'>\n<tr>\n";
      echo "<td class='tbl2'><strong>Brugernavn</strong></td>\n";
            if((isset($_GET['group_id']) ? $_GET['group_id'] : "") == 1 OR (isset($_GET['group_id']) ? $_GET['group_id'] : "") == 2)
      echo "<td align='center' width='1%' class='tbl2' style='white-space:nowrap'><b>Tilmeldt</b></td>\n";
            if((isset($_GET['group_id']) ? $_GET['group_id'] : "") == 3 OR (isset($_GET['group_id']) ? $_GET['group_id'] : "") == 2)
      echo "<td align='center' width='1%' class='tbl2' style='white-space:nowrap'><b>Tilbage</b></td>\n";
      echo "<td align='center' width='1%' class='tbl2' style='white-space:nowrap'><strong>Brugergruppe</strong></td>\n";
      echo "<td align='center' width='1%' class='tbl2' style='white-space:nowrap'><strong>Valgmuligheder</strong></td>\n";
    echo "<td align='center' width='1%' class='tbl2' style='white-space:nowrap'><strong>Tilføj/fjern</strong></td>\n";
      echo "</tr>\n";
      
            $tbl = 1;
      $active_status = 0;
      $first_run = 1;
      while ($data = dbarray($result))
      {
         $sql = dbquery("SELECT * FROM ".DB_USER_GROUPS." ORDER BY group_order ASC");
         $_GET['group_list'] .= "<option value='' style='color:#000000;'></option>\n";
         while($group_data = dbarray($sql))
         {
            if (preg_match("(^\.{$group_data['group_id']}|\.{$group_data['group_id']}\.|\.{$group_data['group_id']}$)", $data['user_groups']))
            {
               $_GET['group_member'] .= $group_data['group_name'];
               $_GET['group_list'] .= "<option value='".$data['user_id'].".".$group_data['group_id'].".r' style='color:#00AA00;'>- ".$group_data['group_name']."</option>\n";
            }
            else
            {
               $_GET['group_list'] .= "<option value='".$data['user_id'].".".$group_data['group_id'].".a' style='color:#FF0000;'>+ ".$group_data['group_name']."</option>\n";
            }
         }
         if ((isset($_GET['group_id']) ? $_GET['group_id'] : "") == 1)
         {
            $invoice_alert = dbcount("(faktura_id)", "".DB_FAKTURA."", "faktura_user = '".$data['user_id']."' AND faktura_type = 1");
            if($invoice_alert != 0)
            {
               $attention = 1;
            }         
            $invoice_alert = dbcount("(faktura_id)", "".DB_FAKTURA."", "faktura_deadline < '".mktime(0,0,0, date("m"), date("d"), date("Y"))."' AND faktura_status = 1 AND faktura_user = '".$data['user_id']."' AND faktura_type = 1");
            if($invoice_alert != 0)
            {
               $attention = 2;
            }
            $invoice_alert2 = dbcount("(faktura_id)", "".DB_FAKTURA."", "faktura_deadline < '".mktime(0,0,0, date("m"), date("d")-3, date("Y"))."' AND faktura_status = 1 AND faktura_user = '".$data['user_id']."' AND faktura_type = 1");
            if($invoice_alert2 != 0)
            {
               $attention = 3;
            }
         }
         else
         {
            $invoice_alert = dbcount("(faktura_id)", "".DB_FAKTURA."", "faktura_user = '".$data['user_id']."'");
            if($invoice_alert != 0)
            {
               $attention = 1;
            }         
            $invoice_alert = dbcount("(faktura_id)", "".DB_FAKTURA."", "faktura_deadline < '".mktime(0,0,0, date("m"), date("d"), date("Y"))."' AND faktura_status = 1 AND faktura_user = '".$data['user_id']."'");
            if($invoice_alert != 0)
            {
               $attention = 2;
            }
            $invoice_alert2 = dbcount("(faktura_id)", "".DB_FAKTURA."", "faktura_deadline < '".mktime(0,0,0, date("m"), date("d")-3, date("Y"))."' AND faktura_status = 1 AND faktura_user = '".$data['user_id']."'");
            if($invoice_alert2 != 0)
            {
               $attention = 3;
            }
         }

         if ($data['user_status'] != $active_status)
         {
            if ($first_run == 1)
            {
               $active_status = $data['user_status'];
               unset($first_run);
            }
            else
            {
               $active_status = $data['user_status'];               
               echo "<tr><td class='tbl".$tbl."' colspan='".($group_id == 2 ? 5 : ($group_id == 3 ? 5 : 3))."'><hr /></td></tr>\n";
               $tbl = ($tbl == 1 ? 2 : 1);
            }
         }
         
                  echo "<tr>\n<td class='tbl".$tbl."'>\n";
         echo "&nbsp;&nbsp;&nbsp;<a href='".FUSION_SELF.$aidlink.$a_pe."edit&amp;user_id=".$data['user_id']."' title='".(isset($_GET['eu_name']) ? $_GET['eu_name'] : "")."'>".$data['user_name']."</a>".($data['user_status'] == 0 ? ((isset($_GET['group_id']) ? $_GET['group_id'] : "") != 2 ? " <span class='small2'>(online)</span>" : "") : "")."\n";
         echo "</td>\n";

         $groups = "";
         $user_groups = explode(".", $data['user_groups']);
         $j = 0;
         foreach ($user_groups as $key => $value) {
            if ($value) {
               $groups .= "<a href='../profile.php?group_id=".$value."'>".getgroupname($value)."</a>".($j < count($user_groups)-1 ? ", " : "");
            }
            $j++;
         }
         echo "<td class='$cell_color'>\n".($groups ? $groups : ($data['user_level']==103 ? "Adgang til alle grupper" : "Ingen gruppe"))."</td>\n";
         

      if((isset($_GET['group_id']) ? $_GET['group_id'] : "") == 1 OR (isset($_GET['group_id']) ? $_GET['group_id'] : "") == 2) echo "<td width='1%' class='tbl".$tbl."' style='white-space:nowrap'>".($data['user_current_reg'] > 0 ? ($data['user_pre_reg_time'] > 0 ? floor($data['user_current_reg'])."&nbsp;<a href='".FUSION_SELF.$aidlink."&amp;show_group=".$group_id."&amp;add_time=".$data['user_id']."' title='Aktiver forlængelse' class='side'>(+".floor($data['user_pre_reg_time']).")</a>" : floor($data['user_current_reg'])) : floor($data['user_pre_reg_time']))."</td>\n";
         if((isset($_GET['group_id']) ? $_GET['group_id'] : "") == 1 OR (isset($_GET['group_id']) ? $_GET['group_id'] : "") == 2) echo "<td width='1%' class='tbl".$tbl."' style='white-space:nowrap'>".floor($data['user_reg_time'] > 0 ? floor(($data['user_reg_time'] - mktime(0,0,0, date("m"), date("d"), date("Y")))/86400)-1 : "")."</td>\n";
          echo "<td width='1%' style='white-space:nowrap' class='".(isset($_GET['cell_color']) ? $_GET['cell_color'] : "")."'>\n";

         if (iUSER >= $data['user_level'] && $data['user_id'] != 1)
         {
            if ((isset($_GET['attention']) ? $_GET['attention'] : "") == 1)
            {// betaling ok
               echo "<a href='".FUSION_SELF.$_GET['aidlink'].$_GET['a_inv']."&amp;running=1&amp;user_id=".$data['user_id']."' title='Direkte til Faktura Oversigt' class='side'><img src='".INFUSIONS."faktura_panel/green.gif' alt='' title='Betaling Ok.' /></a>\n";
            }
            elseif ((isset($_GET['attention']) ? $_GET['attention'] : "") == 2)
            {// betaling overskredet
               echo "<a href='".FUSION_SELF.$aidlink.$a_inv."&amp;over=1&amp;user_id=".$data['user_id']."' title='Direkte til Faktura Oversigt' class='side'><img src='".INFUSIONS."faktura_panel/yellow.gif' alt='' title='Betalings frist er lige overskredet! (0-3 dage)' /></a>\n";
            }
            elseif ((isset($_GET['attention']) ? $_GET['attention'] : "") == 3)
            {//betaling meget overskredet
               echo "<a href='".FUSION_SELF.$aidlink.$a_inv."&amp;over=1&amp;user_id=".$data['user_id']."' title='Direkte til Faktura Oversigt' class='side'><img src='".INFUSIONS."faktura_panel/red.gif' alt='' title='Betalings frist overskredet med mere end 3 dage!' /></a>\n";
            }
            else
            {// ingen faktura
               echo "<a href='".FUSION_SELF.$aidlink.$a_inv."&amp;over=1&amp;user_id=".$data['user_id']."' title='Direkte til Faktura Oversigt' class='side'><img src='".INFUSIONS."faktura_panel/grey.gif' alt='' title='Gå til faktura modulet' /></a>\n";
            }
          }

            if ((isset($_GET['group_id']) ? $_GET['group_id'] : "") == 1 OR (isset($_GET['group_id']) ? $_GET['group_id'] : "") == 2)   {
               echo "<a href='".FUSION_SELF.$aidlink.(isset($_GET['a_db']) ? $_GET['a_db'] : "")."edit&amp;user_id=".$data['user_id']."' title='Direkte til Dagbog' class='side' >[D]</a>\n";
               if ($data['user_status'] == "2")
               {// brugeren er ikke aktiveret
                  echo "<a href='".FUSION_SELF.$aidlink.$a_pm."activate&amp;sortby=".(isset($_GET['sortby']) ? $_GET['sortby'] : "")."&amp;rowstart=".(isset($_GET['rowstart']) ? $_GET['rowstart'] : "")."&amp;user_id=".$data['user_id']."' class='side' title='Aktiver Brugeren'>[<span style='color:#009900'>A</span>]</a>\n";
               }
               elseif ($data['user_status'] == "1")
               {// fjern udelukkelse
                  echo "<a href='".FUSION_SELF.$aidlink.$a_pm."ban&amp;act=off&amp;sortby=".(isset($_GET['sortby']) ? $_GET['sortby'] : "")."&amp;rowstart=".(isset($_GET['rowstart']) ? $_GET['rowstart'] : "")."&amp;user_id=".$data['user_id']."' class='side' title='Aktiver Brugeren'>[<span style='color:#009900'>A</span>]</a>\n";
               }
            }

     
     $tbl = ($tbl == 1 ? 2 : 1);
         if ($data['user_level'] < 102) echo "[<a href='".FUSION_SELF.$aidlink."&amp;step=edit&amp;user_id=".$data['user_id']."'>R</a>]\n";
         if ($data['user_status'] == "2") {
            echo "- <a href='".FUSION_SELF.$aidlink."&amp;step=activate&amp;".$list_link."&amp;status=".$_GET['status']."&amp;rowstart=".$_GET['rowstart']."&amp;user_id=".$data['user_id']."'>".$locale['407']."</a>\n";
         } elseif ($data['user_status'] == "1") {
            echo "- <a href='".FUSION_SELF.$aidlink."&amp;step=ban&amp;act=off&amp;".$list_link."&amp;status=".$_GET['status']."&amp;rowstart=".$_GET['rowstart']."&amp;user_id=".$data['user_id']."'>".$locale['408']."</a>\n";
         } else {// START udeluk brugeren
            if ($data['user_level'] < 102) echo "- <a href='".FUSION_SELF.$aidlink."&amp;step=ban&amp;act=on&amp;".$list_link."&amp;status=".$_GET['status']."&amp;rowstart=".$_GET['rowstart']."&amp;user_id=".$data['user_id']."' class='side' title='udeluk brugeren'>[<span style='color:#AA0000'>U</span>]</a>\n";
         } // END udeluk brugeren
         if ($data['user_level'] < 102) echo "- <a href='".FUSION_SELF.$aidlink."&amp;step=delete&amp;".$list_link."&amp;status=".$_GET['status']."&amp;rowstart=".$_GET['rowstart']."&amp;user_id=".$data['user_id']."' onclick='return DeleteMember();' title='Slet bruger' class='side'>[<span style='color:#AA0000'>X</span>]</a>";
         echo "</td>\n";

         $return_path = str_replace("=", "*", FUSION_QUERY);
         $return_path = str_replace("&", "|", $return_path);
         if ((isset($_GET['group_id']) ? $_GET['group_id'] : "") == 2)
         {
            $perform = $data['user_id'];
            echo "<td class='tbl".(isset($_GET['tbl']) ? $_GET['tbl'] : "")."'><a href='".FUSION_SELF.$aidlink.$a_pm."activate&amp;sortby=".(isset($_GET['sortby']) ? $_GET['sortby'] : "")."&amp;rowstart=".(isset($_GET['rowstart']) ? $_GET['rowstart'] : "")."&amp;user_id=".$data['user_id']."' onClick='return aktiverBruger();'>Aktiver</a></td>\n";
         }
         else
         {
            echo "<td class='tbl".(isset($_GET['tbl']) ? $_GET['tbl'] : "")."'><select name='user_group' class='textbox' onChange=\"return userGroup( this.options[this.selectedIndex].value );\" style='width:110px;'>".(isset($_GET['group_list']) ? $_GET['group_list'] : "")."</select></td>\n";
         }
         unset($group_member);
         unset($group_list);
         unset($attention);
         echo "</td>\n</tr>\n";$i++;
}
    echo "</table>\n";

}
      if (isset($_GET['status']) && $_GET['status'] == "0") { $user_types = ""; }
      elseif (isset($_GET['status']) && $_GET['status'] == "1") { $user_types = $locale['419']; }
      elseif (isset($_GET['status']) && $_GET['status'] == "2") { $user_types = $locale['418']; }
      
      if (isset($_GET['search_text']) && preg_check("/^[-0-9A-Z_@\s]+$/i", $_GET['search_text'])) {
         echo "<div style='text-align:center'><br />".sprintf($locale['411'], $user_types).$locale['413']."'".stripinput($_GET['search_text'])."'<br /><br />\n</div>\n";
      } else {
         echo "<div style='text-align:center'><br />".sprintf($locale['411'], $user_types).($_GET['sortby'] == "all" ? "" : $locale['412'].$_GET['sortby']).".<br /><br />\n</div>\n";
      }
   $alphanum = array(
      "A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R",
      "S","T","U","V","W","X","Y","Z","0","1","2","3","4","5","6","7","8","9"
   );
   echo "<table cellpadding='0' cellspacing='1' class='tbl-border center' style='margin-top:10px;'>\n<tr>\n";
   echo "<td rowspan='2' class='tbl2'><a href='".FUSION_SELF.$aidlink."&amp;sortby=all&amp;status=".(isset($_GET['status']) ? $_GET['status'] : "")."'>".$locale['414']."</a></td>";
   for ($i=0;$i < 36;$i++) {
      echo "<td align='center' class='tbl1'><div class='small'><a href='".FUSION_SELF.$aidlink."&amp;sortby=".$alphanum[$i]."&amp;status=".(isset($_GET['status']) ? $_GET['status'] : "")."'>".$alphanum[$i]."</a></div></td>";
      echo ($i==17 ? "<td rowspan='2' class='tbl2'><a href='".FUSION_SELF.$aidlink."&amp;sortby=all&amp;status=".(isset($_GET['status']) ? $_GET['status'] : "")."'>".$locale['414']."</a></td>\n</tr>\n<tr>\n" : "\n");
   }
   echo "</tr>\n</table>\n";
   echo "<hr />\n<form name='searchform' method='get' action='".FUSION_SELF."'>\n";
   echo "<div style='text-align:center'>\n";
   echo "<input type='hidden' name='aid' value='".iAUTH."' />\n";
   echo "<input type='hidden' name='status' value='".(isset($_GET['status']) ? $_GET['status'] : "")."' />\n";
   echo $locale['415']." <input type='text' name='search_text' class='textbox' style='width:150px'/>\n";
   echo "<input type='submit' name='search' value='".$locale['416']."' class='button' />\n";
   echo "</div>\n</form>\n";
   closetable();
   if ($rows > 20) echo "<div align='center' style='margin-top:5px;'>\n".makepagenav($_GET['rowstart'],20,$rows,3,FUSION_SELF.$aidlink."&amp;".$list_link."&amp;status=".$_GET['status']."&amp;")."\n</div>\n";
   echo "<script type='text/javascript'>"."\n"."function DeleteMember(username) {\n";
   echo "return confirm('".$locale['423']."');\n}\n</script>\n";
   
   }
require_once THEMES."templates/footer.php";
?>
0 replies

Category Forum

User Administration - 8

Labels

None yet

Statistics

  • Views 0 views
  • Posts 7 posts
  • Votes 0 votes
  • Topic users 2 members

2 participants

I
I
iunruh 10
  • Member, joined since
  • Contributed 148 posts on the community forums.
  • Started 15 threads in the forums
J
J
jannik 10
  • Member, joined since
  • Contributed 80 posts on the community forums.
  • Started 26 threads in the forums
  • Started this discussions

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet