本文整理汇总了PHP中projects::GetCurPrjs方法的典型用法代码示例。如果您正苦于以下问题:PHP projects::GetCurPrjs方法的具体用法?PHP projects::GetCurPrjs怎么用?PHP projects::GetCurPrjs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类projects
的用法示例。
在下文中一共展示了projects::GetCurPrjs方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: hasPermissions
$is_emp = is_emp();
$is_owner = $uid == get_uid(false);
$is_adm = !$is_owner && hasPermissions('projects');
//print_r($_POST);
$closed = $_GET["closed"] ? "true" : ($_GET["all"] ? "" : "false");
$kind = __paramInit('int', 'kind', 'kind', 0);
$trash = __paramInit('int', 'trash', 'trash', 0);
if ($trash) {
//Отображаем и открытые, и закрытые
$closed = '';
if (!($is_owner || $is_adm)) {
//Корзина доступна только владельцу или админу
$trash = 0;
}
}
$prjs = $projects->GetCurPrjs($uid, $closed, $uid == get_uid(), hasPermissions('projects'), $kind, $trash, $page);
/*
* @todo: Функционал не используетсяю. Пока скрываю.
$proj_groups = professions::GetAllGroupsLite();
$proj_groups_by_id = array();
foreach($proj_groups as $key => $wrk_prjgroup)
{
$proj_groups_by_id[$wrk_prjgroup['id']] = $wrk_prjgroup['name'];
}
*/
$daysOfWeek = array(1 => 'Понедельник', 'Вторник', 'Среда', 'Четверг', 'Пятница', 'Суббота', 'Воскресенье');
$conted_prj = $projects->CountMyProjects($uid, $uid == get_uid() || hasPermissions('projects'), false, $kind);
?>
<style type="text/css">
.lnk-feedback, .lnk-feedback:visited{
display: inline-block;
示例2: closeprj
$_GET["open"] = 1;
$_GET["closed"] = 0;
} elseif ($_POST['openclose'] == 2) {
$_GET["closed"] = 1;
$_GET["open"] = 0;
} else {
$_GET["closed"] = 0;
$_GET["open"] = 0;
}
$account = new account();
$ok = $account->GetInfo(get_uid(), true);
$transaction_id = $account->start_transaction(get_uid());
$is_emp = is_emp();
//print_r($_POST);
$closed = $_GET["closed"] ? "true" : ($_GET["open"] ? "false" : "");
$prjs = $projects->GetCurPrjs(get_uid(), $closed);
$proj_groups = professions::GetAllGroupsLite();
$proj_groups_by_id = array();
foreach ($proj_groups as $key => $wrk_prjgroup) {
$proj_groups_by_id[$wrk_prjgroup['id']] = $wrk_prjgroup['name'];
}
$conted_prj = $projects->CountMyProjects(get_uid());
?>
<script type="text/javascript">
function closeprj(num){
document.getElementById('frm').prjid.value = num;
document.getElementById('frm').action.value = 'prj_close';
document.getElementById('frm').submit();
}
function upprj(num){
示例3: header
<?php
if (!defined('IN_STDF')) {
header("HTTP/1.0 404 Not Found");
exit;
}
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/projects.php";
$projects = new projects();
$uid = $user->GetUid($err);
$prjs = $projects->GetCurPrjs($uid);
if ($_SESSION['login'] == $user->login) {
?>
<br>
<div align="right" style="padding-right: 19px;"><a href="/users/<?php
echo $_SESSION['login'];
?>
/setup/projects/"><img src="/images/ico_setup.gif" alt="" width="6" height="9" border="0"></a> <a href="/users/<?php
echo $_SESSION['login'];
?>
/setup/projects/">Изменить</a></div>
<br>
<img src="/images/dot_grey.gif" alt="" width="100%" height="1" border="0"><?php
}
?>
<table width="100%" cellspacing="0" cellpadding="19" border="0">
<?php
if ($prjs) {
foreach ($prjs as $ikey => $prj) {
if ($prj["pro_only"] == 't' && $_SESSION['login'] != $user->login && !$_SESSION['pro_last'] && !hasPermissions('projects')) {
示例4: elseif
$stop_words = new stop_words(hasPermissions('projects'));
if ($_POST['openclose'] == 1) {
$_GET["open"] = 1;
$_GET["closed"] = 0;
} elseif ($_POST['openclose'] == 2) {
$_GET["closed"] = 1;
$_GET["open"] = 0;
}
$account = new account();
$account->GetInfo(get_uid());
$transaction_id = $account->start_transaction(get_uid());
$up_price = array('kon' => new_projects::getPriceByCode(is_pro() ? new_projects::OPCODE_KON_UP : new_projects::OPCODE_KON_UP_NOPRO), 'prj' => new_projects::getPriceByCode(is_pro() ? new_projects::OPCODE_UP : new_projects::OPCODE_UP_NOPRO));
$is_emp = is_emp();
$closed = $_GET["closed"] ? "true" : ($_GET["all"] ? "" : "false");
$kind = __paramInit('int', 'kind', 'kind', 0);
$prjs = $projects->GetCurPrjs(get_uid(), $closed, $uid == get_uid(), hasPermissions('projects'), $kind);
//$is_new_offers = array_filter($prjs, create_function('$a', 'return ($a["unread_msgs"] > 0); '));
//$count_new_offers = 0;
//foreach($is_new_offers as $new_offers) {
// $count_new_offers += $new_offers['unread_msgs'];
//}
$tip = notifications::getProjectsTipEmp();
$count_new_offers = $tip['count'];
$proj_groups = professions::GetAllGroupsLite();
$proj_groups_by_id = array();
foreach ($proj_groups as $key => $wrk_prjgroup) {
$proj_groups_by_id[$wrk_prjgroup['id']] = $wrk_prjgroup['name'];
}
$daysOfWeek = array(1 => 'Понедельник', 'Вторник', 'Среда', 'Четверг', 'Пятница', 'Суббота', 'Воскресенье');
$conted_prj = $projects->CountMyProjects(get_uid(), $uid == get_uid() || hasPermissions('projects'), false, $kind);
?>