HEX
Server: Apache
System: Linux dev.epsylon.net 3.10.0-1160.144.1.el7.tuxcare.els2.x86_64 #1 SMP Sun Feb 15 11:22:42 UTC 2026 x86_64
User: nexper (1054)
PHP: 8.2.30
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/nexper/www/67.225.167.226/public_html/crm/XTemplate/ex5.php
<?

	/* 
		example 5
		demonstrates nullstrings



	*/

	require "xtpl.p";

	$xtpl=new XTemplate ("ex5.xtpl");

	$xtpl->assign(INTRO_TEXT,"by default, if some variables weren't assigned a value, they simply disappear from the parsed html:");	
	$xtpl->parse("main.form");

	$xtpl->assign(INTRO_TEXT,"ok, now let's assign a nullstring:");	
	$xtpl->SetNullString("value not specified!");
	$xtpl->parse("main.form");

	$xtpl->assign(INTRO_TEXT,"custom nullstring for a specific variable and default nullstring mixed:");	
	$xtpl->SetNullString("no value..");
	$xtpl->SetNullString("no email specified!",EMAIL);
	$xtpl->parse("main.form");
	
	$xtpl->assign(INTRO_TEXT,"custom nullstring for every variable:) .. you should get it by now. :P");	
	$xtpl->SetNullString("no email specified",EMAIL);
	$xtpl->SetNullString("no name specified",FULLNAME);
	$xtpl->SetNullString("no income?",INCOME);
	$xtpl->parse("main.form");

	$xtpl->parse("main");
	$xtpl->out("main");

/*

		Revision 1.1  2004/05/27 05:30:47  sugarjacob
		Moving project to SourceForge.

		Revision 1.1  2004/05/19 01:48:20  sugarcrm
		Adding files with binary option as appropriate.
		
		Revision 1.2  2001/03/26 23:25:02  cranx
		added keyword expansion to be more clear
		
*/

?>