本文整理汇总了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>
示例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);