Example #1
0
    public function index()
    {
        fk_header();
        echo '
		<ul>
		<li><a href="' . fk_link('test/calendar') . '"> Evato FKCalendar</a></li>
		<li><a href="' . fk_link('test/calendar') . '"> Evato Comments</a></li>
		<li><a href="' . fk_link('test/calendar') . '"> Evato File Uploader</a></li>
		</ul>
		';
        fk_footer();
    }
Example #2
0
 function checkbox_view($checked)
 {
     $checked_text = '';
     if ($checked == 1) {
         $checked_text = 'checked="chekhed"';
         //$chk = '<input type="checkbox" value="1" name="chk-vw"  '.$checked_text.' >';
         $chk = '<img src="' . fk_link() . '_HTML/img/check-1.png" width="16">';
     } else {
         $chk = '<img src="' . fk_link() . '_HTML/img/check-0.png" width="16">';
     }
     //$chk = '<input type="checkbox" value="1" name="chk-vw"  '.$checked_text.' >';
     return $chk;
 }
Example #3
0
    /**
     *@package db_record
     *@method print_form_field()
     *@desc returns the list of html fields  automatically from a record
     *@since v0.1 beta
     * */
    public function print_form_field($field, $CssName = '', $ExtraAttributes = '', $encode_fields = FALSE, $access = TRUE, $read_only = FALSE, $code = '')
    {
        $html_fld = '';
        if ($encode_fields == TRUE) {
            $field_id_html = 'fkf_' . encode($field . $code);
            $field_name_html = encode($field . $code);
        } else {
            $field_id_html = $field . $code;
            $field_name_html = $field . $code;
        }
        $original_type = $this->form_fields[$field]['Type'];
        $type_x = explode("(", $original_type);
        if ($type_x > 1) {
            $type = $type_x[0];
        } else {
            $type = $original_type;
        }
        // Display Mode
        $mode_view_edit = $this->field_mode == 'view-edit' ? true : false;
        if ($read_only == true) {
            // read only
            $display_as = 'read-only';
        } else {
            if ($this->field_mode == 'view-edit') {
                $display_as = 'view-edit';
            } else {
                $display_as = 'edit';
            }
        }
        if ($this->useHtmlEntities_onField == true) {
            $this->fields[$field] = isset($this->fields[$field]) ? htmlentities($this->fields[$field]) : '';
        } else {
            $this->fields[$field] = isset($this->fields[$field]) ? $this->fields[$field] : '';
        }
        switch ($type) {
            case "varchar":
                // Class
                $Class = 'class="txt ' . @$CssName . '"';
                if ($access == TRUE) {
                    if ($display_as == 'view-edit') {
                        $html_fld .= '<div class="fld" onclick="appForm_updfldTxt({id:\'' . $field_id_html . '\'})"><input style="display:none" id="' . $field_id_html . '" name="' . $field_name_html . '" type="text" value="' . @$this->fields[$field] . '" ' . $Class . ' ' . @$ExtraAttributes . ' />';
                        $html_fld .= '<span id="val-' . $field_id_html . '">' . @$this->fields[$field] . '</span>&nbsp;<span class="ui-icon ui-icon-gear"></span></div>';
                        $html_fld .= '<input id="cur-v-' . $field_id_html . '" type="hidden" value="' . $this->fields[$field] . '"  />';
                    } elseif ($display_as == 'edit') {
                        $html_fld .= '<input id="' . $field_id_html . '" name="' . $field_name_html . '" type="text" value="' . @$this->fields[$field] . '" ' . $Class . ' ' . @$ExtraAttributes . ' />';
                    } elseif ($display_as == 'read-only') {
                        $html_fld .= @$this->fields[$field] . '<input id="' . $field_id_html . '" name="' . $field_name_html . '" type="hidden" value="' . @$this->fields[$field] . '" ' . $Class . ' ' . @$ExtraAttributes . ' />';
                    }
                }
                break;
            case "money":
                // Class
                $Class = 'class="txt ' . @$CssName . '"';
                if ($access == TRUE) {
                    if ($display_as == 'view-edit') {
                        $html_fld .= '<div class="fld" onclick="appForm_updfldTxt({id:\'' . $field_id_html . '\'})">$<input style="display:none" id="' . $field_id_html . '" name="' . $field_name_html . '" type="text" value="' . @$this->fields[$field] . '" ' . $Class . ' ' . @$ExtraAttributes . ' />';
                        $html_fld .= '<span id="val-' . $field_id_html . '">' . @$this->fields[$field] . '</span>&nbsp;<span class="ui-icon ui-icon-gear"></span></div>';
                        $html_fld .= '<input id="cur-v-' . $field_id_html . '" type="hidden" value="' . $this->fields[$field] . '"  />';
                    } elseif ($display_as == 'edit') {
                        $html_fld .= '';
                        $html_fld .= '<div class="input-prepend"><span class="add-on">$</span><input id="' . $field_id_html . '" name="' . $field_name_html . '" type="text" value="' . @$this->fields[$field] . '" ' . $Class . ' ' . @$ExtraAttributes . ' /></div>';
                    } elseif ($display_as == 'read-only') {
                        $html_fld .= fk_money_format($this->fields[$field]) . '<input id="' . $field_id_html . '" name="' . $field_name_html . '" type="hidden" value="' . @$this->fields[$field] . '" ' . $Class . ' ' . @$ExtraAttributes . ' />';
                    }
                }
                break;
            case "file":
                // Class
                $Class = 'class="txt ' . @$CssName . '"';
                if ($access == TRUE) {
                    if ($display_as == 'view-edit') {
                        $html_fld .= '<div class="fld" onclick="appForm_updfldTxt({id:\'' . $field_id_html . '\'})"><input style="display:none" id="' . $field_id_html . '" name="' . $field_name_html . '" type="text" value="' . @$this->fields[$field] . '" ' . $Class . ' ' . @$ExtraAttributes . ' />';
                        $html_fld .= '<span id="val-' . $field_id_html . '">' . @$this->fields[$field] . '</span>&nbsp;<span class="ui-icon ui-icon-gear"></span></div>';
                        $html_fld .= '<input id="cur-v-' . $field_id_html . '" type="hidden" value="' . $this->fields[$field] . '"  />';
                    } elseif ($display_as == 'edit') {
                        $html_fld .= '<input id="' . $field_id_html . '" name="' . $field_name_html . '" type="hidden" value="' . @$this->fields[$field] . '" ' . $Class . ' ' . @$ExtraAttributes . ' />';
                        $html_fld .= '<br><iframe src="' . fk_link() . 'FkMaster/upolader/' . $field_id_html . '/" name="ifrmupl-' . $field_id_html . '" style="width:95%;height:45px;" frameborder="0"></iframe>';
                        $file_data = '';
                        $ArUpl = new ActiveRecord('uploads');
                        $totUpl = $ArUpl->find(@$this->fields[$field]);
                        if ($totUpl == 1) {
                            if (strrpos($ArUpl->fields['tipo'], 'image') > -1) {
                                //image
                                $file_data = '<a href="' . http_uploads() . $ArUpl->fields['archivo'] . '" target="_blank"><img src="' . http_uploads() . $ArUpl->fields['archivo'] . '" ></a>';
                            } else {
                                //Other file
                                $file_data = '<a href="' . http_uploads() . $ArUpl->fields['archivo'] . '" target="_blank">' . $ArUpl->fields['titulo'] . '</a>';
                            }
                        }
                        $html_fld .= '<div id="ico-' . $field_id_html . '">' . $file_data . '</div>';
                    } elseif ($display_as == 'read-only') {
                        $html_fld .= '<input id="' . $field_id_html . '" name="' . $field_name_html . '" type="hidden" value="' . @$this->fields[$field] . '" ' . $Class . ' ' . @$ExtraAttributes . ' />';
                        $file_data = '';
                        $ArUpl = new ActiveRecord('uploads');
                        $totUpl = $ArUpl->find(@$this->fields[$field]);
                        if ($totUpl == 1) {
                            if (strrpos($ArUpl->fields['tipo'], 'image') > -1) {
                                //image
                                $file_data = '<a href="' . http_uploads() . $ArUpl->fields['archivo'] . '" target="_blank"><img src="' . http_uploads() . $ArUpl->fields['archivo'] . '" ></a>';
                            } else {
                                //Other file
                                $file_data = '<a href="' . http_uploads() . $ArUpl->fields['archivo'] . '" target="_blank">' . $ArUpl->fields['titulo'] . '</a>';
                            }
                        }
                        $html_fld .= '<div id="ico-' . $this->id_field_name . '">' . $file_data . '</div>';
                    }
                }
                break;
            case "timestamp":
                // Class
                $Class = 'class="' . @$CssName . '"';
                $date_value = '';
                if (trim($this->fields[$field]) != '' && trim($this->fields[$field]) != '0000-00-00 00:00:00') {
                    $date_value = date(DATE_FORMAT . ' H:i:s', strtotime($this->fields[$field]));
                }
                if ($access == TRUE) {
                    if ($display_as == 'view-edit') {
                        $html_fld .= $this->fields[$field] . '<input id="' . $field_id_html . '" name="' . $field_name_html . '" type="text" value="' . $date_value . '" ' . $Class . ' ' . @$ExtraAttributes . '/>';
                        $html_fld .= '<script language="javascript" type="text/javascript">	$(function() {		$("#' . $field_id_html . '").datetimepicker({dateFormat: "' . JS_DATE_FORMAT . '",timeFormat: "hh:mm:ss",changeMonth: true,changeYear: true});});</script>';
                    } elseif ($display_as == 'edit') {
                        //$date_value = $this->fields[$field];
                        $html_fld .= '<input id="' . $field_id_html . '" name="' . $field_name_html . '" type="text" value="' . $date_value . '" ' . $Class . ' ' . @$ExtraAttributes . '/>';
                        $html_fld .= '<script language="javascript" type="text/javascript">	$(function() {		$("#' . $field_id_html . '").datetimepicker({dateFormat: "' . JS_DATE_FORMAT . '",timeFormat: "hh:mm:ss",changeMonth: true,changeYear: true});});</script>';
                    } elseif ($display_as == 'read-only') {
                        $html_fld .= $date_value . '<input id="' . $field_id_html . '" name="' . $field_name_html . '" type="hidden" value="' . $date_value . '" ' . $Class . ' ' . @$ExtraAttributes . ' />';
                    }
                }
                break;
            case "date-select":
                //$Class = 'class="date '.@$CssName.'"';
                $Class = 'class="' . @$CssName . '"';
                if ($access == TRUE) {
                    if ($display_as == 'view-edit') {
                        $html_fld .= '1<input id="' . $field_id_html . '" name="' . $field_name_html . '" type="text" value="' . @$this->fields[$field] . '" ' . @$Class . ' ' . @$ExtraAttributes . ' />';
                        $html_fld .= '<script language="javascript" type="text/javascript">$(function() {$( "#' . $field_id_html . '" ).datetimepicker({ dateFormat: "' . JS_DATE_FORMAT . '",showOn: "button",buttonImage: HTTP+"_HTML/img/calendar.gif", buttonImageOnly: true});	});	</script>';
                    } elseif ($display_as == 'edit') {
                        $date_value = '';
                        //if(trim($this->fields[$field])!=''){$date_value = date(DATE_FORMAT,strtotime($this->fields[$field]));}
                        $date_value = $this->fields[$field];
                        $Class = rtrim(str_replace('class="', '', $Class), '"');
                        $html_fld .= fk_date_field($field_id_html, $field_name_html, $date_value, $onclick = null, $cssExtra = $Class, $mode = 'edit');
                        //$html_fld .='2<input id="'.$field_id_html.'" name="'.$field_name_html.'" type="text" value="'.$date_value.'" '.@$Class.' '.@$ExtraAttributes.' />[<a href="javascript:void(0)" onclick="$(\'#'.$field_id_html.'\').val(\''.date(DATE_FORMAT).'\')">'.__('Hoy').'</a>]';
                        //$html_fld .='<script language="javascript" type="text/javascript">$(function(){$( "#'.$field_id_html.'" ).datetimepicker({ dateFormat: "'.JS_DATE_FORMAT.'",changeMonth: true,changeYear: true});	});	</script>';
                    } elseif ($display_as == 'read-only') {
                        $html_fld .= getFormatedDate($this->fields[$field]) . '<input id="' . $field_id_html . '" name="' . $field_name_html . '" type="hidden" value="' . @$this->fields[$field] . '" ' . $Class . ' ' . @$ExtraAttributes . ' />';
                    }
                }
                break;
            case "date":
                $Class = 'class="' . @$CssName . '"';
                if ($access == TRUE) {
                    if ($display_as == 'view-edit') {
                        $html_fld .= '<input id="' . $field_id_html . '" name="' . $field_name_html . '" type="text" value="' . @$this->fields[$field] . '" ' . @$Class . ' ' . @$ExtraAttributes . ' />';
                        $html_fld .= '<script language="javascript" type="text/javascript">$(function() {$( "#' . $field_id_html . '" ).datetimepicker({ dateFormat: "' . JS_DATE_FORMAT . '",showOn: "button",buttonImage: HTTP+"_HTML/img/calendar.gif", buttonImageOnly: true});	});	</script>';
                    } elseif ($display_as == 'edit') {
                        $date_value = '';
                        if (trim($this->fields[$field]) != '') {
                            $date_value = date(DATE_FORMAT, strtotime($this->fields[$field]));
                        }
                        $html_fld .= '<input id="' . $field_id_html . '" name="' . $field_name_html . '" type="text" value="' . $date_value . '" ' . @$Class . ' ' . @$ExtraAttributes . ' />[<a href="javascript:void(0)" onclick="$(\'#' . $field_id_html . '\').val(\'' . date(DATE_FORMAT) . '\');$(\'#' . $field_id_html . '\').change();">' . __('Hoy') . '</a>]';
                        $html_fld .= '<script language="javascript" type="text/javascript">$(function(){$( "#' . $field_id_html . '" ).datetimepicker({ dateFormat: "' . JS_DATE_FORMAT . '",changeMonth: true,changeYear: true});	});	</script>';
                    } elseif ($display_as == 'read-only') {
                        $html_fld .= getFormatedDate($this->fields[$field]) . '<input id="' . $field_id_html . '" name="' . $field_name_html . '" type="hidden" value="' . @$this->fields[$field] . '" ' . $Class . ' ' . @$ExtraAttributes . ' />';
                    }
                }
                break;
            case "text":
                $Class = 'class="' . @$CssName . '"';
                if ($access == TRUE) {
                    if ($display_as == 'view-edit') {
                        $html_fld .= '<div class="fld" onclick="appForm_updfldTxt({id:\'' . $field_id_html . '\'})"><textarea style="display:none" id="' . $field_id_html . '" name="' . $field_name_html . '"  ' . $Class . ' ' . @$ExtraAttributes . ' >' . @$this->fields[$field] . '</textarea>';
                        $html_fld .= '<span id="val-' . $field_id_html . '">' . @$this->fields[$field] . '</span>&nbsp;<span class="ui-icon ui-icon-gear"></span></div>';
                        $html_fld .= '<input id="cur-v-' . $field_id_html . '" type="hidden" value="' . @$this->fields[$field] . '"  />';
                    } elseif ($display_as == 'edit') {
                        $html_fld .= '<textarea id="' . $field_id_html . '" name="' . $field_name_html . '"  ' . $Class . ' ' . @$ExtraAttributes . ' >' . @$this->fields[$field] . '</textarea>';
                    } elseif ($display_as == 'read-only') {
                        $html_fld .= '<div id="tx-' . $field_id_html . '">' . nl2br(@$this->fields[$field]) . '</div><input id="' . $field_id_html . '" name="' . $field_name_html . '" type="hidden" value="' . @$this->fields[$field] . '" ' . $Class . ' ' . @$ExtraAttributes . ' />';
                    }
                }
                break;
            case "textarea":
                $Class = 'class="' . @$CssName . '"';
                if ($access == TRUE) {
                    if ($display_as == 'view-edit') {
                        $html_fld .= '<div class="fld" onclick="appForm_updfldTxt({id:\'' . $field_id_html . '\'})"><textarea style="display:none" id="' . $field_id_html . '" name="' . $field_name_html . '"  ' . $Class . ' ' . @$ExtraAttributes . ' >' . @$this->fields[$field] . '</textarea>';
                        $html_fld .= '<span id="val-' . $field_id_html . '">' . @$this->fields[$field] . '</span>&nbsp;<span class="ui-icon ui-icon-gear"></span></div>';
                        $html_fld .= '<input id="cur-v-' . $field_id_html . '" type="hidden" value="' . @$this->fields[$field] . '"  />';
                    } elseif ($display_as == 'edit') {
                        $html_fld .= '<textarea id="' . $field_id_html . '" name="' . $field_name_html . '"  ' . $Class . ' ' . @$ExtraAttributes . ' >' . @$this->fields[$field] . '</textarea>';
                    } elseif ($display_as == 'read-only') {
                        $html_fld .= '<div id="tx-' . $field_id_html . '">' . nl2br(@$this->fields[$field]) . '</div><input id="' . $field_id_html . '" name="' . $field_name_html . '" type="hidden" value="' . @$this->fields[$field] . '" ' . $Class . ' ' . @$ExtraAttributes . ' />';
                    }
                }
                break;
            case "tinyint":
                $chk[0] = '';
                $chk[1] = '';
                $chk_read_val = @$this->fields[$field] == 1 ? 'Si' : 'No';
                if (@$this->fields[$field] == 1 || @$this->fields[$field] == 0) {
                    $chk[@$this->fields[$field]] = 'CHECKED';
                }
                $Class = 'class="' . @$CssName . '"';
                if ($access == TRUE) {
                    if ($display_as == 'view-edit' || $display_as == 'edit') {
                        $html_fld .= 'Si<input id="' . $field_id_html . '_1" name="' . $field_name_html . '" ' . $chk['1'] . ' type="radio" value="1" ' . $Class . ' ' . @$ExtraAttributes . '>
             No<input id="' . $field_id_html . '_0" name="' . $field_name_html . '" ' . $chk['0'] . ' type="radio" value="0" ' . $Class . ' ' . @$ExtraAttributes . '>';
                    } elseif ($display_as == 'read-only') {
                        $html_fld .= $chk_read_val;
                    }
                }
                break;
            case "checkbox":
                $chk[0] = '';
                $chk[1] = '';
                $chk_read_val = @$this->fields[$field] == 1 ? 'Si' : 'No';
                $chk = '';
                if (@$this->fields[$field] == 1) {
                    $chk = 'checked="checked"';
                }
                $Class = 'class="' . @$CssName . '"';
                if ($access == TRUE) {
                    if ($display_as == 'view-edit' || $display_as == 'edit') {
                        $html_fld .= '<input id="' . $field_id_html . '" name="' . $field_name_html . '" type="hidden" value="' . $this->fields[$field] . '" >';
                        $html_fld .= '<input id="' . $field_id_html . '_1" name="' . $field_name_html . '_1" ' . $chk . ' type="checkbox" value="1" onclick="if($(this).is(\':checked\')==true){$(\'#' . $field_id_html . '\').val(1);}else{$(\'#' . $field_id_html . '\').val(0);}" ' . $Class . ' ' . @$ExtraAttributes . '>';
                    } elseif ($display_as == 'read-only') {
                        $html_fld .= $chk_read_val;
                        $html_fld .= '<input id="' . $field_id_html . '" name="' . $field_name_html . '" type="hidden" value="' . $this->fields[$field] . '" >';
                    }
                }
                break;
                // Tipo Password
            // Tipo Password
            case "password":
                $Class = 'class="pass ' . @$CssName . '"';
                if ($access == TRUE) {
                    if ($display_as == 'view-edit') {
                        $html_fld .= '<input id="' . $field_id_html . '" name="' . $field_name_html . '" type="password" value="" ' . $Class . ' ' . @$ExtraAttributes . ' />';
                    } elseif ($display_as == 'edit') {
                        $html_fld .= '<input id="' . $field_id_html . '" name="' . $field_name_html . '" type="password" value="" ' . $Class . ' ' . @$ExtraAttributes . ' />';
                    } elseif ($display_as == 'read-only') {
                        $html_fld .= '********';
                    }
                }
                break;
            case "select":
                // Get Select Options from sql
                $Class = 'class="sel ' . @$CssName . '"';
                if ($access == TRUE) {
                    $option_selected = isset($this->form_fields[$field]['selected_option']) ? $this->form_fields[$field]['selected_option'] : @$this->fields[$field];
                    if ($display_as == 'view-edit') {
                        $options = fk_select_options($this->form_fields[$field]['sql_options'], $option_selected);
                        $html_fld .= '<select id="' . $field_id_html . '" name="' . $field_name_html . '" ' . $Class . ' ' . @$ExtraAttributes . ' ><option></option>' . $options . '</select>';
                    } elseif ($display_as == 'edit') {
                        $add_new_op = '';
                        $add_new_txt = '';
                        if (isset($this->form_fields[$field]['add_new'])) {
                            $add_new_op = '<option value="new">+ Nuevo</option>';
                            $add_new_txt .= '<input type="text" id="' . $field_id_html . '-txt" name="' . $field_name_html . '-txt" style="display:none" >';
                            $add_new_txt .= '<a href="javascript:void(0)" id="' . $field_id_html . '-cancel" style="display:none" onclick="fkSelect($(this),true);" >Cancelar</a>';
                        }
                        $options = fk_select_options($this->form_fields[$field]['sql_options'], $option_selected);
                        $html_fld .= '<select id="' . $field_id_html . '" name="' . $field_name_html . '" ' . $Class . ' ' . @$ExtraAttributes . ' onchange="fkSelect($(this),false);" ><option></option>' . $options . $add_new_op . '</select>';
                        $html_fld .= $add_new_txt;
                    } elseif ($display_as == 'read-only') {
                        if (isset($this->form_fields[$field]['sql_complex'])) {
                            // query complex version
                            $options = fk_select_complex_query($this->form_fields[$field]['sql_complex'], array($option_selected));
                        } else {
                            // Simple query version
                            $slq_elements = fk_get_query_elements($this->form_fields[$field]['sql_options']);
                            $table = $slq_elements['table'];
                            $val_fld_name = $slq_elements['fields'];
                            $options = fk_select_text($table, $val_fld_name, $option_selected);
                        }
                        $html_fld .= $options[1] . '<input id="' . $field_id_html . '" name="' . $field_name_html . '" type="hidden" value="' . @$this->fields[$field] . '" />';
                    }
                }
                break;
            case "hidden":
                $Class = 'class="hdn ' . @$CssName . '"';
                $html_fld .= '<input id="' . $field_id_html . '" name="' . $field_name_html . '" type="hidden" value="' . @$this->fields[$field] . '" ' . $Class . ' ' . @$ExtraAttributes . ' />';
                break;
            case "search_field":
                // Class
                $Class = 'class="txt ' . @$CssName . '"';
                if ($access == TRUE) {
                    $option_selected = isset($this->form_fields[$field]['selected_option']) ? $this->form_fields[$field]['selected_option'] : @$this->fields[$field];
                    if ($display_as == 'view-edit') {
                        $html_fld .= '<div class="fld" onclick="appForm_updfldTxt({id:\'' . $field_id_html . '\'})"><input style="display:none" id="' . $field_id_html . '" name="' . $field_name_html . '" type="text" value="' . @$this->fields[$field] . '" ' . $Class . ' ' . @$ExtraAttributes . ' />';
                        $html_fld .= '<span id="val-' . $field_id_html . '">' . @$this->fields[$field] . '</span>&nbsp;<span class="ui-icon ui-icon-gear"></span></div>';
                        $html_fld .= '<input id="cur-v-' . $field_id_html . '" type="hidden" value="' . $this->fields[$field] . '"  />';
                    } elseif ($display_as == 'edit') {
                        $options = fk_select_complex_query($this->form_fields[$field]['sql_complex'], array($option_selected));
                        $html_fld .= '<input id="' . $field_id_html . '" name="' . $field_name_html . '" type="hidden" value="' . @$this->fields[$field] . '"  />';
                        $html_fld .= '<input id="' . $field_id_html . '-2" name="' . $field_name_html . '-2" type="text" value="' . @$options[1] . '" class="txt ' . $CssName . ' searchbox" ' . @$ExtraAttributes . ' onblur="appForm_PopupSrc({id:\'' . $field_id_html . '\',tbl:\'' . $this->table . '\'})" />
						<input type="button" id="' . $field_id_html . '-btn" value="&nbsp;" class="btn search2" onclick="appForm_PopupSrc({id:\'' . $field_id_html . '\',tbl:\'' . $this->table . '\',forceOpen:true})">
						<input type="button" id="' . $field_id_html . '-btn" class="btn empty" value="&nbsp;" onclick="appForm_ClearPopupSrc({id:\'' . $field_id_html . '\',tbl:\'' . $this->table . '\'});">
						';
                        $html_fld .= '<div id="srcfld-rs-' . $field_id_html . '"></div>';
                    } elseif ($display_as == 'read-only') {
                        $options = fk_select_complex_query($this->form_fields[$field]['sql_complex'], array($option_selected));
                        $html_fld .= @$options[1] . '<input id="' . $field_id_html . '" name="' . $field_name_html . '" type="hidden" value="' . @$this->fields[$field] . '" ' . $Class . ' ' . @$ExtraAttributes . ' />';
                    }
                }
                break;
            default:
                $Class = 'class="txt ' . @$CssName . '"';
                if ($access == TRUE) {
                    if ($display_as == 'view-edit') {
                        $html_fld .= '<div class="fld" onclick="appForm_updfldTxt({id:\'' . $field_id_html . '\'})"><input style="display:none" id="' . $field_id_html . '" name="' . $field_name_html . '" type="text" value="' . @$this->fields[$field] . '" ' . $Class . ' ' . @$ExtraAttributes . ' />';
                        $html_fld .= '<span id="val-' . $field_id_html . '">' . @$this->fields[$field] . '</span>&nbsp;<span class="ui-icon ui-icon-gear"></span></div>';
                        $html_fld .= '<input id="cur-v-' . $field_id_html . '" type="hidden" value="' . @$this->fields[$field] . '"  />';
                    } elseif ($display_as == 'edit') {
                        $html_fld .= '<input id="' . $field_id_html . '" name="' . $field_name_html . '" type="text" value="' . @$this->fields[$field] . '" ' . $Class . ' ' . @$ExtraAttributes . ' />';
                    } elseif ($display_as == 'read-only') {
                        $html_fld .= @$this->fields[$field] . '<input id="' . $field_id_html . '" name="' . $field_name_html . '" type="hidden" value="' . @$this->fields[$field] . '" ' . $Class . ' ' . @$ExtraAttributes . ' />';
                    }
                }
                break;
        }
        return $html_fld;
    }
 function eliminar_albaranes()
 {
     $this->seguridad();
     $this->Load->Model('Albaranes');
     $enter = new Albaranes();
     $enter->id_albaranes = $this->PermaLinkVars[0];
     $enter->EliminarAlbaranes();
     header('location:' . fk_link('paquetes/index'));
 }
Example #5
0
/**
 * @desc verifica la http url y el tipo de navegador y envia a mobil o al descktop
 * */
function verify_http_path()
{
    $domain_url = get_domain_url(fk_link());
    $req_host = $_SERVER['HTTP_HOST'];
    if ($req_host != $domain_url) {
        header('Location:' . fk_link());
    }
}
    private function file_form()
    {
        $fileForm = '<form id="' . $this->Form . '" name="' . $this->Form . '" target="frame-upload-' . $this->IdObj . '" action="' . fk_link($this->CurrentPage) . '" method="post" >
								<table width="736" class="table-upload" style="display:none;" border="0" cellpadding="0" cellspacing="0" >
				  <tr>
				    <td width="93" rowspan="3" scope="col">
				    ' . $this->HttpDirectory . '
				    <img  src="x"/>
				  <td width="633" scope="col"><strong>Nombre de archivo:</strong> ' . $this->FileRecord->fields[$this->fld_file] . '  </tr>
				  <tr>
				    <td><strong>Tipo de archivo:</strong>' . $this->FileRecord->fields[$this->fld_type] . '</td>
				  </tr>
				  <tr>
				    <td><strong>Tama&ntilde;o:</strong>' . $this->FileRecord->fields[$this->fld_size] . '</td>
				  </tr>
				  <tr>
				    <td>Tutulo:</td>
				    <td><span class="field">
				      <input name="title" id="title" type="text" class="text" value="' . $this->FileRecord->fields[$this->fld_title] . '" />
				    </span></td>
				  </tr>
				  <tr>
				    <td>Leyenda:</td>
				    <td><span class="field">
				      <input name="leyend" id="leyend" type="text" class="text" value="' . $this->FileRecord->fields[$this->fld_leyend] . '" />
				    </span></td>
				  </tr>
				  <tr>
				    <td>Desc:</td>
				    <td><span class="field">
				      <input type="text" name="desc" id="desc" value="' . $this->FileRecord->fields[$this->fld_desc] . '"/>
				    </span></td>
				  </tr>  
				  <tr>
				    <td>&nbsp;</td>
				    <td><label>
				      <input type="submit" name="save" id="save" value="Guardar" />
				      <input type="button" name="usethis" id="usethis" value="Seleccionar" onclick="alert(123)" />
				    </label></td>
				  </tr>
				</table>
				<input name="action" type="hidden" value="update-file-desc" />
				<input name="id" type="hidden" value="' . $this->record_id . '" />
				</form>
				<script>
				var options = {};
				$( ".table-upload" ).show( "blind", options, 500);
				</script>
				
				';
        return $fileForm;
    }
Example #7
0
/**
 * @desc File field Object
 * */
function fk_file_field($id, $name, $value, $onclick = null, $cssExtra = '', $mode = 'edit')
{
    $html_fld = '';
    if ($mode == 'edit') {
        $html_fld .= '<input id="' . $id . '" name="' . $name . '" type="hidden" value="' . $value . '" class="' . $cssExtra . '" />';
        $html_fld .= '<br><iframe src="' . fk_link() . 'FkMaster/upolader/' . $id . '/" name="ifrmupl-' . $id . '" style="width:95%;height:30px;" frameborder="0"></iframe>';
    }
    $file_data = '';
    $ArUpl = new ActiveRecord('uploads');
    $totUpl = $ArUpl->find($value);
    if ($totUpl == 1) {
        if (strrpos($ArUpl->fields['tipo'], 'image') > -1) {
            //image
            $file_data = '<a href="' . http_uploads() . $ArUpl->fields['archivo'] . '" target="_blank"><img src="' . http_uploads() . $ArUpl->fields['archivo'] . '" ></a>';
        } else {
            //Other file
            $file_data = '<a href="' . http_uploads() . $ArUpl->fields['archivo'] . '" target="_blank">' . $ArUpl->fields['titulo'] . '</a>';
        }
    }
    $html_fld .= '<div id="ico-' . $id . '">' . $file_data . '</div>';
    return $html_fld;
}
Example #8
0
<ul>
	<li>
		<a href="<?php 
echo fk_link('paquetes');
?>
" <?php 
echo $sec == 'index' ? 'class="selected"' : '';
?>
 >Alrabanes</a>
	</li>
    <?php 
if ($_SESSION['id_tipo'] == 2) {
    ?>
    <li>
		<a href="<?php 
    echo fk_link('usuarios');
    ?>
" <?php 
    echo $sec == 'index' ? 'class="selected"' : '';
    ?>
 >Usuarios</a>
	</li>
    <?php 
}
?>
</ul>
</div>
</div>
<div class="clear"></div>

Example #9
0
<div class="section">
	<div class="margin">
	<h2 class="title"><?php 
echo $action;
?>
 Perfil</h2>
    <form action="<?php 
echo fk_link('perfiles/' . $url_action);
?>
" method="post" class="validate" >
    	<div class="msg_error fail_error ui-corner-all"></div>
		<div class="clear"></div>
    <?php 
if (isset($perfil['id_perfil'])) {
    ?>
    	<input type="hidden" name="id_perfil" value="<?php 
    echo $perfil['id_perfil'];
    ?>
" class="input" />
    <?php 
}
?>
    	<input type="hidden" name="location" value="perfiles/" class="input" />
    <table>
	<tr>
    	<td>Nombre</td>
        <td><input type="text" class="input ui-widget-content ui-corner-all" name="nombre_perfil" value="<?php 
echo @$perfil['nombre_perfil'];
?>
" /></td>
	</tr>
Example #10
0
    protected function createPagger()
    {
        $this->pagger .= '<div id="pagger' . $this->formId . '" class="pagger">';
        if ($this->page > 1) {
            $this->pagger .= ' <a value="' . ($this->page - 1) . '" href="' . fk_link($this->currentUrl) . '?page=' . ($this->page - 1) . '"> ' . $this->label_prev . ' </a> ';
        } else {
            //$this->pagger .= ' <span> '.$this->label_prev.' </span> ';
        }
        $add_first_page = false;
        $add_last_page = false;
        $ini = 1;
        $fin = $this->tot_pages;
        $balance = ($this->total_pagger_limit - $this->total_pagger_limit % 2) / 2;
        if ($fin > $this->total_pagger_limit) {
            $fin = $this->total_pagger_limit;
            $add_last_page = true;
            if ($this->page - $balance > 1) {
                $ini = $this->page - $balance;
                $fin = $this->page + $balance;
                $add_first_page = true;
                if ($fin > $this->tot_pages) {
                    $fin = $this->tot_pages;
                    $add_last_page = false;
                }
            }
        }
        if ($add_first_page) {
            $this->add_page(1);
            $this->pagger .= '...';
        }
        for ($i = $ini; $i <= $fin; $i++) {
            $this->add_page($i);
        }
        if ($add_last_page) {
            $this->pagger .= '...';
            $this->add_page($this->tot_pages);
        }
        if ($this->page < $this->tot_pages) {
            $this->pagger .= '  <a value="' . ($this->page + 1) . '" href="?page=' . ($this->page + 1) . '"> ' . $this->label_next . ' </a> ';
        } else {
            //$this->pagger .= ' <span> '.$this->label_next.' </span> ';
        }
        $this->pagger .= '</div>';
        if ($this->formId != '') {
            $this->pagger .= '<script>$(document).ready(function(){ $("#p' . $this->formId . '").focus(); $("#pagger' . $this->formId . ' a").click(function(){page = $(this).attr("value");
						$("#page' . $this->formId . '").val(page);$("#' . $this->formId . '").submit();return false;});});</script>';
        }
    }
Example #11
0
</h1>

<a href="<?php 
echo fk_link('usuarios/?crear=true&otra=2');
?>
">Crear usuarios</a>
<a href="<?php 
echo fk_link('usuarios/modificar/1/?var1=2&var2=2');
?>
">Modificar 1 usuarios</a>
<a href="<?php 
echo fk_link('usuarios/eliminar/1/');
?>
">Eliminar usuario</a>
<a href="<?php 
echo fk_link('test/usuarios/1/');
?>
">Pruebas</a>
<div class="fk-ok-message">
<h3>
 <?php 
echo __('Felicidades! est&aacute;s usando freekore');
?>
  <br>
</h3>
</div>
<?php 
echo fk_message('ok', 'Ok <b>negritas</b>');
echo fk_message('error', 'Error <b>negritas</b>');
echo fk_message('warning', 'Warning <b>negritas</b>');
echo fk_message('info', 'Info <b>negritas</b>');
Example #12
0
                    <tr>
                    	<td class="textright">Usuario</td><td><input type="text" name="usuario" class="input ui-widget-content ui-corner-all required" /></td>
					</tr>
                    <tr>
                    	<td class="textright">Correo Electr&oacute;nico</td><td><input name="email" class="input ui-widget-content ui-corner-all required" /></td>
					</tr>
                    <tr>
                    	<td class="textright">Contrase&ntilde;a</td><td><input type="password" name="contrasena" class="input ui-widget-content ui-corner-all required" /></td>
					</tr>
                    <tr>
                    	<td class="textright">Confirmar Contrase&ntilde;a</td><td><input type="password" name="conf-contrasena" class="input ui-widget-content ui-corner-all required" /></td>
					</tr>
                    <tr>
                    	<td colspan="2">
                        	Al hacer click en registrame aceptas los <a href="<?php 
    echo fk_link('terminos');
    ?>
">T&eacute;rminos y Condiciones</a>
                        </td>
					</tr>
                    <tr>
                    	<td colspan="2">
                        	<input type="submit" value="" id="btn_registrate" />
                        </td>
					</tr>
				</table>
			</form>                
<?php 
}
?>
        </div>
Example #13
0
    private function getEventDayList()
    {
        $html = '';
        $hr = 11;
        $eventos = $this->process_event_list();
        $hr = -1;
        for ($i = 0; $i < 24; $i++) {
            $hr = $hr + 1;
            $hrstr = $hr < 10 ? '0' . $hr : ($hrstr = $hr);
            $ev_1 = '';
            $ev_2 = '';
            if (isset($eventos[$hrstr])) {
                //pa($eventos[$hrstr]);
                foreach ($eventos[$hrstr] as $k => $evnt) {
                    $ishalf = FALSE;
                    $mins = explode(':', $evnt['t_i']);
                    $mins = $mins[1];
                    if ($mins == '30') {
                        $ishalf = TRUE;
                    }
                    $height = 'height:20px';
                    if ($this->link_to_event != '') {
                        $link = str_replace('{0}', $evnt['id'], $this->link_to_event);
                        $link = fk_link($link);
                    } else {
                        $link = '#';
                    }
                    if (trim($evnt['t']) == '') {
                        $evnt['t'] = '(Sin Asunto)';
                    }
                    if ($ishalf == FALSE) {
                        $ev_1 .= '<li class="evnt" style="' . $height . '"> ' . $evnt['time'] . '-' . $evnt['t_i'] . '-' . $evnt['t_f'] . ' <a href="' . $link . '"><b>' . $evnt['t'] . '</b></a> </li>';
                    } else {
                        $ev_2 .= '<li class="evnt" style="' . $height . '"> ' . $evnt['time'] . '-' . $evnt['t_i'] . '-' . $evnt['t_f'] . ' <a href="' . $link . '"><b>' . $evnt['t'] . '</b></a> </li>';
                    }
                }
            }
            $html .= '<div class="hr">';
            $html .= '<div class="hr1"><ul class="dropper">' . $ev_1 . '</ul></div>';
            $html .= '<div class="hr2"><ul class="dropper">' . $ev_2 . '</ul></div>';
            $html .= '</div>';
        }
        $html .= '<script>
	$(function() {
		$( "ul.dropper" ).sortable({
			connectWith: "ul"
		});
		$( "#sort-list" ).disableSelection();
	});
</script>';
        return $html;
    }
Example #14
0
 public function ex_cerrar_sesion()
 {
     $this->Load->Model('Login');
     $Login = new Login();
     $Login->cerrarSession();
     header('location:' . fk_link('admin'));
 }
Example #15
0
" class="imprimirBTN" style="margin-left:25px"><img src="<?php 
    echo fk_theme_url();
    ?>
/img/printButton.png" /></a>  
        </td>
	</tr>
<?php 
}
?>
	</tbody>
</table>
<a href="<?php 
echo fk_link("paquetes/nuevo_registro/");
?>
" class="brad save" style="float:left; margin-top:15px">Nuevo Registro</a>
<div style="float:right">
<?php 
if (!isset($_POST["id_albaranes"]) or trim($_POST["id_albaranes"]) == '') {
    echo setPaginacion(fk_link('paquetes/index'), $pagactual, 5, $pag, $showone = 1);
}
?>
<script type="text/javascript">
 $(function(){
	 $('.imprimirBTN').printPage();
	})
</script>
</div>
<div class="clear"></div>
</div>
</div>
Example #16
0
    private function printOneComent($rec)
    {
        //pa($rec);
        ?>
<li>
<div class="c1_6 col-md-1"><?php 
        if ($rec['archivo'] != '') {
            ?>
<div class="user-img"><img src="<?php 
            echo http_uploads() . '/' . $rec['archivo'];
            ?>
"></div><?php 
        } else {
            ?>
<div class="user-img no-pho"></div><?php 
        }
        ?>
</div>
<div class="c5_6 col-md-11">
<div class="time">Hace <?php 
        fk_lapse_of_time($rec['fec_reg'], $rec['ahora']);
        ?>
</div>
<b><a href="<?php 
        echo fk_link('perfil/!/' . $rec['usuario']);
        ?>
"><?php 
        echo utf8_encode($rec[$this->name_field]);
        ?>
</a></b>: <?php 
        echo $rec[$this->comment_field];
        /*<a href="javascript:void(0)" class="right"><i class="fa fa-trash-o"></i></a>*/
        /*eliminar delete*/
        ?>
</div>
<div class="clear"></div>
</li>
		<?php 
    }
Example #17
0
<h3 class="left">Datos del Usuario</h3>
<a href="<?php 
echo fk_link('miperfil/editarusuario/' . $_SESSION['id_usuario']);
?>
" id="edit_user">
<img src="<?php 
echo fk_theme_url();
?>
/img/Text-Edit.png" alt="" title="Editar" class="left" style="margin-left:10px" />
</a>

<div class="clear"></div>

<form action="<?php 
echo fk_link('miperfil/editUser/');
?>
" method="post" class="validate">
<div class="msg_error fail_error ui-corner-all"></div>
<div class="clear"></div>
	<input type="hidden" name="location" value="miperfil/" class="input clear">
<table style="margin-bottom:15px">
<?php 
if (is_array($user)) {
    foreach ($user as $U) {
        ?>
	<tr>
    	<td style="text-align:right">Nombre</td><td style="padding-left:10px" class="cont_input"><?php 
        echo $U['nombre'];
        ?>
</td>
Example #18
0
">
                    <img src="<?php 
    echo fk_theme_url();
    ?>
/img/edit.png">
                    </a>
	
                    <a href="<?php 
    echo fk_link('usuarios/ex_deleteusuario/' . $user['id_usuario']);
    ?>
">
                    <img src="<?php 
    echo fk_theme_url();
    ?>
/img/cancel.png">
                    </a>

				</td>
			</tr>
            <?php 
}
?>
        </tbody>
    </table>
    <a href="<?php 
echo fk_link('usuarios/nuevousuario/');
?>
" class="standar-btn ui-corner-all">Nuevo Administrador</a>
    <div class="clear"></div>
    </div>
</div>
Example #19
0
<div class="section">
	<div class="margin">
        <h2 class="title">Detalle Albaranes</h2>
        
        <div class="msg_error fail_error ui-corner-all"></div>
		<div class="clear"></div>

<?php 
$valor = $detalle_albaranes;
?>

<a href="<?php 
echo fk_link("paquetes/index/");
?>
" style="float:right; margin-bottom:10px">Regresar</a>     

<div style="width:500px;">
<table class="justdata" width="100%">
	<thead>
    	<tr>
        	<th>Campo</th>
            <th>Valor</th>
        </tr>
    </thead>
    <tbody>
<tr>
		<td>
          	ID
        </td>
        <td>
      		<?php 
Example #20
0
    /**
     *@package AppForm
     *@since v0.1 beta
     *@method PrintToolBar()
     *@desc  Returns the toolbar
     * */
    private function PrintToolBar()
    {
        $toolBar = '';
        // Save Cancel Butons
        $fx_view_1 = new ajax('submit', 'pannel-1-' . $this->IdObject, 'args:op=' . encode('view-1') . '&AppFormID=' . $this->IdObject . ';form:' . $this->IdObject . ';url:' . $this->CurrentPage);
        $fx_view_2 = new ajax('submit', 'pannel-1-' . $this->IdObject, 'args:op=' . encode('view-2') . '&AppFormID=' . $this->IdObject . ';form:' . $this->IdObject . ';url:' . $this->CurrentPage);
        $fx_export = new ajax('submit', 'pannel-1-' . $this->IdObject, 'args:op=' . encode('export') . ';form:' . $this->IdObject . ';url:' . $this->CurrentPage);
        $fx_new = new ajax('submit', 'pannel-1-' . $this->IdObject, 'args:op=' . encode('new') . ';form:' . $this->IdObject . ';url:' . $this->CurrentPage);
        $fx_edit = new ajax('submit', 'pannel-1-' . $this->IdObject, 'args:op=' . encode('edit') . ';form:' . $this->IdObject . ';url:' . $this->CurrentPage);
        $fx_duplic = new ajax('submit', 'pannel-1-' . $this->IdObject, 'args:op=' . encode('duplic') . ';form:' . $this->IdObject . ';url:' . $this->CurrentPage);
        $fx_save = new ajax('submit', 'pannel-1-' . $this->IdObject, 'args:op=' . encode('save') . ';form:' . $this->IdObject . ';url:' . $this->CurrentPage);
        $fx_cancel = new ajax('submit', 'pannel-1-' . $this->IdObject, 'args:op=' . encode('cancel') . ';form:' . $this->IdObject . ';url:' . $this->CurrentPage);
        $fx_del = new ajax('submit', 'pannel-1-' . $this->IdObject, 'args:op=' . encode('del') . ';form:' . $this->IdObject . ';url:' . $this->CurrentPage);
        $fx_first = new ajax('submit', 'pannel-1-' . $this->IdObject, 'args:op=' . encode('first') . ';form:' . $this->IdObject . ';url:' . $this->CurrentPage);
        $fx_prev = new ajax('submit', 'pannel-1-' . $this->IdObject, 'args:op=' . encode('prev') . ';form:' . $this->IdObject . ';url:' . $this->CurrentPage);
        $fx_next = new ajax('submit', 'pannel-1-' . $this->IdObject, 'args:op=' . encode('next') . ';form:' . $this->IdObject . ';url:' . $this->CurrentPage);
        $fx_last = new ajax('submit', 'pannel-1-' . $this->IdObject, 'args:op=' . encode('last') . ';form:' . $this->IdObject . ';url:' . $this->CurrentPage);
        $fx_search = new ajax('submit', 'pannel-srch-' . $this->IdObject, 'args:op=' . encode('search') . ';form:' . $this->IdObject . ';url:' . $this->CurrentPage);
        // Enabled disabled
        $disabled['view'] = '';
        $disabled['export'] = '';
        $disabled['new'] = '';
        $disabled['edit'] = '';
        $disabled['duplic'] = '';
        $disabled['save'] = '';
        $disabled['cancel'] = '';
        $disabled['delete'] = '';
        $disabled['first'] = '';
        $disabled['prev'] = '';
        $disabled['next'] = '';
        $disabled['last'] = '';
        $disabled['search'] = '';
        $di_css['view'] = '';
        $di_css['export'] = '';
        $di_css['new'] = '';
        $di_css['edit'] = '';
        $di_css['duplic'] = '';
        $di_css['save'] = '';
        $di_css['cancel'] = '';
        $di_css['delete'] = '';
        $di_css['first'] = '';
        $di_css['prev'] = '';
        $di_css['next'] = '';
        $di_css['last'] = '';
        $di_css['search'] = '';
        if ($this->btn_view_disabled == true) {
            $disabled['view'] = 'disabled="true"';
            $di_css['view'] = 'disabled';
        }
        if ($this->btn_export_disabled == true) {
            $disabled['export'] = 'disabled="true"';
            $di_css['export'] = 'disabled';
        }
        if ($this->btn_new_disabled == true) {
            $disabled['new'] = 'disabled="true"';
            $di_css['new'] = 'disabled';
        }
        if ($this->btn_edit_disabled == true) {
            $disabled['edit'] = 'disabled="true"';
            $di_css['edit'] = 'disabled';
        }
        if ($this->btn_duplic_disabled == true) {
            $disabled['duplic'] = 'disabled="true"';
            $di_css['duplic'] = 'disabled';
        }
        if ($this->btn_save_disabled == true) {
            $disabled['save'] = 'disabled="true"';
            $di_css['save'] = 'disabled';
        }
        if ($this->btn_cancel_disabled == true) {
            $disabled['cancel'] = 'disabled="true"';
            $di_css['cancel'] = 'disabled';
        }
        if ($this->btn_delete_disabled == true) {
            $disabled['delete'] = 'disabled="true"';
            $di_css['delete'] = 'disabled';
        }
        if ($this->btn_first_disabled == true) {
            $disabled['first'] = 'disabled="true"';
            $di_css['first'] = 'disabled';
        }
        if ($this->btn_prev_disabled == true) {
            $disabled['prev'] = 'disabled="true"';
            $di_css['prev'] = 'disabled';
        }
        if ($this->btn_next_disabled == true) {
            $disabled['next'] = 'disabled="true"';
            $di_css['next'] = 'disabled';
        }
        if ($this->btn_last_disabled == true) {
            $disabled['last'] = 'disabled="true"';
            $di_css['last'] = 'disabled';
        }
        if ($this->btn_search_disabled == true) {
            $disabled['search'] = 'disabled="true"';
            $di_css['new'] = 'disabled';
        }
        // Render butons
        //view
        if ($this->btn_view_visible == TRUE) {
            if ($this->view_as == 'F') {
                $this->btn_view = '
			                  <div class="view-as-label"></div><div class="view-as-bar">
			                   <div class="but v1 on" alt="Formulario" title="Formulario" onclick="' . $fx_view_1->render() . '" >&nbsp;</div>
			                   <div class="but v2" alt="Listado" title="Listado" onclick="' . $fx_view_2->render() . '">&nbsp;</div>
			                </div>
			                <div class="clear"></div>
			                ';
            } else {
                $this->btn_view = '
			                  <div class="view-as-label"></div><div class="view-as-bar">
			                   <div class="but v1" alt="Formulario" title="Formulario" onclick="' . $fx_view_1->render() . '" >&nbsp;</div>
			                   <div class="but v2 on" alt="Listado" title="Listado" onclick="' . $fx_view_2->render() . '">&nbsp;</div>
			                </div>
			                <div class="clear"></div>
			                ';
            }
        }
        //export
        if ($this->btn_export_visible == TRUE) {
            $this->btn_export = '<input class="btn export ' . @$di_css['export'] . '" type="button" value="Exportar .xls" onclick="window.open(\'' . fk_link() . $this->CurrentPage . '&op=' . encode('export') . '\')" ' . $disabled['export'] . '>';
            //$this->btn_export = '<img class="btn export '.@$di_css['export'].'" '.$disabled['export'].' style="width:35px;display:inline-tabl;" src="'.HTTP.'/_HTML/img/export_ico.jpg" title="Exportar excel" onclick="window.open(\''.fk_link().$this->CurrentPage.'&op='.encode('export').'\')" >';
        }
        //new
        if ($this->btn_new_visible == TRUE) {
            $this->btn_new = '<input class="btn new ' . $di_css['new'] . '" type="button" value="' . __('Nuevo') . '" onclick="' . $fx_new->render() . '" ' . $disabled['new'] . '>';
        }
        //edit
        if ($this->btn_edit_visible == TRUE) {
            $this->btn_edit = '<input class="btn edit ' . $di_css['edit'] . '" type="button" value="' . __('Editar') . '" onclick="' . $fx_edit->render() . '" ' . $disabled['edit'] . '>';
        }
        //duplic
        if ($this->btn_duplic_visible == TRUE) {
            $this->btn_duplic = '<input class="btn duplic ' . $di_css['duplic'] . '" type="button" value="' . __('Duplicar') . '" onclick="' . $fx_duplic->render() . '" ' . $disabled['duplic'] . '>';
        }
        //save
        if ($this->btn_save_visible == TRUE) {
            if ($this->use_template == true) {
                $this->btn_save = '<input class="btn save ' . $di_css['save'] . '" type="submit" value="' . __('Guardar') . '" ' . $disabled['save'] . '>';
            } else {
                $this->btn_save = '<input class="btn save ' . $di_css['save'] . '" type="submit" value="' . __('Guardar') . '" ' . $disabled['save'] . '>';
                //$this->btn_save ='<input class="btn ui-corner-all '.$di_css['save'].'" type="button" value="'. __('Guardar').'" onclick="'. $fx_save->render().'" '.$disabled['save'].'>';
            }
        }
        //cancel
        if ($this->btn_cancel_visible == TRUE) {
            $this->btn_cancel = '<input class="btn cancel ' . $di_css['cancel'] . '" type="button" value="' . __('Cancelar') . '" onclick="' . $fx_cancel->render() . '" ' . $disabled['cancel'] . '>';
        }
        //delete
        if ($this->btn_delete_visible == TRUE) {
            $this->btn_delete = '<input class="btn delete ' . $di_css['delete'] . '" type="button" value="' . __('Eliminar') . '" onclick="if(confirm(\'' . __('Eliminar Registro?') . '\')){' . $fx_del->render() . '}" ' . $disabled['delete'] . '>';
        }
        //first
        if ($this->btn_first_visible == TRUE) {
            $this->btn_first = '<input class="btn first ' . $di_css['first'] . '" type="button" value="|&laquo;" onclick="' . $fx_first->render() . '" ' . $disabled['first'] . '>';
        }
        //prev
        if ($this->btn_prev_visible == TRUE) {
            $this->btn_prev = '<input class="btn prev ' . $di_css['prev'] . '" type="button" value="&laquo;" onclick="' . $fx_prev->render() . '" ' . $disabled['prev'] . '>';
        }
        // records_of
        if ($this->records_of_visible == TRUE) {
            $oper = isset($_POST['op']) ? decode($_POST['op']) : '';
            if ($oper == 'selec-record') {
                $this->records_of = '&nbsp;- -&nbsp;';
            } else {
                $this->records_of = ' ' . $this->record_number . ' de ' . $this->total_records;
            }
        }
        //next
        if ($this->btn_next_visible == TRUE) {
            $this->btn_next = '<input class="btn next ' . $di_css['next'] . '" type="button" value="&raquo;" onclick="' . $fx_next->render() . '" ' . $disabled['next'] . '>';
        }
        //last
        if ($this->btn_last_visible == TRUE) {
            $this->btn_last = '<input class="btn last ' . $di_css['last'] . '" type="button" value="&raquo;|" onclick="' . $fx_last->render() . '" ' . $disabled['last'] . '>';
        }
        //search
        if ($this->btn_search_visible == TRUE) {
            //$this->btn_search ='<input class="btn search '.$di_css['search'].'" type="button" value="'. __('Buscar').'" onclick="'. $fx_search->render().'" '.$disabled['search'].'>';
            $this->btn_search = '';
        }
        $toolBar .= '<div class="TopToolBar">';
        $toolBar .= $this->btn_view;
        $toolBarDv = $this->records_of;
        $toolBarDv .= $this->btn_first;
        $toolBarDv .= $this->btn_prev;
        $toolBarDv .= ' ' . $this->btn_next;
        $toolBarDv .= $this->btn_last;
        $toolBarDv .= ' | ' . $this->btn_search;
        $toolBarDv .= ' ' . $this->btn_export;
        $toolBarDv = trim($toolBarDv);
        if ($toolBarDv != '|') {
            $toolBar .= '<div class="nav-bar ui-corner-all">';
            $toolBar .= $toolBarDv;
            $toolBar .= '</div>';
        }
        $toolBar .= '<div class="btn-bar">';
        $toolBar .= ' ' . $this->btn_new;
        $toolBar .= ' ' . $this->btn_edit;
        $toolBar .= ' ' . $this->btn_duplic;
        $toolBar .= ' ' . $this->btn_save;
        $toolBar .= ' ' . $this->btn_cancel;
        $toolBar .= ' ' . $this->btn_delete;
        $toolBar .= '</div>';
        $toolBar .= '</div>';
        // TopToolBar
        return $toolBar;
    }
Example #21
0
    /**
     *@package AppForm
     *@since v0.1 beta
     *@method useTemplateView()
     * */
    public function useTemplateView($tpl, $ArrayData = array())
    {
        $this->ArrData = $ArrayData;
        $v_path = 'app/views';
        $file_path = $v_path . '/' . $tpl;
        if (fk_file_exists($file_path) == TRUE) {
            // Get Template
            $this->use_template = TRUE;
            $this->template = file_get_contents(SYSTEM_PATH . $file_path);
        } else {
            try {
                throw new FkException("El template " . $tpl . " no existe");
            } catch (FkException $e) {
                $e->description = "El template " . $v_path . "/" . $tpl . " no existe. ";
                $e->solution = 'Verifique que este bien escrito y que exista
				<h2><a href="' . fk_link('FkDev/creaAppFormtemplate/' . encode($v_path)) . '/' . encode($tpl) . '/" target="_blank">Crear template ahora</a></h2>
				';
                $e->error_code = 'AF000001';
                $e->show();
            }
        }
    }
Example #22
0
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link type="text/css" rel="stylesheet" href="<?php 
echo fk_theme_url() . '/css/main.css';
?>
"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Albaranes | Login</title>
</head>
<body>
<div class="container" id="login" style="width:300px; margin:200px auto 0; border-top:none">

<div class="content">
<form method="post" action="<?php 
echo fk_link('login/ex_login/');
?>
" class="validate" style="margin-top:0px">
	<?php 
if (@$msg != '') {
    ?>
    <div class="msg_error fail_error ui-corner-all" style="display:block"><?php 
    echo @$msg;
    ?>
</div>
    <div class="clear"></div><?php 
}
?>
	<input type="hidden" name="location" value="admin" class="input" />
<table width="100%">
	<tr>
Example #23
0
 public function ex_logout()
 {
     unset($_SESSION['id_usuario']);
     header('location:' . fk_link('login/'));
 }
Example #24
0
<?php

$cnt = 0;
$cnt++;
$ArrMnu[$cnt]['label'] = 'Inicio';
$ArrMnu[$cnt]['sel_mnu'] = 'inicio';
$ArrMnu[$cnt]['link'] = fk_link();
$ArrMnu[$cnt]['submenu'] = array();
/* Example other menu option*/
/*$cnt++;
$ArrMnu[$cnt]['label'] = 'Other';
$ArrMnu[$cnt]['sel_mnu'] = 'other';
$ArrMnu[$cnt]['link'] = fk_link('other');
$ArrMnu[$cnt]['submenu']=array();*/
function printSubMenu($arr)
{
    if (count($arr) > 0) {
        ?>
<ul class="submenu">
<?php 
        foreach ($arr as $li) {
            ?>
	<li><a href="<?php 
            echo $li['link'];
            ?>
"><?php 
            echo $li['label'];
            ?>
</a></li>
	<?php 
        }
Example #25
0
<![endif]-->
<?php 
fk_css();
fk_js();
?>
<!--menu-->
<script type="text/javascript" src="<?php 
echo fk_theme_url();
?>
/menu.js"></script>
</head>
<body>
<div id="header">
<div id="header-content">
<div id="logo"><a href="<?php 
echo fk_link();
?>
">
<img border="0"	src="<?php 
echo fk_theme_url();
?>
/img/logo.png" title="Ekkus: Totem Software TM" alt="Ekkus: Totem Software TMk" /></a></div>
</div>

<?php 
// obtener menu
fkore::_use('public/_HTML/themes/' . fk_theme() . '/menu-top.php');
?>

</div>
Example #26
0
 public function index()
 {
     header('location:' . fk_link('paquetes'));
 }
 public function ex_deleteusuario()
 {
     self::seguridad();
     $this->Load->Model('Usuario');
     $U = new Usuario();
     $U->id_usuario = $this->PermaLinkVars[0];
     $U->Eliminar();
     header('location:' . fk_link('usuarios/'));
 }