Xaraya / Postnuke CVS Notices - Message

Note: this list is kept only as a demonstration for CVSNotice. For the latest CVS notices, see the Xaraya and Postnuke sites

View Statistics - Next Notice - Previous Notice

Directory filter : [ all ] / postnuke_official / html / modules / ns-addstory [ view in CVS ]

Date Directory [filter] File(s) [view] Author [filter]
04 Aug 2002 22:07:25postnuke_official/html/modules/ns-addstoryaddstory_categories.php,1.16.2.1,1.16.2.2 addstory_functions.php,1.17.2.2,1.17.2.3 admin.php,1.46.2.11,1.46.2.12John Cox
 ROLLBACK -- Will fix later in the week.

Update of /home/cvsroot/postnuke_official/html/modules/ns-addstory
In directory ns7.hostnuke.net:/tmp/cvs-serv23796/html/modules/ns-addstory

Modified Files:
      Tag: PostNuke_71
	addstory_categories.php addstory_functions.php admin.php 
Log Message:
ROLLBACK -- Will fix later in the week.


Index: addstory_categories.php
===================================================================
RCS file: /home/cvsroot/postnuke_official/html/modules/ns-addstory/Attic/addstory_categories.php,v
retrieving revision 1.16.2.1
retrieving revision 1.16.2.2
diff -C2 -d -r1.16.2.1 -r1.16.2.2
*** addstory_categories.php	4 Aug 2002 21:43:29 -0000	1.16.2.1
--- addstory_categories.php	4 Aug 2002 22:07:22 -0000	1.16.2.2
***************
*** 28,32 ****
  // ----------------------------------------------------------------------
  
- 
  // Notes by AV
  // OK, the idea is to make 'Categories' manager a bit more intuitive to work with:
--- 28,31 ----
***************
*** 35,47 ****
  // 3. Every 'Category' modification menu contains and/or ends up with further logical actions
  
- 
  if (!eregi($currentFile, $PHP_SELF)) { die ("Access Denied"); }
  
- 
  function _admin_cat_theme_list($selectname, $defaulttheme)
  {
      $r = "<select name=\"${selectname}\">";
  
- 
      $r .= "<option value=\"\"";
      if ($defaulttheme == "") {
--- 34,43 ----
***************
*** 50,54 ****
      $r .= ">"._CATOVERRIDENONE."</option>";
  
- 
      $handle = opendir('themes');
      $themelist = array();
--- 46,49 ----
***************
*** 60,64 ****
      closedir($handle);
  
- 
      sort($themelist);
      for ($i = 0; $i < sizeof($themelist); ++$i) {
--- 55,58 ----
***************
*** 72,83 ****
      }
  
- 
      $r .= "</select>";
  
- 
      return ($r);
  }
  
- 
  function AddCategory()
  {
--- 66,74 ----
***************
*** 90,94 ****
      echo "<br>";
  
- 
      if (!pnSecAuthAction(0, 'Stories::Category', '::', ACCESS_ADD)) {
          echo _STORIESADDCATNOAUTH;
--- 81,84 ----
***************
*** 97,101 ****
      }
  
- 
      OpenTable();
      echo "<center><font class=\"pn-title\"><b>"._CATEGORYADD."</b></font><br>"
--- 87,90 ----
***************
*** 111,119 ****
      CloseTable();
  
- 
      include ("footer.php");
  }
  
- 
  function EditCategory($catid)
  {
--- 100,106 ----
***************
*** 121,129 ****
  	   $opPrefix;
  
- 
      list($dbconn) = pnDBGetConn();
      $pntable = pnDBGetTables();
  
- 
      $catid += 0;
      $column = &$pntable['stories_cat_column'];
--- 108,114 ----
***************
*** 132,139 ****
                                 WHERE $column[catid] = '$catid'");
  
- 
      list($title, $themeoverride) = $result->fields;
  
- 
      include ("header.php");
      GraphicAdmin();
--- 117,122 ----
***************
*** 143,147 ****
      echo "<br>";
  
- 
      if (!pnSecAuthAction(0, 'Stories::Category', "$title::$catid", ACCESS_EDIT)) {
          echo _STORIESEDITCATNOAUTH;
--- 126,129 ----
***************
*** 150,157 ****
      }
  
- 
      OpenTable();
  
- 
      echo "<center><font class=\"pn-title\"><b>"._EDITCATEGORY."</b></font><br>";
      if (!$catid) {
--- 132,137 ----
***************
*** 165,169 ****
  //        echo "<option name=\"catid\" value=\"0\" $selcat>Articles</option>";
  
- 
          while(list($catid, $title) = $selcat->fields) {
              echo "<option name=\"catid\" value=\"$catid\" $selcat>".pnVarPrepForDisplay($title)."</option>";
--- 145,148 ----
***************
*** 196,205 ****
      echo "</center>";
  
- 
      CloseTable();
      include("footer.php");
  }
  
- 
  // we need $catid param to be able to carry on from previous op
  function DelCategory($cat, $catid)
--- 175,182 ----
***************
*** 209,217 ****
  	   $ModName;
  
- 
      list($dbconn) = pnDBGetConn();
      $pntable = pnDBGetTables();
  
- 
      include ("header.php");
      GraphicAdmin();
--- 186,192 ----
***************
*** 221,225 ****
      echo "<br>";
  
- 
      $column = &$pntable['stories_cat_column'];
      $result = $dbconn->Execute("SELECT $column[title]
--- 196,199 ----
***************
*** 227,234 ****
                                WHERE $column[catid]='$cat'");
  
- 
  	list($title) = $result->fields;
  
- 
      if (!pnSecAuthAction(0, 'Stories::Category', "$title::$cat", ACCESS_DELETE)) {
          echo _STORIESDELCATNOAUTH;
--- 201,206 ----
***************
*** 237,248 ****
      }
  
- 
      OpenTable();
      echo "<center><font class=\"pn-title\"><b>"._DELETECATEGORY."</b></font><br>";
  
- 
      if (isset($catid)) {
  
- 
      $column = &$pntable['stories_cat_column'];
      $thiscat = $dbconn->Execute( "SELECT $column[catid]
--- 209,217 ----
***************
*** 251,260 ****
      list($thiscat) = $thiscat->fields;
  
- 
      $column = &$pntable['stories_cat_column'];
      $selcat = $dbconn->Execute("SELECT $column[catid], $column[title]
                                FROM $pntable[stories_cat]");
  
- 
      echo "<form action=\"$currentFile\" method=\"post\">"
          ."<table border=\"3\" cellpadding=\"4\"><tr><td>"
--- 220,227 ----
***************
*** 263,270 ****
          ."<select name=\"cat\">";
  
- 
      while(list($catid, $title) = $selcat->fields) {
  
- 
          if ($catid == $thiscat) {
              $sel = "selected ";
--- 230,235 ----
***************
*** 274,278 ****
              echo "<option name=\"cat\" value=\"$catid\" $sel>".pnVarPrepForDisplay($title)."</option>";
  
- 
          $selcat->MoveNext();
      }
--- 239,242 ----
***************
*** 286,290 ****
      } else {
  
- 
          /* Get a quick count of the rows - Wandrer */
          $column = &$pntable['stories_column'];
--- 250,253 ----
***************
*** 292,299 ****
                                     WHERE $column[catid]='$cat'");
  
- 
          list($numrows) = $result2->fields;
  
- 
          if ($numrows == 0) {
              $temp= &$pntable['stories_cat_column']['catid']; // TRICKY BIT - may need to be changed
--- 255,260 ----
***************
*** 320,333 ****
  }
  
- 
  function YesDelCategory($catid)
  {
      global $currentFile;
  
- 
      list($dbconn) = pnDBGetConn();
      $pntable = pnDBGetTables();
  
- 
      $column = &$pntable['stories_cat_column'];
      $result = $dbconn->Execute("SELECT $column[title]
--- 281,291 ----
***************
*** 335,342 ****
                                WHERE $column[catid]='$catid'");
  
- 
      list($title) = $result->fields;
  
- 
      if (!pnSecAuthAction(0, 'Stories::Category', "$title::$cat", ACCESS_DELETE)) {
          echo _STORIESDELCATNOAUTH;
--- 293,298 ----
***************
*** 352,356 ****
      }
  
- 
      $column = &$pntable['stories_column'];
      $result = $dbconn->Execute("SELECT $column[sid]
--- 308,311 ----
***************
*** 358,362 ****
                                WHERE $column[catid]='$catid'");
  
- 
      while(list($sid) = $result->fields) {
          $results = $dbconn->Execute("DELETE FROM $pntable[stories]
--- 313,316 ----
***************
*** 392,396 ****
  }
  
- 
  function NoMoveCategory($catid, $newcat)
  {
--- 346,349 ----
***************
*** 398,406 ****
  	   $opPrefix;
  
- 
      list($dbconn) = pnDBGetConn();
      $pntable = pnDBGetTables();
  
- 
      $column = &$pntable['stories_cat_column'];
      $result = $dbconn->Execute("SELECT $column[title]
--- 351,357 ----
***************
*** 408,412 ****
                                WHERE $column[catid]='$catid'");
  
- 
      list($title) = $result->fields;
      include ("header.php");
--- 359,362 ----
***************
*** 417,421 ****
      echo "<br>";
  
- 
      if (!pnSecAuthAction(0, 'Stories::Category', "$title::$catid", ACCESS_DELETE)) {
          echo _STORIESMOVECATNOAUTH;
--- 367,370 ----
***************
*** 424,428 ****
      }
  
- 
      OpenTable();
      echo "<center><font class=\"pn-title\"><b>"._MOVESTORIES."</b></font><br><br>";
--- 373,376 ----
***************
*** 437,441 ****
   //       echo "<option name=\"newcat\" value=\"0\">"._ARTICLES."</option>";
  
- 
          while(list($newcat, $title) = $selcat->fields) {
              if (pnSecAuthAction(0, 'Stories::Story', ":$title:", ACCESS_ADD))
--- 385,388 ----
***************
*** 456,460 ****
                                     WHERE $column[catid]='$catid'");
  
- 
          while(list($sid) = $resultm->fields) {
              $column = &$pntable['stories_column'];
--- 403,406 ----
***************
*** 484,502 ****
  }
  
- 
  function SaveEditCategory($catid, $title, $themeoverride)
  {
      global $currentFile;
  
- 
      list($title,
            $themeoverride) = pnVarCleanFromInput('title',
                                        'themeoverride');
  
- 
      list($dbconn) = pnDBGetConn();
      $pntable = pnDBGetTables();
  
- 
      if (!pnSecAuthAction(0, 'Stories::Category', "$title::$catid", ACCESS_EDIT)) {
          include 'header.php';
--- 430,444 ----
***************
*** 506,513 ****
      }
  
- 
      $catid += 0;
  
- 
      $column = &$pntable['stories_cat_column'];
      $check = $dbconn->Execute("SELECT $column[catid]
--- 448,453 ----
***************
*** 532,536 ****
      }
  
- 
      include ("header.php");
      GraphicAdmin();
--- 472,475 ----
***************
*** 546,564 ****
  }
  
- 
  function SaveCategory($title, $themeoverride)
  {
      global $currentFile;
  
- 
          list($title,
               $themeoverride) = pnVarCleanFromInput('title',
  						   'themeoverride');
  
- 
      list($dbconn) = pnDBGetConn();
      $pntable = pnDBGetTables();
  
- 
      if (!pnSecAuthAction(0, 'Stories::Category', "$title::", ACCESS_ADD)) {
          include 'header.php';
--- 485,499 ----
***************
*** 568,572 ****
      }
  
- 
      $column = &$pntable['stories_cat_column'];
      $check = $dbconn->Execute("SELECT $column[catid]
--- 503,506 ----
***************
*** 591,595 ****
      }
  
- 
      include ("header.php");
      GraphicAdmin();
--- 525,528 ----
***************
*** 609,613 ****
  }
  
- 
  function SelectCategory($cat)
  {
--- 542,545 ----
***************
*** 615,623 ****
  	   $opPrefix;
  
- 
      list($dbconn) = pnDBGetConn();
      $pntable = pnDBGetTables();
  
- 
      $column = &$pntable['stories_cat_column'];
      $selcat = $dbconn->Execute("SELECT $column[catid], $column[title]
--- 547,553 ----
***************
*** 625,629 ****
      echo "<b>"._CATEGORY."</b> ";
  
- 
      echo "<select name=\"catid\" class=\"pn-text\">";
      if ($cat == 0) {
--- 555,558 ----
***************
*** 636,640 ****
      }
  
- 
      while(list($catid, $title) = $selcat->fields) {
          if ($catid == $cat) {
--- 565,568 ----
***************
*** 650,664 ****
      echo "</select>";
  
- 
      add_edit_del_category($cat);
  
- 
  }
  
- 
  // below are helper API function for this module
  // probably they will be made redundant in later releases (AV)
  
- 
  function add_edit_del_category($cat)
  {
--- 578,588 ----
***************
*** 666,670 ****
  	   $opPrefix;
  
- 
      if (pnSecAuthAction(0, 'Stories::Category', '::', ACCESS_DELETE)) {
          echo ' [ <a href="'.$currentFile.'?module='.$GLOBALS["module"].'&amp;op='.$opPrefix.'AddCategory">'._ADD.'</a>';
--- 590,593 ----
***************
*** 678,680 ****
--- 601,604 ----
  	}
  }
+ 
  ?>

Index: addstory_functions.php
===================================================================
RCS file: /home/cvsroot/postnuke_official/html/modules/ns-addstory/Attic/addstory_functions.php,v
retrieving revision 1.17.2.2
retrieving revision 1.17.2.3
diff -C2 -d -r1.17.2.2 -r1.17.2.3
*** addstory_functions.php	4 Aug 2002 21:43:01 -0000	1.17.2.2
--- addstory_functions.php	4 Aug 2002 22:07:22 -0000	1.17.2.3
***************
*** 1,4 ****
  <?php
- 
  // File: $Id$
  // ----------------------------------------------------------------------
--- 1,3 ----
***************
*** 30,34 ****
  if (!eregi($currentFile, $PHP_SELF)) { die ("Access Denied"); }
  
- 
  function puthome($ihome)
  {
--- 29,32 ----
***************
*** 47,51 ****
  }
  
- 
  function withcomments($comm) {
      echo "<br><b>"._ALLOWCOMMENTS."</b>&nbsp;&nbsp;";
--- 45,48 ----
***************
*** 62,66 ****
  }
  
- 
  // added by EB to reuse the code
  function storyPreview($subject, $hometext, $bodytext="", $notes="", $topic)
--- 59,62 ----
***************
*** 74,82 ****
  	   $opPrefix;
  
- 
      list($dbconn) = pnDBGetConn();
      $pntable = pnDBGetTables();
  
- 
      list($subject,
           $hometext,
--- 70,76 ----
***************
*** 90,94 ****
                                          $notes));
  
- 
      $column = &$pntable['topics_column'];
      $result=$dbconn->Execute("SELECT $column[topicimage]
--- 84,87 ----
***************
*** 96,100 ****
                              WHERE $column[topicid]=" . pnVarPrepForDisplay($topic));
  
- 
      list($topicimage) = $result->fields;
      $tipath = pnConfigGetVar('tipath');
--- 89,92 ----
***************
*** 111,115 ****
  }
  
- 
  // added by EugenioBaldi to reuse the code
  function storyEdit($subject, $hometext, $bodytext, $notes, $topic, $ihome, $catid, $alanguage, $comm, $aid, $informant)
--- 103,106 ----
***************
*** 121,129 ****
             $opPrefix;
  
- 
      list($dbconn) = pnDBGetConn();
      $pntable = pnDBGetTables();
  
- 
      echo "<b>"._TITLE."</b><br>"
          ."<input type=\"text\" name=\"subject\" size=\"50\" value=\"" . pnVarPrepForDisplay($subject) . "\"><br><br>";
--- 112,118 ----
***************
*** 147,151 ****
  }
  
- 
  // added by AV to reuse the code
  function buildLanguageMenu($inheritselection, $alanguage){
--- 136,139 ----
***************
*** 189,202 ****
  }
  
- 
  // added by AV to reuse the code
  function buildTopicsMenu($topic)
  {
  
- 
      list($dbconn) = pnDBGetConn();
      $pntable = pnDBGetTables();
  
- 
  	$column = &$pntable['topics_column'];
  	$toplist = $dbconn->Execute("SELECT $column[topicid], $column[topictext]
--- 177,187 ----
***************
*** 206,210 ****
  	echo "<option value=\"\">"._SELECTTOPIC."</option>\n";
  
- 
  	while(list($topicid, $topics) = $toplist->fields) {
  		if ($topicid == $topic) {
--- 191,194 ----
***************
*** 220,224 ****
  }
  
- 
  // added by AV to reuse the code
  function buildCalendarMenu($automated, &$year, &$day, &$month, &$hour, &$min)
--- 204,207 ----
***************
*** 248,253 ****
      }
      $date = "$tmonth $tday, $tyear @ $thour:$tmin:$tsec"; /* ML get the language from the queue table */
  	if(!$automated){
!     	echo ""._NOWIS.": $date<br><br>";
  		echo ""._HOUR.": <select name=\"hour\" class=\"pn-text\">";
  		$hour = 0;
--- 231,237 ----
      }
      $date = "$tmonth $tday, $tyear @ $thour:$tmin:$tsec"; /* ML get the language from the queue table */
+ 	$formatted_date = ml_ftime(""._DATETIMELONG."", mktime($today['hours'],$today['minutes'],$today['seconds'],$today['mon'],$today['mday'],$today['year']));
  	if(!$automated){
!     	echo ""._NOWIS.": $formatted_date<br><br>";
  		echo ""._HOUR.": <select name=\"hour\" class=\"pn-text\">";
  		$hour = 0;
***************
*** 298,305 ****
  		echo "</select>&nbsp;&nbsp;";
  		$date = getdate();
  		$year = $date['year'];
  		echo ""._YEAR.": <input type=\"text\" name=\"year\" value=\"$year\" size=\"5\" maxlength=\"4\"><br>";
  		}else{
!     	echo ""._NOWIS.": $date<br><br>";
  		echo ""._HOUR.": <select name=\"hour\" class=\"pn-text\">";
  		$xhour = 0;
--- 282,290 ----
  		echo "</select>&nbsp;&nbsp;";
  		$date = getdate();
+ 		$formatted_date = ml_ftime(""._DATETIMELONG."", mktime($date['hours'],$date['minutes'],$date['seconds'],$date['mon'],$date['mday'],$date['year']));
  		$year = $date['year'];
  		echo ""._YEAR.": <input type=\"text\" name=\"year\" value=\"$year\" size=\"5\" maxlength=\"4\"><br>";
  		}else{
!     	echo ""._NOWIS.": $formatted_date<br><br>";
  		echo ""._HOUR.": <select name=\"hour\" class=\"pn-text\">";
  		$xhour = 0;
***************
*** 362,366 ****
  		}
  }
- 
  
  function buildProgramStoryMenu($automated){
--- 347,350 ----

Index: admin.php
===================================================================
RCS file: /home/cvsroot/postnuke_official/html/modules/ns-addstory/Attic/admin.php,v
retrieving revision 1.46.2.11
retrieving revision 1.46.2.12
diff -C2 -d -r1.46.2.11 -r1.46.2.12
*** admin.php	4 Aug 2002 21:43:29 -0000	1.46.2.11
--- admin.php	4 Aug 2002 22:07:22 -0000	1.46.2.12
***************
*** 28,32 ****
  // ----------------------------------------------------------------------
  
- 
  // Modifications by Andy Varganov - the file was almost unmanageable with
  // more than 2500 lines of code, so I have splitted it in three parts:
--- 28,31 ----
***************
*** 37,58 ****
  
  
[...1261 lines suppressed...]
          case "submissions":
              submissions();
              break;
  
- 
          default:
              adminStory();
--- 1585,1668 ----
***************
*** 1859,1867 ****
  }
  
- 
  function unnltobr($text) {
      return (preg_replace('/(<br[ \/]*?>)/i', "", $text));
  }
- 
  
  ?>
--- 1672,1678 ----


Directory filter : [ all ] / postnuke_official / html / modules / ns-addstory [ view in CVS ]

View Statistics - Next Notice - Previous Notice


Visit Developer Site - Browse CVS Repository Syndicate via backend.rss
(max. once per hour please)
Powered by CVSNotice 0.1.3