示例#1
0
    $kontotype = $_POST['kontotype'];
    $bilag = $_POST['bilag'];
    if (basename($_FILES['uploadedfile']['name'])) {
        $filnavn = "../temp/" . $db . "_" . str_replace(" ", "_", $brugernavn) . ".csv";
        if (move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $filnavn)) {
            vis_data($filnavn, '', '', 1, $kontonr, $bilag);
        } else {
            echo "Der er sket en fejl under hentningen, prøv venligst igen";
        }
    } elseif ($submit == 'Vis') {
        vis_data($filnavn, $splitter, $feltnavn, $feltantal, $kontonr, $bilag);
    } elseif ($submit == 'Importer') {
        if ($filnavn && $splitter) {
            overfoer_data($filnavn, $splitter, $feltnavn, $feltantal);
        } else {
            vis_data($filnavn, $splitter, $feltnavn, $feltantal, $kontonr, $bilag);
        }
    }
} else {
    #	if (!$r1=db_fetch_array(db_select("select box1, box2, beskrivelse from grupper where art='RA' order by kodenr desc",__FILE__ . " linje " . __LINE__))) {
    #		exit;
    #	}
    upload($bilag);
}
print "</tbody></table>";
#####################################################################################################
function upload($bilag)
{
    print "<tr><td width=100% align=center><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tbody>";
    print "<form enctype=\"multipart/form-data\" action=\"importer_debitor.php\" method=\"POST\">";
    print "<input type=\"hidden\" name=\"MAX_FILE_SIZE\" value=\"900000\">";
示例#2
0
    echo "Submit {$submit}<br>";
    if ($submit == "Flyt") {
        flyt_data($filnavn, $splitter, $feltnavn, $feltantal, $leverandor, $varegrp, $rabat);
    }
    if (basename($_FILES['uploadedfile']['name'])) {
        $filnavn = "../temp/" . basename($_FILES['uploadedfile']['name']);
        if (move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $filnavn)) {
            #			echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded";
            vis_data($filnavn, $splitter, $feltnavn, $feltantal, $leverandor, $varegrp, $rabat);
            #		vis_data($kladde_id, $_FILES['uploadedfile']['name'], '', '', 1);
        } else {
            echo "Der er sket en fejl ved hentningen af filen, pr&oslash;v igen!";
        }
        exit;
    } elseif ($splitter) {
        vis_data($filnavn, $splitter, $feltnavn, $feltantal, $leverandor, $varegrp, $rabat);
    } else {
        upload();
    }
} else {
    upload();
}
print "</tbody></table>";
################################################################################################################
function upload()
{
    global $font;
    print "<tr><td width=100% align=center><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tbody>";
    print "<form enctype=\"multipart/form-data\" action=\"vareimport.php\" method=\"POST\">";
    print "<input type=\"hidden\" name=\"MAX_FILE_SIZE\" value=\"9999999\" />";
    print "<input type=\"hidden\" name=\"kladde_id\" value={$kladde_id} />";
    $feltantal = $_POST['feltantal'];
    $tegnset = $_POST['tegnset'];
    if (basename($_FILES['uploadedfile']['name'])) {
        $filnavn = "../temp/" . $db . "_" . str_replace(" ", "_", $brugernavn) . ".csv";
        if (move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $filnavn)) {
            vis_data($filnavn, '', '', 1, $bilag, $tegnset);
        } else {
            echo "Der er sket en fejl under hentningen, pr&oslash;v venligst igen";
        }
    } elseif ($submit == 'Vis') {
        vis_data($filnavn, $splitter, $feltnavn, $feltantal, $varenr, $bilag, $tegnset);
    } elseif ($submit == 'Importer') {
        if ($filnavn && $splitter) {
            overfoer_data($filnavn, $splitter, $feltnavn, $feltantal, $tegnset);
        } else {
            vis_data($filnavn, $splitter, $feltnavn, $feltantal, $varenr, $bilag, $tegnset);
        }
    }
} else {
    if (!($r1 = db_fetch_array(db_select("select box1, box2, beskrivelse from grupper where art='RA' order by kodenr desc", __FILE__ . " linje " . __LINE__)))) {
        exit;
    }
    upload($bilag);
}
print "</tbody></table>";
print "</body></html>";
#####################################################################################################
function upload($bilag)
{
    print "<form enctype=\"multipart/form-data\" action=\"importer_variantvarer.php\" method=\"POST\">\n";
    print "<tr><td width=100% align=center><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tbody>\n";
示例#4
0
    print "<td width=\"10%\" {$top_bund}><font face=\"Helvetica, Arial, sans-serif\" color=\"#000066\"><a href=kassekladde.php?kladde_id={$kladde_id} accesskey=L>Luk</a></td>";
    print "<td width=\"80%\" {$top_bund}><font face=\"Helvetica, Arial, sans-serif\" color=\"#000066\">Importer til kassekladde (Kassekladde {$kladde_id})</td>";
    print "<td width=\"10%\" {$top_bund} ><font face=\"Helvetica, Arial, sans-serif\" color=\"#000066\"></td>";
    print "</tbody></table>";
    print "</td></tr>";
    if (basename($_FILES['uploadedfile']['name'])) {
        $filnavn = "../temp/" . $db . "_" . str_replace(" ", "_", $brugernavn) . ".csv";
        if (move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $filnavn)) {
            vis_data($kladde_id, $filnavn, $bilag, $modkonto);
        } else {
            echo "Der er sket en fejl under hentningen, pr&oslash;v venligst igen";
        }
    } elseif ($submit == 'Flyt' && $kladde_id && $filnavn && $modkonto) {
        flyt_data($kladde_id, $filnavn, $bilag, $modkonto);
    } elseif ($submit && $kladde_id && $filnavn) {
        vis_data($kladde_id, $filnavn, $bilag, $modkonto);
    } else {
        print "<meta http-equiv=\"refresh\" content=\"0;URL=importer.php?kladde_id={$kladde_id}&bilag={$bilag}\">";
    }
} else {
    print "<meta http-equiv=\"refresh\" content=\"0;URL=kassekladde.php?kladde_id={$kladde_id}&bilag={$bilag}\">";
}
print "</tbody></table>";
################################################################################################################
function vis_data($kladde_id, $filnavn, $bilag, $modkonto)
{
    global $bgcolor;
    global $bgcolor5;
    global $charset;
    global $bruger_id;
    if ($modkonto) {
示例#5
0
    echo "Submit {$submit}<br>";
    if ($submit == "Flyt") {
        flyt_data($filnavn, $leverandor, $varegrp, $rabat);
    }
    if (basename($_FILES['uploadedfile']['name'])) {
        $filnavn = "../temp/" . basename($_FILES['uploadedfile']['name']);
        if (move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $filnavn)) {
            #			echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded";
            vis_data($filnavn, $leverandor, $varegrp, $rabat);
            #		vis_data($kladde_id, $_FILES['uploadedfile']['name'], '', '', 1);
        } else {
            echo "Der er sket en fejl ved hentningen af filen, pr&oslash;v igen!";
        }
        exit;
    } elseif ($submit == 'Vis') {
        vis_data($filnavn, $leverandor, $varegrp, $rabat);
    } else {
        upload();
    }
} else {
    upload();
}
print "</tbody></table>";
################################################################################################################
function upload()
{
    global $font;
    print "<tr><td width=100% align=center><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tbody>";
    print "<form enctype=\"multipart/form-data\" action=\"vvsimport.php\" method=\"POST\">";
    print "<input type=\"hidden\" name=\"MAX_FILE_SIZE\" value=\"9999999\" />";
    print "<input type=\"hidden\" name=\"kladde_id\" value={$kladde_id} />";
示例#6
0
    $start = if_isset($_POST['start']) * 1;
    if (substr($submit, 0, 4) == "Indl") {
        flyt_data($filnavn, $leverandor, $vvsgrp, $varegrp, $rabat, $start);
    }
    if (basename($_FILES['uploadedfile']['name'])) {
        $filnavn = "../temp/" . basename($_FILES['uploadedfile']['name']);
        if (move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $filnavn)) {
            #			echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded";
            vis_data($filnavn, $leverandor, $vvsgrp, $varegrp, $rabat, $start);
            #		vis_data($kladde_id, $_FILES['uploadedfile']['name'], '', '', 1);
        } else {
            echo "Der er sket en fejl ved hentningen af filen, pr&oslash;v igen!";
        }
        exit;
    } elseif ($submit == 'Vis') {
        vis_data($filnavn, $leverandor, $vvsgrp, $varegrp, $rabat, $start);
    } else {
        upload();
    }
} else {
    upload();
}
print "</tbody></table>";
################################################################################################################
function upload()
{
    print "<tr><td width=100% align=center><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tbody>";
    print "<form enctype=\"multipart/form-data\" action=\"solarvvs.php\" method=\"POST\">";
    print "<input type=\"hidden\" name=\"MAX_FILE_SIZE\" value=\"99999999\" />";
    print "<input type=\"hidden\" name=\"kladde_id\" value={$kladde_id} />";
    print "<tr><td width=100% align=center>V&aelig;lg datafil: <input name=\"uploadedfile\" type=\"file\" /><br /></td></tr>";
示例#7
0
         vis_data($kladde_id, $filnavn, $splitter, $feltnavn, $feltantal, 0, $datoformat);
     } else {
         vis_data($kladde_id, $filnavn, $splitter, $feltnavn, $feltantal, $bilag, $datoformat);
     }
 } elseif ($submit == 'Flyt') {
     if ($kladde_id && $filnavn && $splitter) {
         if (in_array('bilag', $feltnavn)) {
             flyt_data($kladde_id, $filnavn, $splitter, $feltnavn, $feltantal, 0, $datoformat);
         } else {
             flyt_data($kladde_id, $filnavn, $splitter, $feltnavn, $feltantal, $bilag, $datoformat);
         }
     } else {
         if (in_array('bilag', $feltnavn)) {
             vis_data($kladde_id, $filnavn, $splitter, $feltnavn, $feltantal, 0, $datoformat);
         } else {
             vis_data($kladde_id, $filnavn, $splitter, $feltnavn, $feltantal, $bilag, $datoformat);
         }
     }
 } else {
     if (in_array('bilag', $feltnavn)) {
         upload($kladde_id, 0);
     } else {
         upload($kladde_id, $bilag);
     }
 }
 /*	
 if ($kladde_id)
 	{
 		hentdata($kladde_id);
 	}
 */
示例#8
0
    print "<td width=\"10%\" {$top_bund}><font face=\"Helvetica, Arial, sans-serif\" color=\"#000066\"><a href=kassekladde.php?kladde_id={$kladde_id} accesskey=L>Luk</a></td>";
    print "<td width=\"80%\" {$top_bund}><font face=\"Helvetica, Arial, sans-serif\" color=\"#000066\">{$title} (Kassekladde {$kladde_id})</td>";
    print "<td width=\"10%\" {$top_bund} ><font face=\"Helvetica, Arial, sans-serif\" color=\"#000066\"></td>";
    print "</tbody></table>";
    print "</td></tr>";
    if (basename($_FILES['uploadedfile']['name'])) {
        $filnavn = "../temp/" . $db . "_" . str_replace(" ", "_", $brugernavn) . ".csv";
        if (move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $filnavn)) {
            vis_data($kladde_id, $filnavn, $bilag);
        } else {
            echo "Der er sket en fejl under hentningen, pr&oslash;v venligst igen";
        }
    } elseif ($submit == 'Flyt' && $kladde_id && $filnavn) {
        flyt_data($kladde_id, $filnavn, $bilag);
    } elseif ($submit && $kladde_id && $filnavn) {
        vis_data($kladde_id, $filnavn, $bilag);
    } else {
        print "<meta http-equiv=\"refresh\" content=\"0;URL=importer.php?kladde_id={$kladde_id}&bilag={$bilag}\">";
    }
} else {
    print "<meta http-equiv=\"refresh\" content=\"0;URL=kassekladde.php?kladde_id={$kladde_id}&bilag={$bilag}\">";
}
print "</tbody></table>";
################################################################################################################
function vis_data($kladde_id, $filnavn, $bilag)
{
    global $bgcolor;
    global $bgcolor5;
    global $charset;
    global $bruger_id;
    $fp = fopen("{$filnavn}", "r");
示例#9
0
                db_modify("insert into grupper (beskrivelse,art,kode,kodenr) values ('Bankimport','KASKL','3','{$bruger_id}')", __FILE__ . " linje " . __LINE__);
            }
            if (!$feltantal) {
                $feltantal = 1;
            }
            vis_data($kladde_id, $filnavn, '', $feltnavn, $feltantal, $kontonr, $bilag, $vend, $valutakode);
        } else {
            echo "Der er sket en fejl under hentningen, pr&oslash;v venligst igen";
        }
    } elseif ($submit == 'Vis') {
        vis_data($kladde_id, $filnavn, $splitter, $feltnavn, $feltantal, $kontonr, $bilag, $vend, $valutakode);
    } elseif ($submit == 'Flyt') {
        if ($kladde_id && $filnavn && $splitter && $kontonr) {
            flyt_data($kladde_id, $filnavn, $splitter, $feltnavn, $feltantal, $kontonr, $bilag, $valutakode[0]);
        } else {
            vis_data($kladde_id, $filnavn, $splitter, $feltnavn, $feltantal, $kontonr, $bilag, $vend, $valutakode);
        }
    } else {
        upload($kladde_id, $bilag);
    }
    /*	
    if ($kladde_id)
    	{
    		hentdata($kladde_id);
    	}
    */
}
print "</tbody></table>";
################################################################################################################
function upload($kladde_id, $bilag)
{