Location: PHPKode > projects > chillyCMS > chillyCMS/modules/contact/backend.php
<?php
defined('DOIT') or die('Restricted access');

$editform .= $mod_contact["lbl_settings"];
//settings are passed to this file in the variable $modsettings formatted as a string
$settingsarray=explode(',', $modsettings);
$showsubject=$settingsarray[0];
$subjectname=$settingsarray[1];
$mustsubject=$settingsarray[2];
$mustmail=$settingsarray[3];
//standard subject label
if ($subjectname=="") { $subjectname = $mod_contact["lbl_subject"]; }
//default values
if ($showsubject=="") { $showsubject=1; }
if ($mustmail=="") { $mustmail=1; }

if($writeright) {
	$checked=" checked='checked'";
	$editform .= "<fieldset>".
	//show subject textfield?
	"<label class='label'>$mod_contact[lbl_showsubject]</label>".
	"<input class='middle' type='radio' name='showsubject' value='1'";
	if ($showsubject=="1") { $editform .= $checked; }
	$editform .= "/><label class='middle'>$l_gen[lbl_yes]</label>".
	"<input class='middle' type='radio' name='showsubject' value='0'";
	if ($showsubject=="0") { $editform .= $checked; }
	$editform .="/><label class='middle'>$l_gen[lbl_no]</label><br /><br />".
	//subject label
	"<label class='label'>$mod_contact[lbl_subjectlabel]</label>".
	"<input type='text' name='subjectname' value='$subjectname'/><br /><br />".
	//make subject compulsory?
	"<label class='label'>$mod_contact[lbl_mustsubject]</label>".
	"<input class='middle' type='radio' name='mustsubject' value='1'";
	if ($mustsubject=="1") { $editform .= $checked; }
	$editform .= "/><label class='middle'>$l_gen[lbl_yes]</label>".
	"<input class='middle' type='radio' name='mustsubject' value='0'";
	if ($mustsubject=="0") { $editform .= $checked; }
	$editform .= "/><label class='middle'>$l_gen[lbl_no]</label><br />".
	//make email compulsory?
	"<label class='label'>$mod_contact[lbl_mustmail]</label>".
	"<input class='middle' type='radio' name='mustmail' value='1'";
	if ($mustmail=="1") { $editform .= $checked; }
	$editform .= "/><label class='middle'>$l_gen[lbl_yes]</label>".
	"<input class='middle' type='radio' name='mustmail' value='0'";
	if ($mustmail=="0") { $editform .= $checked; }
	$editform .= "/><label class='middle'>$l_gen[lbl_no]</label><br />".
	"</fieldset>";
} else {
	$editform .= "<br /><br />".$l_edit["msg_nowrite"];
}
//since the data is to be saved in an array, the order is important!
$specialsettings="showsubject,subjectname,mustsubject,mustmail";
?>
Return current item: chillyCMS