mirror of
https://github.com/Floriansylvain/projet_programmation_web.git
synced 2026-08-19 11:43:16 +02:00
🚧 First introduction of these and dump system
This commit is contained in:
+39
-14
@@ -1,24 +1,49 @@
|
||||
<?php
|
||||
$pdo = new PDO('mysql:host=localhost;dbname=projet_prog_web', 'root', 'root');
|
||||
|
||||
require_once("conf.php");
|
||||
require_once("class/these.php");
|
||||
require_once("class/dump.php");
|
||||
|
||||
$these = new these("Florian",
|
||||
"967125",
|
||||
"Ma thèse très sympa",
|
||||
"Didier Deschamps",
|
||||
"Deschamps Didier",
|
||||
"8516243",
|
||||
"IUT Marne la vallée",
|
||||
"128675",
|
||||
"Informatique",
|
||||
"passée",
|
||||
"2001-1-3",
|
||||
"2000-12-24",
|
||||
"en",
|
||||
"2146795",
|
||||
false,
|
||||
"2000-1-1",
|
||||
"2000-1-1"
|
||||
);
|
||||
|
||||
$row = 1;
|
||||
if (($handle = fopen("scripts/dump_abes_thesesfr.csv", "r")) !== FALSE) {
|
||||
while (($data = fgetcsv($handle, 10000, ";")) !== FALSE) {
|
||||
$num = count($data);
|
||||
echo "<p>---------------- " . $row . " -----------------<br /></p>\n";
|
||||
$row++;
|
||||
for ($c=0; $c < $num; $c++) {
|
||||
if ($data[$c]) {
|
||||
echo $data[$c] . "<br />\n";
|
||||
} else {
|
||||
echo "NULL<br />\n";
|
||||
}
|
||||
$dump = new dump($these);
|
||||
$dump->sendThese();
|
||||
|
||||
/*
|
||||
$row = 1;
|
||||
if (($handle = fopen("scripts/dump_abes_thesesfr.csv", "r")) !== FALSE) {
|
||||
while (($data = fgetcsv($handle, 10000, ";")) !== FALSE) {
|
||||
$num = count($data);
|
||||
echo "<p>---------------- " . $row . " -----------------<br /></p>\n";
|
||||
$row++;
|
||||
for ($c=0; $c < $num; $c++) {
|
||||
if ($data[$c]) {
|
||||
echo $data[$c] . "<br />\n";
|
||||
} else {
|
||||
echo "NULL<br />\n";
|
||||
}
|
||||
}
|
||||
fclose($handle);
|
||||
}
|
||||
fclose($handle);
|
||||
}*/
|
||||
|
||||
|
||||
/*
|
||||
$sql = 'SELECT * FROM theses';
|
||||
|
||||
Reference in New Issue
Block a user