$template->display("error.tpl"); die; } $files = $myfile->getProjectFiles($id); $filenum = count($files); if (empty($finfiles)) { $filenum = 0; } $myproject = new project(); $rolesobj = new roles(); //get folders $folders = $myfile->getProjectFolders($id); //get all folders $allfolders = $myfile->getAllProjectFolders($id); //get the project $pro = $myproject->getProject($id); //get the project members $members = $myproject->getProjectMembers($id, 10000); //get all roles $allroles = $rolesobj->getAllRoles(); $projectname = $pro["name"]; $title = $langfile['files']; $template->assign("title", $title); $template->assign("projectname", $projectname); SmartyPaginate::assign($template); $template->assign("files", $files); $template->assign("filenum", $filenum); $template->assign("folders", $folders); $template->assign("members", $members); $template->assign("roles", $allroles); $template->assign("allfolders", $allfolders);
echo $rss->saveFeed("RSS2.0", CL_ROOT . "/files/" . CL_CONFIG . "/ics/mymsgs-{$user}.xml"); } elseif ($action == "projectmessages") { // check if the user is allowed to edit messages if (!$userpermissions["messages"]["add"]) { $errtxt = $langfile["nopermission"]; $noperm = $langfile["accessdenied"]; $template->assign("errortext", "<h2>{$errtxt}</h2><br>{$noperm}"); $template->display("error.tpl"); die; } $msg = new message(); // get all messages of this project $messages = $msg->getProjectMessages($project); // get project's name $myproject = new project(); $pro = $myproject->getProject($project); $projectname = $pro['name']; $template->assign("projectname", $projectname); // get the page title $title = $langfile['messages']; if (!empty($messages)) { $mcount = count($messages); } else { $mcount = 0; } $strpro = $langfile["project"]; $tit = $langfile["messages"]; $rss->title = $projectname . " / " . $tit; $rss->description = ""; $rss->descriptionHtmlSyndicated = true; $loc = $url . "managemessage.php?action=mymsgs";
} } if (!empty($start) and !empty($end)) { $track = $tracker->getProjectTrack($id, $usr, $taski, $start, $end, 50); } else { $track = $tracker->getProjectTrack($id, $usr, $taski, 0, 0, 50); } if (!empty($track)) { $totaltime = $tracker->getTotalTrackTime($track); $template->assign("totaltime", $totaltime); $template->assign("fproject", $fproject); $template->assign("start", $start); $template->assign("end", $end); } $pro = new project(); $usrs = $pro->getProjectMembers($id, 1000, false); $proj = $pro->getProject($id); $projectname = $proj["name"]; $template->assign("projectname", $projectname); $template->assign("users", $usrs); $title = $langfile["timetracker"]; $template->assign("title", $title); $template->assign("ptasks", $ptasks); $template->assign("start", $start); $template->assign("end", $end); $template->assign("usr", $usr); $template->assign("task", $taski); $template->assign("tracker", $track); SmartyPaginate::assign($template); $template->display("tracker_project.tpl"); }
} } elseif ($action == "addfx-all") { $templ = $url . "managesearch.php?action=search&query={searchTerms}"; $templ2 = $url . "managesearch.php?action=searchjson&query={searchTerms}"; $fav = $url . "templates/standard/images/favicon.ico"; $strsearch = $langfile["search"]; $sysname = $settings["name"]; echo "\n<OpenSearchDescription xmlns=\"http://a9.com/-/spec/opensearch/1.1/\">\n<ShortName>{$sysname} {$strsearch}</ShortName>\n<Description>Search all Collabtive</Description>\n<Tags></Tags>\n<Image height=\"16\" width=\"16\" type=\"image/x-icon\">{$fav}</Image>\n<Url type=\"text/html\" method=\"get\" template=\"{$templ}\"/>\n<Url type=\"application/x-suggestions+json\" method=\"get\" template=\"{$templ2}\"/>\n<InputEncoding>UTF-8</InputEncoding>\n<OutputEncoding>UTF-8</OutputEncoding>\n\n<AdultContent>false</AdultContent>\n</OpenSearchDescription>"; } elseif ($action == "addfx-project") { $templ = $url . "managesearch.php?action=projectsearch&project={$project}&query={searchTerms}"; $templ2 = $url . "managesearch.php?action=searchjson-project&project={$project}&query={searchTerms}"; $fav = $url . "templates/standard/images/favicon.ico"; $project = $_GET['project']; $strsearch = $langfile["search"]; $pro = new project(); $pname = $pro->getProject($project); $pname = $pname["name"]; echo "\n<OpenSearchDescription xmlns=\"http://a9.com/-/spec/opensearch/1.1/\">\n<ShortName>{$pname} {$strsearch}</ShortName>\n<Description>Search project {$pname}</Description>\n<Tags></Tags>\n<Image height=\"16\" width=\"16\" type=\"image/x-icon\">{$fav}</Image>\n<Url type=\"text/html\" method=\"GET\" template=\"{$templ}\"/>\n<Url type=\"application/x-suggestions+json\" method=\"get\" template=\"{$templ2}\"/>\n<InputEncoding>UTF-8</InputEncoding>\n<OutputEncoding>UTF-8</OutputEncoding>\n\n<AdultContent>false</AdultContent>\n</OpenSearchDescription>"; } elseif ($action == "jsonfiles") { if (!chkproject($userid, $id)) { $errtxt = $langfile["notyourproject"]; $noperm = $langfile["accessdenied"]; $template->assign("errortext", "{$errtxt}<br>{$noperm}"); $template->display("error.tpl"); die; } $myfile = new datei(); $ordner = $myfile->getAllProjectFiles($id); if (!empty($ordner)) { $json = "var tinyMCEImageList = new Array(\n"; foreach ($ordner as $file) {
<div style="text-align:center"> <div class="alert alert-danger alert-dismissible" role="alert" style="width:100%;"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button> <strong>Oh snap!</strong> Something went wrong! </div></div>'; } } else { //echo '<br/><br/><br/><br/><br/>Page is refreshed. No need to post.'; $outputMessage = null; } if (isset($_REQUEST['project_id'])) { // Project id is set that means this is for update, not add // Get project id $project_id = $_REQUEST['project_id']; //Get project $dbRow_Project = $objProject->getProject($userid, $project_id); if (isset($dbRow_Project)) { $dbRows_Skill = $objProject->getProjectSkills($project_id); } } // When page is refreshed, this will avoid multiple post $_SESSION['key'] = mt_rand(1, 1000); ?> <!-- Typehead --> <script src="includes/typeahead.bundle.js"></script> <!-- End of Typehead ref. --> <!-- Select 2 --> <link href="//cdnjs.cloudflare.com/ajax/libs/select2/4.0.1/css/select2.min.css" rel="stylesheet" /> <script src="//cdnjs.cloudflare.com/ajax/libs/select2/4.0.1/js/select2.min.js"></script>