Menu

[r9]: / notes / listnotes.php  Maximize  Restore  History

Download this file

149 lines (131 with data), 5.6 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
<?php
#Application name: PhpCollab
#Status page: 1
#Path by root: ../notes/listnotes.php
$checkSession = "true";
include_once('../includes/library.php');
include("../includes/customvalues.php");
if ($action == "publish") {
if ($addToSite == "true") {
$multi = strstr($id,"**");
if ($multi != "") {
$id = str_replace("**",",",$id);
$tmpquery1 = "UPDATE ".$tableCollab["notes"]." SET published='0' WHERE id IN($id)";
} else {
$tmpquery1 = "UPDATE ".$tableCollab["notes"]." SET published='0' WHERE id = '$id'";
}
connectSql("$tmpquery1");
$msg = "addToSite";
$id = $project;
}
if ($removeToSite == "true") {
$multi = strstr($id,"**");
if ($multi != "") {
$id = str_replace("**",",",$id);
$tmpquery1 = "UPDATE ".$tableCollab["notes"]." SET published='1' WHERE id IN($id)";
} else {
$tmpquery1 = "UPDATE ".$tableCollab["notes"]." SET published='1' WHERE id = '$id'";
}
connectSql("$tmpquery1");
$msg = "removeToSite";
$id = $project;
}
}
include('../themes/'.THEME.'/header.php');
$tmpquery = "WHERE pro.id = '$project'";
$projectDetail = new request();
$projectDetail->openProjects($tmpquery);
$teamMember = "false";
$tmpquery = "WHERE tea.project = '$project' AND tea.member = '$idSession'";
$memberTest = new request();
$memberTest->openTeams($tmpquery);
$comptMemberTest = count($memberTest->tea_id);
if ($comptMemberTest == "0") {
$teamMember = "false";
} else {
$teamMember = "true";
}
$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["notes"]);
$blockPage->closeBreadcrumbs();
if ($msg != "") {
include('../includes/messages.php');
$blockPage->messagebox($msgLabel);
}
$block1 = new block();
$block1->form = "saJ";
$block1->openForm("../notes/listnotes.php?".session_name()."=".session_id()."&project=$project#".$block1->form."Anchor");
$block1->heading($strings["notes"]);
$block1->openPaletteIcon();
if ($teamMember == "true") {
$block1->paletteIcon(0,"add",$strings["add"]);
$block1->paletteIcon(1,"remove",$strings["delete"]);
//$block1->paletteIcon(2,"export",$strings["export"]);
if ($sitePublish == "true") {
$block1->paletteIcon(3,"add_projectsite",$strings["add_project_site"]);
$block1->paletteIcon(4,"remove_projectsite",$strings["remove_project_site"]);
}
}
$block1->paletteIcon(5,"info",$strings["view"]);
if ($teamMember == "true") {
$block1->paletteIcon(6,"edit",$strings["edit"]);
}
$block1->closePaletteIcon();
$comptTopic = count($topicNote);
if ($comptTopic != "0") {
$block1->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 {
$block1->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 = '$project' ORDER BY $block1->sortingValue";
$listNotes = new request();
$listNotes->openNotes($tmpquery);
$comptListNotes = count($listNotes->note_id);
if ($comptListNotes != "0") {
$block1->openResults();
$comptTopic = count($topicNote);
if ($comptTopic != "0") {
$block1->labels($labels = array(0=>$strings["subject"],1=>$strings["topic"],2=>$strings["date"],3=>$strings["owner"],4=>$strings["published"]),"true");
} else {
$block1->labels($labels = array(0=>$strings["subject"],1=>$strings["date"],2=>$strings["owner"],3=>$strings["published"]),"true");
}
for ($i=0;$i<$comptListNotes;$i++) {
$idPublish = $listNotes->note_published[$i];
$block1->openRow();
$block1->checkboxRow($listNotes->note_id[$i]);
$block1->cellRow($blockPage->buildLink("../notes/viewnote.php?id=".$listNotes->note_id[$i],$listNotes->note_subject[$i],in));
if ($comptTopic != "0") {
$block1->cellRow($topicNote[$listNotes->note_topic[$i]]);
}
$block1->cellRow($listNotes->note_date[$i]);
$block1->cellRow($blockPage->buildLink($listNotes->note_mem_email_work[$i],$listNotes->note_mem_login[$i],mail));
if ($sitePublish == "true") {
$block1->cellRow($statusPublish[$idPublish]);
}
$block1->closeRow();
}
$block1->closeResults();
} else {
$block1->noresults();
}
$block1->closeFormResults();
$block1->openPaletteScript();
if ($teamMember == "true") {
$block1->paletteScript(0,"add","../notes/editnote.php?project=$project","true,false,false",$strings["add"]);
$block1->paletteScript(1,"remove","../notes/deletenotes.php?project=$project","false,true,true",$strings["delete"]);
//$block1->paletteScript(2,"export","export.php?","false,true,true",$strings["export"]);
if ($sitePublish == "true") {
$block1->paletteScript(3,"add_projectsite","../notes/listnotes.php?addToSite=true&project=".$projectDetail->pro_id[0]."&action=publish","false,true,true",$strings["add_project_site"]);
$block1->paletteScript(4,"remove_projectsite","../notes/listnotes.php?removeToSite=true&project=".$projectDetail->pro_id[0]."&action=publish","false,true,true",$strings["remove_project_site"]);
}
}
$block1->paletteScript(5,"info","../notes/viewnote.php?","false,true,false",$strings["view"]);
if ($teamMember == "true") {
$block1->paletteScript(6,"edit","../notes/editnote.php?project=$project","false,true,false",$strings["edit"]);
}
$block1->closePaletteScript($comptListNotes,$listNotes->note_id);
include('../themes/'.THEME.'/footer.php');
?>
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.