function del_account($row)
 {
     $ac_id = (int) $row['account_id'];
     if (!$ac_id) {
         return;
     }
     define('plain_page', 1);
     $db =& $GLOBALS['phpgw']->db;
     $server =& $GLOBALS['phpgw_info']['server'];
     require $server['files_dir'] . "/fudforum/" . sprintf("%u", crc32($GLOBALS['phpgw_info']['user']['domain'])) . "/include/GLOBALS.php";
     if (!empty($server['use_adodb']) || empty($db->Link_ID) || !is_resource($db->Link_ID)) {
         // open your own connection, as ADOdb does not export the use Link_ID
         switch ($server['db_type']) {
             case 'mysql':
                 $func = $server['db_persistent'] ? 'mysql_pconnect' : 'mysql_connect';
                 define('fud_sql_lnk', $func($db->Host, $db->User, $db->Password));
                 mysql_select_db($db->Database, fud_sql_lnk);
                 break;
             case 'pgsql':
                 $func = $server['db_persistent'] ? 'pg_pconnect' : 'pg_connect';
                 define('fud_sql_lnk', $func('dbname=' . $db->Database . ' host=' . $db->Host . ' user='******' password='******'FUDforum only supports mysql or pgsql !!!');
         }
         unset($func);
     } else {
         define('fud_sql_lnk', $db->Link_ID);
     }
     fud_use('db.inc');
     fud_use('private.inc');
     fud_use('users_reg.inc');
     fud_use('users_adm.inc', true);
     $GLOBALS['DBHOST_TBL_PREFIX'] = 'phpgw_fud_';
     $id = q_singleval("SELECT id FROM phpgw_fud_users WHERE egw_id=" . $ac_id);
     if ($id) {
         usr_delete($id);
     }
 }
예제 #2
0
             $tpl->assign('selected_evt_filter', $_REQUEST['evt_filter']);
             $tpl->display("evt.tpl");
             break;
     }
     break;
 case "deleteUsr":
     // set the trashflag of a user
     switch ($axValue) {
         case 0:
             // Fire JavaScript confirm when a user is about to be deleted
             echo $kga['lang']['sure'];
             break;
         case 1:
             // If the confirmation is returned the user gets the trash-flag.
             // TODO: Users with trashflag can be deleted by 'empty trashcan' or so ...
             usr_delete($id);
             break;
     }
     break;
 case "deleteGrp":
     // set the trashflag of a group
     switch ($axValue) {
         case 0:
             // Fire JavaScript confirm when a group is about to be deleted
             echo $kga['lang']['sure'];
             break;
         case 1:
             // If the confirmation is returned the group gets the trash-flag.
             // TODO: Users with trashflag can be deleted by 'empty trashcan' or so ...
             grp_delete($id);
             break;