當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Projects::get_project方法代碼示例

本文整理匯總了PHP中Projects::get_project方法的典型用法代碼示例。如果您正苦於以下問題:PHP Projects::get_project方法的具體用法?PHP Projects::get_project怎麽用?PHP Projects::get_project使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Projects的用法示例。


在下文中一共展示了Projects::get_project方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: Reports

    echo "uid is " . $_REQUEST['uid'];
    echo "model is " . $_REQUEST['model'];
}
if ($model === 'reports') {
    $db->connect();
    $r = new Reports('member', BASE_DOMAIN);
    $info = $r->get_report($uid);
    print_r($info);
} elseif ($model === 'users') {
    $db->connect();
    $u = new Users('member', BASE_DOMAIN);
    $info = $u->get_user($uid);
} elseif ($model === 'projects') {
    $db->connect();
    $p = new Projects('member', BASE_DOMAIN);
    $info = $p->get_project($uid);
} else {
    //nothing
    echo "Sorry, data error";
}
?>


 <!-- Bootstrap 3.3.5 -->
 <!-- Latest compiled and minified JavaScript -->
 <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>

<!-- <a href="#" id="add_report" name="add_report">Add Report</a> -->
<hr>

開發者ID:autonomous019,項目名稱:fsi,代碼行數:29,代碼來源:settings_edit.php

示例2: Projects

<div id="project_container">

<?php 
//get data from projects objects, then create a atomized view for each page.
require_once "config.inc.php";
if (!empty($_REQUEST['project'])) {
    $project = $_REQUEST['project'];
} else {
    $project = "";
}
$db = Database::obtain(DB_SERVER, DB_USER, DB_PASS, DB_DATABASE);
$db->connect();
$p = new Projects('member', BASE_DOMAIN);
$results = $p->get_project($project);
if (empty($results)) {
    echo "<b>DATA ERROR</b><br /><br />";
}
//print_r($results);
for ($x = 0; $x < count($results); $x++) {
    $id = $results[$x]['id'];
    $project_category_id = $results[$x]['project_category_id'];
    $name = $results[$x]['name'];
    $description = $results[$x]['description'];
    $other = $results[$x]['other'];
    $bg_img = $results[$x]['bg_img'];
    $vertical_img = $results[$x]['vertical_img'];
    $project_vertical_img = $vertical_img;
    $project_bg_img = $bg_img;
    $project_category_name = $p->get_category_name($project_category_id);
    $project_category_name = $project_category_name['name'];
    $project_link = preg_replace('/\\s+/', '_', $project_category_name);
開發者ID:autonomous019,項目名稱:fsi,代碼行數:31,代碼來源:projects_pages.php


注:本文中的Projects::get_project方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。