phpslash-commit Mailing List for phpSlash (Page 83)
Brought to you by:
joestewart,
nhruby
You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(11) |
Nov
(59) |
Dec
(60) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(52) |
Feb
(77) |
Mar
(118) |
Apr
(76) |
May
(106) |
Jun
(145) |
Jul
(9) |
Aug
(15) |
Sep
(78) |
Oct
(83) |
Nov
(105) |
Dec
(51) |
2003 |
Jan
(105) |
Feb
(100) |
Mar
(111) |
Apr
(149) |
May
(95) |
Jun
(56) |
Jul
(8) |
Aug
(2) |
Sep
|
Oct
(22) |
Nov
(117) |
Dec
(6) |
2004 |
Jan
(1) |
Feb
|
Mar
(3) |
Apr
(25) |
May
|
Jun
(11) |
Jul
(26) |
Aug
(85) |
Sep
(119) |
Oct
(312) |
Nov
(271) |
Dec
(5) |
2005 |
Jan
(6) |
Feb
|
Mar
|
Apr
(12) |
May
(7) |
Jun
(8) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2009 |
Jan
(5) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Joe S. <joe...@us...> - 2002-06-18 16:39:55
|
Update of /cvsroot/phpslash/phpslash-ft/public_html/admin In directory usw-pr-cvs1:/tmp/cvs-serv18948/phpslash-ft/public_html/admin Modified Files: pollAdmin.php3 Log Message: left out of previous commit to polls Index: pollAdmin.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/admin/pollAdmin.php3,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** pollAdmin.php3 16 Apr 2002 15:16:27 -0000 1.8 --- pollAdmin.php3 18 Jun 2002 16:39:52 -0000 1.9 *************** *** 13,67 **** *****************************/ ! $auth->login_if(!$perm->have_perm('poll')); /* DEBUG STUFF */ ! debug("HTTP_POST_VARS" , $HTTP_POST_VARS); ! debug("HTTP_GET_VARS" , $HTTP_GET_VARS); /* END DEBUG STUFF */ $poll = new Poll; ! if ($perm->have_perm("poll")) { ! ! slashhead($pagetitle,$xsiteobject); ! switch ($submit) { case "edit": ! $poll->editPoll($question_id); break; case "new": ! $poll->newPoll(); break; case "save": ! if ($poll->savePoll($HTTP_POST_VARS)) { ! echo "<center>"; ! fancybox(210, $_PSL['site_name'] ."Poll", $poll->getPollBooth($HTTP_POST_VARS['question_id']), "r"); ! echo "</center>"; ! } else { ! error($poll->message); } break; case "delete": ! titlebar ("100%", "Deleting poll"); if($poll->deletePoll($question_id)) { ! message($poll->message); } else { ! error($poll->message); } case "makecurrent": if(!$poll->makeCurrent($question_id)) { ! error($poll->message); } default: ! $poll->listPolls($min); ! } ! } else { // no permissions! ! titlebar("100%","Error! Invalid Privileges"); ! echo "Sorry. You do not have the necessary privilege to view this page."; } ! slashfoot(); page_close(); ?> --- 13,125 ---- *****************************/ ! $auth->login_if(!$perm->have_perm('pollList')); /* DEBUG STUFF */ ! // debug("HTTP_POST_VARS" , $HTTP_POST_VARS); ! // debug("HTTP_GET_VARS" , $HTTP_GET_VARS); /* END DEBUG STUFF */ $poll = new Poll; ! $content = ''; ! switch ($submit) { case "edit": ! if ($perm->have_perm("pollEdit")) { ! $content .= $poll->editPoll($question_id); ! } break; case "new": ! if ($perm->have_perm("pollNew")) { ! $content .= $poll->newPoll(); ! } break; case "save": ! if ($perm->have_perm("pollPut")) { ! if ($poll->savePoll($HTTP_POST_VARS)) { ! $content .= "<center>"; ! $content .= getFancybox(210, $_PSL['site_name'] ."Poll", $poll->getPollBooth($HTTP_POST_VARS['question_id']), "r"); ! $content .= "</center>"; ! } else { ! $content .= getError($poll->message); ! } } break; case "delete": ! $content .= getTitlebar ("100%", "Deleting poll"); if($poll->deletePoll($question_id)) { ! $content .= getMessage($poll->message); } else { ! $content .= getError($poll->message); } case "makecurrent": if(!$poll->makeCurrent($question_id)) { ! $content .= getError($poll->message); } default: ! if ($perm->have_perm("pollList")) { ! $content .= $poll->listPolls($min); ! } ! } ! ! if($content == '') { ! $content = getTitlebar("100%","Error! Invalid Privileges"); ! $content .= "Sorry. You do not have the necessary privilege to view this page."; ! } ! $block = new Block_i; ! $ary['section'] = "Admin"; ! ! $breadcrumb = breadcrumb($ary); ! ! $_PSL['metatags']['object'] = $xsiteobject; ! ! slashhead($pagetitle,$_PSL['metatags']); ! ! $leftblocks = $block->getBlocks($ary, "left"); ! $centerblocks = $block->getBlocks($ary, "center"); ! $rightblocks = $block->getBlocks($ary, "right"); ! ! if (empty($leftblocks)) { ! if (empty($rightblocks)) { ! // $centerblocks = $block->getBlocks($ary); ! $tplfile = "index1col.tpl"; ! } else { ! $tplfile = 'index2colright.tpl'; ! } ! } elseif (empty($rightblocks)) { ! $tplfile = 'index2colleft.tpl'; ! } else { ! $tplfile = 'index3col.tpl'; } ! $template = new Template($_PSL['templatedir']); ! $template->debug = 0; ! $template->set_file(array( ! 'index' => $tplfile //"index3col.tpl" ! )); + if( !empty($GLOBALS['QUERY_STRING'])) { + $QUERY_STRING = '?'.$GLOBALS['QUERY_STRING']; + } else { + $QUERY_STRING = ''; + } + + $template->set_var(array( + 'QUERYSTRING' => $QUERY_STRING, + 'ROOTDIR' => $_PSL['rooturl'], + 'IMAGEDIR' => $_PSL['imageurl'], + 'BREADCRUMB' => $breadcrumb, + 'STORY_COLUMN' => $content, + 'LEFT_BLOCK_COLUMN' => $leftblocks, + 'CENTER_BLOCK_COLUMN' => $centerblocks, + 'RIGHT_BLOCK_COLUMN' => $rightblocks + )); + + $template->parse('OUT','index'); + $template->p('OUT'); + + slashfoot(); page_close(); + ?> |
From: Joe S. <joe...@us...> - 2002-06-18 16:39:54
|
Update of /cvsroot/phpslash/phpslash-ft In directory usw-pr-cvs1:/tmp/cvs-serv18948/phpslash-ft Modified Files: CHANGES Log Message: left out of previous commit to polls Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/CHANGES,v retrieving revision 1.524 retrieving revision 1.525 diff -C2 -d -r1.524 -r1.525 *** CHANGES 18 Jun 2002 16:35:07 -0000 1.524 --- CHANGES 18 Jun 2002 16:39:51 -0000 1.525 *************** *** 13,17 **** 9 - Removal of something (kill -9 :) ! 2002-June-17 11:30PM CDT Joe Stewart <joe...@us...> [WTD] - Glossary.class, glossary.php3, glossaryAdmin.php3, phpslash.sgml - glossary methods return message and status to caller. --- 13,20 ---- 9 - Removal of something (kill -9 :) ! 2002-June-18 11:30AM CDT Joe Stewart <joe...@us...> ! [W] - pollAdmin.php3 - left out of previous commit to polls. ! ! 2002-June-18 11:30PM CDT Joe Stewart <joe...@us...> [WTD] - Glossary.class, glossary.php3, glossaryAdmin.php3, phpslash.sgml - glossary methods return message and status to caller. |
From: Joe S. <joe...@us...> - 2002-06-18 16:36:07
|
Update of /cvsroot/phpslash/phpslash-ft/public_html/templates/en/default In directory usw-pr-cvs1:/tmp/cvs-serv17025/default Modified Files: glossaryList.tpl glossaryNew.tpl glossarySearch.tpl Log Message: glossary method returns Index: glossaryList.tpl =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/templates/en/default/glossaryList.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** glossaryList.tpl 27 Oct 2000 20:20:11 -0000 1.1 --- glossaryList.tpl 18 Jun 2002 16:36:04 -0000 1.2 *************** *** 1,3 **** --- 1,4 ---- <!-- glossaryList.tpl --> + {TITLEBAR} <FORM ACTION="{ACTION_URL}" METHOD=POST> <INPUT TYPE=SUBMIT NAME="submit" VALUE="update"> Index: glossaryNew.tpl =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/templates/en/default/glossaryNew.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** glossaryNew.tpl 27 Oct 2000 20:20:11 -0000 1.1 --- glossaryNew.tpl 18 Jun 2002 16:36:04 -0000 1.2 *************** *** 1,3 **** --- 1,4 ---- <!-- glossaryNew.tpl --> + {TITLEBAR} <FORM ACTION="{ACTION_URL}" METHOD=POST> <TABLE BORDER=0> Index: glossarySearch.tpl =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/templates/en/default/glossarySearch.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** glossarySearch.tpl 10 Dec 2001 21:45:37 -0000 1.2 --- glossarySearch.tpl 18 Jun 2002 16:36:04 -0000 1.3 *************** *** 1,3 **** --- 1,4 ---- <!-- glossarySearch.tpl BEGIN --> + {TITLEBAR} <p> <b><a href="{ACTION_URL}">The Full Glossary</a></b> |
From: Joe S. <joe...@us...> - 2002-06-18 16:36:07
|
Update of /cvsroot/phpslash/phpslash-ft/public_html/templates/en/basic In directory usw-pr-cvs1:/tmp/cvs-serv17025/basic Modified Files: glossaryNew.tpl glossaryList.tpl glossarySearch.tpl Log Message: glossary method returns Index: glossaryNew.tpl =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/templates/en/basic/glossaryNew.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** glossaryNew.tpl 9 Apr 2002 16:57:06 -0000 1.2 --- glossaryNew.tpl 18 Jun 2002 16:36:04 -0000 1.3 *************** *** 1,3 **** --- 1,4 ---- <!-- start glossaryNew.tpl --> + {TITLEBAR} <div id="glossaryNew"> <form action="{ACTION_URL}" method="post"> *************** *** 13,17 **** <tr> <td> </td> ! <td><input type="submit" name="submit" value="row" /></td> </tr> </table> --- 14,18 ---- <tr> <td> </td> ! <td><input type="submit" name="submit" value="new" /></td> </tr> </table> Index: glossaryList.tpl =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/templates/en/basic/glossaryList.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** glossaryList.tpl 9 Apr 2002 16:57:06 -0000 1.2 --- glossaryList.tpl 18 Jun 2002 16:36:04 -0000 1.3 *************** *** 1,3 **** --- 1,4 ---- <!-- start glossaryList.tpl --> + {TITLEBAR} <div id="glossaryList"> <form action="{ACTION_URL}" method="post"> Index: glossarySearch.tpl =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/templates/en/basic/glossarySearch.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** glossarySearch.tpl 9 Apr 2002 16:57:06 -0000 1.2 --- glossarySearch.tpl 18 Jun 2002 16:36:04 -0000 1.3 *************** *** 1,3 **** --- 1,4 ---- <!-- Start glossarySearch.tpl --> + {TITLEBAR} <div id="glossarySearch"> <p class="viewGlossary"><a href="{ACTION_URL}">The Full Glossary</a></p> |
From: Joe S. <joe...@us...> - 2002-06-18 16:35:10
|
Update of /cvsroot/phpslash/phpslash-ft/class In directory usw-pr-cvs1:/tmp/cvs-serv16540/phpslash-ft/class Modified Files: Glossary.class Log Message: glossary method returns Index: Glossary.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Glossary.class,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Glossary.class 3 Feb 2002 02:49:39 -0000 1.7 --- Glossary.class 18 Jun 2002 16:35:07 -0000 1.8 *************** *** 11,15 **** */ class Glossary { ! var $templ,$db, $psl; /* --- 11,15 ---- */ class Glossary { ! var $templ,$db, $psl, $message; /* *************** *** 22,25 **** --- 22,26 ---- $this->db = new slashDB; $this->psl = $_PSL; + $this->message = ''; /* Templates */ *************** *** 39,43 **** /* ! * Just prints the form with the list of existing glossarys * Used only by admin */ --- 40,44 ---- /* ! * Just prints the form with the list of existing glossaries * Used only by admin */ *************** *** 49,53 **** $this->db->query($q); ! titlebar("100%","Glossary Edit"); $this->templ->set_block("listglossary","row","rows"); --- 50,54 ---- $this->db->query($q); ! $this->templ->set_var('TITLEBAR',getTitlebar("100%","Glossary Edit")); $this->templ->set_block("listglossary","row","rows"); *************** *** 62,67 **** $this->templ->parse("rows","row",true); }; ! $this->templ->parse('OUT',array("listglossary")); ! $this->templ->p('OUT'); } --- 63,68 ---- $this->templ->parse("rows","row",true); }; ! return $this->templ->parse('OUT',array("listglossary")); ! // $this->templ->p('OUT'); } *************** *** 71,75 **** * Optional fields: * ! * Returns true if sucessful (glossary added or updated), false on error * Used only by admin */ --- 72,76 ---- * Optional fields: * ! * Returns true if successful (glossary added or updated), false on error * Used only by admin */ *************** *** 83,91 **** /* We don't test for id because no id means, that this is a new term. */ if ($ary['term'] == "") { ! error("There is no term in Glossary.class::saveGlossary"); return false; } if ($ary['def'] == "") { ! error("There is no def in Glossary.class::saveGlossary"); return false; } --- 84,92 ---- /* We don't test for id because no id means, that this is a new term. */ if ($ary['term'] == "") { ! $this->message = "There is no term in Glossary.class::saveGlossary"; return false; } if ($ary['def'] == "") { ! $this->message = "There is no def in Glossary.class::saveGlossary"; return false; } *************** *** 102,106 **** if ($this->db->next_record()) { ! echo "updating RECORD: " . $ary[id] . "<BR><BR>"; $q = "UPDATE psl_glossary --- 103,107 ---- if ($this->db->next_record()) { ! $this->message = "updating RECORD: " . $ary[id] . "<BR><BR>"; $q = "UPDATE psl_glossary *************** *** 119,122 **** --- 120,124 ---- '$ary[term]', '$ary[def]')"; + $this->message = "Glossary entry created"; } *************** *** 146,157 **** function newGlossary() { - titlebar("100%",pslgetText("Add a new Term")); - $this->templ->set_var(array( 'ACTION_URL' => $this->psl['phpself'] )); ! $this->templ->parse('OUT',array("newglossary")); ! $this->templ->p('OUT'); } --- 148,158 ---- function newGlossary() { $this->templ->set_var(array( + 'TITLEBAR' => getTitlebar("100%",pslgetText("Add a new Term")), 'ACTION_URL' => $this->psl['phpself'] )); ! return $this->templ->parse('OUT',array("newglossary")); ! // $this->templ->p('OUT'); } *************** *** 159,166 **** function searchGlossary($search) { - titlebar("100%",pslgetText("Glossary")); - $this->templ->set_var(array( ! 'ACTION_URL' => $this->psl[phpself] )); --- 160,166 ---- function searchGlossary($search) { $this->templ->set_var(array( ! 'TITLEBAR' => getTitlebar("100%",pslgetText("Glossary")), ! 'ACTION_URL' => $this->psl[phpself] )); *************** *** 200,205 **** ++$i; } ! $this->templ->parse('OUT',array("searchglossary")); ! $this->templ->p('OUT'); } --- 200,205 ---- ++$i; } ! return $this->templ->parse('OUT',array("searchglossary")); ! // $this->templ->p('OUT'); } |
From: Joe S. <joe...@us...> - 2002-06-18 16:35:10
|
Update of /cvsroot/phpslash/phpslash-ft/public_html/admin In directory usw-pr-cvs1:/tmp/cvs-serv16540/phpslash-ft/public_html/admin Modified Files: glossaryAdmin.php3 Log Message: glossary method returns Index: glossaryAdmin.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/admin/glossaryAdmin.php3,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** glossaryAdmin.php3 1 Feb 2002 04:23:52 -0000 1.2 --- glossaryAdmin.php3 18 Jun 2002 16:35:07 -0000 1.3 *************** *** 13,26 **** *****************************/ ! slashhead($pagetitle,$xsiteobject); /* DEBUG */ ! debug("HTTP_POST_VARS", $HTTP_POST_VARS); ! debug("HTTP_GET_VARS", $HTTP_GET_VARS); ! debug("glossary_ary", $glossary_ary); ! debug("glossary_id", $glossary_id); ! debug("glossary_term", $glossary_term); ! debug("glossary_def", $glossary_def); /* DEBUG */ --- 13,26 ---- *****************************/ ! $auth->login_if(!$perm->have_perm('glossaryList')); /* DEBUG */ ! // debug("HTTP_POST_VARS", $HTTP_POST_VARS); ! // debug("HTTP_GET_VARS", $HTTP_GET_VARS); ! // debug("glossary_ary", $glossary_ary); ! // debug("glossary_id", $glossary_id); ! // debug("glossary_term", $glossary_term); ! // debug("glossary_def", $glossary_def); /* DEBUG */ *************** *** 28,75 **** $glossary = new Glossary; ! if ($perm->have_perm("glossary")) { switch ($submit) { case "delete": ! while(list($key, $val) = each($glossary_ary)) { ! $glossary->deleteGlossary($glossary_ary[$key]); ! }; ! $glossary->newGlossary(); ! $glossary->listGlossary(); break; case "new": ! $glossary->saveGlossary($HTTP_POST_VARS); ! $glossary->newGlossary(); ! $glossary->listGlossary(); break; case "update": reset ($glossary_id); ! while(list($key, $val) = each($glossary_id)) { ! $ary["id"] = $glossary_id[$key]; ! $ary["term"] = $glossary_term[$key]; ! $ary["def"] = $glossary_def[$key]; ! if ($glossary->saveGlossary($ary)) { ! echo "<em>$glossary_term[$key]</em> has been updated<BR>\n"; ! } else { ! echo "<em>$glossary_term[$key]</em> has <strong>not</strong> been updated<BR>\n"; ! } ! } ! $glossary->newGlossary(); ! $glossary->listGlossary(); break; default: ! $glossary->newGlossary(); ! $glossary->listGlossary(); } } else { ! $glossary->searchGlossary($search); } slashfoot(); page_close(); ?> --- 28,136 ---- $glossary = new Glossary; ! $content = ''; ! ! if ($perm->have_perm("glossaryList")) { switch ($submit) { case "delete": ! if ($perm->have_perm("glossaryDelete")) { ! while(list($key, $val) = each($glossary_ary)) { ! $glossary->deleteGlossary($glossary_ary[$key]); ! } ! } break; case "new": ! if ($perm->have_perm("glossarySave")) { ! $glossary->saveGlossary($HTTP_POST_VARS); ! } break; case "update": reset ($glossary_id); ! if ($perm->have_perm("glossarySave")) { ! while(list($key, $val) = each($glossary_id)) { ! $ary["id"] = $glossary_id[$key]; ! $ary["term"] = $glossary_term[$key]; ! $ary["def"] = $glossary_def[$key]; ! if ($glossary->saveGlossary($ary)) { ! $content .= "<em>$glossary_term[$key]</em> has been updated<BR>\n"; ! } else { ! $content .= "<em>$glossary_term[$key]</em> has <strong>not</strong> been updated<BR>\n"; ! } ! } ! } break; default: ! break; ! } ! if ($perm->have_perm("glossaryNew")) { ! $content .= $glossary->newGlossary(); ! } ! if ($perm->have_perm("glossaryList")) { ! $content .= $glossary->listGlossary(); } } else { ! $content .= $glossary->searchGlossary($search); } + + $block = new Block_i; + $ary['section'] = "Admin"; + + $breadcrumb = breadcrumb($ary); + + $_PSL['metatags']['object'] = $xsiteobject; + + slashhead($pagetitle,$_PSL['metatags']); + + $leftblocks = $block->getBlocks($ary, "left"); + $centerblocks = $block->getBlocks($ary, "center"); + $rightblocks = $block->getBlocks($ary, "right"); + + if (empty($leftblocks)) { + if (empty($rightblocks)) { + // $centerblocks = $block->getBlocks($ary); + $tplfile = "index1col.tpl"; + } else { + $tplfile = 'index2colright.tpl'; + } + } elseif (empty($rightblocks)) { + $tplfile = 'index2colleft.tpl'; + } else { + $tplfile = 'index3col.tpl'; + } + + $template = new Template($_PSL['templatedir']); + $template->debug = 0; + $template->set_file(array( + 'index' => $tplfile //"index3col.tpl" + )); + + if( !empty($GLOBALS['QUERY_STRING'])) { + $QUERY_STRING = '?'.$GLOBALS['QUERY_STRING']; + } else { + $QUERY_STRING = ''; + } + + $template->set_var(array( + 'QUERYSTRING' => $QUERY_STRING, + 'ROOTDIR' => $_PSL['rooturl'], + 'IMAGEDIR' => $_PSL['imageurl'], + 'BREADCRUMB' => $breadcrumb, + 'STORY_COLUMN' => $content, + 'LEFT_BLOCK_COLUMN' => $leftblocks, + 'CENTER_BLOCK_COLUMN' => $centerblocks, + 'RIGHT_BLOCK_COLUMN' => $rightblocks + )); + + $template->parse('OUT','index'); + $template->p('OUT'); + slashfoot(); page_close(); + ?> |
From: Joe S. <joe...@us...> - 2002-06-18 16:35:10
|
Update of /cvsroot/phpslash/phpslash-ft/doc/html In directory usw-pr-cvs1:/tmp/cvs-serv16540/phpslash-ft/doc/html Modified Files: phpslash.sgml Log Message: glossary method returns Index: phpslash.sgml =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/doc/html/phpslash.sgml,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** phpslash.sgml 17 Jun 2002 20:30:39 -0000 1.43 --- phpslash.sgml 18 Jun 2002 16:35:07 -0000 1.44 *************** *** 776,779 **** --- 776,782 ---- emailNotifySubmission.tpl framedbox.tpl + glossaryList.tpl + glossaryNew.tpl + glossarySearch.tpl groupList.tpl groupNew.tpl |
From: Joe S. <joe...@us...> - 2002-06-18 16:35:10
|
Update of /cvsroot/phpslash/phpslash-ft/public_html In directory usw-pr-cvs1:/tmp/cvs-serv16540/phpslash-ft/public_html Modified Files: glossary.php3 Log Message: glossary method returns Index: glossary.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/glossary.php3,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** glossary.php3 6 Mar 2002 04:29:54 -0000 1.11 --- glossary.php3 18 Jun 2002 16:35:07 -0000 1.12 *************** *** 14,34 **** *****************************/ ! $_PSL['metatags']['object'] = $xsiteobject; ! ! slashhead($pagetitle,$_PSL['metatags']); /* DEBUG */ ! debug("HTTP_POST_VARS", $HTTP_POST_VARS); ! debug("HTTP_GET_VARS", $HTTP_GET_VARS); ! debug("glossary_ary", $glossary_ary); ! debug("glossary_id", $glossary_id); ! debug("glossary_term", $glossary_term); ! debug("glossary_def", $glossary_def); /* DEBUG */ $glossary = new Glossary; ! $glossary->searchGlossary($search); // TODO: USE HTTP_*VARS, not a registered global slashfoot(); --- 14,91 ---- *****************************/ ! if ((!$section) AND (!$section_id)){ ! $section = $_PSL['site_homesection']; ! if(!$section) { ! $section = "Home"; ! } ! $ary['section'] = $section; ! } else { ! $pagetitle .= " - $section"; ! } /* DEBUG */ ! // debug("HTTP_POST_VARS", $HTTP_POST_VARS); ! // debug("HTTP_GET_VARS", $HTTP_GET_VARS); ! // debug("glossary_ary", $glossary_ary); ! // debug("glossary_id", $glossary_id); ! // debug("glossary_term", $glossary_term); ! // debug("glossary_def", $glossary_def); /* DEBUG */ $glossary = new Glossary; ! $content = $glossary->searchGlossary($search); // TODO: USE HTTP_*VARS, not a registered global ! ! $block = new Block_i; ! ! $breadcrumb = breadcrumb($ary); ! ! $_PSL['metatags']['object'] = $xsiteobject; ! ! slashhead($pagetitle,$_PSL['metatags']); ! ! $leftblocks = $block->getBlocks($ary, "left"); ! $centerblocks = $block->getBlocks($ary, "center"); ! $rightblocks = $block->getBlocks($ary, "right"); ! ! if (empty($leftblocks)) { ! if (empty($rightblocks)) { ! // $centerblocks = $block->getBlocks($ary); ! $tplfile = "index1col.tpl"; ! } else { ! $tplfile = 'index2colright.tpl'; ! } ! } elseif (empty($rightblocks)) { ! $tplfile = 'index2colleft.tpl'; ! } else { ! $tplfile = 'index3col.tpl'; ! } ! ! $template = new Template($_PSL['templatedir']); ! $template->debug = 0; ! $template->set_file(array( ! 'index' => $tplfile //"index3col.tpl" ! )); ! ! if( !empty($GLOBALS['QUERY_STRING'])) { ! $QUERY_STRING = '?'.$GLOBALS['QUERY_STRING']; ! } else { ! $QUERY_STRING = ''; ! } ! ! $template->set_var(array( ! 'QUERYSTRING' => $QUERY_STRING, ! 'ROOTDIR' => $_PSL['rooturl'], ! 'IMAGEDIR' => $_PSL['imageurl'], ! 'BREADCRUMB' => $breadcrumb, ! 'STORY_COLUMN' => $content, ! 'LEFT_BLOCK_COLUMN' => $leftblocks, ! 'CENTER_BLOCK_COLUMN' => $centerblocks, ! 'RIGHT_BLOCK_COLUMN' => $rightblocks ! )); ! ! $template->parse('OUT','index'); ! $template->p('OUT'); slashfoot(); |
From: Joe S. <joe...@us...> - 2002-06-18 16:35:10
|
Update of /cvsroot/phpslash/phpslash-ft In directory usw-pr-cvs1:/tmp/cvs-serv16540/phpslash-ft Modified Files: CHANGES Log Message: glossary method returns Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/CHANGES,v retrieving revision 1.523 retrieving revision 1.524 diff -C2 -d -r1.523 -r1.524 *** CHANGES 18 Jun 2002 15:52:15 -0000 1.523 --- CHANGES 18 Jun 2002 16:35:07 -0000 1.524 *************** *** 13,16 **** --- 13,20 ---- 9 - Removal of something (kill -9 :) + 2002-June-17 11:30PM CDT Joe Stewart <joe...@us...> + [WTD] - Glossary.class, glossary.php3, glossaryAdmin.php3, phpslash.sgml - + glossary methods return message and status to caller. + 2002-June-18 10:30AM CDT Joe Stewart <joe...@us...> [W] - Comment.class, comment.php3, commentAdmin.php3 - comment methods |
From: Joe S. <joe...@us...> - 2002-06-18 15:52:49
|
Update of /cvsroot/phpslash/phpslash-ft/class In directory usw-pr-cvs1:/tmp/cvs-serv2518/phpslash-ft/class Modified Files: Comment.class Log Message: comment method returns Index: Comment.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Comment.class,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** Comment.class 13 May 2002 19:05:37 -0000 1.27 --- Comment.class 18 Jun 2002 15:52:16 -0000 1.28 *************** *** 641,644 **** --- 641,645 ---- if ($this->db->query($q)) { if ($this->incrementCommentCount($ary[story_id])) { + $this->message = "Comment saved"; return $comment_id; } else { *************** *** 683,688 **** --- 684,691 ---- return false; } + $this->message = "Comment updated"; } } // end 'fork in the road' if + return true; } // end update *************** *** 969,973 **** // Only continue if there's actual pending comments if($this->db->num_rows() != 0) { ! titlebar("100%", "Listing Pending Comments"); while($this->db->next_record()) { $ary['story_id'] = $story_id; --- 972,976 ---- // Only continue if there's actual pending comments if($this->db->num_rows() != 0) { ! $stuff = getTitlebar("100%", "Listing Pending Comments"); while($this->db->next_record()) { $ary['story_id'] = $story_id; *************** *** 978,1002 **** $ary['subject'] = $this->db->f("subject"); $ary['comment'] = $this->db->f("comment_text"); ! $stuff = $this->formatComment($ary); ! echo "$stuff"; } } else { ! titlebar("100%", "Sorry. No Pending Comments"); } } // end showPending /** - * Prints a "No Article Found" Error - * - * Lame function that will be depreciated VERY soon - * - * @param integer - */ - function NoArticleFound($Nosid) { - titlebar("100%", "I'm sorry, no Article Number $Nosid found."); - echo "Please use the <a href=\"" . $this->psl[rooturl] . "/search.php3\">Search</A> Page."; - } - - /** * Decrements the comment count for an id * --- 981,992 ---- $ary['subject'] = $this->db->f("subject"); $ary['comment'] = $this->db->f("comment_text"); ! $stuff .= $this->formatComment($ary); } } else { ! $stuff = getTitlebar("100%", "Sorry. No Pending Comments"); } } // end showPending /** * Decrements the comment count for an id * *************** *** 1085,1090 **** global $story_id,$comment_id,$parent_id; - titlebar("100%","Edit Comment"); - $this->db->query("SELECT name, email, --- 1075,1078 ---- *************** *** 1106,1116 **** $ary['comment_id'] = $comment_id; ! print $this->getForm($ary); } else { ! error("(commentEdit Function): you're trying to update a comment but I couldn't find it?"); } } } // end of Comment Class --- 1094,1116 ---- $ary['comment_id'] = $comment_id; ! return $this->getForm($ary); } else { ! $this->message = "(commentEdit Function): you're trying to update a comment but I couldn't find it?"; } } + + /** + * getMessage - returns message text + * + * simply returns the contents of the message variable + * + * @access public + */ + function getMessage() { + return pslgetText($this->message); + } + } // end of Comment Class |
From: Joe S. <joe...@us...> - 2002-06-18 15:52:49
|
Update of /cvsroot/phpslash/phpslash-ft In directory usw-pr-cvs1:/tmp/cvs-serv2518/phpslash-ft Modified Files: CHANGES Log Message: comment method returns Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/CHANGES,v retrieving revision 1.522 retrieving revision 1.523 diff -C2 -d -r1.522 -r1.523 *** CHANGES 17 Jun 2002 20:58:42 -0000 1.522 --- CHANGES 18 Jun 2002 15:52:15 -0000 1.523 *************** *** 13,16 **** --- 13,20 ---- 9 - Removal of something (kill -9 :) + 2002-June-18 10:30AM CDT Joe Stewart <joe...@us...> + [W] - Comment.class, comment.php3, commentAdmin.php3 - comment methods + return message and status to caller. + 2002-June-17 3:30PM CDT Joe Stewart <joe...@us...> [W] - Infolog.class, infologAdmin.php3 - infolog methods return message |
From: Joe S. <joe...@us...> - 2002-06-18 15:52:21
|
Update of /cvsroot/phpslash/phpslash-ft/public_html/admin In directory usw-pr-cvs1:/tmp/cvs-serv2518/phpslash-ft/public_html/admin Modified Files: commentAdmin.php3 Log Message: comment method returns Index: commentAdmin.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/admin/commentAdmin.php3,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** commentAdmin.php3 1 Feb 2002 04:23:52 -0000 1.8 --- commentAdmin.php3 18 Jun 2002 15:52:18 -0000 1.9 *************** *** 15,24 **** *****************************/ ! slashhead($pagetitle,$xsiteobject); /* DEBUG */ ! debug("HTTP_POST_VARS", $HTTP_POST_VARS); ! debug("HTTP_GET_VARS", $HTTP_GET_VARS); ! debug("BulkDelete Array", $HTTP_POST_VARS[bulkdel_ary]); /* END DEBUG */ --- 15,24 ---- *****************************/ ! $auth->login_if(!$perm->have_perm('comment')); /* DEBUG */ ! // debug("HTTP_POST_VARS", $HTTP_POST_VARS); ! // debug("HTTP_GET_VARS", $HTTP_GET_VARS); ! // debug("BulkDelete Array", $HTTP_POST_VARS[bulkdel_ary]); /* END DEBUG */ *************** *** 26,29 **** --- 26,31 ---- $cmt = new Comment; + $content .= ''; + if($perm->have_perm("comment")) { switch ($action) { *************** *** 31,72 **** case "delete": if ($cmt->delete($comment_id, $story_id)) { ! echo "The comment was deleted<br>\n"; } else { ! echo "There was an ERROR <em>deleting</em> the comment<br>\n"; ! }; break; case pslgetText("Show Pending"): ! $cmt->showPending($story_id); break; case pslgetText("Bulk Delete"): if (count($bulkdel_ary) == 0) { ! echo "You didn't select any items to delete!"; } else { for ($i = 0 ; $i < count($bulkdel_ary) ; $i++) { if ($cmt->delete($bulkdel_ary[$i], $story_id)) { ! echo "Comment #" . $bulkdel_ary[$i] . " has been deleted\n"; } else { ! echo "There was an ERROR <em>deleting</em> comment #" . $bulkdel_ary[$i] . "\n"; ! }; ! }; } break; case "markpend": ! titlebar("100%", "Mark Comment Pending"); if ($cmt->markPending($comment_id, $story_id)) { ! echo "Marked comment # $comment_id as pending<P>\n"; } else { ! echo "There was an ERROR <em>marking</em> comment # $comment_id as <em>pending</em>.<br>\n"; } break; case "unmarkpend": ! titlebar("100%","Unmark Pending Comment"); if ($cmt->unmarkPending($comment_id, $story_id)) { ! echo "Unmarked pending comment $comment_id<BR>\n"; } else { ! echo "There was an ERROR <em>unmarking</em> the comment as <em>pending</em>.<br>\n"; } break; --- 33,74 ---- case "delete": if ($cmt->delete($comment_id, $story_id)) { ! $content .= "The comment was deleted<br>\n"; } else { ! $content .= getError($cmt->getMessage()); ! } break; case pslgetText("Show Pending"): ! $content .= $cmt->showPending($story_id); break; case pslgetText("Bulk Delete"): if (count($bulkdel_ary) == 0) { ! $content .= "You didn't select any items to delete!"; } else { for ($i = 0 ; $i < count($bulkdel_ary) ; $i++) { if ($cmt->delete($bulkdel_ary[$i], $story_id)) { ! $content .= "Comment #" . $bulkdel_ary[$i] . " has been deleted\n"; } else { ! $content .= "There was an ERROR <em>deleting</em> comment #" . $bulkdel_ary[$i] . "\n"; ! } ! } } break; case "markpend": ! $content .= getTitlebar("100%", "Mark Comment Pending"); if ($cmt->markPending($comment_id, $story_id)) { ! $content .= getMessage("Marked comment # $comment_id as pending"); } else { ! $content .= getError("There was an ERROR <em>marking</em> comment # $comment_id as <em>pending</em>."); } break; case "unmarkpend": ! $content .= getTitlebar("100%","Unmark Pending Comment"); if ($cmt->unmarkPending($comment_id, $story_id)) { ! $content .= getMessage("Unmarked pending comment $comment_id"); } else { ! $content .= getError("There was an ERROR <em>unmarking</em> the comment as <em>pending</em>."); } break; *************** *** 74,80 **** case "reparentupone": if ($cmt->reparentUp($comment_id, $story_id)) { ! echo "The comment was moved up one level.<br>\n"; } else { ! echo "ERROR: $cmt->message<br>\n"; } break; --- 76,82 ---- case "reparentupone": if ($cmt->reparentUp($comment_id, $story_id)) { ! $content .= getMessage("The comment was moved up one level."); } else { ! $content .= getError($cmt->getMessage()); } break; *************** *** 82,104 **** case "reparentuptop": if ($cmt->reparentTop($comment_id, $story_id)) { ! echo "The comment was moved to the top.<br>\n"; } else { ! echo "ERROR: $cmt->message<br>\n"; } break; case "edit": ! $cmt->commentEdit($HTTP_POST_VARS); break; case "update": ! $cmt->update($HTTP_POST_VARS); ! $cmt->commentEdit(); ! break; default: ! titlebar("100%", "Error! No Action"); ! echo "This is how the Comment Administration works. You tell the ! \$action variable what you want to do, and then I go about doing it. You're getting this message because I didn't find an \$action variable that I could use. This is what \$action --- 84,120 ---- case "reparentuptop": if ($cmt->reparentTop($comment_id, $story_id)) { ! $content .= getMessage("The comment was moved to the top."); } else { ! $content .= getError($cmt->getMessage()); } break; case "edit": ! $content .= getTitlebar("100%","Edit Comment"); ! $returned = $cmt->commentEdit($HTTP_POST_VARS); ! if($returned) { ! $content .= $returned; ! } else { ! $content .= getError($cmst->getMessage()); ! } break; case "update": ! if($cmt->update($HTTP_POST_VARS)) { ! $content .= getMessage($cmt->getMessage()); ! } else { ! $content .= getError($cmt->getMessage()); ! } ! $returned = $cmt->commentEdit(); ! if($returned) { ! $content .= $returned; ! } else { ! $content .= getError($cmst->getMessage()); ! } ! break; default: ! $content .= getTitlebar("100%", "Error! No Action"); ! $content .= "This is how the Comment Administration works. You tell the \$action variable what you want to do, and then I go about doing it. You're getting this message because I didn't find an \$action variable that I could use. This is what \$action *************** *** 107,118 **** } else { ! titlebar("100%", "Error! Invalid Privileges"); ! echo "Sorry. You do not have the necessary privilege to view this page."; } ! slashfoot(); page_close(); ?> --- 123,186 ---- } else { + $content = getTitlebar("100%","Error! Invalid Privileges"); + $content .= "Sorry. You do not have the necessary privilege to view this page."; + } ! $block = new Block_i; ! $ary['section'] = "Admin"; ! ! $breadcrumb = breadcrumb($ary); ! ! $_PSL['metatags']['object'] = $xsiteobject; ! ! slashhead($pagetitle,$_PSL['metatags']); ! ! $leftblocks = $block->getBlocks($ary, "left"); ! $centerblocks = $block->getBlocks($ary, "center"); ! $rightblocks = $block->getBlocks($ary, "right"); + if (empty($leftblocks)) { + if (empty($rightblocks)) { + // $centerblocks = $block->getBlocks($ary); + $tplfile = "index1col.tpl"; + } else { + $tplfile = 'index2colright.tpl'; + } + } elseif (empty($rightblocks)) { + $tplfile = 'index2colleft.tpl'; + } else { + $tplfile = 'index3col.tpl'; } ! $template = new Template($_PSL['templatedir']); ! $template->debug = 0; ! $template->set_file(array( ! 'index' => $tplfile //"index3col.tpl" ! )); + if( !empty($GLOBALS['QUERY_STRING'])) { + $QUERY_STRING = '?'.$GLOBALS['QUERY_STRING']; + } else { + $QUERY_STRING = ''; + } + + $template->set_var(array( + 'QUERYSTRING' => $QUERY_STRING, + 'ROOTDIR' => $_PSL['rooturl'], + 'IMAGEDIR' => $_PSL['imageurl'], + 'BREADCRUMB' => $breadcrumb, + 'STORY_COLUMN' => $content, + 'LEFT_BLOCK_COLUMN' => $leftblocks, + 'CENTER_BLOCK_COLUMN' => $centerblocks, + 'RIGHT_BLOCK_COLUMN' => $rightblocks + )); + + $template->parse('OUT','index'); + $template->p('OUT'); + + slashfoot(); page_close(); + + + ?> |
From: Joe S. <joe...@us...> - 2002-06-18 15:52:21
|
Update of /cvsroot/phpslash/phpslash-ft/public_html In directory usw-pr-cvs1:/tmp/cvs-serv2518/phpslash-ft/public_html Modified Files: comment.php3 Log Message: comment method returns Index: comment.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/comment.php3,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** comment.php3 31 May 2002 19:30:28 -0000 1.13 --- comment.php3 18 Jun 2002 15:52:17 -0000 1.14 *************** *** 38,47 **** } $cmt = new Comment($cmtary); ! $_PSL['metatags']['object'] = $xsiteobject; ! ! slashhead($pagetitle,$_PSL['metatags']); switch($submit) { --- 38,54 ---- } + if ((!$section) AND (!$section_id)){ + $section = $_PSL['site_homesection']; + if(!$section) { + $section = "Home"; + } + $ary['section'] = $section; + } else { + $pagetitle .= " - $section"; + } $cmt = new Comment($cmtary); ! $content .= ''; switch($submit) { *************** *** 58,64 **** # This code, shows the one comment and any children ! echo $cmt->getAllComments($cmtary); } else { ! echo "can't do much without a comment_id! ($comment_id)"; } break; --- 65,71 ---- # This code, shows the one comment and any children ! $content .= $cmt->getAllComments($cmtary); } else { ! $content .= "can't do much without a comment_id! ($comment_id)"; } break; *************** *** 96,100 **** } ! $cmt->printForm($ary); break; --- 103,107 ---- } ! $content .= $cmt->getForm($ary); break; *************** *** 117,121 **** $ary[replying_to] = $cmt->formatComment($ary); ! $cmt->printForm($ary); break; --- 124,128 ---- $ary[replying_to] = $cmt->formatComment($ary); ! $content .= $cmt->getForm($ary); break; *************** *** 125,130 **** /* the basic viewing of the comments */ ! titlebar("100%", pslgetText("Comments")); ! echo $cmt->getAllComments($cmtary); break; --- 132,137 ---- /* the basic viewing of the comments */ ! $content .= getTitlebar("100%", pslgetText("Comments")); ! $content .= $cmt->getAllComments($cmtary); break; *************** *** 133,151 **** /* when you click on "save", this is what happens.. */ ! echo "<BR>Click <A HREF=\"" . $return_link . "\">here</A> to go back<BR>\n"; if ($parent_id) { ! echo "<A HREF=\"" . $_PSL[rooturl] . "/comment.php3?submit=show&story_id=$story_id&comment_id=$parent_id&mode=flat\">View Parent Comment</A>\n"; } ! echo "<BR><BR>\n"; ! titlebar("100%", "Submitted Comment"); $ary = $HTTP_POST_VARS; /* get all the POST'ed VARS */ ! $ary[ip] = $REMOTE_ADDR; /* add the poster's IP addr */ $id = $cmt->update($ary); if ($id) { $comment_ary = $cmt->getCommentArray($id); ! echo $cmt->formatComment($comment_ary); // send email for new submission. if ($_PSL[commentnotify]) { --- 140,158 ---- /* when you click on "save", this is what happens.. */ ! $content .= "<BR>Click <A HREF=\"" . $return_link . "\">here</A> to go back<BR>\n"; if ($parent_id) { ! $content .= "<A HREF=\"" . $_PSL[rooturl] . "/comment.php3?submit=show&story_id=$story_id&comment_id=$parent_id&mode=flat\">View Parent Comment</A>\n"; } ! $content .= "<BR><BR>\n"; ! $content .= getTitlebar("100%", "Submitted Comment"); $ary = $HTTP_POST_VARS; /* get all the POST'ed VARS */ ! $ary['ip'] = $REMOTE_ADDR; /* add the poster's IP addr */ $id = $cmt->update($ary); if ($id) { $comment_ary = $cmt->getCommentArray($id); ! $content .= $cmt->formatComment($comment_ary); // send email for new submission. if ($_PSL[commentnotify]) { *************** *** 155,164 **** } } else { ! echo pslgetText("Your comment was NOT saved") . "<BR>\n"; } break; default: ! echo pslgetText("You didn't supply a good submit value") . "<BR>\n"; echo "<PRE>\n"; --- 162,171 ---- } } else { ! $content .= pslgetText("Your comment was NOT saved") . "<BR>\n"; } break; default: ! $content .= pslgetText("You didn't supply a good submit value") . "<BR>\n"; echo "<PRE>\n"; *************** *** 168,172 **** --- 175,231 ---- } + $block = new Block_i; + + $breadcrumb = breadcrumb($ary); + + $_PSL['metatags']['object'] = $xsiteobject; + + slashhead($pagetitle,$_PSL['metatags']); + + $leftblocks = $block->getBlocks($ary, "left"); + $centerblocks = $block->getBlocks($ary, "center"); + $rightblocks = $block->getBlocks($ary, "right"); + + if (empty($leftblocks)) { + if (empty($rightblocks)) { + // $centerblocks = $block->getBlocks($ary); + $tplfile = "index1col.tpl"; + } else { + $tplfile = 'index2colright.tpl'; + } + } elseif (empty($rightblocks)) { + $tplfile = 'index2colleft.tpl'; + } else { + $tplfile = 'index3col.tpl'; + } + + $template = new Template($_PSL['templatedir']); + $template->debug = 0; + $template->set_file(array( + 'index' => $tplfile //"index3col.tpl" + )); + + if( !empty($GLOBALS['QUERY_STRING'])) { + $QUERY_STRING = '?'.$GLOBALS['QUERY_STRING']; + } else { + $QUERY_STRING = ''; + } + + $template->set_var(array( + 'QUERYSTRING' => $QUERY_STRING, + 'ROOTDIR' => $_PSL['rooturl'], + 'IMAGEDIR' => $_PSL['imageurl'], + 'BREADCRUMB' => $breadcrumb, + 'STORY_COLUMN' => $content, + 'LEFT_BLOCK_COLUMN' => $leftblocks, + 'CENTER_BLOCK_COLUMN' => $centerblocks, + 'RIGHT_BLOCK_COLUMN' => $rightblocks + )); + + $template->parse('OUT','index'); + $template->p('OUT'); + slashfoot(); page_close(); + ?> |
From: Joe S. <joe...@us...> - 2002-06-17 20:58:45
|
Update of /cvsroot/phpslash/phpslash-ft/public_html/admin In directory usw-pr-cvs1:/tmp/cvs-serv28512/phpslash-ft/public_html/admin Modified Files: infologAdmin.php3 Log Message: infolog method returns Index: infologAdmin.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/admin/infologAdmin.php3,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** infologAdmin.php3 3 Feb 2002 22:09:12 -0000 1.4 --- infologAdmin.php3 17 Jun 2002 20:58:42 -0000 1.5 *************** *** 16,54 **** START OF PAGE *****************************/ ! ! slashhead($pagetitle,$xsiteobject); /* START DEBUG */ ! debug( "HTTP_POST_VARS" , $HTTP_POST_VARS); ! debug( "HTTP_GET_VARS" , $HTTP_GET_VARS); /* END DEBUG */ ! if ($perm->have_perm("logging")) { switch ($submit) { case "IdDelete": ! debug("loginfoadmin::infolog_ary", $infolog_ary); ! $log->deleteLogByID($HTTP_POST_VARS["infolog_ary"]); ! $log->pageOut(); break; case "keyDelete": ! $log->deleteLogByKeyword($HTTP_POST_VARS["infolog_delete_key"]); ! $log->pageOut(); break; case "allDelete": ! $log->deleteAllLogs(); ! $log->pageOut(); break; default: ! $log->pageOut(); } } else { ! titlebar("100%","Error! Invalid Privileges"); ! echo "Sorry. You do not have the necessary privilege to view this page."; } slashfoot(); page_close(); ?> --- 16,112 ---- START OF PAGE *****************************/ ! $auth->login_if(!$perm->have_perm('infologList')); /* START DEBUG */ ! // debug( "HTTP_POST_VARS" , $HTTP_POST_VARS); ! // debug( "HTTP_GET_VARS" , $HTTP_GET_VARS); /* END DEBUG */ ! if ($perm->have_perm("infologList")) { switch ($submit) { case "IdDelete": ! // debug("loginfoadmin::infolog_ary", $infolog_ary); ! if($log->deleteLogByID($HTTP_POST_VARS["infolog_ary"])) { ! $content .= getMessage($log->getMessage()); ! } ! $content .= $log->pageOut(); break; case "keyDelete": ! if($log->deleteLogByKeyword($HTTP_POST_VARS["infolog_delete_key"])) { ! $content .= getMessage($log->getMessage()); ! } ! $content .= $log->pageOut(); break; case "allDelete": ! if($log->deleteAllLogs()) { ! $content .= getMessage($log->getMessage()); ! } ! $content .= $log->pageOut(); break; default: ! $content .= $log->pageOut(); } } else { ! $content = getTitlebar("100%","Error! Invalid Privileges"); ! $content .= "Sorry. You do not have the necessary privilege to view this page."; ! } ! ! $block = new Block_i; ! $ary['section'] = "Admin"; ! ! $breadcrumb = breadcrumb($ary); ! ! $_PSL['metatags']['object'] = $xsiteobject; ! ! slashhead($pagetitle,$_PSL['metatags']); ! ! $leftblocks = $block->getBlocks($ary, "left"); ! $centerblocks = $block->getBlocks($ary, "center"); ! $rightblocks = $block->getBlocks($ary, "right"); ! ! if (empty($leftblocks)) { ! if (empty($rightblocks)) { ! // $centerblocks = $block->getBlocks($ary); ! $tplfile = "index1col.tpl"; ! } else { ! $tplfile = 'index2colright.tpl'; ! } ! } elseif (empty($rightblocks)) { ! $tplfile = 'index2colleft.tpl'; ! } else { ! $tplfile = 'index3col.tpl'; ! } ! ! $template = new Template($_PSL['templatedir']); ! $template->debug = 0; ! $template->set_file(array( ! 'index' => $tplfile //"index3col.tpl" ! )); ! ! if( !empty($GLOBALS['QUERY_STRING'])) { ! $QUERY_STRING = '?'.$GLOBALS['QUERY_STRING']; ! } else { ! $QUERY_STRING = ''; } + + $template->set_var(array( + 'QUERYSTRING' => $QUERY_STRING, + 'ROOTDIR' => $_PSL['rooturl'], + 'IMAGEDIR' => $_PSL['imageurl'], + 'BREADCRUMB' => $breadcrumb, + 'STORY_COLUMN' => $content, + 'LEFT_BLOCK_COLUMN' => $leftblocks, + 'CENTER_BLOCK_COLUMN' => $centerblocks, + 'RIGHT_BLOCK_COLUMN' => $rightblocks + )); + $template->parse('OUT','index'); + $template->p('OUT'); slashfoot(); page_close(); + + ?> |
From: Joe S. <joe...@us...> - 2002-06-17 20:58:45
|
Update of /cvsroot/phpslash/phpslash-ft/class In directory usw-pr-cvs1:/tmp/cvs-serv28512/phpslash-ft/class Modified Files: Infolog.class Log Message: infolog method returns Index: Infolog.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Infolog.class,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Infolog.class 3 Feb 2002 02:49:39 -0000 1.3 --- Infolog.class 17 Jun 2002 20:58:42 -0000 1.4 *************** *** 11,15 **** class Infolog { ! var $templ, $db, $psl; /* --- 11,15 ---- class Infolog { ! var $templ, $db, $psl, $message; /* *************** *** 20,23 **** --- 20,24 ---- $this->psl = $_PSL; + $this->message = ''; /* Start a db */ *************** *** 53,64 **** ACTION_URL => $this->psl['phpself'] )); ! $this->templ->parse(OUT,array("infolog")); ! $this->templ->p(OUT); } function deleteAllLogs() { ! echo 'Deleting all log entries....'; $this->db->query("DELETE FROM psl_infolog"); ! echo "Done!<br>\n"; } --- 54,66 ---- ACTION_URL => $this->psl['phpself'] )); ! return $this->templ->parse(OUT,array("infolog")); ! // $this->templ->p(OUT); } function deleteAllLogs() { ! $this->message .= 'Deleting all log entries....'; $this->db->query("DELETE FROM psl_infolog"); ! $this->message .= "Done!<br>\n"; ! return true; } *************** *** 67,83 **** $this->db->query("DELETE from psl_infolog WHERE description RLIKE '($keyword.*)'"); ! echo 'Deleted ' . $this->db->affected_rows() ! . "log entries with keyword the keyword \"$keyword\".<br>\n"; logwrite("Infolog Record Delete", "Keyword: $keyword ($this->db->affected_rows() matched and deleted)"); } function deleteLogByID($id) { while( list( $key, $val) = each( $id )) { ! echo "Deleting log entry $val..."; $this->db->query("DELETE FROM psl_infolog WHERE id='$val'"); ! echo "Done!<br>\n"; } logwrite("Infolog Record Delete", $id); } } /* end Infolog.class */ --- 69,98 ---- $this->db->query("DELETE from psl_infolog WHERE description RLIKE '($keyword.*)'"); ! $this->message .= 'Deleted ' . $this->db->affected_rows() . " log entries with keyword the keyword \"$keyword\".<br>\n"; logwrite("Infolog Record Delete", "Keyword: $keyword ($this->db->affected_rows() matched and deleted)"); + return true; } function deleteLogByID($id) { while( list( $key, $val) = each( $id )) { ! $this->message .= "Deleting log entry $val..."; $this->db->query("DELETE FROM psl_infolog WHERE id='$val'"); ! $this->message .= "Done!<br>\n"; } logwrite("Infolog Record Delete", $id); + return true; + } + + /** + * getMessage - returns message text + * + * simply returns the contents of the message variable + * + * @access public + */ + function getMessage() { + return pslgetText($this->message); } + } /* end Infolog.class */ |
From: Joe S. <joe...@us...> - 2002-06-17 20:58:45
|
Update of /cvsroot/phpslash/phpslash-ft In directory usw-pr-cvs1:/tmp/cvs-serv28512/phpslash-ft Modified Files: CHANGES Log Message: infolog method returns Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/CHANGES,v retrieving revision 1.521 retrieving revision 1.522 diff -C2 -d -r1.521 -r1.522 *** CHANGES 17 Jun 2002 20:30:38 -0000 1.521 --- CHANGES 17 Jun 2002 20:58:42 -0000 1.522 *************** *** 13,16 **** --- 13,20 ---- 9 - Removal of something (kill -9 :) + 2002-June-17 3:30PM CDT Joe Stewart <joe...@us...> + [W] - Infolog.class, infologAdmin.php3 - infolog methods return message + and status to caller. + 2002-June-17 3:00PM CDT Joe Stewart <joe...@us...> [WTD] - Group.class, groupAdmin.php3, groupList.tpl, groupNew.tpl, |
From: Joe S. <joe...@us...> - 2002-06-17 20:30:42
|
Update of /cvsroot/phpslash/phpslash-ft/public_html/admin In directory usw-pr-cvs1:/tmp/cvs-serv19134/phpslash-ft/public_html/admin Modified Files: groupAdmin.php3 Log Message: group method returns Index: groupAdmin.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/admin/groupAdmin.php3,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** groupAdmin.php3 23 May 2002 18:41:24 -0000 1.1 --- groupAdmin.php3 17 Jun 2002 20:30:39 -0000 1.2 *************** *** 13,24 **** *****************************/ ! slashhead($pagetitle,$xsiteobject); /* DEBUG */ ! debug("HTTP_POST_VARS", $HTTP_POST_VARS); ! debug("HTTP_GET_VARS", $HTTP_GET_VARS); ! debug("group_name", $group_name); ! debug("group_description", $group_description); --- 13,24 ---- *****************************/ ! $auth->login_if(!$perm->have_perm('groupList')); /* DEBUG */ ! // debug("HTTP_POST_VARS", $HTTP_POST_VARS); ! // debug("HTTP_GET_VARS", $HTTP_GET_VARS); ! // debug("group_name", $group_name); ! // debug("group_description", $group_description); *************** *** 27,114 **** $group = new Group; ! if ($perm->have_perm("groupAdmin")) { switch ($submit) { case "delete": ! $success = $group->deleteGroup($group_id); ! if($success) { ! echo message( pslgetText($group->getMessage())); ! } else { ! error( pslgetText($group->getMessage())); } ! $group->newGroup(); ! $group->listGroup(); ! $group->editPermission(); ! $group->listPermission(); ! break; case "submit": $success = $group->saveGroup($HTTP_POST_VARS); if($success) { ! echo message( pslgetText($group->getMessage())); } else { ! error( pslgetText($group->getMessage())); } ! $group->newGroup(); ! $group->listGroup(); ! $group->editPermission(); ! $group->listPermission(); ! break; case "edit": $ary["group_id"] = $HTTP_GET_VARS['group_id']; ! debug("ary[group_id]", $ary["group_id"]); ! $group->editGroup($ary); ! $group->listGroup(); ! break; case "deleteperm": $success = $group->deletePermission($permission_id); ! if($success) { ! echo message( pslgetText($group->getMessage())); } else { ! error( pslgetText($group->getMessage())); } ! $group->newGroup(); ! $group->listGroup(); ! $group->editPermission(); ! $group->listPermission(); ! break; case "submitperm": $success = $group->savePermission($HTTP_POST_VARS); ! if($success) { ! echo message( pslgetText($group->getMessage())); } else { ! error( pslgetText($group->getMessage())); } ! $group->newGroup(); ! $group->listGroup(); ! $group->editPermission(); ! $group->listPermission(); ! break; case "editperm": $ary["permission_id"] = $HTTP_GET_VARS['permission_id']; // debug("ary[permission_id]", $ary["permission_id"]); ! $group->editPermission($ary); ! $group->newGroup(); ! $group->listGroup(); ! $group->listPermission(); break; default: ! $group->newGroup(); ! $group->listGroup(); ! $group->editPermission(); ! $group->listPermission(); } } else { ! titlebar("100%","Error! Invalid Privileges"); ! echo "Sorry. You do not have the necessary privilege to view this page."; } ! slashfoot(); page_close(); ?> --- 27,216 ---- $group = new Group; ! $content .= ''; ! ! if ($perm->have_perm("groupList")) { switch ($submit) { case "delete": ! if ($perm->have_perm("groupDelete")) { ! $success = $group->deleteGroup($group_id); ! if($success) { ! $content .= getMessage( pslgetText($group->getMessage())); ! } else { ! $content .= getError( pslgetText($group->getMessage())); ! } } ! if ($perm->have_perm("groupNew")) { ! $content .= $group->newGroup(); ! } ! if ($perm->have_perm("groupList")) { ! $content .= $group->listGroup(); ! } ! if ($perm->have_perm("permissionNew")) { ! $content .= $group->editPermission(); ! } ! if ($perm->have_perm("permissionList")) { ! $content .= $group->listPermission(); ! } ! break; case "submit": $success = $group->saveGroup($HTTP_POST_VARS); if($success) { ! $content .= getMessage( pslgetText($group->getMessage())); } else { ! $content .= getError( pslgetText($group->getMessage())); } ! if ($perm->have_perm("groupNew")) { ! $content .= $group->newGroup(); ! } ! if ($perm->have_perm("groupList")) { ! $content .= $group->listGroup(); ! } ! if ($perm->have_perm("permissionNew")) { ! $content .= $group->editPermission(); ! } ! if ($perm->have_perm("permissionList")) { ! $content .= $group->listPermission(); ! } ! break; case "edit": $ary["group_id"] = $HTTP_GET_VARS['group_id']; ! // debug("ary[group_id]", $ary["group_id"]); ! if ($perm->have_perm("groupEdit")) { ! $content .= $group->editGroup($ary); ! } ! if ($perm->have_perm("groupList")) { ! $content .= $group->listGroup(); ! } ! break; case "deleteperm": $success = $group->deletePermission($permission_id); ! if($success) { ! $content .= getMessage( pslgetText($group->getMessage())); } else { ! $content .= getError( pslgetText($group->getMessage())); } ! if ($perm->have_perm("groupNew")) { ! $content .= $group->newGroup(); ! } ! if ($perm->have_perm("groupList")) { ! $content .= $group->listGroup(); ! } ! if ($perm->have_perm("permissionNew")) { ! $content .= $group->editPermission(); ! } ! if ($perm->have_perm("permissionList")) { ! $content .= $group->listPermission(); ! } ! break; case "submitperm": $success = $group->savePermission($HTTP_POST_VARS); ! if($success) { ! $content .= getMessage( pslgetText($group->getMessage())); } else { ! $content .= getError( pslgetText($group->getMessage())); } ! if ($perm->have_perm("groupNew")) { ! $content .= $group->newGroup(); ! } ! if ($perm->have_perm("groupList")) { ! $content .= $group->listGroup(); ! } ! if ($perm->have_perm("permissionNew")) { ! $content .= $group->editPermission(); ! } ! if ($perm->have_perm("permissionList")) { ! $content .= $group->listPermission(); ! } ! break; case "editperm": $ary["permission_id"] = $HTTP_GET_VARS['permission_id']; // debug("ary[permission_id]", $ary["permission_id"]); ! if ($perm->have_perm("permissionEdit")) { ! $content .= $group->editPermission($ary); ! } ! if ($perm->have_perm("permissionList")) { ! $content .= $group->listPermission(); ! } break; default: ! if ($perm->have_perm("groupNew")) { ! $content .= $group->newGroup(); ! } ! if ($perm->have_perm("groupList")) { ! $content .= $group->listGroup(); ! } ! if ($perm->have_perm("permissionNew")) { ! $content .= $group->editPermission(); ! } ! if ($perm->have_perm("permissionList")) { ! $content .= $group->listPermission(); ! } ! } ! ! } else { ! $content = getTitlebar("100%","Error! Invalid Privileges"); ! $content .= "Sorry. You do not have the necessary privilege to view this page."; ! } + $block = new Block_i; + $ary['section'] = "Admin"; + + $breadcrumb = breadcrumb($ary); + + $_PSL['metatags']['object'] = $xsiteobject; + + slashhead($pagetitle,$_PSL['metatags']); + + $leftblocks = $block->getBlocks($ary, "left"); + $centerblocks = $block->getBlocks($ary, "center"); + $rightblocks = $block->getBlocks($ary, "right"); + + if (empty($leftblocks)) { + if (empty($rightblocks)) { + // $centerblocks = $block->getBlocks($ary); + $tplfile = "index1col.tpl"; + } else { + $tplfile = 'index2colright.tpl'; } + } elseif (empty($rightblocks)) { + $tplfile = 'index2colleft.tpl'; } else { ! $tplfile = 'index3col.tpl'; } ! $template = new Template($_PSL['templatedir']); ! $template->debug = 0; ! $template->set_file(array( ! 'index' => $tplfile //"index3col.tpl" ! )); ! ! if( !empty($GLOBALS['QUERY_STRING'])) { ! $QUERY_STRING = '?'.$GLOBALS['QUERY_STRING']; ! } else { ! $QUERY_STRING = ''; ! } ! ! $template->set_var(array( ! 'QUERYSTRING' => $QUERY_STRING, ! 'ROOTDIR' => $_PSL['rooturl'], ! 'IMAGEDIR' => $_PSL['imageurl'], ! 'BREADCRUMB' => $breadcrumb, ! 'STORY_COLUMN' => $content, ! 'LEFT_BLOCK_COLUMN' => $leftblocks, ! 'CENTER_BLOCK_COLUMN' => $centerblocks, ! 'RIGHT_BLOCK_COLUMN' => $rightblocks ! )); ! ! $template->parse('OUT','index'); ! $template->p('OUT'); + slashfoot(); page_close(); + ?> |
From: Joe S. <joe...@us...> - 2002-06-17 20:30:42
|
Update of /cvsroot/phpslash/phpslash-ft/public_html/templates/en/default In directory usw-pr-cvs1:/tmp/cvs-serv19134/phpslash-ft/public_html/templates/en/default Modified Files: groupList.tpl groupNew.tpl permissionList.tpl permissionNew.tpl Log Message: group method returns Index: groupList.tpl =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/templates/en/default/groupList.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** groupList.tpl 23 May 2002 18:43:03 -0000 1.1 --- groupList.tpl 17 Jun 2002 20:30:39 -0000 1.2 *************** *** 1,4 **** <!-- groupList.tpl --> ! <TABLE BORDER=0 CELLPADDING=3> <TR> --- 1,4 ---- <!-- groupList.tpl --> ! {TITLEBAR} <TABLE BORDER=0 CELLPADDING=3> <TR> Index: groupNew.tpl =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/templates/en/default/groupNew.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** groupNew.tpl 23 May 2002 18:43:03 -0000 1.1 --- groupNew.tpl 17 Jun 2002 20:30:39 -0000 1.2 *************** *** 1,3 **** --- 1,4 ---- <!-- groupNew.tpl --> + {TITLEBAR} <FORM ACTION="{ACTION_URL}" METHOD=POST> <INPUT TYPE=HIDDEN NAME="group_id" VALUE="{GROUP_ID}"> Index: permissionList.tpl =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/templates/en/default/permissionList.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** permissionList.tpl 23 May 2002 18:43:03 -0000 1.1 --- permissionList.tpl 17 Jun 2002 20:30:39 -0000 1.2 *************** *** 1,4 **** <!-- permissionList.tpl --> ! <TABLE BORDER=0 CELLPADDING=3> <TR> --- 1,4 ---- <!-- permissionList.tpl --> ! {TITLEBAR} <TABLE BORDER=0 CELLPADDING=3> <TR> Index: permissionNew.tpl =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/templates/en/default/permissionNew.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** permissionNew.tpl 23 May 2002 18:43:03 -0000 1.1 --- permissionNew.tpl 17 Jun 2002 20:30:39 -0000 1.2 *************** *** 1,3 **** --- 1,4 ---- <!-- permissionNew.tpl --> + {TITLEBAR} <FORM ACTION="{ACTION_URL}" METHOD=POST> <INPUT TYPE=HIDDEN NAME="permission_id" VALUE="{PERMISSION_ID}"> |
From: Joe S. <joe...@us...> - 2002-06-17 20:30:42
|
Update of /cvsroot/phpslash/phpslash-ft/class In directory usw-pr-cvs1:/tmp/cvs-serv19134/phpslash-ft/class Modified Files: Group.class Log Message: group method returns Index: Group.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Group.class,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Group.class 23 May 2002 18:41:24 -0000 1.1 --- Group.class 17 Jun 2002 20:30:39 -0000 1.2 *************** *** 31,34 **** --- 31,35 ---- $this->perm = $perm; $this->psl = $_PSL; + $this->message = ''; /* Templates */ *************** *** 67,71 **** $this->db->query($q); ! titlebar("100%","Change existing Groups"); $this->group_templ->set_block("listgroup","row","rows"); --- 68,72 ---- $this->db->query($q); ! $this->group_templ->set_var('TITLEBAR',getTitlebar("100%","Change existing Groups")); $this->group_templ->set_block("listgroup","row","rows"); *************** *** 90,95 **** $this->group_templ->parse("rows","row",true); }; ! $this->group_templ->parse('OUT',array("listgroup")); ! $this->group_templ->p('OUT'); } --- 91,96 ---- $this->group_templ->parse("rows","row",true); }; ! return $this->group_templ->parse('OUT',array("listgroup")); ! // $this->group_templ->p('OUT'); } *************** *** 262,303 **** } ! /* check for any stories that are associated with this group */ ! /* ! $q = "SELECT psl_story.title, ! psl_story.story_id ! FROM psl_story, ! psl_group_lut ! WHERE psl_story.story_id = psl_group_lut.story_id ! AND psl_group_lut.group_id = '$group_id'"; $this->db->query($q); while ($this->db->next_record()) { $go_ahead = false; ! $title = $this->db->Record["title"]; ! $story_id = $this->db->Record["story_id"]; ! $group_name = $this->db->Record["group_name"]; ! echo "Sorry, ths story is assigned to this group:"; ! echo "<font color=\"red\">'$title'</font><br />\n"; } ! */ ! /* check for any submissions that are associated with this group */ ! /* ! $q = "SELECT psl_submission.title, ! psl_submission.story_id ! FROM psl_submission, ! psl_group_submission_lut ! WHERE psl_submission.story_id = psl_group_submission_lut.story_id ! AND psl_group_submission_lut.group_id = '$group_id'"; $this->db->query($q); while ($this->db->next_record()) { $go_ahead = false; ! $title = $this->db->Record["title"]; ! $story_id = $this->db->Record["story_id"]; $group_name = $this->db->Record["group_name"]; ! echo "Sorry, this submission is assigned to this group:"; ! echo "<font color=\"red\">'$title'</font><br />\n"; } ! */ if (!$go_ahead) { ! $this->message = "Group not deleted"; return false; } else { --- 263,301 ---- } ! // check for any authors that are associated with this group ! ! $q = "SELECT psl_author.author_name, ! psl_author.author_id ! FROM psl_author, ! psl_author_group_lut ! WHERE psl_author.author_id = psl_author_group_lut.author_id ! AND psl_author_group_lut.group_id = '$group_id'"; $this->db->query($q); while ($this->db->next_record()) { $go_ahead = false; ! $name = $this->db->Record["author_name"]; ! $author_id = $this->db->Record["author_id"]; ! $this->message = "Sorry, this group is assigned to author ".$name."(".$author_id.")"; } ! ! // check for any parent groups that are associated with this group ! ! $q = "SELECT psl_group.group_name, ! psl_group.group_id ! FROM psl_group, ! psl_group_group_lut ! WHERE psl_group.group_id = psl_group_group_lut.group_id ! AND psl_group_group_lut.childgroup_id = '$group_id'"; $this->db->query($q); while ($this->db->next_record()) { $go_ahead = false; ! $group_id = $this->db->Record["group_id"]; $group_name = $this->db->Record["group_name"]; ! $this->message = "Sorry, this group is assigned to group ".$group_name."(".$group_id.")"; } ! ! if (!$go_ahead) { ! $this->message .= " Group not deleted"; return false; } else { *************** *** 322,414 **** function newGroup($ary="") { ! titlebar("100%","Add a new Group"); ! $this->group_templ->set_var(array( ! 'GROUP_ID' => "", ! 'GROUP_NAME' => "", ! 'GROUP_DESCRIPTION' => "", ! 'ACTION_URL' => $this->psl['phpself'] ! )); ! ! $this->group_templ->set_block("newgroup","section_row","section_rows"); ! $section = new Section; ! $section_ary = $section->getSections(); ! $this->group_templ->set_var(array( ! 'SECTION_ID' => 0, ! 'SELECTED' => "selected=\"selected\"", ! 'SECTION_NAME' => pslgetText("All Sections") ! )); ! $this->group_templ->parse("section_rows","section_row",true); ! while ( list( $key, $val ) = each( $section_ary ) ) { ! // $perms_needed = "newBlock && ".$this->db->Record[section_name]; ! // if( $this->perm->have_perm($perms_needed)) { ! $this->group_templ->set_var(array( ! 'SECTION_ID' => $val['id'], ! 'SELECTED' => "", ! 'SECTION_NAME' => $val['name'] ! )); ! $this->group_templ->parse("section_rows","section_row",true); ! $size++; ! // } ! } ! if($size > 5) { ! $size = 5; ! } ! $this->group_templ->set_block("newgroup","group_row","group_rows"); ! $groups_ary = $this->getGroups(); ! $size = 0; ! while ( list( $key, $val ) = each( $groups_ary ) ) { ! // $perms_needed = "newBlock && ".$this->db->Record[section_name]; ! // if( $this->perm->have_perm($perms_needed)) { ! $this->group_templ->set_var(array( ! 'CHILDGROUP_ID' => $val['id'], ! 'SELECTED' => "", ! 'CHILDGROUP_NAME' => $val['name'] ! )); $this->group_templ->parse("group_rows","group_row",true); $size++; ! // } ! } ! if($size > 5) { ! $size = 5; ! } ! $this->group_templ->set_block("newgroup","permission_row","permission_rows"); ! $perm_ary = $this->getPermissions(); ! $size = 0; ! while ( list( $key, $val ) = each( $perm_ary ) ) { ! // $perms_needed = "newBlock && ".$this->db->Record[section_name]; ! // if( $this->perm->have_perm($perms_needed)) { ! // debug("val[id]", $val[id]); ! // debug("val[name]", $val['name']); ! $this->group_templ->set_var(array( ! 'PERMISSION_ID' => $val['id'], ! 'SELECTED' => "", ! 'PERMISSION_NAME' => $val[name] ! )); ! $this->group_templ->parse("permission_rows","permission_row",true); ! $size++; ! // } ! } ! if($size > 5) { ! $size = 5; ! } ! $this->group_templ->set_var("SIZE", $size); ! $this->group_templ->set_var("SIZEPERMS", $size); ! $this->group_templ->parse('OUT',array("newgroup")); ! $this->group_templ->p('OUT'); } --- 320,411 ---- function newGroup($ary="") { ! $this->group_templ->set_var(array( ! 'TITLEBAR' => getTitlebar("100%","Add a new Group"), ! 'GROUP_ID' => "", ! 'GROUP_NAME' => "", ! 'GROUP_DESCRIPTION' => "", ! 'ACTION_URL' => $this->psl['phpself'] ! )); ! $this->group_templ->set_block("newgroup","section_row","section_rows"); ! $section = new Section; ! $section_ary = $section->getSections(); ! $this->group_templ->set_var(array( ! 'SECTION_ID' => 0, ! 'SELECTED' => "selected=\"selected\"", ! 'SECTION_NAME' => pslgetText("All Sections") ! )); ! $this->group_templ->parse("section_rows","section_row",true); ! while ( list( $key, $val ) = each( $section_ary ) ) { ! // $perms_needed = "blockNew && ".$this->db->Record[section_id]; ! // if( $this->perm->have_perm($perms_needed)) { ! $this->group_templ->set_var(array( ! 'SECTION_ID' => $val['id'], ! 'SELECTED' => "", ! 'SECTION_NAME' => $val['name'] ! )); ! $this->group_templ->parse("section_rows","section_row",true); ! $size++; ! // } ! } ! if($size > 5) { ! $size = 5; ! } ! $this->group_templ->set_block("newgroup","group_row","group_rows"); ! $groups_ary = $this->getGroups(); ! $size = 0; ! while ( list( $key, $val ) = each( $groups_ary ) ) { ! // $perms_needed = "blockNew && ".$this->db->Record[section_id]; ! // if( $this->perm->have_perm($perms_needed)) { ! $this->group_templ->set_var(array( ! 'CHILDGROUP_ID' => $val['id'], ! 'SELECTED' => "", ! 'CHILDGROUP_NAME' => $val['name'] ! )); $this->group_templ->parse("group_rows","group_row",true); $size++; ! // } ! } ! if($size > 5) { ! $size = 5; ! } ! $this->group_templ->set_block("newgroup","permission_row","permission_rows"); ! $perm_ary = $this->getPermissions(); ! $size = 0; ! while ( list( $key, $val ) = each( $perm_ary ) ) { ! // $perms_needed = "blockNew && ".$this->db->Record[section_id]; ! // if( $this->perm->have_perm($perms_needed)) { ! // debug("val[id]", $val[id]); ! // debug("val[name]", $val['name']); ! $this->group_templ->set_var(array( ! 'PERMISSION_ID' => $val['id'], ! 'SELECTED' => "", ! 'PERMISSION_NAME' => $val[name] ! )); ! $this->group_templ->parse("permission_rows","permission_row",true); ! $size++; ! // } ! } ! if($size > 5) { ! $size = 5; ! } ! $this->group_templ->set_var("SIZE", $size); ! $this->group_templ->set_var("SIZEPERMS", $size); ! return $this->group_templ->parse('OUT',array("newgroup")); ! // $this->group_templ->p('OUT'); } *************** *** 423,548 **** */ function editGroup($ary="") { ! titlebar("100%","Edit Group"); ! $q = "SELECT group_id, ! group_name, ! group_description ! FROM psl_group ! WHERE group_id = '$ary[group_id]'"; ! $this->db->query($q); ! $this->db->next_record(); ! $this->group_templ->set_var(array( ! 'GROUP_ID' => $this->db->Record["group_id"], ! 'GROUP_NAME' => $this->db->Record["group_name"], ! 'GROUP_DESCRIPTION' => $this->db->Record["group_description"], ! 'ACTION_URL' => $this->psl['phpself'] ! )); ! ! $this->group_templ->set_block("newgroup","section_row","section_rows"); ! $section = new Section; ! $section_ary = $section->getSections(); ! /* ! * Get the section_id's for this group into an array ! */ ! $q = "SELECT section_id ! FROM psl_group_section_lut ! WHERE group_id = '$ary[group_id]' "; ! // debug("q", $q); ! $this->db->query($q); ! $i = 0; ! while ($this->db->next_record()) { ! $group_section_ary[$i] = $this->db->Record['section_id']; ! $i++; ! } ! /* ! * Get the childgroup_id's for this group into an array ! */ ! $q = "SELECT childgroup_id ! FROM psl_group_group_lut ! WHERE group_id = '$ary[group_id]' "; ! // debug("q", $q); ! $this->db->query($q); ! $i = 0; ! while ($this->db->next_record()) { ! $group_group_ary[$i] = $this->db->Record['childgroup_id']; ! $i++; ! } ! /* ! * Get the permission_id's for this group into an array ! */ ! $q = "SELECT permission_id ! FROM psl_group_permission_lut ! WHERE group_id = '$ary[group_id]' "; ! // debug("q", $q); ! $this->db->query($q); ! $i = 0; ! while ($this->db->next_record()) { ! $group_permission_ary[$i] = $this->db->Record['permission_id']; ! $i++; ! } ! $this->group_templ->set_var(array( ! 'SECTION_ID' => 0, ! 'SELECTED' => "", ! 'SECTION_NAME' => pslgetText("All Sections") ! )); ! $this->group_templ->set_var('SELECTED',""); ! for ($i = 0 ; $i < count($group_section_ary) ; $i++) { ! if ($group_section_ary[$i] == 0) { ! $this->group_templ->set_var('SELECTED',"selected=\"selected\""); ! } } ! $this->group_templ->parse("section_rows","section_row",true); ! while ( list( $key, $val ) = each( $section_ary ) ) { ! // $perms_needed = "newBlock && ".$this->db->Record[section_name]; ! // if( $this->perm->have_perm($perms_needed)) { ! $this->group_templ->set_var(array( ! 'SECTION_ID' => $val['id'], ! 'SELECTED' => "", ! 'SECTION_NAME' => $val['name'] ! )); ! $this->group_templ->set_var('SELECTED',""); ! for ($i = 0 ; $i < count($group_section_ary) ; $i++) { ! if ($group_section_ary[$i] == $val['id']) { ! $this->group_templ->set_var('SELECTED',"selected=\"selected\""); ! } } ! $this->group_templ->parse("section_rows","section_row",true); ! $size++; ! // } ! } ! if($size > 5) { ! $size = 5; ! } ! $this->group_templ->set_block("newgroup","group_row","group_rows"); ! $groups_ary = $this->getGroups(); ! $size = 0; ! while ( list( $key, $val ) = each( $groups_ary ) ) { ! // $perms_needed = "newBlock && ".$this->db->Record[section_name]; ! // if( $this->perm->have_perm($perms_needed)) { ! $this->group_templ->set_var(array( ! 'CHILDGROUP_ID' => $val['id'], ! 'SELECTED' => "", ! 'CHILDGROUP_NAME' => $val['name'] ! )); ! $this->group_templ->set_var('SELECTED',""); for ($i = 0 ; $i < count($group_group_ary) ; $i++) { - // debug("val['id']", $val['id']); - // debug("group_group_ary[$i]", $group_group_ary[$i]); if ($group_group_ary[$i] == $val['id']) { - // debug("good", "deal"); $this->group_templ->set_var('SELECTED',"selected=\"selected\""); } --- 420,542 ---- */ function editGroup($ary="") { + + $q = "SELECT group_id, + group_name, + group_description + FROM psl_group + WHERE group_id = '$ary[group_id]'"; + $this->db->query($q); + $this->db->next_record(); + $this->group_templ->set_var(array( + 'TITLEBAR' => getTitlebar("100%","Edit Group"), + 'GROUP_ID' => $this->db->Record["group_id"], + 'GROUP_NAME' => $this->db->Record["group_name"], + 'GROUP_DESCRIPTION' => $this->db->Record["group_description"], + 'ACTION_URL' => $this->psl['phpself'] + )); ! $this->group_templ->set_block("newgroup","section_row","section_rows"); ! $section = new Section; ! $section_ary = $section->getSections(); ! ! // Get the section_id's for this group into an array ! ! $q = "SELECT section_id ! FROM psl_group_section_lut ! WHERE group_id = '$ary[group_id]' "; ! // debug("q", $q); ! $this->db->query($q); ! $i = 0; ! while ($this->db->next_record()) { ! $group_section_ary[$i] = $this->db->Record['section_id']; ! $i++; ! } ! ! // Get the childgroup_id's for this group into an array ! ! $q = "SELECT childgroup_id ! FROM psl_group_group_lut ! WHERE group_id = '$ary[group_id]' "; ! // debug("q", $q); ! $this->db->query($q); ! $i = 0; ! while ($this->db->next_record()) { ! $group_group_ary[$i] = $this->db->Record['childgroup_id']; ! $i++; ! } ! ! // Get the permission_id's for this group into an array ! ! $q = "SELECT permission_id ! FROM psl_group_permission_lut ! WHERE group_id = '$ary[group_id]' "; ! // debug("q", $q); ! $this->db->query($q); ! $i = 0; ! while ($this->db->next_record()) { ! $group_permission_ary[$i] = $this->db->Record['permission_id']; ! $i++; ! } ! $this->group_templ->set_var(array( ! 'SECTION_ID' => 0, ! 'SELECTED' => "", ! 'SECTION_NAME' => pslgetText("All Sections") ! )); ! $this->group_templ->set_var('SELECTED',""); ! for ($i = 0 ; $i < count($group_section_ary) ; $i++) { ! if ($group_section_ary[$i] == 0) { ! $this->group_templ->set_var('SELECTED',"selected=\"selected\""); } ! } ! $this->group_templ->parse("section_rows","section_row",true); ! while ( list( $key, $val ) = each( $section_ary ) ) { ! // $perms_needed = "blockNew && ".$this->db->Record[section_id]; ! // if( $this->perm->have_perm($perms_needed)) { ! $this->group_templ->set_var(array( ! 'SECTION_ID' => $val['id'], ! 'SELECTED' => "", ! 'SECTION_NAME' => $val['name'] ! )); ! $this->group_templ->set_var('SELECTED',""); ! for ($i = 0 ; $i < count($group_section_ary) ; $i++) { ! if ($group_section_ary[$i] == $val['id']) { ! $this->group_templ->set_var('SELECTED',"selected=\"selected\""); } ! } ! $this->group_templ->parse("section_rows","section_row",true); ! $size++; ! // } ! } ! if($size > 5) { ! $size = 5; ! } ! $this->group_templ->set_block("newgroup","group_row","group_rows"); ! $groups_ary = $this->getGroups(); ! $size = 0; ! while ( list( $key, $val ) = each( $groups_ary ) ) { ! // $perms_needed = "newBlock && ".$this->db->Record[section_name]; ! // if( $this->perm->have_perm($perms_needed)) { ! $this->group_templ->set_var(array( ! 'CHILDGROUP_ID' => $val['id'], ! 'SELECTED' => "", ! 'CHILDGROUP_NAME' => $val['name'] ! )); ! $this->group_templ->set_var('SELECTED',""); for ($i = 0 ; $i < count($group_group_ary) ; $i++) { if ($group_group_ary[$i] == $val['id']) { $this->group_templ->set_var('SELECTED',"selected=\"selected\""); } *************** *** 553,602 **** } $size++; ! // } ! } ! if($size > 5) { ! $size = 5; ! } ! ! $this->group_templ->set_block("newgroup","permission_row","permission_rows"); ! $perm_ary = $this->getPermissions(); ! $size = 0; ! while ( list( $key, $val ) = each( $perm_ary ) ) { ! // $perms_needed = "newBlock && ".$this->db->Record[section_name]; ! // if( $this->perm->have_perm($perms_needed)) { ! // debug("val[id]", $val[id]); ! // debug("val[name]", $val['name']); ! $this->group_templ->set_var(array( ! 'PERMISSION_ID' => $val['id'], ! 'SELECTED' => "", ! 'PERMISSION_NAME' => $val[name] ! )); ! $this->group_templ->set_var('SELECTED',""); ! for ($i = 0 ; $i < count($group_permission_ary) ; $i++) { ! // debug("val['id']", $val['id']); ! // debug("group_permission_ary[$i]", $group_permission_ary[$i]); ! if ($group_permission_ary[$i] == $val['id']) { ! // debug("good", "deal"); ! $this->group_templ->set_var('SELECTED',"selected=\"selected\""); ! } } ! $this->group_templ->parse("permission_rows","permission_row",true); ! $size++; ! // } ! } ! if($size > 5) { ! $size = 5; ! } - $this->group_templ->set_var("SIZE", $size); - $this->group_templ->set_var("SIZEPERMS", $size); ! $this->group_templ->parse('OUT',array("newgroup")); ! $this->group_templ->p('OUT'); } --- 547,589 ---- } $size++; ! // } ! } ! if($size > 5) { ! $size = 5; ! } ! $this->group_templ->set_block("newgroup","permission_row","permission_rows"); ! $perm_ary = $this->getPermissions(); ! $size = 0; ! while ( list( $key, $val ) = each( $perm_ary ) ) { ! // $perms_needed = "newBlock && ".$this->db->Record[section_name]; ! // if( $this->perm->have_perm($perms_needed)) { ! $this->group_templ->set_var(array( ! 'PERMISSION_ID' => $val['id'], ! 'SELECTED' => "", ! 'PERMISSION_NAME' => $val[name] ! )); ! $this->group_templ->set_var('SELECTED',""); ! for ($i = 0 ; $i < count($group_permission_ary) ; $i++) { ! if ($group_permission_ary[$i] == $val['id']) { ! $this->group_templ->set_var('SELECTED',"selected=\"selected\""); } + } ! $this->group_templ->parse("permission_rows","permission_row",true); ! $size++; ! // } ! } ! if($size > 5) { ! $size = 5; ! } $this->group_templ->set_var("SIZE", $size); $this->group_templ->set_var("SIZEPERMS", $size); ! ! return $this->group_templ->parse('OUT',array("newgroup")); ! // $this->group_templ->p('OUT'); } *************** *** 697,701 **** $this->db->query($q); ! titlebar("100%","Change existing Permissions"); $this->permission_templ->set_block("listpermission","row","rows"); --- 684,688 ---- $this->db->query($q); ! $this->permission_templ->set_var('TITLEBAR',getTitlebar("100%","Change existing Permissions")); $this->permission_templ->set_block("listpermission","row","rows"); *************** *** 720,725 **** $this->permission_templ->parse("rows","row",true); }; ! $this->permission_templ->parse('OUT',array("listpermission")); ! $this->permission_templ->p('OUT'); } --- 707,712 ---- $this->permission_templ->parse("rows","row",true); }; ! return $this->permission_templ->parse('OUT',array("listpermission")); ! // $this->permission_templ->p('OUT'); } *************** *** 810,851 **** } ! /* check for any stories that are associated with this permission */ ! /* ! $q = "SELECT psl_story.title, ! psl_story.story_id ! FROM psl_story, ! psl_permission_lut ! WHERE psl_story.story_id = psl_permission_lut.story_id ! AND psl_permission_lut.permission_id = '$permission_id'"; ! $this->db->query($q); ! while ($this->db->next_record()) { ! $go_ahead = false; ! $title = $this->db->Record["title"]; ! $story_id = $this->db->Record["story_id"]; ! $permission_name = $this->db->Record["permission_name"]; ! echo "Sorry, ths story is assigned to this permission:"; ! echo "<font color=\"red\">'$title'</font><br />\n"; ! } ! */ ! /* check for any submissions that are associated with this permission */ ! /* ! $q = "SELECT psl_submission.title, ! psl_submission.story_id ! FROM psl_submission, ! psl_permission_submission_lut ! WHERE psl_submission.story_id = psl_permission_submission_lut.story_id ! AND psl_permission_submission_lut.permission_id = '$permission_id'"; $this->db->query($q); while ($this->db->next_record()) { $go_ahead = false; ! $title = $this->db->Record["title"]; ! $story_id = $this->db->Record["story_id"]; ! $permission_name = $this->db->Record["permission_name"]; ! echo "Sorry, this submission is assigned to this permission:"; ! echo "<font color=\"red\">'$title'</font><br />\n"; } ! */ if (!$go_ahead) { ! $this->message = "Permission not deleted"; return false; } else { --- 797,819 ---- } ! // check for any groups that are associated with this permission ! ! $q = "SELECT psl_group.group_name, ! psl_group.group_id ! FROM psl_group, ! psl_group_permission_lut ! WHERE psl_group.group_id = psl_group_permission_lut.group_id ! AND psl_group_permission_lut.permission_id = '$permission_id'"; $this->db->query($q); while ($this->db->next_record()) { $go_ahead = false; ! $group_id = $this->db->Record["group_id"]; ! $group_name = $this->db->Record["group_name"]; ! $this->message = "Sorry, this permission is assigned to group ".$group_name."(".$group_id.")"; } ! ! if (!$go_ahead) { ! $this->message .= " Permission not deleted"; return false; } else { *************** *** 871,885 **** if($ary["permission_id"] == "") { - titlebar("100%","Add a new Permission"); $this->permission_templ->set_var(array( ! 'PERMISSION_ID' => "", ! 'PERMISSION_NAME' => "", ! 'PERMISSION_DESCRIPTION' => "", ! 'ACTION_URL' => $this->psl['phpself'] )); } else { ! titlebar("100%","Edit Permission"); ! $q = "SELECT permission_id, permission_name, permission_description --- 839,853 ---- if($ary["permission_id"] == "") { $this->permission_templ->set_var(array( ! 'TITLEBAR' => getTitlebar("100%","Add a new Permission"), ! 'PERMISSION_ID' => "", ! 'PERMISSION_NAME' => "", ! 'PERMISSION_DESCRIPTION' => "", ! 'ACTION_URL' => $this->psl['phpself'] )); } else { ! ! $q = "SELECT permission_id, permission_name, permission_description *************** *** 889,901 **** $this->db->next_record(); $this->permission_templ->set_var(array( ! 'PERMISSION_ID' => $this->db->Record["permission_id"], ! 'PERMISSION_NAME' => $this->db->Record["permission_name"], ! 'PERMISSION_DESCRIPTION' => $this->db->Record["permission_description"], ! 'ACTION_URL' => $this->psl['phpself'] )); } ! $this->permission_templ->parse('OUT',array("newpermission")); ! $this->permission_templ->p('OUT'); } --- 857,870 ---- $this->db->next_record(); $this->permission_templ->set_var(array( ! 'TITLEBAR' => getTitlebar("100%","Edit Permission"), ! 'PERMISSION_ID' => $this->db->Record["permission_id"], ! 'PERMISSION_NAME' => $this->db->Record["permission_name"], ! 'PERMISSION_DESCRIPTION' => $this->db->Record["permission_description"], ! 'ACTION_URL' => $this->psl['phpself'] )); } ! return $this->permission_templ->parse('OUT',array("newpermission")); ! // $this->permission_templ->p('OUT'); } *************** *** 963,969 **** while ($this->db->next_record()) { $permission_array[] = array( ! "id" => $this->db->f("permission_id"), ! "name" => $this->db->f("permission_name") ! ); } --- 932,938 ---- while ($this->db->next_record()) { $permission_array[] = array( ! "id" => $this->db->f("permission_id"), ! "name" => $this->db->f("permission_name") ! ); } |
From: Joe S. <joe...@us...> - 2002-06-17 20:30:42
|
Update of /cvsroot/phpslash/phpslash-ft/doc/html In directory usw-pr-cvs1:/tmp/cvs-serv19134/phpslash-ft/doc/html Modified Files: phpslash.sgml Log Message: group method returns Index: phpslash.sgml =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/doc/html/phpslash.sgml,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** phpslash.sgml 17 Jun 2002 16:54:51 -0000 1.42 --- phpslash.sgml 17 Jun 2002 20:30:39 -0000 1.43 *************** *** 776,779 **** --- 776,781 ---- emailNotifySubmission.tpl framedbox.tpl + groupList.tpl + groupNew.tpl loginblock.tpl loginformCR.tpl *************** *** 783,786 **** --- 785,790 ---- registerform.tpl openbox.tpl + permissionList.tpl + permissionNew.tpl sectionsList.tpl sectionsNew.tpl |
From: Joe S. <joe...@us...> - 2002-06-17 20:30:42
|
Update of /cvsroot/phpslash/phpslash-ft/public_html/templates/en/basic In directory usw-pr-cvs1:/tmp/cvs-serv19134/phpslash-ft/public_html/templates/en/basic Modified Files: groupList.tpl groupNew.tpl permissionList.tpl permissionNew.tpl Log Message: group method returns Index: groupList.tpl =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/templates/en/basic/groupList.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** groupList.tpl 23 May 2002 18:43:42 -0000 1.1 --- groupList.tpl 17 Jun 2002 20:30:39 -0000 1.2 *************** *** 1,4 **** <!-- groupList.tpl --> ! <TABLE BORDER=0 CELLPADDING=3> <TR> --- 1,4 ---- <!-- groupList.tpl --> ! {TITLEBAR} <TABLE BORDER=0 CELLPADDING=3> <TR> Index: groupNew.tpl =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/templates/en/basic/groupNew.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** groupNew.tpl 23 May 2002 18:43:42 -0000 1.1 --- groupNew.tpl 17 Jun 2002 20:30:39 -0000 1.2 *************** *** 1,3 **** --- 1,4 ---- <!-- Start groupNew.tpl --> + {TITLEBAR} <div id="topicNew"> <form action="{ACTION_URL}" method="post"> Index: permissionList.tpl =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/templates/en/basic/permissionList.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** permissionList.tpl 23 May 2002 18:43:42 -0000 1.1 --- permissionList.tpl 17 Jun 2002 20:30:39 -0000 1.2 *************** *** 1,4 **** <!-- permissionList.tpl --> ! <TABLE BORDER=0 CELLPADDING=3> <TR> --- 1,4 ---- <!-- permissionList.tpl --> ! {TITLEBAR} <TABLE BORDER=0 CELLPADDING=3> <TR> Index: permissionNew.tpl =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/templates/en/basic/permissionNew.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** permissionNew.tpl 23 May 2002 18:43:42 -0000 1.1 --- permissionNew.tpl 17 Jun 2002 20:30:39 -0000 1.2 *************** *** 1,3 **** --- 1,4 ---- <!-- permissionNew.tpl --> + {TITLEBAR} <form action="{ACTION_URL}" method="post"> <input type="hidden" name="permission_id" value="{PERMISSION_ID}"> |
From: Joe S. <joe...@us...> - 2002-06-17 20:30:41
|
Update of /cvsroot/phpslash/phpslash-ft In directory usw-pr-cvs1:/tmp/cvs-serv19134/phpslash-ft Modified Files: CHANGES Log Message: group method returns Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/CHANGES,v retrieving revision 1.520 retrieving revision 1.521 diff -C2 -d -r1.520 -r1.521 *** CHANGES 17 Jun 2002 18:02:04 -0000 1.520 --- CHANGES 17 Jun 2002 20:30:38 -0000 1.521 *************** *** 13,16 **** --- 13,20 ---- 9 - Removal of something (kill -9 :) + 2002-June-17 3:00PM CDT Joe Stewart <joe...@us...> + [WTD] - Group.class, groupAdmin.php3, groupList.tpl, groupNew.tpl, + phpslash.sgml - group methods return message and status to caller. + 2002-June-17 11:30AM CDT Joe Stewart <joe...@us...> [W] - Mailinglist.class, mailinglist.php3, mailinglistAdmin.php3 - |
From: Joe S. <joe...@us...> - 2002-06-17 18:02:09
|
Update of /cvsroot/phpslash/phpslash-ft/public_html/admin In directory usw-pr-cvs1:/tmp/cvs-serv8907/phpslash-ft/public_html/admin Modified Files: mailinglistAdmin.php3 Log Message: list method returns Index: mailinglistAdmin.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/admin/mailinglistAdmin.php3,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** mailinglistAdmin.php3 27 Apr 2002 21:07:50 -0000 1.4 --- mailinglistAdmin.php3 17 Jun 2002 18:02:05 -0000 1.5 *************** *** 13,22 **** *****************************/ ! slashhead($pagetitle,$xsiteobject); /* DEBUG */ ! debug("HTTP_POST_VARS", $HTTP_POST_VARS); ! debug("HTTP_GET_VARS", $HTTP_GET_VARS); /* DEBUG */ --- 13,22 ---- *****************************/ ! $auth->login_if(!$perm->have_perm('mailinglist')); /* DEBUG */ ! // debug("HTTP_POST_VARS", $HTTP_POST_VARS); ! // debug("HTTP_GET_VARS", $HTTP_GET_VARS); /* DEBUG */ *************** *** 24,27 **** --- 24,29 ---- $list = new MailingList; + $content = ''; + if ($perm->have_perm("mailinglist")) { *************** *** 29,75 **** case "newlist": /* this is how we can see the user page without logging out */ ! $list->newlist(); break; case "newsletter": ! $list->newsletterForm(); break; case "send_newsletter": ! $list->newsletterSend($HTTP_POST_VARS); break; case "subscribe": ! $list->subscribe($HTTP_POST_VARS); ! echo $list->message; ! break; case "unsubscribe": ! $list->unsubscribe($unsubscribe_address); ! echo $list->message; ! break; case "mass_delete": //debug("mass_del", $HTTP_POST_VARS["mass_del"]); $list->mass_delete($HTTP_POST_VARS["mass_del"]); ! break; ! case "unsubscribe": ! $list->unsubscribe($unsubscribe_address); break; default: ! $list->AdminMenu(); } ! } else { /* the general user stuff goes in here */ ! switch ($action) { ! case "subscribe": ! $list->subscribe($HTTP_POST_VARS); ! break; ! case "unsubscribe": ! $list->unsubscribe($unsubscribe_address); ! break; ! default: ! $list->newList(); } } slashfoot(); page_close(); ?> --- 31,131 ---- case "newlist": /* this is how we can see the user page without logging out */ ! $content .= $list->newlist(); break; case "newsletter": ! $content .= $list->newsletterForm(); break; case "send_newsletter": ! if($list->newsletterSend($HTTP_POST_VARS)) { ! $content .= getMessage($list->getMessage()); ! } else { ! $content .= getError($list->getMessage()); ! } break; case "subscribe": ! if($list->subscribe($HTTP_POST_VARS)) { ! $content .= getMessage($list->getMessage()); ! } else { ! $content .= getError($list->getMessage()); ! } ! break; case "unsubscribe": ! if($list->subscribe($HTTP_POST_VARS)) { ! $content .= getMessage($list->getMessage()); ! } else { ! $content .= getError($list->getMessage()); ! } ! break; case "mass_delete": //debug("mass_del", $HTTP_POST_VARS["mass_del"]); $list->mass_delete($HTTP_POST_VARS["mass_del"]); ! $content .= $list->getMessage(); break; default: ! if ($perm->have_perm("mailinglistList")) { ! $content .= $list->AdminMenu(); ! } } ! } else { ! $content = getTitlebar("100%","Error! Invalid Privileges"); ! $content .= "Sorry. You do not have the necessary privilege to view this page."; ! } ! $block = new Block_i; ! $ary['section'] = "Admin"; ! ! $breadcrumb = breadcrumb($ary); ! ! $_PSL['metatags']['object'] = $xsiteobject; ! ! slashhead($pagetitle,$_PSL['metatags']); ! ! $leftblocks = $block->getBlocks($ary, "left"); ! $centerblocks = $block->getBlocks($ary, "center"); ! $rightblocks = $block->getBlocks($ary, "right"); ! ! if (empty($leftblocks)) { ! if (empty($rightblocks)) { ! // $centerblocks = $block->getBlocks($ary); ! $tplfile = "index1col.tpl"; ! } else { ! $tplfile = 'index2colright.tpl'; } + } elseif (empty($rightblocks)) { + $tplfile = 'index2colleft.tpl'; + } else { + $tplfile = 'index3col.tpl'; } + $template = new Template($_PSL['templatedir']); + $template->debug = 0; + $template->set_file(array( + 'index' => $tplfile //"index3col.tpl" + )); + + if( !empty($GLOBALS['QUERY_STRING'])) { + $QUERY_STRING = '?'.$GLOBALS['QUERY_STRING']; + } else { + $QUERY_STRING = ''; + } + + $template->set_var(array( + 'QUERYSTRING' => $QUERY_STRING, + 'ROOTDIR' => $_PSL['rooturl'], + 'IMAGEDIR' => $_PSL['imageurl'], + 'BREADCRUMB' => $breadcrumb, + 'STORY_COLUMN' => $content, + 'LEFT_BLOCK_COLUMN' => $leftblocks, + 'CENTER_BLOCK_COLUMN' => $centerblocks, + 'RIGHT_BLOCK_COLUMN' => $rightblocks + )); + + $template->parse('OUT','index'); + $template->p('OUT'); + slashfoot(); page_close(); + ?> |
From: Joe S. <joe...@us...> - 2002-06-17 18:02:09
|
Update of /cvsroot/phpslash/phpslash-ft In directory usw-pr-cvs1:/tmp/cvs-serv8907/phpslash-ft Modified Files: CHANGES Log Message: list method returns Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/CHANGES,v retrieving revision 1.519 retrieving revision 1.520 diff -C2 -d -r1.519 -r1.520 *** CHANGES 17 Jun 2002 16:54:50 -0000 1.519 --- CHANGES 17 Jun 2002 18:02:04 -0000 1.520 *************** *** 14,17 **** --- 14,21 ---- 2002-June-17 11:30AM CDT Joe Stewart <joe...@us...> + [W] - Mailinglist.class, mailinglist.php3, mailinglistAdmin.php3 - + mailinglist methods return message and status to caller. + + 2002-June-17 11:30AM CDT Joe Stewart <joe...@us...> [WTD] - Poll.class, poll.php3, pollAdmin.php3, pollList.tpl, pollResultPage.tpl, phpslash.sgml - poll methods return message |
From: Joe S. <joe...@us...> - 2002-06-17 18:02:08
|
Update of /cvsroot/phpslash/phpslash-ft/class In directory usw-pr-cvs1:/tmp/cvs-serv8907/phpslash-ft/class Modified Files: MailingList.class Log Message: list method returns Index: MailingList.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/MailingList.class,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** MailingList.class 16 Mar 2002 17:15:12 -0000 1.9 --- MailingList.class 17 Jun 2002 18:02:05 -0000 1.10 *************** *** 46,58 **** function newList() { - titlebar("100%",pslgetText("Email Headline Updates")); - $this->templ->set_var(array( 'ACTION_URL' => $this->psl['phpself'], ! 'SITEOWNER' => $this->psl['site_owner'] )); ! $this->templ->parse('OUT',array("formmail")); ! $this->templ->p('OUT'); } --- 46,57 ---- function newList() { $this->templ->set_var(array( + 'TITLEBAR' => getTitlebar("100%",pslgetText("Email Headline Updates")), 'ACTION_URL' => $this->psl['phpself'], ! 'SITEOWNER' => $this->psl['site_owner'] )); ! return $this->templ->parse('OUT',array("formmail")); ! // $this->templ->p('OUT'); } *************** *** 97,102 **** break; default: ! echo "ERROR! ERROR! We're inside of the insertFrequency ! switch and hit the default. Now exiting!<BR><BR>\n"; exit; } --- 96,100 ---- break; default: ! $this->message = "ERROR! ERROR! We're inside of the insertFrequency switch and hit the default. Now exiting!<BR><BR>\n"; exit; } *************** *** 127,131 **** 'SITENAME' => $this->psl['site_name'], 'SITEOWNER' => $this->psl['site_owner'], ! 'MAILINGLIST_URL' => $this->psl['rooturl'] . "/mailinglistAdmin.php3", 'ADDRESS' => $to_address )); --- 125,129 ---- 'SITENAME' => $this->psl['site_name'], 'SITEOWNER' => $this->psl['site_owner'], ! 'MAILINGLIST_URL' => $this->psl['rooturl'] . "/mailinglist.php3", 'ADDRESS' => $to_address )); *************** *** 137,141 **** $this->templ->parse('OUT',array("unsubscribemail")); $body = $this->wrap_mail($this->templ->get('OUT'),76); ! $this->templ->p('OUT'); }; --- 135,140 ---- $this->templ->parse('OUT',array("unsubscribemail")); $body = $this->wrap_mail($this->templ->get('OUT'),76); ! $this->message = $this->templ->get('OUT'); ! // $this->templ->p('OUT'); }; *************** *** 236,244 **** function mass_delete($addresses) { ! print("<strong>".pslgetText("Unsubscribing all Mailing List Members")."<br></strong>\n"); $total = sizeof($addresses); while( list($num, $address) = each($addresses) ) { $num = $num + 1; // Array indexes start at 0, add 1 to get it "right" ! print("Unsubscribing: $address ($num of $total)<br>\n"); $this->unsubscribe($address); } --- 235,243 ---- function mass_delete($addresses) { ! $this->message = "<strong>".pslgetText("Unsubscribing all Mailing List Members")."<br></strong>\n"; $total = sizeof($addresses); while( list($num, $address) = each($addresses) ) { $num = $num + 1; // Array indexes start at 0, add 1 to get it "right" ! $this->message .= "Unsubscribing: $address ($num of $total)<br>\n"; $this->unsubscribe($address); } *************** *** 269,274 **** } ! $this->templ->parse('OUT',array("adminmail")); ! $this->templ->p('OUT'); } --- 268,273 ---- } ! return $this->templ->parse('OUT',array("adminmail")); ! // $this->templ->p('OUT'); } *************** *** 297,302 **** 'TO_YEAR' => "$to_year" )); ! $this->templ->parse('OUT',array("messageform")); ! $this->templ->p('OUT'); } --- 296,302 ---- 'TO_YEAR' => "$to_year" )); ! ! return $this->templ->parse('OUT',array("messageform")); ! // $this->templ->p('OUT'); } *************** *** 350,355 **** $this->templ->parse("rows","row",true); } //End While next_record ! $this->templ->parse('OUT',array("messagebodymail")); ! return $this->templ->get('OUT'); } //END FUNCTION --- 350,356 ---- $this->templ->parse("rows","row",true); } //End While next_record ! ! return $this->templ->parse('OUT',array("messagebodymail")); ! // return $this->templ->get('OUT'); } //END FUNCTION *************** *** 390,395 **** ignore_user_abort(); ! print(pslgetText("Now ignoring abort calls...")."<br>\n"); ! print(pslgetText("Sending mail to the following users:")."<br>\n"); flush(); --- 391,396 ---- ignore_user_abort(); ! $this->message = pslgetText("Now ignoring abort calls...")."<br>\n"; ! $this->message .= pslgetText("Sending mail to the following users:")."<br>\n"; flush(); *************** *** 413,417 **** } ! print("To: $email <$name>"); if ( ($dayback != $tmpDay) && ( !($ary['override']) ) ) { --- 414,418 ---- } ! $this->messge .= "To: $email <$name>"; if ( ($dayback != $tmpDay) && ( !($ary['override']) ) ) { *************** *** 433,437 **** $mail_subject = $ary['subject']; } ! print(" Subject: $mail_subject ->"); $this->templ->set_var(array( --- 434,438 ---- $mail_subject = $ary['subject']; } ! $this->message .= " Subject: $mail_subject ->"; $this->templ->set_var(array( *************** *** 443,450 **** if ( mail($email, $mail_subject, $final_body, "From: ".$ary['sender']) ) { ! echo pslgetText("Mail Sent Successfully!")."<br>\n"; } else { $errors[] = $email; ! print(pslgetText("Error Sending Email!")); debug("mailingList::newsletterSend::Error", $errors); } --- 444,451 ---- if ( mail($email, $mail_subject, $final_body, "From: ".$ary['sender']) ) { ! $this->message .= pslgetText("Mail Sent Successfully!")."<br>\n"; } else { $errors[] = $email; ! $this->message .= pslgetText("Error Sending Email!"); debug("mailingList::newsletterSend::Error", $errors); } *************** *** 452,461 **** } // End: while ( $this->db->next_record() ) ! } else { ! die("</td>".pslgetText("You didn't give a email subject! Halting.")."<br>\n"); } // End: if ( $ary['subject'] && $ary['body'] ) } // End of function } // End of class --- 453,475 ---- } // End: while ( $this->db->next_record() ) ! return true; } else { ! $this->message ="</td>".pslgetText("You didn't give a email subject! Halting.")."<br>\n"; ! return false; } // End: if ( $ary['subject'] && $ary['body'] ) } // End of function + + /** + * getMessage - returns message text + * + * simply returns the contents of the message variable + * + * @access public + */ + function getMessage() { + return pslgetText($this->message); + } + } // End of class |