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_modules / postcalendar [ view in CVS ]


Deprecated: Function gmstrftime() is deprecated in /home/mikespub/www/list.php on line 509
Date Directory [filter] File(s) [view] Author [filter]
10 Sep 2002 16:22:56postnuke_modules/postcalendarpnadmin.php,1.29,1.30 smarty_plugins.php,1.2,1.3Roger Raymond
 admin submit/edit fixes

Update of /home/cvsroot/postnuke_modules/postcalendar
In directory ns7.hostnuke.net:/tmp/cvs-serv3318

Modified Files:
	pnadmin.php smarty_plugins.php 
Log Message:
admin submit/edit fixes


Index: pnadmin.php
===================================================================
RCS file: /home/cvsroot/postnuke_modules/postcalendar/pnadmin.php,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** pnadmin.php	10 Sep 2002 15:49:32 -0000	1.29
--- pnadmin.php	10 Sep 2002 16:22:53 -0000	1.30
***************
*** 798,802 ****
      $form_action = pnVarCleanFromInput('form_action');
      $pc_event_id = pnVarCleanFromInput('pc_event_id');
!     
      // get the theme globals :: is there a better way to do this?
      pnThemeLoad(pnUserGetTheme());
--- 798,802 ----
      $form_action = pnVarCleanFromInput('form_action');
      $pc_event_id = pnVarCleanFromInput('pc_event_id');
!     $is_update   = pnVarCleanFromInput('is_update');
      // get the theme globals :: is there a better way to do this?
      pnThemeLoad(pnUserGetTheme());
***************
*** 887,890 ****
--- 887,891 ----
          $event_duration = (60*60*$event_dur_hours) + (60*$event_dur_minutes);
      } else {
+         $is_update = 1;
          // we need to get the event data from the DB
          $event = postcalendar_userapi_pcGetEventDetails($pc_event_id);
***************
*** 1033,1039 ****
                                                                                    'uname'=>$uname,
                                                                                    'event_duration'=>$event_duration)));
-             $output->Linebreak();
-             $output->Text('<input type="submit" name="commit" value="'._PC_EVENT_SUBMIT.'">');
              $output->Linebreak(2);
          }
      }
--- 1034,1040 ----
                                                                                    'uname'=>$uname,
                                                                                    'event_duration'=>$event_duration)));
              $output->Linebreak(2);
+             //$output->Text('<input type="submit" name="commit" value="'._PC_EVENT_SUBMIT.'">');
+             //$output->Linebreak(2);
          }
      }
***************
*** 1070,1073 ****
--- 1071,1075 ----
          }
          
+         if(!isset($is_update)) {
          $sql = "INSERT INTO $events_table (
                      $events_column[title],
***************
*** 1105,1109 ****
                      '".pnVarPrepForStore($event_allday)."',
                      '".pnVarPrepForStore($event_category)."',
!                     '".pnVarPrepForStore($event_location)."',
                      '".pnVarPrepForStore($event_conttel)."',
                      '".pnVarPrepForStore($event_contname)."',
--- 1107,1111 ----
                      '".pnVarPrepForStore($event_allday)."',
                      '".pnVarPrepForStore($event_category)."',
!                     '".pnVarPrepForStore($event_location_info)."',
                      '".pnVarPrepForStore($event_conttel)."',
                      '".pnVarPrepForStore($event_contname)."',
***************
*** 1115,1121 ****
                      '".pnVarPrepForStore($event_duration)."'
                      )";
          
-         //$output->Text('<pre>'.$sql.'</pre>');
-         /**/
          $dbconn->Execute($sql);
          if ($dbconn->ErrorNo() != 0) {
--- 1117,1124 ----
                      '".pnVarPrepForStore($event_duration)."'
                      )";
+         } else {
+             // we need to do an update
+         }
          
          $dbconn->Execute($sql);
          if ($dbconn->ErrorNo() != 0) {
***************
*** 1134,1141 ****
              $event_contname=$event_contemail=$event_website=
              $event_fee=$event_status=$event_category=$event_endtype=
!             $event_recurrspec=$event_duration=$event_repeat = null;
          }
-         /**/
-         
      }
  
--- 1137,1142 ----
              $event_contname=$event_contemail=$event_website=
              $event_fee=$event_status=$event_category=$event_endtype=
!             $event_recurrspec=$event_duration=$event_repeat=$is_update = null;
          }
      }
  
***************
*** 1187,1190 ****
--- 1188,1193 ----
      $tpl->assign('TimedDurationMinutesTitle',_PC_TIMED_DURATION_MINUTES);
      $tpl->assign('EventDescTitle',          _PC_EVENT_DESC);
+     // needed for admin
+     $tpl->assign('is_update',$is_update);
         
      //=================================================================

Index: smarty_plugins.php
===================================================================
RCS file: /home/cvsroot/postnuke_modules/postcalendar/smarty_plugins.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** smarty_plugins.php	10 Sep 2002 15:16:24 -0000	1.2
--- smarty_plugins.php	10 Sep 2002 16:22:53 -0000	1.3
***************
*** 46,54 ****
          $time += (pnUserGetVar('timezone_offset') - pnConfigGetVar('timezone_offset')) * 3600;
          if(!empty($jumpday) || !empty($jumpmonth) || !empty($jumpyear)) {
!             $Date = "$jumpmonth/$jumpday/$jumpyear";
          } else {
              $time = time();
              $time += (pnUserGetVar('timezone_offset') - pnConfigGetVar('timezone_offset')) * 3600;
!             $Date = ml_ftime('%m/%d/%Y',$time);
          }
      }
--- 46,54 ----
          $time += (pnUserGetVar('timezone_offset') - pnConfigGetVar('timezone_offset')) * 3600;
          if(!empty($jumpday) || !empty($jumpmonth) || !empty($jumpyear)) {
!             $Date = "$jumpyear$jumpmonth$jumpday";
          } else {
              $time = time();
              $time += (pnUserGetVar('timezone_offset') - pnConfigGetVar('timezone_offset')) * 3600;
!             $Date = ml_ftime('%Y%m%d',$time);
          }
      }
***************
*** 56,59 ****
--- 56,62 ----
          case 'submit' :
              echo pnModURL('postcalendar','user','submit',array('tplview'=>$template_view,'Date'=>$Date));
+             break;
+         case 'submit-admin' :
+             echo pnModURL('postcalendar','admin','submit',array('tplview'=>$template_view,'Date'=>$Date));
              break;
          case 'search' :


Directory filter : [ all ] / postnuke_modules / postcalendar [ 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