• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP project类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: session_require

 *
 * Tuleap is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Tuleap. If not, see <http://www.gnu.org/licenses/>.
 */
require_once 'pre.php';
require_once 'vars.php';
require_once 'www/project/admin/project_admin_utils.php';
$group_id = $request->get('group_id');
session_require(array('group' => $group_id, 'admin_flags' => 'A'));
$descfieldsinfos = getProjectsDescFieldsInfos();
$currentproject = new project($group_id);
$descfieldsvalue = $currentproject->getProjectsDescFieldsValue();
// If this was a submission, make updates
// update info for page
$res_grp = db_query("SELECT * FROM groups WHERE group_id=" . db_ei($group_id));
if (db_numrows($res_grp) < 1) {
    exit_no_group();
}
$row_grp = db_fetch_array($res_grp);
$form_group_name = trim($request->get('form_group_name'));
$form_shortdesc = $request->get('form_shortdesc');
$Update = $request->get('Update');
$valid_data = 0;
if ($Update) {
    //data validation
    $valid_data = 1;
开发者ID:rinodung,项目名称:tuleap,代码行数:31,代码来源:editgroupinfo.php


示例17: maincategory

  <?php 
$maincategory = new maincategory();
$maincategory->display_category_usa();
?>
</td>
</tr>
<tr>
	<td>&nbsp;</td>
</tr>
<tr>
  <td class="heading">OutSource</td>
</tr>
<tr>
<td>
  <?php 
$projects = new project();
$projects_status = $projects->display_projects("", 2, 0, 0, 10, "order by rand()");
?>
    </td>
</tr>
<tr>
<td align="right">
<?php 
if ($projects_status) {
    ?>
  <a href="view_projects.php">View More</a> <?php 
}
?>
</td></tr>
</table>
<?php 
开发者ID:sknlim,项目名称:classified-2,代码行数:31,代码来源:index.php


示例18: foreach



<table border="0" cellpadding="2" cellspacing="1" width="100%">

<tr>
<td class="dt">Rating</td>
<td class="dt" width="150">Programmer</td>
<td class="dt">Project Name</td>
<td class="dt">Review Date</td>
<td class="dt">Project Status</td>
</tr>

<?php 
if (is_array($reviews)) {
    foreach ($reviews as $review) {
        $objproject = new project();
        $pdetails = $objproject->getdetails($review['projectid']);
        $pstatus = $objproject->getstatus($review['projectid']);
        if ($pstatus == "open") {
            $pstatus = '<font style="color:green;">Open</font>';
        }
        if ($pstatus == "frozen") {
            $pstatus = '<font style="color:blue;">Frozen</font>';
        }
        if ($pstatus == "cancelled") {
            $pstatus = '<font style="color:red;">Cancelled</font>';
        }
        if ($pstatus == "closed") {
            $pstatus = '<font style="color:red;">Closed</font>';
        }
        ?>
开发者ID:sknlim,项目名称:classified-2,代码行数:29,代码来源:feedback.php


示例19: clientContact

}
$TPL["clientCategoryOptions"] = page::select_options($cc, $client->get_value("clientCategory"));
$client->get_value("clientCategory") and $TPL["client_clientCategoryLabel"] = $cc[$client->get_value("clientCategory")];
// client contacts
if ($_POST["clientContact_save"] || $_POST["clientContact_delete"]) {
    $clientContact = new clientContact();
    $clientContact->read_globals();
    if ($_POST["clientContact_save"]) {
        #$clientContact->set_value('clientID', $_POST["clientID"]);
        $clientContact->save();
    }
    if ($_POST["clientContact_delete"]) {
        $clientContact->delete();
    }
}
if (!$clientID) {
    $TPL["message_help"][] = "Create a new Client by inputting the Client Name and other details and clicking the Create New Client button.";
    $TPL["main_alloc_title"] = "New Client - " . APPLICATION_NAME;
    $TPL["clientSelfLink"] = "New Client";
} else {
    $TPL["main_alloc_title"] = "Client " . $client->get_id() . ": " . $client->get_name() . " - " . APPLICATION_NAME;
    $TPL["clientSelfLink"] = sprintf("<a href=\"%s\">%d %s</a>", $client->get_url(), $client->get_id(), $client->get_name(array("return" => "html")));
}
if ($current_user->have_role("admin")) {
    $TPL["invoice_links"] .= "<a href=\"" . $TPL["url_alloc_invoice"] . "clientID=" . $clientID . "\">New Invoice</a>";
}
$projectListOps = array("showProjectType" => true, "clientID" => $client->get_id());
$TPL["projectListRows"] = project::get_list($projectListOps);
$TPL["client_clientPostalAddress"] = $client->format_address("postal");
$TPL["client_clientStreetAddress"] = $client->format_address("street");
include_template("templates/clientM.tpl");
开发者ID:cjbayliss,项目名称:alloc,代码行数:31,代码来源:client.php


示例20: project

<?php

include $_SERVER['DOCUMENT_ROOT'] . "/header.php";
include $_SERVER['DOCUMENT_ROOT'] . "/subheader.php";
$projects = new project();
$projects->markProjectExpired();
include $_SERVER['DOCUMENT_ROOT'] . "/footer.php";
include $_SERVER['DOCUMENT_ROOT'] . "/subfooter.php";
开发者ID:sknlim,项目名称:classified-2,代码行数:8,代码来源:cornjob.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP projects类代码示例发布时间:2022-05-23
下一篇:
PHP progress_trace类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap