function main($itsp) { include_once "dwoo/dwooAutoload.php"; $displayNewUserForm = 1; $emailsent = ""; $reset = $itsp->bUrl->getGP("s"); $username = $itsp->bUrl->getGP("u"); $showform = 1; $errormsg = ""; if ($_POST["reset"]) { include_once "user_backend.php"; $user = new user_backend("reset"); if ($user->setNewPassword($_POST["reset"], $_POST["password"])) { $showform = 0; $tpl = new Dwoo_Template_File('templates/setnewpassword1.tpl'); $dwoo = new Dwoo(); $markerArray = templateArray(); $output = $dwoo->get($tpl, $markerArray); print $output; exit; } else { $errormsg = "Please enter a valid password"; } } if ($reset != "" && $username != "" && $showform) { $tpl = new Dwoo_Template_File('templates/setnewpassword.tpl'); $dwoo = new Dwoo(); $markerArray = templateArray(); $markerArray["url"] = $_SERVER["REQUEST_URI"]; $markerArray["reset"] = $reset; $markerArray["errormsg"] = $errormsg; $output = $dwoo->get($tpl, $markerArray); print $output; } }
function newUrl($destination, $params, $inclhostname = 0, $addhash = 1) { if (config::prettyurls) { $url = str_replace(" ", "", $destination); } else { $url = "?"; } foreach ($params as $key => $value) { if (strstr($key, "__")) { if (config::prettyurls) { $params["{$key}"] = $value; } else { $url .= "&{$key}={$value}"; } } else { $value = str_replace(" ", "", $value); if (config::prettyurls) { $url .= "/{$value}"; } else { $url .= "&{$key}={$value}"; } } } if (config::prettyurls) { $params["__itspDEST"] = $destination; } else { $url .= "&__itspDEST={$destination}"; } $params = serialize($params); $url = str_replace("//", "/", $url); if (config::prettyurls) { $url = preg_replace("/[^a-z0-9\\/]?/i", "\$1", $url); } include_once "user_backend.php"; $user = new user_backend("url"); $hash = ""; if ($addhash) { $hash = substr(md5(serialize($params) . $user->getUserInfo("id")), 0, 10); } if (config::prettyurls) { $url .= "/{$hash}"; } else { $url .= "&hash={$hash}"; } if (config::prettyurls) { $sql = "INSERT INTO " . config::dbprefix . "urls (crdate, params, url, hash) VALUES ('" . time() . "', '" . addslashes($params) . "', '/" . addslashes($url) . "', '{$hash}')"; mysql_query($sql); } if ($destination == "frontpage") { $url = ""; } if ($inclhostname) { $url = "http://" . $_SERVER["HTTP_HOST"] . "/" . config::installpath . "" . $url; } return $url; }
function isValidUser($type = "normal") { include_once "user_backend.php"; $bUser = new user_backend("login"); if ($bUser->checkSession()) { return 1; } if ($bUser->checkLogin($_POST["username"], $_POST["password"], $type)) { return 2; } return false; }
function main($itsp) { include "dwoo/dwooAutoload.php"; $displayNewUserForm = 1; $emailsent = ""; if ($_POST["username"]) { include_once "user_backend.php"; $bUser = new user_backend("newuser"); $sess = $bUser->resetPassword($_POST["username"]); if ($sess) { $tpl = new Dwoo_Template_File('templates/forgotpasswordemail.tpl'); $dwoo = new Dwoo(); $params = array(); $params["s"] = $sess["reset"]; $params["u"] = $sess["username"]; $setnewpasswordUrl = $itsp->bUrl->newUrl("setnewpassword", $params, 1); $markerArray = array(); $markerArray["emailForgotpasswordHello"] = $itsp->bLang->getLL("email.forgotpassword.hello"); $markerArray["username"] = $sess["username"]; $markerArray["emailForgotpasswordHostname"] = config::hostname; $markerArray["emailForgotpasswordMsg1"] = $itsp->bLang->getLL("email.forgotpassword.msg1"); $markerArray["emailForgotpasswordMsg2"] = $itsp->bLang->getLL("email.forgotpassword.msg2"); $markerArray["emailForgotpasswordMsg3"] = $itsp->bLang->getLL("email.forgotpassword.msg3"); $markerArray["emailForgotpasswordMsg4"] = $itsp->bLang->getLL("email.forgotpassword.msg4"); $markerArray["emailForgotpasswordMsg5"] = $itsp->bLang->getLL("email.forgotpassword.msg5"); $markerArray["emailForgotpasswordMsg6"] = $itsp->bLang->getLL("email.forgotpassword.msg6"); $markerArray["emailForgotpasswordURL"] = $setnewpasswordUrl; $markerArray["emailForgotpasswordSignature"] = $itsp->bLang->getLL("email.forgotpassword.signature"); $forgotemail = $dwoo->get($tpl, $markerArray); $emailto = $sess["email"]; $emailsubject = $itsp->bLang->getLL("email.forgotpassword.subject"); $emailheaders = "From: " . config::resetpasswordFromEmail . "\r\n"; mail($emailto, $emailsubject, $forgotemail, $emailheaders); $emailsent = "Email sent"; } } if ($displayNewUserForm) { $tpl = new Dwoo_Template_File('templates/forgotpassword.tpl'); $dwoo = new Dwoo(); $markerArray = templateArray(); $markerArray["url"] = $_SERVER["REQUEST_URI"]; $markerArray["username"] = $itsp->bLang->getLL("username"); $markerArray["password"] = $itsp->bLang->getLL("password"); $markerArray["headertitle"] = $itsp->bLang->getLL("page.forgotpassword.title"); $markerArray["loginbtn"] = $itsp->bLang->getLL("login"); $markerArray["sendit"] = $itsp->bLang->getLL("sendit"); $markerArray["emailsent"] = $emailsent; $createnewuser = $dwoo->get($tpl, $markerArray); print $createnewuser; } }
function main($itsp) { include "dwoo/dwooAutoload.php"; if ($itsp->bUrl->getGP("s")) { user_backend::verifyUser($itsp->bUrl->getGP("s"), $itsp->bUrl->getGP("u"), 9); $tpl = new Dwoo_Template_File('templates/rejectuser.tpl'); $dwoo = new Dwoo(); $markerArray = templateArray(); $markerArray["pageRejectedMsg1"] = $itsp->bLang->getLL("page.rejecteduser.msg1"); $output = $dwoo->get($tpl, $markerArray); print $output; } else { print "access denied"; } }
function __construct($lang = "") { if (!session_id()) { session_start(); } if (!$this->db) { $this->db = new database_backend(); $this->db->connect(); if (user_backend::checkSession()) { $language = user_backend::getUserSetting("layoutlanguage"); } if ($language == "") { $language = "en"; } $this->bLang = new lang_backend($language); $this->bUrl = new urls_backend(); } }
function createNewTask($pid, $title, $description) { $newid = 0; $now = time(); $sorting = $this->getNextSorting($pid); $sql = "INSERT INTO " . config::dbprefix . "tasks SET pid='" . addslashes($pid) . "', crdate='{$now}', tstamp='{$now}', sorting='{$sorting}', title='" . addslashes($title) . "', description='" . addslashes($description) . "'"; mysql_query($sql); $sql = "SELECT id FROM " . config::dbprefix . "tasks WHERE pid='" . addslashes($pid) . "' AND crdate='{$now}' AND sorting='{$sorting}' AND title='" . addslashes($title) . "'"; $query = mysql_query($sql); while ($result = mysql_fetch_array($query)) { $newid = $result["id"]; } include_once "user_backend.php"; $userid = user_backend::checkSession(); $sql = "INSERT INTO " . config::dbprefix . "userstasks SET userid='{$userid}', taskid='{$newid}'"; mysql_query($sql); return $newid; }
function main($itsp) { include "dwoo/dwooAutoload.php"; if ($itsp->bUrl->getGP("s")) { user_backend::verifyUser($itsp->bUrl->getGP("s"), $itsp->bUrl->getGP("u"), 1); } $valid = isValidUser(); if ($valid) { $tpl = new Dwoo_Template_File('templates/verifieduser.tpl'); $dwoo = new Dwoo(); $params = array(); $homeurl = "/" . config::installpath . "" . $itsp->bUrl->newUrl("tasks", $params); $markerArray = loggedInArray(); $markerArray["pageVerifiedUserAccepted"] = $itsp->bLang->getLL("page.verifieduser.useraccepted"); $markerArray["pageVerifiedUserHomeUrl"] = $itsp->bLang->getLL("page.verifieduser.homeurl"); $markerArray["homeUrl"] = $homeurl; $output = $dwoo->get($tpl, $markerArray); print $output; } else { print "access denied"; } }
function main($itsp) { include_once "dwoo/dwooAutoload.php"; $valid = isValidUser(); if ($valid) { include_once "user_backend.php"; $userb = new user_backend(); if ($_POST) { $errormsg = ""; $errors = 0; $passwordok = 0; if ($_POST["username"]) { include_once "user_backend.php"; $userb = new user_backend(); if (!$userb->isUsernameAvail($_POST["username"])) { if ($errormsg != "") { $errormsg .= "<br />"; } $errormsg .= $itsp->bLang->getLL("page.myinfo.usernamenotavailable"); $errors++; } } if ($_POST["password"] != $_POST["repeatpassword"]) { if ($errormsg != "") { $errormsg .= "<br />"; } $errormsg .= $itsp->bLang->getLL("page.myinfo.notidenticalpasswords"); $errors++; } else { if ($_POST["password"] != "itsplanned") { $passwordok = 1; } } if (!preg_match('/^[^@]+@[a-zA-Z0-9._-]+\\.[a-zA-Z]+$/', $_POST["email"])) { if ($errormsg != "") { $errormsg .= "<br />"; } $errormsg .= $itsp->bLang->getLL("page.myinfo.novalidemail"); $errors++; } if ($errors == 0) { $userb->setUserInfo("realname", $_POST["realname"]); $userb->setUserInfo("username", $_POST["username"]); $userb->setUserInfo("email", $_POST["email"]); if ($passwordok) { $userb->setUserInfo("password", md5($_POST["password"])); } $userb->setUserSetting("layoutlanguage", $_POST["language"]); $itsp->bLang->setLanguage($_POST["language"]); } } $tpl = new Dwoo_Template_File('templates/myinfo.tpl'); $dwoo = new Dwoo(); $language = $userb->getUserSetting("layoutlanguage"); $markerArray = loggedInArray(); $markerArray["pageMyinfoUsername"] = $itsp->bLang->getLL("page.myinfo.username"); $markerArray["pageMyinfoNewPassword"] = $itsp->bLang->getLL("page.myinfo.newpassword"); $markerArray["pageMyinfoNewPasswordRepeat"] = $itsp->bLang->getLL("page.myinfo.newpasswordrepeat"); $markerArray["pageMyinfoRealname"] = $itsp->bLang->getLL("page.myinfo.realname"); $markerArray["pageMyinfoEmail"] = $itsp->bLang->getLL("page.myinfo.email"); $markerArray["pageMyinfoUpdate"] = $itsp->bLang->getLL("page.myinfo.update"); $markerArray["pageMyinfoLayoutLanguage"] = $itsp->bLang->getLL("page.myinfo.layoutlanguage"); $markerArray["pageMyinfoErrorMsg"] = $errormsg; $markerArray["password"] = "******"; $markerArray["email"] = $userb->getUserInfo("email"); $markerArray["realname"] = $userb->getUserInfo("realname"); $markerArray["languageset" . $language] = " selected=selected "; $markerArray["headertitle"] = $itsp->bLang->getLL("page.myinfo.title"); $page = $dwoo->get($tpl, $markerArray); print $page; } else { print "access denied"; } }
function main($itsp) { $itsp->bLang->setLanguage($_GET["lang"]); include "dwoo/dwooAutoload.php"; $displayNewUserForm = 1; $errormsg = ""; if ($_POST["username"] && $_POST["password"]) { include_once "user_backend.php"; $bUser = new user_backend("newuser"); try { $errormsg = ""; $errors = 0; $passwordok = 0; if ($_POST["username"]) { include_once "user_backend.php"; if (!$bUser->isUsernameAvail($_POST["username"])) { if ($errormsg != "") { $errormsg .= "<br />"; } $errormsg .= $itsp->bLang->getLL("page.myinfo.usernamenotavailable"); $errors++; } } if ($_POST["password"] != $_POST["repeatpassword"]) { if ($errormsg != "") { $errormsg .= "<br />"; } $errormsg .= $itsp->bLang->getLL("page.myinfo.notidenticalpasswords"); $errors++; } else { if ($_POST["password"] != "itsplanned") { $passwordok = 1; } } if (!preg_match('/^[^@]+@[a-zA-Z0-9._-]+\\.[a-zA-Z]+$/', $_POST["email"])) { if ($errormsg != "") { $errormsg .= "<br />"; } $errormsg .= $itsp->bLang->getLL("page.myinfo.novalidemail"); $errors++; } if ($errors == 0) { $bUser->createNew($_POST["username"], $_POST["password"]); isValidUser("create"); $bUser->setUserInfo("realname", $_POST["realname"]); $bUser->setUserInfo("email", $_POST["email"]); $bUser->setUserInfo("verified", '0'); $tpl = new Dwoo_Template_File('templates/newuseremail.tpl'); $dwoo = new Dwoo(); $params = array(); $params["s"] = session_id(); $params["u"] = $_POST["username"]; $verifyuserUrl = $itsp->bUrl->newUrl("verifyuser", $params, 1); $rejectuserUrl = $itsp->bUrl->newUrl("rejectuser", $params, 1); $markerArray = array(); $markerArray["emailNewuserHello"] = $itsp->bLang->getLL("email.newuser.hello"); $markerArray["username"] = $_POST["username"]; $markerArray["emailNewuserHostname"] = config::hostname; $markerArray["emailNewuserMsg1"] = $itsp->bLang->getLL("email.newuser.msg1"); $markerArray["emailNewuserMsg2"] = $itsp->bLang->getLL("email.newuser.msg2"); $markerArray["emailNewuserMsg3"] = $itsp->bLang->getLL("email.newuser.msg3"); $markerArray["emailNewuserMsg4"] = $itsp->bLang->getLL("email.newuser.msg4"); $markerArray["emailNewuserMsg5"] = $itsp->bLang->getLL("email.newuser.msg5"); $markerArray["emailNewuserMsg6"] = $itsp->bLang->getLL("email.newuser.msg6"); $markerArray["emailNewuserVerifyURL"] = $verifyuserUrl; $markerArray["emailNewuserRejectURL"] = $rejectuserUrl; $markerArray["emailNewuserSignature"] = $itsp->bLang->getLL("email.newuser.signature"); $newuseremail = $dwoo->get($tpl, $markerArray); $emailto = $_POST["email"]; $emailsubject = $itsp->bLang->getLL("email.newuser.subject"); $emailheaders = "From: " . config::newuserFromEmail . "\r\n"; mail($emailto, $emailsubject, $newuseremail, $emailheaders); $tpl = new Dwoo_Template_File('templates/userverification.tpl'); $dwoo = new Dwoo(); $markerArray = templateArray(); $markerArray["pageUserverificationMsg1"] = $itsp->bLang->getLL("page.userverification.msg1"); $output = $dwoo->get($tpl, $markerArray); print $output; exit; } } catch (Exception $e) { if ($e->getMessage() == "UserExist") { $errormsg = "Username is already taken"; } } } if ($displayNewUserForm) { $tpl = new Dwoo_Template_File('templates/myinfonew.tpl'); $dwoo = new Dwoo(); $markerArray = templateArray(); $markerArray["url"] = $_SERVER["REQUEST_URI"]; $markerArray["pageMyinfoErrorMsg"] = $errormsg; $markerArray["username"] = $itsp->bLang->getLL("username"); $markerArray["password"] = $itsp->bLang->getLL("password"); $markerArray["pageMyinfoUsername"] = $itsp->bLang->getLL("page.myinfo.username"); $markerArray["pageMyinfoNewPassword"] = $itsp->bLang->getLL("page.myinfo.newpassword"); $markerArray["pageMyinfoNewPasswordRepeat"] = $itsp->bLang->getLL("page.myinfo.newpasswordrepeat"); $markerArray["pageMyinfoRealname"] = $itsp->bLang->getLL("page.myinfo.realname"); $markerArray["pageMyinfoEmail"] = $itsp->bLang->getLL("page.myinfo.email"); $markerArray["pageMyinfoUpdate"] = $itsp->bLang->getLL("page.myinfo.create"); $markerArray["pageMyinfoLayoutLanguage"] = $itsp->bLang->getLL("page.myinfo.layoutlanguage"); $markerArray["usernamefield"] = $_POST["username"]; $markerArray["email"] = $_POST["email"]; $markerArray["realname"] = $_POST["realname"]; $markerArray["headertitle"] = $itsp->bLang->getLL("page.myinfo.newusertitle"); $markerArray["loginbtn"] = $itsp->bLang->getLL("login"); $createnewuser = $dwoo->get($tpl, $markerArray); print $createnewuser; } }
function main($itsp) { include "dwoo/dwooAutoload.php"; $valid = isValidUser(); if ($valid) { include_once "urls_backend.php"; $urls = new urls_backend(); include_once "tasks_backend.php"; $tasks = new tasks_backend(); $this_url = "http://" . $_SERVER["SERVER_NAME"] . "" . $_SERVER["REQUEST_URI"]; if ($_POST["func"] == "create") { $_pid = $urls->getGP("__taskid"); $_title = $_POST["tasktitle"]; $_description = $_POST["taskdescription"]; $tasks->createNewTask($_pid, $_title, $_description); header("Location: {$this_url}#", TRUE, 302); exit; } if ($_POST["func"] == "update" && !isset($_POST["delete"])) { $_id = $_POST["taskid"]; $_title = $_POST["tasktitle"]; $_description = $_POST["taskdescription"]; $tasks->updateTask($_id, $_title, $_description); $tasks->setField($_id, "progress", $_POST["taskprogress"]); header("Location: {$this_url}#", TRUE, 302); exit; } if (isset($_POST["delete"])) { $_id = $_POST["taskid"]; $tasks->setField($_id, "deleted", 1); header("Location: {$this_url}#", TRUE, 302); exit; } $tpl = new Dwoo_Template_File('templates/tasks.tpl'); $this->dwoo = new Dwoo(); $currenttask = $urls->getGP("__taskid"); $currenttitle = $urls->getGP("task"); $jsfiles = array(); $jsfiles[] = array('jsfile' => 'js/jquery-ui-1.8.4.custom.min.js'); $jsfiles[] = array('jsfile' => 'js/tasklist.php?t=' . $currenttask); $jsfiles[] = array('jsfile' => 'js/widgetTreeList.js'); $tasklist = $this->getSubTasks(0, 0); $markerArray = array(); $markerArray["ulid"] = ""; $markerArray["ulclass"] = "newul"; $markerArray = loggedInArray(); $markerArray["js_list"] = $jsfiles; $_tasks = $this->getSubTasks($currenttask ? $currenttask : 0, 0, 99); $_closedtasks = $this->getSubTasks($currenttask ? $currenttask : 0, 0, 100, "="); $m_list = array(); $getParent = 1; $parent = $tasks->getParent($currenttask); while ($parent["id"] > 0) { $params = array(); $params["task"] = $parent["title"]; $params["__taskid"] = $parent["id"]; $breadcrumburl = $urls->newUrl("tasks", $params); $m_list[] = array('breadcrumburl' => '' . $breadcrumburl . '', 'breadcrumbitem' => '' . $parent["title"] . '', 'sepstart' => '» '); $parent = $tasks->getParent($parent["pid"]); } $params = array(); $breadcrumburl = $urls->newUrl("tasks", $params); $m_list[] = array('breadcrumburl' => '' . $breadcrumburl . '', 'breadcrumbitem' => 'Main'); $m_list = array_reverse($m_list); $p_list = array(); $openmsg = $itsp->bLang->getLL("open"); $closedmsg = $itsp->bLang->getLL("closed"); $toggleinfomsg = $itsp->bLang->getLL("page.tasks.toggleinfo"); $movethismsg = $itsp->bLang->getLL("page.tasks.movethis"); $dontmovethismsg = stripslashes($itsp->bLang->getLL("page.tasks.dontmovethis")); $user = new user_backend(); $moveableTasks = unserialize($user->getUserSetting("movingTasks")); $moveherevisible = "show"; if ($moveableTasks == "") { $moveherevisible = "hide"; } if (count($moveableTasks) < 1) { $moveherevisible = "hide"; } foreach ($_tasks as $key => $value) { $params = array(); $params["task"] = $currenttitle . "/" . $value["title"]; $params["__taskid"] = $value["id"]; $taskurl = $urls->newUrl("tasks", $params); $edittaskurl = $urls->newUrl("edittask", $params); $subtasks = $tasks->getNumberOfSubTasks($value["id"]); $opensubtasks = $tasks->getNumberOfSubTasks($value["id"], 100); $status = $tasks->getTaskInfo($value["id"], "progress"); if ($status < 100) { $status = $openmsg; } else { $status = $closedmsg; } $created = $tasks->getTaskInfo($value["id"], "crdate"); if ($created > 0) { $created = date("d.m.Y", $created); } else { $created = "N/A"; } $toggleonoff = "strike nolink"; if ($value["description"] != "") { $toggleonoff = ""; } $p_list[] = array('liid' => "liid_" . $value["id"], 'liclass' => 'taskframe', 'licontent' => '' . $value["title"], 'taskurl' => '' . $taskurl . '', 'edittaskurl' => '' . $edittaskurl . '', 'subtasks' => '' . $subtasks . '', 'opensubtasks' => '' . $opensubtasks . '', 'toggleinfomsg' => '' . $toggleinfomsg . '', 'moveablemsg' => $moveableTasks[$value["id"]] ? $dontmovethismsg : $movethismsg, 'toggleonoff' => '' . $toggleonoff . '', 'created' => '' . $created . '', 'status' => '' . $status . '', 'statustxt' => $itsp->bLang->getLL("page.tasks.statustxt"), 'createdtxt' => $itsp->bLang->getLL("page.tasks.createdtxt"), 'opensubtaskstxt' => $itsp->bLang->getLL("page.tasks.opensubtaskstxt"), 'subtaskstxt' => $itsp->bLang->getLL("page.tasks.subtasks"), 'edittask' => $itsp->bLang->getLL("page.tasks.edittask"), 'state' => 'open', 'id' => $value["id"], 'taskdescription' => '' . $value["description"] . ''); } foreach ($_closedtasks as $key => $value) { $params = array(); $params["task"] = $currenttitle . "/" . $value["title"]; $params["__taskid"] = $value["id"]; $taskurl = $urls->newUrl("tasks", $params); $edittaskurl = $urls->newUrl("edittask", $params); $subtasks = $tasks->getNumberOfSubTasks($value["id"]); $opensubtasks = $tasks->getNumberOfSubTasks($value["id"], 100); $status = $tasks->getTaskInfo($value["id"], "progress"); if ($status < 100) { $status = $openmsg; } else { $status = $closedmsg; } $created = $tasks->getTaskInfo($value["id"], "crdate"); if ($created > 0) { $created = date("d.m.Y", $created); } else { $created = "N/A"; } $p_list[] = array('liid' => "liid_" . $value["id"], 'liclass' => 'taskframe', 'licontent' => '' . $value["title"], 'taskurl' => '' . $taskurl . '', 'edittaskurl' => '' . $edittaskurl . '', 'subtasks' => '' . $subtasks . '', 'opensubtasks' => '' . $opensubtasks . '', 'created' => '' . $created . '', 'status' => '' . $status . '', 'state' => 'closed', 'toggleinfomsg' => '' . $toggleinfomsg . '', 'moveablemsg' => $moveableTasks[$value["id"]] ? $dontmovethismsg : $movethismsg, 'statustxt' => $itsp->bLang->getLL("page.tasks.statustxt"), 'createdtxt' => $itsp->bLang->getLL("page.tasks.createdtxt"), 'opensubtaskstxt' => $itsp->bLang->getLL("page.tasks.opensubtaskstxt"), 'subtaskstxt' => $itsp->bLang->getLL("page.tasks.subtasks"), 'edittask' => $itsp->bLang->getLL("page.tasks.edittask"), 'id' => $value["id"], 'taskdescription' => '' . $value["description"] . ''); } $p_list[] = array('liid' => "liid_newtask", 'liclass' => 'liid_newtask', 'licontent' => '', 'taskurl' => '', 'taskdescription' => ''); $markerArray["p_list"] = $p_list; $markerArray["m_list"] = $m_list; $thistask = $urls->getGP("__taskid"); $params = array(); $params["task"] = $currenttitle; $params["__taskid"] = $currenttask; $newtask = $urls->newUrl("newtask", $params); $checkedall = ""; $showclosed = ""; if ($user->getUserSetting("showAllField") == "on") { $checkedall = " checked=checked "; } if ($user->getUserSetting("showClosedTasks") == "on") { $showclosed = " checked=checked "; } if ($user->getUserSetting("showCompactMode") == "on") { $showcompact = " checked=checked "; } $_title = $tasks->getTaskInfo($thistask, "title"); $markerArray["taskdescription"] = $tasks->getTaskInfo($thistask, "description"); $markerArray["taskname"] = $_title; $markerArray["headertitle"] = $_title ? $_title : $itsp->bLang->getLL("page.tasks.maintitle"); $markerArray["newtaskurl"] = $newtask; $markerArray["showallinfochecked"] = $checkedall; $markerArray["showclosedchecked"] = $showclosed; $markerArray["showcompactmodechecked"] = $showcompact; $markerArray["movetaskshere"] = $itsp->bLang->getLL("page.tasks.movetaskshere_1") . " <span class=\"movecount\">" . count($moveableTasks) . "</span>" . $itsp->bLang->getLL("page.tasks.movetaskshere_2"); $markerArray["moveherevisible"] = $moveherevisible; $markerArray["selectedtask"] = $itsp->bLang->getLL("page.tasks.selectedtask"); $markerArray["task"] = $itsp->bLang->getLL("page.tasks.task"); $markerArray["description"] = $itsp->bLang->getLL("page.tasks.description"); $markerArray["subtasks"] = $itsp->bLang->getLL("page.tasks.subtasks"); $markerArray["showallinfo"] = $itsp->bLang->getLL("page.tasks.options.showallinfo"); $markerArray["showclosedtasks"] = $itsp->bLang->getLL("page.tasks.options.showclosedtasks"); $markerArray["showcompactmode"] = $itsp->bLang->getLL("page.tasks.options.compactmode"); $markerArray["options"] = $itsp->bLang->getLL("page.tasks.options"); $markerArray["newtask"] = $itsp->bLang->getLL("page.tasks.newtask"); $settings = $this->dwoo->get($tpl, $markerArray); print $settings; } else { print "access denied"; } }
include_once "../user_backend.php"; $user = new user_backend(); $movingtasks = $user->getUserSetting("movingTasks"); $movingtasks = unserialize($movingtasks); foreach ($movingtasks as $key => $value) { if ($task->hasRights($_POST["moveto"])) { $task->setField($key, "pid", $_POST["moveto"]); } } $user->setUserSetting("movingTasks", ""); print "\$('.movehere').hide();"; print "location.reload(true);"; exit; } if ($task->hasRights($_POST["task"])) { include_once "../user_backend.php"; $user = new user_backend(); $movingtasks = $user->getUserSetting("movingTasks"); $movingtasks = unserialize($movingtasks); if ($movingtasks[$_POST["task"]]) { $return = "off"; unset($movingtasks[$_POST["task"]]); } else { $return = "on"; $movingtasks[$_POST["task"]] = "on"; } $return .= "-" . count($movingtasks); $movingtasks = serialize($movingtasks); $user->setUserSetting("movingTasks", $movingtasks); } print $return;
<?php include_once "../init_backend.php"; $init = new init_backend(); $valid = isValidUser(); if (!$valid) { print "no access"; exit; } include_once "../user_backend.php"; $user = new user_backend(); $user->setUserSetting($_POST["field"], $_POST["value"]);