Location: PHPKode > projects > lcdata > lcdata-0.0.1/frontend-web/frmusers.php3
<?
$frm_color='c0c0a0';

include 'includes/funktions.php';

//error_reporting(1);
$conn = connectdb();
getuserdaten();

require 'includes/labels.php';

dohistory("frmusers.php3");

if (($doadd==true)){
  if (gidhasright("$gidfrmusr1",$Rfrmadd)){
	header("Location: frmuserdetail.php3?$dummy&doadd=true&edit=true&burl=frmusers.php3");
  }
}
if (($doaddgroup==true)){
  if (gidhasright("$gidfrmusr1",$Rfrmadd)){
	header("Location: frmgroupdetail.php3?$dummy&doadd=true&edit=true&burl=frmusers.php3");
  }
}

print ("<html>".
"<head></head>".
"<body bgcolor=\"#$frm_color\">".
"<center><h3>$lb_user</h3>");


if ($usrd->ku_remember==1){

    if (empty($filtera)){ 
      $filtera=$usrd->us_rem_usr1_filtera;
      $filtera_v=$usrd->us_rem_usr1_filtera_v;
      $verknuepf=$usrd->us_rem_usr1_verknuepf;
      $filterb=$usrd->us_rem_usr1_filterb;
      $filterb_v=$usrd->us_rem_usr1_filterb_v;
      $sort=$usrd->us_rem_usr1_sort;
      $sort_d=$usrd->us_rem_usr1_sort_d;
      $sort2=$usrd->us_rem_usr1_sort2;
      $sort2_d=$usrd->us_rem_usr1_sort2_d;
    }
    else {
     SQL_exec ($conn, "UPDATE users set us_rem_usr1_filtera='$filtera', us_rem_usr1_filtera_v='$filtera_v', us_rem_usr1_verknuepf='$verknuepf', us_rem_usr1_filterb='$filterb', us_rem_usr1_filterb_v='$filterb_v', us_rem_usr1_sort='$sort', us_rem_usr1_sort_d='$sort_d', us_rem_usr1_sort2='$sort2', us_rem_usr1_sort2_d='$sort2_d' WHERE us_id='$usrd->us_id'");
    }

}



  print "<form action=\"frmusers.php3\" Method=\"POST\">\n";
  print "<table border=0 cellspacing=0>\n";
  print "<tr>\n";
       
        
  if (empty($filtera)) $filtera="(ku_userid=*)";
   $filtera=stripslashes($filtera);
   print "<td><b>$lb_select</b><select name=\"filtera\" size=1\">";
   auswahl  ($filtera,"(ku_userid=*)","$lb_cusunr");
   auswahl  ($filtera,"((lower(ad_name1) LIKE '*%') OR (lower(ad_alias) LIKE '*%'))",$lb_firmname);
   auswahl  ($filtera,"(lower(pe_pname) LIKE '*%' OR (lower(pe_sname) LIKE '*%'))",$lb_cperson);
   auswahl  ($filtera,"(lower(pe_position) LIKE '*%')",$lb_p_position);
   auswahl  ($filtera,"(lower(pe_email) LIKE '*%')",$lb_email);
   print "</select></td>\n";
   print "<td><input type=\"text\" name=\"filtera_v\" size=\"20\" value=\"$filtera_v\"></td>";
   $filter1=str_replace("*","$filtera_v",$filtera);
   if ($filter1=="(ku_userid=)") $filter1=" ";
   if ($filter1!=" ") $filter1="WHERE $filter1";

   if (empty($verknuepf)) $verknuepf=" AND";
   print "<td><select name=\"verknuepf\" size=1\">";
   auswahl ($verknuepf," AND","$lb_and");
   auswahl ($verknuepf," OR","$lb_or");
   print "</select></td>\n";
   $verknuepf1="";
   if ($filter1!=" ") $verknuepf1=$verknuepf;
		     


  if (empty($filterb)) $filterb="(ku_name=*)";
  $filterb=stripslashes($filterb);
  print "<td><select name=\"filterb\" size=1\">";
  auswahl  ($filterb,"(ku_name=*)","$lb_name");
  auswahl  ($filterb,"((lower(ad_name1) LIKE '*%') OR (lower(ad_alias) LIKE '*%'))",$lb_firmname);
  auswahl  ($filterb,"(lower(pe_pname) LIKE '*%' OR (lower(pe_sname) LIKE '*%'))",$lb_cperson);
  auswahl  ($filterb,"(lower(pe_position) LIKE '*%')",$lb_p_position);
  auswahl  ($filterb,"(lower(pe_email) LIKE '*%')",$lb_email);   

  print "</select></td>\n";
  print "<td><input type=\"text\" name=\"filterb_v\" size=\"20\" value=\"$filterb_v\"></td>";
  $filter2=str_replace("*","$filterb_v",$filterb);
  if ($filter2=="(ku_name=)") $filter2=" ";
  if (($filter1==" ") && ($filter2!=" ")) $filter2="WHERE $filter2";
  if ($filter2==" ") $verknuepf1=" ";


  print "</tr>\n</table>\n";
  

  print "<table>\n";
  print "<tr>\n";
  if (empty($sort)) $sort="ORDER BY ku_isgroup";
  if (empty($sort_d)) $sort_d=" ";
 
  print "<td><b>$lb_sort</b><select name=\"sort\" size=1 onChange=\"this.form.submit()\">";
  auswahl  ($sort,"ORDER BY ku_isgroup","$lb_is_group");
  auswahl  ($sort,"ORDER BY ku_userid",$lb_userid);
  auswahl  ($sort,"ORDER BY lower(ku_name)",$lb_name);    
  print "</select></td>\n";
		        
  print "<td><select name=\"sort_d\" size=1 onChange=\"this.form.submit()\">";
  auswahl ($sort_d," ","$lb_up");
  auswahl ($sort_d," DESC","$lb_down");
  print "</select></td>\n";
				 
  if ($sort2==" ") $sort2_d =" ";
  if (empty($sort2)) $sort2=", ku_userid";
  if (empty($sort2_d)) $sort2_d=" ";
      
  print "<td><b>$lb_sort2</b><select name=\"sort2\" size=1 onChange=\"this.form.submit()\">";
  auswahl  ($sort2," ","---");
  auswahl  ($sort2,", ku_isgroup","$lb_is_group");
  auswahl  ($sort2,", ku_userid",$lb_userid);
  auswahl  ($sort2,", lower(ku_name)",$lb_name);  
  print "</select></td>\n";
		       
        
  print "<td><select name=\"sort2_d\" size=1 onChange=\"this.form.submit()\">";
  auswahl ($sort2_d," ","$lb_up");
  auswahl ($sort2_d," DESC","$lb_down");
  print "</select></td>\n";                                                                                                       
  print "<td><input type=submit name=\"dosearch\" value=\"$lb_search\" ></td>\n";
  if (gidhasright("$gidfrmper1",$Rfrmadd)){
    print "<td> <input type=submit name=\"doadd\" value=\"USER anlegen\" ></td>\n";
  }
  if (gidhasright("$gidfrmper1",$Rfrmadd)){
    print "<td> <input type=submit name=\"doaddgroup\" value=\"GRUPPE anlegen\" ></td>\n";
  }
  print "</tr>\n</table>\n";                                                                                                       
  print "</form>\n";
   
 print "<table border=0><tr>\n";
 print "<th width=\"100\" bgcolor=\"#$frm_color_head\">$lb_id</th>\n";
 print "<th width=\"100\" bgcolor=\"#$frm_color_head\">$lb_name</th>\n"; 
 print "<th width=\"100\" bgcolor=\"#$frm_color_head\">$lb_pname</th>\n"; 
 print "<th width=\"100\" bgcolor=\"#$frm_color_head\">$lb_sname</th>\n";
 print "<th width=\"100\" bgcolor=\"#$frm_color_head\">$lb_email</th></tr>\n";

 $sql= "SELECT ku_lasttime as lasttime FROM known_users $filter1 $verknuepf1 $filter2 ORDER BY ku_lasttime DESC";
 timerefresh('kunden_page',"$sql");

  $sql= "SELECT * FROM known_users $filter1 $verknuepf1 $filter2 $sort $sort_d $sort2 $sort2_d";
  $result = SQL_exec ($conn,$sql);     

  $treffer=0; 
  for($row=0;$row<pg_numrows( $result );$row++){
    $data = pg_fetch_object ($result, $row);
    if (gidhasright("$data->ku_gid",$Rgidsee)){	  
          if($treffer%2){
            $frm_color_row=$frm_color_row1;
          }
	  else{
	    $frm_color_row=$frm_color_row2;
	  }   
          $treffer++;
			  
	  print "<tr>\n";
	  print "<td bgcolor=\"#$frm_color_row\">$data->ku_userid&#160;</a></td>\n"; 
	  print "<td bgcolor=\"#$frm_color_row\">";
 
          if ($data->ku_isgroup==1){
            if (gidhasright("$data->ku_gid",$Rgidopen))  print "<a href=\"frmgroupdetail.php3?$dummy&userid=$data->ku_userid&burl=frmusers.php3\" target=\"mainframe\">";
            print "$data->ku_name&#160";
            if (gidhasright("$data->ku_gid",$Rgidopen)) print "</a>";
          }
          else{
            if (gidhasright("$data->ku_gid",$Rgidopen))  print "<a href=\"frmuserdetail.php3?$dummy&userid=$data->ku_userid&burl=frmusers.php3\" target=\"mainframe\">";
            print "$data->ku_name&#160";
            if (gidhasright("$data->ku_gid",$Rgidopen)) print "</a>";
          }

          print "</td>\n";
	  print "<td bgcolor=\"#$frm_color_row\">$data->ku_pname&#160;</td>\n";
	  print "<td bgcolor=\"#$frm_color_row\">$data->ku_sname&#160;</td>\n";
	  print "<td bgcolor=\"#$frm_color_row\"><a href=\"mailto:$data->ku_email\">$data->ku_email</a>&#160;</td>\n";
          print "</tr>\n";
      }
    }

    if ($treffer==0){
      print "<tr><td> nichts gefunden</td></tr>";
    }
	
    print "</table>\n<br><br>\n";
   
	print ("</center></body></html>");

?>




Return current item: lcdata