mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 07:53:39 +01:00
Updated CodeCorner3 (markdown)
parent
d57b734de7
commit
ac03c24d01
@ -327,31 +327,37 @@ This function is added to the <em>class.test_ui.inc.php</em> file.
|
||||
|
||||
<hr style="text-align: left; width: 99%;" />
|
||||
<pre>
|
||||
function index($content=null)
|
||||
{
|
||||
$debug=false;
|
||||
if (is_array($content)){
|
||||
$debug=true;
|
||||
// after submit
|
||||
$content['message']=print_r($content,true);
|
||||
$content['datetime']=time();
|
||||
$content['who']=$content['name'];
|
||||
$content['name']='';
|
||||
$content['ergebnis']=$content['wert1']*$content['wert2'];
|
||||
} else {
|
||||
// first call
|
||||
/*
|
||||
$content=array(
|
||||
'who'=>', please type a name ...',
|
||||
);
|
||||
*/
|
||||
}
|
||||
$tpl=new etemplate('test.index');
|
||||
$tpl->set_cell_attribute('debuginfos','disabled',!$debug);
|
||||
$tpl->exec('test.test_ui.index',$content);
|
||||
// the debug info will be displayed at the very end of the page
|
||||
//_debug_array($content);
|
||||
}
|
||||
function index($content=null)
|
||||
{
|
||||
$debug=false;
|
||||
if (is_array($content)){
|
||||
$debug=true;
|
||||
// after submit
|
||||
if ($content['submit'])
|
||||
{
|
||||
$content['message']=print_r($content,true)."\n".'to continue please type a name ...';
|
||||
$content['datetime']=time();
|
||||
$content['test_firstname']='';
|
||||
$content['test_name']='';
|
||||
} elseif ($content['new'])
|
||||
{
|
||||
$content['message']='cleared form !'."\n".'to continue please type a name ...';
|
||||
$content['datetime']=time();
|
||||
$content['test_firstname']='';
|
||||
$content['test_name']='';
|
||||
}
|
||||
} else {
|
||||
// first call
|
||||
$content=array(
|
||||
'message'=>'... please type a name ...',
|
||||
);
|
||||
}
|
||||
$tpl=new etemplate('test.index');
|
||||
$tpl->set_cell_attribute('debuginfos','disabled',!$debug);
|
||||
$tpl->exec('test.test_ui.index',$content);
|
||||
// the debug info will be displayed at the very end of the page
|
||||
//_debug_array($content);
|
||||
}
|
||||
</pre>
|
||||
|
||||
<hr style="text-align: left; width: 99%;" />
|
||||
@ -377,7 +383,7 @@ var $public_functions = array(
|
||||
<dd>
|
||||
<dl>
|
||||
<dt>Step 10</dt>
|
||||
<dd>You have to add a constructor to your test_ui class:</dd>
|
||||
<dd>You should add a constructor to your test_ui class:</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
|
Loading…
Reference in New Issue
Block a user