$vPhone = $vPhone1 . "-" . $vPhone2 . "-" . $vPhone3; //$vMobile = $vMobile1."-".$vMobile2."-".$vMobile3; //$vFax = $vFax1."-".$vFax2."-".$vFax3; $Data = array_merge($Data, array("vPhone" => $vPhone)); $Data['vMobile'] = $_POST['vMobileCode'] . "-" . $Data['vMobile']; //$Data = array_merge($Data,array("vPhone" => $vPhone,"vMobile" => $vMobile,"vFax" => $vFax)); /** This is for Check Duplicate Record------------------------------------------- */ $generalobj->getRequestVars(); $redirect_file = "index.php?file={$file}&view={$view}&iAdminId={$iAdminId}"; $generalobj->checkDuplicate('iAdminId', PRJ_DB_PREFIX . "_administrator", array('vUsername' => $Data['vUsername'], 'vEmail' => $Data['vEmail']), $redirect_file, USER_ALREADY_EXISTS, $iAdminId); if ($view == "add") { $Data['dDate'] = date("Y-m-d H:i:s"); $Data['vFromIP'] = $_SERVER[REMOTE_ADDR]; $Data['vPassword'] = $vPassword; //prints($Data);exit; $adminUserObj->setAllVar($Data); $id = $adminUserObj->insert(); if ($id) { $var_msg = "Record Added Successfully."; $eml = $Data['vEmail']; unset($Data); // dpr email for duplication of email in rec if ($dupl == 'dpl') { $emailArr = $adminUserObj->getDetails('vFirstName,vLastName,vEmail', " AND iAdminID !='" . $iAdminID . "'"); $link = SITE_URL_DUM . "b2badmin/index.php?file=ge-admin&view=edit&iAdminId=" . $id; for ($i = 0; $i < count($emailArr); $i++) { $smname = $emailArr[$i]['vFirstName'] . ' ' . $emailArr[$i]['vLastName']; $email = $emailArr[$i]['vEmail']; //set the values of the body of email format $body_arr = array("#NAME#", "#REC#", "#EMAIL#", "#LINK#", "#MAIL_FOOTER#", "#SITE_URL#"); $post_arr = array($smname, 'Admin', $eml, $link, $MAIL_FOOTER, SITE_URL_DUM);