示例#1
0
 function zb_AnnihilateUser($login)
 {
     global $billing;
     $alter_conf = rcms_parse_ini_file(CONFIG_PATH . "alter.ini");
     $user_ip = zb_UserGetIP($login);
     $user_aptdata = zb_AddressGetAptData($login);
     @($user_aptid = $user_aptdata['aptid']);
     zb_AddressDeleteApartment($user_aptid);
     zb_AddressOrphanUser($login);
     zb_UserDeleteEmail($login);
     zb_UserDeleteNotes($login);
     zb_UserDeletePhone($login);
     zb_UserDeleteRealName($login);
     zb_UserDeleteSpeedOverride($login);
     if (!$alter_conf['STRICT_CONTRACTS_PROTECT']) {
         zb_UserDeleteContract($login);
     }
     zb_VserviceCashClear($login);
     log_register("DELETE VCASH (" . $login . ")");
     cf_FlushAllUserCF($login);
     zb_FlushAllUserTags($login);
     vlan_delete_host($login);
     multinet_delete_host($user_ip);
     multinet_rebuild_all_handlers();
     //destroy stargazer user
     $billing->deleteuser($login);
     log_register("StgUser DELETE (" . $login . ")");
 }
示例#2
0
 }
 if (wf_CheckGet(array('ajaxapt'))) {
     ajax_AptCreationForm();
 }
 if (wf_CheckGet(array('ajaxip'))) {
     ajax_IpEditForm($_GET['ajaxip']);
 }
 //main code part
 if (wf_CheckGet(array('username'))) {
     $login = $_GET['username'];
     //making this user homeless
     if (wf_CheckGet(array('orphan'))) {
         $deleteaddrdata = zb_AddressGetAptData($login);
         $deleteatpid = $deleteaddrdata['aptid'];
         zb_AddressOrphanUser($login);
         zb_AddressDeleteApartment($deleteatpid);
         rcms_redirect("?module=expresscard&username=" . $login);
     }
     //new address creation
     if (wf_CheckPost(array('citybox', 'streetbox', 'buildbox', 'createapt'))) {
         $apt = $_POST['createapt'];
         @($entrance = $_POST['createentrance']);
         @($floor = $_POST['createfloor']);
         $buildid = $_POST['buildbox'];
         zb_AddressCreateApartment($buildid, $entrance, $floor, $apt);
         $newaptid = zb_AddressGetLastid();
         zb_AddressCreateAddress($login, $newaptid);
     }
     //existing address modify
     if (wf_CheckPost(array('editapt'))) {
         $changeaptdata = zb_AddressGetAptData($login);