Пример #1
0
}
$block9->paletteScript(6, 'info', '../tasks/viewtask.php', 'false,true,false', $strings['view']);
if ($teamMember == 'true' || $_SESSION['profilSession'] == '5') {
    $block9->paletteScript(7, 'edit', '../tasks/edittask.php?project=' . $projectDetail->pro_id[0], 'false,true,true', $strings['edit']);
}
$block9->closePaletteScript($comptListMilestones, $listMilestones->tas_id);
$block10 = new block();
//--- block header ----
$block10->form = 'wbTuuC';
$block10->openForm("../phases/listphases.php?id={$id}#" . $block10->form . "Anchor");
$block10->sorting('tasks_closed', $sortingUser->sor_tasks_closed[0], 'tas.due_date ASC', $sortingFields = array('tas.priority', 'tas.name', 'tas.status', 'tas.completion', 'tas.due_date', 'tas.parent_phase', 'mem.login', 'tas.published'));
$block10->borne = $blockPage->returnBorne('1');
$block10->rowsLimit = '20';
//--- get data from sql ---------
$tmpquery = "WHERE tas.project = '{$id}' AND tas.status NOT IN(0,2,3) AND tas.milestone = '1' ORDER BY {$block10->sortingValue}";
$block10->recordsTotal = compt($initrequest['tasks'] . ' ' . $tmpquery);
//--- list ---------
$listTasks = new request();
$listTasks->openTasks($tmpquery, $block10->borne, $block10->rowsLimit);
$comptListTasks = count($listTasks->tas_id);
$block10->headingToggle($strings['tasks_closed'] . ' <span class=addition>(' . $comptListTasks . ')</span>');
$block10->openPaletteIcon();
if ($teamMember == 'true' || $_SESSION['profilSession'] == '5') {
    $block10->paletteIcon(0, 'add', $strings['add']);
    $block10->paletteIcon(1, 'remove', $strings['delete']);
    $block10->paletteIcon(2, 'copy', $strings['copy']);
    // $block10->paletteIcon(3,'export',$strings['export']);
    if ($sitePublish == 'true') {
        $block10->paletteIcon(4, 'add_projectsite', $strings['add_project_site']);
        $block10->paletteIcon(5, 'remove_projectsite', $strings['remove_project_site']);
    }
Пример #2
0
$block1->headingForm($strings["delete_users"]);
$block1->openContent();
$block1->contentTitle($strings["delete_following"]);
$id = str_replace("**", ",", $id);
$tmpquery = "WHERE mem.id IN({$id}) ORDER BY mem.name";
$listMembers = new request();
$listMembers->openMembers($tmpquery);
$comptListMembers = count($listMembers->mem_id);
for ($i = 0; $i < $comptListMembers; $i++) {
    echo "<tr class=\"odd\"><td valign=\"top\" class=\"leftvalue\">&nbsp;</td><td>" . $listMembers->mem_login[$i] . "&nbsp;(" . $listMembers->mem_name[$i] . ")</td></tr>";
}
$tmpquery = "SELECT pro.id FROM " . $tableCollab["projects"] . " pro WHERE pro.owner IN({$id})";
compt($tmpquery);
$totalProjects = $countEnregTotal;
$tmpquery = "SELECT tas.id FROM " . $tableCollab["tasks"] . " tas WHERE tas.assigned_to IN({$id})";
compt($tmpquery);
$totalTasks = $countEnregTotal;
$block1->contentTitle($strings["reassignment_user"]);
echo "<tr class=\"odd\"><td valign=\"top\" class=\"leftvalue\">&nbsp;</td><td>" . $strings["there"] . " {$totalProjects} " . $strings["projects"] . " " . $strings["owned_by"] . "</td></tr>\r\n<tr class=\"odd\"><td valign=\"top\" class=\"leftvalue\">&nbsp;</td><td>" . $strings["there"] . " {$totalTasks} " . $strings["tasks"] . " " . $strings["owned_by"] . "</td></tr>\r\n<tr class=\"odd\"><td valign=\"top\" class=\"leftvalue\">&nbsp;</td><td><b>" . $strings["reassign_to"] . " : </b> ";
$tmpquery = "WHERE mem.profil != '3' AND mem.id NOT IN({$id}) ORDER BY mem.name";
$reassign = new request();
$reassign->openMembers($tmpquery);
$comptReassign = count($reassign->mem_id);
echo "<select name=\"at\">\r\n<option value=\"0\" selected>" . $strings["unassigned"] . "</option>";
for ($i = 0; $i < $comptReassign; $i++) {
    echo "<option value=\"" . $reassign->mem_id[$i] . "\">" . $reassign->mem_login[$i] . " / " . $reassign->mem_name[$i] . "</option>";
}
echo "</select></td></tr>\r\n<tr class=\"odd\"><td valign=\"top\" class=\"leftvalue\">&nbsp;</td><td><input type=\"submit\" name=\"delete\" value=\"" . $strings["delete"] . "\"> <input type=\"button\" name=\"cancel\" value=\"" . $strings["cancel"] . "\" onClick=\"history.back();\"><input type=\"hidden\" value=\"{$id}\" name=\"id\"></td></tr>";
$block1->closeContent();
$block1->headingForm_close();
$block1->closeForm();
Пример #3
0
$block1->closeContent();
$block1->block_close();
$block1->closeForm();
$block2 = new block();
$block2->form = "ahT";
$block2->openForm("../tasks/addtasktime.php?id={$id}#" . $block2->form . "Anchor");
$block2->heading($strings["task_time"] . ' : ' . $strings["details"]);
$block2->openPaletteIcon();
$block2->paletteIcon(0, "remove", $strings["delete"]);
$block2->paletteIcon(1, "edit", $strings["edit"]);
$block2->closePaletteIcon();
$block2->borne = $blockPage->returnBorne("1");
$block2->rowsLimit = "20";
$block2->sorting('tasks_time', $sortingUser->sor_tasks_time[0], 'tim.date ASC', $sortingFields = array(0 => 'mem.name', 1 => 'tim.date', 2 => 'tim.hours', 3 => 'tim.created', 4 => 'tim.modified', 5 => 'tim.comments'));
$tmpquery = "WHERE tim.task = '{$id}' ORDER BY {$block2->sortingValue}";
$block2->recordsTotal = compt($initrequest["tasks_time"] . " " . $tmpquery);
$listTaskTimes = new request();
$listTaskTimes->openTaskTime($tmpquery, $block2->borne, $block2->rowsLimit);
$comptListTaskTimes = count($listTaskTimes->tim_id);
if ($comptListTaskTimes != "0") {
    $block2->openResults();
    $block2->labels($labels = array(0 => $strings["owner"], 1 => $strings["date"], 2 => ucfirst($strings["hours"]), 3 => $strings["created"], 4 => $strings["modified"], 5 => $strings['comment']), "true");
    // display logged hours for project
    for ($i = 0; $i < $comptListTaskTimes; $i++) {
        // only PM, PMA, and OWNERS can modify/delete
        if ($_SESSION['profilSession'] == 1 or $_SESSION['profilSession'] == 5 or $_SESSION['idSession'] == $listTaskTimes->tim_owner[$i]) {
            $block2->openRow($listTaskTimes->tim_id[$i]);
            $block2->checkboxRow($listTaskTimes->tim_id[$i], 'true');
            $block2->cellRow($listTaskTimes->tim_mem_name[$i]);
            $block2->cellRow($listTaskTimes->tim_date[$i]);
            $block2->cellRow($listTaskTimes->tim_hours[$i]);
Пример #4
0
    if ($sitePublish == "true") {
        $block1->paletteIcon(4, "add_projectsite", $strings["add_project_site"]);
        $block1->paletteIcon(5, "remove_projectsite", $strings["remove_project_site"]);
    }
}
$block1->paletteIcon(6, "info", $strings["view"]);
if ($teamMember == "true") {
    $block1->paletteIcon(7, "edit", $strings["edit"]);
    $block1->paletteIcon(8, "timelog", $strings["loghours"]);
}
$block1->closePaletteIcon();
$block1->borne = $blockPage->returnBorne("1");
$block1->rowsLimit = "20";
$block1->sorting("meetings", $sortingUser->sor_meetings[0], 'mee.date DESC', $sortingFields = array(0 => 'mee.id', 1 => 'mee.name', 2 => 'mee.priority', 3 => 'mee.status', 4 => 'mee.date'));
$tmpquery = "WHERE mee.project = '{$project}' ORDER BY {$block1->sortingValue}";
$block1->recordsTotal = compt($initrequest["meetings"] . " " . $tmpquery);
$listMeetings = new request();
$listMeetings->openMeetings($tmpquery, $block1->borne, $block1->rowsLimit);
$comptListMeetings = count($listMeetings->mee_id);
if ($comptListMeetings != "0") {
    $block1->openResults();
    $block1->labels($labels = array(0 => $strings['id'], 1 => $strings['meeting'], 2 => $strings['priority'], 3 => $strings['status'], 4 => $strings['date']), 'true');
    for ($i = 0; $i < $comptListMeetings; $i++) {
        $idStatus = $listMeetings->mee_status[$i];
        $idPriority = $listMeetings->mee_priority[$i];
        $idPublish = $listMeetings->mee_published[$i];
        $block1->openRow($listMeetings->mee_id[$i]);
        $block1->checkboxRow($listMeetings->mee_id[$i]);
        $block1->cellRow(buildLink("../meetings/viewmeeting.php?id=" . $listMeetings->mee_id[$i], $listMeetings->mee_id[$i], LINK_INSIDE));
        if ($idStatus == 1) {
            $block1->cellRow(buildLink("../meetings/viewmeeting.php?id=" . $listMeetings->mee_id[$i], $listMeetings->mee_name[$i], LINK_STRIKE));
    $block6->sorting("notes", $sortingUser->sor_notes[0], "note.date DESC", $sortingFields = array(0 => "note.subject", 1 => "note.topic", 2 => "note.date", 3 => "mem.login", 4 => "note.published"));
} else {
    $block6->sorting("notes", $sortingUser->sor_notes[0], "note.date DESC", $sortingFields = array(0 => "note.subject", 1 => "note.date", 2 => "mem.login", 3 => "note.published"));
}
if ($projectsFilter == "true") {
    if ($comptListProjectsFilter != "0") {
        $tmpquery = "{$searchNotes} AND note.project IN({$filterResults}) ORDER BY {$block6->sortingValue}";
    } else {
        $validNotes = "false";
    }
} else {
    $tmpquery = "{$searchNotes} ORDER BY {$block6->sortingValue}";
}
$comptListNotes = "0";
if ($validNotes == "true") {
    $block6->recordsTotal = compt($initrequest["notes"] . " " . $tmpquery);
    $listNotes = new request();
    $listNotes->openNotes($tmpquery, $block6->borne, $block6->rowsLimit);
    $comptListNotes = count($listNotes->note_id);
    // echo "$tmpquery<br>";
}
$comptTotal = $block1->recordsTotal + $block2->recordsTotal + $block3->recordsTotal + $block4->recordsTotal + $block5->recordsTotal + $block6->recordsTotal;
$blockPage = new block();
$blockPage->bornesNumber = "6";
$block0 = new block();
$block0->openContent();
$block0->contentTitle($strings["results_for_keywords"] . " : <b>{$searchfor}</b>");
echo "<tr class=\"odd\"><td valign=\"top\" class=\"leftvalue\">&nbsp;</td><td>";
if ($comptTotal == "1") {
    echo "1&#160;" . $strings["match"];
}
$block1->paletteScript(0, "add", "../clients/editclient.php?", "true,false,false", $strings["add"]);
$block1->paletteScript(1, "remove", "../clients/deleteclients.php?", "false,true,true", $strings["delete"]);
$block1->closePaletteScript($comptListOrganizations, $listOrganizations->org_id);
$block2 = new block();
$block2->form = "clientList2";
$block2->openForm("../clients/listclients.php#" . $block2->form . "Anchor");
$block2->heading($strings["organizations"]);
$block2->openPaletteIcon();
$block2->paletteIcon(0, "add", $strings["add"]);
$block2->paletteIcon(1, "remove", $strings["delete"]);
$block2->closePaletteIcon();
$block2->borne = $blockPage->returnBorne("2");
$block2->rowsLimit = "1";
$block2->sorting("organizations", $sortingUser->sor_organizations[0], "org.name ASC", $sortingFields = array(0 => "org.name", 1 => "org.phone", 2 => "org.url"));
$tmpquery = "WHERE org.id != '1' ORDER BY {$block2->sortingValue}";
$block2->recordsTotal = compt($initrequest["organizations"] . " " . $tmpquery);
$listOrganizations2 = new request();
$listOrganizations2->openOrganizations($tmpquery, $block2->borne, $block2->rowsLimit);
$comptlistOrganizations2 = count($listOrganizations2->org_id);
if ($comptlistOrganizations2 != "0") {
    $block2->openResults();
    $block2->labels($labels = array(0 => $strings["name"], 1 => $strings["phone"], 2 => $strings["url"]), "false", $sorting = "false", $sortingOff = array(0 => "2", 1 => "DESC"));
    for ($i = 0; $i < $comptlistOrganizations2; $i++) {
        $block2->openRow();
        $block2->checkboxRow($listOrganizations2->org_id[$i]);
        $block2->cellRow(buildLink("../clients/viewclient.php?id=" . $listOrganizations2->org_id[$i], $listOrganizations2->org_name[$i], LINK_INSIDE));
        $block2->cellRow($listOrganizations2->org_phone[$i]);
        $block2->cellRow(buildLink($listOrganizations2->org_url[$i], $listOrganizations2->org_url[$i], LINK_OUT));
        $block2->closeRow();
    }
    $block2->closeResults();
Пример #7
0
        $tmpquery = "LEFT OUTER JOIN " . $tableCollab["teams"] . " teams ON teams.project = pro.id ";
        $tmpquery .= " WHERE pro.status IN(0,1,4) AND teams.member = '{$idSession}' ORDER BY {$block1->sortingValue}";
    } else {
        $tmpquery = "WHERE pro.status IN(0,1,4) ORDER BY {$block1->sortingValue}";
    }
} else {
    if ($typeProjects == "active") {
        if ($projectsFilter == "true") {
            $tmpquery = "LEFT OUTER JOIN " . $tableCollab["teams"] . " teams ON teams.project = pro.id ";
            $tmpquery .= "WHERE pro.status IN(2,3) AND teams.member = '{$idSession}' ORDER BY {$block1->sortingValue}";
        } else {
            $tmpquery = "WHERE pro.status IN(2,3)  ORDER BY {$block1->sortingValue}";
        }
    }
}
$block1->recordsTotal = compt($initrequest["projects"] . " " . $tmpquery);
$listProjects = new request();
$listProjects->openProjects($tmpquery, $block1->borne, $block1->rowsLimit);
$comptListProjects = count($listProjects->pro_id);
if ($comptListProjects != "0") {
    $block1->openResults();
    $block1->labels($labels = array(0 => $strings["id"], 1 => $strings["project"], 2 => $strings["priority"], 3 => $strings["organization"], 4 => $strings["status"], 5 => $strings["owner"], 6 => $strings["project_site"]), "true");
    for ($i = 0; $i < $comptListProjects; $i++) {
        if ($listProjects->pro_org_id[$i] == "1") {
            $listProjects->pro_org_name[$i] = $strings["none"];
        }
        $idStatus = $listProjects->pro_status[$i];
        $idPriority = $listProjects->pro_priority[$i];
        $block1->openRow();
        $block1->checkboxRow($listProjects->pro_id[$i]);
        $block1->cellRow($blockPage->buildLink("../projects/viewproject.php?id=" . $listProjects->pro_id[$i], $listProjects->pro_id[$i], in));
Пример #8
0
    }
    $block5->closePaletteScript($comptListFiles, $listFiles->fil_id);
}
$block6 = new block();
$block6->form = 'wbJ';
$block6->openForm('../projects/viewproject.php?id=' . $projectDetail->pro_id[0] . '#' . $block6->form . 'Anchor');
$block6->borne = $blockPage->returnBorne('4');
$block6->rowsLimit = '5';
$comptTopic = count($topicNote);
if ($comptTopic != '0') {
    $block6->sorting('notes', $sortingUser->sor_notes[0], 'note.date DESC', $sortingFields = array(0 => 'note.subject', 1 => 'note.topic', 2 => 'note.date', 3 => 'mem.login', 4 => 'note.published'));
} else {
    $block6->sorting('notes', $sortingUser->sor_notes[0], 'note.date DESC', $sortingFields = array(0 => 'note.subject', 1 => 'note.date', 2 => 'mem.login', 3 => 'note.published'));
}
$tmpquery = "WHERE note.project = '{$id}' ORDER BY {$block6->sortingValue}";
$block6->recordsTotal = compt($initrequest['notes'] . ' ' . $tmpquery);
$listNotes = new request();
$listNotes->openNotes($tmpquery, $block6->borne, $block6->rowsLimit);
$comptListNotes = count($listNotes->note_id);
$block6->headingToggle($strings['notes'] . ' <span class=addition>(' . $comptListNotes . ')</span>');
$block6->openPaletteIcon();
if ($teamMember == 'true' || $_SESSION['profilSession'] == '5') {
    $block6->paletteIcon(0, 'add', $strings['add']);
    $block6->paletteIcon(1, 'remove', $strings['delete']);
    // $block6->paletteIcon(2,'export',$strings['export']);
    if ($sitePublish == 'true') {
        $block6->paletteIcon(3, 'add_projectsite', $strings['add_project_site']);
        $block6->paletteIcon(4, 'remove_projectsite', $strings['remove_project_site']);
    }
}
$block6->paletteIcon(5, 'info', $strings['view']);
Пример #9
0
            }
        }
        if ($clientsOk == '') {
            $listClients = 'false';
        } else {
            $tmpquery = "WHERE org.id IN({$clientsOk}) AND org.id != '1' ORDER BY {$block1->sortingValue}";
        }
    }
} else {
    if ($clientsFilter == 'true' && $_SESSION['profilSession'] == '1') {
        $tmpquery = "WHERE org.owner = '" . $_SESSION['idSession'] . "' AND org.id != '1' ORDER BY {$block1->sortingValue}";
    } else {
        $tmpquery = "WHERE org.id != '1' ORDER BY {$block1->sortingValue}";
    }
}
$block1->recordsTotal = compt($initrequest['organizations'] . ' ' . $tmpquery);
if ($listClients != 'false') {
    $listOrganizations = new request();
    $listOrganizations->openOrganizations($tmpquery, $block1->borne, $block1->rowsLimit);
    $comptListOrganizations = count($listOrganizations->org_id);
} else {
    $comptListOrganizations = 0;
}
if ($comptListOrganizations != '0') {
    $block1->openResults();
    $block1->labels($labels = array(0 => $strings['name'], 1 => $strings['phone'], 2 => $strings['url']), 'false');
    for ($i = 0; $i < $comptListOrganizations; $i++) {
        $block1->openRow($listOrganizations->org_id[$i]);
        $block1->checkboxRow($listOrganizations->org_id[$i]);
        $block1->cellRow(buildLink('../clients/viewclient.php?id=' . $listOrganizations->org_id[$i], $listOrganizations->org_name[$i], LINK_INSIDE));
        $block1->cellRow($listOrganizations->org_phone[$i]);
Пример #10
0
    //$block1->paletteIcon(3,"export",$strings["export"]);
    if ($sitePublish == "true") {
        $block1->paletteIcon(4, "add_projectsite", $strings["add_project_site"]);
        $block1->paletteIcon(5, "remove_projectsite", $strings["remove_project_site"]);
    }
}
$block1->paletteIcon(6, "info", $strings["view"]);
if ($teamMember == "true") {
    $block1->paletteIcon(7, "edit", $strings["edit"]);
}
$block1->closePaletteIcon();
$block1->borne = $blockPage->returnBorne("1");
$block1->rowsLimit = "20";
$block1->sorting("tasks", $sortingUser->sor_tasks[0], "tas.name ASC", $sortingFields = array(0 => "tas.name", 1 => "tas.priority", 2 => "tas.status", 3 => "tas.completion", 4 => "tas.due_date", 5 => "mem.login", 6 => "tas.published"));
$tmpquery = "WHERE tas.project = '{$project}' ORDER BY {$block1->sortingValue}";
$block1->recordsTotal = compt($initrequest["tasks"] . " " . $tmpquery);
$listTasks = new request();
$listTasks->openTasks($tmpquery, $block1->borne, $block1->rowsLimit);
$comptListTasks = count($listTasks->tas_id);
if ($comptListTasks != "0") {
    $block1->openResults();
    $block1->labels($labels = array(0 => $strings["task"], 1 => $strings["priority"], 2 => $strings["status"], 3 => $strings["completion"], 4 => $strings["due_date"], 5 => $strings["assigned_to"], 6 => $strings["published"]), "true");
    for ($i = 0; $i < $comptListTasks; $i++) {
        if ($listTasks->tas_due_date[$i] == "") {
            $listTasks->tas_due_date[$i] = $strings["none"];
        }
        $idStatus = $listTasks->tas_status[$i];
        $idPriority = $listTasks->tas_priority[$i];
        $idPublish = $listTasks->tas_published[$i];
        $complValue = $listTasks->tas_completion[$i] > 0 ? $listTasks->tas_completion[$i] . "0 %" : $listTasks->tas_completion[$i] . " %";
        $block1->openRow();
Пример #11
0
        if (session_id() != $checkLog->log_session[0]) {
            header('Location: ../index.php?session=false');
            exit;
        }
    } else {
        header('Location: ../index.php?session=false');
        exit;
    }
}
if ($checkConnected != 'false') {
    //!!! maybe undefined
    $dateunix = date('U');
    $tmpquery1 = 'UPDATE ' . $tableCollab['logs'] . " SET connected='{$dateunix}' WHERE login = '******'loginSession'] . "'";
    connectSql($tmpquery1);
    $tmpsql = 'SELECT * FROM ' . $tableCollab['logs'] . " WHERE connected > {$dateunix}-5*60";
    compt($tmpsql);
    $connectedUsers = $countEnregTotal;
}
// disable actions if demo user logged in demo mode
if (!empty($action)) {
    if ($demoSession == 'true') {
        $closeTopic = '';
        $addToSiteTask = '';
        $removeToSiteTask = '';
        $addToSiteTopic = '';
        $removeToSiteTopic = '';
        $addToSiteTeam = '';
        $removeToSiteTeam = '';
        $action = '';
        $msg = 'demo';
    }
Пример #12
0
            $tmpquery .= 'WHERE pro.status IN(0,2,3,5) AND teams.member = ' . $_SESSION['idSession'] . ' ORDER BY ' . $block1->sortingValue;
        } else {
            $tmpquery = 'WHERE pro.status IN(0,2,3,5) ORDER BY ' . $block1->sortingValue;
        }
    } else {
        if ($show == 'all') {
            if ($projectsFilter == 'true') {
                $tmpquery = 'LEFT OUTER JOIN ' . $tableCollab['teams'] . ' teams ON teams.project = pro.id ';
                $tmpquery .= 'WHERE teams.member = ' . $_SESSION['idSession'] . ' ORDER BY ' . $block1->sortingValue;
            } else {
                $tmpquery = 'ORDER BY ' . $block1->sortingValue;
            }
        }
    }
}
$block1->recordsTotal = compt($initrequest['projects'] . ' ' . $tmpquery);
$listProjects = new request();
$listProjects->openProjects($tmpquery, $block1->borne, $block1->rowsLimit);
$comptListProjects = count($listProjects->pro_id);
if ($comptListProjects != 0) {
    $block1->openResults();
    $block1->labels($labels = array("P", $strings['project'], $strings['organization'], $strings['status'], $strings['owner'], $strings['project_site']), 'true');
    for ($i = 0; $i < $comptListProjects; $i++) {
        if ($listProjects->pro_org_id[$i] == 1) {
            $listProjects->pro_org_name[$i] = $strings['none'];
        }
        $idStatus = $listProjects->pro_status[$i];
        $idPriority = $listProjects->pro_priority[$i];
        $block1->openRow($listProjects->pro_id[$i]);
        $block1->checkboxRow($listProjects->pro_id[$i]);
        //--- id ---
Пример #13
0
}
$block1->heading($strings["newsdesk"]);
$block1->openPaletteIcon();
if ($profilSession == "0" || $profilSession == "1" || $profilSession == "5") {
    $block1->paletteIcon(0, "add", $strings["add_newsdesk"]);
    $block1->paletteIcon(1, "remove", $strings["del_newsdesk"]);
    $block1->paletteIcon(2, "edit", $strings["edit_newsdesk"]);
}
$block1->paletteIcon(3, "info", $strings["view_newsdesk"]);
$block1->closePaletteIcon();
$block1->borne = $blockPage->returnBorne("1");
$block1->rowsLimit = "40";
$block1->sorting("newsdesk", $sortingUser->sor_newsdesk[0], "news.pdate DESC", $sortingFields = array(0 => "news.title", 1 => "news.pdate"));
$block1->openContent();
$tmpquery = "WHERE news.id != '0' ORDER BY {$block1->sortingValue} ";
$block1->recordsTotal = compt($initrequest["newsdeskposts"] . " " . $tmpquery);
$listPosts = new request();
$listPosts->openNewsDesk($tmpquery, $block1->borne, $block1->rowsLimit);
$comptPosts = count($listPosts->news_id);
if ($comptPosts != "0") {
    $block1->openResults();
    $block1->labels($labels = array(0 => $strings["topic"], 1 => $strings["date"], 2 => $strings["author"], 3 => $strings["newsdesk_related"]), "true");
    for ($i = 0; $i < $comptPosts; $i++) {
        // take the news author
        $tmpquery_user = "******" . $listPosts->news_author[$i] . "' ";
        $newsAuthor = new request();
        $newsAuthor->openMembers($tmpquery_user);
        // take the name of the related article
        if ($listPosts->news_related[$i] != 'g') {
            $tmpquery = "WHERE pro.id = '" . $listPosts->news_related[$i] . "'";
            $projectDetail = new request();
Пример #14
0
if ($comptProjectsTest == "0") {
    $listProjects = "false";
} else {
    for ($i = 0; $i < $comptProjectsTest; $i++) {
        $projectsOk .= $projectsTest->pro_id[$i];
        if ($comptProjectsTest - 1 != $i) {
            $projectsOk .= ",";
        }
    }
    if ($projectsOk == "") {
        $listProjects = "false";
    } else {
        $tmpquery = "WHERE inv.project IN({$projectsOk}) AND inv.active = '1' AND inv.status = '{$status}' ORDER BY {$block1->sortingValue}";
    }
}
$block1->recordsTotal = compt($initrequest["invoices"] . " " . $tmpquery);
$listInvoices = new request();
$listInvoices->openInvoices($tmpquery, $block1->borne, $block1->rowsLimit);
$comptListInvoices = count($listInvoices->inv_id);
if ($comptListInvoices != "0") {
    $block1->openResults();
    $block1->labels($labels = array(0 => $strings["id"], 1 => $strings["project"], 2 => $strings["total_inc_tax"], 3 => $strings["date_invoice"], 4 => $strings["published"]), "true");
    for ($i = 0; $i < $comptListInvoices; $i++) {
        $idPublish = $listInvoices->inv_published[$i];
        $block1->openRow();
        $block1->checkboxRow($listInvoices->inv_id[$i]);
        $block1->cellRow($blockPage->buildLink("../invoicing/viewinvoice.php?id=" . $listInvoices->inv_id[$i], $listInvoices->inv_id[$i], in));
        $block1->cellRow($blockPage->buildLink("../projects/viewproject.php?id=" . $listInvoices->inv_project[$i], $listInvoices->inv_pro_name[$i], in));
        $block1->cellRow($listInvoices->inv_total_inc_tax[$i]);
        $block1->cellRow($listInvoices->inv_date_sent[$i]);
        if ($sitePublish == "true") {