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

//read settings
$maxlinks=10;
$modsettings=explode(",",$modsettings);
$displayname=$modsettings[0];
$links=array("0");
for ($i=1;$i<=$maxlinks;$i++) {
	$tmp=explode("|",$modsettings[$i]);
	$links[]="$tmp[0]|$tmp[1]";
}
$editform .= "<p>$mod_linklist[lbl_settings]</p><br><br>".
//dislay modname?
"<p>$mod_linklist[lbl_displayname]</p><select size='1' name='displayname'>";
if ($displayname==1) {
	$editform .= "<option value='1' selected='selected'>$l_gen[lbl_yes]</option>".
	"<option value='0'>$l_gen[lbl_no]</option>";
} else {
	$editform .= "<option value='1'>$l_gen[lbl_yes]</option>".
	"<option value='0' selected='selected'>$l_gen[lbl_no]</option>";
}
$editform .= "</select><br /><br />";
//links
$editform .= "<h1>$mod_linklist[lbl_links]</h1><p>$mod_linklist[lbl_howto]</p><br />".
"<p>$mod_linklist[lbl_linkformat]</p>";
for ($i=1;$i<=$maxlinks;$i++) {
	$editform .= "<p><input type='text' style='width:400px;' name='link$i' ";
	if ($links[$i]!="|") {
		$editform .= "value='$links[$i]'";
	}
	$editform .= "></p>";
}
$editform .= "<br>";
//since the data is to be saved in an array, the order is important!
$specialsettings="displayname";
for ($i=1;$i<=$maxlinks;$i++) {
	$specialsettings.=",link$i";
}
?>
Return current item: chillyCMS