$template->assign("templates", $templates); $template->display("editsettings.tpl"); } elseif ($action == "editsets") { $theme = getArrayVal($_POST, "theme"); if ($theset->editSettings($name, $subtitle, $locale, $timezone, $dateformat, $templ, $theme, $rssuser, $rsspass)) { $handle = opendir($template->compile_dir); while (false !== ($file = readdir($handle))) { if ($file != "." and $file != "..") { unlink(CL_ROOT . "/" . $template->compile_dir . "/" . $file); } } $_SESSION["userlocale"] = $locale; $users = $user->getAllUsers(100000); foreach ($users as $theuser) { // set the new locale for all the users $user->edit($theuser["ID"], $theuser["name"], $theuser["realname"], $theuser["email"], $theuser["tel1"], $theuser["tel2"], $theuser["company"], $theuser["zip"], $theuser["gender"], $theuser["url"], $theuser["adress"], $theuser["adress2"], $theuser["state"], $theuser["country"], $theuser["tags"], $locale, "", $theuser["rate"]); } header("Location: admin.php?action=system&mode=edited"); } } elseif ($action == "editmailsets") { $status = getArrayVal($_POST, "mailstatus"); $mailfrom = getArrayVal($_POST, "mailfrommail"); $mailfromname = getArrayVal($_POST, "mailfromname"); $method = getArrayVal($_POST, "mailmethod"); $server = getArrayVal($_POST, "server"); $mailuser = getArrayVal($_POST, "mailuser"); $mailpass = getArrayVal($_POST, "mailpass"); if ($theset->editMailsettings($status, $mailfrom, $mailfromname, $method, $server, $mailuser, $mailpass)) { header("Location: admin.php?action=system&mode=edited"); } }