本文整理汇总了PHP中Project::populateFromId方法的典型用法代码示例。如果您正苦于以下问题:PHP Project::populateFromId方法的具体用法?PHP Project::populateFromId怎么用?PHP Project::populateFromId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Project
的用法示例。
在下文中一共展示了Project::populateFromId方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Hypothesis
** the Free Software Foundation, either version 3 of the License, or
** (at your option) any later version.
**
** ACH 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 Open Source ACH. If not, see <http://www.gnu.org/licenses/>.
//////////////////////////////////////////////////////////////////////////////// */
include "code/includes.php";
$active_hypothesis = new Hypothesis();
$active_hypothesis->populateFromId($_REQUEST['hypothesis_id']);
$active_project = new Project();
$active_project->populateFromId($_REQUEST['project_id']);
foreach ($_REQUEST as $field => $value) {
$active_hypothesis->{$field} = addslashes($value);
}
$active_hypothesis->id = $_REQUEST['hypothesis_id'];
$active_hypothesis->update();
setStatusMessage("Updated!");
?>
<html>
<head>
<title>Updating...</title>
<meta http-equiv=Refresh content="0; url=project/<?php
echo $_REQUEST['project_id'];
?>
/hypothesis/<?php
示例2: Project
** the Free Software Foundation, either version 3 of the License, or
** (at your option) any later version.
**
** ACH 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 Open Source ACH. If not, see <http://www.gnu.org/licenses/>.
//////////////////////////////////////////////////////////////////////////////// */
include "code/includes.php";
$active_user->getProjects();
$id = $_REQUEST['id'];
$active_project = new Project();
$active_project->populateFromId($id);
?>
<html>
<head>
<title>ACH: Chatting about project "<?php
echo $active_project->title;
?>
"</title>
<?php
include "parts/includes.php";
?>
<script language="JavaScript">
chatActive = "y";
示例3: Project
<?php
}
}
?>
<?php
//FOLLOWED BY A LIST OF PROJECTS THAT THE ACTIVE USER IS A VIEW-ONLY MEMBER OF...
for ($i = 0; $i <= count($active_user->member_of_projects_view_only); $i++) {
if ($i == 0 && count($active_user->member_of_projects_view_only) > 0) {
echo "<h3>View-Only Member of Projects:</h3>";
}
$this_project = new Project();
$this_project->populateFromId($active_user->member_of_projects_view_only[$i]);
if ($this_project->title != "") {
?>
<div class="projectList">
<h4><a href="<?php
echo $base_URL;
?>
project/<?php
echo $this_project->id;
?>
"><?php
echo $this_project->title;
示例4: Project
$profile_image_path = "/images/user/profile_" . $display_user->id . ".jpg";
?>
<h2><span class="hilight">Public Projects</span></h2>
<?php
$display_user->getDirectoryProjects();
if (count($display_user->projects) == 0) {
echo "This user is not a member of any public projects.";
} else {
?>
<?php
for ($i = 0; $i <= count($display_user->projects); $i++) {
$this_project = new Project();
$this_project->populateFromId($display_user->projects[$i]);
if ($this_project->title != "") {
?>
<div class="projectList">
<h3><a href="<?php
echo $base_URL;
?>
project/<?php
echo $this_project->id;
?>
"><?php
echo $this_project->title;
?>
</a> <?php
示例5: displayWaitingForApproval
public function displayWaitingForApproval()
{
$result = mysql_do("SELECT * FROM join_requests WHERE user_id='{$this->id}'");
while ($query_data = mysql_fetch_array($result)) {
$this_project = new Project();
$this_project->populateFromId($query_data['project_id']);
echo '<p>Still waiting on approval to join project <a href="' . $base_URL . 'project/' . $this_project->id . '">' . $this_project->title . '</a>.</p>';
}
}
示例6: while
<div class="ydsf left">
<div class="inner">
<div class="main">
<h2>Projects using evidence with serial number "<?php
echo $display_evidence->serial_number;
?>
":</h2>
<?php
$result = mysql_do("SELECT * FROM evidence WHERE serial_number='{$display_evidence->serial_number}';");
while ($query_data = mysql_fetch_array($result)) {
$this_evidence = new Evidence();
$this_evidence->populateFromId($query_data['id']);
$this_project = new Project();
$this_project->populateFromId($this_evidence->project_id);
if ($this_evidence->name != "" && $this_project->title != "") {
?>
<p>Project <a href="<?php
echo $base_URL;
?>
project/<?php
echo $this_project->id;
?>
"><?php
echo $this_project->title;
?>
</a> describes evidence as: <a href="<?php
echo $base_URL;
?>
示例7: Project
** the Free Software Foundation, either version 3 of the License, or
** (at your option) any later version.
**
** ACH 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 Open Source ACH. If not, see <http://www.gnu.org/licenses/>.
//////////////////////////////////////////////////////////////////////////////// */
include "code/includes.php";
include "parts/includes.php";
$project_id = $_REQUEST['id'];
$this_project = new Project();
$this_project->populateFromId($project_id);
if ($this_project->open == "y") {
$result = mysql_do("INSERT INTO users_in_projects (project_id, user_id) VALUES ('{$project_id}', '{$active_user->id}')");
$this_project->mailEveryone("[ACH] New user in project '" . $this_project->title . "'", "Hello,\r\n\r\n" . $active_user->name . " has joined the project '" . $this_project->title . "':\r\n" . $base_URL . "project/" . $this_project->id . "\r\n\r\n - The ACH Bot");
} else {
$result = mysql_do("INSERT INTO join_requests (user_id, project_id) VALUES ('{$active_user->id}', '{$project_id}')");
$project_owner = new User();
$project_owner->populateFromId($this_project->user_id);
sendMail($project_owner->email, "[ACH] A user has requested to join your project", "Hello,\r\n\r\n" . $active_user->name . " has requested permission to join your project '" . $this_project->title . "'. To respond, please log into your ACH account here:\r\n" . $base_URL . "\r\n\r\nThanks!\r\n\r\n - The ACH Bot");
}
?>
<html>
<head>
<title>Updating...</title>
<meta http-equiv=Refresh content="0; url=project/<?php
示例8: lock
<h2>Browse Public Projects</h2>
<p>The projects below may be viewed by anyone.<br />
Those with a lock (
<span class="closed"><img src="<?php
echo $base_URL;
?>
images/icons/lock.png" alt="Closed" /></span>
) are still publicly viewable, but require the owner's permission for you to join.</p>
<?php
$active_user->getProjects();
$result = mysql_do("SELECT * FROM projects WHERE directory='y' ORDER BY title");
while ($query_data = mysql_fetch_array($result)) {
$this_project = new Project();
$this_project->populateFromId($query_data['id']);
?>
<div class="projectList">
<h4><a href="<?php
echo $base_URL;
?>
project/<?php
echo $this_project->id;
?>
"><?php
echo $this_project->title;
?>
</a> <?php
if ($this_project->open != "y") {
示例9: Evidence
** 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 Open Source ACH. If not, see <http://www.gnu.org/licenses/>.
//////////////////////////////////////////////////////////////////////////////// */
header("Content-type: application/xml");
echo '<?xml version="1.0" encoding="ISO-8859-1"?>';
include "code/includes.php";
$active_evidence = new Evidence();
$active_evidence->populateFromId($_REQUEST['evidence_id']);
$this_user = new User();
$this_user->populateFromId($active_evidence->user_id);
$active_project = new Project();
$active_project->populateFromId($active_evidence->project_id);
$active_project->getEandH();
$active_project->getUsers();
$this_group_diag = Evidence::getDiagGroup($active_evidence, $active_project);
?>
<evidence>
<id><?php
echo $active_evidence->id;
?>
</id>
<name><![CDATA[<?php
echo $active_evidence->name;
?>
]]></name>
<details><![CDATA[<?php