本文整理匯總了PHP中project::activate方法的典型用法代碼示例。如果您正苦於以下問題:PHP project::activate方法的具體用法?PHP project::activate怎麽用?PHP project::activate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類project
的用法示例。
在下文中一共展示了project::activate方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: project
echo $lang['requests_newRequest'];
}
?>
</h2>
<table border="0" cellpadding="2" cellspacing="0">
<tr>
<td><?php
echo $lang['common_project'];
?>
: </td>
<td><select name="projectid">
<?php
$projectInst = new project();
$list = $projectInst->getList();
while ($element = current($list)) {
$projectInst->activate($element);
$selected = "";
if ($projectInst->id == $requestInst->projectId) {
$selected = "selected";
}
echo "<option " . $selected . " value=\"" . $projectInst->id . "\">" . $projectInst->name . "\n";
next($list);
}
?>
</select></td>
</tr><tr>
<td><?php
echo $lang['common_subject'];
?>
: </td>
<td><input type="text" name="subject" value="<?php
示例2: elseif
if (tool::securePost('action') == "save" && tool::securePost('id')) {
# fill project with submitted data
$projectInst->id = tool::securePost('id');
$projectInst->fill(tool::securePostAll());
$status = $projectInst->update();
} elseif (tool::securePost('action') == "save") {
$projectInst->fill(tool::securePostAll());
$status = $projectInst->insert();
}
if (tool::securePost('action') == "delete") {
$projectInst->id = tool::securePost('id');
$projectInst->delete();
}
if (tool::securePost('action') == "edit") {
$status = 0;
$projectInst->activate(tool::securePost('id'));
}
#######################################################################
## make edit / new form
if (!$status) {
echo "<h2>" . $lang['common_editRecord'] . " (<a href=\"" . $toolInst->encodeUrl("index.php?content=" . $content) . "\">" . $lang['common_newRecord'] . "</a>)</h2>\n";
} else {
$projectInst->clear();
?>
<h2><?php
echo $lang['common_newRecord'];
?>
</h2><?php
}
?>
示例3: project
</tr><tr>
<td><?php
echo $lang['common_project'];
?>
: </td>
<td><select name="filterprojectid"><option value=""><?php
echo $lang['common_notSpecified'];
?>
<?php
$projectInst = new project();
if (tool::securePost('filtercustomerid')) {
$projectInst->filterCustomerId = tool::securePost('filtercustomerid');
}
$list = $projectInst->getList();
while ($element = current($list)) {
$projectInst->activate($element);
$selected = "";
if ($projectInst->id == tool::securePost('filterprojectid')) {
$selected = "selected";
}
echo "<option " . $selected . " value=\"" . $projectInst->id . "\">" . $projectInst->name . "\n";
next($list);
}
?>
</select></td>
</tr><tr>
<td><?php
echo $lang['common_subjectContains'];
?>
: </td>
<td><input type="text" name="filtersubject" value="<?php