WebGUI 3.3.0 release
This commit is contained in:
parent
40bb7fed59
commit
80f7752f32
41 changed files with 1662 additions and 402 deletions
|
|
@ -20,6 +20,7 @@ use WebGUI::ErrorHandler;
|
|||
use WebGUI::Form;
|
||||
use WebGUI::International;
|
||||
use WebGUI::Mail;
|
||||
use WebGUI::Paginator;
|
||||
use WebGUI::Privilege;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::Shortcut;
|
||||
|
|
@ -489,7 +490,7 @@ sub www_updateAccount {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_viewMessageLog {
|
||||
my (@data, $output, $sth, @row, $i, $dataRows, $prevNextBar);
|
||||
my (@data, $output, $sth, @row, $i, $p);
|
||||
if (WebGUI::Privilege::isInGroup(2,$session{user}{userId})) {
|
||||
$output = '<h1>'.WebGUI::International::get(159).'</h1>';
|
||||
$sth = WebGUI::SQL->read("select messageLogId,message,url,dateOfEntry from messageLog where userId=$session{user}{userId} order by dateOfEntry desc");
|
||||
|
|
@ -507,16 +508,16 @@ sub www_viewMessageLog {
|
|||
$i++;
|
||||
}
|
||||
$sth->finish;
|
||||
($dataRows, $prevNextBar) = paginate(50,WebGUI::URL::page('op=viewMessageLog'),\@row);
|
||||
$p = WebGUI::Paginator->new(WebGUI::URL::page('op=viewMessageLog'),\@row);
|
||||
$output .= '<table width="100%" cellspacing=1 cellpadding=2 border=0>';
|
||||
$output .= '<tr><td class="tableHeader">'.WebGUI::International::get(351).'</td><td class="tableHeader">'.WebGUI::International::get(352).'</td></tr>';
|
||||
if ($dataRows eq "") {
|
||||
if ($p->getPage($session{form}{pn}) eq "") {
|
||||
$output .= '<tr><td rowspan=2 class="tableData">'.WebGUI::International::get(353).'</td></tr>';
|
||||
} else {
|
||||
$output .= $dataRows;
|
||||
$output .= $p->getPage($session{form}{pn});
|
||||
}
|
||||
$output .= '</table>';
|
||||
$output .= $prevNextBar;
|
||||
$output .= $p->getBarSimple($session{form}{pn});
|
||||
$output .= _accountOptions();
|
||||
} else {
|
||||
$output = WebGUI::Privilege::insufficient();
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ our @EXPORT = qw(&www_switchOffAdmin &www_switchOnAdmin);
|
|||
#-------------------------------------------------------------------
|
||||
sub www_switchOffAdmin {
|
||||
if ($session{var}{sessionId}) {
|
||||
WebGUI::SQL->write("update session set adminOn=0 where sessionId='$session{var}{sessionId}'");
|
||||
WebGUI::SQL->write("update userSession set adminOn=0 where sessionId='$session{var}{sessionId}'");
|
||||
WebGUI::Session::refreshSessionVars($session{var}{sessionId});
|
||||
return "";
|
||||
} else {
|
||||
|
|
@ -33,7 +33,7 @@ sub www_switchOffAdmin {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_switchOnAdmin {
|
||||
if ($session{var}{sessionId}) {
|
||||
WebGUI::SQL->write("update session set adminOn=1 where sessionId='$session{var}{sessionId}'");
|
||||
WebGUI::SQL->write("update userSession set adminOn=1 where sessionId='$session{var}{sessionId}'");
|
||||
WebGUI::Session::refreshSessionVars($session{var}{sessionId});
|
||||
return "";
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ use Tie::CPHash;
|
|||
use WebGUI::DateTime;
|
||||
use WebGUI::Form;
|
||||
use WebGUI::International;
|
||||
use WebGUI::Paginator;
|
||||
use WebGUI::Privilege;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::Shortcut;
|
||||
|
|
@ -146,7 +147,7 @@ sub www_editGroupSave {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_listGroups {
|
||||
my ($output, $dataRows, $prevNextBar, $sth, @data, @row, $i);
|
||||
my ($output, $p, $sth, @data, @row, $i);
|
||||
if (WebGUI::Privilege::isInGroup(3)) {
|
||||
$output = helpLink(10);
|
||||
$output .= '<h1>'.WebGUI::International::get(89).'</h1>';
|
||||
|
|
@ -165,11 +166,11 @@ sub www_listGroups {
|
|||
$i++;
|
||||
}
|
||||
$sth->finish;
|
||||
($dataRows, $prevNextBar) = paginate(50,WebGUI::URL::page('op=listGroups'),\@row);
|
||||
$p = WebGUI::Paginator->new(WebGUI::URL::page('op=listGroups'),\@row);
|
||||
$output .= '<table border=1 cellpadding=5 cellspacing=0 align="center">';
|
||||
$output .= $dataRows;
|
||||
$output .= $p->getPage($session{form}{pn});
|
||||
$output .= '</table>';
|
||||
$output .= $prevNextBar;
|
||||
$output .= $p->getBarTraditional($session{form}{pn});
|
||||
return $output;
|
||||
} else {
|
||||
return WebGUI::Privilege::adminOnly();
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ use WebGUI::Attachment;
|
|||
use WebGUI::DateTime;
|
||||
use WebGUI::Form;
|
||||
use WebGUI::International;
|
||||
use WebGUI::Paginator;
|
||||
use WebGUI::Privilege;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::Shortcut;
|
||||
|
|
@ -56,9 +57,11 @@ sub www_addImageSave {
|
|||
my ($imageId, $file);
|
||||
if (WebGUI::Privilege::isInGroup(4)) {
|
||||
$imageId = getNextId("imageId");
|
||||
$file = WebGUI::Attachment::save("filename","images",$imageId);
|
||||
$file = WebGUI::Attachment->new("newFile","images",$imageId);
|
||||
$file->save("filename");
|
||||
WebGUI::SQL->write("insert into images values ($imageId, ".quote($session{form}{name}).
|
||||
", ".quote($file).", ".quote($session{form}{parameters}).", $session{user}{userId}, ".
|
||||
", ".quote($file->getFilename).", ".quote($session{form}{parameters}).
|
||||
", $session{user}{userId}, ".
|
||||
quote($session{user}{username}).", ".time().")");
|
||||
return www_listImages();
|
||||
} else {
|
||||
|
|
@ -86,8 +89,10 @@ sub www_deleteImage {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_deleteImageConfirm {
|
||||
my ($image);
|
||||
if (WebGUI::Privilege::isInGroup(4)) {
|
||||
WebGUI::Attachment::deleteSubmission("images",$session{form}{iid});
|
||||
$image = WebGUI::Attachment->new("","images",$session{form}{iid});
|
||||
$image->deleteNode;
|
||||
WebGUI::SQL->write("delete from images where imageId=$session{form}{iid}");
|
||||
return www_listImages();
|
||||
} else {
|
||||
|
|
@ -98,7 +103,6 @@ sub www_deleteImageConfirm {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_deleteImageFile {
|
||||
if (WebGUI::Privilege::isInGroup(4)) {
|
||||
WebGUI::Attachment::deleteSubmission("images",$session{form}{iid});
|
||||
WebGUI::SQL->write("update images set filename='' where imageId=$session{form}{iid}");
|
||||
return www_editImage();
|
||||
} else {
|
||||
|
|
@ -108,10 +112,11 @@ sub www_deleteImageFile {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_editImage {
|
||||
my ($output, %data);
|
||||
my ($output, %data, $image);
|
||||
tie %data, 'Tie::CPHash';
|
||||
if (WebGUI::Privilege::isInGroup(4)) {
|
||||
%data = WebGUI::SQL->quickHash("select * from images where imageId=$session{form}{iid}");
|
||||
$image = WebGUI::Attachment->new($data{filename},"images",$data{imageId});
|
||||
$output = helpLink(20);
|
||||
$output .= '<h1>'.WebGUI::International::get(382).'</h1>';
|
||||
$output .= formHeader();
|
||||
|
|
@ -135,9 +140,7 @@ sub www_editImage {
|
|||
$output .= formSave();
|
||||
$output .= '</table></form>';
|
||||
if ($data{filename} ne "") {
|
||||
$output .= '<p>'.WebGUI::International::get(390).'<p><img src="'.
|
||||
$session{setting}{attachmentDirectoryWeb}.'/images/'.$session{form}{iid}.
|
||||
'/'.$data{filename}.'">';
|
||||
$output .= '<p>'.WebGUI::International::get(390).'<p><img src="'.$image->getURL.'">';
|
||||
}
|
||||
return $output;
|
||||
} else {
|
||||
|
|
@ -147,15 +150,17 @@ sub www_editImage {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_editImageSave {
|
||||
my ($file);
|
||||
my ($file, $sqlAdd);
|
||||
if (WebGUI::Privilege::isInGroup(4)) {
|
||||
$file = WebGUI::Attachment::save("filename","images",$session{form}{iid});
|
||||
if ($file ne "") {
|
||||
$file = ", filename=".quote($file);
|
||||
$file = WebGUI::Attachment->new("","images",$session{form}{iid});
|
||||
$file->save("filename");
|
||||
if ($file->getFilename) {
|
||||
$sqlAdd = ", filename=".quote($file->getFilename);
|
||||
}
|
||||
WebGUI::SQL->write("update images set name=".quote($session{form}{name}).
|
||||
$file.", parameters=".quote($session{form}{parameters}).", userId=$session{user}{userId}, ".
|
||||
" username=".quote($session{user}{username}).", dateUploaded=".time()." where imageId=$session{form}{iid}");
|
||||
$sqlAdd.", parameters=".quote($session{form}{parameters}).", userId=$session{user}{userId}, ".
|
||||
" username=".quote($session{user}{username}).
|
||||
", dateUploaded=".time()." where imageId=$session{form}{iid}");
|
||||
return www_listImages();
|
||||
} else {
|
||||
return WebGUI::Privilege::insufficient();
|
||||
|
|
@ -164,7 +169,7 @@ sub www_editImageSave {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_listImages {
|
||||
my ($output, $sth, %data, @row, $dataRows, $prevNextBar, $i, $search, $isAdmin);
|
||||
my ($output, $sth, %data, @row, $image, $p, $i, $search, $isAdmin);
|
||||
tie %data, 'Tie::CPHash';
|
||||
if (WebGUI::Privilege::isInGroup(4)) {
|
||||
$output = helpLink(26);
|
||||
|
|
@ -173,27 +178,30 @@ sub www_listImages {
|
|||
$output .= '<a href="'.WebGUI::URL::page('op=addImage').'">'.WebGUI::International::get(395).'</a>';
|
||||
$output .= '</td>'.formHeader().'<td align="right">';
|
||||
$output .= WebGUI::Form::hidden("op","listImages");
|
||||
$output .= WebGUI::Form::text("keyword",20,50);
|
||||
$output .= WebGUI::Form::text("keyword",20,50,$session{form}{keyword});
|
||||
$output .= WebGUI::Form::submit(WebGUI::International::get(170));
|
||||
$output .= '</td></form></tr></table><p>';
|
||||
if ($session{form}{keyword} ne "") {
|
||||
$search = " where (name like '%".$session{form}{keyword}.
|
||||
"%' or username like '%".$session{form}{keyword}.
|
||||
"%' or filename like '%".$session{form}{keyword}."%') ";
|
||||
}
|
||||
$isAdmin = WebGUI::Privilege::isInGroup(3);
|
||||
$sth = WebGUI::SQL->read("select * from images $search order by name");
|
||||
while (%data = $sth->hash) {
|
||||
$image = WebGUI::Attachment->new($data{filename},"images",$data{imageId});
|
||||
$row[$i] = '<tr class="tableData"><td>';
|
||||
if ($session{user}{userId} == $data{userId} || $isAdmin) {
|
||||
$row[$i] .= '<a href="'.WebGUI::URL::page('op=deleteImage&iid='.$data{imageId}).
|
||||
'"><img src="'.$session{setting}{lib}.'/delete.gif" border=0></a>';
|
||||
$row[$i] .= '<a href="'.WebGUI::URL::page('op=editImage&iid='.$data{imageId}).
|
||||
'"><img src="'.$session{setting}{lib}.'/edit.gif" border=0></a>';
|
||||
} else {
|
||||
$row[$i] .= '<a href="'.WebGUI::URL::page('op=viewImage&iid='.$data{imageId}).
|
||||
'"><img src="'.$session{setting}{lib}.'/view.gif" border=0></a>';
|
||||
}
|
||||
$row[$i] .= '<a href="'.WebGUI::URL::page('op=viewImage&iid='.$data{imageId}).
|
||||
'"><img src="'.$session{setting}{lib}.'/view.gif" border=0></a>';
|
||||
$row[$i] .= '</td>';
|
||||
$row[$i] .= '<td><a href="'.WebGUI::URL::page('op=viewImage&iid='.$data{imageId}).
|
||||
'"><img src="'.$image->getThumbnail.'" border="0"></a>';
|
||||
$row[$i] .= '<td>'.$data{name}.'</td>';
|
||||
$row[$i] .= '<td>'.$data{username}.'</td>';
|
||||
$row[$i] .= '<td>'.WebGUI::DateTime::epochToHuman($data{dateUploaded},"%M/%D/%y").'</td>';
|
||||
|
|
@ -201,11 +209,11 @@ sub www_listImages {
|
|||
$i++;
|
||||
}
|
||||
$sth->finish;
|
||||
($dataRows, $prevNextBar) = paginate(50,WebGUI::URL::page('op=listImages'),\@row);
|
||||
$p = WebGUI::Paginator->new(WebGUI::URL::page('op=listImages'),\@row);
|
||||
$output .= '<table border=1 cellpadding=5 cellspacing=0 align="center">';
|
||||
$output .= $dataRows;
|
||||
$output .= $p->getPage($session{form}{pn});
|
||||
$output .= '</table>';
|
||||
$output .= $prevNextBar;
|
||||
$output .= $p->getBarTraditional($session{form}{pn});
|
||||
return $output;
|
||||
} else {
|
||||
return WebGUI::Privilege::insufficient();
|
||||
|
|
@ -214,10 +222,11 @@ sub www_listImages {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_viewImage {
|
||||
my ($output, %data);
|
||||
my ($output, %data, $image);
|
||||
tie %data, 'Tie::CPHash';
|
||||
if (WebGUI::Privilege::isInGroup(4)) {
|
||||
%data = WebGUI::SQL->quickHash("select * from images where imageId=$session{form}{iid}");
|
||||
$image = WebGUI::Attachment->new($data{filename},"images",$data{imageId});
|
||||
$output .= '<h1>'.WebGUI::International::get(396).'</h1>';
|
||||
$output .= '<a href="'.WebGUI::URL::page('op=listImages').'">'.WebGUI::International::get(397).'</a>';
|
||||
$output .= '<table>';
|
||||
|
|
@ -229,8 +238,7 @@ sub www_viewImage {
|
|||
$output .= tableFormRow(WebGUI::International::get(388),
|
||||
WebGUI::DateTime::epochToHuman($data{dateUploaded},"%M/%D/%y"));
|
||||
$output .= '</table>';
|
||||
$output .= '<p><img src="'.$session{setting}{attachmentDirectoryWeb}.'/images/'.$session{form}{iid}.
|
||||
'/'.$data{filename}.'">';
|
||||
$output .= '<p><img src="'.$image->getURL.'">';
|
||||
return $output;
|
||||
} else {
|
||||
return WebGUI::Privilege::insufficient();
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ use Exporter;
|
|||
use strict;
|
||||
use Tie::IxHash;
|
||||
use WebGUI::International;
|
||||
use WebGUI::Paginator;
|
||||
use WebGUI::Privilege;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::Shortcut;
|
||||
|
|
@ -26,7 +27,7 @@ our @EXPORT = qw(&www_search);
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_search {
|
||||
my ($dataRows, $prevNextBar, $output, %page, @keyword, $pageId, $term, %result, $sth, @data, @row, $i);
|
||||
my ($p, $output, %page, @keyword, $pageId, $term, %result, $sth, @data, @row, $i);
|
||||
tie %result,'Tie::IxHash';
|
||||
$output = formHeader();
|
||||
$output .= WebGUI::Form::hidden("op","search");
|
||||
|
|
@ -69,10 +70,10 @@ sub www_search {
|
|||
}
|
||||
}
|
||||
if ($row[0] ne "") {
|
||||
($dataRows, $prevNextBar) = paginate(20,WebGUI::URL::page('op=search'),\@row);
|
||||
$p = WebGUI::Paginator->new(WebGUI::URL::page('op=search'),\@row,20);
|
||||
$output .= WebGUI::International::get(365).'<p><ol>';
|
||||
$output .= $dataRows;
|
||||
$output .= '</ol>'.$prevNextBar;
|
||||
$output .= $p->getPage($session{form}{pn});
|
||||
$output .= '</ol>'.$p->getBarTradiational($session{form}{pn});
|
||||
} else {
|
||||
$output .= WebGUI::International::get(366);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -111,10 +111,16 @@ sub www_editFileSettings {
|
|||
$output .= formHeader();
|
||||
$output .= WebGUI::Form::hidden("op","editFileSettingsSave");
|
||||
$output .= '<table>';
|
||||
$output .= tableFormRow(WebGUI::International::get(129),WebGUI::Form::text("lib",30,255,$session{setting}{lib}));
|
||||
$output .= tableFormRow(WebGUI::International::get(130),WebGUI::Form::text("maxAttachmentSize",30,11,$session{setting}{maxAttachmentSize}));
|
||||
$output .= tableFormRow(WebGUI::International::get(131),WebGUI::Form::text("attachmentDirectoryWeb",30,255,$session{setting}{attachmentDirectoryWeb}));
|
||||
$output .= tableFormRow(WebGUI::International::get(132),WebGUI::Form::text("attachmentDirectoryLocal",30,255,$session{setting}{attachmentDirectoryLocal}));
|
||||
$output .= tableFormRow(WebGUI::International::get(129),
|
||||
WebGUI::Form::text("lib",30,255,$session{setting}{lib}));
|
||||
$output .= tableFormRow(WebGUI::International::get(130),
|
||||
WebGUI::Form::text("maxAttachmentSize",30,11,$session{setting}{maxAttachmentSize}));
|
||||
$output .= tableFormRow(WebGUI::International::get(406),
|
||||
WebGUI::Form::text("thumbnailSize",30,3,$session{setting}{thumbnailSize}));
|
||||
$output .= tableFormRow(WebGUI::International::get(131),
|
||||
WebGUI::Form::text("attachmentDirectoryWeb",30,255,$session{setting}{attachmentDirectoryWeb}));
|
||||
$output .= tableFormRow(WebGUI::International::get(132),
|
||||
WebGUI::Form::text("attachmentDirectoryLocal",30,255,$session{setting}{attachmentDirectoryLocal}));
|
||||
$output .= formSave();
|
||||
$output .= '</table>';
|
||||
$output .= '</form> ';
|
||||
|
|
@ -128,9 +134,14 @@ sub www_editFileSettings {
|
|||
sub www_editFileSettingsSave {
|
||||
if (WebGUI::Privilege::isInGroup(3)) {
|
||||
WebGUI::SQL->write("update settings set value=".quote($session{form}{lib})." where name='lib'");
|
||||
WebGUI::SQL->write("update settings set value=".quote($session{form}{maxAttachmentSize})." where name='maxAttachmentSize'");
|
||||
WebGUI::SQL->write("update settings set value=".quote($session{form}{attachmentDirectoryWeb})." where name='attachmentDirectoryWeb'");
|
||||
WebGUI::SQL->write("update settings set value=".quote($session{form}{attachmentDirectoryLocal})." where name='attachmentDirectoryLocal'");
|
||||
WebGUI::SQL->write("update settings set value=".
|
||||
quote($session{form}{maxAttachmentSize})." where name='maxAttachmentSize'");
|
||||
WebGUI::SQL->write("update settings set value=".
|
||||
quote($session{form}{thumbnailSize})." where name='thumbnailSize'");
|
||||
WebGUI::SQL->write("update settings set value=".
|
||||
quote($session{form}{attachmentDirectoryWeb})." where name='attachmentDirectoryWeb'");
|
||||
WebGUI::SQL->write("update settings set value=".
|
||||
quote($session{form}{attachmentDirectoryLocal})." where name='attachmentDirectoryLocal'");
|
||||
return www_manageSettings();
|
||||
} else {
|
||||
return WebGUI::Privilege::adminOnly();
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ use strict;
|
|||
use Tie::CPHash;
|
||||
use WebGUI::Form;
|
||||
use WebGUI::International;
|
||||
use WebGUI::Paginator;
|
||||
use WebGUI::Privilege;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::Shortcut;
|
||||
|
|
@ -142,7 +143,7 @@ sub www_editStyleSave {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_listStyles {
|
||||
my ($output, $sth, @data, @row, $i, $prevNextBar, $dataRows);
|
||||
my ($output, $sth, @data, @row, $i, $p);
|
||||
if (WebGUI::Privilege::isInGroup(5)) {
|
||||
$output = helpLink(9);
|
||||
$output .= '<h1>'.WebGUI::International::get(157).'</h1>';
|
||||
|
|
@ -161,11 +162,11 @@ sub www_listStyles {
|
|||
$i++;
|
||||
}
|
||||
$sth->finish;
|
||||
($dataRows, $prevNextBar) = paginate(50,WebGUI::URL::page('op=listStyles'),\@row);
|
||||
$p = WebGUI::Paginator->new(WebGUI::URL::page('op=listStyles'),\@row);
|
||||
$output .= '<table border=1 cellpadding=5 cellspacing=0 align="center">';
|
||||
$output .= $dataRows;
|
||||
$output .= $p->getPage($session{form}{pn});
|
||||
$output .= '</table>';
|
||||
$output .= $prevNextBar;
|
||||
$output .= $p->getBarTraditional($session{form}{pn});
|
||||
return $output;
|
||||
} else {
|
||||
return WebGUI::Privilege::adminOnly();
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ use Tie::CPHash;
|
|||
use WebGUI::DateTime;
|
||||
use WebGUI::Form;
|
||||
use WebGUI::International;
|
||||
use WebGUI::Paginator;
|
||||
use WebGUI::Privilege;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::Shortcut;
|
||||
|
|
@ -67,7 +68,8 @@ sub www_addUser {
|
|||
sub www_addUserSave {
|
||||
my ($output, @groups, $uid, $gid, $encryptedPassword, $expireAfter);
|
||||
if (WebGUI::Privilege::isInGroup(3)) {
|
||||
($uid) = WebGUI::SQL->quickArray("select userId from users where username='$session{form}{username}'");
|
||||
($uid) = WebGUI::SQL->quickArray("select userId from users where username=".
|
||||
quote($session{form}{username}));
|
||||
unless ($uid) {
|
||||
$encryptedPassword = Digest::MD5::md5_base64($session{form}{identifier});
|
||||
$uid = getNextId("userId");
|
||||
|
|
@ -276,7 +278,8 @@ sub www_editUser {
|
|||
sub www_editUserSave {
|
||||
my ($error, $uid, $encryptedPassword, $passwordStatement);
|
||||
if (WebGUI::Privilege::isInGroup(3)) {
|
||||
($uid) = WebGUI::SQL->quickArray("select userId from users where username='$session{form}{username}'");
|
||||
($uid) = WebGUI::SQL->quickArray("select userId from users where username=".
|
||||
quote($session{form}{username}));
|
||||
if ($uid == $session{form}{uid} || $uid < 1) {
|
||||
if ($session{form}{identifier} ne "password") {
|
||||
$encryptedPassword = Digest::MD5::md5_base64($session{form}{identifier});
|
||||
|
|
@ -311,7 +314,7 @@ sub www_editUserGroupSave {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_listUsers {
|
||||
my ($output, $sth, @data, @row, $dataRows, $prevNextBar, $i, $search);
|
||||
my ($output, $sth, @data, @row, $p, $i, $search);
|
||||
if (WebGUI::Privilege::isInGroup(3)) {
|
||||
$output = helpLink(8);
|
||||
$output .= '<h1>'.WebGUI::International::get(149).'</h1>';
|
||||
|
|
@ -342,11 +345,11 @@ sub www_listUsers {
|
|||
$i++;
|
||||
}
|
||||
$sth->finish;
|
||||
($dataRows, $prevNextBar) = paginate(50,WebGUI::URL::page('op=listUsers'),\@row);
|
||||
$p = WebGUI::Paginator->new(WebGUI::URL::page('op=listUsers'),\@row);
|
||||
$output .= '<table border=1 cellpadding=5 cellspacing=0 align="center">';
|
||||
$output .= $dataRows;
|
||||
$output .= $p->getPage($session{form}{pn});
|
||||
$output .= '</table>';
|
||||
$output .= $prevNextBar;
|
||||
$output .= $p->getBarTraditional($session{form}{pn});
|
||||
return $output;
|
||||
} else {
|
||||
return WebGUI::Privilege::adminOnly();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue