'.$smenu.'   '; $createdata .= '
'; unset($accounts); $accounts = getaccounts(); include_once("integrateinclude.html"); if (isset($Delete_x)) { for ($i = 0; $i < count($item); $i++) { $index = getaccountindex($accounts, $item[$i]); if ($index) { $accounts[$index - 1]["DELETED"] = true; } if ($integrate) $result = integratedeleteuser($accounts[$index - 1]["EMAIL"]); } saveaccounts($accounts); $accounts = getaccounts(); } else if (isset($Save_x)) { $message = ""; if (($accountname == "") || (strpos($accountname, " ") <> 0)) $message = ", \"Account Name\""; if ($accountpass == "") $message .= ", \"Password\""; if (!$integrate && $email == "") $message .= ", \"E-mail\""; if ($message !== "") { $message = $emptyfields["MESSAGE"] . $message; $createdata .='
'; $skindata['message'] = showmessage($message, $showmessage_text_backlink, "#", true, $showmessage_errorcolor, false, true, false, 'history.back(); return true;'); $createdata .='


'. copyright(); $skindata['data'] = $createdata; //vypsani stranky echo template( $skin_dir . 'skin.tpl', $skindata); die(); } if ($accountpass <> $accountpassconfirm) { $createdata .='
'; $skindata['message'] = showmessage($passwordnotconfirmed, $showmessage_text_backlink, "#", true, $showmessage_errorcolor, true, true, false, "history.back(); return true;"); $createdata .= $signuppage_error_endhtml; $skindata['data'] = $createdata; //vypsani stranky echo template( $skin_dir . 'skin.tpl', $skindata); die(); } if ($accountid != "") { $index = getaccountindex($accounts, $accountid); if ($index) $account = $accounts[$index - 1]; } $account["USER"] = $accountname; $oldpass = $account["PASS"]; $account["PASS"] = $accountpass; $account["EMAIL"] = $email; $account["FULLNAME"] = $fullname; if($integrate) { if(!$xxadmin && $xadmin==1) $xadmin=2; elseif($xadmin==1) $xadmin= ($xxadmin==1?1:2); else $xadmin=0; } $account["ADMIN"] = $xadmin; if ($accountid == "" || (!$integrate && !$accountid !== "")) { if($protocol && !ereg(":",$host)) $host.=':143'; if($protocol && $acfolder) $host.=','.$acfolder; elseif($protocol) $host.=',INBOX'; $account["HOST"] = $host; } if (($accountid == "") || ((!($integrate)) && (!($accountid == "")))) $account["HOSTUSER"] = $hostuser; if (($accountid == "") || ((!($integrate)) && (!($accountid == "")))) $account["HOSTPASS"] = $hostpass; $account["DELETE"] = ($leave == ""); $account["REPLYTO"] = $reply; $account["FULLHEADER"] = $headers; $account["MULTI"] = $multiple; $account["ATTACH"] = $attach; $account["DELETESERVER"] = $deleteserver; $account["NOQUOTA"] = $xnodiskquota; $account["UIDLDELETE"] = $uidldelete; if ($accountid == "") { if ($otherconfig["FULLMERAK"]) { list($fdomain, $username) = explode("/", $accountname); if (!($username)) { list($fdomain) = explode(";", $domain); $username = $accountname; } $xdomain = ""; if ($fdomain) $xdomain = "@" . $fdomain; $result = integrateadduser($username . $xdomain, $fullname, $accountpass); if (!$result) { $createdata .='
'; $skindata['message'] = showmessage(webmailcomfailure, $showmessage_text_backlink, "#", true, $showmessage_errorcolor, false, true, false, "history.back(); return true;"); $createdata .='

'. copyright(); $skindata['data'] = $createdata; //vypsani stranky echo template( $skin_dir . 'skin.tpl', $skindata); die(); } } if (getnewaccountid($accounts, $account["USER"])) $accounts[] = $account; else { $createdata .='
'; $skindata['message'] = showmessage($alreadyexists, $showmessage_text_backlink, "#", true, $showmessage_errorcolor, false, true, false, "history.back(); return true;"); $createdata .='

'. copyright(); $skindata['data'] = $createdata; //vypsani stranky echo template( $skin_dir . 'skin.tpl', $skindata); die(); } } else { if ($index) $accounts[$index - 1] = $account; if ($otherconfig["FULLMERAK"]) integratechangeuser($account["EMAIL"], $oldpass, $accountpass, $account["FULLNAME"]); } saveaccounts($accounts); } if (count($accounts) > 0) { $arrsort=getsort(); if($sort) { $arrsort['ACCOUNTS']=$sort; setsort($arrsort); } $sort=($arrsort['ACCOUNTS']?$arrsort['ACCOUNTS']:'name'); function accountcompare($a, $b) { global $sort; $x=1; switch($sort) { CASE "name": $index = "USER"; break; CASE "full": $index = "FULLNAME"; break; CASE "email": $index = "EMAIL"; break; CASE "namez": $index = "USER"; $x=-1; break; CASE "fullz": $index = "FULLNAME"; $x=-1; break; CASE "emailz": $index = "EMAIL"; $x=-1; break; } return (strcasecmp($a[$index],$b[$index])*$x); } usort($accounts, "accountcompare"); $createdata .='
'; for ($i = 0; $i < count($accounts); $i++) { if ($i % 2 == 0) $bgcolor = 'readmail_sort_ar'; else $bgcolor = 'readmail_sort_br'; $createdata .=' '; } $createdata .='
'. $lang[MSG_ACCOUNTNAME].''.($showlite?'':' ').' '. $lang[MSG_FULLNAME] .''.($showlite?'':' ').' '. $lang[MSG_EMAILADDR].''.($showlite?'':' ').'
'. htmlspecialchars($accounts[$i]["USER"]).' '; $text = $accounts[$i]["FULLNAME"]; if ($text == "") { $createdata .=' ' ; } else { $createdata .=htmlspecialchars($text); } $createdata .=' '. getemail($accounts[$i]["EMAIL"], "", true).'
'; } else { $createdata .= showmessage("



". $noitems . "


", "", "", false, "", false, false, true); } $createdata .='

'; if($showlite!=2) $createdata.= copyright().'
'; $skindata['data'] = $createdata; //vypsani stranky if($showlite) echo template( $skin_dir . 'settings.tpl', $skindata); else echo template( $skin_dir . 'skin.tpl', $skindata); ?>