Update of /cvsroot/phpslash/phpslash-ft/class
In directory usw-pr-cvs1:/tmp/cvs-serv19295/phpslash-ft/class
Modified Files:
functions.inc Author.class
Log Message:
author admin method cleanup
Index: functions.inc
===================================================================
RCS file: /cvsroot/phpslash/phpslash-ft/class/functions.inc,v
retrieving revision 1.105
retrieving revision 1.106
diff -C2 -d -r1.105 -r1.106
*** functions.inc 1 Jun 2002 15:05:39 -0000 1.105
--- functions.inc 3 Jun 2002 18:04:54 -0000 1.106
***************
*** 4,17 ****
/***************************************************************************
! function : error -> Outputs a template with $msg
Parameters : $msg -> The message you want to return to someone
****************************************************************************/
! function error ($msg) {
! echo message( $msg, "error");
}
/***************************************************************************
! function : message -> Outputs a template with $msg
Parameters : $msg -> The message you want to return to someone
$tpl -> template to use ( "$tpl + ".tpl")
--- 4,17 ----
/***************************************************************************
! function : getError -> returns a template with $msg
Parameters : $msg -> The message you want to return to someone
****************************************************************************/
! function getError ($msg) {
! getMessage( $msg, "error");
}
/***************************************************************************
! function : getMessage -> return a template with $msg
Parameters : $msg -> The message you want to return to someone
$tpl -> template to use ( "$tpl + ".tpl")
***************
*** 19,23 ****
! function message($msg, $tpl="") {
global $_PSL;
--- 19,23 ----
! function getMessage($msg, $tpl="") {
global $_PSL;
***************
*** 46,49 ****
--- 46,71 ----
/***************************************************************************
+ function : error -> Outputs a template with $msg
+ Parameters : $msg -> The message you want to return to someone
+ ****************************************************************************/
+ function error ($msg) {
+
+ echo getMessage( $msg, "error");
+ }
+
+ /***************************************************************************
+ function : message -> Outputs a template with $msg
+ Parameters : $msg -> The message you want to return to someone
+ $tpl -> template to use ( "$tpl + ".tpl")
+ ****************************************************************************/
+
+
+ function message($msg, $tpl="") {
+
+ return getMessage( $msg, $tpl);
+ }
+
+
+ /***************************************************************************
function : arg_separator -> call this function to get the current arg
separator default & and make it RFC1866
***************
*** 842,846 ****
$string = htmlentities($pslstrings[$string]);
} elseif (($_PSL['debug']) AND ($pslstrings)) {
! $string = message( $string, "messageStrike");
}
return $string;
--- 864,868 ----
$string = htmlentities($pslstrings[$string]);
} elseif (($_PSL['debug']) AND ($pslstrings)) {
! $string = getMessage( $string, "messageStrike");
}
return $string;
Index: Author.class
===================================================================
RCS file: /cvsroot/phpslash/phpslash-ft/class/Author.class,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** Author.class 1 Jun 2002 15:05:39 -0000 1.25
--- Author.class 3 Jun 2002 18:04:55 -0000 1.26
***************
*** 72,77 ****
$this->db->query($q);
- titlebar("100%","Existing Authors");
-
$this->author_templ->set_block("listauthor","row","rows");
$this->author_templ->set_block("listauthor","row2","rows2");
--- 72,75 ----
***************
*** 84,87 ****
--- 82,86 ----
$this->author_templ->set_var(array(
+ 'TITLEBAR' => getTitlebar("100%","Existing Authors"),
'ACTION_URL' => $this->psl['phpself'],
'AUTHOR_ID' => $author_id,
***************
*** 102,107 ****
$count++;
};
! $this->author_templ->parse('OUT',array("listauthor"));
! $this->author_templ->p('OUT');
}
--- 101,107 ----
$count++;
};
!
! return $this->author_templ->parse('OUT',array("listauthor"));
! // $this->author_templ->p('OUT');
}
***************
*** 407,412 ****
function newAuthor() {
- titlebar("100%","Add a new Author");
-
$this->author_templ->set_block("newauthor","perm_row","perm_rows");
$this->author_templ->set_block("newauthor","permhave_row","permhave_rows");
--- 407,410 ----
***************
*** 426,429 ****
--- 424,428 ----
$this->author_templ->set_var(array(
+ 'TITLEBAR' => getTitlebar("100%","Add a new Author"),
'ACTION_URL' => $this->psl['phpself'],
'AUTHOR_ID' => "",
***************
*** 439,444 ****
$this->author_templ = displayoptions('author', $this->author_templ, "newauthor", '');
! $this->author_templ->parse('OUT',array("newauthor"));
! $this->author_templ->p('OUT');
}
--- 438,443 ----
$this->author_templ = displayoptions('author', $this->author_templ, "newauthor", '');
! return $this->author_templ->parse('OUT',array("newauthor"));
! // $this->author_templ->p('OUT');
}
***************
*** 471,476 ****
}
- titlebar("100%","Update Author ($id)");
-
$q = "SELECT *
FROM psl_author
--- 470,473 ----
***************
*** 489,492 ****
--- 486,490 ----
$this->author_templ->set_var(array(
+ 'TITLEBAR' => getTitlebar("100%","Update Author ($id)"),
'ACTION_URL' => $this->psl['phpself'],
'AUTHOR_ID' => $author_id,
***************
*** 525,536 ****
if($i == 0) {
- //debug("this->db->Record[perms]", $this->db->Record['perms']);
- //$tauthor_perms = explode(',',$this->db->Record['perms'] );
- debug ("tauthor_perms", $tauthor_perms);
while(list($k, $v) = each($tauthor_perms)) {
$author_perms[$v] = true;
}
}
! debug ("author_perms", $author_perms);
while(list($k, $v) = each($allperms_ary)) {
if(is_array($v)) {
--- 523,531 ----
if($i == 0) {
while(list($k, $v) = each($tauthor_perms)) {
$author_perms[$v] = true;
}
}
!
while(list($k, $v) = each($allperms_ary)) {
if(is_array($v)) {
***************
*** 556,561 ****
$this->author_templ = displayoptions('author', $this->author_templ, $template, $temparray);
! $this->author_templ->parse('OUT',$template);
! $this->author_templ->p('OUT');
}
--- 551,556 ----
$this->author_templ = displayoptions('author', $this->author_templ, $template, $temparray);
! return $this->author_templ->parse('OUT',$template);
! // $this->author_templ->p('OUT');
}
|