Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Streda, 25. november 2026
O nás
Magazín
Otvorený softvér
CVS
Služby
Index  »  Projekty  »  phpMyEdit  »  Fórum  »  calendar popup problem

phpMyEdit General     calendar popup problem
Odoslať novú tému   Odpovedať na tému    
 
bentuinstra     Založený: 12.09.2004   Príspevky: 29  
Príspevok Zaslal: 2005-01-25 10:24
Návrat hore  Odpovedať s citátom     

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
Kód:


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     Založený: 12.09.2004   Príspevky: 29  
Príspevok Zaslal: 2005-01-25 10:37
Návrat hore  Odpovedať s citátom     

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     Založený: 17.12.2003   Príspevky: 236  
Príspevok Zaslal: 2005-01-25 19:10
Návrat hore  Odpovedať s citátom     

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     Založený: 12.09.2004   Príspevky: 29  
Príspevok Zaslal: 2005-01-26 09:03
Návrat hore  Odpovedať s citátom     

Thanks AJH,

I downloaded the htmlcal and now it works fine!

Cheers Ben

 
Odoslať novú tému   Odpovedať na tému    

Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok · Odkazový formulár · Prihláška
Upozorniť na chybu na PLATON.SK webstránke · Podmienky použitia · Ochrana osobných údajov