function popup_index() { $main = new main_cf(); $html = "<H1>{address_verify_map_minitext}</H1>" . RoundedLightWhite("<p class=caption>{address_verify_map_text}</p>") . "<br>\n\n\n<form name='FFMDBCache'>\n\n<table style='width:600px' align=center>\n<tr>\n<td valign='top'>\n\t\t" . RoundedLightWhite("\n\t\t<table style='width:100%;margin:10px'>\n\t\t\t<tr>\n\t\t\t\t<td nowrap class=legend>{address_verify_map_field}:</strong></td>\n\t\t\t\t<td>" . Field_text('address_verify_map', str_replace('btree:', '', $main->main_array["address_verify_map"])) . "</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td nowrap class=legend>{address_verify_negative_cache}:</strong></td>\n\t\t\t\t<td>" . Field_yesno_checkbox_img('address_verify_negative_cache', $main->main_array["address_verify_negative_cache"], '{address_verify_negative_cache_text}') . "</td>\n\t\t\t</tr>\t\n\t\t\t<tr>\n\t\t\t\t<td nowrap class=legend>{address_verify_poll_count}:</strong></td>\n\t\t\t\t<td>" . Field_text('address_verify_poll_count', $main->main_array["address_verify_poll_count"], 'width:30%', null, null, '{address_verify_poll_count_text}') . "</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td nowrap class=legend>{address_verify_poll_delay}:</strong></td>\n\t\t\t\t<td>" . Field_text('address_verify_poll_delay', $main->main_array["address_verify_poll_delay"], 'width:30%', null, null, '{address_verify_poll_delay_text}') . "</td>\n\t\t\t</tr>\t\t\t\t\t\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t<tr>\n\t\t\t\t<td nowrap class=legend>{address_verify_sender}:</strong></td>\n\t\t\t\t<td>" . Field_text('address_verify_sender', $main->main_array["address_verify_sender"], 'width:30%', null, null, '{address_verify_sender_text}') . "</td>\n\t\t\t</tr>\t\t\t\n\t\t\t<tr>\n\t\t\t\t<td align='right' nowrap class=legend>{address_verify_negative_expire_time}:</strong></td>\n\t\t\t\t<td>" . Field_text('address_verify_negative_expire_time', $main->main_array["address_verify_negative_expire_time"], 'width:30%', null, null, '{address_verify_negative_expire_time_text}') . "</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td align='right' nowrap class=legend>{address_verify_negative_refresh_time}:</strong></td>\n\t\t\t\t<td>" . Field_text('address_verify_negative_refresh_time', $main->main_array["address_verify_negative_refresh_time"], 'width:30%', null, null, '{address_verify_negative_refresh_time_text}') . "</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td align='right' nowrap class=legend>{address_verify_positive_expire_time}:</strong></td>\n\t\t\t\t<td>" . Field_text('address_verify_positive_expire_time', $main->main_array["address_verify_positive_expire_time"], 'width:30%', null, null, '{address_verify_positive_expire_time_text}') . "</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td align='right' nowrap class=legend>{address_verify_positive_refresh_time}:</strong></td>\n\t\t\t\t<td>" . Field_text('address_verify_positive_refresh_time', $main->main_array["address_verify_positive_refresh_time"], 'width:30%', null, null, '{address_verify_positive_refresh_time_text}') . "</td>\n\t\t\t</tr>\t\t\t\t\t\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\t\n\n\t\t\t\n\t\t\t\t\t\n\t\t\t<tr>\n\t\t\t\t<td align='right' colspan=2><input type='button' value='{delete} »' OnClick=\"PostFixVerifyDatabaseDeleteSave();\"> <input type='button' value='{edit} »' OnClick=\"PostFixVerifyDatabaseSave();\"></td>\n\t\t\t</tr>\t\t\t\t\n\t\t</table>") . "\n</td>\n</tr>\n</table></form>"; $tpl = new Templates(); echo $tpl->_ENGINE_parse_body($html); }
public static function Output(Templates $skin) { $format = Util::getvalue('format'); switch ($format) { case "xml": $output = Skin::Load('output-xml.xsl'); $output->setcontent($skin->returnXML(), '/xml/*', null); header("Content-Type: text/xml; charset=UTF-8"); $output->display(); break; case "json": $response = Skin::Load('output-xml.xsl'); $response->setcontent($skin->returnXML(), '/xml/*', null); $output = Skin::Load('output-json.xsl'); $output->setcontent($response->returnDisplay(), '/xml/*', null); header("Content-Type: application/json; charset=UTF-8"); $output->display(); break; default: $skin->display(); break; } die; if ($format == 'json') { } else { header("Content-Type: text/xml; charset=UTF-8"); $skin->display(); die; } }
function popup_index() { $main = new main_cf(); $html = "\n<H1>{smtp_connection_cache_destinations}</H1>\n<table style='width:600px' align=center>\n<tr>\n<td valign='top'>\n" . RoundedLightWhite("<div style='text-align:justify;font-size:12px;height:200px;overflow:auto;width:99%'>{smtp_connection_cache_destinations_text}</div>") . "\n<br>\n" . RoundedLightWhite("\n<form name='FFMA'>\n<table style='width:500px'>\n\t<tr>\n\t\t<td class=legend nowrap><strong>{smtp_connection_cache_on_demand} :</strong></td>\n\t\t<td align='left'>" . Field_yesno_checkbox_img('smtp_connection_cache_on_demand', $main->main_array["smtp_connection_cache_on_demand"], '{enable_disable}') . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend nowrap valign='top' nowrap><strong>{smtp_connection_cache_time_limit} :</strong></td>\n\t\t<td align='left'>" . Field_text('smtp_connection_cache_time_limit', $main->main_array["smtp_connection_cache_time_limit"], 'width:20%', null, null, '{smtp_connection_cache_time_limit_text}') . "\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend nowrap valign='top' nowrap><strong>{smtp_connection_reuse_time_limit} :</strong></td>\n\t\t<td align='left'>" . Field_text('smtp_connection_reuse_time_limit', $main->main_array["smtp_connection_reuse_time_limit"], 'width:20%', null, null, '{smtp_connection_reuse_time_limit_text}') . "\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend nowrap valign='top' nowrap><strong>{connection_cache_ttl_limit} :</strong></td>\n\t\t<td align='left'>" . Field_text('connection_cache_ttl_limit', $main->main_array["connection_cache_ttl_limit"], 'width:20%', null, null, '{connection_cache_ttl_limit_text}') . "\n\t</tr>\n\t<tr>\n\t\t<td class=legend nowrap valign='top' nowrap><strong>{connection_cache_status_update_time} :</strong></td>\n\t\t<td align='left'>" . Field_text('connection_cache_status_update_time', $main->main_array["connection_cache_status_update_time"], 'width:20%', null, null, '{connection_cache_status_update_time_text}') . "\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend nowrap colspan='2' style='border-top:1px solid #CCCCCC'><input type='button' value='{edit} »' OnClick=\"javascript:PostFixSaveServerCacheSettings();\"></td>\n\t\t\n\t</tr>\t\t\t\n\t\t\t\t\t\n\t\t\n</form>\t") . "\n\t\n\t<tr>\n\t\n\t\n\t\t<td class=legend nowrap><strong>{smtp_connection_cache_destinations_field} :</strong></td>\n\t\t<td align='left'><input type='button' value='{add_server_domain} »' OnClick=\"javascript:PostFixAddServerCache();\">\n\t</tr>\n</table>\t\n\n\n</td>\n</tr>\n</table><div id='ServerCacheList'>" . PostFixServerCacheList() . "</div>"; $tpl = new Templates(); echo $tpl->_ENGINE_parse_body($html); }
function popup_index() { $html = "\n<table style='width:600px' align=center>\n<td valign='top' style='text-align:justify'>" . RoundedLightWhite("<p class=caption>{smtp_fallback_relay_tiny}<br>{smtp_fallback_relay_text}</p>") . "</td>\n</tr>\n</table>\n<table style='width:600px' align=center>\n<tr>\n<td align='center'><input type='button' value='{add_server} »' OnClick=\"javascript:PostfixAddFallBackServer();\"></td></tr>\n<tr>\n<td>" . RoundedLightWhite("<div id='table_list'>" . PostfixAddFallBackerserverList() . "</div>") . "</td></tr>\n</table>\n"; $js["JS"][] = 'js/postfix-fallback.js'; $tpl = new Templates(); echo $tpl->_ENGINE_parse_body($html); }
function main_page() { $mailbox = new MailBoxes(); $mailbox->Cyrus_load(); $mailbox_infos = $mailbox->MailBoxes_get_infos($_GET["edit_mailbox"]); $server = $mailbox->global_config["_GLOBAL"]["mailboxes_server"]; $_field_date = "\n\t\t<tr>\n\t<td><strong>{mailbox_created}</strong></td>\n\t<td>{$mailbox_infos->created}</td>\n\t</tr>"; $_field_maildir = "\n\t\t<tr>\n\t<td><strong>{mailbox_path}</strong></td>\n\t<td>{$mailbox_infos->maildir}</td>\n\t</tr>\n\t"; if ($mailbox->Cyrus_Exists($_GET["edit_mailbox"])) { $tblq = explode('/', $mailbox->Cyrus_hash[$_GET["edit_mailbox"]]["QUOTA"]); if ($tblq[0] > 0) { $max_quota = $tblq[0] / 1000; } else { $max_quota = 0; } if ($tblq[1] > 0) { $used_quota = round($tblq[1] / 1000); } else { $used_quota = 0; } $field_quota = "<tr>\n\t<td><strong>{quota} {used}: {$used_quota} mb</strong>\n\t</td>\n\t<td><input type='text' id='max_quota' value='{$max_quota}' style='width:30px'> (mb) <i><span style='font-size:9px'>({quota_0})</span><i></td>\n\t</tr>"; } $rowspan = 4; if ($server == 'cyrus') { $_field_date = null; $_field_maildir = null; $rowspan = 4; $button_set_quotas = "\n <input type='button' value='{bt_set_quota}' OnClick=\"javascript:set_quota('{$_GET["edit_mailbox"]}');\">"; } $html = "\n\t<input type='hidden' id='no_password' value='{ERR_NO_PASS}'>\n\t<input type='hidden' id='password_no_match' value='{ERR_NO_PASS_MATCH}'>\t\n\t<input type='hidden' id='ERR_SET_QUOTA_SUCCESS' value='{ERR_SET_QUOTA_SUCCESS}'>\n\t<FIELDSET style='width:550px'><LEGEND>\n\t{mailbox_title} {$_GET["edit_mailbox"]}</LEGEND>\n\t<table>\n\t<td style='padding:4px' width=1% valign='top'><img src='img/user-maibox.png'></td>\n\t<td valing='top'>\n\t\t<table>\n\t\t<tr>\n\t\t{$field_date}\t\n\t\t{$_field_maildir}\n\t\t<tr>\n\t\t<td><strong>{mailbox_username}</strong></td>\n\t\t<td>{$_GET["edit_mailbox"]}</td>\n\t\t</tr>\t\n\t\t{$field_quota}\n\t\t<tr>\n\t\t<td><strong>{mailbox_password}</strong></td>\n\t\t<td><input type=password id='password' value=''></td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td><strong>{mailbox_confirm_password}</strong></td>\n\t\t<td><input type=password id='password2' value=''></td>\n\t\t</tr>\t\n\t\t\n\t\t</table>\n\t\t<br>\n\t\t<table>\n\t\t<td>\n\t\t<table style='border:0px;width:100px;text-align:center;clear:all' align='center'>\n\t\t\t<tr>\n\t\t\t\t<td style='padding:0px;margin:0px;clear:both'>\n\t\t\t\t\t<input type='button' value='{bt_mailbox_edit}' OnClick=\"javascript:edit_mailbox_settings('{$_GET["edit_mailbox"]}');\"></td>\n\t\t\t\t\t<td style='padding:0px;margin:0px;clear:both'{$button_set_quotas}</td>\n\t\t\t\t</tr>\n\t\t</table>\n\t\t</td>\n\t\t</tr>\n\t\t</table>\n\t</td>\n\t</tr>\n\t</table>\n\t\n\t</FIELDSET>\n\t\n\t"; $tpl = new Templates(); echo DIV_SHADOW($tpl->_parse_body($html), 'windows'); }
function GeneralSettings() { $ave = new kav4mailservers(1, null, 1); $page = CurrentPageName(); $tpl = new Templates(null, null, null, 1); $html = Tabs() . "\n\t<fieldset>\n\t\t<legend>{general_settings}</legend>\n\t<form name='ffm1'>\t\t\n\t<table style='width:100%'>\n\t<input type='hidden' name='KEY' value='smtpscan.general'>\n\t\t<tr>\n\t\t\t<td align='right' nowrap><strong>{NotifyFromAddress}:</strong></td>\n\t\t\t<td>" . Field_text('NotifyFromAddress', $ave->array_conf["smtpscan.general"]["NotifyFromAddress"]) . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t<tr><td colspan=2> </td></tr>\n\t\t<tr>\n\t\t\t<td align='right' valign='top'>" . Field_yesno_checkbox_img('EHLOsupport8BITMIME', $ave->array_conf["smtpscan.general"]["EHLOsupport8BITMIME"], '{enable_disable}') . "</td>\n\t\t\t<td align='left' class='caption'><strong>:{EHLOsupport8BITMIME}</strong>{EHLOsupport8BITMIME_text}</td>\n\t\t</tr>\n\t\t\n\t\t<tr>\n\t\t<tr><td colspan=2> </td></tr>\n\t\t\n\t\t<tr>\n\t\t\t<td align='right' valign='top'>" . Field_yesno_checkbox_img('EHLOsupportDSN', $ave->array_conf["smtpscan.general"]["EHLOsupportDSN"], '{enable_disable}') . "</td>\n\t\t\t<td align='left' class=caption><strong>:{EHLOsupportDSN}</strong>{EHLOsupportDSN_text}</td>\n\t\t</tr>\n\t\t\n\t\t<tr><td colspan=2> </td></tr>\n\t\t<tr>\n\t\t\t<td align='right' valign='top'>" . Field_yesno_checkbox_img('EHLOsupportXFORWARD', $ave->array_conf["smtpscan.general"]["EHLOsupportXFORWARD"], '{enable_disable}') . "</td>\n\t\t\t<td align='left'><strong>:{EHLOsupportXFORWARD}</strong></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td align='right'><strong>{EHLOattrsXFORWARD}:</strong></td>\n\t\t\t<td align='right' valign='top'>" . Field_text('EHLOattrsXFORWARD', $ave->array_conf["smtpscan.general"]["EHLOattrsXFORWARD"]) . "</td>\n\t\t</tr>\t\t\n\t\t<tr>\n\t\t<td> </td>\n\t\t<td class='caption'>{EHLOsupportXFORWARD_text}<br><b>protocol:</b>{$ave->array_conf["smtpscan.general"]["Protocol"]} « {$ave->array_conf["smtpscan.general"]["ForwardMailer"]} »</td>\n\t\t</tr>\n\t\t<tr><td colspan=2 style='text-align:right;padding-right:10px'><input type='button' value='{submit} »' OnClick=\"javascript:ParseForm('ffm1','{$page}',true);\"></td></tr>\n\t</table>\n\t</form>\n\t</fieldset>"; return $tpl->_ENGINE_parse_body($html); }
function popup_index() { $main = new main_cf(); $page = CurrentPageName(); $html = "<table style='width:600px' align=center>\n<tr>\n<td valign='top'><div style='width:100%;height:400px;overflow:auto'>\n<form name='FFMAP'>\n" . RoundedLightWhite("<table style='width:500px'>\n<tr><td colspan=2><H5 style='margin:0px;font-size:13px'>{title_postfix_tuning_1}</H5></td></tr>\n<tr><td colspan=2 >" . helpCoolapse('{title_postfix_tuning_1_text}') . "</td></tr>\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{smtpd_error_sleep_time} :</strong></td>\n\t\t<td align='left'>" . Field_text('smtpd_error_sleep_time', $main->main_array["smtpd_error_sleep_time"], 'width:20%', null, null, '{smtpd_error_sleep_time_text}') . "\n\t</tr>\t\n<tr><td align='right' colspan='2' style='border-top:1px solid #CCCCCC'><input type='button' value='{edit} »' OnClick=\"javascript:ParseForm('FFMAP','{$page}',true,true);\"></td></tr>\n</table>") . "<br>\n\n\n" . RoundedLightWhite("<table style='width:500px'>\n<tr><td colspan=2 ><H5 style='margin:0px;font-size:13px'>{title_postfix_tuning_2}</H5></td></tr>\t\n<tr><td colspan=2 >" . helpCoolapse('{title_postfix_tuning_2_text}') . "</td></tr>\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{smtpd_soft_error_limit} :</strong></td>\n\t\t<td align='left'>" . Field_text('smtpd_soft_error_limit', $main->main_array["smtpd_soft_error_limit"], 'width:20%', null, null, '{smtpd_soft_error_limit_text}') . "\n\t</tr>\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{smtpd_hard_error_limit} :</strong></td>\n\t\t<td align='left'>" . Field_text('smtpd_hard_error_limit', $main->main_array["smtpd_hard_error_limit"], 'width:20%', null, null, '{smtpd_hard_error_limit_text}') . "\n\t</tr>\t\n<tr><td align='right' colspan='2' style='border-top:1px solid #CCCCCC'><input type='button' value='{edit} »' OnClick=\"javascript:ParseForm('FFMAP','{$page}',true,true);\"></td></tr>\n</table>") . "<br>\n" . RoundedLightWhite("<table style='width:500px'>\n<tr><td colspan=2 ><H5 style='margin:0px;font-size:13px'>{title_postfix_tuning_3}</H5></td></tr>\t\n<tr><td colspan=2 >" . helpCoolapse('{title_postfix_tuning_3_text}') . "</td></tr>\t\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{smtpd_client_connection_count_limit} :</strong></td>\n\t\t<td align='left'>" . Field_text('smtpd_client_connection_count_limit', $main->main_array["smtpd_client_connection_count_limit"], 'width:20%', null, null, '{smtpd_client_connection_count_limit_text}') . "\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{smtpd_client_connection_rate_limit} :</strong></td>\n\t\t<td align='left'>" . Field_text('smtpd_client_connection_rate_limit', $main->main_array["smtpd_client_connection_rate_limit"], 'width:20%', null, null, '{smtpd_client_connection_rate_limit_text}') . "\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{smtpd_client_message_rate_limit} :</strong></td>\n\t\t<td align='left'>" . Field_text('smtpd_client_message_rate_limit', $main->main_array["smtpd_client_message_rate_limit"], 'width:20%', null, null, '{smtpd_client_message_rate_limit_text}') . "\n\t</tr>\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{smtpd_client_recipient_rate_limit} :</strong></td>\n\t\t<td align='left'>" . Field_text('smtpd_client_recipient_rate_limit', $main->main_array["smtpd_client_recipient_rate_limit"], 'width:20%', null, null, '{smtpd_client_recipient_rate_limit_text}') . "\n\t</tr>\t\t\t\t\t\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{smtpd_client_new_tls_session_rate_limit} :</strong></td>\n\t\t<td align='left'>" . Field_text('smtpd_client_new_tls_session_rate_limit', $main->main_array["smtpd_client_new_tls_session_rate_limit"], 'width:20%', null, null, '{smtpd_client_new_tls_session_rate_limit_text}') . "\n\t</tr>\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{smtpd_client_event_limit_exceptions} :</strong></td>\n\t\t<td align='left'>" . Field_text('smtpd_client_event_limit_exceptions', $main->main_array["smtpd_client_event_limit_exceptions"], 'width:70%', null, null, '{smtpd_client_event_limit_exceptions_text}') . "\n\t</tr>\n<tr><td align='right' colspan='2' style='border-top:1px solid #CCCCCC'><input type='button' value='{edit} »' OnClick=\"javascript:ParseForm('FFMAP','{$page}',true,true);\"></td></tr>\n</table>") . "<br>\n" . RoundedLightWhite("<table style='width:500px'>\t\t\t\n<tr><td colspan=2 ><H5 style='margin:0px;font-size:13px'>{title_postfix_tuning_4}</H5></td></tr>\t\n<tr><td colspan=2 >" . helpCoolapse('{title_postfix_tuning_4_text}') . "</td></tr>\t\t\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{in_flow_delay} :</strong></td>\n\t\t<td align='left'>" . Field_text('in_flow_delay', $main->main_array["in_flow_delay"], 'width:10%', null, null, '{in_flow_delay_text}') . "\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{smtp_connect_timeout} :</strong></td>\n\t\t<td align='left'>" . Field_text('smtp_connect_timeout', $main->main_array["smtp_connect_timeout"], 'width:50%', null, null, '{smtp_connect_timeout_text}') . "\n\t</tr>\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{smtp_helo_timeout} :</strong></td>\n\t\t<td align='left'>" . Field_text('smtp_helo_timeout', $main->main_array["smtp_helo_timeout"], 'width:50%', null, null, '{smtp_helo_timeout_text}') . "\n\t</tr>\t\n<tr><td align='right' colspan='2' style='border-top:1px solid #CCCCCC'><input type='button' value='{edit} »' OnClick=\"javascript:ParseForm('FFMAP','{$page}',true,true);\"></td></tr>\t\t\t\t\t\n\n</table>") . "<br>\n" . RoundedLightWhite("<table style='width:500px'>\n<tr><td colspan=2 ><H5 style='margin:0px;font-size:13px'>{title_postfix_tuning_8}</H5></td></tr>\t\n<tr><td colspan=2 >" . helpCoolapse('{title_postfix_tuning_8_text}') . "</td></tr>\t\t\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{initial_destination_concurrency} :</strong></td>\n\t\t<td align='left'>" . Field_text('initial_destination_concurrency', $main->main_array["initial_destination_concurrency"], 'width:50%', null, null, '{initial_destination_concurrency_text}') . "\n\t</tr>\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{default_destination_concurrency_limit} :</strong></td>\n\t\t<td align='left'>" . Field_text('default_destination_concurrency_limit', $main->main_array["default_destination_concurrency_limit"], 'width:50%', null, null, '{default_destination_concurrency_limit_text}') . "\n\t</tr>\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{local_destination_concurrency_limit} :</strong></td>\n\t\t<td align='left'>" . Field_text('local_destination_concurrency_limit', $main->main_array["local_destination_concurrency_limit"], 'width:50%', null, null, '{local_destination_concurrency_limit_text}') . "\n\t</tr>\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{smtp_destination_concurrency_limit} :</strong></td>\n\t\t<td align='left'>" . Field_text('smtp_destination_concurrency_limit', $main->main_array["smtp_destination_concurrency_limit"], 'width:80%', null, null, '{smtp_destination_concurrency_limit_text}') . "\n\t</tr\t\t\t\n<tr><td align='right' colspan='2' style='border-top:1px solid #CCCCCC'><input type='button' value='{edit} »' OnClick=\"javascript:ParseForm('FFMAP','{$page}',true,true);\"></td></tr>\t\t\t\t\t\n</table>") . "<br>\n" . RoundedLightWhite("<table style='width:500px'>\n\n<tr><td colspan=2 ><H5 style='margin:0px;font-size:13px'>{title_postfix_tuning_5}</H5></td></tr>\t\n<tr><td colspan=2 >" . helpCoolapse('{title_postfix_tuning_5_text}') . "</td></tr>\t\t\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{default_destination_recipient_limit} :</strong></td>\n\t\t<td align='left'>" . Field_text('default_destination_recipient_limit', $main->main_array["default_destination_recipient_limit"], 'width:50%', null, null, '{default_destination_recipient_limit_text}') . "\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{smtpd_recipient_limit} :</strong></td>\n\t\t<td align='left'>" . Field_text('smtpd_recipient_limit', $main->main_array["smtpd_recipient_limit"], 'width:50%', null, null, '{smtpd_recipient_limit_text}') . "\n\t</tr>\t\t\n<tr><td align='right' colspan='2' style='border-top:1px solid #CCCCCC'><input type='button' value='{edit} »' OnClick=\"javascript:ParseForm('FFMAP','{$page}',true,true);\"></td></tr>\t\t\t\t\n</table>") . "<br>\n" . RoundedLightWhite("<table style='width:500px'>\n\n<tr><td colspan=2 ><H5 style='margin:0px;font-size:13px'>{title_postfix_tuning_6}</H5></td></tr>\t\n<tr><td colspan=2 >" . helpCoolapse('{title_postfix_tuning_6_text}') . "</td></tr>\t\t\t\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{queue_run_delay} :</strong></td>\n\t\t<td align='left'>" . Field_text('queue_run_delay', $main->main_array["queue_run_delay"], 'width:50%', null, null, '{queue_run_delay_text}') . "\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{minimal_backoff_time} :</strong></td>\n\t\t<td align='left'>" . Field_text('minimal_backoff_time', $main->main_array["minimal_backoff_time"], 'width:50%', null, null, '{minimal_backoff_time_text}') . "\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{queue_run_delay} :</strong></td>\n\t\t<td align='left'>" . Field_text('maximal_backoff_time', $main->main_array["maximal_backoff_time"], 'width:50%', null, null, '{maximal_backoff_time_text}') . "\n\t</tr>\t\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{maximal_queue_lifetime} :</strong></td>\n\t\t<td align='left'>" . Field_text('maximal_queue_lifetime', $main->main_array["maximal_queue_lifetime"], 'width:50%', null, null, '{maximal_queue_lifetime_text}') . "\n\t</tr>\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{bounce_queue_lifetime} :</strong></td>\n\t\t<td align='left'>" . Field_text('bounce_queue_lifetime', $main->main_array["bounce_queue_lifetime"], 'width:50%', null, null, '{bounce_queue_lifetime_text}') . "\n\t</tr>\t\t\t\t\t\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{qmgr_message_recipient_limit} :</strong></td>\n\t\t<td align='left'>" . Field_text('qmgr_message_recipient_limit', $main->main_array["qmgr_message_recipient_limit"], 'width:50%', null, null, '{qmgr_message_recipient_limit_text}') . "\n\t</tr>\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{qmgr_message_recipient_minimum} :</strong></td>\n\t\t<td align='left'>" . Field_text('qmgr_message_recipient_minimum', $main->main_array["qmgr_message_recipient_minimum"], 'width:50%', null, null, '{qmgr_message_recipient_minimum_text}') . "\n\t</tr>\t\t\n<tr><td align='right' colspan='2' style='border-top:1px solid #CCCCCC'><input type='button' value='{edit} »' OnClick=\"javascript:ParseForm('FFMAP','{$page}',true,true);\"></td></tr>\t\t\t\t\t\t\t\n<tr><td colspan=2 ><H5 style='margin:0px;font-size:13px'>{title_postfix_tuning_7}</H5></td></tr>\t\n<tr><td colspan=2 >" . helpCoolapse('{title_postfix_tuning_7_text}') . "</td></tr>\n\t<tr>\n\t\t<td class=legend valign='top' nowrap>{default_process_limit} :</strong></td>\n\t\t<td align='left'>" . Field_text('default_process_limit', $main->main_array["default_process_limit"], 'width:50%', null, null, '{default_process_limit_text}') . "\n\t</tr>\t\t\n<tr><td align='right' colspan='2' style='border-top:1px solid #CCCCCC'><input type='button' value='{edit} »' OnClick=\"javascript:ParseForm('FFMAP','{$page}',true,true);\"></td></tr>\t\t\t\t\n</form>\t\n</table>") . "\t\n\n</div>\n</td>\n</tr>\n</table>"; $tpl = new Templates(); echo $tpl->_ENGINE_parse_body($html); }
function about() { $page = CurrentPageName(); $tpl = new Templates(); $time = time(); $html = "\n<div class=text-info style='font-size:14px'>{smtp_fallback_relay_tiny}<br>{smtp_fallback_relay_text}</div>\n\n"; echo $tpl->_ENGINE_parse_body($html); }
function otherpage() { $page = CurrentPageName(); $main = new main_cf(); $html = "\n<H1>Postfix:{other_settings}</H1>\n<div id='otherpagedvi'>\n<table style='width:100%' class=table_form>\n<tr>\n\t<td class=legend nowrap>{undisclosed_recipients_header}:</td>\n\t<td>" . Field_text('undisclosed_recipients_header', $main->main_array["undisclosed_recipients_header"], 'width:100%') . "</td>\n\t<td>" . help_icon("{undisclosed_recipients_header_text}") . "</td>\n</tr>\n<tr>\n\t<td class=legend nowrap>{enable_original_recipient}:</td>\n\t<td>" . Field_yesno_checkbox('enable_original_recipient', $main->main_array["enable_original_recipient"]) . "</td>\n\t<td>" . help_icon("{enable_original_recipient_text}") . "</td>\n</tr>\n\n\n<tr><td colspan=2><hr></td></tr>\n<tr><td colspan=2 align='right'><input type='button' OnClick=\"javascript:SavePostfixOtherSection();\" value=' {edit} »»'></td></tr>\n</table>\n</div>\n\n"; $tpl = new Templates(); echo $tpl->_ENGINE_parse_body($html); }
function popup_index() { $page = CurrentPageName(); $tpl = new Templates(); $time = time(); $add_server = $tpl->_ENGINE_parse_body("{add_server}"); $html = "\n<div class=explain>{smtp_fallback_relay_tiny}<br>{smtp_fallback_relay_text}</div>\n<br>\n<div id='table_list_{$time}'></div>\n<script>\nfunction PostfixAddFallBackServer(Routingdomain){\n\tif(!Routingdomain){Routingdomain='';}\n\tYahooWin6(430,'{$page}?PostfixAddFallBackServer=yes&hostname={$_GET["hostname"]}&domainName='+Routingdomain,'{$add_server}')\n\t}\n\t\n\tfunction RefreshFailBackServers(){\n\t\tLoadAjax('table_list_{$time}','{$page}?PostfixAddFallBackerserverLoad=yes&hostname={$_GET["hostname"]}&time={$time}');\n\t}\n\t\n\tvar x_PostfixAddFallBackerserverDelete=function(obj){\n \tvar tempvalue=trim(obj.responseText);\n\t \tif(tempvalue.length>3){alert(tempvalue);}\n\t\tRefreshFailBackServers();\n\t\t}\t\t\n\t\n\tfunction PostfixAddFallBackerserverDelete(index){\n\t\tvar XHR = new XHRConnection();\t\n\t\tXHR.appendData('PostfixAddFallBackerserverDelete',index);\n\t\tXHR.appendData('hostname','{$_GET["hostname"]}');\n\t\tAnimateDiv('table_list_{$time}');\n\t\tXHR.sendAndLoad('{$page}', 'POST',x_PostfixAddFallBackerserverDelete);\n\t\t\t\n\t\t}\t\n\t\n\tRefreshFailBackServers();\n</script>\n\n"; echo $tpl->_ENGINE_parse_body($html); }
function popup_old() { $page = CurrentPageName(); $tpl = new templates(); if (strpos($_GET["uid"], '$') > 0) { $add = "\n\t\t<div style='text-align:right;margin:8px'>" . imgtootltip("32-group-icon-add.png", "{add_group}", "AddNewGroupComp()") . "</div>\n\t\t\n\t\t"; } $html = "{$add}\n\t<div style='width:100%;height:300px;overflow:auto' id='AddGroupAffectDiv'></div>\n\t\n\t\n\t<script>\n\t\t\n\t\t\n\n\n\tfunction RefreshGroup(){\n\t\tLoadAjax('AddGroupAffectDiv','{$page}?popup-list=yes&ou={$_GET["ou"]}&uid={$_GET["uid"]}');\n\t}\n\tRefreshGroup();\t\n\t</script>\n\t\n\t"; $tpl = new Templates(); echo $tpl->_ENGINE_parse_body($html); }
public function getErrorPage($pageName) { $errorPage = cockpit('collections')->collection('Error Pages')->findOne(["name" => $pageName]); if (!sizeof($errorPage)) { throw new Exception("Unable to load {$pageName}."); } try { $errorPageTemplate = new Templates($this->cabin); $errorPageTemplate->renderPage($errorPage, get_markdown($errorPage["content"])); } catch (Exception $e) { echo $e->getMessage(), "\n"; } }
public function __toString() { global $user, $db, $config, $phpdate, $page_title_all, $page_title, $token; if ($this->displayTPL) { Templates::display('header'); } $complete = ' <div class="info ' . $this->type . '"' . (!empty($this->customCSS) ? 'style="' . $this->customCSS . '"' : '') . '> ' . $this->message . ' </div> '; if (count($this->links) > 0) { $complete .= ' <br /> '; $i = 0; foreach ($this->links as $title => $link) { $complete .= ' ' . ($i > 0 ? ' ' : '') . ' <a href="' . $link . '"' . ($i == 0 ? ' class="button darkB"' : '') . '">' . $title . '</a> '; $i++; } $complete .= ' <br /><br /><br /> '; } if (!$this->displayTPL) { return $complete; } else { echo $token->auto_append($complete); Templates::display('footer'); die; } }
public static function getCurrentTemplate($typePage) { $model = Templates::model()->find(array('select' => 'template, layout', 'condition' => 'group_page = :g AND default_theme = "1"', 'params' => array(':g' => $typePage))); if ($model != null) { return array('template' => $model->template, 'layout' => $model->layout); } }
public function draw($templateName, $returnBlank = true) { $time = time(); $this->token = sha1($this->targetURL . $time . \Bonita\Main::getSiteSecret()); $this->time = $time; parent::draw($templateName, $returnBlank); }
function SystemStatistics($nopage = 0) { $users = new usersMenus(); $graph1 = InsertChart('js/charts.swf', "js/charts_library", "listener.graphs.php?MonthsBlocketType=yes", 600, 180, "", true, $users->ChartLicence); $js = "<script>\t\n\t\t\n\tfunction wait(){\n\t\tdocument.getElementById('blank').src='img/blank.gif';\n\t\tsetTimeout(\"Refreshit()\",10000)\n\t\t\n\t}\n\t\n\tfunction Refreshit(){\n\t\tdocument.getElementById('blank').src='img/wait.gif';\n\t\tsetTimeout(\"Send()\",2000);\n\t}\n\t\n\tfunction Send(){\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('SystemStatistics','yes');\n\t\tXHR.setRefreshArea('rrd');\t\t\t\t\t\t\t\t\t\n\t\tXHR.sendAndLoad(CurrentPageName(), 'GET');\n\t\twait();\n\t}\n\n</script>"; $time = serialize(date('Y-m-d H:I:s')); $html = "\n\t\n\t\n\t\n\t<div id='rrd'>\n\t<center style='border:1px dotted #CCCCCC;margin:4px;padding:4px'>\n\t\t<H3>{detected_this_month}</H3>\n\t\t{$graph1}\n\t\t</center>\n\t\t<div id='graph2'></div>\n\t\t<div id='graph3'></div>\n\t</div>\n"; // <script>wait()</script> if ($nopage == 0) { $tpl = new template_users("{more_stats}", $js . $html); echo $tpl->web_page; } else { $tpl = new Templates(); echo $tpl->_ENGINE_parse_body($html); } }
public function __construct($data = array()) { parent::__construct(); $this->entityType = 'article'; if (!empty($data['id'])) { $CMS = new CMS(); $this->id = $data['id']; $this->populate_object($CMS->get_entity_data($this)); } $this->populate_object($data); if (empty($this->template)) { $templates = new Templates(); $defaultTemplate = $templates->get_default(); $this->template = $defaultTemplate['path']; } }
/** * @constructor */ public function __construct($data_folder = '') { // load the config file. $this->config = new Config(); $this->config->load($data_folder); // load the templates. $this->templates = new Templates(); $this->templates->load($data_folder); // loading data files. $this->files = new Files(); $this->files->load($data_folder, $this->config->get('pages_data')); // initialize database. $this->db = new Database(); // $this->renders = new Renders(); }
/** * Get the modified time of a given template file * @param string $template Name of template file being loaded * @return int */ public static function getModifiedTime($template) { if (Templates::composerTemplate($template) === false) { return filemtime(Templator::$templateLocation); } else { return filemtime($_SERVER['DOCUMENT_ROOT'] . '/vendor/' . Templates::$composerFile); } }
public function executor() { $usersModel = User::model()->findAllNotificationExecutors(); if (is_array($usersModel)) { foreach ($usersModel as $user) { foreach ($user->zakaz_executor as $zakaz) { if (isset($user->profile)) { $time = explode(':', $user->profile->notification_time); } else { $time[0] = 0; } if (count($time) < 2) { $time[1] = 0; } $date = date('Y-m-d H:i', strtotime($zakaz->author_informed)); $date = strtotime($date) - (int) $time[0] * 60 * 60 - (int) $time[1] * 60; $dateStart = strtotime(date('Y-m-d H:i', $date)) - self::INTERVAL * 60; if (time() > $dateStart && time() <= $date) { echo 'Email zakaz #' . $zakaz->id . "\n"; $templatesModel = Templates::model()->findByAttributes(array('type_id' => '32')); if ($templatesModel) { $email = new Emails(); $email->from_id = 1; $email->to_id = $user->id; $email->name = $user->full_name; $email->sendTo($user->email, $templatesModel->title, $templatesModel->text); } } // Send message executor, when completion of the point foreach ($zakaz->parts as $stage) { if (isset($user->profile)) { $time = explode(':', $user->profile->notification_time); } else { $time[0] = 0; } if (count($time) < 2) { $time[1] = 0; } $date = date('Y-m-d H:i', strtotime($stage->date)); $date = strtotime($date) - (int) $time[0] * 60 * 60 - (int) $time[1] * 60; $dateStart = strtotime(date('Y-m-d H:i', $date)) - self::INTERVAL * 60; if (time() > $dateStart && time() <= $date) { echo 'Email stage zakaz #' . $stage->id . "\n"; $templatesModel = Templates::model()->findByAttributes(array('type_id' => '33')); if ($templatesModel) { $email = new Emails(); $email->from_id = 1; $email->to_id = $user->id; $email->name = $user->full_name; $email->sendTo($user->email, $templatesModel->title, $templatesModel->text); } } } } } } }
function popup_list() { $group = new groups(); $ou_con = base64_decode($_GET["ou"]); if ($ou_con != null) { $_GET["ou"] = $ou_con; } $hash_group = $group->list_of_groups($_GET["ou"], 1); $hash_group[null] = "{no_group}"; $uid = $_GET["uid"]; $html = "<table style='width:80%'>"; while (list($num, $ligne) = each($hash_group)) { $html = $html . "<tr " . CellRollOver("AddAjaxPopUpGroupV2('{$ou}','{$uid}',{$num},'{$ligne}');", "{add_group} {$ligne}") . ">\n\t\t\t<td width=1%><img src='img/32-group-icon.png'></td>\n\t\t\t<td valign='middle' style='font-size:14px;font-weight:bold'>{$ligne} ({$num})</a></td>\n\t\t\t</tr>"; } $html = $html . "</table>"; $tpl = new Templates(); echo $tpl->_ENGINE_parse_body($html); }
function listAction() { $this->view->album_id = $this->_request->getParam('album_id', 0); $this->view->title = 'Viewer List'; $this->view->all_templates_added = false; $viewers = new Viewers(); $select = $viewers->select()->setIntegrityCheck(false); $select->from('viewers')->join('templates', 'templates.id = viewers.template_id', array('name AS template_name', 'width AS template_width', 'height AS template_height', 'data AS template_data'))->where('viewers.album_id = ?', $this->view->album_id); $this->view->viewers = $viewers->fetchAll($select); $templates = new Templates(); $template_rows = $templates->fetchAll(); if (count($template_rows) == count($this->view->viewers)) { $this->view->all_templates_added = true; } $response = $this->getResponse(); $this->logger->info("response: {$response}"); $this->getResponse()->prepend('blah', 'had'); }
/** * Check to make sure that the requested template file exists * @param string $template Name of template file being loaded * @throws Exception * @return void */ public static function checkTemplateExists($template) { if (!file_exists(self::$templateLocation)) { //Check to see if the template is a composer file if (Templates::composerTemplate($template) === false) { throw new Exception("The template '{$template}' doesn't exist"); } } }
function otherpage() { $page = CurrentPageName(); $main = new maincf_multi($_GET["hostname"]); $enable_original_recipient = $main->GET("enable_original_recipient"); $smtpd_discard_ehlo_keywords = $main->GET("smtpd_discard_ehlo_keywords"); if (!is_numeric($enable_original_recipient)) { $enable_original_recipient = 1; } $undisclosed_recipients_header = $main->GET("undisclosed_recipients_header"); if ($undisclosed_recipients_header == null) { $undisclosed_recipients_header = "To: undisclosed-recipients:;"; } $t = time(); $html = "\n<div id='otherpagedvi' style='width:98%' class=form>\n\t\t\n<table style='width:99%'>\n<tr>\n\t<td class=legend nowrap style='font-size:22px'>{undisclosed_recipients_header}:</td>\n\t<td>" . Field_text("undisclosed_recipients_header-{$t}", $undisclosed_recipients_header, 'width:90%;font-size:22px') . "</td>\n\t<td>" . help_icon("{undisclosed_recipients_header_text}") . "</td>\n</tr>\n<tr>\n\t<td class=legend nowrap style='font-size:22px'>{smtpd_discard_ehlo_keywords}:</td>\n\t<td>" . Field_text("smtpd_discard_ehlo_keywords-{$t}", $smtpd_discard_ehlo_keywords, 'width:90%;font-size:22px') . "</td>\n\t<td>" . help_icon("{smtpd_discard_ehlo_keywords_text}") . "</td>\n</tr>\t\t\t\n\t\t\t\n\t\t\t\n<tr>\n\t<td class=legend nowrap style='font-size:22px'>{enable_original_recipient}:</td>\n\t<td>" . Field_checkbox_design('enable_original_recipient', 1, $enable_original_recipient) . "</td>\n\t<td>" . help_icon("{enable_original_recipient_text}") . "</td>\n</tr>\n\n\n\n<tr><td colspan=2 align='right'><hr>" . button("{apply}", "SavePostfixOtherSection{$t}()", "36") . "</td></tr>\n</table>\n</div>\n<script>\n\tvar x_SavePostfixOtherSection= function (obj) {\n\t\tvar tempvalue=obj.responseText;\n\t\tif(tempvalue.length>3){alert(tempvalue);return;}\n\t\t\n\t}\t\n\t\n\tfunction SavePostfixOtherSection(){\n\t\tvar undisclosed_recipients_header=document.getElementById('undisclosed_recipients_header').value;\n\t\tvar enable_original_recipient=document.getElementById('enable_original_recipient').value;\t\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('hostname','{$_GET["hostname"]}');\n\t\tXHR.appendData('enable_original_recipient',document.getElementById('enable_original_recipient-{$t}').value);\n\t\tXHR.appendData('undisclosed_recipients_header',document.getElementById('undisclosed_recipients_header-{$t}').value);\n\t\tXHR.appendData('smtpd_discard_ehlo_keywords',document.getElementById('smtpd_discard_ehlo_keywords-{$t}').value);\n\t\t\n\t\tXHR.sendAndLoad('{$page}', 'POST',x_SavePostfixOtherSection{$t});\t\t \n\t}\n</script>\t\t\n"; $tpl = new Templates(); echo $tpl->_ENGINE_parse_body($html); }
public function ruleExists($name) { try { Templates::get($name); return true; } catch (\Exception $e) { return false; } }
function edit($userid, $addrid) { $addrs = ReceiverAddress::getData($addrid); $provinces = Countys::getCountys(); $n = isset($_REQUEST['n']) ? (int) $_REQUEST['n'] : 0; Templates::Assign('n', $n); Templates::Assign('addrs', $addrs); Templates::Assign('provinces', $provinces); Templates::Display('addressnew.html'); }
function maillog() { include_once dirname(__FILE__) . "/ressources/class.status.logs.inc"; $user = new usersMenus(); $tpl = new Templates(); if ($user->AsPostfixAdministrator == false) { echo DIV_SHADOW($tpl->_ENGINE_parse_body('{no privileges}')); exit; } $sock = new sockets(); if ($_GET["maillog_filter"] != null) { switch ($_GET["maillog_filter"]) { case 'articaweb': $datas = file_get_contents(dirname(__FILE__) . '/ressources/logs/artica-web.log'); break; case 'procmail': $datas = $sock->getfile('procmail_logs'); break; default: $datas = $sock->getfile('maillog:' . $_GET["maillog_filter"]); break; } } else { $tbl = unserialize(base64_decode($sock->getFrameWork('cmd.php?postfix-tail=yes'))); } $datas = htmlentities($datas); $tbl = explode("\n", $datas); $tbl = array_reverse($tbl, TRUE); $html = "<table style='width:100%'>"; while (list($num, $val) = each($tbl)) { if (trim($val) != null) { if ($class == "rowA") { $class = "rowB"; } else { $class = "rowA"; } $html = $html . "<tr>\n\t\t<td width=1% style='border-bottom:1px dotted #CCCCCC' align='center'><img src='" . statusLogs($val) . "'></td>\n\t\t<td width=99%' style='border-bottom:1px dotted #CCCCCC;font-size:10px;'>{$val}</td>\n\t\t</tr>\n\t\t"; } } $html = $html . "</table>"; return $html; }
public function meta_box_template($post) { $articleTemplate = get_post_meta($post->ID, DPSFA_Article_Slug . "_template", true); $TemplateService = new Templates(); $templates = $TemplateService->get_templates(); ?> <p> <label for="my_meta_box_select">Template</label> <select name="<?php echo DPSFA_Article_Slug . "_template"; ?> " id="<?php echo DPSFA_Article_Slug . "template"; ?> "> <?php foreach ($templates as $template) { ?> <option value="<?php echo $template['path']; ?> " <?php selected($articleTemplate, $template['path']); ?> > <?php echo $template['type']; ?> : <?php echo $template['name']; ?> </option> <?php } ?> </select> <?php wp_nonce_field('article_meta_template', 'article_meta_template'); ?> </p> <?php }
function buildViewer($template_id, $album_id) { $this->template_id = $template_id; $this->album_id = $album_id; $this->setupDir(); $templates = new Templates(); $this->template = $templates->fetchRow('id=' . $template_id); if (!$this->template->data) { throw new BuilderException('Template not uploaded'); } $this->writeResources(); $images = $this->imageList(); foreach ($images as $image) { $this->logger->info("building {$image->title}"); $this->current_image = $image; $this->buildPage(); } symlink($this->build_dir . '/1.html', $this->build_dir . '/index.html'); $this->setBuildTime(); }
/** * Creates a new model. * If creation is successful, the browser will be redirected to the 'view' page. */ public function actionCreate() { $model = new Templates(); $users = User::getNames(); if (isset($_POST['Templates'])) { $temp = $model->attributes; $model->setX2Fields($_POST['Templates']); if (isset($_POST['x2ajax'])) { $ajaxErrors = $this->quickCreate($model); } else { if ($model->save()) { $this->redirect(array('view', 'id' => $model->id)); } } } if (isset($_POST['x2ajax'])) { $this->renderInlineCreateForm($model, isset($ajaxErrors) ? $ajaxErrors : false); } else { $this->render('create', array('model' => $model, 'users' => $users)); } }