本文整理汇总了PHP中FormOther::select_color方法的典型用法代码示例。如果您正苦于以下问题:PHP FormOther::select_color方法的具体用法?PHP FormOther::select_color怎么用?PHP FormOther::select_color使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FormOther
的用法示例。
在下文中一共展示了FormOther::select_color方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action);
// Note that $action and $object may have been modified by hook
if (empty($reshook) && !empty($extrafields->attribute_label)) {
foreach ($extrafields->attribute_label as $key => $label) {
$value = isset($_POST["options_" . $key]) ? $_POST["options_" . $key] : $object->array_options["options_" . $key];
print '<tr><td>' . $label . '</td><td colspan="3">';
print $extrafields->showInputField($key, $value);
print '</td></tr>' . "\n";
}
}
print '</table>';
print '</br><br>';
print '<table class="border" width="100%">';
print '<tr><td width="25%" class="fieldrequired">' . $langs->trans("MailTopic") . '</td><td><input class="flat" name="sujet" size="60" value="' . $_POST['sujet'] . '"></td></tr>';
print '<tr><td width="25%">' . $langs->trans("BackgroundColorByDefault") . '</td><td colspan="3">';
$htmlother->select_color($_POST['bgcolor'], 'bgcolor', 'new_mailing', 0);
print '</td></tr>';
print '<tr><td width="25%" class="fieldrequired" valign="top">' . $langs->trans("MailMessage") . '<br>';
print '<br><i>' . $langs->trans("CommonSubstitutions") . ':<br>';
foreach ($object->substitutionarray as $key => $val) {
print $key . ' = ' . $langs->trans($val) . '<br>';
}
print '</i></td>';
print '<td>';
// Editeur wysiwyg
require_once DOL_DOCUMENT_ROOT . "/core/class/doleditor.class.php";
$doleditor = new DolEditor('body', $_POST['body'], '', 320, 'dolibarr_mailings', '', true, true, $conf->global->FCKEDITOR_ENABLE_MAILING, 20, 70);
$doleditor->Create();
print '</td></tr>';
print '</table>';
print '<br><center><input type="submit" class="button" value="' . $langs->trans("CreateMailing") . '"></center>';
示例2:
$var=true;
while ($i <= $MAXAGENDA)
{
$key=$i;
$var=!$var;
print "<tr ".$bc[$var].">";
print '<td width="180" nowrap="nowrap">'.$langs->trans("AgendaExtNb",$key)."</td>";
$name='AGENDA_EXT_NAME'.$key;
$src='AGENDA_EXT_SRC'.$key;
$color='AGENDA_EXT_COLOR'.$key;
print "<td><input type=\"text\" class=\"flat\" name=\"agenda_ext_name".$key."\" value=\"". $conf->global->$name . "\" size=\"28\"></td>";
print "<td><input type=\"text\" class=\"flat\" name=\"agenda_ext_src".$key."\" value=\"". $conf->global->$src . "\" size=\"60\"></td>";
print '<td nowrap="nowrap" align="center">';
// Possible colors are limited by Google
//print $formadmin->select_colors($conf->global->$color, "google_agenda_color".$key, $colorlist);
print $formother->select_color($conf->global->$color, "agenda_ext_color".$key, 'extsitesconfig', 1, '');
print '</td>';
print "</tr>";
$i++;
}
print '</table>';
print '<br>';
print '<center>';
print "<input type=\"submit\" name=\"save\" class=\"button\" value=\"".$langs->trans("Save")."\">";
print "</center>";
print "</form>\n";