本文整理汇总了PHP中show_field函数的典型用法代码示例。如果您正苦于以下问题:PHP show_field函数的具体用法?PHP show_field怎么用?PHP show_field使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了show_field函数的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array_push
array_push($type_field, 0);
array_push($value_field, $protectedPost['newlbl']);
if ($protectedGet['admin'] == "fields") {
array_push($name_field, "newtype");
array_push($tab_name, $l->g(1071) . ":");
array_push($type_field, 2);
array_push($value_field, $multi_choice);
array_push($name_field, "must_completed");
array_push($tab_name, $l->g(1064) . ":");
array_push($type_field, 2);
array_push($value_field, $yes_no);
array_push($name_field, "restricted");
array_push($tab_name, $l->g(1065) . ":");
array_push($type_field, 2);
array_push($value_field, $yes_no);
array_push($name_field, "link_status");
array_push($tab_name, $l->g(1066) . ":");
array_push($type_field, 2);
array_push($value_field, $status);
}
}
$tab_typ_champ = show_field($name_field, $type_field, $value_field, $config);
$tab_typ_champ[0]['CONFIG']['SIZE'] = 20;
$tab_typ_champ[1]['CONFIG']['SIZE'] = 20;
tab_modif_values($tab_name, $tab_typ_champ, $tab_hidden, $title = "", $comment = "", $name_button = "modif", $showbutton = true, $form_name = 'NO_FORM');
}
echo "</div>";
echo close_form();
?>
示例2: JSON
//set return parameters.
if (!empty($_REQUEST['return_module'])) {
$xtpl->assign("RETURN_MODULE", $_REQUEST['return_module']);
}
if (!empty($_REQUEST['return_action'])) {
$xtpl->assign("RETURN_ACTION", $_REQUEST['return_action']);
}
if (!empty($_REQUEST['return_id'])) {
$xtpl->assign("RETURN_ID", $_REQUEST['return_id']);
}
$temp_field_array = $focus->merge_bean->field_defs;
$field_count = 1;
$json = new JSON(JSON_LOOSE_TYPE);
$diff_field_count = 0;
foreach ($temp_field_array as $field_array) {
if (show_field($field_array)) {
$select_row_curr_field_value = null;
$b_values_different = false;
$section_name = 'merge_row_similar';
//Prcoess locaton of the field. if values are different show field in first section. else 2nd.
$select_row_curr_field_value = $focus->merge_bean->{$field_array}['name'];
foreach ($merge_ids_array as $id) {
if ($mergeBeanArray[$id]->{$field_array}['name'] == '' and $select_row_curr_field_value == '' or $mergeBeanArray[$id]->{$field_array}['name'] == $select_row_curr_field_value) {
$section_name = 'merge_row_similar';
} else {
$section_name = 'merge_row_diff';
$diff_field_count++;
break;
//foreach
}
}
示例3: isset
$i++;
$info_form['FIELDS']['name_field'][$i] = $key;
$info_form['FIELDS']['type_field'][$i] = 0;
if ($key == 'ADDR_MAC_GENERIC') {
$info_form['FIELDS']['value_field'][$i] = isset($protectedPost[$key]) ? $protectedPost[$key] : RandomMAC();
} else {
$info_form['FIELDS']['value_field'][$i] = isset($protectedPost[$key]) ? $protectedPost[$key] : rand();
}
$info_form['FIELDS']['tab_name'][$i] = $value . "*";
$config[$i]['CONFIG']['SIZE'] = 30;
$other_data['COMMENT_BEHING'][$i] = '_M';
}
$accountinfo_form = show_accountinfo('', 'COMPUTERS', '5');
//merge data
$info_form['FIELDS']['name_field'] = array_merge($info_form['FIELDS']['name_field'], $accountinfo_form['FIELDS']['name_field']);
$info_form['FIELDS']['type_field'] = array_merge($info_form['FIELDS']['type_field'], $accountinfo_form['FIELDS']['type_field']);
$info_form['FIELDS']['value_field'] = array_merge($info_form['FIELDS']['value_field'], $accountinfo_form['FIELDS']['value_field']);
$info_form['FIELDS']['tab_name'] = array_merge($info_form['FIELDS']['tab_name'], $accountinfo_form['FIELDS']['tab_name']);
$config = array_merge($config, $accountinfo_form['CONFIG']);
$other_data['COMMENT_BEHING'] = array_merge($other_data['COMMENT_BEHING'], $accountinfo_form['COMMENT_BEHING']);
$tab_typ_champ = show_field($info_form['FIELDS']['name_field'], $info_form['FIELDS']['type_field'], $info_form['FIELDS']['value_field']);
foreach ($config as $key => $value) {
$tab_typ_champ[$key]['CONFIG'] = $value['CONFIG'];
$tab_typ_champ[$key]['COMMENT_BEHING'] = $other_data['COMMENT_BEHING'][$key];
}
if (isset($tab_typ_champ)) {
tab_modif_values($info_form['FIELDS']['tab_name'], $tab_typ_champ, $tab_hidden);
}
echo "</div>";
echo close_form();
}
示例4: dde_conf
function dde_conf($form_name)
{
global $l, $protectedPost, $protectedGet, $pages_refs, $infos_status;
if ($_SESSION['OCS']['CONFIGURATION']['TELEDIFF_WK'] == 'YES') {
//sous onglets
if ($infos_status['NIV_BIS'] != '') {
$conf_value['GENERAL'] = $l->g(107);
$conf_value['GUI'] = $l->g(84);
}
$conf_value['STATUS'] = $l->g(1095);
//$conf_value['ADMIN']='Administration';
onglet($conf_value, $form_name, "conf", 7);
if ($protectedPost['Valid'] == $l->g(103)) {
$etat = verif_champ();
if ($etat == "") {
$MAJ = update_default_value($protectedPost);
} else {
$msg = "";
foreach ($etat as $name => $value) {
$msg .= $name . " " . $l->g(759) . " " . $value . "<br>";
}
msg_error($msg);
}
}
if (!isset($protectedPost['conf']) or $protectedPost['conf'] == "GENERAL") {
pageTELEDIFF_WK($form_name);
}
if ($protectedPost['conf'] == "GUI") {
//mise a jour des données demandée par l'utilisateur
if ($protectedPost['Valid_fields_x'] != "") {
//si la mise a jour est limitée à certain champs
if (isset($protectedPost['DEFAULT_FIELD'])) {
$fields = explode(',', $protectedPost['DEFAULT_FIELD']);
} else {
$fields = array('type', 'field', 'lbl', 'must_completed', 'value', 'restricted', 'link_status');
//si le type est TEXTAREA, il faut aussi changer le type de la colonne en longtext
if ($protectedPost['type'] == 1) {
$type_modif = "longtext";
} else {
$type_modif = "varchar(255)";
}
$sql_modify_type = 'ALTER TABLE downloadwk_pack change
fields_%1$s
fields_%1$s ' . $type_modif . ' default null;';
$arg = array($protectedPost['FIELDS']);
mysql2_query_secure($sql_modify_type, $_SESSION['OCS']["writeServer"], $arg);
//echo $sql_modify_type;
}
//création de la requête
$sql_update = 'UPDATE downloadwk_fields
set ';
$arg = array();
foreach ($fields as $key => $value) {
$sql_update .= $value . "='%s' ,";
$arg[] = $protectedPost[$value];
}
$sql_update = substr($sql_update, 0, -1) . "where id='%s'";
$arg[] = $protectedPost['FIELDS'];
mysql2_query_secure($sql_update, $_SESSION['OCS']["writeServer"], $arg);
//print_r
//echo $sql_update;
}
$sql_service = "select id,field,value,lbl,default_field \n\t\t\t\t\t\t\t FROM downloadwk_tab_values";
$resultSERV = mysql2_query_secure($sql_service, $_SESSION['OCS']["readServer"]);
$List_tab[] = '';
while ($item = mysql_fetch_object($resultSERV)) {
$lbl = define_lbl($item->lbl, $item->default_field);
$List_tab[$item->id] = $lbl;
}
$name_field = array("TAB");
//$oblig_field['INFO_VALID']=$name_field['INFO_VALID'];
$tab_name = array($l->g(1097) . ":");
$type_field = array(2);
$value_field = array($List_tab);
if (isset($protectedPost['TAB']) and $protectedPost['TAB'] != 0) {
$sql_service = "select id,lbl,default_field \n\t\t\t\t\t\t\t\t FROM downloadwk_fields \n\t\t\t\t\t\t\t\t where TAB='%s'";
$arg = array($protectedPost['TAB']);
$resultSERV = mysql2_query_secure($sql_service, $_SESSION['OCS']["readServer"], $arg);
$List_fields[] = '';
while ($item = mysql_fetch_object($resultSERV)) {
$lbl = define_lbl($item->lbl, $item->default_field);
$List_fields[$item->id] = $lbl;
$default_field[$item->id] = $item->default_field;
}
array_push($name_field, "FIELDS");
array_push($tab_name, $l->g(1096) . ":");
array_push($type_field, 2);
array_push($value_field, $List_fields);
}
$tab_typ_champ = show_field($name_field, $type_field, $value_field);
$tab_typ_champ[0]['COMMENT_BEHING'] = "<a href=# onclick=window.open(\"index.php?" . PAG_INDEX . "=" . $pages_refs['ms_admin_management'] . "&head=1&admin=tab&value=TAB&form=" . $form_name . "\",\"admin_management\",\"location=0,status=0,scrollbars=0,menubar=0,resizable=0,width=550,height=450\")><img src=image/plus.png></a>";
$tab_typ_champ[0]['RELOAD'] = $form_name;
$tab_typ_champ[1]['RELOAD'] = $form_name;
$tab_typ_champ[1]['COMMENT_BEHING'] = "<a href=# onclick=window.open(\"index.php?" . PAG_INDEX . "=" . $pages_refs['ms_admin_management'] . "&head=1&admin=fields&value=" . $protectedPost['TAB'] . "&form=" . $form_name . "\",\"admin_management\",\"location=0,status=0,scrollbars=0,menubar=0,resizable=0,width=700,height=650\")><img src=image/plus.png></a>";
tab_modif_values($tab_name, $tab_typ_champ, $tab_hidden, $title = "", $comment = "", $name_button = "modif", $showbutton = false, $form_name = 'NO_FORM');
if (isset($protectedPost['FIELDS']) and $protectedPost['FIELDS'] != 0) {
echo "<br>";
$sql_status = "SELECT id,lbl FROM downloadwk_statut_request";
$res_status = mysql2_query_secure($sql_status, $_SESSION['OCS']["readServer"]);
$status['0'] = $l->g(454);
//.........这里部分代码省略.........
示例5: show_marketo_form
function show_marketo_form($form_id, $cpn_id, $post_reg_action = "", $post_reg_data = "", $target = "", $form_title = "", $popup = false, $button_text = "", $popup_id = "mkto_form_popup", $lead_text = "", $btn_style = "small_red")
{
global $post, $wp_query;
$post = get_post($form_id);
$form_display = "";
$button_id = $popup_id . '_btn';
if (isset($post)) {
$fields = $post->form_field;
if ($_COOKIE["_mkto_trk"]) {
$lead_data = get_lead_data($fields);
}
if ($popup) {
if ($btn_style == 'small_red') {
$form_display .= sprintf('<input class="wpcf7-form-control wpcf7-submit itc-download-button" type="submit" data-toggle="modal" data-target="#%s" value="%s"/>', $popup_id, $button_text);
} else {
if ($btn_style == 'long_cta') {
$form_display .= '<div class="spb_impact_text spb_content_element clearfix col-sm-12 cta_align_right itc-no-padding">';
$form_display .= '<div class="impact-text-wrap clearfix">';
$form_display .= '<div class="spb_call_text">';
$form_display .= '<p>' . $lead_text . '</p>';
$form_display .= '</div>';
$form_display .= sprintf('<input class="sf-button sf-button accent " type="submit" data-toggle="modal" data-target="#%s" value="%s"/>', $popup_id, $button_text);
$form_display .= '</div>';
$form_display .= '</div>';
}
}
$form_display .= '<div id="' . $popup_id . '" tabindex="-1" class="modal fade">
<div class="modal-dialog" role="document">
<div class="modal-content">';
$form_display .= '<div class="modal-header">';
$form_display .= '<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="ss-delete"></i></button>';
if ($form_title) {
$form_display .= '<h3 id="modal-label">' . $form_title . '</h3>';
}
$form_display .= '</div>';
$form_display .= '<div class="modal-body">';
}
//This is where the form begins
$form_display .= '<form class = "wpcf7-form" method="POST" action="#">';
if (!$popup & $form_title) {
$form_display .= '<h3>' . $form_title . '</h3>';
}
foreach ($fields as $field) {
if ($lead_data) {
$form_display .= show_field($field, $lead_data[$field["field_name"]]);
} else {
$form_display .= show_field($field);
}
}
$form_display .= '<input class="wpcf7-form-control wpcf7-submit" id="' . $button_id . '" type="submit" value="' . __($post->submit_text, "swift-framework-admin") . '"/>';
$form_display .= wp_nonce_field('marketo_form_sbumit', 'mkto_form_submit');
$form_display .= '<input type="hidden" name="mkto_form_id" value="' . $form_id . '"/>';
$form_display .= '<input type="hidden" name="cpnid" value="' . $cpn_id . '"/>';
$form_display .= '<input type="hidden" name="post_reg_action" value="' . $post_reg_action . '"/>';
$form_display .= '<input type="hidden" name="post_reg_data" value="' . $post_reg_data . '"/>';
$form_display .= '<input type="hidden" name="post_reg_target" value="' . $target . '"/>';
$form_display .= "</form>";
if ($popup) {
$form_display .= '</div>
</div>
</div>
</div>';
}
$clicked_link = "";
if ($post_reg_action == 'wp_download') {
$clicked_link = get_post($post_reg_data)->whitepaper_file;
} else {
if ($post_reg_action == 'webcast_presentation_download') {
$clicked_link = get_post($post_reg_data)->webcast_presentation;
} else {
if ($post_reg_action == 'webcast_webcast_download') {
$clicked_link = get_post($post_reg_data)->webcast_recording;
}
}
}
$form_display .= '<script>
jQuery(document).ready(function(){
jQuery("#' . $button_id . '").click(function(){
Munchkin.munchkinFunction("clickLink", { href: "' . $clicked_link . '" });
});
});
</script>';
return $form_display;
}
}
示例6: show_field
show_field($pdf, $banns->bride_name, 'Ms. ');
show_field_ln($pdf, '', ', ');
show_field_ln($pdf, $banns->bride_parent, 'D/o. ');
$bp = ctype_digit($banns->bride_parish) ? 'our' : 'your';
show_field_ln($pdf, '', "of {$bp} parish");
if (ctype_digit($banns->groom_parish)) {
$local = 'groom';
$other = 'bride';
} elseif (ctype_digit($banns->bride_parish)) {
$local = 'bride';
$other = 'groom';
} else {
echo 'ERROR: Neither from our parish';
}
show_field_ln($pdf, '', '');
show_field($pdf, $local, 'The ');
show_field_ln($pdf, '', ' is also free to marry. You may');
show_field_ln($pdf, ' ', 'kindly publish the banns on');
show_field_ln($pdf, '', '');
$pp = 'groom' == $local ? 'His' : 'Her';
show_field_ln($pdf, $banns->{$local}()->dob, "{$pp} Date of Birth: ");
show_field_ln($pdf, $banns->{$local}()->baptism_dt, 'Date of Bapt: ');
show_field_ln($pdf, '', '');
$pdf->Cell(2, 0, '', 0, 0);
$pdf->Cell(0, 0, 'Thanking you, ', 0, 1, 'L');
$pdf->Cell(2, 0, '', 0, 0);
$pdf->Cell(0, 0, 'Yours in Christ, ', 0, 1, 'L');
show_field_ln($pdf, '', '');
show_field_ln($pdf, '', '');
show_field_ln($pdf, '', '');
$pdf->Cell(2, 0, '', 0, 0);
示例7: show_field_ln
show_field_ln($pdf, $banns->bride_parent, 'daughter of ');
show_field($pdf, BannsRecord::get_parish($banns->bride_parish), 'of ');
show_field_ln($pdf, '', ' parish');
if (ctype_digit($banns->groom_parish)) {
$local = 'groom';
$other = 'bride';
} elseif (ctype_digit($banns->bride_parish)) {
$local = 'bride';
$other = 'groom';
} else {
echo 'ERROR: Neither from our parish';
}
show_field_ln($pdf, '', '');
show_field($pdf, $local, 'The ');
show_field_ln($pdf, '', ' is free to contract Marriage. Kindly');
show_field($pdf, $other, 'let me know the freedom of the ');
show_field_ln($pdf, '', ' to marry.');
show_field_ln($pdf, '', '');
show_field_ln($pdf, $banns->{$local}()->dob, 'Date of Birth: ');
show_field_ln($pdf, $banns->{$local}()->baptism_dt, 'Date of Bapt: ');
show_field_ln($pdf, '', '');
show_field_ln($pdf, '', 'Please inform also the dates for the publication of Banns.');
show_field_ln($pdf, '', '');
$pdf->Cell(0, 0, 'Thanking you, ', 0, 1, 'R');
$pdf->Cell(0, 0, 'Yours in Christ, ', 0, 1, 'R');
show_field_ln($pdf, '', '');
show_field_ln($pdf, '', '');
show_field_ln($pdf, '', '');
$pdf->Cell(0, 0, '(signature) ', 0, 1, 'R');
$pdf->SetFont("times", "B", 11);
$pdf->SetFont("courier", "R", 11);
示例8: admin_profil
function admin_profil($form)
{
global $protectedPost, $l, $pages_refs;
$yes_no = array('YES' => $l->g(455), 'NO' => $l->g(454));
$info_field = array('NAME' => array('INFO' => array('LBL' => $l->g(1153) . ": ", 'VALUE' => '')), 'GUI' => array('RESTRICTION' => array('LBL' => $l->g(1154) . ": ", 'VALUE' => $yes_no)), 'TELEDIFF_ACTIVATE' => array('RESTRICTION' => array('LBL' => $l->g(1158) . ": ", 'VALUE' => $yes_no)), 'TELEDIFF_VISIBLE' => array('RESTRICTION' => array('LBL' => $l->g(1301) . ": ", 'VALUE' => $yes_no)), 'EXPORT_XML' => array('RESTRICTION' => array('LBL' => $l->g(1305), 'VALUE' => $yes_no)), 'WOL' => array('RESTRICTION' => array('LBL' => $l->g(1281) . ": ", 'VALUE' => $yes_no)), 'MACADD' => array('ADMIN_BLACKLIST' => array('LBL' => $l->g(1159) . ": ", 'VALUE' => $yes_no)), 'SERIAL' => array('ADMIN_BLACKLIST' => array('LBL' => $l->g(1160) . ": ", 'VALUE' => $yes_no)), 'IPDISCOVER' => array('ADMIN_BLACKLIST' => array('LBL' => $l->g(1161) . ": ", 'VALUE' => $yes_no), 'CONFIGURATION' => array('LBL' => $l->g(1172) . ": ", 'VALUE' => $yes_no)), 'TELEDIFF' => array('CONFIGURATION' => array('LBL' => $l->g(1162) . ": ", 'VALUE' => $yes_no)), 'CONFIG' => array('CONFIGURATION' => array('LBL' => $l->g(1163) . ": ", 'VALUE' => $yes_no)), 'GROUPS' => array('CONFIGURATION' => array('LBL' => $l->g(1164) . ": ", 'VALUE' => $yes_no)), 'CONSOLE' => array('CONFIGURATION' => array('LBL' => $l->g(1165) . ": ", 'VALUE' => $yes_no)), 'ALERTE_MSG' => array('CONFIGURATION' => array('LBL' => $l->g(1166) . ": ", 'VALUE' => $yes_no)), 'ACCOUNTINFO' => array('CONFIGURATION' => array('LBL' => $l->g(1167) . ": ", 'VALUE' => $yes_no)), 'CHANGE_ACCOUNTINFO' => array('CONFIGURATION' => array('LBL' => $l->g(1168) . ": ", 'VALUE' => $yes_no)), 'CHANGE_USER_GROUP' => array('CONFIGURATION' => array('LBL' => $l->g(1169) . ": ", 'VALUE' => $yes_no)), 'MANAGE_PROFIL' => array('CONFIGURATION' => array('LBL' => $l->g(1170) . ": ", 'VALUE' => $yes_no)), 'MANAGE_USER_GROUP' => array('CONFIGURATION' => array('LBL' => $l->g(1171) . ": ", 'VALUE' => $yes_no)), 'MANAGE_SMTP_COMMUNITIES' => array('CONFIGURATION' => array('LBL' => $l->g(1205) . ": ", 'VALUE' => $yes_no)), 'DELETE_COMPUTERS' => array('CONFIGURATION' => array('LBL' => $l->g(1272) . ": ", 'VALUE' => $yes_no)));
$lbl_cat = array('INFO' => $l->g(1173), 'PAGE_PROFIL' => $l->g(1174), 'RESTRICTION' => $l->g(1175), 'ADMIN_BLACKLIST' => $l->g(1176), 'CONFIGURATION' => $l->g(1177));
if ($protectedPost['Valid_modif_profil']) {
//read profil file
$forprofil = read_profil_file($protectedPost['PROFILS']);
//read all profil value
$forall = read_config_file();
//build new tab with new values
foreach ($info_field as $if_name => $if_value) {
foreach ($if_value as $if_cat => $if_val) {
if (isset($protectedPost[$if_name]) and $protectedPost['cat'] == $if_cat) {
$new_value[$if_cat][$if_name] = $protectedPost[$if_name];
} else {
$new_value[$if_cat][$if_name] = $forprofil[$if_cat][$if_name];
}
}
}
foreach ($forall['URL'] as $name => $value) {
if (isset($protectedPost[$name]) and $protectedPost['cat'] == "PAGE_PROFIL") {
$new_value["PAGE_PROFIL"][$name] = '';
}
}
if (!isset($new_value['PAGE_PROFIL'])) {
$new_value['PAGE_PROFIL'] = $forprofil['PAGE_PROFIL'];
}
update_config_file($protectedPost['PROFILS'], $new_value);
msg_success($l->g(1274));
}
$array_profil = get_profile_labels();
echo $l->g(1196) . ": " . show_modif($array_profil, "PROFILS", 2, $form);
echo "<a href=\"index.php?" . PAG_INDEX . "=" . $pages_refs['ms_new_profil'] . "&head=1&form=" . $form . "\"><img src=image/plus.png></a>";
if (isset($protectedPost['PROFILS']) and $protectedPost['PROFILS'] != '') {
$forall = read_config_file();
$forprofil = read_profil_file($protectedPost['PROFILS'], 'WRITE');
if (is_array($forprofil) and is_array($forall)) {
foreach ($forprofil as $key => $value) {
if (isset($lbl_cat[$key])) {
$data_on[$key] = $lbl_cat[$key];
}
}
onglet($data_on, $form, "cat", 10);
if (isset($forprofil[$protectedPost['cat']]) and $protectedPost['cat'] != 'PAGE_PROFIL') {
$name_field = array();
$type_field = array();
$tab_name = array();
$value_field = array();
foreach ($info_field as $if_name => $if_value) {
foreach ($if_value as $if_cat => $if_val) {
if ($protectedPost['cat'] == $if_cat) {
if (isset($forprofil[$if_cat][$if_name])) {
$protectedPost[$if_name] = $forprofil[$if_cat][$if_name];
}
array_push($name_field, $if_name);
array_push($tab_name, $if_val['LBL']);
if (is_array($if_val['VALUE'])) {
array_push($type_field, 2);
if (!isset($protectedPost[$if_name])) {
array_push($if_val['VALUE'], '');
}
array_push($value_field, $if_val['VALUE']);
} else {
array_push($type_field, 0);
array_push($value_field, replace_language($forprofil[$if_cat][$if_name]));
}
}
}
}
$tab_typ_champ = show_field($name_field, $type_field, $value_field);
tab_modif_values($tab_name, $tab_typ_champ, $tab_hidden, array('button_name' => 'modif_profil'));
} elseif ($protectedPost['cat'] == 'PAGE_PROFIL') {
$champs = "<table align=center><tr><td align=center>";
$i = 0;
ksort($forall['URL']);
foreach ($forall['URL'] as $key => $value) {
$champs .= "<input type='checkbox' name='" . $key . "' id='" . $key . "' ";
if (isset($forprofil[$protectedPost['cat']][$key])) {
$champs .= " checked ";
}
$champs .= " ></td><td>" . $key . "</td><td align=center>";
$i++;
if ($i == 4) {
$champs .= "</td></tr><tr><td align=center>";
$i = 0;
}
}
$champs .= "</td></tr></table>";
tab_modif_values($champs, array(), array(), array('button_name' => 'modif_profil'));
}
}
}
}
示例9: form_add_community
function form_add_community($title = '', $default_value, $form)
{
global $l, $pages_refs, $protectedPost;
$name_field = array("NAME", "VERSION");
$tab_name = array($l->g(49) . ": ", $l->g(1199) . ": ");
$type_field = array(0, 2);
$value_field = array($default_value['NAME'], $default_value['VERSION']);
if ($protectedPost['VERSION'] == '3') {
array_push($name_field, "USERNAME", "AUTHKEY", "AUTHPASSWD");
array_push($tab_name, "USERNAME : ", "AUTHKEY : ", "AUTHPASSWD :");
array_push($type_field, 0, 0);
array_push($value_field, $default_value['USERNAME'], $default_value['AUTHKEY'], $default_value['AUTHPASSWD']);
}
$tab_typ_champ = show_field($name_field, $type_field, $value_field);
foreach ($tab_typ_champ as $id => $values) {
$tab_typ_champ[$id]['CONFIG']['SIZE'] = 30;
}
$tab_typ_champ[1]['RELOAD'] = $form;
if (is_numeric($protectedPost['MODIF'])) {
$tab_hidden['MODIF'] = $protectedPost['MODIF'];
}
$tab_hidden['ADD_COMM'] = $protectedPost['ADD_COMM'];
$tab_hidden['ID'] = $protectedPost['ID'];
tab_modif_values($tab_name, $tab_typ_champ, $tab_hidden, array('title' => $title, 'show_frame' => false));
}
示例10: form_add_computer
function form_add_computer()
{
global $l;
$name_field = array("NAME", "OSNAME");
$name_field[] = "LASTNAME";
$name_field[] = "EMAIL";
$name_field[] = "COMMENTS";
//$name_field[]="USER_GROUP";
$tab_name[] = $l->g(49) . ": ";
$tab_name[] = $l->g(996) . ": ";
$tab_name[] = "Email: ";
$tab_name[] = $l->g(51) . ": ";
//$tab_name[]="Groupe de l'utilisateur: ";
$type_field[] = 0;
$type_field[] = 0;
$type_field[] = 0;
$type_field[] = 0;
//$type_field[]= 2;
if ($id_user != '' or $_SESSION['OCS']['profile']->getConfigValue('CHANGE_USER_GROUP') == 'NO') {
$tab_hidden['MODIF'] = $id_user;
$sql = "select ID,NEW_ACCESSLVL,USER_GROUP,FIRSTNAME,LASTNAME,EMAIL,COMMENTS from operators where id= '%s'";
$arg = $id_user;
$res = mysql2_query_secure($sql, $_SESSION['OCS']["readServer"], $arg);
$row = mysqli_fetch_object($res);
if ($_SESSION['OCS']['profile']->getConfigValue('CHANGE_USER_GROUP') == 'YES') {
$protectedPost['ACCESSLVL'] = $row->NEW_ACCESSLVL;
$protectedPost['USER_GROUP'] = $row->USER_GROUP;
$value_field = array($row->ID, $list_profil, $list_groups);
}
$value_field[] = $row->FIRSTNAME;
$value_field[] = $row->LASTNAME;
$value_field[] = $row->EMAIL;
$value_field[] = $row->COMMENTS;
} else {
if ($_SESSION['OCS']['profile']->getConfigValue('CHANGE_USER_GROUP') == 'YES') {
$value_field = array($protectedPost['ID'], $list_profil, $list_groups);
}
$value_field[] = $protectedPost['FIRSTNAME'];
$value_field[] = $protectedPost['LASTNAME'];
$value_field[] = $protectedPost['EMAIL'];
$value_field[] = $protectedPost['COMMENTS'];
}
if ($_SESSION['OCS']['cnx_origine'] == "LOCAL") {
$name_field[] = "PASSWORD";
$type_field[] = 0;
$tab_name[] = $l->g(217) . ":";
$value_field[] = $protectedPost['PASSWORD'];
}
$tab_typ_champ = show_field($name_field, $type_field, $value_field);
foreach ($tab_typ_champ as $id => $values) {
$tab_typ_champ[$id]['CONFIG']['SIZE'] = 40;
}
if ($_SESSION['OCS']['profile']->getConfigValue('MANAGE_USER_GROUP') == 'YES') {
$tab_typ_champ[2]["CONFIG"]['DEFAULT'] = "YES";
// $tab_typ_champ[1]['COMMENT_AFTER']="<a href=\"index.php?".PAG_INDEX."=".$pages_refs['ms_admin_profil']."&head=1\"><img src=image/plus.png></a>";
$tab_typ_champ[2]['COMMENT_AFTER'] = "<a href=\"index.php?" . PAG_INDEX . "=" . $pages_refs['ms_adminvalues'] . "&head=1&tag=USER_GROUP\"><img src=image/plus.png></a>";
}
if (isset($tab_typ_champ)) {
tab_modif_values($tab_name, $tab_typ_champ, $tab_hidden);
}
}
示例11: array
global $count;
$pdf->Line(10.6, 12.2 + $count * 0.8, 16, 12.3 + $count * 0.8, array('width' => 0.01, 'dash' => 3));
++$count;
}
function show_field($pdf, $label, $value)
{
$pdf->Cell(4, 0, "", 0, 0);
$pdf->Cell(0, 0.8, sprintf("%-20s: %s", strtoupper($label), strtoupper($value)), 0, 1, 'L');
draw_line($pdf);
}
show_field($pdf, 'DATE OF DEATH', $death->death_dt);
show_field($pdf, 'CAUSE OF DEATH', $death->cause);
show_field($pdf, 'CHRISTIAN NAME', $death->fname);
show_field($pdf, 'SUR NAME', $death->lname);
show_field($pdf, 'AGE', $death->age);
show_field($pdf, 'PROFESSION', $death->profession);
show_field($pdf, 'DATE BURIED', $death->buried_dt);
show_field($pdf, 'minister', $death->minister);
show_field($pdf, 'PLACE OF BURIAL', $death->burial_place);
$pdf->Cell(0, 4, "", 0, 1);
$pdf->SetFont("courier", "R", 10);
$pdf->Cell(0, 0, "I CERTIFY THAT THE ABOVE IS TRUE COPY OF AN ENTRY IN THE REGISTER", 0, 1, 'C');
$pstr = strtoupper($parish->name . ", " . $parish->city);
$pdf->Cell(0, 0, "OF DEATHS KEPT AT {$pstr}", 0, 1, 'C');
$pdf->Cell(0, 3, "", 0, 1);
$pdf->Cell(10, 1, 'DATE: ' . $model->cert_dt, 0, 0, 'C');
$pdf->Cell(0, 1, 'PARISH PRIEST ', 0, 0, 'R');
#$pdf->AliasNbPages();
$id = $model->id;
$pdf->Output("death-cert-{$id}.pdf", "I");
Yii::app()->end();
示例12: show_field
show_field($pdf, "2. Confirmations during the year", $confirmed);
$pdf->Cell(0, 0.5, '', 0, 1);
$pdf->Cell(1, 0, '', 0, 0);
$pdf->SetFont("times", "B", 14);
$pdf->count += 0.9;
show_field($pdf, "3. First Holy Communion during the year", $confirmed);
$pdf->Cell(0, 0.1, '', 0, 1);
$pdf->Cell(1, 0, '', 0, 0);
$pdf->Cell(0, 0.8, "4. Marriages", 0, 1, 'L');
$pdf->Cell(0, 1, '', 0, 1);
$pdf->SetFont("times", "R", 14);
$pdf->Cell(1.6, 0, "", 0, 0);
$pdf->count += 3.05;
show_field($pdf, "A. Between Catholics", $married_cath, 0, 1, 'L');
show_field($pdf, "B. Between Catholic & Non Catholic", $married_nc, 0, 1, 'L');
show_field($pdf, "Total Numbers of Marriages (A+B)", $married, 0, 1, 'L');
# draw_line($pdf);
$pdf->SetFont("times", "B", 12);
$y = 27;
$pdf->Text(2, $y, 'Name of the Parish Priest');
$pdf->Text(10, $y, 'Seal');
$pdf->Text(16, $y, 'Signature');
$pdf->AddPage();
$pdf->Cell(7, 0, '', 0, 0);
$pdf->SetFont("times", "B", 14);
$pdf->SetLineStyle(array('width' => 0.01, 'dash' => 0));
$pdf->Cell(4, 1, 'MASS TIMINGS', 'B', 1, 'C');
$pdf->SetFont("times", "R", 14);
$pdf->SetLineStyle(array('width' => 0.01, 'dash' => 3));
$pdf->Cell(0, 0.3, '', 0, 1, 'L');
$pdf->Cell(1, 0, '', 0, 0);