init
This commit is contained in:
20
modules/Accounts/multidelete.php
Normal file
20
modules/Accounts/multidelete.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
if($_REQUEST['mass']!=""){
|
||||
$ids=$_REQUEST['mass'];
|
||||
|
||||
$accounts = new Account();
|
||||
$accounts=$accounts->get_full_list("", "accounts.id in ('".implode("','",$ids)."')");
|
||||
|
||||
foreach ($accounts as $account){
|
||||
$account->mark_deleted($account->id);
|
||||
$r=$db->query("select * from accounts_contacts where account_id='".$account->id."'");
|
||||
while($dane=$db->fetchByAssoc($r)){
|
||||
$db->query("delete from contacts where id='".$dane['contact_id']."'");
|
||||
$db->query("delete from accounts_contacts where id='".$dane['id']."'");
|
||||
}
|
||||
}
|
||||
|
||||
header("Location: index.php?module=Accounts&action=index");
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user