[ Index ] |
|
Code source de eGroupWare 1.2.106-2 |
1 <?php 2 /**************************************************************************\ 3 * eGroupWare SiteMgr - Web Content Management * 4 * http://www.egroupware.org * 5 * -------------------------------------------- * 6 * This program is free software; you can redistribute it and/or modify it * 7 * under the terms of the GNU General Public License as published by the * 8 * Free Software Foundation; either version 2 of the License, or (at your * 9 * option) any later version. * 10 \**************************************************************************/ 11 12 /* $Id: class.module_hello.inc.php 13729 2004-02-10 14:56:34Z ralfbecker $ */ 13 14 class module_hello extends Module 15 { 16 function module_hello() 17 { 18 $this->arguments = array( 19 'name' => array( 20 'type' => 'textfield', 21 'label' => lang('The person to say hello to') 22 ) 23 ); 24 $this->post = array('name' => array('type' => 'textfield')); 25 $this->session = array('name'); 26 $this->title = lang('Hello world'); 27 $this->description = lang('This is a simple sample module'); 28 } 29 30 function get_content(&$arguments,$properties) 31 { 32 $this->validate($arguments); 33 return lang('Hello') . ' ' . $arguments['name'] . '<br><form method="post">' . 34 $this->build_post_element('name',lang('Enter a name')) . 35 '</form>'; 36 } 37 38 function validate(&$data) 39 { 40 if (preg_match("/[[:upper:]]/",$data['name'])) 41 { 42 $data['name'] = strtolower($data['name']); 43 $this->validation_error = lang('Name has been translated to lower case'); 44 } 45 return true; 46 } 47 }
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Feb 25 17:20:01 2007 | par Balluche grâce à PHPXref 0.7 |