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


PHP project类代码示例

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


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

示例1: get_list

 public static function get_list($_FORM)
 {
     /*
      *
      * Get a list of task history items with sophisticated filtering and somewhat sophisticated output
      *
      * (n.b., the output from this generally needs to be post-processed to handle the semantic meaning of changes in various fields)
      *
      */
     $filter = audit::get_list_filter($_FORM);
     if (is_array($filter) && count($filter)) {
         $where_clause = " WHERE " . implode(" AND ", $filter);
     }
     if ($_FORM["projectID"]) {
         $entity = new project();
         $entity->set_id($_FORM["projectID"]);
         $entity->select();
     } else {
         if ($_FORM["taskID"]) {
             $entity = new task();
             $entity->set_id($_FORM["taskID"]);
             $entity->select();
         }
     }
     $q = "SELECT *\n            FROM audit\n          {$where_clause}\n        ORDER BY dateChanged";
     $db = new db_alloc();
     $db->query($q);
     $items = array();
     while ($row = $db->next_record()) {
         $audit = new audit();
         $audit->read_db_record($db);
         $rows[] = $row;
     }
     return $rows;
 }
开发者ID:cjbayliss,项目名称:alloc,代码行数:35,代码来源:audit.inc.php

示例2: is_owner

 function is_owner($person = "")
 {
     $project = new project();
     $project->set_id($this->get_value("projectID"));
     $project->select();
     return $project->is_owner($person);
 }
开发者ID:cjbayliss,项目名称:alloc,代码行数:7,代码来源:projectCommissionPerson.inc.php

示例3: get_rate

 function get_rate($projectID, $personID)
 {
     // Try to get the person's rate from the following sources:
     // project.defaultTimeSheetRate
     // person.defaultTimeSheetRate
     // config.name == defaultTimeSheetRate
     // First check the project for a rate
     $project = new project($projectID);
     $row = array('rate' => $project->get_value("defaultTimeSheetRate"), 'unit' => $project->get_value("defaultTimeSheetRateUnitID"));
     if (imp($row['rate']) && $row['unit']) {
         return $row;
     }
     // Next check person, which is in global currency rather than project currency - conversion required
     $db = new db_alloc();
     $q = prepare("SELECT defaultTimeSheetRate as rate, defaultTimeSheetRateUnitID as unit FROM person WHERE personID = %d", $personID);
     $db->query($q);
     $row = $db->row();
     if (imp($row['rate']) && $row['unit']) {
         if ($project->get_value("currencyTypeID") != config::get_config_item("currency")) {
             $row['rate'] = exchangeRate::convert(config::get_config_item("currency"), $row["rate"], $project->get_value("currencyTypeID"));
         }
         return $row;
     }
     // Lowest priority: global
     $rate = config::get_config_item("defaultTimeSheetRate");
     $unit = config::get_config_item("defaultTimeSheetUnit");
     if (imp($rate) && $unit) {
         if (config::get_config_item("currency") && $project->get_value("currencyTypeID")) {
             $rate = exchangeRate::convert(config::get_config_item("currency"), $rate, $project->get_value("currencyTypeID"));
         }
         return array('rate' => $rate, 'unit' => $unit);
     }
 }
开发者ID:cjbayliss,项目名称:alloc,代码行数:33,代码来源:projectPerson.inc.php

示例4: getProject

 function getProject($pID)
 {
     $this->getAllByPK($pID);
     $row = $this->getNext();
     $p = new project();
     $p->getAllByPK($row['package']);
     return $p->getNext();
 }
开发者ID:saji89,项目名称:whube,代码行数:8,代码来源:bug.php

示例5: display_category_usa

 function display_category_usa($type = "all", $linkurl = 'subcategory.php', $selected = "")
 {
     $project = new project();
     $service = new service();
     $rentorhire = new rentorhire();
     $jobs = new jobs();
     $category = $this->getsubcategory(1);
     if (is_array($category)) {
         echo '<table cellspacing="4" class="sub_categories" width="100%">';
         echo '<tr>';
         $countTd = 0;
         foreach ($category as $row) {
             if ($countTd % 4 == 0 && $countTd > 1) {
                 echo "</tr><tr>";
             }
             $countTd++;
             echo '<td ';
             if ($type == "jobs" && $selected == $row['seo_url']) {
                 echo "class='redBg'";
             } else {
                 echo "class='whiteBg'";
             }
             echo ' ><div><div><a href="' . $linkurl . '?seo_url=' . $row['seo_url'] . '" style="text-decoration:none;">';
             if ($row['markbold'] == "yes") {
                 echo "<strong>" . $row['name'] . "</strong> &nbsp; ";
             } else {
                 echo $row['name'] . " &nbsp; ";
             }
             echo "<font color='green'>";
             if ($type == "services") {
                 echo $service->numofServicebysubCat($row['id']);
             } else {
                 if ($type == "rentorhire") {
                     echo $rentorhire->numofrentorhirebysubCat($row['id']);
                 } else {
                     if ($type = "jobs") {
                         echo $jobs->numofjobsbysubCat($row['id']);
                     } else {
                         if ($type == "all") {
                             echo $project->numOfProjectBySubCat($row['id']) . "," . $rentorhire->numofrentorhirebysubCat($row['id']) . "," . $jobs->numofjobsbysubCat($row['id']) . "," . $service->numofServicebysubCat($row['id']);
                         }
                     }
                 }
             }
             echo "</font>";
             echo '</a></div></div></td>';
             //if($countTd%4!=0) echo '<td width="20"></td>';
         }
         echo '</tr>';
         echo '</table>';
     } else {
         echo "No Sub Category Found!";
     }
 }
开发者ID:sknlim,项目名称:classified-2,代码行数:54,代码来源:maincategory.class.php

示例6: GetCollection

 public static function GetCollection($projectRequest)
 {
     $projectData = new projectData();
     $resultSet = $projectData->GetCollection($projectRequest);
     $projectCollection = array();
     while ($dataRowAsArray = $resultSet->fetch_assoc()) {
         $project = new project($projectRequest);
         $project->Load($dataRowAsArray);
         $projectCollection[] = $project;
     }
     return $projectCollection;
 }
开发者ID:hur1s,项目名称:folio_api,代码行数:12,代码来源:project.php

示例7: show

 public function show($condition = '')
 {
     $sql = "SELECT * FROM " . DB_PREFIX . "bill WHERE 1 " . $condition;
     $q = $this->db->query($sql);
     $data = array();
     $user_id = $space = '';
     $project_id = $space_second = '';
     while ($row = $this->db->fetch_array($q)) {
         if ($row['user_id']) {
             $user_id .= $space . $row['user_id'];
             $space = ',';
         }
         if ($row['project_id']) {
             $project_id .= $space_second . $row['project_id'];
             $space_second = ',';
         }
         $row['cost_capital'] = hg_cny($row['cost']);
         $row['advice_capital'] = hg_cny($row['advice']);
         $data[] = $row;
     }
     if ($user_id) {
         include_once ROOT_PATH . 'lib/class/auth.class.php';
         $auth = new auth();
         $tmp = $auth->getMemberById($user_id);
         $user_info = array();
         foreach ($tmp as $k => $v) {
             $user_info[$v['id']] = $v['user_name'];
         }
     }
     if ($project_id) {
         include_once CUR_CONF_PATH . 'lib/project.class.php';
         $project = new project();
         $project_info = $tmp = array();
         $tmp = $project->show(' AND id IN(' . $project_id . ')');
         foreach ($tmp as $k => $v) {
             $project_info[$v['id']] = $v['name'];
         }
     }
     foreach ($data as $k => $v) {
         if ($user_info) {
             $data[$k]['user_name'] = $user_info[$v['user_id']];
         }
         if ($project_info) {
             $data[$k]['project_name'] = $project_info[$v['project_id']];
         }
         if (!$v['title']) {
             $data[$k]['title'] = date('Y-m-d', $v['business_time']) . '-' . $data[$k]['project_name'];
         }
     }
     return $data;
 }
开发者ID:h3len,项目名称:Project,代码行数:51,代码来源:bill.class.php

示例8: setReadWritePermissionsFromTemplate

 private function setReadWritePermissionsFromTemplate(array $ugroup_mapping)
 {
     $template = ProjectManager::instance()->getProject($this->project->getTemplate());
     $template_read_accesses = $this->mediawiki_manager->getReadAccessControl($template);
     $template_write_accesses = $this->mediawiki_manager->getWriteAccessControl($template);
     $this->mediawiki_manager->saveReadAccessControl($this->project, $this->getUgroupsForProjectFromMapping($template_read_accesses, $ugroup_mapping));
     $this->mediawiki_manager->saveWriteAccessControl($this->project, $this->getUgroupsForProjectFromMapping($template_write_accesses, $ugroup_mapping));
 }
开发者ID:slamj1,项目名称:tuleap,代码行数:8,代码来源:MediawikiInstantiater.class.php

示例9: seedUGroupMapping

 private function seedUGroupMapping()
 {
     if ($this->project->isPublic()) {
         db_query($this->seedProjectUGroupMappings($this->project->getID(), MediawikiUserGroupsMapper::$DEFAULT_MAPPING_PUBLIC_PROJECT));
     } else {
         db_query($this->seedProjectUGroupMappings($this->project->getID(), MediawikiUserGroupsMapper::$DEFAULT_MAPPING_PRIVATE_PROJECT));
     }
 }
开发者ID:amanikamail,项目名称:tuleap,代码行数:8,代码来源:MediawikiInstantiater.class.php

示例10: show_filter

function show_filter()
{
    global $TPL;
    global $defaults;
    $_FORM = project::load_form_data($defaults);
    $arr = project::load_project_filter($_FORM);
    is_array($arr) and $TPL = array_merge($TPL, $arr);
    include_template("templates/projectListFilterS.tpl");
}
开发者ID:cjbayliss,项目名称:alloc,代码行数:9,代码来源:projectList.php

示例11: show_all_exp

function show_all_exp($template)
{
    global $TPL;
    global $expenseForm;
    global $db;
    global $transaction_to_edit;
    if ($expenseForm->get_id()) {
        if ($_POST["transactionID"] && ($_POST["edit"] || is_object($transaction_to_edit) && $transaction_to_edit->get_id())) {
            // if edit is clicked OR if we've rejected changes made to something so are still editing it
            $query = prepare("SELECT * FROM transaction WHERE expenseFormID=%d AND transactionID<>%d ORDER BY transactionID DESC", $expenseForm->get_id(), $_POST["transactionID"]);
        } else {
            $query = prepare("SELECT * FROM transaction WHERE expenseFormID=%d ORDER BY transactionID DESC", $expenseForm->get_id());
        }
        $db->query($query);
        while ($db->next_record()) {
            $transaction = new transaction();
            $transaction->read_db_record($db);
            $transaction->set_values();
            $transaction->get_value("quantity") and $TPL["amount"] = $transaction->get_value("amount") / $transaction->get_value("quantity");
            $TPL["lineTotal"] = $TPL["amount"] * $transaction->get_value("quantity");
            $tf = new tf();
            $tf->set_id($transaction->get_value("fromTfID"));
            $tf->select();
            $TPL["fromTfIDLink"] = $tf->get_link();
            $tf = new tf();
            $tf->set_id($transaction->get_value("tfID"));
            $tf->select();
            $TPL["tfIDLink"] = $tf->get_link();
            $projectID = $transaction->get_value("projectID");
            if ($projectID) {
                $project = new project();
                $project->set_id($transaction->get_value("projectID"));
                $project->select();
                $TPL["projectName"] = $project->get_value("projectName");
            }
            if ($transaction->get_value("fromTfID") == config::get_config_item("expenseFormTfID")) {
                $TPL['expense_class'] = "loud";
            } else {
                $TPL['expense_class'] = "";
            }
            include_template($template);
        }
    }
}
开发者ID:cjbayliss,项目名称:alloc,代码行数:44,代码来源:expenseForm.php

示例12: render

 function render()
 {
     $current_user =& singleton("current_user");
     global $TPL;
     if (isset($current_user->prefs["projectListNum"]) && $current_user->prefs["projectListNum"] != "all") {
         $options["limit"] = sprintf("%d", $current_user->prefs["projectListNum"]);
     }
     $options["projectStatus"] = "Current";
     $options["personID"] = $current_user->get_id();
     $TPL["projectListRows"] = project::get_list($options);
     return true;
 }
开发者ID:cjbayliss,项目名称:alloc,代码行数:12,代码来源:project_list_home_item.inc.php

示例13: show_projects

function show_projects($template_name)
{
    global $TPL;
    global $default;
    $_FORM = task::load_form_data($defaults);
    $arr = task::load_task_filter($_FORM);
    is_array($arr) and $TPL = array_merge($TPL, $arr);
    if (is_array($_FORM["projectID"])) {
        $projectIDs = $_FORM["projectID"];
        foreach ($projectIDs as $projectID) {
            $project = new project();
            $project->set_id($projectID);
            $project->select();
            $_FORM["projectID"] = array($projectID);
            $TPL["graphTitle"] = urlencode($project->get_value("projectName"));
            $arr = task::load_task_filter($_FORM);
            is_array($arr) and $TPL = array_merge($TPL, $arr);
            include_template($template_name);
        }
    }
}
开发者ID:cjbayliss,项目名称:alloc,代码行数:21,代码来源:projectGraph.php

示例14: show_timeSheetItems

function show_timeSheetItems($template_name)
{
    global $date_to_view;
    $current_user =& singleton("current_user");
    global $TPL;
    $query = prepare("SELECT * \n                      FROM timeSheetItem \n                           LEFT JOIN timeSheet ON timeSheetItem.timeSheetID = timeSheet.timeSheetID\n                           LEFT JOIN project ON timeSheet.projectID = project.projectID\n                      WHERE dateTimeSheetItem='%s'\n                            AND timeSheet.personID=%d", date("Y-m-d", $date_to_view), $current_user->get_id());
    $db = new db_alloc();
    $db->query($query);
    while ($db->next_record()) {
        $timeSheetItem = new timeSheetItem();
        $timeSheetItem->read_db_record($db);
        $timeSheetItem->set_values();
        if ($timeSheetItem->get_value("unit") == "Hour") {
            $TPL["daily_hours_total"] += $timeSheetItem->get_value("timeSheetItemDuration");
        }
        $project = new project();
        $project->read_db_record($db);
        $project->set_values();
        if ($project->get_value("projectShortName")) {
            $TPL["item_description"] = $project->get_value("projectShortName");
        } else {
            $TPL["item_description"] = $project->get_value("projectName");
        }
        include_template($template_name);
    }
}
开发者ID:cjbayliss,项目名称:alloc,代码行数:26,代码来源:weeklyTime.php

示例15: beforeDelete

 public function beforeDelete()
 {
     $project = project::model()->findAll();
     $zone = Zone::model()->findAll();
     foreach ($project as $id => $item) {
         $projects = explode('|', $item->country_id);
         if (in_array($this->country_id, array_values($projects))) {
             Yii::app()->setFlashMessage('Can not delete, Country in use in project master', 'error');
             return false;
         }
     }
     foreach ($zone as $id => $item) {
         $zones = explode('|', $item->country_id);
         if (in_array($this->country_id, array_values($zones))) {
             Yii::app()->setFlashMessage('Can not delete, Country in use in zone master', 'error');
             return false;
         }
     }
     return parent::beforeDelete();
 }
开发者ID:jdbaltazar,项目名称:survey-office,代码行数:20,代码来源:Country.php


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