Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Wednesday, April 29, 2026
About Us
Magazine
Open Source
CVS
Services
Index  »  Projects  »  phpMyEdit  »  Forum  »  calendar popup problem

phpMyEdit General     calendar popup problem
Post new topic   Reply to topic    
 
bentuinstra     Joined: 12 Sep 2004   Posts: 29  
Post Posted: 2005-01-25 10:24
Back to top  Reply with quote     

Hi All,

Since a few days I'm experimenting with the calendar popup but encounter problems with it.

When I include the calendar popup I cannot write a record to the database. If I remove it, it works again.

Using all latest CVS code.
I've included my code below.

Anybody?

Cheers Ben
Code:


Table definitions:

CREATE TABLE `telefoonlijst` (
  `USERID` varchar(8) NOT NULL default '',
  `NAAM` varchar(50) NOT NULL default '',
  `VOORNAAM` varchar(15) default NULL,
  `ACHTERNAAM` varchar(25) default NULL,
  `FUNCTIE` varchar(25) default NULL,
  `AFDELING` varchar(20) NOT NULL default '',
  `TELEFOON` varchar(15) NOT NULL default '',
  `VERKORT` varchar(5) default NULL,
  `MOBIEL` varchar(15) default NULL,
  `REGELNR` int(8) default '0',
  `MEDEWERKER` set('YES','NO') default 'NO',
  `OMSCHRIJVING` longtext,
  `ID` int(11) NOT NULL auto_increment,
  PRIMARY KEY  (`ID`),
  UNIQUE KEY `NAAM` (`NAAM`,`TELEFOON`)
) TYPE=MyISAM;

CREATE TABLE `afwezig` (
  `id` int(11) NOT NULL auto_increment,
  `naam` varchar(25) NOT NULL default '',
  `type` varchar(15) NOT NULL default 'VAKANTIE',
  `begin` date NOT NULL default '0000-00-00',
  `eind` date NOT NULL default '0000-00-00',
  PRIMARY KEY  (`id`)
) TYPE=MyISAM AUTO_INCREMENT=73 ;

The code:

<html>
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
   <title>Vakantie Kalender</title>
   <script type="text/javascript" src="/java/jscalendar/calendar.js"></script>
   <script type="text/javascript" src="/java/jscalendar/lang/calendar-en.js"></script>
   <script type="text/javascript" src="/java/jscalendar/calendar-setup.js"></script>
   <link rel="stylesheet"type="text/css" media="screen" href="/java/jscalendar/calendar-system.css">
</head>
</HTML>
<?php

// Name of field which is the unique key
$opts['key'] = 'id';

// Type of key field (int/real/string/date etc.)
$opts['key_type'] = 'int';

// Sorting field(s)
$opts['sort_field'] = array('naam');

// Number of records to display on the screen
// Value of -1 lists all records in a table
$opts['inc'] = 28;

// Options you wish to give the users
// A - add,  C - change, P - copy, V - view, D - delete,
// F - filter, I - initial sort suppressed
$opts['options'] = 'ACPVDF';

// Number of lines to display on multiple selection filters
$opts['multiple'] = '4';

// Navigation style: B - buttons (default), T - text links, G - graphic links
// Buttons position: U - up, D - down (default)
$opts['navigation'] = 'GU';

// Display special page elements
$opts['display'] = array(
        'form'  => true,
        'query' => true,
        'sort'  => true,
        'time'  => true,
        'tabs'  => true
);

$opts['fdd']['id'] = array(
  'name'     => 'ID',
  'select'   => 'T',
  'options'  => 'AVCPDR', // auto increment
  'maxlen'   => 11,
  'default'  => '0',
  'sort'     => true
);
$opts['fdd']['naam']['values']['table']   =  'telefoonlijst';
$opts['fdd']['naam']['values']['column']  =  'naam';
$opts['fdd']['naam']['name'] = 'Medewerker';
$opts['fdd']['naam']['select'] = 'D';
$opts['fdd']['naam']['sort'] = 'true';
$opts['fdd']['naam']['values']['filters']='medewerker = "yes"';

$opts['fdd']['type'] = array(
  'name'     => 'Type',
  'select'   => 'T',
  'maxlen'   => 15,
  'default'=>'VAKANTIE',
  'required' => false,
  'sort'     => true
);
$opts['fdd']['begin'] = array(
  'name'     => 'Begin',
  'select'   => 'T',
  'maxlen'   => 10,
'options'  => 'ACPVDL',
  'calendar' => true,
  'required' => true,
  'sort'     => true
);
$opts['fdd']['eind'] = array(
  'name'     => 'Eind',
  'select'   => 'T',
  'maxlen'   => 10,
'options'  => 'ACPVDL',
  'calendar' => true,
  'required' => true,
  'sort'     => true
);


require_once '/Windows/public/intranet/phpMyEdit/extensions/phpMyEdit-calpopup.class.php';
require_once '/Windows/public/intranet/apps/default.inc';
new phpMyEdit_calpopup($opts);

?>


 
bentuinstra     Joined: 12 Sep 2004   Posts: 29  
Post Posted: 2005-01-25 10:37
Back to top  Reply with quote     

EXTRA INFO

Found out that the record is written to the database with empty name and type and with '0000-00-00' for both datefields.

 
ajh     Joined: 17 Dec 2003   Posts: 236  
Post Posted: 2005-01-25 19:10
Back to top  Reply with quote     

The calpopup extension in the CVS will not work with the latest CVS version of PME. Please use the version that is posted on bug #297 http://opensource.platon.sk/projects/bug_view_advanced_page.php?f_bug_id=297

The calpopup and htmlarea extensions in the CVS will be deleted shortly to be replaced by this new version.

Also - please ensure that you are using the latest version of PME from the CVS - this extension will not work with the 5.4 release.

 
bentuinstra     Joined: 12 Sep 2004   Posts: 29  
Post Posted: 2005-01-26 09:03
Back to top  Reply with quote     

Thanks AJH,

I downloaded the htmlcal and now it works fine!

Cheers Ben

 
Post new topic   Reply to topic    

Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top · Feedback form · Application form
Report bug on PLATON.SK website · Terms of use · Privacy policy