Merge branch 'bug-1010' into release
[cacert-devel.git] / includes / account.php
index 2addca1..f28cf49 100644 (file)
 
                        $query = "insert into `orgemailcerts` set
                                                `CN`='$defaultemail',
+                                               `ou`='".$_SESSION['_config']['OU']."',
                                                `keytype`='NS',
                                                `orgid`='".$org['orgid']."',
                                                `created`=FROM_UNIXTIME(UNIX_TIMESTAMP()),
 
                        $query = "insert into `orgemailcerts` set
                                                `CN`='$defaultemail',
+                                               `ou`='".$_SESSION['_config']['OU']."',
                                                `keytype`='" . sanitizeHTML($_REQUEST['keytype']) . "',
                                                `orgid`='".$org['orgid']."',
                                                `created`=FROM_UNIXTIME(UNIX_TIMESTAMP()),
                                $query = "insert into `orgemailcerts` set
                                                `orgid`='".$row['orgid']."',
                                                `CN`='".$row['CN']."',
+                                               `ou`='".$row['ou']."',
                                                `subject`='".$row['subject']."',
                                                `keytype`='".$row['keytype']."',
                                                `csr_name`='".$row['csr_name']."',
                exit;
        }
 
+       if($oldid == 18 && array_key_exists('filter',$_REQUEST) && $_REQUEST['filter']!= "")
+       {
+               $id=18;
+               $_SESSION['_config']['orgfilterid']=$_REQUEST['orgfilterid'];
+               $_SESSION['_config']['sorting']=$_REQUEST['sorting'];
+               $_SESSION['_config']['status']=$_REQUEST['status'];
+       }
+
+       if($oldid == 18 && array_key_exists('reset',$_REQUEST) && $_REQUEST['reset']!= "")
+       {
+               $id=18;
+               $_SESSION['_config']['orgfilterid']=0;
+               $_SESSION['_config']['sorting']=0;
+               $_SESSION['_config']['status']=0;
+       }
 
        if($process != "" && $oldid == 20)
        {
                exit;
        }
 
+       if($oldid == 22 && array_key_exists('filter',$_REQUEST) && $_REQUEST['filter']!= "")
+       {
+               $id=22;
+               $_SESSION['_config']['dorgfilterid']=$_REQUEST['dorgfilterid'];
+               $_SESSION['_config']['dsorting']=$_REQUEST['dsorting'];
+               $_SESSION['_config']['dstatus']=$_REQUEST['dstatus'];
+       }
+
+       if($oldid == 22 && array_key_exists('reset',$_REQUEST) && $_REQUEST['reset']!= "")
+       {
+               $id=22;
+               $_SESSION['_config']['dorgfilterid']=0;
+               $_SESSION['_config']['dsorting']=0;
+               $_SESSION['_config']['dstatus']=0;
+       }
+
 
        if(($id == 24 || $oldid == 24 || $id == 25 || $oldid == 25 || $id == 26 || $oldid == 26 ||
                $id == 27 || $oldid == 27 || $id == 28 || $oldid == 28 || $id == 29 || $oldid == 29 ||