当前位置: 首页>>代码示例>>PHP>>正文


PHP project::getMyProjects方法代码示例

本文整理汇总了PHP中project::getMyProjects方法的典型用法代码示例。如果您正苦于以下问题:PHP project::getMyProjects方法的具体用法?PHP project::getMyProjects怎么用?PHP project::getMyProjects使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在project的用法示例。


在下文中一共展示了project::getMyProjects方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: foreach

    foreach ($myOpenProjects as $proj) {
        // get all the tasks in this project that are assigned to the current user
        $task = $mtask->getAllMyProjectTasks($proj["ID"], 100);
        // get all messages in the project
        $msgs = $msg->getProjectMessages($proj["ID"]);
        // write those to arrays
        if (!empty($msgs)) {
            array_push($messages, $msgs);
        }
        if (!empty($task)) {
            array_push($tasks, $task);
        }
        $cou = $cou + 1;
    }
}
$myClosedProjects = $project->getMyProjects($userid, 0);
// If the user is allowed to add projects, also get all users to assign to those projects
if ($userpermissions["projects"]["add"]) {
    $user = new user();
    $users = $user->getAllUsers(1000000);
    $template->assign("users", $users);
    $company = new company();
    $companies = $company->getAllCompanies();
    $template->assign("customers", $companies);
}
// by default the arrays have a level for each project, whcih contains arrays for each message/task . reduce array flattens this to have all messages/tasks of all projects in one structure
if (!empty($messages)) {
    $messages = reduceArray($messages);
}
$etasks = reduceArray($tasks);
// Create sort array for multisort by adding the daysleft value to a sort array
开发者ID:veganaize,项目名称:Collabtive,代码行数:31,代码来源:index.php

示例2: readLangfile

if (!file_exists(CL_ROOT . "/language/{$locale}/lng.conf")) {
    $locale = $settings['locale'];
    $_SESSION['userlocale'] = $locale;
}
// Set locale directory
$template->config_dir = CL_ROOT . "/language/{$locale}/";
// Smarty 3 seems to have a problem with re-compiling the config if the user config is different than the system config.
// this forces a compile of the config.
// uncomment this if you have issues with language switching
// $template->compileAllConfig('.config',true);
// read language file into PHP array
$langfile = readLangfile($locale);
$template->assign("langfile", $langfile);
$template->assign("locale", $locale);
// css classes for headmenue
// this indicates which of the 3 main stages the user is on
$mainclasses = array("desktop" => "desktop", "profil" => "profil", "admin" => "admin");
$template->assign("mainclasses", $mainclasses);
// get current year and month
$they = date("Y");
$them = date("n");
$template->assign("theM", $them);
$template->assign("theY", $they);
// Get the user's projects for the quickfinder in the sidebar
if (isset($userid)) {
    $project = new project();
    $myOpenProjects = $project->getMyProjects($userid);
    $template->assign("openProjects", $myOpenProjects);
}
// clear session data for pagination
SmartyPaginate::disconnect();
开发者ID:raum01,项目名称:Collabtive,代码行数:31,代码来源:init.php

示例3: elseif

        $item->link = $loc;
        $item->source = $loc;
        $item->description = $mytask["text"];
        // optional
        $item->descriptionTruncSize = 500;
        $item->descriptionHtmlSyndicated = true;
        $item->pubDate = $mytask["start"];
        $item->author = "";
        $rss->addItem($item);
    }
    // valid format strings are: RSS0.91, RSS1.0, RSS2.0, PIE0.1 (deprecated),
    // MBOX, OPML, ATOM, ATOM0.3, HTML, JS
    echo $rss->saveFeed("RSS2.0", CL_ROOT . "/files/" . CL_CONFIG . "/ics/feedtask-{$user}.xml");
} elseif ($action == "mymsgs-rss") {
    $tproject = new project();
    $myprojects = $tproject->getMyProjects($user);
    $msg = new message();
    $messages = array();
    foreach ($myprojects as $proj) {
        $message = $msg->getProjectMessages($proj["ID"]);
        if (!empty($message)) {
            array_push($messages, $message);
        }
    }
    if (!empty($messages)) {
        $messages = reduceArray($messages);
    }
    $strpro = $langfile["project"];
    $tit = $langfile["mymessages"];
    $rss->title = $tit;
    $rss->description = "";
开发者ID:veganaize,项目名称:Collabtive,代码行数:31,代码来源:managerss.php

示例4: project

<?php

include "init.php";
if (!isset($_SESSION["userid"])) {
    $template->assign("loginerror", 0);
    $template->display("login.tpl");
    die;
}
$project = new project();
$user = new user();
$myprojects = $project->getMyProjects($userid);
$oldprojects = $project->getMyProjects($userid, 0);
$pnum = count($myprojects) + count($oldprojects);
$users = $user->getAllUsers(1000000);
$template->assign("users", $users);
$title = $langfile["myprojects"];
$template->assign("title", $title);
$template->assign("projectnum", $pnum);
$template->assign("myprojects", $myprojects);
$template->assign("oldprojects", $oldprojects);
$template->display("myprojects.tpl");
开发者ID:Setrino,项目名称:collabtive,代码行数:21,代码来源:myprojects.php

示例5: project

     $template->display("error.tpl");
     die;
 }
 // get all messages of this project
 $messages = $msg->getProjectMessages($id);
 // get project's name
 $myproject = new project();
 $pro = $myproject->getProject($id);
 $projectname = $pro['name'];
 $template->assign("projectname", $projectname);
 // get the page title
 // create new project and file objects
 $project = new project();
 $myfile = new datei();
 // get all uof the users projects
 $myprojects = $project->getMyProjects($userid);
 $cou = 0;
 $messages = array();
 // loop through the projects and get messages and files for each project
 if (!empty($myprojects)) {
     foreach ($myprojects as $proj) {
         $message = $msg->getProjectMessages($proj["ID"]);
         array_push($messages, $message);
     }
 }
 // flatten array
 $messages = reduceArray($messages);
 if (!empty($messages)) {
     $mcount = count($messages);
 } else {
     $mcount = 0;
开发者ID:Setrino,项目名称:collabtive,代码行数:31,代码来源:managemessage.php

示例6: getIcal

 /**
  * Export all tasks of a user via iCal
  *
  * @param int $user User ID
  * @param bool $show_long
  * @return bool
  */
 function getIcal($user, $show_long = true)
 {
     $user = (int) $user;
     $show_long = (bool) $show_long;
     $username = $_SESSION["username"];
     $project = new project();
     $myprojects = $project->getMyProjects($user);
     $tasks = array();
     if (!empty($myprojects)) {
         foreach ($myprojects as $proj) {
             $task = $this->getAllMyProjectTasks($proj["ID"], 10000);
             if (!empty($task)) {
                 array_push($tasks, $task);
             }
         }
     }
     $etasks = reduceArray($tasks);
     require "class.ical.php";
     $heute = date("d-m-y");
     $cal = new vcalendar();
     $fname = "tasks_" . $username . ".ics";
     $cal->setConfig('directory', CL_ROOT . '/files/' . CL_CONFIG . '/ics');
     $cal->setConfig('filename', $fname);
     $cal->setConfig('unique_id', '');
     $cal->setProperty('X-WR-CALNAME', "Collabtive Aufgaben für " . $username);
     $cal->setProperty('X-WR-CALDESC', '');
     $cal->setProperty('CALSCALE', 'GREGORIAN');
     $cal->setProperty('METHOD', 'PUBLISH');
     foreach ($etasks as $etask) {
         // split date in Y / M / D / h / min / sek variables
         $jahr = date("Y", $etask["start"]);
         $monat = date("m", $etask["start"]);
         $tag = date("d", $etask["start"]);
         $std = date("h", $etask["start"]);
         $min = date("i", $etask["start"]);
         $sek = date("s", $etask["start"]);
         // split date in Y / M / D / h / min / sek variables
         $ejahr = date("Y", $etask['end']);
         $emonat = date("m", $etask['end']);
         $etag = date("d", $etask['end']);
         $estd = date("h", $etask['end']);
         $emin = date("i", $etask['end']);
         $esek = date("s", $etask['end']);
         $e = new vevent();
         $e->setProperty('categories', $etask['list']);
         if ($show_long) {
             // if we have a task lasting 10 month, normally it will be displayed every day within this time span.
             $e->setProperty('dtstart', $jahr, $monat, $tag, $std, $min);
             // 24 dec 2007 19.30
         } else {
             // if the show_long flag is set, it will only be shown at the due date
             $e->setProperty('dtstart', $ejahr, $emonat, $etag, $estd, $emin);
         }
         $e->setProperty('due', $ejahr, $emonat, $etag, $estd, $emin);
         // 24 dec 2007 19.30
         $e->setProperty('dtend', $ejahr, $emonat, $etag, $estd, $emin);
         $e->setProperty('description', $etask["text"]);
         $e->setProperty('status', "NEEDS-ACTION");
         // $e->setProperty('comment' , $etask[text]);
         $e->setProperty('summary', $etask["title"]);
         $e->setProperty('location', 'Work');
         $cal->setComponent($e);
     }
     $cal->returnCalendar();
     return true;
 }
开发者ID:Setrino,项目名称:collabtive,代码行数:73,代码来源:class.task.php

示例7: header

            }
            header("Location: admin.php?action=users&mode=edited");
        }
    } else {
        if ($user->edit($id, $name, "", $email, $tel1, $tel2, $company, $zip, $gender, $turl, $address1, $address2, $state, $country, $tags, $locale, "", $rate)) {
            if (!empty($newpass) and !empty($repeatpass)) {
                $user->admin_editpass($id, $newpass, $repeatpass);
            }
            header("Location: admin.php?action=users&mode=edited");
        }
    }
} elseif ($action == "deleteuserform") {
    $usr = $user->getProfile($id);
    // Get user's projects
    $proj = new project();
    $projects = $proj->getMyProjects($id);
    // Get members of each project
    if (!empty($projects)) {
        for ($i = 0; $i < count($projects); $i++) {
            $members = $proj->getProjectMembers($projects[$i]["ID"]);
            $projects[$i]["members"] = $members;
        }
        $title = $langfile["deleteuser"];
        $template->assign("title", $title);
        $template->assign("user", $usr);
        $template->assign("projects", $projects);
        $template->display("admindeluserform.tpl");
    } else {
        if ($user->del($id)) {
            header("Location: admin.php?action=users&mode=deleted");
        }
开发者ID:veganaize,项目名称:Collabtive,代码行数:31,代码来源:admin.php


注:本文中的project::getMyProjects方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。