コード例 #1
0
    $block1->contentRow("", "0 " . $strings["matches"] . "<br>" . $strings["no_results_report"]);
}
if ($comptListHours == "1") {
    $block1->contentRow("", "1 " . $strings["match"]);
}
if ($comptListHours > "1") {
    $block1->contentRow("", $comptListHours . " " . $strings["matches"]);
}
$block0->closeContent();
$heading_text = $strings['reporthours'];
if ($s_sdate2 != "") {
    $heading_text = "{$heading_text} {$strings['reports_from']} {$s_sdate2} {$strings['reports_to']} {$s_edate2}";
}
$heading_text = $heading_text . ': ' . ($comptListHours == 1 ? "{$comptListHours} {$strings['match']}" : "{$comptListHours} {$strings['matches']}");
// set up the header string
$block1->heading($heading_text);
// initialize counters
$totalMemHours = 0;
$block1->openPaletteIcon();
$block1->paletteIcon(0, "export", $strings["export"]);
$block1->closePaletteIcon();
if ($comptListHours != "0") {
    $block1->openResults($checkbox = "false");
    $block1->labels($labels = array(0 => $strings["organization"], 1 => $strings["project"], 2 => $strings["name"], 3 => $strings["date"], 4 => $strings["type"], 5 => $strings["service"], 6 => $strings["hours"]), "true");
    for ($i = 0; $i < $comptListHours; $i++) {
        $block1->openRow();
        $block1->checkboxRow($listHours->tim_id[$i], $checkbox = "false");
        $block1->cellRow($listHours->tim_org_name[$i]);
        $block1->cellRow(buildLink("../projects/viewproject.php?id=" . $listHours->tim_project[$i], $listHours->tim_pro_name[$i], LINK_INSIDE));
        $block1->cellRow($listHours->tim_mem_name[$i]);
        $block1->cellRow($listHours->tim_date[$i]);
コード例 #2
0
ファイル: assignmentcomment.php プロジェクト: ColBT/php_tut
}
$bodyCommand = "onLoad=\"document.assignment_commentForm.acomm.focus();\"";
include '../themes/' . THEME . '/header.php';
$tmpquery = "WHERE tas.id = '{$task}'";
$taskDetail = new request();
$taskDetail->openTasks($tmpquery);
$tmpquery = "WHERE pro.id = '" . $taskDetail->tas_project[0] . "'";
$projectDetail = new request();
$projectDetail->openProjects($tmpquery);
$blockPage = new block();
$blockPage->openBreadcrumbs();
$blockPage->itemBreadcrumbs($blockPage->buildLink("../projects/listprojects.php?", $strings["projects"], in));
$blockPage->itemBreadcrumbs($blockPage->buildLink("../projects/viewproject.php?id=" . $projectDetail->pro_id[0], $projectDetail->pro_name[0], in));
$blockPage->itemBreadcrumbs($blockPage->buildLink("../tasks/listtasks.php?project=" . $projectDetail->pro_id[0], $strings["tasks"], in));
$blockPage->itemBreadcrumbs($blockPage->buildLink("../tasks/viewtask.php?id=" . $taskDetail->tas_id[0], $taskDetail->tas_name[0], in));
$blockPage->itemBreadcrumbs($strings["assignment_comment"]);
$blockPage->closeBreadcrumbs();
$block1 = new block();
$block1->form = "assignment_comment";
$block1->openForm("../tasks/assignmentcomment.php?action=update&id={$id}&task={$task}&" . session_name() . "=" . session_id());
if ($error != "") {
    $block1->headingError($strings["errors"]);
    $block1->contentError($error);
}
$block1->heading($strings["assignment_comment"]);
$block1->openContent();
$block1->contentTitle($strings["assignment_comment_info"]);
echo "<tr class=\"odd\"><td valign=\"top\" class=\"leftvalue\">" . $strings["task"] . " :</td><td>" . $taskDetail->tas_name[0] . "</td></tr>\n<tr class=\"odd\"><td valign=\"top\" class=\"leftvalue\">" . $strings["comments"] . " :</td><td><input style=\"width: 400px;\" maxlength=\"128\" size=\"44\" name=\"acomm\"></input></td></tr>\n<tr class=\"odd\"><td valign=\"top\" class=\"leftvalue\">&nbsp;</td><td><input type=\"submit\" name=\"Save\" value=\"" . $strings["save"] . "\"></td></tr>";
$block1->closeContent();
$block1->closeForm();
include '../themes/' . THEME . '/footer.php';
コード例 #3
0
ファイル: listusers.php プロジェクト: ColBT/php_tut
$comptProjectDetail = count($projectDetail->pro_id);
if ($comptProjectDetail == "0") {
    headerFunction("../projects/listprojects.php?msg=blank&" . session_name() . "=" . session_id());
    exit;
}
include '../themes/' . THEME . '/header.php';
$blockPage = new block();
$blockPage->openBreadcrumbs();
$blockPage->itemBreadcrumbs($blockPage->buildLink("../projects/listprojects.php?", $strings["projects"], in));
$blockPage->itemBreadcrumbs($blockPage->buildLink("../projects/viewproject.php?id=" . $projectDetail->pro_id[0], $projectDetail->pro_name[0], in));
$blockPage->itemBreadcrumbs($strings["team_members"]);
$blockPage->closeBreadcrumbs();
$block1 = new block();
$block1->form = "saM";
$block1->openForm("../teams/listusers.php?" . session_name() . "=" . session_id() . "&id={$id}#" . $block1->form . "Anchor");
$block1->heading($strings["team_members"]);
$block1->openPaletteIcon();
if ($idSession == $projectDetail->pro_owner[0] || $profilSession == "5") {
    $block1->paletteIcon(0, "add", $strings["add"]);
    $block1->paletteIcon(1, "remove", $strings["delete"]);
    if ($sitePublish == "true") {
        $block1->paletteIcon(2, "add_projectsite", $strings["add_project_site"]);
        $block1->paletteIcon(3, "remove_projectsite", $strings["remove_project_site"]);
    }
}
$block1->paletteIcon(4, "info", $strings["view"]);
$block1->paletteIcon(5, "email", $strings["email"]);
$block1->closePaletteIcon();
$block1->sorting("team", $sortingUser->sor_team[0], "mem.name ASC", $sortingFields = array(0 => "mem.name", 1 => "mem.title", 2 => "mem.login", 3 => "mem.phone_work", 4 => "log.connected", 5 => "tea.published"));
$tmpquery = "WHERE tea.project = '{$id}' AND mem.profil != '3' ORDER BY {$block1->sortingValue}";
$listTeam = new request();
コード例 #4
0
ファイル: addmeetingtime.php プロジェクト: jgatica/Netoffice
}
echo '
  </select></td>
</tr>';
if ($ld == '') {
    $ld = $date;
}
$block1->contentRow($strings['date'], "<input type=\"text\" style=\"width: 150px;\" name=\"ld\" id=\"sel1\" \r\nsize=\"20\" value=\"{$ld}\"><button type=\"reset\" id=\"trigger_a\">...</button>\r\n<script type=\"text/javascript\">Calendar.setup({ inputField:\"sel1\", button:\"trigger_a\" });</script>");
echo "\r\n<tr class='odd'>\r\n  <td valign='top' class='leftvalue'>" . $strings["worked_hours"] . " :</td>\r\n  <td><input size='20' value='{$hr}' style='width: 150px;' name='hr' maxlength='6' type='text'></td>\r\n</tr>\r\n<tr class='odd'>\r\n  <td valign='top' class='leftvalue'>" . $strings["comments"] . " :</td>\r\n  <td><textarea rows='10' style='width: 400px; height: 150px;' name='comm' cols='47'>{$comm}</textarea></td>\r\n</tr>\r\n<tr class='odd'>\r\n  <td valign='top' class='leftvalue'>&nbsp;</td>\r\n  <td><input type='SUBMIT' value='" . $strings["save"] . "'></td>\r\n</tr>";
$block1->closeContent();
$block1->closeForm();
// This will display time log detail for the current meeting
$block2 = new block();
$block2->form = "ahT";
$block2->openForm("../meetings/addmeetingtime.php?id={$id}#" . $block2->form . "Anchor");
$block2->heading($strings["meeting_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('meetings_time', $sortingUser->sor_meetings_time[0], 'mti.date ASC', $sortingFields = array(0 => 'mem.name', 1 => 'mti.date', 2 => 'mti.hours', 3 => 'mti.created', 4 => 'mti.modified', 5 => 'mti.comments'));
$tmpquery = "WHERE mti.meeting = '{$id}' ORDER BY {$block2->sortingValue}";
$block2->recordsTotal = compt($initrequest["meetings_time"] . " " . $tmpquery);
$listMeetingTimes = new request();
$listMeetingTimes->openMeetingTime($tmpquery, $block2->borne, $block2->rowsLimit);
$comptListMeetingTimes = count($listMeetingTimes->mti_id);
if ($comptListMeetingTimes != "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");
コード例 #5
0
ファイル: listrequests.php プロジェクト: ColBT/php_tut
} else {
    if ($supportType == "admin") {
        $blockPage->itemBreadcrumbs($blockPage->buildLink("../administration/admin.php?", $strings["administration"], in));
        $blockPage->itemBreadcrumbs($blockPage->buildLink("../administration/support.php?", $strings["support_management"], in));
        $blockPage->itemBreadcrumbs($strings["support_requests"]);
    }
}
$blockPage->closeBreadcrumbs();
if ($msg != "") {
    include '../includes/messages.php';
    $blockPage->messagebox($msgLabel);
}
$block1 = new block();
$block1->form = "srs";
$block1->openForm("../support/listrequests.php?" . session_name() . "=" . session_id() . "&id={$id}#" . $block1->form . "Anchor");
$block1->heading($strings["support_requests"]);
if ($teamMember == "true" || $profilSession == "0") {
    $block1->openPaletteIcon();
    //$block1->paletteIcon(0,"add",$strings["add"]);
    $block1->paletteIcon(1, "edit", $strings["edit_status"]);
    $block1->paletteIcon(2, "remove", $strings["delete"]);
    $block1->paletteIcon(3, "info", $strings["view"]);
    $block1->closePaletteIcon();
}
$block1->sorting("support_requests", $sortingUser->sor_support_requests[0], "sr.id ASC", $sortingFields = array(0 => "sr.id", 1 => "sr.subject", 2 => "sr.priority", 3 => "sr.status", 4 => "sr.date_open", 5 => "sr.date_close"));
/*$tmpquery = "WHERE mem.id = '$idSession'";
$userDetail = new request();
$userDetail->openMembers($tmpquery);*/
$tmpquery = "WHERE sr.project = '{$id}' ORDER BY {$block1->sortingValue}";
$listRequests = new request();
$listRequests->openSupportRequests($tmpquery);
コード例 #6
0
ファイル: addprojectsite.php プロジェクト: ColBT/php_tut
    exit;
}
if ($action == "create") {
    $tmpquery = "UPDATE " . $tableCollab["projects"] . " SET published='0' WHERE id = '{$id}'";
    connectSql("{$tmpquery}");
    headerFunction("../projects/viewprojectsite.php?id={$id}&msg=createProjectSite&" . session_name() . "=" . session_id());
    exit;
}
include '../themes/' . THEME . '/header.php';
$blockPage = new block();
$blockPage->openBreadcrumbs();
$blockPage->itemBreadcrumbs($blockPage->buildLink("../projects/listprojects.php?", $strings["projects"], in));
$blockPage->itemBreadcrumbs($blockPage->buildLink("../projects/viewproject.php?id={$id}", $projectDetail->pro_name[0], in));
$blockPage->itemBreadcrumbs($strings["create_projectsite"]);
$blockPage->closeBreadcrumbs();
$block1 = new block();
$block1->form = "csdD";
$block1->openForm("../projects/addprojectsite.php?action=create&id={$id}&" . session_name() . "=" . session_id());
$block1->heading($strings["create_projectsite"]);
$block1->openContent();
$block1->contentTitle($strings["details"]);
$block1->contentRow($strings["project"], $blockPage->buildLink("../projects/viewproject.php?id={$id}", $projectDetail->pro_name[0], in));
if ($projectDetail->pro_org_id[0] == "1") {
    $block1->contentRow($strings["organization"], $strings["none"]);
} else {
    $block1->contentRow($strings["organization"], $blockPage->buildLink("../clients/viewclient.php?id=" . $projectDetail->pro_org_id[0], $projectDetail->pro_org_name[0], in));
}
$block1->contentRow("", "<input type=\"SUBMIT\" value=\"" . $strings["create"] . "\">");
$block1->closeContent();
$block1->closeForm();
include '../themes/' . THEME . '/footer.php';
コード例 #7
0
$checkSession = "true";
include_once '../includes/library.php';
include '../themes/' . THEME . '/header.php';
$blockPage = new block();
$blockPage->openBreadcrumbs();
$blockPage->itemBreadcrumbs($blockPage->buildLink("../clients/listclients.php?", $strings["organizations"], in));
$blockPage->itemBreadcrumbs($strings["organizations"]);
$blockPage->closeBreadcrumbs();
if ($msg != "") {
    include '../includes/messages.php';
    $blockPage->messagebox($msgLabel);
}
$block1 = new block();
$block1->form = "clientList";
$block1->openForm("../clients/listclients.php?" . session_name() . "=" . session_id() . "#" . $block1->form . "Anchor");
$block1->heading($strings["organizations"]);
$block1->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 {$block1->sortingValue}";
$listOrganizations = new request();
$listOrganizations->openOrganizations($tmpquery);
$comptListOrganizations = count($listOrganizations->org_id);
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();
        $block1->checkboxRow($listOrganizations->org_id[$i]);
        $block1->cellRow($blockPage->buildLink("../clients/viewclient.php?id=" . $listOrganizations->org_id[$i], $listOrganizations->org_name[$i], in));
        $block1->cellRow($listOrganizations->org_phone[$i]);
        $block1->cellRow($blockPage->buildLink($listOrganizations->org_url[$i], $listOrganizations->org_url[$i], out));
        $block1->closeRow();
コード例 #8
0
ファイル: license.php プロジェクト: ColBT/php_tut
**
** -----------------------------------------------------------------------------
** Please refer to license, copyright, and credits in README.TXT
**
** -----------------------------------------------------------------------------
** FILE: license.php
**
** DESC: Screen: print GNU/GPL license
**
** HISTORY:
** 	2003-10-23	-	added new document info
** -----------------------------------------------------------------------------
** TO-DO:
**
** =============================================================================
*/
$checkSession = "false";
include_once '../includes/library.php';
$notLogged = "true";
include '../themes/' . THEME . '/header.php';
$blockPage = new block();
$blockPage->openBreadcrumbs();
$blockPage->itemBreadcrumbs("&nbsp;");
$blockPage->closeBreadcrumbs();
$block1 = new block();
$block1->heading($setTitle . " : License");
$block1->openContent();
$block1->contentTitle("License");
$block1->contentRow("", "<pre>" . recupFile("../docs/copying.txt") . "</pre>");
$block1->closeContent();
include '../themes/' . THEME . '/footer.php';
コード例 #9
0
    require_once "../_addon/addon_header_light.php";
} else {
    require_once "../themes/" . THEME . "/header.php";
}
$blockPage = new block();
$blockPage->bornesNumber = "1";
$block1 = new block();
//Form
$block1->form = "TaskTime_{$form_type}";
$popup_addon = "";
if ($window == "popup") {
    $popup_addon = "?window=popup";
}
$block1->openForm("{$form_type}.php{$popup_addon}");
//--- title ------
$block1->heading($title_type);
$block1->heading_close();
$block1->openContent();
$block1->contentTitle("Donn&eacute;es");
//$block1->contentRow("Test", "tmp");
//*** Client ***
//$tmpquery = "WHERE tea.project = '" . $projectDetail->pro_id[0] . "' ORDER BY org.name";
$tmpquery = " ORDER BY org.name";
$clients = new request();
$clients->openOrganizations($tmpquery);
$comptClients = count($clients->org_id);
echo "\n\t<tr class='odd'>\n\t  <td valign='top' class='leftvalue'>" . $strings['clients'] . " :</td>\n\t  <td><select name='client_id' onChange='this.form.submit()'>";
// get Clients listing
for ($i = 0; $i < $comptClients; $i++) {
    $selected = "";
    if ($client_id == $clients->org_id[$i]) {
コード例 #10
0
ファイル: listmeetings.php プロジェクト: jgatica/Netoffice
if ($teamMember == "false" && $projectsFilter == "true") {
    header("Location:../general/permissiondenied.php");
    exit;
}
// ----- header --------------------------------
$breadcrumbs[] = buildLink("../projects/listprojects.php?", $strings["projects"], LINK_INSIDE);
$breadcrumbs[] = buildLink("../projects/viewproject.php?id=" . $projectDetail->pro_id[0], $projectDetail->pro_name[0], LINK_INSIDE);
$breadcrumbs[] = $strings["meetings"];
require_once "../themes/" . THEME . "/header.php";
// ----- content --------------------------------
$blockPage = new block();
$blockPage->bornesNumber = "1";
$block1 = new block();
$block1->form = "saM";
$block1->openForm("../meetings/listmeetings.php?project={$project}#" . $block1->form . "Anchor");
$block1->heading($strings["meetings"]);
$block1->openPaletteIcon();
if ($teamMember == "true") {
    $block1->paletteIcon(0, "add", $strings["add"]);
    $block1->paletteIcon(1, "remove", $strings["delete"]);
    $block1->paletteIcon(2, "copy", $strings["copy"]);
    // $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->paletteIcon(8, "timelog", $strings["loghours"]);
コード例 #11
0
ファイル: support.php プロジェクト: jgatica/Netoffice
} else {
    if ($action == "open") {
        $breadcrumbs[] = $strings["open_requests"];
    } else {
        if ($action == "complete") {
            $breadcrumbs[] = $strings["closed_requests"];
        }
    }
}
require_once "../themes/" . THEME . "/header.php";
//--- content ---
$block1 = new block();
$block1->form = "srs";
$block1->openForm("../support/support.php?action={$action}&amp;project={$project}#" . $block1->form . "Anchor");
if ($action == "new") {
    $block1->heading($strings["new_requests"]);
} elseif ($action == "open") {
    $block1->heading($strings["open_requests"]);
} elseif ($action == "complete") {
    $block1->heading($strings["closed_requests"]);
}
if ($teamMember == "true" || $_SESSION['profilSession'] == "0") {
    $block1->openPaletteIcon();
    // $block1->paletteIcon(0,"add",$strings["add"]);
    $block1->paletteIcon(1, "edit", $strings["edit_status"]);
    $block1->paletteIcon(2, "remove", $strings["delete"]);
    $block1->paletteIcon(3, "info", $strings["view"]);
    $block1->closePaletteIcon();
} else {
    $block1->heading_close();
}
コード例 #12
0
ファイル: updatesettings.php プロジェクト: ColBT/php_tut
            headerFunction("../administration/admin.php?msg=update&" . session_name() . "=" . session_id());
        }
    }
}
include '../themes/' . THEME . '/header.php';
$blockPage = new block();
$blockPage->openBreadcrumbs();
$blockPage->itemBreadcrumbs($blockPage->buildLink("../administration/admin.php?", $strings["administration"], in));
$blockPage->itemBreadcrumbs($strings["edit_settings"]);
$blockPage->closeBreadcrumbs();
if ($msg != "") {
    include '../includes/messages.php';
    $blockPage->messagebox($msgLabel);
}
$block1 = new block();
$block1->heading($strings["edit_settings"]);
$block1->openContent();
$block1->contentTitle("General");
$block1->form = "settings";
$block1->openForm("../administration/updatesettings.php?action=generate&" . session_name() . "=" . session_id());
if (substr($ftpRoot, -1) == "/") {
    $ftpRoot = substr($ftpRoot, 0, -1);
}
$tablePrefix = substr($tableCollab["projects"], 0, -8);
echo "\t<input value='{$tablePrefix}' name='tablePrefixNew' type='hidden' />\n\t\t<input value='{$databaseType}' name='databaseTypeNew' type='hidden' />\n\t\t<input value='" . MYSERVER . "' name='myserverNew' type='hidden' />\n\t\t<input value='" . MYLOGIN . "' name='myloginNew' type='hidden' />\n\t\t<input value='" . MYPASSWORD . "' name='mypasswordNew' type='hidden' />\n\t\t<input value='" . MYDATABASE . "' name='mydatabaseNew' type='hidden' />\n\t\t<input value='" . $tablePrefix . "assignments' name='table_assignments' type='hidden' />\n\t\t<input value='" . $tablePrefix . "calendar' name='table_calendar' type='hidden' />\n\t\t<input value='" . $tablePrefix . "files' name='table_files' type='hidden' />\n\t\t<input value='" . $tablePrefix . "logs' name='table_logs' type='hidden' />\n\t\t<input value='" . $tablePrefix . "members' name='table_members' type='hidden' />\n\t\t<input value='" . $tablePrefix . "notes' name='table_notes' type='hidden' />\n\t\t<input value='" . $tablePrefix . "notifications' name='table_notifications' type='hidden' />\n\t\t<input value='" . $tablePrefix . "organizations' name='table_organizations' type='hidden' />\n\t\t<input value='" . $tablePrefix . "posts' name='table_posts' type='hidden' />\n\t\t<input value='" . $tablePrefix . "projects' name='table_projects' type='hidden' />\n\t\t<input value='" . $tablePrefix . "reports' name='table_reports' type='hidden' />\n\t\t<input value='" . $tablePrefix . "sorting' name='table_sorting' type='hidden' />\n\t\t<input value='" . $tablePrefix . "tasks' name='table_tasks' type='hidden' />\n\t\t<input value='" . $tablePrefix . "teams' name='table_teams' type='hidden' />\n\t\t<input value='" . $tablePrefix . "topics' name='table_topics' type='hidden' />\n\t\t<input value='" . $tablePrefix . "phases' name='table_phases' type='hidden' />\n\t\t<input value='" . $tablePrefix . "support_requests' name='table_support_requests' type='hidden' />\n\t\t<input value='" . $tablePrefix . "support_posts' name='table_support_posts' type='hidden' />\n\t\t<input value='" . $tablePrefix . "subtasks' name='table_subtasks' type='hidden' />\n\t\t<input value='" . $tablePrefix . "updates' name='table_updates' type='hidden' />\n\t\t<input value='" . $tablePrefix . "bookmarks' name='table_bookmarks' type='hidden' />\n\t\t<input value='" . $tablePrefix . "bookmarks_categories' name='table_bookmarks_categories' type='hidden' />\n\t\t<input value='" . $tablePrefix . "invoices' name='table_invoices' type='hidden' />\n\t\t<input value='" . $tablePrefix . "invoices_items' name='table_invoices_items' type='hidden' />\n\t\t<input value='" . $tablePrefix . "services' name='table_services' type='hidden' />\n\t\t<input value='" . $tablePrefix . "newsdeskcomments' name='table_newsdeskcomments' type='hidden' />\n\t\t<input value='" . $tablePrefix . "newsdeskposts' name='table_newsdeskposts' type='hidden' />\n\n<input value=\"{$loginMethod}\" name=\"loginMethodNew\" type=\"hidden\">";
if ($version == $versionNew) {
    if ($versionOld == "") {
        $versionOld = $version;
    }
    echo "<input value=\"{$versionOld}\" name=\"versionOldNew\" type=\"hidden\">";
} else {
コード例 #13
0
ファイル: phppgadmin.php プロジェクト: ColBT/php_tut
**
** HISTORY:
** 	2003-10-23	-	added new document info
** -----------------------------------------------------------------------------
** TO-DO:
** 	move to the render engine  
**
** =============================================================================
*/
$checkSession = "true";
include_once '../includes/library.php';
if ($profilSession != "0") {
    headerFunction('../general/permissiondenied.php?' . session_name() . '=' . session_id());
    exit;
}
$setTitle .= " : DB Administraton";
include '../themes/' . THEME . '/header.php';
$blockPage = new block();
$blockPage->openBreadcrumbs();
$blockPage->itemBreadcrumbs($blockPage->buildLink("../administration/admin.php?", $strings["administration"], in));
$blockPage->itemBreadcrumbs($strings["database"] . " " . MYDATABASE);
$blockPage->closeBreadcrumbs();
$block1 = new block();
$block1->heading($strings["database"] . " " . MYDATABASE);
$block1->openContent();
$block1->contentTitle("Backup database");
echo "<tr class=\"odd\"><td valign=\"top\" class=\"leftvalue\">&nbsp;</td><td>\n<form method=\"post\" action=\"../includes/phppgadmin/db_dump.php\">View dump (schema) of database<br/>\n<table>\n    <tr>\n        <td>\n            <input type=\"radio\" name=\"what\" value=\"structure\">Structure only        </td>\n        <td>\n            <input type=\"checkbox\" name=\"drop\" value=\"1\">Add 'drop table'        </td>\n        <td colspan=\"2\">\n            <input type=\"submit\" value=\"Go\">\n        </td>\n    </tr>\n    <tr>\n        <td>\n            <input type=\"radio\" name=\"what\" value=\"data\" checked>Structure and data        </td>\n        <td>\n            <input type=\"checkbox\" name=\"asfile\" value=\"sendit\">send        </td>\n    </tr>\n</table>\n<input type=\"hidden\" name=\"server\" value=\"1\">\n<input type=\"hidden\" name=\"db\" value=\"" . MYDATABASE . "\">\n<input type=\"hidden\" name=\"table\" value=\"y_updates\">\n</form>\n" . $blockPage->buildLink("http://phppgadmin.sourceforge.net", "phpPgAdmin", powered) . "</a></td></tr>";
$block1->contentTitle("Restore database from sql file");
echo "<tr class=\"odd\"><td valign=\"top\" class=\"leftvalue\">&nbsp;</td><td>\n        <form method=\"post\" action=\"../includes/phpmyadmin/read_dump.php\" enctype=\"multipart/form-data\">\n            <input type=\"hidden\" name=\"is_js_confirmed\" value=\"0\" />\n            <input type=\"hidden\" name=\"lang\" value=\"en\" />\n            <input type=\"hidden\" name=\"server\" value=\"1\" />\n            <input type=\"hidden\" name=\"db\" value=\"" . MYDATABASE . "\" />\n            <input type=\"hidden\" name=\"pos\" value=\"0\" />\n            <input type=\"hidden\" name=\"goto\" value=\"db_details.php\" />\n            <input type=\"hidden\" name=\"zero_rows\" value=\"Your SQL-query has been executed successfully\" />\n            <input type=\"hidden\" name=\"prev_sql_query\" value=\"\" /><br />\n            Location of sql file&nbsp;:<br />\n            <div style=\"margin-bottom: 5px\">\n            <input type=\"file\" name=\"sql_file\" /><br />\n            </div>\n    \n            <input type=\"submit\" name=\"SQL\" value=\"Go\" />\n        </form>\n" . $blockPage->buildLink("http://phpwizard.net/projects/phpMyAdmin", "phpMyAdmin", powered) . "</a>\n</td></tr>\n</table>\n</td></tr>";
$block1->closeContent();
include '../themes/' . THEME . '/footer.php';
コード例 #14
0
ファイル: viewprojectsite.php プロジェクト: jgatica/Netoffice
$block1->closeContent();
$block1->block_close();
$block1->closeForm();
if ($_SESSION['idSession'] == $projectDetail->pro_owner[0] || $_SESSION['profilSession'] == '5') {
    $block1->openPaletteScript();
    $block1->paletteScript(0, 'remove', '../projects/deleteprojectsite.php?project=' . $id, 'true,true,true', $strings['delete']);
    // $block1->paletteScript(1,'template','addtemplate.php','true,true,true',$strings['template']);
    // $block1->paletteScript(1,'template','editprojectsite.php','true,true,false',$strings['template']);
    $block1->closePaletteScript('', '');
}
//--- client permitted users -----------------------
if ($projectDetail->pro_organization[0] != '' && $projectDetail->pro_organization[0] != '1') {
    $block2 = new block();
    $block2->form = 'csU';
    $block2->openForm('../projects/viewprojectsite.php?id=' . $projectDetail->pro_id[0] . '#' . $block2->form . 'Anchor');
    $block2->heading($strings['permitted_client']);
    if ($_SESSION['idSession'] == $projectDetail->pro_owner[0] || $_SESSION['profilSession'] == '5') {
        $block2->openPaletteIcon();
        $block2->paletteIcon(0, 'add', $strings['add']);
        $block2->paletteIcon(1, 'remove', $strings['delete']);
        if ($sitePublish == 'true') {
            $block2->paletteIcon(2, 'add_projectsite', $strings['add_project_site']);
            $block2->paletteIcon(3, 'remove_projectsite', $strings['remove_project_site']);
        }
        $block2->closePaletteIcon();
    } else {
        $block2->headingToggle_close();
    }
    $block2->openContent();
    $block2->sorting('team', $sortingUser->sor_team[0], 'mem.name ASC', $sortingFields = array(0 => 'mem.name', 1 => 'mem.title', 2 => 'mem.login', 3 => 'mem.phone_work', 4 => 'log.connected', 5 => 'tea.published'));
    $tmpquery = "WHERE tea.project = '{$id}' AND mem.profil = '3' ORDER BY {$block2->sortingValue}";
コード例 #15
0
}
$breadcrumbs[] = buildLink('../administration/admin.php', $strings['administration'], LINK_INSIDE);
$breadcrumbs[] = $strings['holidays'];
$pageSection = 'admin';
require_once '../themes/' . THEME . '/header.php';
//--- content -----
$block1 = new block();
$block1->headingForm($strings['new_holiday']);
$block1->openContent();
$block1->form = 'hoT';
$block1->openForm("../administration/listholidays.php?action=add&amp;d=" . $d . "&amp;c=" . $c . "#" . $block1->form . "Anchor");
$block1->contentRow($strings["date"], "<input type=\"text\" style=\"width: 150px;\" name=\"d\" id=\"sel1\" size=\"20\" value=\"{$sd}\"><button type=\"reset\" id=\"trigger_a\">...</button><script type=\"text/javascript\">Calendar.setup({ inputField:\"sel1\", button:\"trigger_a\" });</script>");
$block1->contentRow($strings["comments"], "<textarea rows=\"10\" style=\"width: 400px; height: 160px;\" name=\"c\" cols=\"47\">{$c}</textarea>");
echo "<tr class=\"odd\"><td valign=\"top\" class=\"leftvalue\">&nbsp;</td><td><input type=\"SUBMIT\" value=\"" . $strings["save"] . "\"></td></tr>";
$block1->closeContent();
$block1->heading($strings["holidays"]);
$block1->openPaletteIcon();
$block1->paletteIcon(1, "remove", $strings["delete"]);
$block1->closePaletteIcon();
$tmpquery = " ORDER BY hol.date DESC";
$holidayList = new request();
$holidayList->openHoliday($tmpquery);
$comptHolidayList = count($holidayList->hol_id);
$block1->recordsTotal = $comptHolidayList;
if ($comptHolidayList > 0) {
    $block1->openResults();
    $block1->labels($labels = array(0 => $strings['date'], 1 => $strings['comments']), 'true', $sorting = false, $sortingOff = array(0 => '0', 1 => 'DESC'));
    for ($i = 0; $i < $comptHolidayList; $i++) {
        $block1->openRow($holidayList->hol_id[$i]);
        $block1->checkboxRow($holidayList->hol_id[$i]);
        $block1->cellRow($holidayList->hol_date[$i]);
コード例 #16
0
ファイル: editnews.php プロジェクト: ColBT/php_tut
    $blockPage->itemBreadcrumbs($strings["edit_newsdesk"]);
}
$blockPage->closeBreadcrumbs();
if ($msg != "") {
    include '../includes/messages.php';
    $blockPage->messagebox($msgLabel);
}
$block1 = new block();
if ($error != "") {
    $block1->headingError($strings["errors"]);
    $block1->contentError($error);
}
if ($action != 'remove') {
    if ($id == "") {
        echo "\t<a name='" . $block1->form . "Anchor'></a>\n <form accept-charset='UNKNOWN' method='POST' action='../newsdesk/editnews.php?action=add&" . session_name() . "=" . session_id() . "' name='ecDForm'>\n";
        $block1->heading($strings["add_newsdesk"]);
    } else {
        echo "\t<a name='" . $block1->form . "Anchor'></a>\n <form accept-charset='UNKNOWN' method='POST' action='../newsdesk/editnews.php?id={$id}&action=update&" . session_name() . "=" . session_id() . "' name='ecDForm'>\n";
        $block1->heading($strings["edit_newsdesk"] . " : " . $newsDetail->news_title[0]);
    }
    $block1->openContent();
    $block1->contentTitle($strings["details"]);
    // add
    if ($id == "") {
        $block1->contentRow($strings["author"], "<input type='hidden' name='author' value='{$idSession}'><b>{$nameSession}</b>");
    } else {
        $tmpquery_user = "******" . $newsDetail->news_author[0] . "' ";
        $newsAuthor = new request();
        $newsAuthor->openMembers($tmpquery_user);
        $block1->contentRow($strings["author"], "<input type='hidden' name='author' value='" . $newsDetail->news_author[0] . "'><b>" . $newsAuthor->mem_name[0] . "</b>");
    }
コード例 #17
0
ファイル: deleteclientusers.php プロジェクト: ColBT/php_tut
}
include '../themes/' . THEME . '/header.php';
$blockPage = new block();
$blockPage->openBreadcrumbs();
$blockPage->itemBreadcrumbs($blockPage->buildLink("../clients/listclients.php?", $strings["clients"], in));
$blockPage->itemBreadcrumbs($blockPage->buildLink("../clients/viewclient.php?id=" . $detailOrganization->org_id[0], $detailOrganization->org_name[0], in));
$blockPage->itemBreadcrumbs($strings["delete_users"]);
$blockPage->closeBreadcrumbs();
if ($msg != "") {
    include '../includes/messages.php';
    $blockPage->messagebox($msgLabel);
}
$block1 = new block();
$block1->form = "client_user_delete";
$block1->openForm("../users/deleteclientusers.php?organization={$organization}&action=delete&" . session_name() . "=" . session_id());
$block1->heading($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 tas.id FROM " . $tableCollab["tasks"] . " tas WHERE tas.assigned_to IN({$id})";
compt($tmpquery);
$totalTasks = $countEnregTotal;
$block1->contentTitle($strings["reassignment_clientuser"]);
echo "<tr class='odd'><td valign='top' class='leftvalue'>&nbsp;</td><td>" . $strings["there"] . " {$totalTasks} " . $strings["tasks"] . " " . $strings["owned_by"] . "</td></tr>\n<tr class='odd'><td valign='top' class='leftvalue'>&nbsp;</td><td><b>" . $strings["reassign_to"] . " : </b> ";
コード例 #18
0
ファイル: historysubtask.php プロジェクト: ColBT/php_tut
    $blockPage->itemBreadcrumbs($strings["updates_task"]);
}
$blockPage->closeBreadcrumbs();
if ($msg != "") {
    include '../includes/messages.php';
    $blockPage->messagebox($msgLabel);
}
$block1 = new block();
$block1->form = "tdP";
$block1->openForm("");
if ($error != "") {
    $block1->headingError($strings["errors"]);
    $block1->contentError($error);
}
if ($type == "1") {
    $block1->heading($strings["task"] . " : " . $taskDetail->tas_name[0]);
}
if ($type == "2") {
    $block1->heading($strings["subtask"] . " : " . $subtaskDetail->subtas_name[0]);
}
$block1->openContent();
$block1->contentTitle($strings["details"]);
$tmpquery = "WHERE upd.type='{$type}' AND upd.item = '{$item}' ORDER BY upd.created DESC";
$listUpdates = new request();
$listUpdates->openUpdates($tmpquery);
$comptListUpdates = count($listUpdates->upd_id);
for ($i = 0; $i < $comptListUpdates; $i++) {
    if (preg_match('|\\[status:([0-9])\\]|', $listUpdates->upd_comments[$i])) {
        preg_match('|\\[status:([0-9])\\]|i', $listUpdates->upd_comments[$i], $matches);
        $listUpdates->upd_comments[$i] = preg_replace('|\\[status:([0-9])\\]|', '', $listUpdates->upd_comments[$i] . '<br/>');
        $listUpdates->upd_comments[$i] .= $strings["status"] . ' ' . $status[$matches[1]];
コード例 #19
0
ファイル: viewnote.php プロジェクト: ColBT/php_tut
}
$blockPage = new block();
$blockPage->openBreadcrumbs();
$blockPage->itemBreadcrumbs($blockPage->buildLink("../projects/listprojects.php?", $strings["projects"], in));
$blockPage->itemBreadcrumbs($blockPage->buildLink("../projects/viewproject.php?id=" . $projectDetail->pro_id[0], $projectDetail->pro_name[0], in));
$blockPage->itemBreadcrumbs($blockPage->buildLink("../notes/listnotes.php?project=" . $projectDetail->pro_id[0], $strings["notes"], in));
$blockPage->itemBreadcrumbs($noteDetail->note_subject[0]);
$blockPage->closeBreadcrumbs();
if ($msg != "") {
    include '../includes/messages.php';
    $blockPage->messagebox($msgLabel);
}
$block1 = new block();
$block1->form = "tdD";
$block1->openForm("../notes/viewnote.php?" . session_name() . "=" . session_id() . "#" . $block1->form . "Anchor");
$block1->heading($strings["note"] . " : " . $noteDetail->note_subject[0]);
if ($teamMember == "true" && $idSession == $noteDetail->note_owner[0]) {
    $block1->openPaletteIcon();
    $block1->paletteIcon(0, "remove", $strings["delete"]);
    //$block1->paletteIcon(1,"export",$strings["export"]);
    if ($sitePublish == "true") {
        $block1->paletteIcon(2, "add_projectsite", $strings["add_project_site"]);
        $block1->paletteIcon(3, "remove_projectsite", $strings["remove_project_site"]);
    }
    $block1->paletteIcon(4, "edit", $strings["edit"]);
    $block1->closePaletteIcon();
}
if ($projectDetail->pro_org_id[0] == "1") {
    $projectDetail->pro_org_name[0] = $strings["none"];
}
$block1->openContent();
コード例 #20
0
    $block1->contentRow("", $comptListProjects . " " . $strings["matches"]);
}
$block0->closeContent();
/*
$block1->openPaletteIcon();
$block1->paletteIcon(0,"export",$strings["export"]);
$block1->closePaletteIcon();

$block1->openPaletteScript();
$block1->paletteScript(0,"export","../reports/exportcompleted.php?s_date2=$s_date2&","true,false,false",$strings["export"]);
$block1->closePaletteScript($comptListOrganizations,$listOrganizations->org_id);
*/
// set up the header string
$headerString = $strings['project_breakdown'];
$headerString .= ': ' . ($comptListProjects == 1 ? "{$comptListProjects} {$strings['match']}" : "{$comptListProjects} {$strings['matches']}");
$block1->heading($headerString);
$block1->heading_close();
if ($comptListProjects != "0") {
    $block1->openResults($checkbox = "false");
    $block1->labels($labels = array(0 => $strings["owner"], 1 => $strings["project"], 2 => $strings["organization"], 3 => $strings["status"]), "false");
    for ($i = 0; $i < $comptListProjects; $i++) {
        $idStatus = $listProjects->pro_status[$i];
        $block1->openRow();
        $block1->checkboxRow($listProjects->pro_id[$i], $checkbox = "false");
        if ($listProjects->pro_owner[$i] == "0") {
            $block1->cellRow($strings["unassigned"]);
        } else {
            $block1->cellRow(buildLink($listProjects->pro_mem_email_work[$i], $listProjects->pro_mem_name[$i], LINK_MAIL));
        }
        $block1->cellRow(buildLink("../projects/viewproject.php?id=" . $listProjects->pro_id[$i], $listProjects->pro_name[$i], LINK_INSIDE));
        $block1->cellRow(buildLink("../clients/viewclient.php?id=" . $listProjects->pro_org_id[$i], $listProjects->pro_org_name[$i], LINK_INSIDE));
コード例 #21
0
ファイル: listreports.php プロジェクト: jgatica/Netoffice
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 */
$checkSession = true;
require_once "../includes/library.php";
$breadcrumbs[] = buildLink("../reports/createreport.php?", $strings["reports"], LINK_INSIDE);
$breadcrumbs[] = $strings["my_reports"];
$pageSection = 'reports';
require_once "../themes/" . THEME . "/header.php";
//---- content ------
$block1 = new block();
$block1->form = "wbSe";
$block1->openForm("../reports/listreports.php#" . $block1->form . "Anchor");
$block1->heading($strings["my_reports"]);
$block1->openPaletteIcon();
$block1->paletteIcon(0, "add", $strings["add"]);
$block1->paletteIcon(1, "remove", $strings["delete"]);
$block1->closePaletteIcon();
$block1->sorting("reports", $sortingUser->sor_reports[0], "rep.name ASC", $sortingFields = array(0 => "rep.name", 1 => "rep.created"));
$tmpquery = "WHERE rep.owner = '" . $_SESSION['idSession'] . "' ORDER BY {$block1->sortingValue}";
$listReports = new request();
$listReports->openReports($tmpquery);
$comptListReports = count($listReports->rep_id);
if ($comptListReports != "0") {
    $block1->openResults();
    $block1->labels($labels = array(0 => $strings["name"], 1 => $strings["created"]), "false");
    for ($i = 0; $i < $comptListReports; $i++) {
        $block1->openRow($listReports->rep_id[$i]);
        $block1->checkboxRow($listReports->rep_id[$i]);
コード例 #22
0
ファイル: viewcalendar.php プロジェクト: jgatica/Netoffice
 //--- header----
 $breadcrumbs[] = buildLink("../calendar/viewcalendar.php?type=monthPreview", $strings["calendar"], LINK_INSIDE);
 $breadcrumbs[] = buildLink("../calendar/viewcalendar.php?viewCalend={$viewCalend}&type=monthPreview&amp;dateCalend={$dateCalend}", "{$monthName} {$year}", LINK_INSIDE);
 $breadcrumbs[] = "{$dayName} {$day} {$monthName} {$year}";
 $pageSection = 'calendar';
 require_once "../themes/" . THEME . "/header.php";
 //--- content--------
 $block1 = new block();
 $block1->form = "calendList";
 $block1->openForm("../calendar/viewcalendar.php?viewCalend={$viewCalend}&type={$type}&amp;dateCalend={$dateCalend}#" . $block1->form . "Anchor");
 if ($viewCalend == 0) {
     $heading_posfix = "(" . $strings['cal_personal'] . $strings['calendar'] . ")";
 } else {
     $heading_posfix = "(" . $strings['project'] . $strings['calendar'] . "-" . $listTeam->tea_pro_name[0] . ")";
 }
 $block1->heading("{$dayName} {$day} {$monthName} {$year}" . $heading_posfix);
 $block1->openPaletteIcon();
 $block1->paletteIcon(0, "add", $strings["add"]);
 $block1->paletteIcon(1, "remove", $strings["delete"]);
 $block1->paletteIcon(2, "info", $strings["view"]);
 $block1->paletteIcon(3, "edit", $strings["edit"]);
 $block1->closePaletteIcon();
 $block1->sorting("calendar", $sortingUser->sor_calendar[0], "cal.date_end DESC", $sortingFields = array(0 => "cal.shortname", 1 => "cal.subject", 2 => "cal.date_start", 3 => "cal.date_end"));
 $dayRecurr = _dayOfWeek(mktime(12, 12, 12, $month, $day, $year));
 if ($viewCalend == 0) {
     $tmpquery = "WHERE cal.owner = '" . $_SESSION['idSession'] . "' AND ((cal.date_start <= '{$dateCalend}' AND cal.date_end >= '{$dateCalend}' AND cal.recurring = '0') OR ((cal.date_start <= '{$dateCalend}' AND cal.date_end <= '{$dateCalend}') AND cal.recurring = '1' AND cal.recur_day = '{$dayRecurr}')) ORDER BY cal.shortname";
 } else {
     $tmpquery = "WHERE cal.project = '{$viewCalend}' AND ((cal.date_start <= '{$dateCalend}' AND cal.date_end >= '{$dateCalend}' AND cal.recurring = '0') OR ((cal.date_start <= '{$dateCalend}' AND cal.date_end <= '{$dateCalend}') AND cal.recurring = '1' AND cal.recur_day = '{$dayRecurr}')) ORDER BY cal.shortname";
 }
 // $tmpquery = "WHERE cal.owner = '" . $_SESSION['idSession'] . "' AND cal.date_start <= '$dateCalend' AND cal.date_end >= '$dateCalend' ORDER BY $block1->sortingValue";
 $listCalendar = new request();
コード例 #23
0
ファイル: viewfile.php プロジェクト: jgatica/Netoffice
$block1->closeContent();
$block1->headingForm_close();
$block1->closeFormResults();
if ($fileDetail->mat_owner[0] == $_SESSION['idSession']) {
    $block1->openPaletteScript();
    $block1->paletteScript(0, "remove", "../meetings/deletefiles.php?project=" . $fileDetail->mat_project[0] . "&meeting=" . $fileDetail->mat_meeting[0] . "&sendto=filedetails", "false,true,true", $strings["ifc_delete_version"]);
    $block1->paletteScript(1, "add_projectsite", "../meetings/viewfile.php?addToSiteFile=true&file=" . $fileDetail->mat_id[0] . "&action=publish", "true,true,true", $strings["add_project_site"]);
    $block1->paletteScript(2, "remove_projectsite", "../meetings/viewfile.php?removeToSiteFile=true&file=" . $fileDetail->mat_id[0] . "&action=publish", "true,true,true", $strings["remove_project_site"]);
    $block1->closePaletteScript($comptFileDetail, $fileDetail->mat_id);
}
if ($peerReview == "true") {
    // Revision list block
    $block2 = new block();
    $block2->form = "tdC";
    $block2->openForm("../meetings/viewfile.php?id={$id}#" . $block2->form . "Anchor");
    $block2->heading($strings["ifc_revisions"]);
    if ($fileDetail->mat_owner[0] == $_SESSION['idSession']) {
        $block2->openPaletteIcon();
        $block2->paletteIcon(0, "remove", $strings["ifc_delete_review"]);
        $block2->closePaletteIcon();
    }
    if ($error2 != "") {
        $block2->headingError($strings["errors"]);
        $block2->contentError($error2);
    }
    $block2->openContent();
    $block2->contentTitle($strings["details"]);
    echo "<tr class=\"odd\"><td valign=\"top\" class=\"leftvalue\"></td><td><br>";
    $tmpquery = "WHERE mat.vc_parent = '{$id}' AND mat.vc_status != '3' ORDER BY mat.date";
    $listReviews = new request();
    $listReviews->openMeetingsAttachment($tmpquery);
コード例 #24
0
if ($comptTotal == "1") {
    echo "1&#160;" . $strings["match"];
}
if ($comptTotal > "1" || $comptTotal == "0") {
    echo "{$comptTotal}&#160;" . $strings["matches"];
}
if ($comptTotal == "0") {
    echo "<br>" . $strings["no_results_search"];
} else {
}
echo "</td></tr>";
$block0->closeContent();
if ($comptListProjects != "0") {
    $block1->form = "ProjectForm";
    $block1->openForm("../search/resultssearch.php?searchfor={$searchfor}&amp;heading={$heading}#" . $block1->form . "Anchor");
    $block1->heading($strings["search_results"] . " : " . $strings["projects"] . " ({$block1->recordsTotal})");
    $block1->openPaletteIcon();
    $block1->paletteIcon(0, "export", $strings["export"]);
    $block1->closePaletteIcon();
    $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["published"]), "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]);
        $block1->cellRow(buildLink("../projects/viewproject.php?id=" . $listProjects->pro_id[$i], $listProjects->pro_id[$i], LINK_INSIDE));
        $block1->cellRow(buildLink("../projects/viewproject.php?id=" . $listProjects->pro_id[$i], $listProjects->pro_name[$i], LINK_INSIDE));
コード例 #25
0
ファイル: edit_language.php プロジェクト: jgatica/Netoffice
// Phrase Editing Form
$translations = load_translations($sellang);
$block1->form = "langedit";
$block1->openForm("../administration/edit_language.php?action=save&language=" . $sellang . "&count=" . count($translations) . "&offset=" . $offset);
// build page links
$numpages = count($translations) / $pagesize;
$pagestr = "";
for ($i = 0; $i < $numpages; $i++) {
    $pagestr .= ' ';
    if ($offset / $pagesize != $i) {
        $pagestr .= buildLink('../administration/edit_language.php?offset=' . $i * $pagesize . '&language=' . $sellang, $i + 1);
    } else {
        $pagestr .= $i + 1;
    }
}
$block1->heading(text("Phrases") . " ( " . $pagestr . " )");
$block1->openPaletteIcon();
$block1->paletteIcon(1, "remove", text("delete"));
$block1->closePaletteIcon();
// ok, now to list up all the phrases
$block1->openResults();
$block1->labels($labels = array(0 => text('Label'), 1 => text('Translation')), $published = "true", "true", $sortingOff = array(0 => '0', 1 => 'DESC'));
reset($translations);
$id = 0;
$checkboxes = array();
foreach ($translations as $key => $value) {
    if ($id >= $offset && $id < $offset + $pagesize) {
        $block1->openRow($id);
        $block1->checkboxRow($id);
        $block1->cellRow(htmlspecialchars($key, ENT_QUOTES));
        $block1->cellRow("<input type='hidden' name='key" . $id . "' value=\"" . htmlspecialchars($key, ENT_QUOTES) . "\">" . "<input size='80' name='trans" . $id . "' value=\"" . htmlspecialchars($value, ENT_QUOTES) . "\">", 100);
コード例 #26
0
ファイル: editinvoice.php プロジェクト: ColBT/php_tut
$blockPage->closeBreadcrumbs();
if ($msg != "") {
    include '../includes/messages.php';
    $blockPage->messagebox($msgLabel);
}
$block1 = new block();
if ($id != "") {
    $block1->form = "invoice";
    $block1->openForm("../invoicing/editinvoice.php?id={$id}&action=update&" . session_name() . "=" . session_id() . "#" . $block1->form . "Anchor");
}
if ($error != "") {
    $block1->headingError($strings["errors"]);
    $block1->contentError($error);
}
if ($id != "") {
    $block1->heading($strings["edit_invoice"] . " : " . $detailInvoice->inv_id[0]);
}
$block1->openContent();
$block1->contentTitle($strings["details"]);
$block1->contentRow($strings["header_note"], "<textarea rows=\"10\" style=\"width: 400px; height: 100px;\" name=\"header_note\" cols=\"47\">{$header_note}</textarea>");
$block1->contentRow($strings["footer_note"], "<textarea rows=\"10\" style=\"width: 400px; height: 100px;\" name=\"footer_note\" cols=\"47\">{$footer_note}</textarea>");
$tmpquery = "WHERE invitem.invoice = '{$id}' AND invitem.active = '1' ORDER BY invitem.position ASC";
$listInvoicesItems = new request();
$listInvoicesItems->openInvoicesItems($tmpquery);
$comptListInvoicesItems = count($listInvoicesItems->invitem_id);
$selectStatus = "<select name=\"st\">";
$comptSta = count($invoiceStatus);
if ($detailInvoice->inv_status[0] == "0") {
    $begin = "0";
} else {
    $begin = "1";
コード例 #27
0
ファイル: addtasktime.php プロジェクト: jgatica/Netoffice
}
echo '
	  </select></td>
	</tr>';
if ($ld == '') {
    $ld = $date;
}
$block1->contentRow($strings['date'], "<input type=\"text\" style=\"width: 150px;\" name=\"ld\" id=\"sel1\"\r\n\tsize=\"20\" value=\"{$ld}\"><button type=\"reset\" id=\"trigger_a\">...</button>\r\n\t<script type=\"text/javascript\">Calendar.setup({ inputField:\"sel1\", button:\"trigger_a\" });</script>");
echo "\r\n\t<tr class='odd'>\r\n\t  <td valign='top' class='leftvalue'>" . $strings["worked_hours"] . " :</td>\r\n\t  <td><input size='20' value='{$hr}' style='width: 150px;' name='hr' maxlength='6' type='text'></td>\r\n\t</tr>\r\n\t<tr class='odd'>\r\n\t  <td valign='top' class='leftvalue'>" . $strings["comments"] . " :</td>\r\n\t  <td><textarea rows='10' style='width: 400px; height: 150px;' name='comm' cols='47'>{$comm}</textarea></td>\r\n\t</tr>\r\n\t<tr class='odd'>\r\n\t  <td valign='top' class='leftvalue'>&nbsp;</td>\r\n\t  <td><input type='SUBMIT' value='" . $strings["save"] . "'></td>\r\n\t</tr>";
$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");
コード例 #28
0
ファイル: library.php プロジェクト: hostellerie/nexpro
function prj_displayAllProjects(&$blockPage)
{
    global $_TABLES, $_CONF, $_USER, $subTaskImg, $progress, $priority, $strings, $labels, $_PRJCONF, $_COOKIE;
    $limitbase = $_COOKIE['allprjmin'];
    if ($limitbase == '') {
        $limitbase = 0;
    }
    if (isset($_USER['uid'])) {
        $userid = $_USER['uid'];
    } else {
        $userid = 1;
    }
    if ($blockPage == NULL or $blockPage == '') {
        $blockPage = new block();
    }
    $filter = COM_applyFilter($_COOKIE['filter']);
    $category_string = substr("{$filter}", 0, 3);
    // Get a list of groups user is a member of and setup to be used in SQL to test user can view project
    $groups = SEC_getUserGroups($uid);
    foreach ($groups as $id) {
        $aGroups[] = $id;
    }
    $prjPermGroups = implode(',', $aGroups);
    if (SEC_inGroup('Root')) {
        $querycolumns = "SELECT DISTINCT a.pid, a.progress_id, a.status_id, a.priority_id, a.name, ";
        $querycolumns .= "a.last_updated_date, a.lhs, a.rhs, a.parent_id  ";
        $queryfrom = "FROM {$_TABLES['prj_projects']} a";
        $querywhere = " WHERE 1=1 ";
    } else {
        $querycolumns = "SELECT DISTINCT a.pid, a.progress_id, a.status_id, a.priority_id, a.name, ";
        $querycolumns .= "a.last_updated_date, a.lhs, a.rhs, a.parent_id  ";
        $queryfrom = "FROM {$_TABLES['prj_projects']} a, {$_TABLES['prj_projPerms']} b ";
        $querywhere .= "WHERE b.pid =a.pid";
        $querywhere .= " AND b.taskID=0 AND (b.uid={$userid} OR b.gid in ({$prjPermGroups})) ";
    }
    switch ($category_string) {
        case 'cat':
            $needle = substr("{$filter}", 3, 3);
            $queryfrom = $queryfrom . ", {$_TABLES['prj_category']} c ";
            $querywhere = $querywhere . "AND c.pid=a.pid AND c.category_id={$needle} ";
            $header = nexlistOptionList('view', '', $_PRJCONF['nexlist_category'], 0, $needle);
            break;
        case 'loc':
            $needle = substr("{$filter}", 3, 3);
            $queryfrom = $queryfrom . ", {$_TABLES['prj_location']} c ";
            $querywhere = $querywhere . "AND c.pid=a.pid AND c.location_id={$needle} ";
            $header = nexlistOptionList('view', '', $_PRJCONF['nexlist_locations'], 0, $needle);
            break;
        case 'dep':
            $needle = substr("{$filter}", 3, 3);
            $queryfrom = $queryfrom . ", {$_TABLES['prj_department']} c ";
            $querywhere = $querywhere . "AND c.pid=a.pid AND c.department_id={$needle} ";
            $header = nexlistOptionList('view', '', $_PRJCONF['nexlist_departments'], 0, $needle);
            break;
        case 'pri':
            $needle = substr("{$filter}", 3, 3);
            $querywhere = $querywhere . " AND a.priority_id={$needle} ";
            $header = $strings["filter_priority"] . $priority[$needle];
            break;
        case 'pro':
            $needle = substr("{$filter}", 3, 3);
            $querywhere = $querywhere . " AND a.progress_id={$needle} ";
            $header = $strings["filter_progress"] . $progress[$needle];
            break;
        case 'sta':
            $needle = substr("{$filter}", 3, 3);
            $querywhere = $querywhere . " AND a.status_id={$needle} ";
            $header = $strings["filter_status"] . $status[$needle];
            break;
        case 'ctm':
            if (SEC_inGroup('Root')) {
                $querycolumns = "SELECT DISTINCT {$_TABLES['prj_projects']}.pid, {$_TABLES['prj_projects']}.progress_id, {$_TABLES['prj_projects']}.status_id, {$_TABLES['prj_projects']}.priority_id, {$_TABLES['prj_projects']}.name, ";
                $querycolumns .= "{$_TABLES['prj_projects']}.last_updated_date, {$_TABLES['prj_projects']}.lhs, {$_TABLES['prj_projects']}.rhs, {$_TABLES['prj_projects']}.parent_id  ";
                $querywhere = "";
            } else {
                $querycolumns = "SELECT DISTINCT {$_TABLES['prj_projects']}.pid, {$_TABLES['prj_projects']}.progress_id, {$_TABLES['prj_projects']}.status_id, {$_TABLES['prj_projects']}.priority_id, {$_TABLES['prj_projects']}.name, ";
                $querycolumns .= "{$_TABLES['prj_projects']}.last_updated_date, {$_TABLES['prj_projects']}.lhs, {$_TABLES['prj_projects']}.rhs, {$_TABLES['prj_projects']}.parent_id, {$_TABLES['prj_projPerms']}.viewRead  ";
                $querywhere = "WHERE b.pid =a.pid";
                $querywhere .= " AND b.taskID=0 AND (b.uid={$userid} OR b.gid in ({$prjPermGroups})) ";
            }
            $needle = substr("{$filter}", 3, 3);
            $customFilter = prj_constructFilter($needle);
            $queryfrom = $customFilter['clause'];
            $header = $strings["filter_custom"] . $customFilter['name'];
            break;
        default:
            $needle = '';
            $customFilter = '';
            $header = '';
    }
    $block1 = new block();
    $block1->form = "allP";
    $block1->openForm($_CONF['site_url'] . "/nexproject/projects.php?" . "#" . $block1->form . "Anchor");
    if ($header != '') {
        $headingTitle = $strings["projects"] . "&nbsp;-&nbsp;{$header}";
    } else {
        $headingTitle = "{$strings['projects']}&nbsp;-&nbsp;{$strings['allprojects']}&nbsp;&nbsp;";
        $headingTitle .= "(<a href=\"{$_CONF['site_url']}/nexproject/index.php?mode=add\">{$strings['add']}</a>)";
    }
    $headingStatusArea = '<span id="ajaxstatus_myprojects" class="pluginInfo" style="display:none">&nbsp;</span>';
    $block1->heading($headingTitle, $headingStatusArea);
    $block1->borne = $blockPage->returnBorne("1");
    $block1->rowsLimit = $_PRJCONF['project_block_rows'];
    if ($category_string == 'ctm') {
        $queryend = " ORDER BY {$_TABLES['prj_projects']}.lhs";
    } else {
        $queryend = " ORDER BY a.lhs";
    }
    $lim = $limitbase * $block1->rowsLimit;
    $query = $querycolumns . $queryfrom . $querywhere . $queryend;
    $countRes = DB_query($query);
    $block1->recordsTotal = DB_numrows($countRes);
    $query .= " LIMIT {$lim}, {$block1->rowsLimit} ";
    $result = DB_query($query);
    echo '<!--startMyProjects-->';
    echo '<div id="divMyProjects" style="padding-bottom:0px;">';
    $comptListProjects = DB_numrows($result);
    if ($comptListProjects != "0") {
        $block1->openResults('false');
        $block1->labels($labels = array(0 => $strings["project"], 1 => $strings["priority"], 2 => $strings["lastupdated"], 3 => $strings["owner"]), false, "false");
        for ($i = 0; $i < DB_numrows($result); $i++) {
            list($id, $idProgress, $idStatus, $idPriority, $projectName, $lastupdated, $lhs, $rhs, $parent_id) = DB_fetchArray($result);
            $pArray = prj_getProjectPermissions($id, $userid);
            //based on the projectID, fetch the permissions for this user...
            if ($pArray['monitor'] == '1' || $pArray['teammember'] == '1' || $pArray['full'] == '1') {
                $fullname = $projectName;
                $owner_uid = DB_getItem($_TABLES['prj_users'], 'uid', "pid={$id} AND role='o'");
                if ($owner_uid >= 2) {
                    $projectOwner = DB_getItem($_TABLES['users'], 'fullname', "uid={$owner_uid}");
                    if (strlen($projectOwner) > 15) {
                        $projectOwner = substr($projectOwner, 0, 12) . "..";
                    }
                }
                $block1->openRow();
                // $block1->checkboxRow($id);
                $block1->cellProgress($progress[$idProgress]);
                $indent = '';
                //we need to determine if the user has access to the parent that this item is related to.
                //we do this by determining which project is on its left hand side.
                $testparent = DB_getItem($_TABLES['prj_projects'], "parent_id", "pid={$id}");
                $aGroups = array();
                $groups = SEC_getUserGroups($uid);
                foreach ($groups as $gid) {
                    $aGroups[] = $gid;
                }
                $prjPermGroups = implode(',', $aGroups);
                $testsql = "SELECT a.* ";
                $testsql .= "FROM  {$_TABLES['prj_projPerms']} a ";
                $testsql .= "WHERE a.pid={$testparent} ";
                $testsql .= " AND a.taskID=0 AND (a.uid={$_USER['uid']} OR a.gid in ({$prjPermGroups})) ";
                $testres = DB_query($testsql);
                $testrows = DB_numRows($testres);
                if ($testrows > 0 && $testparent > 0) {
                    if ($parent_id != 0) {
                        $level = prj_getProjectLevel($id);
                        for ($z = 1; $z < $level; $z++) {
                            $indent .= '&nbsp;&nbsp;';
                        }
                        $indent .= $subTaskImg;
                    }
                }
                if (strlen($projectName) > $_PRJCONF['project_name_length']) {
                    $span = "<span title=\"{$projectName}\">";
                    $projectName = substr($projectName, 0, $_PRJCONF['project_name_length']) . "....";
                    $projectName = $span . $projectName . "</span>";
                }
                $block1->cellRow($indent . $blockPage->buildLink("{$_CONF['site_url']}/nexproject/viewproject.php?pid={$id}", $projectName, "context", $fullname, $id));
                $block1->cellRow($priority[$idPriority]);
                //$block1->cellProgress($status[$idStatus]);
                $block1->cellRow(strftime("%Y/%m/%d %H:%M", $lastupdated));
                $block1->cellRow($projectOwner);
                $block1->closeRow();
            }
        }
        //end for
        $block1->closeResults();
        //$block1->bornesFooter("1", $blockPage->bornesNumber, "", "typeProjects=$typeProjects");
        $pages = intval($block1->recordsTotal / $block1->rowsLimit);
        if (fmod($block1->recordsTotal, $block1->rowsLimit) > 0) {
            $pages += 1;
        }
        if ($pages > 1) {
            for ($pagecntr = 0; $pagecntr < $pages; $pagecntr++) {
                echo '<span  style="text-decoration:underline;cursor: hand" onclick=\'setCookie("allprjmin","';
                echo $pagecntr;
                echo '","","");prj_getMyProjects("", "", "allprojects")\'>';
                if ($limitbase == $pagecntr) {
                    echo '<span style="color:red">';
                    echo $pagecntr + 1;
                    echo '</span>';
                } else {
                    echo $pagecntr + 1;
                }
                echo '</span>&nbsp;';
            }
        }
    } else {
        $block1->noresults();
    }
    echo '</div>';
    echo '<!--endMyProjects-->';
    //$block1->closeToggle();
    $block1->closeFormResults();
}
コード例 #29
0
ファイル: deletefiles.php プロジェクト: ColBT/php_tut
$blockPage->openBreadcrumbs();
$blockPage->itemBreadcrumbs($blockPage->buildLink("../projects/listprojects.php?", $strings["projects"], in));
$blockPage->itemBreadcrumbs($blockPage->buildLink("../projects/viewproject.php?id=" . $projectDetail->pro_id[0], $projectDetail->pro_name[0], in));
if ($task != "0") {
    $blockPage->itemBreadcrumbs($blockPage->buildLink("../tasks/listtasks.php?project=" . $projectDetail->pro_id[0], $strings["tasks"], in));
    $blockPage->itemBreadcrumbs($blockPage->buildLink("../tasks/viewtask.php?id=" . $taskDetail->tas_id[0], $taskDetail->tas_name[0], in));
}
$blockPage->itemBreadcrumbs($strings["unlink_files"]);
$blockPage->closeBreadcrumbs();
if ($msg != "") {
    include '../includes/messages.php';
    $blockPage->messagebox($msgLabel);
}
$block1 = new block();
$block1->form = "saC";
$block1->openForm("../linkedcontent/deletefiles.php?project={$project}&task={$task}&action=delete&id={$id}&sendto={$sendto}&" . session_name() . "=" . session_id());
$block1->heading($strings["unlink_files"]);
$block1->openContent();
$block1->contentTitle($strings["delete_following"]);
$id = str_replace("**", ",", $id);
$tmpquery = "WHERE fil.id IN({$id}) ORDER BY fil.name";
$listFiles = new request();
$listFiles->openFiles($tmpquery);
$comptListFiles = count($listFiles->fil_id);
for ($i = 0; $i < $comptListFiles; $i++) {
    echo "<tr class=\"odd\"><td valign=\"top\" class=\"leftvalue\">&nbsp;</td><td>" . $listFiles->fil_name[$i] . "</td></tr>";
}
echo "<tr class=\"odd\"><td valign=\"top\" class=\"leftvalue\">&nbsp;</td><td><input type=\"SUBMIT\" value=\"" . $strings["delete"] . "\">&#160;<input type=\"BUTTON\" value=\"" . $strings["cancel"] . "\" onClick=\"history.back();\"></td></tr>";
$block1->closeContent();
$block1->closeForm();
include '../themes/' . THEME . '/footer.php';
コード例 #30
0
ファイル: viewclientuser.php プロジェクト: jgatica/Netoffice
//--- header ------------
$breadcrumbs[] = buildLink("../clients/listclients.php?", $strings["clients"], LINK_INSIDE);
$breadcrumbs[] = buildLink("../clients/viewclient.php?id={$organization}", $detailClient->org_name[0], LINK_INSIDE);
$breadcrumbs[] = $userDetail->mem_login[0];
$pageSection = 'clients';
$pageTitle = '<span class="type">' . $strings["client_user"] . '</span><br><span class="name">' . $userDetail->mem_name[0] . '</span>';
require_once "../themes/" . THEME . "/header.php";
//--- content ------------
$block1 = new block();
$block1->form = "cuserD";
$block1->openForm("../users/viewclientuser.php#" . $block1->form . "Anchor");
if ($error != "") {
    $block1->headingError($strings["errors"]);
    $block1->contentError($error);
}
$block1->heading($strings["client_user"]);
$block1->openPaletteIcon();
if ($_SESSION['profilSession'] == "0" || $_SESSION['profilSession'] == "1") {
    $block1->paletteIcon(0, "remove", $strings["delete"]);
    $block1->paletteIcon(1, "edit", $strings["edit"]);
}
$block1->paletteIcon(2, "export", $strings["export"]);
$block1->closePaletteIcon();
$block1->openContent();
$block1->contentTitle($strings["user_details"]);
$block1->contentRow($strings["user_name"], $userDetail->mem_login[0]);
$block1->contentRow($strings["full_name"], $userDetail->mem_name[0]);
$block1->contentRow($strings["organization"], $userDetail->mem_org_name[0]);
$block1->contentRow($strings["email"], $userDetail->mem_email_work[0]);
$block1->contentRow($strings["work_phone"], $userDetail->mem_phone_work[0]);
$block1->contentRow($strings["home_phone"], $userDetail->mem_phone_home[0]);