コード例 #1
0
        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
0
ファイル: Step3.php プロジェクト: sysraj86/carnivalcrm
//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
0
ファイル: ms_local.php プロジェクト: inkoss/karoshi-server
        $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
0
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);
                while ($val_status = mysql_fetch_array($res_status)) {
                    $status[$val_status['id']] = $val_status['lbl'];
                }
                //print_r($status);
                $list_type = array('TEXT', 'TEXTAREA', 'SELECT', 'SHOW DATA', 'PASSWORD', 'CHECKBOX', 'LIST', 'HIDDEN', 'BLOB (FILE)', 'LINK LIST', 'TABLE');
                $yes_no = array($l->g(454), $l->g(455));
                $sql_detailField = "select type,field,lbl,must_completed,\n\t\t\t\t\t\t\t\t\t\tvalue,restricted,link_status \n\t\t\t\t\t\t\t\t\t  FROM downloadwk_fields \n\t\t\t\t\t\t\t\t\t  where id='%s' and tab='%s' ";
                $arg = array($protectedPost['FIELDS'], $protectedPost['TAB']);
                $result_detailField = mysql2_query_secure($sql_detailField, $_SESSION['OCS']["readServer"], $arg);
                $item_detailField = mysql_fetch_object($result_detailField);
                //if there is no result or more than 1, don't show update table
                $num_row = mysql_numrows($result_detailField);
                if ($num_row == 1) {
                    $protectedPost['type'] = $item_detailField->type;
                    $protectedPost['must_completed'] = $item_detailField->must_completed;
                    $protectedPost['restricted'] = $item_detailField->restricted;
                    $protectedPost['link_status'] = $item_detailField->link_status;
                    $name_field = array('type', 'field', 'lbl', 'must_completed', 'value', 'restricted', 'link_status');
                    $tab_name = array($l->g(1071) . ':', $l->g(1098) . ':', $l->g(1063) . ':', $l->g(1064) . ':', $l->g(1099) . ':', $l->g(1065) . ':', $l->g(1066) . ':');
                    if ($default_field[$protectedPost['FIELDS']]) {
                        $title = $l->g(1101);
                        //$showbutton=false;
                        $type_field = array(3, 3, 3, 3, 0, 3, 3, 7);
                        $value_field = array($list_type[$item_detailField->type], $item_detailField->field, $l->g($item_detailField->lbl), $yes_no[$item_detailField->must_completed], $item_detailField->value, $yes_no[$item_detailField->restricted], $status[$item_detailField->link_status], 'value');
                        if ($item_detailField->field == "STATUS") {
                            $type_field[4] = 2;
                            unset($status[0]);
                            $value_field[4] = $status;
                            $protectedPost['value'] = $item_detailField->value;
                        }
                        $name_field[7] = 'DEFAULT_FIELD';
                        $tab_name[7] = '';
                    } else {
                        $title = "";
                        //$showbutton=true;
                        $type_field = array(2, 0, 0, 2, 0, 2, 2);
                        $value_field = array($list_type, $item_detailField->field, $item_detailField->lbl, $yes_no, $item_detailField->value, $yes_no, $status);
                    }
                    $tab_typ_champ = show_field($name_field, $type_field, $value_field);
                    tab_modif_values($tab_name, $tab_typ_champ, $tab_hidden, $title, $comment = "", $name_button = "fields", $showbutton = true, $form_name = 'NO_FORM');
                }
            }
        } elseif ($protectedPost['conf'] == "STATUS") {
            //mise à jour des valeurs de statuts
            if ($protectedPost['Valid_fields_x'] != '') {
                if (trim($protectedPost['lbl']) != '') {
                    $sql_update = "UPDATE downloadwk_statut_request\n\t\t\t\t\t\t\t\t\t\tset LBL='%s' ,  ACTIF='%s'\n\t\t\t\t\t\t\t\t\t\twhere ID='%s'";
                    $arg = array($protectedPost['lbl'], $protectedPost['actif'], $protectedPost['id']);
                    mysql2_query_secure($sql_update, $_SESSION['OCS']["writeServer"], $arg);
                    msg_success($l->g(1121));
                } else {
                    msg_error($l->g(988));
                }
            }
            $infos_status = list_status(false);
            $name_field = array("STATUS");
            $tab_name = array($l->g(1100) . ":");
            $type_field = array(2);
            $value_field = array($infos_status['STAT']);
            if (isset($protectedPost['STATUS']) and $protectedPost['STATUS'] != 0) {
                //delete old post if you change status
                if (isset($protectedPost['OLD_STATUS']) and $protectedPost['OLD_STATUS'] != $protectedPost['STATUS']) {
                    unset($protectedPost['actif'], $protectedPost['lbl'], $protectedPost['name']);
                }
                $yes_no = array($l->g(454), $l->g(455));
                if (!isset($protectedPost['actif'])) {
                    $protectedPost['actif'] = $infos_status['ACTIF'][$protectedPost['STATUS']];
                }
                if (!isset($protectedPost['lbl'])) {
                    $protectedPost['lbl'] = $infos_status['STAT_BIS'][$protectedPost['STATUS']];
                }
                if (!isset($protectedPost['name'])) {
                    $protectedPost['name'] = $infos_status['NIV'][$protectedPost['STATUS']];
                }
                $protectedPost['id'] = $protectedPost['STATUS'];
                array_push($name_field, 'actif', 'id', 'lbl', 'name', 'OLD_STATUS');
                array_push($tab_name, $l->g(1102) . ':', $l->g(1103) . ':', $l->g(1063) . ':', $l->g(1064) . ':', '');
                array_push($type_field, 2, 3, 0, 3, 7);
                array_push($value_field, $yes_no, $protectedPost['id'], $protectedPost['lbl'], $protectedPost['name'], $protectedPost['STATUS']);
                $showbutton = true;
            } else {
                $showbutton = false;
            }
            $tab_typ_champ = show_field($name_field, $type_field, $value_field);
            $tab_typ_champ[0]['RELOAD'] = $form_name;
            tab_modif_values($tab_name, $tab_typ_champ, $tab_hidden, $title, $comment = "", $name_button = "fields", $showbutton, $form_name = 'NO_FORM');
        }
    }
}
コード例 #5
0
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
0
ファイル: view_cert.php プロジェクト: srinidg/stbennos-parish
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
0
ファイル: view_cert.php プロジェクト: srinidg/stbennos-parish
$pdf->Cell(0, 1, '', 0, 1);
$pdf->SetFont("times", "R", 14);
$banns = $model->banns;
show_field($pdf, $banns->groom_name);
show_field_ln($pdf, '', ', ');
show_field_ln($pdf, $banns->groom_parent, 'S/o    ');
show_field($pdf, BannsRecord::get_parish($banns->groom_parish), 'of  ');
show_field_ln($pdf, '', ' parish');
/*	$pdf->Cell(2,0,"",0,0);
	$pdf->Cell(0,0.8,BannsRecord::get_parish($banns->groom_parish). ' Parish and ',0,1,'L');
*/
show_field_ln($pdf, '', '        and');
show_field($pdf, $banns->bride_name, '');
show_field_ln($pdf, '', ', ');
show_field_ln($pdf, $banns->bride_parent, 'D/o  ');
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_ln($pdf, '', 'The banns have been published, and no');
show_field_ln($pdf, '', 'impediment has been brought to our notice. Nor do');
show_field_ln($pdf, '', 'we know of any objection to this marriage.');
show_field_ln($pdf, '', '');
コード例 #8
0
ファイル: view_cert.php プロジェクト: srinidg/stbennos-parish
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);
コード例 #9
0
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'));
            }
        }
    }
}
コード例 #10
0
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));
}
コード例 #11
0
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);
    }
}
コード例 #12
0
ファイル: view_cert.php プロジェクト: srinidg/stbennos-parish
show_field($pdf, "Rank or Profession", $marriage->groom_rank_prof);
show_field($pdf, "Name of father", $marriage->groom_fathers_name);
show_field($pdf, "name of mother", $marriage->groom_mothers_name);
show_field($pdf, "residence", $marriage->groom_residence);
show_field($pdf, "Name of Bride", $marriage->bride_name);
show_field($pdf, "DATE OF BIRTH/AGE", $marriage->bride_dob);
show_field($pdf, "Bride Baptism Date", $marriage->bride_baptism_dt);
show_field($pdf, "Status", FieldNames::value('marital_status', $marriage->bride_status));
show_field($pdf, "Rank or Profession", $marriage->bride_rank_prof);
show_field($pdf, "Name of father", $marriage->bride_fathers_name);
show_field($pdf, "name of mother", $marriage->bride_mothers_name);
show_field($pdf, "residence", $marriage->bride_residence);
show_field($pdf, "by banns or licence", $marriage->banns_licence);
show_field($pdf, "minister", $marriage->minister);
show_field($pdf, "Witness 1", $marriage->witness1);
show_field($pdf, "Witness 2", $marriage->witness2);
show_field($pdf, 'Remarks', $marriage->remarks);
draw_line($pdf);
$pdf->SetFont("courier", "R", 9);
$pdf->Cell(0, 1, '', 0, 1);
$pdf->Cell(0, 0, 'I CERTIFY THAT THE ABOVE IS A TRUE COPY OF AN ENTRY IN THE REGISTER', 0, 1, 'C');
$pstr = strtoupper($parish->name . ", " . $parish->city);
$pdf->Cell(0, 0, "OF MARRIAGES KEPT AT {$pstr}", 0, 1, 'C');
$pdf->Cell(0, 1, '', 0, 1);
$pdf->SetFont("courier", "R", 11);
$pdf->Cell(10, 1, 'DATE: ' . $model->cert_dt, 0, 1, 'C');
$pdf->Cell(0, 0, 'PARISH PRIEST             ', 0, 0, 'R');
$pdf->Line(13, 26.1, 18, 26.1, array('dash' => 3, 'width' => 0.01));
$mid = $model->id;
$pdf->Output("marriage-cert-{$mid}.pdf", "I");
Yii::app()->end();
コード例 #13
0
ファイル: view_cert.php プロジェクト: srinidg/stbennos-parish
    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();
コード例 #14
0
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);